diff --git a/README.md b/README.md
index 19fc3fc32..10937ec00 100644
--- a/README.md
+++ b/README.md
@@ -15,11 +15,11 @@ Japanese and European-language editions of each game from the original
cartridges, with Japanese as the canonical source base and the English
_Golden Sun_ release as the first complete derived build target.
-## Status: 72.49% DONE
+## Status: 73.10% DONE
-
+
-
+

diff --git a/games/gs1/asm/08010704.s b/games/gs1/asm/08010704.s
deleted file mode 100644
index c6617c9d8..000000000
--- a/games/gs1/asm/08010704.s
+++ /dev/null
@@ -1,74 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global Func_08010704
- .thumb_func
-Func_08010704:
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r8
- push {r6, r7}
- mov lr, r3
- ldr r3, [sp, #28]
- mov ip, r2
- ldr r2, [sp, #24]
- ldr r4, [pc, #100]
- lsls r3, r3, #7
- adds r3, r3, r2
- lsls r1, r1, #7
- mov r8, r4
- lsls r3, r3, #2
- adds r1, r1, r0
- add r3, r8
- lsls r1, r1, #2
- mov r2, lr
- mov sl, r3
- add r8, r1
- cmp r2, #0
- ble.n .L0
- movs r5, #0
-.L3:
- lsrs r3, r5, #7
- mov r4, sl
- mov r2, r8
- adds r1, r4, r3
- adds r0, r2, r3
- mov r3, ip
- cmp r3, #0
- ble.n .L1
- ldr r7, [pc, #60]
- ldr r6, [pc, #60]
- movs r4, #0
-.L2:
- ldr r2, [r1, #0]
- ldmia r0!, {r3}
- ands r2, r7
- ands r3, r6
- orrs r2, r3
- stmia r1!, {r2}
- movs r2, #128
- lsls r2, r2, #9
- adds r3, r4, r2
- adds r4, r3, #0
- lsrs r3, r4, #16
- cmp r3, ip
- blt.n .L2
-.L1:
- movs r4, #128
- lsls r4, r4, #9
- adds r3, r5, r4
- adds r5, r3, #0
- lsrs r3, r5, #16
- cmp r3, lr
- blt.n .L3
-.L0:
- pop {r3, r5}
- mov r8, r3
- mov sl, r5
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0x02010000
- .4byte 0x00000fff
- .4byte 0xfffff000
diff --git a/games/gs1/asm/080207c4.s b/games/gs1/asm/080207c4.s
deleted file mode 100644
index 73355a6be..000000000
--- a/games/gs1/asm/080207c4.s
+++ /dev/null
@@ -1,130 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global Func_080207c4
- .thumb_func
-Func_080207c4:
- push {r5, r6, r7, lr}
- mov r7, r8
- push {r7}
- movs r2, #0
- mov r8, r2
- bl Func_080056cc
- adds r6, r0, #0
- cmp r6, #0
- beq.n .L0
- ldr r0, [pc, #228]
- movs r1, #1
- bl Func_0801776c
- movs r3, #9
- negs r3, r3
- mov r8, r3
- b.n .L1
-.L0:
- bl Func_08005c68
- ldr r3, [pc, #212]
- ldr r5, [r3, #0]
- ldr r3, [pc, #212]
- movs r1, #0
- movs r2, #0
- ldrsh r0, [r3, r2]
- bl Func_08020244
- movs r3, #1
- adds r7, r0, #0
- negs r3, r3
- cmp r7, r3
- bne.n .L2
- mov r8, r7
- b.n .L1
-.L2:
- ldr r2, [pc, #192]
- lsls r3, r7, #6
- adds r3, r3, r2
- ldrb r3, [r5, r3]
- cmp r3, #0
- beq.n .L3
- ldr r0, [pc, #184]
- movs r1, #13
- bl Func_0801776c
- b.n .L4
-.L5:
- movs r0, #1
- bl Func_080030f8
-.L4:
- bl Func_08017364
- cmp r0, #0
- beq.n .L5
- movs r0, #1
- movs r1, #0
- movs r2, #0
- movs r3, #1
- bl Func_08028df4
- cmp r0, #0
- beq.n .L6
- bl Func_08019a54
- b.n .L1
-.L6:
- bl Func_08019a54
-.L3:
- ldr r3, [pc, #124]
- movs r0, #85
- strh r7, [r3, #0]
- bl Func_080f9010
- ldr r0, [pc, #128]
- movs r1, #13
- bl Func_0801776c
- b.n .L7
-.L8:
- movs r0, #1
- bl Func_080030f8
-.L7:
- bl Func_08017364
- cmp r0, #0
- beq.n .L8
- bl Func_0801f818
- bl Func_0808a5b0
- ldr r5, [pc, #100]
- adds r0, r7, #0
- adds r1, r5, #0
- bl Func_08005920
- movs r3, #128
- lsls r3, r3, #5
- adds r5, r5, r3
- adds r6, r0, #0
- adds r1, r5, #0
- adds r0, r7, #3
- bl Func_08005920
- orrs r6, r0
- bl Func_08019a54
- cmp r6, #0
- beq.n .L9
- ldr r0, [pc, #68]
- movs r1, #1
- bl Func_0801776c
- movs r2, #3
- negs r2, r2
- mov r8, r2
- b.n .L1
-.L9:
- ldr r0, [pc, #56]
- movs r1, #9
- bl Func_0801776c
-.L1:
- bl Func_08005cf8
- mov r0, r8
- pop {r3}
- mov r8, r3
- pop {r5, r6, r7}
- pop {r1}
- bx r1
- movs r0, r0
- .4byte 0x0000000a
- .4byte 0x03001f1c
- .4byte 0x02002004
- .4byte 0x0000105c
- .4byte 0x00000014
- .4byte 0x0000001a
- .4byte 0x02000000
- .4byte 0x0000000b
- .4byte 0x00000017
diff --git a/games/gs1/asm/08028c04.s b/games/gs1/asm/08028c04.s
deleted file mode 100644
index f79e8cb2a..000000000
--- a/games/gs1/asm/08028c04.s
+++ /dev/null
@@ -1,163 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global Func_08028c04
- .thumb_func
-Func_08028c04:
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r8
- push {r6, r7}
- mov sl, r0
- sub sp, #4
- bl Func_080284dc
- ldr r3, [pc, #320]
- ldr r7, [r3, #0]
- mov r3, sl
- cmp r3, #0
- bne.n .L0
- movs r0, #44
- bl Func_080287a8
- movs r0, #45
- bl Func_080287a8
- b.n .L1
-.L0:
- movs r0, #46
- bl Func_080287a8
- movs r0, #47
- bl Func_080287a8
- movs r0, #48
- bl Func_080287a8
-.L1:
- movs r0, #17
- movs r1, #7
- movs r2, #0
- bl Func_08028808
- mov r3, sl
- cmp r3, #0
- beq.n .L2
- ldr r1, [pc, #268]
- ldr r0, [pc, #268]
- bl Func_080041d8
- ldr r3, [pc, #268]
- adds r2, r7, #0
- adds r2, #150
- strh r3, [r2, #0]
- movs r6, #2
- movs r1, #0
- movs r2, #17
- movs r3, #4
- movs r0, #7
- str r6, [sp, #0]
- bl Func_080162d4
- ldr r5, [pc, #248]
- movs r3, #128
- adds r1, r0, #0
- adds r3, r3, r7
- str r1, [r3, #0]
- adds r0, r5, #0
- movs r2, #0
- mov r8, r3
- movs r3, #4
- bl Func_0801e74c
- movs r1, #4
- movs r2, #25
- movs r3, #12
- movs r0, #3
- str r6, [sp, #0]
- bl Func_080162d4
- adds r1, r0, #0
- str r1, [r7, #124]
- adds r0, r5, #1
- movs r2, #8
- movs r3, #0
- bl Func_0801e74c
- adds r0, r5, #2
- ldr r1, [r7, #124]
- movs r2, #8
- movs r3, #11
- adds r5, #3
- bl Func_0801e74c
- ldr r1, [r7, #124]
- adds r0, r5, #0
- movs r2, #8
- movs r3, #22
- bl Func_0801e74c
- b.n .L3
-.L2:
- ldr r1, [pc, #156]
- ldr r0, [pc, #172]
- bl Func_080041d8
- ldr r3, [pc, #156]
- adds r2, r7, #0
- adds r2, #150
- strh r3, [r2, #0]
- movs r5, #2
- movs r1, #0
- movs r2, #18
- movs r3, #4
- movs r0, #6
- str r5, [sp, #0]
- bl Func_080162d4
- movs r3, #128
- adds r1, r0, #0
- adds r3, r3, r7
- str r1, [r3, #0]
- ldr r0, [pc, #136]
- movs r2, #2
- mov r8, r3
- movs r3, #4
- bl Func_0801e74c
- movs r0, #1
- movs r1, #5
- movs r2, #28
- movs r3, #7
- str r5, [sp, #0]
- bl Func_080162d4
- str r0, [r7, #124]
-.L3:
- movs r0, #0
- bl Func_08028574
- mov r3, sl
- adds r5, r0, #0
- cmp r3, #0
- beq.n .L4
- ldr r0, [pc, #80]
- bl Func_08004278
- b.n .L5
-.L4:
- ldr r0, [pc, #84]
- bl Func_08004278
-.L5:
- mov r3, r8
- ldr r0, [r3, #0]
- bl Func_08016478
- ldr r0, [r7, #124]
- bl Func_08016478
- mov r3, r8
- ldr r0, [r3, #0]
- movs r1, #2
- bl Func_08016418
- movs r1, #2
- ldr r0, [r7, #124]
- bl Func_08016418
- movs r0, #1
- bl Func_080030f8
- bl Func_0802851c
- adds r0, r5, #0
- add sp, #4
- pop {r3, r5}
- mov r8, r3
- mov sl, r5
- pop {r5, r6, r7}
- pop {r1}
- bx r1
- movs r0, r0
- .4byte 0x03001f38
- .4byte 0x00000c76
- .4byte 0x08028aa9
- .4byte 0x0000ffff
- .4byte 0x00000c77
- .4byte 0x08028b81
- .4byte 0x00000c76
diff --git a/games/gs1/asm/0808ce74.s b/games/gs1/asm/0808ce74.s
deleted file mode 100644
index fed793e81..000000000
--- a/games/gs1/asm/0808ce74.s
+++ /dev/null
@@ -1,137 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global Func_0808ce74
- .thumb_func
-Func_0808ce74:
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r8
- push {r6, r7}
- ldr r3, [pc, #228]
- movs r1, #250
- lsls r1, r1, #1
- adds r3, r3, r1
- movs r0, #0
- mov sl, r0
- ldr r0, [r3, #0]
- sub sp, #12
- bl Func_0808ba1c
- ldr r3, [pc, #212]
- ldr r6, [r3, #0]
- subs r3, #76
- ldr r3, [r3, #0]
- adds r7, r0, #0
- mov r8, r3
- cmp r7, #0
- beq.n .L0
- ldr r3, [r7, #8]
- mov r5, sp
- str r3, [r5, #0]
- ldr r3, [r7, #12]
- str r3, [r5, #4]
- ldr r3, [r7, #16]
- str r3, [r5, #8]
- movs r0, #128
- lsls r0, r0, #13
- adds r2, r5, #0
- ldrh r1, [r7, #6]
- bl Func_0800447c
- movs r2, #207
- lsls r2, r2, #1
- adds r3, r6, r2
- movs r0, #0
- ldrsh r3, [r3, r0]
- cmp r3, #3
- bne.n .L1
- ldr r3, [r5, #0]
- cmp r3, #0
- bge.n .L2
- ldr r1, [pc, #156]
- adds r3, r3, r1
-.L2:
- asrs r2, r3, #21
- ldr r3, [r5, #8]
- movs r1, #31
- ands r2, r1
- cmp r3, #0
- bge.n .L3
- ldr r0, [pc, #140]
- adds r3, r3, r0
-.L3:
- asrs r3, r3, #21
- ands r3, r1
- lsls r3, r3, #5
- adds r3, r2, r3
- ldr r2, [pc, #132]
- lsls r3, r3, #2
- adds r1, r3, r2
- b.n .L4
-.L1:
- movs r3, #152
- lsls r3, r3, #1
- add r3, r8
- ldr r1, [r3, #0]
- ldr r3, [r5, #0]
- cmp r3, #0
- bge.n .L5
- ldr r0, [pc, #112]
- adds r3, r3, r0
-.L5:
- asrs r2, r3, #20
- ldr r3, [r5, #8]
- cmp r3, #0
- bge.n .L6
- ldr r0, [pc, #100]
- adds r3, r3, r0
-.L6:
- asrs r3, r3, #20
- lsls r3, r3, #7
- adds r3, r2, r3
- lsls r3, r3, #2
- adds r1, r1, r3
-.L4:
- ldrb r6, [r1, #2]
- adds r3, r6, #0
- subs r3, #242
- cmp r3, #5
- bhi.n .L7
- adds r3, r7, #0
- adds r3, #34
- ldr r2, [r5, #8]
- ldrb r0, [r3, #0]
- ldr r1, [r5, #0]
- bl Func_080091a8
- adds r2, r0, #0
- ldr r0, [r7, #12]
- cmp r2, r0
- blt.n .L0
- movs r1, #128
- lsls r1, r1, #15
- adds r3, r0, r1
- cmp r2, r3
- bgt.n .L0
- b.n .L8
-.L7:
- movs r0, #3
- adds r1, r6, #0
- bl Func_0808d48c
- cmp r0, #0
- beq.n .L0
-.L8:
- mov sl, r6
-.L0:
- mov r0, sl
- add sp, #12
- pop {r3, r5}
- mov r8, r3
- mov sl, r5
- pop {r5, r6, r7}
- pop {r1}
- bx r1
- .4byte 0x02000240
- .4byte 0x03001ebc
- .4byte 0x001fffff
- .4byte 0x02020000
- .4byte 0x000fffff
diff --git a/games/gs1/asm/0808e14c.s b/games/gs1/asm/0808e14c.s
deleted file mode 100644
index 0b5edd23e..000000000
--- a/games/gs1/asm/0808e14c.s
+++ /dev/null
@@ -1,125 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global Func_0808e14c
- .thumb_func
-Func_0808e14c:
- push {r5, r6, r7, lr}
- mov r7, fp
- mov r6, sl
- mov r5, r9
- push {r5, r6, r7}
- mov r7, r8
- push {r7}
- ldr r3, [pc, #124]
- ldr r5, [pc, #124]
- movs r1, #250
- lsls r1, r1, #1
- adds r5, r5, r1
- ldr r3, [r3, #0]
- mov r8, r0
- ldr r0, [r5, #0]
- ldr r6, [r3, #16]
- sub sp, #4
- bl Func_0808ba1c
- ldrh r0, [r0, #6]
- mov fp, r0
- ldr r0, [r5, #0]
- bl Func_0808ddec
- ldr r3, [pc, #96]
- mov r2, r8
- ands r2, r3
- mov r9, r0
- mov r8, r2
- bl Func_0808bd24
- movs r3, #1
- ldr r1, [r6, #0]
- negs r3, r3
- mov sl, r0
- cmp r1, r3
- beq.n .L0
-.L7:
- movs r3, #4
- ldrsh r5, [r6, r3]
- movs r3, #240
- lsls r3, r3, #8
- ldrh r2, [r6, #4]
- ands r5, r3
- ldr r3, [pc, #48]
- ands r3, r2
- lsls r3, r3, #16
- asrs r7, r3, #16
- movs r3, #15
- movs r4, #255
- ands r3, r1
- ands r4, r2
- cmp r3, #4
- bne.n .L1
- movs r1, #6
- ldrsh r0, [r6, r1]
- str r4, [sp, #0]
- bl Func_0808d428
- ldr r4, [sp, #0]
- cmp r0, #0
- beq.n .L1
- cmp r7, #0
- beq.n .L2
- mov r2, fp
- ldr r1, [pc, #20]
- subs r3, r5, r2
- adds r3, r3, r1
- b.n .L3
- .4byte 0x00000800
- .4byte 0x03001ebc
- .4byte 0x02000240
- .4byte 0x000001ff
- .4byte 0x000017ff
-.L3:
- lsls r3, r3, #16
- ldr r2, [pc, #76]
- lsrs r3, r3, #16
- cmp r3, r2
- bhi.n .L1
-.L2:
- mov r1, r8
- ldr r2, [r6, #0]
- ldrb r3, [r6, #1]
- cmp r1, #0
- beq.n .L4
- cmp r3, r8
- bne.n .L1
-.L4:
- movs r3, #16
- ands r3, r2
- cmp r3, #0
- beq.n .L5
- cmp r4, r9
- bne.n .L1
- adds r0, r6, #0
- b.n .L6
-.L5:
- adds r0, r6, #0
- cmp r4, sl
- beq.n .L6
-.L1:
- adds r6, #12
- ldr r3, [r6, #0]
- movs r2, #1
- negs r2, r2
- adds r1, r3, #0
- cmp r3, r2
- bne.n .L7
-.L0:
- movs r0, #0
-.L6:
- add sp, #4
- pop {r3, r5, r6, r7}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- mov fp, r7
- pop {r5, r6, r7}
- pop {r1}
- bx r1
- .4byte 0x00002ffe
diff --git a/games/gs1/asm/080a1d08.s b/games/gs1/asm/080a1d08.s
deleted file mode 100644
index 58e4e9da6..000000000
--- a/games/gs1/asm/080a1d08.s
+++ /dev/null
@@ -1,153 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global InventoryMenu_ShowModalMessage
- .global Func_080a1d08
- .thumb_func
-InventoryMenu_ShowModalMessage:
-Func_080a1d08:
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r8
- push {r6, r7}
- ldr r3, [pc, #216]
- ldr r7, [r3, #0]
- mov r8, r2
- ldr r2, [r7, #20]
- movs r3, #13
- strb r3, [r2, #5]
- movs r2, #1
- negs r2, r2
- sub sp, #24
- adds r6, r0, #0
- mov sl, r1
- cmp r8, r2
- beq.n .L0
- add r0, sp, #8
- add r1, sp, #20
- add r2, sp, #16
- add r3, sp, #12
- str r0, [sp, #0]
- adds r0, r6, #0
- bl Func_08015108
- ldr r2, [sp, #8]
- adds r5, r7, #0
- str r2, [sp, #0]
- movs r2, #129
- lsls r2, r2, #1
- adds r5, #60
- str r2, [sp, #4]
- ldr r3, [sp, #12]
- adds r0, r5, #0
- mov r1, sl
- mov r2, r8
- bl Func_080a10d0
- cmp r0, #0
- bne.n .L1
- ldr r2, [sp, #8]
- ldr r0, [r5, #0]
- ldr r3, [sp, #12]
- str r2, [sp, #0]
- mov r1, sl
- mov r2, r8
- bl Func_080a23f4
-.L1:
- ldr r5, [r5, #0]
- b.n .L2
-.L0:
- ldr r5, [r7, #44]
-.L2:
- adds r0, r5, #0
- bl Func_08015270
- adds r0, r5, #0
- bl Func_08015278
- movs r3, #1
- negs r3, r3
- cmp r8, r3
- bne.n .L3
- adds r0, r6, #0
- adds r1, r5, #0
- movs r2, #0
- movs r3, #0
- bl Func_08015080
- b.n .L4
-.L3:
- adds r0, r6, #0
- adds r1, r5, #0
- movs r2, #0
- movs r3, #0
- bl Func_08015078
-.L4:
- movs r2, #1
- negs r2, r2
- cmp sl, r2
- beq.n .L5
- movs r0, #1
- bl Func_080030f8
- movs r3, #1
- ldr r6, [pc, #64]
- mov sl, r3
-.L7:
- movs r0, #1
- bl Func_080030f8
- ldr r3, [r6, #0]
- mov r2, sl
- ands r3, r2
- cmp r3, #0
- bne.n .L6
- ldr r3, [r6, #0]
- movs r2, #2
- ands r3, r2
- cmp r3, #0
- bne.n .L6
- ldr r3, [r6, #0]
- movs r2, #8
- ands r3, r2
- cmp r3, #0
- beq.n .L7
-.L6:
- movs r3, #1
- negs r3, r3
- cmp r8, r3
- bne.n .L8
- adds r0, r5, #0
- bl Func_08015270
-.L8:
- adds r0, r5, #0
- bl Func_08015278
- b.n .L9
- movs r0, r0
- .4byte 0x03001f2c
- .4byte 0x03001c94
-.L5:
- ldr r0, [pc, #40]
- bl Func_080770c8
-.L9:
- ldr r3, [pc, #40]
- adds r2, r7, r3
- movs r3, #1
- strh r3, [r2, #0]
- ldr r1, [pc, #24]
- ldr r3, [r7, #20]
- movs r2, #1
- negs r2, r2
- strb r1, [r3, #5]
- cmp r8, r2
- beq.n .L10
- adds r0, r7, #0
- adds r0, #60
- movs r1, #1
- bl Func_080a1114
- b.n .L10
- .4byte 0x00000001
- .4byte 0x00000151
- .4byte 0x00000222
-.L10:
- add sp, #24
- pop {r3, r5}
- mov r8, r3
- mov sl, r5
- pop {r5, r6, r7}
- pop {r0}
- bx r0
diff --git a/games/gs1/asm/080a6b64.s b/games/gs1/asm/080a6b64.s
deleted file mode 100644
index a1afafe9e..000000000
--- a/games/gs1/asm/080a6b64.s
+++ /dev/null
@@ -1,172 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global Func_080a6b64
- .thumb_func
-Func_080a6b64:
- push {r5, r6, r7, lr}
- mov r7, fp
- mov r6, sl
- mov r5, r9
- push {r5, r6, r7}
- mov r7, r8
- push {r7}
- ldr r3, [pc, #316]
- ldr r3, [r3, #0]
- sub sp, #4
- mov sl, r3
- mov r8, r0
- adds r6, r2, #0
- bl Func_08015270
- movs r3, #11
- str r3, [sp, #0]
- movs r2, #11
- movs r3, #16
- mov r0, r8
- movs r1, #0
- bl Func_08015070
- movs r3, #136
- lsls r3, r3, #2
- add r3, sl
- ldrh r2, [r3, #0]
- movs r3, #2
- ands r3, r2
- cmp r3, #0
- beq.n .L0
- ldr r0, [pc, #272]
- mov r1, r8
- movs r2, #0
- movs r3, #88
- bl Func_08015080
- b.n .L1
-.L0:
- ldr r0, [pc, #260]
- mov r1, r8
- movs r2, #0
- movs r3, #88
- bl Func_08015080
-.L1:
- ldr r2, [r6, #8]
- lsls r3, r2, #2
- adds r5, r3, r2
- ldr r3, [r6, #20]
- subs r3, r3, r5
- lsls r3, r3, #24
- lsrs r3, r3, #24
- mov fp, r3
- cmp r3, #5
- bls.n .L2
- movs r1, #5
- mov fp, r1
-.L2:
- movs r3, #34
- str r3, [sp, #0]
- movs r0, #5
- adds r1, r5, #0
- mov r2, r8
- movs r3, #112
- bl Func_080a2324
- movs r2, #15
- ldr r1, [r6, #20]
- ldr r3, [r6, #8]
- mov r0, r8
- str r2, [sp, #0]
- movs r2, #5
- bl Func_080a21b0
- movs r2, #96
- movs r3, #0
- ldr r0, [pc, #192]
- mov r1, r8
- bl Func_08015080
- movs r2, #0
- mov r3, fp
- mov r9, r2
- cmp r3, #0
- bls.n .L3
- movs r1, #228
- lsls r3, r5, #1
- lsls r1, r1, #1
- adds r6, r3, r1
-.L7:
- ldr r3, [pc, #172]
- add r3, sl
- ldrb r0, [r3, #0]
- bl Func_08077008
- mov r2, sl
- ldrh r3, [r6, r2]
- adds r5, r0, #0
- ldr r0, [pc, #160]
- ands r0, r3
- bl Func_08077080
- adds r7, r0, #0
- ldrb r2, [r7, #9]
- movs r1, #58
- ldrsh r3, [r5, r1]
- cmp r2, r3
- ble.n .L4
- movs r0, #2
- bl Func_080150b8
- b.n .L5
-.L4:
- mov r2, sl
- ldrh r3, [r6, r2]
- ldr r0, [pc, #128]
- ands r0, r3
- bl Func_080a735c
- cmp r0, #0
- beq.n .L6
- movs r0, #4
- bl Func_080150b8
- b.n .L5
-.L6:
- movs r0, #15
- bl Func_080150b8
-.L5:
- mov r1, sl
- ldrh r3, [r6, r1]
- ldr r0, [pc, #96]
- mov r2, r9
- ands r0, r3
- lsls r5, r2, #4
- ldr r3, [pc, #92]
- adds r5, #8
- adds r0, r0, r3
- mov r1, r8
- movs r2, #16
- adds r3, r5, #0
- bl Func_08015080
- ldrb r0, [r7, #9]
- movs r3, #104
- movs r1, #2
- mov r2, r8
- str r5, [sp, #0]
- bl Func_080150a8
- movs r0, #15
- bl Func_080150b8
- mov r3, r9
- adds r3, #1
- lsls r3, r3, #24
- lsrs r3, r3, #24
- mov r9, r3
- adds r6, #2
- cmp fp, r9
- bhi.n .L7
-.L3:
- movs r0, #1
- add sp, #4
- pop {r3, r5, r6, r7}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- mov fp, r7
- pop {r5, r6, r7}
- pop {r1}
- bx r1
- .4byte 0x03001f2c
- .4byte 0x00000ae1
- .4byte 0x00000b89
- .4byte 0x00000aed
- .4byte 0x0000021a
- .4byte 0x00003fff
- .4byte 0x00000333
diff --git a/games/gs1/asm/080b3444.s b/games/gs1/asm/080b3444.s
deleted file mode 100644
index a57a17851..000000000
--- a/games/gs1/asm/080b3444.s
+++ /dev/null
@@ -1,232 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global Shop_SelectPartyMemberItem
- .thumb_func
-Shop_SelectPartyMemberItem:
- push {r5, r6, r7, lr}
- mov r7, fp
- mov r6, sl
- mov r5, r9
- push {r5, r6, r7}
- mov r7, r8
- push {r7}
- sub sp, #16
- str r0, [sp, #12]
- movs r2, #0
- movs r0, #1
- str r1, [sp, #8]
- str r2, [sp, #4]
- mov r9, r0
- mov fp, r2
- bl Func_080b010c
- ldr r3, [pc, #436]
- ldr r3, [r3, #0]
- movs r5, #2
- mov r8, r3
- movs r1, #12
- movs r2, #14
- movs r3, #8
- movs r0, #16
- str r5, [sp, #0]
- bl Func_08015010
- mov r3, r8
- str r0, [r3, #32]
- movs r1, #14
- movs r2, #13
- movs r3, #3
- movs r0, #0
- str r5, [sp, #0]
- bl Func_08015010
- movs r3, #228
- lsls r3, r3, #2
- ldr r4, [sp, #4]
- mov sl, r0
- add r3, r8
- movs r1, #128
- ldrh r0, [r3, #0]
- lsls r1, r1, #23
- mov r2, sl
- movs r3, #0
- str r4, [sp, #0]
- bl Func_080150c8
- movs r6, #224
- adds r5, r0, #0
- add r0, sp, #4
- ldrb r0, [r0, #0]
- lsls r6, r6, #2
- movs r3, #4
- add r6, r8
- movs r1, #32
- strb r3, [r5, #5]
- strb r0, [r5, #4]
- negs r1, r1
- adds r0, r6, #0
- movs r2, #112
- bl Func_080b0a20
- movs r2, #234
- lsls r2, r2, #2
- add r2, r8
- movs r3, #12
- str r5, [r6, #0]
- strb r3, [r2, #0]
- ldr r2, [sp, #4]
- mov r0, sl
- str r2, [sp, #0]
- movs r1, #2
- movs r2, #0
- movs r3, #8
- bl Func_080a1028
- movs r6, #234
- lsls r6, r6, #2
- movs r7, #0
- add r6, r8
-.L3:
- mov r3, r9
- cmp r3, #0
- beq.n .L0
- ldr r3, [pc, #300]
- add r3, r8
- movs r1, #0
- ldrsb r1, [r3, r1]
- movs r4, #0
- adds r0, r7, r1
- mov r9, r4
- bl Func_080022fc
- adds r7, r0, #0
- movs r0, #219
- lsls r0, r0, #2
- lsls r1, r7, #1
- mov r3, r8
- adds r2, r1, r0
- adds r3, #2
- adds r1, r1, r7
- ldrsh r4, [r3, r2]
- lsls r1, r1, #3
- subs r1, #12
- mov r0, sl
- movs r2, #0
- mov fp, r4
- bl Func_080b0a6c
- movs r3, #3
- mov r0, sl
- adds r1, r7, #0
- movs r2, #0
- strb r3, [r6, #0]
- bl Func_080b11c4
- mov r2, r8
- ldr r0, [r2, #32]
- mov r1, fp
- bl Func_080b1dec
-.L0:
- movs r0, #1
- bl Func_080030f8
- ldr r1, [pc, #224]
- ldr r2, [r1, #0]
- movs r3, #1
- ands r2, r3
- cmp r2, #0
- beq.n .L1
- mov r0, fp
- bl Func_08077248
- cmp r0, #0
- bne.n .L2
- movs r0, #113
- bl Func_080f9010
- b.n .L3
-.L2:
- movs r0, #112
- bl Func_080f9010
- mov r0, fp
- bl Func_080b362c
- movs r3, #1
- negs r3, r3
- cmp r0, r3
- bne.n .L4
- movs r3, #224
- lsls r3, r3, #2
- add r3, r8
- ldr r2, [r3, #0]
- movs r3, #4
- strb r3, [r2, #5]
- movs r4, #1
- movs r3, #12
- strb r3, [r6, #0]
- mov r9, r4
- b.n .L3
-.L4:
- ldr r3, [sp, #12]
- mov r2, fp
- str r2, [r3, #0]
- ldr r4, [sp, #8]
- str r0, [r4, #0]
- movs r0, #0
- str r0, [sp, #4]
- b.n .L5
-.L1:
- ldr r3, [r1, #0]
- movs r2, #2
- ands r3, r2
- cmp r3, #0
- beq.n .L6
- movs r0, #113
- bl Func_080f9010
- movs r3, #1
- ldr r2, [sp, #12]
- negs r3, r3
- str r3, [r2, #0]
- ldr r4, [sp, #8]
- str r3, [r4, #0]
- str r3, [sp, #4]
- b.n .L5
-.L6:
- ldr r5, [pc, #108]
- ldr r3, [r5, #0]
- movs r2, #32
- ands r3, r2
- cmp r3, #0
- beq.n .L7
- movs r0, #111
- bl Func_080f9010
- movs r0, #1
- subs r7, #1
- mov r9, r0
-.L7:
- ldr r3, [r5, #0]
- movs r2, #16
- ands r3, r2
- cmp r3, #0
- beq.n .L3
- movs r0, #111
- bl Func_080f9010
- movs r2, #1
- adds r7, #1
- mov r9, r2
- b.n .L3
-.L5:
- bl Func_080a1030
- mov r0, sl
- movs r1, #2
- bl Func_08015018
- mov r3, r8
- ldr r0, [r3, #32]
- movs r1, #2
- bl Func_08015018
- movs r0, #1
- bl Func_080030f8
- bl Func_080b0204
- ldr r0, [sp, #4]
- add sp, #16
- pop {r3, r5, r6, r7}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- mov fp, r7
- pop {r5, r6, r7}
- pop {r1}
- bx r1
- .4byte 0x03001f2c
- .4byte 0x000003a7
- .4byte 0x03001c94
- .4byte 0x03001b04
diff --git a/games/gs1/asm/080b9324.s b/games/gs1/asm/080b9324.s
deleted file mode 100644
index dc173c625..000000000
--- a/games/gs1/asm/080b9324.s
+++ /dev/null
@@ -1,180 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global BattlePresentation_BuildOpponentEntries
- .global Func_080b9324
- .thumb_func
-BattlePresentation_BuildOpponentEntries:
-Func_080b9324:
- push {r5, r6, r7, lr}
- mov r7, fp
- mov r6, sl
- mov r5, r9
- push {r5, r6, r7}
- mov r7, r8
- push {r7}
- sub sp, #48
- movs r2, #0
- str r0, [sp, #16]
- str r2, [sp, #12]
- ldr r3, [pc, #240]
- ldr r3, [r3, #0]
- adds r3, #69
- str r3, [sp, #8]
- ldrb r3, [r3, #0]
- movs r0, #0
- cmp r3, #1
- bne.n .L0
- b.n .L1
-.L0:
- mov r3, sp
- adds r3, #20
- movs r0, #2
- adds r1, r3, #0
- str r3, [sp, #4]
- bl Func_080b6b40
- movs r4, #31
- mov r8, r0
- ldr r6, [sp, #4]
- cmp r0, #0
- bne.n .L2
- movs r0, #0
- b.n .L1
-.L2:
- str r4, [sp, #0]
- bl Func_08004458
- mov r5, r8
- muls r5, r0
- bl Func_08004458
- mov r2, r8
- muls r2, r0
- lsrs r5, r5, #16
- lsrs r2, r2, #16
- lsls r5, r5, #1
- lsls r2, r2, #1
- ldr r4, [sp, #0]
- ldrh r1, [r6, r5]
- ldrh r3, [r6, r2]
- subs r4, #1
- strh r3, [r6, r5]
- strh r1, [r6, r2]
- cmp r4, #0
- bge.n .L2
- ldr r2, [sp, #8]
- ldrb r3, [r2, #0]
- cmp r3, #2
- bne.n .L3
- bl Func_08004458
- lsls r3, r0, #2
- adds r3, r3, r0
- lsrs r3, r3, #16
- adds r3, #1
- cmp r3, #1
- bgt.n .L4
- movs r3, #2
-.L4:
- cmp r3, r8
- bge.n .L3
- mov r8, r3
-.L3:
- movs r4, #0
- cmp r4, r8
- bge.n .L5
-.L12:
- ldr r2, [sp, #4]
- lsls r3, r4, #1
- ldrh r3, [r2, r3]
- mov r9, r3
- mov r0, r9
- str r4, [sp, #0]
- bl Func_08077008
- movs r3, #67
- adds r6, r0, #0
- adds r3, r3, r6
- mov sl, r3
- ldrb r3, [r3, #0]
- movs r7, #0
- ldr r4, [sp, #0]
- cmp r7, r3
- bge.n .L6
- movs r2, #64
- adds r2, r2, r6
- mov fp, r2
- ldr r2, [sp, #12]
- lsls r3, r2, #4
- ldr r2, [sp, #16]
- adds r5, r3, r2
-.L11:
- mov r3, r9
- strh r3, [r5, #0]
- mov r3, fp
- ldrh r2, [r3, #0]
- strh r2, [r5, #4]
- cmp r7, #0
- beq.n .L7
- lsls r2, r2, #16
- asrs r3, r2, #16
- lsrs r2, r2, #31
- adds r3, r3, r2
- asrs r3, r3, #1
- strh r3, [r5, #4]
-.L7:
- movs r2, #158
- lsls r2, r2, #1
- adds r3, r6, r2
- ldrb r3, [r3, #0]
- cmp r3, #0
- bne.n .L8
- subs r2, #1
- adds r3, r6, r2
- ldrb r3, [r3, #0]
- cmp r3, #0
- beq.n .L9
-.L8:
- movs r3, #8
- strh r3, [r5, #6]
- ldr r3, [pc, #8]
- strh r3, [r5, #8]
- movs r3, #128
- lsls r3, r3, #1
- strh r3, [r5, #10]
- b.n .L10
- .4byte 0x00000000
- .4byte 0x03001e74
-.L9:
- adds r0, r5, #0
- movs r1, #0
- str r4, [sp, #0]
- bl Func_080bd424
- ldr r4, [sp, #0]
-.L10:
- ldr r2, [sp, #12]
- adds r2, #1
- str r2, [sp, #12]
- ldr r2, [sp, #8]
- ldrb r3, [r2, #0]
- adds r5, #16
- cmp r3, #2
- beq.n .L6
- mov r2, sl
- ldrb r3, [r2, #0]
- adds r7, #1
- cmp r7, r3
- blt.n .L11
-.L6:
- adds r4, #1
- cmp r4, r8
- blt.n .L12
-.L5:
- ldr r0, [sp, #12]
-.L1:
- add sp, #48
- pop {r3, r5, r6, r7}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- mov fp, r7
- pop {r5, r6, r7}
- pop {r1}
- bx r1
diff --git a/games/gs1/asm/080fb2a4.s b/games/gs1/asm/080fb2a4.s
deleted file mode 100644
index 460bb55ae..000000000
--- a/games/gs1/asm/080fb2a4.s
+++ /dev/null
@@ -1,29 +0,0 @@
-@ コード間隙関数の再構築サム逆アセンブル。範囲は
-@ 制御フロー走査で確定。build_asm.tsでバイト一致確認済み。
-.syntax unified
- .thumb
- .global MusicPlayer_SetPitchAndUpdateFrequency
- .global Func_080fb2a4
- .thumb_func
-MusicPlayer_SetPitchAndUpdateFrequency:
-Func_080fb2a4:
- push {r4, lr}
- adds r2, r0, #0
- lsls r1, r1, #16
- lsrs r1, r1, #16
- ldr r3, [r2, #52]
- ldr r0, [pc, #24]
- cmp r3, r0
- bne.n .L0
- strh r1, [r2, #30]
- ldrh r4, [r2, #28]
- adds r0, r1, #0
- muls r0, r4
- asrs r0, r0, #8
- strh r0, [r2, #32]
-.L0:
- pop {r4}
- pop {r0}
- bx r0
- movs r0, r0
- .4byte 0x68736d53
diff --git a/games/gs1/assets/code/resource_371_overlay.s b/games/gs1/assets/code/resource_371_overlay.s
index faa8b52bd..b81559dbc 100644
--- a/games/gs1/assets/code/resource_371_overlay.s
+++ b/games/gs1/assets/code/resource_371_overlay.s
@@ -1663,900 +1663,8 @@ AlchemyC_020006dc:
.2byte 0x0200
AlchemyC_02000a8c:
.space 0x19c
- push {r5, r6, lr}
- movs r0, #15
- bl sub_02004f2a
- adds r6, r0, #0
- bl sub_02004f10
- movs r0, #160
- movs r1, #1
- lsls r0, r0, #9
- bl sub_020050ca
- movs r0, #4
- bl sub_02004dc8
- bl sub_02005084
- bl sub_02005098
- bl sub_020050ac
- movs r0, #1
- movs r1, #1
- movs r2, #1
- movs r3, #0
- negs r1, r1
- negs r2, r2
- negs r0, r0
- bl sub_02005056
- movs r0, #1
- bl sub_02004dec
- movs r0, #0
- ldr r1, [pc, #1012]
- ldr r2, [pc, #1016]
- bl sub_02004f7e
- movs r0, #1
- ldr r1, [pc, #1004]
- ldr r2, [pc, #1004]
- bl sub_02004f88
- movs r2, #197
- movs r0, #0
- ldr r1, [pc, #1000]
- lsls r2, r2, #3
- bl sub_02004fcc
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02005058
- movs r2, #197
- lsls r2, r2, #19
- ldr r1, [pc, #980]
- movs r0, #8
- bl sub_02004ffc
- movs r0, #1
- bl sub_02004e2a
- movs r1, #15
- movs r0, #8
- bl sub_02005042
- movs r0, #8
- bl sub_02004fb0
- movs r1, #0
- bl sub_02004efe
- movs r0, #10
- ldr r1, [pc, #932]
- ldr r2, [pc, #944]
- bl sub_02004fd0
- movs r0, #11
- ldr r1, [pc, #920]
- ldr r2, [pc, #936]
- bl sub_02004fda
- movs r0, #12
- ldr r1, [pc, #912]
- ldr r2, [pc, #924]
- bl sub_02004fe4
- ldr r2, [pc, #920]
- ldr r1, [pc, #900]
- movs r0, #13
- bl sub_02004fee
- movs r0, #141
- bl sub_0200518c
- ldr r1, [pc, #908]
- movs r0, #10
- bl sub_02005004
- movs r0, #20
- bl sub_02004fca
- ldr r1, [pc, #896]
- movs r0, #11
- bl sub_02005012
- movs r0, #20
- bl sub_02004fd8
- ldr r1, [pc, #888]
- movs r0, #12
- bl sub_02005020
- movs r0, #20
- bl sub_02004fe6
- ldr r1, [pc, #876]
- movs r0, #13
- bl sub_0200503e
- ldr r0, [pc, #872]
- bl sub_020051c4
- movs r0, #0
- bl sub_02005022
- cmp r0, #0
- beq.n .L_02000d36
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_02005090
-.L_02000d36:
- movs r2, #200
- movs r0, #1
- ldr r1, [pc, #848]
- lsls r2, r2, #3
- bl sub_02005084
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02005110
- movs r1, #160
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #20
- bl sub_0200511c
- movs r0, #0
- ldr r1, [pc, #816]
- movs r2, #0
- bl sub_02005136
- movs r0, #1
- ldr r1, [pc, #808]
- movs r2, #60
- bl sub_02005140
- movs r2, #199
- ldr r1, [pc, #764]
- lsls r2, r2, #19
- movs r0, #8
- bl sub_020050d4
- movs r0, #1
- bl sub_02004f02
- ldr r0, [pc, #784]
- bl sub_02005128
- movs r0, #8
- movs r1, #0
- movs r2, #10
- bl sub_0200514a
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200515e
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #7
- movs r2, #40
- bl sub_0200516a
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02005176
- movs r1, #160
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #60
- bl sub_02005182
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200518e
- movs r1, #192
- movs r2, #10
- lsls r1, r1, #7
- movs r0, #1
- bl sub_0200519a
- movs r0, #141
- bl sub_02005280
- ldr r1, [pc, #696]
- movs r0, #10
- bl sub_020050f8
- movs r0, #20
- bl sub_020050be
- ldr r1, [pc, #684]
- movs r0, #11
- bl sub_02005106
- movs r0, #20
- bl sub_020050cc
- ldr r1, [pc, #676]
- movs r0, #12
- bl sub_02005114
- movs r0, #10
- bl sub_020050da
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_020051d6
- movs r1, #128
- movs r2, #10
- movs r0, #1
- lsls r1, r1, #7
- bl sub_020051e2
- ldr r1, [pc, #640]
- movs r0, #13
- bl sub_0200514a
- ldr r0, [pc, #604]
- bl sub_020052d0
- movs r0, #20
- bl sub_02005106
- bl sub_0200529a
- movs r0, #10
- movs r1, #1
- bl sub_020051a2
- movs r0, #11
- movs r1, #1
- bl sub_020051aa
- movs r0, #12
- movs r1, #1
- bl sub_020051b2
- movs r0, #13
- movs r1, #1
- bl sub_020051ba
- movs r1, #1
- movs r2, #223
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #19
- ldr r0, [pc, #580]
- bl sub_0200525a
- bl sub_02005266
- movs r0, #20
- bl sub_02005144
- bl sub_020052d0
- movs r2, #219
- ldr r1, [pc, #556]
- lsls r2, r2, #19
- movs r0, #9
- bl sub_020051dc
- movs r0, #1
- bl sub_0200500a
- movs r0, #9
- ldr r1, [pc, #544]
- ldr r2, [pc, #544]
- bl sub_0200519c
- movs r2, #217
- movs r0, #9
- ldr r1, [pc, #540]
- lsls r2, r2, #3
- bl sub_020051e0
- movs r2, #217
- movs r0, #9
- ldr r1, [pc, #532]
- lsls r2, r2, #3
- bl sub_020051ec
- movs r2, #223
- lsls r2, r2, #3
- ldr r1, [pc, #520]
- movs r0, #9
- bl sub_020051f8
- movs r0, #20
- bl sub_0200518e
- movs r1, #2
- movs r0, #9
- bl sub_02005246
- movs r0, #20
- bl sub_0200519c
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #9
- bl sub_020052ae
- movs r0, #60
- bl sub_020051ac
- movs r2, #20
- movs r0, #9
- movs r1, #0
- bl sub_020052a6
- movs r0, #9
- movs r1, #3
- bl sub_02005266
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_020052b0
- movs r2, #223
- lsls r2, r2, #19
- ldr r1, [pc, #448]
- movs r0, #8
- bl sub_0200525c
- movs r0, #1
- bl sub_0200508a
- movs r1, #0
- movs r0, #8
- bl sub_020052a2
- movs r0, #8
- bl sub_02005210
- movs r1, #1
- bl sub_0200515e
- movs r0, #8
- ldr r1, [pc, #328]
- ldr r2, [pc, #336]
- bl sub_02005230
- movs r2, #223
- lsls r2, r2, #3
- ldr r1, [pc, #392]
- movs r0, #8
- bl sub_02005274
- movs r0, #20
- bl sub_0200520a
- movs r0, #8
- movs r1, #2
- bl sub_020052ba
- ldr r0, [pc, #380]
- movs r1, #0
- movs r2, #10
- bl sub_02005304
- movs r1, #192
- movs r0, #8
- lsls r1, r1, #6
- movs r2, #60
- bl sub_02005318
- movs r1, #128
- movs r2, #10
- movs r0, #8
- lsls r1, r1, #8
- bl sub_02005324
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #8
- bl sub_02005346
- movs r0, #60
- bl sub_02005244
- movs r1, #192
- movs r0, #9
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02005340
- movs r1, #192
- movs r2, #40
- movs r0, #8
- lsls r1, r1, #6
- bl sub_0200534c
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #8
- bl sub_0200536e
- movs r0, #60
- bl sub_0200526c
- movs r0, #8
- movs r1, #2
- bl sub_0200531c
- movs r2, #40
- ldr r0, [pc, #280]
- movs r1, #0
- bl sub_02005366
- movs r0, #9
- movs r1, #1
- bl sub_02005336
- movs r0, #9
- movs r1, #0
- movs r2, #10
- bl sub_02005380
- movs r0, #9
- movs r1, #0
- movs r2, #10
- bl sub_02005382
- movs r0, #8
- ldr r1, [pc, #248]
- movs r2, #60
- bl sub_020053a4
- movs r2, #10
- ldr r0, [pc, #232]
- movs r1, #0
- bl sub_02005396
- movs r0, #8
- movs r1, #1
- bl sub_02005366
- movs r0, #8
- movs r1, #3
- bl sub_02005356
- ldr r0, [pc, #208]
- movs r1, #0
- movs r2, #10
- bl sub_020053b0
- movs r0, #9
- ldr r1, [pc, #148]
- movs r2, #60
- bl sub_020053d2
- movs r2, #20
- movs r0, #9
- movs r1, #0
- bl sub_020053c4
- movs r1, #3
- movs r0, #8
- bl sub_0200537c
- bl sub_02005478
- movs r0, #107
- bl sub_020054be
- movs r0, #128
- movs r1, #128
- lsls r1, r1, #11
- lsls r0, r0, #11
- bl sub_02005412
- bl .L_02002586
- ldr r0, [pc, #88]
- bl sub_020054d4
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02005410
- movs r1, #128
- movs r0, #9
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200541c
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02005418
- movs r0, #9
- movs r1, #0
- movs r2, #40
- bl sub_02005422
- b.n .L_020010c8
- .2byte 0x0000
- .4byte 0x00019999
- .4byte 0x0000cccc
- .4byte 0x000016fc
- .4byte 0x16d80000
- .4byte 0x00006666
- .4byte 0x0200c9e4
- .4byte 0x0200cb50
- .4byte 0x0200cc74
- .4byte 0x0200cd98
- .4byte 0x00000121
- .4byte 0x00001704
- .4byte 0x00000101
- .4byte 0x00001215
- .4byte 0x0200ca78
- .4byte 0x0200cbe4
- .4byte 0x0200cd08
- .4byte 0x0200ce2c
- .4byte 0x16080000
- .4byte 0x00013333
- .4byte 0x00009999
- .4byte 0x00001608
- .4byte 0x000015f8
- .4byte 0x16180000
- .4byte 0x00002008
- .2byte 0x0105
- .2byte 0x0000
-.L_020010c8:
- movs r1, #176
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02005496
- movs r1, #176
- movs r2, #0
- movs r0, #9
- lsls r1, r1, #8
- bl sub_020054a2
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #9
- lsls r1, r1, #6
- bl sub_020054d6
- movs r1, #1
- movs r2, #217
- movs r3, #1
- ldr r0, [pc, #1008]
- negs r1, r1
- lsls r2, r2, #19
- bl sub_020054ee
- bl sub_020054fa
- movs r2, #213
- ldr r1, [pc, #996]
- lsls r2, r2, #19
- movs r0, #14
- bl sub_02005466
- movs r0, #1
- bl sub_02005294
- ldr r2, [pc, #984]
- movs r0, #14
- ldr r1, [pc, #984]
- bl sub_02005426
- ldr r1, [pc, #980]
- movs r0, #14
- bl sub_02005436
- movs r0, #160
- bl sub_020053fc
- ldr r3, [pc, #972]
- str r3, [r6, #72]
- str r3, [r6, #68]
- movs r3, #192
- lsls r3, r3, #9
- adds r5, r6, #0
- str r3, [r6, #24]
- str r3, [r6, #28]
- adds r5, #100
- movs r3, #0
- strh r3, [r5, #0]
- movs r3, #128
- lsls r3, r3, #15
- ldr r2, [r6, #80]
- str r3, [r6, #12]
- movs r3, #240
- lsls r3, r3, #8
- strh r3, [r2, #30]
- adds r0, r6, #0
- movs r1, #0
- bl sub_02005398
- movs r1, #2
- adds r0, r6, #0
- bl sub_02005358
- movs r0, #1
- bl sub_020052e6
- movs r0, #15
- bl sub_02005464
- movs r1, #0
- bl sub_020053b2
- movs r1, #200
- ldr r0, [pc, #904]
- lsls r1, r1, #4
- bl sub_02005304
-.L_0200117a:
- movs r0, #1
- bl sub_02005302
- movs r2, #0
- ldrsh r3, [r5, r2]
- cmp r3, #0
- beq.n .L_0200117a
- movs r0, #15
- bl sub_02005488
- movs r1, #0
- bl sub_020053d6
- movs r0, #14
- bl sub_02005494
- movs r1, #0
- bl sub_020053e2
- movs r0, #10
- bl sub_02005478
- movs r0, #9
- bl sub_020054a6
- movs r5, #192
- lsls r5, r5, #11
- str r5, [r0, #40]
- movs r0, #8
- bl sub_020054b2
- str r5, [r0, #40]
- movs r0, #145
- bl sub_02005662
- movs r0, #128
- movs r1, #128
- lsls r1, r1, #11
- lsls r0, r0, #11
- bl sub_020055b6
- bl .L_0200284e
- bl sub_02002852
- movs r0, #60
- bl sub_020054ac
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_020055d0
- movs r1, #1
- movs r2, #223
- movs r3, #1
- lsls r2, r2, #19
- ldr r0, [pc, #784]
- negs r1, r1
- bl sub_020055e8
- bl sub_020055f4
- bl sub_02005658
- movs r1, #129
- movs r0, #9
- lsls r1, r1, #1
- bl sub_020055e2
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #8
- bl sub_020055ec
- movs r0, #60
- bl sub_020054ea
- ldr r0, [pc, #736]
- bl sub_020053b0
- movs r0, #1
- bl sub_020053a6
- movs r0, #14
- movs r1, #0
- movs r2, #0
- bl sub_02005588
- movs r0, #15
- movs r1, #0
- movs r2, #0
- bl sub_02005592
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #10
- bl sub_02005606
- movs r0, #8
- movs r1, #4
- movs r2, #40
- bl sub_020055c0
- ldr r0, [pc, #692]
- movs r1, #0
- movs r2, #10
- bl sub_02005612
- movs r0, #9
- movs r1, #0
- movs r2, #10
- bl sub_02005624
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_02005626
- movs r1, #192
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #40
- bl sub_0200563a
- ldr r0, [pc, #648]
- movs r1, #0
- movs r2, #20
- bl sub_0200563c
- movs r0, #9
- movs r1, #4
- movs r2, #20
- bl sub_020055fe
- movs r2, #10
- movs r0, #9
- movs r1, #0
- bl sub_02005650
- movs r0, #8
- movs r1, #1
- bl sub_02005620
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #10
- bl sub_0200566c
- movs r2, #10
- ldr r0, [pc, #596]
- movs r1, #0
- bl sub_0200566e
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #9
- bl sub_02005698
- movs r0, #80
- bl sub_02005596
- movs r1, #3
- movs r0, #8
- bl sub_02005636
- movs r0, #20
- bl sub_020055a4
- movs r0, #9
- movs r1, #1
- bl sub_0200565c
- movs r0, #9
- movs r1, #3
- bl sub_0200564c
- movs r2, #223
- movs r0, #8
- ldr r1, [pc, #544]
- lsls r2, r2, #3
- bl sub_02005630
- movs r0, #8
- movs r1, #0
- movs r2, #0
- bl sub_02005652
- movs r2, #217
- movs r0, #9
- ldr r1, [pc, #524]
- lsls r2, r2, #3
- bl sub_02005646
- movs r2, #217
- movs r0, #9
- ldr r1, [pc, #516]
- lsls r2, r2, #3
- bl sub_02005652
- movs r2, #219
- movs r0, #9
- ldr r1, [pc, #504]
- lsls r2, r2, #3
- bl sub_0200565e
- movs r2, #0
- movs r1, #0
- movs r0, #9
- bl sub_02005680
- movs r0, #141
- bl sub_020057ce
- ldr r1, [pc, #484]
- movs r0, #10
- bl sub_02005646
- ldr r1, [pc, #480]
- movs r0, #11
- bl sub_0200564e
- movs r0, #40
- bl sub_02005614
- ldr r1, [pc, #472]
- movs r0, #12
- bl sub_0200565c
- movs r0, #40
- bl sub_02005622
- ldr r1, [pc, #460]
- movs r0, #13
- bl sub_0200567a
- bl sub_020057be
- movs r2, #197
- movs r0, #0
- ldr r1, [pc, #448]
- lsls r2, r2, #19
- bl sub_020056c2
- movs r2, #200
- lsls r2, r2, #19
- movs r0, #1
- ldr r1, [pc, #440]
- bl sub_020056ce
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #11
- lsls r1, r1, #8
- bl sub_0200576a
- movs r1, #1
- movs r2, #201
- lsls r2, r2, #19
- movs r3, #1
- ldr r0, [pc, #416]
- negs r1, r1
- bl sub_02005782
- bl sub_0200578e
- ldr r5, [pc, #408]
- movs r0, #10
- adds r1, r5, #0
- bl sub_020056b0
- movs r0, #20
- bl sub_02005676
- ldr r0, [pc, #396]
- ldr r1, [pc, #400]
- bl sub_02005796
- movs r1, #1
- movs r2, #193
- movs r3, #1
- lsls r2, r2, #19
- ldr r0, [pc, #372]
- negs r1, r1
- bl sub_020057ae
- adds r1, r5, #0
- movs r0, #11
- bl sub_020056d6
- movs r0, #20
- bl sub_0200569c
- adds r1, r5, #0
- movs r0, #12
- bl sub_020056e4
- movs r0, #20
- bl sub_020056aa
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020057a6
- movs r1, #128
- movs r2, #0
- movs r0, #1
- lsls r1, r1, #8
- bl sub_020057b2
- adds r1, r5, #0
- movs r0, #13
- bl sub_0200570a
- movs r0, #40
- bl sub_020056d0
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020057cc
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #1
- bl sub_020057d8
- movs r0, #13
- bl sub_02005736
- ldr r0, [pc, #284]
- bl sub_020058c4
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #11
- lsls r1, r1, #8
- bl sub_02005818
- movs r1, #1
- movs r2, #201
- movs r3, #1
- ldr r0, [pc, #264]
- negs r1, r1
- lsls r2, r2, #19
- bl sub_02005830
- bl sub_0200583c
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02005810
- movs r1, #160
- movs r2, #80
- movs r0, #1
- lsls r1, r1, #8
- bl sub_0200581c
- movs r0, #0
- movs r1, #3
- bl sub_020057c4
- movs r1, #3
- movs r0, #1
- bl sub_020057d4
- movs r0, #20
- bl sub_02005742
- movs r0, #1
- movs r1, #2
- bl sub_020057da
- movs r0, #0
- bl sub_02005778
- cmp r0, #0
- beq.n .L_02001490
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_020057ba
-.L_02001490:
- movs r0, #1
- bl sub_020057e8
- movs r2, #0
- movs r0, #1
- movs r1, #0
- bl sub_020057fa
- ldr r0, [pc, #160]
- ldr r1, [pc, #84]
- bl sub_02005892
- movs r1, #1
- movs r2, #201
- movs r3, #1
- ldr r0, [pc, #124]
- negs r1, r1
- lsls r2, r2, #19
- bl sub_020058aa
- movs r0, #0
- ldr r1, [pc, #136]
- ldr r2, [pc, #116]
- bl sub_020057cc
- movs r2, #197
- ldr r1, [pc, #128]
- lsls r2, r2, #3
- movs r0, #0
- bl sub_02005810
- bl sub_02005914
- bl sub_02005920
- ldr r0, [pc, #116]
- bl sub_0200576e
- movs r0, #3
- bl sub_020058ec
- b.n .L_02001550
- .4byte 0x15e80000
- .4byte 0x15a80000
- .4byte 0x00002666
- .4byte 0x00004ccc
- .4byte 0x0200cebc
- .4byte 0x00001999
- .4byte 0x020097a5
- .4byte 0x16080000
- .4byte 0x00002008
- .4byte 0x00001618
- .4byte 0x000015f8
- .4byte 0x00001608
- .4byte 0x0200cac4
- .4byte 0x0200cc30
- .4byte 0x0200cd54
- .4byte 0x0200ce78
- .4byte 0x170c0000
- .4byte 0x17140000
- .4byte 0x16d80000
- .4byte 0x0200caf4
- .4byte 0x00006666
- .4byte 0x00000ccc
- .4byte 0x00000121
- .4byte 0x16f80000
- .4byte 0x0000cccc
- .4byte 0x000016d8
- .2byte 0x085a
- .2byte 0x0000
-.L_02001550:
- bl sub_02005836
- pop {r5, r6}
- pop {r0}
- bx r0
+AlchemyC_02000c28:
+ .space 0x932
.2byte 0x0000
AlchemyC_0200155c:
.space 0x124
diff --git a/games/gs1/assets/code/resource_372_overlay.s b/games/gs1/assets/code/resource_372_overlay.s
index 0e02be166..9e09eec6d 100644
--- a/games/gs1/assets/code/resource_372_overlay.s
+++ b/games/gs1/assets/code/resource_372_overlay.s
@@ -1941,103 +1941,8 @@ AlchemyC_02001684:
.space 0x48
AlchemyC_020016cc:
.space 0x70
- push {r5, lr}
- movs r1, #0
- movs r0, #22
- bl sub_02005f20
- movs r0, #0
- movs r1, #22
- movs r2, #0
- bl sub_02005f12
- movs r0, #0
- movs r1, #0
- movs r5, #0
- bl sub_02005e7c
- cmp r0, #0
- bne.n .L_02001768
- ldr r0, [pc, #180]
- bl sub_02005f36
- movs r5, #1
- b.n .L_0200176e
-.L_02001768:
- ldr r0, [pc, #172]
- bl sub_02005f40
-.L_0200176e:
- movs r0, #20
- bl sub_02005e66
- movs r2, #40
- movs r0, #22
- movs r1, #0
- bl sub_02005f68
- movs r1, #128
- movs r0, #22
- lsls r1, r1, #1
- bl sub_02005f9a
- movs r0, #21
- movs r1, #3
- bl sub_02005f22
- movs r1, #1
- movs r0, #22
- bl sub_02005f2a
- movs r0, #40
- bl sub_02005e90
- movs r1, #0
- movs r0, #22
- movs r2, #0
-.L_020017a4:
- bl sub_02005f62
- movs r0, #20
- bl sub_02005ea0
- movs r0, #22
- movs r1, #3
- bl sub_02005f50
-.L_020017b6:
- cmp r5, #0
- beq.n .L_020017c2
- ldr r0, [pc, #96]
- bl sub_02005f92
- b.n .L_020017c8
-.L_020017c2:
- ldr r0, [pc, #92]
- bl sub_02005f9a
-.L_020017c8:
- movs r0, #22
- movs r1, #0
- bl sub_02005fb2
- movs r0, #22
- movs r1, #2
- bl sub_02005f6a
- movs r0, #0
- bl sub_02005f08
- cmp r0, #0
- beq.n .L_020017f0
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #22
- bl sub_02005f52
-.L_020017f0:
- movs r0, #22
- bl sub_02005f78
- movs r2, #0
- movs r0, #22
- movs r1, #0
- bl sub_02005f8a
- movs r0, #1
- movs r1, #1
- bl sub_02005f1a
- ldr r0, [pc, #24]
- bl sub_02005ef0
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x00000ee5
- .4byte 0x00000ee6
- .4byte 0x00000e70
- .4byte 0x00000ee7
- .2byte 0x0837
- .2byte 0x0000
+AlchemyC_0200173c:
+ .space 0xec
AlchemyC_02001828:
.space 0x164
AlchemyC_0200198c:
@@ -2070,397 +1975,12 @@ AlchemyC_020028a4:
.space 0x26c
AlchemyC_02002d28:
.space 0xc4
- push {r5, r6, r7, lr}
- movs r0, #132
-.L_02002df0:
- lsls r0, r0, #4
- bl sub_020074d0
- cmp r0, #0
- bne.n .L_02002dfc
- b.n .L_02003164
-.L_02002dfc:
- ldr r0, [pc, #876]
- bl sub_020074dc
- cmp r0, #0
- beq.n .L_02002e08
- b.n .L_02003164
-.L_02002e08:
- bl sub_02007506
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02007554
- movs r1, #128
- movs r2, #128
- movs r0, #22
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02007562
- movs r1, #128
- movs r2, #128
- movs r0, #26
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02007570
- movs r1, #128
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200757e
- movs r0, #0
- movs r1, #217
- ldr r2, [pc, #804]
- bl sub_020075c8
- movs r0, #0
- bl sub_0200757e
- cmp r0, #0
- beq.n .L_02002e62
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #22
-.L_02002e5e:
- bl sub_020075ec
-.L_02002e62:
- movs r0, #22
- movs r1, #235
- ldr r2, [pc, #776]
- bl sub_020075e6
- movs r1, #176
- movs r0, #22
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02007672
- movs r0, #0
- bl sub_020075a8
- cmp r0, #0
- beq.n .L_02002e8c
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #26
- bl sub_02007616
-.L_02002e8c:
- movs r0, #26
+AlchemyC_02002dec:
+ .space 0xa2
.L_02002e8e:
- movs r1, #199
- ldr r2, [pc, #732]
- bl sub_02007610
- movs r1, #208
- movs r0, #26
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200769c
- movs r1, #247
+ .space 0x16
.L_02002ea4:
- movs r0, #25
- lsls r1, r1, #16
- ldr r2, [pc, #712]
- bl sub_02007638
- movs r1, #192
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #25
- bl sub_020076b4
- movs r0, #8
- bl sub_020075ea
- adds r1, r0, #0
- adds r1, #35
- ldr r4, [r0, #80]
- ldrb r2, [r1, #0]
- movs r6, #254
- adds r3, r6, #0
- movs r5, #13
- ands r3, r2
- negs r5, r5
- ldrb r2, [r4, #9]
- strb r3, [r1, #0]
- adds r3, r5, #0
- ands r3, r2
- movs r2, #4
- orrs r3, r2
- strb r3, [r4, #9]
- movs r0, #0
- bl sub_02007610
- adds r7, r0, #0
- adds r7, #35
- ldr r4, [r0, #80]
- ldrb r3, [r7, #0]
- ands r6, r3
- ldrb r3, [r4, #9]
- ands r5, r3
- movs r3, #8
- orrs r5, r3
- strb r6, [r7, #0]
- strb r5, [r4, #9]
- movs r0, #0
- bl sub_0200762c
- cmp r0, #0
- beq.n .L_02002f10
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #8
- bl sub_0200769a
-.L_02002f10:
- movs r0, #8
- movs r1, #221
- ldr r2, [pc, #608]
- bl sub_02007694
- movs r1, #176
- movs r2, #60
- movs r0, #8
- lsls r1, r1, #8
- bl sub_02007720
- movs r1, #2
- movs r0, #26
- bl sub_020076e0
- ldr r0, [pc, #588]
- bl sub_02007706
- movs r0, #26
- movs r1, #0
- movs r2, #40
- bl sub_02007728
- movs r1, #202
- movs r0, #9
- lsls r1, r1, #15
- ldr r2, [pc, #568]
- bl sub_020076d4
- movs r1, #128
- movs r0, #9
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02007750
- ldr r0, [pc, #556]
- movs r1, #0
- movs r2, #10
- bl sub_0200774a
- movs r1, #160
- movs r2, #0
- movs r0, #26
- lsls r1, r1, #8
- bl sub_02007766
- ldr r0, [pc, #536]
- ldr r1, [pc, #540]
- bl sub_0200778e
- movs r0, #202
- movs r1, #1
- movs r3, #1
- lsls r0, r0, #15
- negs r1, r1
- ldr r2, [pc, #512]
- bl sub_020077a6
- ldr r2, [pc, #520]
- movs r0, #9
- ldr r1, [pc, #520]
- bl sub_020076c8
- ldr r1, [pc, #520]
- movs r0, #9
- bl sub_020076d8
- movs r0, #60
- bl sub_0200768e
- ldr r0, [pc, #508]
- ldr r1, [pc, #512]
- bl sub_020077be
- movs r0, #187
- movs r1, #1
- movs r2, #166
- movs r3, #1
- lsls r2, r2, #19
- negs r1, r1
- lsls r0, r0, #16
- bl sub_020077d8
- bl sub_020077e4
- movs r0, #40
- bl sub_020076b2
- movs r0, #26
- movs r1, #2
- bl sub_0200777a
- movs r2, #20
- movs r0, #26
- movs r1, #0
- bl sub_020077bc
- movs r0, #9
- movs r1, #2
- bl sub_0200778c
- movs r2, #20
- ldr r0, [pc, #452]
- movs r1, #0
- bl sub_020077ce
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_0200780a
- movs r0, #221
- movs r1, #1
- movs r3, #1
- lsls r0, r0, #16
- negs r1, r1
- ldr r2, [pc, #428]
- bl sub_02007822
- movs r0, #0
- movs r1, #8
- movs r2, #0
- bl sub_020077c4
- movs r0, #22
- movs r1, #8
- movs r2, #0
- bl sub_020077ce
- movs r1, #192
- movs r0, #26
- lsls r1, r1, #6
- movs r2, #80
- bl sub_0200781a
- movs r0, #182
- movs r1, #1
- movs r2, #170
- movs r3, #1
- lsls r0, r0, #16
- negs r1, r1
- lsls r2, r2, #19
- bl sub_02007854
- movs r2, #173
- movs r0, #8
- movs r1, #182
- lsls r2, r2, #3
- bl sub_020077b8
- movs r2, #0
- movs r1, #9
- movs r0, #8
- bl sub_02007802
- movs r0, #30
- bl sub_02007740
- movs r1, #3
- movs r0, #8
- bl sub_020077f0
- movs r0, #10
- bl sub_0200774e
- movs r0, #0
- movs r1, #9
- movs r2, #0
- bl sub_02007820
- movs r0, #22
- movs r1, #9
- movs r2, #0
- bl sub_0200782a
- movs r2, #0
- movs r0, #26
- movs r1, #9
- bl sub_02007834
- movs r0, #9
- movs r1, #3
- bl sub_0200781c
- movs r0, #9
- movs r1, #0
- bl sub_0200786c
- movs r0, #26
- movs r1, #2
- bl sub_02007844
- movs r0, #26
- movs r1, #0
- movs r2, #10
- bl sub_02007886
- movs r1, #224
- movs r0, #9
- lsls r1, r1, #8
- movs r2, #40
- bl sub_020078a2
- movs r1, #192
- movs r2, #20
- movs r0, #9
- lsls r1, r1, #6
- bl sub_020078ae
- movs r0, #9
- movs r1, #3
- bl sub_02007856
- movs r0, #9
- movs r1, #0
- bl sub_020078a6
- movs r0, #26
- movs r1, #8
- movs r2, #0
- bl sub_02007890
- movs r1, #0
- movs r2, #0
- movs r0, #22
- bl sub_0200789a
- movs r0, #40
- bl sub_020077d0
- movs r0, #0
- movs r1, #9
- movs r2, #0
- bl sub_020078a2
- movs r0, #22
- movs r1, #9
- movs r2, #0
- bl sub_020078ac
- movs r0, #26
- movs r1, #9
- movs r2, #0
- bl sub_020078b6
- movs r2, #0
- movs r0, #8
- movs r1, #9
- bl sub_020078c0
- movs r1, #2
- movs r0, #9
- bl sub_020078c0
- movs r0, #20
- bl sub_02007806
- movs r2, #10
- movs r0, #9
- movs r1, #0
- bl sub_02007908
- movs r0, #0
- movs r1, #3
- bl sub_020078b8
- movs r0, #26
- movs r1, #3
- bl sub_020078c0
- movs r0, #22
- movs r1, #3
- bl sub_020078c8
- movs r1, #3
- movs r0, #8
- bl sub_020078d8
- ldrb r3, [r7, #0]
- movs r5, #1
- orrs r3, r5
- strb r3, [r7, #0]
- movs r0, #8
- bl sub_02007876
- adds r2, r0, #0
- adds r2, #35
- ldrb r3, [r2, #0]
- orrs r3, r5
- strb r3, [r2, #0]
- bl sub_02006304
- ldr r0, [pc, #16]
- bl sub_02007842
- bl sub_02007866
-.L_02003164:
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00000841
- .4byte 0x00000557
- .4byte 0x04ba0000
- .4byte 0x00000569
- .4byte 0x00000ec6
- .4byte 0x04ad0000
- .4byte 0x00001009
- .4byte 0x00013333
- .4byte 0x00002666
- .4byte 0x0000b333
- .4byte 0x00016666
- .4byte 0x0200cd1c
- .4byte 0x00009999
- .4byte 0x00001333
- .4byte 0x00004009
- .2byte 0x0000
- .2byte 0x0569
+ .space 0x308
push {r5, r6, r7, lr}
mov r7, fp
mov r6, sl
diff --git a/games/gs1/assets/code/resource_373_overlay.s b/games/gs1/assets/code/resource_373_overlay.s
index b72d72369..506d305fe 100644
--- a/games/gs1/assets/code/resource_373_overlay.s
+++ b/games/gs1/assets/code/resource_373_overlay.s
@@ -2461,113 +2461,8 @@ AlchemyC_02000fbc:
.space 0x30
AlchemyC_02000fec:
.space 0xec
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r8
- push {r6, r7}
- ldr r0, [pc, #220]
- sub sp, #12
- bl sub_02007082
- cmp r0, #0
- bne.n .L_020011b2
- ldr r3, [pc, #212]
- ldr r3, [r3, #0]
- mov r8, r3
- bl sub_020070b0
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #8
- movs r0, #0
- lsls r1, r1, #9
- bl sub_020070ee
- movs r1, #1
- movs r0, #0
- bl sub_0200714e
- movs r0, #2
- bl sub_020070c4
- ldr r0, [pc, #180]
- bl sub_0200719a
- movs r0, #15
- movs r1, #0
- movs r2, #2
- bl sub_020071bc
- movs r2, #2
- movs r0, #16
- movs r1, #0
- bl sub_020071c6
- movs r0, #0
- bl sub_02007114
- ldr r3, [r0, #8]
- mov r7, sp
- str r3, [r7, #0]
- ldr r3, [r0, #12]
- str r3, [r7, #4]
- ldr r3, [r0, #16]
- mov r2, r8
- ldr r2, [r2, #0]
- str r3, [r7, #8]
- mov r3, r8
- str r7, [r3, #0]
- mov sl, r2
- movs r6, #0
- adds r5, r7, #0
-.L_0200114e:
- ldr r3, [r5, #8]
- movs r2, #128
- lsls r2, r2, #10
- adds r3, r3, r2
- str r3, [r5, #8]
- movs r0, #1
- adds r6, #1
- bl sub_02007112
- bl sub_02007076
- cmp r6, #40
- bne.n .L_0200114e
- movs r0, #60
- bl sub_02007120
- ldr r0, [pc, #92]
- movs r1, #1
- bl sub_020070f0
- movs r0, #6
- bl sub_0200712e
- movs r6, #0
- adds r5, r7, #0
-.L_02001180:
- ldr r3, [r5, #8]
- ldr r2, [pc, #76]
- adds r3, r3, r2
- str r3, [r5, #8]
- movs r0, #1
- adds r6, #1
- bl sub_02007142
- bl sub_020070a6
- cmp r6, #40
- bne.n .L_02001180
- mov r3, sl
- mov r2, r8
- str r3, [r2, #0]
- movs r0, #60
- bl sub_02007156
- movs r0, #0
- movs r1, #70
- ldr r2, [pc, #40]
- bl sub_020071d0
- bl sub_02007174
-.L_020011b2:
- add sp, #12
- pop {r3, r5}
- mov r8, r3
- mov sl, r5
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0x00000808
- .4byte 0x03001e70
- .4byte 0x00000f4d
- .4byte 0x00000f4f
- .4byte 0xfffe0000
- .2byte 0x02e5
- .2byte 0x0000
+AlchemyC_020010d8:
+ .space 0x100
AlchemyC_020011d8:
.space 0x6c
AlchemyC_02001244:
diff --git a/games/gs1/assets/code/resource_374_overlay.s b/games/gs1/assets/code/resource_374_overlay.s
index f9c115229..e3b44fc7e 100644
--- a/games/gs1/assets/code/resource_374_overlay.s
+++ b/games/gs1/assets/code/resource_374_overlay.s
@@ -1140,501 +1140,8 @@ AlchemyC_02000930:
.4byte 0x014b0000
.2byte 0x0842
.2byte 0x0000
- push {r5, r6, lr}
- ldr r0, [pc, #512]
- movs r6, #0
- bl sub_02003238
- cmp r0, #0
- bne.n .L_02000bcc
- b.n .L_02001054
-.L_02000bcc:
- movs r0, #132
- lsls r0, r0, #4
- bl sub_02003246
- cmp r0, #0
- beq.n .L_02000bda
- b.n .L_02001054
-.L_02000bda:
- bl sub_02003278
- ldr r0, [pc, #484]
- ldr r1, [pc, #484]
- bl sub_02003390
- movs r0, #197
- movs r1, #1
- movs r2, #192
- movs r3, #1
- lsls r2, r2, #18
- negs r1, r1
- lsls r0, r0, #16
- bl sub_020033aa
- bl sub_020033b6
- ldr r0, [pc, #460]
- bl sub_02003364
- movs r0, #19
- movs r1, #2
- bl sub_02003344
- ldr r0, [pc, #452]
- movs r1, #0
- movs r2, #10
- bl sub_0200338e
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020032ec
- movs r1, #128
- movs r2, #128
- movs r0, #25
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020032fa
- movs r0, #0
- movs r1, #179
- ldr r2, [pc, #412]
- bl sub_0200333c
- movs r0, #0
- bl sub_02003302
- cmp r0, #0
- beq.n .L_02000c4e
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #25
- bl sub_02003360
-.L_02000c4e:
- movs r2, #201
- movs r0, #25
- movs r1, #179
- lsls r2, r2, #2
- bl sub_0200335c
- movs r0, #0
- movs r1, #25
- movs r2, #40
- bl sub_020033ae
- movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_020033f8
- movs r2, #0
- movs r0, #25
- movs r1, #0
- bl sub_02003402
- movs r0, #17
- movs r1, #3
- bl sub_0200339a
- movs r0, #18
- movs r1, #3
- bl sub_020033aa
- movs r2, #0
- movs r1, #18
- movs r0, #17
- bl sub_020033dc
- movs r0, #20
- bl sub_0200332a
- movs r0, #17
- movs r1, #1
- bl sub_020033d2
- movs r2, #10
- ldr r0, [pc, #308]
- movs r1, #0
- bl sub_02003424
- movs r0, #18
- movs r1, #3
- bl sub_020033cc
- movs r0, #18
- movs r1, #0
- movs r2, #10
- bl sub_02003436
- movs r0, #17
- movs r1, #0
- movs r2, #0
- bl sub_02003450
- movs r1, #240
- movs r2, #10
- movs r0, #18
- lsls r1, r1, #8
- bl sub_0200345c
- movs r0, #19
- movs r1, #3
- bl sub_020033fc
- ldr r0, [pc, #244]
- movs r1, #0
- movs r2, #10
- bl sub_0200345e
- movs r0, #17
- ldr r1, [pc, #220]
- ldr r2, [pc, #240]
- bl sub_020033b8
- ldr r2, [pc, #236]
- movs r0, #18
- ldr r1, [pc, #208]
- bl sub_020033c2
- ldr r5, [pc, #228]
- movs r0, #17
- adds r1, r5, #0
- bl sub_020033d4
- movs r0, #20
- bl sub_0200339a
- movs r0, #18
- adds r1, r5, #0
- bl sub_020033e2
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020034a6
- movs r1, #192
- movs r2, #60
- movs r0, #25
- lsls r1, r1, #8
- bl sub_020034b2
- ldr r1, [pc, #184]
- movs r0, #0
- bl sub_02003402
- ldr r1, [pc, #180]
- movs r0, #25
- bl sub_02003422
- movs r0, #20
- bl sub_020033d0
- movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_020034d2
- movs r2, #10
- movs r0, #25
- movs r1, #0
- bl sub_020034dc
- movs r0, #25
- movs r1, #0
- bl sub_020034cc
- movs r1, #128
- movs r0, #19
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020034f0
- movs r1, #192
- movs r2, #20
- lsls r1, r1, #7
- movs r0, #26
- bl sub_02003050
- movs r0, #26
- movs r1, #2
- bl sub_020034b4
- movs r0, #26
- movs r1, #10
- bl sub_02003048
- movs r0, #0
- movs r1, #3
- bl sub_020034a4
- movs r1, #3
- movs r0, #25
- bl sub_020034b4
- movs r0, #20
- bl sub_0200342a
- movs r0, #19
- movs r1, #2
- bl sub_020034da
- movs r1, #0
- ldr r0, [pc, #44]
- bl sub_02003512
- movs r0, #0
- movs r1, #0
- bl sub_0200346a
- cmp r0, #1
- bne.n .L_02000dec
- movs r0, #19
- movs r1, #4
- movs r6, #1
- bl sub_020034d8
- b.n .L_02000e04
- .4byte 0x00000834
- .4byte 0x00019999
- .4byte 0x00003333
- .4byte 0x00000eb6
- .4byte 0x00004013
- .4byte 0x00000315
- .4byte 0x00004011
- .4byte 0x0000cccc
- .4byte 0x0200aef0
- .4byte 0x0200af50
- .2byte 0xaf78
- .2byte 0x0200
-.L_02000dec:
- movs r0, #19
- movs r1, #3
- bl sub_0200350e
- ldr r3, [pc, #612]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02000e04:
- ldr r0, [pc, #600]
- movs r1, #0
- bl sub_0200357e
- cmp r6, #0
- beq.n .L_02000e20
- ldr r3, [pc, #584]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02000e20:
- movs r5, #128
- lsls r5, r5, #7
- adds r1, r5, #0
- movs r2, #30
- movs r0, #22
- bl sub_0200310c
- movs r0, #22
- movs r1, #0
- bl sub_020035a8
- movs r1, #128
- movs r0, #19
- lsls r1, r1, #1
- movs r2, #0
- bl sub_020035dc
- movs r1, #128
- movs r0, #26
- lsls r1, r1, #1
- movs r2, #0
- bl sub_020035e8
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_020035f4
- movs r1, #128
- movs r0, #25
- lsls r1, r1, #1
- movs r2, #40
- bl sub_02003600
- movs r1, #160
- movs r0, #19
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020035fc
- movs r1, #160
- movs r0, #26
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003608
- movs r6, #224
- movs r1, #224
- lsls r6, r6, #8
-.L_02000e84:
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003618
- adds r1, r6, #0
- movs r2, #10
- movs r0, #25
- bl sub_02003176
- ldr r0, [pc, #456]
- ldr r1, [pc, #460]
- bl sub_0200364a
- movs r0, #215
- movs r1, #1
- ldr r2, [pc, #452]
- movs r3, #1
- lsls r0, r0, #16
- negs r1, r1
- bl sub_02003662
- bl sub_0200366e
- ldr r0, [pc, #440]
- ldr r1, [pc, #444]
- bl sub_02003666
- movs r0, #205
- movs r1, #1
- movs r3, #1
- ldr r2, [pc, #436]
- lsls r0, r0, #16
- negs r1, r1
- bl sub_0200367e
- ldr r1, [pc, #428]
- movs r0, #22
- bl sub_020035a6
- movs r0, #22
- bl sub_020035b4
- movs r1, #128
- movs r2, #60
- lsls r1, r1, #6
- movs r0, #22
- bl sub_020031c4
- movs r0, #19
- movs r1, #2
- bl sub_02003628
- movs r0, #19
- movs r1, #10
- bl sub_020031bc
- movs r0, #22
- movs r1, #3
- bl sub_02003620
- movs r0, #22
- movs r1, #20
- bl sub_020031cc
- movs r1, #3
- movs r0, #19
- bl sub_02003630
- movs r0, #10
- bl sub_020035a6
- adds r1, r5, #0
- movs r2, #30
- movs r0, #19
- adds r5, #19
- bl sub_020031fe
-.L_02000f20:
- adds r0, r5, #0
- movs r1, #10
- bl sub_020031ee
- adds r1, r6, #0
- movs r2, #30
- movs r0, #26
- movs r6, #128
- bl sub_02003212
- lsls r6, r6, #8
- movs r0, #26
- movs r1, #3
- bl sub_02003660
- movs r2, #30
- movs r0, #19
- adds r1, r6, #0
- bl sub_02003226
- movs r0, #19
- movs r1, #2
- bl sub_0200368a
- adds r0, r5, #0
-.L_02000f52:
- movs r1, #10
- bl sub_0200321e
- movs r0, #0
- movs r1, #25
- movs r2, #40
- bl sub_020036ac
- movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_020036f6
- movs r0, #25
- movs r1, #0
- movs r2, #20
- bl sub_02003254
- movs r2, #30
- movs r0, #26
- adds r1, r6, #0
- bl sub_0200325e
-.L_02000f80:
- movs r0, #26
- movs r1, #3
- bl sub_020036aa
- movs r0, #26
- movs r1, #30
- bl sub_02003256
- movs r1, #192
- movs r2, #30
- lsls r1, r1, #8
- movs r0, #26
- bl sub_0200327a
- movs r0, #26
- movs r1, #3
- bl sub_020036c6
- movs r0, #22
- movs r1, #3
- bl sub_020036ce
- movs r0, #25
- movs r1, #2
-.L_02000fb0:
- bl sub_020036ce
- movs r0, #0
- bl sub_0200367c
- cmp r0, #0
- beq.n .L_02000fcc
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #25
- bl sub_020036be
-.L_02000fcc:
- movs r0, #25
- bl sub_020036dc
- movs r0, #25
- movs r1, #0
- movs r2, #0
- bl sub_020036ee
- movs r0, #26
- movs r1, #2
- bl sub_020036fe
- movs r0, #0
- bl sub_020036ac
- cmp r0, #0
- beq.n .L_02000ffc
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #26
- bl sub_020036ee
-.L_02000ffc:
- movs r0, #26
- bl sub_0200370c
- movs r0, #26
- movs r1, #0
- movs r2, #0
- bl sub_0200371e
- movs r0, #22
- movs r1, #2
- bl sub_0200372e
- movs r0, #0
- bl sub_020036dc
-.L_0200101a:
- cmp r0, #0
- beq.n .L_0200102c
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #22
- bl sub_0200371e
-.L_0200102c:
- movs r0, #22
- bl sub_0200373c
- movs r0, #22
- movs r1, #0
- movs r2, #0
- bl sub_0200374e
- movs r1, #128
- ldr r2, [pc, #64]
- movs r0, #19
- lsls r1, r1, #9
- bl sub_020037a2
- movs r0, #132
- lsls r0, r0, #4
- bl sub_020036ca
- bl sub_020036f6
-.L_02001054:
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x03001ebc
- .4byte 0x00004013
- .4byte 0x00013333
- .4byte 0x00002666
- .4byte 0x02f60000
- .4byte 0x0000cccc
- .4byte 0x00001999
- .4byte 0x030a0000
- .4byte 0x0200a874
- .2byte 0xac00
- .2byte 0x0200
+AlchemyC_02000bbc:
+ .space 0x4c8
push {r5, r6, lr}
mov r6, r8
push {r6}
diff --git a/games/gs1/assets/code/resource_375_overlay.s b/games/gs1/assets/code/resource_375_overlay.s
index c1e3310ad..266551341 100644
--- a/games/gs1/assets/code/resource_375_overlay.s
+++ b/games/gs1/assets/code/resource_375_overlay.s
@@ -604,66 +604,8 @@ AlchemyC_0200009c:
.space 0x8
AlchemyC_020000a4:
.space 0x38
- push {r5, lr}
- bl sub_02001b64
- ldr r0, [pc, #128]
- bl sub_02001b4a
- cmp r0, #0
- beq.n .L_020000fc
- ldr r0, [pc, #120]
- bl sub_02001c1c
- movs r0, #12
- movs r1, #0
- bl sub_02001c34
- b.n .L_0200015a
-.L_020000fc:
- ldr r5, [pc, #108]
- adds r0, r5, #0
- bl sub_02001c2e
- movs r2, #10
- movs r0, #12
- movs r1, #0
- bl sub_02001c20
- movs r1, #2
- movs r0, #12
- bl sub_02001c20
- movs r0, #6
- bl sub_02001b96
- movs r1, #0
- movs r0, #12
- bl sub_02001c56
- movs r0, #0
- movs r1, #0
- bl sub_02001bbe
- cmp r0, #0
- bne.n .L_02000138
- adds r0, r5, #1
- bl sub_02001c60
- b.n .L_0200013e
-.L_02000138:
- adds r0, r5, #2
- bl sub_02001c68
-.L_0200013e:
- movs r0, #12
- movs r1, #3
- bl sub_02001c48
- movs r0, #12
- movs r1, #0
- bl sub_02001c88
- movs r1, #192
- movs r0, #12
- lsls r1, r1, #8
- movs r2, #10
- bl sub_02001cac
-.L_0200015a:
- bl sub_02001be8
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x00000815
- .4byte 0x000011c4
- .2byte 0x0f76
- .2byte 0x0000
+AlchemyC_020000dc:
+ .space 0x94
push {r5, r6, lr}
ldr r0, [pc, #656]
bl sub_02001bda
@@ -2419,482 +2361,10 @@ AlchemyC_02000ba8:
.4byte 0x00001999
.2byte 0x0101
.2byte 0x0000
- push {r5, r6, lr}
- mov r6, r8
- push {r6}
- ldr r3, [pc, #536]
- movs r2, #225
- lsls r2, r2, #1
- adds r5, r3, r2
- ldrh r3, [r5, #0]
- movs r2, #128
- subs r3, #5
- lsls r3, r3, #16
- lsls r2, r2, #9
- sub sp, #8
- cmp r3, r2
- bhi.n .L_02001530
- ldr r0, [pc, #516]
- bl sub_02002fa2
-.L_02001530:
- ldr r0, [pc, #512]
- bl sub_02002f98
- cmp r0, #0
- beq.n .L_02001540
- ldr r0, [pc, #508]
- bl sub_02002fb2
-.L_02001540:
- ldr r0, [pc, #504]
- bl sub_02002fa8
- cmp r0, #0
- bne.n .L_0200154c
- b.n .L_02001656
-.L_0200154c:
- bl sub_020030ea
- bl sub_020030f6
- bl sub_02002fda
- movs r0, #12
- movs r1, #0
- movs r2, #0
- bl sub_02003044
- movs r0, #13
- movs r1, #0
- movs r2, #0
- bl sub_0200304e
- movs r0, #14
- movs r1, #0
- movs r2, #0
- bl sub_02003058
- movs r0, #15
- movs r1, #0
- movs r2, #0
- bl sub_02003062
- movs r1, #0
- movs r2, #0
- movs r0, #5
- bl sub_0200306c
- movs r0, #8
- bl sub_0200302a
- adds r0, #89
- ldrb r2, [r0, #0]
- movs r3, #8
- orrs r3, r2
- movs r1, #166
- strb r3, [r0, #0]
- lsls r1, r1, #15
- movs r0, #11
- ldr r2, [pc, #412]
- bl sub_02003088
- ldr r2, [pc, #412]
- movs r0, #11
- movs r1, #83
- bl sub_02003082
- movs r1, #5
- movs r0, #11
- bl sub_020030a2
- movs r0, #11
- bl sub_02003058
- movs r3, #12
- strh r3, [r0, #32]
- ldr r1, [pc, #388]
- movs r0, #11
- bl sub_02003074
- ldr r0, [pc, #384]
- bl sub_02003032
- cmp r0, #0
- beq.n .L_020015de
- movs r0, #11
- movs r1, #0
- movs r2, #0
- bl sub_020030c0
-.L_020015de:
- bl sub_0200306c
- movs r3, #14
- str r3, [sp, #0]
- movs r5, #21
- movs r0, #9
- movs r1, #24
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_02003050
- movs r3, #15
- str r3, [sp, #0]
- movs r0, #9
- movs r1, #24
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_02003062
- movs r3, #23
- str r3, [sp, #0]
- movs r5, #19
- mov r8, r3
- movs r0, #9
- movs r1, #24
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_02003078
- movs r6, #24
- movs r0, #9
- movs r1, #24
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- str r6, [sp, #0]
- bl sub_0200308a
- mov r2, r8
- movs r5, #20
- str r2, [sp, #0]
- movs r0, #9
- movs r1, #24
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_0200309e
- movs r0, #9
- movs r1, #24
- movs r2, #1
- movs r3, #1
- str r6, [sp, #0]
- str r5, [sp, #4]
- bl sub_020030ae
- b.n .L_0200171e
-.L_02001656:
- movs r0, #9
- movs r1, #0
- movs r2, #0
- bl sub_02003142
- movs r0, #10
- movs r1, #0
- movs r2, #0
- bl sub_0200314c
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_02003156
- movs r0, #11
- movs r1, #0
- movs r2, #0
- bl sub_02003160
- bl sub_02003104
- ldr r0, [pc, #176]
- bl sub_020030ea
- cmp r0, #0
- bne.n .L_02001698
- movs r2, #0
- ldrsh r3, [r5, r2]
- cmp r3, #10
- bne.n .L_02001698
- bl sub_02001ffa
-.L_02001698:
- ldr r0, [pc, #180]
- bl sub_02003100
- cmp r0, #0
- beq.n .L_020016c2
- movs r0, #13
- movs r1, #0
- movs r2, #0
- bl sub_0200318e
- movs r0, #14
- movs r1, #0
- movs r2, #0
- bl sub_02003198
- movs r0, #15
- movs r1, #0
- movs r2, #0
- bl sub_020031a2
- b.n .L_02001702
-.L_020016c2:
- ldr r0, [pc, #144]
- bl sub_0200312a
- cmp r0, #0
- beq.n .L_02001702
- movs r1, #196
- movs r2, #188
- movs r0, #14
- lsls r1, r1, #17
- lsls r2, r2, #17
- bl sub_020031bc
- movs r1, #188
- movs r2, #188
- movs r0, #15
- lsls r1, r1, #17
- lsls r2, r2, #17
- bl sub_020031ca
- ldr r5, [pc, #108]
- movs r1, #128
- movs r0, #14
- lsls r1, r1, #9
- adds r2, r5, #0
- bl sub_02003218
- movs r1, #128
- movs r0, #15
- lsls r1, r1, #9
- adds r2, r5, #0
- bl sub_02003224
-.L_02001702:
- ldr r0, [pc, #88]
- bl sub_0200316a
- cmp r0, #0
- beq.n .L_0200171a
- movs r1, #132
- movs r2, #132
- movs r0, #16
- lsls r1, r1, #16
- lsls r2, r2, #17
- bl sub_020031fc
-.L_0200171a:
- bl sub_020031a8
-.L_0200171e:
- movs r0, #0
- add sp, #8
- pop {r3}
- mov r8, r3
- pop {r5, r6}
- pop {r1}
- bx r1
- .4byte 0x02000240
- .4byte 0x0000012f
- .4byte 0x00000109
- .4byte 0x00000242
- .4byte 0x00000834
- .4byte 0x01090000
- .4byte 0x00000111
- .4byte 0x02009c34
- .4byte 0x00000839
- .4byte 0x00000801
- .4byte 0x00000808
- .4byte 0x02009ce0
- .2byte 0x087a
- .2byte 0x0000
- push {r5, lr}
- ldr r0, [pc, #528]
- bl sub_020031ca
- cmp r0, #0
- beq.n .L_0200176e
- b.n .L_0200196c
-.L_0200176e:
- ldr r0, [pc, #520]
- bl sub_020031d6
- cmp r0, #0
- beq.n .L_02001798
- bl sub_020031fe
- movs r1, #2
- movs r0, #11
- bl sub_0200328e
- ldr r0, [pc, #500]
- bl sub_020032b4
- movs r0, #11
- movs r1, #0
- bl sub_020032cc
- bl sub_02003220
- b.n .L_0200196c
-.L_02001798:
- bl sub_0200321e
- movs r0, #11
- bl sub_02003254
- movs r1, #1
- movs r0, #11
- bl sub_020032b4
- ldr r5, [pc, #468]
- adds r0, r5, #0
- bl sub_020032dc
- movs r0, #11
- movs r1, #0
- movs r2, #20
- bl sub_020032fe
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #30
- bl sub_02003322
- movs r0, #196
- movs r1, #1
- movs r3, #1
- lsls r0, r0, #15
- negs r1, r1
- ldr r2, [pc, #432]
- bl sub_02003352
- movs r0, #0
- movs r1, #94
- ldr r2, [pc, #424]
- bl sub_020032b4
- movs r1, #160
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003340
- movs r0, #0
- bl sub_0200328e
- cmp r0, #0
- beq.n .L_02001802
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_020032e4
-.L_02001802:
- movs r0, #1
- movs r1, #110
- ldr r2, [pc, #388]
- bl sub_020032de
- movs r1, #160
- movs r2, #40
- movs r0, #1
- lsls r1, r1, #8
- bl sub_0200336a
- movs r1, #2
- movs r0, #11
- bl sub_0200332a
- movs r0, #40
- bl sub_020032a0
- movs r1, #0
- movs r0, #11
- bl sub_02003360
- movs r0, #0
- movs r1, #0
- bl sub_020032c8
- cmp r0, #0
- bne.n .L_0200185e
- movs r1, #2
- movs r0, #11
- bl sub_0200334c
- movs r0, #20
- bl sub_020032c2
- adds r0, r5, #2
- bl sub_02003378
- movs r0, #11
- movs r1, #0
- bl sub_02003390
- ldr r0, [pc, #288]
- bl sub_020032c6
- b.n .L_02001938
-.L_0200185e:
- movs r1, #2
- movs r0, #11
- bl sub_02003370
- movs r0, #20
- bl sub_020032e6
- adds r0, r5, #3
- bl sub_0200339c
- movs r0, #11
- movs r1, #0
- movs r2, #40
- bl sub_020033be
- movs r2, #0
- movs r0, #11
- movs r1, #0
- bl sub_02003398
- movs r0, #11
- movs r1, #1
- bl sub_02003378
- movs r2, #40
- movs r0, #11
- movs r1, #4
- bl sub_02003392
- movs r0, #11
- movs r1, #6
- bl sub_0200338a
- movs r0, #11
- ldr r1, [pc, #236]
- movs r2, #40
- bl sub_02003404
- movs r2, #10
- movs r0, #11
- movs r1, #0
- bl sub_020033f6
- movs r1, #1
- movs r0, #11
- bl sub_020033a6
- movs r0, #10
- bl sub_0200333c
- movs r0, #11
- movs r1, #3
- bl sub_020033bc
- movs r2, #10
- movs r0, #11
- movs r1, #0
- bl sub_02003416
- movs r0, #11
- movs r1, #3
- bl sub_020033ce
- ldr r5, [pc, #180]
- movs r0, #0
- ldr r1, [pc, #180]
- adds r2, r5, #0
- bl sub_0200340a
- adds r2, r5, #0
- movs r0, #1
- ldr r1, [pc, #168]
- bl sub_02003414
- ldr r1, [pc, #168]
- movs r0, #11
- bl sub_020033b4
- movs r0, #0
- bl sub_020033b2
- movs r0, #1
- bl sub_020033b8
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02003464
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #7
- movs r2, #60
- bl sub_02003470
- movs r0, #0
- ldr r1, [pc, #124]
- movs r2, #0
- bl sub_02003482
- movs r0, #1
- ldr r1, [pc, #116]
- movs r2, #120
- bl sub_0200348c
- ldr r0, [pc, #64]
- bl sub_020033a2
-.L_02001938:
- movs r0, #1
- movs r1, #2
- bl sub_0200342a
- movs r0, #0
- bl sub_020033e0
- cmp r0, #0
- beq.n .L_02001958
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_0200341a
-.L_02001958:
- movs r0, #1
- bl sub_02003438
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_0200344a
- bl sub_020033f6
-.L_0200196c:
- pop {r5}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00000839
- .4byte 0x0000082f
- .4byte 0x00000e8b
- .4byte 0x00000e85
- .4byte 0x011b0000
- .4byte 0x00000125
- .4byte 0x00000117
- .4byte 0x00000101
- .4byte 0x02009ce0
- .4byte 0x0001000b
- .4byte 0x02009bdc
- .2byte 0x0105
- .2byte 0x0000
+AlchemyC_0200150c:
+ .space 0x254
+AlchemyC_02001760:
+ .space 0x244
AlchemyC_020019a4:
.space 0x44
AlchemyC_020019e8:
diff --git a/games/gs1/assets/code/resource_377_overlay.s b/games/gs1/assets/code/resource_377_overlay.s
index be18207f6..0a4887d3d 100644
--- a/games/gs1/assets/code/resource_377_overlay.s
+++ b/games/gs1/assets/code/resource_377_overlay.s
@@ -1590,417 +1590,10 @@ AlchemyC_02000f38:
.space 0x2c
AlchemyC_02000f64:
.space 0x2c
- push {r5, lr}
- bl sub_020028a0
- movs r0, #0
- ldr r1, [pc, #848]
- ldr r2, [pc, #852]
- bl sub_020028d2
- movs r0, #0
- ldr r1, [pc, #848]
- ldr r2, [pc, #848]
- bl sub_02002914
- movs r1, #128
- movs r2, #40
- movs r0, #0
- lsls r1, r1, #7
- bl sub_020029a0
- movs r1, #2
- movs r0, #8
- bl sub_02002950
- ldr r0, [pc, #828]
- bl sub_02002986
- movs r0, #8
- movs r1, #0
- movs r2, #80
- bl sub_020029a8
- movs r2, #60
- movs r0, #8
- ldr r1, [pc, #812]
- bl sub_020029da
- movs r0, #8
- movs r1, #1
- bl sub_02002972
- movs r2, #60
- movs r0, #8
- movs r1, #0
- bl sub_020029c4
- movs r1, #2
- movs r0, #8
- bl sub_0200298c
- movs r0, #80
- bl sub_020028fa
- movs r0, #8
- ldr r1, [pc, #776]
- ldr r2, [pc, #776]
- bl sub_02002934
- movs r1, #146
- movs r2, #203
- lsls r2, r2, #1
- lsls r1, r1, #2
- movs r0, #8
- bl sub_02002962
- movs r0, #11
- bl sub_020028a0
- movs r0, #12
- bl sub_0200289e
- movs r1, #12
- movs r0, #8
- bl sub_0200299e
- movs r0, #80
- bl sub_0200292c
- movs r1, #2
- movs r0, #8
- bl sub_020029cc
- movs r0, #40
- bl sub_0200293a
- movs r0, #8
- movs r1, #0
- movs r2, #40
- bl sub_02002a1c
- movs r1, #132
- movs r0, #8
- lsls r1, r1, #1
- movs r2, #40
- bl sub_02002a50
- movs r0, #8
- movs r1, #0
- movs r2, #40
- bl sub_02002a32
- movs r2, #60
- movs r0, #0
- ldr r1, [pc, #684]
- bl sub_02002a64
- movs r0, #8
- movs r1, #13
- bl sub_020029ec
- movs r2, #0
- movs r0, #8
- ldr r1, [pc, #672]
- bl sub_02002a76
- movs r1, #11
- movs r0, #8
- bl sub_020029f6
- movs r0, #40
- bl sub_02002984
- movs r2, #40
- movs r0, #8
- movs r1, #0
- bl sub_02002a66
- movs r1, #1
- movs r0, #8
- bl sub_02002a2e
- movs r0, #20
- bl sub_0200299c
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_02002a7e
- movs r1, #12
- movs r0, #8
- bl sub_02002a2e
- movs r0, #20
- bl sub_020029b4
- movs r1, #129
- movs r2, #60
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02002ac0
- movs r0, #8
- movs r1, #13
- bl sub_02002a40
- movs r1, #0
- movs r0, #8
- bl sub_02002a98
- movs r0, #0
- movs r1, #0
- bl sub_020029f8
- cmp r0, #1
- bne.n .L_020010ea
- ldr r3, [pc, #568]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_020010ea:
- ldr r0, [pc, #556]
- bl sub_020029da
- cmp r0, #0
- beq.n .L_02001100
- movs r1, #129
- movs r0, #8
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02002b02
-.L_02001100:
- movs r0, #20
- bl sub_02002a08
- movs r0, #8
- movs r1, #0
- bl sub_02002ae0
- ldr r1, [pc, #524]
- movs r2, #60
- movs r0, #8
- bl sub_02002b1a
- ldr r5, [pc, #516]
- adds r0, r5, #0
- bl sub_02002ae2
- movs r1, #0
- movs r0, #8
- bl sub_02002af2
- movs r0, #0
- movs r1, #0
- bl sub_02002a52
- cmp r0, #1
- bne.n .L_02001144
- ldr r3, [pc, #476]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02001144:
- ldr r0, [pc, #464]
- bl sub_02002a34
- cmp r0, #0
- beq.n .L_0200115a
- movs r1, #129
- movs r0, #8
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02002b5c
-.L_0200115a:
- movs r0, #20
- bl sub_02002a62
- movs r0, #8
- movs r1, #0
- bl sub_02002b3a
- movs r2, #60
- ldr r1, [pc, #432]
- movs r0, #8
- bl sub_02002b74
- adds r0, r5, #3
- bl sub_02002b3a
- movs r0, #8
- movs r1, #0
- bl sub_02002b52
- movs r1, #1
- movs r0, #8
- bl sub_02002b22
- movs r0, #20
- bl sub_02002a90
- movs r0, #8
- movs r1, #13
- bl sub_02002b18
- movs r0, #8
- movs r1, #2
- bl sub_02002b30
- movs r2, #40
- movs r0, #8
- movs r1, #0
- bl sub_02002b82
- movs r1, #1
- movs r0, #8
- bl sub_02002b4a
- movs r0, #20
- bl sub_02002ab8
- movs r2, #40
- movs r0, #8
- movs r1, #0
- bl sub_02002b9a
- movs r1, #2
- movs r0, #8
- bl sub_02002b62
- movs r0, #40
- bl sub_02002ad0
- movs r0, #0
- bl sub_02002afe
- movs r3, #0
- strh r3, [r0, #6]
- movs r0, #1
- bl sub_020029f0
- movs r0, #0
- bl sub_02002b0e
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #254
- ands r3, r2
- movs r2, #194
- strb r3, [r0, #0]
- ldr r1, [pc, #304]
- movs r0, #0
- lsls r2, r2, #1
- bl sub_02002b4c
- ldr r2, [pc, #240]
- movs r0, #8
- ldr r1, [pc, #296]
- bl sub_02002b36
- movs r0, #8
- movs r1, #14
- bl sub_02002b86
- movs r2, #200
- ldr r1, [pc, #284]
- lsls r2, r2, #1
- movs r0, #8
- bl sub_02002b72
- movs r0, #40
- bl sub_02002b20
- movs r1, #145
- movs r2, #191
- movs r0, #8
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_02002b96
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #40
- movs r0, #8
- bl sub_02002c22
- movs r0, #0
- bl sub_02002b68
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #1
- orrs r3, r2
- movs r1, #192
- strb r3, [r0, #0]
- lsls r1, r1, #8
- movs r0, #8
- movs r2, #8
- bl sub_02002c3e
- movs r0, #8
- movs r1, #0
- movs r2, #8
- bl sub_02002c48
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #7
- movs r2, #8
- bl sub_02002c54
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #10
- bl sub_02002c60
- movs r0, #8
- movs r1, #4
- movs r2, #20
- bl sub_02002c0a
- movs r0, #8
- movs r1, #6
- movs r2, #40
- bl sub_02002c14
- movs r0, #8
- movs r1, #4
- movs r2, #20
- bl sub_02002c1e
- movs r0, #8
- movs r1, #0
- movs r2, #40
- bl sub_02002c78
- movs r0, #8
- ldr r1, [pc, #100]
- ldr r2, [pc, #140]
- bl sub_02002bda
- movs r1, #143
- movs r2, #192
- movs r0, #8
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_02002c20
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_02002c9a
- movs r1, #3
- movs r0, #0
- bl sub_02002c4a
- movs r0, #20
- bl sub_02002bd0
- movs r1, #3
- movs r0, #8
- bl sub_02002c58
- ldr r0, [pc, #92]
- bl sub_02002bce
- ldr r0, [pc, #88]
- bl sub_02002bd4
- bl sub_02002bf8
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x00009999
- .4byte 0x00004ccc
- .4byte 0x00000239
- .4byte 0x00000189
- .4byte 0x00001c66
- .4byte 0x00000101
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x00000105
- .4byte 0x00000103
- .4byte 0x03001ebc
- .4byte 0x0000081c
- .4byte 0x00000107
- .4byte 0x00001c6f
- .4byte 0x0000022e
- .4byte 0x00013333
- .4byte 0x0000024a
- .4byte 0x00003333
- .4byte 0x0000081e
- .2byte 0x0203
- .2byte 0x0000
- push {r5, lr}
- bl sub_02002c4c
- ldr r0, [pc, #96]
- bl sub_02002c32
- cmp r0, #0
- beq.n .L_0200136e
- movs r1, #128
- lsls r1, r1, #9
- ldr r2, [pc, #84]
- movs r0, #8
- bl sub_02002d12
- movs r0, #20
- bl sub_02002c60
- ldr r0, [pc, #76]
- bl sub_02002d26
- movs r0, #8
- movs r1, #0
- bl sub_02002d3e
- b.n .L_02001398
-.L_0200136e:
- movs r1, #2
- movs r0, #8
- bl sub_02002d10
- movs r0, #40
- bl sub_02002c7e
- ldr r5, [pc, #48]
- adds r0, r5, #0
- bl sub_02002d46
- adds r5, #1
- movs r0, #8
- movs r1, #0
- movs r2, #40
- bl sub_02002d6a
- adds r0, r5, #0
- movs r1, #1
- bl sub_02002c6a
-.L_02001398:
- bl sub_02002cae
- pop {r5}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00000203
- .4byte 0x02009e6c
- .4byte 0x00001c77
- .2byte 0x1c79
- .2byte 0x0000
+AlchemyC_02000f90:
+ .space 0x3ac
+AlchemyC_0200133c:
+ .space 0x78
AlchemyC_020013b4:
.space 0x2e
.2byte 0x0000
diff --git a/games/gs1/assets/code/resource_37b_overlay.s b/games/gs1/assets/code/resource_37b_overlay.s
index c60f3b3fd..ffcb3ff3a 100644
--- a/games/gs1/assets/code/resource_37b_overlay.s
+++ b/games/gs1/assets/code/resource_37b_overlay.s
@@ -611,1119 +611,10 @@ AlchemyC_02000054:
.space 0x44
AlchemyC_02000098:
.space 0xb8
- push {r5, r6, r7, lr}
- bl sub_020025a8
- ldr r7, [pc, #1020]
- movs r6, #224
- ldr r2, [r7, #0]
- movs r3, #128
- lsls r6, r6, #1
- lsls r3, r3, #1
- movs r5, #228
- str r3, [r2, r6]
- lsls r5, r5, #1
- movs r3, #32
- str r3, [r2, r5]
- bl sub_020026b2
- bl sub_020026c6
- movs r0, #20
- bl sub_020025c4
- movs r1, #144
- movs r2, #232
- lsls r2, r2, #16
- lsls r1, r1, #18
- movs r0, #8
- bl sub_0200262a
- movs r0, #1
- bl sub_020025d8
- ldr r0, [pc, #968]
- bl sub_0200266e
- movs r0, #8
- movs r1, #6
- bl sub_0200253e
- movs r1, #144
- movs r2, #140
- lsls r2, r2, #17
- movs r0, #8
- lsls r1, r1, #18
- bl sub_0200264c
- ldr r0, [pc, #944]
- ldr r1, [pc, #944]
- bl sub_020026c4
- movs r1, #1
- movs r2, #180
- movs r3, #1
- ldr r0, [pc, #936]
- negs r1, r1
- lsls r2, r2, #16
- bl sub_020026dc
- movs r1, #128
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02002642
- movs r1, #144
- lsls r1, r1, #2
- movs r2, #216
- movs r0, #8
- bl sub_0200266e
- movs r0, #20
- bl sub_0200262c
- movs r2, #0
- movs r1, #2
- movs r0, #5
- bl sub_020026a6
- movs r0, #30
- bl sub_0200263c
- movs r0, #5
- movs r1, #6
- bl sub_0200259c
- movs r1, #2
- movs r0, #8
- bl sub_020026c4
- movs r0, #6
- bl sub_02002652
- movs r1, #144
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #8
- bl sub_02002706
- movs r0, #10
- bl sub_02002664
- ldr r0, [pc, #844]
- ldr r1, [pc, #844]
- bl sub_02002734
- movs r1, #1
- movs r2, #176
- negs r1, r1
- lsls r2, r2, #16
- movs r3, #1
- ldr r0, [pc, #832]
- bl sub_0200274c
- bl sub_02002758
- movs r0, #60
- bl sub_02002686
- movs r1, #1
- movs r2, #180
- movs r3, #1
- lsls r2, r2, #16
- negs r1, r1
- ldr r0, [pc, #796]
- bl sub_02002766
- bl sub_02002772
- movs r0, #20
- bl sub_020026a0
- movs r1, #3
- movs r0, #8
- bl sub_02002710
- movs r0, #10
- bl sub_020026ae
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_02002762
- movs r0, #10
- bl sub_020026c0
- movs r0, #8
- movs r1, #6
- movs r2, #0
- bl sub_0200273a
- movs r1, #192
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #10
- lsls r2, r2, #10
- bl sub_02002700
- movs r1, #144
- movs r2, #184
- lsls r1, r1, #2
- movs r0, #8
- bl sub_0200272c
- movs r0, #40
- bl sub_020026ea
- movs r0, #8
- movs r1, #6
- bl sub_0200264a
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_020027a6
- movs r0, #40
- bl sub_02002704
- ldr r2, [r7, #0]
- ldr r3, [pc, #692]
- str r3, [r2, r6]
- movs r6, #16
- str r6, [r2, r5]
- bl sub_02002812
- bl sub_0200281e
- movs r1, #1
- movs r2, #176
- movs r3, #0
- negs r1, r1
- lsls r2, r2, #16
- ldr r0, [pc, #664]
- bl sub_020027f6
- bl sub_020026da
- movs r0, #1
- bl sub_020026a0
- bl sub_0200282c
- bl sub_02002840
- movs r0, #40
- bl sub_0200273e
- movs r1, #212
- movs r2, #200
- lsls r2, r2, #16
- lsls r1, r1, #17
- movs r0, #8
- bl sub_020027a4
- movs r0, #1
- bl sub_020026c2
- movs r0, #8
- movs r1, #20
- bl sub_020026b2
- bl sub_0200285e
- bl sub_0200286a
- movs r1, #144
- movs r2, #184
- movs r0, #8
- lsls r1, r1, #18
- lsls r2, r2, #16
- bl sub_020027c8
- movs r1, #1
- movs r2, #180
- lsls r2, r2, #16
- movs r3, #0
- negs r1, r1
- ldr r0, [pc, #560]
- bl sub_02002850
- bl sub_02002734
- movs r0, #1
- bl sub_020026fa
- bl sub_02002886
- bl sub_0200289a
- movs r0, #20
- bl sub_02002798
- ldr r0, [pc, #552]
- ldr r1, [pc, #552]
- bl sub_02002868
- movs r1, #1
- movs r2, #157
- movs r3, #1
- lsls r2, r2, #16
- negs r1, r1
- ldr r0, [pc, #512]
- bl sub_02002880
- bl sub_0200288c
- movs r0, #20
- bl sub_020027ba
- movs r0, #1
- movs r1, #2
- bl sub_0200283a
- movs r0, #1
- movs r1, #20
- bl sub_02002722
- movs r0, #5
- movs r1, #3
- bl sub_0200283a
- movs r0, #5
- movs r1, #6
- bl sub_02002732
- movs r1, #2
- movs r0, #8
- bl sub_0200285a
- movs r0, #40
- bl sub_020027e8
- movs r0, #8
- movs r1, #4
- bl sub_02002858
- movs r0, #8
- movs r1, #80
- bl sub_02002750
- movs r1, #129
- lsls r1, r1, #1
- movs r2, #0
- movs r0, #8
- bl sub_020028bc
- movs r0, #60
- bl sub_0200280a
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #8
- bl sub_020028be
- movs r0, #30
- bl sub_0200281c
- movs r0, #8
- movs r1, #20
- bl sub_0200277c
- movs r0, #0
- ldr r1, [pc, #416]
- movs r2, #0
- bl sub_020028e6
- movs r0, #1
- ldr r1, [pc, #408]
- movs r2, #0
- bl sub_020028f0
- ldr r1, [pc, #400]
- movs r2, #0
- movs r0, #5
- bl sub_020028fa
- movs r0, #60
- bl sub_02002848
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #8
- bl sub_020028fc
- movs r0, #30
- bl sub_0200285a
- movs r0, #8
- movs r1, #4
- bl sub_020028ca
- movs r0, #8
- movs r1, #6
- bl sub_020027c2
- movs r1, #1
- movs r2, #0
- movs r0, #0
- bl sub_020028fc
- movs r0, #40
- bl sub_0200287a
- movs r2, #0
- movs r1, #5
- movs r0, #0
- bl sub_0200290c
- movs r0, #40
- bl sub_0200288a
- movs r0, #8
- movs r1, #3
- bl sub_020028fa
- movs r0, #8
- movs r1, #6
- bl sub_020027f2
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200294e
- movs r1, #128
- movs r0, #5
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200295a
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #7
- movs r0, #1
- bl sub_02002966
- movs r0, #40
- bl sub_020028c4
- movs r0, #1
- movs r1, #3
- bl sub_0200292c
- movs r0, #5
- movs r1, #3
- bl sub_02002934
- movs r1, #3
- movs r0, #0
- bl sub_02002944
- movs r0, #20
- bl sub_020028e2
- movs r0, #8
- movs r1, #3
- bl sub_02002952
- movs r0, #8
- movs r1, #6
- bl sub_0200284a
- ldr r0, [pc, #216]
- ldr r1, [pc, #220]
- bl sub_020029c2
- movs r0, #144
- movs r1, #1
- movs r2, #215
- movs r3, #1
- lsls r0, r0, #18
- negs r1, r1
- lsls r2, r2, #16
- bl sub_020029dc
- movs r1, #128
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #8
- bl sub_020029c0
- movs r0, #10
- bl sub_0200291e
- movs r0, #8
- movs r1, #6
- movs r2, #0
- bl sub_02002998
- movs r1, #144
- lsls r1, r1, #2
- movs r2, #217
- movs r0, #8
- bl sub_0200297c
- movs r0, #20
- bl sub_0200293a
- movs r1, #144
- movs r0, #8
- lsls r1, r1, #2
- ldr r2, [pc, #148]
- bl sub_0200298e
- movs r2, #0
- movs r0, #8
- movs r1, #0
- bl sub_020029a8
- ldr r0, [pc, #136]
- ldr r1, [pc, #136]
- bl sub_02002a20
- movs r0, #144
- movs r1, #1
- movs r2, #136
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #16
- lsls r0, r0, #18
- bl sub_02002a3a
- bl sub_02002a46
- movs r0, #20
- bl sub_02002974
- movs r1, #128
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020029aa
- movs r1, #128
- movs r2, #128
- movs r0, #5
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020029b8
- movs r0, #1
- movs r1, #2
- bl sub_020029f8
- movs r0, #0
- b.n .L_02000598
- .2byte 0x0000
- .4byte 0x03001ebc
- .4byte 0x0000101a
- .4byte 0x0000cccc
- .4byte 0x00001999
- .4byte 0x023e0000
- .4byte 0x00059999
- .4byte 0x0000b333
- .4byte 0x011f0000
- .4byte 0x00000202
- .4byte 0x00013333
- .4byte 0x00002666
- .4byte 0x00000101
- .4byte 0x00019999
- .4byte 0x00003333
- .4byte 0x00000141
- .4byte 0x00039999
- .2byte 0x7333
- .2byte 0x0000
-.L_02000598:
- bl sub_02002a06
- cmp r0, #0
- beq.n .L_020005ae
- movs r2, #10
- ldrsh r1, [r0, r2]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_02002a28
-.L_020005ae:
- movs r0, #1
- bl sub_02002a4e
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_02002a60
- movs r0, #5
- movs r1, #2
- bl sub_02002a70
- movs r0, #0
- bl sub_02002a36
- cmp r0, #0
- beq.n .L_020005de
- movs r2, #10
- ldrsh r1, [r0, r2]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #5
- bl sub_02002a58
-.L_020005de:
- movs r0, #5
- bl sub_02002a7e
- movs r1, #0
- movs r2, #0
- movs r0, #5
- bl sub_02002a90
- ldr r0, [pc, #32]
- bl sub_02002a36
- ldr r1, [r7, #0]
- movs r2, #224
- lsls r2, r2, #1
- adds r3, r1, r2
- adds r2, #68
- str r2, [r3, #0]
- subs r2, #60
- adds r3, r1, r2
- str r6, [r3, #0]
- bl sub_02002a64
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x012f
- .2byte 0x0000
- push {lr}
- bl sub_02002a6c
- ldr r3, [pc, #1020]
- ldr r1, [r3, #0]
- movs r3, #224
- lsls r3, r3, #1
- adds r2, r1, r3
- subs r3, #192
- str r3, [r2, #0]
- adds r3, #200
- adds r2, r1, r3
- movs r3, #32
- str r3, [r2, #0]
- bl sub_02002b76
- bl sub_02002b8a
- movs r0, #20
- bl sub_02002a88
- movs r1, #144
- movs r2, #148
- lsls r2, r2, #17
- lsls r1, r1, #18
- movs r0, #8
- bl sub_02002aee
- movs r0, #1
- bl sub_02002a9c
- ldr r0, [pc, #968]
- bl sub_02002b32
- movs r0, #8
- movs r1, #6
- bl sub_02002a02
- ldr r0, [pc, #956]
- ldr r1, [pc, #960]
- bl sub_02002b7a
- movs r1, #1
- movs r2, #180
- movs r3, #1
- ldr r0, [pc, #952]
- negs r1, r1
- lsls r2, r2, #16
- bl sub_02002b92
- movs r1, #128
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02002af8
- movs r1, #144
- lsls r1, r1, #2
- movs r2, #216
- movs r0, #8
- bl sub_02002b24
- movs r0, #20
- bl sub_02002ae2
- movs r2, #0
- movs r1, #2
- movs r0, #5
- bl sub_02002b5c
- movs r0, #30
- bl sub_02002af2
- movs r0, #5
- movs r1, #6
- bl sub_02002a52
- movs r1, #2
- movs r0, #8
- bl sub_02002b7a
- movs r0, #6
- bl sub_02002b08
- movs r1, #144
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #8
- bl sub_02002bbc
- movs r0, #10
- bl sub_02002b1a
- ldr r0, [pc, #856]
- ldr r1, [pc, #860]
- bl sub_02002bea
- movs r1, #1
- movs r2, #176
- negs r1, r1
- lsls r2, r2, #16
- movs r3, #1
- ldr r0, [pc, #848]
- bl sub_02002c02
- bl sub_02002c0e
- movs r0, #60
- bl sub_02002b3c
- movs r1, #1
- movs r2, #180
- movs r3, #1
- lsls r2, r2, #16
- negs r1, r1
- ldr r0, [pc, #808]
- bl sub_02002c1c
- bl sub_02002c28
- movs r0, #20
- bl sub_02002b56
- movs r1, #3
- movs r0, #8
- bl sub_02002bc6
- movs r0, #10
- bl sub_02002b64
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_02002c18
- movs r0, #10
- bl sub_02002b76
- movs r0, #8
- movs r1, #6
- movs r2, #0
- bl sub_02002bf0
- movs r1, #192
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #10
- lsls r2, r2, #10
- bl sub_02002bb6
- movs r1, #144
- movs r2, #184
- lsls r1, r1, #2
- movs r0, #8
- bl sub_02002be2
- movs r0, #40
- bl sub_02002ba0
- movs r0, #8
- movs r1, #3
- bl sub_02002c10
- movs r0, #8
- movs r1, #6
- bl sub_02002b08
- movs r0, #1
- movs r1, #3
- bl sub_02002c18
- movs r0, #5
- movs r1, #3
- bl sub_02002c20
- movs r1, #3
- movs r0, #0
- bl sub_02002c30
- movs r0, #40
- bl sub_02002bce
- movs r0, #8
- movs r1, #3
- bl sub_02002c4e
- movs r0, #8
- movs r1, #6
- bl sub_02002b36
- movs r0, #0
- movs r1, #2
- movs r2, #0
- bl sub_02002c58
- movs r0, #1
- movs r1, #2
- movs r2, #0
- bl sub_02002c62
- movs r2, #0
- movs r1, #2
- movs r0, #5
- bl sub_02002c6c
- movs r0, #30
- bl sub_02002c02
- movs r0, #1
- movs r1, #2
- bl sub_02002c82
- movs r0, #1
- movs r1, #6
- bl sub_02002b6a
- movs r0, #8
- movs r1, #1
- bl sub_02002c92
- movs r0, #8
- movs r1, #4
- bl sub_02002c8a
- movs r0, #8
- movs r1, #6
- bl sub_02002b82
- movs r1, #5
- movs r2, #0
- movs r0, #0
- bl sub_02002cbc
- movs r0, #40
- bl sub_02002c3a
- movs r0, #8
- movs r1, #0
- movs r2, #0
- bl sub_02002cc4
- movs r1, #5
- movs r2, #0
- movs r0, #8
- bl sub_02002cce
- movs r0, #40
- bl sub_02002c54
- movs r0, #8
- movs r1, #6
- movs r2, #0
- bl sub_02002cce
- movs r1, #144
- movs r0, #8
- lsls r1, r1, #2
- movs r2, #216
- bl sub_02002cb2
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_02002d1e
- movs r0, #10
- bl sub_02002c7c
- movs r0, #8
- ldr r1, [pc, #512]
- ldr r2, [pc, #516]
- bl sub_02002cae
- movs r1, #216
- movs r2, #200
- lsls r1, r1, #1
- movs r0, #8
- bl sub_02002cd2
- movs r0, #20
- bl sub_02002c98
- ldr r0, [pc, #496]
- ldr r1, [pc, #496]
- bl sub_02002d68
- movs r0, #144
- movs r1, #1
- movs r2, #171
- lsls r2, r2, #16
- movs r3, #1
- negs r1, r1
- lsls r0, r0, #17
- bl sub_02002d82
- bl sub_02002d8e
- movs r0, #80
- bl sub_02002cbc
- movs r0, #8
- movs r1, #1
- bl sub_02002d24
- movs r1, #1
- movs r2, #180
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #16
- ldr r0, [pc, #416]
- bl sub_02002da4
- movs r0, #20
- bl sub_02002cda
- movs r1, #0
- movs r2, #0
- movs r0, #8
- bl sub_02002d8c
- movs r0, #30
- bl sub_02002cea
- movs r1, #144
- movs r0, #8
- lsls r1, r1, #2
- movs r2, #216
- bl sub_02002d3e
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_02002daa
- movs r0, #10
- bl sub_02002d08
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002dbc
- movs r1, #128
- movs r0, #5
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002dc8
- movs r1, #128
- movs r2, #0
- movs r0, #1
- lsls r1, r1, #7
- bl sub_02002dd4
- ldr r0, [pc, #316]
- ldr r1, [pc, #316]
- bl sub_02002dfc
- movs r1, #1
- movs r2, #171
- movs r3, #1
- ldr r0, [pc, #308]
- negs r1, r1
- lsls r2, r2, #16
- bl sub_02002e14
- movs r0, #8
- movs r1, #6
- movs r2, #0
- bl sub_02002dbe
- movs r1, #192
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #10
- lsls r2, r2, #10
- bl sub_02002d84
- movs r1, #144
- movs r2, #184
- lsls r1, r1, #2
- movs r0, #8
- bl sub_02002db0
- movs r0, #80
- bl sub_02002d6e
- movs r0, #8
- movs r1, #6
- bl sub_02002cce
- movs r0, #8
- movs r1, #4
- bl sub_02002de6
- movs r0, #8
- movs r1, #20
- bl sub_02002cde
- movs r1, #129
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #5
- bl sub_02002e4a
- movs r0, #40
- bl sub_02002d98
- movs r0, #5
- movs r1, #2
- bl sub_02002e18
- movs r0, #5
- movs r1, #6
- bl sub_02002d00
- movs r0, #8
- movs r1, #3
- bl sub_02002e18
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_02002e64
- movs r0, #40
- bl sub_02002dc2
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #8
- bl sub_02002e76
- movs r0, #30
- bl sub_02002dd4
- movs r0, #8
- movs r1, #6
- bl sub_02002d34
- movs r0, #0
- ldr r1, [pc, #176]
- movs r2, #0
- bl sub_02002e9e
- movs r0, #1
- ldr r1, [pc, #168]
- movs r2, #0
- bl sub_02002ea8
- movs r2, #0
- ldr r1, [pc, #156]
- movs r0, #5
- bl sub_02002eb2
- movs r0, #60
- bl sub_02002e00
- movs r0, #8
- movs r1, #4
- bl sub_02002e70
- movs r0, #8
- movs r1, #6
- bl sub_02002d68
- movs r1, #0
- movs r2, #0
- movs r0, #1
- bl sub_02002ea2
- movs r0, #40
- bl sub_02002e20
- movs r2, #0
- movs r1, #0
- movs r0, #5
- bl sub_02002eb2
- movs r0, #40
- bl sub_02002e30
- movs r1, #0
- movs r0, #8
- bl sub_02002ed0
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002eec
- movs r1, #128
- movs r0, #5
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002ef8
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002f04
- movs r0, #0
- b.n .L_02000a4c
- .2byte 0x0000
- .4byte 0x03001ebc
- .4byte 0x00001004
- .4byte 0x0000cccc
- .4byte 0x00001999
- .4byte 0x023e0000
- .4byte 0x00059999
- .4byte 0x0000b333
- .4byte 0x011f0000
- .4byte 0x00013333
- .4byte 0x00009999
- .4byte 0x00026666
- .4byte 0x00004ccc
- .2byte 0x0101
- .2byte 0x0000
-.L_02000a4c:
- movs r1, #0
- bl sub_02002eb4
- cmp r0, #0
- bne.n .L_02000a5e
- ldr r0, [pc, #516]
- bl sub_02002f36
- b.n .L_02000a64
-.L_02000a5e:
- ldr r0, [pc, #512]
- bl sub_02002f3e
-.L_02000a64:
- movs r1, #6
- movs r0, #8
- bl sub_02002e0e
- ldr r0, [pc, #500]
- bl sub_02002f4c
- movs r0, #8
- movs r1, #2
- bl sub_02002f3c
- movs r0, #8
- movs r1, #6
- bl sub_02002e24
- movs r1, #129
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #1
- bl sub_02002f90
- movs r0, #60
- bl sub_02002ede
- movs r0, #1
- movs r1, #6
- bl sub_02002e3e
- movs r0, #8
- movs r1, #3
- bl sub_02002f56
- movs r0, #8
- movs r1, #6
- bl sub_02002e4e
- movs r1, #128
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #8
- bl sub_02002faa
- movs r0, #20
- bl sub_02002f08
- movs r0, #8
- movs r1, #6
- movs r2, #0
- bl sub_02002f82
- movs r1, #144
- movs r2, #216
- lsls r1, r1, #2
- movs r0, #8
- bl sub_02002f66
- movs r0, #40
- bl sub_02002f24
- ldr r0, [pc, #396]
- ldr r1, [pc, #396]
- bl sub_02002ff4
- movs r1, #1
- movs r2, #191
- movs r3, #1
- ldr r0, [pc, #388]
- negs r1, r1
- lsls r2, r2, #16
- bl sub_0200300c
- movs r1, #128
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02002f72
- movs r1, #144
- movs r2, #232
- lsls r1, r1, #2
- movs r0, #8
- bl sub_02002f9e
- movs r0, #40
- bl sub_02002f5c
- movs r1, #2
- movs r0, #8
- bl sub_02002fdc
- movs r0, #40
- bl sub_02002f6a
- movs r0, #8
- movs r1, #6
- bl sub_02002eca
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #8
- bl sub_02003026
- movs r0, #30
- bl sub_02002f84
- movs r0, #8
- movs r1, #6
- bl sub_02002ee4
- movs r0, #8
- movs r1, #3
- bl sub_02002ffc
- movs r0, #144
- movs r1, #1
- movs r2, #215
- movs r3, #1
- lsls r0, r0, #18
- negs r1, r1
- lsls r2, r2, #16
- bl sub_02003076
- movs r0, #8
- ldr r1, [pc, #276]
- ldr r2, [pc, #276]
- bl sub_02002ff8
- movs r2, #0
- movs r0, #8
- movs r1, #0
- bl sub_02003012
- ldr r0, [pc, #264]
- ldr r1, [pc, #268]
- bl sub_0200308a
- movs r0, #144
- movs r1, #1
- movs r2, #136
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #16
- lsls r0, r0, #18
- bl sub_020030a4
- bl sub_020030b0
- movs r0, #20
- bl sub_02002fde
- movs r2, #0
- movs r1, #0
- movs r0, #5
- bl sub_02003090
- movs r0, #10
- bl sub_02002fee
- movs r0, #5
- movs r1, #6
- bl sub_02002f4e
- movs r0, #1
- movs r1, #3
- bl sub_0200305e
- movs r0, #5
- movs r1, #3
- bl sub_0200306e
- movs r1, #128
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200303c
- movs r1, #128
- movs r2, #128
- movs r0, #5
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200304a
- movs r0, #5
- movs r1, #2
- bl sub_0200308a
- movs r0, #0
- bl sub_02003050
- cmp r0, #0
- beq.n .L_02000bf8
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #5
- bl sub_02003072
-.L_02000bf8:
- movs r0, #5
- bl sub_02003098
- movs r0, #5
- movs r1, #0
- movs r2, #0
- bl sub_020030aa
- movs r0, #1
- movs r1, #2
- bl sub_020030ba
- movs r0, #0
- bl sub_02003080
- cmp r0, #0
- beq.n .L_02000c28
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_020030a2
-.L_02000c28:
- movs r0, #1
- bl sub_020030c8
- movs r1, #0
- movs r2, #0
- movs r0, #1
- bl sub_020030da
- ldr r0, [pc, #72]
- bl sub_02003080
- ldr r3, [pc, #72]
- ldr r1, [r3, #0]
- movs r3, #224
- lsls r3, r3, #1
- adds r2, r1, r3
- adds r3, #68
- str r3, [r2, #0]
- subs r3, #60
- adds r2, r1, r3
- movs r3, #16
- str r3, [r2, #0]
- bl sub_020030b2
- pop {r0}
- bx r0
- .4byte 0x00001010
- .4byte 0x00001011
- .4byte 0x00001012
- .4byte 0x0000cccc
- .4byte 0x00001999
- .4byte 0x023e0000
- .4byte 0x0000023e
- .4byte 0x00000143
- .4byte 0x00039999
- .4byte 0x00007333
- .4byte 0x0000012f
- .2byte 0x1ebc
- .2byte 0x0300
+AlchemyC_02000150:
+ .space 0x4c4
+AlchemyC_02000614:
+ .space 0x678
push {r5, r6, r7, lr}
mov r7, fp
mov r6, sl
@@ -2008,325 +899,12 @@ AlchemyC_020015fc:
.space 0x28
AlchemyC_02001624:
.space 0x48
- push {r5, lr}
- movs r0, #0
- bl sub_02003ade
- ldr r3, [r0, #8]
- movs r0, #0
- asrs r5, r3, #20
- bl sub_02003ae8
- ldr r3, [r0, #16]
- asrs r3, r3, #20
- cmp r3, #7
- bne.n .L_0200169e
- adds r3, r5, #0
- subs r3, #13
- cmp r3, #1
- bhi.n .L_0200169e
- movs r1, #208
- movs r2, #224
- movs r0, #2
- lsls r1, r1, #16
- lsls r2, r2, #15
- movs r3, #255
- bl sub_02003ac0
-.L_0200169e:
- pop {r5}
- pop {r0}
- bx r0
- push {r5, lr}
- movs r0, #0
- bl sub_02003b16
- ldr r3, [r0, #8]
- movs r0, #0
- asrs r5, r3, #20
- bl sub_02003b20
- ldr r3, [r0, #16]
- asrs r3, r3, #20
- cmp r3, #7
- bne.n .L_020016d6
- adds r3, r5, #0
- subs r3, #21
- cmp r3, #1
- bhi.n .L_020016d6
- movs r1, #176
- movs r2, #224
- movs r0, #2
- lsls r1, r1, #17
- lsls r2, r2, #15
- movs r3, #255
- bl sub_02003af8
-.L_020016d6:
- pop {r5}
- pop {r0}
- bx r0
- push {r5, r6, lr}
- movs r0, #17
- sub sp, #8
- bl sub_02003b50
- movs r1, #136
- movs r2, #128
- adds r6, r0, #0
- lsls r1, r1, #17
- movs r0, #2
- lsls r2, r2, #16
- movs r3, #0
- bl sub_02003b1a
- movs r1, #144
- movs r2, #128
- movs r0, #2
- lsls r1, r1, #17
- lsls r2, r2, #16
- movs r3, #0
- bl sub_02003b2a
- cmp r6, #0
- bne.n .L_0200170e
- b.n .L_02001924
-.L_0200170e:
- ldr r5, [r6, #16]
- asrs r5, r5, #20
- bl sub_02003b68
- cmp r5, #8
- beq.n .L_0200171c
- b.n .L_02001920
-.L_0200171c:
- ldr r0, [pc, #524]
- bl sub_02003b54
- cmp r0, #0
- bne.n .L_0200174a
- movs r0, #0
- bl sub_02003b96
- ldr r3, [r0, #16]
- asrs r3, r3, #19
- cmp r3, #17
- bhi.n .L_0200174a
- movs r0, #0
- ldr r1, [pc, #504]
- movs r2, #158
- bl sub_02003bd0
- movs r0, #0
- bl sub_02003bae
- movs r3, #192
- lsls r3, r3, #8
- strh r3, [r0, #6]
-.L_0200174a:
- ldr r0, [pc, #488]
- bl sub_02003b82
- cmp r0, #0
- bne.n .L_02001756
- b.n .L_02001920
-.L_02001756:
- ldr r0, [pc, #480]
- bl sub_02003b8e
- cmp r0, #0
- bne.n .L_02001762
- b.n .L_02001920
-.L_02001762:
- ldr r0, [pc, #472]
- bl sub_02003ba2
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_02003c86
- movs r0, #143
- movs r1, #1
- movs r2, #146
- negs r1, r1
- lsls r2, r2, #16
- movs r3, #1
- lsls r0, r0, #17
- bl sub_02003ca0
- bl sub_02003cac
- movs r0, #17
- bl sub_02003bfa
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #254
- ands r3, r2
- movs r1, #192
- movs r2, #128
- lsls r2, r2, #9
- strb r3, [r0, #0]
- lsls r1, r1, #10
- movs r0, #17
- bl sub_02003c1a
- adds r3, r6, #0
- movs r5, #0
- adds r3, #85
- strb r5, [r3, #0]
- movs r1, #3
- movs r0, #17
- bl sub_02003cb2
- movs r0, #189
- bl sub_02003d20
- movs r1, #144
- lsls r1, r1, #1
- movs r2, #178
- movs r0, #17
- bl sub_02003c44
- movs r0, #8
- bl sub_02003c1a
- movs r1, #144
- movs r2, #178
- movs r0, #18
- lsls r1, r1, #17
- lsls r2, r2, #16
- bl sub_02003c80
- movs r3, #128
- lsls r3, r3, #24
- str r3, [r6, #56]
- str r3, [r6, #60]
- str r3, [r6, #64]
- movs r0, #17
- movs r1, #0
- movs r2, #0
- str r5, [r6, #8]
- str r5, [r6, #12]
- str r5, [r6, #16]
- str r5, [r6, #36]
- str r5, [r6, #40]
- str r5, [r6, #44]
- bl sub_02003ca0
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #9
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_02003c28
- movs r0, #10
- bl sub_02003c5e
- movs r0, #141
- bl sub_02003d7c
- movs r0, #192
-.L_0200181c:
- movs r1, #192
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #10
- bl sub_02003c44
- movs r0, #10
- bl sub_02003c7a
- movs r0, #160
- movs r1, #160
- movs r2, #128
- lsls r1, r1, #11
- lsls r2, r2, #9
- lsls r0, r0, #11
- bl sub_02003c5a
- movs r0, #35
- bl sub_02003c90
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #11
- lsls r2, r2, #9
- lsls r0, r0, #11
- bl sub_02003c70
- movs r0, #20
- bl sub_02003ca6
- movs r0, #192
- movs r1, #192
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #10
- bl sub_02003c86
- movs r0, #30
- bl sub_02003cbc
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #10
- bl sub_02003c9c
- movs r0, #40
- bl sub_02003cd2
- ldr r0, [pc, #164]
- bl sub_02003df0
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #9
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_02003cb8
- movs r0, #10
- bl sub_02003cee
- movs r0, #1
- movs r1, #1
- negs r1, r1
- ldr r2, [pc, #148]
- negs r0, r0
- bl sub_02003ccc
- movs r0, #60
- bl sub_02003d02
- movs r0, #188
- bl sub_02003e20
- ldr r0, [pc, #132]
- bl sub_02003cf6
- cmp r0, #0
- beq.n .L_020018ec
- ldr r0, [pc, #124]
- bl sub_02003d00
- cmp r0, #0
- beq.n .L_020018ec
- ldr r0, [pc, #120]
- bl sub_02003d0a
- cmp r0, #0
- beq.n .L_020018ec
- ldr r0, [pc, #112]
- bl sub_02003d14
- cmp r0, #0
- beq.n .L_020018ec
- ldr r0, [pc, #108]
- bl sub_02003d26
-.L_020018ec:
- movs r0, #40
- bl sub_02003d3c
- ldr r0, [pc, #100]
- movs r1, #1
- bl sub_02003d24
- movs r3, #8
- movs r5, #17
- str r3, [sp, #4]
- movs r0, #0
- movs r1, #1
- movs r2, #2
- movs r3, #1
- str r5, [sp, #0]
- bl sub_02003d18
- movs r3, #7
- str r3, [sp, #4]
- movs r0, #17
- movs r1, #9
- movs r2, #2
- movs r3, #1
- str r5, [sp, #0]
- bl sub_02003d2a
-.L_02001920:
- bl sub_02003d7e
-.L_02001924:
- add sp, #8
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x00000207
- .4byte 0x00000121
- .4byte 0x00000816
- .4byte 0x00000817
- .4byte 0x00000818
- .4byte 0x0000e666
- .4byte 0x0000080b
- .4byte 0x0000080c
- .4byte 0x0000080d
- .4byte 0x0000080e
- .4byte 0x0000080f
- .2byte 0x1038
- .2byte 0x0000
+AlchemyC_0200166c:
+ .space 0x38
+AlchemyC_020016a4:
+ .space 0x38
+AlchemyC_020016dc:
+ .space 0x280
AlchemyC_0200195c:
.space 0x88
AlchemyC_020019e4:
diff --git a/games/gs1/assets/code/resource_37f_overlay.s b/games/gs1/assets/code/resource_37f_overlay.s
index de777689e..16c242fd2 100644
--- a/games/gs1/assets/code/resource_37f_overlay.s
+++ b/games/gs1/assets/code/resource_37f_overlay.s
@@ -479,56 +479,8 @@ AlchemyC_02000074:
.space 0x8
AlchemyC_0200007c:
.space 0x70
- push {lr}
- ldr r1, [pc, #68]
- movs r0, #224
- lsls r0, r0, #1
- adds r3, r1, r0
- movs r0, #0
- ldrsh r2, [r3, r0]
- ldr r3, [pc, #60]
- cmp r2, r3
- bne.n .L_02000104
- ldr r0, [pc, #56]
- b.n .L_0200012e
-.L_02000104:
- ldr r3, [pc, #56]
- cmp r2, r3
- bne.n .L_0200012c
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r1, r2
- movs r0, #0
- ldrsh r3, [r3, r0]
- cmp r3, #11
- blt.n .L_02000128
- cmp r3, #13
- ble.n .L_02000124
- cmp r3, #16
- bgt.n .L_02000128
- ldr r0, [pc, #32]
- b.n .L_0200012e
-.L_02000124:
- ldr r0, [pc, #32]
- b.n .L_0200012e
-.L_02000128:
- ldr r0, [pc, #32]
- b.n .L_0200012e
-.L_0200012c:
- ldr r0, [pc, #32]
-.L_0200012e:
- pop {r1}
- bx r1
- .2byte 0x0000
- .4byte 0x02000240
- .4byte 0x00000013
- .4byte 0x0200a2e4
- .4byte 0x00000010
- .4byte 0x0200a524
- .4byte 0x0200a41c
- .4byte 0x0200a32c
- .2byte 0xa2d8
- .2byte 0x0200
+AlchemyC_020000ec:
+ .space 0x68
AlchemyC_02000154:
.space 0xac
AlchemyC_02000200:
@@ -1161,503 +1113,10 @@ AlchemyC_02000f8c:
.space 0x4c
.L_02001026:
.space 0x5f6
- push {lr}
- bl sub_020031cc
- ldr r3, [pc, #368]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #68
- str r2, [r3, #0]
- bl sub_020032d6
- bl sub_020032ea
- movs r0, #20
- bl sub_020031e0
- movs r0, #0
- bl sub_0200320e
- cmp r0, #0
- beq.n .L_02001652
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #8
- bl sub_0200324c
-.L_02001652:
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #8
- movs r0, #8
- lsls r1, r1, #9
- bl sub_02003232
- movs r0, #8
- movs r1, #2
- bl sub_0200326a
- movs r2, #10
- negs r2, r2
- movs r1, #24
- movs r0, #8
- bl sub_0200325e
- movs r0, #8
- bl sub_0200326c
- movs r1, #1
- movs r0, #8
- bl sub_02003284
- movs r0, #6
- bl sub_0200322a
- movs r1, #176
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020032ee
- movs r1, #192
- movs r2, #40
- movs r0, #0
- lsls r1, r1, #8
- bl sub_020032fa
- ldr r0, [pc, #244]
- ldr r1, [pc, #248]
- bl sub_02003322
- movs r0, #209
- movs r1, #1
- movs r2, #131
- lsls r2, r2, #18
- movs r3, #1
- negs r1, r1
- lsls r0, r0, #19
- bl sub_0200333c
- bl sub_02003348
- movs r0, #20
- bl sub_02003266
- ldr r0, [pc, #216]
- ldr r1, [pc, #220]
- bl sub_02003346
- movs r0, #235
- movs r1, #1
- movs r2, #131
- lsls r2, r2, #18
- movs r3, #1
- negs r1, r1
- lsls r0, r0, #19
- bl sub_02003360
- bl sub_0200336c
- movs r0, #20
- bl sub_0200328a
- ldr r0, [pc, #188]
- ldr r1, [pc, #192]
- bl sub_0200336a
- movs r1, #1
- movs r2, #137
- movs r3, #1
- lsls r2, r2, #18
- negs r1, r1
- ldr r0, [pc, #180]
- bl sub_02003382
- bl sub_0200338e
- movs r0, #20
- bl sub_020032ac
- movs r0, #8
- movs r1, #2
- bl sub_02003334
- movs r1, #0
- movs r2, #30
- movs r0, #8
- bl sub_02003376
- ldr r0, [pc, #148]
- bl sub_02003354
- ldr r0, [pc, #148]
- movs r1, #0
- movs r2, #10
- bl sub_02003376
- movs r1, #128
- movs r2, #40
- movs r0, #8
- lsls r1, r1, #1
- bl sub_020033a2
- movs r0, #8
- movs r1, #1
- bl sub_02003362
- movs r1, #160
- movs r0, #8
- lsls r1, r1, #7
- movs r2, #20
- bl sub_020033a6
- ldr r0, [pc, #104]
- movs r1, #0
- movs r2, #10
- bl sub_020033a0
- movs r0, #8
- movs r1, #2
- bl sub_02003360
- movs r0, #0
- bl sub_0200332e
- cmp r0, #0
- beq.n .L_02001776
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #8
- bl sub_02003350
-.L_02001776:
- movs r0, #8
- bl sub_0200336e
- movs r1, #0
- movs r2, #0
- movs r0, #8
- bl sub_02003380
- ldr r0, [pc, #52]
- bl sub_0200331e
- bl sub_02003342
- pop {r0}
- bx r0
- .4byte 0x03001ebc
- .4byte 0x00026666
- .4byte 0x00004ccc
- .4byte 0x00019999
- .4byte 0x00003333
- .4byte 0x00033333
- .4byte 0x00006666
- .4byte 0x06e90000
- .4byte 0x0000103a
- .4byte 0x00004008
- .2byte 0x0825
- .2byte 0x0000
- push {r5, r6, r7, lr}
- sub sp, #8
- movs r5, #32
- movs r1, #20
- movs r2, #1
- movs r3, #1
- adds r6, r0, #0
- movs r7, #100
- movs r0, #122
- str r7, [sp, #0]
- str r5, [sp, #4]
- bl sub_0200333c
- movs r3, #104
- str r3, [sp, #0]
- movs r0, #122
- movs r1, #20
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_0200334e
- movs r3, #108
- str r3, [sp, #0]
- movs r0, #122
- movs r1, #20
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_02003360
- movs r3, #112
- str r3, [sp, #0]
- movs r0, #122
- movs r1, #20
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_02003372
- movs r3, #116
- str r3, [sp, #0]
- movs r0, #122
- movs r1, #20
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_02003384
- movs r3, #120
- str r3, [sp, #0]
- movs r0, #122
- movs r1, #20
- movs r2, #1
- movs r3, #1
- str r5, [sp, #4]
- bl sub_02003396
- ldr r0, [pc, #592]
- bl sub_020033c4
- cmp r0, #0
- beq.n .L_02001862
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- str r7, [sp, #0]
- str r5, [sp, #4]
- bl sub_020033b0
- cmp r6, #0
- beq.n .L_02001890
- movs r1, #199
- movs r2, #130
- movs r0, #9
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_0200345a
- b.n .L_02001890
-.L_02001862:
- movs r0, #196
- lsls r0, r0, #2
- bl sub_020033f4
- cmp r0, #0
- beq.n .L_02001890
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- str r7, [sp, #0]
- str r5, [sp, #4]
- bl sub_020033e0
- cmp r6, #0
- beq.n .L_02001890
- movs r1, #203
- movs r2, #130
- movs r0, #9
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_0200348a
-.L_02001890:
- ldr r0, [pc, #504]
- bl sub_02003420
- cmp r0, #0
- beq.n .L_020018c2
- movs r3, #104
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_02003410
- cmp r6, #0
- beq.n .L_020018f2
- movs r1, #207
- movs r2, #130
- movs r0, #10
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_020034ba
- b.n .L_020018f2
-.L_020018c2:
- ldr r0, [pc, #460]
- bl sub_02003452
- cmp r0, #0
- beq.n .L_020018f2
- movs r3, #104
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_02003442
- cmp r6, #0
- beq.n .L_020018f2
- movs r1, #211
- movs r2, #130
- movs r0, #10
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_020034ec
-.L_020018f2:
- ldr r0, [pc, #416]
- bl sub_02003482
- cmp r0, #0
- beq.n .L_02001924
- movs r3, #108
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_02003472
- cmp r6, #0
- beq.n .L_02001956
- movs r1, #215
- movs r2, #130
- movs r0, #11
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_0200351c
- b.n .L_02001956
-.L_02001924:
- movs r0, #197
- lsls r0, r0, #2
- bl sub_020034b6
- cmp r0, #0
- beq.n .L_02001956
- movs r3, #108
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_020034a6
- cmp r6, #0
- beq.n .L_02001956
- movs r1, #219
- movs r2, #130
- movs r0, #11
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_02003550
-.L_02001956:
- ldr r0, [pc, #320]
- bl sub_020034e6
- cmp r0, #0
- beq.n .L_02001988
- movs r3, #112
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_020034d6
- cmp r6, #0
- beq.n .L_020019b8
- movs r1, #223
- movs r2, #130
- movs r0, #12
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_02003580
- b.n .L_020019b8
-.L_02001988:
- ldr r0, [pc, #272]
- bl sub_02003518
- cmp r0, #0
- beq.n .L_020019b8
- movs r3, #112
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_02003508
- cmp r6, #0
- beq.n .L_020019b8
- movs r1, #227
- movs r2, #130
- movs r0, #12
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_020035b2
-.L_020019b8:
- ldr r0, [pc, #228]
- bl sub_02003548
- cmp r0, #0
- beq.n .L_020019ea
- movs r3, #116
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_02003538
- cmp r6, #0
- beq.n .L_02001a1c
- movs r1, #231
- movs r2, #130
- movs r0, #13
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_020035e2
- b.n .L_02001a1c
-.L_020019ea:
- movs r0, #198
- lsls r0, r0, #2
- bl sub_0200357c
- cmp r0, #0
- beq.n .L_02001a1c
- movs r3, #116
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_0200356c
- cmp r6, #0
- beq.n .L_02001a1c
- movs r1, #235
- movs r2, #130
- movs r0, #13
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_02003616
-.L_02001a1c:
- ldr r0, [pc, #132]
- bl sub_020035ac
- cmp r0, #0
- beq.n .L_02001a4e
- movs r3, #120
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_0200359c
- cmp r6, #0
- beq.n .L_02001a7e
- movs r1, #239
- movs r2, #130
- movs r0, #14
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_02003646
- b.n .L_02001a7e
-.L_02001a4e:
- ldr r0, [pc, #88]
- bl sub_020035de
- cmp r0, #0
- beq.n .L_02001a7e
- movs r3, #120
- movs r2, #32
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #121
- movs r1, #20
- movs r2, #1
- movs r3, #1
- bl sub_020035ce
- cmp r6, #0
- beq.n .L_02001a7e
- movs r1, #243
- movs r2, #130
- movs r0, #14
- lsls r1, r1, #19
- lsls r2, r2, #18
- bl sub_02003678
-.L_02001a7e:
- add sp, #8
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00000311
- .4byte 0x00000313
- .4byte 0x00000312
- .4byte 0x00000315
- .4byte 0x00000317
- .4byte 0x00000316
- .4byte 0x00000319
- .4byte 0x0000031b
- .2byte 0x031a
- .2byte 0x0000
+AlchemyC_0200161c:
+ .space 0x1a4
+AlchemyC_020017c0:
+ .space 0x2ec
AlchemyC_02001aac:
.space 0x1c
push {r5, lr}
diff --git a/games/gs1/assets/code/resource_380_overlay.s b/games/gs1/assets/code/resource_380_overlay.s
index 1a1db0d32..18b478db0 100644
--- a/games/gs1/assets/code/resource_380_overlay.s
+++ b/games/gs1/assets/code/resource_380_overlay.s
@@ -1840,1681 +1840,20 @@ AlchemyC_02000388:
.4byte 0x00001075
.2byte 0x083c
.2byte 0x0000
- push {r5, r6, lr}
- mov r6, sl
- mov r5, r9
- push {r5, r6}
- mov r6, r8
- push {r6}
- sub sp, #8
- bl sub_020050a0
- movs r0, #141
- bl sub_0200521e
- movs r5, #0
-.L_0200070e:
- movs r1, #1
- ldr r0, [pc, #792]
- bl sub_020051e0
- movs r0, #8
- bl sub_020051f6
- movs r0, #8
- bl sub_020050b4
- movs r0, #128
- lsls r0, r0, #9
- movs r1, #1
- bl sub_020051f6
- movs r0, #8
- bl sub_0200520c
- movs r0, #8
- bl sub_020050ca
- cmp r5, #1
- bne.n .L_0200074c
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r0, r0, #9
- lsls r1, r1, #9
- lsls r2, r2, #9
- bl sub_02005056
-.L_0200074c:
- adds r5, #1
- cmp r5, #6
- bne.n .L_0200070e
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_0200506c
- movs r0, #30
- bl sub_020050fa
- movs r2, #0
- movs r0, #0
- movs r1, #0
- bl sub_0200507c
- ldr r0, [pc, #700]
- ldr r1, [pc, #700]
- bl sub_0200521c
- movs r0, #236
- movs r1, #1
- movs r2, #196
- movs r3, #1
- lsls r0, r0, #17
- negs r1, r1
- lsls r2, r2, #15
- bl sub_02005236
- bl sub_02005242
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_020050aa
- movs r0, #20
- bl sub_02005138
- movs r0, #144
- bl sub_020052be
- ldr r2, [pc, #648]
- mov sl, r2
- mov r0, sl
- movs r1, #84
- movs r2, #4
- bl sub_0200509c
- movs r3, #29
- mov r9, r3
- mov r2, r9
- movs r3, #4
- str r2, [sp, #0]
- str r3, [sp, #4]
- movs r0, #0
- movs r1, #0
- movs r2, #1
- movs r3, #1
- bl sub_020050c4
- movs r3, #2
- str r3, [sp, #4]
- movs r6, #1
- mov r8, r3
- movs r1, #42
- movs r3, #6
- movs r2, #29
- movs r0, #87
- str r6, [sp, #0]
- bl sub_020050d2
- movs r0, #40
- bl sub_02005180
- movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_02005102
- movs r1, #1
- movs r3, #1
- ldr r0, [pc, #572]
- negs r1, r1
- ldr r2, [pc, #572]
- bl sub_020052b0
- bl sub_020052bc
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_02005124
- movs r0, #20
- bl sub_020051b2
- movs r0, #144
- bl sub_02005338
- mov r0, sl
- movs r1, #76
- movs r2, #21
- bl sub_02005112
- movs r5, #21
- movs r0, #0
- movs r1, #0
- movs r2, #1
- movs r3, #1
- str r5, [sp, #0]
- str r5, [sp, #4]
- bl sub_02005134
- mov r2, r8
- str r2, [sp, #4]
- movs r3, #23
- movs r1, #42
- movs r2, #21
- movs r0, #87
- str r6, [sp, #0]
- bl sub_0200513e
- movs r0, #40
- bl sub_020051ec
- movs r2, #0
- movs r0, #0
- movs r1, #0
- bl sub_0200516e
- ldr r0, [pc, #476]
- ldr r1, [pc, #480]
- bl sub_0200530e
- movs r1, #1
- movs r3, #1
- ldr r0, [pc, #456]
- negs r1, r1
- ldr r2, [pc, #468]
- bl sub_02005324
- bl sub_02005330
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_02005198
- movs r0, #20
- bl sub_02005226
- movs r0, #144
- bl sub_020053ac
- mov r0, sl
- movs r1, #76
- movs r2, #29
- bl sub_02005186
- mov r3, r9
- str r3, [sp, #4]
- movs r0, #0
- movs r1, #0
- movs r2, #1
- movs r3, #1
- str r5, [sp, #0]
- bl sub_020051a8
- mov r2, r8
- str r2, [sp, #4]
- movs r1, #42
- movs r2, #21
- movs r3, #31
- movs r0, #87
- str r6, [sp, #0]
- bl sub_020051b2
- movs r0, #40
- bl sub_02005260
- ldr r3, [pc, #384]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #66
- str r2, [r3, #0]
- bl sub_020053ca
- bl sub_020053d6
- movs r0, #178
- movs r1, #1
- movs r2, #152
- movs r3, #0
- negs r1, r1
- lsls r2, r2, #16
- lsls r0, r0, #18
- bl sub_020053a0
- bl sub_020051cc
- movs r0, #1
- bl sub_02005162
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #9
- lsls r2, r2, #9
- lsls r0, r0, #10
- bl sub_0200521a
- bl sub_020053f6
- bl sub_0200540a
- movs r0, #40
- bl sub_020052b0
- ldr r0, [pc, #308]
- bl sub_02005436
- movs r0, #1
- movs r1, #1
- negs r1, r1
- ldr r2, [pc, #300]
- negs r0, r0
- bl sub_0200523c
- bl sub_02005248
- movs r0, #20
- bl sub_020052ce
- movs r3, #3
- str r3, [sp, #0]
- str r3, [sp, #4]
- movs r1, #40
- movs r2, #43
- movs r3, #46
- movs r0, #0
- bl sub_02005238
- movs r6, #178
- movs r0, #20
- bl sub_020052e8
- lsls r6, r6, #18
- movs r2, #128
- movs r3, #144
- lsls r3, r3, #16
- lsls r2, r2, #13
- adds r1, r6, #0
- movs r0, #221
- bl sub_02004bc6
- adds r5, r0, #0
- movs r0, #40
- bl sub_02005302
- adds r0, r5, #0
- movs r1, #1
- bl sub_0200529a
- ldr r5, [pc, #224]
- movs r1, #1
- adds r0, r5, #0
- bl sub_0200529c
- movs r1, #224
- movs r0, #9
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02005408
- movs r1, #224
- movs r0, #5
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02005414
- bl sub_02005488
- bl sub_02005494
- movs r0, #231
- movs r1, #1
- movs r2, #175
- movs r3, #0
- negs r1, r1
- lsls r2, r2, #17
- lsls r0, r0, #17
- bl sub_0200545e
- bl sub_0200528a
- movs r0, #1
- bl sub_02005220
- bl sub_020054a4
- bl sub_020054b8
- movs r0, #40
- bl sub_0200535e
- subs r5, #2
- movs r2, #30
- movs r1, #4
- movs r0, #9
- bl sub_020053f2
- adds r0, r5, #0
- bl sub_02005430
- movs r0, #9
- movs r1, #20
- bl sub_02004c2c
- bl sub_020054d4
- bl sub_020054e0
- movs r1, #1
- movs r2, #152
- negs r1, r1
- lsls r2, r2, #16
- movs r3, #0
- adds r0, r6, #0
- bl sub_020054a8
- bl sub_020052d4
- movs r0, #1
- bl sub_0200526a
- bl sub_020054ee
- bl sub_02005502
- ldr r0, [pc, #76]
- bl sub_02005380
- bl sub_020053bc
- add sp, #8
- pop {r3, r5, r6}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00404a4e
- .4byte 0x00059999
- .4byte 0x0000b333
- .4byte 0x0200d088
- .4byte 0x01570000
- .4byte 0x01710000
- .4byte 0x00033333
- .4byte 0x00006666
- .4byte 0x01f10000
- .4byte 0x03001ebc
- .4byte 0x00000121
- .4byte 0x0000e666
- .4byte 0x00001076
- .2byte 0x083d
- .2byte 0x0000
+AlchemyC_020006f4:
+ .space 0x370
AlchemyC_02000a64:
.space 0x34
- push {r5, r6, lr}
- mov r6, sl
- mov r5, r8
- push {r5, r6}
- movs r0, #141
- sub sp, #8
- bl sub_020055ba
- movs r5, #0
-.L_02000aaa:
- movs r1, #1
- ldr r0, [pc, #628]
- bl sub_0200557c
- movs r0, #8
- bl sub_02005592
- movs r0, #8
- bl sub_02005450
- movs r0, #128
- lsls r0, r0, #9
- movs r1, #1
- bl sub_02005592
- movs r0, #8
- bl sub_020055a8
- movs r0, #8
- bl sub_02005466
- cmp r5, #1
- bne.n .L_02000ae8
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r0, r0, #9
- lsls r1, r1, #9
- lsls r2, r2, #9
- bl sub_020053f2
-.L_02000ae8:
- adds r5, #1
- cmp r5, #6
- bne.n .L_02000aaa
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #9
- lsls r1, r1, #9
- lsls r0, r0, #10
- bl sub_02005408
- movs r0, #30
- bl sub_02005496
- ldr r0, [pc, #544]
- ldr r1, [pc, #548]
- bl sub_020055ae
- movs r0, #167
- movs r1, #1
- movs r3, #1
- lsls r0, r0, #16
- negs r1, r1
- ldr r2, [pc, #536]
- bl sub_020055c6
- bl sub_020055d2
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_0200543a
- movs r0, #20
- bl sub_020054c8
- movs r0, #144
- bl sub_0200564e
- ldr r2, [pc, #500]
- mov r8, r2
- mov r0, r8
- movs r1, #65
- movs r2, #31
- bl sub_0200542c
- movs r3, #10
- mov sl, r3
- mov r2, sl
- movs r3, #31
- str r2, [sp, #0]
- str r3, [sp, #4]
- movs r0, #0
- movs r1, #0
- movs r2, #1
- movs r3, #1
- bl sub_02005454
- movs r5, #1
- movs r3, #33
- movs r6, #2
- movs r1, #42
- movs r2, #10
- movs r0, #87
- str r5, [sp, #0]
- str r6, [sp, #4]
- bl sub_02005460
- movs r0, #40
- bl sub_0200550e
- movs r2, #0
- movs r0, #0
- movs r1, #0
- bl sub_02005490
- ldr r0, [pc, #432]
- ldr r1, [pc, #432]
- bl sub_02005630
- movs r1, #1
- movs r2, #177
- movs r3, #1
- ldr r0, [pc, #424]
- negs r1, r1
- lsls r2, r2, #16
- bl sub_02005648
- bl sub_02005654
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_020054bc
- movs r0, #20
- bl sub_0200554a
- movs r0, #144
- bl sub_020056d0
- mov r0, r8
- movs r1, #79
- movs r2, #9
- bl sub_020054aa
- movs r3, #24
- movs r2, #9
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #0
- movs r1, #0
- movs r2, #1
- movs r3, #1
- bl sub_020054ce
- movs r3, #11
- movs r1, #42
- movs r2, #24
- movs r0, #87
- str r5, [sp, #0]
- str r6, [sp, #4]
- bl sub_020054d6
- movs r0, #40
- bl sub_02005584
- movs r2, #0
- movs r0, #0
- movs r1, #0
- bl sub_02005506
- ldr r0, [pc, #296]
- ldr r1, [pc, #300]
- bl sub_020056a6
- movs r1, #1
- movs r2, #193
- movs r3, #1
- ldr r0, [pc, #312]
- negs r1, r1
- lsls r2, r2, #16
- bl sub_020056be
- bl sub_020056ca
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_02005532
- movs r0, #20
- bl sub_020055c0
- movs r0, #144
- bl sub_02005746
- mov r0, r8
- movs r1, #91
- movs r2, #10
- bl sub_02005520
- movs r3, #36
- str r3, [sp, #0]
- mov r3, sl
- str r3, [sp, #4]
- movs r0, #0
- movs r1, #0
- movs r2, #1
- movs r3, #1
- bl sub_02005544
- movs r1, #42
- movs r2, #36
- movs r3, #12
- movs r0, #87
- str r5, [sp, #0]
- str r6, [sp, #4]
- bl sub_0200554c
- movs r0, #40
- bl sub_020055fa
- ldr r3, [pc, #220]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #66
- str r2, [r3, #0]
- bl sub_02005764
- bl sub_02005770
- movs r0, #232
- movs r1, #1
- movs r3, #0
- negs r1, r1
- ldr r2, [pc, #196]
- lsls r0, r0, #16
- bl sub_02005738
- bl sub_02005564
- movs r0, #1
- bl sub_020054fa
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #9
- lsls r2, r2, #9
- lsls r0, r0, #10
- bl sub_020055b2
- bl sub_0200578e
- bl sub_020057a2
- movs r0, #40
- bl sub_02005648
- ldr r0, [pc, #152]
- bl sub_020057ce
- movs r0, #1
- movs r1, #1
- negs r1, r1
- ldr r2, [pc, #144]
- negs r0, r0
- bl sub_020055d4
- bl sub_020055e0
- movs r0, #20
- bl sub_02005666
- movs r3, #3
- str r3, [sp, #0]
- str r3, [sp, #4]
- movs r1, #40
- movs r2, #13
- movs r3, #66
- movs r0, #0
- bl sub_020055d0
- movs r0, #20
- bl sub_0200567e
- movs r1, #232
- movs r2, #128
- movs r3, #232
- lsls r2, r2, #13
- lsls r3, r3, #17
- lsls r1, r1, #16
- movs r0, #223
- bl sub_02004f5c
- adds r5, r0, #0
- movs r0, #40
- bl sub_02005698
- adds r0, r5, #0
- movs r1, #1
- bl sub_02005630
- ldr r0, [pc, #72]
- movs r1, #1
- bl sub_02005630
- add sp, #8
- pop {r3, r5}
- mov r8, r3
- mov sl, r5
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x004049d2
- .4byte 0x00026666
- .4byte 0x00004ccc
- .4byte 0x02110000
- .4byte 0x0200d088
- .4byte 0x00066666
- .4byte 0x0000cccc
- .4byte 0x01870000
- .4byte 0x02470000
- .4byte 0x03001ebc
- .4byte 0x01dd0000
- .4byte 0x00000121
- .4byte 0x0000e666
- .2byte 0x1077
- .2byte 0x0000
+AlchemyC_02000a98:
+ .space 0x2c4
AlchemyC_02000d5c:
.space 0x230
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r9
- mov r5, r8
- push {r5, r6, r7}
- movs r0, #61
- bl sub_02005aae
- movs r1, #4
- movs r0, #10
- bl sub_020059ae
- ldr r0, [pc, #1004]
- bl sub_020059fc
- movs r0, #10
- movs r1, #10
- bl sub_020051f8
- movs r0, #11
- movs r1, #4
- bl sub_020059c4
- movs r0, #11
- movs r1, #30
- bl sub_02005208
- movs r1, #129
- movs r0, #9
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02005a58
- movs r0, #9
- movs r1, #4
- movs r2, #10
- bl sub_020059f2
- movs r2, #30
- movs r0, #9
- movs r1, #6
- bl sub_020059fc
- movs r0, #9
- movs r1, #10
- bl sub_02005230
- movs r0, #10
- movs r1, #1
- bl sub_02005a1c
- movs r1, #176
- movs r2, #10
- movs r0, #10
- lsls r1, r1, #8
- bl sub_02005a78
- movs r0, #10
- movs r1, #20
- bl sub_0200524c
- movs r0, #11
- movs r1, #1
- bl sub_02005a38
- movs r1, #208
- movs r2, #20
- movs r0, #11
- lsls r1, r1, #8
- bl sub_02005a94
- movs r0, #11
- movs r1, #30
- bl sub_02005268
- movs r1, #129
- movs r0, #9
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02005ab8
- movs r0, #5
- movs r1, #0
- movs r2, #0
- bl sub_02005ab2
- movs r1, #224
- movs r0, #9
- lsls r1, r1, #7
- movs r2, #80
- bl sub_02005abe
- movs r1, #129
- movs r2, #40
- movs r0, #5
- lsls r1, r1, #1
- bl sub_02005ada
- movs r0, #5
- movs r1, #20
- bl sub_0200529e
- movs r0, #9
- movs r1, #2
- bl sub_02005a8a
- movs r0, #9
- movs r1, #4
- bl sub_02005a72
- movs r1, #10
- movs r0, #9
- bl sub_020052b6
- movs r0, #12
- bl sub_02005a30
- adds r6, r0, #0
- movs r0, #8
- bl sub_02005a38
- ldr r3, [r6, #80]
- movs r5, #0
- adds r3, #38
- strb r5, [r3, #0]
- mov r9, r3
- ldr r3, [pc, #780]
- movs r1, #128
- str r3, [r6, #24]
- str r3, [r6, #28]
- lsls r1, r1, #1
- str r3, [r0, #24]
- str r3, [r0, #28]
- mov r8, r0
- movs r0, #12
- bl sub_02005ae0
- movs r2, #145
- ldr r1, [pc, #760]
- movs r0, #12
- lsls r2, r2, #17
- bl sub_02005aac
- movs r2, #85
- movs r3, #160
- lsls r3, r3, #14
- adds r2, r2, r6
- strb r5, [r2, #0]
- movs r0, #1
- str r3, [r6, #12]
- mov sl, r2
- bl sub_02005a50
- movs r0, #12
- movs r1, #10
- bl sub_0200530c
- movs r1, #128
- movs r0, #5
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02005b5c
- movs r1, #128
- movs r0, #9
- lsls r1, r1, #1
- movs r2, #30
- bl sub_02005b68
- movs r1, #192
- movs r0, #5
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02005b64
- movs r1, #176
- movs r0, #9
- lsls r1, r1, #8
- movs r2, #10
- bl sub_02005b70
- movs r1, #208
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02005b7c
- movs r1, #176
- movs r2, #0
- movs r0, #10
- lsls r1, r1, #8
- bl sub_02005b88
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_02005bbc
- movs r1, #1
- movs r3, #1
- ldr r0, [pc, #636]
- negs r1, r1
- ldr r2, [pc, #636]
- bl sub_02005bd2
- bl sub_02005bde
- movs r2, #145
- ldr r1, [pc, #620]
- lsls r2, r2, #17
- movs r0, #8
- bl sub_02005b3a
- movs r0, #190
- bl sub_02005c50
- movs r0, #12
- movs r1, #2
- bl sub_02005bc8
- ldr r7, [pc, #604]
-.L_02001148:
- ldr r3, [r6, #12]
- ldr r2, [pc, #604]
- adds r3, r3, r2
- str r3, [r6, #12]
- ldr r3, [r6, #24]
- adds r3, r3, r7
- str r3, [r6, #24]
- ldr r3, [r6, #28]
- adds r3, r3, r7
- str r3, [r6, #28]
- mov r2, r8
- ldr r3, [r2, #24]
- adds r3, r3, r7
- str r3, [r2, #24]
- ldr r3, [r2, #28]
- adds r3, r3, r7
- str r3, [r2, #28]
- movs r0, #1
- adds r5, #1
- bl sub_02005b04
- cmp r5, #90
- bne.n .L_02001148
- movs r3, #5
- mov r2, sl
- strb r3, [r2, #0]
- movs r0, #80
- bl sub_02005b14
- movs r5, #0
-.L_02001184:
- ldr r3, [r6, #12]
- ldr r2, [pc, #548]
- adds r3, r3, r2
- str r3, [r6, #12]
- movs r0, #1
- adds r5, #1
- bl sub_02005b26
- cmp r5, #60
- bne.n .L_02001184
- movs r3, #3
- mov r2, sl
- strb r3, [r2, #0]
- movs r0, #30
- bl sub_02005b36
- movs r3, #1
- mov r2, r9
- strb r3, [r2, #0]
- movs r0, #8
- movs r2, #0
- movs r1, #0
- bl sub_02005bb6
- movs r1, #1
- movs r0, #12
- bl sub_02005c3e
- movs r0, #12
- bl sub_02005b7c
- adds r0, #35
- ldrb r3, [r0, #0]
- movs r5, #1
- orrs r5, r3
- strb r5, [r0, #0]
- movs r1, #0
- movs r0, #12
- bl sub_02005c16
- movs r1, #128
- movs r2, #128
- movs r0, #12
- lsls r1, r1, #8
- lsls r2, r2, #7
- bl sub_02005ba4
- movs r2, #153
- lsls r2, r2, #1
- ldr r1, [pc, #456]
- movs r0, #12
- bl sub_02005be0
- movs r0, #40
- bl sub_02005b86
- movs r0, #12
- movs r1, #2
- bl sub_02005c26
- ldr r0, [pc, #436]
- movs r1, #20
- bl sub_0200544a
- movs r2, #0
- movs r1, #9
- movs r0, #5
- bl sub_02005c48
- movs r0, #20
- bl sub_02005ba6
- movs r0, #5
- movs r1, #2
- bl sub_02005c3e
- movs r1, #2
- movs r0, #9
- bl sub_02005c4e
- movs r0, #40
- bl sub_02005bbc
- movs r0, #10
- movs r1, #1
- bl sub_02005c54
- movs r1, #1
- movs r0, #11
- bl sub_02005c64
- movs r0, #20
- bl sub_02005bd2
- movs r0, #10
- movs r1, #4
- bl sub_02005c5a
- movs r1, #160
- movs r0, #10
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02005cce
- movs r1, #160
- movs r2, #10
- movs r0, #11
- lsls r1, r1, #7
- bl sub_02005cda
- movs r0, #10
- movs r1, #30
- bl sub_020054ae
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #12
- bl sub_02005d04
- movs r0, #60
- bl sub_02005c0a
- movs r1, #1
- movs r0, #11
- bl sub_02005caa
- movs r0, #10
- bl sub_02005c18
- movs r0, #11
- movs r1, #30
- bl sub_020054d4
- movs r1, #208
- movs r2, #30
- movs r0, #11
- lsls r1, r1, #8
- bl sub_02005d14
- movs r1, #3
- movs r0, #11
- bl sub_02005cb4
- movs r0, #20
- bl sub_02005c3a
- movs r0, #11
- movs r1, #30
- bl sub_020054f6
- movs r1, #3
- movs r0, #12
- bl sub_02005cca
- movs r0, #20
- bl sub_02005c50
- movs r1, #160
- movs r0, #11
- lsls r1, r1, #7
- movs r2, #40
- bl sub_02005d44
- movs r1, #160
- movs r0, #9
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02005d50
- movs r1, #192
- movs r2, #20
- movs r0, #5
- lsls r1, r1, #7
- bl sub_02005d5c
- movs r1, #3
- movs r0, #10
- bl sub_02005cfc
- movs r0, #20
- bl sub_02005c82
- bl sub_02005dde
- bl sub_02005dea
- movs r0, #132
- movs r1, #1
- movs r2, #230
- lsls r2, r2, #17
- movs r3, #0
- negs r1, r1
- lsls r0, r0, #17
- bl sub_02005db4
- bl sub_02005be0
- movs r0, #1
- bl sub_02005b76
- bl sub_02005dfa
- bl sub_02005e0e
- movs r0, #40
- bl sub_02005cb4
- movs r0, #10
- movs r1, #40
- bl sub_02005570
- movs r0, #0
- movs r1, #3
- bl sub_02005d54
- movs r1, #3
- movs r0, #1
- bl sub_02005d64
- movs r0, #80
- bl sub_02005cd2
- movs r1, #0
- movs r0, #11
- bl sub_02005da2
- movs r0, #0
- movs r1, #0
- bl sub_02005d02
- cmp r0, #0
- beq.n .L_02001364
- ldr r3, [pc, #96]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02001364:
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_02005dd8
- bl sub_02005e5c
- bl sub_02005e68
- movs r1, #1
- movs r2, #167
- movs r3, #0
- lsls r2, r2, #17
- negs r1, r1
- ldr r0, [pc, #56]
- bl sub_02005e30
- bl sub_02005c5c
- movs r0, #1
- bl sub_02005bf2
- b.n .L_020013c0
- .2byte 0x0000
- .4byte 0x0000107d
- .4byte 0x00001999
- .4byte 0x01d70000
- .4byte 0x01350000
- .4byte 0x0000028f
- .4byte 0xffffe667
- .4byte 0xffff8000
- .4byte 0x000001d7
- .4byte 0x0000400c
- .4byte 0x03001ebc
- .2byte 0x0000
- .2byte 0x01dd
-.L_020013c0:
- bl sub_02005ea6
- bl sub_02005eba
- movs r0, #20
- bl sub_02005d60
- movs r0, #10
- movs r1, #2
- bl sub_02005e00
- movs r1, #176
- movs r2, #10
- lsls r1, r1, #8
- movs r0, #10
- bl sub_02005e5c
- ldr r0, [pc, #100]
- bl sub_02005e3a
- movs r0, #10
- movs r1, #20
- bl sub_02005636
- movs r1, #128
- movs r0, #5
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02005e76
- movs r1, #192
- movs r2, #10
- movs r0, #9
- lsls r1, r1, #6
- bl sub_02005e82
- movs r0, #9
- movs r1, #4
- bl sub_02005e1a
- ldr r0, [pc, #56]
- movs r1, #40
- bl sub_0200565e
- movs r0, #11
- movs r1, #1
- bl sub_02005e4a
- movs r0, #11
- movs r1, #10
- bl sub_0200566e
- movs r0, #5
- movs r1, #2
- bl sub_02005e52
- movs r0, #9
- movs r1, #2
- bl sub_02005e62
- pop {r3, r5, r6}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x0000108d
- .2byte 0x5009
- .2byte 0x0000
+AlchemyC_02000f8c:
+ .space 0x4c4
AlchemyC_02001450:
.space 0x33c
- push {r5, r6, r7, lr}
- movs r0, #161
- bl sub_020062a6
- movs r0, #12
- movs r1, #3
- bl sub_020061c6
- movs r0, #40
- bl sub_02006134
- movs r0, #12
- bl sub_02006162
- cmp r0, #0
- beq.n .L_020017b6
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #13
- bl sub_020061b8
-.L_020017b6:
- movs r1, #0
- movs r2, #0
- movs r0, #12
- bl sub_020061c2
- movs r0, #20
- bl sub_02006158
- movs r1, #192
- movs r2, #40
- movs r0, #13
-.L_020017cc:
- lsls r1, r1, #6
- bl sub_0200624c
- movs r0, #5
- movs r1, #3
- bl sub_02006204
- movs r1, #3
- movs r0, #5
- bl sub_0200620c
- movs r0, #40
- bl sub_0200617a
- movs r0, #5
- movs r1, #2
- bl sub_0200621a
- movs r0, #5
- movs r1, #20
- bl sub_02005a3e
- movs r1, #3
- movs r0, #13
- bl sub_02006212
- movs r0, #10
- bl sub_02006198
- movs r0, #5
- movs r1, #3
- bl sub_02006230
- movs r1, #128
- movs r2, #10
- movs r0, #9
- lsls r1, r1, #8
- bl sub_02006294
- movs r0, #9
- movs r1, #2
- bl sub_0200624c
- movs r0, #9
- movs r1, #40
- bl sub_02005a70
- movs r1, #3
- movs r0, #5
- bl sub_02006244
- movs r0, #40
- bl sub_020061ca
- movs r1, #176
- movs r2, #40
- movs r0, #9
- lsls r1, r1, #8
- bl sub_020062be
- movs r0, #13
- movs r1, #2
- bl sub_02006276
- movs r0, #13
- movs r1, #20
- bl sub_02005a9a
- movs r1, #1
- movs r0, #5
- bl sub_02006286
- movs r0, #40
- bl sub_020061f4
- movs r1, #3
- movs r0, #13
- bl sub_0200627c
- movs r0, #10
- bl sub_02006202
- movs r0, #13
- movs r1, #40
- bl sub_02005abe
- movs r0, #10
- movs r1, #1
- bl sub_020062a2
- movs r1, #3
- movs r0, #10
- bl sub_0200629a
- movs r0, #10
- bl sub_02006220
- movs r0, #10
- movs r1, #10
- bl sub_02005adc
- movs r0, #11
- movs r1, #1
- bl sub_020062c8
- movs r0, #11
- movs r1, #3
- bl sub_020062b0
- movs r0, #11
- movs r1, #80
- bl sub_02005af4
- movs r0, #13
- movs r1, #2
- bl sub_020062e0
- movs r0, #13
- movs r1, #40
- bl sub_02005b04
- movs r1, #2
- movs r0, #5
- bl sub_020062f0
- movs r0, #10
- bl sub_0200625e
- movs r0, #5
- movs r1, #10
- bl sub_02005b1a
- movs r0, #13
- movs r1, #2
- bl sub_020062fe
- movs r1, #2
- movs r0, #9
- bl sub_0200630e
- movs r0, #80
- bl sub_0200627c
- movs r1, #4
- movs r0, #5
- bl sub_02006304
- movs r0, #20
- bl sub_0200628a
- movs r0, #5
- movs r1, #80
- bl sub_02005b46
- movs r0, #13
- movs r1, #4
- bl sub_0200631a
- movs r0, #13
- movs r1, #80
- bl sub_02005b56
- movs r1, #2
- movs r0, #5
- bl sub_02006342
- movs r0, #4
- bl sub_020062b0
- movs r0, #5
- movs r1, #20
- bl sub_02005b6c
- movs r0, #10
- movs r1, #1
- bl sub_02006358
- movs r0, #10
- movs r1, #3
- bl sub_02006340
- movs r0, #10
- movs r1, #10
- bl sub_02005b84
- movs r0, #11
- movs r1, #1
- bl sub_02006370
- movs r0, #11
- movs r1, #10
- bl sub_02005b94
- movs r0, #10
- movs r1, #1
- bl sub_02006380
- movs r0, #10
- movs r1, #10
- bl sub_02005ba4
- movs r1, #192
- movs r0, #9
- lsls r1, r1, #6
- movs r2, #80
- bl sub_020063e4
- movs r2, #80
- movs r0, #9
- ldr r1, [pc, #884]
- bl sub_020063fe
- movs r0, #11
- movs r1, #1
- bl sub_020063a6
- movs r1, #160
- movs r2, #40
- movs r0, #11
- lsls r1, r1, #7
- bl sub_02006402
- movs r0, #11
- movs r1, #2
- bl sub_020063b2
- movs r0, #11
- movs r1, #20
- bl sub_02005bde
- bl sub_02006486
- bl sub_02006492
- movs r1, #1
- movs r2, #233
- movs r3, #0
- negs r1, r1
- lsls r2, r2, #17
- ldr r0, [pc, #828]
- bl sub_0200645a
- bl sub_02006286
- movs r0, #1
- bl sub_0200621c
- bl sub_020064a0
- bl sub_020064b4
- movs r0, #20
- bl sub_0200635a
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200644e
- movs r1, #176
- movs r2, #20
- movs r0, #1
- lsls r1, r1, #8
- bl sub_0200645a
- movs r0, #0
- movs r1, #2
- bl sub_0200640a
- movs r0, #1
- movs r1, #2
- bl sub_0200641a
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #8
- lsls r2, r2, #7
- bl sub_020063c0
- movs r1, #128
-.L_02001a00:
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #8
- lsls r2, r2, #7
- bl sub_020063ce
- movs r2, #239
- movs r0, #0
- movs r1, #244
- lsls r2, r2, #1
- bl sub_02006402
- movs r1, #130
- movs r2, #245
- lsls r2, r2, #1
- lsls r1, r1, #1
- movs r0, #1
- bl sub_02006418
- movs r0, #0
- bl sub_02006426
- movs r0, #0
- movs r1, #1
- bl sub_0200643e
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_020064ba
- movs r1, #176
- movs r2, #20
- movs r0, #1
- lsls r1, r1, #8
- bl sub_020064c6
- movs r0, #0
- movs r1, #2
- bl sub_0200647e
- movs r1, #4
- movs r0, #1
- bl sub_0200646e
- movs r0, #20
- bl sub_020063f4
- movs r0, #1
- bl sub_020063a2
- ldr r4, [pc, #640]
- movs r5, #0
- adds r0, #216
- movs r1, #14
-.L_02001a70:
- ldrh r3, [r0, #0]
- adds r2, r4, #0
- ands r2, r3
- adds r3, r2, #0
- subs r3, #220
- adds r0, #2
- cmp r3, #1
- bls.n .L_02001a84
- cmp r2, #223
- bne.n .L_02001a86
-.L_02001a84:
- adds r5, #1
-.L_02001a86:
- subs r1, #1
- cmp r1, #0
- bge.n .L_02001a70
- movs r1, #0
- movs r0, #1
- bl sub_020064ee
- movs r0, #0
- movs r1, #0
- bl sub_0200644e
- cmp r0, #0
- bne.n .L_02001af8
- ldr r6, [pc, #588]
- adds r0, r6, #0
- bl sub_020064fa
- movs r0, #1
- movs r1, #3
- bl sub_020064c2
- movs r0, #10
- bl sub_02006448
- cmp r5, #2
- bgt.n .L_02001ae8
- movs r0, #1
- movs r1, #30
- bl sub_02005d08
- movs r2, #243
- lsls r2, r2, #1
- movs r0, #1
- movs r1, #252
- bl sub_020064c0
- movs r1, #2
- movs r0, #1
- bl sub_02006500
- movs r0, #10
- bl sub_0200646e
- adds r0, r6, #1
- movs r1, #1
- movs r2, #0
- bl sub_02006410
- b.n .L_02001bdc
-.L_02001ae8:
- ldr r0, [pc, #520]
- bl sub_02006540
- movs r0, #1
- movs r1, #30
- bl sub_02005d3c
- b.n .L_02001bdc
-.L_02001af8:
- cmp r5, #2
- bgt.n .L_02001baa
- ldr r6, [pc, #504]
- adds r0, r6, #0
- bl sub_02006556
- movs r0, #1
- movs r1, #3
- bl sub_02006536
- movs r0, #1
- movs r1, #4
- bl sub_02006526
- movs r0, #1
- movs r1, #10
- bl sub_02005d62
- movs r0, #1
- movs r1, #4
- bl sub_02006536
- movs r0, #1
- movs r1, #1
- bl sub_02006556
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- movs r0, #1
- bl sub_020064fc
- movs r0, #0
- bl sub_020064fa
- adds r7, r0, #0
- adds r5, r7, #0
- adds r5, #90
- ldrb r2, [r5, #0]
- movs r3, #254
- ands r3, r2
- movs r2, #239
- strb r3, [r5, #0]
- movs r0, #1
- movs r1, #244
- lsls r2, r2, #1
- bl sub_0200654c
- movs r1, #192
- movs r2, #192
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200652a
- movs r0, #0
- movs r1, #6
- movs r2, #0
- bl sub_0200658c
- movs r1, #218
- ldr r2, [pc, #388]
- movs r0, #0
- bl sub_02006556
- adds r6, #1
- movs r0, #0
- bl sub_0200657e
- movs r2, #0
- adds r0, r6, #0
- movs r1, #1
- bl sub_020064b8
- movs r0, #0
- movs r1, #2
- bl sub_020065c0
- movs r2, #30
- movs r0, #0
- movs r1, #0
- bl sub_0200661a
- ldrb r2, [r5, #0]
- movs r3, #1
- orrs r3, r2
- strb r3, [r5, #0]
- b.n .L_02001bdc
-.L_02001baa:
- ldr r0, [pc, #340]
- bl sub_02006602
- movs r0, #1
- movs r1, #3
- bl sub_020065e2
- movs r0, #1
- movs r1, #4
- bl sub_020065d2
- movs r0, #1
- movs r1, #10
- bl sub_02005e0e
- movs r0, #1
- movs r1, #4
- bl sub_020065e2
- movs r1, #224
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #30
- bl sub_02006656
-.L_02001bdc:
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #8
- lsls r1, r1, #5
- bl sub_0200668a
- movs r0, #1
- movs r1, #1
- bl sub_0200668a
- bl sub_020066a6
- movs r1, #128
- movs r2, #30
- movs r0, #1
- lsls r1, r1, #8
- bl sub_0200667a
- movs r0, #1
- movs r1, #2
- bl sub_02006632
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #8
- lsls r2, r2, #7
- movs r0, #1
- bl sub_020065d8
- movs r0, #1
- bl sub_020065d6
- adds r7, r0, #0
- adds r5, r7, #0
- adds r5, #90
- ldrb r2, [r5, #0]
- movs r3, #254
- ands r3, r2
- movs r1, #132
- movs r2, #241
- strb r3, [r5, #0]
- movs r0, #1
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_0200662a
- ldrb r2, [r5, #0]
- movs r3, #1
- orrs r3, r2
- movs r1, #139
- movs r2, #240
- lsls r2, r2, #1
- strb r3, [r5, #0]
- lsls r1, r1, #1
- movs r0, #1
- bl sub_02006640
- movs r3, #192
- lsls r3, r3, #10
- str r3, [r7, #48]
- movs r3, #128
- lsls r3, r3, #10
- movs r5, #192
- str r3, [r7, #52]
- lsls r5, r5, #11
- movs r0, #153
- bl sub_02006776
- str r5, [r7, #40]
- movs r0, #1
- movs r1, #7
- bl sub_02006678
- movs r1, #156
- movs r2, #235
- lsls r2, r2, #1
- movs r0, #1
- lsls r1, r1, #1
- bl sub_0200665e
- movs r1, #1
- movs r0, #1
- bl sub_0200668e
- movs r0, #30
- bl sub_0200661c
- movs r0, #153
- bl sub_020067a2
- str r5, [r7, #40]
- movs r0, #1
- movs r1, #7
- bl sub_020066a4
- movs r1, #171
- movs r2, #235
- lsls r2, r2, #1
- movs r0, #1
- lsls r1, r1, #1
- bl sub_0200668a
- movs r1, #1
- movs r0, #1
- bl sub_020066ba
- movs r0, #30
- bl sub_02006648
- movs r0, #153
- bl sub_020067ce
- str r5, [r7, #40]
- movs r0, #1
- movs r1, #7
- bl sub_020066d0
- movs r1, #188
- movs r2, #235
- movs r0, #1
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_020066b6
- movs r0, #1
- movs r1, #1
- bl sub_020066e6
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00000105
- .4byte 0x01050000
- .4byte 0x000001ff
- .4byte 0x000010b0
- .4byte 0x000010b4
- .4byte 0x000010b2
- .4byte 0x000001d7
- .2byte 0x10b5
- .2byte 0x0000
+AlchemyC_0200178c:
+ .space 0x578
AlchemyC_02001d04:
.space 0x578
push {r5, r6, lr}
diff --git a/games/gs1/assets/code/resource_381_overlay.s b/games/gs1/assets/code/resource_381_overlay.s
index 605b6a460..89ef78a39 100644
--- a/games/gs1/assets/code/resource_381_overlay.s
+++ b/games/gs1/assets/code/resource_381_overlay.s
@@ -944,1392 +944,8 @@ AlchemyC_02000044:
.space 0x8
AlchemyC_0200004c:
.space 0x8
- push {r5, r6, r7, lr}
- ldr r5, [pc, #884]
- ldr r7, [r5, #0]
- bl sub_02003530
- ldr r2, [pc, #880]
- movs r3, #0
- adds r6, r7, r2
- str r3, [r6, #0]
- movs r0, #141
- bl sub_0200368e
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r0, r0, #9
- lsls r1, r1, #9
- lsls r2, r2, #9
- bl sub_0200350e
- movs r1, #232
- movs r2, #156
- movs r0, #0
- lsls r1, r1, #16
- lsls r2, r2, #16
- bl sub_020035bc
- movs r1, #218
- movs r2, #172
- movs r0, #1
- lsls r1, r1, #16
- lsls r2, r2, #16
- bl sub_020035ca
- movs r1, #176
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200363e
- movs r1, #208
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200364a
- movs r2, #166
- movs r0, #5
- ldr r1, [pc, #796]
- lsls r2, r2, #17
- bl sub_020035ee
- movs r2, #166
- movs r0, #9
- ldr r1, [pc, #788]
- lsls r2, r2, #17
- bl sub_020035fa
- movs r2, #174
- movs r0, #11
- ldr r1, [pc, #780]
- lsls r2, r2, #17
- bl sub_02003606
- movs r2, #174
- movs r0, #10
- ldr r1, [pc, #772]
- lsls r2, r2, #17
- bl sub_02003612
- movs r2, #153
- movs r0, #13
- ldr r1, [pc, #764]
- lsls r2, r2, #17
- bl sub_0200361e
- movs r2, #181
- lsls r2, r2, #17
- movs r0, #14
- ldr r1, [pc, #756]
- bl sub_0200362a
- movs r0, #15
- movs r1, #1
- bl sub_020036a2
- movs r0, #232
- movs r1, #1
- movs r2, #156
- lsls r0, r0, #16
- negs r1, r1
- lsls r2, r2, #16
- movs r3, #0
- subs r5, #8
- bl sub_020036d6
- bl sub_0200357a
- ldr r3, [r5, #0]
- movs r2, #228
- lsls r2, r2, #1
- adds r3, r3, r2
- movs r2, #8
- str r2, [r3, #0]
- bl sub_02003722
- bl sub_0200372e
- movs r1, #0
- ldr r0, [pc, #700]
- bl sub_0200371e
- movs r0, #4
- bl sub_0200372c
- movs r0, #4
- bl sub_0200360a
- movs r0, #128
- movs r1, #0
- lsls r0, r0, #9
- bl sub_02003734
- movs r0, #4
- bl sub_02003742
- movs r0, #4
- bl sub_02003620
- bl sub_020010bc
- movs r1, #0
- ldr r0, [pc, #652]
- bl sub_0200374c
- movs r0, #4
- bl sub_0200375a
- movs r0, #16
- bl sub_02003638
- movs r0, #144
- bl sub_02003796
- movs r0, #128
- movs r1, #0
- lsls r0, r0, #9
- bl sub_02003768
- movs r0, #4
- bl sub_02003776
- movs r0, #4
- bl sub_02003654
- movs r1, #0
- ldr r0, [pc, #604]
- bl sub_0200377c
- movs r0, #4
- bl sub_0200378a
- movs r0, #4
- bl sub_02003668
- movs r0, #144
- bl sub_020037c6
- movs r0, #128
- movs r1, #0
- lsls r0, r0, #9
- bl sub_02003798
- movs r0, #48
- bl sub_020037a6
- movs r0, #48
- bl sub_02003684
- movs r0, #0
- movs r1, #6
- movs r2, #0
- bl sub_0200370e
- movs r0, #1
- movs r1, #6
- movs r2, #20
- bl sub_02003718
- movs r0, #1
- movs r1, #20
- movs r2, #20
- bl .L_02002f1e
- movs r1, #20
- movs r2, #40
- movs r0, #0
- bl sub_02002f28
- ldr r0, [pc, #524]
- bl sub_02003762
- movs r2, #20
- movs r0, #11
- movs r1, #0
- bl sub_02003784
- movs r0, #10
- movs r1, #0
- bl sub_02003784
- movs r0, #1
- movs r1, #20
- movs r2, #0
- bl .L_02002f4a
- movs r0, #5
- movs r1, #0
- movs r2, #20
- bl sub_020037a0
- movs r0, #0
- movs r1, #20
- movs r2, #0
- bl .L_02002f5e
- movs r0, #14
- movs r1, #0
- movs r2, #20
- bl sub_020037b4
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_020037be
- movs r2, #0
- movs r1, #1
- movs r0, #0
- bl sub_02003798
- movs r0, #40
- bl sub_02003706
- movs r0, #0
- movs r1, #2
- bl sub_02003796
- movs r1, #2
- movs r0, #1
- bl sub_020037a6
- movs r0, #20
- bl sub_0200371c
- movs r1, #176
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020037f8
- movs r1, #208
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #30
- bl sub_02003804
- movs r2, #0
- movs r0, #1
- movs r1, #20
- bl .L_02002fba
- movs r0, #0
- movs r1, #2
- bl sub_020037ce
- movs r1, #2
- movs r0, #1
- bl sub_020037de
- movs r0, #20
- bl sub_02003754
- movs r2, #20
- movs r1, #20
- movs r0, #0
- bl .L_02002fda
- movs r0, #15
- bl sub_02003784
- movs r1, #0
- bl sub_02003722
- movs r2, #151
- ldr r1, [pc, #336]
- lsls r2, r2, #17
- movs r0, #15
- bl sub_020037de
- movs r0, #15
- bl sub_0200379c
- adds r2, r0, #0
- adds r2, #85
- movs r3, #5
- strb r3, [r2, #0]
- movs r3, #1
- str r3, [r6, #0]
- ldr r0, [pc, #312]
- bl sub_020038e6
- movs r0, #1
- movs r1, #1
- negs r1, r1
- ldr r2, [pc, #304]
- negs r0, r0
- bl sub_02003764
- bl sub_02003770
- movs r0, #150
- bl sub_020037a6
- movs r2, #20
- movs r0, #11
- movs r1, #0
- bl sub_02003878
- movs r0, #5
- movs r1, #0
- bl sub_02003878
- movs r0, #10
- movs r1, #0
- movs r2, #10
- bl sub_0200388a
- movs r0, #0
- movs r1, #1
- movs r2, #20
- bl sub_02003864
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_020038a8
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #6
- movs r2, #10
- bl sub_020038b4
- movs r2, #166
- movs r0, #5
- ldr r1, [pc, #180]
- lsls r2, r2, #17
- bl sub_02003858
- movs r2, #166
- movs r0, #9
- ldr r1, [pc, #172]
- lsls r2, r2, #17
- bl sub_02003864
- movs r2, #174
- movs r0, #11
- ldr r1, [pc, #164]
- lsls r2, r2, #17
- bl sub_02003870
- movs r2, #174
- movs r0, #10
- ldr r1, [pc, #156]
- lsls r2, r2, #17
- bl sub_0200387c
- movs r2, #153
- movs r0, #13
- ldr r1, [pc, #148]
- lsls r2, r2, #17
- bl sub_02003888
- movs r2, #181
- lsls r2, r2, #17
- movs r0, #14
- ldr r1, [pc, #136]
- bl sub_02003894
- ldr r0, [pc, #156]
- ldr r1, [pc, #156]
- bl sub_02003924
- movs r0, #164
- movs r1, #1
- ldr r2, [pc, #152]
- movs r3, #1
- negs r1, r1
- lsls r0, r0, #17
- bl sub_0200393c
- bl sub_02003948
- movs r0, #167
- bl sub_020039a6
- movs r1, #2
- ldr r0, [pc, #132]
- bl sub_02003976
- movs r0, #20
- bl sub_02003984
- movs r0, #20
- bl sub_0200377a
- movs r0, #128
- movs r1, #2
- lsls r0, r0, #9
- bl sub_0200398c
- movs r0, #20
- bl sub_0200399a
- movs r0, #200
- bl sub_02003878
- movs r1, #0
- ldr r0, [pc, #92]
- bl sub_02003938
- movs r0, #0
- movs r1, #0
- bl sub_020038a0
- cmp r0, #0
- bne.n .L_02000418
- ldr r0, [pc, #80]
- bl sub_02003942
- b.n .L_0200041e
- .2byte 0x0000
- .4byte 0x03001ec4
- .4byte 0x0000040c
- .4byte 0x01db0000
- .4byte 0x01eb0000
- .4byte 0x01cb0000
- .4byte 0x01fb0000
- .4byte 0x01d70000
- .4byte 0x01df0000
- .4byte 0x00007fff
- .4byte 0x000010cd
- .4byte 0x01450000
- .4byte 0x00000121
- .4byte 0x0000e666
- .4byte 0x00066666
- .4byte 0x0000cccc
- .4byte 0x012b0000
- .4byte 0x00205294
- .4byte 0x00001001
- .2byte 0x10d6
- .2byte 0x0000
-.L_02000418:
- ldr r0, [pc, #1016]
- bl sub_02003998
-.L_0200041e:
- movs r1, #0
- movs r2, #80
- ldr r0, [pc, #1012]
- bl sub_020039ba
- ldr r0, [pc, #1008]
- bl sub_020039a8
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_020039ca
- movs r1, #20
- movs r2, #0
- movs r0, #1
- bl .L_02003188
- ldr r3, [pc, #988]
- adds r5, r7, r3
- movs r3, #0
- str r3, [r5, #0]
- movs r0, #141
- bl sub_02003a72
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #9
- bl sub_020038f2
- movs r0, #80
- bl sub_02003930
- movs r3, #1
- str r3, [r5, #0]
- ldr r0, [pc, #952]
- bl sub_02003a92
- movs r0, #1
- movs r1, #1
- negs r0, r0
- negs r1, r1
- ldr r2, [pc, #940]
- bl sub_02003910
- bl sub_0200391c
- movs r0, #0
- movs r1, #20
- movs r2, #60
- bl .L_020031d2
- movs r0, #14
- movs r1, #0
- movs r2, #30
- bl sub_02003a28
- movs r1, #160
- movs r0, #15
- lsls r1, r1, #8
- movs r2, #40
- bl sub_02003a3c
- movs r0, #1
- movs r1, #20
- movs r2, #20
- bl .L_020031f2
- movs r0, #0
- movs r1, #20
- movs r2, #20
- bl .L_020031fc
- ldr r0, [pc, #864]
- movs r1, #0
- movs r2, #30
- bl sub_02003a52
- movs r1, #128
- movs r0, #15
- lsls r1, r1, #5
- movs r2, #40
- bl sub_02003a66
- movs r0, #1
- movs r1, #20
- movs r2, #20
- bl .L_0200321c
- movs r0, #0
- movs r1, #20
- movs r2, #20
- bl .L_02003226
- movs r2, #30
- movs r0, #5
- movs r1, #0
- bl sub_02003a7c
- bl .L_02001570
- movs r1, #200
- lsls r1, r1, #4
- ldr r0, [pc, #824]
- bl sub_020038e2
- movs r1, #200
- lsls r1, r1, #4
- ldr r0, [pc, #816]
- bl sub_020038ec
- movs r0, #240
- bl sub_020039d2
- movs r0, #10
- movs r1, #0
- movs r2, #30
- bl sub_02003aa4
- movs r2, #166
- movs r0, #5
- ldr r1, [pc, #796]
- lsls r2, r2, #17
- bl sub_02003a50
- movs r2, #166
- movs r0, #9
- ldr r1, [pc, #788]
- lsls r2, r2, #17
- bl sub_02003a5c
- movs r2, #174
- movs r0, #11
- ldr r1, [pc, #780]
- lsls r2, r2, #17
- bl sub_02003a68
- movs r2, #174
- movs r0, #10
- ldr r1, [pc, #772]
- lsls r2, r2, #17
- bl sub_02003a74
- movs r2, #153
- movs r0, #13
- ldr r1, [pc, #764]
- lsls r2, r2, #17
- bl sub_02003a80
- movs r2, #181
- movs r0, #14
- ldr r1, [pc, #756]
- lsls r2, r2, #17
- bl sub_02003a8c
- movs r1, #128
- movs r0, #5
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003b00
- movs r1, #128
- movs r0, #9
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003b0c
- movs r1, #128
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003b18
- movs r1, #128
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003b24
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003b30
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #14
- bl sub_02003b3c
- movs r0, #5
- bl sub_02003a92
- adds r2, r0, #0
- movs r3, #10
- ldrsh r0, [r2, r3]
- movs r3, #18
- ldrsh r2, [r2, r3]
- movs r1, #1
- movs r3, #1
- lsls r2, r2, #16
- negs r1, r1
- lsls r0, r0, #16
- bl sub_02003b82
- bl sub_02003b8e
- movs r0, #40
- bl sub_02003a94
- movs r1, #2
- movs r0, #13
- bl sub_02003b2c
- movs r0, #20
- bl sub_02003aa2
- movs r0, #13
- movs r1, #0
- bl sub_02003b6a
- movs r0, #11
- movs r1, #2
- bl sub_02003b42
- movs r2, #10
- movs r0, #11
- movs r1, #0
- bl sub_02003b84
- movs r0, #14
- movs r1, #4
- bl sub_02003b34
- movs r0, #14
- movs r1, #0
- movs r2, #20
- bl sub_02003b96
- movs r2, #40
- movs r0, #10
- movs r1, #11
- bl sub_02003b70
- movs r0, #10
- movs r1, #4
- bl sub_02003b50
- movs r0, #10
- movs r1, #0
- movs r2, #10
- bl sub_02003bb2
- movs r1, #128
- movs r0, #5
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02003bd6
- movs r1, #192
- movs r0, #5
- lsls r1, r1, #6
- movs r2, #40
- bl sub_02003bd2
- ldr r0, [pc, #528]
- movs r1, #0
- movs r2, #10
- bl sub_02003bd4
- movs r1, #176
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003be8
- movs r1, #208
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #40
- bl sub_02003bf4
- movs r0, #10
- movs r1, #11
- movs r2, #40
- bl sub_02003bc6
- movs r0, #10
- ldr r1, [pc, #488]
- movs r2, #40
- bl sub_02003c18
- movs r1, #176
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #10
- bl sub_02003c14
- movs r0, #10
- movs r1, #0
- movs r2, #10
- bl sub_02003c16
- movs r1, #128
- movs r2, #10
- movs r0, #10
- lsls r1, r1, #8
- bl sub_02003c2a
- movs r0, #11
- movs r1, #2
- bl sub_02003bf2
- movs r2, #10
- movs r0, #11
- movs r1, #0
- bl sub_02003c34
- movs r0, #10
- movs r1, #3
- bl sub_02003be4
- movs r0, #10
- movs r1, #0
- movs r2, #40
- bl sub_02003c46
- movs r1, #176
- movs r2, #60
- movs r0, #14
- lsls r1, r1, #8
- bl sub_02003c5a
- movs r0, #14
- movs r1, #3
- bl sub_02003c0a
- movs r0, #14
- movs r1, #0
- movs r2, #10
- bl sub_02003c64
- movs r1, #192
- movs r0, #13
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02003c78
- movs r1, #192
- movs r0, #5
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02003c84
- movs r1, #160
- movs r0, #9
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02003c90
- movs r1, #192
- movs r0, #11
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02003c9c
- movs r1, #160
- movs r0, #10
- lsls r1, r1, #7
- movs r2, #20
- bl sub_02003ca8
- movs r1, #208
- movs r2, #20
- movs r0, #14
- lsls r1, r1, #8
- bl sub_02003cb4
- movs r0, #14
- movs r1, #4
- bl sub_02003c64
- movs r0, #14
- movs r1, #0
- movs r2, #10
- bl sub_02003cbe
- movs r0, #13
- ldr r1, [pc, #292]
- movs r2, #0
- bl sub_02003ce0
- movs r1, #128
- movs r2, #128
- movs r0, #13
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02003c3e
- movs r2, #157
- lsls r2, r2, #1
- movs r0, #13
- ldr r1, [pc, #268]
- bl sub_02003c72
- movs r0, #13
- movs r1, #3
- bl sub_02003caa
- movs r0, #13
- movs r1, #0
- movs r2, #10
- bl sub_02003cf4
- movs r1, #176
- movs r2, #10
- movs r0, #14
- lsls r1, r1, #8
- bl sub_02003d08
- movs r0, #14
- movs r1, #4
- bl sub_02003cb0
- movs r2, #10
- movs r0, #14
- movs r1, #0
- bl sub_02003d12
- movs r0, #13
- movs r1, #3
- bl sub_02003cda
- movs r2, #10
- movs r0, #13
- movs r1, #0
- bl sub_02003d24
- movs r0, #9
- movs r1, #2
- bl sub_02003cf4
- ldr r0, [pc, #192]
- movs r1, #0
- movs r2, #10
- bl sub_02003d36
- movs r1, #176
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02003d4a
- movs r0, #10
- movs r1, #0
- movs r2, #30
- bl sub_02003d4c
- movs r2, #20
- movs r0, #11
- movs r1, #0
- bl sub_02003d5e
- movs r1, #2
- movs r0, #11
- bl sub_02003d26
- movs r0, #30
- bl sub_02003c9c
- movs r1, #3
- movs r0, #11
- bl sub_02003d1c
- movs r0, #30
- bl sub_02003caa
- movs r1, #208
- movs r2, #30
- movs r0, #11
- lsls r1, r1, #8
- bl sub_02003d86
- movs r1, #4
- movs r0, #11
- bl sub_02003d36
- movs r0, #10
- bl sub_02003cc4
- movs r0, #11
- movs r1, #0
- movs r2, #10
- bl sub_02003d96
- movs r1, #160
- movs r2, #20
- movs r0, #13
- lsls r1, r1, #7
- bl sub_02003daa
- movs r1, #2
- b.n .L_02000860
- .4byte 0x000010d7
- .4byte 0x00001001
- .4byte 0x000010d8
- .4byte 0x0000040c
- .4byte 0x00000121
- .4byte 0x0000e666
- .4byte 0x020090c5
- .4byte 0x0200935d
- .4byte 0x01db0000
- .4byte 0x01eb0000
- .4byte 0x01cb0000
- .4byte 0x01fb0000
- .4byte 0x01d70000
- .4byte 0x01df0000
- .4byte 0x00004005
- .4byte 0x00000105
- .4byte 0x00000103
- .4byte 0x000001d7
- .2byte 0x4009
- .2byte 0x0000
-.L_02000860:
- movs r0, #13
- bl sub_02003dc0
- movs r0, #20
- bl sub_02003d36
- movs r2, #0
- movs r1, #11
- movs r0, #10
- bl sub_02003dd8
- movs r0, #30
- bl sub_02003d46
- movs r0, #10
- movs r1, #3
- bl sub_02003dbe
- movs r0, #11
- movs r1, #3
- bl sub_02003dce
- movs r1, #208
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003e32
- movs r1, #176
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #10
- bl sub_02003e3e
- movs r0, #40
- bl sub_02003d74
- movs r1, #1
- movs r0, #13
- bl sub_02003e0c
- movs r0, #30
- bl sub_02003d82
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #13
- bl sub_02003e5e
- movs r0, #40
- bl sub_02003d94
- movs r1, #129
- lsls r1, r1, #1
- movs r2, #0
- movs r0, #13
- bl sub_02003e80
- movs r0, #60
- bl sub_02003da6
- movs r1, #176
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #14
- bl sub_02003e82
- movs r0, #30
- bl sub_02003db8
- movs r0, #14
- movs r1, #4
- bl sub_02003e38
- ldr r0, [pc, #1012]
- movs r1, #0
- movs r2, #30
- bl sub_02003e92
- movs r1, #176
- movs r0, #9
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003ea6
- movs r1, #176
- movs r0, #5
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003eb2
- movs r1, #192
- movs r0, #13
- lsls r1, r1, #6
- movs r2, #20
- bl sub_02003ebe
- movs r1, #129
- movs r0, #5
- lsls r1, r1, #1
- movs r2, #40
- bl sub_02003eda
- ldr r0, [pc, #956]
- movs r1, #0
- movs r2, #40
- bl sub_02003ecc
- movs r2, #60
- movs r0, #13
- ldr r1, [pc, #948]
- bl sub_02003eee
- movs r0, #13
- movs r1, #3
- bl sub_02003e8e
- movs r0, #10
- ldr r1, [pc, #936]
- movs r2, #0
- bl sub_02003f00
- movs r2, #60
- movs r0, #11
- ldr r1, [pc, #924]
- bl sub_02003f0a
- movs r0, #14
- movs r1, #2
- bl sub_02003ec2
- movs r2, #60
- movs r0, #14
- movs r1, #0
- bl sub_02003f04
- movs r1, #3
- movs r0, #13
- bl sub_02003ebc
- movs r0, #40
- bl sub_02003e4a
- movs r1, #129
- movs r0, #5
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02003f36
- movs r1, #129
- movs r0, #9
- lsls r1, r1, #1
- movs r2, #40
- bl sub_02003f42
- movs r2, #20
- movs r0, #10
- movs r1, #11
- bl sub_02003f04
- movs r0, #10
- movs r1, #3
- bl sub_02003ee4
- movs r1, #3
- movs r0, #11
- bl sub_02003ef4
- movs r0, #20
- bl sub_02003e82
- movs r0, #10
- ldr r1, [pc, #832]
- ldr r2, [pc, #832]
- bl sub_02003ebc
- movs r0, #11
- ldr r1, [pc, #820]
- ldr r2, [pc, #824]
- bl sub_02003ec6
- movs r2, #174
- movs r0, #11
- ldr r1, [pc, #816]
- lsls r2, r2, #1
- bl sub_02003ef2
- movs r2, #174
- lsls r2, r2, #1
- ldr r1, [pc, #808]
- movs r0, #10
- bl sub_02003efe
- movs r0, #11
- bl sub_02003f14
- movs r0, #10
- bl sub_02003f1a
- movs r0, #11
- movs r1, #1
- bl sub_02003f32
- movs r0, #10
- movs r1, #1
- bl sub_02003f3a
- movs r1, #208
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003fa6
- movs r1, #176
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003fb2
- movs r1, #192
- movs r0, #13
- lsls r1, r1, #6
- movs r2, #10
- bl sub_02003fbe
- movs r2, #0
- movs r0, #11
- ldr r1, [pc, #736]
- bl sub_02003fd8
- movs r0, #11
- movs r1, #2
- bl sub_02003f90
- ldr r0, [pc, #728]
- movs r1, #0
- bl sub_02003fc8
- movs r0, #11
- ldr r1, [pc, #720]
- ldr r2, [pc, #724]
- bl sub_02003f42
- movs r0, #5
- ldr r1, [pc, #720]
- ldr r2, [pc, #684]
- bl sub_02003f4c
- movs r2, #169
- ldr r1, [pc, #684]
- lsls r2, r2, #1
- movs r0, #11
- bl sub_02003f80
- movs r0, #11
- bl sub_02003f4e
- adds r2, r0, #0
- adds r5, r2, #0
- adds r5, #90
- ldrb r2, [r5, #0]
- movs r3, #254
- ands r3, r2
- movs r2, #174
- strb r3, [r5, #0]
- lsls r2, r2, #1
- movs r0, #11
- ldr r1, [pc, #648]
- bl sub_02003fa0
- movs r0, #5
- movs r1, #1
- bl sub_02003fe0
- movs r0, #5
- movs r1, #4
- movs r2, #0
- bl sub_02003fda
- movs r2, #158
- movs r0, #5
- ldr r1, [pc, #648]
- lsls r2, r2, #1
- bl sub_02003fbe
- movs r1, #128
- movs r2, #128
- movs r0, #5
- lsls r1, r1, #8
- lsls r2, r2, #7
- bl sub_02003fa4
- movs r2, #0
- movs r0, #13
- ldr r1, [pc, #604]
- bl sub_0200405e
- movs r0, #13
- movs r1, #3
- bl sub_0200400e
- movs r2, #30
- movs r0, #13
- movs r1, #0
- bl sub_02004058
- movs r1, #1
- movs r0, #11
- bl sub_02004028
- movs r0, #20
- bl sub_02003f9e
- ldrb r2, [r5, #0]
- movs r3, #1
- orrs r3, r2
- movs r1, #128
- movs r2, #128
- strb r3, [r5, #0]
- movs r0, #11
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02003fe4
- movs r2, #166
- movs r0, #11
- ldr r1, [pc, #532]
- lsls r2, r2, #1
- bl sub_02004018
- movs r1, #176
- movs r2, #20
- movs r0, #11
- lsls r1, r1, #8
- bl sub_0200409c
- ldr r0, [pc, #524]
- movs r1, #0
- bl sub_02004094
- movs r1, #176
- movs r2, #0
- movs r0, #10
- lsls r1, r1, #8
- bl sub_020040b0
- movs r0, #10
- movs r1, #2
- bl sub_02004070
- movs r0, #10
- movs r1, #0
- movs r2, #20
- bl sub_020040ba
- movs r1, #129
- movs r0, #11
- lsls r1, r1, #1
- movs r2, #20
- bl sub_020040de
- movs r1, #192
- movs r0, #5
- lsls r1, r1, #6
- movs r2, #0
- bl sub_020040da
- movs r1, #192
- movs r2, #20
- movs r0, #11
- lsls r1, r1, #6
- bl sub_020040e6
- movs r0, #10
- movs r1, #4
- bl sub_02004096
- movs r0, #11
- movs r1, #3
- bl sub_0200409e
- movs r1, #176
- movs r2, #20
- movs r0, #11
- lsls r1, r1, #8
- bl sub_02004102
- movs r0, #11
- movs r1, #3
- bl sub_020040b2
- movs r1, #3
- movs r0, #13
- bl sub_020040ba
- movs r0, #20
- bl sub_02004048
- movs r1, #216
- movs r2, #158
- movs r0, #5
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_020040a6
- movs r1, #211
- ldr r2, [pc, #404]
- movs r0, #13
- lsls r1, r1, #1
- bl sub_020040ba
- movs r0, #5
- movs r1, #1
- bl sub_020040da
- movs r1, #192
- movs r0, #5
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02004146
- movs r1, #192
- movs r2, #20
- movs r0, #13
- lsls r1, r1, #6
- bl sub_02004152
- movs r0, #10
- movs r1, #2
- bl sub_0200411a
- movs r1, #208
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02004166
- movs r2, #40
- ldr r0, [pc, #344]
- movs r1, #0
- bl sub_02004168
- movs r1, #2
- movs r0, #9
- bl sub_02004138
- movs r0, #20
- bl sub_020040ae
- movs r1, #176
- movs r0, #9
- lsls r1, r1, #8
- movs r2, #30
- bl sub_0200418a
- movs r1, #128
- movs r2, #128
- movs r0, #9
- lsls r1, r1, #8
- lsls r2, r2, #7
- bl sub_020040f8
- movs r2, #148
- movs r0, #9
- ldr r1, [pc, #260]
- lsls r2, r2, #1
- bl sub_0200412c
- movs r1, #160
- movs r0, #9
- lsls r1, r1, #7
- movs r2, #40
- bl sub_020041b0
- movs r1, #128
- movs r2, #128
- movs r0, #10
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200411e
- movs r1, #128
- movs r2, #128
- movs r0, #11
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200412c
- movs r1, #128
- movs r2, #128
- movs r0, #13
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200413a
- movs r1, #128
- movs r2, #128
- movs r0, #14
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02004148
- movs r2, #154
- movs r0, #10
- ldr r1, [pc, #216]
- lsls r2, r2, #1
- bl sub_0200417c
- movs r1, #160
- movs r0, #10
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02004200
- movs r2, #154
- movs r0, #11
- ldr r1, [pc, #196]
- lsls r2, r2, #1
- bl sub_02004194
- movs r1, #192
- movs r0, #11
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02004218
- movs r2, #154
- movs r0, #14
- ldr r1, [pc, #176]
- lsls r2, r2, #1
- bl sub_020041ac
- movs r1, #192
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004230
- movs r1, #208
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200423c
- movs r1, #176
- movs r0, #14
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004248
- movs r1, #208
- movs r0, #5
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004254
- movs r1, #208
- movs r2, #0
- movs r0, #13
- lsls r1, r1, #8
- bl sub_02004260
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #8
- lsls r1, r1, #5
- bl sub_0200428c
- movs r0, #236
- movs r1, #1
- movs r2, #150
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #17
- lsls r0, r0, #17
- bl sub_020042a6
- bl sub_020042b2
- movs r0, #40
- b.n .L_02000d38
- .4byte 0x0000200e
- .4byte 0x00002005
- .4byte 0x00000105
- .4byte 0x00000101
- .4byte 0x00009999
- .4byte 0x00004ccc
- .4byte 0x000001db
- .4byte 0x000001eb
- .4byte 0x00000103
- .4byte 0x0000200b
- .4byte 0x00019999
- .4byte 0x0000cccc
- .4byte 0x00013333
- .4byte 0x000001cb
- .4byte 0x00000137
- .4byte 0x0000100a
- .4byte 0x000001d7
- .4byte 0x000001c7
- .2byte 0x01e7
- .2byte 0x0000
-.L_02000d38:
- bl sub_02004206
- ldr r0, [pc, #232]
- bl sub_02004204
- movs r1, #128
- movs r2, #128
- movs r0, #10
- lsls r1, r1, #8
- lsls r2, r2, #7
- bl sub_0200424a
- movs r1, #128
- movs r2, #128
- movs r0, #11
- lsls r1, r1, #8
- lsls r2, r2, #7
- bl sub_02004258
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #7
- movs r0, #14
- lsls r1, r1, #8
- bl sub_02004266
- movs r1, #3
- movs r0, #10
- bl sub_020042b6
- movs r0, #10
- bl .L_02001ba8
- movs r1, #2
- movs r0, #9
- bl sub_020042dc
- movs r0, #9
- bl sub_02001bb6
- movs r1, #3
- movs r0, #11
- bl sub_020042d2
- movs r0, #11
- bl sub_02001bc4
- movs r1, #144
- movs r2, #40
- movs r0, #5
- lsls r1, r1, #8
- bl sub_0200433c
- movs r0, #5
- movs r1, #2
- bl sub_020042fc
- ldr r0, [pc, #128]
- movs r1, #0
- movs r2, #40
- bl sub_02004346
- movs r1, #192
- movs r0, #13
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200435a
- movs r1, #176
- movs r0, #5
- lsls r1, r1, #8
- movs r2, #30
- bl sub_02004366
- movs r1, #224
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #13
- bl sub_02004372
- movs r0, #5
- bl .L_02001c0c
- movs r0, #13
- bl sub_02001c12
- movs r1, #224
- movs r0, #14
- lsls r1, r1, #7
- movs r2, #40
- bl sub_0200438a
- movs r2, #30
- movs r0, #14
- movs r1, #0
- bl sub_0200438c
- movs r1, #4
- movs r0, #14
- bl sub_02004344
- movs r0, #20
- bl sub_020042d2
- movs r1, #0
- movs r2, #30
- movs r0, #14
- bl sub_020043a4
- movs r0, #14
- bl .L_02001c46
- bl .L_0200222a
- movs r0, #5
- bl sub_020042fc
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0x00000246
- .2byte 0x2005
- .2byte 0x0000
+AlchemyC_02000054:
+ .space 0xddc
AlchemyC_02000e30:
.space 0xf8
AlchemyC_02000f28:
@@ -4765,244 +3381,8 @@ AlchemyC_0200293c:
.space 0x34
AlchemyC_02002970:
.space 0x34
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r9
- mov r5, r8
- push {r5, r6, r7}
- adds r7, r0, #0
- movs r6, #0
-.L_020029b2:
- adds r0, r6, #0
- adds r0, #16
- adds r6, #1
- bl sub_02005eae
- cmp r6, #15
- bls.n .L_020029b2
- cmp r7, #1
- beq.n .L_020029d6
- cmp r7, #1
- bcc.n .L_020029d2
- cmp r7, #2
- beq.n .L_020029da
- cmp r7, #3
- beq.n .L_020029e4
- b.n .L_020029ec
-.L_020029d2:
- ldr r0, [pc, #424]
- b.n .L_020029dc
-.L_020029d6:
- ldr r0, [pc, #424]
- b.n .L_020029dc
-.L_020029da:
- ldr r0, [pc, #424]
-.L_020029dc:
- movs r1, #1
- bl sub_02005fcc
- b.n .L_020029ec
-.L_020029e4:
- ldr r0, [pc, #416]
- movs r1, #1
- bl sub_02005fd6
-.L_020029ec:
- movs r0, #60
- bl sub_02005fe4
- movs r0, #214
- bl sub_0200601a
- ldr r0, [pc, #400]
- movs r6, #0
- mov r9, r6
- mov sl, r0
-.L_02002a00:
- mov r2, sl
- ldr r1, [r2, #0]
- movs r3, #0
- ldr r2, [r2, #4]
- cmp r7, #1
- beq.n .L_02002a26
- cmp r7, #1
- bcc.n .L_02002a1a
- cmp r7, #2
- beq.n .L_02002a30
- cmp r7, #3
- beq.n .L_02002a3a
- b.n .L_02002a42
-.L_02002a1a:
- movs r3, #232
- lsls r3, r3, #16
- adds r1, r1, r3
- movs r3, #144
- lsls r3, r3, #16
- b.n .L_02002a42
-.L_02002a26:
- movs r4, #232
- lsls r4, r4, #16
- movs r3, #232
- adds r1, r1, r4
- b.n .L_02002a40
-.L_02002a30:
- ldr r0, [pc, #348]
- movs r3, #144
- adds r1, r1, r0
- lsls r3, r3, #16
- b.n .L_02002a42
-.L_02002a3a:
- ldr r3, [pc, #340]
- adds r1, r1, r3
- movs r3, #232
-.L_02002a40:
- lsls r3, r3, #17
-.L_02002a42:
- ldr r4, [pc, #336]
- lsls r5, r6, #2
- mov r0, r9
- str r0, [r4, r5]
- movs r0, #142
- lsls r0, r0, #1
- mov r8, r4
- bl sub_02005ea6
- ldr r3, [pc, #320]
- str r0, [r3, r5]
- adds r3, r0, #0
- mov r2, r9
- adds r3, #85
- strb r2, [r3, #0]
- ldr r1, [r0, #80]
- adds r3, r1, #0
- adds r3, #38
- strb r2, [r3, #0]
- movs r4, #13
- ldrb r2, [r1, #9]
- negs r4, r4
- adds r3, r4, #0
- ands r2, r3
- movs r3, #4
- orrs r2, r3
- strb r2, [r1, #9]
- movs r1, #6
- bl sub_02005ec0
- movs r0, #6
- bl sub_02005e66
- adds r6, #1
- movs r0, #8
- add sl, r0
- cmp r6, #9
- bls.n .L_02002a00
- cmp r7, #0
- bne.n .L_02002aaa
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02006048
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02006054
-.L_02002aaa:
- movs r0, #20
- bl sub_02005e92
- movs r1, #200
- lsls r1, r1, #4
- ldr r0, [pc, #228]
- bl sub_02005ea4
- movs r0, #246
- movs r5, #1
- bl sub_020060e4
- mov r2, r8
- str r5, [r2, #0]
- movs r0, #6
- bl sub_02005eae
- mov r3, r8
- str r5, [r3, #4]
- movs r0, #6
- bl sub_02005eb8
- mov r4, r8
- str r5, [r4, #8]
- movs r0, #6
- bl sub_02005ec2
- mov r0, r8
- str r5, [r0, #12]
- movs r0, #6
- bl sub_02005ecc
- mov r2, r8
- str r5, [r2, #16]
- movs r0, #6
- bl sub_02005ed6
- mov r3, r8
- str r5, [r3, #20]
- movs r0, #6
- bl sub_02005ee0
- mov r4, r8
- str r5, [r4, #24]
- movs r0, #6
- bl sub_02005eea
- mov r0, r8
- str r5, [r0, #28]
- movs r0, #6
- bl sub_02005ef4
- mov r2, r8
- str r5, [r2, #32]
- movs r0, #6
- bl sub_02005efe
- mov r3, r8
- str r5, [r3, #36]
- movs r0, #6
- bl sub_02005f08
- mov r5, r8
-.L_02002b28:
- ldr r3, [r5, #0]
- movs r6, #0
- b.n .L_02002b38
-.L_02002b2e:
- adds r6, #1
- cmp r6, #9
- bhi.n .L_02002b40
- lsls r3, r6, #2
- ldr r3, [r5, r3]
-.L_02002b38:
- cmp r3, #0
- beq.n .L_02002b2e
- movs r6, #222
- lsls r6, r6, #2
-.L_02002b40:
- movs r4, #222
- lsls r4, r4, #2
- cmp r6, r4
- bne.n .L_02002b50
- movs r0, #1
- bl sub_02005f30
- b.n .L_02002b28
-.L_02002b50:
- movs r0, #40
- bl sub_02005f38
- ldr r0, [pc, #68]
- bl sub_02005f4e
- movs r0, #128
- lsls r0, r0, #9
- movs r1, #1
- bl sub_02006150
- movs r0, #40
- bl sub_0200615e
- pop {r3, r5, r6}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x004039d2
- .4byte 0x004049d2
- .4byte 0x00404a4e
- .4byte 0x00403a52
- .4byte 0x0200b684
- .4byte 0x02c70000
- .4byte 0x0200bb40
- .4byte 0x0200bb10
- .2byte 0xaba1
- .2byte 0x0200
+AlchemyC_020029a4:
+ .space 0x1fc
AlchemyC_02002ba0:
.space 0x7c
AlchemyC_02002c1c:
diff --git a/games/gs1/assets/code/resource_383_overlay.s b/games/gs1/assets/code/resource_383_overlay.s
index ddcadcf73..91d74bc2a 100644
--- a/games/gs1/assets/code/resource_383_overlay.s
+++ b/games/gs1/assets/code/resource_383_overlay.s
@@ -1710,1803 +1710,654 @@ AlchemyC_02000af4:
.space 0x54
AlchemyC_02000b48:
.space 0x29c
- push {r5, r6, lr}
-.L_02000de6:
- mov r6, r8
- push {r6}
- movs r0, #20
- bl sub_02005b2a
- movs r0, #2
- bl sub_02005b70
- movs r3, #0
- adds r0, #91
- movs r2, #0
- movs r1, #4
- strb r3, [r0, #0]
- movs r0, #2
- bl sub_02005bf0
- movs r0, #40
- bl sub_02005b46
- ldr r3, [pc, #1016]
- mov r8, r3
- mov r0, r8
- bl sub_02005c28
- movs r0, #20
- bl sub_02005b56
+AlchemyC_02000de4:
+ .space 0x564
+ push {r5, lr}
+ bl sub_02006090
+ movs r0, #0
+ ldr r1, [pc, #1016]
+ ldr r2, [pc, #1020]
+ bl sub_020060da
+ movs r0, #1
+ ldr r1, [pc, #1008]
+ ldr r2, [pc, #1008]
+ bl sub_020060e4
+ ldr r2, [pc, #1004]
movs r0, #2
-.L_02000e1e:
- movs r1, #20
- bl sub_02005416
- movs r2, #0
ldr r1, [pc, #996]
- movs r0, #2
- bl sub_02005c68
- movs r0, #50
- bl sub_02005b6e
- movs r0, #2
- movs r1, #30
- bl sub_0200542e
- movs r1, #188
- movs r2, #196
- lsls r2, r2, #1
- movs r0, #2
- lsls r1, r1, #1
- bl sub_02005bfc
- movs r1, #0
- movs r0, #2
- bl sub_020054a8
- movs r0, #40
- bl sub_02005b92
- bl sub_020054de
- movs r1, #1
+ bl sub_020060ee
+ movs r1, #3
movs r0, #0
- bl sub_02005c5e
+ bl sub_0200616e
+ movs r0, #20
+ bl sub_020060b4
+ ldr r5, [pc, #984]
+ movs r1, #1
+ adds r0, r5, #0
+ adds r5, #1
+ bl sub_02006078
+ adds r0, r5, #0
+ bl sub_0200619e
+ movs r0, #30
+ bl sub_020060cc
+ movs r1, #1
+ movs r0, #8
+ bl sub_0200616c
+ movs r0, #60
+ bl sub_020060da
+ movs r0, #8
+ movs r1, #3
+ movs r2, #40
+ bl sub_020059e4
+ movs r1, #198
+ movs r2, #220
movs r0, #0
- bl sub_02005be4
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r5, #254
- adds r3, r5, #0
- ands r3, r2
- movs r1, #192
- movs r2, #212
+ lsls r1, r1, #2
lsls r2, r2, #1
- strb r3, [r0, #0]
- lsls r1, r1, #1
+ bl sub_0200616a
movs r0, #0
- bl sub_02005c36
+ movs r1, #8
+ movs r2, #20
+ bl sub_020059cc
+ movs r1, #198
+ movs r2, #220
movs r0, #1
- bl sub_02005bc4
- movs r0, #0
- bl sub_02005c0a
- adds r0, #90
- ldrb r3, [r0, #0]
- movs r6, #1
- orrs r3, r6
- strb r3, [r0, #0]
- movs r0, #30
- bl sub_02005bda
-.L_02000ea0:
+ lsls r1, r1, #18
+ lsls r2, r2, #17
+ bl sub_0200619a
+ movs r1, #198
+ movs r2, #220
movs r0, #2
- movs r1, #0
- bl sub_02005cca
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02005cf4
- movs r1, #129
- lsls r1, r1, #1
+ lsls r1, r1, #18
+ lsls r2, r2, #17
+ bl sub_020061a8
+ movs r1, #202
+ movs r2, #216
movs r0, #1
- bl sub_02005cfe
- movs r0, #60
- bl sub_02005bfc
- movs r0, #0
- movs r1, #3
- bl sub_02005c9c
+ lsls r1, r1, #2
+ lsls r2, r2, #1
+ bl sub_02006196
+ movs r1, #198
+ movs r2, #228
+ lsls r1, r1, #2
+ lsls r2, r2, #1
+ movs r0, #2
+ bl sub_020061a4
movs r0, #1
- movs r1, #3
- movs r2, #30
- bl sub_0200550e
+ bl sub_020061c2
+ movs r1, #8
movs r2, #0
- ldr r1, [pc, #820]
+ movs r0, #1
+ bl sub_0200620c
movs r0, #2
- bl sub_02005d18
- movs r0, #60
- bl sub_02005c1e
- movs r1, #1
+ bl sub_020061d2
movs r0, #2
- bl sub_02005ce6
- movs r0, #10
- bl sub_02005c2c
- movs r2, #20
+ movs r1, #8
+ movs r2, #60
+ bl sub_02005a24
+ movs r1, #129
+ movs r2, #0
+ lsls r1, r1, #1
+ movs r0, #8
+ bl sub_02006260
+ movs r0, #60
+ bl sub_02006166
+ movs r0, #8
+ movs r1, #20
+ bl sub_02005a26
movs r0, #2
movs r1, #3
- bl sub_02005536
- movs r0, #2
- movs r1, #0
- bl sub_02005d26
- movs r1, #2
- movs r0, #1
- bl sub_02005d06
- movs r0, #10
- bl sub_02005c4c
+ bl sub_0200620e
movs r2, #30
movs r0, #1
- movs r1, #0
- bl sub_02005526
+ movs r1, #3
+ bl sub_02005a80
movs r1, #2
- movs r0, #0
- bl sub_02005d1e
- movs r0, #10
- bl sub_02005c64
- movs r0, #0
- movs r1, #1
- movs r2, #40
- bl sub_0200553e
+ movs r0, #8
+ bl sub_02006248
+ movs r0, #20
+ bl sub_0200618e
+ movs r0, #8
+ movs r1, #20
+ bl sub_02005a4e
movs r1, #129
- movs r0, #0
+ movs r0, #2
lsls r1, r1, #1
movs r2, #0
- bl sub_02005d7a
+ bl sub_020062a2
movs r1, #129
lsls r1, r1, #1
movs r2, #0
movs r0, #1
- bl sub_02005d86
+ bl sub_020062ae
movs r0, #60
- bl sub_02005c8c
- movs r1, #129
+ bl sub_020061b4
+ movs r1, #192
+ movs r2, #0
+ lsls r1, r1, #6
+ movs r0, #8
+ bl sub_020062b0
+ movs r0, #10
+ bl sub_020061c6
+ movs r0, #8
+ movs r1, #30
+ bl sub_02005a86
+ movs r1, #208
+ lsls r1, r1, #8
movs r2, #0
+ movs r0, #8
+ bl sub_020062ca
+ movs r0, #30
+ bl sub_020061e0
+ movs r1, #128
lsls r1, r1, #1
- movs r0, #2
- bl sub_02005d98
+ movs r2, #0
+ movs r0, #8
+ bl sub_020062ec
movs r0, #60
- bl sub_02005c9e
- movs r1, #0
- movs r0, #2
- bl sub_02005d86
- movs r0, #0
- movs r1, #2
+ bl sub_020061f2
+ movs r1, #176
+ lsls r1, r1, #8
movs r2, #0
- bl sub_02005d78
+ movs r0, #8
+ bl sub_020062ee
+ movs r0, #40
+ bl sub_02006204
+ movs r1, #208
+ lsls r1, r1, #8
movs r2, #0
- movs r0, #1
- movs r1, #2
- bl sub_02005d82
+ movs r0, #8
+ bl sub_02006300
+ movs r0, #40
+ bl sub_02006216
+ movs r0, #8
movs r1, #0
- movs r0, #0
- bl sub_02005cfa
- movs r0, #30
- bl sub_02005cc8
+ movs r2, #20
+ bl sub_02005af0
+ movs r2, #30
+ movs r0, #8
+ movs r1, #4
+ bl sub_02005b2a
+ movs r0, #8
+ movs r1, #20
+ bl sub_02005aea
movs r0, #2
- movs r1, #3
- movs r2, #10
- bl sub_020055d2
- movs r1, #192
- movs r2, #204
- lsls r2, r2, #1
- lsls r1, r1, #1
+ movs r1, #1
+ bl sub_020062fa
movs r0, #2
- bl sub_02005d58
+ movs r1, #40
+ bl sub_02005afa
+ movs r1, #186
+ movs r2, #204
+ lsls r2, r2, #17
+ lsls r1, r1, #18
+ movs r0, #10
+ bl sub_020062e0
+ movs r0, #61
+ bl sub_0200643e
movs r0, #10
- bl sub_02005ce6
- mov r0, r8
+ movs r1, #20
+ bl sub_02005b16
+ movs r0, #0
+ movs r1, #1
+ bl sub_0200631e
+ movs r0, #1
movs r1, #1
- adds r0, #5
- bl sub_02005ca8
- mov r0, r8
- adds r0, #6
- bl sub_02005dd0
+ bl sub_02006326
movs r0, #2
movs r1, #1
- movs r2, #0
- bl sub_02005dd2
- movs r0, #0
+ bl sub_0200632e
movs r1, #1
- movs r2, #20
- bl sub_020055dc
- movs r1, #129
+ movs r0, #8
+ bl sub_0200633e
+ movs r0, #30
+ bl sub_02006284
+ movs r0, #0
+ movs r1, #10
movs r2, #0
- lsls r1, r1, #1
- movs r0, #1
- bl sub_02005e18
- movs r0, #60
- bl sub_02005d1e
- movs r1, #1
- movs r0, #1
- bl sub_02005de6
- movs r0, #1
- bl sub_02005d6c
- adds r0, #90
- ldrb r3, [r0, #0]
- movs r1, #176
- ands r5, r3
- movs r2, #204
- lsls r1, r1, #1
- lsls r2, r2, #1
- strb r5, [r0, #0]
- movs r0, #1
- bl sub_02005dba
- movs r0, #1
- bl sub_02005d48
- movs r0, #1
- bl sub_02005d8e
- adds r0, #90
- ldrb r3, [r0, #0]
- orrs r6, r3
- strb r6, [r0, #0]
- movs r0, #10
- bl sub_02005d5c
- movs r1, #184
- movs r2, #204
- lsls r1, r1, #1
- lsls r2, r2, #1
- movs r0, #2
- bl sub_02005dda
- movs r0, #20
- bl sub_02005d70
- movs r1, #184
- movs r2, #212
- movs r0, #0
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_02005df6
- movs r2, #0
- movs r1, #1
- movs r0, #0
- bl sub_02005e50
- movs r0, #2
- bl sub_02005e16
- movs r0, #2
- movs r1, #1
- bl sub_020056b2
- movs r2, #10
- movs r0, #1
- movs r1, #4
- bl sub_020056a0
- movs r0, #1
- movs r1, #0
- bl sub_02005e90
- bl sub_020056f4
- movs r2, #30
- movs r0, #2
- movs r1, #0
- bl sub_0200569e
- movs r0, #2
- movs r1, #0
- bl sub_02005ea6
- movs r1, #1
- movs r0, #0
- bl sub_02005e86
- movs r0, #30
- bl sub_02005dcc
- movs r0, #0
- movs r1, #3
- movs r2, #30
- bl sub_020056d6
- movs r2, #10
- movs r0, #2
- movs r1, #3
- bl sub_020056e0
- movs r0, #2
- movs r1, #0
- bl sub_02005ed0
- movs r0, #1
- movs r1, #2
- bl sub_02005eb0
- movs r2, #0
- movs r0, #1
- movs r1, #0
- bl sub_02005ec2
- movs r0, #1
- movs r1, #0
- bl sub_02005eea
- movs r0, #0
- movs r1, #1
- movs r2, #0
- bl sub_02005ed4
- movs r0, #0
- movs r1, #3
- movs r2, #40
- bl sub_02005716
- movs r0, #0
- movs r1, #2
- movs r2, #0
- bl sub_02005ee8
- movs r0, #1
- movs r1, #2
- movs r2, #30
- bl sub_020056fa
- movs r0, #0
- ldr r1, [pc, #280]
- movs r2, #0
- bl sub_02005f34
- ldr r1, [pc, #272]
- movs r2, #0
- movs r0, #1
- bl sub_02005f3e
- movs r0, #60
- bl sub_02005e44
- movs r2, #20
- movs r0, #2
- movs r1, #3
- bl sub_0200574e
- movs r0, #2
- movs r1, #0
- bl sub_02005f3e
- ldr r1, [pc, #240]
- movs r2, #0
- movs r0, #1
- bl sub_02005f60
- movs r0, #60
- bl sub_02005e66
- movs r2, #10
- movs r0, #1
- movs r1, #0
- bl sub_02005740
- movs r0, #1
- movs r1, #0
- bl sub_02005f60
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #2
- bl sub_02005f84
- movs r0, #60
- bl sub_02005e8a
- movs r0, #2
- movs r1, #0
- bl sub_02005f7a
- movs r1, #129
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #1
- bl sub_02005f9e
- movs r0, #60
- bl sub_02005ea4
- mov r0, r8
- movs r1, #1
- adds r0, #13
- bl sub_02005e66
- mov r0, r8
- adds r0, #14
- bl sub_02005f8e
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_02005f90
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_02005f92
- movs r1, #129
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #0
- bl sub_02005fd6
- movs r0, #60
- bl sub_02005edc
- movs r0, #2
- movs r1, #0
- bl sub_02005800
- bl sub_020060a8
- movs r0, #1
- movs r1, #30
- bl sub_020057a8
- bl sub_0200583c
- movs r0, #2
- movs r1, #1
- movs r2, #0
- bl sub_02005fce
- movs r2, #10
- movs r0, #2
- movs r1, #3
- bl sub_02005808
- movs r0, #2
- movs r1, #20
- bl sub_020057c8
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_02005fea
- movs r2, #20
- movs r0, #0
- movs r1, #3
- bl sub_02005824
- movs r1, #1
- movs r0, #1
- bl sub_02005fec
- movs r0, #20
- bl sub_02005f32
- movs r2, #10
- movs r0, #1
- movs r1, #4
- bl sub_0200583c
- movs r0, #1
- movs r1, #30
- b.n .L_02001214
- .4byte 0x0000125f
- .4byte 0x00000101
- .2byte 0x0103
- .2byte 0x0000
-.L_02001214:
- bl sub_0200580a
- movs r0, #2
- movs r1, #1
- movs r2, #0
- bl sub_02006024
- ldr r1, [pc, #284]
- movs r2, #0
- movs r0, #2
- bl sub_02006066
- movs r0, #30
- bl sub_02005f6c
- movs r2, #10
- movs r0, #0
- movs r1, #1
- bl sub_0200585e
- movs r0, #0
- movs r1, #3
- bl sub_02006016
- movs r0, #1
- movs r1, #3
- movs r2, #30
- bl sub_02005888
- movs r0, #0
- movs r1, #2
- movs r2, #0
- bl sub_0200605a
- movs r0, #1
- movs r1, #2
- movs r2, #0
- bl sub_02006064
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_0200606e
- movs r1, #131
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #2
- bl sub_020060b2
- movs r0, #60
- bl sub_02005fb8
- movs r0, #2
- movs r1, #10
- bl sub_02005878
- movs r0, #0
- movs r1, #3
- bl sub_02006060
- movs r0, #1
- movs r1, #3
- movs r2, #20
- bl sub_020058d2
- movs r2, #20
- movs r0, #2
- movs r1, #4
- bl sub_020058dc
- movs r0, #2
- movs r1, #20
- bl sub_0200589c
- movs r0, #0
- ldr r1, [pc, #144]
- movs r2, #0
- bl sub_020060ee
- ldr r1, [pc, #136]
- movs r2, #0
- movs r0, #1
- bl sub_020060f8
- movs r0, #60
- bl sub_02005ffe
- movs r2, #10
- movs r0, #2
- movs r1, #3
- bl sub_02005908
- movs r0, #2
- movs r1, #30
- bl sub_020058c8
- ldr r1, [pc, #108]
- movs r2, #0
- movs r0, #0
- bl sub_0200611a
- movs r0, #60
- bl sub_02006020
- movs r2, #10
- movs r0, #2
- movs r1, #4
- bl sub_0200592a
- movs r0, #2
- movs r1, #30
- bl sub_020058ea
- movs r2, #10
- movs r0, #2
- movs r1, #3
- bl sub_0200593c
- movs r0, #0
- movs r1, #3
- bl sub_020060dc
- movs r2, #20
- movs r0, #1
- movs r1, #3
- bl sub_0200594e
- movs r1, #1
- movs r0, #2
- bl sub_02006076
- movs r3, #22
- add r8, r3
- mov r0, r8
- bl sub_02006138
- movs r0, #2
- movs r1, #1
- bl sub_02006128
- movs r0, #2
- movs r1, #0
- bl sub_02006158
- pop {r3}
- mov r8, r3
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x00000101
- .2byte 0x0105
- .2byte 0x0000
- push {r5, lr}
- bl sub_02006090
- movs r0, #0
- ldr r1, [pc, #1016]
- ldr r2, [pc, #1020]
- bl sub_020060da
- movs r0, #1
- ldr r1, [pc, #1008]
- ldr r2, [pc, #1008]
- bl sub_020060e4
- ldr r2, [pc, #1004]
- movs r0, #2
- ldr r1, [pc, #996]
- bl sub_020060ee
- movs r1, #3
- movs r0, #0
- bl sub_0200616e
- movs r0, #20
- bl sub_020060b4
- ldr r5, [pc, #984]
- movs r1, #1
- adds r0, r5, #0
- adds r5, #1
- bl sub_02006078
- adds r0, r5, #0
- bl sub_0200619e
- movs r0, #30
- bl sub_020060cc
- movs r1, #1
- movs r0, #8
- bl sub_0200616c
- movs r0, #60
- bl sub_020060da
- movs r0, #8
- movs r1, #3
- movs r2, #40
- bl sub_020059e4
- movs r1, #198
- movs r2, #220
- movs r0, #0
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_0200616a
- movs r0, #0
- movs r1, #8
- movs r2, #20
- bl sub_020059cc
- movs r1, #198
- movs r2, #220
- movs r0, #1
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_0200619a
- movs r1, #198
- movs r2, #220
- movs r0, #2
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_020061a8
- movs r1, #202
- movs r2, #216
- movs r0, #1
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_02006196
- movs r1, #198
- movs r2, #228
- lsls r1, r1, #2
- lsls r2, r2, #1
- movs r0, #2
- bl sub_020061a4
- movs r0, #1
- bl sub_020061c2
- movs r1, #8
- movs r2, #0
- movs r0, #1
- bl sub_0200620c
- movs r0, #2
- bl sub_020061d2
- movs r0, #2
- movs r1, #8
- movs r2, #60
- bl sub_02005a24
- movs r1, #129
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #8
- bl sub_02006260
- movs r0, #60
- bl sub_02006166
- movs r0, #8
- movs r1, #20
- bl sub_02005a26
- movs r0, #2
- movs r1, #3
- bl sub_0200620e
- movs r2, #30
- movs r0, #1
- movs r1, #3
- bl sub_02005a80
- movs r1, #2
- movs r0, #8
- bl sub_02006248
- movs r0, #20
- bl sub_0200618e
- movs r0, #8
- movs r1, #20
- bl sub_02005a4e
- movs r1, #129
- movs r0, #2
- lsls r1, r1, #1
- movs r2, #0
- bl sub_020062a2
- movs r1, #129
- lsls r1, r1, #1
- movs r2, #0
- movs r0, #1
- bl sub_020062ae
- movs r0, #60
- bl sub_020061b4
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #6
- movs r0, #8
- bl sub_020062b0
- movs r0, #10
- bl sub_020061c6
- movs r0, #8
- movs r1, #30
- bl sub_02005a86
- movs r1, #208
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_020062ca
- movs r0, #30
- bl sub_020061e0
- movs r1, #128
- lsls r1, r1, #1
- movs r2, #0
- movs r0, #8
- bl sub_020062ec
- movs r0, #60
- bl sub_020061f2
- movs r1, #176
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_020062ee
- movs r0, #40
- bl sub_02006204
- movs r1, #208
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #8
- bl sub_02006300
- movs r0, #40
- bl sub_02006216
- movs r0, #8
- movs r1, #0
- movs r2, #20
- bl sub_02005af0
- movs r2, #30
- movs r0, #8
- movs r1, #4
- bl sub_02005b2a
- movs r0, #8
- movs r1, #20
- bl sub_02005aea
- movs r0, #2
- movs r1, #1
- bl sub_020062fa
- movs r0, #2
- movs r1, #40
- bl sub_02005afa
- movs r1, #186
- movs r2, #204
- lsls r2, r2, #17
- lsls r1, r1, #18
- movs r0, #10
- bl sub_020062e0
- movs r0, #61
- bl sub_0200643e
- movs r0, #10
- movs r1, #20
- bl sub_02005b16
- movs r0, #0
- movs r1, #1
- bl sub_0200631e
- movs r0, #1
- movs r1, #1
- bl sub_02006326
- movs r0, #2
- movs r1, #1
- bl sub_0200632e
- movs r1, #1
- movs r0, #8
- bl sub_0200633e
- movs r0, #30
- bl sub_02006284
- movs r0, #0
- movs r1, #10
- movs r2, #0
- bl sub_02006356
- movs r0, #1
- movs r1, #10
- movs r2, #0
- bl sub_02006360
- movs r0, #2
- movs r1, #10
- movs r2, #0
- bl sub_0200636a
- movs r0, #8
- movs r1, #10
- movs r2, #40
- bl sub_02005b7c
- movs r0, #10
- ldr r1, [pc, #468]
- ldr r2, [pc, #472]
- bl sub_020062fe
- movs r1, #192
- movs r2, #192
- movs r0, #11
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200630c
- movs r1, #192
- movs r2, #192
- movs r0, #12
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200631a
- movs r1, #186
- movs r2, #204
- movs r0, #11
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_02006370
- movs r1, #186
- movs r2, #204
- movs r0, #12
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_0200637e
- movs r1, #198
- movs r2, #208
- movs r0, #10
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_02006374
- movs r1, #192
- lsls r1, r1, #6
- movs r2, #0
- movs r0, #10
- bl sub_020063f8
- movs r0, #70
- bl sub_0200630e
- movs r0, #0
- movs r1, #10
- movs r2, #0
- bl sub_020063e0
- movs r0, #1
- movs r1, #10
- movs r2, #0
- bl sub_020063ea
- movs r0, #2
- movs r1, #10
- movs r2, #0
- bl sub_020063f4
- movs r2, #0
- movs r0, #8
- movs r1, #10
- bl sub_020063fe
- ldr r1, [pc, #344]
- movs r0, #11
- bl sub_0200638e
- movs r0, #40
- bl sub_02006344
- ldr r1, [pc, #336]
- movs r0, #12
- bl sub_0200639c
- movs r0, #12
- bl sub_020063aa
- movs r1, #128
- movs r0, #11
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200644e
- movs r1, #128
- lsls r1, r1, #6
- movs r2, #0
- movs r0, #12
- bl sub_0200645a
- movs r0, #40
- bl sub_02006370
- movs r2, #20
- movs r0, #10
- movs r1, #4
- bl sub_02005c7a
- movs r0, #10
- movs r1, #20
- bl sub_02005c3a
- movs r1, #1
- movs r0, #11
- bl sub_0200644a
- movs r0, #10
- bl sub_02006390
- movs r0, #11
- movs r1, #20
- bl sub_02005c50
- movs r1, #1
- movs r0, #12
- bl sub_02006460
- movs r0, #10
- bl sub_020063a6
- movs r0, #12
- movs r1, #40
- bl sub_02005c66
- ldr r1, [pc, #232]
- movs r2, #0
- movs r0, #2
- bl sub_020064b8
- movs r0, #60
- bl sub_020063be
- movs r2, #20
- movs r0, #10
- movs r1, #4
- bl sub_02005cc8
- movs r0, #10
- movs r1, #20
- bl sub_02005c88
- movs r0, #0
- ldr r1, [pc, #196]
- movs r2, #0
- bl sub_020064da
- ldr r1, [pc, #188]
- movs r2, #0
- movs r0, #1
- bl sub_020064e4
- movs r0, #60
- bl sub_020063ea
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #8
- bl sub_020064f6
- movs r0, #40
- bl sub_020063fc
- movs r1, #2
- movs r0, #8
- bl sub_020064c4
- movs r0, #20
- bl sub_0200640a
- movs r0, #8
- movs r1, #20
- bl sub_02005cca
- movs r0, #0
- movs r1, #8
- movs r2, #0
- bl sub_020064e4
- movs r0, #1
- movs r1, #8
- movs r2, #0
- bl sub_020064ee
- movs r0, #2
- movs r1, #8
- movs r2, #20
- bl sub_02005d00
- movs r2, #30
- movs r0, #8
- movs r1, #4
- bl sub_02005d3a
- movs r0, #8
- movs r1, #20
- bl sub_02005cfa
- movs r1, #2
- movs r0, #2
- bl sub_0200650a
- movs r0, #20
- bl sub_02006450
- movs r0, #0
- movs r1, #2
- movs r2, #0
- bl sub_02006522
- movs r2, #30
- movs r0, #1
- movs r1, #2
- bl sub_02005d34
- movs r0, #1
- movs r1, #20
- bl sub_02005d24
- movs r1, #129
- movs r2, #0
- lsls r1, r1, #1
- movs r0, #8
- bl sub_02006578
- movs r0, #60
- bl sub_0200647e
- movs r0, #8
- movs r1, #20
- b.n .L_02001764
- .2byte 0x0000
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x000012c5
- .4byte 0x0200d248
- .4byte 0x0200d2ac
- .2byte 0x0101
- .2byte 0x0000
-.L_02001764:
- bl sub_02005d5a
- movs r1, #1
- movs r0, #10
- bl sub_0200656a
- movs r0, #10
- bl sub_020064b0
- movs r0, #10
- movs r1, #20
- bl sub_02005d70
- movs r0, #0
- movs r1, #10
- movs r2, #0
- bl sub_0200658a
- movs r0, #1
- movs r1, #10
- movs r2, #0
- bl sub_02006594
- movs r0, #2
- movs r1, #10
- movs r2, #20
- bl sub_02005da6
- movs r2, #20
- movs r0, #11
- movs r1, #3
- bl sub_02005de0
- movs r0, #11
- movs r1, #20
- bl sub_02005da0
- movs r2, #20
- movs r0, #12
- movs r1, #4
- bl sub_02005df2
- movs r0, #12
- movs r1, #20
- bl sub_02005db2
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02006606
- movs r1, #129
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02006612
- movs r1, #129
- lsls r1, r1, #1
- movs r2, #0
- movs r0, #2
- bl sub_0200661e
- movs r0, #60
- bl sub_02006524
- movs r2, #20
- movs r0, #10
- movs r1, #3
- bl sub_02005e2e
- movs r1, #0
- movs r0, #10
- bl sub_02006616
- movs r0, #50
- bl sub_0200653c
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_0200660e
- movs r0, #1
- movs r1, #0
- movs r2, #30
- bl sub_02005e20
- movs r0, #0
- movs r1, #0
- bl sub_02006590
- cmp r0, #0
- bne.n .L_02001854
- movs r0, #40
- bl sub_02006562
+ bl sub_02006356
movs r0, #1
movs r1, #10
movs r2, #0
- bl sub_02006634
- movs r2, #0
+ bl sub_02006360
movs r0, #2
movs r1, #10
- bl sub_0200663e
- movs r1, #2
- movs r0, #10
- bl sub_0200663e
- movs r0, #20
- bl sub_02006584
- movs r0, #10
- movs r1, #0
- bl sub_02006674
- b.n .L_02001894
-.L_02001854:
- movs r0, #40
- bl sub_02006594
- movs r0, #1
- movs r1, #10
- movs r2, #0
- bl sub_02006666
movs r2, #0
+ bl sub_0200636a
+ movs r0, #8
movs r1, #10
- movs r0, #2
- bl sub_02006670
- ldr r5, [pc, #260]
- adds r0, r5, #0
- bl sub_02006688
- movs r1, #2
- movs r0, #10
- bl sub_02006678
- movs r0, #20
- bl sub_020065be
- subs r5, #3
- movs r0, #10
- movs r1, #0
- bl sub_020066b0
- adds r0, r5, #0
- bl sub_020066a6
-.L_02001894:
- movs r2, #0
- ldr r1, [pc, #224]
- movs r0, #11
- bl sub_020066d8
- movs r0, #60
- bl sub_020065de
- movs r0, #11
- movs r1, #20
- bl sub_02005e9e
- movs r2, #20
- movs r0, #12
- movs r1, #4
- bl sub_02005ef0
- movs r0, #12
- movs r1, #30
- bl sub_02005eb0
- movs r2, #30
- movs r0, #10
- movs r1, #11
- bl sub_02005eea
- movs r0, #10
- movs r1, #3
- bl sub_020066a2
- movs r0, #11
- movs r1, #3
- movs r2, #30
- bl sub_02005f14
- movs r2, #30
- movs r0, #10
- movs r1, #12
- bl sub_02005f06
- movs r0, #10
- movs r1, #3
- bl sub_020066be
- movs r0, #12
- movs r1, #3
movs r2, #40
- bl sub_02005f30
+ bl sub_02005b7c
+ movs r0, #10
+ ldr r1, [pc, #468]
+ ldr r2, [pc, #472]
+ bl sub_020062fe
+ movs r1, #192
+ movs r2, #192
+ movs r0, #11
+ lsls r1, r1, #9
+ lsls r2, r2, #8
+ bl sub_0200630c
movs r1, #192
+ movs r2, #192
+ movs r0, #12
+ lsls r1, r1, #9
+ lsls r2, r2, #8
+ bl sub_0200631a
+ movs r1, #186
+ movs r2, #204
+ movs r0, #11
+ lsls r1, r1, #18
+ lsls r2, r2, #17
+ bl sub_02006370
+ movs r1, #186
+ movs r2, #204
+ movs r0, #12
+ lsls r1, r1, #18
+ lsls r2, r2, #17
+ bl sub_0200637e
+ movs r1, #198
+ movs r2, #208
movs r0, #10
+ lsls r1, r1, #2
+ lsls r2, r2, #1
+ bl sub_02006374
+ movs r1, #192
lsls r1, r1, #6
movs r2, #0
- bl sub_0200672c
- movs r1, #192
+ movs r0, #10
+ bl sub_020063f8
+ movs r0, #70
+ bl sub_0200630e
+ movs r0, #0
+ movs r1, #10
+ movs r2, #0
+ bl sub_020063e0
+ movs r0, #1
+ movs r1, #10
+ movs r2, #0
+ bl sub_020063ea
+ movs r0, #2
+ movs r1, #10
+ movs r2, #0
+ bl sub_020063f4
+ movs r2, #0
+ movs r0, #8
+ movs r1, #10
+ bl sub_020063fe
+ ldr r1, [pc, #344]
+ movs r0, #11
+ bl sub_0200638e
+ movs r0, #40
+ bl sub_02006344
+ ldr r1, [pc, #336]
+ movs r0, #12
+ bl sub_0200639c
+ movs r0, #12
+ bl sub_020063aa
+ movs r1, #128
movs r0, #11
lsls r1, r1, #6
movs r2, #0
- bl sub_02006738
- movs r1, #192
+ bl sub_0200644e
+ movs r1, #128
lsls r1, r1, #6
movs r2, #0
movs r0, #12
- bl sub_02006744
- movs r0, #20
- bl sub_0200665a
+ bl sub_0200645a
+ movs r0, #40
+ bl sub_02006370
movs r2, #20
movs r0, #10
movs r1, #4
- bl sub_02005f64
- movs r1, #0
+ bl sub_02005c7a
movs r0, #10
- bl sub_02006754
- ldr r0, [pc, #72]
- bl sub_02006652
- ldr r3, [pc, #68]
- movs r2, #224
- ldr r3, [r3, #0]
- ldr r5, [pc, #68]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #64
- str r2, [r3, #0]
- adds r0, r5, #0
- movs r1, #17
- bl sub_020067ca
- adds r0, r5, #0
- movs r1, #16
- bl sub_020067da
- ldr r3, [pc, #44]
- ldr r2, [pc, #48]
- adds r3, r3, r2
- movs r2, #3
- strb r2, [r3, #0]
- movs r0, #12
- movs r1, #5
- bl sub_020067dc
- bl sub_020066b8
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x000012dc
- .4byte 0x00000103
- .4byte 0x00000854
- .4byte 0x03001ebc
- .4byte 0x00000015
- .4byte 0x02000240
- .2byte 0x022b
- .2byte 0x0000
-AlchemyC_02001990:
- .space 0x12
- .2byte 0x0000
-AlchemyC_020019a4:
- .space 0x40
-AlchemyC_020019e4:
- .space 0x68
-AlchemyC_02001a4c:
- .space 0x154
-AlchemyC_02001ba0:
- .space 0x2c4
-AlchemyC_02001e64:
- .space 0x1c
-AlchemyC_02001e80:
- .space 0xd0
- push {r5, r6, lr}
- ldr r3, [pc, #588]
- sub sp, #8
- ldr r5, [r3, #0]
- bl sub_02006c9e
- ldr r0, [pc, #580]
- bl sub_02006bdc
- ldr r0, [pc, #580]
- bl sub_02006c8a
- movs r0, #148
- lsls r0, r0, #2
- bl sub_02006c92
- movs r0, #24
- movs r1, #1
- bl sub_02006d4a
- movs r0, #25
- movs r1, #1
- bl sub_02006d52
- movs r0, #2
- movs r1, #1
- bl sub_02006d5a
- movs r0, #0
- movs r1, #1
- bl sub_02006d62
- movs r0, #1
+ movs r1, #20
+ bl sub_02005c3a
movs r1, #1
- bl sub_02006d6a
- movs r0, #1
- movs r1, #2
- movs r2, #0
- bl sub_02006da4
- movs r0, #0
- movs r1, #2
- movs r2, #0
- bl sub_02006db6
- movs r0, #24
- movs r1, #2
- movs r2, #0
- bl sub_02006db8
- movs r2, #0
- movs r0, #25
- movs r1, #2
- bl sub_02006dc2
+ movs r0, #11
+ bl sub_0200644a
movs r0, #10
- bl sub_02006d00
- movs r2, #193
- lsls r2, r2, #1
- adds r5, r5, r2
- movs r2, #0
- ldrsh r3, [r5, r2]
- movs r6, #24
- cmp r3, #201
- beq.n .L_02002008
- cmp r3, #201
- blt.n .L_0200202a
- cmp r3, #203
- bgt.n .L_0200202a
- ldr r0, [pc, #460]
- bl sub_02006df6
- movs r1, #129
- movs r0, #25
- lsls r1, r1, #1
- bl sub_02006e30
- movs r0, #25
- movs r1, #2
- bl sub_02006df0
- movs r0, #25
- movs r1, #20
- bl sub_020065f0
- movs r2, #0
- ldrsh r3, [r5, r2]
- movs r6, #25
- cmp r3, #202
- beq.n .L_0200202a
-.L_02002008:
- ldr r0, [pc, #420]
- bl sub_02006e20
- movs r1, #129
- movs r0, #24
- lsls r1, r1, #1
- bl sub_02006e5a
- movs r0, #24
- movs r1, #2
- bl sub_02006e1a
- movs r0, #24
+ bl sub_02006390
+ movs r0, #11
movs r1, #20
- movs r6, #24
- bl sub_0200661c
-.L_0200202a:
- movs r0, #2
+ bl sub_02005c50
movs r1, #1
- bl sub_02006e04
- adds r1, r6, #0
- movs r0, #2
- movs r2, #0
- bl sub_02006e3e
- movs r2, #0
- movs r0, #1
- movs r1, #2
- bl sub_02006e48
- movs r1, #2
- movs r0, #1
- bl sub_02006e48
- movs r0, #20
- bl sub_02006d8e
- ldr r0, [pc, #348]
- bl sub_02006e6c
- movs r0, #1
- movs r1, #20
- bl sub_02006654
- movs r1, #2
- movs r0, #2
- bl sub_02006e64
- movs r0, #20
- bl sub_02006daa
- movs r0, #2
- movs r1, #20
- bl sub_0200666a
- adds r1, r6, #0
- movs r0, #2
- bl sub_020066d6
- bl sub_02006f7e
- movs r0, #60
- bl sub_02006dc4
- movs r0, #24
- movs r1, #2
- bl sub_02006e8c
- movs r0, #24
- movs r1, #20
- bl sub_0200668c
- movs r0, #25
- movs r1, #2
- bl sub_02006e9c
- movs r0, #25
- movs r1, #20
- bl sub_0200669c
- movs r1, #128
- movs r2, #60
- movs r0, #2
- lsls r1, r1, #1
- bl sub_02006ef0
- bl sub_0200673c
- movs r0, #1
- movs r1, #2
- bl sub_02006eb4
- movs r1, #2
- movs r0, #0
- bl sub_02006ec4
- movs r0, #20
- bl sub_02006e0a
- movs r0, #1
- movs r1, #20
- bl sub_020066ca
+ movs r0, #12
+ bl sub_02006460
+ movs r0, #10
+ bl sub_020063a6
+ movs r0, #12
+ movs r1, #40
+ bl sub_02005c66
+ ldr r1, [pc, #232]
movs r2, #0
- movs r1, #1
- movs r0, #2
- bl sub_02006ee4
- movs r0, #20
- bl sub_02006e22
- movs r1, #3
- movs r0, #2
- bl sub_02006eca
- movs r0, #40
- bl sub_02006e30
- movs r0, #0
- bl sub_02006e76
- ldr r1, [r0, #80]
- movs r5, #13
- ldrb r2, [r1, #9]
- negs r5, r5
- adds r3, r5, #0
- movs r6, #4
- ands r3, r2
- orrs r3, r6
- strb r3, [r1, #9]
- movs r0, #1
- bl sub_02006e8e
- ldr r1, [r0, #80]
- ldrb r2, [r1, #9]
- adds r3, r5, #0
- ands r3, r2
- orrs r3, r6
- strb r3, [r1, #9]
- movs r0, #2
- bl sub_02006ea0
- ldr r2, [r0, #80]
- ldrb r3, [r2, #9]
- ands r5, r3
- orrs r5, r6
- ldr r6, [pc, #112]
- movs r3, #228
- ldr r1, [r6, #0]
- lsls r3, r3, #1
- strb r5, [r2, #9]
- adds r2, r1, r3
- movs r3, #24
- str r3, [r2, #0]
- movs r5, #224
- ldr r3, [pc, #116]
- lsls r5, r5, #1
- str r3, [r1, r5]
- bl sub_02006fec
- bl sub_02006ff8
- bl .L_02004318
- movs r3, #14
- movs r2, #44
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r1, #45
- movs r2, #3
- movs r3, #1
- movs r0, #14
- bl sub_02006e48
- ldr r0, [pc, #84]
- bl sub_02006e86
- movs r0, #24
- bl sub_02006eec
- movs r3, #5
- adds r0, #100
- strh r3, [r0, #0]
- movs r0, #25
- bl sub_02006ef8
- movs r3, #4
- adds r0, #100
- movs r1, #200
- strh r3, [r0, #0]
- lsls r1, r1, #4
- ldr r0, [pc, #52]
- bl sub_02006e00
- ldr r2, [r6, #0]
- ldr r3, [pc, #48]
- str r3, [r2, r5]
- bl sub_02006ee2
- add sp, #8
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x03001ebc
- .4byte 0x0200c8c9
- .4byte 0x00000107
- .4byte 0x000012a4
- .4byte 0x000012a3
- .4byte 0x000012a5
- .4byte 0x00000201
- .4byte 0x00000853
- .4byte 0x0200aba1
- .2byte 0x0209
- .2byte 0x0000
- push {r5, r6, lr}
- bl sub_020070d0
- movs r1, #1
- movs r0, #0
- bl sub_02007008
- movs r0, #0
- bl sub_02006f56
- adds r0, #35
- ldrb r2, [r0, #0]
- movs r3, #1
- orrs r3, r2
- strb r3, [r0, #0]
- movs r1, #144
- movs r0, #128
- movs r2, #200
- movs r3, #234
- lsls r3, r3, #18
- lsls r0, r0, #14
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_0200705c
- movs r0, #0
- ldr r1, [pc, #840]
- ldr r2, [pc, #844]
- bl sub_02006f86
- movs r0, #1
- ldr r1, [pc, #832]
- ldr r2, [pc, #832]
- bl sub_02006f90
- movs r0, #2
- ldr r1, [pc, #820]
- ldr r2, [pc, #824]
- bl sub_02006f9a
- movs r1, #248
- movs r2, #182
- movs r0, #0
- lsls r1, r1, #16
- lsls r2, r2, #18
- bl sub_02006ff0
- movs r1, #132
- movs r2, #186
movs r0, #2
- lsls r1, r1, #17
- lsls r2, r2, #18
- bl sub_02006ffe
- movs r1, #232
- movs r2, #186
- lsls r1, r1, #16
- lsls r2, r2, #18
+ bl sub_020064b8
+ movs r0, #60
+ bl sub_020063be
+ movs r2, #20
+ movs r0, #10
+ movs r1, #4
+ bl sub_02005cc8
+ movs r0, #10
+ movs r1, #20
+ bl sub_02005c88
+ movs r0, #0
+ ldr r1, [pc, #196]
+ movs r2, #0
+ bl sub_020064da
+ ldr r1, [pc, #188]
+ movs r2, #0
movs r0, #1
- bl sub_0200700c
+ bl sub_020064e4
+ movs r0, #60
+ bl sub_020063ea
+ movs r1, #128
+ movs r2, #0
+ lsls r1, r1, #1
+ movs r0, #8
+ bl sub_020064f6
+ movs r0, #40
+ bl sub_020063fc
+ movs r1, #2
+ movs r0, #8
+ bl sub_020064c4
+ movs r0, #20
+ bl sub_0200640a
+ movs r0, #8
+ movs r1, #20
+ bl sub_02005cca
movs r0, #0
- bl sub_02006fc2
- ldr r1, [r0, #80]
- movs r5, #13
- ldrb r2, [r1, #9]
- negs r5, r5
- adds r3, r5, #0
- ands r3, r2
- movs r6, #4
- orrs r3, r6
- strb r3, [r1, #9]
+ movs r1, #8
+ movs r2, #0
+ bl sub_020064e4
movs r0, #1
- bl sub_02006fda
- ldr r1, [r0, #80]
- ldrb r2, [r1, #9]
- adds r3, r5, #0
- ands r3, r2
- orrs r3, r6
- strb r3, [r1, #9]
+ movs r1, #8
+ movs r2, #0
+ bl sub_020064ee
+ movs r0, #2
+ movs r1, #8
+ movs r2, #20
+ bl sub_02005d00
+ movs r2, #30
+ movs r0, #8
+ movs r1, #4
+ bl sub_02005d3a
+ movs r0, #8
+ movs r1, #20
+ bl sub_02005cfa
+ movs r1, #2
movs r0, #2
- bl sub_02006fec
- ldr r2, [r0, #80]
- ldrb r3, [r2, #9]
- ands r5, r3
- orrs r5, r6
- strb r5, [r2, #9]
+ bl sub_0200650a
+ movs r0, #20
+ bl sub_02006450
movs r0, #0
movs r1, #2
movs r2, #0
- bl sub_02007090
- movs r0, #1
- movs r1, #2
+ bl sub_02006522
movs r2, #30
- bl sub_0200689a
- movs r1, #208
- movs r2, #174
- movs r0, #24
- lsls r1, r1, #15
- lsls r2, r2, #18
- bl sub_02007068
- movs r1, #240
- movs r2, #174
- movs r0, #25
- lsls r1, r1, #15
- lsls r2, r2, #18
- bl sub_02007076
- movs r2, #0
- movs r0, #24
- movs r1, #25
- bl sub_020070c0
- movs r1, #0
- movs r0, #0
- bl sub_02007108
- bl sub_0200711c
- bl sub_02006f88
- movs r0, #30
- bl sub_02007006
- ldr r3, [pc, #640]
- ldr r1, [r3, #0]
- movs r3, #228
- lsls r3, r3, #1
- adds r2, r1, r3
- movs r3, #24
- str r3, [r2, #0]
- movs r3, #224
- lsls r3, r3, #1
- adds r2, r1, r3
- adds r3, #65
- str r3, [r2, #0]
- bl sub_02007182
- bl sub_02007196
- movs r0, #40
- bl sub_0200702c
- movs r1, #1
movs r0, #1
- bl sub_020070f4
- movs r0, #10
- bl sub_0200703a
- ldr r0, [pc, #592]
- bl sub_02007118
+ movs r1, #2
+ bl sub_02005d34
movs r0, #1
movs r1, #20
- bl sub_02006900
- movs r2, #20
- movs r0, #2
- movs r1, #3
- bl sub_02006952
- movs r0, #2
+ bl sub_02005d24
+ movs r1, #129
+ movs r2, #0
+ lsls r1, r1, #1
+ movs r0, #8
+ bl sub_02006578
+ movs r0, #60
+ bl sub_0200647e
+ movs r0, #8
movs r1, #20
- bl sub_02006912
- movs r0, #0
+ b.n .L_02001764
+ .2byte 0x0000
+ .4byte 0x0000cccc
+ .4byte 0x00006666
+ .4byte 0x000012c5
+ .4byte 0x0200d248
+ .4byte 0x0200d2ac
+ .2byte 0x0101
+ .2byte 0x0000
+.L_02001764:
+ bl sub_02005d5a
movs r1, #1
- movs r2, #50
- bl sub_0200694c
+ movs r0, #10
+ bl sub_0200656a
+ movs r0, #10
+ bl sub_020064b0
+ movs r0, #10
+ movs r1, #20
+ bl sub_02005d70
movs r0, #0
- movs r1, #2
+ movs r1, #10
movs r2, #0
- bl sub_02007136
+ bl sub_0200658a
movs r0, #1
- movs r1, #2
+ movs r1, #10
+ movs r2, #0
+ bl sub_02006594
+ movs r0, #2
+ movs r1, #10
movs r2, #20
- bl sub_02006948
+ bl sub_02005da6
movs r2, #20
- movs r0, #2
+ movs r0, #11
+ movs r1, #3
+ bl sub_02005de0
+ movs r0, #11
+ movs r1, #20
+ bl sub_02005da0
+ movs r2, #20
+ movs r0, #12
movs r1, #4
- bl sub_02006982
- movs r0, #2
- movs r1, #0
- bl sub_02007172
+ bl sub_02005df2
+ movs r0, #12
+ movs r1, #20
+ bl sub_02005db2
movs r1, #129
movs r0, #0
lsls r1, r1, #1
movs r2, #0
- bl sub_02007196
+ bl sub_02006606
movs r1, #129
+ movs r0, #1
lsls r1, r1, #1
movs r2, #0
- movs r0, #1
- bl sub_020071a2
+ bl sub_02006612
+ movs r1, #129
+ lsls r1, r1, #1
+ movs r2, #0
+ movs r0, #2
+ bl sub_0200661e
movs r0, #60
- bl sub_020070a8
+ bl sub_02006524
movs r2, #20
- movs r0, #2
+ movs r0, #10
movs r1, #3
- bl sub_020069b2
+ bl sub_02005e2e
+ movs r1, #0
+ movs r0, #10
+ bl sub_02006616
+ movs r0, #50
+ bl sub_0200653c
movs r0, #2
- movs r1, #30
- bl sub_02006972
- movs r1, #1
- movs r0, #1
- bl sub_02007182
- movs r0, #20
- bl sub_020070c8
- movs r0, #0
- movs r1, #1
- movs r2, #20
- bl sub_020069ba
movs r1, #0
+ movs r2, #0
+ bl sub_0200660e
movs r0, #1
- bl sub_020071ba
- movs r0, #0
movs r1, #0
- movs r5, #0
- bl sub_0200711c
- cmp r0, #0
- beq.n .L_020024a0
- movs r0, #20
- bl sub_020070ee
- movs r0, #2
- movs r1, #2
- bl sub_020071ae
- movs r0, #1
- movs r1, #4
movs r2, #30
- bl sub_02006a00
- movs r1, #0
- movs r0, #1
- bl sub_020071e8
+ bl sub_02005e20
movs r0, #0
movs r1, #0
- bl sub_02007148
+ bl sub_02006590
cmp r0, #0
- beq.n .L_020024a0
- movs r0, #20
- bl sub_0200711a
- movs r1, #129
+ bne.n .L_02001854
+ movs r0, #40
+ bl sub_02006562
+ movs r0, #1
+ movs r1, #10
+ movs r2, #0
+ bl sub_02006634
movs r2, #0
- lsls r1, r1, #1
- movs r0, #2
- bl sub_02007226
- movs r0, #60
- bl sub_0200712c
movs r0, #2
+ movs r1, #10
+ bl sub_0200663e
movs r1, #2
- bl sub_020071f4
- movs r0, #0
- movs r1, #2
- movs r2, #20
- bl sub_02006a26
+ movs r0, #10
+ bl sub_0200663e
+ movs r0, #20
+ bl sub_02006584
+ movs r0, #10
movs r1, #0
+ bl sub_02006674
+ b.n .L_02001894
+.L_02001854:
+ movs r0, #40
+ bl sub_02006594
+ movs r0, #1
+ movs r1, #10
+ movs r2, #0
+ bl sub_02006666
+ movs r2, #0
+ movs r1, #10
movs r0, #2
- bl sub_02007226
- movs r0, #2
- movs r1, #0
- bl sub_02007186
- cmp r0, #0
- beq.n .L_020024a0
+ bl sub_02006670
+ ldr r5, [pc, #260]
+ adds r0, r5, #0
+ bl sub_02006688
+ movs r1, #2
+ movs r0, #10
+ bl sub_02006678
movs r0, #20
- bl sub_02007158
+ bl sub_020065be
+ subs r5, #3
+ movs r0, #10
+ movs r1, #0
+ bl sub_020066b0
+ adds r0, r5, #0
+ bl sub_020066a6
+.L_02001894:
movs r2, #0
- ldr r1, [pc, #308]
- movs r0, #2
- bl sub_02007262
+ ldr r1, [pc, #224]
+ movs r0, #11
+ bl sub_020066d8
movs r0, #60
- bl sub_02007168
- movs r0, #2
+ bl sub_020065de
+ movs r0, #11
movs r1, #20
- bl sub_02006a28
- movs r2, #10
- movs r0, #1
- movs r1, #2
- bl sub_02006a4a
- movs r1, #1
- movs r0, #1
- bl sub_02007242
+ bl sub_02005e9e
+ movs r2, #20
+ movs r0, #12
+ movs r1, #4
+ bl sub_02005ef0
+ movs r0, #12
+ movs r1, #30
+ bl sub_02005eb0
+ movs r2, #30
+ movs r0, #10
+ movs r1, #11
+ bl sub_02005eea
+ movs r0, #10
+ movs r1, #3
+ bl sub_020066a2
+ movs r0, #11
+ movs r1, #3
+ movs r2, #30
+ bl sub_02005f14
+ movs r2, #30
+ movs r0, #10
+ movs r1, #12
+ bl sub_02005f06
movs r0, #10
- bl sub_02007188
- movs r0, #1
- movs r1, #10
- bl sub_02006a48
- movs r0, #2
- movs r1, #1
- movs r2, #20
- bl sub_02006a6a
- ldr r1, [pc, #248]
- movs r2, #0
- movs r0, #2
- bl sub_020072a4
- movs r0, #60
- bl sub_020071aa
- movs r2, #20
- movs r0, #2
- movs r1, #4
- bl sub_02006ab4
- movs r0, #1
- movs r1, #10
- bl sub_02006a74
- movs r0, #1
- movs r1, #0
- movs r2, #20
- bl sub_02006aae
- movs r0, #1
movs r1, #3
- movs r2, #20
- bl sub_02006ad0
- movs r0, #1
- movs r1, #20
- movs r5, #1
- bl sub_02006a92
-.L_020024a0:
- cmp r5, #0
- bne.n .L_020024c4
- ldr r0, [pc, #184]
- bl sub_020072bc
- movs r0, #1
- movs r1, #20
- bl sub_02006aa4
- movs r0, #1
- movs r1, #0
- movs r2, #20
- bl sub_02006ade
- movs r0, #1
- movs r1, #20
- bl sub_02006ab6
-.L_020024c4:
- movs r2, #0
- ldr r1, [pc, #144]
- movs r0, #0
- bl sub_02007308
- movs r0, #60
- bl sub_0200720e
- movs r0, #1
- movs r1, #1
- bl sub_020072d6
- movs r0, #1
- movs r1, #10
- bl sub_02006ad6
- movs r0, #1
+ bl sub_020066be
+ movs r0, #12
movs r1, #3
- movs r2, #10
- bl sub_02006b28
- movs r0, #1
- movs r1, #2
+ movs r2, #40
+ bl sub_02005f30
+ movs r1, #192
+ movs r0, #10
+ lsls r1, r1, #6
movs r2, #0
- bl sub_02007302
- movs r2, #10
- movs r0, #0
- movs r1, #2
- bl sub_02006b24
- movs r0, #1
- movs r1, #0
- bl sub_0200732c
- movs r0, #2
- movs r1, #3
- movs r2, #10
- bl sub_02006b4e
- movs r2, #182
- movs r0, #2
- movs r1, #248
- lsls r2, r2, #2
- bl sub_020072ca
- movs r2, #182
- movs r0, #1
- movs r1, #248
- lsls r2, r2, #2
- bl sub_020072de
- movs r0, #1
- movs r1, #0
+ bl sub_0200672c
+ movs r1, #192
+ movs r0, #11
+ lsls r1, r1, #6
movs r2, #0
- bl sub_02007300
- movs r0, #2
- movs r1, #0
+ bl sub_02006738
+ movs r1, #192
+ lsls r1, r1, #6
movs r2, #0
- bl sub_0200730a
- pop {r5, r6}
+ movs r0, #12
+ bl sub_02006744
+ movs r0, #20
+ bl sub_0200665a
+ movs r2, #20
+ movs r0, #10
+ movs r1, #4
+ bl sub_02005f64
+ movs r1, #0
+ movs r0, #10
+ bl sub_02006754
+ ldr r0, [pc, #72]
+ bl sub_02006652
+ ldr r3, [pc, #68]
+ movs r2, #224
+ ldr r3, [r3, #0]
+ ldr r5, [pc, #68]
+ lsls r2, r2, #1
+ adds r3, r3, r2
+ adds r2, #64
+ str r2, [r3, #0]
+ adds r0, r5, #0
+ movs r1, #17
+ bl sub_020067ca
+ adds r0, r5, #0
+ movs r1, #16
+ bl sub_020067da
+ ldr r3, [pc, #44]
+ ldr r2, [pc, #48]
+ adds r3, r3, r2
+ movs r2, #3
+ strb r2, [r3, #0]
+ movs r0, #12
+ movs r1, #5
+ bl sub_020067dc
+ bl sub_020066b8
+ pop {r5}
pop {r0}
bx r0
- .2byte 0x0000
- .4byte 0x0000cccc
- .4byte 0x00006666
+ .4byte 0x000012dc
+ .4byte 0x00000103
+ .4byte 0x00000854
.4byte 0x03001ebc
- .4byte 0x000012ae
- .4byte 0x00000105
- .4byte 0x00000101
- .2byte 0x12bc
+ .4byte 0x00000015
+ .4byte 0x02000240
+ .2byte 0x022b
.2byte 0x0000
+AlchemyC_02001990:
+ .space 0x12
+ .2byte 0x0000
+AlchemyC_020019a4:
+ .space 0x40
+AlchemyC_020019e4:
+ .space 0x68
+AlchemyC_02001a4c:
+ .space 0x154
+AlchemyC_02001ba0:
+ .space 0x2c4
+AlchemyC_02001e64:
+ .space 0x1c
+AlchemyC_02001e80:
+ .space 0xd0
+AlchemyC_02001f50:
+ .space 0x278
+AlchemyC_020021c8:
+ .space 0x39c
push {lr}
ldr r3, [pc, #300]
movs r2, #182
@@ -3915,192 +2766,8 @@ AlchemyC_02002ba0:
.space 0x50
AlchemyC_02002bf0:
.space 0x1c4
- push {r5, r6, lr}
- movs r1, #198
- movs r2, #208
- movs r0, #10
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_02007b8e
- movs r1, #200
- movs r2, #200
- movs r0, #11
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_02007b9c
- movs r1, #194
- movs r2, #208
- movs r0, #12
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_02007baa
- movs r1, #192
- movs r0, #10
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02007c16
- movs r1, #192
- movs r0, #11
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02007c22
- movs r1, #192
- movs r0, #12
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02007c2e
- movs r1, #198
- movs r2, #220
- movs r0, #0
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_02007bdc
- movs r1, #202
- movs r2, #216
- movs r0, #1
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_02007bea
- movs r1, #198
- movs r2, #228
- movs r0, #2
- lsls r1, r1, #18
- lsls r2, r2, #17
- bl sub_02007bf8
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02007c64
- movs r1, #176
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02007c70
- movs r1, #176
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02007c7c
- movs r0, #8
- movs r1, #10
- movs r2, #0
- bl sub_02007c5e
- ldr r5, [pc, #268]
- ldr r3, [pc, #272]
- ldr r2, [r5, #0]
- movs r6, #224
- lsls r6, r6, #1
- movs r1, #0
- str r3, [r2, r6]
- movs r0, #0
- bl sub_02007cba
- bl sub_02007cce
- bl sub_02007b3a
- movs r0, #1
- bl sub_02007ae8
- ldr r3, [r5, #0]
- movs r2, #228
- lsls r2, r2, #1
- adds r3, r3, r2
- movs r2, #32
- str r2, [r3, #0]
- bl sub_02007458
- movs r0, #60
- bl sub_02007bce
- ldr r0, [pc, #220]
- bl sub_02007cac
- movs r1, #1
- movs r0, #11
- bl sub_02007c9c
- movs r0, #20
- bl sub_02007be2
- movs r0, #11
- movs r1, #30
- bl sub_020074a2
- movs r1, #1
- movs r0, #12
- bl sub_02007cb2
- movs r0, #20
- bl sub_02007bf8
- movs r0, #12
- movs r1, #0
- bl sub_02007ce8
- movs r2, #30
- movs r0, #10
- movs r1, #11
- bl sub_020074f2
- movs r0, #10
- movs r1, #3
- bl sub_02007caa
- movs r0, #11
- movs r1, #3
- movs r2, #30
- bl sub_0200751c
- movs r2, #30
- movs r0, #10
- movs r1, #12
- bl sub_0200750e
- movs r0, #10
- movs r1, #3
- bl sub_02007cc6
- movs r0, #12
- movs r1, #3
- movs r2, #40
- bl sub_02007538
- movs r1, #192
- movs r0, #10
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02007d34
- movs r1, #192
- movs r0, #11
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02007d40
- movs r1, #192
- lsls r1, r1, #6
- movs r2, #0
- movs r0, #12
- bl sub_02007d4c
- movs r0, #20
- bl sub_02007c62
- movs r2, #20
- movs r0, #10
- movs r1, #4
- bl sub_0200756c
- movs r0, #10
- movs r1, #0
- bl sub_02007d5c
- ldr r2, [r5, #0]
- movs r3, #128
- ldr r5, [pc, #56]
- lsls r3, r3, #2
- str r3, [r2, r6]
- adds r0, r5, #0
- movs r1, #17
- bl sub_02007dc6
- adds r0, r5, #0
- movs r1, #16
- bl sub_02007dd6
- ldr r3, [pc, #36]
- ldr r2, [pc, #40]
- adds r3, r3, r2
- movs r2, #3
- strb r2, [r3, #0]
- movs r0, #12
- movs r1, #5
- bl sub_02007dd8
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x03001ebc
- .4byte 0x00000209
- .4byte 0x000012e1
- .4byte 0x00000015
- .4byte 0x02000240
- .2byte 0x022b
- .2byte 0x0000
+AlchemyC_02002db4:
+ .space 0x1d0
AlchemyC_02002f84:
.space 0x14
AlchemyC_02002f98:
diff --git a/games/gs1/assets/code/resource_38d_overlay.s b/games/gs1/assets/code/resource_38d_overlay.s
index 4b5e523fc..d468f31bc 100644
--- a/games/gs1/assets/code/resource_38d_overlay.s
+++ b/games/gs1/assets/code/resource_38d_overlay.s
@@ -1129,841 +1129,12 @@ AlchemyC_02001958:
AlchemyC_02001984:
.space 0x2a
.2byte 0x0000
- push {r5, r6, lr}
- bl sub_02003e24
- movs r0, #1
- movs r1, #1
- movs r2, #1
- negs r1, r1
- negs r2, r2
- movs r3, #0
- negs r0, r0
- bl sub_02003f46
- movs r0, #1
- bl sub_02003dd4
- bl sub_02003f58
- movs r5, #0
- adds r0, #85
- movs r1, #1
- movs r2, #166
- movs r3, #0
- strb r5, [r0, #0]
- negs r1, r1
- lsls r2, r2, #18
- ldr r0, [pc, #716]
- bl sub_02003f66
- movs r0, #1
- bl sub_02003df4
- movs r1, #0
- movs r2, #0
- movs r0, #0
- bl sub_02003eee
- bl sub_02003e1a
- movs r0, #1
- bl sub_02003e08
- ldr r6, [pc, #688]
- movs r3, #224
- ldr r1, [r6, #0]
- lsls r3, r3, #1
- adds r2, r1, r3
- adds r3, #65
- str r3, [r2, #0]
- subs r3, #57
- adds r2, r1, r3
- movs r3, #16
- str r3, [r2, #0]
- bl sub_02003fb2
- bl sub_02003fc6
- movs r0, #40
- bl sub_02003e8c
- movs r1, #222
- movs r0, #19
- lsls r1, r1, #18
- ldr r2, [pc, #648]
- bl sub_02003f28
- movs r1, #226
- ldr r2, [pc, #640]
- movs r0, #0
- lsls r1, r1, #18
- bl sub_02003f34
- ldr r0, [pc, #636]
- ldr r1, [pc, #636]
- bl sub_02003fbc
- movs r1, #1
- movs r3, #1
- ldr r0, [pc, #612]
- negs r1, r1
- ldr r2, [pc, #628]
- bl sub_02003fd2
- movs r0, #19
- ldr r1, [pc, #624]
- ldr r2, [pc, #624]
- bl sub_02003efc
- movs r0, #0
- ldr r1, [pc, #600]
- ldr r2, [pc, #620]
- bl sub_02003f06
- movs r1, #222
- movs r2, #180
- movs r0, #19
- lsls r1, r1, #2
- lsls r2, r2, #2
- bl sub_02003f44
- movs r1, #226
- movs r2, #184
- lsls r2, r2, #2
- lsls r1, r1, #2
- movs r0, #0
- bl sub_02003f52
- movs r0, #60
- bl sub_02003ef0
- movs r0, #19
- bl sub_02003f7e
- movs r1, #1
- movs r0, #19
- bl sub_02003f96
- movs r0, #0
- bl sub_02003f8c
- movs r1, #1
- movs r0, #0
- bl sub_02003fa4
- movs r0, #20
- bl sub_02003f12
- movs r0, #19
- movs r1, #2
- bl sub_02003fd2
- ldr r0, [pc, #540]
- bl sub_02003ff0
- ldr r0, [pc, #540]
- movs r5, #1
- bl sub_02003f10
- cmp r0, #0
- bne.n .L_02001ad6
- ldr r2, [r6, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r5, #0
-.L_02001ad6:
- movs r0, #19
- movs r1, #0
- bl sub_02004024
- cmp r5, #0
- beq.n .L_02001af0
- ldr r2, [r6, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02001af0:
- movs r1, #1
- movs r2, #166
- lsls r2, r2, #18
- movs r3, #1
- ldr r0, [pc, #436]
- negs r1, r1
- bl sub_0200407e
- ldr r1, [pc, #472]
- movs r0, #19
- bl sub_02003fae
- movs r2, #171
- movs r0, #0
- ldr r1, [pc, #464]
- lsls r2, r2, #2
- bl sub_02003fea
- movs r0, #0
- bl sub_02003fb0
- cmp r0, #0
- beq.n .L_02001b28
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_0200401e
-.L_02001b28:
- movs r0, #0
- bl sub_02003fc4
- cmp r0, #0
- beq.n .L_02001b3c
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #2
- bl sub_02004032
-.L_02001b3c:
- movs r0, #0
- bl sub_02003fd8
- cmp r0, #0
- beq.n .L_02001b50
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #3
- bl sub_02004046
-.L_02001b50:
- movs r0, #1
- ldr r1, [pc, #360]
- ldr r2, [pc, #376]
- bl sub_02003ff8
- movs r0, #2
- ldr r1, [pc, #348]
- ldr r2, [pc, #368]
- bl sub_02004002
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #8
- movs r0, #3
- lsls r1, r1, #9
- bl sub_02004010
- movs r0, #1
- movs r1, #2
- bl sub_02004078
- movs r0, #2
- movs r1, #2
- bl sub_02004080
- movs r0, #3
- movs r1, #2
- bl sub_02004088
- movs r1, #16
- movs r0, #1
- negs r1, r1
- movs r2, #16
- bl sub_0200407c
- movs r0, #2
- movs r1, #16
- movs r2, #16
- bl sub_02004086
- movs r2, #16
- movs r1, #32
- movs r0, #3
- bl sub_02004090
- movs r0, #2
- bl sub_0200409e
- movs r0, #1
- movs r1, #1
- bl sub_020040b6
- movs r0, #2
- movs r1, #1
- bl sub_020040be
- movs r1, #1
- movs r0, #3
- bl sub_020040c6
- movs r0, #10
- bl sub_02004034
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004138
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #2
- bl sub_02004144
- movs r0, #3
- bl sub_020040da
- movs r1, #160
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #3
- bl sub_02004156
- movs r0, #19
- bl sub_020040ac
- movs r0, #20
- bl sub_0200406a
- ldr r0, [pc, #208]
- movs r5, #1
- bl sub_0200405a
- cmp r0, #0
- bne.n .L_02001c20
- ldr r2, [r6, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r5, #0
-.L_02001c20:
- movs r0, #18
- movs r1, #3
- bl sub_02004146
- ldr r0, [pc, #184]
- movs r1, #0
- movs r2, #20
- bl sub_02004180
- cmp r5, #0
- beq.n .L_02001c44
- ldr r2, [r6, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02001c44:
- ldr r0, [pc, #144]
- movs r5, #1
- bl sub_0200409a
- cmp r0, #0
- bne.n .L_02001c60
- ldr r2, [r6, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r5, #0
-.L_02001c60:
- movs r0, #18
- movs r1, #1
- bl sub_02004186
- ldr r0, [pc, #120]
- movs r1, #0
- movs r2, #10
- bl sub_020041c0
- cmp r5, #0
- beq.n .L_02001c84
- ldr r2, [r6, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02001c84:
- bl sub_020035de
- movs r0, #20
- bl sub_020040f4
- ldr r0, [pc, #72]
- bl sub_020040e2
- cmp r0, #0
- beq.n .L_02001cec
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #60
- bl sub_0200420a
- movs r0, #1
- ldr r1, [pc, #64]
- movs r2, #40
- bl sub_02004214
- b.n .L_02001cf2
- .4byte 0x037e0000
- .4byte 0x03001ebc
- .4byte 0x031e0000
- .4byte 0x00009999
- .4byte 0x00001333
- .4byte 0x02ba0000
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x00004ccc
- .4byte 0x00001728
- .4byte 0x0000084f
- .4byte 0x0200a5d4
- .4byte 0x0000037e
- .4byte 0x00002012
- .2byte 0x0105
- .2byte 0x0000
-.L_02001cec:
- movs r0, #40
- bl sub_02004158
-.L_02001cf2:
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #10
- bl sub_0200425c
- ldr r0, [pc, #296]
- movs r1, #0
- movs r2, #10
- bl sub_02004256
- movs r1, #192
- movs r2, #10
- movs r0, #2
- lsls r1, r1, #8
- bl sub_02004272
- movs r0, #2
- movs r1, #3
- bl sub_02004222
- ldr r0, [pc, #268]
- movs r1, #0
- bl sub_0200426a
- movs r1, #160
- movs r2, #10
- movs r0, #3
- lsls r1, r1, #8
- bl sub_0200428e
- movs r0, #3
- movs r1, #3
- bl sub_0200423e
- movs r2, #20
- ldr r0, [pc, #244]
- movs r1, #0
- bl sub_02004290
- movs r1, #3
- movs r0, #18
- bl sub_02004250
- movs r0, #20
- bl sub_020041b6
- ldr r0, [pc, #224]
- movs r1, #0
- movs r2, #20
- bl sub_020042a8
- movs r0, #1
- ldr r1, [pc, #216]
- movs r2, #0
- bl sub_020042ca
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #60
- bl sub_020042d6
- ldr r0, [pc, #200]
- bl sub_020041c4
- cmp r0, #0
- beq.n .L_02001df8
- movs r0, #18
- movs r1, #1
- bl sub_020042a0
- movs r0, #18
- movs r1, #4
- bl sub_02004290
- movs r1, #0
- ldr r0, [pc, #164]
- bl sub_020042d0
- bl sub_020036ec
- movs r0, #0
- movs r1, #0
- movs r5, #1
- bl sub_0200422e
- cmp r0, #0
- beq.n .L_02001db6
- ldr r3, [pc, #152]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r5, #0
-.L_02001db6:
- movs r1, #160
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #18
- bl sub_02004320
- bl sub_02003748
- movs r0, #10
- bl sub_02004232
- ldr r0, [pc, #100]
- movs r1, #0
- movs r2, #10
- bl sub_02004324
- cmp r5, #0
- beq.n .L_02001dea
- ldr r3, [pc, #100]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02001dea:
- movs r1, #129
- movs r0, #18
- lsls r1, r1, #1
- movs r2, #60
- bl sub_0200435c
- b.n .L_02001e08
-.L_02001df8:
- ldr r3, [pc, #68]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #4
- strh r3, [r2, #0]
-.L_02001e08:
- movs r1, #0
- ldr r0, [pc, #40]
- bl sub_0200434e
- bl sub_0200376a
- movs r0, #0
- movs r1, #0
- bl sub_020042aa
- cmp r0, #0
- bne.n .L_02001e48
- ldr r0, [pc, #32]
- bl sub_0200435c
- b.n .L_02001e4e
- .4byte 0x00004001
- .4byte 0x00004002
- .4byte 0x00004003
- .4byte 0x00002012
- .4byte 0x00000103
- .4byte 0x0000084f
- .4byte 0x03001ebc
- .2byte 0x1737
- .2byte 0x0000
-.L_02001e48:
- ldr r0, [pc, #824]
- bl sub_02004384
-.L_02001e4e:
- bl sub_020037d4
- movs r2, #20
- ldr r0, [pc, #816]
- movs r1, #0
- bl sub_020043aa
- movs r1, #1
- movs r0, #19
- bl sub_02004382
- ldr r0, [pc, #804]
- bl sub_020043a0
- movs r0, #19
- movs r1, #0
- movs r2, #10
- bl sub_020043c2
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_020043de
- movs r1, #224
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020043ea
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_020043f4
- movs r1, #128
- movs r2, #40
- movs r0, #3
- lsls r1, r1, #8
- bl sub_02004400
- movs r0, #18
- movs r1, #2
- bl sub_020043c8
- ldr r0, [pc, #732]
- movs r1, #0
- movs r2, #10
- bl sub_02004402
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #0
- bl sub_0200441e
- bl sub_02003846
- movs r0, #10
- bl sub_02004330
- movs r0, #18
- ldr r1, [pc, #704]
- movs r2, #60
- bl sub_0200443a
- movs r2, #10
- ldr r0, [pc, #688]
- movs r1, #0
- bl sub_0200442c
- movs r0, #0
- movs r1, #3
- bl sub_020043e4
- movs r0, #1
- movs r1, #3
- bl sub_020043ec
- movs r0, #2
+AlchemyC_020019b0:
+ .space 0x540
.L_02001ef0:
- movs r1, #3
- bl sub_020043f4
- movs r1, #3
- movs r0, #3
- bl sub_02004404
- movs r0, #20
- bl sub_0200436a
- movs r0, #18
- movs r1, #3
- bl sub_02004412
- ldr r0, [pc, #632]
- movs r1, #0
- movs r2, #10
- bl sub_02004464
- movs r1, #132
- movs r0, #18
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02004488
- ldr r0, [pc, #612]
- movs r1, #0
- movs r2, #10
- bl sub_0200447a
- movs r1, #192
- movs r0, #18
- lsls r1, r1, #6
- movs r2, #10
- bl sub_02004496
- movs r2, #10
- ldr r0, [pc, #588]
- movs r1, #0
- bl sub_02004490
- movs r0, #18
- movs r1, #3
- bl sub_02004450
- movs r1, #0
- ldr r0, [pc, #568]
- bl sub_02004490
- bl sub_020038ac
- movs r0, #0
- movs r1, #0
- movs r5, #1
- bl sub_020043ee
- cmp r0, #1
- bne.n .L_02001f76
- ldr r3, [pc, #556]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r5, #0
-.L_02001f76:
- bl sub_020038fc
- ldr r0, [pc, #524]
- movs r1, #0
- movs r2, #10
- bl sub_020044d2
- cmp r5, #0
- beq.n .L_02001f98
- ldr r3, [pc, #520]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02001f98:
- movs r1, #224
- movs r2, #10
- movs r0, #18
- lsls r1, r1, #7
- bl sub_02004502
- movs r0, #19
- movs r1, #1
- bl sub_020044ca
- movs r1, #128
- movs r2, #20
- movs r0, #19
- lsls r1, r1, #5
- bl sub_02004516
- movs r1, #3
- movs r0, #18
- bl sub_020044c6
- movs r0, #20
- bl sub_0200442c
- movs r0, #19
- movs r1, #3
- bl sub_020044d4
- movs r0, #19
- movs r1, #0
- movs r2, #10
- bl sub_02004526
- movs r1, #192
- movs r0, #19
- lsls r1, r1, #6
- movs r2, #10
- bl sub_02004542
- movs r1, #192
- movs r2, #20
- movs r0, #18
- lsls r1, r1, #6
- bl sub_0200454e
- movs r0, #18
- movs r1, #1
- bl sub_02004516
- movs r2, #10
- ldr r0, [pc, #396]
- movs r1, #0
- bl sub_02004550
- movs r0, #18
- movs r1, #3
- bl sub_02004510
- movs r2, #10
- ldr r0, [pc, #376]
- movs r1, #0
- bl sub_02004562
- movs r0, #0
- movs r1, #3
- bl sub_0200451a
- movs r0, #1
- movs r1, #3
- bl sub_02004522
- movs r0, #2
- movs r1, #3
- bl sub_0200452a
- movs r1, #3
- movs r0, #3
- bl sub_0200453a
- movs r0, #20
- bl sub_020044a0
- movs r0, #1
- movs r1, #2
- bl sub_02004540
- movs r0, #0
- bl sub_020044de
- cmp r0, #0
- beq.n .L_0200205a
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_02004518
-.L_0200205a:
- movs r0, #2
- movs r1, #2
- bl sub_02004560
- movs r0, #0
- bl sub_020044fe
- cmp r0, #0
- beq.n .L_0200207a
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #2
- bl sub_02004538
-.L_0200207a:
- movs r0, #3
- movs r1, #2
- bl sub_02004580
- movs r0, #0
- bl sub_0200451e
- cmp r0, #0
- beq.n .L_0200209a
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #3
- bl sub_02004558
-.L_0200209a:
- movs r0, #1
- bl sub_0200458e
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_020045a0
- movs r1, #0
- movs r2, #0
- movs r0, #2
- bl sub_020045aa
- movs r0, #3
- bl sub_020045a8
- movs r1, #0
- movs r2, #0
- movs r0, #3
- bl sub_020045ba
- movs r0, #20
- bl sub_02004530
- movs r1, #160
- movs r0, #18
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02004634
- ldr r2, [pc, #192]
- movs r0, #0
- ldr r1, [pc, #192]
- bl sub_0200460e
- movs r1, #213
- movs r0, #19
- lsls r1, r1, #2
- ldr r2, [pc, #184]
- bl sub_020045c2
- movs r1, #213
- movs r0, #19
- lsls r1, r1, #2
- ldr r2, [pc, #176]
- bl sub_020045ce
- movs r1, #216
- movs r2, #168
- movs r0, #19
- lsls r1, r1, #2
- lsls r2, r2, #2
- bl sub_020045dc
- movs r1, #128
- movs r2, #10
- movs r0, #19
- lsls r1, r1, #5
- bl sub_02004670
- movs r1, #1
- movs r0, #19
- bl sub_02004638
- movs r0, #10
- bl sub_02004586
- movs r0, #19
- movs r1, #0
- movs r2, #10
- bl sub_02004678
- movs r2, #177
- movs r0, #19
- ldr r1, [pc, #120]
- lsls r2, r2, #2
- bl sub_0200460c
- movs r2, #191
- movs r0, #19
- ldr r1, [pc, #112]
- lsls r2, r2, #2
+ .space 0x24e
.L_0200213e:
- bl sub_02004610
- movs r2, #191
- movs r0, #0
- ldr r1, [pc, #100]
- lsls r2, r2, #2
- bl sub_02004624
- bl sub_020046f0
- bl sub_020046fc
- ldr r0, [pc, #88]
- bl sub_020045b2
- ldr r0, [pc, #84]
- bl sub_020045b0
- cmp r0, #0
- bne.n .L_02002172
- ldr r0, [pc, #76]
- bl sub_020045c2
- ldr r0, [pc, #72]
- bl sub_020045c8
-.L_02002172:
- movs r0, #6
- bl sub_02004706
- bl sub_020045f2
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00001738
- .4byte 0x00002012
- .4byte 0x00001739
- .4byte 0x00000105
- .4byte 0x03001ebc
- .4byte 0x0200a5c0
- .4byte 0x00010013
- .4byte 0x00000286
- .4byte 0x0000029a
- .4byte 0x00000376
- .4byte 0x0000037e
- .4byte 0x00000322
- .4byte 0x0000084f
- .2byte 0x084a
- .2byte 0x0000
+ .space 0x7e
push {r5, r6, lr}
sub sp, #8
bl sub_02004632
diff --git a/games/gs1/assets/code/resource_38e_overlay.s b/games/gs1/assets/code/resource_38e_overlay.s
index 9560993cd..9a410d000 100644
--- a/games/gs1/assets/code/resource_38e_overlay.s
+++ b/games/gs1/assets/code/resource_38e_overlay.s
@@ -521,400 +521,10 @@ AlchemyC_0200045c:
.space 0x60
AlchemyC_020004bc:
.space 0x50
- push {lr}
- ldr r0, [pc, #172]
- bl sub_02000fc6
- cmp r0, #0
- beq.n .L_02000520
- movs r0, #128
- lsls r0, r0, #2
- bl sub_02000fe2
-.L_02000520:
- ldr r0, [pc, #156]
- bl sub_02000fd8
- cmp r0, #0
- bne.n .L_02000530
- movs r0, #13
- bl sub_02000ea2
-.L_02000530:
- ldr r0, [pc, #144]
- bl sub_02000fe8
- cmp r0, #0
- beq.n .L_0200057c
- movs r1, #154
- movs r0, #11
- lsls r1, r1, #17
- ldr r2, [pc, #132]
- bl sub_02001068
- movs r1, #173
- movs r0, #12
- lsls r1, r1, #17
- ldr r2, [pc, #120]
- bl sub_02001074
- ldr r0, [pc, #120]
- bl sub_0200100a
- cmp r0, #0
- bne.n .L_0200057c
- ldr r0, [pc, #112]
- bl sub_02001014
- cmp r0, #0
- bne.n .L_0200057c
- movs r0, #11
- movs r1, #0
- movs r2, #0
- bl sub_02001092
- movs r1, #128
- ldr r2, [pc, #96]
- movs r0, #12
- lsls r1, r1, #9
- bl sub_020010c6
-.L_0200057c:
- ldr r0, [pc, #80]
- bl sub_02001034
- cmp r0, #0
- beq.n .L_020005b8
- movs r1, #224
- movs r2, #146
- movs r0, #10
- lsls r1, r1, #16
- lsls r2, r2, #17
- bl sub_020010b6
- movs r1, #128
- movs r0, #10
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200111a
- movs r0, #8
- movs r1, #0
- movs r2, #0
- bl sub_02001124
- ldr r0, [pc, #44]
- bl sub_02001062
- cmp r0, #0
- bne.n .L_020005b8
- bl sub_02000b92
-.L_020005b8:
- pop {r0}
- bx r0
- .4byte 0x00000109
- .4byte 0x00000fd2
- .4byte 0x0000084a
- .4byte 0x01070000
- .4byte 0x0000084f
- .4byte 0x00000845
- .4byte 0x02008bf4
- .2byte 0x085e
- .2byte 0x0000
- push {lr}
- bl sub_020010b4
- movs r0, #1
- movs r1, #1
- movs r2, #1
- negs r0, r0
- negs r1, r1
- negs r2, r2
- movs r3, #0
- bl sub_0200118e
- movs r0, #160
- movs r1, #1
- movs r2, #160
- movs r3, #0
- negs r1, r1
- lsls r2, r2, #17
- lsls r0, r0, #17
- bl sub_020011a0
- bl sub_02001094
- movs r0, #1
- bl sub_0200105a
- movs r1, #160
- movs r2, #186
- lsls r2, r2, #17
- movs r0, #0
- lsls r1, r1, #17
- bl sub_02001140
- bl sub_020011cc
- ldr r0, [pc, #660]
- ldr r1, [pc, #660]
- bl sub_020011bc
- movs r0, #160
- movs r1, #1
- movs r2, #145
- movs r3, #1
- lsls r0, r0, #17
- negs r1, r1
- lsls r2, r2, #17
- bl sub_020011d6
- movs r0, #0
- ldr r1, [pc, #640]
- ldr r2, [pc, #640]
- bl sub_02001140
- movs r1, #160
- movs r2, #155
- movs r0, #0
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_0200115e
- movs r1, #192
- movs r2, #10
- movs r0, #11
- lsls r1, r1, #6
- bl sub_020011da
- movs r0, #11
- movs r1, #2
- bl sub_020011a2
- movs r1, #128
- lsls r1, r1, #1
- movs r2, #60
- movs r0, #11
- bl sub_020011f6
- ldr r0, [pc, #592]
- bl sub_020011cc
- movs r0, #11
- movs r1, #0
- movs r2, #10
- bl sub_020011ee
- movs r1, #160
- movs r2, #10
- movs r0, #12
- lsls r1, r1, #7
- bl sub_0200120a
- movs r0, #12
- movs r1, #2
- bl sub_020011d2
- movs r1, #128
- movs r0, #12
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02001226
- movs r0, #12
- movs r1, #0
- movs r2, #20
- bl sub_02001218
- movs r1, #128
- movs r0, #11
- lsls r1, r1, #5
- movs r2, #0
- bl sub_02001234
- movs r1, #224
- movs r0, #12
- lsls r1, r1, #7
- movs r2, #40
- bl sub_02001240
- movs r1, #192
- movs r0, #11
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200124c
- movs r1, #160
- movs r2, #10
- movs r0, #12
- lsls r1, r1, #7
- bl sub_02001258
- movs r0, #11
- movs r1, #1
- bl sub_02001228
- movs r2, #10
- movs r0, #11
- movs r1, #0
- bl sub_0200125a
- movs r0, #12
- movs r1, #1
- bl sub_0200123a
- movs r1, #0
- movs r0, #12
- bl sub_0200125a
- movs r1, #224
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02001286
- b.n .L_0200073a
-.L_0200070e:
- movs r1, #128
- lsls r1, r1, #1
- movs r2, #60
- movs r0, #12
- bl sub_0200129c
- ldr r0, [pc, #432]
- bl sub_02001272
- movs r0, #12
- movs r1, #0
- movs r2, #10
- bl sub_02001294
- movs r0, #12
- movs r1, #2
- bl sub_0200126c
- movs r0, #12
- movs r1, #0
- bl sub_02001294
-.L_0200073a:
- movs r0, #0
- movs r1, #0
- bl sub_0200122c
- cmp r0, #0
- bne.n .L_0200070e
- movs r0, #10
- bl sub_02001216
- movs r1, #192
- movs r0, #11
- lsls r1, r1, #6
- movs r2, #0
- bl sub_020012d2
- movs r1, #160
- movs r2, #20
- movs r0, #12
- lsls r1, r1, #7
- bl sub_020012de
- movs r0, #11
- movs r1, #3
- bl sub_02001296
- movs r1, #3
- movs r0, #12
- bl sub_020012a6
- movs r0, #20
- bl sub_02001244
- movs r1, #1
- movs r0, #11
- bl sub_020012c4
- ldr r0, [pc, #332]
- bl sub_020012da
- movs r0, #11
- movs r1, #0
- movs r2, #10
- bl sub_020012fc
- movs r1, #128
- movs r2, #128
- movs r0, #11
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200129a
- movs r1, #157
- movs r2, #140
- movs r0, #11
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_020012b8
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02001334
- movs r2, #40
- movs r0, #11
- movs r1, #0
- bl sub_0200132e
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02001358
- movs r0, #60
- bl sub_0200129e
- ldr r0, [pc, #252]
- bl sub_0200128c
- cmp r0, #0
- bne.n .L_0200081e
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #9
- lsls r2, r2, #8
- movs r0, #12
- bl sub_020012e6
- movs r0, #12
- bl sub_020012e4
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #254
- ands r3, r2
- movs r1, #173
- strb r3, [r0, #0]
- ldr r2, [pc, #216]
- lsls r1, r1, #1
- movs r0, #12
- bl sub_02001312
- movs r0, #1
- bl sub_020012d8
- movs r0, #12
- bl sub_02001306
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #1
- orrs r3, r2
- strb r3, [r0, #0]
-.L_0200081e:
- movs r0, #11
- ldr r1, [pc, #184]
- ldr r2, [pc, #188]
- bl sub_02001322
- movs r0, #0
- ldr r1, [pc, #176]
- ldr r2, [pc, #176]
- bl sub_0200132c
- movs r1, #164
- movs r2, #131
- movs r0, #11
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_02001342
- movs r1, #164
- movs r2, #139
- lsls r2, r2, #1
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02001358
- movs r1, #1
- movs r0, #11
- bl sub_02001380
- bl sub_02001140
- movs r0, #40
- bl sub_0200132a
- movs r1, #164
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #242
- bl sub_0200136e
- movs r1, #164
- movs r0, #11
- lsls r1, r1, #1
- movs r2, #242
- bl sub_02001382
- movs r1, #0
- movs r2, #0
- movs r0, #11
- bl sub_020013a4
- movs r0, #0
- bl sub_020013a2
- movs r1, #0
- movs r0, #0
- movs r2, #0
- bl sub_020013b4
- ldr r3, [pc, #80]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #65
- str r2, [r3, #0]
- bl sub_02001456
- bl sub_02001462
- movs r0, #10
- bl sub_02001450
- bl sub_0200138c
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00003333
- .4byte 0x00000666
- .4byte 0x00009999
- .4byte 0x00004ccc
- .4byte 0x00001720
- .4byte 0x00001724
- .4byte 0x00001726
- .4byte 0x0000084a
- .4byte 0x00000107
- .4byte 0x0000cccc
- .4byte 0x00006666
- .2byte 0x1ebc
- .2byte 0x0300
+AlchemyC_0200050c:
+ .space 0xd0
+AlchemyC_020005dc:
+ .space 0x30c
AlchemyC_020008e8:
.space 0x24
AlchemyC_0200090c:
diff --git a/games/gs1/assets/code/resource_395_overlay.s b/games/gs1/assets/code/resource_395_overlay.s
index 7356f21d7..58c1dcfde 100644
--- a/games/gs1/assets/code/resource_395_overlay.s
+++ b/games/gs1/assets/code/resource_395_overlay.s
@@ -566,1192 +566,8 @@ AlchemyC_020002c0:
.space 0x2c
AlchemyC_020002ec:
.space 0x19c
- push {r5, r6, lr}
- movs r0, #3
- bl sub_02001e0e
- movs r1, #164
- lsls r1, r1, #1
- movs r2, #212
- adds r6, r0, #0
- movs r0, #0
- bl sub_02001e7c
- movs r1, #192
- movs r2, #20
- lsls r1, r1, #8
- movs r0, #0
- bl sub_02001ee8
- movs r0, #17
- bl sub_02001f5e
- ldr r0, [pc, #952]
- movs r1, #1
- bl sub_02001e16
- movs r1, #128
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02001e7c
- movs r1, #128
- movs r2, #128
- movs r0, #2
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02001e8a
- movs r0, #0
- bl sub_02001e88
- cmp r0, #0
- beq.n .L_020004e8
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_02001ece
-.L_020004e8:
- movs r0, #0
- bl sub_02001e9c
- cmp r0, #0
- beq.n .L_020004fc
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #2
- bl sub_02001ee2
-.L_020004fc:
- ldr r1, [pc, #880]
- movs r0, #1
- bl sub_02001ec2
- ldr r1, [pc, #876]
- movs r0, #2
- bl sub_02001eca
- cmp r6, #0
- beq.n .L_0200053a
- movs r1, #128
- movs r2, #128
- movs r0, #3
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02001ed4
- movs r0, #0
- bl sub_02001ed2
- cmp r0, #0
- beq.n .L_02000532
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #3
- bl sub_02001f18
-.L_02000532:
- ldr r1, [pc, #836]
- movs r0, #3
- bl sub_02001ef8
-.L_0200053a:
- movs r0, #2
- bl sub_02001f06
- movs r0, #40
- bl sub_02001ed4
- movs r0, #0
- bl sub_02001e02
- movs r0, #32
- bl sub_02001fd8
- movs r0, #40
- bl sub_02001e5e
- ldr r5, [pc, #800]
- movs r3, #0
- movs r1, #200
- str r3, [r5, #0]
- lsls r1, r1, #4
- ldr r0, [pc, #796]
- bl sub_02001e76
- movs r0, #40
- bl sub_02001efc
- movs r1, #192
- movs r2, #20
- movs r0, #1
- lsls r1, r1, #7
- bl sub_02001fb8
- ldr r0, [pc, #776]
- ldr r1, [pc, #776]
- bl sub_02001fd8
- movs r0, #128
- movs r1, #1
- movs r2, #254
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #16
- lsls r0, r0, #17
- bl sub_02001ff2
- bl sub_02001ffe
- movs r0, #246
- bl sub_0200204c
- movs r0, #40
- bl sub_02001f32
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #6
- movs r2, #20
- bl sub_02001fee
- movs r1, #1
- movs r3, #1
- negs r1, r1
- ldr r2, [pc, #724]
- ldr r0, [pc, #724]
- bl sub_0200201c
- bl sub_02002028
-.L_020005c2:
- movs r0, #246
- bl sub_02002076
- movs r0, #40
- bl sub_02001f5c
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002018
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #7
- movs r2, #20
- bl sub_02002024
- movs r0, #163
- movs r1, #1
- movs r2, #192
- movs r3, #1
- lsls r0, r0, #17
- negs r1, r1
- lsls r2, r2, #17
- bl sub_02002056
- bl sub_02002062
- movs r0, #246
- bl sub_020020b0
- ldr r3, [r5, #0]
- cmp r3, #24
- beq.n .L_02000614
-.L_02000608:
- movs r0, #1
- bl sub_02001f14
- ldr r3, [r5, #0]
- cmp r3, #24
- bne.n .L_02000608
-.L_02000614:
- ldr r0, [pc, #616]
- bl sub_02001f30
- movs r0, #10
- bl sub_02001f26
- movs r5, #0
-.L_02000622:
- movs r0, #0
- bl sub_02001ede
- movs r0, #6
- bl sub_020020b4
- movs r0, #6
- bl sub_02001f3a
- movs r0, #1
- bl sub_02001ef0
- movs r0, #6
- bl sub_020020c6
- adds r5, #1
- movs r0, #6
- bl sub_02001f4e
- cmp r5, #3
- bls.n .L_02000622
- movs r0, #0
- bl sub_02001f08
- movs r0, #40
- bl sub_020020de
- movs r0, #80
- bl sub_02001f64
- movs r0, #164
- movs r1, #128
- movs r2, #212
- movs r3, #1
- lsls r2, r2, #16
- lsls r1, r1, #12
- lsls r0, r0, #17
- bl sub_020020ce
- bl sub_020020da
- movs r0, #40
- bl sub_02002008
- movs r1, #1
- movs r0, #10
- bl sub_02001974
- movs r0, #40
- bl sub_02002016
- movs r0, #7
- bl sub_0200213c
- ldr r0, [pc, #516]
- bl sub_020020b2
- movs r0, #8
- movs r1, #0
- bl sub_020020ca
- movs r0, #0
- movs r1, #2
- bl sub_020020aa
- movs r0, #1
- movs r1, #2
- bl sub_020020b2
- movs r0, #3
- movs r1, #2
- bl sub_020020ba
- movs r0, #2
- movs r1, #2
- bl sub_020020ca
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002106
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002112
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200211e
- movs r1, #192
- movs r2, #20
- movs r0, #2
- lsls r1, r1, #8
- bl sub_0200212a
- movs r1, #2
- movs r0, #10
- bl sub_020019e6
- movs r0, #20
- bl sub_02002088
- movs r1, #3
- movs r0, #10
- bl sub_020019f4
- movs r0, #40
- bl sub_02002096
- movs r1, #1
- movs r0, #10
- bl sub_02001a02
- movs r0, #20
- bl sub_020020a4
- movs r0, #8
- movs r1, #0
- bl sub_0200214c
- movs r0, #0
- ldr r1, [pc, #372]
- movs r2, #0
- bl sub_02002176
- movs r0, #1
- ldr r1, [pc, #364]
- movs r2, #0
- bl sub_02002180
- movs r0, #3
- ldr r1, [pc, #352]
- movs r2, #0
- bl sub_0200218a
- movs r0, #2
- ldr r1, [pc, #344]
- movs r2, #40
- bl sub_02002194
- movs r0, #234
- movs r2, #232
- movs r3, #1
- lsls r2, r2, #16
- movs r1, #0
- lsls r0, r0, #16
- bl sub_020021b4
- bl sub_020021c0
- movs r0, #40
- bl sub_020020ee
- movs r1, #1
- movs r0, #11
-.L_02000764:
- bl sub_02001a5a
- movs r0, #40
- bl sub_020020fc
- movs r1, #3
- movs r0, #11
- bl sub_02001a68
- movs r0, #20
- bl sub_0200210a
- movs r2, #20
- ldr r0, [pc, #284]
- movs r1, #0
- bl sub_020021bc
- movs r1, #2
- movs r0, #11
- bl sub_02001a80
- movs r0, #10
- bl sub_02002122
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_020021de
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #7
- movs r2, #0
- bl sub_020021ea
- movs r1, #192
- movs r0, #2
- lsls r1, r1, #7
- movs r2, #0
- bl sub_020021f6
- movs r1, #192
- movs r2, #20
- movs r0, #3
- lsls r1, r1, #7
- bl sub_02002202
- movs r1, #3
- movs r0, #11
- bl sub_02001abe
- movs r0, #20
- bl sub_02002160
- movs r1, #2
- movs r0, #11
- bl sub_02001acc
- movs r0, #20
- bl sub_0200216e
- movs r0, #11
- movs r1, #3
- bl sub_02001ada
- movs r2, #10
- ldr r0, [pc, #176]
- movs r1, #0
- bl sub_02002228
- movs r1, #0
- movs r0, #10
- bl sub_02001aec
- movs r0, #20
- bl sub_0200218e
- ldr r0, [pc, #156]
- movs r1, #0
- bl sub_02002236
- movs r1, #1
- movs r0, #10
- bl sub_02001b02
- movs r0, #20
- bl sub_020021a4
- movs r1, #0
- ldr r0, [pc, #132]
- bl sub_02002244
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002268
- movs r1, #224
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002274
- movs r1, #160
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002280
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200228c
- movs r0, #0
- movs r1, #0
- bl sub_020021fc
- cmp r0, #0
- bne.n .L_020008a4
- ldr r0, [pc, #64]
- movs r1, #0
- bl sub_02002290
- ldr r0, [pc, #60]
- movs r1, #0
- bl sub_02002298
- b.n .L_02000926
- .4byte 0x000014ed
- .4byte 0x02009ab8
- .4byte 0x02009af4
- .4byte 0x02009b30
- .4byte 0x02009dd4
- .4byte 0x020092b5
- .4byte 0x00033333
- .4byte 0x00006666
- .4byte 0x01050000
- .4byte 0x019d0000
- .4byte 0x000014ee
- .4byte 0x00000105
- .4byte 0x00004009
- .2byte 0x8008
- .2byte 0x0000
-.L_020008a4:
- ldr r5, [pc, #496]
- movs r3, #236
- ldr r2, [r5, #0]
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #2
- strh r3, [r2, #0]
- movs r0, #3
- ldr r1, [pc, #484]
- movs r2, #0
- bl sub_0200230c
- movs r0, #1
- ldr r1, [pc, #472]
- movs r2, #0
- bl sub_02002316
- movs r0, #2
- ldr r1, [pc, #464]
- movs r2, #40
- bl sub_02002320
- movs r0, #1
- movs r1, #4
- bl sub_020022c8
- movs r0, #1
- movs r1, #0
- bl sub_02002310
- cmp r6, #0
- beq.n .L_020008f8
- movs r0, #3
- movs r1, #2
- bl sub_020022fc
- movs r0, #3
- movs r1, #0
- bl sub_02002324
- b.n .L_02000906
-.L_020008f8:
- ldr r2, [r5, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02000906:
- movs r0, #2
- movs r1, #3
- bl sub_02002304
- movs r0, #2
- movs r1, #0
- bl sub_02002344
- ldr r0, [pc, #392]
- movs r1, #0
- bl sub_0200234c
- ldr r0, [pc, #388]
- movs r1, #0
- bl sub_02002354
-.L_02000926:
- movs r0, #0
- movs r1, #3
- bl sub_0200231c
- movs r0, #1
- movs r1, #3
- bl sub_02002324
- movs r0, #3
- movs r1, #3
- bl sub_0200232c
- movs r0, #2
- movs r1, #3
- bl sub_0200233c
- movs r0, #164
- movs r1, #128
- movs r2, #212
- lsls r2, r2, #16
- movs r3, #1
- lsls r1, r1, #12
- lsls r0, r0, #17
- bl sub_020023b6
- bl sub_020023c2
- movs r0, #20
- bl sub_020022f0
- movs r1, #0
- movs r0, #10
- bl sub_02001c5c
- movs r0, #20
- bl sub_020022fe
- movs r0, #0
- bl sub_0200222c
- movs r0, #1
- bl sub_02002402
- movs r0, #1
- bl sub_02002288
- movs r1, #1
- ldr r0, [pc, #288]
- bl sub_02002400
- movs r0, #40
- bl sub_02002416
- movs r0, #60
- bl sub_02002324
- ldr r2, [pc, #276]
- movs r3, #0
- str r3, [r2, #0]
- ldr r2, [pc, #272]
- movs r3, #164
- lsls r3, r3, #17
- str r3, [r2, #0]
- movs r3, #192
- lsls r3, r3, #14
- str r3, [r2, #4]
- ldr r5, [pc, #264]
- movs r3, #205
- lsls r3, r3, #16
- movs r1, #200
- str r3, [r2, #8]
- lsls r1, r1, #4
- adds r0, r5, #0
- bl sub_020022ca
- movs r0, #100
- bl sub_02002350
- adds r0, r5, #0
- bl sub_020022de
- movs r1, #0
- ldr r0, [pc, #236]
- bl sub_02002446
- movs r0, #60
- bl sub_0200245c
- movs r0, #100
- bl sub_0200236a
- movs r0, #0
- bl sub_02002298
- movs r0, #20
- bl sub_0200246e
- movs r0, #40
- bl sub_0200237c
- movs r1, #1
- movs r0, #10
- bl sub_02001ce8
- movs r0, #10
- bl sub_0200238a
- ldr r0, [pc, #188]
- bl sub_02002420
- ldr r0, [pc, #160]
- movs r1, #0
- bl sub_02002438
- movs r0, #0
- movs r1, #3
- bl sub_02002400
- movs r0, #1
- movs r1, #3
- bl sub_02002408
- movs r0, #3
- movs r1, #3
- bl sub_02002410
- movs r0, #2
- movs r1, #3
- bl sub_02002420
- movs r0, #234
- movs r2, #232
- movs r3, #1
- lsls r2, r2, #16
- movs r1, #0
- lsls r0, r0, #16
- bl sub_02002498
- bl sub_020024a4
- movs r0, #20
- bl sub_020023d2
- ldr r0, [pc, #88]
- movs r1, #0
- bl sub_0200247a
- movs r2, #10
- ldr r0, [pc, #84]
- movs r1, #0
- bl sub_0200248c
- movs r0, #1
- movs r1, #2
- bl sub_0200246c
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_020024a8
- movs r1, #224
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #10
- bl sub_020024b4
- movs r1, #0
- movs r0, #1
- bl sub_020024a4
- movs r0, #0
- movs r1, #0
- bl sub_0200242c
- cmp r0, #0
- bne.n .L_02000ac0
- movs r1, #129
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #40
- bl sub_020024e4
- b.n .L_02000ad8
- .4byte 0x03001ebc
- .4byte 0x00000103
- .4byte 0x00004009
- .4byte 0x00008008
- .4byte 0x00406218
- .4byte 0x02009dcc
- .4byte 0x02009dc0
- .4byte 0x020095a1
- .4byte 0x00007fff
- .2byte 0x14fb
- .2byte 0x0000
-.L_02000ac0:
- movs r0, #1
- movs r1, #4
- bl sub_020024be
- ldr r3, [pc, #1012]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02000ad8:
- movs r0, #1
- movs r1, #0
- bl sub_0200250e
- movs r1, #4
- movs r0, #10
- bl sub_02001dda
- movs r0, #20
- bl sub_0200247c
- ldr r0, [pc, #980]
- bl sub_02002512
- ldr r0, [pc, #976]
- movs r1, #0
- bl sub_0200252a
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002546
- movs r1, #192
- movs r2, #0
- movs r0, #1
- lsls r1, r1, #8
- bl sub_02002552
- ldr r0, [pc, #944]
- movs r1, #0
- bl sub_0200254a
- movs r0, #0
- movs r1, #3
- bl sub_02002512
- movs r0, #1
- movs r1, #3
- bl sub_0200251a
- movs r0, #3
- movs r1, #3
- bl sub_02002522
- movs r0, #2
- movs r1, #3
- bl sub_02002532
- movs r1, #4
- movs r0, #10
- bl sub_02001e36
- movs r0, #20
- bl sub_020024d8
- movs r2, #20
- ldr r0, [pc, #888]
- movs r1, #0
- bl sub_0200258a
- movs r0, #11
- movs r1, #0
- bl sub_02001e4e
- movs r2, #20
- ldr r0, [pc, #876]
- movs r1, #0
- bl sub_0200259c
- movs r1, #3
- movs r0, #11
- bl sub_02001e60
- movs r0, #40
- bl sub_02002502
- movs r1, #1
- movs r0, #11
- bl sub_02001e6e
- movs r0, #20
- bl sub_02002510
- movs r2, #20
- ldr r0, [pc, #836]
- movs r1, #0
- bl sub_020025c2
- movs r1, #2
- movs r0, #10
- bl sub_02001e86
- movs r0, #20
- bl sub_02002528
- ldr r0, [pc, #812]
- movs r1, #0
- bl sub_020025d0
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_020025fc
- movs r1, #129
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02002608
- movs r1, #129
- movs r0, #3
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02002614
- movs r1, #129
- movs r2, #80
- movs r0, #2
- lsls r1, r1, #1
- bl sub_02002620
- movs r1, #5
- movs r0, #11
- bl sub_02001ecc
- movs r0, #60
- bl sub_0200256e
- movs r1, #3
- movs r0, #11
- bl sub_02001eda
- movs r0, #20
- bl sub_0200257c
- movs r2, #20
- ldr r0, [pc, #728]
- movs r1, #0
- bl sub_0200262e
- movs r1, #5
- movs r0, #10
- bl sub_02001ef2
- movs r0, #40
- bl sub_02002594
- movs r1, #2
- movs r0, #10
- bl sub_02001f00
- movs r0, #20
- bl sub_020025a2
- movs r2, #20
- ldr r0, [pc, #696]
- movs r1, #0
- bl sub_02002654
- movs r0, #1
- movs r1, #2
- bl sub_02002634
- movs r1, #128
- movs r2, #10
- movs r0, #1
- lsls r1, r1, #8
- bl sub_02002670
- movs r0, #1
- movs r1, #0
- bl sub_02002668
- movs r1, #128
- movs r2, #20
- movs r0, #2
- lsls r1, r1, #8
- bl sub_02002684
- ldr r0, [pc, #652]
- movs r1, #0
- bl sub_0200267c
- movs r1, #4
- movs r0, #11
- bl sub_02001f48
- movs r0, #20
- bl sub_020025ea
- ldr r0, [pc, #620]
- movs r1, #0
- movs r2, #20
- bl sub_0200269c
- movs r1, #224
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020026b0
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #10
- bl sub_020026bc
- movs r2, #20
- movs r0, #1
- movs r1, #0
- bl sub_020026be
- movs r0, #10
- movs r1, #1
- bl sub_02001f82
- movs r2, #10
- ldr r0, [pc, #564]
- movs r1, #0
- bl sub_020026d0
- movs r1, #2
- movs r0, #10
- bl sub_02001f94
- movs r0, #20
- bl sub_02002636
- movs r1, #3
- movs r0, #11
- bl sub_02001fa2
- movs r0, #40
- bl sub_02002644
- movs r1, #0
- movs r0, #11
- bl sub_02001fb0
- movs r0, #20
- bl sub_02002652
- movs r0, #0
- bl sub_02002580
- movs r0, #1
- bl sub_02002756
- movs r0, #1
- bl sub_020025dc
- movs r1, #1
- ldr r0, [pc, #508]
- bl sub_02002754
- movs r0, #40
- bl sub_0200276a
- movs r0, #60
- bl sub_02002678
- ldr r2, [pc, #496]
- movs r3, #0
- str r3, [r2, #0]
- ldr r2, [pc, #492]
- movs r3, #136
- lsls r3, r3, #16
- str r3, [r2, #0]
- movs r3, #160
- lsls r3, r3, #13
- str r3, [r2, #4]
- ldr r5, [pc, #484]
- movs r3, #129
- lsls r3, r3, #17
- movs r1, #200
- str r3, [r2, #8]
- lsls r1, r1, #4
- adds r0, r5, #0
- bl sub_0200261e
- movs r0, #100
- bl sub_020026a4
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002760
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200276c
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002778
- movs r1, #192
- movs r2, #40
- movs r0, #2
- lsls r1, r1, #7
- bl sub_02002784
- movs r0, #2
- movs r1, #1
- bl sub_02002754
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #1
- movs r2, #20
- bl sub_020027a8
- movs r2, #10
- ldr r0, [pc, #372]
- movs r1, #0
- bl sub_0200279a
- movs r0, #0
- movs r1, #2
- bl sub_0200277a
- movs r1, #128
- movs r2, #10
- movs r0, #0
- lsls r1, r1, #6
- bl sub_020027b6
- movs r0, #0
- movs r1, #3
- bl sub_02002776
- movs r1, #4
- movs r0, #10
- bl sub_0200207a
- movs r0, #20
- bl sub_0200271c
- ldr r0, [pc, #312]
- movs r1, #0
- bl sub_020027c4
- movs r0, #2
- ldr r1, [pc, #332]
- movs r2, #60
- bl sub_020027ee
- movs r1, #192
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #10
- bl sub_020027ea
- ldr r0, [pc, #292]
- movs r1, #0
- movs r2, #10
- bl sub_020027ec
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002800
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200280c
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02002818
- movs r2, #10
- ldr r0, [pc, #232]
- movs r1, #0
- bl sub_0200281a
- movs r0, #0
- movs r1, #3
- bl sub_020027da
- movs r0, #1
- movs r1, #3
- bl sub_020027e2
- movs r0, #3
- movs r1, #3
- bl sub_020027ea
- movs r1, #3
- movs r0, #2
- bl sub_020027fa
- movs r0, #10
- bl sub_02002798
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002854
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002860
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200286c
- movs r1, #192
- movs r2, #120
- lsls r1, r1, #7
- movs r0, #2
- bl sub_02002878
- adds r0, r5, #0
- bl sub_02002756
- movs r0, #60
- bl sub_020027d4
- movs r0, #0
- bl sub_02002702
- movs r0, #40
- bl sub_020028d8
- movs r1, #2
- movs r0, #10
- bl sub_0200214c
- movs r0, #20
- bl sub_020027ee
- movs r2, #20
- ldr r0, [pc, #100]
- movs r1, #0
- bl sub_020028a0
- movs r0, #11
- movs r1, #3
- bl sub_02002164
- ldr r0, [pc, #88]
- movs r1, #0
- bl sub_020028a8
- ldr r0, [pc, #76]
- movs r1, #0
- bl sub_020028b0
- movs r1, #4
- movs r0, #11
- bl sub_0200217c
- movs r0, #20
- bl sub_0200281e
- movs r2, #10
- ldr r0, [pc, #56]
- movs r1, #0
- bl sub_020028d0
- movs r0, #0
- movs r1, #2
- bl sub_020028a8
- movs r0, #1
- movs r1, #2
- bl sub_020028b0
- movs r0, #3
- movs r1, #2
- bl sub_020028b8
- movs r0, #2
- movs r1, #2
- bl sub_020028c8
- movs r0, #10
- movs r1, #1
- b.n .L_02000eec
- .4byte 0x03001ebc
- .4byte 0x00001501
- .4byte 0x00008008
- .4byte 0x00004009
- .4byte 0x00004008
- .4byte 0x00008002
- .4byte 0x00406218
- .4byte 0x02009dcc
- .4byte 0x02009dc0
- .4byte 0x020095a1
- .2byte 0x0101
- .2byte 0x0000
-.L_02000eec:
- bl sub_020021e2
- movs r1, #0
- ldr r0, [pc, #356]
- bl sub_0200291e
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002942
- movs r1, #224
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200294e
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200295a
- movs r1, #160
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002966
- movs r0, #0
- movs r1, #0
- bl sub_020028d6
- cmp r0, #1
- bne.n .L_02000f44
- ldr r3, [pc, #292]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02000f44:
- movs r0, #10
- bl sub_020028d8
- movs r1, #2
- movs r0, #10
- bl sub_02002244
- movs r0, #20
- bl sub_020028e6
- movs r1, #3
- movs r0, #11
- bl sub_02002252
- movs r0, #40
- bl sub_020028f4
- movs r1, #1
- movs r0, #10
- bl sub_02002260
- movs r0, #20
- bl sub_02002902
- ldr r0, [pc, #224]
- movs r1, #0
- movs r2, #10
- bl sub_020029b4
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_020029c8
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_020029d2
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020029de
- movs r1, #128
- movs r2, #10
- movs r0, #2
- lsls r1, r1, #8
- bl sub_020029ea
- movs r0, #0
- movs r1, #3
- bl sub_020029a2
- movs r0, #1
- movs r1, #3
- bl sub_020029aa
- movs r0, #3
- movs r1, #3
- bl sub_020029b2
- movs r1, #3
- movs r0, #2
- bl sub_020029c2
- movs r0, #17
- bl sub_02002a80
- ldr r5, [pc, #140]
- movs r0, #1
- adds r1, r5, #0
- bl sub_0200299a
- cmp r6, #0
- beq.n .L_02000fe8
- movs r0, #3
- adds r1, r5, #0
- bl sub_020029a6
-.L_02000fe8:
- adds r1, r5, #0
- movs r0, #2
- bl sub_020029be
- movs r0, #10
- movs r1, #4
- bl sub_020022ea
- movs r1, #4
- movs r0, #10
- bl sub_020022f2
- movs r0, #20
- bl sub_02002994
- ldr r0, [pc, #92]
- bl sub_02002a2a
- ldr r0, [pc, #72]
- movs r1, #0
- bl sub_02002a42
- movs r0, #11
- movs r1, #4
- bl sub_0200230e
- movs r1, #4
- movs r0, #11
- bl sub_02002316
- movs r0, #20
- bl sub_020029b8
- movs r2, #10
- ldr r0, [pc, #56]
- movs r1, #0
- bl sub_02002a6a
- movs r1, #3
- movs r0, #0
- bl sub_02002a32
- ldr r0, [pc, #44]
- bl sub_020029c8
- movs r0, #1
- bl sub_02002af6
- movs r0, #184
- movs r1, #185
- bl sub_0200277a
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00008008
- .4byte 0x03001ebc
- .4byte 0x02009b6c
- .4byte 0x00001519
- .4byte 0x00004009
- .2byte 0x0845
- .2byte 0x0000
+AlchemyC_02000488:
+ .space 0xbe8
push {r5, r6, r7, lr}
mov r7, sl
mov r6, r8
diff --git a/games/gs1/assets/code/resource_396_overlay.s b/games/gs1/assets/code/resource_396_overlay.s
index cc52ba323..e02319a72 100644
--- a/games/gs1/assets/code/resource_396_overlay.s
+++ b/games/gs1/assets/code/resource_396_overlay.s
@@ -559,268 +559,8 @@ AlchemyC_02000674:
.space 0x20
AlchemyC_02000694:
.space 0x8
- push {r5, r6, lr}
- movs r0, #3
- bl sub_0200216a
- adds r6, r0, #0
- bl sub_02002188
- movs r0, #17
- bl sub_020022a6
- ldr r0, [pc, #568]
- bl sub_02002204
- movs r1, #0
- movs r2, #20
- ldr r0, [pc, #564]
- bl sub_02002226
- movs r0, #29
- bl sub_020022bc
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020021d2
- movs r1, #128
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020021e0
- movs r1, #128
- movs r2, #128
- movs r0, #2
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020021ee
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #9
- lsls r2, r2, #8
- movs r0, #3
- bl sub_020021fc
- movs r0, #3
- bl sub_020021fa
- adds r0, #35
- ldrb r2, [r0, #0]
- movs r5, #254
- adds r3, r5, #0
- ands r3, r2
- strb r3, [r0, #0]
- movs r1, #2
- movs r0, #3
- bl sub_0200228e
- movs r0, #0
- bl sub_02002214
- adds r0, #35
- ldrb r3, [r0, #0]
- ands r5, r3
- strb r5, [r0, #0]
- movs r1, #2
- movs r0, #0
- bl sub_020022a4
- movs r0, #0
- bl sub_0200222a
- cmp r0, #0
- beq.n .L_02000742
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_02002258
-.L_02000742:
- movs r0, #0
- bl sub_0200223e
- cmp r0, #0
- beq.n .L_02000756
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #2
- bl sub_0200226c
-.L_02000756:
- cmp r6, #0
- beq.n .L_02000776
- movs r0, #0
- bl sub_02002256
- cmp r0, #0
- beq.n .L_0200076e
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #3
- bl sub_02002284
-.L_0200076e:
- ldr r1, [pc, #388]
- movs r0, #3
- bl sub_0200227c
-.L_02000776:
- ldr r1, [pc, #384]
- movs r0, #0
- bl sub_02002284
- ldr r1, [pc, #380]
- movs r0, #1
- bl sub_0200228c
- ldr r1, [pc, #376]
- movs r0, #2
- bl sub_0200229c
- movs r0, #10
- bl sub_0200226a
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200230e
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200231a
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002326
- movs r1, #192
- movs r2, #40
- movs r0, #2
- lsls r1, r1, #8
- bl sub_02002332
- movs r1, #11
- movs r0, #8
- bl sub_020022ea
- movs r0, #10
- bl sub_020022a8
- movs r1, #8
- movs r0, #8
-.L_020007d6:
- bl sub_020022f8
- movs r0, #20
- bl sub_020022b6
- movs r0, #8
- bl sub_02001c08
- ldr r0, [pc, #284]
-.L_020007e8:
- movs r1, #0
- bl sub_0200234c
- movs r0, #0
- movs r1, #2
- bl sub_02002324
- movs r0, #1
- movs r1, #2
- bl sub_0200232c
- movs r0, #3
-.L_02000800:
- movs r1, #2
- bl sub_02002334
- movs r0, #2
- movs r1, #2
- bl sub_0200233c
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02002398
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #0
- bl sub_020023a4
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #1
- movs r2, #0
- bl sub_020023b0
-.L_02000832:
- movs r1, #128
- lsls r1, r1, #1
- movs r2, #60
- movs r0, #2
- bl sub_020023bc
- movs r0, #11
- bl sub_02001c66
-.L_02000844:
- movs r2, #10
- ldr r0, [pc, #188]
- movs r1, #0
- bl sub_020023b4
- movs r0, #0
- movs r1, #1
- bl sub_02002384
- movs r0, #1
- movs r1, #1
- bl sub_0200238c
- movs r0, #3
- movs r1, #1
- bl sub_02002394
- movs r0, #2
- movs r1, #1
- bl sub_020023a4
- ldr r0, [pc, #148]
- movs r1, #0
- bl sub_020023d4
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02002406
- movs r1, #129
- movs r0, #1
- lsls r1, r1, #1
- bl sub_02002410
- movs r1, #129
- movs r0, #3
-.L_0200088e:
- lsls r1, r1, #1
- bl sub_0200241a
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #2
- bl sub_02002424
- movs r0, #40
-.L_020008a0:
- bl sub_0200237a
- movs r0, #11
- bl sub_02001ccc
- ldr r0, [pc, #88]
- movs r1, #0
- bl sub_02002410
- ldr r3, [pc, #84]
- ldr r1, [r3, #0]
- movs r3, #224
-.L_020008b8:
- lsls r3, r3, #1
- adds r2, r1, r3
- adds r3, #64
- str r3, [r2, #0]
- subs r3, #56
- adds r2, r1, r3
- movs r3, #64
- str r3, [r2, #0]
- ldr r3, [pc, #64]
- ldr r2, [pc, #68]
- adds r3, r3, r2
- movs r2, #3
-.L_020008d0:
- strb r2, [r3, #0]
- ldr r0, [pc, #64]
- movs r1, #19
- bl sub_02002490
- movs r0, #36
- movs r1, #0
- bl sub_02002490
- bl sub_020023cc
- pop {r5, r6}
- pop {r0}
-.L_020008ea:
- bx r0
- .4byte 0x000014ce
- .4byte 0x00008009
- .4byte 0x02009e2c
- .4byte 0x02009db4
- .4byte 0x02009ddc
- .4byte 0x02009e04
- .4byte 0x00008008
- .4byte 0x03001ebc
- .4byte 0x02000240
- .4byte 0x0000022b
- .2byte 0x002d
- .2byte 0x0000
+AlchemyC_0200069c:
+ .space 0x27c
AlchemyC_02000918:
.space 0x640
AlchemyC_02000f58:
diff --git a/games/gs1/assets/code/resource_399_overlay.s b/games/gs1/assets/code/resource_399_overlay.s
index a5c238d16..379b9b62d 100644
--- a/games/gs1/assets/code/resource_399_overlay.s
+++ b/games/gs1/assets/code/resource_399_overlay.s
@@ -1505,584 +1505,8 @@ AlchemyC_02000abc:
.4byte 0x0000082e
.2byte 0x0000
.2byte 0x028a
- push {r5, lr}
- bl sub_020031c4
- movs r1, #182
- movs r2, #150
- movs r0, #3
- lsls r1, r1, #16
- lsls r2, r2, #16
- bl sub_02003252
- movs r0, #141
- movs r1, #1
- movs r2, #221
- lsls r2, r2, #16
- movs r3, #0
- negs r1, r1
- lsls r0, r0, #16
- bl sub_020032fc
- movs r0, #1
- bl sub_0200312a
- ldr r0, [pc, #652]
- ldr r1, [pc, #656]
- bl sub_02003302
- movs r0, #140
- movs r1, #1
- movs r2, #164
- lsls r0, r0, #16
- negs r1, r1
- lsls r2, r2, #16
- movs r3, #1
- bl sub_0200331c
- ldr r3, [pc, #636]
- ldr r1, [r3, #0]
- movs r3, #224
- lsls r3, r3, #1
- adds r2, r1, r3
- subs r3, #192
- str r3, [r2, #0]
- adds r3, #200
- adds r2, r1, r3
- movs r3, #40
- str r3, [r2, #0]
- bl sub_0200336e
- movs r0, #0
- ldr r1, [pc, #612]
- ldr r2, [pc, #612]
- bl sub_02003248
- movs r0, #1
- ldr r1, [pc, #600]
- ldr r2, [pc, #604]
- bl sub_02003252
- movs r0, #2
- ldr r1, [pc, #592]
- ldr r2, [pc, #592]
- bl sub_0200325c
- movs r0, #0
- movs r1, #142
- movs r2, #221
- bl sub_020032a6
- movs r1, #208
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02003342
- movs r0, #0
- bl sub_02003270
- cmp r0, #0
- beq.n .L_02001038
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_020032e6
-.L_02001038:
- movs r0, #0
- bl sub_02003284
- cmp r0, #0
- beq.n .L_0200104c
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #2
- bl sub_020032fa
-.L_0200104c:
- movs r0, #1
- movs r1, #150
- movs r2, #234
- bl sub_020032dc
- movs r2, #234
- movs r0, #2
- movs r1, #134
- bl sub_020032ee
- movs r0, #1
- movs r1, #1
- bl sub_0200331e
- ldr r5, [pc, #500]
- movs r0, #0
- adds r2, r5, #0
- ldr r1, [pc, #500]
- bl sub_0200336a
- adds r2, r5, #0
- movs r0, #1
- ldr r1, [pc, #488]
- bl sub_02003374
- adds r2, r5, #0
- movs r0, #2
- ldr r1, [pc, #480]
- bl sub_0200337e
- bl sub_020033da
- ldr r5, [pc, #472]
- movs r0, #9
- adds r1, r5, #0
- bl sub_020032ec
- movs r0, #40
- bl sub_020032c2
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #3
- bl sub_020033dc
- movs r0, #40
- bl sub_020032d2
- movs r1, #1
- movs r0, #3
- bl sub_0200338a
- ldr r0, [pc, #436]
- bl sub_020033b8
- movs r2, #20
- movs r0, #3
- movs r1, #0
- bl sub_020033d2
- adds r1, r5, #0
- movs r0, #9
- bl sub_02003322
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_020033e4
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02003400
- movs r2, #10
- movs r0, #8
- movs r1, #0
- bl sub_0200340a
- movs r0, #8
- movs r1, #4
- bl sub_020033b2
- movs r2, #40
- movs r0, #8
- movs r1, #0
- bl sub_0200340c
- movs r1, #3
- movs r0, #3
- bl sub_020033c4
- movs r0, #10
- bl sub_02003332
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02003436
- movs r1, #192
- movs r0, #8
- lsls r1, r1, #6
- movs r2, #20
- bl sub_02003442
- movs r2, #10
- movs r0, #3
- movs r1, #0
- bl sub_0200343c
- adds r1, r5, #0
- movs r0, #9
- bl sub_0200338c
- bl sub_02002800
- movs r0, #3
- ldr r1, [pc, #304]
- movs r2, #60
- bl sub_02003472
- movs r0, #3
- movs r1, #0
- movs r2, #40
- bl sub_0200345c
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_02003466
- movs r2, #60
- movs r0, #8
- ldr r1, [pc, #276]
- bl sub_02003490
- movs r0, #9
- movs r1, #7
- bl sub_02003420
- movs r2, #69
- movs r1, #10
- ldr r0, [pc, #264]
- bl sub_02003352
- movs r0, #10
- bl sub_020033a0
- movs r0, #3
- movs r1, #2
- bl sub_02003458
- movs r0, #3
- movs r1, #4
- bl sub_02003448
- movs r2, #20
- movs r0, #3
- movs r1, #0
- bl sub_020034a2
- movs r1, #1
- movs r0, #9
- bl sub_02003472
- movs r0, #40
- bl sub_020033c8
- movs r0, #9
- movs r1, #8
- bl sub_02003460
- movs r2, #69
- movs r1, #10
- ldr r0, [pc, #204]
- bl sub_02003392
- movs r0, #40
- bl sub_020033e0
- movs r1, #3
- movs r0, #3
- bl sub_02003480
- movs r0, #20
- bl sub_020033ee
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_020034f0
- movs r0, #8
- movs r1, #3
- bl sub_02003498
- movs r0, #8
- movs r1, #0
- movs r2, #10
- bl sub_020034f2
- movs r0, #3
- ldr r1, [pc, #136]
- movs r2, #30
- bl sub_0200351c
- movs r1, #128
- movs r2, #10
- movs r0, #3
- lsls r1, r1, #8
- bl sub_02003518
- movs r0, #3
- movs r1, #4
- bl sub_020034b8
- movs r2, #10
- movs r0, #3
- movs r1, #0
- bl sub_0200351a
- movs r1, #3
- movs r0, #8
- bl sub_020034d2
- movs r0, #20
- bl sub_02003440
- movs r1, #3
- movs r0, #3
- bl sub_020034e0
- movs r0, #40
- bl sub_0200344e
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #9
- lsls r2, r2, #8
- movs r0, #3
- bl sub_02003484
- movs r0, #3
- bl sub_02003482
- movs r3, #0
- adds r0, #100
- strh r3, [r0, #0]
- ldr r1, [pc, #60]
- movs r0, #3
- bl sub_020034a0
- b.n .L_0200128a
- .4byte 0x00004ccc
- .4byte 0x00000999
- .4byte 0x03001ebc
- .4byte 0x00006666
- .4byte 0x00003333
- .4byte 0x0200a74c
- .4byte 0x00010003
- .4byte 0x0200a5ec
- .4byte 0x0000155c
- .4byte 0x00000101
- .4byte 0x00000105
- .4byte 0x0200b1c0
- .4byte 0x0200b1d6
- .2byte 0xa670
- .2byte 0x0200
-.L_02001284:
- movs r0, #1
- bl sub_020033f8
-.L_0200128a:
- movs r0, #3
- bl sub_020034d6
- adds r0, #100
- movs r2, #0
- ldrsh r3, [r0, r2]
- cmp r3, #0
- beq.n .L_02001284
- movs r0, #140
- movs r1, #1
- movs r2, #198
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #16
- lsls r0, r0, #16
- bl sub_020035f2
- movs r0, #3
- bl sub_02003510
- movs r0, #3
- ldr r1, [pc, #628]
- movs r2, #80
- bl sub_020035ea
- movs r2, #40
- movs r0, #3
- movs r1, #0
- bl sub_020035d4
- movs r1, #1
- movs r0, #3
- bl sub_020035a4
- movs r0, #10
- bl sub_020034fa
- movs r1, #0
- movs r0, #3
- bl sub_020035e2
- movs r0, #131
- bl sub_020036c8
- movs r0, #128
- lsls r0, r0, #9
- movs r1, #0
- bl sub_0200365a
- movs r1, #0
- ldr r0, [pc, #576]
- bl sub_0200365a
- movs r0, #10
- bl sub_02003670
- movs r0, #1
- bl sub_0200346e
- movs r0, #220
- bl sub_020036ec
- movs r0, #40
- bl sub_0200347a
- movs r0, #128
- movs r1, #0
- lsls r0, r0, #9
- bl sub_0200367c
- movs r0, #60
- bl sub_02003692
- movs r0, #60
- bl sub_02003490
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #3
- bl sub_02003662
- movs r0, #20
- bl sub_02003558
- movs r0, #3
- movs r1, #0
- movs r2, #10
- bl sub_0200365a
- movs r1, #128
- movs r2, #128
- movs r0, #3
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_02003598
- movs r2, #198
- movs r1, #202
- movs r0, #3
- bl sub_020035e2
- movs r0, #40
- bl sub_02003580
- movs r0, #3
- movs r1, #2
- bl sub_02003638
- movs r0, #3
- movs r1, #0
- bl sub_02003670
- movs r0, #3
- movs r1, #4
- bl sub_02003630
- movs r2, #20
- movs r0, #3
- movs r1, #0
- bl sub_0200368a
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #3
- bl sub_020036bc
- movs r0, #40
- bl sub_020035b2
- movs r0, #3
- movs r1, #0
- movs r2, #40
- bl sub_020036a4
- movs r1, #128
- movs r2, #40
- movs r0, #3
- lsls r1, r1, #1
- bl sub_020036d0
- movs r1, #0
- movs r0, #3
- bl sub_020036b0
- movs r0, #0
- bl sub_02003616
- movs r0, #1
- bl sub_0200361c
- movs r0, #2
- bl sub_02003622
- movs r1, #192
- movs r2, #192
- lsls r1, r1, #10
- lsls r2, r2, #9
- movs r0, #3
- bl sub_02003618
- movs r0, #3
- bl sub_02003616
- movs r3, #0
- adds r0, #100
- strh r3, [r0, #0]
- ldr r1, [pc, #348]
- movs r0, #3
- bl sub_02003634
- b.n .L_020013e6
-.L_020013e0:
- movs r0, #1
- bl sub_02003554
-.L_020013e6:
- movs r0, #3
- bl sub_02003632
- adds r0, #100
- movs r2, #0
- ldrsh r3, [r0, r2]
- cmp r3, #0
- beq.n .L_020013e0
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02003720
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200372c
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #7
- movs r2, #10
- bl sub_02003738
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #11
- lsls r2, r2, #10
- bl sub_02003676
- movs r1, #128
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #11
- lsls r2, r2, #10
- bl sub_02003684
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #11
- lsls r2, r2, #10
- movs r0, #2
- bl sub_02003692
- movs r0, #152
- bl sub_02003830
- movs r0, #0
- bl sub_02003696
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r5, #254
- adds r3, r5, #0
- ands r3, r2
- strb r3, [r0, #0]
- movs r0, #1
- bl sub_020036a8
- adds r0, #90
- ldrb r2, [r0, #0]
- adds r3, r5, #0
- ands r3, r2
- strb r3, [r0, #0]
- movs r0, #2
- bl sub_020036b8
- adds r0, #90
- ldrb r3, [r0, #0]
- ands r5, r3
- strb r5, [r0, #0]
- movs r1, #132
- movs r0, #0
- movs r2, #206
- bl sub_020036fa
- movs r0, #1
- movs r1, #136
- movs r2, #221
- bl sub_02003704
- movs r1, #122
- movs r2, #238
- movs r0, #2
- bl sub_0200370e
- movs r0, #3
- bl sub_020036fc
- movs r0, #80
- bl sub_020036ca
- movs r0, #0
- bl sub_020036f0
- adds r0, #90
- ldrb r3, [r0, #0]
- movs r5, #1
- orrs r3, r5
- strb r3, [r0, #0]
- movs r0, #1
- bl sub_02003700
- adds r0, #90
- ldrb r3, [r0, #0]
- orrs r3, r5
- strb r3, [r0, #0]
- movs r0, #2
- bl sub_0200370e
- adds r0, #90
- ldrb r3, [r0, #0]
- orrs r5, r3
- strb r5, [r0, #0]
- ldr r1, [pc, #100]
- movs r0, #0
- ldr r2, [pc, #100]
- bl sub_02003728
- movs r0, #1
- ldr r1, [pc, #88]
- ldr r2, [pc, #92]
- bl sub_02003732
- ldr r2, [pc, #84]
- movs r0, #2
- ldr r1, [pc, #76]
- bl sub_0200373c
- ldr r5, [pc, #80]
- movs r0, #1
- adds r1, r5, #0
- bl sub_0200374e
- adds r1, r5, #0
- movs r0, #2
- bl sub_0200376e
- movs r0, #20
- bl sub_0200372c
- ldr r3, [pc, #60]
- ldr r1, [r3, #0]
- movs r3, #224
- lsls r3, r3, #1
- adds r2, r1, r3
- adds r3, #73
- str r3, [r2, #0]
- subs r3, #65
- adds r2, r1, r3
- movs r3, #24
- str r3, [r2, #0]
- ldr r0, [pc, #40]
- bl sub_02003738
- bl sub_0200375c
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x00000101
- .4byte 0x00207e9f
- .4byte 0x0200a6e0
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x0200a760
- .4byte 0x03001ebc
- .2byte 0x082b
- .2byte 0x0000
+AlchemyC_02000f90:
+ .space 0x5bc
AlchemyC_0200154c:
.space 0x68
push {r5, r6, lr}
diff --git a/games/gs1/assets/code/resource_39a_overlay.s b/games/gs1/assets/code/resource_39a_overlay.s
index f9f9aada2..cb4b73fa1 100644
--- a/games/gs1/assets/code/resource_39a_overlay.s
+++ b/games/gs1/assets/code/resource_39a_overlay.s
@@ -683,343 +683,12 @@ AlchemyC_02001750:
.space 0x58
AlchemyC_020017a8:
.space 0x3c
- push {r5, r6, r7, lr}
- sub sp, #8
- bl sub_02003132
- ldr r6, [pc, #312]
- movs r1, #224
- lsls r1, r1, #1
- adds r3, r6, r1
- movs r1, #0
- ldrsh r2, [r3, r1]
- ldr r3, [pc, #304]
- cmp r2, r3
- bne.n .L_02001852
- ldr r0, [pc, #304]
- bl sub_02003b1a
- cmp r0, #0
- bne.n .L_0200181a
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r6, r2
- movs r1, #0
- ldrsh r3, [r3, r1]
- cmp r3, #1
- bne.n .L_0200181a
- bl sub_02003334
-.L_0200181a:
- ldr r3, [pc, #268]
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r3, r2
- ldrh r3, [r3, #0]
- movs r1, #192
- subs r3, #2
- lsls r3, r3, #16
- lsls r1, r1, #10
- cmp r3, r1
- bhi.n .L_0200191e
- movs r5, #226
- lsls r5, r5, #17
- movs r0, #156
- movs r1, #0
- adds r2, r5, #0
- movs r3, #223
- lsls r0, r0, #16
- bl sub_02002718
- movs r0, #188
- lsls r0, r0, #16
- movs r1, #0
- adds r2, r5, #0
- movs r3, #223
- bl sub_02002726
- b.n .L_0200191e
-.L_02001852:
- ldr r3, [pc, #224]
- cmp r2, r3
- bne.n .L_0200191e
- movs r0, #8
-.L_0200185a:
- bl sub_02003bac
- ldr r7, [pc, #216]
- adds r3, r0, #0
- adds r3, #85
- movs r5, #0
- str r5, [r7, #0]
- movs r1, #1
- strb r5, [r3, #0]
- str r5, [r0, #12]
- movs r0, #8
- bl sub_02003c0a
- movs r1, #15
- movs r0, #8
- bl sub_02003c02
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r6, r2
- movs r1, #0
- ldrsh r3, [r3, r1]
- cmp r3, #1
- blt.n .L_020018b2
-.L_0200188a:
- cmp r3, #2
- ble.n .L_02001894
- cmp r3, #5
- beq.n .L_020018a0
- b.n .L_020018b2
-.L_02001894:
- movs r0, #0
- bl sub_02003c88
- movs r3, #1
- str r3, [r7, #0]
- b.n .L_020018b2
-.L_020018a0:
- movs r0, #0
- bl sub_02003c94
- movs r3, #1
- str r3, [r7, #0]
- ldr r3, [pc, #144]
- ldr r5, [r3, #0]
- movs r3, #0
- str r3, [r5, #24]
-.L_020018b2:
- ldr r3, [pc, #116]
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r3, r2
-.L_020018ba:
- movs r1, #0
- ldrsh r3, [r3, r1]
- cmp r3, #6
- bgt.n .L_0200191e
- movs r0, #130
- lsls r0, r0, #4
- bl sub_02003be0
- cmp r0, #0
- beq.n .L_020018f4
- movs r3, #1
- str r3, [sp, #0]
- str r3, [sp, #4]
- movs r0, #30
- movs r1, #57
- movs r2, #19
- movs r3, #57
- bl sub_02003bb6
- movs r2, #7
- movs r3, #8
- str r2, [sp, #4]
-.L_020018e6:
- movs r0, #30
- movs r1, #8
-.L_020018ea:
- movs r2, #12
- str r3, [sp, #0]
- bl sub_02003bc8
- b.n .L_0200191e
-.L_020018f4:
- ldr r3, [pc, #72]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- subs r2, #192
- str r2, [r3, #0]
- ldr r0, [pc, #64]
- movs r1, #1
- bl sub_02003cc0
- ldr r0, [pc, #56]
- movs r1, #1
- bl sub_02003cc0
- movs r0, #1
- bl sub_02003cd6
- movs r0, #1
- bl sub_02003b7c
-.L_0200191e:
- add sp, #8
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x02000240
- .4byte 0x00000040
- .4byte 0x00000f13
- .4byte 0x00000043
- .4byte 0x0200b328
- .4byte 0x03001ee0
- .4byte 0x03001ebc
- .2byte 0x3108
- .2byte 0x0020
- push {lr}
- ldr r1, [pc, #212]
- movs r0, #224
- lsls r0, r0, #1
- adds r3, r1, r0
- movs r0, #0
- ldrsh r2, [r3, r0]
- ldr r3, [pc, #204]
- sub sp, #8
- cmp r2, r3
- bne.n .L_02001978
- movs r3, #8
- movs r2, #42
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #8
- movs r1, #29
- movs r2, #15
- movs r3, #5
- bl sub_02003c60
- bl sub_020029c4
- b.n .L_02001a18
-.L_02001978:
- ldr r3, [pc, #172]
-.L_0200197a:
- cmp r2, r3
- bne.n .L_02001998
- movs r3, #0
- movs r2, #28
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #12
- movs r1, #8
- movs r2, #10
- movs r3, #18
- bl sub_02003c80
- bl sub_02002ae8
- b.n .L_02001a18
-.L_02001998:
- ldr r3, [pc, #144]
- cmp r2, r3
- bne.n .L_020019c6
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r1, r2
- movs r0, #0
- ldrsh r3, [r3, r0]
- cmp r3, #1
- beq.n .L_020019c6
- movs r3, #12
- movs r2, #3
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #12
- movs r1, #21
- movs r2, #9
-.L_020019ba:
- movs r3, #16
- bl sub_02003cae
- bl sub_02002c8e
- b.n .L_02001a18
-.L_020019c6:
- movs r2, #224
- lsls r2, r2, #1
- adds r3, r1, r2
- movs r0, #0
- ldrsh r2, [r3, r0]
- ldr r3, [pc, #92]
- cmp r2, r3
- bne.n .L_02001a18
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r1, r2
- ldrh r3, [r3, #0]
- movs r0, #128
- subs r3, #1
- lsls r3, r3, #16
- lsls r0, r0, #9
- cmp r3, r0
- bhi.n .L_02001a00
- movs r3, #22
- movs r2, #20
- str r3, [sp, #0]
-.L_020019f0:
- str r2, [sp, #4]
- movs r0, #14
- movs r1, #10
- movs r2, #9
- movs r3, #8
- bl sub_02003cec
- b.n .L_02001a14
-.L_02001a00:
- movs r3, #20
- movs r2, #45
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #7
- movs r1, #45
- movs r2, #11
- movs r3, #4
- bl sub_02003d02
-.L_02001a14:
- bl sub_02002ff2
-.L_02001a18:
- add sp, #8
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x02000240
- .4byte 0x0000003e
- .4byte 0x0000003f
- .4byte 0x00000040
- .2byte 0x0041
- .2byte 0x0000
- push {r5, r6, lr}
- ldr r3, [pc, #100]
- movs r1, #182
- ldr r3, [r3, #0]
- lsls r1, r1, #1
- ldr r5, [pc, #96]
- adds r3, r3, r1
- adds r1, #84
- movs r2, #0
- ldrsh r6, [r3, r2]
- adds r3, r5, r1
- movs r1, #0
- ldrsh r2, [r3, r1]
- ldr r3, [pc, #84]
- cmp r2, r3
- bne.n .L_02001a6e
- cmp r6, #17
- bne.n .L_02001a64
- movs r1, #32
- negs r1, r1
- movs r0, #0
- bl sub_02003530
- b.n .L_02001a6e
-.L_02001a64:
- movs r0, #32
- negs r0, r0
- movs r1, #0
- bl sub_0200353c
-.L_02001a6e:
- movs r2, #224
- lsls r2, r2, #1
- adds r3, r5, r2
- movs r1, #0
- ldrsh r2, [r3, r1]
- ldr r3, [pc, #44]
- cmp r2, r3
- bne.n .L_02001a94
- cmp r6, #25
- bne.n .L_02001a94
- ldr r0, [pc, #40]
- bl sub_02003d9e
- cmp r0, #0
- beq.n .L_02001a94
- movs r0, #0
- movs r1, #32
- bl sub_02003562
-.L_02001a94:
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x03001ebc
- .4byte 0x02000240
- .4byte 0x0000003f
- .4byte 0x00000040
- .2byte 0x0309
- .2byte 0x0000
+AlchemyC_020017e4:
+ .space 0x164
+AlchemyC_02001948:
+ .space 0xec
+AlchemyC_02001a34:
+ .space 0x7c
AlchemyC_02001ab0:
.space 0x10
AlchemyC_02001ac0:
diff --git a/games/gs1/assets/code/resource_39e_overlay.s b/games/gs1/assets/code/resource_39e_overlay.s
index b943efd7e..b6eec3e44 100644
--- a/games/gs1/assets/code/resource_39e_overlay.s
+++ b/games/gs1/assets/code/resource_39e_overlay.s
@@ -1647,441 +1647,12 @@ AlchemyC_02000484:
.4byte 0xffff8000
.2byte 0x0892
.2byte 0x0000
- push {lr}
- sub sp, #8
- bl sub_02004a3a
- ldr r0, [pc, #176]
- bl sub_02004a28
- movs r2, #0
- movs r1, #0
- movs r0, #9
- bl sub_02004aea
- movs r0, #10
- bl sub_02004a48
- ldr r0, [pc, #160]
- bl sub_02004b16
- movs r1, #2
- movs r0, #9
- bl sub_02004af6
- movs r0, #20
- bl sub_02004a5c
- movs r1, #128
- movs r2, #20
- movs r0, #0
- lsls r1, r1, #8
- bl sub_02004b58
- movs r1, #0
- movs r0, #9
- bl sub_02004b58
- movs r0, #10
- bl sub_02004a76
- movs r1, #128
- movs r0, #9
- lsls r1, r1, #1
- movs r2, #80
- bl sub_02004b7a
- movs r1, #208
- movs r2, #20
- movs r0, #9
- lsls r1, r1, #8
- bl sub_02004b7e
- movs r1, #2
- movs r0, #9
- bl sub_02004b36
- movs r0, #20
- bl sub_02004a9c
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_02004b86
- movs r2, #20
- movs r0, #9
- movs r1, #0
- bl sub_02004ba0
- movs r1, #3
- movs r0, #9
- bl sub_02004b40
- movs r0, #20
- bl sub_02004abe
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_02004ba8
- movs r3, #10
- movs r2, #24
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #10
- movs r1, #26
- movs r2, #1
- movs r3, #1
- bl sub_02004aa4
- bl sub_02004af0
- add sp, #8
- pop {r0}
- bx r0
- .4byte 0x00000894
- .2byte 0x17b7
- .2byte 0x0000
- push {r5, lr}
- bl sub_02004afc
- movs r0, #192
- lsls r0, r0, #2
- bl sub_02004ae4
- adds r5, r0, #0
- cmp r5, #0
- beq.n .L_02000782
- movs r2, #252
+AlchemyC_02000658:
+ .space 0xc4
+AlchemyC_0200071c:
+ .space 0x16
.L_02000732:
- movs r1, #168
- lsls r2, r2, #1
- movs r0, #0
- bl sub_02004b6e
- movs r0, #5
- bl sub_02004b14
- movs r1, #192
- movs r2, #20
- lsls r1, r1, #8
- movs r0, #0
- bl sub_02004c10
- movs r0, #8
- bl sub_02004b56
- movs r3, #0
- adds r0, #91
- strb r3, [r0, #0]
- movs r0, #152
- bl sub_02004cda
- movs r0, #8
- bl sub_02004b68
- movs r3, #128
- lsls r3, r3, #12
- str r3, [r0, #40]
- movs r1, #1
- movs r0, #8
- bl sub_02004bc6
- movs r0, #30
- bl sub_02004b4c
- ldr r0, [pc, #788]
- bl sub_02004c1a
- b.n .L_020009a8
-.L_02000782:
- ldr r0, [pc, #784]
- bl sub_02004c22
- movs r1, #8
- movs r0, #0
- bl sub_0200486a
- movs r0, #30
- bl sub_02004b68
- movs r1, #0
- movs r0, #8
- bl sub_02004c48
- bl sub_020048c8
- movs r0, #20
- bl sub_02004b7a
- movs r2, #252
- movs r1, #168
- lsls r2, r2, #1
- movs r0, #0
- bl sub_02004be6
- movs r0, #5
- bl sub_02004b8c
- movs r1, #192
- movs r2, #20
- lsls r1, r1, #8
- movs r0, #0
- bl sub_02004c88
- movs r0, #152
- bl sub_02004d46
- movs r0, #8
- bl sub_02004bd4
- adds r0, #91
- strb r5, [r0, #0]
- movs r0, #8
- bl sub_02004bde
- movs r3, #128
- lsls r3, r3, #12
- str r3, [r0, #40]
- movs r1, #1
- movs r0, #8
- bl sub_02004c3c
- movs r0, #30
- bl sub_02004bc2
- movs r1, #0
- movs r0, #8
- bl sub_02004c9a
- movs r0, #0
- movs r1, #0
- bl sub_02004bf2
- cmp r0, #1
- bne.n .L_02000858
- movs r1, #2
- movs r0, #8
- bl sub_02004c7e
- movs r0, #20
- bl sub_02004be4
- movs r1, #0
- movs r0, #8
- bl sub_02004cc4
- movs r0, #20
- bl sub_02004bf2
- movs r1, #0
- movs r0, #8
- bl sub_02004902
- movs r0, #30
- bl sub_02004c00
- movs r1, #2
- movs r0, #0
- bl sub_02004ca8
- movs r0, #50
- bl sub_02004c0e
- bl sub_02004966
- movs r0, #30
- bl sub_02004c18
- movs r0, #8
- movs r1, #3
- bl sub_02004ca8
- movs r0, #8
- movs r1, #0
- bl sub_02004d00
- b.n .L_02000870
-.L_02000858:
- ldr r3, [pc, #572]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #2
- strh r3, [r2, #0]
- movs r0, #8
- movs r1, #0
- bl sub_02004d1a
-.L_02000870:
- movs r1, #3
- movs r0, #8
- bl sub_02004cd2
- movs r0, #30
- bl sub_02004c50
- movs r1, #128
- lsls r1, r1, #1
- movs r2, #60
- movs r0, #8
- bl sub_02004d54
- ldr r0, [pc, #528]
- bl sub_02004d2a
- movs r1, #0
- movs r0, #8
- bl sub_02004d3a
- movs r0, #0
- movs r1, #0
- bl sub_02004c92
- cmp r0, #1
- bne.n .L_020008ee
- movs r2, #60
- movs r0, #8
- ldr r1, [pc, #500]
- bl sub_02004d78
- movs r1, #0
- movs r0, #8
- bl sub_02004990
- movs r0, #30
- bl sub_02004c8e
- movs r1, #2
- movs r0, #0
- bl sub_02004d36
- movs r0, #50
- bl sub_02004c9c
- bl sub_020049f4
- movs r0, #30
- bl sub_02004ca6
- movs r0, #8
- movs r1, #0
- bl sub_02004d86
- ldr r3, [pc, #440]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_0200091a
-.L_020008ee:
- ldr r3, [pc, #424]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #20
- bl sub_02004cd6
- movs r1, #3
- movs r0, #8
- bl sub_02004d66
- movs r0, #20
- bl sub_02004ce4
- movs r0, #8
- movs r1, #0
- bl sub_02004dc4
-.L_0200091a:
- movs r0, #20
- bl sub_02004cf2
- movs r1, #4
- movs r0, #8
- bl sub_02004d82
- movs r0, #20
- bl sub_02004d00
- movs r0, #8
- movs r1, #0
- bl sub_02004de0
- movs r1, #2
- movs r0, #0
- bl sub_02004db0
- movs r0, #20
- bl sub_02004d16
- movs r1, #0
- movs r0, #8
- bl sub_02004df6
- movs r0, #20
- bl sub_02004d24
- movs r1, #192
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02004e20
- movs r0, #8
- ldr r1, [pc, #320]
- ldr r2, [pc, #324]
- bl sub_02004d7a
- movs r2, #232
- movs r1, #168
- lsls r2, r2, #1
- movs r0, #8
- bl sub_02004da6
- movs r0, #60
- bl sub_02004d4c
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #7
- movs r2, #40
- bl sub_02004e48
- movs r0, #8
- movs r1, #0
- movs r2, #10
- bl sub_02004e42
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02004e66
- movs r2, #236
- movs r0, #8
- movs r1, #168
- lsls r2, r2, #1
- bl sub_02004dda
-.L_020009a8:
- movs r1, #0
- movs r0, #8
- bl sub_02004e52
- movs r0, #0
- movs r1, #0
- bl sub_02004daa
- cmp r0, #1
- bne.n .L_020009d4
- ldr r0, [pc, #236]
- bl sub_02004e5c
- movs r0, #8
- movs r1, #0
- bl sub_02004e74
- movs r0, #192
- lsls r0, r0, #2
- bl sub_02004d94
- b.n .L_02000a7c
-.L_020009d4:
- ldr r0, [pc, #216]
- bl sub_02004e74
- movs r0, #30
- bl sub_02004db2
- movs r1, #3
- movs r0, #8
- bl sub_02004e42
- movs r0, #20
- bl sub_02004dc0
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #8
- lsls r1, r1, #5
- bl sub_02004edc
- movs r0, #8
- movs r1, #1
- bl sub_02004efc
- movs r0, #128
- lsls r0, r0, #9
- movs r1, #0
- bl sub_02004f1e
- movs r1, #1
- ldr r0, [pc, #164]
- bl sub_02004f1e
- movs r0, #30
- bl sub_02004f34
- bl sub_02004f50
- bl sub_02004f14
- bl sub_02004b64
- movs r0, #128
- movs r1, #0
- lsls r0, r0, #9
- bl sub_02004f3a
- movs r0, #30
- bl sub_02004f50
- movs r0, #8
- movs r1, #0
- bl sub_02004ee8
- movs r1, #2
- movs r0, #8
- bl sub_02004eb8
- movs r0, #20
- bl sub_02004e1e
- movs r0, #8
- movs r1, #0
- bl sub_02004efe
- movs r0, #0
- movs r1, #1
- bl sub_02004ec6
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #0
- bl sub_02004f38
- movs r0, #60
- bl sub_02004e3e
- movs r0, #8
- movs r1, #0
- movs r2, #10
- bl sub_02004f28
- ldr r0, [pc, #64]
- bl sub_02004e3e
-.L_02000a7c:
- movs r0, #8
- movs r1, #5
- bl sub_02004ed6
- bl sub_02004e6a
- pop {r5}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x000017ac
- .4byte 0x0000179f
- .4byte 0x03001ebc
- .4byte 0x000017a4
- .4byte 0x00000105
- .4byte 0x00004ccc
- .4byte 0x00002666
- .4byte 0x000017ab
- .4byte 0x000017ad
- .4byte 0x00010003
- .2byte 0x0891
- .2byte 0x0000
+ .space 0x38a
AlchemyC_02000abc:
.space 0x20
AlchemyC_02000adc:
@@ -2666,883 +2237,8 @@ AlchemyC_02001334:
.space 0x84
AlchemyC_020013b8:
.space 0xdc
- push {r5, lr}
- ldr r0, [pc, #1016]
- bl sub_0200585e
- movs r0, #30
- bl sub_02005874
- movs r0, #13
- movs r1, #0
- movs r2, #0
- bl sub_02005926
- movs r0, #15
- movs r1, #0
- movs r2, #0
- bl sub_02005930
- movs r1, #0
- movs r2, #0
- movs r0, #16
- bl sub_0200593a
- movs r0, #20
- bl sub_02005898
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200599c
- movs r1, #128
- movs r0, #15
- lsls r1, r1, #1
- movs r2, #0
- bl sub_020059a8
- movs r1, #128
- lsls r1, r1, #1
- movs r2, #0
- movs r0, #16
- bl sub_020059b4
- movs r0, #60
- bl sub_020058c2
- ldr r0, [pc, #928]
- bl sub_02005990
- movs r0, #13
- movs r1, #0
- movs r2, #20
- bl sub_020059b2
- movs r2, #0
- movs r0, #0
- movs r1, #13
- bl sub_02005984
- movs r1, #1
- movs r0, #15
- bl sub_02005984
- movs r0, #20
- bl sub_020058ea
- movs r0, #15
- movs r1, #0
- movs r2, #20
- bl sub_020059d4
- movs r2, #0
- movs r0, #0
- movs r1, #15
- bl sub_020059a6
- movs r1, #2
- movs r0, #16
- bl sub_020059a6
- movs r0, #20
- bl sub_0200590c
- movs r2, #0
- movs r0, #0
- movs r1, #16
- bl sub_020059be
- movs r1, #0
- movs r0, #16
- bl sub_02005a06
- movs r0, #50
- bl sub_02005924
- movs r0, #16
- movs r1, #1
- bl sub_02005a34
- movs r0, #16
- ldr r1, [pc, #824]
- ldr r2, [pc, #828]
- bl sub_02005976
- movs r0, #16
- movs r1, #176
- movs r2, #248
- bl sub_020059a0
- movs r1, #154
- movs r0, #16
- lsls r1, r1, #1
- movs r2, #248
- bl sub_020059ac
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02005a48
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #20
- movs r0, #16
- bl sub_02005a54
- movs r0, #158
- bl sub_02005b12
- movs r2, #13
- ldr r0, [pc, #772]
- movs r1, #78
- bl sub_02005934
- movs r1, #2
- movs r0, #16
- bl sub_02005a1c
- movs r0, #20
- bl sub_02005982
- movs r1, #192
- movs r2, #192
- lsls r1, r1, #9
- lsls r2, r2, #8
- movs r0, #16
- bl sub_020059d0
- movs r0, #16
- bl sub_020059c6
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #254
- ands r3, r2
- movs r1, #154
- movs r2, #136
- strb r3, [r0, #0]
- lsls r1, r1, #1
- lsls r2, r2, #1
- movs r0, #16
- bl sub_02005a0e
- movs r0, #1
- bl sub_020059b4
- movs r0, #16
- bl sub_020059ea
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #1
- orrs r3, r2
- strb r3, [r0, #0]
- movs r1, #0
- movs r0, #16
- movs r2, #50
- bl sub_02005aae
- movs r1, #152
- movs r2, #216
- movs r0, #17
- lsls r1, r1, #17
- lsls r2, r2, #16
- bl sub_02005a54
- movs r1, #152
- movs r0, #17
- lsls r1, r1, #1
- movs r2, #248
- bl sub_02005a48
- movs r0, #9
- movs r1, #17
- movs r2, #0
- bl sub_02005a9a
- movs r0, #10
- movs r1, #17
- movs r2, #0
- bl sub_02005aa4
- movs r0, #11
- movs r1, #17
- movs r2, #0
- bl sub_02005aae
- movs r0, #12
- movs r1, #17
- movs r2, #0
- bl sub_02005ab8
- movs r0, #13
- movs r1, #17
- movs r2, #0
- bl sub_02005ac2
- movs r0, #14
- movs r1, #17
- movs r2, #0
- bl sub_02005acc
- movs r0, #15
- movs r1, #17
- movs r2, #0
- bl sub_02005ad6
- movs r0, #16
- movs r1, #17
- movs r2, #0
- bl sub_02005ae0
- movs r2, #0
- movs r1, #17
- movs r0, #0
- bl sub_02005aea
- movs r0, #10
- bl sub_02005a48
- movs r0, #9
- movs r1, #2
- bl sub_02005ae8
- movs r0, #10
- movs r1, #2
- bl sub_02005af0
- movs r0, #11
- movs r1, #2
- bl sub_02005af8
- movs r0, #12
- movs r1, #2
- bl sub_02005b00
- movs r0, #13
- movs r1, #2
- bl sub_02005b08
- movs r0, #14
- movs r1, #2
- bl sub_02005b10
- movs r0, #15
- movs r1, #2
- bl sub_02005b18
- movs r0, #16
- movs r1, #2
- bl sub_02005b28
- movs r0, #17
- ldr r1, [pc, #488]
- movs r2, #60
- bl sub_02005b8a
- movs r1, #152
- movs r2, #216
- movs r0, #18
- lsls r1, r1, #17
- lsls r2, r2, #16
- bl sub_02005b18
- movs r1, #152
- movs r0, #18
- lsls r1, r1, #1
- movs r2, #248
- bl sub_02005b04
- movs r1, #140
- movs r2, #132
- lsls r1, r1, #1
- lsls r2, r2, #1
- movs r0, #17
- bl sub_02005b12
- movs r0, #18
- bl sub_02005b30
- movs r1, #160
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #18
- bl sub_02005bbc
- movs r0, #17
- bl sub_02005b42
- movs r0, #159
- bl sub_02005c80
- ldr r0, [pc, #416]
- movs r1, #78
- movs r2, #13
- bl sub_02005aa2
- movs r0, #18
- movs r1, #0
- movs r2, #20
- bl sub_02005bcc
- movs r0, #9
- movs r1, #17
- movs r2, #0
- bl sub_02005b9e
- movs r0, #10
- movs r1, #17
- movs r2, #0
- bl sub_02005ba8
- movs r0, #11
- movs r1, #17
- movs r2, #0
- bl sub_02005bb2
- movs r0, #12
- movs r1, #17
- movs r2, #0
- bl sub_02005bbc
- movs r0, #13
- movs r1, #17
- movs r2, #0
- bl sub_02005bc6
- movs r0, #14
- movs r1, #17
- movs r2, #0
- bl sub_02005bd0
- movs r0, #15
- movs r1, #17
- movs r2, #0
- bl sub_02005bda
- movs r0, #16
- movs r1, #17
- movs r2, #0
- bl sub_02005be4
- movs r2, #0
- movs r1, #17
- movs r0, #0
- bl sub_02005bee
- movs r0, #10
- bl sub_02005b4c
- movs r1, #2
- movs r0, #17
- bl sub_02005bf4
- movs r0, #20
- bl sub_02005b5a
- movs r1, #4
- movs r0, #18
- bl sub_02005bea
- movs r0, #20
- bl sub_02005b68
- movs r2, #20
- movs r0, #18
- movs r1, #0
- bl sub_02005c52
- movs r1, #3
- movs r0, #17
- bl sub_02005c02
- movs r0, #20
- bl sub_02005b80
- movs r1, #1
- movs r0, #18
- bl sub_02005c28
- movs r0, #20
- bl sub_02005b8e
- movs r0, #18
- movs r1, #0
- movs r2, #20
- bl sub_02005c78
- movs r1, #208
- movs r0, #17
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02005c94
- movs r0, #17
- movs r1, #0
- movs r2, #20
- bl sub_02005c8e
- movs r1, #129
- movs r0, #18
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02005cb2
- movs r2, #20
- movs r0, #18
- movs r1, #0
- bl sub_02005ca4
- movs r1, #3
- movs r0, #17
- bl sub_02005c54
- movs r0, #20
- bl sub_02005bd2
- movs r2, #20
- movs r0, #17
- movs r1, #0
- bl sub_02005cbc
- movs r1, #3
- movs r0, #18
- bl sub_02005c6c
- movs r0, #20
- bl sub_02005bea
- movs r2, #20
- movs r0, #18
- movs r1, #0
- bl sub_02005cd4
- movs r1, #3
- movs r0, #17
- bl sub_02005c84
- movs r0, #20
- bl sub_02005c02
- movs r1, #4
- movs r0, #18
- bl sub_02005c92
- movs r0, #20
- bl sub_02005c10
- movs r2, #20
- movs r0, #18
- movs r1, #0
- bl sub_02005cfa
- movs r1, #2
- movs r0, #17
- bl sub_02005cc2
- movs r0, #20
- bl sub_02005c28
- movs r0, #17
- movs r1, #0
- movs r2, #20
- bl sub_02005d22
- movs r0, #17
- movs r1, #0
- movs r2, #20
- bl sub_02005d1c
- movs r1, #128
- movs r2, #20
- movs r0, #16
- lsls r1, r1, #8
- bl sub_02005d38
- movs r1, #3
- movs r0, #16
- bl sub_02005cd8
- movs r0, #20
- bl sub_02005c56
- movs r1, #3
- movs r0, #17
- bl sub_02005ce6
- movs r0, #20
- b.n .L_020018ac
- .4byte 0x0000089a
- .4byte 0x0000183b
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x0200c77a
- .4byte 0x00000103
- .2byte 0xc790
- .2byte 0x0200
-.L_020018ac:
- bl sub_02005c82
- movs r2, #20
- movs r0, #17
- movs r1, #0
- bl sub_02005d6c
- movs r1, #3
- movs r0, #16
- bl sub_02005d1c
- movs r0, #20
- bl sub_02005c9a
- movs r0, #16
- movs r1, #0
- movs r2, #20
- bl sub_02005d84
- movs r1, #128
- movs r0, #17
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02005da0
- movs r2, #20
- movs r0, #17
- movs r1, #0
- bl sub_02005d9a
- movs r1, #3
- movs r0, #9
- bl sub_02005d4a
- movs r0, #20
- bl sub_02005cc8
- movs r0, #9
- movs r1, #0
- movs r2, #20
- bl sub_02005db2
- movs r1, #208
- movs r2, #20
- movs r0, #17
- lsls r1, r1, #8
- bl sub_02005dce
- movs r1, #1
- movs r0, #17
- bl sub_02005d86
- movs r0, #20
- bl sub_02005cec
- movs r0, #17
- movs r1, #0
- movs r2, #20
- bl sub_02005dd6
- movs r1, #129
- movs r0, #18
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02005dfa
- movs r0, #18
- movs r1, #0
- movs r2, #20
- bl sub_02005dec
- movs r0, #17
- ldr r1, [pc, #900]
- movs r2, #60
- bl sub_02005e0e
- movs r2, #20
- movs r0, #17
- movs r1, #0
- bl sub_02005e00
- movs r1, #3
- movs r0, #18
- bl sub_02005db0
- movs r0, #20
- bl sub_02005d2e
- movs r0, #18
- movs r1, #0
- movs r2, #20
- bl sub_02005e18
- movs r1, #128
- movs r0, #17
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02005e3c
- movs r2, #20
- movs r0, #17
- movs r1, #0
- bl sub_02005e2e
- movs r1, #4
- movs r0, #18
- bl sub_02005dde
- movs r0, #20
- bl sub_02005d5c
- movs r0, #17
- ldr r1, [pc, #824]
- movs r2, #60
- bl sub_02005e5e
- movs r0, #17
- movs r1, #0
- movs r2, #20
- bl sub_02005e50
- movs r1, #128
- movs r0, #18
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02005e74
- movs r2, #20
- movs r0, #18
- movs r1, #0
- bl sub_02005e66
- movs r1, #4
- movs r0, #17
- bl sub_02005e16
- movs r0, #20
- bl sub_02005d94
- movs r2, #20
- movs r0, #17
- movs r1, #0
- bl sub_02005e7e
- movs r1, #2
- movs r0, #18
- bl sub_02005e46
- movs r0, #20
- bl sub_02005dac
- movs r2, #20
- movs r0, #18
- movs r1, #0
- bl sub_02005e96
- movs r1, #2
- movs r0, #17
- bl sub_02005e5e
- movs r0, #10
- bl sub_02005dc4
- movs r1, #128
- movs r2, #140
- movs r0, #17
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_02005e32
- movs r1, #128
- movs r0, #17
- lsls r1, r1, #7
- movs r2, #20
- bl sub_02005ece
- movs r2, #0
- movs r1, #0
- movs r0, #17
- bl sub_02005e60
- movs r0, #17
- bl sub_02005e26
- movs r0, #30
- bl sub_02005df4
- movs r1, #2
- movs r0, #9
- bl sub_02005e9c
- movs r0, #20
- bl sub_02005e02
- movs r2, #20
- movs r0, #9
- movs r1, #0
- bl sub_02005eec
- movs r1, #2
- movs r0, #15
- bl sub_02005eb4
- movs r0, #20
- bl sub_02005e1a
- movs r0, #15
- movs r1, #0
- movs r2, #20
- bl sub_02005f04
- movs r2, #0
- movs r1, #18
- movs r0, #16
- bl sub_02005ed6
- movs r0, #20
- bl sub_02005e34
- movs r1, #2
- movs r0, #16
- bl sub_02005edc
- movs r0, #20
- bl sub_02005e42
- movs r0, #16
- movs r1, #0
- movs r2, #20
- bl sub_02005f2c
- movs r1, #16
- movs r2, #0
- movs r0, #18
- bl sub_02005efe
- movs r0, #20
- bl sub_02005e5c
- movs r2, #20
- movs r0, #18
- movs r1, #0
- bl sub_02005f46
- movs r1, #4
- movs r0, #18
- bl sub_02005ef6
- movs r0, #20
- bl sub_02005e74
- movs r2, #20
- movs r0, #18
- movs r1, #0
- bl sub_02005f5e
- movs r1, #3
- movs r0, #18
- bl sub_02005f0e
- movs r0, #20
- bl sub_02005e8c
- movs r0, #18
- movs r1, #0
- movs r2, #20
- bl sub_02005f76
- movs r0, #18
- ldr r1, [pc, #516]
- ldr r2, [pc, #516]
- bl sub_02005ee0
- movs r1, #128
- movs r0, #18
- lsls r1, r1, #1
- movs r2, #248
- bl sub_02005f0c
- movs r1, #192
- movs r2, #20
- movs r0, #18
- lsls r1, r1, #8
- bl sub_02005fa8
- movs r0, #18
- movs r1, #1
- bl sub_02005f58
- movs r1, #128
- movs r0, #18
- lsls r1, r1, #1
- movs r2, #60
- bl sub_02005fc4
- movs r2, #184
- movs r0, #18
- movs r1, #240
- bl sub_02005f36
- movs r1, #2
- movs r0, #18
- bl sub_02005f7e
- movs r0, #20
- bl sub_02005ee4
- movs r1, #232
- movs r2, #168
- movs r0, #19
- lsls r1, r1, #16
- lsls r2, r2, #16
- bl sub_02005f6a
- movs r1, #232
- movs r2, #168
- lsls r1, r1, #16
- lsls r2, r2, #16
- movs r0, #20
- bl sub_02005f78
- movs r0, #19
- bl sub_02005f36
- movs r3, #192
- lsls r3, r3, #12
- str r3, [r0, #12]
- movs r0, #19
- bl sub_02005f42
- movs r3, #128
- lsls r3, r3, #24
- str r3, [r0, #60]
- movs r0, #19
- bl sub_02005f4e
- ldr r3, [pc, #380]
- str r3, [r0, #24]
- movs r0, #19
- bl sub_02005f58
- movs r3, #128
- ldr r2, [r0, #80]
- lsls r3, r3, #8
- strh r3, [r2, #30]
- movs r0, #124
- bl sub_020060de
- movs r0, #18
- movs r1, #0
- movs r2, #20
- bl sub_02006020
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #20
- bl sub_0200603c
- movs r1, #128
- movs r0, #16
- lsls r1, r1, #1
- movs r2, #240
- bl sub_02005fb8
- movs r1, #176
- movs r2, #20
- movs r0, #16
- lsls r1, r1, #8
- bl sub_02006054
- movs r0, #16
- movs r1, #1
- bl sub_0200600c
- movs r0, #16
- movs r1, #0
- movs r2, #20
- bl sub_02006056
- movs r0, #9
- movs r1, #0
- movs r2, #0
- bl sub_02006028
- movs r0, #10
- movs r1, #0
- movs r2, #0
- bl sub_02006032
- movs r0, #11
- movs r1, #0
- movs r2, #0
- bl sub_0200603c
- movs r0, #12
- movs r1, #0
- movs r2, #0
- bl sub_02006046
- movs r0, #13
- movs r1, #0
- movs r2, #0
- bl sub_02006050
- movs r0, #14
- movs r1, #0
- movs r2, #0
- bl sub_0200605a
- movs r0, #15
- movs r1, #0
- movs r2, #0
- bl sub_02006064
- movs r2, #0
- movs r0, #16
- movs r1, #0
- bl sub_0200606e
- movs r1, #2
- movs r0, #18
- bl sub_0200606e
- movs r0, #20
- bl sub_02005fd4
- movs r1, #160
- movs r0, #18
- lsls r1, r1, #7
- movs r2, #20
- bl sub_020060d0
- movs r0, #18
- movs r1, #248
- movs r2, #208
- bl sub_0200604a
- movs r1, #160
- movs r0, #18
- lsls r1, r1, #7
- movs r2, #20
- bl sub_020060e6
- movs r1, #0
- movs r0, #18
- bl sub_020060ce
- movs r0, #0
- movs r1, #0
- bl sub_02006026
- cmp r0, #0
- bne.n .L_02001c4a
- movs r1, #1
- movs r0, #16
- bl sub_020060b2
- movs r0, #20
- bl sub_02006018
- movs r0, #16
- b.n .L_02001cb4
-.L_02001c4a:
- ldr r5, [pc, #136]
- movs r2, #236
- ldr r3, [r5, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- ldrh r2, [r3, #0]
- adds r2, #1
- strh r2, [r3, #0]
- movs r0, #20
- bl sub_02006032
- movs r0, #18
- ldr r1, [pc, #116]
- movs r2, #60
- bl sub_02006134
- movs r1, #128
- movs r2, #20
- movs r0, #18
- lsls r1, r1, #7
- bl sub_02006138
- movs r1, #2
- movs r0, #16
- bl sub_020060f0
- movs r0, #20
- bl sub_02006056
- movs r1, #0
- movs r0, #16
- bl sub_0200612e
- movs r0, #0
- movs r1, #0
- bl sub_02006086
- cmp r0, #0
- bne.n .L_02001ce0
- movs r1, #3
- movs r0, #16
- bl sub_020060fa
- movs r0, #20
- bl sub_02006078
- movs r1, #176
- movs r0, #18
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02006174
- movs r0, #18
-.L_02001cb4:
- movs r1, #0
- movs r2, #20
- bl sub_0200616e
- ldr r0, [pc, #28]
- bl sub_02006084
- b.n .L_02001d12
- .4byte 0x00000101
- .4byte 0x00000103
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x03001ebc
- .4byte 0x00000105
- .2byte 0x0898
- .2byte 0x0000
-.L_02001ce0:
- ldr r2, [r5, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #20
- bl sub_020060c6
- movs r1, #4
- movs r0, #18
- bl sub_02006156
- movs r0, #20
- bl sub_020060d4
- movs r0, #18
- movs r1, #0
- movs r2, #20
- bl sub_020061be
- ldr r0, [pc, #56]
- bl sub_020060d4
-.L_02001d12:
- movs r1, #128
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020061e0
- movs r1, #128
- movs r2, #20
- movs r0, #11
- lsls r1, r1, #8
- bl sub_020061ec
- movs r0, #10
- movs r1, #5
- bl sub_02006184
- movs r0, #11
- movs r1, #5
- bl sub_0200618c
- ldr r1, [pc, #16]
- movs r0, #12
- bl sub_0200615c
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x00000899
- .2byte 0xc638
- .2byte 0x0200
+AlchemyC_02001494:
+ .space 0x8bc
AlchemyC_02001d50:
.space 0x6c
AlchemyC_02001dbc:
diff --git a/games/gs1/assets/code/resource_3a2_overlay.s b/games/gs1/assets/code/resource_3a2_overlay.s
index a480f014e..584b49cec 100644
--- a/games/gs1/assets/code/resource_3a2_overlay.s
+++ b/games/gs1/assets/code/resource_3a2_overlay.s
@@ -502,660 +502,14 @@ AlchemyC_020008a8:
.2byte 0x0000
AlchemyC_020008e0:
.space 0x44
- push {r5, lr}
- ldr r0, [pc, #380]
- bl sub_02001dfa
- cmp r0, #0
- bne.n .L_02000932
- b.n .L_02000a9e
-.L_02000932:
- bl sub_02001e24
- movs r1, #134
- movs r2, #216
- lsls r1, r1, #18
- lsls r2, r2, #16
- movs r0, #10
- bl sub_02001e92
- ldr r0, [pc, #352]
- bl sub_02001ec8
- movs r2, #20
- movs r0, #10
- movs r1, #0
- bl sub_02001eea
- movs r1, #2
- movs r0, #0
- bl sub_02001ed2
- movs r0, #20
- bl sub_02001e48
- movs r0, #0
- bl sub_02001e6e
- ldr r3, [pc, #320]
- str r3, [r0, #108]
- movs r0, #0
- bl sub_02001e78
- ldr r3, [r0, #16]
- asrs r3, r3, #20
- cmp r3, #13
- bne.n .L_02000986
- movs r1, #220
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #200
- bl sub_02001ebc
-.L_02000986:
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #9
- movs r0, #10
- lsls r1, r1, #10
- bl sub_02001ea2
- movs r0, #10
- movs r1, #2
- bl sub_02001f4a
- movs r1, #204
- lsls r1, r1, #1
- movs r2, #216
- movs r0, #10
- bl sub_02001ede
- movs r0, #10
- bl sub_02001eb4
- adds r0, #35
- ldrb r2, [r0, #0]
- movs r3, #1
- orrs r3, r2
- strb r3, [r0, #0]
- movs r0, #10
- bl sub_02001ea4
- movs r1, #128
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02001f70
- movs r2, #20
- movs r0, #10
- movs r1, #0
- bl sub_02001f6a
- movs r0, #10
- movs r1, #2
- bl sub_02001f4a
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #10
- bl sub_02001fa4
- movs r0, #60
- bl sub_02001ed2
- movs r2, #20
- movs r0, #10
- movs r1, #0
- bl sub_02001f8c
- ldr r1, [pc, #184]
- movs r0, #10
- bl sub_02001f14
- movs r0, #148
- movs r1, #1
- movs r2, #172
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #17
- lsls r0, r0, #17
- bl sub_02001fd6
- movs r0, #139
- lsls r0, r0, #4
- bl sub_02001eee
- movs r0, #10
- bl sub_02001f3c
- bl sub_02001ff0
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #8
- movs r0, #0
- lsls r1, r1, #9
- bl sub_02001f3e
- ldr r1, [pc, #128]
- movs r0, #0
- bl sub_02001f4e
- movs r0, #0
- bl sub_02001f5c
- movs r0, #10
- bl sub_02001f2a
- movs r0, #0
- bl sub_02001f50
- movs r5, #0
- str r5, [r0, #108]
- movs r0, #30
- bl sub_02001f3a
- movs r1, #2
- movs r0, #10
- bl sub_02001fd2
- movs r0, #20
- bl sub_02001f48
- movs r1, #160
- movs r0, #10
- lsls r1, r1, #7
- movs r2, #120
- bl sub_02002014
- movs r0, #10
- ldr r1, [pc, #68]
- movs r2, #60
- bl sub_0200202e
- movs r2, #60
- movs r0, #0
- ldr r1, [pc, #60]
- bl sub_02002038
- movs r1, #4
- movs r0, #10
- bl sub_02001fe8
- movs r0, #20
- bl sub_02001f76
- movs r0, #10
- movs r1, #0
- movs r2, #20
- bl sub_02002030
- bl sub_02001f94
-.L_02000a9e:
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x0000089a
- .4byte 0x000018b5
- .4byte 0x02008055
- .4byte 0x0200962c
- .4byte 0x020096b8
- .4byte 0x00000105
- .2byte 0x0101
- .2byte 0x0000
- push {lr}
- bl sub_02001fb4
- ldr r0, [pc, #88]
- bl sub_0200204a
- movs r0, #10
- ldr r1, [pc, #84]
- movs r2, #60
- bl sub_0200208c
- movs r1, #0
- movs r0, #10
- bl sub_02002064
- movs r0, #0
- movs r1, #0
- bl sub_02001fe4
- cmp r0, #1
- bne.n .L_02000afa
- ldr r3, [pc, #60]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_02000afa:
- movs r0, #20
- bl sub_02001fe6
- movs r1, #4
- movs r0, #10
- bl sub_02002066
- movs r0, #20
- bl sub_02001ff4
- movs r0, #10
- movs r1, #0
- movs r2, #20
- bl sub_020020ae
- bl sub_02002012
- pop {r0}
- bx r0
- .4byte 0x000018b9
- .4byte 0x00000105
- .2byte 0x1ebc
- .2byte 0x0300
- push {lr}
- bl sub_02002020
- bl sub_0200211c
- bl sub_02002128
- movs r0, #30
- bl sub_02002026
- movs r1, #192
- movs r2, #0
- movs r0, #0
- lsls r1, r1, #7
- bl sub_020020f2
- movs r0, #9
- movs r1, #1
- bl sub_0200212a
- bl sub_02002126
- movs r1, #2
- movs r0, #8
- bl sub_020020d6
- movs r0, #20
- bl sub_0200204c
- ldr r0, [pc, #192]
- bl sub_020020ea
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_0200210c
- movs r1, #1
- movs r0, #9
- bl sub_020020f4
- movs r0, #20
- bl sub_0200206a
- movs r2, #20
- movs r0, #9
- movs r1, #0
- bl sub_02002124
- movs r1, #3
- movs r0, #8
- bl sub_020020f4
- movs r0, #20
- bl sub_02002082
- movs r0, #8
- movs r1, #0
- movs r2, #20
- bl sub_0200213c
- movs r1, #208
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02002158
- movs r2, #20
- movs r0, #10
- movs r1, #0
- bl sub_02002152
- movs r1, #3
- movs r0, #8
- bl sub_02002122
- movs r0, #60
- bl sub_020020b0
- movs r1, #129
- movs r2, #60
- movs r0, #8
- lsls r1, r1, #1
- bl sub_0200218c
- movs r1, #4
- movs r0, #8
- bl sub_0200213c
- movs r0, #20
- bl sub_020020ca
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_02002184
- movs r0, #10
- movs r1, #2
- bl sub_02002164
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #10
- bl sub_020021be
- movs r0, #60
- bl sub_020020ec
- movs r1, #176
- movs r2, #20
- movs r0, #10
- lsls r1, r1, #8
- bl sub_020021b8
- movs r0, #9
- movs r1, #5
- bl sub_02002170
- bl sub_02002114
- ldr r0, [pc, #12]
- bl sub_020020fa
- pop {r0}
- bx r0
- .4byte 0x000019cf
- .2byte 0x08b1
- .2byte 0x0000
- push {r5, lr}
- bl sub_02002124
- movs r1, #129
- movs r0, #8
- lsls r1, r1, #1
- bl sub_020021fe
- movs r1, #2
- movs r0, #8
- bl sub_020021b6
- movs r0, #60
- bl sub_02002134
- ldr r0, [pc, #864]
- bl sub_020021d2
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_020021f4
- movs r1, #129
- movs r0, #10
- lsls r1, r1, #1
- bl sub_02002226
- movs r1, #4
- movs r2, #0
- movs r0, #10
- bl sub_020021d8
- movs r0, #60
- bl sub_0200215e
- movs r2, #20
- movs r0, #10
- movs r1, #0
- bl sub_02002218
- movs r1, #1
- movs r0, #8
- bl sub_02002200
- movs r0, #20
- bl sub_02002176
- movs r0, #8
- movs r1, #0
- movs r2, #20
- bl sub_02002230
- movs r1, #208
- movs r2, #20
- movs r0, #10
- lsls r1, r1, #8
- bl sub_0200224c
- movs r1, #3
- movs r0, #10
- bl sub_0200220c
- movs r0, #20
- bl sub_0200219a
- movs r2, #138
- movs r0, #8
- movs r1, #178
- lsls r2, r2, #1
- bl sub_020021ee
- movs r2, #142
- movs r1, #172
- lsls r2, r2, #1
- movs r0, #10
- bl sub_02002202
- movs r0, #8
- bl sub_02002218
- movs r1, #160
- movs r0, #8
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002284
- movs r1, #176
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #10
- bl sub_02002290
- movs r0, #20
- bl sub_020021d6
- movs r1, #2
- movs r0, #8
- bl sub_0200226e
- movs r0, #20
- bl sub_020021e4
- movs r1, #0
- movs r2, #20
- movs r0, #8
- bl sub_0200229e
- movs r0, #8
- bl sub_02002214
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r5, #254
- adds r3, r5, #0
- ands r3, r2
- strb r3, [r0, #0]
- movs r0, #10
- bl sub_02002226
- adds r0, #90
- ldrb r3, [r0, #0]
- ands r5, r3
- strb r5, [r0, #0]
- ldr r1, [pc, #648]
- movs r0, #8
- ldr r2, [pc, #648]
- bl sub_02002240
- ldr r2, [pc, #644]
- movs r0, #10
- ldr r1, [pc, #636]
- bl sub_0200224a
- movs r0, #8
- movs r1, #5
- bl sub_0200229a
- movs r1, #6
- movs r0, #10
- bl sub_020022a2
- movs r0, #20
- bl sub_02002238
- movs r0, #125
- bl sub_0200236e
- movs r0, #8
- movs r1, #2
- movs r2, #0
- bl sub_020022a0
- movs r0, #9
- movs r1, #2
- movs r2, #0
- bl sub_020022aa
- movs r2, #0
- movs r1, #2
- movs r0, #10
- bl sub_020022b4
- movs r0, #10
- bl sub_020022c2
- movs r0, #30
- bl sub_02002268
- movs r0, #8
- movs r1, #5
- bl sub_020022e0
- movs r1, #6
- movs r0, #10
- bl sub_020022e8
- movs r0, #20
- bl sub_0200227e
- movs r0, #125
- bl sub_020023b4
- movs r0, #8
- movs r1, #4
- movs r2, #0
- bl sub_020022e6
- movs r0, #9
- movs r1, #4
- movs r2, #0
- bl sub_020022f0
- movs r2, #0
- movs r1, #4
- movs r0, #10
- bl sub_020022fa
- movs r0, #10
- bl sub_02002308
- movs r0, #9
- bl sub_020022ee
- movs r0, #8
- movs r1, #1
- bl sub_02002326
- movs r1, #1
- movs r0, #10
- bl sub_0200232e
- movs r0, #50
- bl sub_020022c4
- movs r1, #2
- movs r2, #0
- movs r0, #10
- bl sub_0200234e
- movs r0, #20
- bl sub_020022d4
- movs r2, #20
- movs r0, #10
- movs r1, #0
- bl sub_0200238e
- movs r1, #3
- movs r0, #8
- bl sub_0200235e
- movs r0, #20
- bl sub_020022ec
- movs r1, #0
- movs r0, #8
- bl sub_020023ac
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_020023ae
- movs r0, #8
- movs r1, #5
- bl sub_02002376
- movs r1, #6
- movs r0, #10
- bl sub_0200237e
- movs r0, #20
- bl sub_02002314
- movs r0, #125
- bl sub_0200244a
- movs r0, #8
- movs r1, #2
- movs r2, #0
- bl sub_0200237c
- movs r0, #9
- movs r1, #2
- movs r2, #0
- bl sub_02002386
- movs r2, #0
- movs r1, #2
- movs r0, #10
- bl sub_02002390
- movs r0, #10
- bl sub_0200239e
- movs r0, #30
- bl sub_02002344
- movs r0, #8
- movs r1, #5
- bl sub_020023bc
- movs r1, #6
- movs r0, #10
- bl sub_020023c4
- movs r0, #20
- bl sub_0200235a
- movs r0, #125
- bl sub_02002490
- movs r0, #8
- movs r1, #4
- movs r2, #0
- bl sub_020023c2
- movs r0, #9
- movs r1, #4
- movs r2, #0
- bl sub_020023cc
- movs r2, #0
- movs r1, #4
- movs r0, #10
- bl sub_020023d6
- movs r0, #10
- bl sub_020023e4
- movs r0, #40
- bl sub_0200238a
- movs r0, #8
- movs r1, #1
- bl sub_02002402
- movs r0, #10
- movs r1, #1
- bl sub_0200240a
- movs r1, #2
- movs r2, #0
- movs r0, #10
- bl sub_02002424
- movs r0, #20
- bl sub_020023aa
- movs r1, #208
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02002476
- movs r2, #20
- movs r0, #10
- movs r1, #0
- bl sub_02002470
- movs r1, #3
- movs r0, #8
- bl sub_02002440
- movs r0, #20
- bl sub_020023ce
- movs r0, #8
- movs r1, #0
- movs r2, #30
- bl sub_02002488
- movs r1, #0
- movs r2, #20
- movs r0, #8
- bl sub_02002492
- movs r0, #10
- bl sub_02002408
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #1
- orrs r3, r2
- strb r3, [r0, #0]
- ldr r1, [pc, #172]
- movs r0, #10
- ldr r2, [pc, #172]
- bl sub_02002424
- movs r2, #148
- movs r0, #10
- movs r1, #168
- lsls r2, r2, #1
- bl sub_02002458
- movs r1, #208
- movs r2, #20
- movs r0, #10
- lsls r1, r1, #8
- bl sub_020024d4
- movs r0, #10
- movs r1, #5
- bl sub_0200248c
- movs r1, #3
- movs r0, #8
- bl sub_0200249c
- movs r0, #20
- bl sub_0200242a
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_020024e4
- movs r1, #3
- movs r0, #10
- bl sub_020024b4
- movs r0, #20
- bl sub_02002442
- movs r2, #20
- movs r0, #10
- movs r1, #0
- bl sub_020024fc
- movs r1, #3
- movs r0, #8
- bl sub_020024cc
- movs r0, #20
- bl sub_0200245a
- movs r2, #20
- movs r0, #8
- movs r1, #0
- bl sub_02002514
- movs r1, #3
- movs r0, #0
- bl sub_020024e4
- movs r0, #20
- bl sub_02002472
- bl sub_02002486
- ldr r0, [pc, #48]
- bl sub_0200246c
- ldr r3, [pc, #48]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #65
- str r2, [r3, #0]
- movs r0, #6
- bl sub_02002588
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x000019da
- .4byte 0x00003333
- .4byte 0x00001999
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x000008b2
- .2byte 0x1ebc
- .2byte 0x0300
+AlchemyC_02000924:
+ .space 0x19c
+AlchemyC_02000ac0:
+ .space 0x6c
+AlchemyC_02000b2c:
+ .space 0x104
+AlchemyC_02000c30:
+ .space 0x39c
AlchemyC_02000fcc:
.space 0x24
AlchemyC_02000ff0:
diff --git a/games/gs1/assets/code/resource_3aa_overlay.s b/games/gs1/assets/code/resource_3aa_overlay.s
index 8729d4fb7..5acae261b 100644
--- a/games/gs1/assets/code/resource_3aa_overlay.s
+++ b/games/gs1/assets/code/resource_3aa_overlay.s
@@ -620,616 +620,10 @@ AlchemyC_02000360:
.space 0x10ac
AlchemyC_0200140c:
.space 0x44
- push {r5, lr}
- movs r1, #192
- adds r5, r0, #0
- lsls r1, r1, #8
- movs r0, #0
- movs r2, #0
- bl sub_02002f92
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002f9e
- movs r1, #192
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002faa
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02002fb6
- cmp r5, #0
- beq.n .L_0200148e
- adds r0, r5, #0
- bl sub_02002f08
-.L_0200148e:
- pop {r5}
- pop {r0}
- bx r0
- push {r5, r6, lr}
- bl sub_02002f1c
- movs r0, #1
- movs r1, #1
- movs r2, #1
- negs r1, r1
- negs r2, r2
- movs r3, #0
- negs r0, r0
- bl sub_02002ffe
- movs r0, #1
- bl sub_02002ee4
- movs r0, #216
- movs r1, #1
- movs r2, #134
- movs r3, #0
- negs r1, r1
- lsls r2, r2, #18
- lsls r0, r0, #18
- bl sub_02003016
- bl sub_02002f02
- movs r0, #1
- bl sub_02002f00
- movs r1, #216
- movs r0, #0
- lsls r1, r1, #18
- ldr r2, [pc, #956]
- bl sub_02002fbc
- ldr r6, [pc, #956]
- movs r1, #224
- ldr r2, [r6, #0]
- lsls r1, r1, #1
- movs r5, #128
- adds r3, r2, r1
- lsls r5, r5, #1
- str r5, [r3, #0]
- movs r3, #228
- lsls r3, r3, #1
- adds r2, r2, r3
- movs r3, #40
- str r3, [r2, #0]
- bl sub_02003072
- ldr r0, [pc, #928]
- ldr r1, [pc, #932]
- bl sub_0200304a
- movs r0, #216
- movs r1, #1
- movs r2, #236
- movs r3, #1
- lsls r0, r0, #18
- negs r1, r1
- lsls r2, r2, #17
- bl sub_02003064
- movs r0, #0
- ldr r1, [pc, #908]
- ldr r2, [pc, #900]
- bl sub_02002fc6
- movs r0, #1
- ldr r1, [pc, #900]
- ldr r2, [pc, #888]
- bl sub_02002fd0
- movs r0, #2
- ldr r1, [pc, #888]
- ldr r2, [pc, #880]
- bl sub_02002fda
- movs r0, #3
- ldr r1, [pc, #880]
- ldr r2, [pc, #868]
- bl sub_02002fe4
- movs r1, #216
- movs r2, #249
- movs r0, #0
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_02003012
- movs r0, #0
- bl sub_02002ff0
- cmp r0, #0
- beq.n .L_0200155c
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_0200303e
-.L_0200155c:
- movs r0, #0
- bl sub_02003004
- cmp r0, #0
- beq.n .L_02001570
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #2
- bl sub_02003052
-.L_02001570:
- movs r0, #0
- bl sub_02003018
- cmp r0, #0
- beq.n .L_02001584
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #3
- bl sub_02003066
-.L_02001584:
- movs r1, #214
- movs r2, #243
- movs r0, #0
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_02003054
- movs r1, #212
- movs r2, #251
- movs r0, #1
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_02003062
- movs r1, #218
- movs r2, #243
- movs r0, #2
- lsls r1, r1, #2
- lsls r2, r2, #1
- bl sub_02003070
- movs r1, #220
- movs r2, #251
- lsls r2, r2, #1
- movs r0, #3
- lsls r1, r1, #2
- bl sub_02003086
- movs r0, #0
- movs r1, #1
- bl sub_020030ae
- movs r0, #1
- movs r1, #1
- bl sub_020030b6
- movs r1, #1
- movs r0, #2
- bl sub_020030be
- movs r0, #10
- bl sub_02003054
- movs r0, #10
- bl sub_02002a2e
- adds r1, r5, #0
- movs r0, #9
- movs r2, #20
- bl sub_02003124
- movs r1, #160
- lsls r1, r1, #7
- movs r2, #20
- movs r0, #9
- bl sub_02003128
- ldr r0, [pc, #688]
- bl sub_02003106
- ldr r0, [pc, #684]
- movs r1, #0
- movs r2, #10
- bl sub_02003128
- adds r1, r5, #0
- movs r0, #8
- movs r2, #20
- bl sub_0200314a
- movs r1, #192
- movs r0, #8
- lsls r1, r1, #6
- movs r2, #20
- bl sub_0200314e
- movs r0, #8
- movs r1, #0
- movs r2, #20
- bl sub_02003148
- movs r0, #8
- ldr r1, [pc, #644]
- movs r2, #60
- bl sub_0200316a
- movs r2, #10
- movs r0, #8
- movs r1, #0
- bl sub_0200315c
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02003186
- movs r1, #129
- movs r0, #1
- lsls r1, r1, #1
- bl sub_02003190
- movs r1, #129
- movs r0, #2
- lsls r1, r1, #1
- bl sub_0200319a
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #3
- bl sub_020031a4
- movs r0, #60
- bl sub_020030e2
- movs r1, #129
- movs r0, #9
- lsls r1, r1, #1
- movs r2, #60
- bl sub_020031ae
- movs r1, #224
- movs r0, #9
- lsls r1, r1, #7
- movs r2, #10
- bl sub_020031b2
- ldr r0, [pc, #552]
- movs r1, #0
- movs r2, #10
- bl sub_020031ac
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #5
- movs r2, #10
- bl sub_020031c8
- movs r1, #132
- movs r0, #8
- lsls r1, r1, #1
- movs r2, #20
- bl sub_020031dc
- movs r2, #40
- movs r0, #8
- movs r1, #0
- bl sub_020031ce
- movs r0, #8
- movs r1, #2
- bl sub_020031b6
- movs r0, #8
- movs r1, #0
- movs r2, #20
- bl sub_020031e0
- movs r1, #192
- movs r0, #8
- lsls r1, r1, #6
- movs r2, #10
- bl sub_020031fc
- movs r1, #0
- movs r0, #8
- bl sub_020031e4
- movs r0, #0
- movs r1, #0
- movs r5, #1
- bl sub_02003176
- cmp r0, #0
- bne.n .L_020016f0
- movs r0, #10
- bl sub_02003160
- movs r0, #8
- movs r1, #3
- bl sub_020031d8
- b.n .L_0200170e
-.L_020016f0:
- movs r0, #10
- bl sub_02003170
- ldr r2, [r6, #0]
- movs r1, #236
- lsls r1, r1, #1
- adds r2, r2, r1
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #8
- movs r1, #4
- bl sub_020031f6
- movs r5, #0
-.L_0200170e:
- movs r0, #8
- movs r1, #0
- movs r2, #10
- bl sub_0200323a
- cmp r5, #0
- beq.n .L_0200172c
- ldr r3, [pc, #376]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_0200172c:
- movs r0, #9
- movs r1, #2
- bl sub_0200322e
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #9
- bl sub_02003280
- movs r0, #80
- bl sub_020031be
- ldr r0, [pc, #356]
- movs r1, #0
- movs r2, #10
-.L_0200174a:
- bl sub_02003270
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #5
- movs r2, #10
- bl sub_0200328c
- movs r2, #40
- movs r0, #8
- ldr r1, [pc, #336]
- bl sub_0200329e
- movs r0, #2
- movs r1, #3
- bl sub_0200326e
- ldr r0, [pc, #324]
- movs r1, #0
- movs r2, #20
- bl sub_02003298
- movs r0, #8
- ldr r1, [pc, #316]
- movs r2, #60
- bl sub_020032ba
- movs r1, #192
- movs r0, #8
- lsls r1, r1, #6
- movs r2, #60
- bl sub_020032be
- movs r2, #10
- movs r0, #8
- movs r1, #0
- bl sub_020032b8
- movs r0, #1
- movs r1, #2
- bl sub_02003298
- movs r0, #1
- movs r1, #0
- movs r2, #10
- bl sub_020032ca
- movs r1, #160
- movs r0, #9
- lsls r1, r1, #7
- movs r2, #0
- bl sub_020032e6
- movs r1, #192
- movs r2, #10
- movs r0, #2
- lsls r1, r1, #7
- bl sub_020032f2
- movs r0, #2
- movs r1, #2
- bl sub_020032c2
- ldr r0, [pc, #240]
- movs r1, #0
- movs r2, #10
- bl sub_020032f4
- movs r1, #192
- movs r2, #10
- movs r0, #2
- lsls r1, r1, #8
- bl sub_02003310
- movs r0, #2
- movs r1, #2
- bl sub_020032e0
- movs r2, #20
- ldr r0, [pc, #200]
- movs r1, #0
- bl sub_02003312
- movs r0, #8
- movs r1, #3
- bl sub_020032ea
- movs r0, #8
- movs r1, #0
- movs r2, #20
- bl sub_02003324
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02003340
- ldr r0, [pc, #172]
- movs r1, #0
- movs r2, #10
- bl sub_0200333a
- movs r1, #160
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #10
- bl sub_02003356
- movs r0, #3
- ldr r1, [pc, #144]
- movs r2, #40
- bl sub_02003368
- movs r2, #10
- movs r0, #3
- movs r1, #0
- bl sub_0200335a
- movs r1, #2
- movs r0, #2
- bl sub_02003342
- movs r0, #80
- bl sub_020032c0
- movs r1, #3
- movs r0, #2
- bl sub_02003340
- movs r0, #20
- bl sub_020032ce
- movs r1, #224
- movs r2, #10
- movs r0, #1
- lsls r1, r1, #8
- bl sub_02003392
- movs r0, #1
- movs r1, #4
- bl sub_0200335a
- movs r1, #0
- movs r0, #1
- bl sub_02003382
- movs r0, #0
- movs r1, #0
- bl sub_02003312
- cmp r0, #0
- bne.n .L_020018c0
- movs r0, #20
- bl sub_020032fc
- ldr r3, [pc, #20]
- movs r1, #236
- ldr r2, [r3, #0]
- lsls r1, r1, #1
- adds r2, r2, r1
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_020018d0
- .4byte 0x02760000
- .4byte 0x03001ebc
- .4byte 0x00006666
- .4byte 0x00000ccc
- .4byte 0x0000cccc
- .4byte 0x00002588
- .4byte 0x00002009
- .4byte 0x00000107
- .4byte 0x00002002
- .4byte 0x00000105
- .2byte 0x6002
- .2byte 0x0000
-.L_020018c0:
- movs r0, #20
- bl sub_02003340
- movs r0, #1
- movs r1, #0
- movs r2, #10
- bl sub_020033f2
-.L_020018d0:
- movs r0, #2
- movs r1, #3
- bl sub_020033c2
- movs r1, #3
- movs r0, #3
- bl sub_020033d2
- movs r0, #20
- bl sub_02002d34
- movs r0, #9
- movs r1, #2
- bl sub_020033f0
- movs r2, #10
- ldr r0, [pc, #292]
- movs r1, #0
- bl sub_0200341a
- movs r0, #3
- movs r1, #2
- bl sub_02003402
- movs r0, #3
- movs r1, #0
- movs r2, #10
- bl sub_0200342c
- movs r1, #192
- movs r2, #10
- movs r0, #9
- lsls r1, r1, #6
- bl sub_02003448
- movs r0, #9
- movs r1, #3
- bl sub_02003410
-.L_0200191e:
- ldr r0, [pc, #248]
- movs r1, #0
- movs r2, #10
- bl sub_0200344a
- movs r0, #2
- ldr r1, [pc, #240]
- movs r2, #60
- bl sub_0200346c
- movs r2, #10
- ldr r0, [pc, #232]
- movs r1, #0
- bl sub_0200345e
- movs r0, #9
- movs r1, #1
- bl sub_02003446
- movs r1, #160
- movs r0, #9
- lsls r1, r1, #7
- movs r2, #10
- bl sub_02003482
- movs r2, #10
- ldr r0, [pc, #196]
- movs r1, #0
- bl sub_0200347c
- movs r0, #1
- movs r1, #2
- bl sub_02003464
- movs r2, #10
- movs r0, #1
- movs r1, #0
- bl sub_0200348e
- movs r0, #9
- movs r1, #4
- bl sub_02003466
- movs r2, #10
- ldr r0, [pc, #160]
- movs r1, #0
- bl sub_020034a0
- movs r0, #3
- movs r1, #1
- bl sub_02003488
- movs r2, #10
- movs r0, #3
- movs r1, #0
- bl sub_020034b2
- movs r1, #1
- movs r0, #8
- bl sub_0200349a
- movs r0, #20
- bl sub_02003418
- movs r2, #10
- movs r0, #8
- movs r1, #0
- bl sub_020034ca
- movs r0, #0
- movs r1, #3
- bl sub_0200349a
- movs r0, #1
- movs r1, #3
- bl sub_020034a2
- movs r0, #2
- movs r1, #3
- bl sub_020034aa
- movs r1, #3
- movs r0, #3
- bl sub_020034ba
- movs r0, #20
- bl sub_02003448
- ldr r5, [pc, #84]
- movs r0, #1
- adds r1, r5, #0
- bl sub_0200348a
- adds r1, r5, #0
- movs r0, #2
- bl sub_02003492
- adds r1, r5, #0
- movs r0, #3
- bl sub_020034a2
- ldr r3, [pc, #60]
- ldr r1, [r3, #0]
- movs r3, #228
- lsls r3, r3, #1
- adds r2, r1, r3
- movs r3, #16
- str r3, [r2, #0]
- movs r3, #224
- lsls r3, r3, #1
- adds r2, r1, r3
- adds r3, #73
- str r3, [r2, #0]
- ldr r0, [pc, #40]
- bl sub_02003478
- ldr r0, [pc, #40]
- bl sub_02003476
- bl sub_0200349a
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00002009
- .4byte 0x00000101
- .4byte 0x00002002
- .4byte 0x02009b94
- .4byte 0x03001ebc
- .4byte 0x0000012f
- .4byte 0x00000914
+AlchemyC_02001450:
+ .space 0x44
+AlchemyC_02001494:
+ .space 0x5a0
.4byte 0x47204c00
.4byte 0x080000c1
.4byte 0x47204c00
diff --git a/games/gs1/assets/code/resource_3ab_overlay.s b/games/gs1/assets/code/resource_3ab_overlay.s
index af27dffbe..6e2b16261 100644
--- a/games/gs1/assets/code/resource_3ab_overlay.s
+++ b/games/gs1/assets/code/resource_3ab_overlay.s
@@ -652,273 +652,8 @@ AlchemyC_02001240:
bx r0
.2byte 0x1e40
.2byte 0x0300
- push {r5, r6, lr}
- bl sub_02002d00
- movs r1, #160
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #16
- lsls r2, r2, #16
- bl sub_02002d6e
- movs r1, #152
- movs r2, #224
- movs r0, #8
- lsls r1, r1, #16
- lsls r2, r2, #15
- bl sub_02002d7c
- movs r1, #168
- movs r2, #224
- movs r0, #9
- lsls r1, r1, #16
- lsls r2, r2, #15
- bl sub_02002d8a
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02002de6
- movs r1, #192
- movs r0, #17
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02002df2
- movs r1, #160
- movs r2, #0
- movs r0, #18
- lsls r1, r1, #7
- bl sub_02002dfe
- movs r1, #0
- movs r0, #0
- bl sub_02002e26
- bl sub_02002e42
- movs r0, #30
- bl sub_02002d58
- movs r0, #0
- ldr r1, [pc, #548]
- ldr r2, [pc, #552]
- bl sub_02002d92
- movs r0, #8
- ldr r1, [pc, #540]
- ldr r2, [pc, #540]
- bl sub_02002d9c
- movs r0, #9
- ldr r1, [pc, #528]
- ldr r2, [pc, #532]
- bl sub_02002da6
- movs r2, #144
- movs r0, #8
- movs r1, #152
- lsls r2, r2, #1
- bl sub_02002dca
- movs r2, #144
- lsls r2, r2, #1
- movs r0, #9
- movs r1, #168
- bl sub_02002dd6
- movs r0, #0
- movs r1, #4
- bl sub_02002e06
- movs r2, #148
- lsls r2, r2, #1
- movs r0, #0
- movs r1, #160
- bl sub_02002de2
- ldr r6, [pc, #484]
- movs r1, #200
- lsls r1, r1, #4
- adds r0, r6, #0
- bl sub_02002cfe
- movs r0, #1
- bl sub_02002db4
- movs r0, #121
- bl sub_02002f12
- movs r0, #20
- bl sub_02002dc0
- movs r0, #8
- movs r1, #3
- bl sub_02002e88
- movs r1, #3
- movs r0, #9
- bl sub_02002e90
- movs r0, #121
- bl sub_02002f2e
- movs r0, #30
- bl sub_02002ddc
- movs r0, #8
- bl sub_02002e0a
- adds r0, #35
- ldrb r3, [r0, #0]
- movs r5, #1
- orrs r3, r5
- strb r3, [r0, #0]
- movs r0, #9
- bl sub_02002e1a
- adds r0, #35
- ldrb r3, [r0, #0]
- orrs r5, r3
- movs r1, #4
- strb r5, [r0, #0]
- movs r0, #0
- bl sub_02002e72
- movs r0, #121
- bl sub_02002f60
- movs r0, #0
- bl sub_02002e6e
- movs r0, #8
- movs r1, #1
- bl sub_02002e86
- movs r1, #1
- movs r0, #9
- bl sub_02002e8e
- adds r0, r6, #0
- bl sub_02002d7c
- movs r0, #0
- bl sub_02002e52
- adds r0, #85
- ldrb r2, [r0, #0]
- movs r3, #2
- orrs r3, r2
- strb r3, [r0, #0]
- movs r0, #0
- bl sub_02002e62
- movs r5, #192
- lsls r5, r5, #11
- str r5, [r0, #40]
- movs r0, #0
- bl sub_02002e6e
- str r5, [r0, #44]
- movs r0, #1
- bl sub_02002e4e
- b.n .L_02001480
-.L_0200147a:
- movs r0, #1
- bl sub_02002e56
-.L_02001480:
- movs r0, #0
- bl sub_02002e84
- ldr r3, [r0, #12]
- cmp r3, #0
- bne.n .L_0200147a
- movs r1, #192
- movs r2, #0
- movs r0, #0
- lsls r1, r1, #8
- bl sub_02002f26
- movs r1, #19
- movs r0, #0
- bl sub_02002ee6
- movs r0, #127
- bl sub_02002fd4
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02002f56
- movs r1, #200
- lsls r1, r1, #4
- ldr r0, [pc, #252]
- bl sub_02002de0
- movs r0, #2
- bl sub_02002e96
- movs r0, #0
- bl sub_02002ec4
- movs r3, #192
- lsls r3, r3, #10
- str r3, [r0, #40]
- movs r0, #1
- bl sub_02002ea8
- b.n .L_020014da
-.L_020014d4:
- movs r0, #1
- bl sub_02002eb0
-.L_020014da:
- movs r0, #0
- bl sub_02002ede
- ldr r3, [r0, #12]
- cmp r3, #0
- bne.n .L_020014d4
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #0
- bl sub_02002f96
- movs r0, #10
- bl sub_02002ecc
- movs r1, #1
- movs r0, #0
- bl sub_02002f44
- ldr r0, [pc, #180]
- bl sub_02002e32
- movs r0, #50
- bl sub_02002ee0
- ldr r0, [pc, #172]
- bl sub_02002f7e
- movs r1, #0
- movs r0, #8
- bl sub_02002f96
- movs r0, #8
- bl sub_02002f1c
- adds r0, #35
- ldrb r3, [r0, #0]
- movs r5, #1
- orrs r3, r5
- strb r3, [r0, #0]
- movs r0, #9
- bl sub_02002f2c
- adds r0, #35
- ldrb r3, [r0, #0]
- movs r1, #128
- orrs r5, r3
- movs r2, #128
- strb r5, [r0, #0]
- lsls r1, r1, #9
- movs r0, #8
- lsls r2, r2, #8
- bl sub_02002f4a
- movs r1, #128
- movs r2, #128
- movs r0, #9
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02002f58
- movs r0, #8
- movs r1, #144
- movs r2, #200
- bl sub_02002f7a
- movs r2, #200
- movs r1, #176
- movs r0, #9
- bl sub_02002f84
- movs r0, #8
- bl sub_02002fa2
- movs r0, #9
- bl sub_02002fa8
- movs r0, #8
- movs r1, #1
- bl sub_02002fc0
- movs r1, #1
- movs r0, #9
- bl sub_02002fc8
- movs r0, #30
- bl sub_02002f5e
- movs r1, #192
- movs r0, #8
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02003022
- movs r1, #160
- movs r0, #9
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200302e
- bl sub_02002f8a
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x0001cccc
- .4byte 0x0000e666
- .4byte 0x020092a5
- .2byte 0x2410
- .2byte 0x0000
+AlchemyC_0200131c:
+ .space 0x2a0
AlchemyC_020015bc:
.space 0xaa
.2byte 0x0000
diff --git a/games/gs1/assets/code/resource_3af_overlay.s b/games/gs1/assets/code/resource_3af_overlay.s
index e7bb98e33..298000639 100644
--- a/games/gs1/assets/code/resource_3af_overlay.s
+++ b/games/gs1/assets/code/resource_3af_overlay.s
@@ -2510,312 +2510,8 @@ AlchemyC_02001d0c:
.4byte 0x0200c4ec
.2byte 0x1e45
.2byte 0x0000
- push {r5, r6, lr}
- bl sub_02006280
- movs r1, #15
- movs r0, #0
- bl sub_02006340
- movs r0, #0
- bl sub_020062ae
- movs r1, #0
- bl sub_0200624c
- ldr r0, [pc, #728]
- bl sub_020062aa
- movs r0, #1
- bl sub_02006210
- ldr r0, [pc, #720]
- bl sub_020062b6
- movs r0, #1
- bl sub_0200621c
- movs r1, #0
- movs r0, #31
- bl sub_0200633c
- movs r0, #24
- bl sub_020062da
- movs r1, #1
- bl sub_02006278
- movs r0, #25
- bl sub_020062e6
- movs r1, #1
- bl sub_02006284
- movs r0, #26
- bl sub_020062f2
- movs r1, #1
- bl sub_02006290
- movs r0, #27
- bl sub_020062fe
- movs r1, #1
- bl sub_0200629c
- movs r0, #28
- bl sub_0200630a
- movs r1, #1
- bl sub_020062a8
- movs r0, #29
- bl sub_02006316
- movs r1, #1
- bl sub_020062b4
- movs r1, #128
- movs r2, #160
- lsls r2, r2, #18
- movs r0, #22
- lsls r1, r1, #17
- bl sub_0200638a
- ldr r5, [pc, #616]
- movs r0, #22
- adds r1, r5, #0
- bl sub_0200634c
- movs r1, #134
- movs r2, #173
- lsls r2, r2, #18
- movs r0, #21
- lsls r1, r1, #17
- bl sub_020063a2
- adds r1, r5, #0
- movs r0, #22
- bl sub_02006362
- movs r1, #242
- movs r2, #151
- movs r0, #24
- lsls r1, r1, #16
- lsls r2, r2, #18
- bl sub_020063b8
- movs r1, #132
- movs r2, #150
- movs r0, #25
- lsls r1, r1, #17
- lsls r2, r2, #18
- bl sub_020063c6
- movs r1, #254
- movs r2, #167
- movs r0, #26
- lsls r1, r1, #16
- lsls r2, r2, #18
- bl sub_020063d4
- movs r1, #141
- ldr r2, [pc, #544]
- lsls r1, r1, #17
- movs r0, #27
- bl sub_020063e0
- movs r0, #24
- bl sub_02006386
- movs r6, #0
- adds r0, #99
- strb r6, [r0, #0]
- movs r0, #25
- bl sub_02006392
- movs r5, #1
- adds r0, #99
- strb r5, [r0, #0]
- movs r0, #26
- bl sub_0200639e
- adds r0, #99
- strb r6, [r0, #0]
- movs r0, #27
- bl sub_020063a8
- adds r0, #99
- strb r5, [r0, #0]
- ldr r5, [pc, #496]
- movs r0, #24
- adds r1, r5, #0
- bl sub_020063ce
- adds r1, r5, #0
- movs r0, #25
- bl sub_020063d6
- ldr r5, [pc, #480]
- movs r0, #26
- adds r1, r5, #0
- bl sub_020063e0
- adds r1, r5, #0
- movs r0, #27
- bl sub_020063e8
- movs r1, #0
- movs r0, #20
- movs r2, #0
- bl sub_0200643a
- ldr r3, [pc, #456]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #66
- str r2, [r3, #0]
- bl sub_0200651c
- bl sub_02006530
- movs r0, #200
- lsls r0, r0, #1
- bl sub_020063d0
- movs r1, #254
- movs r2, #185
- movs r0, #28
- lsls r1, r1, #16
- lsls r2, r2, #18
- bl sub_02006466
- movs r1, #192
- movs r0, #29
- lsls r1, r1, #13
- ldr r2, [pc, #412]
- bl sub_02006472
- movs r0, #28
- ldr r1, [pc, #408]
- ldr r2, [pc, #408]
- bl sub_0200642c
- movs r0, #29
- ldr r1, [pc, #396]
- ldr r2, [pc, #400]
- bl sub_02006436
- movs r2, #161
- movs r0, #29
- movs r1, #172
- lsls r2, r2, #2
- bl sub_0200646a
- movs r2, #165
- movs r0, #28
- movs r1, #200
- lsls r2, r2, #2
- bl sub_0200647e
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #11
- lsls r2, r2, #10
- bl sub_0200645c
- movs r2, #155
- movs r0, #0
- movs r1, #174
- lsls r2, r2, #2
- bl sub_02006490
- movs r2, #145
- lsls r2, r2, #2
- movs r1, #180
- movs r0, #28
- bl sub_020064a4
- movs r0, #146
- bl sub_020065ba
- ldr r5, [pc, #328]
- movs r0, #28
- adds r1, r5, #0
- bl sub_0200648c
- adds r1, r5, #0
- movs r0, #29
- bl sub_02006494
- movs r0, #240
- bl sub_020065d2
- movs r1, #134
- ldr r2, [pc, #308]
- movs r0, #31
- lsls r1, r1, #16
- bl sub_020064ee
- ldr r1, [pc, #300]
- movs r0, #31
- bl sub_020064ae
- movs r0, #10
- bl sub_02006474
- movs r1, #134
- movs r2, #146
- movs r0, #30
- lsls r1, r1, #16
- lsls r2, r2, #18
- bl sub_0200650a
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #11
- lsls r2, r2, #10
- movs r0, #30
- bl sub_020064c8
- movs r0, #30
- bl sub_020064be
- movs r3, #128
- lsls r3, r3, #12
- movs r2, #153
- str r3, [r0, #40]
- lsls r2, r2, #2
- movs r1, #186
- movs r0, #30
- bl sub_02006510
- movs r0, #30
- bl sub_020064d6
- movs r1, #1
- bl sub_02006474
- movs r0, #10
- bl sub_020064ba
- movs r1, #128
- movs r2, #128
- movs r0, #30
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_02006500
- movs r2, #150
- lsls r2, r2, #2
- movs r0, #30
- movs r1, #216
- bl sub_0200653c
- movs r1, #192
- lsls r1, r1, #8
- movs r0, #30
- bl sub_02005bfa
- bl .L_02002db6
- movs r0, #10
- bl sub_020064e8
- ldr r5, [pc, #176]
- movs r0, #30
- adds r1, r5, #0
- bl sub_02006532
- movs r0, #10
- bl sub_020064f8
- adds r1, r5, #0
- movs r0, #28
- bl sub_02006540
- movs r0, #10
- bl sub_02006506
- adds r1, r5, #0
- movs r0, #29
- bl sub_02006566
- movs r0, #20
- bl sub_02006514
- movs r0, #147
- bl sub_02006692
- bl sub_0200667e
- bl sub_0200668a
- movs r0, #24
- bl sub_02006578
- movs r0, #25
- bl sub_0200657e
- movs r0, #26
- bl sub_02006584
- movs r0, #27
- bl sub_0200658a
- movs r0, #10
- bl sub_02006540
- bl sub_02006514
- movs r0, #21
- bl sub_02006642
- ldr r0, [pc, #80]
- movs r1, #1
- movs r2, #0
- bl sub_02006534
- bl sub_02006530
- movs r0, #13
- bl sub_0200669e
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x0200d160
- .4byte 0x0200d268
- .4byte 0x0200c80c
- .4byte 0x02920000
- .4byte 0x0200c7a8
- .4byte 0x0200c764
- .4byte 0x03001ebc
- .4byte 0x024a0000
- .4byte 0x00019999
- .4byte 0x0000cccc
- .4byte 0x0200c7ec
- .4byte 0x02520000
- .4byte 0x0200c814
- .4byte 0x0200c888
- .2byte 0x1e45
- .2byte 0x0000
+AlchemyC_02001f90:
+ .space 0x330
push {r5, r6, r7, lr}
bl sub_020065b0
movs r1, #15
diff --git a/games/gs1/assets/code/resource_3b0_overlay.s b/games/gs1/assets/code/resource_3b0_overlay.s
index 56b0537fb..1e977ea4f 100644
--- a/games/gs1/assets/code/resource_3b0_overlay.s
+++ b/games/gs1/assets/code/resource_3b0_overlay.s
@@ -890,214 +890,8 @@ AlchemyC_02000a84:
.space 0x74
AlchemyC_02000af8:
.space 0x380
- push {r5, r6, lr}
- bl sub_02002090
- movs r1, #15
- movs r0, #0
- bl sub_02002108
- movs r0, #0
- bl sub_020020be
- movs r1, #0
- bl sub_02002084
- ldr r0, [pc, #464]
- bl sub_020020ba
- movs r0, #1
- bl sub_02002050
- movs r0, #9
- bl sub_02001926
- movs r0, #10
- bl sub_0200192c
- movs r0, #11
- bl sub_02001932
- movs r0, #12
- bl sub_02001938
- movs r0, #13
- bl sub_0200193e
- movs r0, #14
- bl sub_02001944
- movs r0, #15
- bl sub_0200194a
- ldr r1, [pc, #412]
- movs r0, #8
- bl sub_02002112
- ldr r5, [pc, #408]
- ldr r3, [pc, #412]
- ldr r2, [r5, #0]
- movs r6, #224
- lsls r6, r6, #1
- str r3, [r2, r6]
- bl sub_020021ca
- bl sub_020021de
- movs r0, #200
- lsls r0, r0, #1
- bl sub_020020f6
- movs r0, #9
- bl sub_0200213c
- movs r0, #10
- bl sub_02002142
- movs r0, #11
- bl sub_02002148
- movs r0, #12
- bl sub_0200214e
- movs r0, #13
- bl sub_02002154
- movs r0, #14
- bl sub_0200215a
- movs r0, #15
- bl sub_02002160
- movs r1, #192
- movs r2, #192
- movs r0, #9
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_0200215e
- movs r1, #192
- movs r2, #192
- movs r0, #10
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_0200216c
- movs r1, #192
- movs r2, #192
- movs r0, #11
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_0200217a
- movs r1, #192
- movs r2, #192
- movs r0, #12
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_02002188
- movs r1, #192
- movs r2, #192
- movs r0, #13
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_02002196
- movs r1, #192
- movs r2, #192
- movs r0, #14
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_020021a4
- movs r1, #192
- movs r2, #192
- lsls r2, r2, #9
- movs r0, #15
- lsls r1, r1, #10
- bl sub_020021b2
- ldr r1, [pc, #248]
- movs r0, #9
- bl sub_020021c2
- ldr r1, [pc, #244]
- movs r0, #10
- bl sub_020021ca
- ldr r1, [pc, #240]
- movs r0, #11
- bl sub_020021d2
- ldr r1, [pc, #236]
- movs r0, #12
- bl sub_020021da
- ldr r1, [pc, #232]
- movs r0, #13
- bl sub_020021e2
- ldr r1, [pc, #228]
- movs r0, #14
- bl sub_020021ea
- ldr r1, [pc, #224]
- movs r0, #15
- bl sub_020021f2
- movs r0, #40
- bl sub_020021c0
- movs r0, #8
- movs r1, #3
- bl sub_02002230
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #8
- bl sub_0200227a
- movs r0, #120
- bl sub_020021d8
- movs r0, #8
- movs r1, #1
- bl sub_02002248
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #1
- movs r2, #60
- bl sub_0200228c
- movs r1, #128
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200222a
- movs r2, #172
- movs r0, #8
- movs r1, #164
- lsls r2, r2, #1
- bl sub_02002256
- movs r0, #8
- movs r1, #4
- movs r2, #10
- bl sub_02002270
- movs r1, #6
- movs r2, #20
- movs r0, #8
- bl sub_0200227a
- ldr r0, [pc, #124]
- bl sub_020022a0
- movs r0, #8
- movs r1, #0
- movs r2, #20
- bl sub_020022b2
- ldr r2, [r5, #0]
- ldr r3, [pc, #112]
- str r3, [r2, r6]
- bl sub_0200231c
- bl sub_02002328
- ldr r1, [pc, #104]
- movs r0, #226
- ldr r2, [pc, #104]
- lsls r0, r0, #1
- adds r3, r1, r0
- strh r2, [r3, #0]
- movs r3, #227
- lsls r3, r3, #1
- adds r2, r1, r3
- movs r3, #2
- strh r3, [r2, #0]
- bl sub_02002176
- cmp r0, #11
- bne.n .L_02001054
- movs r0, #15
- bl sub_02002324
- b.n .L_0200105a
-.L_02001054:
- movs r0, #14
- bl sub_0200232c
-.L_0200105a:
- bl sub_02002278
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x0200976c
- .4byte 0x0200939c
- .4byte 0x03001ebc
- .4byte 0x00000203
- .4byte 0x02009450
- .4byte 0x02009480
- .4byte 0x020094b0
- .4byte 0x020094e0
- .4byte 0x02009510
- .4byte 0x02009540
- .4byte 0x02009570
- .4byte 0x00001ee4
- .4byte 0x00000202
- .4byte 0x02000240
- .2byte 0x006f
- .2byte 0x0000
+AlchemyC_02000e78:
+ .space 0x228
push {r5, r6, lr}
mov r6, sl
mov r5, r8
diff --git a/games/gs1/assets/code/resource_3b1_overlay.s b/games/gs1/assets/code/resource_3b1_overlay.s
index 5f6c6be10..29b1acc83 100644
--- a/games/gs1/assets/code/resource_3b1_overlay.s
+++ b/games/gs1/assets/code/resource_3b1_overlay.s
@@ -2265,4918 +2265,1961 @@ AlchemyC_02001a08:
.space 0x58
AlchemyC_02001a60:
.space 0xd4
- push {r5, r6, lr}
- mov r6, fp
- mov r5, sl
- push {r5, r6}
- mov r6, r9
- mov r5, r8
- push {r5, r6}
- ldr r0, [pc, #952]
- bl sub_02007fe6
- cmp r0, #0
- bne.n .L_02001b4e
- b.n .L_02001eea
-.L_02001b4e:
- bl sub_02008018
- bl sub_0200819c
- ldr r0, [pc, #936]
- ldr r1, [pc, #936]
- bl sub_02008154
- movs r1, #1
-.L_02001b60:
- movs r2, #232
- lsls r2, r2, #17
- ldr r3, [pc, #928]
- ldr r0, [pc, #932]
- negs r1, r1
- bl .L_02006418
- movs r1, #1
- movs r0, #13
- bl sub_020080f4
- ldr r0, [pc, #920]
- bl sub_02008122
- ldr r3, [pc, #916]
- mov r8, r3
- mov r0, r8
- bl .L_020063f0
- movs r3, #208
- lsls r3, r3, #8
- mov sl, r3
- movs r0, #12
- mov r1, sl
- bl .L_02006412
- movs r1, #129
- ldr r6, [pc, #896]
- movs r2, #20
- movs r0, #12
- lsls r1, r1, #1
- bl sub_02008188
- movs r1, #2
- movs r0, #12
- bl sub_02008120
- adds r0, r6, #0
- bl .L_0200641a
- movs r0, #14
- movs r1, #1
- bl sub_02008136
- movs r2, #20
- ldr r0, [pc, #864]
- movs r1, #0
- bl sub_02008180
- movs r0, #12
- movs r1, #0
- bl sub_02006448
- movs r0, #12
- ldr r1, [pc, #848]
- movs r2, #40
- ldr r5, [pc, #840]
- bl sub_020081bc
- movs r2, #40
-.L_02001bd8:
- movs r0, #14
- ldr r1, [pc, #840]
- bl sub_020081c6
- movs r1, #3
- movs r0, #14
- bl sub_0200815e
- adds r0, r5, #0
- bl sub_02006458
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #12
- bl sub_020081e6
- movs r0, #40
- bl sub_020080bc
- movs r1, #3
- movs r0, #12
- bl sub_0200817c
- adds r0, r6, #0
- bl sub_02006476
- movs r1, #1
- movs r0, #14
- bl sub_02008192
- adds r0, r5, #0
- bl sub_02006484
- movs r3, #176
- lsls r3, r3, #8
- mov r9, r3
- mov r1, r9
- movs r0, #14
- bl sub_020064a6
- adds r0, r5, #0
- bl sub_02006498
- movs r0, #12
- mov r1, sl
- bl sub_020064b4
- movs r1, #128
- movs r2, #30
- movs r0, #12
- lsls r1, r1, #1
- bl sub_02008228
- movs r1, #1
- movs r0, #12
- bl sub_020081c0
- adds r0, r6, #0
- bl sub_020064ba
- movs r1, #4
- movs r0, #13
- bl sub_020081b6
- mov r0, r8
- bl sub_020064c8
- movs r1, #2
-.L_02001c60:
- movs r0, #13
- bl sub_020081dc
- mov r0, r8
- bl sub_020064d6
- movs r1, #4
- movs r0, #12
- bl sub_020081c2
- adds r0, r6, #0
- bl sub_020064e4
- movs r1, #4
- movs r0, #14
- bl sub_020081e0
- adds r0, r5, #0
- bl sub_020064f2
- movs r3, #128
- lsls r3, r3, #8
- mov fp, r3
- movs r0, #14
- mov r1, fp
- bl sub_02006514
- movs r0, #14
- movs r1, #2
- bl sub_02008214
- adds r0, r5, #0
-.L_02001ca0:
- movs r1, #0
- movs r2, #20
- bl sub_02008266
- movs r0, #12
- movs r1, #0
- movs r2, #0
- bl sub_02008280
- movs r1, #129
- movs r0, #12
- lsls r1, r1, #1
- movs r2, #80
- bl sub_020082a4
- adds r0, r6, #0
- movs r1, #0
- movs r2, #20
- bl sub_02008286
- movs r0, #14
- ldr r1, [pc, #600]
- movs r2, #0
- bl sub_020082b8
- movs r2, #60
- movs r0, #13
- ldr r1, [pc, #588]
- bl sub_020082c2
- movs r1, #2
- movs r0, #14
- bl sub_0200825a
- adds r0, r5, #0
- bl sub_02006554
- movs r0, #14
- mov r1, r9
- bl sub_02006570
- movs r1, #1
- movs r0, #14
- bl sub_02008278
- adds r0, r5, #0
- bl sub_0200656a
- movs r3, #192
- lsls r3, r3, #6
- mov r8, r3
- movs r0, #13
- mov r1, r8
- bl sub_0200658c
- movs r0, #13
- ldr r1, [pc, #524]
- movs r2, #0
- bl sub_020082fe
- movs r2, #60
- movs r0, #12
- ldr r1, [pc, #512]
- bl sub_02008308
- movs r1, #1
- movs r0, #13
- bl sub_020082a8
- movs r0, #13
- bl sub_0200659a
- movs r2, #40
- movs r0, #14
- ldr r1, [pc, #492]
- bl sub_02008320
- movs r1, #1
- movs r0, #14
- bl sub_020082c0
- adds r0, r5, #0
- bl sub_020065b2
- movs r0, #12
- mov r1, sl
- movs r2, #0
- bl sub_02008320
- movs r1, #160
- movs r0, #13
- lsls r1, r1, #7
- movs r2, #40
- bl sub_0200832c
- movs r2, #0
- movs r0, #12
- movs r1, #0
- bl sub_02008336
- movs r0, #13
- mov r1, r8
- bl sub_020065ee
- movs r0, #12
- movs r1, #2
- bl sub_020082f6
- adds r0, r6, #0
- movs r1, #0
- movs r2, #20
- bl sub_02008340
- movs r1, #128
- movs r2, #40
- lsls r1, r1, #7
- movs r0, #14
- bl sub_0200835c
- adds r0, r5, #0
- bl sub_020065fe
- movs r0, #12
- movs r1, #2
- bl sub_02008312
- movs r1, #2
- movs r0, #13
-.L_02001da0:
- bl sub_02008322
- movs r0, #60
- bl sub_02008268
- movs r1, #1
- movs r0, #13
- bl sub_02008330
- movs r0, #13
- bl sub_02006622
- movs r1, #3
- movs r0, #14
- bl sub_0200831e
- adds r0, r5, #0
- bl sub_02006630
- movs r1, #129
- movs r2, #40
- movs r0, #12
- lsls r1, r1, #1
- bl sub_020083b8
- movs r1, #2
- movs r0, #12
- bl sub_02008358
- adds r0, r6, #0
- bl sub_0200664a
- movs r1, #3
- movs r0, #13
- bl sub_02008346
- movs r0, #13
- bl sub_02006658
- movs r2, #40
- movs r0, #14
- mov r1, r9
- bl sub_020083c6
- movs r0, #14
- movs r1, #3
- bl sub_0200834e
- movs r0, #13
- movs r1, #3
- bl sub_02008366
- movs r0, #14
- ldr r1, [pc, #284]
- ldr r2, [pc, #284]
- bl sub_02008308
- ldr r2, [pc, #280]
- movs r0, #13
- ldr r1, [pc, #272]
- bl sub_02008312
- ldr r5, [pc, #272]
- movs r0, #14
- adds r1, r5, #0
- bl sub_02008324
- adds r1, r5, #0
- movs r0, #13
- bl sub_0200832c
- movs r0, #20
- bl sub_020082f2
- movs r1, #128
- movs r0, #12
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200840e
- ldr r1, [pc, #188]
- ldr r2, [pc, #240]
- movs r0, #0
- bl sub_02008340
- movs r0, #0
- bl sub_02008336
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #254
- ands r3, r2
- movs r2, #130
- strb r3, [r0, #0]
- movs r1, #184
- lsls r2, r2, #2
- movs r0, #0
- bl sub_02008394
+AlchemyC_02001b34:
+ .space 0x408
+AlchemyC_02001f3c:
+ .space 0x518
+.L_02002454:
+ .space 0x20
+.L_02002474:
+ .space 0x364
+AlchemyC_020027d8:
+ .space 0x818
+ push {r5, lr}
movs r0, #1
- bl sub_0200832a
- movs r0, #0
- bl sub_02008358
-.L_02001e72:
- adds r0, #90
-.L_02001e74:
- ldrb r2, [r0, #0]
- movs r3, #1
- orrs r3, r2
- strb r3, [r0, #0]
- mov r1, fp
- movs r0, #0
- movs r2, #20
- bl sub_02008454
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02008460
- movs r0, #12
- movs r1, #4
- movs r2, #20
- bl sub_0200840a
- movs r1, #160
- movs r2, #20
- movs r0, #0
- lsls r1, r1, #8
- bl sub_02008476
- movs r1, #2
- movs r0, #12
- bl sub_02008426
- movs r0, #12
- bl sub_02006720
- ldr r2, [pc, #116]
- movs r0, #12
- ldr r1, [pc, #108]
- bl sub_020083b6
- adds r1, r5, #0
- movs r0, #12
- bl sub_020083c6
- movs r0, #40
- bl sub_0200838c
- movs r1, #128
- lsls r1, r1, #7
+ bl sub_02009416
+ movs r0, #162
+ lsls r0, r0, #1
+ bl sub_020094a6
+ ldr r3, [pc, #804]
+ movs r2, #224
+ ldr r3, [r3, #0]
+ lsls r2, r2, #1
+ adds r3, r3, r2
+ ldr r1, [pc, #800]
+ adds r2, #73
+ str r2, [r3, #0]
+ subs r2, #71
+ adds r3, r1, r2
movs r2, #0
- movs r0, #0
- bl sub_020084a8
- movs r0, #12
- bl sub_020083e6
- ldr r0, [pc, #84]
- bl sub_0200838c
- bl sub_020083b8
-.L_02001eea:
- pop {r3, r5, r6}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- pop {r3}
- mov fp, r3
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x00000911
- .4byte 0x00026666
- .4byte 0x00004ccc
- .4byte 0x10000014
- .4byte 0x05b70000
- .4byte 0x00001d56
- .4byte 0x0000200d
- .4byte 0x0000800c
- .4byte 0x0000a00e
- .4byte 0x00000101
- .4byte 0x00000103
- .4byte 0x00019999
- .4byte 0x0000cccc
- .4byte 0x0200e6a8
- .4byte 0x00013333
- .2byte 0x0922
+ ldrsh r3, [r3, r2]
+ subs r3, #1
+ cmp r3, #23
+ bhi.n .L_020030d6
+ ldr r2, [pc, #784]
+ lsls r3, r3, #2
+ ldr r3, [r3, r2]
+ mov pc, r3
.2byte 0x0000
- push {r5, r6, r7, lr}
- mov r7, fp
- mov r6, sl
- mov r5, r9
- push {r5, r6, r7}
- mov r7, r8
- push {r7}
- movs r0, #28
- bl sub_020085ae
- ldr r0, [pc, #1016]
- ldr r1, [pc, #1020]
- bl sub_0200854e
- movs r0, #228
- movs r2, #162
- movs r1, #1
- ldr r3, [pc, #1012]
- lsls r2, r2, #18
- lsls r0, r0, #17
- negs r1, r1
- bl sub_02006814
- movs r1, #1
- movs r0, #9
- bl sub_020084f0
- ldr r0, [pc, #996]
- bl sub_0200851e
- movs r0, #9
- bl sub_020067e8
- movs r1, #208
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02008558
- movs r1, #208
- movs r0, #10
- lsls r1, r1, #8
+ .4byte 0x0200b088
+ .4byte 0x0200b088
+ .4byte 0x0200b0d6
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0b8
+ .4byte 0x0200b0d6
+ .4byte 0x0200b0d6
+ .4byte 0x0200b0d6
+ .4byte 0x0200b0d6
+ .4byte 0x0200b0d6
+ .4byte 0x0200b088
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0d6
+ .4byte 0x0200b0d6
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0d6
+ .4byte 0x0200b0b2
+ .4byte 0x0200b0b2
+ .4byte 0xf00648aa
+ .4byte 0x2800fa4f
+ .4byte 0x48a9d107
+ .4byte 0xfa4ff006
+ .4byte 0xd0022800
+ .4byte 0x20092102
+ .4byte 0x48a6e016
+ .4byte 0xfa4ff006
+ .4byte 0xd0132800
+ .4byte 0x200c2102
+ .4byte 0x2102e00e
+ .4byte 0xe00b2013
+ .4byte 0xf006489e
+ .4byte 0x2800fa4f
+ .4byte 0x489ed108
+ .4byte 0xfa4ff006
+ .4byte 0xd0032800
+ .4byte 0x200d2102
+ .4byte 0xfacbf006
+ .2byte 0x4995
+.L_020030d6:
+ movs r2, #225
+ lsls r2, r2, #1
+ adds r3, r1, r2
movs r2, #0
- bl sub_02008564
- movs r0, #11
+ ldrsh r3, [r3, r2]
+ subs r3, #1
+ cmp r3, #29
+ bls.n .L_020030e8
+ b.n .L_02003320
+.L_020030e8:
+ ldr r2, [pc, #596]
+ lsls r3, r3, #2
+ ldr r3, [r3, r2]
+ mov pc, r3
+ .4byte 0x0200b168
+ .4byte 0x0200b168
+ .4byte 0x0200b320
+ .4byte 0x0200b16e
+ .4byte 0x0200b174
+ .4byte 0x0200b320
+ .4byte 0x0200b320
+ .4byte 0x0200b320
+ .4byte 0x0200b320
+ .4byte 0x0200b17a
+ .4byte 0x0200b190
+ .4byte 0x0200b1a6
+ .4byte 0x0200b1ac
+ .4byte 0x0200b1b2
+ .4byte 0x0200b1b8
+ .4byte 0x0200b20e
+ .4byte 0x0200b214
+ .4byte 0x0200b254
+ .4byte 0x0200b25a
+ .4byte 0x0200b2aa
+ .4byte 0x0200b2b0
+ .4byte 0x0200b2e4
+ .4byte 0x0200b2ea
+ .4byte 0x0200b2fa
+ .4byte 0x0200b320
+ .4byte 0x0200b320
+ .4byte 0x0200b320
+ .4byte 0x0200b320
+ .4byte 0x0200b320
+ .4byte 0x0200b300
+ .4byte 0xfa8df003
+ .4byte 0xf003e0d8
+ .4byte 0xe0d5fb35
+ .4byte 0xf9b1f003
+ .4byte 0x486fe0d2
+ .4byte 0xfa4ff006
+ .4byte 0xd0022800
+ .4byte 0xfef5f003
+ .4byte 0xf003e0ca
+ .4byte 0xe0c7fe87
+ .4byte 0xf0064869
+ .4byte 0x2800fa4f
+ .4byte 0xf003d002
+ .4byte 0xe0bfff75
+ .4byte 0xff19f003
+ .4byte 0xf003e0bc
+ .4byte 0xe0b9ffc9
+ .4byte 0xf873f004
+ .4byte 0xf004e0b6
+ .4byte 0xe0b3f89d
+ .4byte 0xf0064862
+ .4byte 0x2800fa4f
+ .4byte 0xf006d022
+ .4byte 0x2019fa63
+ .4byte 0x22002101
+ .4byte 0xfc73f004
+ .4byte 0x20162200
+ .4byte 0xf0042100
+ .4byte 0x4d5bfc73
+ .4byte 0x1c292024
+ .4byte 0xfa7ff006
+ .4byte 0x1c292025
+ .4byte 0xfa7ff006
+ .4byte 0x1c292026
+ .4byte 0xfa7ff006
+ .4byte 0x21032024
+ .4byte 0xfacbf006
+ .4byte 0x21032025
+ .4byte 0xfacbf006
+ .4byte 0xe0472026
+ .4byte 0xf8cbf004
+ .4byte 0xf004e088
+ .4byte 0xe085f90b
+ .4byte 0xf006484b
+ .4byte 0x2800fa4f
+ .4byte 0xf006d017
+ .4byte 0x2019fa63
+ .4byte 0x22002102
+ .4byte 0xfc73f004
+ .4byte 0x20162200
+ .4byte 0xf0042100
+ .4byte 0x4d44fc73
+ .4byte 0x1c292024
+ .4byte 0xfa7ff006
+ .4byte 0x1c292025
+ .4byte 0xfa7ff006
+ .4byte 0xfa67f006
+ .4byte 0xf005e068
+ .4byte 0xe065f833
+ .4byte 0xfb41f005
+ .4byte 0x483ae062
+ .4byte 0xfa4ff006
+ .4byte 0xd01f2800
+ .4byte 0xfa63f006
+ .4byte 0x21032019
+ .4byte 0xf0042200
+ .4byte 0x2200fc73
+ .4byte 0x21002016
+ .4byte 0xfc73f004
+ .4byte 0x20244d32
+ .4byte 0xf0061c29
+ .4byte 0x2025fa7f
+ .4byte 0xf0061c29
+ .4byte 0x2024fa7f
+ .4byte 0xf0062103
+ .4byte 0x2025facb
+ .4byte 0xf0062103
+ .4byte 0xf006facb
+ .4byte 0xe03dfa67
+ .4byte 0xfb6df005
+ .4byte 0xf005e03a
+ .4byte 0xe037fbbf
+ .4byte 0xf0064824
+ .4byte 0x2800fa4f
+ .4byte 0x4824d011
+ .4byte 0xfa4ff006
+ .4byte 0xd02d2800
+ .4byte 0x22004b22
+ .4byte 0x010921c8
+ .4byte 0x4821601a
+ .4byte 0xfa13f006
+ .4byte 0x21052009
+ .4byte 0xfaa7f006
+ .4byte 0xf005e020
+ .4byte 0xe01dfbf5
+ .4byte 0xfe51f005
+ .4byte 0x4816e01a
+ .4byte 0xfa4ff006
+ .4byte 0xd1152800
+ .4byte 0xfe87f005
+ .4byte 0xf006e012
+ .4byte 0xe00ff887
+ .4byte 0x4a164915
+ .4byte 0xf0042014
+ .4byte 0x2015fc73
+ .4byte 0x22002100
+ .4byte 0xfc73f004
+ .4byte 0xf0064812
+ .4byte 0x2001fa53
+ .2byte 0xf006
+ .2byte 0xfb0b
+.L_02003320:
+ movs r0, #0
+ pop {r5}
+ pop {r1}
+ bx r1
+ .4byte 0x03001ebc
+ .4byte 0x02000240
+ .4byte 0x0200b028
+ .4byte 0x0000093e
+ .4byte 0x00000928
+ .4byte 0x00000911
+ .4byte 0x0200b0f0
+ .4byte 0x00000109
+ .4byte 0x0200e8e4
+ .4byte 0x00000302
+ .4byte 0x0200ff84
+ .4byte 0x0200dc49
+ .4byte 0x00000926
+ .4byte 0x0000092b
+ .2byte 0x0902
+ .2byte 0x0000
+ push {r5, r6, r7, lr}
+ mov r7, r8
+ push {r7}
+ ldr r0, [pc, #16]
+ bl sub_0200980e
+ cmp r0, #0
+ bne.n .L_02003380
+ bl sub_02007946
+ b.n .L_020034f2
+ .2byte 0x0000
+ .2byte 0x0911
+ .2byte 0x0000
+.L_02003380:
+ ldr r0, [pc, #168]
+ bl sub_02009824
+ cmp r0, #0
+ beq.n .L_0200338e
+ bl sub_0200795c
+.L_0200338e:
+ ldr r0, [pc, #160]
+ bl sub_02009832
+ adds r7, r0, #0
+ cmp r7, #0
+ beq.n .L_0200339c
+ b.n .L_020034f2
+.L_0200339c:
+ movs r0, #138
+ lsls r0, r0, #4
+ bl sub_02009842
+ cmp r0, #0
+ beq.n .L_02003456
+ movs r0, #9
+ bl sub_02009894
movs r1, #0
+ adds r6, r0, #0
movs r2, #0
- bl sub_0200856e
- movs r1, #192
- movs r0, #12
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200857a
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #8
- movs r2, #40
- bl sub_02008586
-.L_02001fb8:
- movs r2, #40
- movs r0, #9
- ldr r1, [pc, #924]
- bl sub_020085a8
- movs r1, #2
- movs r0, #9
- bl sub_02008540
- movs r0, #9
- bl sub_0200683a
- movs r0, #12
- movs r1, #0
- movs r2, #0
- bl sub_020085a8
- movs r1, #208
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020085b4
- movs r1, #208
- movs r2, #20
- movs r0, #13
- lsls r1, r1, #8
- bl sub_020085c0
- movs r1, #1
- movs r0, #11
- bl sub_02008578
- ldr r3, [pc, #868]
- mov r9, r3
- mov r0, r9
- bl sub_0200686e
- movs r1, #129
- movs r2, #20
- movs r0, #13
- lsls r1, r1, #1
- bl sub_020085f6
- movs r1, #2
- movs r0, #13
- bl sub_0200858e
movs r0, #13
- bl sub_02006888
- ldr r1, [pc, #836]
- movs r2, #60
- movs r0, #9
- bl sub_0200860e
- movs r0, #9
- bl sub_02006898
- movs r1, #130
- movs r2, #20
+ bl sub_02007ca0
+ movs r1, #228
+ movs r2, #163
lsls r1, r1, #1
- movs r0, #12
- bl sub_02008620
- ldr r0, [pc, #812]
- bl sub_020068aa
- movs r0, #8
- movs r1, #1
- bl sub_020085c6
- movs r7, #192
- movs r1, #3
- movs r0, #8
- bl sub_020085a0
- lsls r7, r7, #6
+ lsls r2, r2, #2
movs r0, #8
- bl sub_020068c4
- adds r1, r7, #0
- movs r0, #12
- bl sub_020068e0
- ldr r0, [pc, #772]
- bl sub_020068d2
+ movs r3, #0
+ bl sub_02007c58
+ movs r3, #240
+ lsls r3, r3, #1
+ mov r8, r3
+ movs r2, #150
movs r3, #176
lsls r3, r3, #8
- mov fp, r3
- mov r1, fp
- movs r0, #11
- bl sub_020068f4
- movs r1, #3
- movs r0, #11
- bl sub_020085dc
- movs r0, #10
- bl sub_02008542
- movs r0, #13
- movs r1, #1
- bl sub_0200860a
-.L_0200208c:
- movs r1, #3
- movs r0, #13
- bl sub_020085f2
- movs r0, #13
- bl sub_02006904
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02008674
- movs r1, #160
- movs r2, #0
- movs r0, #12
- lsls r1, r1, #7
- bl sub_02008680
- movs r3, #160
- lsls r3, r3, #7
- mov sl, r3
- mov r1, sl
- movs r0, #11
- bl sub_0200693e
- movs r0, #13
- ldr r1, [pc, #680]
- ldr r2, [pc, #680]
- bl sub_020085c0
- movs r0, #12
- ldr r1, [pc, #676]
- ldr r2, [pc, #668]
- bl sub_020085ca
- movs r1, #222
- movs r2, #167
- movs r0, #12
- lsls r1, r1, #1
- lsls r2, r2, #2
- bl sub_02008608
- movs r1, #236
- movs r2, #167
lsls r2, r2, #2
- lsls r1, r1, #1
- movs r0, #13
- bl sub_0200861e
- movs r0, #12
- bl sub_02008634
- movs r1, #1
- movs r0, #12
- bl sub_0200864c
- movs r0, #80
-.L_02002100:
- bl sub_020085c2
- movs r3, #208
- lsls r3, r3, #8
- mov r8, r3
- mov r1, r8
- movs r0, #12
- bl sub_02006990
- movs r2, #60
- movs r0, #12
- ldr r1, [pc, #608]
- bl sub_02008702
- movs r1, #1
- movs r0, #11
- bl sub_020086a2
- movs r0, #20
- bl sub_020085e8
- movs r2, #40
- ldr r0, [pc, #588]
- movs r1, #0
- bl sub_020086f2
- movs r0, #11
- movs r1, #2
- bl sub_020086ba
- mov r1, r8
- movs r2, #0
- movs r0, #11
- bl sub_02008714
- mov r0, r9
- bl sub_020069b6
- mov r1, r8
- movs r0, #12
- movs r2, #0
- bl sub_02008724
- movs r2, #60
-.L_02002158:
movs r0, #9
- ldr r1, [pc, #540]
- bl sub_02008746
- movs r1, #4
- movs r0, #11
- bl sub_020086b6
- movs r0, #20
- bl sub_0200862c
- mov r0, r9
- bl sub_020069de
- movs r1, #3
- movs r0, #9
- bl sub_020086ca
- movs r0, #9
- bl sub_020069ec
mov r1, r8
-.L_02002184:
- movs r2, #0
- movs r0, #13
- bl sub_0200875a
- movs r1, #129
- movs r0, #13
-.L_02002190:
- lsls r1, r1, #1
- bl sub_02008784
- movs r2, #20
- movs r1, #2
- movs r0, #13
- bl sub_0200870e
- movs r0, #13
- bl sub_02006a10
- movs r1, #3
- movs r0, #9
- bl sub_0200870c
+ bl sub_02007c6e
movs r0, #9
- ldr r6, [pc, #460]
- bl sub_02006a20
- mov r1, r8
- movs r0, #11
- bl sub_02006a3c
- movs r1, #1
- movs r0, #12
- bl sub_02008744
- adds r0, r6, #0
- bl sub_02006a36
-.L_020021cc:
- movs r2, #40
- movs r0, #8
- ldr r1, [pc, #400]
- bl sub_020087bc
- movs r1, #3
- movs r0, #8
- bl sub_0200872c
+ ldr r1, [pc, #80]
+ ldr r2, [pc, #80]
+ bl sub_020098e0
+ adds r3, r6, #0
+ adds r3, #102
+ ldr r5, [pc, #56]
+ strh r7, [r3, #0]
+ subs r3, #3
+ strb r5, [r3, #0]
+ adds r1, r6, #0
+ adds r1, #89
+ ldrb r2, [r1, #0]
+ movs r3, #128
+ orrs r3, r2
+ strb r3, [r1, #0]
+ ldr r3, [pc, #56]
movs r0, #8
- bl sub_02006a4e
- movs r1, #129
- movs r0, #13
+ str r3, [r6, #108]
+ bl sub_020098f2
+ adds r3, r0, #0
+ adds r3, #98
+ strb r5, [r3, #0]
+ ldr r3, [pc, #44]
+ str r3, [r0, #108]
+ ldr r0, [pc, #44]
+ bl sub_020098ba
+ cmp r0, #0
+ beq.n .L_020034f2
+ movs r3, #160
+ ldr r2, [pc, #36]
+ lsls r3, r3, #8
+ b.n .L_0200344c
+ .4byte 0x00000000
+ .4byte 0x00000928
+ .4byte 0x0000093e
+ .4byte 0x0000cccc
+ .4byte 0x00006666
+ .4byte 0x0200812d
+ .4byte 0x02008285
+ .4byte 0x00000109
+ .2byte 0x029a
+ .2byte 0x0000
+.L_0200344c:
+ movs r0, #0
+ mov r1, r8
+ bl sub_02007ce2
+ b.n .L_020034f2
+.L_02003456:
+ ldr r0, [pc, #164]
+ bl sub_020098fa
+ cmp r0, #0
+ beq.n .L_0200346e
+ movs r1, #222
+ movs r3, #208
lsls r1, r1, #1
- movs r2, #40
- bl sub_020087d6
- movs r2, #0
- movs r1, #4
- movs r0, #13
- bl sub_02008768
- movs r0, #13
- bl sub_02006a6a
- movs r1, #3
- movs r0, #9
- bl sub_02008756
- movs r0, #9
- bl sub_02006a78
- movs r1, #1
- movs r0, #11
- bl sub_02008794
- mov r0, r9
- bl sub_02006a86
- movs r1, #129
- movs r2, #40
+ ldr r2, [pc, #152]
movs r0, #8
+ lsls r3, r3, #8
+ b.n .L_02003484
+.L_0200346e:
+ ldr r0, [pc, #148]
+ bl sub_02009912
+ cmp r0, #0
+ beq.n .L_02003494
+ movs r1, #228
+ movs r2, #162
lsls r1, r1, #1
-.L_02002224:
- bl sub_0200880e
+ lsls r2, r2, #2
movs r0, #8
+ movs r3, #0
+.L_02003484:
+ bl sub_02007d16
+ movs r0, #13
movs r1, #0
- bl sub_020087e6
- movs r0, #11
- movs r1, #2
- bl sub_020087ae
- mov r0, r9
- movs r1, #0
- movs r2, #40
- bl sub_02008800
- movs r1, #128
- movs r0, #9
- lsls r1, r1, #1
movs r2, #0
-.L_0200224a:
- bl sub_02008834
- mov r1, sl
- movs r2, #20
- movs r0, #9
- bl sub_02008826
- movs r0, #9
- movs r1, #2
- bl sub_020087d6
- movs r2, #20
- movs r0, #9
- movs r1, #0
- bl sub_02008828
- movs r1, #3
- movs r0, #11
- bl sub_020087c0
- movs r0, #20
- bl sub_02008736
- movs r1, #128
- movs r2, #40
- movs r0, #12
+ bl sub_02007d78
+ b.n .L_020034f2
+.L_02003494:
+ ldr r0, [pc, #112]
+ bl sub_02009938
+ cmp r0, #0
+ beq.n .L_020034f2
+ movs r3, #128
+ ldr r1, [pc, #104]
+ ldr r2, [pc, #108]
+ lsls r3, r3, #8
+ movs r0, #8
+ movs r5, #176
+ bl sub_02007d3c
+ lsls r5, r5, #8
+ movs r1, #231
lsls r1, r1, #1
- bl sub_0200886a
- movs r1, #2
+ ldr r2, [pc, #92]
+ adds r3, r5, #0
+ movs r0, #9
+ bl sub_02007d4c
movs r0, #12
- bl sub_02008802
- ldr r5, [pc, #236]
- adds r0, r6, #0
- bl sub_02006afe
- movs r2, #20
- mov r1, sl
-.L_02002298:
- movs r0, #11
- bl sub_0200886c
- adds r0, r5, #0
- bl sub_02006b0e
- movs r1, #2
- movs r0, #12
- bl sub_02008822
- adds r0, r6, #0
- bl sub_02006b1c
- movs r0, #11
- movs r1, #3
- bl sub_02008818
- movs r1, #1
+ bl sub_020099aa
+ movs r3, #192
+ lsls r3, r3, #6
+ strh r3, [r0, #6]
movs r0, #11
- bl sub_02008840
- adds r0, r5, #0
- bl sub_02006b32
- movs r1, #129
- movs r2, #60
- movs r0, #12
+ bl sub_020099b6
+ movs r1, #219
+ movs r3, #208
+ strh r5, [r0, #6]
lsls r1, r1, #1
- bl sub_020088ba
- movs r1, #1
- movs r0, #9
- bl sub_0200885a
- movs r0, #9
- bl sub_02006b4c
- movs r0, #11
- ldr r1, [pc, #144]
- movs r2, #40
- bl sub_020088d2
- movs r2, #20
- mov r1, r8
- movs r0, #11
- bl sub_020088c4
- movs r1, #3
- movs r0, #9
- bl sub_0200884c
- movs r0, #9
- bl sub_02006b6e
- movs r2, #20
- movs r0, #11
- ldr r1, [pc, #80]
- bl sub_020088f4
- movs r1, #2
- movs r0, #11
- bl sub_0200888c
- mov r0, r9
- bl sub_02006b86
- movs r1, #132
- movs r2, #40
+ ldr r2, [pc, #60]
+ lsls r3, r3, #8
+ movs r0, #13
+ bl sub_02007d70
+ movs r1, #244
+ movs r2, #172
lsls r1, r1, #1
- movs r0, #9
- bl sub_0200890e
- movs r0, #9
- bl sub_02006b98
- movs r0, #8
- movs r1, #1
- bl sub_020088b4
- movs r1, #3
- movs r0, #8
- bl sub_0200888c
- movs r0, #8
- bl sub_02006bae
- movs r2, #40
- mov r1, r8
- b.n .L_02002384
+ lsls r2, r2, #2
+ movs r0, #10
+ adds r3, r5, #0
+ bl sub_02007d80
+.L_020034f2:
+ pop {r3}
+ mov r8, r3
+ pop {r5, r6, r7}
+ pop {r0}
+ bx r0
+ .4byte 0x00000928
+ .4byte 0x00000266
+ .4byte 0x00000925
+ .4byte 0x00000921
+ .4byte 0x000001db
+ .4byte 0x00000256
+ .4byte 0x0000026a
+ .2byte 0x0293
.2byte 0x0000
- .4byte 0x00026666
- .4byte 0x00004ccc
- .4byte 0x10000014
- .4byte 0x00001d93
- .4byte 0x00000103
- .4byte 0x0000100b
- .4byte 0x00000105
- .4byte 0x0000900c
- .4byte 0x00006666
- .4byte 0x00003333
- .4byte 0x0000cccc
- .4byte 0x00000101
- .4byte 0x0000400b
- .2byte 0x100c
+AlchemyC_0200351c:
+ .space 0x150
+AlchemyC_0200366c:
+ .space 0x148
+AlchemyC_020037b4:
+ .space 0x22
.2byte 0x0000
-.L_02002384:
- movs r0, #9
- bl sub_02008958
- movs r0, #9
- bl sub_02006bfa
- movs r1, #1
- movs r0, #12
- bl sub_02008916
- movs r0, #20
- bl sub_0200885c
- adds r0, r6, #0
- bl sub_02006c0e
- mov r1, sl
- movs r0, #11
- movs r2, #0
- bl sub_0200897c
- mov r1, sl
- movs r0, #9
- movs r2, #0
- bl sub_02008986
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02008992
- movs r1, #192
+ push {r5, lr}
+ adds r5, r0, #0
+ cmp r5, #0
+ beq.n .L_020037ea
+ ldr r0, [pc, #188]
+ bl sub_02009c84
+ cmp r0, #0
+ beq.n .L_0200389a
+.L_020037ea:
movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200899e
- movs r2, #40
- mov r1, fp
- movs r0, #10
- bl sub_020089a8
- movs r1, #1
- movs r0, #11
- bl sub_02008960
- adds r0, r5, #0
- bl sub_02006c52
- movs r0, #12
- movs r1, #3
- bl sub_0200893e
-.L_020023f0:
- movs r2, #20
- adds r0, r6, #0
movs r1, #0
- bl sub_020089b8
- movs r1, #2
- movs r0, #9
- bl sub_02008980
- movs r0, #9
- bl sub_02006c72
- movs r1, #132
- movs r2, #40
- movs r0, #12
- lsls r1, r1, #1
- bl sub_020089fa
- movs r1, #3
- movs r0, #12
- bl sub_0200896a
- adds r0, r6, #0
- bl sub_02006c8c
- movs r1, #3
- movs r0, #8
- bl sub_02008988
- movs r0, #8
- bl sub_02006c9a
- movs r1, #128
- movs r2, #20
- lsls r1, r1, #8
- movs r0, #8
- bl sub_02008a0a
- movs r0, #19
- bl sub_02008aa0
- movs r0, #8
- movs r1, #2
- bl sub_020089c0
- ldr r5, [pc, #836]
- movs r1, #128
+ bl sub_02008798
+ cmp r0, #0
+ beq.n .L_0200380e
+ movs r1, #205
+ movs r3, #208
lsls r1, r1, #1
- movs r2, #80
- movs r0, #8
-.L_02002454:
- bl sub_02008a3e
- adds r0, r5, #0
- bl sub_02006cc8
- movs r0, #12
- ldr r1, [pc, #816]
- movs r2, #0
- bl sub_02008a4e
- movs r0, #11
- ldr r1, [pc, #808]
- movs r2, #0
- bl sub_02008a58
- movs r0, #13
-.L_02002474:
- ldr r1, [pc, #796]
- movs r2, #0
- bl sub_02008a62
+ movs r2, #172
+ lsls r3, r3, #8
+ bl sub_02008092
movs r0, #10
- ldr r1, [pc, #788]
- movs r2, #0
- bl sub_02008a6c
- movs r0, #0
- ldr r1, [pc, #776]
- movs r2, #40
- bl sub_02008a76
- mov r1, r8
- movs r0, #12
+ movs r1, #0
movs r2, #0
- bl sub_02008a68
- mov r1, r8
+ bl sub_02009d54
+.L_0200380e:
+ cmp r5, #0
+ beq.n .L_0200381c
+ ldr r0, [pc, #144]
+ bl sub_02009cb6
+ cmp r0, #0
+ beq.n .L_0200389a
+.L_0200381c:
+ movs r0, #1
+ movs r1, #0
+ bl sub_020087ca
+ cmp r0, #0
+ beq.n .L_02003840
+ movs r1, #235
+ movs r3, #176
+ lsls r1, r1, #1
+ movs r2, #172
+ lsls r3, r3, #8
+ bl sub_020080c4
movs r0, #11
+ movs r1, #0
movs r2, #0
- bl sub_02008a72
- mov r1, fp
- movs r0, #13
- movs r2, #0
- bl sub_02008a7c
- mov r1, fp
- movs r0, #10
- movs r2, #0
- bl sub_02008a86
- movs r1, #192
- movs r2, #40
- movs r0, #0
- lsls r1, r1, #8
- bl sub_02008a92
- movs r1, #129
- movs r0, #8
+ bl sub_02009d86
+.L_02003840:
+ cmp r5, #0
+ beq.n .L_0200384e
+ ldr r0, [pc, #96]
+ bl sub_02009ce8
+ cmp r0, #0
+ beq.n .L_0200389a
+.L_0200384e:
+ movs r0, #2
+ movs r1, #0
+ bl sub_020087fc
+ cmp r0, #0
+ beq.n .L_02003872
+ movs r1, #205
+ movs r3, #208
lsls r1, r1, #1
- bl sub_02008abc
- movs r2, #40
- movs r0, #8
- movs r1, #4
- bl sub_02008a46
- movs r0, #8
- movs r1, #2
- bl sub_02008a56
- adds r0, r5, #0
+ movs r2, #204
+ lsls r3, r3, #8
+ bl sub_020080f6
+ movs r0, #12
movs r1, #0
- bl sub_02008a9e
- movs r0, #8
- ldr r1, [pc, #684]
- ldr r2, [pc, #684]
- bl sub_020089e8
- movs r0, #8
- ldr r1, [pc, #680]
- ldr r2, [pc, #684]
- bl sub_02008a2a
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #8
movs r2, #0
- bl sub_02008ad6
- movs r1, #128
- movs r2, #128
- movs r0, #9
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02008a0c
- movs r1, #231
- ldr r2, [pc, #652]
- movs r0, #9
- lsls r1, r1, #1
- bl sub_02008a50
- mov r1, fp
- movs r0, #9
- bl sub_02006da8
- movs r1, #128
- movs r2, #40
- movs r0, #9
+ bl sub_02009db8
+.L_02003872:
+ cmp r5, #0
+ bne.n .L_0200389a
+ movs r0, #3
+ movs r1, #0
+ bl sub_02008824
+ cmp r0, #0
+ beq.n .L_0200389a
+ movs r1, #235
+ movs r3, #176
lsls r1, r1, #1
- bl sub_02008b1c
- movs r1, #2
- movs r0, #9
- bl sub_02008ab4
- ldr r0, [pc, #620]
- bl sub_02006dae
- ldr r1, [pc, #588]
- movs r2, #60
- movs r0, #11
- bl sub_02008b34
- movs r0, #11
- bl sub_02006dbe
- movs r1, #129
- lsls r1, r1, #1
- movs r2, #20
- movs r0, #12
- bl sub_02008b46
- adds r0, r6, #0
- bl sub_02006dd0
- movs r0, #8
- ldr r1, [pc, #580]
- movs r2, #20
- bl sub_02008b56
- movs r0, #8
- movs r1, #4
+ movs r2, #204
+ lsls r3, r3, #8
+ bl sub_0200811e
+ movs r0, #13
+ movs r1, #0
movs r2, #0
- bl sub_02008ae8
- movs r2, #20
- mov r1, sl
- movs r0, #8
- bl sub_02008b52
- movs r0, #8
- bl sub_02006df4
- movs r0, #28
- bl sub_02008bee
- movs r1, #3
- movs r0, #8
+ bl sub_02009de0
+.L_0200389a:
+ pop {r5}
+ pop {r0}
+ bx r0
+ .4byte 0x00000929
+ .4byte 0x0000092a
+ .2byte 0x092b
+ .2byte 0x0000
+AlchemyC_020038ac:
+ .space 0x464
+AlchemyC_02003d10:
+ .space 0xdc
+AlchemyC_02003dec:
+ .space 0x48
+AlchemyC_02003e34:
+ .space 0xb8
+AlchemyC_02003eec:
+ .space 0xa8
+AlchemyC_02003f94:
+ .space 0x154
+AlchemyC_020040e8:
+ .space 0x54
+AlchemyC_0200413c:
+ .space 0x5c
+AlchemyC_02004198:
+ .space 0x80
+AlchemyC_02004218:
+ .space 0x3c
+ push {r5, r6, r7, lr}
+ mov r7, r8
+ push {r7}
+ adds r5, r0, #0
+ bl sub_0200a726
+ movs r0, #24
+ movs r1, #0
+ movs r2, #0
+ bl sub_02008b50
+ movs r3, #216
+ lsls r3, r3, #1
+ movs r6, #128
+ mov r8, r3
+ lsls r6, r6, #8
+ adds r3, r6, #0
+ mov r1, r8
+ movs r2, #134
+ movs r0, #0
bl sub_02008b0e
- movs r0, #8
- bl sub_02006e08
- movs r2, #60
- ldr r1, [pc, #496]
- movs r0, #13
- bl sub_02008b8e
- movs r0, #13
- bl sub_02006e18
- adds r1, r7, #0
- movs r0, #8
- bl sub_02006e34
- movs r1, #4
- movs r0, #8
- bl sub_02008b1c
- movs r0, #8
- bl sub_02006e2e
- movs r1, #222
- movs r2, #157
- lsls r2, r2, #2
- movs r0, #12
+ movs r0, #1
+ bl sub_02007a5c
+ movs r0, #1
+ bl sub_0200a6aa
+ bl sub_0200a8be
+ movs r0, #0
+ ldr r1, [pc, #776]
+ ldr r2, [pc, #776]
+ bl sub_0200a790
+ movs r1, #203
+ movs r0, #0
lsls r1, r1, #1
- bl sub_02008b00
- mov r1, r8
- movs r0, #12
- bl sub_02006e58
- ldr r0, [pc, #472]
- bl sub_02006e4a
- movs r2, #20
- mov r1, sl
- movs r0, #8
- bl sub_02008bb8
- movs r1, #3
- movs r0, #8
- bl sub_02008b50
- movs r0, #8
- bl sub_02006e62
- movs r1, #129
+ movs r2, #134
+ bl sub_0200a7d4
+ movs r1, #203
+ movs r0, #0
lsls r1, r1, #1
- movs r2, #60
- movs r0, #11
- bl sub_02008bea
- mov r0, r9
- bl sub_02006e74
- movs r2, #40
- movs r0, #13
- ldr r1, [pc, #424]
- bl sub_02008bfa
- movs r1, #2
- movs r0, #13
- bl sub_02008b92
- movs r0, #13
- bl sub_02006e8c
- adds r1, r7, #0
- movs r0, #9
- bl sub_02006ea8
- movs r1, #4
- movs r0, #9
- bl sub_02008b90
- ldr r0, [pc, #392]
- bl sub_02006ea2
- movs r0, #12
- movs r1, #0
- bl sub_02006ebe
+ movs r2, #152
+ bl sub_0200a7e0
+ movs r2, #152
+ movs r0, #0
+ ldr r1, [pc, #748]
+ bl sub_0200a7ea
movs r1, #1
- movs r0, #8
- bl sub_02008bc6
- movs r0, #8
- bl sub_02006eb8
- movs r0, #11
+ movs r0, #27
+ bl sub_0200a842
+ movs r0, #20
+ bl sub_0200a788
+ movs r0, #27
movs r1, #0
- movs r2, #0
- bl sub_02008c26
- movs r0, #12
- ldr r1, [pc, #356]
- movs r2, #0
- bl sub_02008c48
- movs r2, #60
- movs r0, #9
- ldr r1, [pc, #344]
- bl sub_02008c52
- ldr r0, [pc, #340]
- ldr r1, [pc, #344]
- bl sub_02008c6a
- movs r0, #232
- movs r2, #170
- movs r3, #128
- movs r1, #1
- lsls r3, r3, #21
- lsls r2, r2, #18
- lsls r0, r0, #17
- negs r1, r1
- bl sub_02006f32
- movs r0, #10
+ movs r2, #10
+ bl sub_0200a862
+ movs r0, #192
+ lsls r0, r0, #2
+ bl sub_0200a77a
+ cmp r0, #0
+ bne.n .L_020042e2
+ b.n .L_02004516
+.L_020042e2:
+ adds r0, r5, #0
+ movs r1, #0
+ bl sub_02009290
movs r1, #1
- bl sub_02008c0e
+ adds r5, r0, #0
+ movs r0, #27
+ bl sub_0200a872
+ movs r0, #20
+ bl sub_0200a7b8
+ movs r2, #10
movs r1, #0
- movs r0, #10
- bl sub_02006f16
- movs r0, #10
- bl sub_02006f08
+ movs r0, #27
+ bl sub_0200a892
+ ldr r0, [pc, #672]
+ bl sub_0200a8b0
+ ldr r0, [pc, #672]
+ bl sub_02008b7a
movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_02008c76
- movs r1, #129
-.L_020026aa:
- lsls r1, r1, #1
- movs r2, #40
- movs r0, #10
- bl sub_02008c9a
- movs r0, #10
-.L_020026b6:
- bl sub_02006f24
+ movs r1, #3
+ bl sub_0200a876
movs r1, #128
- movs r0, #10
+ movs r0, #0
+ lsls r1, r1, #9
+ adds r2, r6, #0
+ bl sub_0200a81a
+ movs r0, #0
+ mov r1, r8
+ movs r2, #168
+ bl sub_0200a85c
+ movs r1, #192
+ movs r0, #0
lsls r1, r1, #8
- movs r2, #20
- bl sub_02008c94
- movs r1, #128
- movs r0, #10
- lsls r1, r1, #1
movs r2, #0
- bl sub_02008cb8
- movs r2, #40
- movs r1, #4
- movs r0, #10
- bl sub_02008c4a
- movs r0, #10
- bl sub_02006f4c
- movs r1, #1
- movs r0, #10
- bl sub_02008c68
- movs r0, #10
- bl sub_02006f5a
+ bl sub_0200a908
+ movs r0, #0
+ movs r7, #0
+ bl sub_0200a828
+ cmp r0, #0
+ beq.n .L_02004350
+ ldr r1, [r0, #8]
+ ldr r2, [r0, #16]
+ adds r0, r5, #0
+ bl sub_0200a896
+.L_02004350:
movs r1, #128
- movs r2, #128
- movs r0, #13
+ adds r0, r5, #0
lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02008bf4
- movs r1, #219
- movs r0, #13
+ adds r2, r6, #0
+ bl sub_0200a852
+ movs r1, #224
+ adds r0, r5, #0
lsls r1, r1, #1
- ldr r2, [pc, #196]
- bl sub_02008c30
- movs r1, #128
- movs r0, #8
+ movs r2, #168
+ bl sub_0200a896
+ movs r1, #176
+ adds r0, r5, #0
lsls r1, r1, #8
- movs r2, #0
- bl sub_02008ce4
- mov r1, fp
- movs r0, #9
- movs r2, #0
- bl sub_02008cee
- adds r1, r7, #0
- movs r0, #12
- movs r2, #0
- bl sub_02008cf8
- mov r1, fp
- movs r2, #0
- movs r0, #11
- bl sub_02008d02
- movs r0, #17
- bl sub_02008d98
- movs r1, #128
- movs r2, #128
- movs r0, #10
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02008c3e
- movs r1, #244
- movs r0, #10
+ movs r2, #20
+ bl sub_0200a942
+ movs r1, #192
+ movs r2, #20
+ movs r0, #27
+ lsls r1, r1, #6
+ bl sub_0200a94e
+ movs r1, #3
+ movs r0, #27
+ bl sub_0200a8d6
+ movs r0, #27
+ bl sub_02008bf8
+ movs r1, #129
+ movs r2, #60
+ adds r0, r5, #0
lsls r1, r1, #1
- ldr r2, [pc, #128]
- bl sub_02008c82
- mov r1, fp
- movs r2, #0
- movs r0, #10
- bl sub_02008d2c
- movs r0, #13
- bl sub_02008ca2
- movs r0, #13
+ bl sub_0200a980
+ movs r0, #27
movs r1, #1
- bl sub_02008cba
- movs r0, #13
- mov r1, r8
+ bl sub_0200a920
+ movs r1, #3
+ movs r0, #27
+ bl sub_0200a8f8
+ movs r0, #27
+ bl sub_02008c1a
+ adds r0, r5, #0
+ movs r1, #3
+ bl sub_0200a916
+ ldr r0, [pc, #500]
+ bl sub_0200a85c
+ cmp r0, #0
+ beq.n .L_020043e4
+ movs r1, #128
+ movs r0, #0
+ lsls r1, r1, #6
movs r2, #0
- bl sub_02008d44
-.L_02002776:
- bl sub_02008dc8
- ldr r0, [pc, #88]
- bl sub_02008c26
- pop {r3, r5, r6, r7}
-.L_02002782:
- mov r8, r3
- mov r9, r5
- mov sl, r6
- mov fp, r7
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0x00008008
- .4byte 0x00000101
- .4byte 0x00019999
- .4byte 0x0000cccc
- .4byte 0x000001db
- .4byte 0x00000256
- .4byte 0x0000026a
- .4byte 0x00008009
- .4byte 0x00000103
- .4byte 0x0000900c
- .4byte 0x00000107
- .4byte 0x00001009
- .4byte 0x00000105
- .4byte 0x00013333
- .4byte 0x00002666
- .4byte 0x00000293
- .4byte 0x000002ae
- .2byte 0x0921
- .2byte 0x0000
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r8
- push {r6, r7}
- bl sub_02008caa
- bl sub_02008e2e
- movs r0, #8
- movs r1, #0
+ bl sub_0200a99c
+ movs r1, #192
+ movs r0, #27
+ lsls r1, r1, #6
movs r2, #0
- bl sub_02008d78
- movs r1, #128
- movs r2, #40
- movs r0, #8
- lsls r1, r1, #1
- bl sub_02008de4
- ldr r5, [pc, #200]
- movs r1, #3
- movs r0, #8
- bl sub_02008d7e
- ldr r0, [pc, #192]
- bl sub_02008db4
+ bl sub_0200a9a8
+ movs r1, #235
adds r0, r5, #0
- bl sub_0200707e
- movs r0, #9
- movs r1, #1
- bl sub_02008d92
- movs r0, #12
- movs r1, #1
- bl sub_02008d9a
- movs r0, #11
- movs r1, #1
- bl sub_02008da2
- movs r0, #13
- movs r1, #1
- bl sub_02008daa
- movs r0, #10
- movs r1, #1
- bl sub_02008dba
- movs r1, #208
- movs r0, #9
- lsls r1, r1, #8
-.L_02002842:
+ lsls r1, r1, #1
+ movs r2, #204
+ b.n .L_02004456
+.L_020043e4:
+ ldr r0, [pc, #460]
+ bl sub_0200a888
+ cmp r0, #0
+ beq.n .L_0200442c
+ movs r1, #211
+ movs r0, #0
+ lsls r1, r1, #1
+ movs r2, #154
+ bl sub_0200a928
+ movs r1, #192
+ movs r0, #0
+ lsls r1, r1, #7
movs r2, #0
- bl sub_02008e16
- movs r1, #208
- movs r0, #12
- lsls r1, r1, #8
-.L_0200284e:
+ bl sub_0200a9d4
+ movs r1, #160
+ movs r0, #27
+ lsls r1, r1, #7
movs r2, #0
- bl sub_02008e22
+ bl sub_0200a9e0
+ movs r1, #205
+ adds r0, r5, #0
+ lsls r1, r1, #1
+ movs r2, #204
+ bl sub_0200a94c
movs r1, #208
- movs r0, #11
lsls r1, r1, #8
+ adds r0, r5, #0
+ movs r7, #1
+ bl sub_02008ca8
+ b.n .L_020044a2
+.L_0200442c:
+ ldr r0, [pc, #392]
+ bl sub_0200a8d0
+ cmp r0, #0
+ beq.n .L_02004466
+ movs r1, #128
+ movs r0, #0
+ lsls r1, r1, #6
movs r2, #0
- bl sub_02008e2e
- movs r1, #208
- movs r0, #13
- lsls r1, r1, #8
+ bl sub_0200aa10
+ movs r1, #192
+ movs r0, #27
+ lsls r1, r1, #6
movs r2, #0
- bl sub_02008e3a
+ bl sub_0200aa1c
+ movs r1, #235
+ adds r0, r5, #0
+ lsls r1, r1, #1
+ movs r2, #172
+.L_02004456:
+ bl sub_0200a988
movs r1, #176
- movs r2, #20
- movs r0, #10
lsls r1, r1, #8
- bl sub_02008e46
- movs r0, #8
- movs r1, #1
- bl sub_02008dfe
- movs r1, #0
adds r0, r5, #0
- bl sub_02008e36
+ bl sub_02008ce2
+ b.n .L_020044a2
+.L_02004466:
+ movs r1, #211
movs r0, #0
- movs r1, #0
- bl sub_02008d6e
- cmp r0, #0
- bne.n .L_020028d8
- movs r1, #2
- movs r0, #9
- bl sub_02008e1a
- ldr r0, [pc, #48]
- bl sub_0200710c
- movs r1, #132
- movs r2, #40
- movs r0, #8
lsls r1, r1, #1
- bl sub_02008e94
+ movs r2, #154
+ bl sub_0200a9a0
+ movs r1, #192
+ movs r0, #0
+ lsls r1, r1, #7
+ movs r2, #0
+ bl sub_0200aa4c
+ movs r1, #160
+ movs r0, #27
+ lsls r1, r1, #7
+ movs r2, #0
+ bl sub_0200aa58
+ movs r1, #205
adds r0, r5, #0
- bl sub_0200711e
- ldr r3, [pc, #28]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #2
- strh r3, [r2, #0]
- b.n .L_02002904
- .2byte 0x0000
- .4byte 0x00001008
- .4byte 0x00001ddb
- .4byte 0x00009009
- .2byte 0x1ebc
- .2byte 0x0300
-.L_020028d8:
- ldr r3, [pc, #828]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #2
- strh r3, [r2, #0]
- movs r1, #1
- movs r0, #9
- bl sub_02008e6e
- ldr r0, [pc, #808]
- bl sub_02007160
- movs r0, #8
- movs r1, #2
- bl sub_02008e74
- ldr r0, [pc, #800]
- bl sub_0200716e
-.L_02002904:
- movs r2, #40
- movs r0, #13
- ldr r1, [pc, #792]
- bl sub_02008ef4
-.L_0200290e:
- ldr r0, [pc, #792]
- ldr r1, [pc, #792]
- bl sub_02008f0c
- movs r0, #236
- movs r1, #1
-.L_0200291a:
- movs r2, #159
- movs r3, #1
- lsls r0, r0, #17
- negs r1, r1
- lsls r2, r2, #18
- bl sub_02008f26
+ lsls r1, r1, #1
+ movs r2, #172
+ bl sub_0200a9c4
+ movs r1, #208
+ lsls r1, r1, #8
+ adds r0, r5, #0
+ movs r7, #1
+ bl sub_02008d20
+.L_020044a2:
+ movs r2, #20
+ movs r1, #0
+ movs r0, #27
+ bl sub_0200aa3a
+ ldr r0, [pc, #268]
+ bl sub_02008d1c
+ movs r0, #0
+ movs r1, #3
+ bl sub_0200aa18
+ movs r0, #27
+ movs r1, #3
+ bl sub_0200aa20
movs r1, #128
movs r2, #128
- movs r0, #13
+ movs r0, #27
lsls r1, r1, #9
lsls r2, r2, #8
- bl sub_02008e2c
- movs r6, #176
- movs r1, #236
- ldr r2, [pc, #756]
- lsls r6, r6, #8
- movs r0, #13
+ bl sub_0200a9c6
+ cmp r7, #0
+ beq.n .L_020044ec
+ movs r1, #214
+ movs r0, #27
lsls r1, r1, #1
- bl sub_02008e74
- adds r1, r6, #0
- movs r0, #13
- bl sub_020071cc
- movs r0, #13
- bl sub_020071be
- movs r3, #160
- lsls r3, r3, #7
- mov sl, r3
- movs r0, #8
- mov r1, sl
- bl sub_020071e0
- movs r0, #8
- movs r1, #3
- bl sub_02008ec8
+ movs r2, #164
+ bl sub_0200aa0e
+ movs r1, #204
+ movs r0, #27
+ lsls r1, r1, #1
+ movs r2, #164
+ bl sub_0200aa1a
+.L_020044ec:
+ movs r1, #204
+ movs r0, #27
+ lsls r1, r1, #1
+ movs r2, #134
+ bl sub_0200aa26
+ movs r1, #220
+ lsls r1, r1, #1
+ movs r2, #134
+ movs r0, #27
+ bl sub_0200aa2a
+ movs r0, #40
+ bl sub_0200a9c8
movs r0, #9
- movs r1, #3
- bl sub_02008ed0
- movs r0, #11
- movs r1, #0
+ movs r1, #10
movs r2, #0
- bl sub_02008f4a
- movs r1, #128
- movs r2, #20
- movs r0, #13
- lsls r1, r1, #8
- bl sub_02008f56
- movs r0, #11
- movs r1, #3
- bl sub_02008ede
- movs r1, #3
- movs r0, #13
- bl sub_02008ef6
- movs r0, #20
- bl sub_02008e5c
- movs r0, #12
- movs r1, #1
- bl sub_02008f24
- movs r3, #192
- lsls r3, r3, #6
- mov r8, r3
- movs r0, #12
- mov r1, r8
- bl sub_02007232
- ldr r0, [pc, #636]
- movs r1, #0
- movs r2, #20
- bl sub_02008f7c
- movs r0, #11
- adds r1, r6, #0
- movs r2, #20
- bl sub_02008f96
- movs r5, #208
- movs r2, #40
- ldr r1, [pc, #616]
- movs r0, #11
- bl sub_02008fba
- lsls r5, r5, #8
- movs r0, #11
- bl sub_02007246
- ldr r7, [pc, #604]
- movs r0, #12
- adds r1, r5, #0
- bl sub_02007264
- movs r1, #4
- movs r0, #12
- bl sub_02008f3c
- adds r0, r7, #0
- bl sub_0200725e
- movs r0, #13
- adds r1, r6, #0
- bl sub_0200727a
- movs r1, #1
- movs r0, #13
- bl sub_02008f82
- movs r0, #13
- bl sub_02007274
- movs r1, #128
- movs r2, #20
- movs r0, #9
- lsls r1, r1, #1
- bl sub_02008ffc
- movs r0, #9
- mov r1, r8
- bl sub_0200729c
- movs r1, #1
- movs r0, #9
- bl sub_02008fa4
- movs r0, #9
- bl sub_02007296
- movs r1, #3
- movs r0, #12
- bl sub_02008f92
- adds r0, r7, #0
- bl sub_020072a4
- movs r1, #2
- movs r0, #8
- bl sub_02008fc0
- movs r0, #8
- bl sub_020072b2
- movs r0, #12
- adds r1, r5, #0
- bl sub_020072ce
- movs r1, #3
- movs r0, #12
- bl sub_02008fb6
- adds r0, r7, #0
- bl sub_020072c8
- movs r0, #11
- movs r1, #2
- bl sub_02008fe4
- adds r1, r6, #0
- movs r0, #11
- bl sub_020072ec
- movs r0, #11
- bl sub_020072de
- movs r1, #0
- movs r0, #12
- bl sub_020072fa
- adds r0, r7, #0
- bl sub_020072ec
- movs r0, #8
- mov r1, r8
- movs r2, #0
- bl sub_0200905a
- movs r0, #9
+ bl sub_02008dfa
+ b.n .L_02004592
+.L_02004516:
+ ldr r0, [pc, #168]
+ bl sub_0200aac2
+ ldr r5, [pc, #140]
+ ldr r0, [pc, #140]
movs r1, #0
- movs r2, #0
- bl sub_02009064
- movs r0, #11
- adds r1, r5, #0
- movs r2, #0
- bl sub_0200906e
- movs r0, #13
- adds r1, r5, #0
- movs r2, #0
- bl sub_02009078
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02008fae
- movs r1, #243
- movs r2, #152
- movs r0, #0
- lsls r1, r1, #1
- lsls r2, r2, #2
- bl sub_02008ff4
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020090a0
- movs r0, #0
- bl sub_02008fbe
- cmp r0, #0
- beq.n .L_02002ae6
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_0200902c
-.L_02002ae6:
- movs r1, #128
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02008fea
- movs r1, #243
- movs r2, #156
- movs r0, #1
- lsls r1, r1, #1
- lsls r2, r2, #2
- bl sub_02009030
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020090dc
- movs r0, #1
- bl sub_02008ffa
- cmp r0, #0
- beq.n .L_02002b22
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #2
- bl sub_02009068
-.L_02002b22:
- movs r1, #128
- movs r2, #128
- movs r0, #2
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02009026
- movs r1, #243
- movs r2, #160
- movs r0, #2
- lsls r1, r1, #1
- lsls r2, r2, #2
- bl sub_0200906c
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02009118
- movs r0, #2
- bl sub_02009036
- cmp r0, #0
- beq.n .L_02002b5e
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #3
- bl sub_020090a4
-.L_02002b5e:
- movs r1, #128
- movs r2, #128
- movs r0, #3
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02009062
- movs r1, #243
- movs r2, #164
- movs r0, #3
- lsls r1, r1, #1
- lsls r2, r2, #2
- bl sub_020090a8
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02009154
- movs r1, #132
movs r2, #40
+ bl sub_0200aae6
+ movs r2, #60
+ ldr r1, [pc, #152]
+ movs r0, #27
+ bl sub_0200ab18
+ adds r0, r5, #0
+ bl sub_02008da2
+ movs r1, #129
lsls r1, r1, #1
- movs r0, #12
- bl sub_02009178
- adds r0, r7, #0
- bl sub_02007402
- movs r1, #1
- movs r0, #9
- bl sub_0200911e
- ldr r0, [pc, #156]
- bl sub_02007410
- movs r0, #8
- movs r1, #3
- bl sub_0200910c
- mov r1, sl
- movs r0, #8
- bl sub_02007434
- movs r0, #8
- bl sub_02007426
- movs r0, #8
- mov r1, r8
- bl sub_02007442
- movs r1, #0
- movs r0, #8
- bl sub_0200917a
movs r0, #0
- movs r1, #0
- bl sub_020090b2
- cmp r0, #1
- bne.n .L_02002c44
- movs r1, #2
- movs r0, #8
- bl sub_02009156
- movs r0, #8
- bl sub_02007450
- movs r1, #3
- movs r0, #12
- bl sub_0200914c
- adds r0, r7, #0
- bl sub_0200745e
- movs r0, #9
- movs r1, #1
- bl sub_02009172
- movs r2, #40
- ldr r0, [pc, #28]
- movs r1, #0
- bl sub_020091c4
- ldr r3, [pc, #16]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_02002c66
- .4byte 0x03001ebc
- .4byte 0x00009009
- .4byte 0x00009008
- .4byte 0x00000105
- .4byte 0x0000cccc
- .4byte 0x00001999
- .4byte 0x00000296
- .4byte 0x0000100c
- .4byte 0x00000101
- .4byte 0x0000900c
- .2byte 0x1009
- .2byte 0x0000
-.L_02002c44:
- ldr r3, [pc, #876]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #3
- strh r3, [r2, #0]
- movs r0, #8
- movs r1, #3
- bl sub_020091d2
- movs r0, #8
- movs r1, #0
- movs r2, #40
- bl sub_02009224
-.L_02002c66:
- movs r1, #1
- movs r0, #13
- bl sub_020091ec
- movs r0, #13
- bl sub_020074de
- movs r0, #8
- movs r1, #1
- bl sub_020091fa
- movs r3, #160
- lsls r3, r3, #7
- mov r8, r3
- mov r1, r8
- movs r0, #8
- bl sub_02007508
- movs r6, #176
- movs r0, #8
- lsls r6, r6, #8
- bl sub_020074fe
- movs r0, #13
- movs r1, #1
- bl sub_0200921a
- movs r0, #13
- adds r1, r6, #0
- bl sub_02007522
- movs r2, #20
- movs r0, #13
- movs r1, #0
- bl sub_0200926c
- movs r0, #8
- movs r1, #3
- bl sub_02009214
- movs r0, #8
- ldr r1, [pc, #764]
- ldr r2, [pc, #768]
- bl sub_020091b6
- ldr r5, [pc, #764]
- movs r1, #236
- movs r2, #158
- lsls r1, r1, #1
- lsls r2, r2, #2
- movs r0, #8
- bl sub_020091fe
- adds r0, r5, #0
- bl sub_02007540
+ bl sub_0200ab30
+ movs r0, #60
+ bl sub_0200aa06
movs r2, #40
- movs r0, #13
- ldr r1, [pc, #744]
- bl sub_020092c6
+ movs r0, #27
+ ldr r1, [pc, #120]
+ bl sub_0200ab38
movs r1, #2
- movs r0, #13
- bl sub_0200925e
- movs r0, #13
- bl sub_02007558
- movs r0, #8
- movs r1, #4
- bl sub_02009244
+ movs r0, #27
+ bl sub_0200aad0
+ adds r0, r5, #0
+ bl sub_02008dca
movs r2, #40
+ ldr r1, [pc, #104]
+ movs r0, #27
+ bl sub_0200ab50
adds r0, r5, #0
- movs r1, #0
- bl sub_020092be
- movs r0, #11
- movs r1, #1
- bl sub_02009286
- adds r1, r6, #0
- movs r0, #11
- bl sub_0200758e
- ldr r0, [pc, #692]
- bl sub_02007580
- movs r1, #129
- movs r0, #10
- lsls r1, r1, #1
- movs r2, #20
- bl sub_02009308
- movs r0, #10
- ldr r1, [pc, #676]
- ldr r2, [pc, #680]
- bl sub_02009222
- movs r0, #10
- movs r1, #2
- movs r2, #0
- bl sub_020092a4
- movs r1, #231
- ldr r2, [pc, #664]
- movs r0, #10
- lsls r1, r1, #1
- bl sub_02009270
- movs r0, #10
- adds r1, r6, #0
- bl sub_020075c8
- movs r1, #2
- movs r0, #10
- bl sub_020092c8
- movs r0, #10
- bl sub_020075c2
- movs r0, #9
- mov r1, r8
- bl sub_020075de
+ bl sub_02008dda
movs r1, #4
- movs r0, #9
- bl sub_020092c6
- movs r0, #9
- bl sub_020075d8
- movs r1, #3
- movs r0, #8
- bl sub_020092d4
+ movs r0, #27
+ bl sub_0200aad6
adds r0, r5, #0
- bl sub_020075e6
- movs r1, #129
- movs r0, #13
- lsls r1, r1, #1
- movs r2, #40
- bl sub_0200936e
- movs r2, #40
- movs r0, #13
- movs r1, #0
- bl sub_02009350
- movs r1, #192
- lsls r1, r1, #6
- movs r0, #9
- bl sub_0200761a
- movs r1, #2
- movs r0, #9
- bl sub_0200931a
- ldr r0, [pc, #560]
- bl sub_02007614
- movs r0, #12
- movs r1, #0
- bl sub_02007630
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200938c
- movs r0, #9
- mov r1, r8
- movs r2, #0
- bl sub_02009396
- movs r0, #11
- adds r1, r6, #0
- movs r2, #0
- bl sub_020093a0
- movs r0, #13
- adds r1, r6, #0
- movs r2, #0
- bl sub_020093aa
- movs r2, #20
- movs r0, #10
- adds r1, r6, #0
- bl sub_020093b4
- movs r0, #12
- movs r1, #1
- bl sub_0200936c
- ldr r0, [pc, #492]
- movs r1, #0
- movs r2, #20
- bl sub_020093b6
- movs r2, #40
- movs r0, #8
- ldr r1, [pc, #480]
- bl sub_020093e8
- movs r1, #208
- lsls r1, r1, #8
- movs r0, #8
- bl sub_0200768a
- movs r1, #0
- ldr r0, [pc, #468]
- bl sub_020093c2
- movs r0, #0
- movs r1, #0
- bl sub_020092fa
- cmp r0, #0
- bne.n .L_02002e40
- movs r0, #8
- movs r1, #3
- bl sub_02009386
- ldr r0, [pc, #440]
- bl sub_02007698
- ldr r3, [pc, #388]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_02002e56
-.L_02002e40:
- ldr r3, [pc, #368]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- ldr r0, [pc, #400]
- bl sub_020076c0
-.L_02002e56:
+ bl sub_02008de8
movs r0, #0
movs r1, #3
- bl sub_020093bc
- movs r1, #3
- movs r0, #8
- bl sub_020093c4
- ldr r0, [pc, #380]
- bl sub_020076d6
- movs r1, #128
- lsls r1, r1, #8
- movs r0, #8
- bl sub_020076f4
- ldr r0, [pc, #328]
- bl sub_020076e6
- movs r2, #0
- movs r0, #2
- movs r1, #0
- bl sub_0200776c
- movs r0, #12
- movs r1, #3
- bl sub_020093dc
- movs r0, #11
- movs r1, #3
- bl sub_020093e4
- movs r0, #9
- movs r1, #3
- bl sub_020093ec
- movs r0, #10
- movs r1, #2
- bl sub_0200941c
- movs r1, #2
- movs r0, #13
- bl sub_0200942c
+ bl sub_0200aae4
movs r0, #20
- bl sub_02009372
- ldr r5, [pc, #304]
- movs r0, #10
- adds r1, r5, #0
- bl sub_020093bc
- movs r0, #4
- bl sub_02009382
- adds r1, r5, #0
- movs r0, #11
- bl sub_020093ca
- movs r0, #4
- bl sub_02009390
- adds r1, r5, #0
- movs r0, #12
- bl sub_020093d8
+ bl sub_0200aa4a
movs r0, #4
- bl sub_0200939e
- movs r0, #9
- adds r1, r5, #0
- bl sub_020093e6
- movs r0, #3
- movs r1, #2
- bl sub_0200943e
- movs r0, #2
- bl sub_020093dc
- cmp r0, #0
- beq.n .L_02002f08
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #3
- bl sub_0200941e
-.L_02002f08:
- movs r0, #3
- bl sub_0200944c
- movs r0, #3
- movs r1, #0
- movs r2, #0
- bl sub_0200945e
- movs r0, #2
- movs r1, #2
- bl sub_0200946e
- movs r0, #1
- bl sub_0200940c
- cmp r0, #0
- beq.n .L_02002f38
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #2
- bl sub_0200944e
-.L_02002f38:
- movs r0, #2
- bl sub_0200947c
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_0200948e
- movs r0, #1
- movs r1, #2
- bl sub_0200949e
- movs r0, #0
- bl sub_0200943c
- cmp r0, #0
- beq.n .L_02002f68
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_0200947e
-.L_02002f68:
- movs r0, #1
- bl sub_020094ac
- movs r2, #0
- movs r0, #1
- movs r1, #0
- bl sub_020094be
- adds r1, r5, #0
- movs r0, #13
- bl sub_0200947e
- movs r1, #228
- movs r2, #162
- lsls r2, r2, #2
- movs r0, #8
- lsls r1, r1, #1
- bl sub_020094bc
- movs r1, #0
- movs r0, #8
- bl sub_02007814
- movs r0, #232
- bl sub_02009452
- ldr r0, [pc, #76]
- bl sub_02009448
- bl sub_02009474
- pop {r3, r5}
+ bl sub_0200aba8
+.L_02004592:
+ pop {r3}
mov r8, r3
- mov sl, r5
pop {r5, r6, r7}
pop {r0}
bx r0
- .2byte 0x0000
- .4byte 0x03001ebc
.4byte 0x0000cccc
.4byte 0x00006666
- .4byte 0x00004008
- .4byte 0x00000103
- .4byte 0x0000100b
- .4byte 0x00026666
- .4byte 0x00013333
- .4byte 0x000002a2
- .4byte 0x00001009
- .4byte 0x0000100c
+ .4byte 0x000001a5
+ .4byte 0x00001ebc
+ .4byte 0x0000a01b
+ .4byte 0x0000092b
+ .4byte 0x0000092a
+ .4byte 0x00000929
+ .4byte 0x0000201b
+ .4byte 0x00001eb7
.4byte 0x00000101
- .4byte 0x00001008
- .4byte 0x0200e6e4
- .2byte 0x0925
+ .4byte 0x00000103
+ .2byte 0x0105
.2byte 0x0000
- push {r5, lr}
- movs r0, #1
- bl sub_02009416
- movs r0, #162
- lsls r0, r0, #1
- bl sub_020094a6
- ldr r3, [pc, #804]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- ldr r1, [pc, #800]
- adds r2, #73
+ push {r5, r6, lr}
+ mov r6, r8
+ push {r6}
+ movs r0, #128
+ lsls r0, r0, #2
+ bl sub_0200aa7c
+ adds r5, r0, #0
+ cmp r5, #0
+ beq.n .L_020045ea
+ ldr r3, [pc, #128]
+ ldr r0, [r3, #0]
+ b.n .L_0200465e
+.L_020045ea:
+ movs r2, #128
+ movs r3, #136
+ ldr r1, [pc, #124]
+ lsls r2, r2, #11
+ lsls r3, r3, #18
+ movs r0, #22
+ bl sub_0200aa58
+ mov r8, r0
+ mov r3, r8
+ adds r3, #85
+ mov r2, r8
+ strb r5, [r3, #0]
+ adds r2, #92
+ movs r3, #1
+ strb r3, [r2, #0]
+ mov r2, r8
+ ldr r6, [r2, #80]
+ adds r3, r6, #0
+ adds r3, #39
+ strb r5, [r3, #0]
+ movs r3, #33
+ ldrb r2, [r6, #5]
+ negs r3, r3
+ ands r3, r2
+ ldrb r2, [r6, #9]
+ strb r3, [r6, #5]
+ movs r3, #15
+ ands r3, r2
+ movs r1, #193
+ strb r3, [r6, #9]
+ lsls r1, r1, #3
+ movs r0, #17
+ bl sub_0200aa66
+ adds r5, r0, #0
+ movs r0, #232
+ bl sub_0200aace
+ movs r3, #128
+ lsls r3, r3, #3
+ adds r5, r5, r3
+ adds r2, r5, #0
+ movs r1, #128
+ ldrb r0, [r6, #28]
+ bl sub_0200aa8e
+ movs r0, #17
+ bl sub_0200aa8c
+ movs r0, #128
+ lsls r0, r0, #2
+ bl sub_0200aafc
+ ldr r3, [pc, #16]
+ mov r2, r8
str r2, [r3, #0]
- subs r2, #71
- adds r3, r1, r2
- movs r2, #0
- ldrsh r3, [r3, r2]
- subs r3, #1
- cmp r3, #23
- bhi.n .L_020030d6
- ldr r2, [pc, #784]
+ mov r0, r8
+.L_0200465e:
+ pop {r3}
+ mov r8, r3
+ pop {r5, r6}
+ pop {r1}
+ bx r1
+ .4byte 0x0200e968
+ .2byte 0x0000
+ .2byte 0x01c7
+AlchemyC_02004670:
+ .space 0x15c
+ push {r5, lr}
+ adds r5, r0, #0
+ adds r3, r5, #0
+ subs r3, #18
+ cmp r3, #8
+ bhi.n .L_02004862
+ ldr r2, [pc, #140]
lsls r3, r3, #2
ldr r3, [r3, r2]
mov pc, r3
- .2byte 0x0000
- .4byte 0x0200b088
- .4byte 0x0200b088
- .4byte 0x0200b0d6
- .4byte 0x0200b0b2
- .4byte 0x0200b0b8
- .4byte 0x0200b0d6
- .4byte 0x0200b0d6
- .4byte 0x0200b0d6
- .4byte 0x0200b0d6
- .4byte 0x0200b0d6
- .4byte 0x0200b088
- .4byte 0x0200b0b2
- .4byte 0x0200b0d6
- .4byte 0x0200b0d6
- .4byte 0x0200b0b2
- .4byte 0x0200b0b2
- .4byte 0x0200b0b2
- .4byte 0x0200b0b2
- .4byte 0x0200b0b2
- .4byte 0x0200b0b2
- .4byte 0x0200b0b2
- .4byte 0x0200b0d6
- .4byte 0x0200b0b2
- .4byte 0x0200b0b2
- .4byte 0xf00648aa
- .4byte 0x2800fa4f
- .4byte 0x48a9d107
- .4byte 0xfa4ff006
- .4byte 0xd0022800
- .4byte 0x20092102
- .4byte 0x48a6e016
- .4byte 0xfa4ff006
- .4byte 0xd0132800
- .4byte 0x200c2102
- .4byte 0x2102e00e
- .4byte 0xe00b2013
- .4byte 0xf006489e
- .4byte 0x2800fa4f
- .4byte 0x489ed108
- .4byte 0xfa4ff006
- .4byte 0xd0032800
- .4byte 0x200d2102
- .4byte 0xfacbf006
- .2byte 0x4995
-.L_020030d6:
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r1, r2
- movs r2, #0
- ldrsh r3, [r3, r2]
- subs r3, #1
- cmp r3, #29
- bls.n .L_020030e8
- b.n .L_02003320
-.L_020030e8:
- ldr r2, [pc, #596]
- lsls r3, r3, #2
- ldr r3, [r3, r2]
- mov pc, r3
- .4byte 0x0200b168
- .4byte 0x0200b168
- .4byte 0x0200b320
- .4byte 0x0200b16e
- .4byte 0x0200b174
- .4byte 0x0200b320
- .4byte 0x0200b320
- .4byte 0x0200b320
- .4byte 0x0200b320
- .4byte 0x0200b17a
- .4byte 0x0200b190
- .4byte 0x0200b1a6
- .4byte 0x0200b1ac
- .4byte 0x0200b1b2
- .4byte 0x0200b1b8
- .4byte 0x0200b20e
- .4byte 0x0200b214
- .4byte 0x0200b254
- .4byte 0x0200b25a
- .4byte 0x0200b2aa
- .4byte 0x0200b2b0
- .4byte 0x0200b2e4
- .4byte 0x0200b2ea
- .4byte 0x0200b2fa
- .4byte 0x0200b320
- .4byte 0x0200b320
- .4byte 0x0200b320
- .4byte 0x0200b320
- .4byte 0x0200b320
- .4byte 0x0200b300
- .4byte 0xfa8df003
- .4byte 0xf003e0d8
- .4byte 0xe0d5fb35
- .4byte 0xf9b1f003
- .4byte 0x486fe0d2
- .4byte 0xfa4ff006
- .4byte 0xd0022800
- .4byte 0xfef5f003
- .4byte 0xf003e0ca
- .4byte 0xe0c7fe87
- .4byte 0xf0064869
- .4byte 0x2800fa4f
- .4byte 0xf003d002
- .4byte 0xe0bfff75
- .4byte 0xff19f003
- .4byte 0xf003e0bc
- .4byte 0xe0b9ffc9
- .4byte 0xf873f004
- .4byte 0xf004e0b6
- .4byte 0xe0b3f89d
- .4byte 0xf0064862
- .4byte 0x2800fa4f
- .4byte 0xf006d022
- .4byte 0x2019fa63
- .4byte 0x22002101
- .4byte 0xfc73f004
- .4byte 0x20162200
- .4byte 0xf0042100
- .4byte 0x4d5bfc73
- .4byte 0x1c292024
- .4byte 0xfa7ff006
- .4byte 0x1c292025
- .4byte 0xfa7ff006
- .4byte 0x1c292026
- .4byte 0xfa7ff006
- .4byte 0x21032024
- .4byte 0xfacbf006
- .4byte 0x21032025
- .4byte 0xfacbf006
- .4byte 0xe0472026
- .4byte 0xf8cbf004
- .4byte 0xf004e088
- .4byte 0xe085f90b
- .4byte 0xf006484b
- .4byte 0x2800fa4f
- .4byte 0xf006d017
- .4byte 0x2019fa63
- .4byte 0x22002102
- .4byte 0xfc73f004
- .4byte 0x20162200
- .4byte 0xf0042100
- .4byte 0x4d44fc73
- .4byte 0x1c292024
- .4byte 0xfa7ff006
- .4byte 0x1c292025
- .4byte 0xfa7ff006
- .4byte 0xfa67f006
- .4byte 0xf005e068
- .4byte 0xe065f833
- .4byte 0xfb41f005
- .4byte 0x483ae062
- .4byte 0xfa4ff006
- .4byte 0xd01f2800
- .4byte 0xfa63f006
- .4byte 0x21032019
- .4byte 0xf0042200
- .4byte 0x2200fc73
- .4byte 0x21002016
- .4byte 0xfc73f004
- .4byte 0x20244d32
- .4byte 0xf0061c29
- .4byte 0x2025fa7f
- .4byte 0xf0061c29
- .4byte 0x2024fa7f
- .4byte 0xf0062103
- .4byte 0x2025facb
- .4byte 0xf0062103
- .4byte 0xf006facb
- .4byte 0xe03dfa67
- .4byte 0xfb6df005
- .4byte 0xf005e03a
- .4byte 0xe037fbbf
- .4byte 0xf0064824
- .4byte 0x2800fa4f
- .4byte 0x4824d011
- .4byte 0xfa4ff006
- .4byte 0xd02d2800
- .4byte 0x22004b22
- .4byte 0x010921c8
- .4byte 0x4821601a
- .4byte 0xfa13f006
- .4byte 0x21052009
+ .4byte 0x0200c80a
+ .4byte 0x0200c804
+ .4byte 0x0200c80a
+ .4byte 0x0200c840
+ .4byte 0x0200c81c
+ .4byte 0x0200c81c
+ .4byte 0x0200c82e
+ .4byte 0x0200c840
+ .4byte 0x0200c852
+ .4byte 0x21061c28
+ .4byte 0x1c28e013
+ .4byte 0xf0062105
+ .4byte 0x1c28faa7
+ .4byte 0xf0062110
+ .4byte 0xe022faab
+ .4byte 0x21051c28
.4byte 0xfaa7f006
- .4byte 0xf005e020
- .4byte 0xe01dfbf5
- .4byte 0xfe51f005
- .4byte 0x4816e01a
- .4byte 0xfa4ff006
- .4byte 0xd1152800
- .4byte 0xfe87f005
- .4byte 0xf006e012
- .4byte 0xe00ff887
- .4byte 0x4a164915
- .4byte 0xf0042014
- .4byte 0x2015fc73
- .4byte 0x22002100
- .4byte 0xfc73f004
- .4byte 0xf0064812
- .4byte 0x2001fa53
- .2byte 0xf006
- .2byte 0xfb0b
-.L_02003320:
- movs r0, #0
+ .4byte 0x21141c28
+ .4byte 0xfaabf006
+ .4byte 0x1c28e019
+ .4byte 0xf006210a
+ .4byte 0x1c28faa7
+ .4byte 0xf0062108
+ .4byte 0xe010faab
+ .4byte 0x21051c28
+ .4byte 0xfaa7f006
+ .4byte 0x21041c28
+ .4byte 0xfaabf006
+ .4byte 0x1c28e007
+ .4byte 0xf0062109
+ .4byte 0x1c28faa7
+ .4byte 0xf0062104
+ .2byte 0xfaab
+.L_02004862:
pop {r5}
- pop {r1}
- bx r1
- .4byte 0x03001ebc
- .4byte 0x02000240
- .4byte 0x0200b028
- .4byte 0x0000093e
- .4byte 0x00000928
- .4byte 0x00000911
- .4byte 0x0200b0f0
- .4byte 0x00000109
- .4byte 0x0200e8e4
- .4byte 0x00000302
- .4byte 0x0200ff84
- .4byte 0x0200dc49
- .4byte 0x00000926
- .4byte 0x0000092b
- .2byte 0x0902
+ pop {r0}
+ bx r0
+ .2byte 0xc7e0
+ .2byte 0x0200
+AlchemyC_0200486c:
+ .space 0x12
.2byte 0x0000
+AlchemyC_02004880:
+ .space 0x10
+AlchemyC_02004890:
+ .space 0x1c
+AlchemyC_020048ac:
+ .space 0x3c
push {r5, r6, r7, lr}
- mov r7, r8
- push {r7}
- ldr r0, [pc, #16]
- bl sub_0200980e
- cmp r0, #0
- bne.n .L_02003380
- bl sub_02007946
- b.n .L_020034f2
- .2byte 0x0000
- .2byte 0x0911
- .2byte 0x0000
-.L_02003380:
- ldr r0, [pc, #168]
- bl sub_02009824
- cmp r0, #0
- beq.n .L_0200338e
- bl sub_0200795c
-.L_0200338e:
- ldr r0, [pc, #160]
- bl sub_02009832
- adds r7, r0, #0
- cmp r7, #0
- beq.n .L_0200339c
- b.n .L_020034f2
-.L_0200339c:
- movs r0, #138
- lsls r0, r0, #4
- bl sub_02009842
- cmp r0, #0
- beq.n .L_02003456
- movs r0, #9
- bl sub_02009894
- movs r1, #0
- adds r6, r0, #0
- movs r2, #0
- movs r0, #13
- bl sub_02007ca0
- movs r1, #228
- movs r2, #163
- lsls r1, r1, #1
- lsls r2, r2, #2
- movs r0, #8
- movs r3, #0
- bl sub_02007c58
- movs r3, #240
- lsls r3, r3, #1
- mov r8, r3
- movs r2, #150
- movs r3, #176
- lsls r3, r3, #8
- lsls r2, r2, #2
- movs r0, #9
- mov r1, r8
- bl sub_02007c6e
- movs r0, #9
- ldr r1, [pc, #80]
- ldr r2, [pc, #80]
- bl sub_020098e0
- adds r3, r6, #0
- adds r3, #102
- ldr r5, [pc, #56]
- strh r7, [r3, #0]
- subs r3, #3
- strb r5, [r3, #0]
- adds r1, r6, #0
- adds r1, #89
- ldrb r2, [r1, #0]
- movs r3, #128
- orrs r3, r2
- strb r3, [r1, #0]
- ldr r3, [pc, #56]
- movs r0, #8
- str r3, [r6, #108]
- bl sub_020098f2
- adds r3, r0, #0
- adds r3, #98
- strb r5, [r3, #0]
- ldr r3, [pc, #44]
- str r3, [r0, #108]
- ldr r0, [pc, #44]
- bl sub_020098ba
- cmp r0, #0
- beq.n .L_020034f2
- movs r3, #160
- ldr r2, [pc, #36]
- lsls r3, r3, #8
- b.n .L_0200344c
- .4byte 0x00000000
- .4byte 0x00000928
- .4byte 0x0000093e
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x0200812d
- .4byte 0x02008285
- .4byte 0x00000109
- .2byte 0x029a
- .2byte 0x0000
-.L_0200344c:
- movs r0, #0
- mov r1, r8
- bl sub_02007ce2
- b.n .L_020034f2
-.L_02003456:
- ldr r0, [pc, #164]
- bl sub_020098fa
- cmp r0, #0
- beq.n .L_0200346e
- movs r1, #222
- movs r3, #208
- lsls r1, r1, #1
- ldr r2, [pc, #152]
- movs r0, #8
- lsls r3, r3, #8
- b.n .L_02003484
-.L_0200346e:
- ldr r0, [pc, #148]
- bl sub_02009912
- cmp r0, #0
- beq.n .L_02003494
- movs r1, #228
- movs r2, #162
- lsls r1, r1, #1
- lsls r2, r2, #2
- movs r0, #8
- movs r3, #0
-.L_02003484:
- bl sub_02007d16
- movs r0, #13
- movs r1, #0
- movs r2, #0
- bl sub_02007d78
- b.n .L_020034f2
-.L_02003494:
- ldr r0, [pc, #112]
- bl sub_02009938
- cmp r0, #0
- beq.n .L_020034f2
- movs r3, #128
- ldr r1, [pc, #104]
- ldr r2, [pc, #108]
- lsls r3, r3, #8
- movs r0, #8
- movs r5, #176
- bl sub_02007d3c
- lsls r5, r5, #8
- movs r1, #231
- lsls r1, r1, #1
- ldr r2, [pc, #92]
- adds r3, r5, #0
- movs r0, #9
- bl sub_02007d4c
- movs r0, #12
- bl sub_020099aa
- movs r3, #192
- lsls r3, r3, #6
- strh r3, [r0, #6]
- movs r0, #11
- bl sub_020099b6
- movs r1, #219
- movs r3, #208
- strh r5, [r0, #6]
- lsls r1, r1, #1
- ldr r2, [pc, #60]
- lsls r3, r3, #8
- movs r0, #13
- bl sub_02007d70
- movs r1, #244
- movs r2, #172
- lsls r1, r1, #1
- lsls r2, r2, #2
- movs r0, #10
- adds r3, r5, #0
- bl sub_02007d80
-.L_020034f2:
- pop {r3}
- mov r8, r3
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0x00000928
- .4byte 0x00000266
- .4byte 0x00000925
- .4byte 0x00000921
- .4byte 0x000001db
- .4byte 0x00000256
- .4byte 0x0000026a
- .2byte 0x0293
- .2byte 0x0000
-AlchemyC_0200351c:
- .space 0x150
-AlchemyC_0200366c:
- .space 0x148
-AlchemyC_020037b4:
- .space 0x22
- .2byte 0x0000
- push {r5, lr}
- adds r5, r0, #0
- cmp r5, #0
- beq.n .L_020037ea
- ldr r0, [pc, #188]
- bl sub_02009c84
- cmp r0, #0
- beq.n .L_0200389a
-.L_020037ea:
- movs r0, #0
- movs r1, #0
- bl sub_02008798
- cmp r0, #0
- beq.n .L_0200380e
- movs r1, #205
- movs r3, #208
- lsls r1, r1, #1
- movs r2, #172
- lsls r3, r3, #8
- bl sub_02008092
- movs r0, #10
- movs r1, #0
- movs r2, #0
- bl sub_02009d54
-.L_0200380e:
- cmp r5, #0
- beq.n .L_0200381c
- ldr r0, [pc, #144]
- bl sub_02009cb6
- cmp r0, #0
- beq.n .L_0200389a
-.L_0200381c:
- movs r0, #1
- movs r1, #0
- bl sub_020087ca
- cmp r0, #0
- beq.n .L_02003840
- movs r1, #235
- movs r3, #176
- lsls r1, r1, #1
- movs r2, #172
- lsls r3, r3, #8
- bl sub_020080c4
- movs r0, #11
- movs r1, #0
- movs r2, #0
- bl sub_02009d86
-.L_02003840:
- cmp r5, #0
- beq.n .L_0200384e
- ldr r0, [pc, #96]
- bl sub_02009ce8
- cmp r0, #0
- beq.n .L_0200389a
-.L_0200384e:
- movs r0, #2
- movs r1, #0
- bl sub_020087fc
- cmp r0, #0
- beq.n .L_02003872
- movs r1, #205
- movs r3, #208
- lsls r1, r1, #1
- movs r2, #204
- lsls r3, r3, #8
- bl sub_020080f6
- movs r0, #12
- movs r1, #0
- movs r2, #0
- bl sub_02009db8
-.L_02003872:
- cmp r5, #0
- bne.n .L_0200389a
- movs r0, #3
- movs r1, #0
- bl sub_02008824
- cmp r0, #0
- beq.n .L_0200389a
- movs r1, #235
- movs r3, #176
- lsls r1, r1, #1
- movs r2, #204
- lsls r3, r3, #8
- bl sub_0200811e
- movs r0, #13
- movs r1, #0
- movs r2, #0
- bl sub_02009de0
-.L_0200389a:
- pop {r5}
- pop {r0}
- bx r0
- .4byte 0x00000929
- .4byte 0x0000092a
- .2byte 0x092b
- .2byte 0x0000
- push {r5, r6, r7, lr}
- mov r7, fp
- mov r6, sl
- mov r5, r9
+ mov r7, sl
+ mov r6, r9
+ mov r5, r8
push {r5, r6, r7}
- mov r7, r8
- push {r7}
- bl sub_02009d84
- movs r0, #25
- movs r1, #0
- movs r2, #0
- bl sub_020081ae
- movs r0, #24
- movs r1, #1
- movs r2, #0
- bl sub_020081b8
- movs r0, #220
- movs r1, #1
- movs r2, #168
- lsls r0, r0, #17
- negs r1, r1
- lsls r2, r2, #16
- ldr r3, [pc, #1008]
- bl sub_0200818e
- movs r2, #220
- lsls r2, r2, #1
- mov r8, r2
- movs r3, #160
- lsls r3, r3, #7
- movs r0, #27
- mov r1, r8
- movs r2, #164
- mov r9, r3
- bl sub_02008188
- movs r2, #208
- lsls r2, r2, #8
- mov sl, r2
- movs r1, #214
- lsls r1, r1, #1
- movs r0, #8
- movs r2, #190
- mov r3, sl
- movs r7, #176
- bl sub_0200819e
- lsls r7, r7, #8
- movs r1, #226
- movs r2, #190
- adds r3, r7, #0
- lsls r1, r1, #1
- movs r0, #9
- bl sub_020081ae
- movs r0, #9
- movs r1, #1
- bl sub_02009e76
- movs r3, #128
- lsls r3, r3, #8
- movs r0, #0
- mov r1, r8
- movs r2, #134
- mov fp, r3
- bl sub_020081c6
- ldr r3, [pc, #920]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- movs r6, #128
- adds r3, r3, r2
- lsls r6, r6, #1
- str r6, [r3, #0]
- bl sub_02009f7a
- movs r0, #0
- ldr r1, [pc, #904]
- ldr r2, [pc, #904]
- bl sub_02009e4c
- movs r1, #204
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #134
- bl sub_02009e90
- movs r1, #204
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #148
- bl sub_02009e9c
- movs r1, #212
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #148
- bl sub_02009ea8
- movs r1, #128
- movs r2, #20
- movs r0, #0
- lsls r1, r1, #7
- bl sub_02009f54
- movs r1, #1
- movs r0, #27
- bl sub_02009f0c
- ldr r0, [pc, #848]
- bl sub_02009f3a
- movs r0, #27
- bl sub_02008204
- movs r1, #1
- movs r0, #8
- bl sub_02009f20
- movs r0, #8
- bl sub_02008212
- movs r1, #3
- movs r0, #27
- bl sub_02009f0e
- movs r0, #27
- bl sub_02008220
- movs r0, #27
- mov r1, sl
- bl sub_0200823c
- movs r0, #0
- bl sub_02009eaa
- cmp r0, #0
- beq.n .L_020039d2
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_02009f18
-.L_020039d2:
- movs r0, #1
- ldr r1, [pc, #768]
- ldr r2, [pc, #772]
- bl sub_02009ed2
- movs r0, #1
- mov r1, r8
- movs r2, #148
- bl sub_02009f14
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02009fc0
- movs r0, #1
- bl sub_02009ede
- cmp r0, #0
- beq.n .L_02003a06
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #2
- bl sub_02009f4c
-.L_02003a06:
- movs r0, #2
- ldr r1, [pc, #716]
- ldr r2, [pc, #720]
- bl sub_02009f06
- movs r1, #228
- movs r0, #2
- lsls r1, r1, #1
- movs r2, #148
- bl sub_02009f4a
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02009ff6
- movs r0, #2
- bl sub_02009f14
- cmp r0, #0
- beq.n .L_02003a3c
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #3
- bl sub_02009f82
-.L_02003a3c:
- movs r0, #3
- ldr r1, [pc, #664]
- ldr r2, [pc, #664]
- bl sub_02009f3c
- movs r1, #236
- movs r0, #3
- lsls r1, r1, #1
- movs r2, #148
- bl sub_02009f80
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #7
- movs r2, #20
- movs r5, #128
- bl sub_0200a02e
- lsls r5, r5, #7
- movs r0, #0
- movs r1, #0
- movs r2, #60
- bl sub_02008352
- adds r1, r5, #0
- movs r0, #1
- movs r2, #20
- bl sub_0200835c
- movs r0, #2
- movs r1, #1
- movs r2, #20
- bl sub_02008366
- mov r1, r9
- movs r2, #20
- movs r0, #27
- bl sub_0200a058
- movs r0, #27
- bl sub_020082fa
- movs r0, #9
- movs r1, #1
- bl sub_0200a00e
- adds r1, r6, #0
- movs r2, #40
- movs r0, #9
- bl sub_0200a088
- movs r0, #9
- bl sub_02008312
- movs r0, #1
- movs r1, #3
- bl sub_0200a026
- movs r2, #60
- movs r0, #1
- ldr r1, [pc, #556]
- bl sub_0200a0a0
- movs r1, #3
- movs r0, #27
- bl sub_0200a020
- movs r0, #27
- bl sub_02008332
- movs r0, #10
- movs r1, #1
- bl sub_0200a04e
- movs r1, #3
- movs r0, #10
- bl sub_0200a026
- movs r0, #10
- bl sub_02008348
- movs r0, #8
- movs r1, #3
- bl sub_0200a034
- movs r0, #9
- movs r1, #3
- bl sub_0200a03c
- movs r0, #11
- movs r1, #3
- bl sub_0200a044
- movs r0, #12
- movs r1, #3
- bl sub_0200a04c
- movs r0, #13
- movs r1, #3
- bl sub_0200a064
- movs r0, #0
- movs r1, #0
- movs r2, #40
- bl sub_020083f6
- movs r0, #2
- movs r1, #1
- movs r2, #0
- bl sub_02008400
- movs r2, #20
- adds r1, r5, #0
- movs r0, #1
- bl sub_0200840a
- movs r1, #4
- movs r0, #27
- bl sub_0200a08a
- movs r0, #27
- bl sub_0200839c
- movs r1, #129
- movs r2, #60
- movs r0, #8
- lsls r1, r1, #1
- bl sub_0200a124
- movs r1, #1
- movs r0, #8
- bl sub_0200a0bc
- movs r0, #8
- bl sub_020083b6
- movs r1, #3
- movs r0, #27
- bl sub_0200a0b2
- movs r0, #27
- bl sub_020083c4
- movs r0, #8
- movs r1, #0
- movs r2, #0
- bl sub_0200a132
- mov r1, fp
- movs r0, #9
- movs r2, #40
- bl sub_0200a13c
- movs r1, #129
- movs r0, #8
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200a160
- movs r1, #129
- movs r2, #40
- movs r0, #8
- lsls r1, r1, #1
- bl sub_0200a16c
- movs r0, #27
- movs r1, #1
- bl sub_0200a10c
- movs r0, #27
- movs r1, #3
- bl sub_0200a0e4
- movs r2, #20
- movs r0, #27
- movs r1, #0
- bl sub_0200a15e
- movs r0, #8
- movs r1, #3
- bl sub_0200a0f6
- movs r1, #3
- movs r0, #9
- bl sub_0200a10e
- movs r0, #40
- bl sub_0200a074
- movs r2, #20
- adds r1, r6, #0
- movs r0, #9
- bl sub_0200a1a6
- adds r1, r7, #0
- movs r0, #9
- bl sub_02008446
- movs r0, #9
- bl sub_02008438
- movs r1, #192
- lsls r1, r1, #6
- movs r0, #27
- bl sub_02008456
- movs r0, #27
- ldr r1, [pc, #268]
- movs r2, #60
- bl sub_0200a1c8
- movs r0, #27
- movs r1, #0
- movs r2, #60
- bl sub_0200a1aa
- movs r1, #131
- movs r2, #20
- movs r0, #27
- lsls r1, r1, #1
- bl sub_0200a1de
- adds r1, r7, #0
- movs r0, #27
- bl sub_0200847e
- movs r1, #3
- movs r0, #27
- bl sub_0200a166
- movs r0, #27
- bl sub_02008478
- movs r2, #80
- movs r0, #3
- movs r1, #2
- bl sub_020084fe
- mov r1, sl
- movs r0, #8
- bl sub_0200849e
- movs r1, #2
- movs r0, #8
- bl sub_0200a19e
- movs r0, #8
- bl sub_02008498
- movs r0, #9
- movs r1, #3
- bl sub_0200a194
- movs r1, #2
- movs r0, #9
- bl sub_0200a1b4
- movs r0, #9
- bl sub_020084ae
- mov r1, r9
- movs r0, #27
- bl sub_020084ca
- movs r0, #27
- movs r1, #3
- bl sub_0200a1b2
- movs r1, #1
- movs r0, #27
- bl sub_0200a1da
- movs r0, #27
- bl sub_020084cc
- movs r0, #27
- ldr r1, [pc, #112]
- ldr r2, [pc, #116]
- bl sub_0200a162
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #158
- bl sub_0200a1a6
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #148
- bl sub_0200a1b2
- movs r2, #20
- movs r0, #27
- movs r1, #0
- bl sub_0200a25c
- movs r1, #1
- movs r0, #27
- bl sub_0200a214
- movs r0, #27
- bl sub_02008506
- mov r1, fp
- movs r0, #1
- movs r2, #20
- bl sub_0200858c
- movs r0, #2
- movs r1, #1
- movs r2, #0
- bl sub_02008596
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #134
- bl sub_0200a1ea
- mov r1, r8
- movs r2, #134
- movs r0, #27
- bl sub_0200a1ec
- movs r0, #40
- bl sub_0200a18a
- b.n .L_02003cec
- .2byte 0x0000
- .4byte 0x01000001
- .4byte 0x03001ebc
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x00001e27
- .4byte 0x00000103
- .2byte 0x0101
- .2byte 0x0000
-.L_02003cec:
- movs r0, #9
- movs r1, #10
- movs r2, #0
- bl sub_020085dc
- ldr r0, [pc, #20]
- bl sub_0200a1a2
- pop {r3, r5, r6, r7}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- mov fp, r7
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0926
- .2byte 0x0000
-AlchemyC_02003d10:
- .space 0xdc
-AlchemyC_02003dec:
- .space 0x48
-AlchemyC_02003e34:
- .space 0xb8
-AlchemyC_02003eec:
- .space 0xa8
-AlchemyC_02003f94:
- .space 0x154
-AlchemyC_020040e8:
- .space 0x54
-AlchemyC_0200413c:
- .space 0x5c
-AlchemyC_02004198:
- .space 0x80
-AlchemyC_02004218:
- .space 0x3c
- push {r5, r6, r7, lr}
- mov r7, r8
- push {r7}
- adds r5, r0, #0
- bl sub_0200a726
- movs r0, #24
- movs r1, #0
- movs r2, #0
- bl sub_02008b50
- movs r3, #216
- lsls r3, r3, #1
- movs r6, #128
- mov r8, r3
- lsls r6, r6, #8
- adds r3, r6, #0
- mov r1, r8
- movs r2, #134
- movs r0, #0
- bl sub_02008b0e
- movs r0, #1
- bl sub_02007a5c
- movs r0, #1
- bl sub_0200a6aa
- bl sub_0200a8be
- movs r0, #0
- ldr r1, [pc, #776]
- ldr r2, [pc, #776]
- bl sub_0200a790
- movs r1, #203
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #134
- bl sub_0200a7d4
- movs r1, #203
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #152
- bl sub_0200a7e0
- movs r2, #152
- movs r0, #0
- ldr r1, [pc, #748]
- bl sub_0200a7ea
- movs r1, #1
- movs r0, #27
- bl sub_0200a842
- movs r0, #20
- bl sub_0200a788
- movs r0, #27
- movs r1, #0
- movs r2, #10
- bl sub_0200a862
- movs r0, #192
- lsls r0, r0, #2
- bl sub_0200a77a
- cmp r0, #0
- bne.n .L_020042e2
- b.n .L_02004516
-.L_020042e2:
- adds r0, r5, #0
- movs r1, #0
- bl sub_02009290
- movs r1, #1
- adds r5, r0, #0
- movs r0, #27
- bl sub_0200a872
- movs r0, #20
- bl sub_0200a7b8
- movs r2, #10
- movs r1, #0
- movs r0, #27
- bl sub_0200a892
- ldr r0, [pc, #672]
- bl sub_0200a8b0
- ldr r0, [pc, #672]
- bl sub_02008b7a
- movs r0, #0
- movs r1, #3
- bl sub_0200a876
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #9
- adds r2, r6, #0
- bl sub_0200a81a
- movs r0, #0
- mov r1, r8
- movs r2, #168
- bl sub_0200a85c
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200a908
- movs r0, #0
- movs r7, #0
- bl sub_0200a828
- cmp r0, #0
- beq.n .L_02004350
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- adds r0, r5, #0
- bl sub_0200a896
-.L_02004350:
- movs r1, #128
- adds r0, r5, #0
- lsls r1, r1, #9
- adds r2, r6, #0
- bl sub_0200a852
- movs r1, #224
- adds r0, r5, #0
- lsls r1, r1, #1
- movs r2, #168
- bl sub_0200a896
- movs r1, #176
- adds r0, r5, #0
- lsls r1, r1, #8
- movs r2, #20
- bl sub_0200a942
- movs r1, #192
- movs r2, #20
- movs r0, #27
- lsls r1, r1, #6
- bl sub_0200a94e
- movs r1, #3
- movs r0, #27
- bl sub_0200a8d6
- movs r0, #27
- bl sub_02008bf8
- movs r1, #129
- movs r2, #60
- adds r0, r5, #0
- lsls r1, r1, #1
- bl sub_0200a980
- movs r0, #27
- movs r1, #1
- bl sub_0200a920
- movs r1, #3
- movs r0, #27
- bl sub_0200a8f8
- movs r0, #27
- bl sub_02008c1a
- adds r0, r5, #0
- movs r1, #3
- bl sub_0200a916
- ldr r0, [pc, #500]
- bl sub_0200a85c
- cmp r0, #0
- beq.n .L_020043e4
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200a99c
- movs r1, #192
- movs r0, #27
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200a9a8
- movs r1, #235
- adds r0, r5, #0
- lsls r1, r1, #1
- movs r2, #204
- b.n .L_02004456
-.L_020043e4:
- ldr r0, [pc, #460]
- bl sub_0200a888
- cmp r0, #0
- beq.n .L_0200442c
- movs r1, #211
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #154
- bl sub_0200a928
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200a9d4
- movs r1, #160
- movs r0, #27
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200a9e0
- movs r1, #205
- adds r0, r5, #0
- lsls r1, r1, #1
- movs r2, #204
- bl sub_0200a94c
- movs r1, #208
- lsls r1, r1, #8
- adds r0, r5, #0
- movs r7, #1
- bl sub_02008ca8
- b.n .L_020044a2
-.L_0200442c:
- ldr r0, [pc, #392]
- bl sub_0200a8d0
- cmp r0, #0
- beq.n .L_02004466
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200aa10
- movs r1, #192
- movs r0, #27
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200aa1c
- movs r1, #235
- adds r0, r5, #0
- lsls r1, r1, #1
- movs r2, #172
-.L_02004456:
- bl sub_0200a988
- movs r1, #176
- lsls r1, r1, #8
- adds r0, r5, #0
- bl sub_02008ce2
- b.n .L_020044a2
-.L_02004466:
- movs r1, #211
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #154
- bl sub_0200a9a0
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200aa4c
- movs r1, #160
- movs r0, #27
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200aa58
- movs r1, #205
- adds r0, r5, #0
- lsls r1, r1, #1
- movs r2, #172
- bl sub_0200a9c4
- movs r1, #208
- lsls r1, r1, #8
- adds r0, r5, #0
- movs r7, #1
- bl sub_02008d20
-.L_020044a2:
- movs r2, #20
- movs r1, #0
- movs r0, #27
- bl sub_0200aa3a
- ldr r0, [pc, #268]
- bl sub_02008d1c
- movs r0, #0
- movs r1, #3
- bl sub_0200aa18
- movs r0, #27
- movs r1, #3
- bl sub_0200aa20
- movs r1, #128
- movs r2, #128
- movs r0, #27
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200a9c6
- cmp r7, #0
- beq.n .L_020044ec
- movs r1, #214
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #164
- bl sub_0200aa0e
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #164
- bl sub_0200aa1a
-.L_020044ec:
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #134
- bl sub_0200aa26
- movs r1, #220
- lsls r1, r1, #1
- movs r2, #134
- movs r0, #27
- bl sub_0200aa2a
- movs r0, #40
- bl sub_0200a9c8
- movs r0, #9
- movs r1, #10
- movs r2, #0
- bl sub_02008dfa
- b.n .L_02004592
-.L_02004516:
- ldr r0, [pc, #168]
- bl sub_0200aac2
- ldr r5, [pc, #140]
- ldr r0, [pc, #140]
- movs r1, #0
- movs r2, #40
- bl sub_0200aae6
- movs r2, #60
- ldr r1, [pc, #152]
- movs r0, #27
- bl sub_0200ab18
- adds r0, r5, #0
- bl sub_02008da2
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #0
- bl sub_0200ab30
- movs r0, #60
- bl sub_0200aa06
- movs r2, #40
- movs r0, #27
- ldr r1, [pc, #120]
- bl sub_0200ab38
- movs r1, #2
- movs r0, #27
- bl sub_0200aad0
- adds r0, r5, #0
- bl sub_02008dca
- movs r2, #40
- ldr r1, [pc, #104]
- movs r0, #27
- bl sub_0200ab50
- adds r0, r5, #0
- bl sub_02008dda
- movs r1, #4
- movs r0, #27
- bl sub_0200aad6
- adds r0, r5, #0
- bl sub_02008de8
- movs r0, #0
- movs r1, #3
- bl sub_0200aae4
- movs r0, #20
- bl sub_0200aa4a
- movs r0, #4
- bl sub_0200aba8
-.L_02004592:
- pop {r3}
- mov r8, r3
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0x0000cccc
- .4byte 0x00006666
- .4byte 0x000001a5
- .4byte 0x00001ebc
- .4byte 0x0000a01b
- .4byte 0x0000092b
- .4byte 0x0000092a
- .4byte 0x00000929
- .4byte 0x0000201b
- .4byte 0x00001eb7
- .4byte 0x00000101
- .4byte 0x00000103
- .2byte 0x0105
- .2byte 0x0000
- push {r5, r6, lr}
- mov r6, r8
- push {r6}
- movs r0, #128
- lsls r0, r0, #2
- bl sub_0200aa7c
- adds r5, r0, #0
- cmp r5, #0
- beq.n .L_020045ea
- ldr r3, [pc, #128]
- ldr r0, [r3, #0]
- b.n .L_0200465e
-.L_020045ea:
- movs r2, #128
- movs r3, #136
- ldr r1, [pc, #124]
- lsls r2, r2, #11
- lsls r3, r3, #18
- movs r0, #22
- bl sub_0200aa58
- mov r8, r0
- mov r3, r8
- adds r3, #85
- mov r2, r8
- strb r5, [r3, #0]
- adds r2, #92
- movs r3, #1
- strb r3, [r2, #0]
- mov r2, r8
- ldr r6, [r2, #80]
- adds r3, r6, #0
- adds r3, #39
- strb r5, [r3, #0]
- movs r3, #33
- ldrb r2, [r6, #5]
- negs r3, r3
- ands r3, r2
- ldrb r2, [r6, #9]
- strb r3, [r6, #5]
- movs r3, #15
- ands r3, r2
- movs r1, #193
- strb r3, [r6, #9]
- lsls r1, r1, #3
- movs r0, #17
- bl sub_0200aa66
- adds r5, r0, #0
- movs r0, #232
- bl sub_0200aace
- movs r3, #128
- lsls r3, r3, #3
- adds r5, r5, r3
- adds r2, r5, #0
- movs r1, #128
- ldrb r0, [r6, #28]
- bl sub_0200aa8e
- movs r0, #17
- bl sub_0200aa8c
- movs r0, #128
- lsls r0, r0, #2
- bl sub_0200aafc
- ldr r3, [pc, #16]
- mov r2, r8
- str r2, [r3, #0]
- mov r0, r8
-.L_0200465e:
- pop {r3}
- mov r8, r3
- pop {r5, r6}
- pop {r1}
- bx r1
- .4byte 0x0200e968
- .2byte 0x0000
- .2byte 0x01c7
-AlchemyC_02004670:
- .space 0x15c
- push {r5, lr}
- adds r5, r0, #0
- adds r3, r5, #0
- subs r3, #18
- cmp r3, #8
- bhi.n .L_02004862
- ldr r2, [pc, #140]
- lsls r3, r3, #2
- ldr r3, [r3, r2]
- mov pc, r3
- .4byte 0x0200c80a
- .4byte 0x0200c804
- .4byte 0x0200c80a
- .4byte 0x0200c840
- .4byte 0x0200c81c
- .4byte 0x0200c81c
- .4byte 0x0200c82e
- .4byte 0x0200c840
- .4byte 0x0200c852
- .4byte 0x21061c28
- .4byte 0x1c28e013
- .4byte 0xf0062105
- .4byte 0x1c28faa7
- .4byte 0xf0062110
- .4byte 0xe022faab
- .4byte 0x21051c28
- .4byte 0xfaa7f006
- .4byte 0x21141c28
- .4byte 0xfaabf006
- .4byte 0x1c28e019
- .4byte 0xf006210a
- .4byte 0x1c28faa7
- .4byte 0xf0062108
- .4byte 0xe010faab
- .4byte 0x21051c28
- .4byte 0xfaa7f006
- .4byte 0x21041c28
- .4byte 0xfaabf006
- .4byte 0x1c28e007
- .4byte 0xf0062109
- .4byte 0x1c28faa7
- .4byte 0xf0062104
- .2byte 0xfaab
-.L_02004862:
- pop {r5}
- pop {r0}
- bx r0
- .2byte 0xc7e0
- .2byte 0x0200
-AlchemyC_0200486c:
- .space 0x12
- .2byte 0x0000
-AlchemyC_02004880:
- .space 0x10
-AlchemyC_02004890:
- .space 0x1c
-AlchemyC_020048ac:
- .space 0x3c
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r9
- mov r5, r8
- push {r5, r6, r7}
- adds r7, r1, #0
- adds r6, r2, #0
- cmp r0, #25
- bls.n .L_020048fc
- b.n .L_02004f5c
-.L_020048fc:
- ldr r2, [pc, #952]
- lsls r3, r0, #2
- ldr r3, [r3, r2]
- mov pc, r3
- .4byte 0x0200c96c
- .4byte 0x0200c994
- .4byte 0x0200c9be
- .4byte 0x0200c9f0
- .4byte 0x0200ca20
- .4byte 0x0200ca3c
- .4byte 0x0200ca4c
- .4byte 0x0200ca6e
- .4byte 0x0200ca90
- .4byte 0x0200cab2
- .4byte 0x0200cac8
- .4byte 0x0200cb20
- .4byte 0x0200cc62
- .4byte 0x0200cc8a
- .4byte 0x0200ccc4
- .4byte 0x0200ccda
- .4byte 0x0200cd50
- .4byte 0x0200cd74
- .4byte 0x0200cd8a
- .4byte 0x0200cde0
- .4byte 0x0200ce86
- .4byte 0x0200ce9a
- .4byte 0x0200ced0
- .4byte 0x0200ceea
- .4byte 0x0200cefe
- .4byte 0x0200cf26
- .4byte 0x21002000
- .4byte 0xf0062200
- .4byte 0x2180fae7
- .4byte 0x02092001
- .4byte 0xf0062200
- .4byte 0x2002fae7
- .4byte 0x22002100
- .4byte 0xfae7f006
- .4byte 0x20032180
- .4byte 0xe0100209
- .4byte 0x1c392000
- .4byte 0xf0062200
- .4byte 0x2001fae7
- .4byte 0x22001c39
- .4byte 0xfae7f006
- .4byte 0x1c392002
- .4byte 0xf0062200
- .4byte 0x2003fae7
- .4byte 0x1c321c39
- .4byte 0xfae7f006
- .4byte 0x2000e2ce
- .4byte 0xf0062103
- .4byte 0x2001faa7
- .4byte 0xf0062103
- .4byte 0x2002faa7
- .4byte 0xf0062103
- .4byte 0x2003faa7
- .4byte 0xf0062103
- .4byte 0x2f00faa7
- .4byte 0x2003d002
- .4byte 0xfab3f006
- .4byte 0xd1002e00
- .4byte 0xe013e2b6
- .4byte 0x20002181
- .4byte 0xf0060049
- .4byte 0x2181faf7
- .4byte 0x00492001
- .4byte 0xfaf7f006
- .4byte 0x20022181
- .4byte 0xf0060049
- .4byte 0x2181faf7
- .4byte 0x00492003
- .4byte 0xfaf7f006
- .4byte 0xf0061c30
- .4byte 0xe29dfa5f
- .4byte 0x42bd2500
- .4byte 0xe299d300
- .4byte 0x300a1c28
- .4byte 0x22002100
- .4byte 0xf0063501
- .4byte 0x42bdfaa3
- .4byte 0xe28fd3f6
- .4byte 0xf0061c38
- .4byte 0x23a0fa73
- .4byte 0x80c301db
- .4byte 0xe0082105
- .4byte 0xf0061c38
- .4byte 0x23a0fa73
- .4byte 0x80c301db
- .4byte 0x21054b98
- .4byte 0x1c386183
- .4byte 0xfaa7f006
- .4byte 0x1c311c38
- .4byte 0xfaabf006
- .4byte 0x1c38e276
- .4byte 0xfa73f006
- .4byte 0x01db23a0
- .4byte 0x1c3880c3
- .4byte 0xfbe5f004
- .4byte 0xd0002e00
- .4byte 0x1c38e26a
- .4byte 0xf0062100
- .4byte 0xe265faab
- .4byte 0x22e04b8b
- .4byte 0x0052681b
- .4byte 0x3242189b
- .4byte 0xf006601a
- .4byte 0x2f00fb17
- .4byte 0xf006d001
- .4byte 0x2000fb1f
- .4byte 0xfa5ff006
- .4byte 0xf006e254
- .4byte 0xf006fb1b
- .4byte 0x2f00fb1f
- .4byte 0xe24dd100
- .4byte 0xf0061c38
- .4byte 0xe249fb0b
- .4byte 0x21012018
- .4byte 0xf0042200
- .4byte 0x2100fc73
- .4byte 0x20192200
- .4byte 0xfc73f004
- .4byte 0x20002580
- .4byte 0xfbebf003
- .4byte 0x21d801ed
- .4byte 0x20000049
- .4byte 0x1c2b22a8
- .4byte 0xfc47f004
- .4byte 0x004921e0
- .4byte 0x22a82001
- .4byte 0xf0041c2b
- .4byte 0x21d4fc47
- .4byte 0x20020049
- .4byte 0x1c2b2298
- .4byte 0xfc47f004
- .4byte 0x004921e5
- .4byte 0x22982003
- .4byte 0xf0041c2b
- .4byte 0xe21dfc47
- .4byte 0xd00f2f00
- .4byte 0x200d2101
- .4byte 0xfaa7f006
- .4byte 0xf006200d
- .4byte 0x23c0fa73
- .4byte 0x80c3019b
- .4byte 0xf006200d
- .4byte 0x2380fa73
- .4byte 0x6183025b
- .4byte 0x200e2101
- .4byte 0xfaa7f006
- .4byte 0xf006200e
- .4byte 0x23a0fa73
- .4byte 0x469801db
- .4byte 0x80c24642
- .4byte 0x200f2101
- .4byte 0xfaa7f006
- .4byte 0xf006200f
- .4byte 0x23c0fa73
- .4byte 0x469a019b
- .4byte 0x80c24652
- .4byte 0xf006200f
- .4byte 0x2580fa73
- .4byte 0x2101026d
- .4byte 0x20106185
- .4byte 0xfaa7f006
- .4byte 0xf0062010
- .4byte 0x4643fa73
- .4byte 0x210180c3
- .4byte 0xf0062011
- .4byte 0x2011faa7
- .4byte 0xfa73f006
- .4byte 0x80c24652
- .4byte 0xf0062011
- .4byte 0x21cdfa73
- .4byte 0x618522ae
- .4byte 0x201c0449
- .4byte 0xf0060412
- .4byte 0x21ebfaa3
- .4byte 0x201d22ae
- .4byte 0x04120449
- .4byte 0xfaa3f006
- .4byte 0x22ce21cd
- .4byte 0x0449201e
- .4byte 0xf0060412
- .4byte 0x21ebfaa3
- .4byte 0x201f22ce
- .4byte 0x04120449
- .4byte 0xfaa3f006
- .4byte 0x228f21cd
- .4byte 0x04492020
- .4byte 0xf0060452
- .4byte 0x21ebfaa3
- .4byte 0x2021228f
- .4byte 0x04520449
- .4byte 0xfaa3f006
- .4byte 0x229e21cd
- .4byte 0x04492022
- .4byte 0xf0060452
- .4byte 0x21ebfaa3
- .4byte 0x2023229e
- .4byte 0x04520449
- .4byte 0xfaa3f006
- .4byte 0xf0062001
- .4byte 0x2f00fa0f
- .4byte 0x21b0d005
- .4byte 0x0209200d
- .4byte 0xf0062200
- .4byte 0x21d0fae7
- .4byte 0x0209200e
- .4byte 0xf0062200
- .4byte 0x21b0fae7
- .4byte 0x0209200f
- .4byte 0xf0062200
- .4byte 0x21d0fae7
- .4byte 0x02092010
- .4byte 0xf0062200
- .4byte 0x21b0fae7
- .4byte 0x20110209
- .4byte 0xfc3ff004
- .4byte 0x1c38e17c
- .4byte 0xfa73f006
- .4byte 0x1c052101
- .4byte 0xf0061c38
- .4byte 0x2e00faa7
- .4byte 0x23c0d002
- .4byte 0xe001019b
- .4byte 0x01db23a0
- .4byte 0x238080eb
- .4byte 0x61ab025b
- .4byte 0x2009e168
- .4byte 0x22002100
- .4byte 0xfaa3f006
- .4byte 0x2100200c
- .4byte 0xf0062200
- .4byte 0x200bfaa3
- .4byte 0x22002100
- .4byte 0xfaa3f006
- .4byte 0x2100200d
- .4byte 0xf0062200
- .4byte 0x200afaa3
- .4byte 0x0000e00c
- .4byte 0x0200c904
- .4byte 0xffff0000
- .4byte 0x03001ebc
- .4byte 0x2100200e
- .4byte 0xf0062200
- .4byte 0x200dfaa3
- .4byte 0x22002100
- .4byte 0xfaa3f006
- .4byte 0x2018e140
- .4byte 0x22002101
- .4byte 0xfc73f004
- .4byte 0x21002009
- .4byte 0xf0062200
- .4byte 0x200afaa3
- .4byte 0x22002100
- .4byte 0xfaa3f006
- .4byte 0x23d021de
- .4byte 0x4a9b0049
- .4byte 0x021b2008
- .4byte 0xfc47f004
- .4byte 0x21002000
- .4byte 0xf0062200
- .4byte 0x2f00faa3
- .4byte 0xf004d001
- .4byte 0x20e0fae7
- .4byte 0x229c2180
- .4byte 0x03890440
- .4byte 0x4b920492
- .4byte 0xfc55f004
- .4byte 0xd1002e00
- .4byte 0x4b90e114
- .4byte 0x681b22e0
- .4byte 0x189b0052
- .4byte 0x601a3242
- .4byte 0xfb17f006
- .4byte 0xfb1ff006
- .4byte 0xf0062014
- .4byte 0xe105fa5f
- .4byte 0x21002008
- .4byte 0xf0062200
- .4byte 0x2009faa3
- .4byte 0x22002100
- .4byte 0xfaa3f006
- .4byte 0x229821db
- .4byte 0x0449201b
- .4byte 0xf0060412
- .4byte 0xe0f3faa3
- .4byte 0x1c282500
- .4byte 0x2100301c
- .4byte 0x35012200
- .4byte 0xfaa3f006
- .4byte 0xd9f62d07
- .4byte 0x2285e0e8
- .4byte 0x009223b0
- .4byte 0x200c021b
- .4byte 0x25f52198
- .4byte 0xfc47f004
- .4byte 0x23c0006d
- .4byte 0x1c2a019b
- .4byte 0x21862008
- .4byte 0xf0044698
- .4byte 0x23a0fc47
- .4byte 0x20091c2a
- .4byte 0x01db21a6
- .4byte 0xfc47f004
- .4byte 0x23a0350e
- .4byte 0x21b6200a
- .4byte 0x01db1c2a
- .4byte 0xfc47f004
- .4byte 0x2176200b
- .4byte 0x46431c2a
- .4byte 0xfc47f004
- .4byte 0x200e2700
- .4byte 0xe58a2600
- .4byte 0x22a421d0
- .4byte 0x00520049
- .4byte 0x23002008
- .4byte 0xfc47f004
- .4byte 0x005222e0
- .4byte 0x23d04692
- .4byte 0x3a60021b
- .4byte 0x46512009
- .4byte 0xf0044699
- .4byte 0x22c0fc47
- .4byte 0x46900192
- .4byte 0x004921e3
- .4byte 0x22f8200a
- .4byte 0x25cc4643
- .4byte 0xfc47f004
- .4byte 0x2291006d
- .4byte 0x00521c29
- .4byte 0x23001c38
- .4byte 0xfc47f004
- .4byte 0x1c2922ab
- .4byte 0x1c300052
- .4byte 0xf0042300
- .4byte 0x21d2fc47
- .4byte 0x004922b2
- .4byte 0x200d0052
- .4byte 0xf004464b
- .4byte 0x2298fc47
- .4byte 0x00521c29
- .4byte 0x2300200e
- .4byte 0xfc47f004
- .4byte 0x21d13d1e
- .4byte 0x200f0049
- .4byte 0x464b1c2a
- .4byte 0xfc47f004
- .4byte 0x228321dc
- .4byte 0x00520049
- .4byte 0x46432010
- .4byte 0xfc47f004
- .4byte 0x46512011
- .4byte 0x464b1c2a
- .4byte 0xfc47f004
- .4byte 0x1c3de06a
- .4byte 0xd86742b7
- .4byte 0x35011c28
- .4byte 0xfa57f006
- .4byte 0xd9f942b5
- .4byte 0x4937e060
- .4byte 0x20144a37
- .4byte 0xfc73f004
- .4byte 0x4a374936
- .4byte 0xf0042014
- .4byte 0x2199fc73
- .4byte 0x4a350109
- .4byte 0xf0042014
- .4byte 0x20c0fc73
- .4byte 0xf0060080
- .4byte 0x4832fa57
- .4byte 0xfa57f006
- .4byte 0xf0064831
- .4byte 0xe045fa57
- .4byte 0xf0062001
- .4byte 0x2017fa0f
- .4byte 0x22002100
- .4byte 0xfc73f004
- .4byte 0x200c492c
- .4byte 0xfa7ff006
- .4byte 0x2001e038
- .4byte 0xfa77f006
- .4byte 0xf0062002
- .4byte 0x2003fa77
- .4byte 0xfa77f006
- .4byte 0x2001e02e
- .4byte 0x22012101
- .4byte 0x42494240
- .4byte 0x23004252
- .4byte 0xfafff006
- .4byte 0xf0062001
- .4byte 0x2f00fa0f
- .4byte 0xf006d020
- .4byte 0x2300fb07
- .4byte 0x70033055
- .4byte 0x481ce01a
- .4byte 0xfa6bf006
- .4byte 0xf0062001
- .4byte 0x2f01fa0f
- .4byte 0x4819d101
- .4byte 0x2f02e002
- .4byte 0x4818d106
- .4byte 0xfa6bf006
- .4byte 0xf0062001
- .4byte 0xe007fa0f
- .4byte 0xd1052f03
- .4byte 0xf0064814
- .4byte 0x2001fa6b
- .2byte 0xf006
- .2byte 0xfa0f
-.L_02004f5c:
- pop {r3, r5, r6}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00000266
- .4byte 0x01000001
- .4byte 0x03001ebc
- .4byte 0x0000092c
- .4byte 0x0000093d
- .4byte 0x00000917
- .4byte 0x0000091f
- .4byte 0x00000998
- .4byte 0x00000301
- .4byte 0x00000302
- .4byte 0x0200e840
- .4byte 0x0200f2a0
- .4byte 0x0200f300
- .4byte 0x0200f360
- .2byte 0xf3c0
- .2byte 0x0200
- push {r5, r6, r7, lr}
- movs r6, #0
- movs r7, #8
-.L_02004fae:
- cmp r1, #0
- bne.n .L_02004fb4
- movs r7, #18
-.L_02004fb4:
- cmp r0, #1
- beq.n .L_02004fca
- cmp r0, #1
- bcc.n .L_02004fc6
- cmp r0, #2
- beq.n .L_02004fce
- cmp r0, #3
- beq.n .L_02004fd6
- b.n .L_02004fda
-.L_02004fc6:
- ldr r6, [pc, #48]
-.L_02004fc8:
- b.n .L_02004fda
-.L_02004fca:
- ldr r6, [pc, #48]
- b.n .L_02004fda
-.L_02004fce:
- ldr r6, [pc, #48]
- b.n .L_02004fda
-.L_02004fd2:
- adds r0, r7, #0
- b.n .L_02004ff2
-.L_02004fd6:
- movs r6, #153
- lsls r6, r6, #4
-.L_02004fda:
- movs r5, #0
-.L_02004fdc:
- adds r0, r6, #0
- bl sub_0200b480
- cmp r0, #0
- bne.n .L_02004fd2
- adds r5, #1
- adds r6, #1
- adds r7, #1
- cmp r5, #8
- bls.n .L_02004fdc
- movs r0, #0
-.L_02004ff2:
- pop {r5, r6, r7}
- pop {r1}
- bx r1
- .4byte 0x0000092c
- .4byte 0x00000935
- .2byte 0x0917
- .2byte 0x0000
-AlchemyC_02005004:
- .space 0x34
-AlchemyC_02005038:
- .space 0x30
-AlchemyC_02005068:
- .space 0x7c
-AlchemyC_020050e4:
- .space 0x210
- push {r5, r6, lr}
- mov r6, sl
- mov r5, r9
- push {r5, r6}
- mov r6, r8
- push {r6}
- movs r6, #222
- lsls r6, r6, #1
- movs r2, #150
- adds r1, r6, #0
- lsls r2, r2, #1
- movs r0, #0
- movs r3, #0
- movs r5, #155
- bl sub_02009ba2
- lsls r5, r5, #1
- movs r1, #229
- adds r2, r5, #0
- lsls r1, r1, #1
- movs r0, #1
- movs r3, #0
- bl sub_02009bb2
- movs r2, #165
- adds r1, r6, #0
- lsls r2, r2, #1
- movs r0, #2
- movs r3, #0
- bl sub_02009bc0
- movs r2, #216
- lsls r2, r2, #1
- mov r9, r2
- movs r0, #3
- adds r2, r5, #0
- mov r1, r9
- movs r3, #0
- bl sub_02009bd2
- movs r1, #220
- movs r3, #128
-.L_02005348:
- lsls r1, r1, #1
- lsls r3, r3, #8
- movs r0, #27
- movs r2, #134
- bl sub_02009be2
- movs r1, #227
- movs r3, #192
- lsls r3, r3, #6
- movs r2, #248
- lsls r1, r1, #1
- movs r0, #10
- mov r8, r3
- movs r5, #220
- bl sub_02009bf6
- movs r6, #1
- movs r0, #10
- movs r1, #6
- bl sub_0200b8c0
- lsls r5, r5, #17
- negs r6, r6
- movs r2, #154
- ldr r3, [pc, #724]
- lsls r2, r2, #17
- adds r1, r6, #0
- adds r0, r5, #0
- bl sub_02009c2e
- bl sub_0200b9b6
- bl sub_0200b9ca
- movs r0, #20
- bl sub_0200b850
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200b96c
- movs r1, #160
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200b978
- movs r1, #160
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200b984
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #6
- movs r2, #40
- bl sub_0200b990
- movs r1, #1
- movs r2, #20
- movs r0, #2
- bl sub_02009cb2
- ldr r0, [pc, #644]
- bl sub_0200b978
- movs r0, #27
- bl sub_02009c42
- movs r2, #192
- lsls r2, r2, #8
- mov sl, r2
- movs r0, #1
- movs r2, #0
- mov r1, sl
- bl sub_02009cce
- ldr r0, [pc, #620]
- ldr r1, [pc, #624]
- bl sub_0200b9e6
- movs r2, #176
- movs r3, #1
- adds r0, r5, #0
- adds r1, r6, #0
- lsls r2, r2, #16
- bl sub_0200b9fc
- movs r0, #27
- ldr r1, [pc, #604]
- ldr r2, [pc, #608]
- bl sub_0200b8fe
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #134
- bl sub_0200b942
- movs r1, #204
-.L_02005416:
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #152
- bl sub_0200b94e
- movs r1, #212
- movs r2, #164
- movs r0, #27
- lsls r1, r1, #1
- bl sub_0200b95a
- ldr r0, [pc, #560]
- ldr r1, [pc, #568]
- bl sub_0200ba2a
- movs r2, #150
- movs r3, #1
- adds r0, r5, #0
- adds r1, r6, #0
- lsls r2, r2, #17
- bl sub_0200ba40
- movs r1, #212
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #222
- bl sub_0200b97c
- movs r1, #212
- movs r2, #131
- movs r0, #27
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_0200b98a
- movs r2, #20
- movs r0, #27
- mov r1, r8
- bl sub_0200ba34
- movs r1, #1
- movs r0, #27
- bl sub_0200b9ec
- movs r0, #27
- bl sub_02009cde
- movs r2, #20
-.L_02005476:
- movs r0, #2
- movs r1, #1
- bl sub_02009d64
- movs r0, #27
- movs r1, #3
- bl sub_0200b9e4
- movs r1, #1
- movs r0, #27
- bl sub_0200ba0c
- movs r0, #27
- bl sub_02009cfe
- movs r0, #3
- movs r1, #2
- movs r2, #60
- bl sub_02009d84
- movs r1, #224
- lsls r1, r1, #8
- movs r0, #1
- movs r2, #60
- bl sub_02009d90
- movs r2, #40
- movs r0, #27
- movs r1, #0
- bl sub_0200ba82
- movs r0, #27
- movs r1, #1
- bl sub_0200ba3a
- movs r0, #27
- movs r1, #2
- bl sub_0200ba12
- movs r2, #134
- movs r0, #27
- mov r1, r9
- lsls r2, r2, #1
- bl sub_0200b9ee
- movs r1, #226
- movs r2, #134
- lsls r2, r2, #1
- movs r0, #27
- lsls r1, r1, #1
- bl sub_0200b9fc
- movs r0, #27
- movs r1, #1
- bl sub_0200ba34
- movs r1, #208
- lsls r1, r1, #8
- movs r0, #27
- bl sub_02009d6e
- movs r0, #27
- movs r1, #2
- bl sub_0200ba6e
- movs r0, #27
- movs r1, #0
- movs r2, #20
- bl sub_0200bac0
- movs r2, #20
-.L_02005504:
- movs r0, #1
- mov r1, sl
- bl sub_02009df2
- movs r1, #4
- movs r0, #27
- bl sub_0200ba72
- movs r0, #40
- bl sub_0200b9d8
- movs r2, #80
- movs r0, #27
- movs r1, #0
- bl sub_0200bae2
- movs r1, #1
- movs r0, #27
- bl sub_0200baaa
- movs r0, #20
- bl sub_0200b9f0
- movs r1, #3
- movs r0, #27
- bl sub_0200ba98
- movs r0, #10
- bl sub_0200b9fe
- movs r1, #160
- lsls r1, r1, #7
- movs r0, #27
- bl sub_02009dc8
- movs r1, #0
- movs r0, #27
- bl sub_0200bb00
- movs r0, #0
- movs r1, #0
- bl sub_0200ba38
-.L_0200555a:
- cmp r0, #0
- bne.n .L_0200556e
- movs r0, #27
- movs r1, #3
- bl sub_0200bac4
- movs r0, #27
- bl sub_02009dd6
- b.n .L_020055ac
-.L_0200556e:
- movs r1, #4
- movs r0, #27
- bl sub_0200bad4
- ldr r3, [pc, #244]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #27
- bl sub_02009df6
- movs r2, #40
- movs r0, #3
- movs r1, #2
- bl sub_02009e7c
- movs r0, #27
- movs r1, #1
- bl sub_0200bb1c
- movs r0, #27
- movs r1, #3
- bl sub_0200baf4
- movs r0, #27
- bl sub_02009e16
-.L_020055ac:
- movs r2, #20
- movs r0, #2
- movs r1, #1
- bl sub_02009e9c
- ldr r5, [pc, #184]
- movs r0, #1
- adds r1, r5, #0
- bl sub_0200babe
- adds r1, r5, #0
- movs r0, #2
- bl sub_0200bac6
- adds r1, r5, #0
- movs r0, #3
- bl sub_0200bade
- ldr r0, [pc, #160]
- ldr r1, [pc, #164]
- bl sub_0200bbce
- movs r0, #220
- movs r1, #1
- movs r2, #176
- movs r3, #1
- lsls r0, r0, #17
- negs r1, r1
- lsls r2, r2, #16
- bl sub_0200bbe8
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200baee
- movs r1, #212
- movs r2, #136
- movs r0, #0
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_0200bb34
- movs r1, #212
- lsls r1, r1, #1
- movs r2, #164
- movs r0, #0
- bl sub_0200bb38
- movs r0, #60
- bl sub_0200bad6
- ldr r3, [pc, #80]
- movs r2, #224
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #73
- str r2, [r3, #0]
- movs r1, #0
- movs r2, #0
- movs r0, #9
- bl sub_02009f16
- ldr r0, [pc, #72]
- bl sub_0200bae4
- ldr r0, [pc, #72]
- bl sub_0200baea
- movs r0, #4
- bl sub_0200bc58
+ adds r7, r1, #0
+ adds r6, r2, #0
+ cmp r0, #25
+ bls.n .L_020048fc
+ b.n .L_02004f5c
+.L_020048fc:
+ ldr r2, [pc, #952]
+ lsls r3, r0, #2
+ ldr r3, [r3, r2]
+ mov pc, r3
+ .4byte 0x0200c96c
+ .4byte 0x0200c994
+ .4byte 0x0200c9be
+ .4byte 0x0200c9f0
+ .4byte 0x0200ca20
+ .4byte 0x0200ca3c
+ .4byte 0x0200ca4c
+ .4byte 0x0200ca6e
+ .4byte 0x0200ca90
+ .4byte 0x0200cab2
+ .4byte 0x0200cac8
+ .4byte 0x0200cb20
+ .4byte 0x0200cc62
+ .4byte 0x0200cc8a
+ .4byte 0x0200ccc4
+ .4byte 0x0200ccda
+ .4byte 0x0200cd50
+ .4byte 0x0200cd74
+ .4byte 0x0200cd8a
+ .4byte 0x0200cde0
+ .4byte 0x0200ce86
+ .4byte 0x0200ce9a
+ .4byte 0x0200ced0
+ .4byte 0x0200ceea
+ .4byte 0x0200cefe
+ .4byte 0x0200cf26
+ .4byte 0x21002000
+ .4byte 0xf0062200
+ .4byte 0x2180fae7
+ .4byte 0x02092001
+ .4byte 0xf0062200
+ .4byte 0x2002fae7
+ .4byte 0x22002100
+ .4byte 0xfae7f006
+ .4byte 0x20032180
+ .4byte 0xe0100209
+ .4byte 0x1c392000
+ .4byte 0xf0062200
+ .4byte 0x2001fae7
+ .4byte 0x22001c39
+ .4byte 0xfae7f006
+ .4byte 0x1c392002
+ .4byte 0xf0062200
+ .4byte 0x2003fae7
+ .4byte 0x1c321c39
+ .4byte 0xfae7f006
+ .4byte 0x2000e2ce
+ .4byte 0xf0062103
+ .4byte 0x2001faa7
+ .4byte 0xf0062103
+ .4byte 0x2002faa7
+ .4byte 0xf0062103
+ .4byte 0x2003faa7
+ .4byte 0xf0062103
+ .4byte 0x2f00faa7
+ .4byte 0x2003d002
+ .4byte 0xfab3f006
+ .4byte 0xd1002e00
+ .4byte 0xe013e2b6
+ .4byte 0x20002181
+ .4byte 0xf0060049
+ .4byte 0x2181faf7
+ .4byte 0x00492001
+ .4byte 0xfaf7f006
+ .4byte 0x20022181
+ .4byte 0xf0060049
+ .4byte 0x2181faf7
+ .4byte 0x00492003
+ .4byte 0xfaf7f006
+ .4byte 0xf0061c30
+ .4byte 0xe29dfa5f
+ .4byte 0x42bd2500
+ .4byte 0xe299d300
+ .4byte 0x300a1c28
+ .4byte 0x22002100
+ .4byte 0xf0063501
+ .4byte 0x42bdfaa3
+ .4byte 0xe28fd3f6
+ .4byte 0xf0061c38
+ .4byte 0x23a0fa73
+ .4byte 0x80c301db
+ .4byte 0xe0082105
+ .4byte 0xf0061c38
+ .4byte 0x23a0fa73
+ .4byte 0x80c301db
+ .4byte 0x21054b98
+ .4byte 0x1c386183
+ .4byte 0xfaa7f006
+ .4byte 0x1c311c38
+ .4byte 0xfaabf006
+ .4byte 0x1c38e276
+ .4byte 0xfa73f006
+ .4byte 0x01db23a0
+ .4byte 0x1c3880c3
+ .4byte 0xfbe5f004
+ .4byte 0xd0002e00
+ .4byte 0x1c38e26a
+ .4byte 0xf0062100
+ .4byte 0xe265faab
+ .4byte 0x22e04b8b
+ .4byte 0x0052681b
+ .4byte 0x3242189b
+ .4byte 0xf006601a
+ .4byte 0x2f00fb17
+ .4byte 0xf006d001
+ .4byte 0x2000fb1f
+ .4byte 0xfa5ff006
+ .4byte 0xf006e254
+ .4byte 0xf006fb1b
+ .4byte 0x2f00fb1f
+ .4byte 0xe24dd100
+ .4byte 0xf0061c38
+ .4byte 0xe249fb0b
+ .4byte 0x21012018
+ .4byte 0xf0042200
+ .4byte 0x2100fc73
+ .4byte 0x20192200
+ .4byte 0xfc73f004
+ .4byte 0x20002580
+ .4byte 0xfbebf003
+ .4byte 0x21d801ed
+ .4byte 0x20000049
+ .4byte 0x1c2b22a8
+ .4byte 0xfc47f004
+ .4byte 0x004921e0
+ .4byte 0x22a82001
+ .4byte 0xf0041c2b
+ .4byte 0x21d4fc47
+ .4byte 0x20020049
+ .4byte 0x1c2b2298
+ .4byte 0xfc47f004
+ .4byte 0x004921e5
+ .4byte 0x22982003
+ .4byte 0xf0041c2b
+ .4byte 0xe21dfc47
+ .4byte 0xd00f2f00
+ .4byte 0x200d2101
+ .4byte 0xfaa7f006
+ .4byte 0xf006200d
+ .4byte 0x23c0fa73
+ .4byte 0x80c3019b
+ .4byte 0xf006200d
+ .4byte 0x2380fa73
+ .4byte 0x6183025b
+ .4byte 0x200e2101
+ .4byte 0xfaa7f006
+ .4byte 0xf006200e
+ .4byte 0x23a0fa73
+ .4byte 0x469801db
+ .4byte 0x80c24642
+ .4byte 0x200f2101
+ .4byte 0xfaa7f006
+ .4byte 0xf006200f
+ .4byte 0x23c0fa73
+ .4byte 0x469a019b
+ .4byte 0x80c24652
+ .4byte 0xf006200f
+ .4byte 0x2580fa73
+ .4byte 0x2101026d
+ .4byte 0x20106185
+ .4byte 0xfaa7f006
+ .4byte 0xf0062010
+ .4byte 0x4643fa73
+ .4byte 0x210180c3
+ .4byte 0xf0062011
+ .4byte 0x2011faa7
+ .4byte 0xfa73f006
+ .4byte 0x80c24652
+ .4byte 0xf0062011
+ .4byte 0x21cdfa73
+ .4byte 0x618522ae
+ .4byte 0x201c0449
+ .4byte 0xf0060412
+ .4byte 0x21ebfaa3
+ .4byte 0x201d22ae
+ .4byte 0x04120449
+ .4byte 0xfaa3f006
+ .4byte 0x22ce21cd
+ .4byte 0x0449201e
+ .4byte 0xf0060412
+ .4byte 0x21ebfaa3
+ .4byte 0x201f22ce
+ .4byte 0x04120449
+ .4byte 0xfaa3f006
+ .4byte 0x228f21cd
+ .4byte 0x04492020
+ .4byte 0xf0060452
+ .4byte 0x21ebfaa3
+ .4byte 0x2021228f
+ .4byte 0x04520449
+ .4byte 0xfaa3f006
+ .4byte 0x229e21cd
+ .4byte 0x04492022
+ .4byte 0xf0060452
+ .4byte 0x21ebfaa3
+ .4byte 0x2023229e
+ .4byte 0x04520449
+ .4byte 0xfaa3f006
+ .4byte 0xf0062001
+ .4byte 0x2f00fa0f
+ .4byte 0x21b0d005
+ .4byte 0x0209200d
+ .4byte 0xf0062200
+ .4byte 0x21d0fae7
+ .4byte 0x0209200e
+ .4byte 0xf0062200
+ .4byte 0x21b0fae7
+ .4byte 0x0209200f
+ .4byte 0xf0062200
+ .4byte 0x21d0fae7
+ .4byte 0x02092010
+ .4byte 0xf0062200
+ .4byte 0x21b0fae7
+ .4byte 0x20110209
+ .4byte 0xfc3ff004
+ .4byte 0x1c38e17c
+ .4byte 0xfa73f006
+ .4byte 0x1c052101
+ .4byte 0xf0061c38
+ .4byte 0x2e00faa7
+ .4byte 0x23c0d002
+ .4byte 0xe001019b
+ .4byte 0x01db23a0
+ .4byte 0x238080eb
+ .4byte 0x61ab025b
+ .4byte 0x2009e168
+ .4byte 0x22002100
+ .4byte 0xfaa3f006
+ .4byte 0x2100200c
+ .4byte 0xf0062200
+ .4byte 0x200bfaa3
+ .4byte 0x22002100
+ .4byte 0xfaa3f006
+ .4byte 0x2100200d
+ .4byte 0xf0062200
+ .4byte 0x200afaa3
+ .4byte 0x0000e00c
+ .4byte 0x0200c904
+ .4byte 0xffff0000
+ .4byte 0x03001ebc
+ .4byte 0x2100200e
+ .4byte 0xf0062200
+ .4byte 0x200dfaa3
+ .4byte 0x22002100
+ .4byte 0xfaa3f006
+ .4byte 0x2018e140
+ .4byte 0x22002101
+ .4byte 0xfc73f004
+ .4byte 0x21002009
+ .4byte 0xf0062200
+ .4byte 0x200afaa3
+ .4byte 0x22002100
+ .4byte 0xfaa3f006
+ .4byte 0x23d021de
+ .4byte 0x4a9b0049
+ .4byte 0x021b2008
+ .4byte 0xfc47f004
+ .4byte 0x21002000
+ .4byte 0xf0062200
+ .4byte 0x2f00faa3
+ .4byte 0xf004d001
+ .4byte 0x20e0fae7
+ .4byte 0x229c2180
+ .4byte 0x03890440
+ .4byte 0x4b920492
+ .4byte 0xfc55f004
+ .4byte 0xd1002e00
+ .4byte 0x4b90e114
+ .4byte 0x681b22e0
+ .4byte 0x189b0052
+ .4byte 0x601a3242
+ .4byte 0xfb17f006
+ .4byte 0xfb1ff006
+ .4byte 0xf0062014
+ .4byte 0xe105fa5f
+ .4byte 0x21002008
+ .4byte 0xf0062200
+ .4byte 0x2009faa3
+ .4byte 0x22002100
+ .4byte 0xfaa3f006
+ .4byte 0x229821db
+ .4byte 0x0449201b
+ .4byte 0xf0060412
+ .4byte 0xe0f3faa3
+ .4byte 0x1c282500
+ .4byte 0x2100301c
+ .4byte 0x35012200
+ .4byte 0xfaa3f006
+ .4byte 0xd9f62d07
+ .4byte 0x2285e0e8
+ .4byte 0x009223b0
+ .4byte 0x200c021b
+ .4byte 0x25f52198
+ .4byte 0xfc47f004
+ .4byte 0x23c0006d
+ .4byte 0x1c2a019b
+ .4byte 0x21862008
+ .4byte 0xf0044698
+ .4byte 0x23a0fc47
+ .4byte 0x20091c2a
+ .4byte 0x01db21a6
+ .4byte 0xfc47f004
+ .4byte 0x23a0350e
+ .4byte 0x21b6200a
+ .4byte 0x01db1c2a
+ .4byte 0xfc47f004
+ .4byte 0x2176200b
+ .4byte 0x46431c2a
+ .4byte 0xfc47f004
+ .4byte 0x200e2700
+ .4byte 0xe58a2600
+ .4byte 0x22a421d0
+ .4byte 0x00520049
+ .4byte 0x23002008
+ .4byte 0xfc47f004
+ .4byte 0x005222e0
+ .4byte 0x23d04692
+ .4byte 0x3a60021b
+ .4byte 0x46512009
+ .4byte 0xf0044699
+ .4byte 0x22c0fc47
+ .4byte 0x46900192
+ .4byte 0x004921e3
+ .4byte 0x22f8200a
+ .4byte 0x25cc4643
+ .4byte 0xfc47f004
+ .4byte 0x2291006d
+ .4byte 0x00521c29
+ .4byte 0x23001c38
+ .4byte 0xfc47f004
+ .4byte 0x1c2922ab
+ .4byte 0x1c300052
+ .4byte 0xf0042300
+ .4byte 0x21d2fc47
+ .4byte 0x004922b2
+ .4byte 0x200d0052
+ .4byte 0xf004464b
+ .4byte 0x2298fc47
+ .4byte 0x00521c29
+ .4byte 0x2300200e
+ .4byte 0xfc47f004
+ .4byte 0x21d13d1e
+ .4byte 0x200f0049
+ .4byte 0x464b1c2a
+ .4byte 0xfc47f004
+ .4byte 0x228321dc
+ .4byte 0x00520049
+ .4byte 0x46432010
+ .4byte 0xfc47f004
+ .4byte 0x46512011
+ .4byte 0x464b1c2a
+ .4byte 0xfc47f004
+ .4byte 0x1c3de06a
+ .4byte 0xd86742b7
+ .4byte 0x35011c28
+ .4byte 0xfa57f006
+ .4byte 0xd9f942b5
+ .4byte 0x4937e060
+ .4byte 0x20144a37
+ .4byte 0xfc73f004
+ .4byte 0x4a374936
+ .4byte 0xf0042014
+ .4byte 0x2199fc73
+ .4byte 0x4a350109
+ .4byte 0xf0042014
+ .4byte 0x20c0fc73
+ .4byte 0xf0060080
+ .4byte 0x4832fa57
+ .4byte 0xfa57f006
+ .4byte 0xf0064831
+ .4byte 0xe045fa57
+ .4byte 0xf0062001
+ .4byte 0x2017fa0f
+ .4byte 0x22002100
+ .4byte 0xfc73f004
+ .4byte 0x200c492c
+ .4byte 0xfa7ff006
+ .4byte 0x2001e038
+ .4byte 0xfa77f006
+ .4byte 0xf0062002
+ .4byte 0x2003fa77
+ .4byte 0xfa77f006
+ .4byte 0x2001e02e
+ .4byte 0x22012101
+ .4byte 0x42494240
+ .4byte 0x23004252
+ .4byte 0xfafff006
+ .4byte 0xf0062001
+ .4byte 0x2f00fa0f
+ .4byte 0xf006d020
+ .4byte 0x2300fb07
+ .4byte 0x70033055
+ .4byte 0x481ce01a
+ .4byte 0xfa6bf006
+ .4byte 0xf0062001
+ .4byte 0x2f01fa0f
+ .4byte 0x4819d101
+ .4byte 0x2f02e002
+ .4byte 0x4818d106
+ .4byte 0xfa6bf006
+ .4byte 0xf0062001
+ .4byte 0xe007fa0f
+ .4byte 0xd1052f03
+ .4byte 0xf0064814
+ .4byte 0x2001fa6b
+ .2byte 0xf006
+ .2byte 0xfa0f
+.L_02004f5c:
pop {r3, r5, r6}
mov r8, r3
mov r9, r5
mov sl, r6
-.L_0200564a:
- pop {r5, r6}
+ pop {r5, r6, r7}
pop {r0}
bx r0
+ .2byte 0x0000
+ .4byte 0x00000266
.4byte 0x01000001
- .4byte 0x00001e6e
- .4byte 0x00026666
- .4byte 0x00004ccc
- .4byte 0x00019999
- .4byte 0x0000cccc
- .4byte 0x00003333
.4byte 0x03001ebc
- .4byte 0x0200e7f0
- .4byte 0x00009999
- .4byte 0x00001333
+ .4byte 0x0000092c
+ .4byte 0x0000093d
+ .4byte 0x00000917
+ .4byte 0x0000091f
+ .4byte 0x00000998
.4byte 0x00000301
- .2byte 0x0927
+ .4byte 0x00000302
+ .4byte 0x0200e840
+ .4byte 0x0200f2a0
+ .4byte 0x0200f300
+ .4byte 0x0200f360
+ .2byte 0xf3c0
+ .2byte 0x0200
+ push {r5, r6, r7, lr}
+ movs r6, #0
+ movs r7, #8
+.L_02004fae:
+ cmp r1, #0
+ bne.n .L_02004fb4
+ movs r7, #18
+.L_02004fb4:
+ cmp r0, #1
+ beq.n .L_02004fca
+ cmp r0, #1
+ bcc.n .L_02004fc6
+ cmp r0, #2
+ beq.n .L_02004fce
+ cmp r0, #3
+ beq.n .L_02004fd6
+ b.n .L_02004fda
+.L_02004fc6:
+ ldr r6, [pc, #48]
+.L_02004fc8:
+ b.n .L_02004fda
+.L_02004fca:
+ ldr r6, [pc, #48]
+ b.n .L_02004fda
+.L_02004fce:
+ ldr r6, [pc, #48]
+ b.n .L_02004fda
+.L_02004fd2:
+ adds r0, r7, #0
+ b.n .L_02004ff2
+.L_02004fd6:
+ movs r6, #153
+ lsls r6, r6, #4
+.L_02004fda:
+ movs r5, #0
+.L_02004fdc:
+ adds r0, r6, #0
+ bl sub_0200b480
+ cmp r0, #0
+ bne.n .L_02004fd2
+ adds r5, #1
+ adds r6, #1
+ adds r7, #1
+ cmp r5, #8
+ bls.n .L_02004fdc
+ movs r0, #0
+.L_02004ff2:
+ pop {r5, r6, r7}
+ pop {r1}
+ bx r1
+ .4byte 0x0000092c
+ .4byte 0x00000935
+ .2byte 0x0917
.2byte 0x0000
-AlchemyC_02005684:
- .space 0x58
-AlchemyC_020056dc:
- .space 0xa4
-AlchemyC_02005780:
- .space 0x6c
+AlchemyC_02005004:
+ .space 0x34
+AlchemyC_02005038:
+ .space 0x30
+AlchemyC_02005068:
+ .space 0x7c
+AlchemyC_020050e4:
+ .space 0x210
push {r5, r6, lr}
mov r6, sl
- mov r5, r8
+ mov r5, r9
push {r5, r6}
- movs r1, #0
+ mov r6, r8
+ push {r6}
+ movs r6, #222
+ lsls r6, r6, #1
+ movs r2, #150
+ adds r1, r6, #0
+ lsls r2, r2, #1
movs r0, #0
- bl sub_0200a7a2
- movs r1, #0
- adds r6, r0, #0
+ movs r3, #0
+ movs r5, #155
+ bl sub_02009ba2
+ lsls r5, r5, #1
+ movs r1, #229
+ adds r2, r5, #0
+ lsls r1, r1, #1
movs r0, #1
- bl sub_0200a7ac
- movs r1, #0
- mov r8, r0
+ movs r3, #0
+ bl sub_02009bb2
+ movs r2, #165
+ adds r1, r6, #0
+ lsls r2, r2, #1
movs r0, #2
- bl sub_0200a7b6
- mov sl, r0
- bl sub_0200bcdc
- movs r0, #10
- movs r1, #0
- movs r2, #0
- bl sub_0200a106
- movs r0, #17
- movs r1, #0
- movs r2, #0
- bl sub_0200a110
- movs r1, #236
- movs r2, #152
- lsls r2, r2, #16
- movs r0, #8
- lsls r1, r1, #17
- bl sub_0200bd7e
- movs r0, #9
- movs r1, #5
- bl sub_0200bd8e
-.L_02005840:
+ movs r3, #0
+ bl sub_02009bc0
+ movs r2, #216
+ lsls r2, r2, #1
+ mov r9, r2
+ movs r0, #3
+ adds r2, r5, #0
+ mov r1, r9
+ movs r3, #0
+ bl sub_02009bd2
movs r1, #220
- movs r2, #134
- lsls r2, r2, #16
- movs r0, #27
- lsls r1, r1, #17
- bl sub_0200bd94
- movs r1, #15
- movs r0, #27
- bl sub_0200bdec
+ movs r3, #128
+.L_02005348:
+ lsls r1, r1, #1
+ lsls r3, r3, #8
movs r0, #27
- bl sub_0200bd42
- movs r1, #0
- bl sub_0200bce0
- movs r5, #1
- movs r0, #16
- bl sub_02009ed8
- negs r5, r5
- movs r0, #219
- movs r2, #174
- ldr r3, [pc, #944]
- adds r1, r5, #0
- lsls r0, r0, #17
- lsls r2, r2, #16
- bl sub_0200a126
- movs r1, #1
- movs r2, #20
- movs r0, #8
- bl sub_0200a16c
- movs r0, #19
- bl sub_0200beea
- movs r0, #181
- bl sub_0200bef0
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #10
- bl sub_0200bd28
+ movs r2, #134
+ bl sub_02009be2
+ movs r1, #227
+ movs r3, #192
+ lsls r3, r3, #6
+ movs r2, #248
+ lsls r1, r1, #1
movs r0, #10
- bl sub_0200bd66
- adds r1, r5, #0
- ldr r2, [pc, #892]
- adds r0, r5, #0
- bl sub_0200bd38
- movs r0, #80
- bl sub_0200bd76
- movs r0, #181
- bl sub_0200bf1c
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #10
- bl sub_0200bd54
+ mov r8, r3
+ movs r5, #220
+ bl sub_02009bf6
+ movs r6, #1
movs r0, #10
- bl sub_0200bd92
- ldr r2, [pc, #848]
- adds r1, r5, #0
+ movs r1, #6
+ bl sub_0200b8c0
+ lsls r5, r5, #17
+ negs r6, r6
+ movs r2, #154
+ ldr r3, [pc, #724]
+ lsls r2, r2, #17
+ adds r1, r6, #0
adds r0, r5, #0
- bl sub_0200bd64
- movs r0, #63
- bl sub_0200bf42
- movs r0, #141
- lsls r0, r0, #1
- bl sub_0200bd92
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #3
- movs r5, #192
- bl sub_0200bee6
- lsls r5, r5, #7
- movs r0, #40
- bl sub_0200bdbe
- adds r1, r5, #0
- movs r0, #3
- bl sub_0200a186
- ldr r0, [pc, #800]
- bl sub_0200beb4
- movs r1, #0
- movs r2, #40
- movs r0, #3
- bl sub_0200bed6
- movs r0, #27
- bl sub_0200a188
+ bl sub_02009c2e
+ bl sub_0200b9b6
+ bl sub_0200b9ca
+ movs r0, #20
+ bl sub_0200b850
movs r1, #128
movs r0, #0
lsls r1, r1, #6
movs r2, #0
- bl sub_0200bef8
+ bl sub_0200b96c
movs r1, #160
movs r0, #1
lsls r1, r1, #8
movs r2, #0
- bl sub_0200bf04
+ bl sub_0200b978
+ movs r1, #160
movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_0200bf0e
- movs r1, #224
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #40
- bl sub_0200bf1a
- adds r1, r5, #0
- movs r0, #0
- movs r2, #0
- bl sub_0200bf24
- movs r1, #224
- movs r0, #1
lsls r1, r1, #8
movs r2, #0
- bl sub_0200bf30
- adds r1, r5, #0
- movs r0, #2
- movs r2, #0
- bl sub_0200bf3a
+ bl sub_0200b984
movs r1, #128
movs r0, #3
- lsls r1, r1, #8
+ lsls r1, r1, #6
movs r2, #40
- bl sub_0200bf46
- movs r1, #224
+ bl sub_0200b990
+ movs r1, #1
+ movs r2, #20
movs r0, #2
- lsls r1, r1, #8
+ bl sub_02009cb2
+ ldr r0, [pc, #644]
+ bl sub_0200b978
+ movs r0, #27
+ bl sub_02009c42
+ movs r2, #192
+ lsls r2, r2, #8
+ mov sl, r2
+ movs r0, #1
movs r2, #0
- bl sub_0200bf52
- movs r1, #128
- movs r2, #60
- movs r0, #2
+ mov r1, sl
+ bl sub_02009cce
+ ldr r0, [pc, #620]
+ ldr r1, [pc, #624]
+ bl sub_0200b9e6
+ movs r2, #176
+ movs r3, #1
+ adds r0, r5, #0
+ adds r1, r6, #0
+ lsls r2, r2, #16
+ bl sub_0200b9fc
+ movs r0, #27
+ ldr r1, [pc, #604]
+ ldr r2, [pc, #608]
+ bl sub_0200b8fe
+ movs r1, #204
+ movs r0, #27
lsls r1, r1, #1
- bl sub_0200bf76
- movs r1, #128
- lsls r1, r1, #6
- movs r0, #2
- bl sub_0200a218
+ movs r2, #134
+ bl sub_0200b942
+ movs r1, #204
+.L_02005416:
+ movs r0, #27
+ lsls r1, r1, #1
+ movs r2, #152
+ bl sub_0200b94e
+ movs r1, #212
+ movs r2, #164
+ movs r0, #27
+ lsls r1, r1, #1
+ bl sub_0200b95a
+ ldr r0, [pc, #560]
+ ldr r1, [pc, #568]
+ bl sub_0200ba2a
+ movs r2, #150
+ movs r3, #1
+ adds r0, r5, #0
+ adds r1, r6, #0
+ lsls r2, r2, #17
+ bl sub_0200ba40
+ movs r1, #212
+ movs r0, #27
+ lsls r1, r1, #1
+ movs r2, #222
+ bl sub_0200b97c
+ movs r1, #212
+ movs r2, #131
+ movs r0, #27
+ lsls r1, r1, #1
+ lsls r2, r2, #1
+ bl sub_0200b98a
+ movs r2, #20
+ movs r0, #27
+ mov r1, r8
+ bl sub_0200ba34
movs r1, #1
+ movs r0, #27
+ bl sub_0200b9ec
+ movs r0, #27
+ bl sub_02009cde
+ movs r2, #20
+.L_02005476:
movs r0, #2
- bl sub_0200bf20
- movs r0, #2
- bl sub_0200a212
- movs r0, #0
- movs r1, #1
- bl sub_0200bf26
- movs r0, #1
movs r1, #1
- bl sub_0200bf2e
+ bl sub_02009d64
+ movs r0, #27
+ movs r1, #3
+ bl sub_0200b9e4
movs r1, #1
+ movs r0, #27
+ bl sub_0200ba0c
+ movs r0, #27
+ bl sub_02009cfe
movs r0, #3
- bl sub_0200bf3e
- movs r0, #10
- bl sub_0200be84
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200bfa0
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200bfac
+ movs r1, #2
+ movs r2, #60
+ bl sub_02009d84
movs r1, #224
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200bfb8
- movs r1, #160
- movs r2, #20
- movs r0, #3
lsls r1, r1, #8
- bl sub_0200bfc4
- movs r1, #0
- movs r0, #27
- bl sub_0200bf94
- movs r0, #27
- bl sub_0200beea
- movs r1, #1
- bl sub_0200be88
- movs r1, #128
- movs r2, #128
- movs r0, #27
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200bf0e
- movs r1, #215
- movs r2, #134
+ movs r0, #1
+ movs r2, #60
+ bl sub_02009d90
+ movs r2, #40
movs r0, #27
- lsls r1, r1, #1
- bl sub_0200bf52
- movs r1, #192
- lsls r1, r1, #6
+ movs r1, #0
+ bl sub_0200ba82
+ movs r0, #27
+ movs r1, #1
+ bl sub_0200ba3a
movs r0, #27
- bl sub_0200a2ac
movs r1, #2
+ bl sub_0200ba12
+ movs r2, #134
movs r0, #27
- bl sub_0200bfac
+ mov r1, r9
+ lsls r2, r2, #1
+ bl sub_0200b9ee
+ movs r1, #226
+ movs r2, #134
+ lsls r2, r2, #1
movs r0, #27
- bl sub_0200a2a6
- adds r0, r6, #0
- movs r1, #1
- bl sub_0200bfba
- mov r0, r8
- movs r1, #1
- bl sub_0200bfc2
- mov r0, sl
- movs r1, #1
- bl sub_0200bfca
- movs r0, #13
- movs r1, #1
- bl sub_0200bfda
- movs r1, #129
- adds r0, r6, #0
- lsls r1, r1, #1
- bl sub_0200c054
- movs r1, #129
- mov r0, r8
lsls r1, r1, #1
- bl sub_0200c05e
- movs r1, #129
- mov r0, sl
- lsls r1, r1, #1
- bl sub_0200c068
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #13
- bl sub_0200c072
- movs r0, #40
- bl sub_0200bf48
- adds r1, r6, #0
- movs r0, #12
- movs r2, #0
- bl sub_0200a37a
- mov r1, r8
- movs r0, #12
- movs r2, #1
- bl sub_0200a384
- mov r1, sl
- movs r0, #12
- movs r2, #0
- bl sub_0200a38e
- movs r0, #11
+ bl sub_0200b9fc
+ movs r0, #27
movs r1, #1
- movs r2, #0
- bl sub_0200a398
- movs r1, #208
- adds r0, r6, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c08c
- movs r1, #176
- mov r0, r8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c098
+ bl sub_0200ba34
movs r1, #208
- mov r0, sl
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c0a4
- movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_0200c0ae
-.L_02005ae0:
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c0ba
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_0200c0c4
- movs r1, #128
- movs r2, #40
- movs r0, #3
lsls r1, r1, #8
- bl sub_0200c0d0
+ movs r0, #27
+ bl sub_02009d6e
movs r0, #27
movs r1, #2
- bl sub_0200c080
+ bl sub_0200ba6e
movs r0, #27
movs r1, #0
- bl sub_0200c0c8
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c0ec
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c0f8
- movs r1, #192
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c104
- movs r1, #192
- movs r0, #3
- lsls r1, r1, #8
movs r2, #20
- bl sub_0200c110
- movs r1, #220
+ bl sub_0200bac0
+ movs r2, #20
+.L_02005504:
+ movs r0, #1
+ mov r1, sl
+ bl sub_02009df2
+ movs r1, #4
movs r0, #27
- lsls r1, r1, #1
- movs r2, #134
- movs r5, #128
- bl sub_0200c07e
- lsls r5, r5, #8
- movs r2, #0
+ bl sub_0200ba72
+ movs r0, #40
+ bl sub_0200b9d8
+ movs r2, #80
movs r0, #27
movs r1, #0
- bl sub_0200c0a2
- adds r1, r5, #0
- movs r0, #1
- bl sub_0200a3e2
+ bl sub_0200bae2
movs r1, #1
- movs r0, #1
- bl sub_0200c0ea
- movs r0, #1
- bl sub_0200a3dc
- movs r2, #0
- movs r0, #2
+ movs r0, #27
+ bl sub_0200baaa
+ movs r0, #20
+ bl sub_0200b9f0
+ movs r1, #3
+ movs r0, #27
+ bl sub_0200ba98
+ movs r0, #10
+ bl sub_0200b9fe
+ movs r1, #160
+ lsls r1, r1, #7
+ movs r0, #27
+ bl sub_02009dc8
movs r1, #0
- bl sub_0200c14a
- adds r1, r5, #0
- movs r0, #3
- bl sub_0200a402
+ movs r0, #27
+ bl sub_0200bb00
movs r0, #0
+ movs r1, #0
+ bl sub_0200ba38
+.L_0200555a:
+ cmp r0, #0
+ bne.n .L_0200556e
+ movs r0, #27
movs r1, #3
- bl sub_0200c0da
- movs r0, #1
- movs r1, #3
- bl sub_0200c0e2
- movs r0, #2
- movs r1, #3
- bl sub_0200c0ea
+ bl sub_0200bac4
+ movs r0, #27
+ bl sub_02009dd6
+ b.n .L_020055ac
+.L_0200556e:
+ movs r1, #4
+ movs r0, #27
+ bl sub_0200bad4
+ ldr r3, [pc, #244]
+ ldr r2, [r3, #0]
+ movs r3, #236
+ lsls r3, r3, #1
+ adds r2, r2, r3
+ ldrh r3, [r2, #0]
+ adds r3, #1
+ strh r3, [r2, #0]
+ movs r0, #27
+ bl sub_02009df6
+ movs r2, #40
movs r0, #3
+ movs r1, #2
+ bl sub_02009e7c
+ movs r0, #27
+ movs r1, #1
+ bl sub_0200bb1c
+ movs r0, #27
movs r1, #3
- bl sub_0200c102
- movs r1, #128
- adds r2, r5, #0
- movs r0, #1
- lsls r1, r1, #9
- bl sub_0200c0a6
- movs r1, #128
- adds r2, r5, #0
+ bl sub_0200baf4
+ movs r0, #27
+ bl sub_02009e16
+.L_020055ac:
+ movs r2, #20
movs r0, #2
- lsls r1, r1, #9
- bl sub_0200c0b2
- movs r1, #128
- adds r2, r5, #0
- movs r0, #3
- lsls r1, r1, #9
- bl sub_0200c0be
- ldr r5, [pc, #100]
+ movs r1, #1
+ bl sub_02009e9c
+ ldr r5, [pc, #184]
movs r0, #1
adds r1, r5, #0
- bl sub_0200c0d0
+ bl sub_0200babe
adds r1, r5, #0
movs r0, #2
- bl sub_0200c0d8
+ bl sub_0200bac6
adds r1, r5, #0
movs r0, #3
- bl sub_0200c0f0
- ldr r0, [pc, #80]
- bl sub_0200c08e
- ldr r2, [pc, #76]
- movs r3, #0
- movs r1, #200
- str r3, [r2, #0]
- lsls r1, r1, #4
- ldr r0, [pc, #72]
- bl sub_0200c01e
+ bl sub_0200bade
+ ldr r0, [pc, #160]
+ ldr r1, [pc, #164]
+ bl sub_0200bbce
+ movs r0, #220
+ movs r1, #1
+ movs r2, #176
+ movs r3, #1
+ lsls r0, r0, #17
+ negs r1, r1
+ lsls r2, r2, #16
+ bl sub_0200bbe8
+ movs r1, #128
+ movs r2, #128
+ movs r0, #0
+ lsls r1, r1, #9
+ lsls r2, r2, #8
+ bl sub_0200baee
+ movs r1, #212
+ movs r2, #136
+ movs r0, #0
+ lsls r1, r1, #1
+ lsls r2, r2, #1
+ bl sub_0200bb34
+ movs r1, #212
+ lsls r1, r1, #1
+ movs r2, #164
+ movs r0, #0
+ bl sub_0200bb38
+ movs r0, #60
+ bl sub_0200bad6
+ ldr r3, [pc, #80]
+ movs r2, #224
+ ldr r3, [r3, #0]
+ lsls r2, r2, #1
+ adds r3, r3, r2
+ adds r2, #73
+ str r2, [r3, #0]
movs r1, #0
movs r2, #0
- movs r0, #23
- bl sub_0200a4e8
- movs r0, #27
- bl sub_0200c0f6
- ldr r0, [pc, #52]
- bl sub_0200c0bc
- ldr r0, [pc, #52]
- bl sub_0200c0c2
- bl sub_0200c0e6
- pop {r3, r5}
+ movs r0, #9
+ bl sub_02009f16
+ ldr r0, [pc, #72]
+ bl sub_0200bae4
+ ldr r0, [pc, #72]
+ bl sub_0200baea
+ movs r0, #4
+ bl sub_0200bc58
+ pop {r3, r5, r6}
mov r8, r3
- mov sl, r5
+ mov r9, r5
+ mov sl, r6
+.L_0200564a:
pop {r5, r6}
pop {r0}
bx r0
.4byte 0x01000001
- .4byte 0x0000e666
- .4byte 0x00001ec1
- .4byte 0x0200e818
- .4byte 0x00000302
- .4byte 0x0200ff84
- .4byte 0x0200dc49
- .4byte 0x0000012f
+ .4byte 0x00001e6e
+ .4byte 0x00026666
+ .4byte 0x00004ccc
+ .4byte 0x00019999
+ .4byte 0x0000cccc
+ .4byte 0x00003333
+ .4byte 0x03001ebc
+ .4byte 0x0200e7f0
+ .4byte 0x00009999
+ .4byte 0x00001333
+ .4byte 0x00000301
.2byte 0x0927
.2byte 0x0000
+AlchemyC_02005684:
+ .space 0x58
+AlchemyC_020056dc:
+ .space 0xa4
+AlchemyC_02005780:
+ .space 0x6c
+AlchemyC_020057ec:
+ .space 0x2f4
+.L_02005ae0:
+ .space 0x168
push {r5, lr}
ldr r5, [pc, #80]
ldr r3, [r5, #0]
@@ -7222,431 +4265,8 @@ AlchemyC_02005780:
.2byte 0x0000
AlchemyC_02005ca4:
.space 0x6c
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r8
- push {r6, r7}
- movs r1, #0
- movs r0, #0
- bl sub_0200acc6
- movs r1, #0
- adds r5, r0, #0
- movs r0, #1
- bl sub_0200acd0
- movs r1, #0
- mov r8, r0
- movs r0, #2
- bl sub_0200acda
- movs r1, #0
- mov sl, r0
- movs r0, #3
- bl sub_0200ace4
- adds r7, r0, #0
- bl sub_0200c20a
- bl sub_020094fa
- movs r0, #10
- movs r1, #0
- movs r2, #0
- bl sub_0200a638
- movs r0, #17
- movs r1, #0
- movs r2, #0
- bl sub_0200a642
- movs r1, #236
- movs r2, #152
- movs r0, #8
- lsls r1, r1, #17
- lsls r2, r2, #16
- bl sub_0200c2b0
- movs r1, #220
- movs r2, #134
- lsls r2, r2, #16
- movs r0, #27
- lsls r1, r1, #17
- bl sub_0200c2be
- movs r1, #15
- movs r0, #27
- bl sub_0200c316
- movs r0, #27
- bl sub_0200c26c
- movs r1, #0
- bl sub_0200c20a
- movs r0, #16
- bl sub_0200a400
- movs r0, #9
- movs r1, #5
- bl sub_0200c2e8
- movs r0, #219
- movs r1, #1
- movs r2, #174
- ldr r3, [pc, #820]
- lsls r0, r0, #17
- negs r1, r1
- lsls r2, r2, #16
- bl sub_0200a656
- movs r2, #20
- movs r0, #8
- movs r1, #1
- bl sub_0200a69c
- movs r1, #0
- movs r0, #27
- bl sub_0200c354
- movs r0, #27
- bl sub_0200c2aa
- movs r1, #1
- bl sub_0200c248
- movs r1, #128
- movs r2, #128
- movs r0, #27
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200c2ce
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #132
- bl sub_0200c312
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #142
- bl sub_0200c31e
- movs r1, #192
- movs r2, #20
- movs r0, #27
- lsls r1, r1, #6
- bl sub_0200c3ca
- movs r1, #2
- movs r0, #27
- bl sub_0200c37a
- ldr r0, [pc, #724]
- bl sub_0200c3b0
- movs r0, #27
- bl sub_0200a67a
- movs r0, #120
- bl sub_0200c2d4
- movs r0, #12
- adds r1, r5, #0
- movs r2, #0
- bl sub_0200a706
- movs r0, #12
- mov r1, r8
- movs r2, #1
- bl sub_0200a710
- movs r0, #12
- mov r1, sl
- movs r2, #0
- bl sub_0200a71a
- movs r0, #12
- adds r1, r7, #0
- movs r2, #1
- bl sub_0200a724
- movs r0, #11
- movs r1, #0
- movs r2, #0
- bl sub_0200a72e
- movs r1, #208
- adds r0, r5, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c422
- movs r1, #176
- mov r0, r8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c42e
- movs r1, #208
- mov r0, sl
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c43a
- movs r1, #176
- adds r0, r7, #0
- lsls r1, r1, #8
- movs r2, #60
- bl sub_0200c446
- ldr r0, [pc, #612]
- movs r6, #0
- bl sub_0200c31e
- cmp r0, #0
- beq.n .L_02005e88
- movs r6, #2
- b.n .L_02005e9e
-.L_02005e88:
- ldr r0, [pc, #600]
- bl sub_0200c32c
- cmp r0, #0
- bne.n .L_02005e9c
- ldr r0, [pc, #596]
- bl sub_0200c336
- cmp r0, #0
- beq.n .L_02005e9e
-.L_02005e9c:
- movs r6, #1
-.L_02005e9e:
- adds r0, r5, #0
- movs r1, #1
- bl sub_0200c424
- cmp r6, #1
- bne.n .L_02005eba
- ldr r3, [pc, #576]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- b.n .L_02005ecc
-.L_02005eba:
- cmp r6, #2
- bne.n .L_02005ece
- ldr r3, [pc, #556]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #2
-.L_02005ecc:
- strh r3, [r2, #0]
-.L_02005ece:
- movs r1, #2
- adds r0, r5, #0
- bl sub_0200c44c
- adds r0, r5, #0
- bl sub_0200a746
- ldr r0, [pc, #528]
- bl sub_0200c488
- movs r1, #4
- movs r0, #27
- bl sub_0200c448
- movs r0, #27
- bl sub_0200a75a
- movs r1, #129
- adds r0, r5, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200c4e2
- movs r1, #129
- mov r0, r8
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200c4ee
- movs r1, #129
- mov r0, sl
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200c4fa
- movs r1, #129
- lsls r1, r1, #1
- movs r2, #60
- adds r0, r7, #0
- bl sub_0200c506
- movs r0, #27
- bl sub_0200a790
- movs r1, #204
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #132
- bl sub_0200c460
- movs r1, #222
- movs r0, #27
- lsls r1, r1, #1
- movs r2, #132
- bl sub_0200c46c
- movs r0, #27
- bl sub_0200c432
- movs r0, #40
- bl sub_0200c408
- cmp r6, #0
- bne.n .L_02005f78
- ldr r0, [pc, #420]
- bl sub_0200c3f2
- cmp r0, #0
- bne.n .L_02005f62
- ldr r0, [pc, #412]
- bl sub_0200c3fc
- cmp r0, #0
- beq.n .L_02005f64
-.L_02005f62:
- movs r6, #3
-.L_02005f64:
- cmp r6, #0
- bne.n .L_02005f78
- ldr r3, [pc, #384]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- b.n .L_02005f9e
-.L_02005f78:
- cmp r6, #1
- bne.n .L_02005f8c
- ldr r3, [pc, #364]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #2
- b.n .L_02005f9e
-.L_02005f8c:
- cmp r6, #2
- bne.n .L_02005fa0
- ldr r3, [pc, #344]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #3
-.L_02005f9e:
- strh r3, [r2, #0]
-.L_02005fa0:
- adds r0, r5, #0
- movs r1, #0
- bl sub_0200a826
- adds r0, r5, #0
- bl sub_0200a818
- movs r1, #128
- movs r2, #128
- adds r0, r5, #0
- lsls r2, r2, #8
- lsls r1, r1, #9
- bl sub_0200c4b2
- ldr r6, [pc, #316]
- adds r0, r5, #0
- adds r1, r6, #0
- bl sub_0200c4d4
- movs r1, #160
- mov r0, r8
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200c5a0
- mov r0, sl
- movs r1, #0
- movs r2, #0
- bl sub_0200c5aa
- movs r1, #128
- adds r0, r7, #0
- lsls r1, r1, #8
- movs r2, #40
- bl sub_0200c5b6
- movs r1, #208
- mov r0, r8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c5c2
- movs r1, #176
- mov r0, sl
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200c5ce
- movs r1, #160
- adds r0, r7, #0
- lsls r1, r1, #7
- movs r2, #20
- bl sub_0200c5da
- movs r1, #128
- movs r2, #128
- mov r0, r8
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200c510
- movs r1, #128
- movs r2, #128
- mov r0, sl
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200c51e
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #8
- adds r0, r7, #0
- lsls r1, r1, #9
- bl sub_0200c52c
- adds r1, r6, #0
- mov r0, sl
- bl sub_0200c53c
- movs r0, #40
- bl sub_0200c502
- ldr r5, [pc, #184]
- mov r0, r8
- adds r1, r5, #0
- bl sub_0200c55c
- mov r0, r8
- adds r1, r6, #0
- bl sub_0200c554
- adds r0, r7, #0
- adds r1, r5, #0
- bl sub_0200c56c
- adds r0, r7, #0
- adds r1, r6, #0
- bl sub_0200c574
- movs r1, #128
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200c56a
- movs r1, #128
- movs r2, #128
- movs r0, #2
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200c578
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #8
- movs r0, #3
- lsls r1, r1, #9
- bl sub_0200c586
- ldr r5, [pc, #112]
- movs r0, #1
- adds r1, r5, #0
- bl sub_0200c598
-.L_0200609a:
- adds r1, r5, #0
- movs r0, #2
- bl sub_0200c5a0
- adds r1, r5, #0
- movs r0, #3
- bl sub_0200c5b8
- movs r1, #0
- movs r2, #0
- movs r0, #23
- bl sub_0200a99a
- ldr r0, [pc, #80]
- bl sub_0200c568
- movs r0, #138
- lsls r0, r0, #4
- bl sub_0200c568
- ldr r0, [pc, #72]
- bl sub_0200c576
- bl sub_0200c59a
- pop {r3, r5}
- mov r8, r3
- mov sl, r5
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0x01000001
- .4byte 0x00001f29
- .4byte 0x00000934
- .4byte 0x00000933
- .4byte 0x0000092f
- .4byte 0x03001ebc
- .4byte 0x00001f2d
- .4byte 0x0000092c
- .4byte 0x0000092d
- .4byte 0x0200e904
- .4byte 0x0200e938
- .4byte 0x0200e7c8
- .4byte 0x00000927
- .2byte 0x012f
- .2byte 0x0000
+AlchemyC_02005d10:
+ .space 0x400
AlchemyC_02006110:
.space 0x29c
AlchemyC_020063ac:
diff --git a/games/gs1/assets/code/resource_3b9_overlay.s b/games/gs1/assets/code/resource_3b9_overlay.s
index 817b941e9..14d572d38 100644
--- a/games/gs1/assets/code/resource_3b9_overlay.s
+++ b/games/gs1/assets/code/resource_3b9_overlay.s
@@ -2536,742 +2536,10 @@ AlchemyC_02001c5c:
.space 0x10
AlchemyC_02001c6c:
.space 0x68
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r9
- mov r5, r8
- push {r5, r6, r7}
- bl sub_020048d4
- movs r1, #198
- movs r2, #136
- movs r0, #1
- lsls r1, r1, #18
- lsls r2, r2, #16
- bl sub_02004942
- movs r1, #206
- movs r2, #136
- movs r0, #2
- lsls r1, r1, #18
- lsls r2, r2, #16
- bl sub_02004950
- movs r1, #202
- movs r2, #152
- lsls r1, r1, #18
- lsls r2, r2, #16
- movs r0, #3
- bl sub_0200495e
- movs r0, #1
- bl sub_0200489c
- movs r0, #1
- movs r1, #1
- movs r2, #1
- negs r2, r2
- movs r3, #0
- negs r0, r0
- negs r1, r1
- bl sub_02004a06
- movs r0, #0
- movs r1, #0
- bl sub_02004a36
- movs r1, #0
- movs r0, #0
- bl sub_02004a36
- movs r0, #1
- bl sub_02004a4c
- movs r0, #1
- bl sub_020048ca
- ldr r3, [pc, #1016]
- ldr r1, [r3, #0]
- mov r9, r3
- movs r3, #224
- lsls r3, r3, #1
- adds r2, r1, r3
- adds r3, #67
- str r3, [r2, #0]
- subs r3, #59
- adds r2, r1, r3
- movs r3, #1
- str r3, [r2, #0]
- bl sub_02004a76
- bl sub_02004a8a
- movs r0, #0
- movs r1, #0
- bl sub_02004a72
- movs r1, #0
- ldr r0, [pc, #980]
- bl sub_02004a72
- movs r0, #40
- bl sub_02004a88
- movs r0, #80
- bl sub_02004966
- movs r1, #1
- movs r0, #8
- bl sub_020049fe
- movs r0, #20
- bl sub_02004974
- movs r1, #2
- movs r0, #2
- bl sub_02004a0c
- movs r0, #40
- bl sub_02004982
- movs r3, #192
- lsls r3, r3, #6
- mov r8, r3
- movs r0, #8
- mov r1, r8
- bl sub_02003a00
- movs r1, #2
- movs r0, #8
- bl sub_02004a28
- movs r0, #20
- bl sub_0200499e
- movs r0, #128
- movs r1, #0
- lsls r0, r0, #9
- bl sub_02004ac0
- movs r0, #40
- bl sub_02004ad6
- movs r0, #80
- bl sub_020049b4
- movs r1, #128
- movs r2, #0
- movs r0, #2
- lsls r1, r1, #1
- bl sub_02004a98
- movs r1, #1
- movs r0, #2
- bl sub_02004a58
- movs r0, #20
- bl sub_020049ce
- ldr r0, [pc, #860]
- bl sub_02004a7c
- movs r0, #2
- bl sub_02003a36
- movs r1, #3
- movs r0, #8
- bl sub_02004a62
- movs r0, #8
- bl sub_02003a44
- movs r1, #129
- lsls r1, r1, #1
- movs r2, #40
- movs r0, #3
- bl sub_02004acc
- movs r0, #3
- bl sub_02003a56
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004ad6
- movs r0, #9
- movs r1, #0
- movs r2, #40
- bl sub_02004ae0
- movs r1, #160
- movs r2, #0
- movs r0, #8
- lsls r1, r1, #7
- bl sub_02004aec
- movs r0, #9
- mov r1, r8
- bl sub_02003a94
- ldr r1, [pc, #780]
- movs r2, #20
- movs r0, #9
- bl sub_02004b06
- movs r0, #9
- bl sub_02003a90
- movs r2, #20
- movs r0, #1
- ldr r1, [pc, #764]
- bl sub_02004b16
- movs r1, #2
- movs r0, #1
- bl sub_02004ace
- movs r0, #1
- bl sub_02003aa8
- movs r1, #129
- movs r2, #40
- lsls r1, r1, #1
- movs r0, #10
- bl sub_02004b30
- movs r0, #10
- bl sub_02003aba
- movs r1, #3
- movs r0, #11
- bl sub_02004ae6
- movs r0, #11
- bl sub_02003ac8
- movs r3, #160
- lsls r3, r3, #8
- mov sl, r3
- movs r0, #2
- mov r1, sl
- bl sub_02003aea
- movs r1, #4
- movs r0, #2
- bl sub_02004b02
- movs r0, #2
- bl sub_02003ae4
- movs r1, #1
- movs r0, #3
- bl sub_02004b20
- movs r0, #3
- bl sub_02003af2
- movs r2, #20
- movs r0, #1
- ldr r1, [pc, #664]
- bl sub_02004b78
- movs r0, #1
- movs r1, #0
- bl sub_02003b18
- movs r5, #192
- movs r1, #2
- movs r0, #1
- lsls r5, r5, #7
- bl sub_02004b3c
- movs r0, #1
- bl sub_02003b16
- adds r1, r5, #0
- movs r0, #0
- bl sub_02003b32
- movs r1, #129
- movs r2, #60
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02004ba6
- movs r0, #2
- movs r1, #1
- bl sub_02004b66
- movs r1, #128
- lsls r1, r1, #8
- movs r0, #2
- bl sub_02003b50
- movs r0, #2
- bl sub_02003b42
- movs r1, #4
- movs r0, #3
- bl sub_02004b5e
- movs r0, #20
- bl sub_02004af4
- movs r6, #128
- movs r0, #3
- bl sub_02003b58
- lsls r6, r6, #6
- movs r0, #1
- movs r1, #1
- bl sub_02004b96
- adds r1, r6, #0
- movs r0, #1
- bl sub_02003b7e
- movs r0, #1
- bl sub_02003b70
- movs r0, #2
- ldr r1, [pc, #536]
- movs r2, #60
- bl sub_02004bf6
- movs r0, #2
- adds r1, r6, #0
- movs r2, #0
- bl sub_02004bf8
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_02004c02
- movs r1, #224
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02004c0e
- movs r1, #129
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02004c22
- movs r1, #129
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02004c2e
- movs r1, #129
- movs r0, #3
- lsls r1, r1, #1
- movs r2, #80
- bl sub_02004c3a
- movs r1, #131
- movs r2, #0
- movs r0, #2
- lsls r1, r1, #1
- movs r7, #192
- lsls r7, r7, #8
- bl sub_02004c4a
- movs r0, #2
- movs r1, #1
- bl sub_02004c0a
- adds r1, r7, #0
- movs r0, #2
- bl sub_02003bf2
- movs r0, #2
- bl sub_02003be4
-.L_02001f9e:
- movs r0, #0
- adds r1, r7, #0
- movs r2, #0
- bl sub_02004c62
- movs r0, #1
- adds r1, r7, #0
- movs r2, #0
- bl sub_02004c6c
- movs r2, #20
- movs r0, #3
- adds r1, r7, #0
- bl sub_02004c76
- movs r0, #8
- mov r1, r8
- bl sub_02003c1e
- movs r1, #3
- movs r0, #8
- bl sub_02004c36
- movs r0, #8
- bl sub_02003c18
-.L_02001fd2:
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02004ca0
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02004cac
- movs r1, #128
- movs r2, #40
- movs r0, #3
- lsls r1, r1, #1
- bl sub_02004cb8
- movs r1, #1
- movs r0, #9
- bl sub_02004c78
- movs r0, #9
- bl sub_02003c4a
- adds r1, r5, #0
- movs r0, #0
- movs r2, #0
- bl sub_02004cc8
- movs r1, #224
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004cd4
- adds r1, r5, #0
- movs r0, #2
- movs r2, #0
- bl sub_02004cde
- movs r1, #224
- movs r2, #40
- movs r0, #3
- lsls r1, r1, #8
- bl sub_02004cea
- movs r1, #1
- movs r0, #10
- bl sub_02004cb2
- movs r0, #10
- bl sub_02003c84
- movs r0, #0
- adds r1, r7, #0
- movs r2, #0
- bl sub_02004d02
- movs r0, #1
- adds r1, r7, #0
- movs r2, #0
- bl sub_02004d0c
- movs r2, #0
- movs r0, #2
- adds r1, r7, #0
- bl sub_02004d16
- movs r0, #3
- adds r1, r7, #0
- bl sub_02003cbe
- movs r1, #3
- movs r0, #11
- bl sub_02004cd6
- movs r0, #11
- bl sub_02003cb8
- adds r1, r5, #0
- movs r0, #0
- movs r2, #0
- bl sub_02004d36
- movs r1, #224
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004d42
- adds r1, r5, #0
- movs r0, #2
- movs r2, #0
- bl sub_02004d4c
- movs r1, #224
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02004d58
- movs r0, #1
- ldr r1, [pc, #164]
- movs r2, #0
- bl sub_02004d6a
- movs r0, #2
- ldr r1, [pc, #156]
- movs r2, #0
- bl sub_02004d74
- movs r0, #3
- ldr r1, [pc, #144]
- movs r2, #80
- bl sub_02004d7e
- movs r1, #131
- movs r2, #0
- movs r0, #2
- lsls r1, r1, #1
- movs r5, #224
- bl sub_02004d8c
- lsls r5, r5, #8
- movs r0, #2
- movs r1, #1
- bl sub_02004d4e
- adds r1, r5, #0
- movs r0, #2
-.L_020020d8:
- bl sub_02003d36
- movs r0, #2
- bl sub_02003d28
- movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_02004da6
- movs r0, #1
- movs r1, #0
- movs r2, #20
- bl sub_02004db0
- movs r2, #60
- movs r0, #11
- ldr r1, [pc, #84]
- bl sub_02004dc2
- movs r1, #0
- movs r0, #2
- bl sub_02004da2
- movs r0, #0
- adds r1, r6, #0
- movs r2, #0
- bl sub_02004dcc
- adds r1, r5, #0
- movs r0, #1
- movs r2, #0
- bl sub_02004dd6
- movs r0, #2
- mov r1, sl
- movs r2, #0
- bl sub_02004de0
- movs r0, #3
- adds r1, r7, #0
- movs r2, #0
- bl sub_02004dea
- movs r0, #0
-.L_02002132:
- movs r1, #0
- movs r5, #0
- bl sub_02004d3c
- b.n .L_02002154
- .4byte 0x03001ebc
- .4byte 0x00010002
- .4byte 0x000020f8
- .4byte 0x00000105
- .4byte 0x00000103
- .2byte 0x0101
- .2byte 0x0000
-.L_02002154:
- cmp r0, #1
- bne.n .L_02002162
- movs r0, #2
- bl sub_02003da4
- movs r5, #1
- b.n .L_02002188
-.L_02002162:
- mov r3, r9
-.L_02002164:
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #2
-.L_02002174:
- movs r1, #3
- bl sub_02004de4
- movs r0, #2
- adds r1, r7, #0
- bl sub_02003ddc
- movs r0, #2
- bl sub_02003dce
-.L_02002188:
- cmp r5, #0
-.L_0200218a:
- beq.n .L_0200219c
- ldr r3, [pc, #568]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_0200219c:
- movs r1, #128
- movs r0, #8
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004e62
-.L_020021a8:
- movs r0, #9
- movs r1, #0
- movs r2, #0
- bl sub_02004e6c
- movs r1, #192
- movs r0, #10
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02004e78
- movs r1, #176
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #20
- bl sub_02004e84
- movs r0, #8
- ldr r1, [pc, #508]
- movs r2, #0
- bl sub_02004e96
- movs r0, #9
- ldr r1, [pc, #500]
- movs r2, #0
- bl sub_02004ea0
- movs r0, #10
- ldr r1, [pc, #488]
- movs r2, #0
- bl sub_02004eaa
-.L_020021e8:
- movs r5, #192
- movs r2, #60
- movs r0, #11
-.L_020021ee:
- ldr r1, [pc, #476]
- bl sub_02004eb6
- lsls r5, r5, #6
- movs r0, #8
- movs r1, #1
- bl sub_02004e78
- adds r1, r5, #0
-.L_02002200:
- movs r0, #8
- bl sub_02003e60
- movs r0, #8
- bl sub_02003e52
- movs r1, #192
- movs r0, #0
-.L_02002210:
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004ed2
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004ede
- movs r1, #192
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004eea
- movs r1, #192
- movs r2, #20
- movs r0, #3
- lsls r1, r1, #8
- bl sub_02004ef6
- movs r0, #9
- movs r1, #1
- bl sub_02004ebe
- adds r1, r5, #0
- movs r0, #9
- bl sub_02003ea6
- movs r0, #9
- bl sub_02003e98
-.L_02002252:
- movs r0, #10
- movs r1, #1
- bl sub_02004ed4
- movs r1, #160
- lsls r1, r1, #7
- movs r0, #10
- movs r6, #128
- bl sub_02003ec0
- lsls r6, r6, #8
-.L_02002268:
- movs r0, #10
- bl sub_02003eb4
- adds r1, r6, #0
- movs r0, #11
- bl sub_02003ed0
-.L_02002276:
- movs r1, #3
- movs r0, #11
- bl sub_02004ee8
- movs r0, #11
- bl sub_02003eca
- movs r1, #224
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004f4a
- movs r1, #160
- movs r2, #20
-.L_02002294:
- movs r0, #2
- lsls r1, r1, #8
- bl sub_02004f56
- movs r0, #1
- movs r1, #3
- bl sub_02004efe
- movs r0, #2
- movs r1, #3
- bl sub_02004f06
- movs r0, #3
- movs r1, #3
- bl sub_02004f1e
- movs r1, #128
- adds r2, r6, #0
- movs r0, #1
- lsls r1, r1, #9
- bl sub_02004ed2
- movs r1, #128
- adds r2, r6, #0
- movs r0, #2
- lsls r1, r1, #9
- bl sub_02004ede
- movs r1, #128
- adds r2, r6, #0
- movs r0, #3
- lsls r1, r1, #9
- bl sub_02004eea
- ldr r5, [pc, #244]
- movs r0, #1
- adds r1, r5, #0
-.L_020022de:
- bl sub_02004efc
- adds r1, r5, #0
- movs r0, #2
- bl sub_02004f04
- adds r1, r5, #0
-.L_020022ec:
- movs r0, #3
- bl sub_02004f1c
- movs r0, #20
- bl sub_02004ee2
- movs r0, #0
- movs r1, #0
- bl sub_02003f5a
- movs r0, #0
- movs r1, #3
- bl sub_02004f72
- movs r0, #11
-.L_0200230a:
- movs r1, #3
- bl sub_02004f7a
- movs r1, #128
- adds r2, r6, #0
- movs r0, #11
- lsls r1, r1, #9
- bl sub_02004f2e
- movs r1, #128
- adds r2, r6, #0
- movs r0, #0
- lsls r1, r1, #9
- bl sub_02004f3a
- movs r0, #11
- movs r1, #2
- bl sub_02004f8a
- movs r0, #11
- ldr r1, [pc, #160]
- movs r2, #152
- bl sub_02004f74
- movs r1, #202
- movs r0, #11
- lsls r1, r1, #2
- movs r2, #164
- bl sub_02004f80
- movs r1, #202
- movs r2, #156
- lsls r2, r2, #1
- lsls r1, r1, #2
- movs r0, #11
- bl sub_02004f86
- movs r0, #20
- bl sub_02004f44
- ldr r0, [pc, #124]
- ldr r1, [pc, #124]
- bl sub_0200503c
- movs r0, #202
- movs r1, #1
- movs r2, #156
- movs r3, #1
- lsls r0, r0, #18
- negs r1, r1
- lsls r2, r2, #17
- bl sub_02005056
- movs r1, #202
- movs r0, #0
- lsls r1, r1, #2
- movs r2, #164
- bl sub_02004fca
- movs r1, #202
- movs r2, #156
- lsls r1, r1, #2
- lsls r2, r2, #1
- movs r0, #0
- bl sub_02004fd0
- movs r0, #60
- bl sub_02004f7e
- ldr r3, [pc, #48]
- ldr r1, [r3, #0]
- movs r3, #224
- lsls r3, r3, #1
- adds r2, r1, r3
- subs r3, #192
- str r3, [r2, #0]
- adds r3, #200
- adds r2, r1, r3
- movs r3, #40
- str r3, [r2, #0]
- bl sub_020050d0
- bl sub_020050dc
+AlchemyC_02001cd4:
+ .space 0x6de
.L_020023b2:
- movs r0, #64
- bl sub_020050b2
- pop {r3, r5, r6}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x03001ebc
- .4byte 0x00000105
- .4byte 0x0200adac
- .4byte 0x0000033e
- .4byte 0x00006666
- .2byte 0x0ccc
- .2byte 0x0000
+ .space 0x2e
AlchemyC_020023e0:
.space 0x30
.L_02002410:
diff --git a/games/gs1/assets/code/resource_3ba_overlay.s b/games/gs1/assets/code/resource_3ba_overlay.s
index b307ab9b2..895ccfb2b 100644
--- a/games/gs1/assets/code/resource_3ba_overlay.s
+++ b/games/gs1/assets/code/resource_3ba_overlay.s
@@ -1573,195 +1573,8 @@ AlchemyC_02000a10:
.2byte 0x0200
AlchemyC_02000db8:
.space 0x45c
- push {r5, r6, r7, lr}
- ldr r3, [pc, #448]
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r3, r2
- movs r2, #0
- ldrsh r3, [r3, r2]
- adds r6, r0, #0
- cmp r3, #2
- bne.n .L_0200122e
- bl .L_02002d86
- b.n .L_020013d0
-.L_0200122e:
- bl sub_02004ed0
- adds r0, r6, #0
- movs r1, #1
- bl sub_02002f9c
- adds r7, r0, #0
- cmp r7, #0
- beq.n .L_02001242
- b.n .L_020013b0
-.L_02001242:
- ldr r0, [pc, #408]
- bl sub_02004f76
- movs r0, #192
- movs r1, #192
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_02004fc2
- movs r0, #164
- movs r1, #1
- movs r2, #168
- movs r3, #1
- lsls r2, r2, #16
- lsls r0, r0, #17
- negs r1, r1
- bl sub_02004fdc
- bl sub_02004fe8
- adds r0, r6, #0
- movs r1, #0
- bl sub_02004fb0
- movs r1, #140
- lsls r1, r1, #1
- movs r2, #200
- movs r0, #0
- bl sub_02003b8c
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02004f52
- movs r1, #180
- lsls r1, r1, #1
- movs r2, #200
- movs r0, #0
- bl sub_02004f7e
- movs r0, #30
- bl sub_02004f34
- movs r1, #129
- movs r2, #60
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02005008
- adds r0, r6, #0
- movs r1, #0
- bl sub_02004ff0
- movs r1, #156
- lsls r1, r1, #1
- movs r2, #200
- movs r0, #0
- bl sub_02004fa4
- movs r0, #30
- bl sub_02004f5a
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #10
- bl sub_0200501e
- movs r1, #131
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #60
- bl sub_0200503a
- movs r5, #148
- movs r1, #192
- movs r2, #192
- lsls r5, r5, #1
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02004fb4
- adds r1, r5, #0
- movs r2, #184
- movs r0, #0
- bl sub_02004146
- adds r1, r5, #0
- movs r2, #152
- movs r0, #0
- bl sub_02004150
- movs r1, #156
- lsls r1, r1, #1
- movs r2, #152
- movs r0, #0
- bl sub_0200415c
- movs r1, #128
- lsls r1, r1, #7
- movs r2, #15
- movs r0, #0
- bl sub_02005068
- bl sub_02004c14
- movs r0, #0
- bl sub_02003ece
- bl sub_02004c1e
- movs r0, #0
- bl sub_02003ed8
- movs r1, #192
- movs r2, #192
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02005002
- movs r1, #152
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #184
- bl sub_0200502e
- movs r0, #0
- adds r1, r5, #0
- movs r2, #192
- bl sub_02005038
- movs r0, #0
- adds r1, r5, #0
- movs r2, #200
- bl sub_02005042
- movs r2, #15
- movs r1, #0
- movs r0, #0
- bl sub_020050b4
- bl sub_02004c60
- movs r0, #0
- bl sub_02003f1a
- bl sub_02004c6a
- movs r0, #0
- bl sub_02003f24
- movs r0, #0
- movs r1, #1
- bl sub_02005080
- movs r1, #0
- adds r0, r6, #0
- bl sub_020050c8
- movs r0, #0
- bl sub_02003e7a
- movs r0, #0
- movs r1, #0
- bl sub_020050fe
- movs r1, #156
- movs r2, #168
- movs r0, #9
- lsls r1, r1, #17
- lsls r2, r2, #16
- bl sub_0200509c
- adds r0, r6, #0
- movs r1, #1
- bl .L_020031cc
- b.n .L_020013c2
-.L_020013b0:
- cmp r7, #1
- bne.n .L_020013c2
- ldr r0, [pc, #40]
- bl sub_020050e8
- adds r0, r6, #0
- movs r1, #0
- bl sub_02005100
-.L_020013c2:
- adds r1, r6, #0
- movs r2, #1
- adds r0, r7, #0
- bl .L_02003246
- bl sub_02005076
-.L_020013d0:
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x02000240
- .4byte 0x0000208c
- .2byte 0x208b
- .2byte 0x0000
+AlchemyC_02001214:
+ .space 0x1d0
push {r5, r6, r7, lr}
mov r7, sl
mov r6, r8
@@ -1972,184 +1785,8 @@ AlchemyC_02000db8:
.2byte 0x0000
AlchemyC_020015e0:
.space 0x10c
- push {r5, r6, r7, lr}
- ldr r3, [pc, #412]
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r3, r2
- movs r2, #0
- ldrsh r3, [r3, r2]
- adds r6, r0, #0
- cmp r3, #2
- bne.n .L_02001706
- bl .L_0200325e
- b.n .L_02001884
-.L_02001706:
- bl sub_020053a8
- adds r0, r6, #0
- movs r1, #4
- bl .L_02003474
- adds r7, r0, #0
- cmp r7, #0
- beq.n .L_0200171a
- b.n .L_02001864
-.L_0200171a:
- ldr r0, [pc, #372]
- bl sub_0200544e
- movs r0, #192
- movs r1, #192
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_0200549a
- movs r0, #136
- movs r1, #1
- movs r2, #168
- movs r3, #1
- lsls r2, r2, #16
- lsls r0, r0, #19
- negs r1, r1
- bl sub_020054b4
- bl sub_020054c0
- adds r0, r6, #0
- movs r1, #0
- bl sub_02005488
- movs r2, #0
- movs r1, #72
- movs r0, #120
- bl sub_0200447a
- movs r1, #0
- adds r0, r6, #0
- bl sub_0200549a
- bl sub_02004546
- movs r0, #15
- bl sub_020053fc
- movs r1, #246
- lsls r1, r1, #2
- movs r2, #200
- movs r0, #0
- bl sub_02004080
- movs r2, #10
- movs r0, #0
- movs r1, #0
- bl sub_020054ca
- adds r0, r6, #0
- movs r1, #0
- bl sub_020054c2
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #30
- bl sub_020054de
- movs r1, #131
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #60
- bl sub_020054fa
- movs r5, #250
- movs r1, #192
- movs r2, #192
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- lsls r5, r5, #2
- bl sub_02005474
- adds r1, r5, #0
- movs r2, #192
- movs r0, #0
- bl sub_02004606
- adds r1, r5, #0
- movs r2, #176
- movs r0, #0
- bl sub_02004610
- movs r1, #254
- lsls r1, r1, #2
- movs r2, #168
- movs r0, #0
- bl sub_0200461c
- movs r0, #15
- bl sub_0200546a
- movs r1, #160
- movs r2, #0
- movs r0, #18
- bl .L_02001b18
- movs r0, #136
- movs r1, #1
-.L_020017e2:
- movs r2, #168
- movs r3, #1
- lsls r2, r2, #16
- lsls r0, r0, #19
- negs r1, r1
- bl sub_02005566
- movs r1, #1
- movs r0, #0
- bl sub_020054f6
- movs r0, #10
- bl sub_02005494
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020054d2
- movs r1, #149
- lsls r1, r1, #3
- movs r2, #168
- movs r0, #0
- bl sub_020054fe
- movs r0, #10
- bl sub_020054b4
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #30
- bl sub_02005578
- movs r1, #129
- movs r2, #60
- movs r0, #0
- lsls r1, r1, #1
- bl sub_02005594
- movs r1, #0
- adds r0, r6, #0
- bl sub_0200557c
- movs r0, #0
- bl sub_0200432e
- movs r0, #0
- movs r1, #0
- bl sub_020055b2
- movs r1, #254
- movs r2, #168
- movs r0, #18
- lsls r1, r1, #18
- lsls r2, r2, #16
- bl sub_02005550
- adds r0, r6, #0
- movs r1, #4
- bl .L_02003680
- b.n .L_02001876
-.L_02001864:
- cmp r7, #1
- bne.n .L_02001876
- ldr r0, [pc, #40]
- bl sub_0200559c
- adds r0, r6, #0
- movs r1, #0
- bl sub_020055b4
-.L_02001876:
- adds r1, r6, #0
- movs r2, #4
- adds r0, r7, #0
- bl .L_020036fa
- bl sub_0200552a
-.L_02001884:
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x02000240
- .4byte 0x00002099
- .2byte 0x2098
- .2byte 0x0000
+AlchemyC_020016ec:
+ .space 0x1ac
AlchemyC_02001898:
.space 0x78
push {r5, lr}
@@ -3075,89 +2712,8 @@ AlchemyC_020026a8:
.2byte 0x0000
AlchemyC_02002738:
.space 0x10c
- push {r5, r6, lr}
- adds r5, r0, #0
- movs r0, #247
- bl sub_02006644
- bl sub_02006600
- bl sub_02006614
- lsls r3, r5, #4
- ldr r2, [pc, #164]
- subs r3, r3, r5
- lsls r6, r3, #2
- strh r6, [r2, #26]
- ldr r1, [pc, #160]
- adds r2, r5, #0
- cmp r5, #0
- bge.n .L_0200286a
- negs r2, r5
-.L_0200286a:
- lsls r3, r2, #4
- subs r3, r3, r2
- lsls r3, r3, #2
- strh r3, [r1, #26]
- cmp r5, #0
- bge.n .L_020028a0
- movs r0, #30
- bl sub_02006512
- movs r0, #86
- bl sub_02006678
- movs r0, #8
- bl sub_020049aa
- movs r1, #1
- movs r0, #3
- bl sub_02004f36
- lsls r0, r5, #4
- subs r0, r5, r0
- lsls r0, r0, #2
- adds r0, #60
- bl sub_02006532
- movs r0, #0
- b.n .L_020028c6
-.L_020028a0:
- movs r0, #30
- bl sub_0200653c
- adds r0, r5, #0
- adds r0, #90
- bl sub_020066a4
- movs r0, #4
- bl sub_020049d6
- movs r1, #0
- movs r0, #3
- bl sub_02004f62
- adds r0, r6, #0
- adds r0, #60
- bl sub_0200655a
- movs r0, #8
-.L_020028c6:
- ldr r1, [pc, #64]
- movs r2, #0
- bl sub_0200662c
- b.n .L_020028d6
-.L_020028d0:
- movs r0, #1
- bl sub_020063dc
-.L_020028d6:
- bl sub_020066d8
- cmp r0, #0
- bne.n .L_020028d0
- movs r0, #19
- bl sub_020066da
- movs r0, #30
- bl sub_02006580
- ldr r0, [pc, #32]
- bl sub_020066e6
- bl sub_020066aa
- bl sub_020066b6
- pop {r5, r6}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x0200c628
- .4byte 0x0200be76
- .4byte 0x00000105
- .2byte 0x0121
- .2byte 0x0000
+AlchemyC_02002844:
+ .space 0xcc
push {r5, r6, r7, lr}
mov r7, fp
mov r6, sl
diff --git a/games/gs1/assets/code/resource_3bb_overlay.s b/games/gs1/assets/code/resource_3bb_overlay.s
index 7f0d24c55..7bfb17046 100644
--- a/games/gs1/assets/code/resource_3bb_overlay.s
+++ b/games/gs1/assets/code/resource_3bb_overlay.s
@@ -2169,195 +2169,8 @@ AlchemyC_02001424:
.space 0x114
AlchemyC_02001538:
.space 0x19c
- push {r5, r6, r7, lr}
- ldr r3, [pc, #436]
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r3, r2
- movs r2, #0
- ldrsh r3, [r3, r2]
- adds r6, r0, #0
- cmp r3, #2
- bne.n .L_020016ee
- bl .L_020034de
- b.n .L_02001884
-.L_020016ee:
- bl sub_02005628
- adds r0, r6, #0
- movs r1, #4
- bl .L_020036f4
- adds r7, r0, #0
- cmp r7, #0
- beq.n .L_02001702
- b.n .L_02001864
-.L_02001702:
- ldr r0, [pc, #396]
- bl sub_020056d6
- movs r0, #192
- movs r1, #192
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_0200572a
- movs r0, #134
- movs r1, #1
- movs r2, #240
- lsls r2, r2, #16
- movs r3, #1
- negs r1, r1
- lsls r0, r0, #18
- bl sub_02005744
- bl sub_02005750
- movs r0, #45
- bl sub_0200565e
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #9
- lsls r1, r1, #6
- bl sub_02005752
- movs r0, #134
- movs r1, #1
- movs r2, #192
- movs r3, #1
- lsls r2, r2, #16
- lsls r0, r0, #18
- negs r1, r1
- bl sub_0200576c
- movs r5, #132
- bl sub_0200577a
- adds r0, r6, #0
- movs r1, #0
- bl sub_0200573a
- lsls r5, r5, #1
- movs r1, #158
- lsls r1, r1, #2
- adds r2, r5, #0
- movs r0, #0
- bl sub_02004310
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020056d6
- movs r1, #154
- movs r0, #0
- lsls r1, r1, #2
- adds r2, r5, #0
- bl sub_02005702
- movs r1, #192
- movs r2, #20
- lsls r1, r1, #8
- movs r0, #0
- bl sub_0200577e
- bl sub_020057ea
- movs r0, #128
- movs r1, #128
- lsls r0, r0, #7
- lsls r1, r1, #4
- bl sub_020057b6
- movs r0, #134
- movs r1, #1
- movs r2, #160
- movs r3, #1
- lsls r0, r0, #18
- negs r1, r1
- lsls r2, r2, #16
- bl sub_020057d0
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #7
- movs r0, #0
- lsls r1, r1, #8
- bl sub_0200571e
- movs r1, #10
- movs r0, #0
- bl sub_0200575e
- movs r0, #0
- bl sub_0200571c
- movs r3, #128
- ldr r2, [r0, #12]
- lsls r3, r3, #15
- ldr r1, [r0, #8]
- adds r2, r2, r3
- ldr r3, [r0, #16]
- bl sub_02005654
- movs r0, #0
- bl sub_0200576a
- bl sub_0200583e
- movs r0, #1
- movs r1, #1
- movs r2, #1
- movs r3, #0
- negs r2, r2
- negs r0, r0
- negs r1, r1
- bl sub_02005818
- adds r0, r6, #0
- movs r1, #0
- bl sub_020057e0
- movs r1, #192
- movs r2, #192
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200576e
- movs r1, #244
- lsls r1, r1, #1
- movs r2, #248
- movs r0, #0
- bl sub_02004902
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #7
- movs r2, #20
- bl sub_02005816
- movs r0, #0
- movs r1, #6
- movs r2, #0
- bl sub_020057e0
- movs r0, #134
- movs r1, #1
- movs r2, #160
- lsls r2, r2, #16
- movs r3, #1
- lsls r0, r0, #18
- negs r1, r1
- bl sub_02005862
- movs r1, #0
- adds r0, r6, #0
- bl sub_0200582a
- movs r0, #0
- bl sub_020045d4
- movs r0, #0
- movs r1, #0
- bl sub_02005868
- adds r0, r6, #0
- movs r1, #4
- bl .L_02003918
- b.n .L_02001876
-.L_02001864:
- cmp r7, #1
- bne.n .L_02001876
- ldr r0, [pc, #40]
- bl sub_0200583c
- adds r0, r6, #0
- movs r1, #0
- bl sub_02005854
-.L_02001876:
- adds r1, r6, #0
- movs r2, #4
- adds r0, r7, #0
- bl .L_02003992
- bl sub_020057c2
-.L_02001884:
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x02000240
- .4byte 0x000020aa
- .2byte 0x20a9
- .2byte 0x0000
+AlchemyC_020016d4:
+ .space 0x1c4
push {r5, r6, r7, lr}
mov r7, fp
mov r6, sl
diff --git a/games/gs1/assets/code/resource_3bc_overlay.s b/games/gs1/assets/code/resource_3bc_overlay.s
index a006a6e67..48cba7ff4 100644
--- a/games/gs1/assets/code/resource_3bc_overlay.s
+++ b/games/gs1/assets/code/resource_3bc_overlay.s
@@ -1213,117 +1213,8 @@ AlchemyC_02000ba0:
.2byte 0x0000
AlchemyC_02000ba4:
.space 0xb8
- push {r5, r6, lr}
- bl sub_02004920
- bl sub_02005664
- movs r1, #17
- movs r0, #3
- bl sub_02004a48
- adds r6, r0, #0
- bl sub_02004942
- movs r5, #9
-.L_02000c76:
- movs r0, #8
- subs r5, #1
- bl sub_020056b4
- cmp r5, #0
- bge.n .L_02000c76
- movs r1, #128
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020056b6
- movs r1, #191
- movs r0, #8
- lsls r1, r1, #3
- movs r2, #192
- bl sub_020056e2
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020056d0
- movs r1, #187
- movs r2, #192
- movs r0, #0
- lsls r1, r1, #3
- bl sub_02005704
- movs r0, #8
- movs r1, #1
- bl sub_0200572c
- movs r2, #0
- movs r1, #8
- movs r0, #0
- bl sub_02005766
- movs r0, #10
- bl sub_020056c4
- movs r0, #8
- movs r1, #3
- bl sub_02005744
- movs r1, #3
- movs r0, #0
- bl sub_02005754
- movs r0, #20
- bl sub_020056da
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_02005718
- movs r1, #128
- movs r2, #128
- movs r0, #8
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_02005726
- movs r1, #188
- movs r0, #0
- lsls r1, r1, #3
- movs r2, #192
- bl sub_02005752
- movs r1, #190
- movs r2, #192
- movs r0, #8
- lsls r1, r1, #3
- bl sub_02005766
- movs r0, #0
- movs r1, #16
- bl sub_0200578e
- movs r1, #9
- movs r0, #8
- bl sub_02005796
- movs r0, #10
- bl sub_02005724
- movs r1, #4
- subs r1, r1, r6
- adds r1, #1
- movs r0, #72
- bl sub_02005850
- ldr r3, [pc, #40]
- ldr r2, [pc, #40]
- adds r3, r3, r2
- movs r2, #3
- strb r2, [r3, #0]
- ldr r5, [pc, #36]
- movs r1, #4
- adds r0, r5, #0
- bl sub_0200586c
- adds r0, r5, #0
- movs r1, #5
- bl sub_0200587c
- movs r0, #141
- lsls r0, r0, #1
- bl sub_02005714
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x02000240
- .4byte 0x0000022b
- .2byte 0x0091
- .2byte 0x0000
+AlchemyC_02000c5c:
+ .space 0x114
AlchemyC_02000d70:
.space 0x12
.2byte 0x0000
@@ -1950,223 +1841,8 @@ AlchemyC_020013c0:
.space 0xb4
AlchemyC_02001474:
.space 0x598
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r9
- mov r5, r8
- push {r5, r6, r7}
- adds r7, r0, #0
- bl sub_02006432
- movs r3, #10
- ldrsh r2, [r0, r3]
- mov r9, r2
- movs r3, #18
- ldrsh r2, [r0, r3]
- mov sl, r2
- bl sub_0200642a
- movs r1, #128
- movs r2, #128
- adds r0, r7, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02006460
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200646e
- movs r1, #128
- movs r2, #128
- movs r0, #1
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200647c
- movs r1, #128
- movs r2, #128
- movs r0, #2
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200648a
- movs r1, #128
- movs r2, #128
- movs r0, #3
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02006498
- mov r3, sl
- lsls r5, r3, #16
- mov r2, r9
- ldr r3, [pc, #396]
- lsls r6, r2, #16
- adds r1, r6, #0
- adds r2, r5, r3
- movs r0, #0
- bl sub_020064ec
- ldr r3, [pc, #388]
- ldr r2, [pc, #388]
- adds r3, r3, r5
- mov r8, r3
- adds r1, r6, r2
- movs r0, #1
- mov r2, r8
- bl sub_020064fe
- movs r2, #128
- lsls r2, r2, #13
- adds r1, r6, r2
- movs r0, #2
- mov r2, r8
- bl sub_0200650c
- ldr r3, [pc, #364]
- adds r1, r6, #0
- adds r2, r5, r3
- movs r0, #3
- bl sub_02006518
- ldr r2, [pc, #356]
- adds r5, r5, r2
- adds r2, r5, #0
- adds r1, r6, #0
- adds r0, r7, #0
- bl sub_02006526
- movs r0, #0
- bl sub_020064dc
- movs r6, #192
- lsls r6, r6, #8
- movs r1, #0
- strh r6, [r0, #6]
- movs r0, #0
- bl sub_020065c2
- bl sub_02006626
- bl sub_0200663a
- ldr r0, [pc, #316]
- bl sub_02006590
- adds r0, r7, #0
- movs r1, #3
- bl sub_02006560
- adds r0, r7, #0
- movs r1, #0
- bl sub_020065b0
- adds r0, r7, #0
- movs r1, #2
- bl sub_02006580
- adds r0, r7, #0
- movs r1, #0
- bl sub_020065c0
- adds r0, r7, #0
- movs r1, #2
- bl sub_02006590
- adds r0, r7, #0
- movs r1, #0
- bl sub_020065d0
- adds r0, r7, #0
- movs r1, #2
- bl sub_020065a0
- adds r0, r7, #0
- movs r1, #0
- bl sub_020065e0
- movs r0, #3
- movs r1, #3
- bl sub_02006598
- movs r0, #1
- movs r1, #3
- bl sub_020065a0
- movs r0, #2
- movs r1, #3
- bl sub_020065a8
- movs r1, #3
- movs r0, #0
- bl sub_020065b8
- movs r0, #6
- bl sub_0200653e
- movs r0, #1
- movs r1, #2
- bl sub_020065be
- movs r0, #0
- bl sub_0200656c
- cmp r0, #0
- beq.n .L_02001b68
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_020065a6
-.L_02001b68:
- movs r0, #2
- movs r1, #2
- bl sub_020065de
- movs r0, #0
- bl sub_0200658c
- cmp r0, #0
- beq.n .L_02001b88
- movs r2, #10
- ldrsh r1, [r0, r2]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #2
- bl sub_020065c6
-.L_02001b88:
- movs r0, #3
- movs r1, #2
- bl sub_020065fe
- movs r0, #0
- bl sub_020065ac
- cmp r0, #0
- beq.n .L_02001ba8
- movs r2, #10
- ldrsh r1, [r0, r2]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #3
- bl sub_020065e6
-.L_02001ba8:
- mov r5, r9
- subs r5, #16
- mov r2, sl
- adds r0, r7, #0
- adds r1, r5, #0
- subs r2, #64
- bl sub_02006606
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_02006628
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_02006632
- movs r0, #3
- movs r1, #0
- movs r2, #0
- bl sub_0200663c
- mov r2, sl
- adds r0, r7, #0
- adds r1, r5, #0
- subs r2, #16
- bl sub_02006630
- adds r0, r7, #0
- mov r1, r9
- mov r2, sl
- bl sub_0200663a
- adds r0, r7, #0
- adds r1, r6, #0
- movs r2, #10
- bl sub_020066c4
- bl sub_02006600
- pop {r3, r5, r6}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0xffd00000
- .4byte 0xffd80000
- .4byte 0xfff00000
- .4byte 0xffe00000
- .4byte 0xffb00000
- .2byte 0x20ed
- .2byte 0x0000
+AlchemyC_02001a0c:
+ .space 0x214
push {r5, r6, r7, lr}
mov r7, sl
mov r6, r8
@@ -2360,173 +2036,8 @@ AlchemyC_02001474:
.4byte 0x00006666
.2byte 0x20b1
.2byte 0x0000
- push {r5, r6, r7, lr}
- ldr r3, [pc, #392]
- movs r2, #225
- lsls r2, r2, #1
- adds r3, r3, r2
- movs r2, #0
- ldrsh r3, [r3, r2]
- adds r6, r0, #0
- cmp r3, #2
- bne.n .L_02001e12
- bl .L_0200469a
- b.n .L_02001f7e
-.L_02001e12:
- bl sub_02006814
- adds r0, r6, #0
- movs r1, #2
- bl sub_020048b0
- adds r7, r0, #0
- cmp r7, #0
- beq.n .L_02001e26
- b.n .L_02001f5e
-.L_02001e26:
- ldr r0, [pc, #352]
- bl sub_020068da
- movs r0, #192
- movs r1, #192
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_0200692e
- movs r0, #188
- movs r1, #1
- movs r2, #152
- movs r3, #1
- lsls r2, r2, #16
- negs r1, r1
- lsls r0, r0, #17
- bl sub_02006948
- movs r5, #140
- bl sub_02006956
- movs r0, #30
- bl sub_0200684c
- lsls r5, r5, #1
- adds r0, r6, #0
- movs r1, #0
- bl sub_0200691e
- adds r1, r5, #0
- movs r2, #200
- movs r0, #0
- bl sub_020054a8
- movs r1, #192
- movs r2, #192
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200689e
- adds r1, r5, #0
- movs r2, #152
- movs r0, #0
- bl sub_02005a00
- movs r1, #148
- lsls r1, r1, #1
- movs r2, #152
- movs r0, #0
- bl sub_02005a0c
- movs r0, #10
- bl sub_0200688a
- bl sub_020069c6
- movs r0, #1
- movs r1, #1
- movs r2, #1
- movs r3, #0
- negs r0, r0
- negs r1, r1
- negs r2, r2
- bl sub_020069a8
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #15
- movs r0, #0
- bl sub_02006984
- bl sub_020069e8
- movs r0, #1
- movs r1, #1
- movs r2, #1
- movs r3, #0
- negs r0, r0
- negs r1, r1
- negs r2, r2
- bl sub_020069ca
- movs r1, #0
- movs r2, #15
- movs r0, #0
- bl sub_020069a4
- bl sub_02006a08
- movs r0, #1
- movs r1, #1
- movs r2, #1
- movs r3, #0
- negs r0, r0
- negs r1, r1
- negs r2, r2
- bl sub_020069ea
- movs r1, #128
- movs r2, #15
- movs r0, #0
- lsls r1, r1, #7
- bl sub_020069c6
- adds r0, r6, #0
- movs r1, #0
- bl sub_020069be
- movs r1, #40
- movs r2, #0
- movs r0, #96
- bl sub_02005960
- movs r1, #40
- movs r2, #10
- movs r0, #128
- bl sub_020059ce
- movs r0, #30
- bl sub_02006910
- movs r1, #40
- movs r2, #10
- movs r0, #160
- bl sub_020059de
- movs r0, #30
- bl sub_02006920
- movs r2, #10
- movs r1, #72
- movs r0, #160
- bl sub_020059ee
- movs r0, #30
- bl sub_02006930
- movs r1, #0
- adds r0, r6, #0
- bl sub_02006a00
- bl sub_02005a5c
- movs r0, #0
- bl sub_02005766
- movs r0, #0
- movs r1, #0
- bl sub_02006a42
- adds r0, r6, #0
- movs r1, #2
- bl sub_02004aaa
- b.n .L_02001f70
-.L_02001f5e:
- cmp r7, #1
- bne.n .L_02001f70
- ldr r0, [pc, #40]
- bl sub_02006a16
- adds r0, r6, #0
- movs r1, #0
- bl sub_02006a2e
-.L_02001f70:
- adds r1, r6, #0
- movs r2, #2
- adds r0, r7, #0
- bl sub_02004b24
- bl sub_02006984
-.L_02001f7e:
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .4byte 0x02000240
- .4byte 0x000020b7
- .2byte 0x20b6
- .2byte 0x0000
+AlchemyC_02001df8:
+ .space 0x198
push {r5, r6, r7, lr}
mov r7, r8
push {r7}
diff --git a/games/gs1/assets/code/resource_3bf_overlay.s b/games/gs1/assets/code/resource_3bf_overlay.s
index 822a73249..8fddb1e2f 100644
--- a/games/gs1/assets/code/resource_3bf_overlay.s
+++ b/games/gs1/assets/code/resource_3bf_overlay.s
@@ -2208,63 +2208,8 @@ AlchemyC_02000c90:
.space 0x50
AlchemyC_02000ce0:
.space 0x74
- push {r5, r6, r7, lr}
- mov r7, r8
- push {r7}
- ldr r2, [pc, #108]
- lsls r3, r0, #3
- ldr r7, [r2, r3]
- adds r3, #4
- ldr r6, [r2, r3]
- sub sp, #8
- mov r8, r0
- movs r1, #77
- movs r0, #0
- movs r2, #1
- movs r3, #3
- str r7, [sp, #0]
- str r6, [sp, #4]
- bl sub_02006346
- adds r3, r7, #1
- str r3, [sp, #0]
- movs r0, #1
- movs r1, #77
- movs r2, #1
- movs r3, #1
- str r6, [sp, #4]
- bl sub_02006358
- adds r5, r6, #0
- adds r1, r6, #0
- subs r1, #45
- subs r5, #44
- adds r0, r7, #0
- movs r2, #1
- movs r3, #1
- str r7, [sp, #0]
- str r5, [sp, #4]
- bl sub_02006376
- mov r1, r8
- cmp r1, #1
- bne.n .L_02000dba
- adds r3, r6, #0
- subs r3, #43
- str r3, [sp, #4]
- adds r0, r7, #0
- adds r1, r5, #0
- movs r2, #1
- movs r3, #1
- str r7, [sp, #0]
- bl sub_02006390
-.L_02000dba:
- add sp, #8
- pop {r3}
- mov r8, r3
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .2byte 0xf73c
- .2byte 0x0200
+AlchemyC_02000d54:
+ .space 0x78
AlchemyC_02000dcc:
.space 0x64
AlchemyC_02000e30:
diff --git a/games/gs1/assets/code/resource_3c5_overlay.s b/games/gs1/assets/code/resource_3c5_overlay.s
index 84151bec3..a133eded3 100644
--- a/games/gs1/assets/code/resource_3c5_overlay.s
+++ b/games/gs1/assets/code/resource_3c5_overlay.s
@@ -1534,1825 +1534,10 @@ AlchemyC_020011fc:
.space 0x18
AlchemyC_02001214:
.space 0x24
- push {lr}
- ldr r0, [pc, #888]
- bl sub_0200405e
- ldr r0, [pc, #884]
- bl sub_02004064
- bl sub_02004080
- bl sub_020041b4
- ldr r0, [pc, #876]
- bl sub_0200412a
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020040b8
- movs r1, #148
- movs r2, #176
- movs r0, #0
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_020040de
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #0
- bl sub_0200416a
- movs r0, #10
- bl sub_020040b0
- movs r3, #192
- movs r0, #10
- movs r1, #16
- movs r2, #0
- lsls r3, r3, #8
- bl sub_020041fe
- movs r1, #8
- movs r3, #192
- movs r0, #1
- negs r1, r1
- movs r2, #16
- lsls r3, r3, #8
- bl sub_0200420e
- movs r3, #192
- movs r0, #2
- movs r1, #8
- movs r2, #16
- lsls r3, r3, #8
- bl sub_0200421c
- movs r3, #192
- movs r2, #16
- lsls r3, r3, #8
- movs r1, #24
- movs r0, #3
- bl sub_0200422a
- movs r0, #3
- bl sub_02004140
- movs r0, #20
- bl sub_020040f6
- movs r1, #0
- movs r0, #14
- bl sub_020041b6
- movs r0, #10
- bl sub_02004104
- movs r0, #192
- movs r1, #192
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_020041f8
- movs r0, #140
- movs r1, #1
- movs r2, #144
- movs r3, #1
- lsls r2, r2, #17
- negs r1, r1
- lsls r0, r0, #17
- bl sub_02004212
- bl sub_0200421e
- movs r0, #20
- bl sub_0200412c
- movs r1, #3
- movs r0, #11
- bl sub_0200419c
- movs r0, #30
- bl sub_0200413a
- movs r1, #0
- movs r0, #11
- bl sub_020041fa
- movs r0, #10
- bl sub_02004148
- movs r1, #192
- movs r0, #14
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004214
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #11
- bl sub_02004220
- movs r0, #30
- bl sub_02004166
- movs r0, #10
- bl sub_0200416c
- movs r1, #2
- movs r0, #14
- bl sub_020041f4
- movs r0, #20
- bl sub_0200417a
- movs r1, #0
- movs r0, #14
- bl sub_0200423a
- movs r0, #10
- bl sub_02004188
- movs r0, #13
- movs r1, #2
- bl sub_02004208
- movs r1, #2
- movs r0, #12
- bl sub_02004218
- movs r0, #40
- bl sub_0200419e
- movs r0, #13
- movs r1, #2
- bl sub_0200421e
- movs r1, #2
- movs r0, #12
- bl sub_0200422e
- movs r0, #40
- bl sub_020041b4
- movs r0, #13
- movs r1, #2
- bl sub_02004234
- movs r1, #2
- movs r0, #12
- bl sub_02004244
- movs r0, #40
- bl sub_020041ca
- movs r1, #129
- movs r2, #50
- movs r0, #12
- lsls r1, r1, #1
- bl sub_020042a6
- movs r1, #0
- movs r0, #12
- bl sub_02004296
- movs r0, #10
- bl sub_020041e4
- movs r2, #0
- movs r1, #0
- movs r0, #13
- bl sub_020042ae
- movs r0, #25
- bl sub_020041f4
- movs r1, #2
- movs r0, #13
- bl sub_0200427c
- movs r0, #20
- bl sub_02004202
- movs r1, #0
- movs r0, #13
- bl sub_020042c2
- movs r0, #10
- bl sub_02004210
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #12
- bl sub_020042dc
- movs r0, #20
- bl sub_02004222
- movs r1, #4
- movs r0, #13
- bl sub_02004292
- movs r0, #20
- bl sub_02004230
- movs r1, #0
- movs r0, #13
- bl sub_020042f0
- movs r0, #10
- bl sub_0200423e
- movs r1, #4
- movs r0, #11
- bl sub_020042ae
- movs r0, #20
- bl sub_0200424c
- movs r1, #0
- movs r0, #11
- bl sub_0200430c
- movs r0, #20
- bl sub_0200425a
- ldr r1, [pc, #400]
- movs r2, #40
- movs r0, #13
- bl sub_02004334
- movs r0, #10
- bl sub_0200426a
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #7
- movs r0, #13
- bl sub_02004336
- movs r0, #20
- bl sub_0200427c
- movs r1, #0
- movs r0, #13
- bl sub_0200433c
- movs r0, #20
- bl sub_0200428a
- movs r0, #13
- ldr r1, [pc, #356]
- movs r2, #75
- bl sub_02004364
- movs r0, #14
- ldr r1, [pc, #344]
- movs r2, #60
- bl sub_0200436e
- movs r1, #128
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #12
- bl sub_0200436a
- movs r0, #20
- bl sub_020042b0
- movs r1, #128
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #11
- bl sub_0200437c
- movs r0, #20
- bl sub_020042c2
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #7
- movs r0, #14
- bl sub_0200438e
- movs r0, #30
- bl sub_020042d4
- movs r0, #14
- movs r1, #0
- bl sub_02004394
- movs r0, #140
- movs r1, #1
- movs r2, #160
- movs r3, #1
- lsls r2, r2, #17
- negs r1, r1
- lsls r0, r0, #17
- bl sub_020043de
- bl sub_020043ea
- movs r0, #20
- bl sub_020042f8
- movs r1, #3
- movs r0, #10
- bl sub_02004368
- movs r0, #30
- bl sub_02004306
- movs r1, #0
- movs r0, #10
- bl sub_020043c6
- movs r0, #10
- bl sub_02004314
- movs r1, #4
- movs r0, #10
- bl sub_02004384
- movs r0, #20
- bl sub_02004322
- movs r1, #0
- movs r0, #10
- bl sub_020043e2
- movs r0, #20
- bl sub_02004330
- movs r2, #60
- movs r0, #14
- ldr r1, [pc, #192]
- bl sub_0200440a
- movs r1, #0
- movs r0, #14
- bl sub_020043fa
- movs r0, #10
- bl sub_02004348
- movs r1, #4
- movs r0, #3
- bl sub_020043b8
- movs r0, #20
- bl sub_02004356
- movs r1, #0
- movs r0, #3
- bl sub_02004416
- movs r0, #10
- bl sub_02004364
- movs r1, #2
- movs r0, #2
- bl sub_020043ec
- movs r0, #20
- bl sub_02004372
- movs r1, #0
- movs r0, #2
- bl sub_02004432
- movs r0, #10
- bl sub_02004380
- movs r1, #2
- movs r0, #1
- bl sub_02004408
- movs r0, #20
- bl sub_0200438e
- movs r1, #0
- movs r0, #1
- bl sub_02004446
- movs r0, #0
- movs r1, #0
- bl sub_020043b6
- cmp r0, #0
- bne.n .L_020015d0
- movs r0, #30
- bl sub_020043a8
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #10
- bl sub_02004474
- movs r0, #30
- bl sub_020043ba
- movs r1, #3
- movs r0, #10
- bl sub_0200442a
- movs r0, #30
- bl sub_020043c8
- movs r0, #10
- movs r1, #0
- bl sub_02004488
- ldr r3, [pc, #40]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_0200160e
- .4byte 0x00000988
- .4byte 0x0000098a
- .4byte 0x00002702
- .4byte 0x00000107
- .4byte 0x00000101
- .4byte 0x00000105
- .2byte 0x1ebc
- .2byte 0x0300
-.L_020015d0:
- movs r0, #30
- bl sub_02004404
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #10
- bl sub_020044d0
- movs r0, #30
- bl sub_02004416
- movs r1, #4
- movs r0, #10
- bl sub_02004486
- movs r0, #20
- bl sub_02004424
- ldr r3, [pc, #628]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #10
- movs r1, #0
- bl sub_020044f4
-.L_0200160e:
- movs r0, #10
- bl sub_02004442
- movs r0, #14
- ldr r1, [pc, #600]
- movs r2, #60
- bl sub_0200451c
- movs r1, #128
- movs r2, #128
- movs r0, #14
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02004482
- movs r2, #16
- movs r1, #0
- movs r0, #14
- bl sub_020045b4
- movs r0, #20
- bl sub_0200446a
- movs r1, #0
- movs r0, #14
- bl sub_0200452a
- movs r0, #10
- bl sub_02004478
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #10
- bl sub_02004544
- movs r0, #35
- bl sub_0200448a
- movs r1, #0
- movs r0, #10
- bl sub_0200454a
- movs r0, #10
- bl sub_02004498
- movs r1, #2
- movs r0, #14
- bl sub_02004520
- movs r0, #20
- bl sub_020044a6
- movs r1, #0
- movs r0, #14
- bl sub_02004566
- movs r0, #20
- bl sub_020044b4
- movs r1, #129
- movs r2, #40
- movs r0, #3
- lsls r1, r1, #1
- bl sub_02004590
- movs r1, #0
- movs r0, #3
- bl sub_02004580
- movs r0, #10
- bl sub_020044ce
- movs r1, #2
- movs r0, #2
- bl sub_02004556
- movs r0, #20
- bl sub_020044dc
- movs r1, #0
- movs r0, #2
- bl sub_0200459c
- movs r0, #10
- bl sub_020044ea
- movs r1, #3
- movs r0, #1
- bl sub_0200455a
- movs r0, #30
- bl sub_020044f8
- movs r1, #0
- movs r0, #1
- bl sub_020045b8
- movs r0, #20
- bl sub_02004506
- movs r1, #128
- movs r0, #14
- lsls r1, r1, #1
- movs r2, #40
- bl sub_020045e2
- movs r1, #0
- movs r0, #14
- bl sub_020045ca
- movs r0, #0
- movs r1, #0
- bl sub_0200453a
- cmp r0, #0
- bne.n .L_02001726
- movs r0, #30
- bl sub_0200452c
- movs r1, #4
- movs r0, #14
- bl sub_0200459c
- movs r0, #20
- bl sub_0200453a
- movs r0, #14
- movs r1, #0
- bl sub_020045fa
- ldr r3, [pc, #340]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_02001752
-.L_02001726:
- movs r0, #30
- bl sub_0200455a
- movs r1, #4
- movs r0, #14
- bl sub_020045ca
- movs r0, #20
- bl sub_02004568
- ldr r3, [pc, #304]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #14
- movs r1, #0
- bl sub_02004638
-.L_02001752:
- movs r0, #10
- bl sub_02004586
- movs r1, #129
- movs r2, #50
- movs r0, #10
- lsls r1, r1, #1
- bl sub_02004662
- movs r1, #0
- movs r0, #10
- bl sub_02004652
- movs r0, #10
- bl sub_020045a0
- movs r1, #2
- movs r0, #13
- bl sub_02004628
- movs r0, #20
- bl sub_020045ae
- movs r0, #13
- ldr r1, [pc, #240]
- ldr r2, [pc, #240]
- bl sub_020045e0
- movs r2, #16
- movs r1, #0
- movs r0, #13
- bl sub_02004712
- movs r0, #20
- bl sub_020045c8
- movs r1, #0
- movs r0, #13
- bl sub_02004688
- movs r0, #10
- bl sub_020045d6
- movs r0, #12
- ldr r1, [pc, #200]
- ldr r2, [pc, #200]
- bl sub_02004608
- movs r1, #0
- movs r2, #16
- movs r0, #12
- bl sub_0200473a
- movs r0, #20
- bl sub_020045f0
- movs r2, #50
- movs r0, #12
- ldr r1, [pc, #180]
- bl sub_020046ca
- movs r1, #0
- movs r0, #12
- bl sub_020046ba
- movs r0, #10
- bl sub_02004608
- movs r1, #3
- movs r0, #14
- bl sub_02004678
- movs r0, #30
- bl sub_02004616
- movs r0, #10
- bl sub_0200461c
- movs r1, #129
- movs r0, #10
- lsls r1, r1, #1
- movs r2, #60
- bl sub_020046f8
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #10
- bl sub_020046f4
- movs r0, #25
- bl sub_0200463a
- movs r1, #0
- movs r0, #10
- bl sub_020046fa
- movs r0, #10
- bl sub_02004648
- movs r1, #2
- movs r0, #10
- bl sub_020046d0
- movs r0, #20
- bl sub_02004656
- movs r1, #0
- movs r0, #10
- bl sub_0200470e
- movs r0, #0
- movs r1, #0
- bl sub_0200467e
- cmp r0, #0
- bne.n .L_02001880
- movs r0, #30
- bl sub_02004670
- movs r1, #3
- movs r0, #10
- bl sub_020046e0
- movs r0, #30
- bl sub_0200467e
- movs r0, #10
- movs r1, #0
- bl sub_0200473e
- ldr r3, [pc, #16]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_020018ac
- .2byte 0x0000
- .4byte 0x03001ebc
- .4byte 0x00000101
- .4byte 0x00014ccc
- .4byte 0x0000a666
- .2byte 0x0107
- .2byte 0x0000
-.L_02001880:
- movs r0, #30
- bl sub_020046b4
- movs r1, #4
- movs r0, #10
- bl sub_02004724
- movs r0, #20
- bl sub_020046c2
- ldr r3, [pc, #620]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #10
- movs r1, #0
- bl sub_02004792
-.L_020018ac:
- movs r0, #10
- bl sub_020046e0
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #10
- bl sub_020047ac
- movs r0, #35
- bl sub_020046f2
- movs r1, #3
- movs r0, #14
- bl sub_02004762
- movs r0, #30
- bl sub_02004700
- movs r1, #176
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #14
- bl sub_020047cc
- movs r0, #40
- bl sub_02004712
- movs r1, #0
- movs r0, #14
- bl sub_020047d2
- movs r0, #10
- bl sub_02004720
- movs r2, #50
- movs r0, #12
- movs r1, #13
- bl sub_020047ba
- movs r0, #12
- movs r1, #3
- bl sub_02004792
- movs r1, #3
- movs r0, #13
- bl sub_020047a2
-.L_0200190c:
- movs r0, #30
- bl sub_02004740
- movs r1, #128
- movs r0, #12
- lsls r1, r1, #7
- movs r2, #0
- bl sub_0200480c
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #7
- movs r0, #13
- bl sub_02004818
- movs r0, #20
- bl sub_0200475e
- movs r0, #12
- movs r1, #3
- bl sub_020047c6
- movs r1, #3
- movs r0, #13
- bl sub_020047d6
- movs r0, #30
- bl sub_02004774
- movs r1, #128
- movs r2, #128
- movs r0, #12
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020047aa
- movs r1, #128
- movs r2, #128
- movs r0, #13
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_020047b8
- movs r0, #12
- movs r1, #32
- movs r2, #0
- bl sub_020048e2
- movs r0, #13
- movs r1, #32
- movs r2, #0
- bl sub_020048f4
- movs r0, #12
- movs r1, #0
- movs r2, #16
- bl sub_020048f6
- movs r0, #13
- movs r1, #16
- movs r2, #0
- bl sub_02004908
- movs r1, #172
- movs r2, #156
- movs r0, #13
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_020047fe
- movs r1, #172
- movs r2, #168
- lsls r2, r2, #1
- movs r0, #12
- lsls r1, r1, #1
- bl sub_02004814
- movs r0, #13
- movs r1, #1
- bl sub_0200483c
- movs r1, #128
- movs r0, #12
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020048a8
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #13
- bl sub_020048b4
- movs r0, #10
- bl sub_020047fa
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #7
- movs r0, #14
- bl sub_020048c6
- movs r0, #20
- bl sub_0200480c
- movs r1, #0
- movs r0, #14
- bl sub_020048cc
- movs r0, #10
- bl sub_0200481a
- movs r1, #128
- movs r2, #128
- movs r0, #14
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02004850
- movs r1, #164
- movs r2, #156
- movs r0, #14
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_02004876
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #14
- bl sub_02004902
- movs r0, #30
- bl sub_02004848
- movs r1, #128
- movs r2, #128
- movs r0, #11
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200487e
- movs r1, #164
- movs r2, #164
- movs r0, #11
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_020048a4
- movs r1, #128
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #11
- bl sub_02004930
- movs r0, #20
- bl sub_02004876
- movs r0, #1
- ldr r1, [pc, #188]
- ldr r2, [pc, #188]
- bl sub_020048a8
- movs r0, #2
- ldr r1, [pc, #176]
- ldr r2, [pc, #180]
- bl sub_020048b2
- movs r0, #3
- ldr r1, [pc, #168]
- ldr r2, [pc, #168]
- bl sub_020048bc
- movs r0, #1
- movs r1, #2
- bl sub_020048fc
- movs r0, #0
- bl sub_020048c2
- cmp r0, #0
- beq.n .L_02001a86
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_020048e4
-.L_02001a86:
- movs r0, #1
- bl sub_0200490a
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_0200491c
- movs r0, #2
- movs r1, #2
- bl sub_0200492c
- movs r0, #0
- bl sub_020048f2
- cmp r0, #0
- beq.n .L_02001ab6
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #2
- bl sub_02004914
-.L_02001ab6:
- movs r0, #2
- bl sub_0200493a
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_0200494c
- movs r0, #3
- movs r1, #2
- bl sub_0200495c
- movs r0, #0
- bl sub_02004922
- cmp r0, #0
- beq.n .L_02001ae6
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #3
- bl sub_02004944
-.L_02001ae6:
- movs r0, #3
- bl sub_0200496a
- movs r1, #0
- movs r2, #0
- movs r0, #3
- bl sub_0200497c
- movs r0, #10
- bl sub_0200492a
- bl sub_0200493e
- pop {r0}
- bx r0
- .4byte 0x03001ebc
- .4byte 0x00013333
- .2byte 0x9999
- .2byte 0x0000
- push {lr}
- ldr r0, [pc, #1016]
- bl sub_02004936
- bl sub_02004952
- bl sub_02004a86
- ldr r0, [pc, #1004]
- bl sub_020049fc
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_0200498a
- movs r1, #148
- movs r2, #156
- movs r0, #0
- lsls r1, r1, #1
- lsls r2, r2, #1
- bl sub_020049b0
- movs r1, #0
- movs r2, #0
- movs r0, #0
- bl sub_02004a3a
- movs r0, #10
- bl sub_02004980
- movs r0, #1
- movs r1, #0
- movs r2, #16
- movs r3, #0
- bl sub_02004acc
- movs r1, #16
- movs r2, #8
- movs r0, #2
- negs r1, r1
- negs r2, r2
- movs r3, #0
- bl sub_02004adc
- movs r1, #16
- movs r2, #24
- movs r3, #0
- negs r1, r1
- movs r0, #3
- bl sub_02004aea
- movs r0, #3
- bl sub_02004a00
- movs r0, #20
- bl sub_020049b6
- movs r0, #192
- movs r1, #192
- lsls r0, r0, #10
- lsls r1, r1, #7
- bl sub_02004aaa
- movs r0, #140
- movs r1, #1
- movs r2, #164
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #17
- lsls r0, r0, #17
- bl sub_02004ac4
- bl sub_02004ad0
- movs r0, #10
- bl sub_020049de
- movs r0, #10
- bl sub_020049e4
- movs r1, #176
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #10
- bl sub_02004ab0
- movs r0, #10
- bl sub_020049f6
- movs r1, #128
- movs r2, #40
-.L_02001bcc:
- movs r0, #10
- lsls r1, r1, #1
- bl sub_02004ad2
- movs r0, #10
- movs r1, #0
- bl sub_02004ac2
-.L_02001bdc:
- movs r0, #10
- movs r1, #4
- movs r2, #13
- bl sub_02004a84
- movs r1, #4
- movs r2, #30
- movs r0, #10
- bl sub_02004a8e
- movs r0, #10
- bl sub_02004a24
- movs r1, #128
- movs r0, #11
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02004b00
- movs r1, #128
- movs r0, #12
- lsls r1, r1, #1
- movs r2, #0
-.L_02001c0a:
- bl sub_02004b0c
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02004b18
- movs r1, #128
- lsls r1, r1, #1
- movs r2, #40
- movs r0, #14
- bl sub_02004b24
- movs r0, #10
- bl sub_02004a5a
- movs r1, #176
- movs r0, #14
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004b26
- movs r1, #176
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004b32
- movs r1, #176
- movs r0, #12
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004b3e
- movs r1, #176
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #13
- bl sub_02004b4a
- movs r0, #30
- bl sub_02004a90
- movs r1, #2
- movs r0, #14
- bl sub_02004b18
- movs r0, #20
- bl sub_02004a9e
- movs r1, #0
- movs r0, #14
- bl sub_02004b5e
- movs r0, #20
- bl sub_02004aac
- movs r1, #129
- movs r2, #40
- movs r0, #13
- lsls r1, r1, #1
- bl sub_02004b88
- movs r1, #0
- movs r0, #13
- bl sub_02004b78
- movs r0, #20
- bl sub_02004ac6
- movs r0, #12
- ldr r1, [pc, #632]
- movs r2, #50
- bl sub_02004ba0
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #12
- bl sub_02004b9c
- movs r0, #25
- bl sub_02004ae2
- movs r1, #0
- movs r0, #12
- bl sub_02004ba2
- movs r0, #10
- bl sub_02004af0
- movs r1, #128
- movs r0, #14
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004bbc
- movs r1, #128
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004bc8
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #13
- bl sub_02004bd4
- movs r0, #30
- bl sub_02004b1a
- movs r0, #10
- bl sub_02004b20
- movs r1, #2
- movs r0, #3
- bl sub_02004ba8
- movs r0, #20
- bl sub_02004b2e
- movs r1, #0
- movs r0, #3
- bl sub_02004bee
- movs r0, #10
- bl sub_02004b3c
- movs r1, #2
- movs r0, #2
- bl sub_02004bc4
- movs r0, #20
- bl sub_02004b4a
- movs r1, #0
- movs r0, #2
- bl sub_02004c0a
- movs r0, #10
- bl sub_02004b58
- movs r1, #129
- movs r2, #40
- movs r0, #1
- lsls r1, r1, #1
- bl sub_02004c34
- movs r1, #0
- movs r0, #1
- bl sub_02004c24
- movs r0, #20
- bl sub_02004b72
- movs r1, #4
- movs r0, #10
- bl sub_02004be2
- movs r0, #20
- bl sub_02004b80
- movs r1, #0
- movs r0, #10
- bl sub_02004c40
- movs r0, #10
- bl sub_02004b8e
- movs r1, #2
- movs r0, #14
- bl sub_02004c16
- movs r0, #25
- bl sub_02004b9c
- movs r1, #0
- movs r0, #14
- bl sub_02004c5c
- movs r0, #10
- bl sub_02004baa
- movs r1, #2
- movs r0, #10
- bl sub_02004c32
- movs r0, #20
- bl sub_02004bb8
- movs r1, #128
- movs r2, #128
- movs r0, #10
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02004bee
- movs r2, #40
- movs r0, #10
- movs r1, #0
- negs r2, r2
- bl sub_02004d22
- movs r2, #0
- movs r1, #0
- movs r0, #10
- bl sub_02004c9c
- movs r0, #20
- bl sub_02004be2
- movs r1, #0
- movs r0, #10
- bl sub_02004ca2
- movs r0, #10
- bl sub_02004bf0
- movs r1, #3
- movs r0, #14
- bl sub_02004c60
- movs r0, #30
- bl sub_02004bfe
- movs r0, #10
- bl sub_02004c04
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02004cd0
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #12
- bl sub_02004cdc
- movs r0, #30
- bl sub_02004c22
- movs r0, #12
- movs r1, #3
- bl sub_02004c8a
- movs r1, #3
- movs r0, #13
- bl sub_02004c9a
- movs r0, #30
- bl sub_02004c38
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004d04
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #12
- bl sub_02004d10
- movs r0, #20
- bl sub_02004c56
- movs r1, #3
- movs r0, #10
- bl sub_02004cc6
- movs r0, #30
- bl sub_02004c64
- movs r0, #10
- movs r1, #1
- bl sub_02004d4c
- movs r2, #32
- movs r1, #0
- negs r2, r2
- movs r0, #10
- bl sub_02004dc8
- bl sub_02004394
- ldr r0, [pc, #200]
- bl sub_02004c7a
- movs r0, #1
- movs r1, #1
- movs r2, #1
- movs r3, #0
- negs r0, r0
- negs r1, r1
- negs r2, r2
- bl sub_02004d84
- bl sub_02004ca0
- movs r1, #129
- movs r2, #40
- movs r0, #10
- lsls r1, r1, #1
- bl sub_02004d74
- movs r1, #0
- movs r0, #10
- bl sub_02004d64
- movs r0, #10
- bl sub_02004cb2
- movs r1, #176
- movs r0, #14
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004d7e
- movs r1, #176
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004d8a
- movs r1, #176
- movs r0, #12
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004d96
- movs r1, #176
- movs r0, #13
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004da2
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004dae
- movs r1, #192
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004dba
- movs r1, #192
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004dc6
- movs r1, #192
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #3
- bl sub_02004dd2
- movs r0, #30
- bl sub_02004d18
- movs r1, #128
- movs r0, #11
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02004df4
- movs r1, #128
- movs r0, #12
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02004e00
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #1
- movs r2, #0
- b.n .L_02001f1c
- .4byte 0x00000989
- .4byte 0x0000272f
- .4byte 0x00000101
- .2byte 0x0301
- .2byte 0x0000
-.L_02001f1c:
- bl sub_02004e1e
- movs r1, #128
- movs r0, #14
- lsls r1, r1, #1
- movs r2, #70
- bl sub_02004e2a
- movs r0, #140
- movs r1, #1
- movs r2, #156
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #17
- lsls r0, r0, #17
- bl sub_02004e5c
- bl sub_02004e68
- movs r0, #10
- bl sub_02004d76
- movs r1, #129
- movs r2, #40
- movs r0, #12
- lsls r1, r1, #1
- bl sub_02004e52
- movs r1, #0
- movs r0, #12
- bl sub_02004e42
- movs r0, #10
- bl sub_02004d90
- movs r1, #4
- movs r0, #13
- bl sub_02004e00
- movs r0, #20
- bl sub_02004d9e
- movs r1, #0
- movs r0, #13
- bl sub_02004e5e
- movs r0, #10
- bl sub_02004dac
- movs r1, #2
- movs r0, #2
- bl sub_02004e34
- movs r0, #30
- bl sub_02004dba
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #6
- movs r0, #2
- bl sub_02004e86
- movs r0, #20
- bl sub_02004dcc
- movs r1, #0
- movs r0, #2
- bl sub_02004e8c
- movs r0, #10
- bl sub_02004dda
- movs r1, #128
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #10
- bl sub_02004ea6
- movs r0, #30
- bl sub_02004dec
- movs r1, #224
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #3
- bl sub_02004eb8
- movs r0, #30
- bl sub_02004dfe
- movs r1, #129
- movs r0, #3
- lsls r1, r1, #1
- movs r2, #40
- bl sub_02004eda
- movs r1, #192
- movs r2, #0
- lsls r1, r1, #6
- movs r0, #0
- bl sub_02004ed6
- movs r0, #20
- bl sub_02004e1c
- movs r1, #0
- movs r0, #3
- bl sub_02004edc
- movs r0, #10
- bl sub_02004e2a
- movs r1, #4
- movs r0, #1
- bl sub_02004e9a
- movs r0, #20
- bl sub_02004e38
- movs r1, #0
- movs r0, #1
- bl sub_02004ef8
- movs r0, #20
- bl sub_02004e46
- movs r0, #14
- ldr r1, [pc, #472]
- movs r2, #50
- bl sub_02004f20
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #14
- bl sub_02004f1c
- movs r0, #20
- bl sub_02004e62
- movs r1, #0
- movs r0, #14
- bl sub_02004f1a
- movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_02004f34
- movs r1, #128
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004f40
- movs r1, #128
- movs r0, #12
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004f4c
- movs r1, #128
- movs r0, #13
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004f58
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #5
- movs r2, #0
- bl sub_02004f64
- movs r1, #224
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02004f70
- movs r0, #0
- movs r1, #0
- bl sub_02004ed0
- cmp r0, #0
- bne.n .L_020020bc
- movs r0, #30
- bl sub_02004ec2
- movs r1, #2
- movs r0, #14
- bl sub_02004f4a
- movs r0, #20
- bl sub_02004ed0
- movs r0, #14
- movs r1, #0
- bl sub_02004f90
- ldr r3, [pc, #332]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_020020e8
-.L_020020bc:
- movs r0, #30
- bl sub_02004ef0
- movs r1, #2
- movs r0, #14
- bl sub_02004f78
- movs r0, #20
- bl sub_02004efe
- ldr r3, [pc, #292]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #14
- movs r1, #0
- bl sub_02004fce
-.L_020020e8:
- movs r0, #10
- bl sub_02004f1c
- movs r1, #2
- movs r0, #10
- bl sub_02004fa4
- movs r0, #20
- bl sub_02004f2a
- movs r0, #10
- movs r1, #0
- movs r2, #16
- bl sub_02005084
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #6
- movs r0, #10
- bl sub_02005000
- movs r0, #20
- bl sub_02004f46
- movs r1, #0
- movs r0, #10
- bl sub_02005006
- movs r0, #10
- bl sub_02004f54
- movs r1, #160
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #14
- bl sub_02005020
- movs r0, #20
- bl sub_02004f66
- movs r1, #4
- movs r0, #14
- bl sub_02004fd6
- movs r0, #20
- bl sub_02004f74
- movs r1, #0
- movs r0, #14
- bl sub_02005034
- movs r0, #10
- bl sub_02004f82
- movs r1, #3
- movs r0, #10
- bl sub_02004ff2
- movs r0, #30
- bl sub_02004f90
- movs r1, #0
- movs r0, #10
- bl sub_02005050
- movs r0, #10
- bl sub_02004f9e
- movs r1, #2
- movs r0, #14
- bl sub_02005026
- movs r0, #20
- bl sub_02004fac
- movs r1, #0
- movs r0, #14
- bl sub_02005064
- movs r0, #40
- bl sub_02004fba
- movs r1, #160
- lsls r1, r1, #7
- movs r2, #0
- movs r0, #10
- bl sub_02005086
- movs r0, #20
- bl sub_02004fcc
- movs r0, #10
- ldr r1, [pc, #88]
- movs r2, #60
- bl sub_020050a6
- movs r0, #0
- movs r1, #0
- bl sub_02004ff6
- cmp r0, #0
- bne.n .L_02002200
- movs r0, #30
- bl sub_02004fe8
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #6
- movs r0, #10
- bl sub_020050b4
- movs r0, #20
- bl sub_02004ffa
- movs r1, #3
- movs r0, #10
- bl sub_0200506a
- movs r0, #30
- bl sub_02005008
- movs r0, #10
- movs r1, #0
- bl sub_020050c8
- ldr r3, [pc, #20]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- b.n .L_0200223e
- .4byte 0x00000103
- .4byte 0x03001ebc
- .2byte 0x0101
- .2byte 0x0000
-.L_02002200:
- movs r0, #30
- bl sub_02005034
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #6
- movs r0, #10
- bl sub_02005100
- movs r0, #20
- bl sub_02005046
- movs r1, #4
- movs r0, #10
- bl sub_020050b6
- movs r0, #20
- bl sub_02005054
- ldr r3, [pc, #568]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r0, #10
- movs r1, #0
- bl sub_02005124
-.L_0200223e:
- movs r0, #10
- bl sub_02005072
- movs r1, #129
- movs r2, #50
- movs r0, #14
- lsls r1, r1, #1
- bl sub_0200514e
- movs r1, #0
- movs r0, #14
- bl sub_0200513e
- movs r0, #15
- bl sub_0200508c
- movs r1, #3
- movs r0, #10
- bl sub_020050fc
- movs r0, #30
- bl sub_0200509a
- movs r0, #20
- bl sub_020050a0
- movs r1, #2
- movs r0, #14
- bl sub_02005128
- movs r0, #40
- bl sub_020050ae
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #14
- bl sub_0200517a
- movs r0, #20
- bl sub_020050c0
- movs r1, #0
- movs r0, #14
- bl sub_02005180
- movs r0, #10
- bl sub_020050ce
- movs r1, #3
- movs r0, #14
- bl sub_0200513e
- movs r0, #30
- bl sub_020050dc
- movs r1, #0
- movs r0, #14
- bl sub_0200519c
- movs r0, #10
- bl sub_020050ea
- movs r1, #160
- movs r2, #0
- lsls r1, r1, #7
- movs r0, #10
- bl sub_020051b6
- movs r0, #25
- bl sub_020050fc
- movs r1, #2
- movs r0, #10
- bl sub_02005184
- movs r0, #20
- bl sub_0200510a
- movs r1, #156
- movs r2, #156
- movs r0, #10
- lsls r1, r1, #1
-.L_020022e4:
- lsls r2, r2, #1
- bl sub_02005158
- movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_020051e2
- movs r1, #128
- movs r2, #0
- lsls r1, r1, #8
- movs r0, #10
- bl sub_020051ee
- movs r0, #25
- bl sub_02005134
- movs r1, #0
- movs r0, #10
- bl sub_020051f4
- movs r0, #10
- bl sub_02005142
- movs r0, #0
- movs r1, #1
- movs r2, #0
- bl sub_020051dc
- movs r2, #0
- movs r1, #2
- movs r0, #3
- bl sub_020051e6
- movs r0, #30
- bl sub_0200515c
- movs r0, #0
- movs r1, #3
- bl sub_020051c4
- movs r0, #1
- movs r1, #3
- bl sub_020051cc
- movs r0, #3
- movs r1, #3
- bl sub_020051d4
- movs r1, #3
- movs r0, #2
- bl sub_020051e4
- movs r0, #30
- bl sub_02005182
- movs r0, #1
- ldr r1, [pc, #268]
- ldr r2, [pc, #268]
- bl sub_020051b4
- movs r0, #2
- ldr r1, [pc, #256]
- ldr r2, [pc, #260]
- bl sub_020051be
- movs r0, #3
- ldr r1, [pc, #248]
- ldr r2, [pc, #248]
- bl sub_020051c8
- movs r0, #1
- movs r1, #2
- bl sub_02005208
- movs r0, #0
- bl sub_020051ce
- cmp r0, #0
- beq.n .L_02002392
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #1
- bl sub_020051f0
-.L_02002392:
- movs r0, #1
- bl sub_02005216
- movs r0, #1
- movs r1, #0
- movs r2, #0
- bl sub_02005228
- movs r0, #2
- movs r1, #2
- bl sub_02005238
- movs r0, #0
- bl sub_020051fe
- cmp r0, #0
- beq.n .L_020023c2
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #2
- bl sub_02005220
-.L_020023c2:
- movs r0, #2
- bl sub_02005246
- movs r0, #2
- movs r1, #0
- movs r2, #0
- bl sub_02005258
- movs r0, #3
- movs r1, #2
- bl sub_02005268
- movs r0, #0
- bl sub_0200522e
- cmp r0, #0
- beq.n .L_020023f2
- movs r3, #10
- ldrsh r1, [r0, r3]
- movs r3, #18
- ldrsh r2, [r0, r3]
- movs r0, #3
- bl sub_02005250
-.L_020023f2:
- movs r0, #3
- bl sub_02005276
- movs r1, #0
- movs r2, #0
- movs r0, #3
- bl sub_02005288
- movs r0, #10
- bl sub_02005236
- movs r1, #192
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02005302
- movs r1, #176
- movs r0, #10
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200530e
- movs r1, #176
- movs r0, #14
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200531a
- movs r1, #176
- movs r0, #11
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02005326
- movs r1, #176
- movs r0, #12
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02005332
- movs r1, #176
- lsls r1, r1, #8
- movs r2, #0
- movs r0, #13
- bl sub_0200533e
- movs r0, #30
- bl sub_02005284
- bl sub_02005298
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x03001ebc
- .4byte 0x00013333
- .2byte 0x9999
- .2byte 0x0000
+AlchemyC_02001238:
+ .space 0x8d8
+AlchemyC_02001b10:
+ .space 0x95c
AlchemyC_0200246c:
.space 0x44
AlchemyC_020024b0:
diff --git a/games/gs1/assets/code/resource_3c9_overlay.s b/games/gs1/assets/code/resource_3c9_overlay.s
index c9734ddce..656a5a0e4 100644
--- a/games/gs1/assets/code/resource_3c9_overlay.s
+++ b/games/gs1/assets/code/resource_3c9_overlay.s
@@ -1760,1751 +1760,782 @@ AlchemyC_02000894:
.2byte 0x0000
AlchemyC_020008a8:
.space 0xc
+AlchemyC_020008b4:
+ .space 0x9cc
+AlchemyC_02001280:
+ .space 0x48
push {r5, r6, r7, lr}
- mov r7, fp
- mov r6, sl
- mov r5, r9
- push {r5, r6, r7}
- mov r7, r8
- push {r7}
- movs r0, #18
- bl sub_02006612
- adds r5, r0, #0
- bl sub_02006600
- movs r0, #1
- movs r1, #0
- bl sub_02001b54
- movs r0, #2
- movs r1, #0
- bl sub_02001b5c
- movs r0, #3
- movs r1, #0
- bl .L_02001b64
- movs r0, #1
- movs r1, #1
- movs r2, #1
- negs r1, r1
- negs r2, r2
- movs r3, #0
- negs r0, r0
- bl sub_02006732
- movs r0, #1
- bl sub_020064f8
- movs r2, #0
- mov r8, r2
- adds r3, r5, #0
- mov r2, r8
- adds r3, #85
- strb r2, [r3, #0]
- adds r5, #35
- ldrb r2, [r5, #0]
- movs r3, #2
- orrs r3, r2
- strb r3, [r5, #0]
- movs r0, #18
- bl sub_02006664
- movs r1, #0
- bl sub_020065ca
- movs r0, #18
- movs r1, #1
- bl sub_02006742
- movs r1, #145
- movs r2, #169
- lsls r2, r2, #17
- lsls r1, r1, #18
- movs r0, #18
- bl sub_020066e0
- movs r0, #0
- bl sub_02006686
- adds r6, r0, #0
- adds r5, r6, #0
- mov r3, r8
- adds r5, #85
- strb r3, [r5, #0]
- movs r0, #0
- movs r1, #1
- bl sub_02006768
- movs r2, #144
- ldr r1, [pc, #284]
- lsls r2, r2, #17
- movs r0, #0
- bl sub_02006704
- movs r0, #1
- bl sub_0200655a
- bl sub_020067f6
- bl sub_0200680a
- movs r0, #20
- bl sub_02006698
+ mov r7, sl
+ mov r6, r8
+ push {r6, r7}
+ bl sub_02007006
+ bl sub_02007122
+ movs r5, #0
+ adds r0, #85
+ strb r5, [r0, #0]
+ ldr r1, [pc, #1000]
+ ldr r0, [pc, #1000]
+ bl sub_02007118
+ movs r0, #166
movs r1, #128
- movs r2, #128
- movs r0, #18
- lsls r1, r1, #9
-.L_02000976:
- lsls r2, r2, #8
- bl sub_020066d6
+ movs r2, #180
+ movs r3, #1
+ lsls r0, r0, #17
+ lsls r1, r1, #14
+ lsls r2, r2, #16
+ bl sub_02007132
movs r1, #128
movs r2, #128
+ movs r0, #0
lsls r1, r1, #9
lsls r2, r2, #8
- movs r0, #0
- bl sub_020066e4
- movs r0, #0
- bl sub_020066da
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r3, #254
- ands r3, r2
- movs r1, #145
- strb r3, [r0, #0]
- lsls r1, r1, #2
- movs r0, #18
- movs r2, #221
- bl sub_02006728
- movs r0, #0
- ldr r1, [pc, #200]
- movs r2, #171
- bl sub_0200673a
- movs r0, #18
- ldr r1, [pc, #196]
- movs r2, #211
- bl sub_0200673c
- movs r0, #0
- ldr r1, [pc, #188]
- movs r2, #161
- bl sub_0200674e
- movs r1, #130
- movs r0, #18
- lsls r1, r1, #2
- movs r2, #191
- bl sub_02006752
- movs r2, #141
- ldr r1, [pc, #172]
- movs r0, #0
- bl sub_02006764
- movs r0, #18
- bl sub_0200672a
- movs r1, #1
- bl sub_02006690
- movs r0, #18
- ldr r1, [pc, #152]
- movs r2, #171
- bl sub_02006772
- movs r1, #129
- movs r2, #121
- lsls r1, r1, #2
- movs r0, #0
- bl sub_02006786
- movs r0, #144
- lsls r0, r0, #1
- bl sub_020068ce
- movs r0, #20
- bl sub_02006734
- movs r1, #6
- movs r0, #0
- bl sub_020067c4
- movs r0, #0
- bl sub_020067da
- movs r3, #129
- lsls r3, r3, #18
- str r3, [r6, #8]
- movs r3, #128
- lsls r3, r3, #12
- str r3, [r6, #12]
- movs r3, #148
- lsls r3, r3, #16
+ bl sub_02007060
movs r7, #128
+ movs r1, #170
+ movs r2, #184
lsls r7, r7, #8
- ldr r2, [pc, #60]
- str r3, [r6, #16]
- movs r3, #3
- strh r7, [r6, #6]
- movs r0, #152
- strb r3, [r5, #0]
- mov r8, r2
- bl sub_02006908
- movs r3, #128
- lsls r3, r3, #11
- str r3, [r6, #40]
- movs r0, #152
- bl sub_02006914
movs r0, #0
- bl sub_0200679a
- movs r1, #1
- bl sub_02006700
- movs r1, #252
lsls r1, r1, #1
- movs r2, #148
- movs r0, #0
- bl sub_020067ec
- movs r0, #10
- bl sub_02006792
- b.n .L_02000a88
- .2byte 0x0000
- .4byte 0x00000000
- .4byte 0x02450000
- .4byte 0x00000245
- .4byte 0x00000212
- .4byte 0x00000213
- .4byte 0x00000209
- .2byte 0x0203
- .2byte 0x0000
-.L_02000a88:
- movs r0, #0
- bl sub_020067d8
- adds r0, #90
- ldrb r3, [r0, #0]
- movs r5, #1
- orrs r3, r5
- strb r3, [r0, #0]
- movs r3, #128
- lsls r3, r3, #7
- mov r9, r3
- ldr r3, [pc, #1016]
- mov r2, r9
- str r3, [r6, #12]
- strh r2, [r6, #6]
- movs r0, #20
- bl sub_020067d6
- movs r0, #154
- lsls r0, r0, #1
- bl sub_0200697e
- movs r1, #131
- movs r2, #191
-.L_02000ab8:
- lsls r1, r1, #2
- movs r0, #18
- bl sub_0200684a
- movs r0, #18
- bl sub_02006810
- movs r1, #0
- bl sub_02006776
- movs r0, #18
- ldr r1, [pc, #972]
- movs r2, #211
- bl sub_02006860
- movs r1, #145
- movs r0, #18
- lsls r1, r1, #2
- movs r2, #221
- bl sub_0200686c
- movs r1, #145
- movs r2, #169
- lsls r1, r1, #2
- lsls r2, r2, #1
- movs r0, #18
- bl sub_02006872
+ bl sub_020070b0
movs r0, #0
- bl sub_02006840
- adds r0, #35
- ldrb r3, [r0, #0]
- orrs r5, r3
- ldr r2, [pc, #928]
+ adds r1, r7, #0
+ bl .L_02001bc4
+ movs r1, #1
+ movs r0, #21
+ bl sub_02007100
+ ldr r0, [pc, #936]
+ bl sub_0200711e
+ ldr r0, [pc, #932]
+ bl .L_02001bc4
+ bl sub_02007180
+ adds r0, #85
strb r5, [r0, #0]
- ldr r1, [pc, #928]
- movs r0, #0
- bl sub_02006862
+ ldr r1, [pc, #908]
+ ldr r0, [pc, #908]
+ bl sub_02007174
+ movs r0, #152
+ movs r1, #128
+ movs r2, #180
+ movs r3, #1
+ lsls r0, r0, #17
+ lsls r1, r1, #14
+ lsls r2, r2, #16
+ bl sub_0200718e
+ movs r1, #128
movs r0, #1
- movs r1, #1
- bl sub_02001d8e
+ lsls r1, r1, #9
+ adds r2, r7, #0
+ bl sub_020070ba
+ movs r1, #128
movs r0, #2
- movs r1, #1
- bl sub_02001d96
+ lsls r1, r1, #9
+ adds r2, r7, #0
+ bl sub_020070c6
movs r0, #3
- movs r1, #1
- bl sub_02001d9e
- movs r1, #246
+ ldr r1, [pc, #872]
+ ldr r2, [pc, #872]
+ bl sub_020070d0
movs r0, #0
- lsls r1, r1, #1
- movs r2, #164
- bl sub_020068be
+ bl sub_020070c6
+ cmp r0, #0
+ beq.n .L_0200138a
+ ldr r1, [r0, #8]
+ ldr r2, [r0, #16]
movs r0, #1
- ldr r1, [pc, #888]
- movs r2, #164
- bl sub_020068c8
- movs r1, #246
+ bl sub_02007134
+.L_0200138a:
+ movs r0, #0
+ bl sub_020070da
+ cmp r0, #0
+ beq.n .L_0200139e
+ ldr r1, [r0, #8]
+ ldr r2, [r0, #16]
+ movs r0, #2
+ bl sub_02007148
+.L_0200139e:
+ movs r0, #0
+ bl sub_020070ee
+ cmp r0, #0
+ beq.n .L_020013b2
+ ldr r1, [r0, #8]
+ ldr r2, [r0, #16]
+ movs r0, #3
+ bl sub_0200715c
+.L_020013b2:
+ movs r1, #164
+ movs r0, #1
+ lsls r1, r1, #1
+ movs r2, #168
+ bl sub_02007150
+ movs r1, #170
movs r0, #2
lsls r1, r1, #1
- movs r2, #140
- bl sub_020068d4
- movs r2, #140
+ movs r2, #196
+ bl sub_0200715c
+ movs r1, #163
+ movs r2, #204
movs r0, #3
- ldr r1, [pc, #864]
- bl sub_020068e6
- movs r0, #0
- movs r1, #1
- bl sub_02006906
+ lsls r1, r1, #1
+ bl sub_02007170
movs r0, #1
movs r1, #1
- bl sub_0200690e
+ bl sub_02007190
movs r0, #2
movs r1, #1
- bl sub_02006916
- movs r0, #0
- mov r1, r9
- movs r2, #0
- bl sub_02006980
- movs r0, #1
- mov r1, r9
- movs r2, #0
- bl sub_0200698a
- movs r0, #2
- mov r1, r9
- movs r2, #0
- bl sub_02006994
- mov r1, r9
- movs r2, #0
- movs r0, #3
- bl sub_0200699e
- movs r0, #18
- bl sub_02006934
- movs r1, #0
- movs r2, #0
- movs r0, #18
- bl sub_02006946
- ldr r6, [pc, #780]
- ldr r0, [pc, #784]
- bl sub_02006a6e
- ldr r0, [pc, #780]
- bl sub_0200699c
- adds r0, r6, #0
- bl .L_02001442
- movs r0, #0
- adds r1, r7, #0
- movs r2, #0
- bl sub_020069cc
+ bl sub_02007198
movs r0, #1
adds r1, r7, #0
movs r2, #0
- bl sub_020069d6
+ bl sub_02007202
movs r2, #0
movs r0, #2
adds r1, r7, #0
- bl sub_020069e0
- adds r1, r7, #0
+ bl sub_0200720c
movs r0, #3
- bl .L_0200147c
- bl sub_02006a24
- mov r3, r8
- adds r0, #85
- strb r3, [r0, #0]
- ldr r1, [pc, #724]
- ldr r0, [pc, #728]
- bl sub_02006a1a
- movs r0, #152
- movs r1, #128
- movs r2, #158
- movs r3, #1
- lsls r1, r1, #14
- lsls r2, r2, #16
- lsls r0, r0, #17
- bl sub_02006a34
- bl sub_02006a40
+ adds r1, r7, #0
+ bl .L_02001ca8
movs r0, #20
- bl sub_0200692e
- movs r2, #208
- lsls r2, r2, #8
- mov fp, r2
+ movs r1, #0
+ movs r2, #0
+ bl sub_0200721e
+ movs r2, #40
+ movs r0, #19
+ movs r1, #0
+ bl sub_02007228
+ movs r1, #2
movs r0, #20
- mov r1, fp
- ldr r5, [pc, #688]
- bl sub_020014ba
- movs r1, #1
+ bl sub_020071f8
movs r0, #20
- bl sub_020069f6
- movs r0, #61
- bl sub_02006aec
- adds r0, r5, #0
- bl sub_020014ba
- movs r1, #4
+ bl sub_02001cb6
+ adds r1, r7, #0
movs r0, #19
- bl sub_020069e2
- adds r0, r6, #0
- bl sub_020014c8
- movs r3, #176
- lsls r3, r3, #8
-.L_02000c3a:
- mov sl, r3
- movs r0, #20
- mov r1, sl
- bl sub_020014ea
- ldr r1, [pc, #636]
- movs r2, #40
- movs r0, #20
- bl sub_02006a70
- adds r0, r5, #0
- bl .L_020014e6
- movs r0, #21
- bl .L_020014ec
- movs r1, #128
- movs r0, #19
- lsls r1, r1, #1
- movs r2, #0
- bl sub_02006a88
- movs r1, #128
- movs r0, #20
- lsls r1, r1, #1
- movs r2, #20
- bl sub_02006a94
- movs r1, #192
- movs r0, #6
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02006a90
- movs r1, #160
- movs r0, #19
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02006a9c
- movs r1, #160
- movs r2, #20
- movs r0, #20
- lsls r1, r1, #7
- bl sub_02006aa8
- ldr r0, [pc, #560]
- ldr r1, [pc, #560]
- bl sub_02006ad0
- movs r0, #147
- movs r1, #1
- movs r2, #194
- movs r3, #1
- negs r1, r1
- lsls r2, r2, #16
- lsls r0, r0, #17
- bl sub_02006aea
- movs r0, #20
- bl sub_020069e0
- movs r0, #21
- ldr r1, [pc, #488]
- ldr r2, [pc, #484]
- bl sub_02006a1a
- movs r1, #136
- movs r2, #200
- movs r0, #21
- lsls r1, r1, #1
- bl sub_02006a66
- movs r1, #1
- movs r0, #20
- bl sub_02006aae
- movs r0, #20
- bl sub_02006a04
- adds r0, r5, #0
- bl .L_02001572
+ bl .L_02001cd2
+ ldr r2, [pc, #688]
+ mov r8, r2
+ mov r0, r8
+ bl .L_02001cc8
movs r2, #20
- ldr r1, [pc, #492]
- movs r0, #19
- bl sub_02006b0c
- movs r0, #19
- bl .L_02001582
- movs r1, #3
+ ldr r1, [pc, #680]
movs r0, #21
- bl sub_02006ab2
+ bl sub_02007262
movs r0, #21
- bl .L_02001590
- movs r2, #40
- ldr r1, [pc, #464]
- movs r0, #20
- bl sub_02006b2a
- adds r0, r5, #0
- bl .L_020015a0
- movs r1, #4
+.L_02001442:
+ bl .L_02001cd8
movs r0, #21
- bl sub_02006ad0
+ movs r1, #2
+ bl sub_02007220
movs r0, #21
- bl sub_020015ae
- movs r0, #19
- ldr r1, [pc, #436]
- movs r2, #60
- bl sub_02006b48
- movs r0, #19
- movs r1, #0
- movs r2, #40
- bl sub_02006b3a
- movs r1, #131
- movs r2, #40
- movs r0, #19
- lsls r1, r1, #1
- bl sub_02006b5e
- adds r1, r7, #0
- movs r0, #19
- bl .L_020015ea
- ldr r2, [pc, #400]
- mov r8, r2
- mov r0, r8
- bl .L_020015e0
- movs r0, #6
movs r1, #0
- movs r2, #0
- bl sub_02006b6a
- ldr r1, [pc, #372]
+ movs r2, #20
+ bl sub_02007262
+ movs r1, #208
movs r2, #40
+ lsls r1, r1, #8
movs r0, #21
- bl sub_02006b84
- movs r0, #21
- bl .L_020015fa
- movs r1, #192
- movs r0, #19
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02006b86
- movs r2, #40
- movs r0, #20
- mov r1, sl
- bl sub_02006b90
- movs r1, #1
+ bl sub_02007276
movs r0, #21
- bl sub_02006b60
+ bl .L_02001cfc
movs r0, #21
- bl .L_0200161e
- movs r6, #160
- movs r1, #160
- movs r2, #0
- lsls r6, r6, #7
- movs r0, #20
- lsls r1, r1, #7
- bl sub_02006bae
- adds r1, r6, #0
- movs r0, #19
- bl .L_0200164a
- movs r1, #132
- lsls r1, r1, #1
- movs r2, #20
- movs r0, #19
- bl sub_02006bd2
- mov r0, r8
- bl sub_02001648
+ movs r1, #4
+ bl sub_0200722c
movs r0, #21
- ldr r1, [pc, #276]
+ movs r1, #0
+ bl sub_02001d20
movs r2, #20
- bl sub_02006be2
+.L_0200147c:
movs r0, #21
movs r1, #0
- movs r2, #20
- bl sub_02006bd4
- movs r2, #40
+ bl sub_0200728e
+ ldr r5, [pc, #608]
movs r0, #20
+ movs r1, #1
+ bl sub_02007268
adds r1, r7, #0
- bl sub_02006be6
movs r0, #20
- movs r1, #4
- bl sub_02006b96
+ bl .L_02001d3c
adds r0, r5, #0
- movs r2, #40
+ bl .L_02001d2e
+ movs r1, #129
+ movs r0, #3
+ lsls r1, r1, #1
+ bl sub_020072d0
+ movs r1, #2
+ movs r0, #3
+ bl sub_02007280
+ movs r0, #3
+ bl .L_02001d46
+ movs r1, #1
+ movs r0, #2
+ bl sub_02007296
+ movs r0, #2
+ bl sub_02001d54
movs r1, #0
- bl sub_02006bf0
- movs r0, #21
- movs r1, #3
- bl sub_02006ba8
- movs r0, #21
+ movs r0, #19
+ bl .L_02001d70
+ movs r0, #19
+ bl .L_02001d62
+ movs r1, #131
+ movs r0, #20
+ lsls r1, r1, #1
+ movs r2, #40
+ bl sub_020072fe
movs r1, #0
movs r2, #20
- bl sub_02006c02
- movs r2, #20
- adds r1, r6, #0
movs r0, #20
- bl sub_02006c14
- movs r1, #2
- movs r0, #21
- bl sub_02006bdc
- movs r0, #21
- bl .L_020016a2
+ bl sub_020072f8
+.L_020014e6:
movs r0, #20
- ldr r1, [pc, #176]
+ bl .L_02001d7e
+.L_020014ec:
+ movs r1, #160
+ movs r0, #0
+ lsls r1, r1, #8
+ movs r2, #0
+ bl sub_0200730a
+ movs r1, #128
+ movs r0, #1
+ lsls r1, r1, #6
+ movs r2, #0
+ bl sub_02007316
+ movs r1, #192
+ movs r0, #2
+ lsls r1, r1, #7
+ movs r2, #0
+ bl sub_02007322
+ movs r1, #224
+ movs r0, #3
+ lsls r1, r1, #8
+ movs r2, #0
+ movs r6, #192
+ bl sub_02007330
+ lsls r6, r6, #6
movs r2, #0
- bl sub_02006c3c
- movs r2, #80
- movs r0, #19
- ldr r1, [pc, #164]
- bl sub_02006c46
- movs r1, #2
- movs r0, #21
- bl sub_02006bfe
movs r0, #21
- bl .L_020016c4
- movs r2, #60
- ldr r1, [pc, #156]
+ adds r1, r7, #0
+ bl sub_0200733c
movs r0, #19
- bl sub_02006c5e
- mov r0, r8
- bl sub_020016d4
- movs r1, #3
- movs r0, #21
- bl sub_02006c04
- movs r0, #21
- bl sub_020016e2
+ adds r1, r6, #0
+ bl .L_02001dd8
+ movs r1, #129
+ movs r2, #40
+ lsls r1, r1, #1
movs r0, #19
- movs r1, #1
- bl sub_02006c2a
- movs r1, #1
+ bl sub_02007360
+ movs r0, #19
+ bl .L_02001dd6
+ movs r1, #176
+ lsls r1, r1, #8
movs r0, #20
- bl sub_02006c3a
+ bl .L_02001df4
+ adds r0, r5, #0
+ bl .L_02001de6
+ adds r1, r7, #0
+ movs r2, #20
movs r0, #20
- bl sub_02006b90
- movs r0, #21
- movs r1, #4
- bl sub_02006c28
+ bl sub_02007370
+ adds r0, r5, #0
+ bl .L_02001df6
+ movs r0, #19
+ adds r1, r7, #0
+ movs r2, #0
+ bl sub_02007380
+ movs r0, #0
+ adds r1, r7, #0
+.L_02001572:
+ movs r2, #0
+ bl sub_0200738a
+ movs r0, #1
+ adds r1, r7, #0
+ movs r2, #0
+ bl sub_02007394
+.L_02001582:
+ movs r0, #2
+ adds r1, r7, #0
+ movs r2, #0
+ bl sub_0200739e
+ movs r0, #3
+ adds r1, r7, #0
+.L_02001590:
+ movs r2, #0
+ bl sub_020073a8
movs r0, #21
movs r1, #0
movs r2, #20
- bl sub_02006c82
- movs r0, #20
- ldr r1, [pc, #72]
- movs r2, #60
- bl sub_02006ca4
+ bl sub_020073b2
+.L_020015a0:
+ ldr r1, [pc, #328]
+ movs r2, #40
+ movs r0, #6
+ bl sub_020073cc
+ movs r0, #6
+ bl .L_02001e42
movs r2, #20
+ ldr r1, [pc, #304]
+ movs r0, #20
+ bl sub_020073dc
adds r0, r5, #0
- movs r1, #0
- bl sub_02006c96
- mov r1, sl
- movs r0, #21
- bl .L_0200173a
- movs r0, #21
- b.n .L_02000edc
- .4byte 0xffe00000
- .4byte 0x00000212
- .4byte 0x00006666
- .4byte 0x0000cccc
- .4byte 0x00000202
- .4byte 0x00004013
- .4byte 0x00000121
- .4byte 0x00002757
- .4byte 0x00009999
- .4byte 0x0004cccc
- .4byte 0x00002014
- .4byte 0x00000105
- .4byte 0x00019999
- .4byte 0x00003333
- .4byte 0x00000103
- .4byte 0x00000101
- .2byte 0x2013
- .2byte 0x0000
-.L_02000edc:
- bl .L_02001772
- movs r1, #192
- lsls r1, r1, #6
- movs r0, #6
- bl .L_02001790
+ bl sub_02001e52
movs r1, #2
movs r0, #6
- bl sub_02006ccc
+ bl sub_020073a2
movs r0, #20
- bl sub_02006c22
- movs r0, #21
- mov r1, fp
- bl sub_020017a6
- movs r1, #4
- movs r0, #19
- bl sub_02006cc2
- mov r0, r8
- bl .L_020017a0
- movs r2, #0
+ bl sub_020072f8
+ movs r1, #3
movs r0, #6
- movs r1, #0
- bl sub_02006d2a
- movs r1, #1
- movs r0, #21
- bl sub_02006cfa
- movs r0, #21
- bl .L_020017b8
+ bl sub_02007388
+ movs r0, #6
+ bl sub_02001e6e
movs r1, #3
movs r0, #20
- bl sub_02006ce8
+.L_020015e0:
+ bl sub_0200739e
adds r0, r5, #0
- bl .L_020017c6
- movs r1, #4
- movs r0, #21
- bl sub_02006cf6
+ bl .L_02001e7c
+.L_020015ea:
+ movs r0, #6
+ ldr r1, [pc, #220]
+ ldr r2, [pc, #256]
+ bl sub_0200734e
+ movs r1, #130
+ movs r0, #6
+ lsls r1, r1, #1
+.L_020015fa:
+ movs r2, #186
+ bl sub_0200739a
movs r0, #21
- bl sub_020017d4
- movs r0, #20
- ldr r1, [pc, #772]
- movs r2, #0
- bl sub_02006d6e
- movs r0, #19
- ldr r1, [pc, #764]
- movs r2, #80
- bl sub_02006d78
- movs r0, #19
- adds r1, r7, #0
- movs r2, #0
- bl sub_02006d72
+ adds r1, r6, #0
movs r2, #0
- movs r0, #20
- adds r1, r7, #0
- bl sub_02006d7c
- ldr r0, [pc, #740]
- ldr r1, [pc, #740]
- bl sub_02006da4
- movs r0, #147
- movs r1, #1
- movs r2, #180
- movs r3, #1
- lsls r0, r0, #17
- negs r1, r1
- lsls r2, r2, #16
- bl sub_02006dbe
- movs r1, #131
- movs r0, #21
+ bl sub_0200741c
+ movs r1, #138
+ movs r2, #192
lsls r1, r1, #1
- movs r2, #176
- bl sub_02006d2a
- movs r0, #21
- adds r1, r7, #0
- movs r2, #40
- ldr r6, [pc, #704]
- bl sub_02006dae
- movs r2, #20
- movs r0, #21
- movs r1, #0
- bl sub_02006db8
+ movs r0, #6
+ bl sub_020073b0
+ movs r0, #19
+ bl sub_02007366
+ movs r3, #160
+.L_0200161e:
+ lsls r3, r3, #7
+ strh r3, [r0, #6]
+ movs r0, #1
+ bl sub_02007222
movs r1, #2
- movs r0, #21
- bl sub_02006d80
- adds r0, r6, #0
- bl .L_02001846
- movs r1, #128
- movs r2, #20
- lsls r1, r1, #1
movs r0, #19
- bl sub_02006de2
+ bl sub_02007402
mov r0, r8
- bl sub_02001858
+ bl sub_02001ec8
+ movs r0, #6
movs r1, #2
- movs r0, #21
- bl sub_02006da0
- adds r0, r6, #0
- bl .L_02001866
- movs r0, #20
- ldr r1, [pc, #644]
- movs r2, #40
- bl sub_02006e00
- ldr r0, [pc, #640]
- movs r1, #0
- movs r2, #20
- bl sub_02006df2
- ldr r1, [pc, #632]
- movs r2, #20
- movs r0, #21
- bl sub_02006e14
- adds r0, r6, #0
- bl .L_0200188a
- ldr r1, [pc, #608]
movs r2, #20
- movs r0, #19
- bl sub_02006e24
- mov r0, r8
- bl .L_0200189a
- movs r2, #40
- ldr r1, [pc, #576]
+ bl sub_0200740a
+ movs r0, #6
+ ldr r1, [pc, #176]
+ ldr r2, [pc, #176]
+ bl sub_020073a4
+.L_0200164a:
+ movs r1, #130
+ movs r0, #6
+ lsls r1, r1, #1
+ movs r2, #186
+ bl sub_020073f0
movs r0, #21
- bl sub_02006e34
- ldr r5, [pc, #588]
- adds r0, r6, #0
- bl .L_020018ac
- movs r1, #4
- movs r0, #20
- bl sub_02006ddc
- adds r0, r5, #0
- bl .L_020018ba
- movs r1, #3
+ adds r1, r7, #0
+ movs r2, #0
+ bl sub_02007472
+ movs r0, #6
+ movs r1, #248
+ movs r2, #172
+ bl sub_02007404
movs r0, #19
- bl sub_02006dea
- mov r0, r8
- bl .L_020018c8
- movs r0, #21
- ldr r1, [pc, #544]
- movs r2, #60
- bl sub_02006e62
+ adds r1, r7, #0
+ movs r2, #0
+ bl sub_02007486
movs r0, #21
adds r1, r7, #0
+ movs r2, #0
+ bl sub_02007490
movs r2, #20
- bl sub_02006e5c
- ldr r0, [pc, #540]
- movs r1, #0
- movs r2, #40
- bl sub_02006e5e
movs r0, #6
- ldr r1, [pc, #524]
- movs r2, #120
- bl sub_02006e80
- ldr r1, [pc, #516]
- movs r2, #60
- movs r0, #20
- bl sub_02006e8a
- adds r0, r5, #0
- bl .L_02001900
- movs r2, #40
- movs r0, #21
movs r1, #0
- bl sub_02006e8a
+ bl sub_0200749a
movs r1, #3
- movs r0, #19
- bl sub_02006e32
- mov r0, r8
- bl .L_02001918
- movs r0, #21
- movs r1, #1
- bl sub_02006e68
- adds r0, r6, #0
- movs r1, #0
- movs r2, #20
- bl sub_02006ea2
- adds r0, r5, #0
- bl sub_02001930
- movs r1, #128
- movs r2, #40
- movs r0, #21
- lsls r1, r1, #1
- bl sub_02006ecc
- movs r1, #4
- movs r0, #19
- bl sub_02006e64
- mov r0, r8
- bl .L_0200194a
movs r0, #6
- ldr r1, [pc, #424]
- movs r2, #40
- bl sub_02006ee4
- movs r1, #132
- lsls r1, r1, #1
- movs r2, #40
- movs r0, #20
- bl sub_02006ef0
- adds r0, r5, #0
- bl .L_02001966
- movs r2, #20
- ldr r1, [pc, #388]
- movs r0, #19
- bl sub_02006f00
- mov r0, r8
- bl sub_02001976
- movs r1, #1
- movs r0, #21
- bl sub_02006ec6
- movs r0, #20
- bl sub_02006e1c
- movs r1, #2
- movs r0, #20
- bl sub_02006ecc
- adds r0, r5, #0
- bl .L_02001992
- movs r1, #4
- movs r0, #19
- bl sub_02006eba
- mov r0, r8
- bl sub_020019a0
- ldr r6, [pc, #348]
- movs r2, #224
- ldr r3, [r6, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- adds r2, #66
- str r2, [r3, #0]
- bl sub_02006fba
- bl sub_02006fc6
- movs r0, #252
- movs r2, #168
- movs r3, #0
- lsls r2, r2, #16
- ldr r1, [pc, #320]
- lsls r0, r0, #17
- bl sub_02006f6e
- movs r0, #1
- bl sub_02006d34
- bl sub_02006db8
- movs r0, #1
- bl sub_02006d3e
- ldr r5, [pc, #300]
- bl sub_02006fdc
- bl sub_02006ff0
- movs r0, #20
- bl sub_02006e7e
- movs r1, #1
+ bl sub_0200744a
+ movs r0, #40
+ bl sub_020073c0
+ bl .L_020039cc
movs r0, #1
- bl sub_02006f36
- adds r0, r5, #0
- bl .L_020019f4
- movs r2, #40
- ldr r1, [pc, #228]
- movs r0, #3
- bl sub_02006f8e
- movs r0, #3
- bl sub_02001a04
- movs r0, #2
- movs r1, #3
- bl sub_02006f34
- ldr r0, [pc, #252]
- movs r1, #0
- movs r2, #40
- bl sub_02006f8e
- movs r2, #20
- movs r1, #2
+ bl sub_0200729a
+ movs r5, #0
+.L_020016a2:
+ movs r0, #6
+ bl sub_020073f2
+ bl .L_02003786
+ adds r5, #1
movs r0, #1
- bl sub_02006f58
- adds r0, r5, #0
- bl .L_02001a26
- movs r1, #0
+ bl sub_020072ae
+ cmp r5, #39
+ bls.n .L_020016a2
+ ldr r5, [pc, #64]
+ movs r1, #200
+ lsls r1, r1, #4
adds r0, r5, #0
- bl sub_02006f96
+ bl sub_020072c6
+.L_020016c4:
+ movs r0, #80
+ b.n .L_02001700
+ .4byte 0x00001999
+ .4byte 0x0000cccc
+ .4byte 0x0000278e
+ .4byte 0x00009015
+ .4byte 0x00016666
+ .4byte 0x0000b333
+ .4byte 0x00002013
+ .4byte 0x00000103
+ .4byte 0x00002014
+ .4byte 0x00000101
+ .4byte 0x00006666
+ .4byte 0x00026666
+ .4byte 0x00013333
+ .2byte 0xa351
+ .2byte 0x0200
+.L_02001700:
+ bl sub_0200742e
+ movs r1, #160
movs r0, #0
- movs r1, #0
- movs r2, #0
- bl sub_02006fb8
- movs r0, #2
- mov r1, r9
+ lsls r1, r1, #8
movs r2, #0
- bl sub_02006fc2
+ bl sub_02007522
movs r1, #128
- movs r0, #3
+ movs r0, #1
lsls r1, r1, #6
movs r2, #0
- bl sub_02006fce
- movs r0, #0
- movs r1, #0
- bl sub_02006f06
- cmp r0, #1
- bne.n .L_020011d6
- ldr r2, [r6, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_020011d6:
- movs r0, #20
- bl sub_02006f06
- movs r0, #1
- bl sub_02001a74
+ bl sub_0200752e
+ movs r1, #192
movs r0, #2
- movs r1, #0
+ lsls r1, r1, #7
movs r2, #0
- bl sub_02006ffe
- movs r2, #20
- adds r1, r7, #0
- movs r0, #3
- bl sub_02007008
- movs r0, #0
- movs r1, #3
- bl sub_02006fb0
- movs r0, #1
- movs r1, #3
- bl sub_02006fb8
- movs r0, #2
- movs r1, #3
- bl sub_02006fc0
- movs r0, #3
- movs r1, #3
- bl sub_02006fd0
- ldr r5, [pc, #100]
- movs r0, #1
- adds r1, r5, #0
- bl sub_02006f82
- adds r1, r5, #0
- movs r0, #2
- bl sub_02006f8a
- adds r1, r5, #0
+ bl sub_0200753a
+ movs r1, #224
movs r0, #3
- bl sub_02006faa
- movs r0, #20
- bl sub_02006f60
- bl sub_02006f74
- pop {r3, r5, r6, r7}
- mov r8, r3
- mov r9, r5
- mov sl, r6
- mov fp, r7
- pop {r5, r6, r7}
- pop {r0}
- bx r0
- .2byte 0x0000
- .4byte 0x00000101
- .4byte 0x00006666
- .4byte 0x00000ccc
- .4byte 0x00008015
- .4byte 0x00000103
- .4byte 0x0000a014
- .4byte 0x00000105
- .4byte 0x0000a015
- .4byte 0x03001ebc
- .4byte 0xffe80000
- .4byte 0x00008001
- .4byte 0x00001002
- .2byte 0xdfc4
- .2byte 0x0200
-AlchemyC_02001280:
- .space 0x48
- push {r5, r6, r7, lr}
- mov r7, sl
- mov r6, r8
- push {r6, r7}
- bl sub_02007006
- bl sub_02007122
- movs r5, #0
- adds r0, #85
- strb r5, [r0, #0]
- ldr r1, [pc, #1000]
- ldr r0, [pc, #1000]
- bl sub_02007118
- movs r0, #166
- movs r1, #128
- movs r2, #180
- movs r3, #1
- lsls r0, r0, #17
- lsls r1, r1, #14
- lsls r2, r2, #16
- bl sub_02007132
- movs r1, #128
- movs r2, #128
- movs r0, #0
- lsls r1, r1, #9
- lsls r2, r2, #8
- bl sub_02007060
- movs r7, #128
- movs r1, #170
- movs r2, #184
- lsls r7, r7, #8
- movs r0, #0
- lsls r1, r1, #1
- bl sub_020070b0
- movs r0, #0
- adds r1, r7, #0
- bl .L_02001bc4
- movs r1, #1
+ lsls r1, r1, #8
+ movs r2, #20
+ bl sub_02007546
movs r0, #21
- bl sub_02007100
- ldr r0, [pc, #936]
- bl sub_0200711e
- ldr r0, [pc, #932]
- bl .L_02001bc4
- bl sub_02007180
- adds r0, #85
- strb r5, [r0, #0]
- ldr r1, [pc, #908]
- ldr r0, [pc, #908]
- bl sub_02007174
- movs r0, #152
+ movs r1, #0
+ movs r2, #40
+.L_0200173a:
+ bl sub_02007550
movs r1, #128
- movs r2, #180
- movs r3, #1
- lsls r0, r0, #17
- lsls r1, r1, #14
- lsls r2, r2, #16
- bl sub_0200718e
+ movs r0, #0
+ lsls r1, r1, #8
+ movs r2, #0
+ bl sub_0200755c
movs r1, #128
movs r0, #1
- lsls r1, r1, #9
- adds r2, r7, #0
- bl sub_020070ba
+ lsls r1, r1, #8
+ movs r2, #0
+ bl sub_02007568
movs r1, #128
movs r0, #2
- lsls r1, r1, #9
- adds r2, r7, #0
- bl sub_020070c6
- movs r0, #3
- ldr r1, [pc, #872]
- ldr r2, [pc, #872]
- bl sub_020070d0
- movs r0, #0
- bl sub_020070c6
- cmp r0, #0
- beq.n .L_0200138a
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #1
- bl sub_02007134
-.L_0200138a:
- movs r0, #0
- bl sub_020070da
- cmp r0, #0
- beq.n .L_0200139e
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #2
- bl sub_02007148
-.L_0200139e:
- movs r0, #0
- bl sub_020070ee
- cmp r0, #0
- beq.n .L_020013b2
- ldr r1, [r0, #8]
- ldr r2, [r0, #16]
- movs r0, #3
- bl sub_0200715c
-.L_020013b2:
- movs r1, #164
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #168
- bl sub_02007150
- movs r1, #170
- movs r0, #2
- lsls r1, r1, #1
- movs r2, #196
- bl sub_0200715c
- movs r1, #163
- movs r2, #204
- movs r0, #3
- lsls r1, r1, #1
- bl sub_02007170
- movs r0, #1
- movs r1, #1
- bl sub_02007190
- movs r0, #2
- movs r1, #1
- bl sub_02007198
- movs r0, #1
- adds r1, r7, #0
+ lsls r1, r1, #8
movs r2, #0
- bl sub_02007202
+ bl sub_02007574
+ movs r1, #128
movs r2, #0
- movs r0, #2
- adds r1, r7, #0
- bl sub_0200720c
movs r0, #3
- adds r1, r7, #0
- bl .L_02001ca8
+ lsls r1, r1, #8
+ bl sub_02007580
+ movs r1, #128
+ lsls r1, r1, #8
+.L_02001772:
+ movs r0, #21
+ bl .L_0200201e
movs r0, #20
- movs r1, #0
- movs r2, #0
- bl sub_0200721e
+ ldr r1, [pc, #692]
movs r2, #40
- movs r0, #19
+ bl sub_020075a4
+ ldr r0, [pc, #688]
movs r1, #0
- bl sub_02007228
+ movs r2, #20
+ bl sub_02007596
+ movs r2, #80
+ movs r0, #6
+.L_02001790:
+ ldr r1, [pc, #676]
+ bl sub_020075b8
movs r1, #2
- movs r0, #20
- bl sub_020071f8
- movs r0, #20
- bl sub_02001cb6
- adds r1, r7, #0
movs r0, #19
- bl .L_02001cd2
- ldr r2, [pc, #688]
- mov r8, r2
+ bl sub_02007570
+ ldr r3, [pc, #668]
+.L_020017a0:
+ mov r8, r3
mov r0, r8
- bl .L_02001cc8
- movs r2, #20
- ldr r1, [pc, #680]
- movs r0, #21
- bl sub_02007262
- movs r0, #21
-.L_02001442:
- bl .L_02001cd8
- movs r0, #21
- movs r1, #2
- bl sub_02007220
- movs r0, #21
+ bl .L_0200203a
+ adds r0, r5, #0
+ bl sub_020073b8
+ movs r0, #1
+ bl sub_020073ae
movs r1, #0
- movs r2, #20
- bl sub_02007262
- movs r1, #208
+ movs r0, #6
+.L_020017b8:
+ bl sub_0200759e
+ movs r0, #10
+ bl sub_020073bc
+ bl .L_02003b08
+.L_020017c6:
+ movs r1, #2
movs r2, #40
- lsls r1, r1, #8
- movs r0, #21
- bl sub_02007276
- movs r0, #21
- bl .L_02001cfc
- movs r0, #21
- movs r1, #4
- bl sub_0200722c
- movs r0, #21
- movs r1, #0
- bl sub_02001d20
+ movs r0, #6
+ bl sub_0200759a
+ movs r0, #6
+ bl sub_02002068
+ ldr r1, [pc, #616]
+ movs r0, #20
movs r2, #20
-.L_0200147c:
+ bl sub_02007602
+ ldr r2, [pc, #592]
+ mov sl, r2
+ mov r0, sl
+ bl .L_0200207c
+ movs r1, #2
+ movs r0, #6
+ bl sub_020075cc
+ movs r0, #6
+ bl sub_02007542
+ adds r0, #90
+ ldrb r2, [r0, #0]
+ movs r5, #254
+ adds r3, r5, #0
+ ands r3, r2
+ strb r3, [r0, #0]
+ movs r1, #250
+ movs r2, #176
+ movs r0, #6
+ bl sub_020075a8
+ movs r0, #1
+ bl sub_0200753e
+ movs r0, #6
+ bl sub_02007564
+ adds r0, #90
+ ldrb r3, [r0, #0]
+ movs r6, #1
+ orrs r3, r6
+ strb r3, [r0, #0]
+ ldr r1, [pc, #536]
movs r0, #21
+ movs r2, #20
+ bl sub_02007650
+ movs r2, #20
movs r1, #0
- bl sub_0200728e
- ldr r5, [pc, #608]
+ movs r0, #21
+ bl sub_0200764a
+ movs r0, #21
+ bl sub_020020d0
+ movs r1, #4
+ movs r0, #19
+ bl sub_02007600
+.L_02001846:
+ mov r0, r8
+ bl .L_020020de
+ movs r1, #2
+ movs r0, #6
+ bl sub_0200762e
+ movs r0, #40
+ bl sub_02007584
+ ldr r1, [pc, #488]
+ ldr r2, [pc, #488]
+ movs r0, #6
+ bl sub_020075be
+ movs r0, #6
+.L_02001866:
+ bl sub_020075b4
+ adds r0, #90
+ ldrb r3, [r0, #0]
+ ands r5, r3
+ movs r2, #172
+ movs r1, #248
+ strb r5, [r0, #0]
+ movs r0, #6
+ bl sub_02007616
+ movs r0, #1
+ bl sub_020075ac
+ movs r0, #6
+ bl sub_020075d2
+ adds r0, #90
+.L_0200188a:
+ ldrb r3, [r0, #0]
+ orrs r6, r3
+ strb r6, [r0, #0]
movs r0, #20
- movs r1, #1
- bl sub_02007268
- adds r1, r7, #0
+ bl sub_020075c0
+ movs r1, #3
+ movs r0, #6
+.L_0200189a:
+ bl sub_02007658
movs r0, #20
- bl .L_02001d3c
- adds r0, r5, #0
- bl .L_02001d2e
- movs r1, #129
- movs r0, #3
- lsls r1, r1, #1
- bl sub_020072d0
- movs r1, #2
- movs r0, #3
- bl sub_02007280
- movs r0, #3
- bl .L_02001d46
- movs r1, #1
- movs r0, #2
- bl sub_02007296
- movs r0, #2
- bl sub_02001d54
- movs r1, #0
+ bl sub_020075ce
+ movs r1, #3
movs r0, #19
- bl .L_02001d70
+ bl sub_02007666
+.L_020018ac:
+ mov r0, r8
+ bl sub_02002144
+ movs r1, #3
+ movs r0, #6
+ bl sub_02007674
+.L_020018ba:
+ movs r0, #6
+ bl .L_02002152
+ movs r1, #192
movs r0, #19
- bl .L_02001d62
- movs r1, #131
- movs r0, #20
- lsls r1, r1, #1
- movs r2, #40
- bl sub_020072fe
- movs r1, #0
- movs r2, #20
- movs r0, #20
- bl sub_020072f8
-.L_020014e6:
- movs r0, #20
- bl .L_02001d7e
-.L_020014ec:
- movs r1, #160
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200730a
- movs r1, #128
- movs r0, #1
lsls r1, r1, #6
movs r2, #0
- bl sub_02007316
- movs r1, #192
- movs r0, #2
- lsls r1, r1, #7
- movs r2, #0
- bl sub_02007322
- movs r1, #224
- movs r0, #3
+.L_020018c8:
+ bl sub_020076de
+ movs r1, #176
+ movs r0, #20
lsls r1, r1, #8
- movs r2, #0
- movs r6, #192
- bl sub_02007330
- lsls r6, r6, #6
- movs r2, #0
- movs r0, #21
- adds r1, r7, #0
- bl sub_0200733c
+ movs r2, #20
+ bl sub_020076ea
movs r0, #19
- adds r1, r6, #0
- bl .L_02001dd8
- movs r1, #129
+ ldr r1, [pc, #348]
+ movs r2, #0
+ bl sub_02007704
+ movs r2, #60
+ movs r0, #20
+ ldr r1, [pc, #336]
+ bl sub_0200770e
+ movs r1, #4
+ movs r0, #20
+ bl sub_020076a6
+ mov r0, sl
+ bl .L_0200218c
+ ldr r1, [pc, #308]
movs r2, #40
- lsls r1, r1, #1
movs r0, #19
- bl sub_02007360
+.L_02001900:
+ bl sub_02007726
movs r0, #19
- bl .L_02001dd6
- movs r1, #176
- lsls r1, r1, #8
+ bl .L_0200219c
+ movs r2, #100
movs r0, #20
- bl .L_02001df4
- adds r0, r5, #0
- bl .L_02001de6
- adds r1, r7, #0
- movs r2, #20
+ ldr r1, [pc, #296]
+ bl sub_02007736
+ movs r1, #1
movs r0, #20
- bl sub_02007370
- adds r0, r5, #0
- bl .L_02001df6
+.L_02001918:
+ bl sub_020076f6
+ movs r0, #20
+ bl sub_0200764c
+ movs r0, #20
+ movs r1, #0
+ bl sub_020021d0
movs r0, #19
- adds r1, r7, #0
- movs r2, #0
- bl sub_02007380
- movs r0, #0
- adds r1, r7, #0
-.L_02001572:
- movs r2, #0
- bl sub_0200738a
+ movs r1, #0
+ bl .L_020021d8
+ movs r1, #0
+ movs r0, #20
+ bl sub_02007734
+ movs r1, #128
movs r0, #1
- adds r1, r7, #0
+ lsls r1, r1, #6
movs r2, #0
- bl sub_02007394
-.L_02001582:
+ bl sub_02007758
+ movs r1, #192
movs r0, #2
- adds r1, r7, #0
+.L_0200194a:
+ lsls r1, r1, #8
movs r2, #0
- bl sub_0200739e
+ bl sub_02007764
+ movs r1, #224
movs r0, #3
- adds r1, r7, #0
-.L_02001590:
+ lsls r1, r1, #8
movs r2, #0
- bl sub_020073a8
- movs r0, #21
+ bl sub_02007770
+ movs r0, #0
movs r1, #0
- movs r2, #20
- bl sub_020073b2
-.L_020015a0:
- ldr r1, [pc, #328]
- movs r2, #40
- movs r0, #6
- bl sub_020073cc
- movs r0, #6
- bl .L_02001e42
- movs r2, #20
- ldr r1, [pc, #304]
+ bl sub_020076a8
+.L_02001966:
+ cmp r0, #0
+ bne.n .L_0200197c
movs r0, #20
- bl sub_020073dc
- adds r0, r5, #0
- bl sub_02001e52
- movs r1, #2
- movs r0, #6
- bl sub_020073a2
+ bl sub_0200769a
movs r0, #20
- bl sub_020072f8
- movs r1, #3
- movs r0, #6
- bl sub_02007388
- movs r0, #6
- bl sub_02001e6e
movs r1, #3
+ bl sub_02007732
+ movs r5, #1
+ b.n .L_0200199c
+.L_0200197c:
movs r0, #20
-.L_020015e0:
- bl sub_0200739e
- adds r0, r5, #0
- bl .L_02001e7c
-.L_020015ea:
- movs r0, #6
- ldr r1, [pc, #220]
- ldr r2, [pc, #256]
- bl sub_0200734e
- movs r1, #130
- movs r0, #6
- lsls r1, r1, #1
-.L_020015fa:
- movs r2, #186
- bl sub_0200739a
- movs r0, #21
- adds r1, r6, #0
- movs r2, #0
- bl sub_0200741c
- movs r1, #138
- movs r2, #192
- lsls r1, r1, #1
- movs r0, #6
- bl sub_020073b0
- movs r0, #19
- bl sub_02007366
- movs r3, #160
-.L_0200161e:
- lsls r3, r3, #7
- strh r3, [r0, #6]
- movs r0, #1
- bl sub_02007222
- movs r1, #2
- movs r0, #19
- bl sub_02007402
- mov r0, r8
- bl sub_02001ec8
- movs r0, #6
- movs r1, #2
- movs r2, #20
- bl sub_0200740a
- movs r0, #6
- ldr r1, [pc, #176]
- ldr r2, [pc, #176]
- bl sub_020073a4
-.L_0200164a:
- movs r1, #130
- movs r0, #6
- lsls r1, r1, #1
- movs r2, #186
- bl sub_020073f0
- movs r0, #21
- adds r1, r7, #0
- movs r2, #0
- bl sub_02007472
- movs r0, #6
- movs r1, #248
- movs r2, #172
- bl sub_02007404
- movs r0, #19
- adds r1, r7, #0
- movs r2, #0
- bl sub_02007486
- movs r0, #21
- adds r1, r7, #0
- movs r2, #0
- bl sub_02007490
- movs r2, #20
- movs r0, #6
- movs r1, #0
- bl sub_0200749a
- movs r1, #3
- movs r0, #6
- bl sub_0200744a
- movs r0, #40
- bl sub_020073c0
- bl .L_020039cc
- movs r0, #1
- bl sub_0200729a
+ bl sub_020076ac
+ movs r0, #20
+ movs r1, #4
+ bl sub_02007744
+ ldr r3, [pc, #192]
+ ldr r2, [r3, #0]
+ movs r3, #236
+ lsls r3, r3, #1
+.L_02001992:
+ adds r2, r2, r3
+ ldrh r3, [r2, #0]
+ adds r3, #1
+ strh r3, [r2, #0]
movs r5, #0
-.L_020016a2:
- movs r0, #6
- bl sub_020073f2
- bl .L_02003786
- adds r5, #1
+.L_0200199c:
+ movs r0, #20
+ bl .L_02002234
+ cmp r5, #0
+ beq.n .L_020019b6
+ ldr r3, [pc, #164]
+ ldr r2, [r3, #0]
+ movs r3, #236
+ lsls r3, r3, #1
+ adds r2, r2, r3
+ ldrh r3, [r2, #0]
+ adds r3, #1
+ strh r3, [r2, #0]
+.L_020019b6:
+ movs r1, #128
movs r0, #1
- bl sub_020072ae
- cmp r5, #39
- bls.n .L_020016a2
- ldr r5, [pc, #64]
- movs r1, #200
- lsls r1, r1, #4
- adds r0, r5, #0
- bl sub_020072c6
-.L_020016c4:
- movs r0, #80
- b.n .L_02001700
- .4byte 0x00001999
- .4byte 0x0000cccc
- .4byte 0x0000278e
- .4byte 0x00009015
- .4byte 0x00016666
- .4byte 0x0000b333
- .4byte 0x00002013
- .4byte 0x00000103
- .4byte 0x00002014
- .4byte 0x00000101
- .4byte 0x00006666
- .4byte 0x00026666
- .4byte 0x00013333
- .2byte 0xa351
- .2byte 0x0200
-.L_02001700:
- bl sub_0200742e
- movs r1, #160
- movs r0, #0
lsls r1, r1, #8
movs r2, #0
- bl sub_02007522
+ bl sub_020077d4
movs r1, #128
- movs r0, #1
- lsls r1, r1, #6
- movs r2, #0
- bl sub_0200752e
- movs r1, #192
movs r0, #2
- lsls r1, r1, #7
+ lsls r1, r1, #8
movs r2, #0
- bl sub_0200753a
- movs r1, #224
+ bl sub_020077e0
+ movs r1, #128
movs r0, #3
lsls r1, r1, #8
movs r2, #20
- bl sub_02007546
- movs r0, #21
- movs r1, #0
+ bl sub_020077ec
+ movs r1, #132
movs r2, #40
-.L_0200173a:
- bl sub_02007550
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200755c
+ movs r0, #20
+ lsls r1, r1, #1
+ bl sub_02007808
+ movs r1, #0
+ movs r0, #20
+ bl sub_020077e8
movs r1, #128
movs r0, #1
- lsls r1, r1, #8
+ lsls r1, r1, #6
+.L_020019f4:
movs r2, #0
- bl sub_02007568
- movs r1, #128
+ bl sub_0200780c
+ movs r1, #192
movs r0, #2
lsls r1, r1, #8
movs r2, #0
- bl sub_02007574
- movs r1, #128
- movs r2, #0
+ bl sub_02007818
+ movs r1, #224
movs r0, #3
lsls r1, r1, #8
- bl sub_02007580
- movs r1, #128
- lsls r1, r1, #8
-.L_02001772:
- movs r0, #21
- bl .L_0200201e
- movs r0, #20
- ldr r1, [pc, #692]
- movs r2, #40
- bl sub_020075a4
- ldr r0, [pc, #688]
- movs r1, #0
- movs r2, #20
- bl sub_02007596
- movs r2, #80
- movs r0, #6
-.L_02001790:
- ldr r1, [pc, #676]
- bl sub_020075b8
- movs r1, #2
- movs r0, #19
- bl sub_02007570
- ldr r3, [pc, #668]
-.L_020017a0:
- mov r8, r3
- mov r0, r8
- bl .L_0200203a
- adds r0, r5, #0
- bl sub_020073b8
- movs r0, #1
- bl sub_020073ae
- movs r1, #0
- movs r0, #6
-.L_020017b8:
- bl sub_0200759e
- movs r0, #10
- bl sub_020073bc
- bl .L_02003b08
-.L_020017c6:
- movs r1, #2
- movs r2, #40
- movs r0, #6
- bl sub_0200759a
- movs r0, #6
- bl sub_02002068
- ldr r1, [pc, #616]
- movs r0, #20
- movs r2, #20
- bl sub_02007602
- ldr r2, [pc, #592]
- mov sl, r2
- mov r0, sl
- bl .L_0200207c
- movs r1, #2
- movs r0, #6
- bl sub_020075cc
- movs r0, #6
- bl sub_02007542
- adds r0, #90
- ldrb r2, [r0, #0]
- movs r5, #254
- adds r3, r5, #0
- ands r3, r2
- strb r3, [r0, #0]
- movs r1, #250
- movs r2, #176
- movs r0, #6
- bl sub_020075a8
- movs r0, #1
- bl sub_0200753e
- movs r0, #6
- bl sub_02007564
- adds r0, #90
- ldrb r3, [r0, #0]
- movs r6, #1
- orrs r3, r6
- strb r3, [r0, #0]
- ldr r1, [pc, #536]
- movs r0, #21
- movs r2, #20
- bl sub_02007650
- movs r2, #20
- movs r1, #0
- movs r0, #21
- bl sub_0200764a
- movs r0, #21
- bl sub_020020d0
- movs r1, #4
- movs r0, #19
- bl sub_02007600
-.L_02001846:
- mov r0, r8
- bl .L_020020de
- movs r1, #2
- movs r0, #6
- bl sub_0200762e
- movs r0, #40
- bl sub_02007584
- ldr r1, [pc, #488]
- ldr r2, [pc, #488]
- movs r0, #6
- bl sub_020075be
- movs r0, #6
-.L_02001866:
- bl sub_020075b4
- adds r0, #90
- ldrb r3, [r0, #0]
- ands r5, r3
- movs r2, #172
- movs r1, #248
- strb r5, [r0, #0]
- movs r0, #6
- bl sub_02007616
- movs r0, #1
- bl sub_020075ac
- movs r0, #6
- bl sub_020075d2
- adds r0, #90
-.L_0200188a:
- ldrb r3, [r0, #0]
- orrs r6, r3
- strb r6, [r0, #0]
- movs r0, #20
- bl sub_020075c0
- movs r1, #3
- movs r0, #6
-.L_0200189a:
- bl sub_02007658
- movs r0, #20
- bl sub_020075ce
- movs r1, #3
- movs r0, #19
- bl sub_02007666
-.L_020018ac:
- mov r0, r8
- bl sub_02002144
- movs r1, #3
- movs r0, #6
- bl sub_02007674
-.L_020018ba:
- movs r0, #6
- bl .L_02002152
- movs r1, #192
- movs r0, #19
- lsls r1, r1, #6
- movs r2, #0
-.L_020018c8:
- bl sub_020076de
- movs r1, #176
- movs r0, #20
- lsls r1, r1, #8
- movs r2, #20
- bl sub_020076ea
- movs r0, #19
- ldr r1, [pc, #348]
- movs r2, #0
- bl sub_02007704
- movs r2, #60
- movs r0, #20
- ldr r1, [pc, #336]
- bl sub_0200770e
- movs r1, #4
- movs r0, #20
- bl sub_020076a6
- mov r0, sl
- bl .L_0200218c
- ldr r1, [pc, #308]
- movs r2, #40
- movs r0, #19
-.L_02001900:
- bl sub_02007726
- movs r0, #19
- bl .L_0200219c
- movs r2, #100
- movs r0, #20
- ldr r1, [pc, #296]
- bl sub_02007736
- movs r1, #1
- movs r0, #20
-.L_02001918:
- bl sub_020076f6
- movs r0, #20
- bl sub_0200764c
- movs r0, #20
- movs r1, #0
- bl sub_020021d0
- movs r0, #19
- movs r1, #0
- bl .L_020021d8
- movs r1, #0
- movs r0, #20
- bl sub_02007734
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #6
- movs r2, #0
- bl sub_02007758
- movs r1, #192
- movs r0, #2
-.L_0200194a:
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02007764
- movs r1, #224
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02007770
- movs r0, #0
- movs r1, #0
- bl sub_020076a8
-.L_02001966:
- cmp r0, #0
- bne.n .L_0200197c
- movs r0, #20
- bl sub_0200769a
- movs r0, #20
- movs r1, #3
- bl sub_02007732
- movs r5, #1
- b.n .L_0200199c
-.L_0200197c:
- movs r0, #20
- bl sub_020076ac
- movs r0, #20
- movs r1, #4
- bl sub_02007744
- ldr r3, [pc, #192]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
-.L_02001992:
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
- movs r5, #0
-.L_0200199c:
- movs r0, #20
- bl .L_02002234
- cmp r5, #0
- beq.n .L_020019b6
- ldr r3, [pc, #164]
- ldr r2, [r3, #0]
- movs r3, #236
- lsls r3, r3, #1
- adds r2, r2, r3
- ldrh r3, [r2, #0]
- adds r3, #1
- strh r3, [r2, #0]
-.L_020019b6:
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020077d4
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_020077e0
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #20
- bl sub_020077ec
- movs r1, #132
- movs r2, #40
- movs r0, #20
- lsls r1, r1, #1
- bl sub_02007808
- movs r1, #0
- movs r0, #20
- bl sub_020077e8
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #6
-.L_020019f4:
- movs r2, #0
- bl sub_0200780c
- movs r1, #192
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02007818
- movs r1, #224
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_02007824
- movs r0, #0
+ movs r2, #0
+ bl sub_02007824
+ movs r0, #0
movs r1, #0
bl sub_0200775c
cmp r0, #0
@@ -7190,837 +6221,160 @@ AlchemyC_02003924:
movs r0, #252
movs r2, #190
movs r3, #1
-.L_020040c0:
- lsls r2, r2, #16
- movs r1, #0
- lsls r0, r0, #16
- bl sub_02009f04
- bl sub_02009f10
- movs r0, #40
- bl sub_02009dfe
- movs r0, #23
- bl sub_02009fa4
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #21
- bl sub_02009f0e
- movs r0, #21
- bl sub_0200497c
- movs r1, #1
- movs r0, #21
- bl sub_02009ecc
- movs r0, #20
- bl sub_02009e22
- movs r0, #21
- bl .L_02004990
- movs r1, #4
- movs r0, #21
- bl sub_02009ec0
- movs r0, #21
- bl sub_0200499e
- movs r1, #192
- movs r2, #20
- lsls r1, r1, #6
- movs r0, #21
- bl sub_02009f2a
- movs r0, #21
- bl .L_020049b0
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #6
- bl sub_02009f52
- ldr r5, [pc, #264]
- movs r0, #20
- bl sub_02009e5a
-.L_02004130:
- movs r1, #2
- movs r0, #3
- bl sub_02009f0a
- adds r0, r5, #0
- bl .L_020049d0
- movs r1, #2
- movs r0, #21
- bl sub_02009f20
- adds r6, #2
- movs r0, #20
- bl sub_02009e78
- adds r0, r6, #0
- bl .L_020049e6
- movs r1, #224
- lsls r1, r1, #8
- movs r0, #21
- bl .L_02004a04
- movs r1, #1
- movs r0, #1
- bl sub_02009f40
- movs r0, #1
- bl .L_020049fe
- movs r0, #21
- movs r1, #1
- bl sub_02009f4e
- movs r2, #20
- movs r1, #0
- movs r0, #21
- bl sub_02009f88
- adds r0, r5, #0
- bl .L_02004a16
- movs r1, #4
- movs r0, #21
- bl sub_02009f46
- movs r0, #21
- bl .L_02004a24
- movs r1, #129
- lsls r1, r1, #1
- movs r0, #2
- bl sub_02009fc6
- adds r0, r6, #0
- bl .L_02004a34
- movs r1, #3
- movs r0, #21
- bl sub_02009f5c
- movs r0, #21
- bl .L_02004a42
- movs r2, #40
- movs r0, #1
- ldr r1, [pc, #128]
- bl sub_02009fdc
- movs r1, #2
- movs r0, #1
- bl sub_02009f94
- movs r0, #1
- bl .L_02004a5a
- movs r1, #4
- movs r0, #21
- bl sub_02009f82
- movs r0, #21
- bl .L_02004a68
- movs r1, #160
- movs r0, #21
- lsls r1, r1, #7
- movs r2, #20
- bl sub_02009ff4
- movs r0, #3
- movs r1, #4
- movs r2, #20
- bl sub_02009fb6
- adds r0, r5, #0
- movs r1, #0
- movs r2, #20
- bl sub_0200a000
- movs r0, #21
- ldr r1, [pc, #60]
- movs r2, #40
- bl sub_0200a022
- pop {r3, r5}
- mov r8, r3
- mov sl, r5
- pop {r5, r6}
- pop {r0}
- bx r0
- .4byte 0x03001ebc
- .4byte 0x00019999
- .4byte 0x0000cccc
- .4byte 0x00001001
- .4byte 0x00000141
- .4byte 0x00000105
- .4byte 0x00008001
- .4byte 0x00000101
- .4byte 0x00006666
- .4byte 0x00033333
- .4byte 0x00002003
- .2byte 0x0103
- .2byte 0x0000
- push {r5, r6, lr}
- mov r6, sl
- mov r5, r9
- push {r5, r6}
- mov r6, r8
- push {r6}
- movs r0, #19
- sub sp, #8
- bl sub_0200a11a
- movs r0, #144
- lsls r0, r0, #1
- bl sub_0200a122
- movs r0, #192
- movs r1, #192
- movs r2, #128
- lsls r0, r0, #10
- lsls r1, r1, #10
- lsls r2, r2, #9
- bl sub_02009f22
- movs r1, #128
- movs r0, #0
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200a096
- movs r1, #128
- movs r0, #1
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200a0a2
- movs r1, #128
- movs r0, #2
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200a0ae
- movs r1, #128
- movs r0, #3
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200a0ba
- movs r1, #128
- movs r0, #21
- lsls r1, r1, #1
- movs r2, #0
- bl sub_0200a0c6
- movs r1, #128
- movs r0, #6
- lsls r1, r1, #1
- movs r2, #10
- bl sub_0200a0d2
- movs r1, #160
- movs r0, #0
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200a0ce
- movs r1, #160
- movs r0, #1
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200a0da
- movs r1, #160
- movs r0, #2
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200a0e6
- movs r1, #160
- movs r0, #3
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200a0f2
- movs r1, #208
- movs r0, #21
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200a0fe
- movs r1, #208
- movs r0, #6
- lsls r1, r1, #8
- movs r2, #0
- bl sub_0200a10a
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r1, r1, #10
- lsls r2, r2, #9
- lsls r0, r0, #10
- bl sub_02009fc2
- movs r0, #10
- bl sub_0200a038
-.L_0200430e:
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r0, r0, #9
- lsls r1, r1, #9
- lsls r2, r2, #9
- bl sub_02009fd8
- movs r0, #152
- movs r1, #128
- movs r2, #180
- movs r3, #1
- lsls r2, r2, #16
- lsls r1, r1, #14
- lsls r0, r0, #17
- bl sub_0200a16a
- bl sub_0200a176
- movs r0, #24
- bl sub_0200a084
- ldr r5, [pc, #1020]
- str r5, [r0, #24]
- movs r0, #25
- bl sub_0200a08e
- str r5, [r0, #24]
- ldr r5, [pc, #1012]
- movs r0, #24
- adds r1, r5, #0
- bl sub_0200a0b2
- adds r1, r5, #0
- movs r0, #25
- bl sub_0200a0ba
- movs r0, #145
- bl sub_0200a228
- movs r0, #192
- movs r1, #192
- movs r2, #128
- lsls r2, r2, #9
- lsls r0, r0, #11
- lsls r1, r1, #11
- bl sub_0200a028
- movs r1, #0
- ldr r0, [pc, #972]
- bl sub_0200a1f0
- movs r0, #16
- bl sub_0200a206
- movs r0, #20
- bl sub_02009f7c
- movs r1, #0
- ldr r0, [pc, #956]
- bl sub_0200a204
- movs r0, #24
- bl sub_0200a21a
- movs r0, #60
- bl sub_02009f90
- movs r0, #141
- bl sub_0200a266
- ldr r0, [pc, #936]
- bl sub_0200a0b4
- movs r0, #24
- bl sub_0200a0f2
- ldr r3, [pc, #928]
- str r3, [r0, #12]
- movs r0, #25
- bl sub_0200a0fc
- ldr r3, [pc, #924]
- movs r1, #7
- str r3, [r0, #12]
- movs r0, #26
- bl sub_0200a1a0
- movs r0, #26
- bl sub_0200a10e
- movs r1, #0
- bl sub_0200a074
- movs r0, #26
- bl sub_0200a11a
- ldr r1, [pc, #896]
- adds r5, r0, #0
- str r1, [r5, #28]
- movs r0, #24
- mov sl, r1
- bl sub_0200a128
- ldr r3, [r0, #24]
- movs r2, #0
- mov r9, r2
- str r3, [r5, #24]
- adds r3, r5, #0
- adds r3, #85
- mov r1, r9
- strb r1, [r3, #0]
- movs r2, #152
- ldr r3, [pc, #868]
- movs r6, #192
- lsls r2, r2, #17
- lsls r6, r6, #15
- str r2, [r5, #8]
- str r3, [r5, #12]
- str r6, [r5, #16]
- movs r1, #7
- movs r0, #27
- mov r8, r2
- bl sub_0200a1ea
- movs r0, #27
- bl sub_0200a158
- movs r1, #0
- bl sub_0200a0be
- movs r0, #27
- bl sub_0200a164
- mov r3, sl
- adds r5, r0, #0
- str r3, [r5, #28]
- movs r0, #24
- bl sub_0200a170
- ldr r3, [r0, #24]
- str r3, [r5, #24]
- adds r3, r5, #0
- adds r3, #85
- mov r1, r9
- mov r2, r8
- strb r1, [r3, #0]
- mov r3, r9
- str r2, [r5, #8]
- str r3, [r5, #12]
- str r6, [r5, #16]
- movs r1, #7
- movs r0, #28
- bl sub_0200a226
- movs r0, #28
- bl sub_0200a194
- movs r1, #0
- bl sub_0200a0fa
- movs r0, #28
- bl sub_0200a1a0
- mov r1, sl
- adds r5, r0, #0
- str r1, [r5, #28]
- movs r0, #24
- bl sub_0200a1ac
- ldr r3, [r0, #24]
- str r3, [r5, #24]
- adds r3, r5, #0
- adds r3, #85
- mov r2, r9
- strb r2, [r3, #0]
- mov r3, r8
- str r3, [r5, #8]
- movs r3, #128
- lsls r3, r3, #14
-.L_02004476:
- str r3, [r5, #12]
- movs r2, #23
- movs r3, #18
- str r6, [r5, #16]
- movs r0, #102
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r1, #4
- movs r2, #74
- movs r3, #4
- bl sub_0200a120
- movs r3, #16
- movs r2, #21
- str r3, [sp, #0]
- str r2, [sp, #4]
- movs r0, #39
- movs r1, #72
- movs r2, #11
- movs r3, #72
- bl sub_0200a134
- movs r1, #22
- str r1, [sp, #0]
- mov r8, r1
- movs r6, #6
- movs r0, #19
- movs r1, #6
- movs r2, #3
- movs r3, #7
- str r6, [sp, #4]
- bl sub_0200a152
- movs r5, #13
- movs r0, #19
- movs r1, #6
- movs r2, #3
- movs r3, #7
- str r5, [sp, #0]
- str r6, [sp, #4]
- bl sub_0200a164
- mov r2, r8
- str r2, [sp, #0]
- movs r0, #19
- movs r1, #6
- movs r2, #3
- movs r3, #7
- str r5, [sp, #4]
- bl sub_0200a176
- movs r1, #6
- movs r2, #3
- movs r3, #7
- movs r0, #19
- str r5, [sp, #0]
- str r5, [sp, #4]
- bl sub_0200a186
- movs r0, #1
- bl sub_0200a0ec
- movs r0, #8
- bl sub_0200a242
- ldr r5, [pc, #608]
- ldr r3, [r0, #8]
- adds r3, r3, r5
- str r3, [r0, #8]
- bl sub_02009b8a
- movs r0, #9
- bl sub_0200a254
- ldr r3, [r0, #8]
- adds r3, r3, r5
- str r3, [r0, #8]
- bl sub_02009b9a
- movs r0, #10
- bl sub_0200a264
- movs r5, #128
- ldr r3, [r0, #8]
- lsls r5, r5, #13
- adds r3, r3, r5
- str r3, [r0, #8]
- bl sub_02009bae
- movs r0, #11
- bl sub_0200a278
- ldr r3, [r0, #8]
- adds r3, r3, r5
- str r3, [r0, #8]
- bl sub_02009bbe
- movs r0, #0
- bl sub_0200a288
- ldr r3, [r0, #8]
- adds r3, r3, r5
- str r3, [r0, #8]
- ldr r3, [r0, #16]
- adds r3, r3, r5
- str r3, [r0, #16]
- bl sub_02009bd4
- movs r0, #1
- bl sub_0200a29e
- ldr r3, [r0, #8]
- adds r3, r3, r5
- str r3, [r0, #8]
- ldr r3, [r0, #16]
- adds r3, r3, r5
- str r3, [r0, #16]
- bl sub_02009bea
- movs r0, #2
- bl sub_0200a2b4
- ldr r3, [r0, #8]
- adds r3, r3, r5
- str r3, [r0, #8]
- ldr r3, [r0, #16]
- adds r3, r3, r5
- str r3, [r0, #16]
- bl sub_02009c00
- movs r0, #3
- bl sub_0200a2ca
- ldr r3, [r0, #8]
- adds r3, r3, r5
- str r3, [r0, #8]
- ldr r3, [r0, #16]
- adds r3, r3, r5
- str r3, [r0, #16]
- bl sub_02009c16
- movs r1, #196
- movs r2, #220
- lsls r2, r2, #16
- movs r0, #21
- lsls r1, r1, #16
- bl sub_0200a348
- movs r0, #21
- movs r1, #5
- bl sub_0200a358
- movs r1, #188
- movs r2, #158
- lsls r2, r2, #17
- movs r0, #6
- lsls r1, r1, #16
- bl sub_0200a35e
- movs r1, #5
- movs r0, #6
- bl sub_0200a36e
- movs r0, #6
- bl sub_0200a30c
- movs r1, #0
- bl sub_0200a272
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #9
- lsls r0, r0, #11
- lsls r1, r1, #11
- bl sub_0200a292
- movs r1, #0
- ldr r0, [pc, #356]
- bl sub_0200a45a
- movs r0, #120
- bl sub_0200a470
- ldr r5, [pc, #376]
- movs r0, #24
- adds r1, r5, #0
- bl sub_0200a352
- adds r1, r5, #0
- movs r0, #25
- bl sub_0200a35a
- adds r1, r5, #0
- movs r0, #26
- bl sub_0200a362
- adds r1, r5, #0
- movs r0, #27
- bl sub_0200a36a
- adds r1, r5, #0
- movs r0, #28
- bl sub_0200a372
- movs r0, #120
- bl sub_0200a210
- movs r0, #192
- movs r1, #192
- movs r2, #128
- lsls r2, r2, #9
- lsls r0, r0, #10
- lsls r1, r1, #10
- bl sub_0200a2e0
-.L_02004626:
- movs r1, #0
- ldr r0, [pc, #312]
- bl sub_0200a4a8
- movs r0, #120
- bl sub_0200a4be
- movs r0, #120
- bl sub_0200a234
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #9
- lsls r0, r0, #10
- lsls r1, r1, #10
- bl sub_0200a304
- movs r0, #128
- movs r1, #0
- lsls r0, r0, #9
- bl sub_0200a4ce
- movs r0, #120
- bl sub_0200a4e4
- movs r0, #120
- bl sub_0200a25a
- movs r0, #128
- movs r1, #128
- movs r2, #128
- lsls r2, r2, #9
- lsls r1, r1, #9
- lsls r0, r0, #9
- bl sub_0200a32a
- movs r0, #24
- bl sub_0200a3c0
- ldr r3, [pc, #240]
- ldr r5, [pc, #240]
- str r3, [r0, #28]
- adds r1, r5, #0
- movs r0, #25
- bl sub_0200a3e6
- adds r1, r5, #0
- movs r0, #26
- bl sub_0200a3ee
- adds r1, r5, #0
- movs r0, #27
- bl sub_0200a3f6
- adds r1, r5, #0
- movs r0, #28
- bl sub_0200a416
- ldr r0, [pc, #208]
- bl sub_0200a56c
- movs r1, #15
- movs r0, #24
- bl sub_0200a48c
+.L_020040c0:
+ lsls r2, r2, #16
+ movs r1, #0
+ lsls r0, r0, #16
+ bl sub_02009f04
+ bl sub_02009f10
+ movs r0, #40
+ bl sub_02009dfe
+ movs r0, #23
+ bl sub_02009fa4
+ movs r1, #129
+ lsls r1, r1, #1
+ movs r0, #21
+ bl sub_02009f0e
+ movs r0, #21
+ bl sub_0200497c
+ movs r1, #1
+ movs r0, #21
+ bl sub_02009ecc
movs r0, #20
- bl sub_0200a3da
- ldr r1, [pc, #192]
- movs r0, #24
- bl sub_0200a432
- ldr r0, [pc, #188]
- bl sub_0200a2c8
- movs r1, #2
- movs r2, #20
- movs r0, #2
- bl sub_0200a492
- movs r0, #2
- bl .L_02004f60
+ bl sub_02009e22
+ movs r0, #21
+ bl .L_02004990
+ movs r1, #4
+ movs r0, #21
+ bl sub_02009ec0
+ movs r0, #21
+ bl sub_0200499e
movs r1, #192
movs r2, #20
- movs r0, #1
- lsls r1, r1, #7
- bl sub_0200a4ec
+ lsls r1, r1, #6
+ movs r0, #21
+ bl sub_02009f2a
+ movs r0, #21
+ bl .L_020049b0
movs r1, #129
lsls r1, r1, #1
- movs r0, #1
- bl sub_0200a50e
+ movs r0, #6
+ bl sub_02009f52
+ ldr r5, [pc, #264]
movs r0, #20
- bl sub_0200a414
+ bl sub_02009e5a
+.L_02004130:
+ movs r1, #2
+ movs r0, #3
+ bl sub_02009f0a
+ adds r0, r5, #0
+ bl .L_020049d0
movs r1, #2
+ movs r0, #21
+ bl sub_02009f20
+ adds r6, #2
+ movs r0, #20
+ bl sub_02009e78
+ adds r0, r6, #0
+ bl .L_020049e6
+ movs r1, #224
+ lsls r1, r1, #8
+ movs r0, #21
+ bl .L_02004a04
+ movs r1, #1
movs r0, #1
- bl sub_0200a4c4
+ bl sub_02009f40
movs r0, #1
- bl .L_02004f8a
- movs r0, #3
- ldr r1, [pc, #128]
- ldr r2, [pc, #128]
- bl sub_0200a45c
- movs r1, #163
- movs r2, #220
- lsls r1, r1, #1
- movs r0, #3
- bl sub_0200a4a8
- movs r0, #40
- bl sub_0200a43e
+ bl .L_020049fe
+ movs r0, #21
+ movs r1, #1
+ bl sub_02009f4e
+ movs r2, #20
+ movs r1, #0
+ movs r0, #21
+ bl sub_02009f88
+ adds r0, r5, #0
+ bl .L_02004a16
+ movs r1, #4
+ movs r0, #21
+ bl sub_02009f46
+ movs r0, #21
+ bl .L_02004a24
movs r1, #129
lsls r1, r1, #1
- movs r0, #3
- bl sub_0200a548
- movs r0, #3
- bl .L_02004fb6
- movs r0, #0
- bl sub_0200a474
- adds r2, r0, #0
- adds r3, r2, #0
- mov r1, r9
- adds r3, #98
- strb r1, [r3, #0]
- b.n .L_02004784
- .2byte 0x0000
- .4byte 0x00001999
- .4byte 0x0200e088
- .4byte 0x004063ff
- .4byte 0x00007fff
- .4byte 0x00000236
- .4byte 0xffa00000
- .4byte 0xffc00000
- .4byte 0xffff0000
- .4byte 0xffe00000
- .4byte 0xfff00000
- .4byte 0x0200e0d0
- .4byte 0x00203210
- .4byte 0x0000051e
- .4byte 0x0200e0f4
- .4byte 0x00000121
- .4byte 0x0200e130
- .4byte 0x0200b6d1
- .4byte 0x0000cccc
- .2byte 0x6666
- .2byte 0x0000
-.L_02004784:
- movs r6, #1
- adds r3, #1
- strb r6, [r3, #0]
- ldr r3, [r2, #12]
- movs r5, #160
-.L_0200478e:
- lsls r5, r5, #8
- str r3, [r2, #76]
- ldr r3, [pc, #60]
- strh r5, [r2, #6]
- movs r0, #1
- mov r8, r3
- bl sub_0200a4e8
- adds r2, r0, #0
- adds r3, r2, #0
- mov r1, r8
- adds r3, #98
- strb r1, [r3, #0]
- adds r3, #1
- strb r6, [r3, #0]
- ldr r3, [r2, #12]
- strh r5, [r2, #6]
- str r3, [r2, #76]
movs r0, #2
- bl sub_0200a502
- adds r2, r0, #0
- adds r3, r2, #0
- mov r1, r8
-.L_020047be:
- adds r3, #98
- strb r1, [r3, #0]
- adds r3, #1
- strb r6, [r3, #0]
- ldr r3, [r2, #12]
- strh r5, [r2, #6]
- str r3, [r2, #76]
- movs r0, #3
- b.n .L_020047d4
- .2byte 0x0000
- .2byte 0x0000
-.L_020047d4:
- bl sub_0200a522
- adds r2, r0, #0
- adds r3, r2, #0
- mov r1, r8
- adds r3, #98
- strb r1, [r3, #0]
- adds r3, #1
- strb r6, [r3, #0]
- ldr r3, [r2, #12]
- strh r5, [r2, #6]
- str r3, [r2, #76]
+ bl sub_02009fc6
+ adds r0, r6, #0
+ bl .L_02004a34
+ movs r1, #3
movs r0, #21
- bl sub_0200a53c
- adds r2, r0, #0
- adds r3, r2, #0
- mov r1, r8
- adds r3, #98
-.L_020047fa:
- strb r1, [r3, #0]
- adds r3, #1
- strb r6, [r3, #0]
- ldr r3, [r2, #12]
- movs r0, #6
- str r3, [r2, #76]
- bl sub_0200a554
- adds r2, r0, #0
- adds r3, r2, #0
- mov r1, r8
- adds r3, #98
- strb r1, [r3, #0]
- adds r3, #1
- strb r6, [r3, #0]
- ldr r3, [r2, #12]
- movs r0, #23
- str r3, [r2, #76]
- bl sub_0200a56c
- mov r2, r8
- adds r0, #85
- strb r2, [r0, #0]
- movs r0, #23
- bl sub_0200a578
- movs r1, #0
- bl sub_0200a4de
-.L_02004834:
- movs r0, #23
- movs r1, #7
- bl sub_0200a61e
- movs r0, #23
+ bl sub_02009f5c
+ movs r0, #21
+ bl .L_02004a42
+ movs r2, #40
+ movs r0, #1
+ ldr r1, [pc, #128]
+ bl sub_02009fdc
movs r1, #2
- bl sub_0200a65e
- ldr r3, [pc, #112]
- mov r1, r9
- ldr r2, [pc, #112]
- str r1, [r3, #0]
- movs r3, #240
-.L_0200484e:
- movs r1, #200
- str r3, [r2, #0]
- ldr r0, [pc, #108]
- lsls r1, r1, #4
- bl sub_0200a45c
-.L_0200485a:
movs r0, #1
- bl sub_0200a45a
- ldr r0, [pc, #96]
- bl sub_0200a570
- cmp r0, #0
- beq.n .L_0200485a
- ldr r0, [pc, #92]
- bl sub_0200a582
- movs r0, #30
- bl sub_0200a5a0
- movs r0, #141
- lsls r0, r0, #1
- bl sub_0200a590
- bl sub_0200a73c
- ldr r0, [pc, #72]
- movs r1, #91
- bl sub_0200a6dc
- ldr r2, [pc, #68]
- movs r3, #160
- lsls r3, r3, #19
- strh r2, [r3, #0]
- ldr r3, [pc, #64]
- movs r2, #228
- ldr r3, [r3, #0]
- lsls r2, r2, #1
- adds r3, r3, r2
- movs r2, #1
- str r2, [r3, #0]
- bl sub_0200a73e
- bl sub_0200a74a
- add sp, #8
- pop {r3, r5, r6}
+ bl sub_02009f94
+ movs r0, #1
+ bl .L_02004a5a
+ movs r1, #4
+ movs r0, #21
+ bl sub_02009f82
+ movs r0, #21
+ bl .L_02004a68
+ movs r1, #160
+ movs r0, #21
+ lsls r1, r1, #7
+ movs r2, #20
+ bl sub_02009ff4
+ movs r0, #3
+ movs r1, #4
+ movs r2, #20
+ bl sub_02009fb6
+ adds r0, r5, #0
+ movs r1, #0
+ movs r2, #20
+ bl sub_0200a000
+ movs r0, #21
+ ldr r1, [pc, #60]
+ movs r2, #40
+ bl sub_0200a022
+ pop {r3, r5}
mov r8, r3
- mov r9, r5
- mov sl, r6
+ mov sl, r5
pop {r5, r6}
pop {r0}
bx r0
- .4byte 0x0200e764
- .4byte 0x0200e760
- .4byte 0x0200d6a1
- .4byte 0x00000237
+ .4byte 0x03001ebc
+ .4byte 0x00019999
+ .4byte 0x0000cccc
+ .4byte 0x00001001
+ .4byte 0x00000141
+ .4byte 0x00000105
+ .4byte 0x00008001
.4byte 0x00000101
- .4byte 0x00000002
- .4byte 0x00007fff
- .2byte 0x1ebc
- .2byte 0x0300
+ .4byte 0x00006666
+ .4byte 0x00033333
+ .4byte 0x00002003
+ .2byte 0x0103
+ .2byte 0x0000
+AlchemyC_0200423c:
+ .space 0x3ea
+.L_02004626:
+ .space 0x168
+.L_0200478e:
+ .space 0x30
+.L_020047be:
+ .space 0x3c
+.L_020047fa:
+ .space 0x3a
+.L_02004834:
+ .space 0x1a
+.L_0200484e:
+ .space 0x8a
push {r5, r6, lr}
.L_020048da:
mov r6, sl
diff --git a/games/gs1/assets/readme/gs1-en-core.svg b/games/gs1/assets/readme/gs1-en-core.svg
index a5e563751..274d27aa6 100644
--- a/games/gs1/assets/readme/gs1-en-core.svg
+++ b/games/gs1/assets/readme/gs1-en-core.svg
@@ -4,7 +4,7 @@
Main game
-59.82% DONE
+60.33% DONE
0x080000c0–0x080003c0: 768 bytes
@@ -846,9 +846,9 @@
0x08010424–0x080111b4: 3,472 bytes
-
-
-
+
+
+
0x080111b4–0x080113e4: 560 bytes
@@ -1344,9 +1344,8 @@
0x08020000–0x080209cc: 2,508 bytes
-
-
-
+
+
0x080209d0–0x08020bd6: 518 bytes
@@ -1465,8 +1464,7 @@
0x080289e8–0x08028db2: 970 bytes
-
-
+
0x08028db2–0x08028db4: 2 bytes
@@ -1793,9 +1791,9 @@
0x0808c2dc–0x0808d826: 5,450 bytes
-
-
-
+
+
+
0x0808d826–0x0808d828: 2 bytes
@@ -1812,8 +1810,8 @@
0x0808e0b0–0x0808e9a6: 2,294 bytes
-
-
+
+
0x0808e9a6–0x0808e9a8: 2 bytes
@@ -2424,8 +2422,7 @@
0x080a1bcc–0x080a1e36: 618 bytes
-
-
+
0x080a1e36–0x080a1e38: 2 bytes
@@ -2516,9 +2513,9 @@
0x080a6a00–0x080a737e: 2,430 bytes
-
-
-
+
+
+
0x080a737e–0x080a7380: 2 bytes
@@ -2681,9 +2678,9 @@
0x080b2110–0x080b3940: 6,192 bytes
-
-
-
+
+
+
0x080b5000–0x080b5138: 312 bytes
@@ -2873,7 +2870,8 @@
0x080b9324–0x080b9554: 560 bytes
-
+
+
0x080b9554–0x080b9724: 464 bytes
@@ -3676,8 +3674,8 @@
0x080fb2a4–0x080fb42e: 394 bytes
-
-
+
+
0x080fb42e–0x080fb430: 2 bytes
@@ -3754,11 +3752,11 @@
-Unknown 38.6%
+Unknown 38.1%
Draft C 1.6%
Proven ASM 38.7%
-Proven C 21.1%
+Proven C 21.6%
diff --git a/games/gs1/assets/readme/gs1-en-overlays.svg b/games/gs1/assets/readme/gs1-en-overlays.svg
index c56d63283..74758b1c1 100644
--- a/games/gs1/assets/readme/gs1-en-overlays.svg
+++ b/games/gs1/assets/readme/gs1-en-overlays.svg
@@ -4,7 +4,7 @@
Code overlays
-81.17% DONE
+81.86% DONE
36f · unnamed_variant · Proven C: 8 bytes
@@ -12,4143 +12,4131 @@
36f · unnamed_variant · Proven C: 4 bytes
-
+
36f · unnamed_variant · Proven C: 8 bytes
-
+
36f · unnamed_variant · Proven C: 8 bytes
-
+
36f · unnamed_variant · Proven C: 8 bytes
-
+
36f · unnamed_variant · Proven C: 364 bytes
-
+
36f · Unknown 0x02000238–0x0200043a: 514 bytes
-
+
36f · Unknown 0x0200043c–0x02000454: 24 bytes
-
+
36f · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
36f · Proven ASM 0x020001c0–0x02000238: 120 bytes
-
+
36f · Proven ASM 0x0200043a–0x0200043c: 2 bytes
-
+
36f · Proven ASM 0x02000454–0x020005f8: 420 bytes
-
+
370 · SceneData_GetScriptTable · Proven C: 8 bytes
-
+
370 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
370 · SceneData_GetMessageTable · Proven C: 8 bytes
-
+
370 · SceneData_GetActorTable · Proven C: 8 bytes
-
+
370 · SceneData_GetEffectTable · Proven C: 8 bytes
-
+
370 · SceneData_GetBufferCrc16 · Proven C: 76 bytes
-
+
370 · Unknown 0x020001e0–0x0200025a: 122 bytes
-
+
370 · Unknown 0x0200025c–0x020002d2: 118 bytes
-
+
370 · Unknown 0x020002d4–0x02000382: 174 bytes
-
+
370 · Unknown 0x02000384–0x020003cc: 72 bytes
-
+
370 · Unknown 0x02000cfc–0x02000de2: 230 bytes
-
+
370 · Unknown 0x02000de4–0x02001022: 574 bytes
-
+
370 · Unknown 0x02001024–0x020012c6: 674 bytes
-
+
370 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
370 · Proven ASM 0x02000054–0x020001e0: 396 bytes
-
+
370 · Proven ASM 0x0200025a–0x0200025c: 2 bytes
-
+
370 · Proven ASM 0x020002d2–0x020002d4: 2 bytes
-
+
370 · Proven ASM 0x02000382–0x02000384: 2 bytes
-
+
370 · Proven ASM 0x020003cc–0x02000cfc: 2,352 bytes
-
+
370 · Proven ASM 0x02000de2–0x02000de4: 2 bytes
-
+
370 · Proven ASM 0x02001022–0x02001024: 2 bytes
-
+
370 · Proven ASM 0x020012c6–0x020012c8: 2 bytes
-
+
370 · Proven ASM 0x02001324–0x020014d4: 432 bytes
-
+
371 · StoryProgress_TriggerEvent0808 · Proven C: 92 bytes
-
+
371 · StoryProgress_TriggerEvent0809 · Proven C: 72 bytes
-
+
371 · StoryProgress_TriggerEvent080A · Proven C: 72 bytes
-
+
371 · StoryActor_AdvanceTimer · Proven C: 30 bytes
-
+
371 · StoryActor_ConfigureSpawnedObject · Proven C: 136 bytes
-
+
371 · StoryActor_Initialize · Proven C: 64 bytes
-
+
371 · SceneData_GetTableD27C · Proven C: 8 bytes
-
+
371 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
371 · SceneData_GetTableDA2C · Proven C: 8 bytes
-
+
371 · StoryActor_ApplyFlaggedMode · Proven C: 40 bytes
-
+
371 · StoryActor_ResetPosition · Proven C: 60 bytes
-
+
371 · StoryActor_ClearActiveFlag · Proven C: 44 bytes
-
+
371 · StoryScene_SelectPlacementTable · Proven C: 292 bytes
-
+
371 · StoryScene_SetBranchValueFromX · Proven C: 80 bytes
-
+
371 · StoryScene_SetBranchValueFromZ · Proven C: 80 bytes
-
+
371 · SceneState_SetValues130_6_47 · Proven C: 16 bytes
-
+
371 · SceneState_ApplyValues150And46And11 · Proven C: 16 bytes
-
+
371 · SceneState_ApplyValues116And56And21 · Proven C: 16 bytes
-
+
371 · SceneState_ApplyValues151And25And54 · Proven C: 16 bytes
-
+
371 · FieldScene_RunStep7D3B1E · Proven C: 16 bytes
-
+
371 · SceneData_GetTableE3F4 · Proven C: 8 bytes
-
+
371 · SceneState_ApplyFlag85aBranch · Proven C: 40 bytes
-
+
371 · FieldScene_RunStep74 · Proven C: 16 bytes
-
+
371 · RunEventScript01 · Proven C: 412 bytes
-
+
+
+
+371 · RunEventScript01Second · Proven C: 2,354 bytes
+
371 · FieldScene_RunScene371_0200155c · Proven C: 292 bytes
-
+
371 · FieldScene_RunScene371_02001680 · Proven C: 292 bytes
-
+
371 · FieldScene_RunScene371_020017a4 · Proven C: 88 bytes
-
+
371 · FieldScene_RunScene371_020017fc · Proven C: 140 bytes
-
+
371 · FieldScene_RunScene371_02001888 · Proven C: 176 bytes
-
+
371 · FieldScene_RunScene371_02001938 · Proven C: 176 bytes
-
+
371 · FieldScene_RunScene371_020019e8 · Proven C: 176 bytes
-
+
371 · FieldScene_RunScene371_02001a98 · Proven C: 196 bytes
-
+
371 · FieldScene_RunScene371_02001b5c · Proven C: 172 bytes
-
+
371 · FieldScene_RunScene371_02001c08 · Proven C: 156 bytes
-
+
371 · FieldScene_RunScene371_02002274 · Proven C: 564 bytes
-
+
371 · FieldScene_RunScene371_0200281c · Proven C: 60 bytes
-
+
371 · FieldScene_RunScene371_02002858 · Proven C: 80 bytes
-
+
371 · StoryScene_ShowRewardDialogue · Proven C: 64 bytes
-
+
371 · FieldScene_RunActorPresentationSequence · Proven C: 1,146 bytes
-
+
371 · StoryScene_StartTransition · Proven C: 204 bytes
-
+
371 · FieldScene_RunActorEightApproach · Proven C: 300 bytes
-
+
371 · StoryScene_ComputeOpposingSlotDelta · Proven C: 44 bytes
-
+
371 · StoryReward_LookupBySelection · Proven C: 88 bytes
-
+
371 · FieldScene_RunScene371_0200357c · Proven C: 250 bytes
-
+
371 · StoryScene_UpdateSelectedActorProgress · Proven C: 100 bytes
-
+
371 · FieldScene_RunOpeningAuxiliarySequence · Proven C: 224 bytes
-
+
371 · StoryScene_SetReferenceActor · Proven C: 12 bytes
-
+
371 · StoryScene_ActivateSharedState · Proven C: 16 bytes
-
+
371 · StoryScene_CompleteActor98 · Proven C: 116 bytes
-
+
371 · SceneEffect_RestoreBlendRegisters · Proven C: 96 bytes
-
+
371 · FieldScene_RunLateSequence · Proven C: 160 bytes
-
+
371 · SceneActor_UpdateObjectByCounterBits · Proven C: 60 bytes
-
+
371 · OverlayObject_UpdateOnFrameParity · Proven C: 60 bytes
-
+
371 · SceneState_RunSlotStepOnOddFrames · Proven C: 44 bytes
-
+
371 · StoryEffect_AnimateVerticalPositive · Proven C: 80 bytes
-
+
371 · StoryEffect_AnimateVerticalNegative · Proven C: 82 bytes
-
+
371 · Draft C 0x020028e8–0x02002cb4: 972 bytes
-
+
371 · Draft C 0x020034a0–0x0200357c: 220 bytes
-
+
371 · Unknown 0x02000244–0x02000250: 12 bytes
-
+
371 · Unknown 0x02000598–0x020005b2: 26 bytes
-
+
371 · Unknown 0x020005b6–0x02000632: 124 bytes
-
+
371 · Unknown 0x02000636–0x02000670: 58 bytes
-
+
371 · Unknown 0x02000674–0x020006b4: 64 bytes
-
+
371 · Unknown 0x020006ec–0x020007c8: 220 bytes
-
+
371 · Unknown 0x02000a18–0x02000a5c: 68 bytes
-
+
371 · Unknown 0x02001ca4–0x02001e2a: 390 bytes
-
+
371 · Unknown 0x02001e2c–0x02001f6a: 318 bytes
-
+
371 · Unknown 0x02001f6c–0x02002274: 776 bytes
-
+
371 · Unknown 0x020024a8–0x0200271e: 630 bytes
-
+
371 · Unknown 0x02002720–0x020027c6: 166 bytes
-
+
371 · Unknown 0x020027c8–0x0200281c: 84 bytes
-
+
371 · Unknown 0x020031fc–0x020032f0: 244 bytes
-
+
371 · Unknown 0x0200384c–0x020038ee: 162 bytes
-
+
371 · Unknown 0x020038f0–0x020038fc: 12 bytes
-
+
371 · Unknown 0x02004058–0x0200411a: 194 bytes
-
+
371 · Unknown 0x0200411c–0x02004174: 88 bytes
-
+
371 · Unknown 0x02004752–0x0200475a: 8 bytes
-
+
371 · Unknown 0x0200475c–0x02004762: 6 bytes
-
+
371 · Unknown 0x02004764–0x0200476c: 8 bytes
-
+
371 · Unknown 0x02004770–0x02004774: 4 bytes
-
+
371 · Unknown 0x020047b8–0x020047bc: 4 bytes
-
+
371 · Unknown 0x020047be–0x020047c2: 4 bytes
-
+
371 · Unknown 0x020047c6–0x020047da: 20 bytes
-
+
371 · Unknown 0x020047de–0x020047ee: 16 bytes
-
+
371 · Unknown 0x02004876–0x0200487a: 4 bytes
-
+
371 · Unknown 0x0200487e–0x02004880: 2 bytes
-
+
371 · Unknown 0x02004882–0x02004884: 2 bytes
-
+
371 · Unknown 0x02004888–0x020048a4: 28 bytes
-
+
371 · Unknown 0x020048a8–0x020048ac: 4 bytes
-
+
371 · Unknown 0x020048b0–0x020048b6: 6 bytes
-
+
371 · Unknown 0x020048b8–0x020048ba: 2 bytes
-
+
371 · Unknown 0x020048bc–0x020048c2: 6 bytes
-
+
371 · Unknown 0x020048c8–0x020048da: 18 bytes
-
+
371 · Unknown 0x020048e0–0x02004900: 32 bytes
-
+
371 · Unknown 0x02004964–0x02004968: 4 bytes
-
+
371 · Unknown 0x02004a30–0x02004a34: 4 bytes
-
+
371 · Unknown 0x02004ab8–0x02004abc: 4 bytes
-
+
371 · Unknown 0x02004aec–0x02004af0: 4 bytes
-
+
371 · Unknown 0x02004c64–0x02004c6c: 8 bytes
-
+
371 · Draft ASM 0x02003b34–0x02003bb2: 126 bytes
-
+
371 · Draft ASM 0x02003bb4–0x02003bfa: 70 bytes
-
+
371 · Draft ASM 0x02003bfc–0x02003f10: 788 bytes
-
+
371 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
371 · Proven ASM 0x0200013a–0x0200013c: 2 bytes
-
+
371 · Proven ASM 0x020001c4–0x0200020c: 72 bytes
-
+
371 · Proven ASM 0x0200023c–0x02000244: 8 bytes
-
+
371 · Proven ASM 0x020002cc–0x020002f0: 36 bytes
-
+
-
-371 · Proven ASM 0x02000c28–0x0200155c: 2,356 bytes
-
+
+371 · Proven ASM 0x0200155a–0x0200155c: 2 bytes
+
371 · Proven ASM 0x02001e2a–0x02001e2c: 2 bytes
-
+
371 · Proven ASM 0x02001f6a–0x02001f6c: 2 bytes
-
+
371 · Proven ASM 0x0200271e–0x02002720: 2 bytes
-
+
371 · Proven ASM 0x020027c6–0x020027c8: 2 bytes
-
+
371 · Proven ASM 0x0200312e–0x02003130: 2 bytes
-
+
371 · Proven ASM 0x02003676–0x02003678: 2 bytes
-
+
371 · Proven ASM 0x020038ee–0x020038f0: 2 bytes
-
+
371 · Proven ASM 0x020039fc–0x02003b34: 312 bytes
-
+
371 · Proven ASM 0x02003bb2–0x02003bb4: 2 bytes
-
+
371 · Proven ASM 0x02003bfa–0x02003bfc: 2 bytes
-
+
371 · Proven ASM 0x02004056–0x02004058: 2 bytes
-
+
371 · Proven ASM 0x0200411a–0x0200411c: 2 bytes
-
+
371 · Proven ASM 0x02004184–0x020044ac: 808 bytes
-
+
372 · OverlayObject_SetField6OnCountdown · Proven C: 50 bytes
-
+
372 · UpdateFixedPointCountdown · Proven C: 132 bytes
-
+
372 · SceneData_GetTableD0E4 · Proven C: 8 bytes
-
+
372 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
372 · SceneData_GetTableD27c · Proven C: 8 bytes
-
+
372 · SceneData_GetTableD2B8 · Proven C: 8 bytes
-
+
372 · SceneData_GetTableD558 · Proven C: 8 bytes
-
+
372 · SceneState_SetFlag210AndConfigureRegion40_84 · Proven C: 38 bytes
-
+
372 · SceneState_SetFlag210AndConfigureRegion40_89 · Proven C: 38 bytes
-
+
372 · SceneState_SetWork1c0AndRunObject · Proven C: 60 bytes
-
+
372 · FieldScene_SetupDescriptorD774 · Proven C: 56 bytes
-
+
372 · SceneState_SetValue123Mode1 · Proven C: 18 bytes
-
+
372 · SceneState_ApplyValues123And3 · Proven C: 18 bytes
-
+
372 · SceneState_SetValue123Mode4 · Proven C: 18 bytes
-
+
372 · FieldScene_RunStep7BAndCheckFlags841And842 · Proven C: 52 bytes
-
+
372 · FieldScene_SetupDescriptorD78a · Proven C: 56 bytes
-
+
372 · FieldScene_RunScene372_02000278 · Proven C: 108 bytes
-
+
372 · FieldScene_SetupDescriptorD78aIfFlag205Clear · Proven C: 68 bytes
-
+
372 · FieldScene_SetupWithDescriptorD7A0 · Proven C: 56 bytes
-
+
372 · FieldScene_SetupDescriptorD7b6 · Proven C: 56 bytes
-
+
372 · FieldScene_RunScene372_02000398 · Proven C: 52 bytes
-
+
372 · FieldScene_RunScene372_020003cc · Proven C: 52 bytes
-
+
372 · FieldScene_RunScene372_02000400 · Proven C: 52 bytes
-
+
372 · FieldScene_RunFlagGatedActorSetup · Proven C: 1,500 bytes
-
+
372 · FieldScene_RunScene372_02000a10 · Proven C: 844 bytes
-
+
372 · FieldScene_RunScene372_02000ec4 · Proven C: 114 bytes
-
+
372 · ActorPresentation_SetEightSceneCells · Proven C: 176 bytes
-
+
372 · FieldScene_RunOpeningAuxiliarySequence · Proven C: 412 bytes
-
+
372 · SceneState_ApplyFourRects · Proven C: 86 bytes
-
+
372 · FieldScene_DrawFiveTileBlocks · Proven C: 116 bytes
-
+
372 · FieldScene_RunScene372SequenceA · Proven C: 244 bytes
-
+
372 · FieldScene_RunScene372SequenceB · Proven C: 132 bytes
-
+
372 · FieldScene_RunActor22SceneWhenFlag836Only · Proven C: 72 bytes
-
+
372 · FieldScene_RunScene372SequenceC · Proven C: 112 bytes
-
+
+
+
+372 · FieldScene_RunScene372SequenceF · Proven C: 236 bytes
+
372 · FieldScene_RunScene372SequenceE · Proven C: 356 bytes
-
+
372 · FieldScene_RunScene372SequenceD · Proven C: 216 bytes
-
+
372 · SceneActor_RunActor22PlacementSequence · Proven C: 180 bytes
-
+
372 · FieldScene_RunReturnScript · Proven C: 1,412 bytes
-
+
372 · OverlayObject_SetChildByte5AndMark · Proven C: 96 bytes
-
+
372 · ActorPresentation_SetFourActorsModeByBit · Proven C: 132 bytes
-
+
372 · FieldScene_RunFlagGatedActorSequence · Proven C: 1,828 bytes
-
+
372 · RunEventScript01 · Proven C: 1,156 bytes
-
+
372 · SceneDialogue_RunActorTenFlag30dDialogue · Proven C: 196 bytes
-
+
+
+
+372 · RunEventScript02 · Proven C: 960 bytes
+
372 · FieldScene_RunScene372_02003c48 · Proven C: 156 bytes
-
+
372 · ActorPresentation_SelectActorTwentySevenState · Proven C: 48 bytes
-
+
372 · FieldScene_RunScene372_02003e48 · Proven C: 360 bytes
-
+
372 · FieldScene_ConfigureActorTwentyTwoScene · Proven C: 320 bytes
-
+
372 · FieldScene_BuildPlacementGrid · Proven C: 324 bytes
-
+
372 · SceneState_SetWords1c0And1c8AndRun · Proven C: 68 bytes
-
+
372 · SceneState_SetWorkWordsAndFlag87f · Proven C: 68 bytes
-
+
372 · SceneActor_SetModeByFrameBit1 · Proven C: 72 bytes
-
+
372 · OverlayObject_UpdateRandomSlotByFrame · Proven C: 72 bytes
-
+
372 · OverlayObject_ApplyIwramWord1e40 · Proven C: 44 bytes
-
+
372 · SceneEffect_UpdateArcOverAnchor · Proven C: 80 bytes
-
+
372 · OverlayObject_UpdateArcFromParent · Proven C: 82 bytes
-
+
372 · SceneState_SetValue140Mode0 · Proven C: 14 bytes
-
+
372 · FieldScene_RunSingleStep · Proven C: 10 bytes
-
+
372 · FieldScene_RunFourPairedSteps · Proven C: 60 bytes
-
+
372 · SceneState_SetValue19ThenCall · Proven C: 16 bytes
-
+
372 · OverlayObject_CopyRecordField1ToSlots22And8 · Proven C: 66 bytes
-
+
372 · SceneState_SetValueEe4 · Proven C: 28 bytes
-
+
372 · FieldScene_RunScriptedStep1120 · Proven C: 28 bytes
-
+
372 · Unknown 0x02000d5c–0x02000ec4: 360 bytes
-
+
372 · Unknown 0x02000f38–0x02001076: 318 bytes
-
+
372 · Unknown 0x02001078–0x020010a4: 44 bytes
-
+
372 · Unknown 0x02001348–0x0200145e: 278 bytes
-
+
372 · Unknown 0x02001460–0x02001498: 56 bytes
-
-
-
-372 · Unknown 0x0200173c–0x02001828: 236 bytes
-
-
-
-372 · Unknown 0x0200316c–0x020031ac: 64 bytes
-
+
372 · Unknown 0x02003ce4–0x02003dac: 200 bytes
-
+
372 · Unknown 0x02003dea–0x02003e0c: 34 bytes
-
+
372 · Unknown 0x0200441c–0x02004476: 90 bytes
-
+
372 · Unknown 0x02004478–0x020044e6: 110 bytes
-
+
372 · Unknown 0x020044e8–0x02004546: 94 bytes
-
+
372 · Unknown 0x02004548–0x02004550: 8 bytes
-
+
372 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
372 · Proven ASM 0x02000062–0x02000064: 2 bytes
-
+
372 · Proven ASM 0x02000132–0x02000134: 2 bytes
-
+
372 · Proven ASM 0x0200015a–0x0200015c: 2 bytes
-
+
372 · Proven ASM 0x020001e2–0x020001e4: 2 bytes
-
+
372 · Proven ASM 0x020001f6–0x020001f8: 2 bytes
-
+
372 · Proven ASM 0x0200020a–0x0200020c: 2 bytes
-
+
372 · Proven ASM 0x02000f36–0x02000f38: 2 bytes
-
+
372 · Proven ASM 0x02001076–0x02001078: 2 bytes
-
+
372 · Proven ASM 0x02001346–0x02001348: 2 bytes
-
+
372 · Proven ASM 0x0200145e–0x02001460: 2 bytes
-
-
-
-372 · Proven ASM 0x02002dec–0x0200316c: 896 bytes
-
+
372 · Proven ASM 0x020031ac–0x02003c48: 2,716 bytes
-
+
372 · Proven ASM 0x0200441a–0x0200441c: 2 bytes
-
+
372 · Proven ASM 0x02004476–0x02004478: 2 bytes
-
+
372 · Proven ASM 0x020044e6–0x020044e8: 2 bytes
-
+
372 · Proven ASM 0x02004546–0x02004548: 2 bytes
-
+
372 · Proven ASM 0x0200455e–0x02004560: 2 bytes
-
+
372 · Proven ASM 0x0200456a–0x0200456c: 2 bytes
-
+
372 · Proven ASM 0x020045fa–0x020045fc: 2 bytes
-
+
372 · Proven ASM 0x0200463c–0x020048bc: 640 bytes
-
+
373 · measure_fixed_point_position_distance · Proven C: 60 bytes
-
+
373 · find_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
373 · advance_staged_actor_pair · Proven C: 384 bytes
-
+
373 · fill_grid_attribute_rectangle · Proven C: 100 bytes
-
+
373 · stop_blocked_actor_motion · Proven C: 164 bytes
-
+
373 · find_clear_actor_position · Proven C: 404 bytes
-
+
373 · MapStagedScene_SelectPrimaryData · Proven C: 8 bytes
-
+
373 · MapStagedScene_GetEmptyData · Proven C: 4 bytes
-
+
373 · MapStagedScene_SelectSecondaryData · Proven C: 8 bytes
-
+
373 · MapStagedScene_SelectTertiaryData · Proven C: 84 bytes
-
+
373 · SceneDialogue_RunActor181Scene · Proven C: 48 bytes
-
+
373 · FieldScene_RunActor181Scene · Proven C: 48 bytes
-
+
373 · select_quaternary_scene_data · Proven C: 56 bytes
-
+
373 · SceneDialogue_RunActorTenFlaggedDialogue · Proven C: 76 bytes
-
+
373 · SceneDialogue_RunActorFourteenTalk · Proven C: 128 bytes
-
+
373 · FieldScene_RunFlag807BranchSequence · Proven C: 184 bytes
-
+
373 · SceneDialogue_RunActor21FlaggedLine · Proven C: 60 bytes
-
+
373 · SceneDialogue_RunActor10LineAndFlag81f · Proven C: 52 bytes
-
+
373 · FieldScene_RunScene373_02000cd0 · Proven C: 92 bytes
-
+
373 · SceneDialogue_RunActorNineteenDialogue · Proven C: 68 bytes
-
+
373 · SceneState_Send210AndApplyRectAt40x84 · Proven C: 38 bytes
-
+
373 · SceneState_Send210AndApplyRect · Proven C: 38 bytes
-
+
373 · FieldScene_RunScene373_02000dc0 · Proven C: 48 bytes
-
+
373 · SceneState_ApplyFlag801Branch · Proven C: 40 bytes
-
+
373 · SceneState_SetValue123Mode3 · Proven C: 18 bytes
-
+
373 · SceneState_SetValue123Mode4 · Proven C: 18 bytes
-
+
373 · SceneState_ApplyValues123And2 · Proven C: 18 bytes
-
+
373 · FieldScene_RunScene373_02000e54 · Proven C: 48 bytes
-
+
373 · FieldScene_RunScene373_02000e84 · Proven C: 48 bytes
-
+
373 · SceneDialogue_RunFlag815GatedStep · Proven C: 168 bytes
-
+
373 · FieldScene_RunPrimarySequence · Proven C: 48 bytes
-
+
373 · FieldScene_RunScene373SequenceA · Proven C: 48 bytes
-
+
373 · FieldScene_RunPrimarySequenceSecond · Proven C: 48 bytes
-
+
373 · FieldScene_RunScene373SequenceC · Proven C: 236 bytes
-
+
+
+
+373 · FieldScene_RunScene373SequenceF · Proven C: 256 bytes
+
373 · FieldScene_RunScene373SequenceD · Proven C: 108 bytes
-
+
373 · SceneState_RunFlag204Step · Proven C: 58 bytes
-
+
373 · SceneState_SetFlag204AndConfigureRegion49_46 · Proven C: 58 bytes
-
+
373 · FieldScene_RunScene373SequenceE · Proven C: 408 bytes
-
+
373 · SceneState_RunTablePairWhenActor22State1 · Proven C: 60 bytes
-
+
373 · FieldScene_RunScene373_02001490 · Proven C: 196 bytes
-
+
373 · SceneState_RunTablePairWhenActor22State2 · Proven C: 60 bytes
-
+
373 · SceneState_RunTablePairByActor22State · Proven C: 76 bytes
-
+
373 · FieldScene_RunSecondaryActorSequence · Proven C: 612 bytes
-
+
373 · FieldScene_RunPrimaryActorSequence · Proven C: 672 bytes
-
+
373 · FieldScene_RunCompanionActorSequence · Proven C: 252 bytes
-
+
373 · SceneActor_ResetActorRun · Proven C: 108 bytes
-
+
373 · FieldScene_RunLargeStagingSequence · Proven C: 2,792 bytes
-
+
373 · FieldScene_RunStagedActorCutsceneSequence · Proven C: 5,604 bytes
-
+
373 · FieldScene_RunStep8C · Proven C: 14 bytes
-
+
373 · FieldScene_RunSingleStep · Proven C: 10 bytes
-
+
373 · SceneState_SetValue1ThenCall · Proven C: 16 bytes
-
+
373 · SceneState_SetValue0ThenCall · Proven C: 16 bytes
-
+
373 · FieldScene_RunStep9 · Proven C: 16 bytes
-
+
373 · FieldScene_RunStep17 · Proven C: 16 bytes
-
+
373 · SceneState_SetValue24ThenCall · Proven C: 16 bytes
-
+
373 · SceneState_SetValue25ThenCall · Proven C: 16 bytes
-
+
373 · measure_fixed_point_distance · Proven C: 60 bytes
-
+
373 · SceneActor_RunStep18WhenTargetSet · Proven C: 48 bytes
-
+
373 · configure_spawned_particle · Proven C: 160 bytes
-
+
373 · spawn_rising_dust_burst · Proven C: 244 bytes
-
+
373 · update_particle_position · Proven C: 54 bytes
-
+
373 · SceneState_ApplyRectAndRunTwo · Proven C: 38 bytes
-
+
373 · play_step_sound · Proven C: 28 bytes
-
+
373 · FieldScene_RunScriptedStepEE4 · Proven C: 28 bytes
-
+
373 · FieldScene_RunScene373SequenceB · Proven C: 84 bytes
-
+
373 · SceneActor_SetFlagByteBySlotZeroPosition · Proven C: 76 bytes
-
+
373 · SceneEffect_UpdateOrbitPosition · Proven C: 102 bytes
-
+
373 · InitializeStagedActorSceneOrbitingEffect · Proven C: 216 bytes
-
+
373 · OverlayObject_UpdateOnFrameBit1 · Proven C: 60 bytes
-
+
373 · SceneEffect_UpdateObjectOnOddFrames · Proven C: 60 bytes
-
+
373 · SceneEffect_UpdateObjectOnOddFramesOnly · Proven C: 44 bytes
-
+
373 · Effect_AnimateVerticalPositive · Proven C: 80 bytes
-
+
373 · Effect_AnimateVerticalNegative · Proven C: 82 bytes
-
+
373 · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
373 · Draft C 0x020008a4–0x020008c0: 28 bytes
-
-
-
-373 · Draft C 0x020010d8–0x020011d8: 256 bytes
-
+
373 · Unknown 0x0200034c–0x02000474: 296 bytes
-
+
373 · Unknown 0x020008c0–0x020009dc: 284 bytes
-
+
373 · Unknown 0x02002a54–0x02002cb0: 604 bytes
-
+
373 · Unknown 0x020032b0–0x0200336a: 186 bytes
-
+
373 · Unknown 0x0200336c–0x02003446: 218 bytes
-
+
373 · Unknown 0x02003448–0x0200345c: 20 bytes
-
+
373 · Unknown 0x0200564c–0x0200572c: 224 bytes
-
+
373 · Unknown 0x02005950–0x02005a08: 184 bytes
-
+
373 · Unknown 0x02005d68–0x02005e2a: 194 bytes
-
+
373 · Unknown 0x02005e2c–0x02005e84: 88 bytes
-
+
373 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
373 · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
373 · Proven ASM 0x02000d96–0x02000d98: 2 bytes
-
+
373 · Proven ASM 0x02000dbe–0x02000dc0: 2 bytes
-
+
373 · Proven ASM 0x02000e2a–0x02000e2c: 2 bytes
-
+
373 · Proven ASM 0x02000e3e–0x02000e40: 2 bytes
-
+
373 · Proven ASM 0x02000e52–0x02000e54: 2 bytes
-
+
373 · Proven ASM 0x0200127e–0x02001280: 2 bytes
-
+
373 · Proven ASM 0x020012ba–0x020012bc: 2 bytes
-
+
373 · Proven ASM 0x020015dc–0x02002a54: 5,240 bytes
-
+
373 · Proven ASM 0x0200336a–0x0200336c: 2 bytes
-
+
373 · Proven ASM 0x02003446–0x02003448: 2 bytes
-
+
373 · Proven ASM 0x020055a2–0x020055a4: 2 bytes
-
+
373 · Proven ASM 0x020055ae–0x020055b0: 2 bytes
-
+
373 · Proven ASM 0x02005926–0x02005928: 2 bytes
-
+
373 · Proven ASM 0x0200594e–0x02005950: 2 bytes
-
+
373 · Proven ASM 0x02005b46–0x02005b48: 2 bytes
-
+
373 · Proven ASM 0x02005d66–0x02005d68: 2 bytes
-
+
373 · Proven ASM 0x02005e2a–0x02005e2c: 2 bytes
-
+
373 · Proven ASM 0x02005e8c–0x02006154: 712 bytes
-
+
373 · Proven ASM 0x02006160–0x0200618e: 46 bytes
-
+
374 · update_toward_target · Proven C: 88 bytes
-
+
374 · SceneData_GetTableAfa0 · Proven C: 8 bytes
-
+
374 · get_tertiary_default_result · Proven C: 4 bytes
-
+
374 · SceneData_SelectTableByFlag834 · Proven C: 36 bytes
-
+
374 · SceneData_SelectTableByFlags834And87a · Proven C: 84 bytes
-
+
374 · FieldScene_RunSequence111F · Proven C: 76 bytes
-
+
374 · SceneData_SelectTableByFlags87a_815_834 · Proven C: 108 bytes
-
+
374 · SceneDialogue_RunActor23Line · Proven C: 44 bytes
-
+
374 · SceneDialogue_ShowLineF3F · Proven C: 44 bytes
-
+
374 · SceneDialogue_ShowLineF44 · Proven C: 44 bytes
-
+
374 · FieldScene_RunOpeningAuxiliarySequence · Proven C: 364 bytes
-
+
374 · SceneDialogue_RunFlagGatedMessageStep · Proven C: 144 bytes
-
+
374 · FieldScene_RunActorTwentySixEffectPresentation · Proven C: 144 bytes
-
+
374 · FieldScene_RunMiddleAuxiliarySequence · Proven C: 276 bytes
-
+
374 · SceneDialogue_ShowLineEB1OrEB0 · Proven C: 76 bytes
-
+
374 · SceneDialogue_RunActorElevenFlaggedDialogue · Proven C: 64 bytes
-
+
374 · FieldScene_RunActorTwentyOneSetup · Proven C: 160 bytes
-
+
374 · SceneState_SetWork1c0AndRun · Proven C: 60 bytes
-
+
374 · FieldScene_RunSupplementalSequenceOne · Proven C: 48 bytes
-
+
374 · FieldScene_RunSupplementalSequenceTwo · Proven C: 106 bytes
-
+
374 · FieldScene_RunSupplementalSequenceThree · Proven C: 48 bytes
-
+
374 · FieldScene_RunSupplementalSequenceFour · Proven C: 48 bytes
-
+
374 · FieldScene_RunSupplementalSequenceFive · Proven C: 48 bytes
-
+
374 · FieldScene_RunSupplementalSequenceSix · Proven C: 48 bytes
-
+
374 · FieldScene_RunSupplementalSequenceSeven · Proven C: 48 bytes
-
+
374 · FieldScene_RunStep7BThen8 · Proven C: 18 bytes
-
+
374 · SceneState_ApplyFlag815Branch · Proven C: 32 bytes
-
+
374 · SceneState_ApplyFlag90b · Proven C: 16 bytes
-
+
374 · SceneState_ApplyFlag90c · Proven C: 16 bytes
-
+
374 · SceneState_ApplyFlag90d · Proven C: 16 bytes
-
+
+
+
+374 · FieldScene_RunScene374SequenceA · Proven C: 1,224 bytes
+
374 · FieldScene_RunSplitPairSteps · Proven C: 22 bytes
-
+
374 · SceneActor_SetPairZeroAndValue · Proven C: 22 bytes
-
+
374 · OverlayObject_UpdateOnFrameBit1 · Proven C: 60 bytes
-
+
374 · SceneEffect_UpdateByFrameBits · Proven C: 60 bytes
-
+
374 · SceneEffect_UpdateByFrameBit · Proven C: 44 bytes
-
+
374 · animate_positive · Proven C: 80 bytes
-
+
374 · animate_negative · Proven C: 82 bytes
-
+
374 · SceneState_ApplyPair140And0 · Proven C: 14 bytes
-
+
374 · FieldScene_Forward4dac · Proven C: 10 bytes
-
+
374 · FieldScene_RunStep15 · Proven C: 16 bytes
-
+
374 · FieldScene_RunStep17 · Proven C: 16 bytes
-
+
374 · FieldScene_RunStep20 · Proven C: 16 bytes
-
+
374 · SceneState_SetValues352_365_2116_2117_40 · Proven C: 52 bytes
-
+
374 · Unknown 0x02000940–0x02000b8a: 586 bytes
-
+
-
-374 · Unknown 0x0200105c–0x0200124a: 494 bytes
-
+
+374 · Unknown 0x02001084–0x0200124a: 454 bytes
+
374 · Unknown 0x0200124c–0x0200155a: 782 bytes
-
+
374 · Unknown 0x0200155c–0x020017c8: 620 bytes
-
+
374 · Unknown 0x02002440–0x0200249a: 90 bytes
-
+
374 · Unknown 0x0200249c–0x0200250a: 110 bytes
-
+
374 · Unknown 0x0200250c–0x02002564: 88 bytes
-
+
374 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
374 · Proven ASM 0x020007ea–0x020007ec: 2 bytes
-
+
374 · Proven ASM 0x020008ee–0x020008f0: 2 bytes
-
+
-
-374 · Proven ASM 0x02000b8a–0x0200105c: 1,234 bytes
-
+
+374 · Proven ASM 0x02000b8a–0x02000bbc: 50 bytes
+
374 · Proven ASM 0x0200124a–0x0200124c: 2 bytes
-
+
374 · Proven ASM 0x0200155a–0x0200155c: 2 bytes
-
+
374 · Proven ASM 0x020017c8–0x020022c8: 2,816 bytes
-
+
374 · Proven ASM 0x020022de–0x020022e0: 2 bytes
-
+
374 · Proven ASM 0x020022f6–0x020022f8: 2 bytes
-
+
374 · Proven ASM 0x0200243e–0x02002440: 2 bytes
-
+
374 · Proven ASM 0x0200249a–0x0200249c: 2 bytes
-
+
374 · Proven ASM 0x0200250a–0x0200250c: 2 bytes
-
+
374 · Proven ASM 0x02002572–0x02002574: 2 bytes
-
+
374 · Proven ASM 0x0200257e–0x02002580: 2 bytes
-
+
374 · Proven ASM 0x020025ec–0x02002854: 616 bytes
-
+
375 · OverlayObject_UpdateFacingTowardTarget · Proven C: 88 bytes
-
+
375 · SceneData_GetTable9CF4 · Proven C: 8 bytes
-
+
375 · get_tertiary_default_result · Proven C: 4 bytes
-
+
375 · SceneData_GetTable9db4 · Proven C: 8 bytes
-
+
375 · SceneData_GetTable9ddc · Proven C: 8 bytes
-
+
375 · SceneData_SelectTable9efcByFlags · Proven C: 56 bytes
-
+
+
+
+375 · RunEventScript01 · Proven C: 148 bytes
+
375 · FieldScene_RunScene375_02000964 · Proven C: 580 bytes
-
+
375 · FieldScene_SetupWithDescriptorA0ACWhenFlag242Clear · Proven C: 56 bytes
-
+
+
+
+375 · FieldScene_ConfigureProgressDependentActors · Proven C: 596 bytes
+
+
+
+375 · FieldScene_RunProgressDependentActorSequence · Proven C: 580 bytes
+
375 · SceneState_SetWorkAndFlag87d · Proven C: 68 bytes
-
+
375 · SceneState_SetWorkAndFlag87e · Proven C: 68 bytes
-
+
375 · SceneDialogue_RunActorSixteenDialogue · Proven C: 32 bytes
-
+
375 · Unknown 0x02000738–0x0200094a: 530 bytes
-
+
375 · Unknown 0x0200094c–0x02000964: 24 bytes
-
+
375 · Unknown 0x02000be0–0x02000f1a: 826 bytes
-
+
375 · Unknown 0x02000f1c–0x02001286: 874 bytes
-
+
375 · Unknown 0x02001288–0x020014f2: 618 bytes
-
+
375 · Unknown 0x020014f4–0x0200150c: 24 bytes
-
-
-
-375 · Unknown 0x0200172c–0x02001760: 52 bytes
-
-
-
-375 · Unknown 0x02001974–0x020019a4: 48 bytes
-
+
375 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
-
-375 · Proven ASM 0x020000dc–0x02000738: 1,628 bytes
-
+
+375 · Proven ASM 0x02000170–0x02000738: 1,480 bytes
+
375 · Proven ASM 0x0200094a–0x0200094c: 2 bytes
-
+
375 · Proven ASM 0x02000f1a–0x02000f1c: 2 bytes
-
+
375 · Proven ASM 0x02001286–0x02001288: 2 bytes
-
+
375 · Proven ASM 0x020014f2–0x020014f4: 2 bytes
-
-
-
-375 · Proven ASM 0x0200150c–0x0200172c: 544 bytes
-
-
-
-375 · Proven ASM 0x02001760–0x02001974: 532 bytes
-
+
375 · Proven ASM 0x02001a4c–0x02001bdc: 400 bytes
-
+
376 · OverlayObject_UpdateFacingTowardTarget · Proven C: 88 bytes
-
+
376 · AdvancePositionScaleAndVelocity · Proven C: 68 bytes
-
+
376 · SceneData_GetTable9478 · Proven C: 8 bytes
-
+
376 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
376 · SceneData_SelectTable9568ByFlag · Proven C: 36 bytes
-
+
376 · SceneData_SelectTable9c00ByFlags · Proven C: 80 bytes
-
+
376 · SceneDialogue_RunActor15Message0f6d · Proven C: 44 bytes
-
+
376 · SceneDialogue_RunActor19Message0f73 · Proven C: 44 bytes
-
+
376 · FieldScene_RunScene376_020001e8 · Proven C: 112 bytes
-
+
376 · SceneDialogue_RunActor16Message11be · Proven C: 32 bytes
-
+
376 · SceneDialogue_RunActor10Message1c3d · Proven C: 32 bytes
-
+
376 · FieldScene_RunScene376_02000298 · Proven C: 36 bytes
-
+
376 · SceneState_SetRuntimeWord448To521AndRun · Proven C: 76 bytes
-
+
376 · FieldScene_RunIndexedStep1 · Proven C: 12 bytes
-
+
376 · FieldScene_RunIndexedStep2 · Proven C: 12 bytes
-
+
376 · FieldScene_RunIndexedStep3 · Proven C: 12 bytes
-
+
376 · FieldScene_RunIndexedStep4 · Proven C: 12 bytes
-
+
376 · FieldScene_RunIndexedStep5 · Proven C: 12 bytes
-
+
376 · FieldScene_RunIndexedStep6 · Proven C: 12 bytes
-
+
376 · FieldScene_RunIndexedStep7 · Proven C: 12 bytes
-
+
376 · FieldScene_RunIndexedStep8 · Proven C: 12 bytes
-
+
376 · FieldScene_RunSupplementalSequenceOne · Proven C: 372 bytes
-
+
376 · FieldScene_RunByActorDirectionAndFlags · Proven C: 128 bytes
-
+
376 · FieldScene_RunScene376_0200055c · Proven C: 120 bytes
-
+
376 · FieldScene_RunScene376_020005d4 · Proven C: 132 bytes
-
+
376 · FieldScene_RunLongPresentationSequence · Proven C: 2,664 bytes
-
+
376 · Unknown 0x020000fc–0x0200012a: 46 bytes
-
+
376 · Unknown 0x0200012c–0x02000140: 20 bytes
-
+
376 · Unknown 0x020010c0–0x02001136: 118 bytes
-
+
376 · Unknown 0x02001138–0x02001144: 12 bytes
-
+
376 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
376 · Proven ASM 0x0200012a–0x0200012c: 2 bytes
-
+
376 · Proven ASM 0x02001136–0x02001138: 2 bytes
-
+
376 · Proven ASM 0x0200114c–0x020012fc: 432 bytes
-
+
377 · SceneActor_UpdateFacingTowardTarget · Proven C: 88 bytes
-
+
377 · FacingTargetScene_GetScriptData · Proven C: 8 bytes
-
+
377 · get_tertiary_default_result · Proven C: 4 bytes
-
+
377 · SceneData_SelectTableA1DCOrA198 · Proven C: 36 bytes
-
+
377 · SceneData_SelectTableByStoryFlags · Proven C: 96 bytes
-
+
377 · FieldScene_RunActorCueBranch · Proven C: 72 bytes
-
+
377 · SceneData_SelectTableByStoryFlagsB · Proven C: 128 bytes
-
+
377 · FieldScene_RunScene377_020001e0 · Proven C: 164 bytes
-
+
377 · SceneDialogue_RunActorFourteenDialogue11AA · Proven C: 92 bytes
-
+
377 · SceneState_SetWork448To521AndRun · Proven C: 60 bytes
-
+
377 · SceneState_SetValue123Mode1 · Proven C: 18 bytes
-
+
377 · FieldScene_RunStep7BThen2 · Proven C: 18 bytes
-
+
377 · SceneState_SetValue123Mode3 · Proven C: 18 bytes
-
+
377 · FieldScene_RunStep7BThen4 · Proven C: 18 bytes
-
+
377 · FieldScene_RunStep80Then5 · Proven C: 18 bytes
-
+
377 · FieldScene_RunStep7BThen6 · Proven C: 18 bytes
-
+
377 · FieldScene_RunStep80Then7 · Proven C: 18 bytes
-
+
377 · SceneState_SetValue129Mode8 · Proven C: 18 bytes
-
+
377 · SceneState_SetValue129Mode9 · Proven C: 18 bytes
-
+
377 · FieldScene_RunStep7BThen10 · Proven C: 18 bytes
-
+
377 · SceneState_ApplyValues123And11 · Proven C: 18 bytes
-
+
377 · FieldScene_RunScene377_02000e34 · Proven C: 196 bytes
-
+
377 · SceneDialogue_ShowLine1C13WithActor16Steps · Proven C: 64 bytes
-
+
377 · SceneDialogue_RunActorThirteenDialogue · Proven C: 44 bytes
-
+
377 · SceneDialogue_RunActor16LineAndFlag81c · Proven C: 44 bytes
-
+
+
+
+377 · RunEventScript01 · Proven C: 940 bytes
+
+
+
+377 · FieldScene_RunScene377SequenceA · Proven C: 120 bytes
+
377 · ActorPresentation_SetTwoSceneCells · Proven C: 46 bytes
-
+
377 · FieldScene_RunSupplementalSequenceOne · Proven C: 352 bytes
-
+
377 · SceneEffect_UpdateObjectByFrameParity · Proven C: 60 bytes
-
+
377 · OverlayObject_UpdateOnFrameParity · Proven C: 60 bytes
-
+
377 · OverlayObject_ApplyRandomSlotOnOddFrames · Proven C: 44 bytes
-
+
377 · SceneEffect_UpdateAnchoredRiseFrame · Proven C: 80 bytes
-
+
377 · OverlayObject_UpdateArcFromAnchor · Proven C: 82 bytes
-
+
377 · SceneState_SetValue140Mode0 · Proven C: 14 bytes
-
+
377 · FieldScene_RunSingleStep · Proven C: 10 bytes
-
+
377 · FieldScene_RunActor8TwoStep · Proven C: 16 bytes
-
+
377 · FieldScene_RunStep17 · Proven C: 16 bytes
-
+
377 · FieldScene_RunSixStepSequence17e4 · Proven C: 40 bytes
-
+
377 · Unknown 0x020003f8–0x02000578: 384 bytes
-
-
-
-377 · Unknown 0x020013a4–0x020013b4: 16 bytes
-
+
377 · Unknown 0x0200168c–0x0200174e: 194 bytes
-
+
377 · Unknown 0x02001750–0x020017a8: 88 bytes
-
+
377 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
377 · Proven ASM 0x0200032e–0x02000330: 2 bytes
-
+
377 · Proven ASM 0x02000342–0x02000344: 2 bytes
-
+
377 · Proven ASM 0x02000356–0x02000358: 2 bytes
-
+
377 · Proven ASM 0x0200036a–0x0200036c: 2 bytes
-
+
377 · Proven ASM 0x0200037e–0x02000380: 2 bytes
-
+
377 · Proven ASM 0x02000392–0x02000394: 2 bytes
-
+
377 · Proven ASM 0x020003a6–0x020003a8: 2 bytes
-
+
377 · Proven ASM 0x020003ba–0x020003bc: 2 bytes
-
+
377 · Proven ASM 0x020003ce–0x020003d0: 2 bytes
-
+
377 · Proven ASM 0x020003e2–0x020003e4: 2 bytes
-
+
377 · Proven ASM 0x020003f6–0x020003f8: 2 bytes
-
+
377 · Proven ASM 0x02000578–0x02000e34: 2,236 bytes
-
-
-
-377 · Proven ASM 0x02000f90–0x020013a4: 1,044 bytes
-
+
377 · Proven ASM 0x020013e2–0x020013e4: 2 bytes
-
+
377 · Proven ASM 0x0200168a–0x0200168c: 2 bytes
-
+
377 · Proven ASM 0x0200174e–0x02001750: 2 bytes
-
+
377 · Proven ASM 0x020017b6–0x020017b8: 2 bytes
-
+
377 · Proven ASM 0x020017c2–0x020017c4: 2 bytes
-
+
377 · Proven ASM 0x02001814–0x02001ab4: 672 bytes
-
+
378 · UpdateFacingFromResolvedObject · Proven C: 44 bytes
-
+
378 · SceneData_GetTableBaa8 · Proven C: 8 bytes
-
+
378 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
378 · SceneData_GetTableBbc8 · Proven C: 8 bytes
-
+
378 · SceneData_SelectPlacementTableBySubstate · Proven C: 220 bytes
-
+
378 · SceneData_SelectTableBySceneIdAndFlags · Proven C: 304 bytes
-
+
378 · FieldScene_RunActorNineFlagDialogueA · Proven C: 112 bytes
-
+
378 · FieldScene_RunActorNineFlagDialogueB · Proven C: 116 bytes
-
+
378 · FieldScene_RunSupplementalSequenceOne · Proven C: 392 bytes
-
+
378 · FieldScene_RunScene378SequenceB · Proven C: 140 bytes
-
+
378 · FieldScene_RunActorTenCountStep · Proven C: 88 bytes
-
+
378 · FieldScene_RunActorEightResetSequence · Proven C: 100 bytes
-
+
378 · FieldScene_RunActorUpdateSequence · Proven C: 3,400 bytes
-
+
378 · SceneState_ResetObject14Word108 · Proven C: 28 bytes
-
+
378 · SceneEffect_StepEllipseOrbit · Proven C: 94 bytes
-
+
378 · FieldScene_RunPairedActorChoreography · Proven C: 1,930 bytes
-
+
378 · SceneState_ApplyTwoRects · Proven C: 56 bytes
-
+
378 · IsActorFacingInward · Proven C: 40 bytes
-
+
378 · FieldScene_RunActorEightFacingDialogue · Proven C: 100 bytes
-
+
378 · FieldScene_DispatchBySceneId · Proven C: 296 bytes
-
+
378 · SceneDialogue_RunActorEightFlaggedDialogue · Proven C: 76 bytes
-
+
378 · SceneDialogue_RunActorEightFollowupDialogue · Proven C: 72 bytes
-
+
378 · SceneDialogue_RunActorEightDialogue · Proven C: 48 bytes
-
+
378 · Unknown 0x020005cc–0x0200060c: 64 bytes
-
+
378 · Unknown 0x020006c6–0x020006d8: 18 bytes
-
+
378 · Unknown 0x0200074c–0x0200088a: 318 bytes
-
+
378 · Unknown 0x0200265c–0x02002660: 4 bytes
-
+
378 · Unknown 0x0200267c–0x020026f0: 116 bytes
-
+
378 · Unknown 0x02002750–0x020027d2: 130 bytes
-
+
378 · Unknown 0x020027d4–0x0200290c: 312 bytes
-
+
378 · Unknown 0x02003098–0x020031aa: 274 bytes
-
+
378 · Unknown 0x020031ac–0x0200326e: 194 bytes
-
+
378 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
378 · Proven ASM 0x0200088a–0x0200187c: 4,082 bytes
-
+
378 · Proven ASM 0x020025c4–0x0200265c: 152 bytes
-
+
378 · Proven ASM 0x0200274e–0x02002750: 2 bytes
-
+
378 · Proven ASM 0x020027d2–0x020027d4: 2 bytes
-
+
378 · Proven ASM 0x02003096–0x02003098: 2 bytes
-
+
378 · Proven ASM 0x020031aa–0x020031ac: 2 bytes
-
+
378 · Proven ASM 0x0200326e–0x02003270: 2 bytes
-
+
378 · Proven ASM 0x02003528–0x02003740: 536 bytes
-
+
379 · ConditionalSceneSetup_GetScriptData · Proven C: 8 bytes
-
+
379 · ConditionalSceneSetup_GetInitialState · Proven C: 4 bytes
-
+
379 · ConditionalSceneSetup_GetMessageData · Proven C: 8 bytes
-
+
379 · ConditionalSceneSetup_GetActorData · Proven C: 8 bytes
-
+
379 · ConditionalSceneSetup_GetEffectData · Proven C: 8 bytes
-
+
379 · ConditionalSceneSetup_InitForScene15 · Proven C: 32 bytes
-
+
379 · RunEventScript01 · Proven C: 2,628 bytes
-
+
379 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
379 · Proven ASM 0x02000ab8–0x02000c00: 328 bytes
-
+
37a · GetSolShindenScriptData · Proven C: 8 bytes
-
+
37a · GetSolShindenInitialState · Proven C: 4 bytes
-
+
37a · GetSolShindenMessageData · Proven C: 8 bytes
-
+
37a · GetSolShindenActorData · Proven C: 8 bytes
-
+
37a · GetSolShindenEffectData · Proven C: 8 bytes
-
+
37a · FieldScene_RunScene37aSequenceA · Proven C: 180 bytes
-
+
37a · FieldScene_RunScene37aSequenceB · Proven C: 72 bytes
-
+
37a · FieldScene_RunScene37aSequenceC · Proven C: 156 bytes
-
+
37a · FieldScene_RunScene37aSequenceD · Proven C: 64 bytes
-
+
37a · ClearSolShindenBackdrop · Proven C: 10 bytes
-
+
37a · SetStatueLightGroup1 · Proven C: 148 bytes
-
+
37a · SetStatueLightGroup2 · Proven C: 148 bytes
-
+
37a · SetStatueLightGroup3 · Proven C: 148 bytes
-
+
37a · SetStatueLightGroup4 · Proven C: 148 bytes
-
+
37a · FieldScene_RunScene37a_020009f4 · Proven C: 524 bytes
-
+
37a · UpdateStatueTrapActor · Proven C: 412 bytes
-
+
37a · UpdateStatueLight1 · Proven C: 348 bytes
-
+
37a · UpdateStatueLight2 · Proven C: 292 bytes
-
+
37a · UpdateStatueLight3 · Proven C: 292 bytes
-
+
37a · UpdateStatueLight4 · Proven C: 292 bytes
-
+
37a · FieldScene_RunScene37a_02001264 · Proven C: 284 bytes
-
+
37a · StartSolShindenTrapEvent · Proven C: 400 bytes
-
+
37a · FieldScene_RunScene37aSequenceE · Proven C: 400 bytes
-
+
37a · FieldScene_RunScene37a_02001be8 · Proven C: 192 bytes
-
+
37a · CheckAllStatueLights · Proven C: 76 bytes
-
+
37a · SetSolShindenActorStep · Proven C: 22 bytes
-
+
37a · FieldScene_RunScene37a_02002924 · Proven C: 72 bytes
-
+
37a · Unknown 0x02001ca8–0x02002092: 1,002 bytes
-
+
37a · Unknown 0x02002094–0x020025b0: 1,308 bytes
-
+
37a · Unknown 0x02002614–0x02002924: 784 bytes
-
+
37a · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
37a · Proven ASM 0x02000236–0x02000238: 2 bytes
-
+
37a · Proven ASM 0x02000488–0x020009f4: 1,388 bytes
-
+
37a · Proven ASM 0x02001510–0x02001a58: 1,352 bytes
-
+
37a · Proven ASM 0x02002092–0x02002094: 2 bytes
-
+
37a · Proven ASM 0x02002612–0x02002614: 2 bytes
-
+
37a · Proven ASM 0x0200296c–0x02002afc: 400 bytes
-
+
37b · SceneEventRuntime_GetScriptData · Proven C: 8 bytes
-
+
37b · SceneEventRuntime_ReturnZero · Proven C: 4 bytes
-
+
37b · SceneEventRuntime_GetMessageData · Proven C: 8 bytes
-
+
37b · SceneEventRuntime_GetActorData · Proven C: 8 bytes
-
+
37b · SceneEventRuntime_GetEffectData · Proven C: 8 bytes
-
+
37b · SceneEventRuntime_SelectInitialSceneByFlags · Proven C: 68 bytes
-
+
37b · FieldScene_RunLoopedLayoutSequence · Proven C: 184 bytes
-
+
+
+
+37b · RunEventScript01 · Proven C: 1,220 bytes
+
+
+
+37b · FieldScene_RunScene37bSequenceD · Proven C: 1,656 bytes
+
37b · SceneEffect_UpdateScrollingSpriteRows · Proven C: 308 bytes
-
+
37b · SceneState_RunWhenSlotZeroFacingC000 · Proven C: 26 bytes
-
+
37b · SceneState_RunWhenActorZeroFacing4000 · Proven C: 26 bytes
-
+
37b · FieldScene_RunPrimarySequenceHead · Proven C: 64 bytes
-
+
37b · FieldScene_RunScene37bSequenceB · Proven C: 1,116 bytes
-
+
37b · FieldScene_RunScene37bSequenceC · Proven C: 188 bytes
-
+
37b · FieldScene_CallWhenCheck9_31_9 · Proven C: 24 bytes
-
+
37b · FieldScene_RunGuardedStep11 · Proven C: 24 bytes
-
+
37b · FieldScene_RunGuardedStep13 · Proven C: 24 bytes
-
+
37b · FieldScene_RunGuardedStep15 · Proven C: 24 bytes
-
+
37b · ConfigureSceneAndCheckActors · Proven C: 40 bytes
-
+
37b · ConfigureAlternateSceneAndCheckActors · Proven C: 40 bytes
-
+
37b · FieldScene_RunClosingSequence · Proven C: 72 bytes
-
+
+
+
+37b · FieldScene_RunScene37bSequenceE · Proven C: 56 bytes
+
+
+
+37b · FieldScene_RunScene37bSequenceF · Proven C: 56 bytes
+
+
+
+37b · FieldScene_RunScene37bSequenceG · Proven C: 640 bytes
+
37b · FieldScene_RunScene37bSequenceA · Proven C: 136 bytes
-
+
37b · FieldScene_RunFiveValueStep9 · Proven C: 30 bytes
-
+
37b · FieldScene_RunFiveValueStep11 · Proven C: 30 bytes
-
+
37b · FieldScene_ApplyRect13_31_12_30_12 · Proven C: 30 bytes
-
+
37b · FieldScene_RunFiveValueStep15 · Proven C: 30 bytes
-
+
37b · FieldScene_ApplyRect10_14_7_13_7 · Proven C: 30 bytes
-
+
37b · SceneActor_UseActorTenCellAndNext · Proven C: 38 bytes
-
+
37b · SceneActor_MoveActor10ByRow · Proven C: 38 bytes
-
+
37b · FieldScene_ApplyRect12_21_7_22_7 · Proven C: 30 bytes
-
+
37b · SceneActor_ApplyActorTwelveZCellPair · Proven C: 38 bytes
-
+
37b · SceneActor_RunSlot12ColumnStep · Proven C: 38 bytes
-
+
37b · SceneActor_IsActorAtTile · Proven C: 44 bytes
-
+
37b · SceneData_InitTableA980 · Proven C: 256 bytes
-
+
37b · SceneData_FillTableA980 · Proven C: 252 bytes
-
+
37b · SceneData_InitTableA980AndRunB · Proven C: 252 bytes
-
+
37b · SceneData_BuildTableA980 · Proven C: 232 bytes
-
+
37b · FieldScene_RunScene37b_02002244 · Proven C: 176 bytes
-
+
37b · FieldScene_RunScene37b_020022f4 · Proven C: 176 bytes
-
+
37b · FieldScene_RunSplitPairSteps · Proven C: 22 bytes
-
+
-
-37b · Unknown 0x02000a18–0x02000eb0: 1,176 bytes
-
-
-
-37b · Unknown 0x0200166c–0x0200195c: 752 bytes
-
+
+37b · Unknown 0x02000c8c–0x02000eb0: 548 bytes
+
37b · Unknown 0x02001b44–0x02001bde: 154 bytes
-
+
37b · Unknown 0x02001be0–0x02001be8: 8 bytes
-
+
37b · Proven ASM 0x02000000–0x02000030: 48 bytes
-
-
-
-37b · Proven ASM 0x02000150–0x02000a18: 2,248 bytes
-
+
37b · Proven ASM 0x02000ffe–0x02001000: 2 bytes
-
+
37b · Proven ASM 0x0200101a–0x0200101c: 2 bytes
-
+
37b · Proven ASM 0x02001a02–0x02001a04: 2 bytes
-
+
37b · Proven ASM 0x02001a22–0x02001a24: 2 bytes
-
+
37b · Proven ASM 0x02001a42–0x02001a44: 2 bytes
-
+
37b · Proven ASM 0x02001a62–0x02001a64: 2 bytes
-
+
37b · Proven ASM 0x02001a82–0x02001a84: 2 bytes
-
+
37b · Proven ASM 0x02001aaa–0x02001aac: 2 bytes
-
+
37b · Proven ASM 0x02001ad2–0x02001ad4: 2 bytes
-
+
37b · Proven ASM 0x02001af2–0x02001af4: 2 bytes
-
+
37b · Proven ASM 0x02001b1a–0x02001b1c: 2 bytes
-
+
37b · Proven ASM 0x02001b42–0x02001b44: 2 bytes
-
+
37b · Proven ASM 0x02001bde–0x02001be0: 2 bytes
-
+
37b · Proven ASM 0x02001ff4–0x02002244: 592 bytes
-
+
37b · Proven ASM 0x020023ba–0x0200256c: 434 bytes
-
+
37c · leaf_0824 · Proven C: 8 bytes
-
+
37c · state_update_0432 · Proven C: 4 bytes
-
+
37c · SceneData_GetPrimaryTable37c · Proven C: 8 bytes
-
+
37c · SceneData_GetSecondaryTable37c · Proven C: 8 bytes
-
+
37c · SceneData_GetTertiaryTable37c · Proven C: 8 bytes
-
+
37c · Resource37c_Run · Proven C: 76 bytes
-
+
37c · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
37c · Proven ASM 0x020000a0–0x020000c8: 40 bytes
-
+
37d · SceneData_GetScriptTable · Proven C: 8 bytes
-
+
37d · SceneData_ReturnZero · Proven C: 4 bytes
-
+
37d · SceneData_GetMessageTable · Proven C: 8 bytes
-
+
37d · SceneData_GetActorTable · Proven C: 8 bytes
-
+
37d · SceneData_GetEffectTable · Proven C: 8 bytes
-
+
37d · FieldScene_InitSceneRequestAndCameraZoom · Proven C: 76 bytes
-
+
37d · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
37d · Proven ASM 0x020000a0–0x020000c0: 32 bytes
-
+
37e · SceneData_GetScriptTable · Proven C: 8 bytes
-
+
37e · SceneData_ReturnZero · Proven C: 4 bytes
-
+
37e · SceneData_GetMessageTable · Proven C: 8 bytes
-
+
37e · SceneData_GetActorTable · Proven C: 8 bytes
-
+
37e · SceneData_GetEffectTable · Proven C: 8 bytes
-
+
37e · FieldScene_InitSceneRequestAndCameraZoom · Proven C: 76 bytes
-
+
37e · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
37e · Proven ASM 0x020000a0–0x020000c0: 32 bytes
-
+
37f · SceneData_SelectOverlayDataBySelector · Proven C: 64 bytes
-
+
37f · get_secondary_default_result · Proven C: 4 bytes
-
+
37f · SceneData_GetTable9F14 · Proven C: 8 bytes
-
+
37f · FieldScene_RunSupplementalSequenceOne · Proven C: 112 bytes
-
+
+
+
+37f · FieldScene_RunScene37fSequenceC · Proven C: 104 bytes
+
37f · FieldScene_RunScene37fSequenceA · Proven C: 172 bytes
-
+
37f · SceneDialogue_RunFlag81aMessageBranch · Proven C: 88 bytes
-
+
37f · FieldScene_RunOpeningAuxiliarySequence · Proven C: 356 bytes
-
+
37f · FieldScene_RunFlag821Dialogue · Proven C: 100 bytes
-
+
37f · FieldScene_RunSupplementalSequenceTwo · Proven C: 332 bytes
-
+
37f · SceneActor_FindSlotByTilePosition · Proven C: 52 bytes
-
+
37f · FieldScene_DispatchByScenarioId · Proven C: 56 bytes
-
+
37f · FieldScene_RunScene37f_0200092c · Proven C: 248 bytes
-
+
37f · FieldScene_RunScene37f_02000d1c · Proven C: 624 bytes
-
+
37f · FieldScene_RunFourEntitySequence · Proven C: 1,680 bytes
-
+
+
+
+37f · RunEventScript02 · Proven C: 420 bytes
+
+
+
+37f · FieldScene_RunScene37fSequenceB · Proven C: 748 bytes
+
37f · FieldScene_RunScriptedStep953 · Proven C: 28 bytes
-
+
37f · Draft C 0x0200056c–0x0200079c: 560 bytes
-
-
-
-37f · Unknown 0x020000ec–0x02000132: 70 bytes
-
-
-
-37f · Unknown 0x02000134–0x02000154: 32 bytes
-
+
37f · Unknown 0x020007d0–0x020008f4: 292 bytes
-
+
37f · Unknown 0x02000a24–0x02000a78: 84 bytes
-
+
37f · Unknown 0x02000cda–0x02000ce2: 8 bytes
-
+
37f · Unknown 0x02000ce4–0x02000cf4: 16 bytes
-
-
-
-37f · Unknown 0x02001a88–0x02001aac: 36 bytes
-
+
37f · Unknown 0x02001ac8–0x02001b1a: 82 bytes
-
+
37f · Unknown 0x02001b1c–0x02001b24: 8 bytes
-
+
37f · Proven ASM 0x02000000–0x02000030: 48 bytes
-
-
-
-37f · Proven ASM 0x02000132–0x02000134: 2 bytes
-
+
37f · Proven ASM 0x02000ce2–0x02000ce4: 2 bytes
-
-
-
-37f · Proven ASM 0x0200161c–0x02001a88: 1,132 bytes
-
+
37f · Proven ASM 0x02001b1a–0x02001b1c: 2 bytes
-
+
37f · Proven ASM 0x02001b24–0x02001cd4: 432 bytes
-
+
380 · OverlayObject_SetHandleFlagBits2And3 · Proven C: 22 bytes
-
+
380 · OverlayObject_PrepareObject · Proven C: 86 bytes
-
+
380 · OverlayObject_CreateConfiguredObject · Proven C: 98 bytes
-
+
380 · Overlay380_SpawnConfiguredEffect · Proven C: 472 bytes
-
+
380 · UpdateOverlayObjectAngle · Proven C: 88 bytes
-
+
380 · SceneData_GetTableCd88 · Proven C: 8 bytes
-
+
380 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
380 · SceneData_GetTableCDB8 · Proven C: 8 bytes
-
+
380 · SceneData_GetTableCdc4 · Proven C: 8 bytes
-
+
380 · SceneData_GetTableCFA4 · Proven C: 8 bytes
-
+
+
+
+380 · FieldScene_RunMultiStageEffectPresentation · Proven C: 880 bytes
+
380 · FieldScene_RunSevenSceneChain · Proven C: 52 bytes
-
+
+
+
+380 · FieldScene_RunPartyIntroduction · Proven C: 708 bytes
+
380 · FieldScene_StagePairedActors · Proven C: 560 bytes
-
+
+
+
+380 · FieldScene_RunActorFormationSequence · Proven C: 1,220 bytes
+
380 · RunEventScript01 · Proven C: 828 bytes
-
+
+
+
+380 · RunEventScript01Second · Proven C: 1,400 bytes
+
380 · FieldScene_RunActorFourteenGuestScene · Proven C: 1,400 bytes
-
+
380 · FieldScene_RunSixPassEffectSequence · Proven C: 628 bytes
-
+
380 · FieldScene_RunActorNineDialogueByFlags · Proven C: 108 bytes
-
+
380 · SceneDialogue_RunActorFiveTalk · Proven C: 108 bytes
-
+
380 · SceneDialogue_RunActorTenDialogue · Proven C: 32 bytes
-
+
380 · SceneDialogue_RunActor11TalkLine · Proven C: 32 bytes
-
+
380 · SceneDialogue_ShowLine10C8 · Proven C: 32 bytes
-
+
380 · SceneDialogue_RunActor14TalkLine · Proven C: 32 bytes
-
+
380 · SceneDialogue_RunLine1072WithPair9And10 · Proven C: 32 bytes
-
+
380 · FieldScene_Forward72b4 · Proven C: 12 bytes
-
+
380 · FieldScene_RunSplitPairSteps · Proven C: 24 bytes
-
+
380 · SceneState_PumpUntilSlotsFree · Proven C: 148 bytes
-
-
-
-380 · Draft C 0x02001394–0x02001446: 178 bytes
-
-
-
-380 · Draft C 0x02001448–0x02001450: 8 bytes
-
+
380 · Draft C 0x02004260–0x02004328: 200 bytes
-
+
380 · Unknown 0x02000104–0x0200013a: 54 bytes
-
+
380 · Unknown 0x02000390–0x020006b6: 806 bytes
-
+
380 · Unknown 0x020006b8–0x020006f4: 60 bytes
-
-
-
-380 · Unknown 0x02001ce4–0x02001d04: 32 bytes
-
+
380 · Unknown 0x0200227c–0x020023e6: 362 bytes
-
+
380 · Unknown 0x020023e8–0x02002400: 24 bytes
-
+
380 · Unknown 0x02003f24–0x02004232: 782 bytes
-
+
380 · Unknown 0x02004234–0x02004248: 20 bytes
-
+
380 · Unknown 0x020043bc–0x0200478c: 976 bytes
-
+
380 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
380 · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
380 · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
380 · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
380 · Proven ASM 0x0200013a–0x0200013c: 2 bytes
-
+
380 · Proven ASM 0x020006b6–0x020006b8: 2 bytes
-
-
-
-380 · Proven ASM 0x020006f4–0x02000a64: 880 bytes
-
-
-
-380 · Proven ASM 0x02000a98–0x02000d5c: 708 bytes
-
-
-
-380 · Proven ASM 0x02000f8c–0x02001394: 1,032 bytes
-
-
-
-380 · Proven ASM 0x02001446–0x02001448: 2 bytes
-
-
-
-380 · Proven ASM 0x0200178c–0x02001ce4: 1,368 bytes
-
+
380 · Proven ASM 0x020023e6–0x020023e8: 2 bytes
-
+
380 · Proven ASM 0x020027f8–0x02003f24: 5,932 bytes
-
+
380 · Proven ASM 0x02004232–0x02004234: 2 bytes
-
+
380 · Proven ASM 0x0200478c–0x02004854: 200 bytes
-
+
380 · Proven ASM 0x02004864–0x02004b1c: 696 bytes
-
+
381 · SceneData_GetTableB6D4 · Proven C: 8 bytes
-
+
381 · get_default_result · Proven C: 4 bytes
-
+
381 · SceneData_GetTableB704 · Proven C: 8 bytes
-
+
381 · SceneData_GetTableB710 · Proven C: 8 bytes
-
+
381 · SceneData_GetTableB998 · Proven C: 8 bytes
-
+
+
+
+381 · RunEventScript01 · Proven C: 3,548 bytes
+
381 · FieldScene_RunScene381_02000e30 · Proven C: 248 bytes
-
+
381 · no_op_callback_a · Proven C: 4 bytes
-
+
381 · no_op_callback_b · Proven C: 2 bytes
-
+
381 · FieldScene_RunWhenWord225Is10 · Proven C: 36 bytes
-
+
381 · OverlayObject_SetRecordAngleFromHeading · Proven C: 16 bytes
-
+
381 · SceneState_InitStateWordsAndSlots · Proven C: 64 bytes
-
+
381 · SceneState_UpdateRandomTimerLevel · Proven C: 180 bytes
-
+
381 · SceneActor_MoveTo232_125AndFace4000 · Proven C: 44 bytes
-
+
381 · SceneState_ApplyRectsByCondition · Proven C: 142 bytes
-
+
381 · SceneState_ApplyRectPairByFlag · Proven C: 94 bytes
-
+
381 · FieldScene_RunRandomHalfBranch · Proven C: 52 bytes
-
+
381 · FieldScene_RunLateRandomHalfBranch · Proven C: 52 bytes
-
+
+
+
+381 · FieldScene_RunSupplementalSequenceOne · Proven C: 508 bytes
+
381 · SceneEffect_AdvanceTenEntryTimers · Proven C: 124 bytes
-
+
381 · SceneActor_PlaceAtTileAndRunSteps · Proven C: 126 bytes
-
+
381 · SceneState_ConfigureEightCornerRegions · Proven C: 170 bytes
-
+
381 · FieldScene_RunVariantStep · Proven C: 76 bytes
-
+
381 · FieldScene_RunStepByRuntimeBits · Proven C: 60 bytes
-
+
381 · SceneState_ForwardByRuntimeWordBits · Proven C: 60 bytes
-
+
381 · SceneEffect_UpdateArcOverAnchor · Proven C: 80 bytes
-
+
381 · SceneEffect_UpdateAnchoredRiseArc · Proven C: 82 bytes
-
+
381 · SceneState_SetValue140Mode0 · Proven C: 14 bytes
-
+
381 · FieldScene_CallHelper6620 · Proven C: 10 bytes
-
+
381 · FieldScene_RunActor15TwoStep · Proven C: 16 bytes
-
-
-
-381 · Draft C 0x020029a4–0x02002b7a: 470 bytes
-
-
-
-381 · Draft C 0x02002b7c–0x02002ba0: 36 bytes
-
+
381 · Unknown 0x02001078–0x02001084: 12 bytes
-
+
381 · Unknown 0x02001328–0x02001358: 48 bytes
-
+
381 · Unknown 0x02001410–0x02001796: 902 bytes
-
+
381 · Unknown 0x02001b34–0x02001f4a: 1,046 bytes
-
+
381 · Unknown 0x02001f4c–0x0200214e: 514 bytes
-
+
381 · Unknown 0x02002150–0x020027f6: 1,702 bytes
-
+
381 · Unknown 0x020027f8–0x02002820: 40 bytes
-
+
381 · Unknown 0x02002eb0–0x02002f7a: 202 bytes
-
+
381 · Unknown 0x02002f7c–0x02002ff0: 116 bytes
-
+
381 · Unknown 0x0200301c–0x0200330c: 752 bytes
-
+
381 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
-
-
-381 · Proven ASM 0x02000054–0x02000e30: 3,548 bytes
-
+
381 · Proven ASM 0x02000f2e–0x02000f30: 2 bytes
-
+
381 · Proven ASM 0x02000f64–0x02000ffc: 152 bytes
-
+
381 · Proven ASM 0x020010c4–0x02001268: 420 bytes
-
+
381 · Proven ASM 0x02001304–0x02001328: 36 bytes
-
+
381 · Proven ASM 0x02001796–0x02001b34: 926 bytes
-
+
381 · Proven ASM 0x02001f4a–0x02001f4c: 2 bytes
-
+
381 · Proven ASM 0x0200214e–0x02002150: 2 bytes
-
+
381 · Proven ASM 0x020027f6–0x020027f8: 2 bytes
-
+
381 · Proven ASM 0x020028da–0x020028dc: 2 bytes
-
+
381 · Proven ASM 0x0200293a–0x0200293c: 2 bytes
-
-
-
-381 · Proven ASM 0x02002b7a–0x02002b7c: 2 bytes
-
+
381 · Proven ASM 0x02002c9a–0x02002c9c: 2 bytes
-
+
381 · Proven ASM 0x02002d46–0x02002d48: 2 bytes
-
+
381 · Proven ASM 0x02002eae–0x02002eb0: 2 bytes
-
+
381 · Proven ASM 0x02002f7a–0x02002f7c: 2 bytes
-
+
381 · Proven ASM 0x02002ffe–0x02003000: 2 bytes
-
+
381 · Proven ASM 0x0200300a–0x0200300c: 2 bytes
-
+
381 · Proven ASM 0x0200330c–0x020033d4: 200 bytes
-
+
381 · Proven ASM 0x020033e4–0x0200362c: 584 bytes
-
+
382 · SceneEffect_SetEffectRecordMode · Proven C: 22 bytes
-
+
382 · OverlayObject_PrepareSceneObject · Proven C: 86 bytes
-
+
382 · OverlayObject_CreateConfiguredObject · Proven C: 98 bytes
-
+
382 · SceneEffect_SpawnConfiguredEffect · Proven C: 472 bytes
-
+
382 · SceneActor_UpdateProximityToLeader · Proven C: 152 bytes
-
+
382 · ActorPresentation_UpdateEntityFromLeader · Proven C: 108 bytes
-
+
382 · SceneData_GetScriptTable · Proven C: 8 bytes
-
+
382 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
382 · SceneData_GetMessageTable · Proven C: 8 bytes
-
+
382 · SceneData_SelectActorTableByFlag855 · Proven C: 36 bytes
-
+
382 · OverlayObject_GetObject2Byte280 · Proven C: 20 bytes
-
+
382 · OverlayObject_RunObject2WhenFlagged · Proven C: 58 bytes
-
+
382 · FieldScene_RunScene382_020004a0 · Proven C: 296 bytes
-
+
382 · SceneState_SetFlags947And29dc · Proven C: 40 bytes
-
+
382 · SceneData_SelectTableA414ByFlag855 · Proven C: 36 bytes
-
+
382 · SceneDialogue_RunActor9LineAndAdvance · Proven C: 96 bytes
-
+
382 · ActorPresentation_RunActorThirteenSceneSetup · Proven C: 92 bytes
-
+
382 · ActorPresentation_RunActorSeventeenSceneSetup · Proven C: 84 bytes
-
+
382 · ActorPresentation_RunActorEighteenSceneSetup · Proven C: 84 bytes
-
+
382 · SceneDialogue_RunActor11Line · Proven C: 32 bytes
-
+
382 · SceneDialogue_RunActor16Line · Proven C: 32 bytes
-
+
382 · SceneDialogue_RunActor19Line · Proven C: 52 bytes
-
+
382 · ActorPresentation_RunActorFourteenDialogue · Proven C: 112 bytes
-
+
382 · ActorPresentation_RunActorFifteenDialogue · Proven C: 112 bytes
-
+
382 · FieldScene_RunActor21Sequence · Proven C: 64 bytes
-
+
382 · SceneActor_RunActorStep · Proven C: 44 bytes
-
+
382 · SceneActor_RunActorCommandWithFlag91 · Proven C: 68 bytes
-
+
382 · ActorPresentation_RunActorEightSceneSetup · Proven C: 84 bytes
-
+
382 · SceneDialogue_RunActor11SecondLine · Proven C: 32 bytes
-
+
382 · SceneDialogue_RunActor12LineAndAdvance · Proven C: 60 bytes
-
+
382 · SceneDialogue_RunActor13Line · Proven C: 32 bytes
-
+
382 · ActorPresentation_RunActorFourteenDialogueAndAdvanceStory · Proven C: 128 bytes
-
+
382 · ActorPresentation_RunActorFifteenFollowupDialogue · Proven C: 112 bytes
-
+
382 · ActorPresentation_RunActorSixteenSceneSetup · Proven C: 92 bytes
-
+
382 · ActorPresentation_RunActorEighteenFollowupSceneSetup · Proven C: 84 bytes
-
+
382 · ActorPresentation_RunActorNineteenDialogueAndSetSceneState · Proven C: 104 bytes
-
+
382 · SceneDialogue_RunActor20Line · Proven C: 56 bytes
-
+
382 · SceneDialogue_RunActor11FlaggedLine · Proven C: 56 bytes
-
+
382 · SceneDialogue_RunActor13FlaggedLine · Proven C: 56 bytes
-
+
382 · ActorPresentation_RunActorFourteenFlaggedDialogue · Proven C: 124 bytes
-
+
382 · ActorPresentation_RunActorFifteenScriptBranch · Proven C: 92 bytes
-
+
382 · ActorPresentation_RunActorSixteenScriptBranch · Proven C: 56 bytes
-
+
382 · ActorPresentation_RunActorNineteenScriptBranch · Proven C: 120 bytes
-
+
382 · SceneDialogue_RunActor21Line · Proven C: 32 bytes
-
+
382 · SceneState_Apply200ThenPlace55_26 · Proven C: 38 bytes
-
+
382 · SceneState_Apply200ThenPlace23_23 · Proven C: 38 bytes
-
+
382 · SceneActor_PlaceActor0AndSetSceneDelay · Proven C: 72 bytes
-
+
382 · FieldScene_SetupScene5At408_320 · Proven C: 40 bytes
-
+
382 · FieldScene_SetupScene6At312_304 · Proven C: 40 bytes
-
+
382 · FieldScene_SetupScene7At216_288 · Proven C: 40 bytes
-
+
382 · ActorPresentation_SetupActorZeroForSceneEightAt376_224 · Proven C: 92 bytes
-
+
382 · ActorPresentation_SetupActorZeroForSceneNineAt296_176 · Proven C: 92 bytes
-
+
382 · FieldScene_SetupScene10At120_144 · Proven C: 36 bytes
-
+
382 · ActorPresentation_SetupActorZeroForSceneTwelveAt72_160 · Proven C: 92 bytes
-
+
382 · FieldScene_SetupScene13At152_264 · Proven C: 24 bytes
-
+
382 · ActorPresentation_MoveActorToPositionAndWait · Proven C: 136 bytes
-
+
382 · FieldScene_RunActor23SequenceOnceByFlag867 · Proven C: 136 bytes
-
+
382 · FieldScene_RunActor19MotionSequence · Proven C: 172 bytes
-
+
382 · SceneActor_GetPositionDistance · Proven C: 60 bytes
-
+
382 · SceneActor_ApplyActorZeroThenWait · Proven C: 24 bytes
-
+
382 · SceneActor_ApplyActorCueThenWait · Proven C: 24 bytes
-
+
382 · SceneEffect_UpdateMotionWithDamping · Proven C: 88 bytes
-
+
382 · Draft C 0x02000104–0x0200013c: 56 bytes
-
+
382 · Unknown 0x02001090–0x0200113a: 170 bytes
-
+
382 · Unknown 0x02001674–0x02001724: 176 bytes
-
+
382 · Unknown 0x020017ac–0x02001900: 340 bytes
-
+
382 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
382 · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
382 · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
382 · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
382 · Proven ASM 0x0200049e–0x020004a0: 2 bytes
-
+
382 · Proven ASM 0x02000eca–0x02000ecc: 2 bytes
-
+
382 · Proven ASM 0x02000ef2–0x02000ef4: 2 bytes
-
+
382 · Proven ASM 0x0200113a–0x0200113c: 2 bytes
-
+
382 · Proven ASM 0x0200136c–0x02001638: 716 bytes
-
+
382 · Proven ASM 0x02001910–0x02001ad0: 448 bytes
-
+
382 · Proven ASM 0x02001adc–0x02001b0a: 46 bytes
-
+
383 · SceneData_GetTableD8f8 · Proven C: 8 bytes
-
+
383 · SceneData_GetTableDa60 · Proven C: 8 bytes
-
+
383 · SceneData_GetTableDa80 · Proven C: 8 bytes
-
+
383 · SceneData_SelectTableBySceneRange · Proven C: 56 bytes
-
+
383 · ActorPresentation_SetSceneCellByAngle · Proven C: 124 bytes
-
+
383 · FieldScene_RunObjectTwentySixPositionCheck · Proven C: 64 bytes
-
+
383 · FieldScene_RunActorNineteenAngleDialogue · Proven C: 96 bytes
-
+
383 · FieldScene_RunActorTwentyAngleDialogue · Proven C: 96 bytes
-
+
383 · FieldScene_RunActorTwentyThreeAngleDialogue · Proven C: 96 bytes
-
+
383 · FieldScene_RunActorEighteenConditionalScene · Proven C: 72 bytes
-
+
383 · SceneDialogue_ShowLine12BB · Proven C: 28 bytes
-
+
383 · SceneState_SetFlags92bAnd94b · Proven C: 40 bytes
-
+
383 · SceneState_SetFlags929And949 · Proven C: 40 bytes
-
+
383 · SceneData_SelectTableE1fcBySceneRangeOrFlag855 · Proven C: 68 bytes
-
+
383 · ActorPresentation_RunActorModeOneThenZeroWithStep · Proven C: 34 bytes
-
+
383 · SceneState_RunGuardedActorStep · Proven C: 68 bytes
-
+
383 · SceneDialogue_PromptAndCountSkip · Proven C: 68 bytes
-
+
383 · SceneDialogue_RunActorElevenDialogue · Proven C: 40 bytes
-
+
383 · FieldScene_RunScene383_02000428 · Proven C: 44 bytes
-
+
383 · SceneState_BranchOnSlotZeroFacingAndFlag855 · Proven C: 104 bytes
-
+
383 · SceneDialogue_RunActor9FlaggedLine · Proven C: 56 bytes
-
+
383 · SceneDialogue_RunActorTwelveFlaggedDialogue · Proven C: 56 bytes
-
+
383 · FieldScene_RunFlag856DialogueBranch · Proven C: 112 bytes
-
+
383 · SceneDialogue_ShowLine128E · Proven C: 32 bytes
-
+
383 · SceneActor_StepActor24AnimationByFacing · Proven C: 212 bytes
-
+
383 · SceneDialogue_RunActor10Line · Proven C: 32 bytes
-
+
383 · SceneDialogue_RunActor11Line · Proven C: 32 bytes
-
+
383 · SceneDialogue_RunActor14Line · Proven C: 32 bytes
-
+
383 · FieldScene_RunScene383SequenceC · Proven C: 240 bytes
-
+
383 · FieldScene_RunScene383_0200091c · Proven C: 248 bytes
-
+
383 · SceneDialogue_RunActorNineFlaggedDialogue · Proven C: 56 bytes
-
+
383 · SceneDialogue_RunActorElevenFlaggedDialogue · Proven C: 56 bytes
-
+
383 · SceneDialogue_ShowLine124EOr135E · Proven C: 56 bytes
-
+
383 · SceneDialogue_RunActor16FlaggedLine · Proven C: 56 bytes
-
+
383 · SceneDialogue_RunActorEighteenBranchedDialogue · Proven C: 84 bytes
-
+
383 · FieldScene_RunSetupSequence · Proven C: 668 bytes
-
+
+
+
+383 · FieldScene_RunMainSequence · Proven C: 1,380 bytes
+
383 · SceneState_SetValue123Mode11 · Proven C: 18 bytes
-
+
383 · FieldScene_RunOpeningSequenceHead · Proven C: 64 bytes
-
+
383 · FieldScene_RunOpeningSequenceSecond · Proven C: 104 bytes
-
+
383 · FieldScene_RunOpeningSequenceThird · Proven C: 340 bytes
-
+
383 · FieldScene_RunScene383SequenceB · Proven C: 708 bytes
-
+
383 · FieldScene_RunSteps107And250 · Proven C: 28 bytes
-
+
383 · FieldScene_ConfigurePairedActors · Proven C: 208 bytes
-
+
+
+
+383 · FieldScene_SelectAndConfigureActorPair · Proven C: 632 bytes
+
+
+
+383 · FieldScene_RunConditionalActorSequence · Proven C: 924 bytes
+
383 · SceneActor_UpdateAnimationOnStateMatch · Proven C: 56 bytes
-
+
383 · SceneState_SetFlagByActorPosition · Proven C: 60 bytes
-
+
383 · SceneActor_FaceActors24And25TowardActorZero · Proven C: 80 bytes
-
+
383 · FieldScene_RunLateSequence · Proven C: 452 bytes
-
+
+
+
+383 · FieldScene_RunScene383_02002db4 · Proven C: 464 bytes
+
383 · OverlayObject_GetObjectTwoByte118 · Proven C: 20 bytes
-
+
383 · OverlayObject_RunObjectTwoWhenFlagged · Proven C: 58 bytes
-
+
383 · RunEventScript01 · Proven C: 1,828 bytes
-
+
383 · RunDialoguePromptScene · Proven C: 3,796 bytes
-
+
383 · SceneState_SetWord1c0To209AndRun · Proven C: 40 bytes
-
+
383 · SceneActor_SetModeZeroAndValue · Proven C: 22 bytes
-
+
383 · FieldScene_RunSplitTripleSteps · Proven C: 22 bytes
-
+
383 · SceneActor_SetPairZeroAndValue · Proven C: 22 bytes
-
+
383 · SceneEffect_ApplyThreeValuesAndFinish · Proven C: 28 bytes
-
+
383 · SceneEffect_ApplyPairWithValue141 · Proven C: 44 bytes
-
+
383 · SceneState_SetValue2ThenFinish · Proven C: 20 bytes
-
+
383 · OverlayObject_ConfigureObject22WithResource17 · Proven C: 106 bytes
-
+
383 · SceneData_FindEntryAtPosition · Proven C: 80 bytes
-
+
383 · SceneActor_CheckTileFreeOfKinds · Proven C: 100 bytes
-
+
383 · SceneActor_ApplyScaledBytePairPosition · Proven C: 34 bytes
-
+
383 · FieldScene_RunScene383_02004b2c · Proven C: 320 bytes
-
+
383 · Draft C 0x020047bc–0x020047fc: 64 bytes
-
+
383 · Unknown 0x02000690–0x020006e2: 82 bytes
-
+
383 · Unknown 0x0200078e–0x020007a6: 24 bytes
-
+
383 · Unknown 0x020007a8–0x020007b0: 8 bytes
-
+
-
-383 · Unknown 0x02002548–0x02002584: 60 bytes
-
+
+383 · Unknown 0x02002564–0x02002584: 32 bytes
+
383 · Unknown 0x02002690–0x0200269c: 12 bytes
-
+
383 · Unknown 0x02002758–0x02002784: 44 bytes
-
+
383 · Unknown 0x02002af4–0x02002b00: 12 bytes
-
+
383 · Unknown 0x02002b92–0x02002b9c: 10 bytes
-
-
-
-383 · Unknown 0x02002db4–0x02002f84: 464 bytes
-
+
383 · Unknown 0x02004754–0x020047b6: 98 bytes
-
+
383 · Unknown 0x020047b8–0x020047bc: 4 bytes
-
+
383 · Unknown 0x020047fc–0x02004840: 68 bytes
-
+
383 · Unknown 0x020048c8–0x02004b2c: 612 bytes
-
+
383 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
383 · Proven ASM 0x02000376–0x02000378: 2 bytes
-
+
383 · Proven ASM 0x020007a6–0x020007a8: 2 bytes
-
+
-
-383 · Proven ASM 0x02000de4–0x02001990: 2,988 bytes
-
+
+383 · Proven ASM 0x02001348–0x02001990: 1,608 bytes
+
383 · Proven ASM 0x020019a2–0x020019a4: 2 bytes
-
-
-
-383 · Proven ASM 0x02001f50–0x02002548: 1,528 bytes
-
+
383 · Proven ASM 0x02002fd2–0x02002fd4: 2 bytes
-
+
383 · Proven ASM 0x0200460a–0x0200460c: 2 bytes
-
+
383 · Proven ASM 0x02004622–0x02004624: 2 bytes
-
+
383 · Proven ASM 0x0200463a–0x0200463c: 2 bytes
-
+
383 · Proven ASM 0x02004702–0x02004704: 2 bytes
-
+
383 · Proven ASM 0x020047b6–0x020047b8: 2 bytes
-
+
383 · Proven ASM 0x020048c6–0x020048c8: 2 bytes
-
+
383 · Proven ASM 0x02004c6c–0x02004f2c: 704 bytes
-
+
384 · SceneData_GetScriptTable · Proven C: 8 bytes
-
+
384 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
384 · SceneData_GetMessageTable · Proven C: 8 bytes
-
+
384 · SceneData_SelectActorTableByStep10 · Proven C: 40 bytes
-
+
384 · SceneData_SelectSceneScriptByStep10 · Proven C: 40 bytes
-
+
384 · FieldScene_RunActors8To10OpeningSequence · Proven C: 124 bytes
@@ -5228,2447 +5216,2439 @@
38c · FieldScene_SetupActor27OnEntry · Proven C: 56 bytes
-
+
38c · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
38c · Proven ASM 0x02000500–0x02000598: 152 bytes
-
+
38d · OverlayObject_UpdateFacingTowardTarget · Proven C: 88 bytes
-
+
38d · SceneData_GetTableA638 · Proven C: 8 bytes
-
+
38d · get_tertiary_default_result · Proven C: 4 bytes
-
+
38d · SceneData_GetTableA920 · Proven C: 8 bytes
-
+
38d · SceneData_SelectRecordByScene21 · Proven C: 100 bytes
-
+
38d · SceneData_SelectTableac9cByState · Proven C: 48 bytes
-
+
38d · SceneDialogue_RunActor10Message1420 · Proven C: 32 bytes
-
+
38d · FieldScene_RunScene38d_02000150 · Proven C: 100 bytes
-
+
38d · FieldScene_RunScene38dSequenceA · Proven C: 64 bytes
-
+
38d · SceneDialogue_RunActor16Message1769 · Proven C: 32 bytes
-
+
38d · FieldScene_RunActorSeventeenFlaggedDialogue · Proven C: 120 bytes
-
+
38d · SceneDialogue_RunActor15Flag303Scene · Proven C: 64 bytes
-
+
38d · FieldScene_RunActorSeventeenFlagDialogue · Proven C: 108 bytes
-
+
38d · FieldScene_RunStepWithValue174d · Proven C: 28 bytes
-
+
38d · FieldScene_RunStepWithValue174e · Proven C: 28 bytes
-
+
38d · FieldScene_RunBranchedStep · Proven C: 24 bytes
-
+
38d · FieldScene_RunStep210ByFlag84e · Proven C: 44 bytes
-
+
38d · FieldScene_RunStep211ByFlag84e · Proven C: 44 bytes
-
+
38d · FieldScene_RunStep212ByFlag84e · Proven C: 44 bytes
-
+
38d · FieldScene_RunStep213ByFlag84e · Proven C: 44 bytes
-
+
38d · FieldScene_RunSlotSubjectBranch · Proven C: 124 bytes
-
+
38d · FieldScene_RunScene38d_02000568 · Proven C: 140 bytes
-
+
38d · FieldScene_RunScene38d_020005f4 · Proven C: 236 bytes
-
+
38d · FieldScene_RunLongBranchingChoreography · Proven C: 3,804 bytes
-
+
38d · FieldScene_RunScene38d_0200179c · Proven C: 444 bytes
-
+
38d · ConfigurePrimarySceneChannels · Proven C: 42 bytes
-
+
38d · ConfigureSecondarySceneChannels · Proven C: 42 bytes
-
+
+
+
+38d · RunEventScript02 · Proven C: 2,060 bytes
+
38d · Unknown 0x02000338–0x020003ec: 180 bytes
-
+
38d · Unknown 0x020006e0–0x02000892: 434 bytes
-
+
38d · Unknown 0x02000894–0x020008c0: 44 bytes
-
+
-
-38d · Unknown 0x02002184–0x02002306: 386 bytes
-
+
+38d · Unknown 0x020021bc–0x02002306: 330 bytes
+
38d · Unknown 0x02002308–0x020023ea: 226 bytes
-
+
38d · Unknown 0x020023ec–0x02002408: 28 bytes
-
+
38d · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
38d · Proven ASM 0x02000892–0x02000894: 2 bytes
-
+
38d · Proven ASM 0x02001982–0x02001984: 2 bytes
-
+
-
-38d · Proven ASM 0x020019ae–0x02002184: 2,006 bytes
-
+
+38d · Proven ASM 0x020019ae–0x020019b0: 2 bytes
+
38d · Proven ASM 0x02002306–0x02002308: 2 bytes
-
+
38d · Proven ASM 0x020023ea–0x020023ec: 2 bytes
-
+
38d · Proven ASM 0x02002408–0x020025c0: 440 bytes
-
+
38e · SceneActor_UpdateFacingTowardTarget · Proven C: 88 bytes
-
+
38e · SceneData_GetTable8c08 · Proven C: 8 bytes
-
+
38e · get_tertiary_default_result · Proven C: 4 bytes
-
+
38e · SceneData_GetTable8C50 · Proven C: 8 bytes
-
+
38e · FieldScene_RunStepWithValueFd2 · Proven C: 52 bytes
-
+
38e · FieldScene_RunStepWithValue29de · Proven C: 40 bytes
-
+
38e · SceneData_SelectTable8d24ByState · Proven C: 48 bytes
-
+
38e · SceneDialogue_RunActor9Message13c0 · Proven C: 32 bytes
-
+
38e · SceneDialogue_RunActor10Message13c3 · Proven C: 32 bytes
-
+
38e · SceneDialogue_RunActor11Message1751 · Proven C: 32 bytes
-
+
38e · FieldScene_RunScene38e_0200045c · Proven C: 96 bytes
-
+
38e · FieldScene_RunEntryZeroAndScene22Body · Proven C: 80 bytes
-
+
+
+
+38e · RunEventScript01 · Proven C: 208 bytes
+
+
+
+38e · FieldScene_RunScene38eSequenceA · Proven C: 780 bytes
+
38e · FieldScene_SetupWithDescriptor8BD4 · Proven C: 36 bytes
-
+
38e · SceneEffect_UpdateLobeOrbitEntity · Proven C: 102 bytes
-
+
38e · InitializeOrbitingSceneEntity · Proven C: 216 bytes
-
+
38e · Unknown 0x0200009c–0x020000de: 66 bytes
-
+
38e · Unknown 0x020000e0–0x020000f8: 24 bytes
-
+
38e · Unknown 0x020001e4–0x0200045c: 632 bytes
-
-
-
-38e · Unknown 0x020008b8–0x020008e8: 48 bytes
-
+
38e · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
38e · Proven ASM 0x020000de–0x020000e0: 2 bytes
-
-
-
-38e · Proven ASM 0x0200050c–0x020008b8: 940 bytes
-
+
38e · Proven ASM 0x02000972–0x02000974: 2 bytes
-
+
38e · Proven ASM 0x02000a4c–0x02000bd4: 392 bytes
-
+
38f · SceneState_FlushPendingWordB698 · Proven C: 32 bytes
-
+
38f · SceneEffect_AdvanceCounterAndSwitchMode · Proven C: 78 bytes
-
+
38f · SceneData_InitRecordTable · Proven C: 42 bytes
-
+
38f · SceneEffect_UpdateFallingObject · Proven C: 72 bytes
-
+
38f · SceneActor_TurnTowardTarget · Proven C: 88 bytes
-
+
38f · SceneData_SelectTableAe60BySelector · Proven C: 64 bytes
-
+
38f · SceneData_GetTableB010ForSelector26 · Proven C: 40 bytes
-
+
38f · SceneData_GetTableB040 · Proven C: 8 bytes
-
+
38f · SceneData_SelectTableB080BySelector · Proven C: 84 bytes
-
+
38f · FieldScene_RunActor16MessageBranch · Proven C: 68 bytes
-
+
38f · FieldScene_RunActor27Step · Proven C: 16 bytes
-
+
38f · SceneData_SelectTableB3b0BySelector · Proven C: 48 bytes
-
+
38f · FieldScene_ConfigureActor0ThenRun · Proven C: 80 bytes
-
+
38f · FieldScene_SetupEntryBySelector · Proven C: 364 bytes
-
+
38f · SceneActor_SetActors19To22HeightByFrameParity · Proven C: 172 bytes
-
+
38f · FieldScene_StartEffect141Sequence · Proven C: 44 bytes
-
+
38f · FieldScene_RunSequenceA · Proven C: 20 bytes
-
+
38f · FieldScene_RunPairedStepA · Proven C: 22 bytes
-
+
38f · FieldScene_RunPairedStepB · Proven C: 22 bytes
-
+
38f · SceneEffect_AdvanceAngleUntilIdle · Proven C: 48 bytes
-
+
38f · SceneEffect_SpawnObject26EveryEightFrames · Proven C: 156 bytes
-
+
38f · SceneEffect_SetModeByFrameBit1 · Proven C: 40 bytes
-
+
38f · FieldScene_RunFlag845And847Branches · Proven C: 140 bytes
-
+
38f · Unknown 0x02000304–0x02000330: 44 bytes
-
+
38f · Unknown 0x0200039a–0x0200066e: 724 bytes
-
+
38f · Unknown 0x02000670–0x02000694: 36 bytes
-
+
38f · Unknown 0x020026cc–0x02002772: 166 bytes
-
+
38f · Unknown 0x02002774–0x020027a8: 52 bytes
-
+
38f · Unknown 0x020027aa–0x02002910: 358 bytes
-
+
38f · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
38f · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
38f · Proven ASM 0x020000ca–0x020000cc: 2 bytes
-
+
38f · Proven ASM 0x0200066e–0x02000670: 2 bytes
-
+
38f · Proven ASM 0x020008ec–0x020025a8: 7,356 bytes
-
+
38f · Proven ASM 0x020025be–0x020025c0: 2 bytes
-
+
38f · Proven ASM 0x020025d6–0x020025d8: 2 bytes
-
+
38f · Proven ASM 0x02002772–0x02002774: 2 bytes
-
+
38f · Proven ASM 0x0200299c–0x02002bd4: 568 bytes
-
+
390 · SceneData_InitRecordTable · Proven C: 42 bytes
-
+
390 · SceneData_GetPrimaryTable · Proven C: 8 bytes
-
+
390 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
390 · SceneData_GetSecondaryTable · Proven C: 8 bytes
-
+
390 · SceneData_PrepareTable84d8 · Proven C: 44 bytes
-
+
390 · FieldScene_RunActor16MessageBranch · Proven C: 72 bytes
-
+
390 · FieldScene_RunActor17MessageBranch · Proven C: 72 bytes
-
+
390 · FieldScene_RunActor18MessageBranch · Proven C: 72 bytes
-
+
390 · FieldScene_RunActor19MessageBranch · Proven C: 72 bytes
-
+
390 · SceneData_GetTable8658 · Proven C: 8 bytes
-
+
390 · FieldScene_SetupEntryLayoutsBySelector · Proven C: 244 bytes
-
+
390 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
390 · Proven ASM 0x0200005a–0x0200005c: 2 bytes
-
+
390 · Proven ASM 0x020002b8–0x02000318: 96 bytes
-
+
391 · CalculateFixedPointPositionDistance · Proven C: 60 bytes
-
+
391 · find_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
391 · StagedActor_PushActorAhead · Proven C: 384 bytes
-
+
391 · fill_grid_attribute_rectangle · Proven C: 100 bytes
-
+
391 · SceneActor_ResetMotionWhenAheadBlocked · Proven C: 164 bytes
-
+
391 · FindStagedActorProbePosition · Proven C: 404 bytes
-
+
391 · OverlayObject_ClearPendingAndRestoreMode · Proven C: 32 bytes
-
+
391 · SceneActor_UpdateRandomCounterMode · Proven C: 78 bytes
-
+
391 · SceneData_GetTableb06c · Proven C: 8 bytes
-
+
391 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
391 · SceneData_GetTableb0cc · Proven C: 8 bytes
-
+
391 · SceneData_GetTableb0e4 · Proven C: 8 bytes
-
+
391 · FieldScene_RunTile10x20Transition · Proven C: 178 bytes
-
+
391 · StagedActor_RunStepEffect · Proven C: 248 bytes
-
+
391 · SceneActor_PassSubjectOffsetPosition · Proven C: 76 bytes
-
+
391 · SceneData_GetTableB294 · Proven C: 8 bytes
-
+
391 · FieldScene_RunScene391_02000c68 · Proven C: 212 bytes
-
+
391 · FieldScene_RunSplitPairSteps · Proven C: 22 bytes
-
+
391 · SceneActor_SetPairZeroAndValue · Proven C: 22 bytes
-
+
391 · SceneEffect_AdvanceAngleAndFinishWhenParked · Proven C: 48 bytes
-
+
391 · SceneEffect_SpawnObject26EveryEightFrames · Proven C: 156 bytes
-
+
391 · OverlayObject_SelectValueByFrameBit1 · Proven C: 40 bytes
-
+
391 · SceneActor_CheckRegionTrigger · Proven C: 232 bytes
-
+
391 · SceneActor_AlternateSlots13To16Field0c · Proven C: 172 bytes
-
+
391 · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
391 · Draft C 0x020008a4–0x020008c0: 28 bytes
-
+
391 · Unknown 0x0200034c–0x02000474: 296 bytes
-
+
391 · Unknown 0x020008c0–0x020009dc: 284 bytes
-
+
391 · Unknown 0x02002974–0x02002ad8: 356 bytes
-
+
391 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
391 · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
391 · Proven ASM 0x02000a4a–0x02000a4c: 2 bytes
-
+
391 · Proven ASM 0x02000b1a–0x02000b1c: 2 bytes
-
+
391 · Proven ASM 0x02000d3c–0x02002768: 6,700 bytes
-
+
391 · Proven ASM 0x0200277e–0x02002780: 2 bytes
-
+
391 · Proven ASM 0x02002796–0x02002798: 2 bytes
-
+
391 · Proven ASM 0x02002b84–0x02002d2c: 424 bytes
-
+
391 · Proven ASM 0x02002d38–0x02002d66: 46 bytes
-
+
392 · SceneActor_CalculateFixedPointPositionDistance · Proven C: 60 bytes
-
+
392 · SceneActor_FindActorAtFixedPointPosition · Proven C: 88 bytes
-
+
392 · StagedActor_AdvancePair · Proven C: 384 bytes
-
+
392 · SceneState_FillGridAttributeRectangle · Proven C: 100 bytes
-
+
392 · StagedActor_CheckProbe · Proven C: 164 bytes
-
+
392 · StagedActor_FindClearPosition · Proven C: 404 bytes
-
+
392 · SceneData_GetTable8f80 · Proven C: 8 bytes
-
+
392 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
392 · SceneData_GetTable8fe0 · Proven C: 8 bytes
-
+
392 · SceneData_GetTable8ff0 · Proven C: 8 bytes
-
+
392 · SceneActor_RunPlacementQuery · Proven C: 52 bytes
-
+
392 · FieldScene_SetupActor11Effect181 · Proven C: 52 bytes
-
+
392 · SceneData_GetTable9068 · Proven C: 8 bytes
-
+
392 · FieldScene_SetupEntryActors8To11 · Proven C: 84 bytes
-
+
392 · SceneEffect_AdjustPaletteWindow · Proven C: 104 bytes
-
+
392 · SceneEffect_AdjustColorChannels · Proven C: 104 bytes
-
+
392 · SceneEffect_UpdateOrbitingParticle · Proven C: 102 bytes
-
+
392 · SceneEffect_InitOrbitingParticle · Proven C: 216 bytes
-
+
392 · Draft C 0x0200034c–0x02000474: 296 bytes
-
+
392 · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
392 · Draft C 0x020008a4–0x020009dc: 312 bytes
-
+
392 · Draft C 0x02000b8c–0x02000bac: 32 bytes
-
+
392 · Unknown 0x02000bac–0x02000bcc: 32 bytes
-
+
392 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
392 · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
392 · Proven ASM 0x02000bcc–0x02000c4c: 128 bytes
-
+
392 · Proven ASM 0x02000cb2–0x02000cb4: 2 bytes
-
+
392 · Proven ASM 0x02000d94–0x02000e8c: 248 bytes
-
+
392 · Proven ASM 0x02000e98–0x02000ec6: 46 bytes
-
+
393 · SceneActor_CalculateFixedPointDistance · Proven C: 60 bytes
-
+
393 · SceneActor_FindAtTileXZ · Proven C: 88 bytes
-
+
393 · StagedActor_AdvancePair · Proven C: 384 bytes
-
+
393 · SceneState_FillGridAttributeRectangle · Proven C: 100 bytes
-
+
393 · StagedActor_CheckProbe · Proven C: 164 bytes
-
+
393 · StagedActor_FindClearPosition · Proven C: 404 bytes
-
+
393 · MapStagedScene_SelectPrimaryData · Proven C: 8 bytes
-
+
393 · MapStagedScene_GetEmptyData · Proven C: 4 bytes
-
+
393 · MapStagedScene_SelectSecondaryData · Proven C: 8 bytes
-
+
393 · MapStagedScene_SelectTertiaryData · Proven C: 8 bytes
-
+
393 · FieldScene_RunActorTenPlacementScene · Proven C: 180 bytes
-
+
393 · StagedActor_RunStepEffect · Proven C: 248 bytes
-
+
393 · SceneActor_ApplyOffsetObjectPosition · Proven C: 76 bytes
-
+
393 · SceneData_GetTable9098 · Proven C: 8 bytes
-
+
393 · SceneState_SetRuntimeWord448To516 · Proven C: 148 bytes
-
+
393 · SceneEffect_AdjustPaletteColors · Proven C: 104 bytes
-
+
393 · SceneEffect_AdjustColorChannels · Proven C: 104 bytes
-
+
393 · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
393 · Draft C 0x020008a4–0x020008c0: 28 bytes
-
+
393 · Unknown 0x0200034c–0x02000474: 296 bytes
-
+
393 · Unknown 0x020008c0–0x020009dc: 284 bytes
-
+
393 · Unknown 0x02000d5c–0x02000d9c: 64 bytes
-
+
393 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
393 · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
393 · Proven ASM 0x02000d9c–0x02000e1c: 128 bytes
-
+
393 · Proven ASM 0x02000e24–0x02000ed4: 176 bytes
-
+
393 · Proven ASM 0x02000ee0–0x02000f0e: 46 bytes
-
+
394 · SceneData_GetTable9170 · Proven C: 8 bytes
-
+
394 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
394 · SceneData_GetTable91d0 · Proven C: 8 bytes
-
+
394 · SceneData_GetTable91e0 · Proven C: 8 bytes
-
+
394 · SceneData_GetTable9240 · Proven C: 8 bytes
-
+
394 · SceneState_ApplyRecordTable92c0 · Proven C: 56 bytes
-
+
394 · FieldScene_CallHelper118c · Proven C: 10 bytes
-
+
394 · SceneState_ApplyRectByLayoutSelector · Proven C: 68 bytes
-
+
394 · FieldScene_RepaintBoardRecords · Proven C: 472 bytes
-
+
394 · SceneState_CopyPresetA0d0WithOffsetB0 · Proven C: 48 bytes
-
+
394 · FieldScene_RunActorEightSequence · Proven C: 208 bytes
-
+
394 · SceneState_StampRecordCells · Proven C: 80 bytes
-
+
394 · SceneData_FindTileRunAt · Proven C: 88 bytes
-
+
394 · SceneState_CheckFourCellRun · Proven C: 72 bytes
-
+
394 · SceneEffect_AdjustPaletteColors · Proven C: 104 bytes
-
+
394 · SceneEffect_AdjustColorChannels · Proven C: 104 bytes
-
+
394 · Unknown 0x02000098–0x02000150: 184 bytes
-
+
394 · Unknown 0x020003a8–0x020003c0: 24 bytes
-
+
394 · Unknown 0x020007e0–0x020008b0: 208 bytes
-
+
394 · Unknown 0x02000a90–0x02000b3c: 172 bytes
-
+
394 · Unknown 0x02000c2c–0x02000e3e: 530 bytes
-
+
394 · Unknown 0x02000e40–0x02000e64: 36 bytes
-
+
394 · Unknown 0x02000f34–0x02000f74: 64 bytes
-
+
394 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
394 · Proven ASM 0x02000096–0x02000098: 2 bytes
-
+
394 · Proven ASM 0x0200036c–0x020003a8: 60 bytes
-
+
394 · Proven ASM 0x020003f0–0x020007e0: 1,008 bytes
-
+
394 · Proven ASM 0x02000980–0x02000a90: 272 bytes
-
+
394 · Proven ASM 0x02000e3e–0x02000e40: 2 bytes
-
+
394 · Proven ASM 0x02000f74–0x02000ff4: 128 bytes
-
+
394 · Proven ASM 0x02000ffc–0x0200111c: 288 bytes
-
+
395 · get_script_data · Proven C: 8 bytes
-
+
395 · get_message_data · Proven C: 8 bytes
-
+
395 · get_actor_data · Proven C: 8 bytes
-
+
395 · get_effect_data · Proven C: 8 bytes
-
+
395 · initialize · Proven C: 48 bytes
-
+
395 · get_state · Proven C: 8 bytes
-
+
395 · FieldScene_RunScene395_02000158 · Proven C: 240 bytes
-
+
395 · run_actor_nine_branch · Proven C: 60 bytes
-
+
395 · run_actor_eight_branch · Proven C: 60 bytes
-
+
395 · run_flagged_branch · Proven C: 44 bytes
-
+
395 · RunEventScript01 · Proven C: 412 bytes
-
+
+
+
+395 · RunEventScript01Second · Proven C: 3,048 bytes
+
395 · advance_effect_frame · Proven C: 48 bytes
-
+
395 · spawn_effect · Proven C: 156 bytes
-
+
395 · advance_transition · Proven C: 64 bytes
-
+
395 · advance_orbit · Proven C: 116 bytes
-
+
395 · set_record_value · Proven C: 60 bytes
-
+
395 · adjust_palette_window · Proven C: 104 bytes
-
+
395 · adjust_rgb555_color · Proven C: 104 bytes
-
+
395 · Unknown 0x02000088–0x02000158: 208 bytes
-
+
-
-395 · Unknown 0x02001058–0x020011e8: 400 bytes
-
+
+395 · Unknown 0x02001070–0x020011e8: 376 bytes
+
395 · Unknown 0x020012f4–0x0200130a: 22 bytes
-
+
395 · Unknown 0x02001454–0x02001460: 12 bytes
-
+
395 · Unknown 0x02001518–0x02001522: 10 bytes
-
+
395 · Unknown 0x02001524–0x0200152c: 8 bytes
-
+
395 · Unknown 0x020015a0–0x020015c0: 32 bytes
-
+
395 · Unknown 0x020016f8–0x0200171c: 36 bytes
-
+
395 · Unknown 0x02001838–0x02001878: 64 bytes
-
+
395 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
-
-
-395 · Proven ASM 0x02000488–0x02001058: 3,024 bytes
-
+
395 · Proven ASM 0x02001522–0x02001524: 2 bytes
-
+
395 · Proven ASM 0x02001878–0x020018f8: 128 bytes
-
+
395 · Proven ASM 0x02001908–0x02001ab8: 432 bytes
-
+
396 · set_effect_record_mode · Proven C: 22 bytes
-
+
396 · OverlayObject_PrepareSpawnedObject · Proven C: 86 bytes
-
+
396 · OverlayObject_CreateConfigured · Proven C: 98 bytes
-
+
396 · SpawnConfiguredEffect · Proven C: 472 bytes
-
+
396 · SceneData_GetTablea5cc · Proven C: 8 bytes
-
+
396 · SceneData_GetTablea9d4 · Proven C: 8 bytes
-
+
396 · SceneData_GetTableaa14 · Proven C: 8 bytes
-
+
396 · SceneData_GetTableaa58 · Proven C: 8 bytes
-
+
396 · FieldScene_RunStep200 · Proven C: 20 bytes
-
+
396 · FieldScene_RunStep201 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep202 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep203 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep204 · Proven C: 20 bytes
-
+
396 · FieldScene_RunStep205 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep206 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep207 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep208 · Proven C: 20 bytes
-
+
396 · FieldScene_RunStep209 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep20a · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep20b · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep20c · Proven C: 20 bytes
-
+
396 · FieldScene_RunStep20d · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep20e · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep20f · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep210 · Proven C: 20 bytes
-
+
396 · FieldScene_RunStep211 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep212 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep213 · Proven C: 24 bytes
-
+
396 · FieldScene_RunStep214 · Proven C: 20 bytes
-
+
396 · SceneState_ClearStoryVariantWhenIdle · Proven C: 32 bytes
-
+
396 · SceneData_GetTableAae8 · Proven C: 8 bytes
-
+
+
+
+396 · RunEventScript01 · Proven C: 636 bytes
+
396 · FieldScene_RunFourActorEncounter · Proven C: 1,600 bytes
-
+
396 · SceneState_ApplyRectsByFlag844 · Proven C: 172 bytes
-
+
396 · SceneEffect_RegisterPaletteFadeCallback · Proven C: 16 bytes
-
+
396 · advance_effect_motion · Proven C: 90 bytes
-
+
396 · Draft C 0x02000104–0x0200013c: 56 bytes
-
+
396 · Unknown 0x02000334–0x02000472: 318 bytes
-
+
396 · Unknown 0x02000474–0x02000492: 30 bytes
-
+
396 · Unknown 0x020011dc–0x02001204: 40 bytes
-
+
396 · Unknown 0x02001224–0x02001236: 18 bytes
-
+
396 · Unknown 0x02001238–0x02001434: 508 bytes
-
+
396 · Unknown 0x0200159c–0x020015a6: 10 bytes
-
+
396 · Unknown 0x020015a8–0x02001626: 126 bytes
-
+
396 · Unknown 0x02001628–0x0200165a: 50 bytes
-
+
396 · Unknown 0x020017b2–0x020017d8: 38 bytes
-
+
396 · Unknown 0x020017ec–0x0200184c: 96 bytes
-
+
396 · Unknown 0x020018b8–0x02001a10: 344 bytes
-
+
396 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
396 · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
396 · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
396 · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
396 · Proven ASM 0x02000472–0x02000474: 2 bytes
-
+
396 · Proven ASM 0x02000492–0x02000494: 2 bytes
-
-
-
-396 · Proven ASM 0x0200069c–0x02000918: 636 bytes
-
+
396 · Proven ASM 0x02001004–0x020010b0: 172 bytes
-
+
396 · Proven ASM 0x02001236–0x02001238: 2 bytes
-
+
396 · Proven ASM 0x020015a6–0x020015a8: 2 bytes
-
+
396 · Proven ASM 0x02001626–0x02001628: 2 bytes
-
+
396 · Proven ASM 0x020018b6–0x020018b8: 2 bytes
-
+
396 · Proven ASM 0x02001a20–0x02001c00: 480 bytes
-
+
397 · SceneState_SetActorEightValue3d · Proven C: 14 bytes
-
+
397 · SceneData_GetTable835c · Proven C: 8 bytes
-
+
397 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
397 · SceneData_GetTable844c · Proven C: 8 bytes
-
+
397 · SceneData_GetTable8474 · Proven C: 8 bytes
-
+
397 · SceneActor_ShiftObjectsByBlock · Proven C: 124 bytes
-
+
397 · FieldScene_ApplyOffset0Pos5 · Proven C: 14 bytes
-
+
397 · FieldScene_ApplyOffset0Neg5 · Proven C: 16 bytes
-
+
397 · FieldScene_ApplyOffset0Pos5Second · Proven C: 14 bytes
-
+
397 · FieldScene_ApplyOffset0Neg5Second · Proven C: 16 bytes
-
+
397 · FieldScene_ApplyOffset0Pos6 · Proven C: 14 bytes
-
+
397 · FieldScene_ApplyOffset0Neg6 · Proven C: 16 bytes
-
+
397 · SceneState_SetValue123ThenCounter16c · Proven C: 36 bytes
-
+
397 · SceneEffect_SetAlphaBlendForScene9 · Proven C: 88 bytes
-
+
397 · SceneData_GetTable84a4 · Proven C: 8 bytes
-
+
397 · FieldScene_RunTwoCallSequence · Proven C: 14 bytes
-
+
397 · SceneState_RunEmptyHook · Proven C: 2 bytes
-
+
397 · SceneData_InitHeader8590 · Proven C: 44 bytes
-
+
397 · SceneState_SetRuntimeWord448To256 · Proven C: 106 bytes
-
+
397 · SceneEffect_UpdateBg3HofsByVcount · Proven C: 52 bytes
-
+
397 · SceneState_ApplyTables826dAnd82a1 · Proven C: 36 bytes
-
+
397 · Unknown 0x020002a0–0x020002e0: 64 bytes
-
+
397 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
397 · Proven ASM 0x0200003e–0x02000040: 2 bytes
-
+
397 · Proven ASM 0x020000e6–0x020000e8: 2 bytes
-
+
397 · Proven ASM 0x02000106–0x02000108: 2 bytes
-
+
397 · Proven ASM 0x02000126–0x02000128: 2 bytes
-
+
397 · Proven ASM 0x020001d2–0x020001d4: 2 bytes
-
+
397 · Proven ASM 0x0200026a–0x0200026c: 2 bytes
-
+
397 · Proven ASM 0x02000304–0x0200035c: 88 bytes
-
+
398 · SceneState_ApplyArgMode0AndReturnZero · Proven C: 14 bytes
-
+
398 · SceneData_SelectByRuntimeSelector · Proven C: 84 bytes
-
+
398 · get_followup_default_result · Proven C: 4 bytes
-
+
398 · SceneData_GetTable8bcc · Proven C: 8 bytes
-
+
398 · SceneData_SelectSecondaryDataByRuntimeSelector · Proven C: 84 bytes
-
+
398 · SceneData_SelectDataByRuntimeSelector · Proven C: 84 bytes
-
+
398 · SceneState_ConfigureRegion1_0_21x14 · Proven C: 30 bytes
-
+
398 · SceneState_ConfigureRegion0_0_21x14 · Proven C: 30 bytes
-
+
398 · SceneState_ApplyTwoRects · Proven C: 50 bytes
-
+
398 · FieldScene_RunTwoLayoutSteps · Proven C: 50 bytes
-
+
398 · FieldScene_RunActor9Flag882Scene · Proven C: 36 bytes
-
+
398 · FieldScene_RunScene398SequenceA · Proven C: 108 bytes
-
+
398 · FieldScene_RunActorFifteenScene · Proven C: 42 bytes
-
+
398 · FieldScene_RunActorSixteenScene · Proven C: 42 bytes
-
+
398 · FieldScene_RunActor17Steps28AndD2 · Proven C: 42 bytes
-
+
398 · FieldScene_RunScene398SequenceB · Proven C: 288 bytes
-
+
398 · ActorPresentation_SetSceneCell31AndFlag305 · Proven C: 40 bytes
-
+
398 · SceneState_SetGlobalByte17 · Proven C: 16 bytes
-
+
398 · SceneState_ClearRuntimeByte17 · Proven C: 16 bytes
-
+
398 · FieldScene_DispatchByScenarioId · Proven C: 72 bytes
-
+
398 · RunGuardedSceneSetup · Proven C: 52 bytes
-
+
398 · SceneState_SetRuntimeWord448To516 · Proven C: 80 bytes
-
+
398 · FieldScene_RunScene398SequenceC · Proven C: 652 bytes
-
+
398 · SceneActor_FindSlotAtTile · Proven C: 52 bytes
-
+
398 · StagedActor_PushActorAhead · Proven C: 268 bytes
-
+
398 · Resource398_ImportBankNoOp · Proven C: 2 bytes
-
+
398 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
398 · Proven ASM 0x0200003e–0x02000040: 2 bytes
-
+
398 · Proven ASM 0x02000166–0x02000168: 2 bytes
-
+
398 · Proven ASM 0x02000186–0x02000188: 2 bytes
-
+
398 · Proven ASM 0x020001ba–0x020001bc: 2 bytes
-
+
398 · Proven ASM 0x020001ee–0x020001f0: 2 bytes
-
+
398 · Proven ASM 0x020002aa–0x020002ac: 2 bytes
-
+
398 · Proven ASM 0x020002d6–0x020002d8: 2 bytes
-
+
398 · Proven ASM 0x02000302–0x02000304: 2 bytes
-
+
398 · Proven ASM 0x02000906–0x020009b0: 170 bytes
-
+
399 · OverlayObject_UpdateWobbleByCounter · Proven C: 168 bytes
-
+
399 · OverlayObject_UpdateFacingTowardTarget · Proven C: 88 bytes
-
+
399 · SceneData_SelectTableByWord224 · Proven C: 48 bytes
-
+
399 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
399 · SceneData_GetTableA990 · Proven C: 8 bytes
-
+
399 · SceneData_SelectScriptByScene33AndFlag881 · Proven C: 116 bytes
-
+
399 · FieldScene_Forward2188 · Proven C: 10 bytes
-
+
399 · SceneData_SelectTableByWord224B · Proven C: 48 bytes
-
+
399 · SceneDialogue_RunActorEightFlagGatedDialogue · Proven C: 56 bytes
-
+
399 · SceneDialogue_ShowLine1571Or152F · Proven C: 56 bytes
-
+
399 · SceneDialogue_RunActor9Line · Proven C: 44 bytes
-
+
399 · SceneDialogue_RunActorTenFlag881Dialogue · Proven C: 204 bytes
-
+
399 · FieldScene_RunSupplementalSequenceOne · Proven C: 396 bytes
-
+
399 · SceneDialogue_RunActor12Line · Proven C: 32 bytes
-
+
399 · SceneDialogue_RunActor18Line · Proven C: 32 bytes
-
+
399 · SceneDialogue_RunActor20BranchScene · Proven C: 84 bytes
-
+
399 · SceneDialogue_RunActor20FlaggedLine · Proven C: 56 bytes
-
+
399 · FieldScene_RunScene399_020005dc · Proven C: 44 bytes
-
+
399 · SceneDialogue_RunActorEightBranchedDialogue · Proven C: 84 bytes
-
+
399 · FieldScene_RunSingleStep · Proven C: 10 bytes
-
+
399 · SceneDialogue_ShowLine156E · Proven C: 32 bytes
-
+
399 · SceneDialogue_ShowLine1573Or155A · Proven C: 56 bytes
-
+
399 · FieldScene_RunScene399_02000a3c · Proven C: 128 bytes
-
+
399 · FieldScene_RunScene399_02000abc · Proven C: 180 bytes
-
+
+
+
+399 · FieldScene_RunScene399SequenceB · Proven C: 1,468 bytes
+
399 · SceneActor_UpdateCountdownArcPosition · Proven C: 104 bytes
-
+
399 · ActorPresentation_ApplyTableA5ecToActorNine · Proven C: 28 bytes
-
+
399 · SceneState_StoreTable96adToWork · Proven C: 60 bytes
-
+
399 · SceneActor_ResetActorAndCenterOffsets · Proven C: 72 bytes
-
+
399 · FieldScene_RunSupplementalSequenceTwo · Proven C: 72 bytes
-
+
399 · FieldScene_RunScene399SequenceA · Proven C: 304 bytes
-
+
399 · SceneState_UpdateZoneFlagsFromActorZero · Proven C: 156 bytes
-
+
399 · SceneState_UpdateActor11WithFlag203 · Proven C: 48 bytes
-
+
399 · SceneActor_SetActorZeroFacingC000AndRun · Proven C: 42 bytes
-
+
399 · RunEventScript02 · Proven C: 44 bytes
-
+
399 · FieldScene_RunThreeActorChoreography · Proven C: 1,340 bytes
-
+
399 · SceneActor_TurnTowardTableAngle · Proven C: 128 bytes
-
+
399 · StagedActor_RunHeadingProbeStep · Proven C: 452 bytes
-
+
399 · Unknown 0x020006c0–0x0200078e: 206 bytes
-
+
399 · Unknown 0x02000790–0x02000872: 226 bytes
-
+
399 · Unknown 0x02000874–0x0200095a: 230 bytes
-
+
399 · Unknown 0x0200095c–0x02000a3c: 224 bytes
-
+
399 · Unknown 0x02000b70–0x02000eee: 894 bytes
-
+
399 · Unknown 0x02000ef0–0x02000f82: 146 bytes
-
+
399 · Unknown 0x0200168c–0x02001690: 4 bytes
-
+
399 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
399 · Proven ASM 0x020001ea–0x020001ec: 2 bytes
-
+
399 · Proven ASM 0x02000666–0x02000668: 2 bytes
-
+
399 · Proven ASM 0x0200078e–0x02000790: 2 bytes
-
+
399 · Proven ASM 0x02000872–0x02000874: 2 bytes
-
+
399 · Proven ASM 0x0200095a–0x0200095c: 2 bytes
-
+
399 · Proven ASM 0x02000eee–0x02000ef0: 2 bytes
-
+
-
-399 · Proven ASM 0x02000f82–0x0200154c: 1,482 bytes
-
+
+399 · Proven ASM 0x02000f82–0x02000f90: 14 bytes
+
399 · Proven ASM 0x020015b4–0x020015d4: 32 bytes
-
+
399 · Proven ASM 0x020019ba–0x020019bc: 2 bytes
-
+
399 · Proven ASM 0x02002170–0x020023f0: 640 bytes
-
+
39a · SceneState_ApplyValues8And2And1 · Proven C: 16 bytes
-
+
39a · SceneState_ApplyValues11And62 · Proven C: 14 bytes
-
+
39a · SceneData_SelectTableBySceneId · Proven C: 156 bytes
-
+
39a · SceneData_ReturnZero · Proven C: 4 bytes
-
+
39a · SceneData_GetTableA8f4 · Proven C: 8 bytes
-
+
39a · SceneData_SelectDataByRuntimeSelector · Proven C: 136 bytes
-
+
39a · SceneActor_PlacePairAtOffset · Proven C: 220 bytes
-
+
39a · ActorPresentation_SetupActorEightForFlag301 · Proven C: 64 bytes
-
+
39a · SceneState_RunSlot8OffsetStep · Proven C: 68 bytes
-
+
39a · FieldScene_RunActor9Transition302 · Proven C: 52 bytes
-
+
39a · ActorPresentation_SetupActorNineForFlag302 · Proven C: 56 bytes
-
+
39a · ActorPresentation_SetupActorTenForFlag303 · Proven C: 52 bytes
-
+
39a · FieldScene_RunActor10Transition303 · Proven C: 56 bytes
-
+
39a · FieldScene_RunActor8Transition304 · Proven C: 52 bytes
-
+
39a · FieldScene_RunActor8Transition304And305 · Proven C: 64 bytes
-
+
39a · FieldScene_RunActor8Transition305 · Proven C: 56 bytes
-
+
39a · FieldScene_RunActor8FlaggedSequence · Proven C: 88 bytes
-
+
39a · ActorPresentation_SetupActorNineForFlag306 · Proven C: 52 bytes
-
+
39a · FieldScene_RunActor9Flag306Sequence · Proven C: 56 bytes
-
+
39a · ActorPresentation_SetupActorTenForFlag307 · Proven C: 64 bytes
-
+
39a · FieldScene_RunActorTenDepthSequence · Proven C: 80 bytes
-
+
39a · FieldScene_PlaceActorEightByFlags · Proven C: 116 bytes
-
+
39a · FieldScene_RunActor8Transition308And309 · Proven C: 60 bytes
-
+
39a · ActorPresentation_SetupActorEightForFlags308And309Guarded · Proven C: 88 bytes
-
+
39a · ActorPresentation_SetupActorEightForFlags308And309 · Proven C: 60 bytes
-
+
39a · ActorPresentation_SetupActorNineForFlag30a · Proven C: 56 bytes
-
+
39a · FieldScene_RunActor9Transition30A · Proven C: 52 bytes
-
+
39a · FieldScene_PlaceActorTenByFlags · Proven C: 136 bytes
-
+
39a · FieldScene_RunFlag308DialogueBranch · Proven C: 220 bytes
-
+
39a · FieldScene_RunActor10Transition30BTo30E · Proven C: 84 bytes
-
+
39a · FieldScene_RunFlag311DialogueBranch · Proven C: 176 bytes
-
+
39a · ActorPresentation_SetupActorTenForFlags30bAnd30d · Proven C: 64 bytes
-
+
39a · FieldScene_RunActor10Flags30bTo30eSequenceA · Proven C: 80 bytes
-
+
39a · FieldScene_RunActor10Flags30bTo30eSequenceB · Proven C: 84 bytes
-
+
39a · FieldScene_RunActor10Flags30bTo30eSequenceC · Proven C: 80 bytes
-
+
39a · FieldScene_RunActorElevenFlaggedSteps · Proven C: 196 bytes
-
+
39a · FieldScene_RunSteps30FTo312 · Proven C: 44 bytes
-
+
39a · FieldScene_RunActor11Offset128Sequence · Proven C: 48 bytes
-
+
39a · FieldScene_RunActor11Flags30fTo312Sequence · Proven C: 84 bytes
-
+
39a · ActorPresentation_SetupActorElevenAt0_112 · Proven C: 48 bytes
-
+
39a · ActorPresentation_SetupActorElevenAt0_64 · Proven C: 48 bytes
-
+
39a · ActorPresentation_SetupActorElevenAt0_80 · Proven C: 48 bytes
-
+
39a · FieldScene_RunActor11Transition · Proven C: 48 bytes
-
+
39a · ActorPresentation_SetupActorEightForFlag313 · Proven C: 52 bytes
-
+
39a · FieldScene_RunActor8Transition313 · Proven C: 56 bytes
-
+
39a · FieldScene_RunActor9Flag314Sequence · Proven C: 52 bytes
-
+
39a · ActorPresentation_SetupActorNineForFlag314 · Proven C: 52 bytes
-
+
39a · ActorPresentation_SetupActorTenForFlag315 · Proven C: 52 bytes
-
+
39a · FieldScene_RunActor10Flag315Sequence · Proven C: 56 bytes
-
+
39a · ActorPresentation_AdvanceActorEightStates · Proven C: 22 bytes
-
+
39a · FieldScene_SetActor9Values1And2 · Proven C: 22 bytes
-
+
39a · ActorPresentation_AdvanceActorTenStates · Proven C: 22 bytes
-
+
39a · SceneActor_SetActor11Values1And2 · Proven C: 22 bytes
-
+
39a · OverlayObject_CreateAndInitialize · Proven C: 88 bytes
-
+
39a · SceneData_SelectDataByRuntimeSelectorB · Proven C: 156 bytes
-
+
39a · SceneState_SetServiceZeroValue06 · Proven C: 42 bytes
-
+
39a · FieldScene_RunSingleStep · Proven C: 10 bytes
-
+
39a · SceneActor_PlaceAtTileAndMark · Proven C: 76 bytes
-
+
39a · DialogueLayout_ConfigureGroupOne · Proven C: 260 bytes
-
+
39a · DialogueLayout_ConfigureGroupTwo · Proven C: 376 bytes
-
+
39a · DialogueLayout_ConfigureGroupThree · Proven C: 784 bytes
-
+
39a · FieldScene_RunFlagBranchedLayoutSteps · Proven C: 304 bytes
-
+
39a · SceneState_StoreValueToWorkspaceWord24WhenFlagged · Proven C: 36 bytes
-
+
39a · SceneState_ClearWorkWord24 · Proven C: 32 bytes
-
+
39a · FieldScene_RunPrimarySequence · Proven C: 88 bytes
-
+
39a · FieldScene_RunScene39aSequenceA · Proven C: 60 bytes
-
+
+
+
+39a · FieldScene_RunScene39aSequenceD · Proven C: 356 bytes
+
+
+
+39a · FieldScene_RunScene39aSequenceC · Proven C: 236 bytes
+
+
+
+39a · FieldScene_RunScene39aSequenceB · Proven C: 124 bytes
+
39a · FieldScene_ApplyOffset0Neg32 · Proven C: 16 bytes
-
+
39a · SceneState_ApplyOffsetMinus32 · Proven C: 16 bytes
-
+
39a · FieldScene_RunScene39a_02001ad0 · Proven C: 76 bytes
-
+
39a · FieldScene_RunScene39a_02001b1c · Proven C: 128 bytes
-
+
39a · SceneDialogue_ShowLineF13WithWorkA488 · Proven C: 64 bytes
-
+
39a · OverlayObject_AdvancePositionByDelta · Proven C: 42 bytes
-
+
39a · OverlayObject_ApplyValue15 · Proven C: 14 bytes
-
+
39a · FieldScene_RunFourPassCallbackSequence · Proven C: 252 bytes
-
+
39a · SceneState_SetValue17e1 · Proven C: 28 bytes
-
+
39a · SceneDialogue_RunLine17e2 · Proven C: 28 bytes
-
+
39a · FieldScene_RunScriptedStep17E3 · Proven C: 28 bytes
-
+
39a · SceneState_SetWorkspace370ByFlag820 · Proven C: 84 bytes
-
+
39a · SceneActor_TurnTowardTableAngle · Proven C: 128 bytes
-
+
39a · SceneActor_StepSubjectAlongHeading · Proven C: 452 bytes
-
-
-
-39a · Unknown 0x020017e4–0x02001926: 322 bytes
-
-
-
-39a · Unknown 0x02001928–0x02001a1e: 246 bytes
-
-
-
-39a · Unknown 0x02001a20–0x02001a9a: 122 bytes
-
-
-
-39a · Unknown 0x02001a9c–0x02001ab0: 20 bytes
-
+
39a · Unknown 0x02001d6c–0x02001df6: 138 bytes
-
+
39a · Unknown 0x02001df8–0x02001e08: 16 bytes
-
+
39a · Unknown 0x02001fac–0x02002014: 104 bytes
-
+
39a · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
39a · Proven ASM 0x0200004e–0x02000050: 2 bytes
-
+
39a · Proven ASM 0x02000e8e–0x02000e90: 2 bytes
-
+
39a · Proven ASM 0x02000ea6–0x02000ea8: 2 bytes
-
+
39a · Proven ASM 0x02000ebe–0x02000ec0: 2 bytes
-
+
39a · Proven ASM 0x02000ed6–0x02000ed8: 2 bytes
-
+
39a · Proven ASM 0x02000ff6–0x02000ff8: 2 bytes
-
+
39a · Proven ASM 0x02001002–0x02001004: 2 bytes
-
-
-
-39a · Proven ASM 0x02001926–0x02001928: 2 bytes
-
-
-
-39a · Proven ASM 0x02001a1e–0x02001a20: 2 bytes
-
-
-
-39a · Proven ASM 0x02001a9a–0x02001a9c: 2 bytes
-
+
39a · Proven ASM 0x02001c06–0x02001c08: 2 bytes
-
+
39a · Proven ASM 0x02001c16–0x02001d6c: 342 bytes
-
+
39a · Proven ASM 0x02001df6–0x02001df8: 2 bytes
-
+
39a · Proven ASM 0x02002260–0x02002418: 440 bytes
-
+
39b · SetEffectRecordMode · Proven C: 22 bytes
-
+
39b · OverlayObject_CreateConfigured · Proven C: 86 bytes
-
+
39b · OverlayObject_CreateConfiguredObject · Proven C: 98 bytes
-
+
39b · SpawnConfiguredEffect · Proven C: 472 bytes
-
+
39b · calculate_position_distance · Proven C: 60 bytes
-
+
39b · find_scene_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
39b · AdvanceStagedActorPair · Proven C: 384 bytes
-
+
39b · fill_scene_grid_attribute_rectangle · Proven C: 100 bytes
-
+
39b · stop_blocked_actor_motion · Proven C: 164 bytes
-
+
39b · find_clear_actor_position · Proven C: 404 bytes
-
+
39b · FieldScene_RunScene39b_02000cc0 · Proven C: 136 bytes
-
+
39b · SceneAudio_PlayCue118AndReturnZero · Proven C: 14 bytes
-
+
39b · SceneActor_FaceLeaderWhileGrounded · Proven C: 64 bytes
-
+
39b · FieldScene_Forward31d4 · Proven C: 10 bytes
-
+
39b · FieldScene_CallHelper2e58 · Proven C: 10 bytes
-
+
39b · FieldScene_RunSingleStep · Proven C: 10 bytes
-
+
39b · FieldScene_CallHelper2d50 · Proven C: 10 bytes
-
+
39b · SceneData_GetTablea928 · Proven C: 8 bytes
-
+
39b · SceneData_ReturnZero · Proven C: 4 bytes
-
+
39b · SceneData_GetTableabf8 · Proven C: 8 bytes
-
+
39b · SceneData_GetTableac58 · Proven C: 8 bytes
-
+
39b · FieldScene_RunStepWithValue1632 · Proven C: 36 bytes
-
+
39b · run_scene_effect_sequence · Proven C: 120 bytes
-
+
39b · FieldScene_RunScene39b_02000f48 · Proven C: 100 bytes
-
+
39b · FieldScene_RunIndexedStep17 · Proven C: 12 bytes
-
+
39b · FieldScene_RunIndexedStep18 · Proven C: 12 bytes
-
+
39b · FieldScene_RunIndexedStep19 · Proven C: 12 bytes
-
+
39b · SceneData_GetTablead60 · Proven C: 8 bytes
-
+
39b · FieldScene_RunSupplementalSequenceTwo · Proven C: 364 bytes
-
+
39b · FieldScene_RunIndexedStep63 · Proven C: 12 bytes
-
+
39b · FieldScene_RunActor8StepWithTableA820 · Proven C: 28 bytes
-
+
39b · FieldScene_RunScene39b_0200116c · Proven C: 72 bytes
-
+
39b · FieldScene_RunScene39b_02001208 · Proven C: 216 bytes
-
+
39b · FieldScene_RunScene39b_0200196c · Proven C: 208 bytes
-
+
39b · OverlayObject_SpawnKind24AtActor · Proven C: 88 bytes
-
+
39b · SceneEffect_AdvanceAnchoredRiseFrame · Proven C: 64 bytes
-
+
39b · OverlayObject_RampWords24And28Over16Frames · Proven C: 40 bytes
-
+
39b · OverlayObject_AdvanceScaleCounter · Proven C: 42 bytes
-
+
39b · clear_linked_scene_record · Proven C: 72 bytes
-
+
39b · OverlayObject_ReleasePublishedAttachment · Proven C: 36 bytes
-
+
39b · Draft C 0x02000104–0x0200013c: 56 bytes
-
+
39b · Draft C 0x020008ec–0x02000b86: 666 bytes
-
+
39b · Draft C 0x02000b88–0x02000ba4: 28 bytes
-
+
39b · Unknown 0x02000748–0x02000758: 16 bytes
-
+
39b · Unknown 0x02000ba4–0x02000cc0: 284 bytes
-
+
39b · Unknown 0x02000d98–0x02000e2a: 146 bytes
-
+
39b · Unknown 0x02000e2c–0x02000e46: 26 bytes
-
+
39b · Unknown 0x02000e48–0x02000e5e: 22 bytes
-
+
39b · Unknown 0x020011b4–0x02001208: 84 bytes
-
+
39b · Unknown 0x020012e0–0x02001366: 134 bytes
-
+
39b · Unknown 0x020016a4–0x020016d0: 44 bytes
-
+
39b · Unknown 0x02001718–0x0200172a: 18 bytes
-
+
39b · Unknown 0x02001de4–0x02001ec2: 222 bytes
@@ -8616,463 +8596,467 @@
39d · Unknown 0x02000928–0x020009fc: 212 bytes
-
+
39d · Unknown 0x02002f18–0x02003052: 314 bytes
-
+
39d · Unknown 0x02003054–0x020031c0: 364 bytes
-
+
39d · Unknown 0x02003204–0x02003438: 564 bytes
-
+
39d · Unknown 0x02003460–0x020034b6: 86 bytes
-
+
39d · Unknown 0x020034b8–0x02003626: 366 bytes
-
+
39d · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
39d · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
39d · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
39d · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
39d · Proven ASM 0x0200013a–0x0200013c: 2 bytes
-
+
39d · Proven ASM 0x02000542–0x02000544: 2 bytes
-
+
39d · Proven ASM 0x02000b22–0x02000b24: 2 bytes
-
+
39d · Proven ASM 0x02002f16–0x02002f18: 2 bytes
-
+
39d · Proven ASM 0x02003052–0x02003054: 2 bytes
-
+
39d · Proven ASM 0x020034b6–0x020034b8: 2 bytes
-
+
39d · Proven ASM 0x02003630–0x02003848: 536 bytes
-
+
39d · Proven ASM 0x02003854–0x02003882: 46 bytes
-
+
39e · SetEffectMode · Proven C: 22 bytes
-
+
39e · new · Proven C: 86 bytes
-
+
39e · NewFlippedEffectObject · Proven C: 98 bytes
-
+
39e · SpawnEffect · Proven C: 472 bytes
-
+
39e · StopXianActor · Proven C: 14 bytes
-
+
39e · FaceXianActorToPlayer · Proven C: 38 bytes
-
+
39e · GetXianScriptData · Proven C: 48 bytes
-
+
39e · GetXianInitialState · Proven C: 4 bytes
-
+
39e · GetXianMessageData · Proven C: 8 bytes
-
+
39e · FieldScene_RunScene39e_02000414 · Proven C: 112 bytes
-
+
39e · FieldScene_RunFlag88FBranch · Proven C: 148 bytes
-
+
+
+
+39e · FieldScene_RunScene39eSequenceB · Proven C: 196 bytes
+
+
+
+39e · FieldScene_RunScene39eSequenceC · Proven C: 928 bytes
+
39e · FieldScene_ShowDialogue17B1 · Proven C: 32 bytes
-
+
39e · FieldScene_ShowDialogue1825 · Proven C: 32 bytes
-
+
39e · FieldScene_RunRoofSceneExit · Proven C: 214 bytes
-
+
39e · FieldScene_ShowDialogue182D · Proven C: 32 bytes
-
+
39e · FieldScene_RunForwardArcBurst · Proven C: 224 bytes
-
+
39e · FieldScene_RunDescentBurst · Proven C: 224 bytes
-
+
39e · FieldScene_DispatchApproachByFacing · Proven C: 84 bytes
-
+
39e · FieldScene_DispatchByFacing · Proven C: 132 bytes
-
+
39e · FieldScene_DispatchByFacingAndFlags · Proven C: 220 bytes
-
+
+
+
+39e · FieldScene_RunSecondEnsembleBeat · Proven C: 2,236 bytes
+
39e · FieldScene_RunSkippableStoryBeat · Proven C: 108 bytes
-
+
39e · FieldScene_RunEnsembleStoryBeat · Proven C: 1,704 bytes
-
+
39e · FieldScene_ShowDialogue1A58 · Proven C: 32 bytes
-
+
39e · StartSchoolDoorEvent · Proven C: 132 bytes
-
+
39e · FieldScene_DispatchByRange · Proven C: 68 bytes
-
+
39e · FieldScene_ShowDialogue17DF · Proven C: 40 bytes
-
+
39e · FieldScene_SelectData · Proven C: 68 bytes
-
+
39e · FieldScene_SpawnRandomizedParticle · Proven C: 164 bytes
-
+
39e · FieldScene_ApplyOffset0Neg32 · Proven C: 16 bytes
-
+
39e · FieldScene_ApplyOffset0Pos32 · Proven C: 16 bytes
-
+
39e · FieldScene_ApplyOffsetNeg32_0 · Proven C: 16 bytes
-
+
39e · FieldScene_RunOpeningAuxiliarySequence · Proven C: 76 bytes
-
+
39e · FieldScene_RunScene39eSequenceA · Proven C: 140 bytes
-
+
39e · FieldScene_PlaySound123AndEnable · Proven C: 20 bytes
-
+
39e · FieldScene_RunScene39e_02002778 · Proven C: 116 bytes
-
+
39e · FieldScene_RunScene39e_020027ec · Proven C: 740 bytes
-
+
39e · FieldScene_RunRoofEnsembleSequence · Proven C: 5,000 bytes
-
+
39e · FieldScene_SetFlag140AndFinishSequence · Proven C: 76 bytes
-
+
39e · FieldScene_FinishSequence · Proven C: 24 bytes
-
+
39e · FieldScene_SpawnEightShots · Proven C: 132 bytes
-
+
39e · FieldScene_SelectActorModeFromInputBit · Proven C: 40 bytes
-
+
39e · FieldScene_RunParticleRain · Proven C: 336 bytes
-
+
39e · Unknown 0x02000104–0x0200013a: 54 bytes
-
+
39e · Unknown 0x02000388–0x020003fa: 114 bytes
-
+
39e · Unknown 0x020003fc–0x02000414: 24 bytes
-
+
39e · Unknown 0x02000518–0x0200064a: 306 bytes
-
-
-
-39e · Unknown 0x02000a90–0x02000abc: 44 bytes
-
+
39e · Unknown 0x02000cd4–0x02000d9a: 198 bytes
-
+
39e · Unknown 0x02000d9c–0x02000db4: 24 bytes
-
+
39e · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
39e · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
39e · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
39e · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
39e · Proven ASM 0x0200013a–0x0200013c: 2 bytes
-
+
39e · Proven ASM 0x02000322–0x02000324: 2 bytes
-
+
39e · Proven ASM 0x0200034a–0x0200034c: 2 bytes
-
+
39e · Proven ASM 0x020003fa–0x020003fc: 2 bytes
-
+
-
-39e · Proven ASM 0x0200064a–0x02000a90: 1,094 bytes
-
+
+39e · Proven ASM 0x0200064a–0x02000658: 14 bytes
+
39e · Proven ASM 0x02000bd2–0x02000bd4: 2 bytes
-
+
39e · Proven ASM 0x02000d9a–0x02000d9c: 2 bytes
-
+
39e · Proven ASM 0x02000e94–0x020012e0: 1,100 bytes
-
-
-
-39e · Proven ASM 0x02001494–0x02001d50: 2,236 bytes
-
+
39e · Proven ASM 0x02003e58–0x020040dc: 644 bytes
-
+
39e · Proven ASM 0x02004344–0x02004584: 576 bytes
-
+
39f · measure_fixed_point_position_distance · Proven C: 60 bytes
-
+
39f · find_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
39f · StagedActor_AdvanceActorPair · Proven C: 384 bytes
-
+
39f · fill_grid_attribute_rectangle · Proven C: 100 bytes
-
+
39f · StagedActor_ResetMotionIfBlockedAhead · Proven C: 164 bytes
-
+
39f · StagedActor_FindClearPosition · Proven C: 404 bytes
-
+
39f · copy_mode_to_owner · Proven C: 22 bytes
-
+
39f · OverlayObject_PrepareSpawnedObject · Proven C: 86 bytes
-
+
39f · OverlayObject_SpawnConfiguredWithMode15 · Proven C: 98 bytes
-
+
39f · OverlayObject_IntegrateVelocities · Proven C: 54 bytes
-
+
39f · SceneEffect_SpawnConfigured · Proven C: 472 bytes
-
+
39f · SceneState_SetValue18Mode2 · Proven C: 14 bytes
-
+
39f · SceneActor_TryRunSlotZeroMoveStep · Proven C: 154 bytes
-
+
39f · OverlayObject_ApplyField100 · Proven C: 20 bytes
-
+
39f · OverlayObject_ApplyZero · Proven C: 14 bytes
-
+
39f · FieldScene_RunScene39f_02000d90 · Proven C: 136 bytes
-
+
39f · FieldScene_RunSixCallSetupSequence · Proven C: 56 bytes
-
+
39f · SceneData_SelectByRuntimeSelector · Proven C: 84 bytes
-
+
39f · SceneData_ReturnZero · Proven C: 4 bytes
-
+
39f · SceneData_GetTableB5bc · Proven C: 8 bytes
-
+
39f · SceneData_SelectDataByRuntimeSelector · Proven C: 84 bytes
-
+
39f · SceneActor_PassOffsetPointOfActorZero · Proven C: 60 bytes
-
+
39f · SceneActor_BobActorZeroWhenAheadClear · Proven C: 180 bytes
-
+
39f · FieldScene_RunScriptedSteps0And17E6 · Proven C: 36 bytes
-
+
39f · FieldScene_RunActor10WaypointSequence · Proven C: 244 bytes
-
+
39f · FieldScene_RunActorElevenPresentationBeat · Proven C: 228 bytes
-
+
39f · SceneActor_RunActorTwelveThreeWaypointMotion · Proven C: 248 bytes
-
+
39f · FieldScene_RunStepFD4WithActor181 · Proven C: 52 bytes
-
+
39f · FieldScene_RunProbedActorEightOrTenScene · Proven C: 204 bytes
-
+
39f · SceneState_ApplyCrossRectsAroundActor11 · Proven C: 176 bytes
-
+
39f · FieldScene_RunActorThirteenPresentationBeat · Proven C: 296 bytes
-
+
39f · FieldScene_RunScene39f_02001818 · Proven C: 104 bytes
-
+
39f · SceneActor_RunActorFourteenFourWaypointMotion · Proven C: 312 bytes
-
+
39f · SceneActor_BobActorZeroWhenTargetClear · Proven C: 188 bytes
@@ -9512,83 +9496,95 @@
3a2 · FieldScene_RunScene3a2SequenceA · Proven C: 1,632 bytes
-
+
3a2 · SceneDialogue_RunLine1956 · Proven C: 36 bytes
-
+
3a2 · ConfigureAndPlaceActorFourteen · Proven C: 54 bytes
-
+
3a2 · FieldScene_RunScene3a2_020008a8 · Proven C: 54 bytes
-
+
3a2 · SceneDialogue_RunActorFifteenByLeaderHeading · Proven C: 68 bytes
-
+
+
+
+3a2 · RunEventScript01 · Proven C: 412 bytes
+
+
+
+3a2 · FieldScene_RunScene3a2SequenceB · Proven C: 108 bytes
+
+
+
+3a2 · FieldScene_RunScene3a2SequenceC · Proven C: 260 bytes
+
+
+
+3a2 · FieldScene_RunScene3a2SequenceD · Proven C: 924 bytes
+
3a2 · FieldScene_RunScriptedSteps0And1A12 · Proven C: 36 bytes
-
+
3a2 · FieldScene_RunPairedLayoutStepsThenSetOne · Proven C: 56 bytes
-
+
3a2 · SceneState_RunRect6x28Step · Proven C: 56 bytes
-
+
3a2 · SceneActor_SetFlagBitByRankAgainstActorZero · Proven C: 48 bytes
-
+
3a2 · SceneActor_UpdateActorFourteenByDepth · Proven C: 38 bytes
-
+
3a2 · ActorPresentation_PrepareActorFourteenWithCallback · Proven C: 140 bytes
-
+
3a2 · FieldScene_SetSlot15Byte89AndRunStep · Proven C: 60 bytes
-
+
3a2 · SceneData_SelectTableByWord224 · Proven C: 48 bytes
-
+
3a2 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3a2 · Proven ASM 0x02000052–0x02000054: 2 bytes
-
+
3a2 · Proven ASM 0x0200007a–0x0200007c: 2 bytes
-
+
3a2 · Proven ASM 0x020008a6–0x020008a8: 2 bytes
-
+
3a2 · Proven ASM 0x020008de–0x020008e0: 2 bytes
-
-
-
-3a2 · Proven ASM 0x02000924–0x02000fcc: 1,704 bytes
-
+
3a2 · Proven ASM 0x020010b6–0x020010b8: 2 bytes
-
+
3a2 · Proven ASM 0x020011b0–0x02001620: 1,136 bytes
@@ -9812,6575 +9808,6591 @@
3a4 · FieldScene_RunScene3a4SequenceH · Proven C: 236 bytes
-
+
3a4 · FieldScene_RunScene3a4SequenceI · Proven C: 280 bytes
-
+
3a4 · FieldScene_RunScene3a4SequenceB · Proven C: 120 bytes
-
+
3a4 · FieldScene_RunValue1528Scene · Proven C: 48 bytes
-
+
3a4 · FieldScene_RunScene3a4SequenceA · Proven C: 120 bytes
-
+
3a4 · FieldScene_RunLine1528Sequence · Proven C: 48 bytes
-
+
3a4 · FieldScene_RunScene3a4SequenceC · Proven C: 156 bytes
-
+
3a4 · FieldScene_RunScene3a4SequenceD · Proven C: 156 bytes
-
+
3a4 · SceneActor_SetActor10Byte23To3 · Proven C: 18 bytes
-
+
3a4 · SceneActor_SetActor10Byte23To1 · Proven C: 18 bytes
-
+
3a4 · FieldScene_RunScene3a4_02000c9c · Proven C: 144 bytes
-
+
3a4 · FieldScene_RunSharedSetPiece · Proven C: 1,240 bytes
-
+
3a4 · FieldScene_RunScene3a4_02001398 · Proven C: 736 bytes
-
+
3a4 · FieldScene_RunScene3a4_02002310 · Proven C: 280 bytes
-
+
3a4 · FieldScene_RunScene3a4_02002428 · Proven C: 104 bytes
-
+
3a4 · FieldScene_RunScene3a4_02002490 · Proven C: 304 bytes
-
+
3a4 · FieldScene_RunScene3a4_020025c0 · Proven C: 256 bytes
-
+
3a4 · FieldScene_RunScene3a4_020026c0 · Proven C: 324 bytes
-
+
3a4 · FieldScene_RunScene3a4_02002934 · Proven C: 168 bytes
-
+
3a4 · FieldScene_RunScene3a4_020029dc · Proven C: 52 bytes
-
+
3a4 · SceneActor_SetMode3AndRate4ccc · Proven C: 56 bytes
-
+
3a4 · SceneEffect_SpawnObject222 · Proven C: 88 bytes
-
+
3a4 · SceneState_StoreParamsAndInstallTask · Proven C: 48 bytes
-
+
3a4 · FieldScene_RunScene3a4SequenceG · Proven C: 256 bytes
-
+
3a4 · SceneState_ForwardByRuntimeSelector · Proven C: 40 bytes
-
+
3a4 · FieldScene_RunActorTenFourStepSequence · Proven C: 80 bytes
-
+
3a4 · FieldScene_RunOpeningAuxiliarySequence · Proven C: 196 bytes
-
+
3a4 · FieldScene_RunScene3a4SequenceF · Proven C: 104 bytes
-
+
3a4 · FieldScene_RunScene3a4SequenceE · Proven C: 104 bytes
-
+
3a4 · SceneAudio_PlayCue183EverySixtyTicks · Proven C: 36 bytes
-
+
3a4 · FieldScene_RunLateAuxiliarySequence · Proven C: 236 bytes
-
+
3a4 · SceneActor_SetActor8ModeByCounterBit · Proven C: 44 bytes
-
+
3a4 · RunEventScript01 · Proven C: 1,000 bytes
-
+
3a4 · SceneState_SetWorkspaceHalfword382To1018 · Proven C: 24 bytes
-
+
3a4 · SceneActor_SetActor12ModeByActorZeroHeight · Proven C: 56 bytes
-
+
3a4 · SceneActor_ClearCollisionFlagAndPlaceMarker · Proven C: 34 bytes
-
+
3a4 · SceneState_SetRecordWord102AndPlayCue288 · Proven C: 20 bytes
-
+
3a4 · Unknown 0x020002cc–0x0200037e: 178 bytes
-
+
3a4 · Unknown 0x02000380–0x02000388: 8 bytes
-
+
3a4 · Unknown 0x02000d2c–0x02000ec0: 404 bytes
-
+
3a4 · Unknown 0x02001678–0x0200182e: 438 bytes
-
+
3a4 · Unknown 0x02001830–0x02001838: 8 bytes
-
+
3a4 · Unknown 0x02001cf0–0x02001d14: 36 bytes
-
+
3a4 · Unknown 0x02002008–0x020022e6: 734 bytes
-
+
3a4 · Unknown 0x020022e8–0x02002310: 40 bytes
-
+
3a4 · Unknown 0x02002804–0x02002886: 130 bytes
-
+
3a4 · Unknown 0x02002888–0x02002934: 172 bytes
-
+
3a4 · Unknown 0x02002a48–0x02002b58: 272 bytes
-
+
3a4 · Unknown 0x02003484–0x0200359e: 282 bytes
-
+
3a4 · Unknown 0x020035a0–0x020035a8: 8 bytes
-
+
3a4 · Unknown 0x020035ac–0x02003662: 182 bytes
-
+
3a4 · Unknown 0x02003664–0x02003724: 192 bytes
-
+
3a4 · Unknown 0x02003844–0x0200391a: 214 bytes
-
+
3a4 · Unknown 0x0200391c–0x020039c6: 170 bytes
-
+
3a4 · Unknown 0x02003a44–0x02003a70: 44 bytes
-
+
3a4 · Unknown 0x020050f2–0x020050f6: 4 bytes
-
+
3a4 · Unknown 0x020050f8–0x02005102: 10 bytes
-
+
3a4 · Unknown 0x02005104–0x0200510e: 10 bytes
-
+
3a4 · Unknown 0x02005110–0x02005120: 16 bytes
-
+
3a4 · Unknown 0x02005124–0x02005144: 32 bytes
-
+
3a4 · Unknown 0x02005148–0x02005156: 14 bytes
-
+
3a4 · Unknown 0x02005158–0x02005162: 10 bytes
-
+
3a4 · Unknown 0x02005164–0x0200516e: 10 bytes
-
+
3a4 · Unknown 0x02005170–0x0200517a: 10 bytes
-
+
3a4 · Unknown 0x0200517c–0x02005186: 10 bytes
-
+
3a4 · Unknown 0x02005188–0x02005192: 10 bytes
-
+
3a4 · Unknown 0x02005194–0x020051a4: 16 bytes
-
+
3a4 · Unknown 0x020051a8–0x020051f0: 72 bytes
-
+
3a4 · Unknown 0x020051f2–0x02005200: 14 bytes
-
+
3a4 · Unknown 0x02005202–0x02005218: 22 bytes
-
+
3a4 · Unknown 0x0200521a–0x02005238: 30 bytes
-
+
3a4 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3a4 · Proven ASM 0x0200003e–0x02000040: 2 bytes
-
+
3a4 · Proven ASM 0x0200037e–0x02000380: 2 bytes
-
+
3a4 · Proven ASM 0x02000c86–0x02000c88: 2 bytes
-
+
3a4 · Proven ASM 0x02000c9a–0x02000c9c: 2 bytes
-
+
3a4 · Proven ASM 0x0200182e–0x02001830: 2 bytes
-
+
3a4 · Proven ASM 0x02001838–0x02001cf0: 1,208 bytes
-
+
3a4 · Proven ASM 0x02001d14–0x02002008: 756 bytes
-
+
3a4 · Proven ASM 0x020022e6–0x020022e8: 2 bytes
-
+
3a4 · Proven ASM 0x02002886–0x02002888: 2 bytes
-
+
3a4 · Proven ASM 0x02003482–0x02003484: 2 bytes
-
+
3a4 · Proven ASM 0x0200359e–0x020035a0: 2 bytes
-
+
3a4 · Proven ASM 0x02003662–0x02003664: 2 bytes
-
+
3a4 · Proven ASM 0x02003738–0x020037cc: 148 bytes
-
+
3a4 · Proven ASM 0x0200391a–0x0200391c: 2 bytes
-
+
3a4 · Proven ASM 0x020039c6–0x02003a44: 126 bytes
-
+
3a4 · Proven ASM 0x02003a78–0x02003d28: 688 bytes
-
+
3a5 · set_effect_record_mode · Proven C: 22 bytes
-
+
3a5 · OverlayObject_PrepareObject · Proven C: 86 bytes
-
+
3a5 · OverlayObject_CreateConfiguredObject · Proven C: 98 bytes
-
+
3a5 · SceneEffect_SpawnConfiguredEffect · Proven C: 472 bytes
-
+
3a5 · FieldScene_ApplyActor13Values3And3 · Proven C: 16 bytes
-
+
3a5 · OverlayObject_WaitUntilField12BelowLimit · Proven C: 32 bytes
-
+
3a5 · SceneData_SelectTableByScene59To5c · Proven C: 100 bytes
-
+
3a5 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3a5 · SceneData_GetTablea36c · Proven C: 8 bytes
-
+
3a5 · FieldScene_RunFlags8B2And8B3Steps · Proven C: 68 bytes
-
+
3a5 · SceneData_GetTableA500 · Proven C: 8 bytes
-
+
3a5 · FieldScene_RunScene3a5_02000c38 · Proven C: 52 bytes
-
+
3a5 · FieldScene_RunScene3a5_02000c6c · Proven C: 100 bytes
-
+
3a5 · CalculatePlanarDistance · Proven C: 44 bytes
-
+
3a5 · FieldScene_RunScene3a5_020014b0 · Proven C: 392 bytes
-
+
3a5 · FieldScene_RunScene3a5_02001874 · Proven C: 46 bytes
-
+
3a5 · SceneState_SetHalfwordB030 · Proven C: 12 bytes
-
+
3a5 · Draft C 0x02000104–0x0200013c: 56 bytes
-
+
3a5 · Unknown 0x02000344–0x020003ac: 104 bytes
-
+
3a5 · Unknown 0x0200041c–0x02000498: 124 bytes
-
+
3a5 · Unknown 0x02000874–0x0200088c: 24 bytes
-
+
3a5 · Unknown 0x02000c1a–0x02000c38: 30 bytes
-
+
3a5 · Unknown 0x02000cd0–0x02000e00: 304 bytes
-
+
3a5 · Unknown 0x02000e2c–0x02001162: 822 bytes
-
+
3a5 · Unknown 0x02001164–0x0200148e: 810 bytes
-
+
3a5 · Unknown 0x02001490–0x020014b0: 32 bytes
-
+
3a5 · Unknown 0x02001638–0x02001874: 572 bytes
-
+
3a5 · Unknown 0x02001c1c–0x02001c76: 90 bytes
-
+
3a5 · Unknown 0x020020ea–0x02002102: 24 bytes
-
+
3a5 · Unknown 0x02002104–0x0200210e: 10 bytes
-
+
3a5 · Unknown 0x02002112–0x0200211c: 10 bytes
-
+
3a5 · Unknown 0x0200211e–0x0200212e: 16 bytes
-
+
3a5 · Unknown 0x02002130–0x0200213a: 10 bytes
-
+
3a5 · Unknown 0x02002142–0x02002146: 4 bytes
-
+
3a5 · Unknown 0x02002148–0x0200215c: 20 bytes
-
+
3a5 · Unknown 0x0200215e–0x02002176: 24 bytes
-
+
3a5 · Unknown 0x02002178–0x02002182: 10 bytes
-
+
3a5 · Unknown 0x0200218a–0x0200218e: 4 bytes
-
+
3a5 · Unknown 0x02002190–0x020021a6: 22 bytes
-
+
3a5 · Unknown 0x020021a8–0x020021bc: 20 bytes
-
+
3a5 · Unknown 0x020021be–0x020021d6: 24 bytes
-
+
3a5 · Unknown 0x020021d8–0x020021e2: 10 bytes
-
+
3a5 · Unknown 0x020021ea–0x020021ee: 4 bytes
-
+
3a5 · Unknown 0x020021f0–0x020021f6: 6 bytes
-
+
3a5 · Unknown 0x020021f8–0x02002206: 14 bytes
-
+
3a5 · Unknown 0x02002208–0x0200221c: 20 bytes
-
+
3a5 · Unknown 0x0200221e–0x02002236: 24 bytes
-
+
3a5 · Unknown 0x02002238–0x02002242: 10 bytes
-
+
3a5 · Unknown 0x0200224a–0x0200224e: 4 bytes
-
+
3a5 · Unknown 0x02002250–0x02002266: 22 bytes
-
+
3a5 · Unknown 0x02002268–0x0200227e: 22 bytes
-
+
3a5 · Unknown 0x02002280–0x02002296: 22 bytes
-
+
3a5 · Unknown 0x02002298–0x020022ae: 22 bytes
-
+
3a5 · Unknown 0x020022b0–0x020022b6: 6 bytes
-
+
3a5 · Unknown 0x020022b8–0x020022c4: 12 bytes
-
+
3a5 · Unknown 0x020022c6–0x020022de: 24 bytes
-
+
3a5 · Unknown 0x020022e0–0x020022ea: 10 bytes
-
+
3a5 · Unknown 0x020022f2–0x020022f6: 4 bytes
-
+
3a5 · Unknown 0x020022f8–0x020022fe: 6 bytes
-
+
3a5 · Unknown 0x02002300–0x0200230e: 14 bytes
-
+
3a5 · Unknown 0x02002310–0x02002316: 6 bytes
-
+
3a5 · Unknown 0x02002318–0x02002326: 14 bytes
-
+
3a5 · Unknown 0x02002328–0x0200232e: 6 bytes
-
+
3a5 · Unknown 0x02002330–0x0200233e: 14 bytes
-
+
3a5 · Unknown 0x02002340–0x02002346: 6 bytes
-
+
3a5 · Unknown 0x02002348–0x02002354: 12 bytes
-
+
3a5 · Unknown 0x02002356–0x020023b0: 90 bytes
-
+
3a5 · Unknown 0x020023b2–0x020023e2: 48 bytes
-
+
3a5 · Unknown 0x020023e4–0x020023f8: 20 bytes
-
+
3a5 · Unknown 0x020023fa–0x0200242a: 48 bytes
-
+
3a5 · Unknown 0x0200242c–0x02002442: 22 bytes
-
+
3a5 · Unknown 0x02002444–0x0200245a: 22 bytes
-
+
3a5 · Unknown 0x0200245c–0x02002472: 22 bytes
-
+
3a5 · Unknown 0x02002474–0x020024a0: 44 bytes
-
+
3a5 · Unknown 0x020024a2–0x020024d2: 48 bytes
-
+
3a5 · Unknown 0x020024d4–0x020024e8: 20 bytes
-
+
3a5 · Unknown 0x020024ea–0x02002506: 28 bytes
-
+
3a5 · Unknown 0x02002508–0x02002512: 10 bytes
-
+
3a5 · Unknown 0x02002514–0x0200251e: 10 bytes
-
+
3a5 · Unknown 0x02002520–0x0200252a: 10 bytes
-
+
3a5 · Unknown 0x0200252c–0x02002536: 10 bytes
-
+
3a5 · Unknown 0x02002538–0x02002542: 10 bytes
-
+
3a5 · Unknown 0x02002544–0x0200254e: 10 bytes
-
+
3a5 · Unknown 0x02002550–0x0200255a: 10 bytes
-
+
3a5 · Unknown 0x0200255c–0x02002566: 10 bytes
-
+
3a5 · Unknown 0x02002568–0x0200257e: 22 bytes
-
+
3a5 · Unknown 0x02002580–0x02002596: 22 bytes
-
+
3a5 · Unknown 0x02002598–0x020025a2: 10 bytes
-
+
3a5 · Unknown 0x020025a4–0x020025ba: 22 bytes
-
+
3a5 · Unknown 0x020025bc–0x0200261a: 94 bytes
-
+
3a5 · Unknown 0x0200261c–0x02002626: 10 bytes
-
+
3a5 · Unknown 0x02002628–0x02002656: 46 bytes
-
+
3a5 · Unknown 0x02002658–0x02002662: 10 bytes
-
+
3a5 · Unknown 0x02002664–0x0200266e: 10 bytes
-
+
3a5 · Unknown 0x02002670–0x0200267a: 10 bytes
-
+
3a5 · Unknown 0x0200267c–0x02002686: 10 bytes
-
+
3a5 · Unknown 0x02002688–0x02002692: 10 bytes
-
+
3a5 · Unknown 0x02002694–0x0200269e: 10 bytes
-
+
3a5 · Unknown 0x020026a0–0x020026aa: 10 bytes
-
+
3a5 · Unknown 0x020026ac–0x020026b0: 4 bytes
-
+
3a5 · Unknown 0x020026b4–0x020026c2: 14 bytes
-
+
3a5 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3a5 · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
3a5 · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
3a5 · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
3a5 · Proven ASM 0x020004e4–0x02000874: 912 bytes
-
+
3a5 · Proven ASM 0x0200088c–0x02000c1a: 910 bytes
-
+
3a5 · Proven ASM 0x02001162–0x02001164: 2 bytes
-
+
3a5 · Proven ASM 0x0200148e–0x02001490: 2 bytes
-
+
3a5 · Proven ASM 0x020018a2–0x02001c1c: 890 bytes
-
+
3a5 · Proven ASM 0x02001c76–0x02001c78: 2 bytes
-
+
3a5 · Proven ASM 0x02001c8c–0x02001e4c: 448 bytes
-
+
3a5 · Proven ASM 0x02001e58–0x02001e86: 46 bytes
-
+
3a6 · set_effect_record_mode · Proven C: 22 bytes
-
+
3a6 · OverlayObject_CreateConfigured · Proven C: 86 bytes
-
+
3a6 · OverlayObject_CreateConfiguredB · Proven C: 98 bytes
-
+
3a6 · SpawnConfiguredEffect · Proven C: 472 bytes
-
+
3a6 · calculate_position_distance · Proven C: 60 bytes
-
+
3a6 · find_scene_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
3a6 · AdvanceStagedActorPair · Proven C: 384 bytes
-
+
3a6 · fill_scene_grid_attribute_rectangle · Proven C: 100 bytes
-
+
3a6 · stop_blocked_actor_motion · Proven C: 164 bytes
-
+
3a6 · find_clear_actor_position · Proven C: 404 bytes
-
+
3a6 · SceneState_SetValues8_3_4 · Proven C: 16 bytes
-
+
3a6 · SceneActor_WaitActorDescent · Proven C: 38 bytes
-
+
3a6 · SceneActor_FaceActorZero · Proven C: 38 bytes
-
+
3a6 · SceneData_SelectByRuntimeSelector · Proven C: 84 bytes
-
+
3a6 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3a6 · SceneData_GetTablea1dc · Proven C: 8 bytes
-
+
3a6 · SelectSceneDataByState · Proven C: 76 bytes
-
+
3a6 · FieldScene_ConfigureRegionAtRow15 · Proven C: 28 bytes
-
+
3a6 · FieldScene_ConfigureRegionAtRow17 · Proven C: 28 bytes
-
+
3a6 · FieldScene_RunInitBracketThenSequence · Proven C: 22 bytes
-
+
3a6 · FieldScene_RunPrimarySequence · Proven C: 192 bytes
-
+
3a6 · FieldScene_RunScene3a6SequenceA · Proven C: 182 bytes
-
+
3a6 · FieldScene_RunScene3a6SequenceB · Proven C: 168 bytes
-
+
3a6 · FieldScene_RunScene3a6SequenceC · Proven C: 120 bytes
-
+
3a6 · FieldScene_RunActor8ZeroStep · Proven C: 22 bytes
-
+
3a6 · FieldScene_RunScene3a6_020014ac · Proven C: 288 bytes
-
+
3a6 · SceneData_SelectSecondaryByRuntimeSelector · Proven C: 84 bytes
-
+
3a6 · SceneAudio_PlayCue123AndDispatchWork364 · Proven C: 40 bytes
-
+
3a6 · DialogueLayout_ConfigureRowsByFlag301 · Proven C: 104 bytes
-
+
3a6 · position_actor_pair · Proven C: 220 bytes
-
+
3a6 · FieldScene_RunShiftAndSetFlag301 · Proven C: 64 bytes
-
+
3a6 · FieldScene_RunActor11Transition301 · Proven C: 68 bytes
-
+
3a6 · SceneActor_PlaceAtTile · Proven C: 76 bytes
-
+
3a6 · ActorPresentation_AdvanceActorElevenStates · Proven C: 22 bytes
-
+
3a6 · Draft C 0x02000104–0x0200013c: 56 bytes
-
+
3a6 · Draft C 0x020008ec–0x02000b86: 666 bytes
-
+
3a6 · Draft C 0x02000b88–0x02000ba4: 28 bytes
-
+
3a6 · Unknown 0x02000748–0x02000758: 16 bytes
-
+
3a6 · Unknown 0x02000ba4–0x02000cc0: 284 bytes
-
+
3a6 · Unknown 0x020010b8–0x020010c8: 16 bytes
-
+
3a6 · Unknown 0x020014a8–0x020014ac: 4 bytes
-
+
3a6 · Unknown 0x02001698–0x0200169c: 4 bytes
-
+
3a6 · Unknown 0x020016f0–0x02001748: 88 bytes
-
+
3a6 · Unknown 0x02001984–0x020019b6: 50 bytes
-
+
3a6 · Unknown 0x02001acc–0x02001bce: 258 bytes
-
+
3a6 · Unknown 0x02001bd0–0x02001bdc: 12 bytes
-
+
3a6 · Unknown 0x02001bf0–0x02001bfc: 12 bytes
-
+
3a6 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3a6 · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
3a6 · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
3a6 · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
3a6 · Proven ASM 0x02000630–0x02000748: 280 bytes
-
+
3a6 · Proven ASM 0x02000b86–0x02000b88: 2 bytes
-
+
3a6 · Proven ASM 0x02000cf6–0x02000cf8: 2 bytes
-
+
3a6 · Proven ASM 0x02000d1e–0x02000d20: 2 bytes
-
+
3a6 · Proven ASM 0x02000e04–0x020010b8: 692 bytes
-
+
3a6 · Proven ASM 0x020010de–0x020010e0: 2 bytes
-
+
3a6 · Proven ASM 0x02001256–0x02001258: 2 bytes
-
+
3a6 · Proven ASM 0x0200138e–0x020014a8: 282 bytes
-
+
3a6 · Proven ASM 0x020015cc–0x02001698: 204 bytes
-
+
3a6 · Proven ASM 0x02001bce–0x02001bd0: 2 bytes
-
+
3a6 · Proven ASM 0x02001c1c–0x02001d64: 328 bytes
-
+
3a6 · Proven ASM 0x02001d70–0x02001d9e: 46 bytes
-
+
3a7 · SceneData_SelectByRuntimeSelector · Proven C: 84 bytes
-
+
3a7 · SceneData_GetTable9C5C · Proven C: 8 bytes
-
+
3a7 · SceneData_SelectSecondaryByRuntimeSelector · Proven C: 84 bytes
-
+
3a7 · SceneData_SelectOverlayDataBySelector · Proven C: 84 bytes
-
+
3a7 · SceneData_FindActiveSlotAtCell · Proven C: 60 bytes
-
+
3a7 · SceneState_ApplyFlag300 · Proven C: 14 bytes
-
+
3a7 · SceneState_SetFlag953 · Proven C: 20 bytes
-
+
3a7 · SceneData_SelectDataByRuntimeSelector · Proven C: 84 bytes
-
+
3a7 · IsActor9AtTile15x54 · Proven C: 52 bytes
-
+
3a7 · FieldScene_RunFlag9a9GuardedScene · Proven C: 48 bytes
-
+
3a7 · SceneState_ApplyThreeRects · Proven C: 70 bytes
-
+
3a7 · FieldScene_RunScene3a7SequenceA · Proven C: 44 bytes
-
+
3a7 · FieldScene_NoOp · Proven C: 2 bytes
-
+
3a7 · SceneState_ApplyThreeRectsRows9And10 · Proven C: 70 bytes
-
+
3a7 · SceneActor_IsActor10AtTile16x12 · Proven C: 52 bytes
-
+
3a7 · FieldScene_RunGuardedStep9AAAfterSetup · Proven C: 64 bytes
-
+
3a7 · no_op_callback_e · Proven C: 2 bytes
-
+
3a7 · FieldScene_RunGuardedStep9AA · Proven C: 60 bytes
-
+
3a7 · SceneState_ApplyRectAndMarkActor16 · Proven C: 72 bytes
-
+
3a7 · SceneState_ConfigureRegion26_30AndMarkActor17 · Proven C: 76 bytes
-
+
3a7 · SceneState_ConfigureRegion26_30AndClearActor18Mode · Proven C: 76 bytes
-
+
3a7 · SceneState_ApplyRectAndSetupActor19 · Proven C: 84 bytes
-
+
3a7 · SceneActor_SetupSlotTwenty · Proven C: 80 bytes
-
+
3a7 · SceneActor_MarkSlot21AndSetFlag205 · Proven C: 84 bytes
-
+
3a7 · SceneState_DispatchByActorZeroDepth · Proven C: 32 bytes
-
+
3a7 · SceneState_SetEntries16To21Byte35 · Proven C: 32 bytes
-
+
3a7 · FieldScene_RunSupplementalSequenceOne · Proven C: 340 bytes
-
+
3a7 · FieldScene_RunScene3a7SequenceB · Proven C: 156 bytes
-
+
3a7 · FieldScene_RunOpeningAuxiliarySequence · Proven C: 224 bytes
-
+
3a7 · FieldScene_RunScene3a7SequenceD · Proven C: 180 bytes
-
+
3a7 · SceneActor_TransformAndApplyRecordPosition · Proven C: 54 bytes
-
+
3a7 · SceneActor_InitSlots10To15AndStartTask · Proven C: 72 bytes
-
+
3a7 · SceneActor_SetupActors11To14AndInstallTask · Proven C: 80 bytes
-
+
3a7 · AddSoftFloatParts · Proven C: 596 bytes
-
+
3a7 · AddSoftDouble · Proven C: 54 bytes
-
+
3a7 · SubtractSoftDouble · Proven C: 62 bytes
-
+
3a7 · SceneData_GetTable9888 · Proven C: 8 bytes
-
+
3a7 · SceneState_IsStateAtMostOne · Proven C: 16 bytes
-
+
3a7 · SceneState_IsState4 · Proven C: 16 bytes
-
+
3a7 · SceneState_IsStateTwoC · Proven C: 16 bytes
-
+
3a7 · SignedIntToSoftDouble · Proven C: 124 bytes
-
+
3a7 · Runtime_SoftDoubleToSignedInt · Proven C: 108 bytes
-
+
3a7 · SceneState_IsStateAtMostOneB · Proven C: 16 bytes
-
+
3a7 · SceneState_IsStateFour · Proven C: 16 bytes
-
+
3a7 · SceneState_IsStateTwo · Proven C: 16 bytes
-
+
3a7 · Runtime_LogicalShiftRight64 · Proven C: 48 bytes
-
+
3a7 · Runtime_PackSoftDouble · Proven C: 412 bytes
-
+
3a7 · SceneState_IsStateAtMostOneBB · Proven C: 16 bytes
-
+
3a7 · SceneState_IsStateFourDirect · Proven C: 16 bytes
-
+
3a7 · SceneState_IsStateTwoB · Proven C: 16 bytes
-
+
3a7 · Runtime_UnpackSoftDouble · Proven C: 212 bytes
-
+
3a7 · Draft C 0x02000704–0x02000734: 48 bytes
-
+
3a7 · Draft C 0x02000944–0x020009c0: 124 bytes
-
+
3a7 · Unknown 0x02000170–0x020002ae: 318 bytes
-
+
3a7 · Unknown 0x020002b0–0x020002bc: 12 bytes
-
+
3a7 · Unknown 0x02000b8c–0x02000bf6: 106 bytes
-
+
3a7 · Unknown 0x02000bf8–0x02000c08: 16 bytes
-
+
3a7 · Unknown 0x02000ca0–0x02000d9a: 250 bytes
-
+
3a7 · Unknown 0x02000eb4–0x02000ecc: 24 bytes
-
+
3a7 · Unknown 0x02000f08–0x02001042: 314 bytes
-
+
3a7 · Unknown 0x02001048–0x02001060: 24 bytes
-
+
3a7 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3a7 · Proven ASM 0x020002ae–0x020002b0: 2 bytes
-
+
3a7 · Proven ASM 0x020002ca–0x020002cc: 2 bytes
-
+
3a7 · Proven ASM 0x020003de–0x020003e0: 2 bytes
-
+
3a7 · Proven ASM 0x0200040e–0x02000410: 2 bytes
-
+
3a7 · Proven ASM 0x02000456–0x02000458: 2 bytes
-
+
3a7 · Proven ASM 0x020004ce–0x020004d0: 2 bytes
-
+
3a7 · Proven ASM 0x02000b8a–0x02000b8c: 2 bytes
-
+
3a7 · Proven ASM 0x02000bf6–0x02000bf8: 2 bytes
-
+
3a7 · Proven ASM 0x02001070–0x02001158: 232 bytes
-
+
3a7 · Proven ASM 0x020013e2–0x020013e4: 2 bytes
-
+
3a7 · Proven ASM 0x02001422–0x02001424: 2 bytes
-
+
3a8 · SceneState_ApplyValues12And2And3 · Proven C: 16 bytes
-
+
3a8 · SceneEffect_UpdateRandomAction · Proven C: 108 bytes
-
+
3a8 · OverlayObject_AdvanceXWhenCounterExpires · Proven C: 64 bytes
-
+
3a8 · SceneData_SelectTableByWord224 · Proven C: 136 bytes
-
+
3a8 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3a8 · SceneData_GetTablec6b8 · Proven C: 8 bytes
-
+
3a8 · SceneData_SelectTableByWord224B · Proven C: 100 bytes
-
+
3a8 · FieldScene_RunStepWithValue29df · Proven C: 40 bytes
-
+
3a8 · FieldScene_RunStepWithValueFd6 · Proven C: 52 bytes
-
+
3a8 · SceneData_SelectTableBySelector224 · Proven C: 136 bytes
-
+
3a8 · SceneDialogue_RunActorNineteenDialogue · Proven C: 32 bytes
-
+
3a8 · FieldScene_RunSlotZeroFacingSequence · Proven C: 140 bytes
-
+
3a8 · SceneDialogue_RunActorTenDialogue · Proven C: 32 bytes
-
+
3a8 · SceneState_BranchOnSlotZeroFacing · Proven C: 68 bytes
-
+
3a8 · SceneDialogue_RunActorTwentyThreeByLeaderHeading · Proven C: 72 bytes
-
+
3a8 · FieldScene_RunActorTwentyFourAngleDialogue · Proven C: 68 bytes
-
+
3a8 · RunSceneArrivalSetup · Proven C: 138 bytes
-
+
3a8 · SceneState_ClearWord24WhenFlag200 · Proven C: 40 bytes
-
+
3a8 · SceneState_LinkRecordZeroWhenFlag200Clear · Proven C: 44 bytes
-
+
3a8 · SceneActor_SetActorZeroByte35Bit0 · Proven C: 22 bytes
-
+
3a8 · SceneState_ClearRecordZeroBit0At35 · Proven C: 22 bytes
-
+
3a8 · SceneDialogue_RunActor181Line916 · Proven C: 60 bytes
-
+
3a8 · FieldScene_DispatchBySceneId · Proven C: 112 bytes
-
+
3a8 · SceneState_CheckFlags941And940 · Proven C: 112 bytes
-
+
3a8 · SceneState_ApplyFlagGatedActorEightSetup · Proven C: 76 bytes
-
+
3a8 · SceneState_SetWork448AndRunFlag915Step · Proven C: 140 bytes
-
+
3a8 · FieldScene_RunMiddleSequence · Proven C: 1,340 bytes
-
+
3a8 · SceneState_SetValues27Through34 · Proven C: 54 bytes
-
+
3a8 · SceneEffect_SetSlotVariantAndDescriptor · Proven C: 52 bytes
-
+
3a8 · FieldScene_RunTwoActorCutsceneSequence · Proven C: 1,720 bytes
-
+
3a8 · SceneActor_FindAtTileXZ · Proven C: 52 bytes
-
+
3a8 · FieldScene_RunLateSequence · Proven C: 236 bytes
-
+
3a8 · FieldScene_RunScene3a8SequenceB · Proven C: 1,108 bytes
-
+
3a8 · SceneEffect_UpdateMotionWithDamping · Proven C: 110 bytes
-
+
3a8 · FieldScene_RunSupplementalSequenceOne · Proven C: 252 bytes
-
+
3a8 · FieldScene_RunScene3a8SequenceA · Proven C: 168 bytes
-
+
3a8 · SceneEffect_UpdateLobeOrbitEffect26 · Proven C: 100 bytes
-
+
3a8 · FieldScene_DrawTilesAndRaiseActor11 · Proven C: 100 bytes
-
+
3a8 · SceneEffect_UpdateOrbitingEffect · Proven C: 102 bytes
-
+
3a8 · InitializeOrbitingRenderEffect · Proven C: 216 bytes
-
+
3a8 · Unknown 0x02000464–0x020004fa: 150 bytes
-
+
3a8 · Unknown 0x020004fc–0x02000504: 8 bytes
-
+
3a8 · Unknown 0x02000590–0x02000aaa: 1,306 bytes
-
+
3a8 · Unknown 0x02001538–0x02001546: 14 bytes
-
+
3a8 · Unknown 0x02001548–0x0200158c: 68 bytes
-
+
3a8 · Unknown 0x020016bc–0x020017c6: 266 bytes
-
+
3a8 · Unknown 0x020017c8–0x020017e8: 32 bytes
-
+
3a8 · Unknown 0x02001ed8–0x02001f02: 42 bytes
-
+
3a8 · Unknown 0x02001f04–0x02001f26: 34 bytes
-
+
3a8 · Unknown 0x02001ff2–0x02001ff6: 4 bytes
-
+
3a8 · Unknown 0x02001ff8–0x02002000: 8 bytes
-
+
3a8 · Unknown 0x02003158–0x02003184: 44 bytes
-
+
3a8 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3a8 · Proven ASM 0x020004fa–0x020004fc: 2 bytes
-
+
3a8 · Proven ASM 0x0200058e–0x02000590: 2 bytes
-
+
3a8 · Proven ASM 0x02000aaa–0x0200151c: 2,674 bytes
-
+
3a8 · Proven ASM 0x02001546–0x02001548: 2 bytes
-
+
3a8 · Proven ASM 0x020015f6–0x020015f8: 2 bytes
-
+
3a8 · Proven ASM 0x0200160e–0x02001610: 2 bytes
-
+
3a8 · Proven ASM 0x020017c6–0x020017c8: 2 bytes
-
+
3a8 · Proven ASM 0x02001ea2–0x02001ea4: 2 bytes
-
+
3a8 · Proven ASM 0x02001f02–0x02001f04: 2 bytes
-
+
3a8 · Proven ASM 0x02001ff6–0x02001ff8: 2 bytes
-
+
3a8 · Proven ASM 0x020026c0–0x02003158: 2,712 bytes
-
+
3a8 · Proven ASM 0x02003766–0x02003768: 2 bytes
-
+
3a8 · Proven ASM 0x02003a3a–0x02003a3c: 2 bytes
-
+
3a8 · Proven ASM 0x02003b14–0x02003d84: 624 bytes
-
+
3a9 · SceneData_SelectTableBySceneId · Proven C: 64 bytes
-
+
3a9 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3a9 · SceneData_GetTable8728 · Proven C: 8 bytes
-
+
3a9 · SceneDialogue_RunActor12DialogueAndSetFlag910 · Proven C: 40 bytes
-
+
3a9 · SceneDialogue_RunActor16Dialogue · Proven C: 32 bytes
-
+
3a9 · SceneDialogue_RunActor8FlaggedDialogue · Proven C: 112 bytes
-
+
3a9 · SceneDialogue_RunActor8FacingDialogue · Proven C: 68 bytes
-
+
3a9 · FieldScene_RunArrivalPlacement · Proven C: 200 bytes
-
+
3a9 · SceneState_SetRuntimeWord448To521 · Proven C: 52 bytes
-
+
3a9 · SceneState_ClearSlotsBySubState · Proven C: 172 bytes
-
+
3a9 · Unknown 0x0200007c–0x02000126: 170 bytes
-
+
3a9 · Unknown 0x02000128–0x02000144: 28 bytes
-
+
3a9 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3a9 · Proven ASM 0x02000126–0x02000128: 2 bytes
-
+
3a9 · Proven ASM 0x020003e8–0x020004a0: 184 bytes
-
+
3aa · SceneData_SelectTable9bd4ByState · Proven C: 48 bytes
-
+
3aa · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3aa · SceneData_GetTable9d9c · Proven C: 8 bytes
-
+
3aa · SceneData_SelectTable9ddcByStateWithInit · Proven C: 56 bytes
-
+
3aa · SceneData_SelectTable9f2cByState · Proven C: 48 bytes
-
+
3aa · SceneDialogue_RunActor13Message1b83 · Proven C: 32 bytes
-
+
3aa · SceneDialogue_RunActor16Message1b88 · Proven C: 32 bytes
-
+
3aa · FieldScene_RunActorEightTurnDialogue · Proven C: 112 bytes
-
+
3aa · FieldScene_RunScene3aa_02000184 · Proven C: 172 bytes
-
+
3aa · SceneState_SetWord448To209AndRun · Proven C: 52 bytes
-
+
3aa · FieldScene_DispatchSceneByIndex · Proven C: 252 bytes
-
+
3aa · RunEventScript01 · Proven C: 4,268 bytes
-
+
3aa · ConfigureFourSceneChannelsAndHandoff · Proven C: 68 bytes
-
+
+
+
+3aa · RunEventScript04 · Proven C: 68 bytes
+
-
-3aa · Unknown 0x02001a18–0x02001a34: 28 bytes
-
+
+3aa · FieldScene_RunScene3aaSequenceA · Proven C: 1,440 bytes
+
3aa · Proven ASM 0x02000000–0x02000030: 48 bytes
-
-
-
-3aa · Proven ASM 0x02001450–0x02001a18: 1,480 bytes
-
+
3aa · Proven ASM 0x02001a34–0x02001b94: 352 bytes
-
+
3ab · set_effect_record_mode · Proven C: 22 bytes
-
+
3ab · OverlayObject_CreateConfigured · Proven C: 86 bytes
-
+
3ab · OverlayObject_CreateConfiguredObject · Proven C: 98 bytes
-
+
3ab · SpawnConfiguredEffect · Proven C: 472 bytes
-
+
3ab · SceneData_SelectDataByRuntimeSelector · Proven C: 56 bytes
-
+
3ab · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3ab · SceneData_SelectTableBySelector224 · Proven C: 56 bytes
-
+
3ab · SceneData_SelectTableByScene9f · Proven C: 56 bytes
-
+
3ab · FieldScene_RunStepFD1WithActor181 · Proven C: 52 bytes
-
+
3ab · FieldScene_DrawTilesAndResetActor8 · Proven C: 116 bytes
-
+
3ab · SceneActor_SetActor8FlagByLeaderDepth · Proven C: 50 bytes
-
+
3ab · FieldScene_RunSupplementalSequenceOne · Proven C: 340 bytes
-
+
3ab · FieldScene_RunOpeningSequence · Proven C: 204 bytes
-
+
3ab · FieldScene_RunScriptedSteps947And29E1 · Proven C: 40 bytes
-
+
3ab · FieldScene_RunScene3abSequenceF · Proven C: 84 bytes
-
+
3ab · SceneDialogue_ShowLine1B9C · Proven C: 44 bytes
-
+
3ab · FieldScene_RunActorEighteenPromptDialogue · Proven C: 144 bytes
-
+
3ab · SceneDialogue_RunActor9Line · Proven C: 32 bytes
-
+
3ab · SceneDialogue_ShowLine1BAA · Proven C: 32 bytes
-
+
3ab · SceneDialogue_ShowLine1BB0 · Proven C: 32 bytes
-
+
3ab · SceneDialogue_RunActor10Scene · Proven C: 40 bytes
-
+
3ab · SceneDialogue_RunActorTwelveDialogue · Proven C: 32 bytes
-
+
3ab · FieldScene_RunSupplementalSequenceTwo · Proven C: 148 bytes
-
+
3ab · FieldScene_RunScene3abSequenceA · Proven C: 84 bytes
-
+
3ab · FieldScene_RunScene3abSequenceB · Proven C: 188 bytes
-
+
3ab · SceneDialogue_RunActorNineFlaggedDialogue · Proven C: 52 bytes
-
+
3ab · ActorPresentation_RunActorZeroCameraScene · Proven C: 96 bytes
-
+
3ab · FieldScene_RunSupplementalSequenceThree · Proven C: 164 bytes
-
+
3ab · FieldScene_RunScene3abSequenceC · Proven C: 100 bytes
-
+
3ab · FieldScene_RunScene3abSequenceE · Proven C: 148 bytes
-
+
3ab · FieldScene_CallHelper27cc · Proven C: 10 bytes
-
+
3ab · SceneState_Run83WhenFlag201Clear · Proven C: 28 bytes
-
+
3ab · FieldScene_BuildFlaggedMapLayout · Proven C: 384 bytes
-
+
3ab · FieldScene_RunScene3ab_02000eb0 · Proven C: 236 bytes
-
+
3ab · FieldScene_NoOp · Proven C: 4 bytes
-
+
3ab · SceneState_SetThreeCellsAt6x11AndFlag241 · Proven C: 80 bytes
-
+
3ab · FieldScene_RunFlagGatedActorDialogue · Proven C: 412 bytes
-
+
3ab · SceneState_SetThreeCellsAt7x12 · Proven C: 68 bytes
-
+
3ab · FieldScene_RunScene3ab_020011d0 · Proven C: 112 bytes
-
+
3ab · FieldScene_RunScene3abSequenceG · Proven C: 100 bytes
-
+
+
+
+3ab · FieldScene_RunActorDialogueMovementSequence · Proven C: 672 bytes
+
3ab · FieldScene_RunScene3ab_020015bc · Proven C: 170 bytes
-
+
3ab · update_orbiting_effect · Proven C: 102 bytes
-
+
3ab · InitializeSpawnedOrbitingEffect · Proven C: 216 bytes
-
+
3ab · Draft C 0x02000104–0x0200013c: 56 bytes
-
+
3ab · Draft C 0x020007f4–0x02000844: 80 bytes
-
+
3ab · Unknown 0x02000ac4–0x02000b0c: 72 bytes
-
+
3ab · Unknown 0x020012a4–0x0200131c: 120 bytes
-
+
3ab · Unknown 0x02001668–0x020017d8: 368 bytes
-
+
3ab · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3ab · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
3ab · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
3ab · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
3ab · Proven ASM 0x0200049a–0x0200049c: 2 bytes
-
+
3ab · Proven ASM 0x02000d12–0x02000d14: 2 bytes
-
-
-
-3ab · Proven ASM 0x0200131c–0x020015bc: 672 bytes
-
+
3ab · Proven ASM 0x02001666–0x02001668: 2 bytes
-
+
3ab · Proven ASM 0x0200183e–0x02001840: 2 bytes
-
+
3ab · Proven ASM 0x02001920–0x02001b38: 536 bytes
-
+
3ac · SceneData_GetTable84f8 · Proven C: 8 bytes
-
+
3ac · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3ac · SceneData_GetTable8630 · Proven C: 8 bytes
-
+
3ac · SceneData_GetTable865c · Proven C: 8 bytes
-
+
3ac · SceneData_SelectTableBySubStateAndFlag941 · Proven C: 64 bytes
-
+
3ac · SceneDialogue_RunActor17FlaggedDialogue · Proven C: 112 bytes
-
+
3ac · SceneDialogue_RunActor20DialogueA · Proven C: 40 bytes
-
+
3ac · SceneDialogue_RunActor20DialogueB · Proven C: 40 bytes
-
+
3ac · SceneDialogue_RunActor18Dialogue · Proven C: 32 bytes
-
+
3ac · SceneDialogue_RunActor21FlaggedDialogue · Proven C: 108 bytes
-
+
3ac · SceneDialogue_RunActor16FlaggedDialogue · Proven C: 76 bytes
-
+
3ac · SceneDialogue_RunActor16FacingFlaggedDialogue · Proven C: 112 bytes
-
+
3ac · SceneDialogue_RunActor14FlaggedDialogue · Proven C: 60 bytes
-
+
3ac · SceneDialogue_RunActor14FacingFlaggedDialogue · Proven C: 104 bytes
-
+
3ac · SceneDialogue_RunActor15FlaggedDialogue · Proven C: 60 bytes
-
+
3ac · SceneDialogue_RunActor15FacingFlaggedDialogue · Proven C: 104 bytes
-
+
3ac · SceneState_SetRuntimeWord448To521 · Proven C: 120 bytes
-
+
3ac · SceneDialogue_RunActor22FacingDialogue · Proven C: 60 bytes
-
+
3ac · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3ac · Proven ASM 0x02000490–0x020004f8: 104 bytes
-
+
3ad · SceneData_GetTable9c34 · Proven C: 8 bytes
-
+
3ad · get_default_result · Proven C: 4 bytes
-
+
3ad · SceneData_GetTable9CAC · Proven C: 8 bytes
-
+
3ad · SceneData_SelectTable9cc0ByState · Proven C: 48 bytes
-
+
3ad · SceneData_GetTable9dd4 · Proven C: 8 bytes
-
+
3ad · SceneActor_SetSlotEightMode0WhenPresent · Proven C: 22 bytes
-
+
3ad · SceneState_MarkActor9AndConfigureRegion7_32 · Proven C: 64 bytes
-
+
3ad · SceneState_RunRepaintSequenceWithWaits · Proven C: 220 bytes
-
+
3ad · SceneActor_MarkSlot10AndRunFlag202Step · Proven C: 80 bytes
-
+
3ad · SceneState_ApplyFlag203 · Proven C: 16 bytes
-
+
3ad · FieldScene_RunOpeningAuxiliarySequence · Proven C: 300 bytes
-
+
3ad · FieldScene_RunScene3adSequenceA · Proven C: 72 bytes
-
+
3ad · FieldScene_RunScene3ad_02000384 · Proven C: 218 bytes
-
+
3ad · FieldScene_RunGuardedLine1528Scene · Proven C: 72 bytes
-
+
3ad · FieldScene_RunMultiActorPresentation · Proven C: 896 bytes
-
+
3ad · FieldScene_RunDialogueCameraChoreography · Proven C: 2,448 bytes
-
+
3ad · FieldScene_RunScene3ad_020011b8 · Proven C: 244 bytes
-
+
3ad · SceneDialogue_IsPromptResultZero · Proven C: 24 bytes
-
+
3ad · SceneDialogue_AskMessage2549 · Proven C: 44 bytes
-
+
3ad · SceneDialogue_AskMessage254d · Proven C: 44 bytes
-
+
3ad · SceneData_ReturnOne · Proven C: 4 bytes
-
+
3ad · SceneDialogue_AskMessage2557 · Proven C: 44 bytes
-
+
3ad · SceneDialogue_ShowLine255DAndReturnOne · Proven C: 28 bytes
-
+
3ad · SceneDialogue_AskMessage254a · Proven C: 44 bytes
-
+
3ad · FieldScene_RunScene3ad_02001394 · Proven C: 136 bytes
-
+
3ad · SceneDialogue_AskMessage255c · Proven C: 44 bytes
-
+
3ad · FieldScene_RunLateScript · Proven C: 792 bytes
-
+
3ad · FieldScene_RunSceneEntryHook · Proven C: 200 bytes
-
+
3ad · Unknown 0x02001760–0x02001a06: 678 bytes
-
+
3ad · Unknown 0x02001a08–0x02001a0c: 4 bytes
-
+
3ad · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3ad · Proven ASM 0x02000092–0x02000094: 2 bytes
-
+
3ad · Proven ASM 0x0200045e–0x02000460: 2 bytes
-
+
3ad · Proven ASM 0x02001a06–0x02001a08: 2 bytes
-
+
3ad · Proven ASM 0x02001ad4–0x02001c34: 352 bytes
-
+
3ae · SceneState_ApplyValues14And0And5 · Proven C: 16 bytes
-
+
3ae · SceneData_SelectByRuntimeSelector · Proven C: 84 bytes
-
+
3ae · get_followup_default_result · Proven C: 4 bytes
-
+
3ae · SceneData_GetTable98a0 · Proven C: 8 bytes
-
+
3ae · SceneData_SelectDataBySelectorAndFlags · Proven C: 164 bytes
-
+
3ae · FieldScene_RunScene3ae_02000144 · Proven C: 88 bytes
-
+
3ae · SceneData_SelectSecondaryDataBySelectorAndFlags · Proven C: 164 bytes
-
+
3ae · SceneDialogue_ShowLine1CF8 · Proven C: 32 bytes
-
+
3ae · FieldScene_RunScene3ae_02000260 · Proven C: 124 bytes
-
+
3ae · FieldScene_RunScene3ae_020002dc · Proven C: 76 bytes
-
+
3ae · FieldScene_RunActorThirteenFlagDialogue · Proven C: 100 bytes
-
+
3ae · FieldScene_RunOpeningAuxiliarySequence · Proven C: 364 bytes
-
+
3ae · SceneDialogue_RunActor8Message1f09 · Proven C: 32 bytes
-
+
3ae · SceneDialogue_RunActor10Message1f15 · Proven C: 32 bytes
-
+
3ae · FieldScene_RunScene3ae_020006c8 · Proven C: 276 bytes
-
+
3ae · FieldScene_RunScene3ae_020007dc · Proven C: 144 bytes
-
+
3ae · FieldScene_RunScene3ae_0200086c · Proven C: 96 bytes
-
+
3ae · FieldScene_RunScene3ae_020008cc · Proven C: 140 bytes
-
+
3ae · SceneState_SetRuntimeWord448To521AndSend303 · Proven C: 36 bytes
-
+
3ae · FieldScene_PlaceSlots14And15 · Proven C: 112 bytes
-
+
3ae · SceneActor_SetMode3AndFlagBit1 · Proven C: 54 bytes
-
+
3ae · FieldScene_RunScene3aeSequenceA · Proven C: 672 bytes
-
+
3ae · FieldScene_RunScene3aeSequenceB · Proven C: 1,728 bytes
-
+
3ae · Unknown 0x02000328–0x020004b8: 400 bytes
-
+
3ae · Unknown 0x02000958–0x02000a82: 298 bytes
-
+
3ae · Unknown 0x02000a84–0x02000ad2: 78 bytes
-
+
3ae · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3ae · Proven ASM 0x02000a82–0x02000a84: 2 bytes
-
+
3ae · Proven ASM 0x02000ad2–0x02000ad4: 2 bytes
-
+
3ae · Proven ASM 0x02000b9e–0x02000ba0: 2 bytes
-
+
3ae · Proven ASM 0x02001500–0x020016b8: 440 bytes
-
+
3af · SceneEffect_UpdateCountdownMotion · Proven C: 132 bytes
-
+
3af · SceneState_ApplyArgMode1AndReturnZero · Proven C: 14 bytes
-
+
3af · SceneActor_OscillateHeightBetweenLimits · Proven C: 92 bytes
-
+
3af · SceneActor_SetFacingFromSample · Proven C: 38 bytes
-
+
3af · SceneActor_SetWord28RandomlyOneIn40 · Proven C: 34 bytes
-
+
3af · OverlayObject_DecayFields24And28 · Proven C: 32 bytes
-
+
3af · SceneData_GetTablec994 · Proven C: 8 bytes
-
+
3af · SceneData_GetTablecb44 · Proven C: 8 bytes
-
+
3af · SceneData_GetTablecb64 · Proven C: 8 bytes
-
+
3af · SceneData_SelectTableByFlags · Proven C: 172 bytes
-
+
3af · SceneData_SelectTableByThreeFlags · Proven C: 76 bytes
-
+
3af · FieldScene_RunOpeningAuxiliarySequence · Proven C: 168 bytes
-
+
3af · FieldScene_RunScene3afSequenceA · Proven C: 168 bytes
-
+
3af · SceneDialogue_RunActor21Line · Proven C: 32 bytes
-
+
3af · FieldScene_RunScene3af_02000bb8 · Proven C: 56 bytes
-
+
3af · FieldScene_RunScene3af_02000bf0 · Proven C: 56 bytes
-
+
3af · FieldScene_RunActorAndEffectPresentationSetup · Proven C: 1,024 bytes
-
+
3af · FieldScene_RunScene3af_020010a0 · Proven C: 296 bytes
-
+
3af · FieldScene_RunScene3af_020011c8 · Proven C: 296 bytes
-
+
3af · FieldScene_RunScene3af_020012f0 · Proven C: 228 bytes
-
+
3af · SceneState_ResetWorkValuesAndStart · Proven C: 112 bytes
-
+
3af · SceneActor_PlaceActors20To27 · Proven C: 188 bytes
-
+
3af · FieldScene_RunScene3af_0200185c · Proven C: 196 bytes
-
+
3af · FieldScene_RunScene3af_02001920 · Proven C: 160 bytes
-
+
3af · FieldScene_RunScene3af_02001a98 · Proven C: 192 bytes
-
+
3af · FieldScene_RunScene3af_02001b58 · Proven C: 188 bytes
-
+
3af · FieldScene_RunScene3af_02001c14 · Proven C: 248 bytes
-
+
3af · FieldScene_RunActorTwentyDialogueSequence · Proven C: 164 bytes
-
+
+
+
+3af · FieldScene_RunScene3afSequenceB · Proven C: 816 bytes
+
3af · FieldScene_ConfigureLeadActors · Proven C: 424 bytes
-
+
3af · FieldScene_ConfigureThreeActors · Proven C: 264 bytes
-
+
3af · SceneState_FindFirstSetFlagOfGroup · Proven C: 88 bytes
-
+
3af · SceneEffect_InitSlotsEightToNineteen · Proven C: 252 bytes
-
+
3af · OverlayObject_ActivateSlotWithMode3 · Proven C: 56 bytes
-
+
3af · SceneState_FillTableDb70ByChecks · Proven C: 172 bytes
-
+
3af · SceneData_SelectTableEntryByFlagGroup · Proven C: 88 bytes
-
+
3af · SceneState_ConfigureEntries8Through19 · Proven C: 156 bytes
-
+
3af · SceneEffect_AdvanceSlotByValueBand · Proven C: 148 bytes
-
+
3af · SceneEffect_SelectSlotValueAndPosition · Proven C: 292 bytes
-
+
3af · SceneState_InitActorSlots8To19 · Proven C: 576 bytes
-
+
3af · SceneState_ApplyFiveRectsAtColumn78 · Proven C: 102 bytes
-
+
3af · DialogueLayout_ConfigureTwoRegions · Proven C: 50 bytes
-
+
3af · FieldScene_RunStepThen10 · Proven C: 18 bytes
-
+
3af · FieldScene_CallPairWith10 · Proven C: 12 bytes
-
+
3af · FieldScene_ConfigureFourActorPresentation · Proven C: 636 bytes
-
+
3af · FieldScene_RunThreeActorEncounter · Proven C: 680 bytes
-
+
3af · FieldScene_RunEncounterClosingSequence · Proven C: 744 bytes
-
+
3af · FieldScene_RunScene3af_02004218 · Proven C: 60 bytes
-
+
3af · Draft C 0x020022c0–0x020023b6: 246 bytes
-
+
3af · Draft C 0x020023b8–0x0200252a: 370 bytes
-
+
3af · Draft C 0x0200252c–0x02002618: 236 bytes
-
+
3af · Unknown 0x020000c4–0x020000ec: 40 bytes
-
+
3af · Unknown 0x0200021a–0x020002d4: 186 bytes
-
+
3af · Unknown 0x020002dc–0x02000314: 56 bytes
-
+
3af · Unknown 0x02000444–0x020004fa: 182 bytes
-
+
3af · Unknown 0x020004fc–0x02000500: 4 bytes
-
+
3af · Unknown 0x02000504–0x02000514: 16 bytes
-
+
3af · Unknown 0x02000598–0x020005b2: 26 bytes
-
+
3af · Unknown 0x02000708–0x02000714: 12 bytes
-
+
3af · Unknown 0x02000724–0x0200073e: 26 bytes
-
+
3af · Unknown 0x0200088c–0x02000898: 12 bytes
-
+
3af · Unknown 0x020008e0–0x02000936: 86 bytes
-
+
3af · Unknown 0x02000c28–0x02000c92: 106 bytes
-
+
3af · Unknown 0x02000c94–0x02000ca0: 12 bytes
-
+
3af · Unknown 0x02001444–0x02001516: 210 bytes
-
+
3af · Unknown 0x020015d0–0x0200163e: 110 bytes
-
+
3af · Unknown 0x02001640–0x020017a0: 352 bytes
-
+
3af · Unknown 0x020019c0–0x02001a98: 216 bytes
-
-
-
-3af · Unknown 0x02002284–0x020022c0: 60 bytes
-
+
3af · Unknown 0x02003268–0x02003284: 28 bytes
-
+
3af · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3af · Proven ASM 0x020000c2–0x020000c4: 2 bytes
-
+
3af · Proven ASM 0x020004fa–0x020004fc: 2 bytes
-
+
3af · Proven ASM 0x02000596–0x02000598: 2 bytes
-
+
3af · Proven ASM 0x020008be–0x020008c0: 2 bytes
-
+
3af · Proven ASM 0x02000936–0x02000938: 2 bytes
-
+
3af · Proven ASM 0x02000c92–0x02000c94: 2 bytes
-
+
3af · Proven ASM 0x0200163e–0x02001640: 2 bytes
-
+
-
-3af · Proven ASM 0x02001db0–0x02002284: 1,236 bytes
-
+
+3af · Proven ASM 0x02001db0–0x02001f90: 480 bytes
+
3af · Proven ASM 0x020023b6–0x020023b8: 2 bytes
-
+
3af · Proven ASM 0x0200252a–0x0200252c: 2 bytes
-
+
3af · Proven ASM 0x02002618–0x020029d4: 956 bytes
-
+
3af · Proven ASM 0x02002c84–0x02002ed8: 596 bytes
-
+
3af · Proven ASM 0x02002fb8–0x0200311c: 356 bytes
-
+
3af · Proven ASM 0x02003140–0x02003150: 16 bytes
-
+
3af · Proven ASM 0x020031a8–0x02003268: 192 bytes
-
+
3af · Proven ASM 0x020039b6–0x020039b8: 2 bytes
-
+
3af · Proven ASM 0x020039ea–0x020039ec: 2 bytes
-
+
3af · Proven ASM 0x020039fe–0x02003a00: 2 bytes
-
+
3af · Proven ASM 0x0200425c–0x02004464: 520 bytes
-
+
3b0 · SceneActor_SetFacingFromSample · Proven C: 38 bytes
-
+
3b0 · OverlayObject_Add160ToFields18And1c · Proven C: 26 bytes
-
+
3b0 · OverlayObject_ShrinkScaleThenStop · Proven C: 72 bytes
-
+
3b0 · SceneData_GetTable95c0 · Proven C: 8 bytes
-
+
3b0 · SceneData_GetTable9680 · Proven C: 8 bytes
-
+
3b0 · SceneData_GetTable96a0 · Proven C: 8 bytes
-
+
3b0 · SceneData_GetTable96C4 · Proven C: 8 bytes
-
+
3b0 · SceneData_GetTable988c · Proven C: 8 bytes
-
+
3b0 · FieldScene_CallHelper14d0 · Proven C: 10 bytes
-
+
3b0 · FieldScene_RunActor232SceneWhenFlag923Or922 · Proven C: 68 bytes
-
+
3b0 · FieldScene_RunScene3b0_0200040c · Proven C: 92 bytes
-
+
3b0 · FieldScene_RunScene3b0_02000468 · Proven C: 72 bytes
-
+
3b0 · FieldScene_RunScene3b0_020004b0 · Proven C: 180 bytes
-
+
3b0 · FieldScene_RunActorNinePresentationCycles · Proven C: 724 bytes
-
+
3b0 · OverlayObject_InitWithRandomFields · Proven C: 116 bytes
-
+
3b0 · FieldScene_RunPrimarySequence · Proven C: 896 bytes
-
+
+
+
+3b0 · FieldScene_RunSevenActorEnsemble · Proven C: 552 bytes
+
3b0 · SceneData_GetDifferenceOfPairSums · Proven C: 44 bytes
-
+
3b0 · SceneData_GetValueByFirstSetFlag · Proven C: 88 bytes
-
+
3b0 · Draft C 0x02000030–0x0200006e: 62 bytes
-
+
3b0 · Draft C 0x02000070–0x0200007c: 12 bytes
-
+
3b0 · Unknown 0x020000c0–0x02000180: 192 bytes
-
+
3b0 · Unknown 0x02000240–0x020002e0: 160 bytes
-
+
3b0 · Unknown 0x020003d0–0x02000404: 52 bytes
-
+
3b0 · Unknown 0x02001118–0x02001130: 24 bytes
-
+
3b0 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b0 · Proven ASM 0x0200006e–0x02000070: 2 bytes
-
+
3b0 · Proven ASM 0x020000a2–0x020000a4: 2 bytes
-
+
3b0 · Proven ASM 0x020000be–0x020000c0: 2 bytes
-
+
3b0 · Proven ASM 0x020001fa–0x020001fc: 2 bytes
-
+
3b0 · Proven ASM 0x02000564–0x020007b0: 588 bytes
-
+
-
-3b0 · Proven ASM 0x02000e78–0x02001118: 672 bytes
-
+
+3b0 · Proven ASM 0x020010a0–0x02001118: 120 bytes
+
3b0 · Proven ASM 0x020011b4–0x02001314: 352 bytes
-
+
3b1 · ResetStagedActorState · Proven C: 40 bytes
-
+
3b1 · UpdateStagedActorVerticalPosition · Proven C: 88 bytes
-
+
3b1 · StagedActor_SetAngleByKind · Proven C: 40 bytes
-
+
3b1 · StagedActor_AdvanceCounter98 · Proven C: 36 bytes
-
+
3b1 · StagedActor_CountdownUntilPositionUnset · Proven C: 48 bytes
-
+
3b1 · UpdateActorNineEffectMode · Proven C: 112 bytes
-
+
3b1 · StagedActor_SetReadyState · Proven C: 76 bytes
-
+
3b1 · SceneData_SelectTableByWord224 · Proven C: 48 bytes
-
+
3b1 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3b1 · SceneData_GetTableEB94 · Proven C: 8 bytes
-
+
3b1 · SceneData_SelectTableBySceneIndexAndFlags · Proven C: 292 bytes
-
+
3b1 · FieldScene_RunScene3b1_02000670 · Proven C: 152 bytes
-
+
3b1 · SceneDialogue_RunActor12Line · Proven C: 32 bytes
-
+
3b1 · FieldScene_RunScene3b1_02000728 · Proven C: 208 bytes
-
+
3b1 · FieldScene_RunScene3b1_020007f8 · Proven C: 176 bytes
-
+
3b1 · SceneDialogue_ShowLine1E19Or1D50 · Proven C: 68 bytes
-
+
3b1 · SceneState_RunFlagBranchedActor8Setup · Proven C: 200 bytes
-
+
3b1 · SceneDialogue_RunActorTenFlaggedDialogue · Proven C: 204 bytes
-
+
3b1 · FieldScene_RunActor11FlagDialogue · Proven C: 260 bytes
-
+
3b1 · FieldScene_RunScene3b1SequenceA · Proven C: 324 bytes
-
+
3b1 · FieldScene_RunScene3b1SequenceB · Proven C: 332 bytes
-
+
3b1 · SceneDialogue_RunActorThirteenFlag300Branch · Proven C: 204 bytes
-
+
3b1 · FieldScene_RunFlag300BranchDialogue · Proven C: 204 bytes
-
+
3b1 · FieldScene_RunActor15FlagDialogue · Proven C: 204 bytes
-
+
3b1 · FieldScene_RunActor16FlagDialogue · Proven C: 204 bytes
-
+
3b1 · FindActorNearPosition · Proven C: 76 bytes
-
+
3b1 · SceneActor_CheckBucketOffsetPoint · Proven C: 92 bytes
-
+
3b1 · SceneState_ApplyLevelFromFlags · Proven C: 72 bytes
-
+
3b1 · SceneDialogue_ShowLine1ECETo1ED0 · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_RunActor19TwoFlagLineA · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_RunActor20TwoFlagLine · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_ShowLine1ED1Or1ED2 · Proven C: 60 bytes
-
+
3b1 · SceneDialogue_RunActor22TwoFlagLine · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_RunActor23BranchedDialogue · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_RunActor24BranchedDialogue · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_RunActor25FlaggedLine · Proven C: 60 bytes
-
+
3b1 · SceneDialogue_RunActor18TwoFlagLine · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_RunActor19TwoFlagLineB · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_ShowLine1EDBTo1EDDActor20 · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_RunActor21FlaggedLine · Proven C: 60 bytes
-
+
3b1 · SceneDialogue_RunActor22BranchedDialogue · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_ShowLine1EDBTo1EDDActor23 · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_ShowLine1EDBTo1EDDActor24 · Proven C: 84 bytes
-
+
3b1 · SceneDialogue_ShowLine1EDEOr1EDF · Proven C: 60 bytes
-
+
3b1 · FieldScene_RunPrimarySequence · Proven C: 144 bytes
-
+
3b1 · FieldScene_RunScene3b1SequenceC · Proven C: 228 bytes
-
+
3b1 · FieldScene_RunScene3b1SequenceD · Proven C: 88 bytes
-
+
3b1 · FieldScene_RunFlagGatedThreeActorSetup · Proven C: 212 bytes
-
+
+
+
+3b1 · FieldScene_RunThreeActorPresentation · Proven C: 1,032 bytes
+
+
+
+3b1 · FieldScene_RunExtendedActorChoreography · Proven C: 2,204 bytes
+
+
+
+3b1 · FieldScene_RunBranchingActorPresentation · Proven C: 2,072 bytes
+
3b1 · SceneState_RunFlagGatedSetupCascade · Proven C: 336 bytes
-
+
3b1 · RunSceneSelectionChain · Proven C: 328 bytes
-
+
3b1 · SceneActor_SetFlagBit3ForActors28To35 · Proven C: 34 bytes
-
+
+
+
+3b1 · FieldScene_RunActorAvailabilityPresentation · Proven C: 1,124 bytes
+
3b1 · FieldScene_RunScene3b1_02003d10 · Proven C: 220 bytes
-
+
3b1 · FieldScene_RunScene3b1_02003dec · Proven C: 72 bytes
-
+
3b1 · FieldScene_RunScene3b1_02003e34 · Proven C: 184 bytes
-
+
3b1 · FieldScene_RunScene3b1_02003eec · Proven C: 168 bytes
-
+
3b1 · FieldScene_RunFlagBranchedSetupCascade · Proven C: 340 bytes
-
+
3b1 · FieldScene_RunScene3b1_020040e8 · Proven C: 84 bytes
-
+
3b1 · FieldScene_RunScene3b1_0200413c · Proven C: 92 bytes
-
+
3b1 · FieldScene_RunScene3b1_02004198 · Proven C: 128 bytes
-
+
3b1 · FieldScene_RunActors24And25Setup · Proven C: 60 bytes
-
+
3b1 · FieldScene_InstallFlaggedActors10To17 · Proven C: 348 bytes
-
+
3b1 · FieldScene_RunStepThen10 · Proven C: 18 bytes
-
+
3b1 · FieldScene_CallPairWith10 · Proven C: 16 bytes
-
+
3b1 · OverlayObject_SetPositionAndHeading · Proven C: 28 bytes
-
+
3b1 · ConfigureSceneMotionFlags · Proven C: 60 bytes
-
+
3b1 · SceneState_ApplyActor8FourFlags · Proven C: 52 bytes
-
+
3b1 · SceneActor_RunFirstMatchingSlot · Proven C: 48 bytes
-
+
3b1 · FieldScene_RunScene3b1_02005068 · Proven C: 124 bytes
-
+
3b1 · FieldScene_RunPositionTransferPresentation · Proven C: 528 bytes
-
+
3b1 · FieldScene_RunActors24And25SetupWithValue929 · Proven C: 88 bytes
-
+
3b1 · FieldScene_RunScene3b1_020056dc · Proven C: 164 bytes
-
+
3b1 · FieldScene_RunActors24And25SetupWithValue92a · Proven C: 108 bytes
-
+
+
+
+3b1 · FieldScene_RunExtendedFormationPresentation · Proven C: 1,116 bytes
+
3b1 · RunActorsEightAndNineMapEvent · Proven C: 108 bytes
-
+
+
+
+3b1 · FieldScene_RunFourActorProgressPresentation · Proven C: 1,024 bytes
+
3b1 · FieldScene_RunScene3b1_02006110 · Proven C: 668 bytes
-
+
3b1 · SceneState_ScanTwoArraysAndCrossNotify · Proven C: 116 bytes
-
+
3b1 · Unknown 0x0200012c–0x0200014e: 34 bytes
-
+
3b1 · Unknown 0x02000214–0x02000218: 4 bytes
-
+
3b1 · Unknown 0x0200027c–0x02000282: 6 bytes
-
+
3b1 · Unknown 0x0200037c–0x0200039a: 30 bytes
-
+
3b1 · Unknown 0x0200050a–0x02000518: 14 bytes
-
+
3b1 · Unknown 0x02000548–0x0200054c: 4 bytes
-
+
3b1 · Unknown 0x02001190–0x0200126e: 222 bytes
-
+
3b1 · Unknown 0x02001270–0x02001280: 16 bytes
-
+
3b1 · Unknown 0x02001978–0x020019ee: 118 bytes
-
+
3b1 · Unknown 0x020019f0–0x02001a08: 24 bytes
-
+
3b1 · Unknown 0x02002ff0–0x02003026: 54 bytes
-
+
3b1 · Unknown 0x020030d6–0x020030f0: 26 bytes
-
+
3b1 · Unknown 0x02003320–0x02003334: 20 bytes
-
+
3b1 · Unknown 0x02003340–0x02003344: 4 bytes
-
+
3b1 · Unknown 0x02003364–0x0200337a: 22 bytes
-
+
3b1 · Unknown 0x0200337c–0x0200351c: 416 bytes
-
+
3b1 · Unknown 0x020037d8–0x020038ac: 212 bytes
-
+
3b1 · Unknown 0x020045d0–0x02004670: 160 bytes
-
+
3b1 · Unknown 0x020047cc–0x020047e0: 20 bytes
-
+
3b1 · Unknown 0x02004862–0x0200486c: 10 bytes
-
+
3b1 · Unknown 0x020048e8–0x02004904: 28 bytes
-
+
3b1 · Unknown 0x02004cb8–0x02004cbc: 4 bytes
-
+
3b1 · Unknown 0x02004f5c–0x02004f6a: 14 bytes
-
+
3b1 · Unknown 0x02004fa8–0x02005004: 92 bytes
-
+
3b1 · Unknown 0x02005c48–0x02005c9a: 82 bytes
-
+
3b1 · Unknown 0x02005c9c–0x02005ca4: 8 bytes
-
+
3b1 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b1 · Proven ASM 0x02000282–0x02000284: 2 bytes
-
+
3b1 · Proven ASM 0x0200126e–0x02001270: 2 bytes
-
+
3b1 · Proven ASM 0x020019ee–0x020019f0: 2 bytes
-
-
-
-3b1 · Proven ASM 0x02001b34–0x02002ff0: 5,308 bytes
-
+
3b1 · Proven ASM 0x0200337a–0x0200337c: 2 bytes
-
+
3b1 · Proven ASM 0x020037d6–0x020037d8: 2 bytes
-
-
-
-3b1 · Proven ASM 0x020038ac–0x02003d10: 1,124 bytes
-
+
3b1 · Proven ASM 0x02004254–0x020045d0: 892 bytes
-
+
3b1 · Proven ASM 0x0200487e–0x02004880: 2 bytes
-
+
3b1 · Proven ASM 0x020052f4–0x02005684: 912 bytes
-
-
-
-3b1 · Proven ASM 0x020057ec–0x02005c48: 1,116 bytes
-
+
3b1 · Proven ASM 0x02005c9a–0x02005c9c: 2 bytes
-
-
-
-3b1 · Proven ASM 0x02005d10–0x02006110: 1,024 bytes
-
+
3b1 · Proven ASM 0x02006420–0x02006668: 584 bytes
-
+
3b2 · measure_fixed_point_position_distance · Proven C: 60 bytes
-
+
3b2 · find_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
3b2 · AdvanceStagedActorPair · Proven C: 384 bytes
-
+
3b2 · fill_grid_attribute_rectangle · Proven C: 100 bytes
-
+
3b2 · StopBlockedActorMotion · Proven C: 164 bytes
-
+
3b2 · FindClearActorPosition · Proven C: 404 bytes
-
+
3b2 · SetEffectOwnerMode · Proven C: 22 bytes
-
+
3b2 · SpawnMode14Effect · Proven C: 86 bytes
-
+
3b2 · SpawnMode15Effect · Proven C: 98 bytes
-
+
3b2 · OverlayObject_IntegrateVelocities · Proven C: 54 bytes
-
+
3b2 · SpawnConfiguredSceneEffect · Proven C: 472 bytes
-
+
3b2 · NoOpEffectCallback · Proven C: 2 bytes
-
+
3b2 · SelectPrimarySceneData · Proven C: 120 bytes
-
+
3b2 · GetEmptySceneData · Proven C: 4 bytes
-
+
3b2 · GetDefaultSceneData · Proven C: 8 bytes
-
+
3b2 · SelectSecondarySceneData · Proven C: 92 bytes
-
+
3b2 · AdvanceEffectMotion · Proven C: 90 bytes
-
+
3b2 · SpawnRadialEffectBurst · Proven C: 136 bytes
-
+
3b2 · InitializePrologueSceneState · Proven C: 60 bytes
-
+
3b2 · SelectTertiarySceneData · Proven C: 120 bytes
-
+
3b2 · StartScriptedSceneMessage · Proven C: 52 bytes
-
+
3b2 · FieldScene_RunPrimarySequence · Proven C: 676 bytes
-
+
3b2 · FieldScene_RunScene3b2SequenceA · Proven C: 160 bytes
-
+
3b2 · RunPrologueSceneSetup · Proven C: 22 bytes
-
+
3b2 · StartSceneScript37 · Proven C: 32 bytes
-
+
3b2 · FieldScene_RunScene3b2_02001494 · Proven C: 116 bytes
-
+
3b2 · ConfigureSceneActor11 · Proven C: 64 bytes
-
+
3b2 · ConfigureSceneActor12 · Proven C: 68 bytes
-
+
3b2 · ConfigureSceneActor13 · Proven C: 68 bytes
-
+
3b2 · ConfigureSceneActor14 · Proven C: 84 bytes
-
+
3b2 · ShowForgetEverythingMessage · Proven C: 40 bytes
-
+
3b2 · ShowHelpYouForgetMessage · Proven C: 16 bytes
-
+
3b2 · ShowDamagedDoorMessage · Proven C: 16 bytes
-
+
3b2 · ShowSaveMyLifeMessage · Proven C: 16 bytes
-
+
3b2 · FieldScene_RunScene3b2_0200167c · Proven C: 196 bytes
-
+
3b2 · RunSceneVectorTransition · Proven C: 52 bytes
-
+
3b2 · PositionSceneActorPair · Proven C: 232 bytes
-
+
3b2 · MarkGridLeftOfSceneActor · Proven C: 82 bytes
-
+
3b2 · MarkGridAboveSceneActor · Proven C: 82 bytes
-
+
3b2 · SetSceneActorModes · Proven C: 24 bytes
-
+
3b2 · InitializeEscapeSceneActors · Proven C: 150 bytes
-
+
3b2 · ActivateSceneActor8 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor10 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor11 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor12 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor13 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor15 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor17 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor18 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor9 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor19 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor14 · Proven C: 12 bytes
-
+
3b2 · ActivateSceneActor16 · Proven C: 12 bytes
-
+
3b2 · TryPushBlockingSceneActor · Proven C: 208 bytes
-
+
3b2 · CheckActorPathSouth · Proven C: 44 bytes
-
+
3b2 · CheckActorPathNorth · Proven C: 40 bytes
-
+
3b2 · CheckActorPathWest · Proven C: 44 bytes
-
+
3b2 · CheckActorPathEast · Proven C: 40 bytes
-
+
3b2 · UpdateEscapeRouteForActorPositions · Proven C: 198 bytes
-
+
3b2 · UpdateActor8ReturnRoute · Proven C: 168 bytes
-
+
3b2 · UpdateActor10RetreatRoute · Proven C: 180 bytes
-
+
3b2 · UpdateActor10AdvanceRoute · Proven C: 122 bytes
-
+
3b2 · UpdateActor11WestRoute · Proven C: 152 bytes
-
+
3b2 · UpdateActor11EastRoute · Proven C: 130 bytes
-
+
3b2 · UpdateActor12WestRoute · Proven C: 140 bytes
-
+
3b2 · UpdateActor12EastRoute · Proven C: 122 bytes
-
+
3b2 · UpdateActor13WestRoute · Proven C: 236 bytes
-
+
3b2 · UpdateActor13EastRoute · Proven C: 148 bytes
-
+
3b2 · UpdateActor15WestRoute · Proven C: 200 bytes
-
+
3b2 · UpdateActor15EastRoute · Proven C: 252 bytes
-
+
3b2 · UpdateActor17SouthRoute · Proven C: 138 bytes
-
+
3b2 · UpdateActor17NorthRoute · Proven C: 118 bytes
-
+
3b2 · AdvanceActor18AlongEscapeRoute · Proven C: 272 bytes
-
+
3b2 · AdvanceActor9AlongEscapeRoute · Proven C: 314 bytes
-
+
3b2 · RetreatActor14AlongEscapeRoute · Proven C: 204 bytes
-
+
3b2 · AdvanceActor14AlongEscapeRoute · Proven C: 190 bytes
-
+
3b2 · RetreatActor16AlongEscapeRoute · Proven C: 196 bytes
-
+
3b2 · AdvanceActor16AlongEscapeRoute · Proven C: 160 bytes
-
+
3b2 · UpdateSwayingSceneObject · Proven C: 102 bytes
-
+
3b2 · InitializeSwayingSceneObject · Proven C: 216 bytes
-
+
3b2 · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
3b2 · Draft C 0x020008a4–0x020008c0: 28 bytes
-
+
3b2 · Draft C 0x020012b4–0x02001374: 192 bytes
-
+
3b2 · Unknown 0x0200034c–0x02000474: 296 bytes
-
+
3b2 · Unknown 0x020008c0–0x020009dc: 284 bytes
-
+
3b2 · Unknown 0x020013ac–0x020013f2: 70 bytes
-
+
3b2 · Unknown 0x02001458–0x0200147a: 34 bytes
-
+
3b2 · Unknown 0x0200147c–0x02001494: 24 bytes
-
+
3b2 · Unknown 0x020024c8–0x020025ee: 294 bytes
-
+
3b2 · Unknown 0x02002700–0x02002846: 326 bytes
-
+
3b2 · Unknown 0x02002984–0x02002a96: 274 bytes
-
+
3b2 · Unknown 0x02002a98–0x02002b7e: 230 bytes
-
+
3b2 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b2 · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
3b2 · Proven ASM 0x020009f2–0x020009f4: 2 bytes
-
+
3b2 · Proven ASM 0x02000a4a–0x02000a4c: 2 bytes
-
+
3b2 · Proven ASM 0x02000aae–0x02000ab0: 2 bytes
-
+
3b2 · Proven ASM 0x02000ae6–0x02000ae8: 2 bytes
-
+
3b2 · Proven ASM 0x02000cc2–0x02000cc4: 2 bytes
-
+
3b2 · Proven ASM 0x02000dfe–0x02000e00: 2 bytes
-
+
3b2 · Proven ASM 0x0200138a–0x0200138c: 2 bytes
-
+
3b2 · Proven ASM 0x0200147a–0x0200147c: 2 bytes
-
+
3b2 · Proven ASM 0x020018ae–0x020018b0: 2 bytes
-
+
3b2 · Proven ASM 0x02001902–0x02001904: 2 bytes
-
+
3b2 · Proven ASM 0x020019b2–0x020019b4: 2 bytes
-
+
3b2 · Proven ASM 0x02001c82–0x02001c84: 2 bytes
-
+
3b2 · Proven ASM 0x02001e5a–0x02001e5c: 2 bytes
-
+
3b2 · Proven ASM 0x02001f76–0x02001f78: 2 bytes
-
+
3b2 · Proven ASM 0x0200207e–0x02002080: 2 bytes
-
+
3b2 · Proven ASM 0x0200244e–0x02002450: 2 bytes
-
+
3b2 · Proven ASM 0x020024c6–0x020024c8: 2 bytes
-
+
3b2 · Proven ASM 0x020025ee–0x020025f0: 2 bytes
-
+
3b2 · Proven ASM 0x02002846–0x02002848: 2 bytes
-
+
3b2 · Proven ASM 0x02002982–0x02002984: 2 bytes
-
+
3b2 · Proven ASM 0x02002a96–0x02002a98: 2 bytes
-
+
3b2 · Proven ASM 0x02002b7e–0x02002b80: 2 bytes
-
+
3b2 · Proven ASM 0x02002d0a–0x02002d0c: 2 bytes
-
+
3b2 · Proven ASM 0x02002ed6–0x02002ed8: 2 bytes
-
+
3b2 · Proven ASM 0x02002fb8–0x02003120: 360 bytes
-
+
3b2 · Proven ASM 0x0200312c–0x0200315a: 46 bytes
-
+
3b3 · set_effect_record_mode · Proven C: 22 bytes
-
+
3b3 · OverlayObject_PrepareObject · Proven C: 86 bytes
-
+
3b3 · OverlayObject_CreateConfiguredObject · Proven C: 98 bytes
-
+
3b3 · SpawnConfiguredEffect · Proven C: 472 bytes
-
+
3b3 · calculate_position_distance · Proven C: 60 bytes
-
+
3b3 · find_scene_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
3b3 · AdvanceStagedActorPair · Proven C: 384 bytes
-
+
3b3 · fill_scene_grid_attribute_rectangle · Proven C: 100 bytes
-
+
3b3 · stop_blocked_actor_motion · Proven C: 164 bytes
-
+
3b3 · find_clear_actor_position · Proven C: 404 bytes
-
+
3b3 · OverlayObject_WaitUntilSettledAndReset · Proven C: 48 bytes
-
+
3b3 · SceneActor_WaitHeightBelowLimit · Proven C: 52 bytes
-
+
3b3 · SceneActor_ApplyPlacementQueryAndTag · Proven C: 142 bytes
-
+
3b3 · SceneActor_ApplyPlacementQuery · Proven C: 116 bytes
-
+
3b3 · StagedActor_StepDownUntilClamp · Proven C: 80 bytes
-
+
3b3 · FieldScene_RunPrimarySequence · Proven C: 164 bytes
-
+
3b3 · FieldScene_RunScene3b3SequenceD · Proven C: 328 bytes
-
+
3b3 · FieldScene_RunScene3b3SequenceE · Proven C: 118 bytes
-
+
3b3 · SceneActor_ApplyCounterLowBitsAsMode · Proven C: 24 bytes
-
+
3b3 · SceneData_SelectTableBySceneId · Proven C: 120 bytes
-
+
3b3 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3b3 · SceneData_GetTableb014 · Proven C: 8 bytes
-
+
3b3 · SceneData_SelectDataByRuntimeSelector · Proven C: 100 bytes
-
+
3b3 · FieldScene_RunTransitionOrFallback · Proven C: 28 bytes
-
+
3b3 · SceneState_ApplyPlacementResult · Proven C: 52 bytes
-
+
3b3 · CopyAndOffsetCoordinatePreset · Proven C: 48 bytes
-
+
3b3 · FieldScene_RunScene3b3SequenceA · Proven C: 352 bytes
-
+
3b3 · FieldScene_RunFlaggedDisplayScene · Proven C: 476 bytes
-
+
3b3 · FieldScene_RunScene3b3_02001fd4 · Proven C: 94 bytes
-
+
3b3 · FieldScene_RunSingleStep · Proven C: 12 bytes
-
+
3b3 · SceneState_LinkActorZeroToWork24 · Proven C: 28 bytes
-
+
3b3 · SceneState_ClearWord24AndObjectByte62 · Proven C: 28 bytes
-
+
3b3 · SceneActor_UpdateBit1ByPositionToSlotZero · Proven C: 54 bytes
-
+
3b3 · FieldScene_RunScene3b3_020020f0 · Proven C: 84 bytes
-
+
3b3 · FieldScene_RunActor11Step · Proven C: 12 bytes
-
+
3b3 · FieldScene_RunActor12Step · Proven C: 12 bytes
-
+
3b3 · FieldScene_RunScene3b3_0200215c · Proven C: 80 bytes
-
+
3b3 · SceneEffect_SpawnRandomizedParticle · Proven C: 168 bytes
-
+
3b3 · SceneEffect_SpawnRandomEffectEveryEightFrames · Proven C: 172 bytes
-
+
3b3 · StagedActor_PlaceAtObjectTenCell · Proven C: 52 bytes
-
+
3b3 · SceneData_SelectSecondaryTableBySceneId · Proven C: 120 bytes
-
+
3b3 · FieldScene_RunScene3b3_0200263c · Proven C: 88 bytes
-
+
3b3 · OverlayObject_SetCallbackAndMode2 · Proven C: 36 bytes
-
+
3b3 · SceneActor_CheckActors8To11NearSlotZero · Proven C: 148 bytes
-
+
3b3 · Draft C 0x02000104–0x0200013c: 56 bytes
-
+
3b3 · Draft C 0x020008ec–0x02000b86: 666 bytes
-
+
3b3 · Draft C 0x02000b88–0x02000ba4: 28 bytes
-
+
3b3 · Draft C 0x02002040–0x02002080: 64 bytes
-
+
3b3 · Draft C 0x02002384–0x0200247a: 246 bytes
-
+
3b3 · Draft C 0x0200247c–0x02002498: 28 bytes
-
+
3b3 · Unknown 0x02000748–0x02000758: 16 bytes
-
+
3b3 · Unknown 0x02000ba4–0x02000d78: 468 bytes
-
+
3b3 · Unknown 0x02000ddc–0x02000ec8: 236 bytes
-
+
3b3 · Unknown 0x0200101c–0x0200106e: 82 bytes
-
+
3b3 · Unknown 0x02001070–0x02001174: 260 bytes
-
+
3b3 · Unknown 0x020015b4–0x020015cc: 24 bytes
-
+
3b3 · Unknown 0x02001938–0x02001bde: 678 bytes
-
+
3b3 · Unknown 0x02001be0–0x02001be8: 8 bytes
-
+
3b3 · Unknown 0x020021ac–0x02002226: 122 bytes
-
+
3b3 · Unknown 0x02002228–0x02002230: 8 bytes
-
+
3b3 · Unknown 0x020024cc–0x02002536: 106 bytes
-
+
3b3 · Unknown 0x02002538–0x0200253c: 4 bytes
-
+
3b3 · Unknown 0x020025f8–0x0200263a: 66 bytes
-
+
3b3 · Unknown 0x02002a04–0x02002a2c: 40 bytes
-
+
3b3 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b3 · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
3b3 · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
3b3 · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
3b3 · Proven ASM 0x02000630–0x02000748: 280 bytes
-
+
3b3 · Proven ASM 0x02000b86–0x02000b88: 2 bytes
-
+
3b3 · Proven ASM 0x02000f56–0x02000f58: 2 bytes
-
+
3b3 · Proven ASM 0x02000fcc–0x0200101c: 80 bytes
-
+
3b3 · Proven ASM 0x0200106e–0x02001070: 2 bytes
-
+
3b3 · Proven ASM 0x02001426–0x02001428: 2 bytes
-
+
3b3 · Proven ASM 0x02001578–0x020015b4: 60 bytes
-
+
3b3 · Proven ASM 0x02001bde–0x02001be0: 2 bytes
-
+
3b3 · Proven ASM 0x02001be8–0x02001fd4: 1,004 bytes
-
+
3b3 · Proven ASM 0x02002032–0x02002034: 2 bytes
-
+
3b3 · Proven ASM 0x020020ee–0x020020f0: 2 bytes
-
+
3b3 · Proven ASM 0x02002226–0x02002228: 2 bytes
-
+
3b3 · Proven ASM 0x0200247a–0x0200247c: 2 bytes
-
+
3b3 · Proven ASM 0x02002536–0x02002538: 2 bytes
-
+
3b3 · Proven ASM 0x0200253c–0x02002580: 68 bytes
-
+
3b3 · Proven ASM 0x0200263a–0x0200263c: 2 bytes
-
+
3b3 · Proven ASM 0x0200274c–0x02002a04: 696 bytes
-
+
3b3 · Proven ASM 0x02002a34–0x02002bbc: 392 bytes
-
+
3b3 · Proven ASM 0x02002bc8–0x02002bf6: 46 bytes
-
+
3b4 · measure_fixed_point_position_distance · Proven C: 60 bytes
-
+
3b4 · find_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
3b4 · StagedActor_AdvanceActorPair · Proven C: 384 bytes
-
+
3b4 · fill_grid_attribute_rectangle · Proven C: 100 bytes
-
+
3b4 · SceneActor_CheckAheadTileAndStop · Proven C: 164 bytes
-
+
3b4 · StagedActor_FindClearPosition · Proven C: 404 bytes
-
+
3b4 · SceneActor_SetActor15ModeZero · Proven C: 16 bytes
-
+
3b4 · empty_hook_b · Proven C: 4 bytes
-
+
3b4 · SceneData_SelectTableA898ByRuntimeSelector · Proven C: 84 bytes
-
+
3b4 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3b4 · SceneData_GetTablea970 · Proven C: 8 bytes
-
+
3b4 · SceneData_SelectDataByRuntimeSelector · Proven C: 84 bytes
-
+
3b4 · empty_hook_c · Proven C: 4 bytes
-
+
3b4 · SceneActor_FaceTowardActorZero · Proven C: 38 bytes
-
+
3b4 · FieldScene_RunScene3b4_02000ad0 · Proven C: 152 bytes
-
+
3b4 · FieldScene_RunScene3b4_02000b68 · Proven C: 356 bytes
-
+
3b4 · FieldScene_RunScene3b4_02000ccc · Proven C: 388 bytes
-
+
3b4 · FieldScene_RunActor15ZeroStep · Proven C: 22 bytes
-
+
3b4 · SceneData_SelectSecondaryByRuntimeSelector · Proven C: 84 bytes
-
+
3b4 · FieldScene_CallHelper3500 · Proven C: 10 bytes
-
+
3b4 · FieldScene_RunScene3b4_02000fdc · Proven C: 148 bytes
-
+
3b4 · FieldScene_RunScene3b4SequenceC · Proven C: 72 bytes
-
+
3b4 · SceneState_SetSelectorFlagWhenFacingC000 · Proven C: 78 bytes
-
+
3b4 · FieldScene_RunIndexedStep0 · Proven C: 12 bytes
-
+
3b4 · FieldScene_RunIndexedStep1 · Proven C: 12 bytes
-
+
3b4 · SceneState_ResetCounter412OnHeading4000B · Proven C: 60 bytes
-
+
3b4 · SceneState_ResetCounter412OnHeading4000 · Proven C: 60 bytes
-
+
3b4 · SceneState_ApplyRectAndPlaceSlot12 · Proven C: 64 bytes
-
+
3b4 · ConfigureAndPlaceActorTwelve · Proven C: 44 bytes
-
+
3b4 · FieldScene_RunStep8ValueEe7 · Proven C: 52 bytes
-
+
3b4 · FieldScene_RunStep9ValueEe8 · Proven C: 52 bytes
-
+
3b4 · FieldScene_RunStep10ValueEe9 · Proven C: 52 bytes
-
+
3b4 · FieldScene_RunStep11ValueEea · Proven C: 52 bytes
-
+
3b4 · FieldScene_RunStep12ValueEeb · Proven C: 52 bytes
-
+
3b4 · FieldScene_RunSupplementalSequenceOne · Proven C: 144 bytes
-
+
3b4 · FieldScene_RunScene3b4SequenceA · Proven C: 144 bytes
-
+
3b4 · SceneActor_TrackOriginColumnForSlot · Proven C: 160 bytes
-
+
3b4 · FieldScene_RunLateIndexedStep0 · Proven C: 12 bytes
-
+
3b4 · FieldScene_RunLateIndexedStep1 · Proven C: 12 bytes
-
+
3b4 · FieldScene_RunLateIndexedStep2 · Proven C: 12 bytes
-
+
3b4 · FieldScene_RunPrimarySequence · Proven C: 164 bytes
-
+
3b4 · FieldScene_RunScene3b4SequenceB · Proven C: 136 bytes
-
+
3b4 · SetBlendAlphaCoefficients · Proven C: 16 bytes
-
+
3b4 · SceneEffect_SetBlendAlpha0607 · Proven C: 16 bytes
-
+
3b4 · FieldScene_DispatchBySlotZeroFacing · Proven C: 160 bytes
-
+
3b4 · FieldScene_NoOpCallback · Proven C: 2 bytes
-
+
3b4 · SceneActor_MarkSlot13AndSetFlag200 · Proven C: 72 bytes
-
+
3b4 · SceneState_BranchOnActorZeroFacing · Proven C: 28 bytes
-
+
3b4 · SceneState_ApplyFourRectsAndSetActor8Byte85 · Proven C: 96 bytes
-
+
3b4 · ActorPresentation_SetSceneCell58AndMarkActorEight · Proven C: 40 bytes
-
+
3b4 · SceneState_ApplyRectAndSetActor8Byte35 · Proven C: 42 bytes
-
+
3b4 · SceneState_ApplyRectAndSetSlotEightByte35 · Proven C: 42 bytes
-
+
3b4 · SceneActor_BranchOnSlotZeroAtTile38 · Proven C: 100 bytes
-
+
3b4 · FieldScene_RunScene3b4_02001bc4 · Proven C: 100 bytes
-
+
3b4 · SceneActor_RunWhenActor9AtTile45x43 · Proven C: 52 bytes
-
+
3b4 · FieldScene_RunTwoStepSequence · Proven C: 14 bytes
-
+
3b4 · SceneState_ApplyTwoRectsAtRow56 · Proven C: 50 bytes
-
+
3b4 · SceneState_ApplyRectAndClearSlotTenByte85 · Proven C: 42 bytes
-
+
3b4 · SceneState_ApplyRectAndClearActor10Byte85 · Proven C: 42 bytes
-
+
3b4 · FieldScene_RunThreeCallSequenceB · Proven C: 18 bytes
-
+
3b4 · FieldScene_DispatchByActorZeroFacing · Proven C: 38 bytes
-
+
3b4 · SceneState_ApplyFourRectsAt48_55 · Proven C: 86 bytes
-
+
3b4 · ActorPresentation_RepaintCellsAtActorsElevenAndTwelve · Proven C: 92 bytes
-
+
3b4 · FieldScene_RunSingleStep · Proven C: 10 bytes
-
+
3b4 · FieldScene_RunThreeCallSequence · Proven C: 18 bytes
-
+
3b4 · FieldScene_CallHelper3c70 · Proven C: 10 bytes
-
+
3b4 · FieldScene_RunThreeStepSequence · Proven C: 18 bytes
-
+
3b4 · ActorPresentation_PlaceActorFourteenOnActorNine · Proven C: 42 bytes
-
+
3b4 · SceneActor_PassActorNinePositionWithId107 · Proven C: 28 bytes
-
+
3b4 · SceneActor_PublishMarkerBySlotZeroHeight · Proven C: 156 bytes
-
+
3b4 · FieldScene_RunScene3b4_02002188 · Proven C: 264 bytes
-
+
3b4 · FieldScene_RunScene3b4_02002290 · Proven C: 164 bytes
-
+
3b4 · FieldScene_RunScene3b4_02002334 · Proven C: 308 bytes
-
+
3b4 · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
3b4 · Draft C 0x020008a4–0x020008c0: 28 bytes
-
+
3b4 · Draft C 0x02001308–0x0200138c: 132 bytes
-
+
3b4 · Draft C 0x02001cf8–0x02001d64: 108 bytes
-
+
3b4 · Unknown 0x0200034c–0x02000474: 296 bytes
-
+
3b4 · Unknown 0x020008c0–0x020009dc: 284 bytes
-
+
3b4 · Unknown 0x02000e50–0x02000ec8: 120 bytes
-
+
3b4 · Unknown 0x02000f40–0x02000fd6: 150 bytes
-
+
3b4 · Unknown 0x02000fd8–0x02000fdc: 4 bytes
-
+
3b4 · Unknown 0x0200141c–0x0200149c: 128 bytes
-
+
3b4 · Unknown 0x02001694–0x02001796: 258 bytes
-
+
3b4 · Unknown 0x02001798–0x02001838: 160 bytes
-
+
3b4 · Unknown 0x02001ac8–0x02001b60: 152 bytes
-
+
3b4 · Unknown 0x02001f78–0x02001ffa: 130 bytes
-
+
3b4 · Unknown 0x020020a8–0x020020b4: 12 bytes
-
+
3b4 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b4 · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
3b4 · Proven ASM 0x02000ace–0x02000ad0: 2 bytes
-
+
3b4 · Proven ASM 0x02000ede–0x02000ee0: 2 bytes
-
+
3b4 · Proven ASM 0x02000f3e–0x02000f40: 2 bytes
-
+
3b4 · Proven ASM 0x02000fd6–0x02000fd8: 2 bytes
-
+
3b4 · Proven ASM 0x02001106–0x02001108: 2 bytes
-
+
3b4 · Proven ASM 0x02001796–0x02001798: 2 bytes
-
+
3b4 · Proven ASM 0x02001982–0x02001984: 2 bytes
-
+
3b4 · Proven ASM 0x02001a9a–0x02001a9c: 2 bytes
-
+
3b4 · Proven ASM 0x02001ac6–0x02001ac8: 2 bytes
-
+
3b4 · Proven ASM 0x02001c6a–0x02001c6c: 2 bytes
-
+
3b4 · Proven ASM 0x02001c9e–0x02001ca0: 2 bytes
-
+
3b4 · Proven ASM 0x02001cca–0x02001ccc: 2 bytes
-
+
3b4 · Proven ASM 0x02001cf6–0x02001cf8: 2 bytes
-
+
3b4 · Proven ASM 0x02001d76–0x02001d78: 2 bytes
-
+
3b4 · Proven ASM 0x02001d9e–0x02001da0: 2 bytes
-
+
3b4 · Proven ASM 0x02001df6–0x02001df8: 2 bytes
-
+
3b4 · Proven ASM 0x02001e5e–0x02001e60: 2 bytes
-
+
3b4 · Proven ASM 0x02001e72–0x02001e74: 2 bytes
-
+
3b4 · Proven ASM 0x02001e7e–0x02001e80: 2 bytes
-
+
3b4 · Proven ASM 0x02001e92–0x02001e94: 2 bytes
-
+
3b4 · Proven ASM 0x02001ebe–0x02001ec0: 2 bytes
-
+
3b4 · Proven ASM 0x020020c4–0x02002188: 196 bytes
-
+
3b4 · Proven ASM 0x02002468–0x02002608: 416 bytes
-
+
3b4 · Proven ASM 0x02002614–0x02002642: 46 bytes
-
+
3b5 · SceneState_SetValues31_2_4 · Proven C: 16 bytes
-
+
3b5 · SceneActor_GetPositionDistance · Proven C: 60 bytes
-
+
3b5 · SceneActor_UpdatePartnerProximity · Proven C: 152 bytes
-
+
3b5 · SceneData_GetTable9060 · Proven C: 8 bytes
-
+
3b5 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3b5 · SceneData_GetTable91f8 · Proven C: 8 bytes
-
+
3b5 · SceneData_GetTable9238 · Proven C: 8 bytes
-
+
3b5 · FieldScene_RunScene3b5_02000224 · Proven C: 60 bytes
-
+
3b5 · ConfigureAndPlaceActorOneHundredTwo · Proven C: 44 bytes
-
+
3b5 · ConfigureAndHideActorOneHundredTwo · Proven C: 44 bytes
-
+
3b5 · SceneDialogue_RunMessage0e36 · Proven C: 28 bytes
-
+
3b5 · SceneDialogue_RunMessage0e37 · Proven C: 28 bytes
-
+
3b5 · FieldScene_RunSupplementalSequenceTwo · Proven C: 224 bytes
-
+
3b5 · FieldScene_RunScene3b5SequenceB · Proven C: 224 bytes
-
+
3b5 · SceneData_SelectTable94a8ByFlags · Proven C: 56 bytes
-
+
3b5 · SceneDialogue_RunActor15Message1f92 · Proven C: 32 bytes
-
+
3b5 · SceneDialogue_RunActor24Message1f9d · Proven C: 32 bytes
-
+
3b5 · FieldScene_RunScene3b5_02000528 · Proven C: 64 bytes
-
+
3b5 · FieldScene_RunScene3b5_02000568 · Proven C: 52 bytes
-
+
3b5 · SceneDialogue_RunActor27Message1fa3 · Proven C: 32 bytes
-
+
3b5 · SceneDialogue_RunActor24Message235f · Proven C: 32 bytes
-
+
3b5 · FieldScene_RunScene3b5_020005dc · Proven C: 104 bytes
-
+
3b5 · SceneActor_CopyPlayerModeToActor · Proven C: 62 bytes
-
+
3b5 · FieldScene_RunSupplementalSequenceOne · Proven C: 364 bytes
-
+
3b5 · FieldScene_RunScene3b5SequenceA · Proven C: 192 bytes
-
+
3b5 · SceneState_SetValue30ThenCall · Proven C: 16 bytes
-
+
3b5 · SceneState_PassWorkHalfword16C · Proven C: 28 bytes
-
+
3b5 · FieldScene_RunPrimarySequence · Proven C: 808 bytes
-
+
3b5 · FieldScene_ResetActor9AndDrawTiles · Proven C: 84 bytes
-
+
3b5 · Unknown 0x02000644–0x020006de: 154 bytes
-
+
3b5 · Unknown 0x020006e0–0x020006e8: 8 bytes
-
+
3b5 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b5 · Proven ASM 0x0200007c–0x02000170: 244 bytes
-
+
3b5 · Proven ASM 0x020006de–0x020006e0: 2 bytes
-
+
3b5 · Proven ASM 0x02000726–0x02000728: 2 bytes
-
+
3b5 · Proven ASM 0x02000cfc–0x02000e6c: 368 bytes
-
+
3b5 · Proven ASM 0x02000e78–0x02000ea6: 46 bytes
-
+
3b6 · SceneData_GetTable8BB4 · Proven C: 8 bytes
-
+
3b6 · get_default_result · Proven C: 4 bytes
-
+
3b6 · SceneData_GetTable8dac · Proven C: 8 bytes
-
+
3b6 · SceneData_SelectTable8e00ByFlag · Proven C: 32 bytes
-
+
3b6 · SceneData_SelectTable9310ByFlags · Proven C: 56 bytes
-
+
3b6 · SceneState_SetWork1c0AndRun · Proven C: 36 bytes
-
+
3b6 · FieldScene_RunPrimarySequence · Proven C: 124 bytes
-
+
3b6 · FieldScene_RunScene3b6SequenceA · Proven C: 492 bytes
-
+
3b6 · FieldScene_RunActorsThirtyOneToThirtyThreeChoreography · Proven C: 180 bytes
-
+
3b6 · SceneDialogue_RunMessage239eStep · Proven C: 80 bytes
-
+
3b6 · SceneDialogue_RunActorLine23a1 · Proven C: 36 bytes
-
+
3b6 · SceneDialogue_RunMessage1FBBStep · Proven C: 80 bytes
-
+
3b6 · FieldScene_RunScene3b6_020007b0 · Proven C: 172 bytes
-
+
3b6 · SceneDialogue_RunActor25FlaggedLine · Proven C: 60 bytes
-
+
3b6 · FieldScene_RunScene3b6_02000898 · Proven C: 52 bytes
-
+
3b6 · SceneDialogue_RunMessage23acStep · Proven C: 80 bytes
-
+
3b6 · Unknown 0x020003dc–0x0200053a: 350 bytes
-
+
3b6 · Unknown 0x0200053c–0x020005d2: 150 bytes
-
+
3b6 · Unknown 0x020005d4–0x0200065a: 134 bytes
-
+
3b6 · Unknown 0x0200065c–0x020006a6: 74 bytes
-
+
3b6 · Unknown 0x020006a8–0x020006de: 54 bytes
-
+
3b6 · Unknown 0x020006e0–0x020006ec: 12 bytes
-
+
3b6 · Unknown 0x0200091c–0x0200098a: 110 bytes
-
+
3b6 · Unknown 0x0200098c–0x02000998: 12 bytes
-
+
3b6 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b6 · Proven ASM 0x0200053a–0x0200053c: 2 bytes
-
+
3b6 · Proven ASM 0x020005d2–0x020005d4: 2 bytes
-
+
3b6 · Proven ASM 0x0200065a–0x0200065c: 2 bytes
-
+
3b6 · Proven ASM 0x020006a6–0x020006a8: 2 bytes
-
+
3b6 · Proven ASM 0x020006de–0x020006e0: 2 bytes
-
+
3b6 · Proven ASM 0x0200098a–0x0200098c: 2 bytes
-
+
3b6 · Proven ASM 0x02000998–0x02000a90: 248 bytes
-
+
3b7 · SceneData_GetTable9A08 · Proven C: 8 bytes
-
+
3b7 · get_default_result · Proven C: 4 bytes
-
+
3b7 · SceneData_GetTable9ac8 · Proven C: 8 bytes
-
+
3b7 · SceneData_SelectTable9cfcByState · Proven C: 48 bytes
-
+
3b7 · FieldScene_RunActorCueBranch · Proven C: 72 bytes
-
+
3b7 · FieldScene_RunPromptDialogueE19 · Proven C: 72 bytes
-
+
3b7 · SceneDialogue_RunMessage0e34 · Proven C: 36 bytes
-
+
3b7 · SceneDialogue_RunMessage0e35 · Proven C: 36 bytes
-
+
3b7 · FieldScene_RunIndexedStep0 · Proven C: 12 bytes
-
+
3b7 · SceneData_SelectTable9e1cByState · Proven C: 48 bytes
-
+
3b7 · SceneDialogue_PickTopicVariantId · Proven C: 96 bytes
-
+
3b7 · OverlayObject_SetField54 · Proven C: 24 bytes
-
+
3b7 · SceneState_InitFourActorRecordsAndInstallTask · Proven C: 148 bytes
-
+
3b7 · Draft C 0x02000e5c–0x02001072: 534 bytes
-
+
3b7 · Draft C 0x02001074–0x0200136a: 758 bytes
-
+
3b7 · Draft C 0x0200136c–0x020016a8: 828 bytes
-
+
3b7 · Unknown 0x02000104–0x02000154: 80 bytes
-
+
3b7 · Unknown 0x02000dd0–0x02000e1e: 78 bytes
-
+
3b7 · Unknown 0x02000e20–0x02000e44: 36 bytes
-
+
3b7 · Unknown 0x0200173c–0x0200182e: 242 bytes
-
+
3b7 · Unknown 0x02001830–0x02001854: 36 bytes
-
+
3b7 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b7 · Proven ASM 0x020001d8–0x02000d70: 2,968 bytes
-
+
3b7 · Proven ASM 0x02000e1e–0x02000e20: 2 bytes
-
+
3b7 · Proven ASM 0x02001072–0x02001074: 2 bytes
-
+
3b7 · Proven ASM 0x0200136a–0x0200136c: 2 bytes
-
+
3b7 · Proven ASM 0x0200182e–0x02001830: 2 bytes
-
+
3b7 · Proven ASM 0x02001864–0x020019cc: 360 bytes
-
+
3b7 · Proven ASM 0x020019d8–0x02001a06: 46 bytes
-
+
3b8 · SceneData_SelectTablec614ByState · Proven C: 48 bytes
-
+
3b8 · SceneData_GetTableca7c · Proven C: 8 bytes
-
+
3b8 · SceneData_GetTableca8c · Proven C: 8 bytes
-
+
3b8 · SceneData_SelectDataBySelectorAndFlags · Proven C: 88 bytes
-
+
3b8 · FieldScene_RunBranchedSteps1FF1 · Proven C: 64 bytes
-
+
3b8 · RunOpeningAuxiliarySequence · Proven C: 348 bytes
-
+
3b8 · FieldScene_RunScene3b8_02000264 · Proven C: 228 bytes
-
+
3b8 · FieldScene_RunBranchedSteps2006 · Proven C: 104 bytes
-
+
3b8 · RunMiddleAuxiliarySequence · Proven C: 236 bytes
-
+
3b8 · FieldScene_RunScene3b8_0200049c · Proven C: 136 bytes
-
+
3b8 · SceneDialogue_ShowMessage22a8Branch · Proven C: 64 bytes
-
+
3b8 · SceneDialogue_RunChoiceSequence22ab · Proven C: 64 bytes
-
+
3b8 · SceneDialogue_RunChoiceSequence2352 · Proven C: 208 bytes
-
+
3b8 · RunPrimaryEffectSequence · Proven C: 2,032 bytes
-
+
3b8 · FieldScene_RunMainCutsceneSequence · Proven C: 7,468 bytes
-
+
3b8 · FieldScene_RunScene3b8_02003d40 · Proven C: 184 bytes
-
+
3b8 · RunSceneEffectSetup · Proven C: 72 bytes
-
+
3b8 · RunSupplementalSequenceOne · Proven C: 324 bytes
-
+
3b8 · SceneDialogue_ShowLine2239Or223A · Proven C: 64 bytes
-
+
3b8 · SceneDialogue_ShowMessage22a3Branch · Proven C: 72 bytes
-
+
3b8 · FieldScene_RunStepWithValue29e0 · Proven C: 40 bytes
-
+
3b8 · SceneData_SelectTableD004ByStateAndFlags · Proven C: 128 bytes
-
+
3b8 · Unknown 0x02000674–0x020006da: 102 bytes
-
+
3b8 · Unknown 0x02000adc–0x02000b3e: 98 bytes
-
+
3b8 · Unknown 0x02000b40–0x02000ff8: 1,208 bytes
-
+
3b8 · Unknown 0x020017e8–0x02001a8a: 674 bytes
-
+
3b8 · Unknown 0x02001a8c–0x02001d7a: 750 bytes
-
+
3b8 · Unknown 0x02001d7c–0x02002014: 664 bytes
-
+
3b8 · Unknown 0x020040b4–0x02004340: 652 bytes
-
+
3b8 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b8 · Proven ASM 0x020006da–0x02000adc: 1,026 bytes
-
+
3b8 · Proven ASM 0x02000b3e–0x02000b40: 2 bytes
-
+
3b8 · Proven ASM 0x02001a8a–0x02001a8c: 2 bytes
-
+
3b8 · Proven ASM 0x02001d7a–0x02001d7c: 2 bytes
-
+
3b8 · Proven ASM 0x02004340–0x02004550: 528 bytes
-
+
3b9 · SceneData_SelectTableBySceneId · Proven C: 64 bytes
-
+
3b9 · get_secondary_default_result · Proven C: 4 bytes
-
+
3b9 · SceneData_GetTableB2bc · Proven C: 8 bytes
-
+
3b9 · SceneData_SelectDataBySelectorAndSubstate · Proven C: 104 bytes
-
+
3b9 · SceneDialogue_RunActor10MessageByFlag962 · Proven C: 68 bytes
-
+
3b9 · SceneDialogue_RunActor13MessageByFlag962 · Proven C: 80 bytes
-
+
3b9 · FieldScene_RunScene3b9_02000334 · Proven C: 104 bytes
-
+
3b9 · FieldScene_RunScene3b9_0200039c · Proven C: 204 bytes
-
+
3b9 · FieldScene_RunScene3b9_02000468 · Proven C: 96 bytes
-
+
3b9 · FieldScene_RunScene3b9_020004c8 · Proven C: 68 bytes
-
+
3b9 · SceneDialogue_ShowLine2118WithActor15Steps · Proven C: 80 bytes
-
+
3b9 · FieldScene_RunScene3b9_0200055c · Proven C: 148 bytes
-
+
3b9 · FieldScene_RunActorSeventeenDialogueSteps · Proven C: 88 bytes
-
+
3b9 · FieldScene_RunScene3b9_02000648 · Proven C: 116 bytes
-
+
3b9 · SceneState_ApplyFlags565And564 · Proven C: 24 bytes
-
+
3b9 · FieldScene_RunConditionalSceneSetup · Proven C: 212 bytes
-
+
3b9 · SceneState_SetRuntimeWord448To513 · Proven C: 124 bytes
-
+
3b9 · FieldScene_RunMiddleSequence · Proven C: 908 bytes
-
+
3b9 · SceneState_DispatchByStatus448 · Proven C: 56 bytes
-
+
3b9 · FieldScene_DispatchBySelector · Proven C: 508 bytes
-
+
3b9 · FieldScene_CallPairWith10 · Proven C: 20 bytes
-
+
3b9 · SceneState_ForwardMaskedHalfwordWith10 · Proven C: 16 bytes
-
+
3b9 · SceneState_ApplyRectsByFlags2384And962 · Proven C: 104 bytes
-
+
+
+
+3b9 · FieldScene_BuildActorPresentationSequence · Proven C: 1,804 bytes
+
3b9 · FieldScene_RunScene3b9_020023e0 · Proven C: 248 bytes
-
+
3b9 · FieldScene_RunScene3b9_020024d8 · Proven C: 280 bytes
-
+
3b9 · FieldScene_RunScene3b9_020025f0 · Proven C: 120 bytes
-
+
3b9 · FieldScene_RunScene3b9_02002668 · Proven C: 440 bytes
-
+
3b9 · FieldScene_RunScene3b9_02002820 · Proven C: 228 bytes
-
+
3b9 · FieldScene_RunScene3b9_02002904 · Proven C: 96 bytes
-
+
3b9 · FieldScene_RunScene3b9_02002964 · Proven C: 440 bytes
-
+
3b9 · ActorPresentation_SetActorsTwelveToEighteen · Proven C: 112 bytes
-
+
3b9 · Unknown 0x0200007c–0x020000ac: 48 bytes
-
+
3b9 · Unknown 0x020001c8–0x020001fa: 50 bytes
-
+
3b9 · Unknown 0x020001fc–0x02000208: 12 bytes
-
+
3b9 · Unknown 0x0200020c–0x02000210: 4 bytes
-
+
3b9 · Unknown 0x02000212–0x02000214: 2 bytes
-
+
3b9 · Unknown 0x02000216–0x02000218: 2 bytes
-
+
3b9 · Unknown 0x0200021a–0x0200021c: 2 bytes
-
+
3b9 · Unknown 0x0200021e–0x02000224: 6 bytes
-
+
3b9 · Unknown 0x02000226–0x0200022c: 6 bytes
-
+
3b9 · Unknown 0x0200022e–0x02000230: 2 bytes
-
+
3b9 · Unknown 0x02000232–0x02000234: 2 bytes
-
+
3b9 · Unknown 0x02000236–0x02000238: 2 bytes
-
+
3b9 · Unknown 0x020006bc–0x02000706: 74 bytes
-
+
3b9 · Unknown 0x02000ab8–0x02000dae: 758 bytes
-
+
3b9 · Unknown 0x02000db0–0x02000dcc: 28 bytes
-
+
3b9 · Unknown 0x020015ec–0x0200160c: 32 bytes
-
-
-
-3b9 · Unknown 0x020023c8–0x020023e0: 24 bytes
-
+
3b9 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3b9 · Proven ASM 0x020001fa–0x020001fc: 2 bytes
-
+
3b9 · Proven ASM 0x02000706–0x02000ab8: 946 bytes
-
+
3b9 · Proven ASM 0x02000dae–0x02000db0: 2 bytes
-
+
3b9 · Proven ASM 0x02000dcc–0x020011ac: 992 bytes
-
+
3b9 · Proven ASM 0x02001298–0x020015ec: 852 bytes
-
-
-
-3b9 · Proven ASM 0x02001cd4–0x020023c8: 1,780 bytes
-
+
3b9 · Proven ASM 0x02002b8c–0x02002d3c: 432 bytes
-
+
3ba · SceneData_GetTableC194 · Proven C: 8 bytes
-
+
3ba · get_default_result · Proven C: 4 bytes
-
+
3ba · SceneData_GetTablec1dc · Proven C: 8 bytes
-
+
3ba · SceneData_GetTablec1f4 · Proven C: 8 bytes
-
+
3ba · FieldScene_RunOpeningAuxiliarySequence · Proven C: 232 bytes
-
+
3ba · SceneState_ResetCounterAndStartTask · Proven C: 36 bytes
-
+
3ba · SceneState_SetMode66AndPassOpeningSequence · Proven C: 32 bytes
-
+
3ba · SceneState_WaitUntilWordC41cIs22 · Proven C: 48 bytes
-
+
3ba · SceneState_ApplyRectsForActorsNineAndTen · Proven C: 142 bytes
-
+
3ba · FieldScene_RunTwoCallSequence · Proven C: 14 bytes
-
+
3ba · SceneState_ApplyRectAndSend303 · Proven C: 40 bytes
-
+
3ba · FieldScene_RunScene3ba_02000270 · Proven C: 204 bytes
-
+
3ba · StagedActor_PlacePairAtOffsetAndRun · Proven C: 240 bytes
-
+
3ba · SceneActor_ShiftActorSeventeenByLeaderRow · Proven C: 100 bytes
-
+
3ba · SceneActor_ShiftActorEighteenByInputAndLeaderColumn · Proven C: 176 bytes
-
+
3ba · SceneState_ApplyValue768 · Proven C: 14 bytes
-
+
3ba · FieldScene_RunBranchedStep · Proven C: 24 bytes
-
+
3ba · SceneData_GetTablec420 · Proven C: 8 bytes
-
+
3ba · FieldScene_RunScene3ba_02000974 · Proven C: 154 bytes
-
+
3ba · SceneActor_MarkObjectAtTiles94To95 · Proven C: 44 bytes
-
+
3ba · FieldScene_RunCommandSequence · Proven C: 1,116 bytes
-
+
+
+
+3ba · FieldScene_RunMapEntranceCoordinator · Proven C: 464 bytes
+
3ba · FieldScene_RunScene3ba_020015e0 · Proven C: 268 bytes
-
+
+
+
+3ba · FieldScene_RunSceneFourCoordinator · Proven C: 428 bytes
+
3ba · SceneActor_PlaceSlots1To3FromWork · Proven C: 120 bytes
-
+
3ba · SceneState_SetStateHalfword386To99WhenMatched · Proven C: 72 bytes
-
+
3ba · FieldScene_RunNearestActor165Scene · Proven C: 308 bytes
-
+
3ba · RunPartyCountInteraction · Proven C: 164 bytes
-
+
3ba · FieldScene_RunSixSteps380To3A8 · Proven C: 66 bytes
-
+
3ba · SceneDialogue_RunFlagGatedPromptInteraction · Proven C: 188 bytes
-
+
3ba · SceneState_SendIdBySceneId · Proven C: 92 bytes
-
+
3ba · FieldScene_RunMiddleSequence · Proven C: 620 bytes
-
+
3ba · SceneActor_ApplyValueAndMatchingSlots · Proven C: 60 bytes
-
+
3ba · SceneData_SelectBlockAndResetCounters · Proven C: 142 bytes
-
+
3ba · FieldScene_RunTwoArmSequence · Proven C: 268 bytes
-
+
+
+
+3ba · FieldScene_RunLateSequence · Proven C: 204 bytes
+
3ba · OverlayObject_ResetMotionFields · Proven C: 32 bytes
-
+
3ba · SceneState_InitHalfwordC6a6Once · Proven C: 32 bytes
-
+
3ba · SceneState_StoreParamsAndInitTable · Proven C: 98 bytes
-
+
3ba · SceneState_InitTableWordsAndLoad3200 · Proven C: 92 bytes
-
+
3ba · SceneState_ReleaseTableAndResetC6a6 · Proven C: 40 bytes
-
+
3ba · SceneActor_StartMode5MoveToTile · Proven C: 64 bytes
-
+
3ba · OverlayObject_PlaceWithScale14000 · Proven C: 78 bytes
-
+
3ba · Text_WriteU32AsHex · Proven C: 44 bytes
-
+
3ba · no_op_callback_f · Proven C: 4 bytes
-
+
3ba · SceneState_SetHalfword1000To9 · Proven C: 12 bytes
-
+
3ba · SceneState_WaitUntilWord1000IsNine · Proven C: 36 bytes
-
+
3ba · SceneEffect_SpawnKind285AtRandomChance · Proven C: 148 bytes
-
+
3ba · SceneActor_PlaceLinkedActorAbove · Proven C: 84 bytes
-
+
3ba · FieldScene_RunFlag211ApproachScene · Proven C: 276 bytes
-
+
3ba · FieldScene_BuildSceneDescriptorAndInstallTask · Proven C: 232 bytes
-
+
3ba · SceneState_InitControlWhenFlag109Clear · Proven C: 84 bytes
-
+
3ba · SceneState_SetStateHalfword220 · Proven C: 16 bytes
-
+
3ba · SceneActor_FindSlotAtTilePosition · Proven C: 72 bytes
-
+
3ba · StagedActor_PushActorAhead · Proven C: 360 bytes
-
+
3ba · SceneActor_FindOccupantAheadOfSubject · Proven C: 160 bytes
-
-
-
-3ba · Draft C 0x02002844–0x020028fe: 186 bytes
-
-
-
-3ba · Draft C 0x02002900–0x02002b16: 534 bytes
-
-
-
-3ba · Draft C 0x02002b18–0x02002baa: 146 bytes
-
+
3ba · Unknown 0x02000540–0x02000830: 752 bytes
-
+
3ba · Unknown 0x02000840–0x02000954: 276 bytes
-
+
3ba · Unknown 0x02000a3c–0x02000c5a: 542 bytes
-
+
3ba · Unknown 0x02000d74–0x02000d86: 18 bytes
-
+
3ba · Unknown 0x02000d88–0x02000dac: 36 bytes
-
+
3ba · Unknown 0x020013e4–0x020015ca: 486 bytes
-
+
3ba · Unknown 0x020015cc–0x020015e0: 20 bytes
-
+
3ba · Unknown 0x02001910–0x02001982: 114 bytes
-
+
3ba · Unknown 0x02001984–0x020019e0: 92 bytes
-
+
3ba · Unknown 0x02001b5c–0x02001c7c: 288 bytes
-
+
3ba · Unknown 0x02002bec–0x02002caa: 190 bytes
-
+
3ba · Unknown 0x02002cac–0x02002d28: 124 bytes
-
+
3ba · Unknown 0x020031c0–0x02003312: 338 bytes
-
+
3ba · Unknown 0x02003314–0x0200338a: 118 bytes
-
+
3ba · Unknown 0x0200338c–0x020033a0: 20 bytes
-
+
+
+
+3ba · Draft ASM 0x02002910–0x02002b16: 518 bytes
+
+
+
+3ba · Draft ASM 0x02002b18–0x02002baa: 146 bytes
+
3ba · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3ba · Proven ASM 0x02000236–0x02000238: 2 bytes
-
+
3ba · Proven ASM 0x02000246–0x02000248: 2 bytes
-
+
3ba · Proven ASM 0x0200083e–0x02000840: 2 bytes
-
+
3ba · Proven ASM 0x02000a0e–0x02000a10: 2 bytes
-
+
3ba · Proven ASM 0x02000d86–0x02000d88: 2 bytes
-
-
-
-3ba · Proven ASM 0x02001214–0x020013e4: 464 bytes
-
+
3ba · Proven ASM 0x020015ca–0x020015cc: 2 bytes
-
-
-
-3ba · Proven ASM 0x020016ec–0x02001898: 428 bytes
-
+
3ba · Proven ASM 0x02001982–0x02001984: 2 bytes
-
+
3ba · Proven ASM 0x02001d62–0x02001d64: 2 bytes
-
+
3ba · Proven ASM 0x02002124–0x020026a8: 1,412 bytes
-
+
3ba · Proven ASM 0x02002736–0x02002738: 2 bytes
-
-
-
-3ba · Proven ASM 0x020028fe–0x02002900: 2 bytes
-
+
3ba · Proven ASM 0x02002b16–0x02002b18: 2 bytes
-
+
3ba · Proven ASM 0x02002baa–0x02002bac: 2 bytes
-
+
3ba · Proven ASM 0x02002caa–0x02002cac: 2 bytes
-
+
3ba · Proven ASM 0x02002d8a–0x02002d8c: 2 bytes
-
+
3ba · Proven ASM 0x02002e9e–0x02002f64: 198 bytes
-
+
3ba · Proven ASM 0x02003312–0x02003314: 2 bytes
-
+
3ba · Proven ASM 0x0200338a–0x0200338c: 2 bytes
-
+
3ba · Proven ASM 0x020033a0–0x02003764: 964 bytes
-
+
3ba · Proven ASM 0x02003b08–0x02003e08: 768 bytes
-
+
3ba · Proven ASM 0x02003e1c–0x02003e42: 38 bytes
-
+
3bb · SceneData_GetTableC414 · Proven C: 8 bytes
-
+
3bb · get_default_result · Proven C: 4 bytes
-
+
3bb · SceneData_GetTableC474 · Proven C: 8 bytes
-
+
3bb · SceneData_GetTableC48c · Proven C: 8 bytes
-
+
3bb · no_op_handler · Proven C: 2 bytes
-
+
3bb · FieldScene_RunSingleStep · Proven C: 10 bytes
-
+
3bb · SceneState_ConfigureRegionByActorElevenColumn · Proven C: 84 bytes
-
+
3bb · FieldScene_RunTwoStepSequence · Proven C: 14 bytes
-
+
3bb · SceneState_StoreSlotTileXToWork832To848 · Proven C: 142 bytes
-
+
3bb · SceneState_SetWorkByte35 · Proven C: 16 bytes
-
+
3bb · SceneState_SetFlag331AndConfigureRegion46_17 · Proven C: 52 bytes
-
+
3bb · FieldScene_SetFlag332AndDrawTiles · Proven C: 52 bytes
-
+
3bb · FieldScene_SetFlag333AndDrawTiles · Proven C: 40 bytes
-
+
3bb · SceneState_SendWord250With6 · Proven C: 28 bytes
-
+
3bb · FieldScene_Forward4358 · Proven C: 10 bytes
-
+
3bb · SceneActor_MovePairByTileOffset · Proven C: 240 bytes
-
+
3bb · SceneState_ApplyRectsForActors15To17 · Proven C: 112 bytes
-
+
3bb · FieldScene_RunStep15At29By26 · Proven C: 20 bytes
-
+
3bb · FieldScene_RunStep15At33By26 · Proven C: 20 bytes
-
+
3bb · FieldScene_RunStep16At45By26 · Proven C: 20 bytes
-
+
3bb · FieldScene_RunStep16At49By26 · Proven C: 20 bytes
-
+
3bb · FieldScene_RunStep17At40By23 · Proven C: 20 bytes
-
+
3bb · FieldScene_RunStep17At40By25 · Proven C: 20 bytes
-
+
3bb · FieldScene_RunSupplementalSequenceOne · Proven C: 472 bytes
-
+
3bb · FieldScene_RunScene3bbSequenceA · Proven C: 100 bytes
-
+
3bb · SceneState_ApplyTable8715AndValue104 · Proven C: 32 bytes
-
+
3bb · SceneState_WaitForStatusWords · Proven C: 64 bytes
-
+
3bb · SceneState_InstallTask8714AndApplyTwoRects · Proven C: 108 bytes
-
+
3bb · SceneData_GetTableC83c · Proven C: 8 bytes
-
+
3bb · FieldScene_RunScene3bb_02000b38 · Proven C: 154 bytes
-
+
3bb · FieldScene_RunSecondActorInteraction · Proven C: 276 bytes
-
+
3bb · FieldScene_RunSceneThreeCoordinator · Proven C: 412 bytes
-
+
+
+
+3bb · FieldScene_RunLiftedActorCoordinator · Proven C: 452 bytes
+
3bb · initialize_scene_actor_positions · Proven C: 120 bytes
-
+
3bb · mark_scene_progress · Proven C: 72 bytes
-
+
3bb · select_nearest_scene_actor · Proven C: 308 bytes
-
+
3bb · RunPartyCountInteractionCopyA · Proven C: 164 bytes
-
+
3bb · FieldScene_RunSixSteps896To936 · Proven C: 68 bytes
-
+
3bb · run_state_interaction · Proven C: 188 bytes
-
+
3bb · initialize_state_interaction · Proven C: 92 bytes
-
+
3bb · FieldScene_RunMiddleSequence · Proven C: 620 bytes
-
+
3bb · OverlayObject_NotifyMatchingEntries · Proven C: 60 bytes
-
+
3bb · initialize_mode_task · Proven C: 142 bytes
-
+
3bb · run_scripted_transition · Proven C: 268 bytes
-
+
3bb · FieldScene_RunLateSequence · Proven C: 204 bytes
-
+
3bb · StagedActor_ResetMotionAfterRefresh · Proven C: 32 bytes
-
+
3bb · SceneState_InitCursorWhenUnset · Proven C: 32 bytes
-
+
3bb · SceneEffect_SeedMarkerAndInstallTask · Proven C: 100 bytes
-
+
3bb · SceneState_StartMarkerMove · Proven C: 92 bytes
-
+
3bb · SceneEffect_RemoveMarkerTask · Proven C: 40 bytes
-
+
3bb · SceneActor_PlaceWithScale20000 · Proven C: 64 bytes
-
+
3bb · SceneActor_PlaceWithScale14000 · Proven C: 78 bytes
-
+
3bb · Text_WriteU32AsHex · Proven C: 44 bytes
-
+
3bb · empty_hook_d · Proven C: 4 bytes
-
+
3bb · SceneState_SetHalfword1000To9 · Proven C: 12 bytes
-
+
3bb · SceneState_WaitUntilStatusNine · Proven C: 36 bytes
-
+
3bb · spawn_random_scene_effect · Proven C: 148 bytes
-
+
3bb · raise_linked_scene_effect · Proven C: 84 bytes
-
+
3bb · position_active_actor · Proven C: 276 bytes
-
+
3bb · FieldScene_BuildDescriptorAndInstallTask · Proven C: 232 bytes
-
+
3bb · SceneState_InitControlRecordAndStartTask · Proven C: 84 bytes
-
+
3bb · SceneState_SetWorkHalfwordDc · Proven C: 16 bytes
-
+
3bb · SceneData_FindSlotAtPosition · Proven C: 72 bytes
-
+
3bb · StagedActor_PushActorAhead · Proven C: 360 bytes
-
+
3bb · SceneActor_FindOccupantAheadOfSubject · Proven C: 160 bytes
-
+
3bb · Draft C 0x02000a1c–0x02000b30: 276 bytes
-
+
3bb · Unknown 0x02000160–0x02000246: 230 bytes
-
+
3bb · Unknown 0x02000248–0x02000258: 16 bytes
-
+
3bb · Unknown 0x02000400–0x020004b6: 182 bytes
-
+
3bb · Unknown 0x020004b8–0x02000616: 350 bytes
-
+
3bb · Unknown 0x02000618–0x0200062c: 20 bytes
-
+
3bb · Unknown 0x02000bd4–0x02000f86: 946 bytes
-
+
3bb · Unknown 0x02000f9c–0x02000fc8: 44 bytes
-
+
3bb · Unknown 0x020010c0–0x020010d0: 16 bytes
-
+
3bb · Unknown 0x020012d8–0x020012f0: 24 bytes
-
+
3bb · Unknown 0x02001418–0x02001424: 12 bytes
-
+
3bb · Unknown 0x02001898–0x02001b30: 664 bytes
-
+
3bb · Unknown 0x02001ba8–0x02001c1a: 114 bytes
-
+
3bb · Unknown 0x02001c1c–0x02001c78: 92 bytes
-
+
3bb · Unknown 0x02001df4–0x02001f14: 288 bytes
-
+
3bb · Unknown 0x02002e84–0x02002f42: 190 bytes
-
+
3bb · Unknown 0x02002f44–0x02002fc0: 124 bytes
-
+
3bb · Unknown 0x02003458–0x020035aa: 338 bytes
-
+
3bb · Unknown 0x020035ac–0x02003622: 118 bytes
-
+
3bb · Unknown 0x02003624–0x02003638: 20 bytes
-
+
3bb · Draft ASM 0x02002ba8–0x02002dae: 518 bytes
-
+
3bb · Draft ASM 0x02002db0–0x02002e42: 146 bytes
-
+
3bb · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3bb · Proven ASM 0x0200004e–0x02000050: 2 bytes
-
+
3bb · Proven ASM 0x0200005a–0x0200005c: 2 bytes
-
+
3bb · Proven ASM 0x020000be–0x020000c0: 2 bytes
-
+
3bb · Proven ASM 0x0200014e–0x02000150: 2 bytes
-
+
3bb · Proven ASM 0x02000246–0x02000248: 2 bytes
-
+
3bb · Proven ASM 0x0200030e–0x02000310: 2 bytes
-
+
3bb · Proven ASM 0x020004b6–0x020004b8: 2 bytes
-
+
3bb · Proven ASM 0x02000616–0x02000618: 2 bytes
-
+
3bb · Proven ASM 0x02000bd2–0x02000bd4: 2 bytes
-
+
3bb · Proven ASM 0x020010dc–0x020012d8: 508 bytes
-
+
3bb · Proven ASM 0x020012f0–0x02001418: 296 bytes
-
-
-
-3bb · Proven ASM 0x020016d4–0x02001898: 452 bytes
-
+
3bb · Proven ASM 0x02001c1a–0x02001c1c: 2 bytes
-
+
3bb · Proven ASM 0x020023bc–0x02002940: 1,412 bytes
-
+
3bb · Proven ASM 0x020029ce–0x020029d0: 2 bytes
-
+
3bb · Proven ASM 0x02002dae–0x02002db0: 2 bytes
-
+
3bb · Proven ASM 0x02002e42–0x02002e44: 2 bytes
-
+
3bb · Proven ASM 0x02002f42–0x02002f44: 2 bytes
-
+
3bb · Proven ASM 0x02003136–0x020031fc: 198 bytes
-
+
3bb · Proven ASM 0x020035aa–0x020035ac: 2 bytes
-
+
3bb · Proven ASM 0x02003622–0x02003624: 2 bytes
-
+
3bb · Proven ASM 0x02003638–0x020039fc: 964 bytes
-
+
3bb · Proven ASM 0x02003da0–0x020040c0: 800 bytes
-
+
3bc · get_script_data · Proven C: 8 bytes
-
+
3bc · get_message_data · Proven C: 4 bytes
-
+
3bc · get_actor_data · Proven C: 8 bytes
-
+
3bc · get_effect_data · Proven C: 8 bytes
-
+
3bc · reset_and_run_scene_task · Proven C: 44 bytes
-
+
3bc · start_scene_task · Proven C: 20 bytes
-
+
3bc · wait_for_scene_task · Proven C: 60 bytes
-
+
3bc · nudge_stage_actors_left · Proven C: 72 bytes
-
+
3bc · configure_grid_region · Proven C: 38 bytes
-
+
3bc · configure_primary_object_set · Proven C: 132 bytes
-
+
3bc · FieldScene_RunClosingAuxiliarySequence · Proven C: 268 bytes
-
+
3bc · configure_secondary_object_set · Proven C: 160 bytes
-
+
3bc · FieldScene_RunFinalAuxiliarySequence · Proven C: 216 bytes
-
+
3bc · run_setup_completion_hooks · Proven C: 14 bytes
-
+
3bc · configure_actor_thirteen · Proven C: 68 bytes
-
+
3bc · ColossoLogRollingStage_NoopSetupHook · Proven C: 2 bytes
-
+
3bc · run_setup_hook · Proven C: 10 bytes
-
+
3bc · activate_clear_obstacle_actors · Proven C: 120 bytes
-
+
3bc · show_actor_position_message · Proven C: 76 bytes
-
+
3bc · check_obstacle_destination · Proven C: 110 bytes
-
+
3bc · check_path_clearance · Proven C: 88 bytes
-
+
3bc · FieldScene_RunEarlySequence · Proven C: 692 bytes
-
+
3bc · set_scene_event_values · Proven C: 34 bytes
-
+
3bc · configure_scene_event_effect · Proven C: 64 bytes
-
+
3bc · wait_for_scene_event_task · Proven C: 80 bytes
-
+
3bc · offset_active_actor · Proven C: 92 bytes
-
+
3bc · clamp_and_offset_active_actor · Proven C: 112 bytes
-
+
3bc · ColossoLogRollingStage_NoopSceneEventHook · Proven C: 2 bytes
-
+
3bc · FieldScene_RunSupplementalSequenceOne · Proven C: 184 bytes
-
+
+
+
+3bc · FieldScene_RunScene3bcSequenceB · Proven C: 276 bytes
+
3bc · run_scene_event_if_ready · Proven C: 18 bytes
-
+
3bc · finish_or_continue_scene_event · Proven C: 24 bytes
-
+
3bc · get_scene_event_state · Proven C: 8 bytes
-
+
3bc · advance_particle_motion · Proven C: 68 bytes
-
+
3bc · spawn_periodic_scene_particle · Proven C: 180 bytes
-
+
3bc · FieldScene_RunMultiPhaseActorSequence · Proven C: 1,432 bytes
-
+
+
+
+3bc · FieldScene_ArrangeFourActors · Proven C: 532 bytes
+
+
+
+3bc · FieldScene_RunSecondArrivalSequence · Proven C: 408 bytes
+
3bc · FieldScene_RunFourStepActorMotion · Proven C: 468 bytes
-
+
3bc · position_stage_actor · Proven C: 48 bytes
-
+
3bc · position_and_activate_stage_actor · Proven C: 60 bytes
-
+
3bc · FieldScene_RunOpeningAuxiliarySequence · Proven C: 416 bytes
-
+
3bc · run_log_rolling_interaction · Proven C: 248 bytes
-
+
3bc · restore_stage_actor_positions · Proven C: 120 bytes
-
+
3bc · mark_scene_progress · Proven C: 72 bytes
-
+
3bc · select_nearest_stage_obstacle · Proven C: 308 bytes
-
+
3bc · RunPartyCountInteractionCopyB · Proven C: 164 bytes
-
+
3bc · clear_saved_actor_positions · Proven C: 66 bytes
-
+
3bc · run_state_interaction · Proven C: 188 bytes
-
+
3bc · initialize_state_interaction · Proven C: 92 bytes
-
+
3bc · FieldScene_RunLateSequence · Proven C: 620 bytes
-
+
3bc · apply_item_to_matching_slots · Proven C: 60 bytes
-
+
3bc · initialize_mode_task · Proven C: 142 bytes
-
+
3bc · run_scripted_transition · Proven C: 268 bytes
-
+
3bc · FieldScene_RunScene3bcSequenceA · Proven C: 204 bytes
-
+
3bc · reset_actor_motion · Proven C: 32 bytes
-
+
3bc · ensure_palette_handle · Proven C: 32 bytes
-
+
3bc · start_palette_task · Proven C: 98 bytes
-
+
3bc · start_palette_task_from_state · Proven C: 92 bytes
-
+
3bc · stop_palette_task · Proven C: 40 bytes
-
+
3bc · position_scaled_object · Proven C: 64 bytes
-
+
3bc · spawn_positioned_object · Proven C: 78 bytes
-
+
3bc · WriteU32AsHex · Proven C: 44 bytes
-
+
3bc · ColossoLogRollingStage_NoopSceneHook · Proven C: 4 bytes
-
+
3bc · set_balance_state_ready · Proven C: 12 bytes
-
+
3bc · wait_for_balance_state · Proven C: 36 bytes
-
+
3bc · spawn_random_scene_effect · Proven C: 148 bytes
-
+
3bc · raise_linked_scene_effect · Proven C: 84 bytes
-
+
3bc · position_active_actor · Proven C: 276 bytes
-
+
3bc · setup_scene_descriptor · Proven C: 232 bytes
-
+
3bc · initialize_scene_control · Proven C: 84 bytes
-
+
3bc · set_scene_control_value · Proven C: 16 bytes
-
+
3bc · FindActorAtWholeTilePosition · Proven C: 72 bytes
-
+
3bc · push_staged_actor · Proven C: 360 bytes
-
+
3bc · find_actor_ahead · Proven C: 160 bytes
-
-
-
-3bc · Draft C 0x02000c5c–0x02000d70: 276 bytes
-
+
3bc · Unknown 0x0200004c–0x02000188: 316 bytes
-
+
3bc · Unknown 0x02000da4–0x02001142: 926 bytes
-
+
3bc · Unknown 0x02001144–0x0200121e: 218 bytes
-
+
3bc · Unknown 0x02001350–0x02001362: 18 bytes
-
+
3bc · Unknown 0x02001364–0x0200136c: 8 bytes
-
+
3bc · Unknown 0x02002640–0x020026b2: 114 bytes
-
+
3bc · Unknown 0x020026b4–0x02002710: 92 bytes
-
+
3bc · Unknown 0x0200288c–0x020029ac: 288 bytes
-
+
3bc · Unknown 0x020037fc–0x02003846: 74 bytes
-
+
3bc · Unknown 0x02003848–0x020038da: 146 bytes
-
+
3bc · Unknown 0x020039dc–0x02003a58: 124 bytes
-
+
3bc · Unknown 0x02003ef0–0x02004042: 338 bytes
-
+
3bc · Unknown 0x02004044–0x020040ba: 118 bytes
-
+
3bc · Unknown 0x020040bc–0x020040d0: 20 bytes
-
+
3bc · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3bc · Proven ASM 0x02000272–0x02000274: 2 bytes
-
+
3bc · Proven ASM 0x0200058a–0x0200058c: 2 bytes
-
+
3bc · Proven ASM 0x020005d2–0x020005d4: 2 bytes
-
+
3bc · Proven ASM 0x020005de–0x020005e0: 2 bytes
-
+
3bc · Proven ASM 0x02000712–0x02000714: 2 bytes
-
+
3bc · Proven ASM 0x02000a42–0x02000a44: 2 bytes
-
+
3bc · Proven ASM 0x02000ba2–0x02000ba4: 2 bytes
-
+
3bc · Proven ASM 0x02000d82–0x02000d84: 2 bytes
-
+
3bc · Proven ASM 0x02001142–0x02001144: 2 bytes
-
+
3bc · Proven ASM 0x02001362–0x02001364: 2 bytes
-
+
-
-3bc · Proven ASM 0x02001a0c–0x020020f0: 1,764 bytes
-
+
+3bc · Proven ASM 0x02001c20–0x02001df8: 472 bytes
+
+
+
+3bc · Proven ASM 0x02001f90–0x020020f0: 352 bytes
+
3bc · Proven ASM 0x020026b2–0x020026b4: 2 bytes
-
+
3bc · Proven ASM 0x02002a92–0x02002a94: 2 bytes
-
+
3bc · Proven ASM 0x02002e54–0x020033d8: 1,412 bytes
-
+
3bc · Proven ASM 0x02003466–0x02003468: 2 bytes
-
+
3bc · Proven ASM 0x02003640–0x020037fc: 444 bytes
-
+
3bc · Proven ASM 0x02003846–0x02003848: 2 bytes
-
+
3bc · Proven ASM 0x020038da–0x020038dc: 2 bytes
-
+
3bc · Proven ASM 0x0200391c–0x020039dc: 192 bytes
-
+
3bc · Proven ASM 0x02003aba–0x02003abc: 2 bytes
-
+
3bc · Proven ASM 0x02003bce–0x02003c94: 198 bytes
-
+
3bc · Proven ASM 0x02004042–0x02004044: 2 bytes
-
+
3bc · Proven ASM 0x020040ba–0x020040bc: 2 bytes
-
+
3bc · Proven ASM 0x020040d0–0x02004494: 964 bytes
@@ -17016,3488 +17028,3476 @@
3bf · SelectQuaternarySceneData · Proven C: 84 bytes
-
+
3bf · ConfigureSceneActor12 · Proven C: 82 bytes
-
+
3bf · RunSceneObjectSetup · Proven C: 10 bytes
-
+
3bf · FieldScene_RunScene3bf_02000bac · Proven C: 64 bytes
-
+
3bf · FieldScene_RunScene3bf_02000bec · Proven C: 140 bytes
-
+
3bf · PlaceActorTwelveAndFinishScene · Proven C: 24 bytes
-
+
3bf · PlaceSceneObjectPairFromTableA · Proven C: 80 bytes
-
+
3bf · FieldScene_RunSupplementalSequenceThree · Proven C: 116 bytes
-
+
+
+
+3bf · FieldScene_RunScene3bfSequenceE · Proven C: 120 bytes
+
3bf · FieldScene_RunScene3bfSequenceD · Proven C: 100 bytes
-
+
3bf · PlaceSceneObjectPairFromTableB · Proven C: 80 bytes
-
+
3bf · PlaceSceneObjectPairFromTableC · Proven C: 80 bytes
-
+
3bf · FieldScene_RunScene3bf_02000f30 · Proven C: 100 bytes
-
+
3bf · ShowLockedDoorMessageOnce · Proven C: 32 bytes
-
+
3bf · ShowLockedDoorMessage · Proven C: 20 bytes
-
+
3bf · ShowGeraldDontMessage · Proven C: 28 bytes
-
+
3bf · ShowThatWasExcitingMessage · Proven C: 28 bytes
-
+
3bf · ShowSorryIScaredYouMessage · Proven C: 28 bytes
-
+
3bf · ShowWellMessage · Proven C: 28 bytes
-
+
3bf · TryStartActorInteraction · Proven C: 96 bytes
-
+
3bf · NoOpSceneCallbackA · Proven C: 4 bytes
-
+
3bf · NoOpSceneCallbackB · Proven C: 4 bytes
-
+
3bf · NoOpSceneCallbackC · Proven C: 4 bytes
-
+
3bf · NoOpSceneCallbackD · Proven C: 2 bytes
-
+
3bf · StartDoraHouseAccidentScene · Proven C: 96 bytes
-
+
3bf · IsPlayerInAccidentTriggerArea · Proven C: 72 bytes
-
+
3bf · ConfigureSceneActor9 · Proven C: 66 bytes
-
+
3bf · AreSceneActorsInPassingLane · Proven C: 104 bytes
-
+
3bf · ActivateSceneActor17 · Proven C: 16 bytes
-
+
3bf · IsPlayerInSecondaryTriggerArea · Proven C: 92 bytes
-
+
3bf · ActivateSceneActor18 · Proven C: 16 bytes
-
+
3bf · IsPlayerOutsideSceneRectangle · Proven C: 60 bytes
-
+
3bf · FieldScene_RunScene3bfSequenceA · Proven C: 108 bytes
-
+
3bf · RunActor17SceneStep · Proven C: 16 bytes
-
+
3bf · TriggerSceneStage95FromActor12 · Proven C: 68 bytes
-
+
3bf · FieldScene_RunScene3bfSequenceB · Proven C: 96 bytes
-
+
3bf · FieldScene_RunScene3bfSequenceC · Proven C: 96 bytes
-
+
3bf · IsSceneActorVerticallyNearPlayer · Proven C: 100 bytes
-
+
3bf · IsSceneActorHorizontallyNearPlayer · Proven C: 100 bytes
-
+
3bf · IsActorInteractionAvailable · Proven C: 50 bytes
-
+
3bf · IsSceneActorWithinFourSteps · Proven C: 104 bytes
-
+
3bf · IsSceneActorWithinTriggerBox · Proven C: 104 bytes
-
+
3bf · TriggerScene41AtVillagePath · Proven C: 92 bytes
-
+
3bf · TriggerScene40AtVillagePath · Proven C: 108 bytes
-
+
3bf · RunActor9ScriptedSequence · Proven C: 116 bytes
-
+
3bf · RunActorScriptedSequenceA · Proven C: 192 bytes
-
+
3bf · TurnActorToSceneDirection · Proven C: 104 bytes
-
+
3bf · RunActorScriptedSequenceB · Proven C: 88 bytes
-
+
3bf · RunActorScriptedSequenceC · Proven C: 76 bytes
-
+
3bf · FieldScene_RunScene3bf_02001cf0 · Proven C: 112 bytes
-
+
3bf · RunActorScriptedSequenceD · Proven C: 100 bytes
-
+
3bf · InspectOrdinaryObject · Proven C: 104 bytes
-
+
3bf · InspectEmptyChest · Proven C: 104 bytes
-
+
3bf · FieldScene_RunSupplementalSequenceOne · Proven C: 472 bytes
-
+
3bf · FieldScene_RunSequenceTail · Proven C: 96 bytes
-
+
3bf · InspectEmptySceneObject · Proven C: 104 bytes
-
+
3bf · RunActor12InteractionSequence · Proven C: 144 bytes
-
+
3bf · FieldScene_RunScene3bf_020021c4 · Proven C: 168 bytes
-
+
3bf · ConfigureInteractionRegionA · Proven C: 50 bytes
-
+
3bf · ConfigureInteractionRegionB · Proven C: 50 bytes
-
+
3bf · ConfigureInteractionRegionC · Proven C: 50 bytes
-
+
3bf · InspectVillageWell · Proven C: 132 bytes
-
+
3bf · RunSecondaryMapInteraction · Proven C: 132 bytes
-
+
3bf · ConfigurePrimaryInteractionRegions · Proven C: 88 bytes
-
+
3bf · ConfigureSecondaryInteractionRegions · Proven C: 88 bytes
-
+
3bf · InspectWardrobe · Proven C: 36 bytes
-
+
3bf · InspectFirewood · Proven C: 32 bytes
-
+
3bf · InspectBooks · Proven C: 36 bytes
-
+
3bf · NoOpInteractionCallback · Proven C: 2 bytes
-
+
3bf · FieldScene_RunScene3bf_0200252c · Proven C: 204 bytes
-
+
3bf · FieldScene_RunScene3bf_020025f8 · Proven C: 164 bytes
-
+
3bf · FieldScene_RunScene3bf_0200269c · Proven C: 124 bytes
-
+
3bf · FieldScene_RunScene3bf_02002718 · Proven C: 150 bytes
-
+
3bf · PlayStoryScene · Proven C: 2,212 bytes
-
+
3bf · FieldScene_RunMainScriptSequence · Proven C: 5,604 bytes
-
+
3bf · FieldScene_RunScene3bf_02004704 · Proven C: 144 bytes
-
+
3bf · FieldScene_RunScene3bf_02004794 · Proven C: 404 bytes
-
+
3bf · SelectActor25SceneVariant · Proven C: 60 bytes
-
+
3bf · SelectActor24SceneVariant · Proven C: 60 bytes
-
+
3bf · FieldScene_RunSupplementalSequenceTwo · Proven C: 456 bytes
-
+
3bf · ConfigureSceneActor26 · Proven C: 28 bytes
-
+
3bf · ConfigureSceneActor14 · Proven C: 32 bytes
-
+
3bf · ConfigureSceneActor13 · Proven C: 32 bytes
-
+
3bf · ConfigureSceneActor12Variant · Proven C: 32 bytes
-
+
3bf · ConfigureSceneActor18 · Proven C: 24 bytes
-
+
3bf · RunActor20SceneSequence · Proven C: 272 bytes
-
+
3bf · FinishActor20SceneSequence · Proven C: 64 bytes
-
+
3bf · NoOpActorCallback · Proven C: 2 bytes
-
+
3bf · ConfigureActor13Interaction · Proven C: 56 bytes
-
+
3bf · ConfigureActor13SceneResource · Proven C: 24 bytes
-
+
3bf · ActivateThreeActorGroupFromFlags · Proven C: 64 bytes
-
+
3bf · ActivateTwoActorGroupFromFlags · Proven C: 44 bytes
-
+
3bf · ActivateSecondThreeActorGroupFromFlags · Proven C: 68 bytes
-
+
3bf · ActivateFiveActorGroupFromFlags · Proven C: 104 bytes
-
+
3bf · AddSoftFloatParts · Proven C: 596 bytes
-
+
3bf · AddSoftDouble · Proven C: 54 bytes
-
+
3bf · SubtractSoftDouble · Proven C: 62 bytes
-
+
3bf · GetSoftFloatStatusStorage · Proven C: 8 bytes
-
+
3bf · SoftFloatRecordAIsNaN · Proven C: 16 bytes
-
+
3bf · SoftFloatRecordAIsInfinity · Proven C: 16 bytes
-
+
3bf · SoftFloatRecordAIsZero · Proven C: 16 bytes
-
+
3bf · SignedIntToSoftDouble · Proven C: 124 bytes
-
+
3bf · SoftDoubleToSignedInt · Proven C: 108 bytes
-
+
3bf · SoftFloatRecordBIsNaN · Proven C: 16 bytes
-
+
3bf · SoftFloatRecordBIsInfinity · Proven C: 16 bytes
-
+
3bf · SoftFloatRecordBIsZero · Proven C: 16 bytes
-
+
3bf · LogicalShiftRight64 · Proven C: 48 bytes
-
+
3bf · PackSoftDouble · Proven C: 412 bytes
-
+
3bf · SoftFloatRecordCIsNaN · Proven C: 16 bytes
-
+
3bf · SoftFloatRecordCIsInfinity · Proven C: 16 bytes
-
+
3bf · SoftFloatRecordCIsZero · Proven C: 16 bytes
-
+
3bf · UnpackSoftDouble · Proven C: 212 bytes
-
+
3bf · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
3bf · Draft C 0x020008a4–0x020008c0: 28 bytes
-
+
3bf · Unknown 0x0200034c–0x02000474: 296 bytes
-
+
3bf · Unknown 0x020008c0–0x020009dc: 284 bytes
-
-
-
-3bf · Unknown 0x02000d54–0x02000dc6: 114 bytes
-
-
-
-3bf · Unknown 0x02000dc8–0x02000dcc: 4 bytes
-
+
3bf · Unknown 0x02000e80–0x02000ed6: 86 bytes
-
+
3bf · Unknown 0x02000ed8–0x02000ee0: 8 bytes
-
+
3bf · Unknown 0x02001150–0x020012e0: 400 bytes
-
+
3bf · Unknown 0x0200138c–0x020014bc: 304 bytes
-
+
3bf · Unknown 0x02001528–0x0200163a: 274 bytes
-
+
3bf · Unknown 0x0200163c–0x02001650: 20 bytes
-
+
3bf · Unknown 0x02004638–0x0200464a: 18 bytes
-
+
3bf · Unknown 0x020046d8–0x020046e4: 12 bytes
-
+
3bf · Unknown 0x02004da0–0x02004f3a: 410 bytes
-
+
3bf · Unknown 0x02004f3c–0x02004f82: 70 bytes
-
+
3bf · Unknown 0x02005076–0x020050cc: 86 bytes
-
+
3bf · Unknown 0x020050e4–0x0200516e: 138 bytes
-
+
3bf · Unknown 0x020052b8–0x02005314: 92 bytes
-
+
3bf · Unknown 0x02005324–0x0200544e: 298 bytes
-
+
3bf · Unknown 0x02005450–0x02005470: 32 bytes
-
+
3bf · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3bf · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
3bf · Proven ASM 0x02000b9e–0x02000ba0: 2 bytes
-
+
3bf · Proven ASM 0x02000baa–0x02000bac: 2 bytes
-
-
-
-3bf · Proven ASM 0x02000dc6–0x02000dc8: 2 bytes
-
+
3bf · Proven ASM 0x02000ed6–0x02000ed8: 2 bytes
-
+
3bf · Proven ASM 0x020010a6–0x020010a8: 2 bytes
-
+
3bf · Proven ASM 0x02001322–0x02001324: 2 bytes
-
+
3bf · Proven ASM 0x0200163a–0x0200163c: 2 bytes
-
+
3bf · Proven ASM 0x02001916–0x02001918: 2 bytes
-
+
3bf · Proven ASM 0x0200229e–0x020022a0: 2 bytes
-
+
3bf · Proven ASM 0x020022d2–0x020022d4: 2 bytes
-
+
3bf · Proven ASM 0x02002306–0x02002308: 2 bytes
-
+
3bf · Proven ASM 0x0200252a–0x0200252c: 2 bytes
-
+
3bf · Proven ASM 0x020027ae–0x020027b0: 2 bytes
-
+
3bf · Proven ASM 0x02004d4e–0x02004d50: 2 bytes
-
+
3bf · Proven ASM 0x02004f3a–0x02004f3c: 2 bytes
-
+
3bf · Proven ASM 0x0200544e–0x02005450: 2 bytes
-
+
3bf · Proven ASM 0x02005588–0x020057b0: 552 bytes
-
+
3bf · Proven ASM 0x020057bc–0x020057ea: 46 bytes
-
+
3bf · Proven ASM 0x02005a76–0x02005a78: 2 bytes
-
+
3bf · Proven ASM 0x02005ab6–0x02005ab8: 2 bytes
-
+
3c0 · set_effect_record_mode · Proven C: 22 bytes
-
+
3c0 · OverlayObject_CreateAndInitialize · Proven C: 86 bytes
-
+
3c0 · OverlayObject_CreateConfigured · Proven C: 98 bytes
-
+
3c0 · SpawnConfiguredEffect · Proven C: 472 bytes
-
+
3c0 · SceneState_SendRequest15With45 · Proven C: 14 bytes
-
+
3c0 · OverlayObject_ApplyZeroAndClearByte89 · Proven C: 24 bytes
-
+
3c0 · OverlayObject_ToggleField84Bit0 · Proven C: 16 bytes
-
+
3c0 · SceneData_SelectDataByRuntimeSelector · Proven C: 84 bytes
-
+
3c0 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3c0 · SceneData_GetTable95c0 · Proven C: 8 bytes
-
+
3c0 · SceneData_SelectOverlayDataByRuntimeSelector · Proven C: 84 bytes
-
+
3c0 · sync_selected_actor_progress · Proven C: 100 bytes
-
+
3c0 · FieldScene_RunMiddleAuxiliarySequence · Proven C: 244 bytes
-
+
3c0 · FieldScene_RunActor8Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunActor9Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunActor10Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunActor11Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunActor12Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunLateActor8Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunLateActor9Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunLateActor10Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunLateActor11Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunLateActor12Step · Proven C: 12 bytes
-
+
3c0 · FieldScene_RunActorThirteenRestoration · Proven C: 404 bytes
-
+
3c0 · PlaceActorTwelveWhenFlagClear · Proven C: 56 bytes
-
+
3c0 · SceneState_SetStateByte52 · Proven C: 16 bytes
-
+
3c0 · EncounterPalette_Pulse · Proven C: 64 bytes
-
+
3c0 · FieldScene_RunOpeningAuxiliarySequence · Proven C: 164 bytes
-
+
3c0 · FieldScene_RunScene3c0SequenceA · Proven C: 148 bytes
-
+
3c0 · SceneData_SelectTable99C4Or97B4ByStateA6 · Proven C: 48 bytes
-
+
3c0 · Draft C 0x02000104–0x0200013c: 56 bytes
-
+
3c0 · Unknown 0x020007e0–0x020007fc: 28 bytes
-
+
3c0 · Unknown 0x020009cc–0x02000ac6: 250 bytes
-
+
3c0 · Unknown 0x02000ac8–0x02000adc: 20 bytes
-
+
3c0 · Unknown 0x02000b24–0x02000bde: 186 bytes
-
+
3c0 · Unknown 0x02000be0–0x02000ce4: 260 bytes
-
+
3c0 · Unknown 0x02000e8c–0x02000f50: 196 bytes
-
+
3c0 · Unknown 0x0200105c–0x02001094: 56 bytes
-
+
3c0 · Unknown 0x020011b8–0x020011ec: 52 bytes
-
+
3c0 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c0 · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
3c0 · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
3c0 · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
3c0 · Proven ASM 0x02000322–0x02000324: 2 bytes
-
+
3c0 · Proven ASM 0x02000594–0x020007e0: 588 bytes
-
+
3c0 · Proven ASM 0x02000ac6–0x02000ac8: 2 bytes
-
+
3c0 · Proven ASM 0x02000bde–0x02000be0: 2 bytes
-
+
3c0 · Proven ASM 0x02000f50–0x0200105c: 268 bytes
-
+
3c0 · Proven ASM 0x02001094–0x020011b8: 292 bytes
-
+
3c0 · Proven ASM 0x020011f4–0x0200137c: 392 bytes
-
+
3c1 · SceneData_GetScriptTable · Proven C: 8 bytes
-
+
3c1 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3c1 · SceneData_GetMessageTable · Proven C: 8 bytes
-
+
3c1 · SceneData_SelectActorTableByFlag96f · Proven C: 36 bytes
-
+
3c1 · FieldScene_RunActorCue25b8Branch · Proven C: 72 bytes
-
+
3c1 · FieldScene_RunActorCue25dcBranch · Proven C: 72 bytes
-
+
3c1 · FieldScene_RunLayoutStepThenSet201 · Proven C: 40 bytes
-
+
3c1 · SceneEffect_ConfigureIndexedEffect85e8 · Proven C: 116 bytes
-
+
3c1 · SceneEffect_ConfigureIndexedEffect85fe · Proven C: 116 bytes
-
+
3c1 · SceneData_SelectTable8614ByFlag96f · Proven C: 36 bytes
-
+
3c1 · SceneState_InitEntryWorkspaceAndFlag96f · Proven C: 92 bytes
-
+
3c1 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c1 · Proven ASM 0x02000288–0x020002f0: 104 bytes
-
+
3c2 · SceneData_GetScriptTable · Proven C: 8 bytes
-
+
3c2 · SceneData_GetTable8da4 · Proven C: 8 bytes
-
+
3c2 · SceneData_GetTable8dd4 · Proven C: 8 bytes
-
+
3c2 · SceneData_SelectTable8e08ByFlag96f · Proven C: 36 bytes
-
+
3c2 · FieldScene_RunActorCueBranch · Proven C: 72 bytes
-
+
3c2 · SceneState_ApplyCounter16cThenCall7b · Proven C: 36 bytes
-
+
3c2 · FieldScene_RunPrimaryScript · Proven C: 2,068 bytes
-
+
3c2 · SceneData_SelectTable9090ByFlag96f · Proven C: 36 bytes
-
+
3c2 · Unknown 0x0200006c–0x02000096: 42 bytes
-
+
3c2 · Unknown 0x02000098–0x020000f4: 92 bytes
-
+
3c2 · Unknown 0x020000f8–0x0200012a: 50 bytes
-
+
3c2 · Unknown 0x0200012c–0x0200015e: 50 bytes
-
+
3c2 · Unknown 0x02000164–0x020001ae: 74 bytes
-
+
3c2 · Unknown 0x020001b0–0x020001d4: 36 bytes
-
+
3c2 · Unknown 0x02000a78–0x02000b34: 188 bytes
-
+
3c2 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c2 · Proven ASM 0x02000096–0x02000098: 2 bytes
-
+
3c2 · Proven ASM 0x0200012a–0x0200012c: 2 bytes
-
+
3c2 · Proven ASM 0x020001ae–0x020001b0: 2 bytes
-
+
3c2 · Proven ASM 0x02000b34–0x02000c3c: 264 bytes
-
+
3c3 · FieldScene_SetActor13Value1A · Proven C: 14 bytes
-
+
3c3 · SceneData_GetPrimaryTable · Proven C: 64 bytes
-
+
3c3 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3c3 · SceneData_GetTable8B48 · Proven C: 8 bytes
-
+
3c3 · SceneData_GetSecondaryTable · Proven C: 88 bytes
-
+
3c3 · SceneData_GetTertiaryTable · Proven C: 64 bytes
-
+
3c3 · FieldScene_RunSupplementalSequenceOne · Proven C: 356 bytes
-
+
3c3 · FieldScene_RunScene3c3SequenceC · Proven C: 112 bytes
-
+
3c3 · SceneDialogue_ShowMessages8fbAnd8fc · Proven C: 60 bytes
-
+
3c3 · FieldScene_RunPrimarySequence · Proven C: 142 bytes
-
+
3c3 · FieldScene_RunScene3c3SequenceA · Proven C: 876 bytes
-
+
3c3 · FieldScene_RunActorNinePromptDialogue · Proven C: 124 bytes
-
+
3c3 · FieldScene_RunActorTenRepeatedMotion · Proven C: 176 bytes
-
+
3c3 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c3 · Proven ASM 0x0200003e–0x02000040: 2 bytes
-
+
3c3 · Proven ASM 0x020003c2–0x020003c4: 2 bytes
-
+
3c3 · Proven ASM 0x0200085c–0x02000974: 280 bytes
-
+
3c4 · measure_fixed_point_position_distance · Proven C: 60 bytes
-
+
3c4 · find_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
3c4 · StagedActor_AdvanceActorPair · Proven C: 384 bytes
-
+
3c4 · fill_grid_attribute_rectangle · Proven C: 100 bytes
-
+
3c4 · SceneActor_CheckAheadTileAndStop · Proven C: 164 bytes
-
+
3c4 · StagedActor_FindClearPosition · Proven C: 404 bytes
-
+
3c4 · copy_mode_to_owner · Proven C: 22 bytes
-
+
3c4 · OverlayObject_CreateAndInitialize · Proven C: 86 bytes
-
+
3c4 · OverlayObject_PrepareSpawnedObjectMode4 · Proven C: 98 bytes
-
+
3c4 · OverlayObject_IntegrateVelocities · Proven C: 54 bytes
-
+
3c4 · SceneEffect_SpawnConfiguredEffect · Proven C: 472 bytes
-
+
3c4 · SceneState_ApplyArgMode0AndReturnZero · Proven C: 14 bytes
-
+
3c4 · SceneActor_MoveActorZeroToTarget · Proven C: 248 bytes
-
+
3c4 · SceneActor_PassRaisedPointOfActorZero · Proven C: 42 bytes
-
+
3c4 · SceneActor_PassActorZeroOffsetPoint · Proven C: 44 bytes
-
+
3c4 · SceneActor_SetFlagBitByRelativeDepth · Proven C: 70 bytes
-
+
3c4 · SceneState_SwapSlotPairByRank · Proven C: 60 bytes
-
+
3c4 · SceneActor_CopyActor8PositionWhenAtRow10 · Proven C: 80 bytes
-
+
3c4 · SceneActor_WaitValueBelowLimit · Proven C: 48 bytes
-
+
3c4 · advance_effect_motion · Proven C: 90 bytes
-
+
3c4 · SceneEffect_SpawnNineRadialEffects · Proven C: 144 bytes
-
+
3c4 · SceneData_SelectDataByRuntimeSelector · Proven C: 64 bytes
-
+
3c4 · SceneData_SelectTableB81cByWord224 · Proven C: 40 bytes
-
+
3c4 · SceneData_GetTableB85c · Proven C: 8 bytes
-
+
3c4 · SceneData_SelectAndApplyTableBySceneId · Proven C: 56 bytes
-
+
3c4 · SceneState_RunRect73x38Step · Proven C: 46 bytes
-
+
3c4 · SceneActor_ApplyPointLeftOfActorZero · Proven C: 44 bytes
-
+
3c4 · FieldScene_RunLayoutAt93By30 · Proven C: 46 bytes
-
+
3c4 · FieldScene_RunStepWith6 · Proven C: 16 bytes
-
+
3c4 · SceneActor_PassPointTwoRightOfActorZero · Proven C: 42 bytes
-
+
3c4 · SceneState_ApplyTwoRectsAndRunThree · Proven C: 66 bytes
-
+
3c4 · SceneActor_CheckTwoUnitsAboveActorZero · Proven C: 50 bytes
-
+
3c4 · SceneActor_MirrorFlag201IntoSlot14 · Proven C: 84 bytes
-
+
3c4 · SceneActor_SetActor14Field98ByFlag200 · Proven C: 84 bytes
-
+
3c4 · SceneState_ApplyFlag970 · Proven C: 14 bytes
-
+
3c4 · SceneState_RunUnlessActorZeroAtTile32x50 · Proven C: 32 bytes
-
+
3c4 · SceneState_RunUnlessActorZeroAt30_52 · Proven C: 32 bytes
-
+
3c4 · FieldScene_RunSupplementalSequenceTwo · Proven C: 420 bytes
-
+
3c4 · FieldScene_RunFourCallSequenceB · Proven C: 22 bytes
-
+
3c4 · ActorPresentation_ConfigureActorTwentyAndFlag200 · Proven C: 54 bytes
-
+
3c4 · FieldScene_RunSupplementalSequenceOne · Proven C: 436 bytes
-
+
3c4 · FieldScene_RunFourStepSequenceA · Proven C: 22 bytes
-
+
3c4 · FieldScene_SetActor19TableB3B8 · Proven C: 20 bytes
-
+
3c4 · SceneState_SetValue202ThenCall · Proven C: 20 bytes
-
+
3c4 · SceneActor_ConfigureSlot21AndSetFlag201 · Proven C: 56 bytes
-
+
3c4 · SceneDialogue_RunFlag982Or983Dialogue · Proven C: 76 bytes
-
+
3c4 · FieldScene_RunTwoStepSequence · Proven C: 14 bytes
-
+
3c4 · FieldScene_RunFourStepSequenceB · Proven C: 22 bytes
-
+
3c4 · SceneActor_InstallSlotNineHandler · Proven C: 44 bytes
-
+
3c4 · SceneActor_SetupSlotNineAndInstallHandler · Proven C: 136 bytes
-
+
3c4 · OverlayObject_SetYAboveLinkedActor · Proven C: 34 bytes
-
+
3c4 · SceneActor_LandOnHighestPlatform · Proven C: 216 bytes
-
+
3c4 · FieldScene_RunMiddleSequence · Proven C: 600 bytes
-
+
3c4 · FieldScene_RunThreeStepSequence · Proven C: 18 bytes
-
+
3c4 · SceneState_SetSlot17And18Selectors · Proven C: 84 bytes
-
+
3c4 · FieldScene_RunFourCallSequence · Proven C: 22 bytes
-
+
3c4 · FieldScene_RunLateSequenceHead · Proven C: 98 bytes
-
+
3c4 · FieldScene_RunLateSequenceSecond · Proven C: 98 bytes
-
+
3c4 · FieldScene_RunScene3c4SequenceA · Proven C: 604 bytes
-
+
3c4 · FieldScene_RunLayoutAt83By45 · Proven C: 46 bytes
-
+
3c4 · SceneState_SetValue268bInScene · Proven C: 36 bytes
-
+
3c4 · FieldScene_RunScriptedStep953 · Proven C: 28 bytes
-
+
3c4 · SceneData_SelectTableByWord224 · Proven C: 48 bytes
-
+
3c4 · FieldScene_PlaceAndPinSlots8And9 · Proven C: 112 bytes
-
+
3c4 · FieldScene_PlaceAndPinSlots10And11 · Proven C: 112 bytes
-
+
3c4 · FieldScene_RunScene3c4_02002480 · Proven C: 170 bytes
-
+
3c4 · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
3c4 · Draft C 0x020008a4–0x020008c0: 28 bytes
-
+
3c4 · Unknown 0x0200034c–0x02000474: 296 bytes
-
+
3c4 · Unknown 0x020008c0–0x020009dc: 284 bytes
-
+
3c4 · Unknown 0x02000e20–0x02000e58: 56 bytes
-
+
3c4 · Unknown 0x02000e90–0x02000eb6: 38 bytes
-
+
3c4 · Unknown 0x02000eb8–0x02000ec8: 16 bytes
-
+
3c4 · Unknown 0x02000f4c–0x02000fe8: 156 bytes
-
+
3c4 · Unknown 0x020010c4–0x020011e0: 284 bytes
-
+
3c4 · Unknown 0x02001abc–0x02001c1e: 354 bytes
-
+
3c4 · Unknown 0x02001c20–0x02001c2c: 12 bytes
-
+
3c4 · Unknown 0x0200252c–0x02002602: 214 bytes
-
+
3c4 · Unknown 0x02002970–0x02002988: 24 bytes
-
+
3c4 · Unknown 0x02002a30–0x02002a48: 24 bytes
-
+
3c4 · Unknown 0x02002b94–0x02002b98: 4 bytes
-
+
3c4 · Unknown 0x02002fda–0x02002fe8: 14 bytes
-
+
3c4 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c4 · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
3c4 · Proven ASM 0x020009f2–0x020009f4: 2 bytes
-
+
3c4 · Proven ASM 0x02000a4a–0x02000a4c: 2 bytes
-
+
3c4 · Proven ASM 0x02000aae–0x02000ab0: 2 bytes
-
+
3c4 · Proven ASM 0x02000ae6–0x02000ae8: 2 bytes
-
+
3c4 · Proven ASM 0x02000cce–0x02000cd0: 2 bytes
-
+
3c4 · Proven ASM 0x02000df2–0x02000df4: 2 bytes
-
+
3c4 · Proven ASM 0x02000eb6–0x02000eb8: 2 bytes
-
+
3c4 · Proven ASM 0x02000f0e–0x02000f10: 2 bytes
-
+
3c4 · Proven ASM 0x020010c2–0x020010c4: 2 bytes
-
+
3c4 · Proven ASM 0x02001346–0x02001348: 2 bytes
-
+
3c4 · Proven ASM 0x020013a2–0x020013a4: 2 bytes
-
+
3c4 · Proven ASM 0x020013de–0x020013e0: 2 bytes
-
+
3c4 · Proven ASM 0x02001422–0x02001424: 2 bytes
-
+
3c4 · Proven ASM 0x02001456–0x02001458: 2 bytes
-
+
3c4 · Proven ASM 0x0200150e–0x02001510: 2 bytes
-
+
3c4 · Proven ASM 0x0200170a–0x0200170c: 2 bytes
-
+
3c4 · Proven ASM 0x02001742–0x02001744: 2 bytes
-
+
3c4 · Proven ASM 0x0200190e–0x02001910: 2 bytes
-
+
3c4 · Proven ASM 0x020019ca–0x020019cc: 2 bytes
-
+
3c4 · Proven ASM 0x020019e2–0x020019e4: 2 bytes
-
+
3c4 · Proven ASM 0x02001aba–0x02001abc: 2 bytes
-
+
3c4 · Proven ASM 0x02001c1e–0x02001c20: 2 bytes
-
+
3c4 · Proven ASM 0x02001f6e–0x02001f70: 2 bytes
-
+
3c4 · Proven ASM 0x02001fda–0x02001fdc: 2 bytes
-
+
3c4 · Proven ASM 0x0200203e–0x02002040: 2 bytes
-
+
3c4 · Proven ASM 0x020020a2–0x020020a4: 2 bytes
-
+
3c4 · Proven ASM 0x0200232e–0x02002330: 2 bytes
-
+
3c4 · Proven ASM 0x0200252a–0x0200252c: 2 bytes
-
+
3c4 · Proven ASM 0x02003024–0x020031b4: 400 bytes
-
+
3c4 · Proven ASM 0x020031c0–0x020031ee: 46 bytes
-
+
3c5 · measure_fixed_point_position_distance · Proven C: 60 bytes
-
+
3c5 · find_actor_at_fixed_point_position · Proven C: 88 bytes
-
+
3c5 · StagedActor_PushActorAhead · Proven C: 384 bytes
-
+
3c5 · fill_grid_attribute_rectangle · Proven C: 100 bytes
-
+
3c5 · SceneActor_ResetMotionWhenAheadBlocked · Proven C: 164 bytes
-
+
3c5 · StagedActor_FindClearPosition · Proven C: 404 bytes
-
+
3c5 · copy_mode_to_owner · Proven C: 22 bytes
-
+
3c5 · OverlayObject_SpawnConfiguredObject · Proven C: 86 bytes
-
+
3c5 · OverlayObject_PrepareObjectWithCommand15 · Proven C: 98 bytes
-
+
3c5 · OverlayObject_IntegrateVelocities · Proven C: 54 bytes
-
+
3c5 · SceneEffect_SpawnConfiguredEffect · Proven C: 472 bytes
-
+
3c5 · SceneState_SetValue8Mode66 · Proven C: 14 bytes
-
+
3c5 · OverlayObject_WaitUntilIdle · Proven C: 30 bytes
-
+
3c5 · advance_effect_motion · Proven C: 90 bytes
-
+
3c5 · FieldScene_RunSupplementalSequenceOne · Proven C: 352 bytes
-
+
3c5 · FieldScene_RunScene3c5SequenceA · Proven C: 172 bytes
-
+
3c5 · SceneData_SelectByRuntimeSelector · Proven C: 84 bytes
-
+
3c5 · SceneData_SelectTableB5b8ByState · Proven C: 40 bytes
-
+
3c5 · SceneData_GetTableb5f8 · Proven C: 8 bytes
-
+
3c5 · SceneData_SelectDataByRuntimeSelector · Proven C: 84 bytes
-
+
3c5 · FieldScene_RunFourCallSequence · Proven C: 22 bytes
-
+
3c5 · SceneState_BranchOnActorEightOrNineTile · Proven C: 74 bytes
-
+
3c5 · ResetSceneParametersAndFinishSetup · Proven C: 42 bytes
-
+
3c5 · FieldScene_RunStep11 · Proven C: 24 bytes
-
+
3c5 · FieldScene_RunStep12WithPosition · Proven C: 40 bytes
-
+
3c5 · FieldScene_RunStep13WithTwoPositions · Proven C: 56 bytes
-
+
3c5 · FieldScene_RunStep15 · Proven C: 24 bytes
-
+
3c5 · FieldScene_RunStepWithValue2693 · Proven C: 36 bytes
-
+
+
+
+3c5 · RunEventScript01 · Proven C: 2,264 bytes
+
+
+
+3c5 · FieldScene_RunScene3c5SequenceC · Proven C: 2,396 bytes
+
3c5 · ActorPresentation_SetSceneCellByFlag985 · Proven C: 68 bytes
-
+
3c5 · SceneState_ApplyRectAt32x78 · Proven C: 30 bytes
-
+
3c5 · FieldScene_RunScene3c5_020024d0 · Proven C: 120 bytes
-
+
3c5 · FieldScene_RunScene3c5_02002548 · Proven C: 128 bytes
-
+
3c5 · FieldScene_RunFlag985DialogueBranch · Proven C: 152 bytes
-
+
3c5 · SceneState_SetRuntimeByte34 · Proven C: 16 bytes
-
+
3c5 · ActorPresentation_PlaceActorTwelveAtTile20And12 · Proven C: 68 bytes
-
+
3c5 · SceneActor_PushObjectAheadIfLevel · Proven C: 58 bytes
-
+
3c5 · SceneActor_RunSlotZeroFacingCheck · Proven C: 104 bytes
-
+
3c5 · SceneData_SelectTableB91cByRuntimeSelector · Proven C: 84 bytes
-
+
3c5 · SceneState_ConfigureRegion82_7AndApply768 · Proven C: 44 bytes
-
+
3c5 · SceneState_ApplyRectsAtActors8And9 · Proven C: 128 bytes
-
+
3c5 · Draft C 0x02000608–0x020008a2: 666 bytes
-
+
3c5 · Draft C 0x020008a4–0x020008c0: 28 bytes
-
+
3c5 · Unknown 0x0200034c–0x02000474: 296 bytes
-
+
3c5 · Unknown 0x020008c0–0x020009dc: 284 bytes
-
+
3c5 · Unknown 0x02001030–0x020010f4: 196 bytes
-
-
-
-3c5 · Unknown 0x02002460–0x0200246c: 12 bytes
-
+
3c5 · Unknown 0x02002660–0x020026a8: 72 bytes
-
+
3c5 · Unknown 0x020028a0–0x02002902: 98 bytes
-
+
3c5 · Unknown 0x02002904–0x02002a9a: 406 bytes
-
+
3c5 · Unknown 0x02002af2–0x02002afc: 10 bytes
-
+
3c5 · Unknown 0x02002b7e–0x02002d4a: 460 bytes
-
+
3c5 · Unknown 0x02002d4c–0x02002d54: 8 bytes
-
+
3c5 · Unknown 0x02002d58–0x02002d78: 32 bytes
-
+
3c5 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c5 · Proven ASM 0x020008a2–0x020008a4: 2 bytes
-
+
3c5 · Proven ASM 0x020009f2–0x020009f4: 2 bytes
-
+
3c5 · Proven ASM 0x02000a4a–0x02000a4c: 2 bytes
-
+
3c5 · Proven ASM 0x02000aae–0x02000ab0: 2 bytes
-
+
3c5 · Proven ASM 0x02000ae6–0x02000ae8: 2 bytes
-
+
3c5 · Proven ASM 0x02000cce–0x02000cd0: 2 bytes
-
+
3c5 · Proven ASM 0x02000cee–0x02000cf0: 2 bytes
-
+
3c5 · Proven ASM 0x02000d4a–0x02000d4c: 2 bytes
-
+
3c5 · Proven ASM 0x0200110a–0x0200110c: 2 bytes
-
+
3c5 · Proven ASM 0x02001156–0x02001158: 2 bytes
-
+
3c5 · Proven ASM 0x02001182–0x02001184: 2 bytes
-
-
-
-3c5 · Proven ASM 0x02001238–0x02002460: 4,648 bytes
-
+
3c5 · Proven ASM 0x020024ce–0x020024d0: 2 bytes
-
+
3c5 · Proven ASM 0x02002736–0x02002738: 2 bytes
-
+
3c5 · Proven ASM 0x02002902–0x02002904: 2 bytes
-
+
3c5 · Proven ASM 0x02002d4a–0x02002d4c: 2 bytes
-
+
3c5 · Proven ASM 0x02002d80–0x02002f98: 536 bytes
-
+
3c5 · Proven ASM 0x02002fa4–0x02002fd2: 46 bytes
-
+
3c6 · SceneActor_SetActor23Params2And6 · Proven C: 16 bytes
-
+
3c6 · SceneData_GetTable975c · Proven C: 8 bytes
-
+
3c6 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3c6 · SceneData_GetTable98c4 · Proven C: 8 bytes
-
+
3c6 · SceneData_SelectTableByFlag9a7 · Proven C: 36 bytes
-
+
3c6 · SceneActor_SetupActorForTable9638 · Proven C: 76 bytes
-
+
3c6 · SceneActor_UpdateObjectWithCue28be · Proven C: 72 bytes
-
+
3c6 · SceneActor_SetupActor18Event · Proven C: 76 bytes
-
+
3c6 · SceneState_SetWord1c8To16AndForward16c · Proven C: 40 bytes
-
+
3c6 · FieldScene_RunPrimarySequence · Proven C: 1,452 bytes
-
+
3c6 · FieldScene_RunSecondarySequence · Proven C: 2,250 bytes
-
+
3c6 · FieldScene_RunScene3c6SequenceA · Proven C: 300 bytes
-
+
3c6 · FieldScene_RunSequenceB · Proven C: 44 bytes
-
+
3c6 · SceneData_SelectSecondaryTableByFlag9a7 · Proven C: 36 bytes
-
+
3c6 · Unknown 0x02000158–0x020001de: 134 bytes
-
+
3c6 · Unknown 0x020001e0–0x020001f0: 16 bytes
-
+
3c6 · Unknown 0x0200120c–0x020013a2: 406 bytes
-
+
3c6 · Unknown 0x020013a4–0x02001422: 126 bytes
-
+
3c6 · Unknown 0x02001424–0x020014d2: 174 bytes
-
+
3c6 · Unknown 0x020014d4–0x020014d8: 4 bytes
-
+
3c6 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c6 · Proven ASM 0x020001de–0x020001e0: 2 bytes
-
+
3c6 · Proven ASM 0x0200108e–0x02001090: 2 bytes
-
+
3c6 · Proven ASM 0x020013a2–0x020013a4: 2 bytes
-
+
3c6 · Proven ASM 0x02001422–0x02001424: 2 bytes
-
+
3c6 · Proven ASM 0x020014d2–0x020014d4: 2 bytes
-
+
3c6 · Proven ASM 0x020014d8–0x02001638: 352 bytes
-
+
3c7 · SceneActor_SetActor14Pose258 · Proven C: 18 bytes
-
+
3c7 · SceneData_GetTable9438 · Proven C: 8 bytes
-
+
3c7 · SceneData_SelectTableByWord224 · Proven C: 48 bytes
-
+
3c7 · SceneData_GetTable96d0 · Proven C: 8 bytes
-
+
3c7 · SceneData_SelectTableBySceneIdAndFlag9a7 · Proven C: 68 bytes
-
+
3c7 · FieldScene_RunSequenceA · Proven C: 116 bytes
-
+
3c7 · FieldScene_RunThreeCallSequence · Proven C: 36 bytes
-
+
3c7 · SceneState_ForwardWord16cAndApply7b · Proven C: 36 bytes
-
+
3c7 · SceneData_SelectScriptBySceneIdAndFlag9a7 · Proven C: 88 bytes
-
+
3c7 · FieldScene_RunPrimaryScript · Proven C: 2,532 bytes
-
+
3c7 · FieldScene_RunSecondaryScript · Proven C: 352 bytes
-
+
3c7 · Draft C 0x020000f4–0x020000f8: 4 bytes
-
+
3c7 · Draft C 0x02000154–0x0200015c: 8 bytes
-
+
3c7 · Draft C 0x02000188–0x0200018c: 4 bytes
-
+
3c7 · Draft C 0x020001c0–0x020001c8: 8 bytes
-
+
3c7 · Draft C 0x020001f4–0x020001f8: 4 bytes
-
+
3c7 · Draft C 0x02000278–0x02000284: 12 bytes
-
+
3c7 · Draft C 0x02000298–0x0200029c: 4 bytes
-
+
3c7 · Draft C 0x020002c8–0x020002cc: 4 bytes
-
+
3c7 · Draft C 0x02000300–0x02000308: 8 bytes
-
+
3c7 · Unknown 0x02000308–0x020003f4: 236 bytes
-
+
3c7 · Unknown 0x0200104c–0x020011be: 370 bytes
-
+
3c7 · Unknown 0x020011c0–0x020011dc: 28 bytes
-
+
3c7 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c7 · Proven ASM 0x02000042–0x02000044: 2 bytes
-
+
3c7 · Proven ASM 0x020000c8–0x020000f4: 44 bytes
-
+
3c7 · Proven ASM 0x020000f8–0x02000150: 88 bytes
-
+
3c7 · Proven ASM 0x0200015c–0x02000188: 44 bytes
-
+
3c7 · Proven ASM 0x0200018c–0x020001ba: 46 bytes
-
+
3c7 · Proven ASM 0x020001c8–0x020001f4: 44 bytes
-
+
3c7 · Proven ASM 0x020001f8–0x02000226: 46 bytes
-
+
3c7 · Proven ASM 0x0200022c–0x02000278: 76 bytes
-
+
3c7 · Proven ASM 0x02000284–0x02000298: 20 bytes
-
+
3c7 · Proven ASM 0x0200029c–0x020002c8: 44 bytes
-
+
3c7 · Proven ASM 0x020002cc–0x020002fa: 46 bytes
-
+
3c7 · Proven ASM 0x020011be–0x020011c0: 2 bytes
-
+
3c7 · Proven ASM 0x020011dc–0x02001314: 312 bytes
-
+
3c8 · ConfigureOverlayObject · Proven C: 40 bytes
-
+
3c8 · OverlayObject_SpawnWithMode14 · Proven C: 64 bytes
-
+
3c8 · OverlayObject_PrepareObjectWithCommand15 · Proven C: 72 bytes
-
+
3c8 · OverlayObject_IntegrateVelocities · Proven C: 54 bytes
-
+
3c8 · SceneEffect_SpawnConfigured · Proven C: 472 bytes
-
+
3c8 · SceneActor_CalculateFixedPointDistance · Proven C: 60 bytes
-
+
3c8 · SceneData_FindSlotAtPosition · Proven C: 72 bytes
-
+
3c8 · RunStagedActorTransition · Proven C: 384 bytes
-
+
3c8 · SceneState_FillGridCellByte2 · Proven C: 100 bytes
-
+
3c8 · SceneActor_ApplySlotsMatchingKind212 · Proven C: 60 bytes
-
+
3c8 · OverlayObject_ApplyLowNibbleOfField100 · Proven C: 22 bytes
-
+
3c8 · OverlayObject_UpdateEveryFourFrames · Proven C: 56 bytes
-
+
3c8 · SceneEffect_SpawnRandomEveryEightFramesB · Proven C: 172 bytes
-
+
3c8 · OverlayObject_ApplyZero · Proven C: 14 bytes
-
+
3c8 · SceneEffect_SpawnTwoRandomizedParticles · Proven C: 180 bytes
-
+
3c8 · SceneEffect_RunObjectZeroColorSequence · Proven C: 132 bytes
-
+
3c8 · FieldScene_RunOpeningAuxiliarySequence · Proven C: 200 bytes
-
+
3c8 · SceneState_StoreLookupZeroToWord24 · Proven C: 24 bytes
-
+
3c8 · SceneState_ClearWorkspaceWord24 · Proven C: 16 bytes
-
+
3c8 · SceneActor_SetFlagBitByRelativeDepth · Proven C: 70 bytes
-
+
3c8 · SceneActor_SwapPositionsByDepth · Proven C: 60 bytes
-
+
3c8 · OverlayObject_WaitUntilIdle · Proven C: 30 bytes
-
+
3c8 · advance_effect_motion · Proven C: 90 bytes
-
+
3c8 · FieldScene_RunSupplementalSequenceOne · Proven C: 320 bytes
-
+
3c8 · SceneEffect_SpawnNineRadialEffects · Proven C: 144 bytes
-
+
3c8 · SceneEffect_SpawnRandomizedParticleEveryFourFrames · Proven C: 196 bytes
-
+
3c8 · SceneEffect_SpawnEffect284AtCell · Proven C: 108 bytes
-
+
3c8 · SceneActor_TryMoveActorZeroTwoTilesAhead · Proven C: 316 bytes
-
+
3c8 · SceneData_SelectTableBySceneB5ToBa · Proven C: 120 bytes
-
+
3c8 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3c8 · SceneData_GetTablee740 · Proven C: 8 bytes
-
+
3c8 · SceneData_SelectTableBySceneAndApply · Proven C: 148 bytes
-
+
3c8 · SceneState_SetFlag953 · Proven C: 28 bytes
-
+
3c8 · FieldScene_RunActorEightTenStepLoop · Proven C: 132 bytes
-
+
3c8 · SceneDialogue_RunActorElevenDialogue · Proven C: 52 bytes
-
+
3c8 · FieldScene_SetFlag987AtActorTwelveTile · Proven C: 52 bytes
-
+
3c8 · SceneDialogue_RunLine2682 · Proven C: 36 bytes
-
+
3c8 · SceneState_ApplySixRectsAfter161 · Proven C: 132 bytes
-
+
3c8 · SceneState_ApplySixRectsAfterFlag161 · Proven C: 132 bytes
-
+
3c8 · FieldScene_RunScene3c8SequenceC · Proven C: 200 bytes
-
+
3c8 · FieldScene_RunScene3c8SequenceD · Proven C: 732 bytes
-
+
3c8 · FieldScene_RunFlag986ActorOneScene · Proven C: 308 bytes
-
+
3c8 · FieldScene_RunFiveCallSequence · Proven C: 28 bytes
-
+
3c8 · SceneState_RunActor13AtColumn42Setup · Proven C: 96 bytes
-
+
3c8 · FieldScene_PlaceAndPinSlots8To10 · Proven C: 114 bytes
-
+
3c8 · SceneState_ApplyRectAt19_44AndRunThree · Proven C: 46 bytes
-
+
3c8 · SceneActor_ApplyKind45AtActorsElevenAndTwelve · Proven C: 36 bytes
-
+
3c8 · SceneActor_ApplyPositionsOfActors11And12 · Proven C: 48 bytes
-
+
3c8 · FieldScene_RunGuardedThreeStepSetup · Proven C: 34 bytes
-
+
3c8 · SceneState_MarkActorAndApplyRectAtTile · Proven C: 58 bytes
-
+
3c8 · OverlayObject_ResetObjectWhenFlags12Set · Proven C: 76 bytes
-
+
3c8 · SceneActor_UpdateSlots11And12ByTile · Proven C: 84 bytes
-
+
3c8 · FieldScene_RunGuardedRectStep · Proven C: 54 bytes
-
+
3c8 · SceneState_RunConditionalStep · Proven C: 54 bytes
-
+
3c8 · SceneActor_SetHeightAboveLinkedRecord · Proven C: 34 bytes
-
+
3c8 · SceneActor_PickHighestSlotAtSameTileAndRelease · Proven C: 168 bytes
-
+
3c8 · FieldScene_RunThreeCallSequence · Proven C: 18 bytes
-
+
3c8 · FieldScene_DrawTilesWhenCheckClear · Proven C: 74 bytes
-
+
3c8 · FieldScene_RunScene3c8SequenceB · Proven C: 92 bytes
-
+
3c8 · SceneData_SelectTableBySceneId · Proven C: 128 bytes
-
+
3c8 · SceneActor_ClearActorModeAndSetState5 · Proven C: 68 bytes
-
+
3c8 · SceneState_ApplyStepToSlots15To18 · Proven C: 22 bytes
-
+
3c8 · SceneState_PassZeroAndMinusOneRecord · Proven C: 24 bytes
-
+
3c8 · SceneState_PassRange0To1 · Proven C: 24 bytes
-
+
3c8 · SceneState_PassRangeNeg1To0 · Proven C: 28 bytes
-
+
3c8 · SceneState_CallHandlerWithFlagPair · Proven C: 24 bytes
-
+
3c8 · SceneState_Call4520With432And32 · Proven C: 16 bytes
-
+
3c8 · FieldScene_RunStep230With44 · Proven C: 16 bytes
-
+
3c8 · FieldScene_RunScene3c8_02004a2c · Proven C: 428 bytes
-
+
3c8 · Draft C 0x020017f8–0x02001808: 16 bytes
-
+
3c8 · Unknown 0x020016a4–0x02001780: 220 bytes
-
+
3c8 · Unknown 0x02001808–0x020018f8: 240 bytes
-
+
3c8 · Unknown 0x02001af0–0x02001d12: 546 bytes
-
+
3c8 · Unknown 0x02001d14–0x02001d48: 52 bytes
-
+
3c8 · Unknown 0x020022c8–0x020023d4: 268 bytes
-
+
3c8 · Unknown 0x020026f8–0x02002b14: 1,052 bytes
-
+
3c8 · Unknown 0x02004520–0x020045f0: 208 bytes
-
+
3c8 · Unknown 0x02004610–0x020047aa: 410 bytes
-
+
3c8 · Unknown 0x020047ac–0x02004a2c: 640 bytes
-
+
3c8 · Unknown 0x02004bd8–0x02004d5e: 390 bytes
-
+
3c8 · Unknown 0x02004d60–0x02004d9c: 60 bytes
-
+
3c8 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c8 · Proven ASM 0x02000116–0x02000118: 2 bytes
-
+
3c8 · Proven ASM 0x020005aa–0x020005ac: 2 bytes
-
+
3c8 · Proven ASM 0x0200069e–0x020006a0: 2 bytes
-
+
3c8 · Proven ASM 0x0200090e–0x02000910: 2 bytes
-
+
3c8 · Proven ASM 0x0200096a–0x0200096c: 2 bytes
-
+
3c8 · Proven ASM 0x020009c6–0x020009c8: 2 bytes
-
+
3c8 · Proven ASM 0x02001780–0x020017f8: 120 bytes
-
+
3c8 · Proven ASM 0x0200196a–0x0200196c: 2 bytes
-
+
3c8 · Proven ASM 0x0200199a–0x0200199c: 2 bytes
-
+
3c8 · Proven ASM 0x02001a12–0x02001a14: 2 bytes
-
+
3c8 · Proven ASM 0x02001a4e–0x02001a50: 2 bytes
-
+
3c8 · Proven ASM 0x02001d12–0x02001d14: 2 bytes
-
+
3c8 · Proven ASM 0x02001d48–0x02001f28: 480 bytes
-
+
3c8 · Proven ASM 0x02001f5e–0x0200226c: 782 bytes
-
+
3c8 · Proven ASM 0x020022a2–0x020022a4: 2 bytes
-
+
3c8 · Proven ASM 0x020022c6–0x020022c8: 2 bytes
-
+
3c8 · Proven ASM 0x0200247c–0x02002646: 458 bytes
-
+
3c8 · Proven ASM 0x0200264a–0x020026e4: 154 bytes
-
+
3c8 · Proven ASM 0x020026f6–0x020026f8: 2 bytes
-
+
3c8 · Proven ASM 0x02002b14–0x02002e36: 802 bytes
-
+
3c8 · Proven ASM 0x02002e3a–0x02002ee4: 170 bytes
-
+
3c8 · Proven ASM 0x02002f2e–0x02002f30: 2 bytes
-
+
3c8 · Proven ASM 0x02003066–0x02003136: 208 bytes
-
+
3c8 · Proven ASM 0x020033a8–0x020033cc: 36 bytes
-
+
3c8 · Proven ASM 0x020033f4–0x0200340c: 24 bytes
-
+
3c8 · Proven ASM 0x02003418–0x02003468: 80 bytes
-
+
3c8 · Proven ASM 0x0200346a–0x02003482: 24 bytes
-
+
3c8 · Proven ASM 0x02003486–0x02003488: 2 bytes
-
+
3c8 · Proven ASM 0x0200348a–0x020035d8: 334 bytes
-
+
3c8 · Proven ASM 0x020037bc–0x020037c2: 6 bytes
-
+
3c8 · Proven ASM 0x020037c4–0x020037d4: 16 bytes
-
+
3c8 · Proven ASM 0x020037d6–0x020037de: 8 bytes
-
+
3c8 · Proven ASM 0x0200382c–0x02003842: 22 bytes
-
+
3c8 · Proven ASM 0x02003846–0x02003852: 12 bytes
-
+
3c8 · Proven ASM 0x02003856–0x02003860: 10 bytes
-
+
3c8 · Proven ASM 0x02003862–0x02003910: 174 bytes
-
+
3c8 · Proven ASM 0x02003a78–0x02003a9a: 34 bytes
-
+
3c8 · Proven ASM 0x02003b40–0x02003b54: 20 bytes
-
+
3c8 · Proven ASM 0x02003b64–0x02003b6c: 8 bytes
-
+
3c8 · Proven ASM 0x02003fa6–0x02003fba: 20 bytes
-
+
3c8 · Proven ASM 0x02004048–0x02004520: 1,240 bytes
-
+
3c8 · Proven ASM 0x020047aa–0x020047ac: 2 bytes
-
+
3c8 · Proven ASM 0x02004d5e–0x02004d60: 2 bytes
-
+
3c8 · Proven ASM 0x02004da4–0x02005004: 608 bytes
-
+
3c8 · Proven ASM 0x02005010–0x0200503e: 46 bytes
-
+
3c9 · OverlayObject_SetRecordField1 · Proven C: 22 bytes
-
+
3c9 · OverlayObject_CreateAndInitialize · Proven C: 86 bytes
-
+
3c9 · OverlayObject_CreateConfiguredObject · Proven C: 98 bytes
-
+
3c9 · SceneEffect_SpawnConfigured · Proven C: 472 bytes
-
+
3c9 · OverlayObject_StepScaleByCounter · Proven C: 140 bytes
-
+
3c9 · OverlayObject_DecayRecordField1e · Proven C: 36 bytes
-
+
3c9 · OverlayObject_UpdateHeadingTimer · Proven C: 64 bytes
-
+
3c9 · SceneData_GetTablee3d4 · Proven C: 8 bytes
-
+
3c9 · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3c9 · SceneData_GetTablee464 · Proven C: 8 bytes
-
+
3c9 · SceneData_GetTablee478 · Proven C: 8 bytes
-
+
3c9 · MeasureFixedPointPositionDistance · Proven C: 60 bytes
-
+
3c9 · SceneActor_FindNearestSlotOfKindF2 · Proven C: 92 bytes
-
+
3c9 · InitializeActorZeroMotion · Proven C: 212 bytes
-
+
3c9 · SceneEffect_SpawnAndBobWithActorZero · Proven C: 212 bytes
-
+
3c9 · SceneActor_SetByte55ForActorZeroAnd12To17 · Proven C: 82 bytes
-
+
3c9 · SceneData_GetTableE6ec · Proven C: 8 bytes
-
+
3c9 · FieldScene_InitActorsAndDispatchBySubstate · Proven C: 376 bytes
-
+
3c9 · SceneState_ApplyArgMode0AndSet10 · Proven C: 18 bytes
-
+
3c9 · FieldScene_CallPairWith10 · Proven C: 12 bytes
-
+
+
+
+3c9 · FieldScene_RunScriptedActorPresentation · Proven C: 2,508 bytes
+
3c9 · FieldScene_RunScene3c9_02001280 · Proven C: 72 bytes
-
+
3c9 · SceneEffect_UpdateObjectByFrameParity · Proven C: 64 bytes
-
+
3c9 · SceneState_ForwardByRuntimeWordBits · Proven C: 64 bytes
-
+
3c9 · Effect_AnimateVerticalPositive · Proven C: 80 bytes
-
+
3c9 · Effect_AnimateVerticalNegative · Proven C: 82 bytes
-
+
3c9 · SceneState_ApplyPair140And0 · Proven C: 14 bytes
-
+
3c9 · FieldScene_ForwardValue81fc · Proven C: 10 bytes
-
+
3c9 · FieldScene_RunStep6 · Proven C: 16 bytes
-
+
3c9 · FieldScene_RunSetupSequence35c4 · Proven C: 60 bytes
-
+
3c9 · SceneEffect_UpdateCounterDrivenOrbit · Proven C: 112 bytes
-
+
3c9 · FieldScene_RunThreeStepsInBracket · Proven C: 28 bytes
-
+
3c9 · FieldScene_RunBracketedSceneWithFlag282 · Proven C: 72 bytes
-
+
3c9 · FieldScene_RunScene3c9_02003924 · Proven C: 676 bytes
-
+
+
+
+3c9 · FieldScene_RunExtendedPresentation · Proven C: 1,692 bytes
+
3c9 · FieldScene_RunScene3c9_02004b28 · Proven C: 196 bytes
-
+
3c9 · SceneActor_ParkRecord · Proven C: 24 bytes
-
+
3c9 · SceneEffect_AdvanceGatedRiseCounter · Proven C: 54 bytes
-
+
3c9 · FieldScene_RunScene3c9_02005b90 · Proven C: 92 bytes
-
+
3c9 · Draft C 0x020003a0–0x020003fe: 94 bytes
-
-
-
-3c9 · Draft C 0x02004738–0x020048d8: 416 bytes
-
+
3c9 · Unknown 0x02000104–0x0200013a: 54 bytes
-
-
-
-3c9 · Unknown 0x0200124c–0x02001280: 52 bytes
-
+
3c9 · Unknown 0x02002200–0x0200225a: 90 bytes
-
+
3c9 · Unknown 0x0200225c–0x020022ca: 110 bytes
-
+
3c9 · Unknown 0x020022cc–0x0200232a: 94 bytes
-
+
3c9 · Unknown 0x0200232c–0x02002334: 8 bytes
-
+
3c9 · Unknown 0x02003600–0x02003660: 96 bytes
-
+
3c9 · Unknown 0x020036d0–0x0200370a: 58 bytes
-
+
3c9 · Unknown 0x0200370c–0x020037a2: 150 bytes
-
+
3c9 · Unknown 0x020037a4–0x020037c2: 30 bytes
-
+
3c9 · Unknown 0x020037c4–0x020038c0: 252 bytes
-
+
3c9 · Unknown 0x02003bc8–0x02003e8a: 706 bytes
-
+
3c9 · Unknown 0x02003e8c–0x02003e9c: 16 bytes
-
+
3c9 · Unknown 0x020048d8–0x02004b28: 592 bytes
-
+
3c9 · Unknown 0x020056a0–0x020056c4: 36 bytes
-
+
3c9 · Unknown 0x020058b0–0x020058b8: 8 bytes
-
+
3c9 · Unknown 0x020058dc–0x02005974: 152 bytes
-
+
3c9 · Unknown 0x02005978–0x020059f0: 120 bytes
-
+
3c9 · Unknown 0x02005a28–0x02005b8e: 358 bytes
-
+
3c9 · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3c9 · Proven ASM 0x02000046–0x02000048: 2 bytes
-
+
3c9 · Proven ASM 0x0200009e–0x020000a0: 2 bytes
-
+
3c9 · Proven ASM 0x02000102–0x02000104: 2 bytes
-
+
3c9 · Proven ASM 0x0200013a–0x0200013c: 2 bytes
-
+
3c9 · Proven ASM 0x020003fe–0x02000400: 2 bytes
-
+
3c9 · Proven ASM 0x02000712–0x02000714: 2 bytes
-
+
3c9 · Proven ASM 0x020008a6–0x020008a8: 2 bytes
-
-
-
-3c9 · Proven ASM 0x020008b4–0x0200124c: 2,456 bytes
-
+
3c9 · Proven ASM 0x020012c8–0x020020dc: 3,604 bytes
-
+
3c9 · Proven ASM 0x020021fe–0x02002200: 2 bytes
-
+
3c9 · Proven ASM 0x0200225a–0x0200225c: 2 bytes
-
+
3c9 · Proven ASM 0x020022ca–0x020022cc: 2 bytes
-
+
3c9 · Proven ASM 0x0200232a–0x0200232c: 2 bytes
-
+
3c9 · Proven ASM 0x02002342–0x02002344: 2 bytes
-
+
3c9 · Proven ASM 0x0200234e–0x02002350: 2 bytes
-
+
3c9 · Proven ASM 0x02002360–0x020035c4: 4,708 bytes
-
+
3c9 · Proven ASM 0x0200370a–0x0200370c: 2 bytes
-
+
3c9 · Proven ASM 0x020037a2–0x020037a4: 2 bytes
-
+
3c9 · Proven ASM 0x020037c2–0x020037c4: 2 bytes
-
+
3c9 · Proven ASM 0x02003e8a–0x02003e8c: 2 bytes
-
+
-
-3c9 · Proven ASM 0x02003e9c–0x02004738: 2,204 bytes
-
+
+3c9 · Proven ASM 0x02003e9c–0x0200423c: 928 bytes
+
3c9 · Proven ASM 0x02004bec–0x02005458: 2,156 bytes
-
+
3c9 · Proven ASM 0x0200545e–0x02005688: 554 bytes
-
+
3c9 · Proven ASM 0x02005a26–0x02005a28: 2 bytes
-
+
3c9 · Proven ASM 0x02005b8e–0x02005b90: 2 bytes
-
+
3c9 · Proven ASM 0x02005bfc–0x02005ed4: 728 bytes
-
+
3c9 · Proven ASM 0x02005ee0–0x02005f0e: 46 bytes
-
+
3ca · SceneData_GetTable96c8 · Proven C: 8 bytes
-
+
3ca · get_default_result · Proven C: 4 bytes
-
+
3ca · SceneData_GetTable9710 · Proven C: 8 bytes
-
+
3ca · SceneData_GetTable971c · Proven C: 8 bytes
-
+
3ca · PlayWorkspaceCueAndClearPaletteZero · Proven C: 36 bytes
-
+
3ca · FieldScene_Forward11fc · Proven C: 10 bytes
-
+
3ca · FieldScene_ConfigureFixedPointValues · Proven C: 42 bytes
-
+
3ca · SceneData_GetTable97AC · Proven C: 8 bytes
-
+
3ca · SceneState_CountDownEveryFortyTicks · Proven C: 44 bytes
-
+
3ca · SceneState_StoreSlotZeroField12 · Proven C: 28 bytes
-
+
3ca · SceneData_StoreRecord1Field12 · Proven C: 28 bytes
-
+
3ca · SceneState_StoreSlotThreeField12 · Proven C: 28 bytes
-
+
3ca · SceneData_StoreRecord2Field12 · Proven C: 28 bytes
-
+
3ca · SceneEffect_LoadTablesAndStopDma0 · Proven C: 60 bytes
-
+
3ca · Unknown 0x02000100–0x0200015e: 94 bytes
-
+
3ca · Unknown 0x02000160–0x02000168: 8 bytes
-
+
3ca · Unknown 0x0200035c–0x02000370: 20 bytes
-
+
3ca · Unknown 0x02000378–0x02000380: 8 bytes
-
+
3ca · Unknown 0x0200038c–0x02000390: 4 bytes
-
+
3ca · Unknown 0x0200039c–0x020003ac: 16 bytes
-
+
3ca · Unknown 0x02000da4–0x02000f30: 396 bytes
-
+
3ca · Unknown 0x020010b0–0x020010c8: 24 bytes
-
+
3ca · Unknown 0x02001298–0x020012ac: 20 bytes
-
+
3ca · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3ca · Proven ASM 0x0200007a–0x0200007c: 2 bytes
-
+
3ca · Proven ASM 0x020000a6–0x020000a8: 2 bytes
-
+
3ca · Proven ASM 0x020000b0–0x02000100: 80 bytes
-
+
3ca · Proven ASM 0x0200015e–0x02000160: 2 bytes
-
+
3ca · Proven ASM 0x02000194–0x020001c4: 48 bytes
-
+
3ca · Proven ASM 0x020001e0–0x020001fc: 28 bytes
-
+
3ca · Proven ASM 0x020002bc–0x0200035c: 160 bytes
-
+
3ca · Proven ASM 0x020003ac–0x020003c0: 20 bytes
-
+
3ca · Proven ASM 0x02000430–0x02000da4: 2,420 bytes
-
+
3ca · Proven ASM 0x02000f80–0x02000ff8: 120 bytes
-
+
3ca · Proven ASM 0x020010d4–0x02001188: 180 bytes
-
+
3ca · Proven ASM 0x020011c4–0x02001298: 212 bytes
-
+
3ca · Proven ASM 0x020012ac–0x02001314: 104 bytes
-
+
3ca · Proven ASM 0x0200131c–0x020014ac: 400 bytes
-
+
3cb · SceneData_GetTable9948 · Proven C: 8 bytes
-
+
3cb · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3cb · SceneState_RunQueryWithInterruptMasterSaved · Proven C: 28 bytes
-
+
3cb · SceneData_GetTable99f0 · Proven C: 8 bytes
-
+
3cb · SceneData_SelectTable9c04ByState · Proven C: 44 bytes
-
+
3cb · FieldScene_ClearFlagsAndPlayCue2927 · Proven C: 88 bytes
-
+
3cb · SceneData_CopyUpToThreeEntries · Proven C: 68 bytes
-
+
3cb · SceneState_ApplyValueAndGetResult · Proven C: 24 bytes
-
+
3cb · SceneState_NoOp · Proven C: 2 bytes
-
+
3cb · SceneData_GetTable9e14 · Proven C: 8 bytes
-
+
3cb · FieldScene_ShowDialoguePair292a · Proven C: 108 bytes
-
+
3cb · FieldScene_ShowDialoguePair292c · Proven C: 108 bytes
-
+
3cb · FieldScene_DrawThreeDigitValue · Proven C: 76 bytes
-
+
3cb · Draft C 0x020002d8–0x02000332: 90 bytes
-
+
3cb · Draft C 0x02000334–0x02000340: 12 bytes
-
+
3cb · Unknown 0x0200008c–0x0200010a: 126 bytes
-
+
3cb · Unknown 0x0200010c–0x0200013a: 46 bytes
-
+
3cb · Unknown 0x0200013c–0x02000148: 12 bytes
-
+
3cb · Unknown 0x02000398–0x0200053c: 420 bytes
-
+
3cb · Unknown 0x02000580–0x0200083e: 702 bytes
-
+
3cb · Unknown 0x02000840–0x02000860: 32 bytes
-
+
3cb · Unknown 0x02000d68–0x02000f18: 432 bytes
-
+
3cb · Unknown 0x02000f30–0x02000f82: 82 bytes
-
+
3cb · Unknown 0x02000f84–0x02000f88: 4 bytes
-
+
3cb · Unknown 0x02000f8c–0x020011a6: 538 bytes
-
+
3cb · Unknown 0x020011a8–0x020011b4: 12 bytes
-
+
3cb · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3cb · Proven ASM 0x0200010a–0x0200010c: 2 bytes
-
+
3cb · Proven ASM 0x0200013a–0x0200013c: 2 bytes
-
+
3cb · Proven ASM 0x02000148–0x020002d8: 400 bytes
-
+
3cb · Proven ASM 0x02000332–0x02000334: 2 bytes
-
+
3cb · Proven ASM 0x0200083e–0x02000840: 2 bytes
-
+
3cb · Proven ASM 0x02000860–0x02000d68: 1,288 bytes
-
+
3cb · Proven ASM 0x02000f82–0x02000f84: 2 bytes
-
+
3cb · Proven ASM 0x02000f8a–0x02000f8c: 2 bytes
-
+
3cb · Proven ASM 0x020011a6–0x020011a8: 2 bytes
-
+
3cb · Proven ASM 0x020012e0–0x02001704: 1,060 bytes
-
+
3cb · Proven ASM 0x02001714–0x020018ec: 472 bytes
-
+
3cb · Proven ASM 0x020018f8–0x02001926: 46 bytes
-
+
3cc · SceneData_GetTable81a8 · Proven C: 8 bytes
-
+
3cc · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3cc · SceneData_GetTable81d8 · Proven C: 8 bytes
-
+
3cc · SceneData_GetTable81ec · Proven C: 8 bytes
-
+
3cc · SceneState_ApplyValues8And0And0Then30 · Proven C: 22 bytes
-
+
3cc · SceneState_ApplyValues9And1And0Then44 · Proven C: 22 bytes
-
+
3cc · SceneState_ApplyValues10And2And0Then58 · Proven C: 22 bytes
-
+
3cc · SceneState_ApplyValues11And3And0Then6c · Proven C: 22 bytes
-
+
3cc · SceneData_GetTable8264 · Proven C: 8 bytes
-
+
3cc · FieldScene_RunEmptyScene · Proven C: 4 bytes
-
+
3cc · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3cc · Proven ASM 0x02000062–0x02000064: 2 bytes
-
+
3cc · Proven ASM 0x0200007a–0x0200007c: 2 bytes
-
+
3cc · Proven ASM 0x02000092–0x02000094: 2 bytes
-
+
3cc · Proven ASM 0x020000aa–0x020000ac: 2 bytes
-
+
3cc · Proven ASM 0x020000b8–0x020000c8: 16 bytes
-
+
3cd · SceneData_GetTable8964 · Proven C: 8 bytes
-
+
3cd · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3cd · SceneData_GetTable8994 · Proven C: 8 bytes
-
+
3cd · SceneData_GetTable8998 · Proven C: 8 bytes
-
+
3cd · FieldScene_RunActor13Mode102Step · Proven C: 36 bytes
-
+
3cd · FieldScene_RunActor13Mode105Step · Proven C: 40 bytes
-
+
3cd · SceneData_GetTable8a58 · Proven C: 8 bytes
-
+
3cd · SceneState_AddToRecordCount · Proven C: 32 bytes
-
+
3cd · FieldScene_RunCountAdjustPanel · Proven C: 296 bytes
-
+
3cd · SceneState_SetWorkWords1c0And1c8 · Proven C: 36 bytes
-
+
3cd · FieldScene_RunEntrySetup · Proven C: 76 bytes
-
+
3cd · FieldScene_DrawThreeCaptionWindow · Proven C: 80 bytes
-
+
3cd · SceneState_SetRecordFlag53 · Proven C: 16 bytes
-
+
3cd · SceneState_GetFarResult100c · Proven C: 10 bytes
-
+
3cd · SceneState_GetFarResult1020 · Proven C: 10 bytes
-
+
3cd · Unknown 0x020000c0–0x020000ec: 44 bytes
-
+
3cd · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3cd · Proven ASM 0x02000214–0x020006f8: 1,252 bytes
-
+
3cd · Proven ASM 0x020007d2–0x020007d4: 2 bytes
-
+
3cd · Proven ASM 0x020007e8–0x020008d0: 232 bytes
-
+
3ce · SceneData_GetTable93c8 · Proven C: 8 bytes
-
+
3ce · SceneData_ReturnZero · Proven C: 4 bytes
-
+
3ce · SceneData_GetTable93f8 · Proven C: 8 bytes
-
+
3ce · SceneData_GetTable93fc · Proven C: 8 bytes
-
+
3ce · SceneDialogue_ShowMessageAndWait · Proven C: 48 bytes
-
+
3ce · CommandTable_RunDirectionalInput · Proven C: 180 bytes
-
+
3ce · SceneState_ApplyBlockC9b · Proven C: 24 bytes
-
+
3ce · SceneState_ApplyBlockCc6 · Proven C: 24 bytes
-
+
3ce · SceneState_ApplyBlockCf1 · Proven C: 32 bytes
-
+
3ce · SceneState_ApplyBlockD21 · Proven C: 24 bytes
-
+
3ce · SceneState_ApplyBlockD4c · Proven C: 32 bytes
-
+
3ce · SceneState_ApplyBlockD77 · Proven C: 32 bytes
-
+
3ce · SceneState_ApplyBlockDa2 · Proven C: 32 bytes
-
+
3ce · SceneState_ApplyOne · Proven C: 12 bytes
-
+
3ce · SceneState_NoOp · Proven C: 2 bytes
-
+
3ce · SceneState_QueryTwoValues · Proven C: 18 bytes
-
+
3ce · SceneState_ApplyZero · Proven C: 12 bytes
-
+
3ce · CommandTable_NoOpCallback · Proven C: 2 bytes
-
+
3ce · SceneState_SetRecordFlag53 · Proven C: 16 bytes
-
+
3ce · SceneData_GetTable9564 · Proven C: 8 bytes
-
+
3ce · FieldScene_ApplyTable9684ValueToFourSlots · Proven C: 88 bytes
-
+
3ce · FieldScene_GrantItemListToSlots · Proven C: 1,574 bytes
-
+
3ce · CommandTable_ConfigureCommandGroups · Proven C: 588 bytes
-
+
3ce · FieldScene_ApplySlotOffsetsAndFlags · Proven C: 168 bytes
-
+
3ce · FieldScene_AssignCodeSetAToSlots · Proven C: 316 bytes
-
+
3ce · SceneState_RunCall1c00 · Proven C: 10 bytes
-
+
3ce · FieldScene_AssignCodeSetBToSlots · Proven C: 404 bytes
-
+
3ce · CommandTable_ConfigureCommandList · Proven C: 200 bytes
-
+
3ce · SceneState_GetFarResult2384 · Proven C: 10 bytes
-
+
3ce · SceneState_GetFarResult2418 · Proven C: 10 bytes
-
+
3ce · Proven ASM 0x02000000–0x02000030: 48 bytes
-
+
3ce · Proven ASM 0x02000206–0x02000208: 2 bytes
-
+
3ce · Proven ASM 0x0200021a–0x0200021c: 2 bytes
-
+
3ce · Proven ASM 0x0200022a–0x0200022c: 2 bytes
-
+
3ce · Proven ASM 0x020008c2–0x020008c4: 2 bytes
-
+
3ce · Proven ASM 0x02000cf4–0x02000f08: 532 bytes
-
+
3ce · Proven ASM 0x02000f12–0x02000f14: 2 bytes
-
+
3ce · Proven ASM 0x0200117a–0x0200117c: 2 bytes
-
+
3ce · Proven ASM 0x02001190–0x020012b0: 288 bytes
-
+
-Unknown 15.6%
+Unknown 15.1%
-Draft ASM 0.2%
+Draft ASM 0.3%
-Draft C 3.0%
+Draft C 2.7%
-Proven ASM 30.3%
+Proven ASM 23.1%
-Proven C 50.9%
+Proven C 58.8%
diff --git a/games/gs1/recon/en/dossiers.json b/games/gs1/recon/en/dossiers.json
index 2c3d0d6c2..46a83f7e5 100644
--- a/games/gs1/recon/en/dossiers.json
+++ b/games/gs1/recon/en/dossiers.json
@@ -1 +1 @@
-{"format":1,"records":{"main:0800300c":{"schema_version":1,"namespace":"main","address":"0x0800300c","status":"proven-retained","owner_bytes":112,"candidate_bytes":114,"differing_halfwords":56,"wrong_instructions":64,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Disables interrupts, DMA-copies the 5120-byte relocated IWRAM payload (ROM 0x08000770 -> RAM 0x03000000), records the IWRAM base pointer at 0x03007ffc, DMA-copies the 56-byte (14-entry) interrupt-dispatch pointer table (ROM 0x08007320 -> RAM 0x030000e0), clears REG_DISPSTAT, arms REG_KEYCNT, enables VBlank+Keypad in REG_IE, then re-enables IME.","evidence":["DMA control words 0x84000500 (0x500 words = 5120 bytes) and 0x8400000e (0x0e words = 56 bytes) match, byte-for-byte, the 5120-byte 'relocated_iwram_payload' group and the 56-byte 'iwram_dispatch_pointers_08007320' table both recorded independently in games/gs1/asm/classification.json and games/gs1/asm/executable_gaps/index.json.","The dispatch table's 14 pointer values are 0x08003009 (Func_08003008 + thumb bit, i.e. runtime/dispatch/reserved_no_op_f.c) repeated, with one override to 0x08003811 (Input_InitKeyIrq + thumb bit) -- consistent with initializing a default-no-op interrupt dispatch table.","Register addresses 0x04000208/0x04000200/0x04000004/0x04000132 match REG_IME/REG_IE/REG_DISPSTAT/REG_KEYCNT as already named in games/gs1/recon/en/main/serial_runtime_family.h for sibling owners."],"credible_shapes_tried":["plain per-field volatile struct stores through a DMA3-style pointer (u32 or pointer-typed fields, with or without an intermediate 'iwram'/'dma' local variable): 114 candidate bytes vs 112 reference, 56 differing halfwords -- closest length match found; kept as the current draft","compile-time-constant compound-literal struct assignment for one or both DMA setups: for an all-constant compound literal the compiler emits a genuine paired `ldmia r3!, {..}` / `stmia r2!, {..}` (movmem12b), confirming empirically this is the only Thumb pathway that emits a multi-register stmia at all; 106-118 candidate bytes, 52-58 differing halfwords, and an extra callee-saved register (r7) not present in the reference","raw u32* pointer with sequential post-increment stores (*p++ = a; *p++ = b; *p = c;): each store lowers to its own single-register `stmia rX!, {rY}` (Thumb's only way to get a post-incrementing SImode store), never merging into one three-register stmia; 122 candidate bytes, 60 differing halfwords"],"compiler_backend_evidence":"Independently confirmed by reading alchemy-gcc/agscc/gcc/config/arm/arm.md and arm.c (same files cited in 08003e10.json): the only Thumb machine pattern that ever emits literal multi-register 'stmia' text is movmem12b/movmem8b (thumb_expand_movstrqi, arm.md ~5111-5155; thumb_output_move_mem_multiple, arm.c ~9425-9469), and both cases in thumb_output_move_mem_multiple emit ldmia immediately before stmia as one indivisible RTL insn -- it can only represent a genuine memory-to-memory block copy, never a lone grouped store of independently-computed register values. The generic 'store_multiple' expander and *stmsi/*stmsi_postinc patterns (arm.md ~4997-5075) are gated 'TARGET_ARM' with no Thumb counterpart. The reference's two `stmia r3!, {r0, r1, r2}` stores are each fed by three independently loaded registers (three separate pc-relative ldr's / a register move, no preceding ldmia), which is the same structural shape 08003e10.json already documented as unemittable from ordinary C on this compiler route.","remaining":"The 56 differing halfwords are concentrated around the two DMA descriptor writes: the reference's standalone, unpaired three-register stmia appears unreachable from any ordinary field-store, aggregate-store, or pointer-store C shape on this Thumb/GCC 2.96 route (see compiler_backend_evidence). The draft also does not reproduce the reference's r5/r6 callee-saved register allocation (push {r5,r6,lr} / pop {r5,r6}; pop {r0}; bx r0) for the REG_IME address and the shared IWRAM-base value -- every local-variable shape tried caused the compiler to either drop the callee-saved registers entirely or synthesize 0x03000000 via shift instead of a literal-pool load, rather than matching the reference's register-reuse pattern. Candidate length remains 114 vs 112 target bytes.","notes":["Cold-start owner: games/gs1/recon/en/main/0800300c.c did not exist before this pass; games/gs1/asm/0800300c.s (the proven byte-exact retained assembly) was reconstructed by hand from its literal pool and cross-checked against a direct hex dump of roms/gs1-en.gba at 0x0800300c.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used.","This candidate claims zero DONE bytes.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:0800307c":{"schema_version":1,"namespace":"main","address":"0x0800307c","status":"measured-draft","owner_bytes":124,"candidate_bytes":136,"differing_halfwords":64,"wrong_instructions":40,"domain":"Installs or removes one interrupt-dispatch-table entry and its REG_IE (and, for VBlank/HBlank/V-Counter, REG_DISPSTAT) enable bit.","expressed":["rejects index > 13 with no side effects (no IME touch, immediate return)","saves REG_IME, disables it, and restores it at every exit from the valid-index path","clears bit `index` of REG_IE, then sets it back only if handler is non-NULL","for index 0-2 (VBlank/HBlank/V-Counter) also clears the matching REG_DISPSTAT IRQ-enable bit (bits 3/4/5); for index==2 specifically it additionally clears/replaces the V-Count trigger byte (bits 8-15) from the vcount argument, and re-sets the enable bit only if handler is non-NULL","writes handler (if non-NULL) or the reserved no-op dispatch stub (if NULL) into Data_030000e0[index], the 14-entry interrupt-dispatch table"],"evidence":["games/gs1/asm/0800307c.s's literal pool holds 0x04000208/0x04000200/0x04000004 (REG_IME/REG_IE/REG_DISPSTAT, already named this way in games/gs1/recon/en/main/serial_runtime_family.h and games/gs1/recon/en/main/0800300c.c), 0x030000e0 (the 14-entry interrupt-dispatch table Func_0800300c DMAs into IWRAM from ROM 0x08007320, per games/gs1/recon/en/dossiers.json#main:0800300c), and 0x08003009 (Func_08003008 / RuntimeDispatch_ReservedNoOp03008, games/gs1/src/runtime/dispatch/reserved_no_op_f.c, plus the thumb bit -- the same reserved no-op the DMA'd table already installs as its default entry).","This owner is already forward-declared 'void Func_0800307c(s32 index, s32 priority, InterruptHandler handler)' in serial_runtime_family.h and called from three already-recovered owners, which is what pins every parameter's role: games/gs1/recon/en/main/08005d10.c has 'Func_0800307c(7, 0, Func_08006240)' (index 7, second argument unused so 0, a real handler pointer); games/gs1/src/link/serial/remove_serial_irq_handlers.c has 'Func_0800307c(7, 0, (InterruptHandler)(handler = 0))' and 'Func_0800307c(handler, 0, 0)' with handler==6 (NULL handler to remove a slot, second argument still unused so 0); games/gs1/src/runtime/callbacks/remove_irq_handler_slot2.c has 'Func_0800307c(2, 0, 0)' (index 2 = V-Counter, disable); and games/gs1/src/unidentified/main/field/field_owner_104.c has 'Func_0800307c(2, 136, (InterruptHandler)address)' -- index 2 is the V-Counter IRQ and 136 is a plausible V-Count scanline value, which is what identifies the second parameter's V-Count role and confirms it is only meaningful for index==2.","Hand-traced instruction-by-instruction against games/gs1/asm/0800307c.s: the >13 bound, the REG_IE bic/orr-by-mask pattern, the 8< 136.","Data_030000e0[index] write, else-branch variants: a shared `InterruptHandler *slot = &Data_030000e0[index];` used by both branches, and a `InterruptHandler def = ...; Data_030000e0[index] = def;` temp-then-store form -- both changed the else-branch's internal ldr/lsls ordering but net regressed (candidate grew and the branch polarity/shared-join structure diverged further from the reference's separate-branches-to-one-join shape). Rejected; kept the plain direct `if (handler != 0) Data_030000e0[index] = handler; else Data_030000e0[index] = default;` form, which already matches the then-branch exactly and is off by only one instruction's position in the else-branch."],"remaining":"Every remaining byte of the 64 differing halfwords / 40 wrong instructions traces to one root cause: 'REG_IME = 0;' (the interrupt-disable at function entry) compiles on this owner's route to `ldr r2,[address]; ldrh r3,[r2]; adds r6,r3,#0; ldr r3,[pool 0]; strh r3,[r2]` (loading the constant 0 through a pooled halfword), while the reference instead reuses the already-loaded address register itself as the store source -- `ldr r3,[address]; ldrh r2,[r3]; adds r6,r2,#0; strh r3,[r3]` -- storing 0x04000208 truncated to 16 bits (0x0208) into REG_IME, which still functionally disables IME since the hardware only implements bit 0 (clear here). Confirmed this is not a mistake in this draft specifically: the minimal isolated statement `*(volatile u16*)0x04000208 = 0;` alone, compiled through this project's default routing (equivalently explicit `--family gcc296`) for an unregistered source, ALSO produces the pooled-halfword-load shape, not the reference's self-store -- and games/gs1/recon/en/main/0800300c.c's own already-committed draft (a sibling owner, same statement, same 'canonical-gcc296' route per its own dossier) shows the identical pooled-halfword-load shape for its own 'REG_IME = 0;', diverging from ITS OWN reference's plain `movs r5,#0; strh r5,[r6]` in the same way -- so this is a pre-existing, shared, unexplained residual class across at least two owners in this translation unit, not something specific to this draft's source shape. Tried and rejected as fixes: `REG_IME = (u16)(u32)®_IME;` (self-referential cast, hypothesizing the compiler might CSE the address computation into the store) -- produced byte-identical output to plain `=0`, i.e. GCC re-derives a fresh pooled constant for the second use rather than reusing the register live from the first read; explicit `--family old-agbcc` (matches games/gs1/src/save/atmel/erase_sector.c's own real, exact-adopted `saved=*(vu16*)ADDR; *(vu16*)ADDR=0;` idiom, confirmed by direct candidate-show comparison to legitimately compile to plain `mov r0,#0; strh r0,[r1]`) -- correct plain-movs shape, but NOT the reference's self-store, and old-agbcc is very unlikely to be this owner's real route given its immediate, gapless adjacency to 0800300c (0x0800300c + 112 = 0x0800307c exactly), which is already established canonical-gcc296; `--flags -O1` / `--remove-flags -O2 --flags -O1` on the isolated statement -- produced byte-identical output to -O2, no effect. This residual, and its cascade (the extra pooled halfword forces GCC to insert an early inline literal pool plus a branch-over and alignment padding after the REG_IE store, which then phase-shifts every subsequent pc-relative literal offset and, per objdiff's raw-instruction alignment, every downstream instruction in the printed diff -- none of which are independent additional errors), account for the entire measured gap. No length mismatch beyond this single 12-byte overage (136 vs 124); every field value, branch condition, and call/store target matches the reference algorithm exactly.","notes":["No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used.","Recovered only from games/gs1/asm/0800307c.s (hand-traced instruction-by-instruction and literal-pool-address-verified), already-adopted/already-measured sibling owners and headers in this repository (serial_runtime_family.h; games/gs1/recon/en/main/0800300c.c and .json; games/gs1/recon/en/main/08005d10.c; games/gs1/src/link/serial/remove_serial_irq_handlers.c; games/gs1/src/runtime/callbacks/remove_irq_handler_slot2.c; games/gs1/src/unidentified/main/field/field_owner_104.c; games/gs1/src/runtime/dispatch/reserved_no_op_f.c; games/gs1/src/save/atmel/erase_sector.c used only to compare compiler-route behavior, not as a semantic source), the approved local ROM, and the approved compiler's own routing/flag machinery (tools/compiler-core/src/routing.rs, read directly to understand family/flag selection). No other Golden Sun decompilation project, symbol map, or disassembly was consulted; the family-transplant guess (advance_cycle.c, 7318/10000, below threshold) was read and rejected as an unrelated shape-only match, not used as evidence.","Not registered in games/gs1/source-paths.json: several not-yet-exact sibling owners (e.g. main:0800300c/Runtime_InitIwramAndInterrupts) carry a documentation-only name in their own dossier without a source-paths.json entry. This candidate claims zero DONE bytes, so it does not require a progress-report refresh. The name above is evidence-backed and ready to register when the owner is adopted or its shared translation unit is reconstructed.","This candidate claims zero DONE bytes (differing_halfwords must be 0 for adoption)."]},"main:0800383c":{"status":"proven-retained","classification":"io_write_queue_scheduler_module","span_bytes":64,"edition":{"role":"derived-edition-candidate","edition":"en","rebase_status":"ja-owner-not-yet-recovered"},"score":{"measured":"2026-08-25","candidate_bytes":64,"reference_bytes":64,"differing_halfwords":4,"wrong_instructions":0,"class":"ordering","note":"The coherent video/DMA translation unit preserves the 64-byte extent and aligned instruction stream. The residual is two adjacent instruction-order swaps in the owner head. This candidate claims zero DONE bytes."},"family":{"owners":["0800383c","0800387c","080038bc","080038fc","0800393c","0800397c","080039bc","080039fc","08003a3c"],"owner_bytes":576,"delay_values":["0x10000","0x20000","0x30000","0x50000","0x60000","0x70000","0x90000","0xa0000","0xb0000"],"difference":"Direct ROM comparison finds no body difference outside the delay materialization at owner offsets 0x28 and 0x2a; the 0x20000 sibling changes only one of those halfwords. Every other instruction and both pool words agree.","shared_candidate_score":{"candidate_bytes":64,"reference_bytes":64,"differing_halfwords":4,"wrong_instructions":0,"owners_measured":9}},"cross_edition":{"owner_bytes":64,"relocation_bytes":8,"core_bytes":56,"core_identical_for_all_nine":true,"edition_starts":{"ja":"en + 0x00","en":"listed owner","de":"en + 0x30","es":"en + 0x60","fr":"en + 0x10","it":"en + 0x40"},"note":"Each of the nine relocation-bearing candidates uniquely locates one 64-byte owner in every edition; all 54 comparisons have zero core differences."},"domain":"Queues one memory-mapped write and its destination for delayed execution while preserving interrupt-master state.","expressed":["the 32-entry queue bound","the 12-byte value/address/delay record layout","interrupt-master save, disable spelling, and restore","the first owner's 0x10000 delay"],"remaining":[{"op":"instruction ordering","count":2,"where":"the coherent unit emits the argument save before the queue-base load and the interrupt-master save after its disable store; the reference uses the opposite order at both sites"}],"rejected_experiments":[{"experiment":"20,000 heat-guided classic ordinary-C permutations","result":"no candidate improved the allocation residual or reached zero"},{"experiment":"volatile queue access, raw integer bases, nested pointer lifetimes, post-increment and structured record spellings, and old-agbcc","result":"all either retained the pointer swap or introduced extra loads, spills, or prologue registers"},{"experiment":"the nine existing GCC 2.96 owner-route flag families","result":"against the earlier isolated-owner source, none reached zero; seven preserved its 13-halfword allocation residual, -fno-cse-skip-blocks regressed to 29, and -fno-schedule-insns2 still differed in 10 halfwords"},{"experiment":"joint family transfer through one shared body and nine constant-only wrappers","result":"the earlier wrapper-only reconstruction left all nine at 13 differing halfwords. Reconstructing the complete surrounding translation unit later reduced every sibling to the current four-halfword ordering residual under canonical flags"},{"experiment":"joint declaration, integer-width, queue-view, raw-pointer, IME-pointer, early-destination, compiler-family, optimization, CSE, GCSE, scheduler, strength-reduction, regmove, and expensive-optimization matrix","result":"no isolated source/compiler pairing reached zero. This result predates the complete translation-unit reconstruction and is retained only as evidence that per-owner flag searches did not explain the reference."},{"experiment":"complete-unit follow-up over the shared nine-owner macro: canonical scheduling, both scheduler toggles, regmove, CSE-follow, CSE-skip, expensive-optimization, declaration/scope order, register hints, direct-global access, and a shared inline helper","result":"the representative 0800383c owner remained at the canonical four-halfword ordering residual for every neutral flag and register-hint variant; -fno-schedule-insns2 regressed to eight, declaration/scope variants regressed to thirteen, the inline helper to twenty-three, and direct-global access to twenty-five. The shared source shape therefore remains the best bounded whole-unit result."},{"experiment":"complete-unit GCC scheduler-priority audit of the shared macro","result":"all nine owners have the same two source-ordering residuals: the queue literal load and destination preservation tie at priority 9, so canonical GCC selects the preservation first; after the interrupt-master load, the saved value copy has priority 4 while the disable store has priority 5, so GCC selects the store first. Neutral ordinary-C declaration, width, pointer, initializer, and control-flow variants did not change that graph or regressed."},{"experiment":"exact-sibling shape transfer (complete-unit inversion pass over the proven Scheduler_FindCallback combination: direct-global interrupt-master access, queue pointer bound before the critical region, saved at function scope)","result":"Scheduler_FindCallback (0x08004198, byte-exact, same 64-byte class, same save/disable/restore idiom) emits no saved-value copy at all -- its context keeps the loaded value in the load register -- so the proven sibling never faces either scheduling choice and its spelling transfers no ordering evidence. Measured in the complete unit under canonical flags: the full scheduler-shape transfer regressed the representative to 11 differing halfwords; binding the queue pointer before the interrupt-master pointer (site A's literal-first ask) regressed to 13, pinning the recorded declaration/scope family cell; hoisting saved to function scope alone tied the live macro exactly at the same 4-halfword residual with the same two swaps. The dependence graph is unchanged by every binding, scope, and sibling-shape axis; the residual remains the two recorded scheduler decisions and stays open per next -- it is not relabeled a compiler limitation."}],"next":"Keep the coherent translation unit as measured reconstruction evidence. A future family candidate must preserve the 64-byte extent, literal pools, and all-nine agreement while producing queue-literal-before-destination preservation and saved-IME-copy-before-disable-store under canonical GCC; do not relabel this bounded scheduler tie as a compiler limitation.","notes":["Recovered only from the retained owner assembly, approved local ROM, in-repository callers, and the approved compiler.","No external game source, copied instruction bytes, inline assembly, fixed-register variable, or compiler barrier was used."],"rejected":[{"hypothesis":"declare q before ime in DEFINE_QUEUE_IO_WRITE so the ime pool load is scheduled ahead of the parameter copies","measured":"2026-08-29","differing_halfwords":12,"baseline":2,"verdict":"regressed"},{"hypothesis":"read saved = *ime at the ime declaration and declare q afterwards","measured":"2026-08-29","differing_halfwords":9,"baseline":2,"verdict":"regressed"}]},"main:08003a7c":{"schema_version":1,"namespace":"main","address":"0x08003a7c","status":"proven-retained","owner_bytes":96,"translation_unit":"video-dma-queue","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":96,"reference_bytes":96,"differing_halfwords":35,"wrong_instructions":38,"matched_prefix":1},"behavior":"When the queue is nonempty, copies the fixed transfer-command executor to temporary RAM, invokes it with the queue and count, then clears the count.","probe":{"hypothesis":"An ordinary-C DMA descriptor representation can publish the source, destination, and control words with the reference standalone three-register transfer.","acceptance":"Canonical complete video-DMA queue composition is byte-exact and all eleven existing exact owners remain byte-exact.","tested":["direct scalar, compound-aggregate, volatile, nonvolatile, and post-increment DMA register stores","local, VLA-backed, and by-value three-word descriptors","count, zero, declaration-lifetime, and padding variants"],"result":"No canonical form emits the reference standalone three-register store followed by base restoration. Scalar and post-increment forms use scalar or one-register stores; aggregate forms use a twelve-byte staging copy with LDMIA/STMIA and grow to 108 or 112 bytes. Removing the existing padding probe regresses to 92 bytes and 44 differing halfwords."},"remaining":"The current VLA and call behavior are credible, but the reference needs a standalone DMA publication with the count, zero, and control-base lifetimes allocated differently. The approved compiler's volatile multiple-transfer and BLKmode paths explain the tested alternatives, but do not prove that no ordinary-C source can emit the owner. Retain structured assembly; no permanent compiler classification is claimed.","notes":["All measurements compile the complete declared video-dma-queue reconstruction composition once with canonical GCC 2.96.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, compiler modification, or per-owner flag override was used.","This candidate claims zero DONE bytes.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08003adc":{"schema_version":1,"namespace":"main","address":"0x08003adc","status":"exact","owner_bytes":146,"candidate_bytes":146,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","translation_unit":"video-dma-queue","compiler_route":"canonical-gcc296","source_shape":{"branch_join":"Each mode branch assigns both the blend-control value and its BLDCNT lvalue before the common store.","post_store_lifetime":"A scoped pointer owns the remaining-frame counter after the BLDCNT write.","compiler_result":"GCC 2.96 merges the branch results into r3, keeps the coefficient in r2, emits the BLDCNT address and store before loading the counter into r6, and reproduces the reference literal pool."},"proof":{"complete_translation_unit":"146/146 bytes, zero differing halfwords","production_source":"146/146 bytes, zero differing halfwords","compiler_flags":"canonical; no per-owner override"},"notes":["The final source is ordinary C: it uses no inline assembly, fixed-register variable, compiler barrier, forbidden ABI attribute, copied instruction bytes, compiler modification, or flag override.","The duplicated pointer assignment preserves the two branch-local lvalue ancestries that GCC tail-merges at the common store; it is semantically ordinary and has no side effects.","Recovered only from the retained owner, approved local ROM, in-repository callers and types, local m2c structure, and GCC 2.96 pass evidence."]},"main:08003e10":{"schema_version":1,"namespace":"main","address":"0x08003e10","status":"proven-retained","owner_bytes":72,"candidate_bytes":72,"differing_halfwords":13,"wrong_instructions":16,"translation_unit":"video-dma-queue","compiler_route":"canonical-gcc296","algorithm":"Allocates a fixed-size executable buffer, DMA-copies a ROM routine into it, calls the copied routine through the r6 call veneer, then frees the buffer.","family":{"siblings":["08002fb0","08005340","08005394","080053e8"],"evidence":"Each sibling has the same allocator, three-word DMA setup, r6 indirect-call veneer, and free sequence; only its arguments, copy extent, or source vary."},"credible_shapes_tried":["volatile compound DMA-register aggregate assignment: canonical score unchanged","word-typed DMA-register aggregate assignment: canonical score unchanged","local three-word descriptor followed by assignment: emits a related LDMIA/STMIA copy, but adds a 12-byte stack object (80 versus 72 bytes; 36 differing halfwords)","volatile and ordinary word-pointer post-increment stores: retain the 72-byte extent but emit separate one-register stores rather than the reference grouped store","static inline three-scalar DMA publisher: retains scalar stores, grows to 76 versus 72 bytes, and scores 30 differing halfwords","shared StartDmaTransfer() inline helper (video_dma_family.h, same one 08003a7c uses), called both with pre-loaded locals in source/destination/control order and with inline literal arguments: both lower to three separate one-register str instructions, 72 bytes, 16 differing halfwords (worse than the plain field-store baseline, and still no stmia)","compound-literal aggregate store `*dma = (struct DmaChannel){src, dst, ctl};` through the same non-volatile pointer: byte-identical candidate output to the plain per-field store baseline (72 bytes, 13 differing halfwords) -- confirms the aggregate-assignment shapes above reduce to the same field-by-field lowering","reordering the three dma-> field assignment statements (destination-first, and other orderings) and moving the dma-pointer computation earlier: no effect on emitted bytes for the reachable orderings (byte-identical to baseline), or strictly worse when the dma pointer is forced to survive the Func_08004938 call (80 bytes, needs an extra callee-saved register)","2026-08-27: swapping the control expression to `0x84000000 | (size >> 2)` (matching the reference's compute-the-flag-constant-first order): no effect, still 13 differing halfwords","2026-08-27: re-tried destination-first field order independently (dma->destination before dma->source): confirmed byte-identical to baseline, corroborating the prior reordering finding","2026-08-27: introducing an explicit `void *savedArgument = argument;` local at function entry (to try to delay the compiler's r8 spill of the parameter until after the size literal load, matching the reference's mov-r8-before-ldr-r5 order): no effect on emitted bytes; the spill/literal-load ordering is not reachable through plausible C-level statement reordering"],"compiler_backend_evidence":"Read alchemy-gcc/agscc/gcc/config/arm/arm.c and arm.md directly: the STM-combining logic that could explain the reference's single `stmia r3!, {r0,r1,r2}` from three independently sourced words (store_multiple_sequence/emit_stm_seq, patterns *stmsi and *stmsi_postinc) is gated `TARGET_ARM` only (arm.md ~4990-5083); Thumb has no analogous peephole. The only Thumb multi-register store insns are movmem8b/movmem12b (thumb_expand_movstrqi, arm.md ~5111-5155; output routine thumb_output_move_mem_multiple, arm.c ~9425), and their asm template unconditionally emits a paired `ldmia`+`stmia` (a genuine block copy between two memory regions) as a single indivisible multi-set insn -- it can never emit the stmia half alone. This is independent of volatility (the ARM-only peephole additionally excludes MEM_VOLATILE_P operands, but that exclusion never even applies to Thumb, which has no candidate peephole regardless). Given no Thumb-reachable machine pattern in this compiler route folds three independently computed register values into one STM without a paired load, the reference's standalone grouped store looks structurally unemittable from ordinary field-store or aggregate-store C on this compiler; this matches, and mechanically explains, the 'canonical score unchanged' results recorded above.","remaining":"The reference groups the source, allocated destination, and control word in a writeback three-register store, then restores the DMA base. Canonical ordinary-C shapes instead keep those values in a nonconsecutive allocation or introduce a stack descriptor. GCC 2.96's Thumb block-copy path explains the local-descriptor LDMIA/STMIA result, but does not account for the reference's standalone grouped store. Compiler-source inspection (see compiler_backend_evidence) shows Thumb has no store-multiple peephole outside the always-paired LDMIA/STMIA block-copy pattern, so no ordinary field-store or aggregate-store C shape reaches the reference's lone STM. The shared original DMA-write source shape remains unknown; neither adoption nor a permanent compiler classification is justified from this evidence alone.","notes":["Measured only in the complete canonical video-dma-queue translation unit; no per-owner flags were used.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used.","This candidate claims zero DONE bytes.","2026-08-27: independently re-read alchemy-gcc/agscc/gcc/config/arm/arm.md (the actual source, not just the prior session's citation) and confirmed compiler_backend_evidence firsthand: *stmsi and *stmsi_postinc (arm.md ~5023-5083) are gated `TARGET_ARM`, and the store_multiple define_expand that would canonicalize independently-sourced register stores into one parallel STM set is also `TARGET_ARM`-only (~4999-5020). The only Thumb multi-register block insns, movmem8b/movmem12b (~5111-5155), require a MEM source at each offset (`(mem:SI (plus:SI (match_dup 1) (const_int N)))`), i.e. a genuine memory-to-memory copy -- they cannot fire when the three stored values are independently computed registers (source literal, allocated pointer, computed control word) as in this owner. This confirms the reference's standalone `stmia r3!, {r0,r1,r2}` is unreachable from any register-sourced C shape on this Thumb compiler route, independent of statement order or aggregate-vs-field-store style.","2026-08-27: tried three additional narrow variants beyond the prior session's list (control-expression operand order, an independent destination-first re-check, and an artificial early-argument-use local to influence the r8-spill/literal-load scheduling order) -- see credible_shapes_tried. None changed the score; candidate-show reproducibly reports candidate=72 reference=72 differing_halfwords=13 wrong_instructions=16 class=unemittable. Left games/gs1/recon/en/main/08003e10.c unchanged (byte-identical to the version already in the tree) since no variant beat the existing baseline.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08003e58":{"schema_version":1,"namespace":"main","address":"0x08003e58","status":"measured-draft","owner_bytes":124,"executable_owner_bytes":124,"candidate":{"coherent_translation_unit":{"candidate_bytes":120,"reference_bytes":124,"differing_halfwords":56,"wrong_instructions":54},"best_bounded_axis":{"scope":"complete-unit diagnostic after recovering the selected-position result carrier","flags":["-fno-gcse"],"candidate_bytes":124,"reference_bytes":124,"differing_halfwords":40,"wrong_instructions":52}},"cross_edition":{"owner_bytes":124,"relocation_bytes":8,"core_bytes":116,"core_identical":true,"editions":{"ja":"0x08003e58","en":"0x08003e58","de":"0x08003e88","es":"0x08003eb8","fr":"0x08003e68","it":"0x08003e98"}},"behavior":["rejects resource-table identifiers above 95","converts the requested byte size to 64-byte blocks","searches a 512-byte ownership map for a contiguous free run marked 0xff","skips occupied runs by reading their resource-table entry size","marks an accepted run with the identifier and returns its byte offset"],"bounded_search":{"exact":false,"canonical_best_differing_halfwords":56,"canonical_best_candidate_bytes":120,"tested":["sixteen finite canonical full-unit variants across function- and block-scope pointer declarations, initialization orders, const and ordinary register qualifiers, pointee volatility, pointer/integer views, and a zero-offset map aggregate","direct-global, local-pointer, mixed-alias, and raw-address diagnostics for the ownership map and resource table","while and guarded do-while free-run scans, separate and shared start/result temporaries, success-label layouts, and indexed versus pointer-induction mark loops","a canonical shared-result source shape that materializes the selected position before computing the requested run end","canonical complete-translation-unit compilation throughout, plus a diagnostic -fno-gcse compile of the strongest all-local pointer ancestry","a bounded contiguous resource-table reconstruction-composition probe in ROM order, retaining 08003fa4 as assembly: 08003ed4, 08003f04, 08003f3c, 08003f78, 0800403c, 08004080, 080040b4, and 080040d0 all remained 0-difference while this owner stayed 116/124 bytes with 56 differing halfwords"],"result":"No ordinary-C canonical shape reached exactness or simultaneously recovered the reference's id, block-count, scan-map, store-map, and table register roles. The retained indexed global mark loop reproduces the reference's six-instruction store loop; coupling the selected position to the result carrier preserves 120 bytes and 56 differing halfwords while reducing wrong instructions to 54. The contiguous resource-table probe preserved every exact neighbor but did not improve this owner, so its semantic and physical family alone is not evidence for a production-composition move."},"remaining":"The complete algorithm and owner boundary are established, but the coherent canonical translation-unit build remains four bytes short. GCC's GCSE pass copy-propagates the scan-map assignment from the store map, removing the reference's long-lived scan-map/store-map distinction and shifting the id/block-count allocation. A bounded resource-table composition retaining 08003fa4 as assembly preserved all eight exact neighbors but left this owner at 116/124 and 56 differing halfwords, so it does not justify moving the production composition. A noncanonical -fno-gcse diagnostic restores the 124-byte extent but still leaves 40 differing halfwords and 52 wrong instructions; neither exact adoption nor a permanent compiler classification is justified.","notes":["Recovered only from retained assembly, approved local GS1 ROMs, neighboring exact resource-table owners, and the approved compiler.","The contiguous resource-table run is recorded as a semantic/physical reconstruction-composition probe only; the manifest continues to assert that original translation-unit boundaries are unknown.","The raw-address diagnostic reached 124 bytes and 51 differing halfwords only by adding a duplicate ownership-map pool entry; it was rejected in favor of the named linker-resolved symbol and coherent source.","No inline assembly, fixed-register variable, compiler barrier, ABI trick, compiler modification, or per-owner flag override was used.","This candidate claims zero DONE bytes."],"rejected_experiments":[{"experiment":"independent symbol re-reference for the scan base (u8 *scan_map = Data_03001810; instead of = map;), complete-unit canonical","result":"Identical 120/124 bytes and 56 differing halfwords: GCSE still unifies the second symbol reference with the first and collapses the scan/store base distinction, so the PRE-inserted copy does not survive as hoped. Unlike the rejected raw-address diagnostic this adds no duplicate pool entry, but it changes nothing under canonical flags."}]},"main:08003fa4":{"schema_version":1,"namespace":"main","address":"0x08003fa4","status":"proven-retained","owner_bytes":152,"executable_owner_bytes":152,"candidate_bytes":160,"differing_halfwords":76,"wrong_instructions":70,"cross_edition":{"object_bytes":152,"relocation_bytes":12,"literal_bytes":16,"relocation_normalized_core_bytes":124,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08003fa4","en":"0x08003fa4","de":"0x08003fd4","es":"0x08004004","fr":"0x08003fb4","it":"0x08003fe4"}},"domain":"Allocates or reuses a cached VRAM block, optionally fills or DMA-loads it, and returns its tile index.","expressed":["validates the cache slot and maximum block size","reuses a same-sized cached allocation or frees and reallocates a changed entry","records the size and VRAM offset in the slot cache","supports no-load, shared-fill, and DMA-copy source modes","returns the allocated VRAM offset as a 32-byte tile index"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is eight bytes long with 76 differing halfwords and fails exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 152 executable bytes and proves all 124 relocation-normalized core bytes identical across the six approved GS1 editions.","The residual spans cache-entry address lifetime, allocator result placement, sentinel-source control flow, and volatile DMA scheduling rather than a localized compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect caller 0809b698, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08004838":{"schema_version":1,"namespace":"main","address":"0x08004838","status":"proven-retained","owner_bytes":32,"executable_owner_bytes":32,"candidate_bytes":32,"differing_halfwords":4,"wrong_instructions":6,"classification":"thumb_multiple_transfer_module","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":16,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"mode":"classic-walk","candidates":20000,"exact":false,"best_differing_halfwords":4,"best_structural_rows":5,"perm_general_statement_order":{"choices":6,"attempted":6,"best_differing_halfwords":4,"note":"All 6 field-write statement orders tried via PERM_GENERAL over dma->source/destination/control (out/permute/08004838/report.json); the retained order (control, destination, source) is the unique floor at 4 -- every other order regresses to 6 by scrambling which hard register (r0/r1/r2) holds which field value relative to the reference."}},"notes":["Publishes a source address, palette destination, and transfer control word through DMA3. The current standalone canonical score is 32/32 bytes, 4 differing halfwords, and 6 wrong instructions (matched_prefix=4: all four literal-pool loads into r3/r0/r1/r2 already match the reference byte-for-byte).","The retained owner is already covered by the proven thumb_multiple_transfer_module matcher: its standalone three-register STMIA cannot be emitted from ordinary approved C by the target compiler. Confirmed directly against this route's backend (alchemy-gcc/gs1cc/gcc/config/arm/arm.c thumb_output_move_mem_multiple/thumb_expand_movstrqi and arm.md movmem12b/movmem8b/store_multiple): Thumb's only multi-register-stmia-emitting pattern (movmem12b/8b) always prints a paired ldmia immediately before the stmia as one indivisible output_asm_insn pair for a genuine memory-to-memory block move, and the dedicated ARM store-multiple expander/peepholes are gated TARGET_ARM only with no Thumb equivalent -- so a lone grouped stmia sourced from three independently computed register values (as the reference has, with no preceding ldmia) is unreachable from any ordinary C shape on this compiler route. A local struct-temporary copy and a static-inline struct-by-value-returning helper both confirmed empirically: each instead lowers through the paired movmem12b shape via a stack-materialized 12-byte object (extra sub sp/add sp the reference does not have), never the reference's unpaired form. No duplicate permanent classification was added.","The remaining 4 differing halfwords are exactly the reference's stmia r3!,{r0,r1,r2} / subs r3,#12 / (trailing pool-alignment nop movs r0,r0) vs. this candidate's three discrete str's / (no alignment nop needed, since its 8-halfword body is already 4-byte aligned before the literal pool while the reference's 7-halfword body needs the pad) -- a compiler-level residual, not a source-shape mistake.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080049ac":{"schema_version":1,"namespace":"main","address":"0x080049ac","status":"proven-retained","owner_bytes":60,"executable_owner_bytes":60,"candidate_bytes":64,"differing_halfwords":28,"wrong_instructions":34,"cross_edition":{"object_bytes":60,"relocation_normalized_core_bytes":44,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080049ac","en":"0x080049ac","de":"0x080049dc","es":"0x08004a0c","fr":"0x080049bc","it":"0x080049ec"}},"domain":"Allocates the render transform workspace, clears its active marker, and resets three four-word transform records to their identity scale.","expressed":["allocates two 48-byte render work records","publishes the allocation and clears the associated state word","initializes three transform records with 16.16 identity scale and zeroed remaining fields"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is four bytes long with 28 differing halfwords and misses the <=20-halfword admission gate."},"notes":["Independent object analysis bounds this leaf at 60 executable bytes and proves all 44 relocation-normalized core bytes identical across the six approved GS1 editions.","The remaining mismatch is dominated by allocation-address lifetime and the compiler's scalar store schedule instead of the original three four-register STMIA writes.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered battle-presentation caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08004bd4":{"schema_version":1,"namespace":"main","address":"0x08004bd4","status":"proven-retained","owner_bytes":72,"executable_owner_bytes":72,"candidate_bytes":76,"differing_halfwords":29,"wrong_instructions":30,"cross_edition":{"object_bytes":72,"relocation_bytes":12,"literal_bytes":4,"relocation_normalized_core_bytes":56,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08004bd4","en":"0x08004bd4","de":"0x08004c04","es":"0x08004c34","fr":"0x08004be4","it":"0x08004c14"}},"domain":"Builds and publishes the pitch rotation matrix used by the battle-presentation camera.","expressed":["computes the fixed-point sine and cosine for the requested angle","initializes the three-record identity transform","places cosine, sine, and negated sine in the X-axis pitch rotation cells","publishes the complete transform to the shared scene workspace"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is four bytes long with 29 differing halfwords and misses exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this leaf at 72 executable bytes and proves all 56 relocation-normalized core bytes identical across the six approved GS1 editions.","The trigonometric call lifetimes match closely; the remaining residual is dominated by the original grouped STMIA matrix initialization versus readable scalar stores.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered transition-scene caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08004c1c":{"schema_version":1,"namespace":"main","address":"0x08004c1c","status":"proven-retained","owner_bytes":80,"executable_owner_bytes":80,"candidate_bytes":76,"differing_halfwords":39,"wrong_instructions":38,"cross_edition":{"object_bytes":80,"relocation_bytes":12,"literal_bytes":4,"relocation_normalized_core_bytes":64,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08004c1c","en":"0x08004c1c","de":"0x08004c4c","es":"0x08004c7c","fr":"0x08004c2c","it":"0x08004c5c"}},"domain":"Builds and publishes the yaw rotation matrix used by the battle-presentation camera.","expressed":["computes the fixed-point sine and cosine for the requested angle","initializes the three-record identity transform","places cosine, sine, and negated sine in the Y-axis yaw rotation cells","publishes the complete transform to the shared scene workspace"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is four bytes short with 39 differing halfwords and misses exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this leaf at 80 executable bytes and proves all 64 relocation-normalized core bytes identical across the six approved GS1 editions.","The ROM keeps sine in r8 across the three grouped STMIA initializers. Readable scalar initialization produces a different old-GCC lifetime and store schedule rather than a localized residual.","The sibling at 08004bd4 was corrected to SceneTransform_ApplyPitch after auditing the matrix cells; 08004c1c is the Y-axis yaw transform.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered transition-scene caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08004cb4":{"schema_version":1,"namespace":"main","address":"0x08004cb4","status":"proven-retained","owner_bytes":60,"executable_owner_bytes":60,"candidate_bytes":64,"differing_halfwords":31,"wrong_instructions":36,"cross_edition":{"object_bytes":60,"relocation_bytes":4,"literal_bytes":4,"relocation_normalized_core_bytes":52,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08004cb4","en":"0x08004cb4","de":"0x08004ce4","es":"0x08004d14","fr":"0x08004cc4","it":"0x08004cf4"}},"domain":"Builds the three-record identity scene transform, applies the requested position to its final record, and publishes it to the scene transform workspace.","expressed":["initializes three four-word transform records with 16.16 identity scale","copies the requested x, y, and z position into the final transform record","publishes the complete 48-byte transform through the shared scene workspace helper"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is four bytes long with 31 differing halfwords and misses exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this leaf at 60 executable bytes and proves all 52 relocation-normalized core bytes identical across the six approved GS1 editions.","The residual is dominated by the original three four-register STMIA initializers and the source-pointer lifetime; readable scalar initialization produces a different old-GCC store schedule.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered transition-scene caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080056cc":{"schema_version":1,"namespace":"main","address":"0x080056cc","status":"proven-retained","owner_bytes":322,"translation_unit":"save-state","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":322,"reference_bytes":322,"differing_halfwords":109,"wrong_instructions":141,"matched_prefix":10},"signedness_correction":{"baseline_differing_halfwords":110,"baseline_wrong_instructions":143,"evidence":"The reference uses unsigned control branches for the retry counter, slot index, and returned slot status; canonical GCC 2.96 emits those branches from u32 locals."},"remaining":"The reference retains the workspace in fp with a 24-byte frame containing the slot base, zero word, and header. The current ordinary-C DMA member stores keep a different long-lived allocation and a 28-byte frame. Aggregate DMA stores lower to memcpy, while a volatile post-increment probe reaches the 24-byte frame but not the reference workspace allocation or length.","notes":["The complete declared save-state reconstruction composition was compiled once with canonical GCC 2.96.","All eight declared exact-C owners remained byte-exact after the local u32 correction.","The source remains ordinary C; no inline assembly, fixed-register variable, barrier, forbidden ABI, copied instruction bytes, compiler modification, or per-owner flag override was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08005920":{"schema_version":1,"namespace":"main","address":"0x08005920","status":"proven-retained","owner_bytes":344,"translation_unit":"save-state","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":344,"reference_bytes":344,"differing_halfwords":53,"wrong_instructions":66,"matched_prefix":9},"signedness_correction":{"baseline_differing_halfwords":55,"baseline_wrong_instructions":70,"evidence":"The two locally returned slot indices are u32, and both reference comparisons against 15 use an unsigned branch."},"notes":["The complete declared save-state reconstruction composition was compiled once with canonical GCC 2.96.","All eight declared exact-C owners remained byte-exact after the local u32 correction.","The source remains ordinary C; no inline assembly, fixed-register variable, barrier, forbidden ABI, copied instruction bytes, compiler modification, or per-owner flag override was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08005a78":{"schema_version":1,"namespace":"main","address":"0x08005a78","status":"retained-assembly","owner_bytes":72,"translation_unit":"save-state","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":72,"reference_bytes":72,"differing_halfwords":8,"wrong_instructions":12,"matched_prefix":10},"resolved_asm_classification":{"kind":"thumb_multiple_transfer_module","retention":"keep_structured_asm","confidence":"proven"},"bounded_source_shapes":["Direct aggregate assignment, scalar fields, local nonvolatile pointer, and nonvolatile DMA-view forms all remain 72/72 bytes with 8 differing halfwords: GCC emits three scalar stores.","A post-incremented volatile DMA-word view remains 72/72 bytes with 8 differing halfwords. It emits two one-register STMIA stores and one scalar store, not the reference three-register transfer.","A static inline aggregate-by-value writer emits the requested LDMIA/STMIA pair, but constructs the compound descriptor on the stack: 84/72 bytes, 41 differing halfwords, and 30 wrong instructions.","Static inline scalar and four-argument writers remain 72/72 bytes but regress to 19 differing halfwords and 28 wrong instructions; the inlined stores remain scalar.","A register aggregate plus an inline writer introduces two stack copies: 92/72 bytes, 45 differing halfwords, and 34 wrong instructions."],"remaining":"The reference publishes the three-word DMA command through a standalone three-register STMIA with base restoration. Canonical GCC 2.96 Thumb lowering emits single-register moves or, for a 12-byte memory copy, an immediately paired LDMIA/STMIA block copy. No tested ordinary-C lifetime or aggregate shape emits the standalone transfer.","notes":["All measurements compiled the complete declared save-state reconstruction composition once; existing exact owners remained exact under the canonical route.","The assembly classifier confirms this owner as thumb_multiple_transfer_module (1 owner, 72 bytes).","No inline assembly, fixed-register variable, compiler barrier, ABI escape, copied instruction bytes, compiler modification, or per-owner production flag override was used."]},"main:08005d10":{"schema_version":1,"namespace":"main","address":"0x08005d10","status":"proven-retained","owner_bytes":350,"candidate_bytes":350,"differing_halfwords":115,"wrong_instructions":84,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Saves REG_IME, self-writes REG_IME with its own address, registers two interrupt handlers via Func_0800307c, disables IME, clears the VBlank/serial bits pending in REG_IE/REG_IF, cycles REG_RCNT/REG_SIOCNT to select general-purpose serial mode and arms multiplayer SIOCNT bits, re-enables IME, DMAs a zero word into the SERIAL_RUNTIME block via DMA3, initializes SERIAL_RUNTIME's send_index and send/incoming/ready/pending buffer pointers into its storage[], re-enables the serial IRQ, clears SERIAL_TRANSFER/SERIAL_ACTIVE_A/B state, calls Func_0800651c, and restores the original REG_IME.","evidence":["Field values, header addresses (REG_IME/REG_IE/REG_IF/REG_RCNT/REG_SIOCNT/REG_SIOCNT16/DMA3/SERIAL_RUNTIME/SERIAL_ACTIVE_A/B/SERIAL_VALUE_A/B) and struct layout all come from games/gs1/recon/en/main/serial_runtime_family.h, already shared by this owner's sibling translation-unit members (08005d10 through 0800651c); semantic values already match the reference literal pool byte-for-byte (0xff3f, 0x8000, 0x1000, 0x2000, 0x4003, 0x85000058, etc. all appear verbatim in games/gs1/asm/08005d10.s's pools), so the residual below is pure instruction-scheduling / register-allocation shape, not a value or algorithm error.","games/gs1/asm/08005d10.s (the retained byte-exact reference disassembly) shows a single `stmia r3!, {r0, r1, r2}` / `subs r3, #12` for the DMA3 descriptor write (source=&zero, destination=SERIAL_RUNTIME, control=0x85000058), with no matching `ldmia` nearby."],"credible_shapes_tried":["Baseline: DMA3->source/destination/control written through the TU-wide `volatile struct DmaRegisters *DMA3` macro (plain per-field volatile stores): 350/350 bytes, 117 differing halfwords -- three separate `str` instructions, no stmia.","Adopted improvement: a locally-scoped, non-volatile `struct DmaRegistersRW` alias to the same 0x040000d4 block (see in-file comment), used only for this store: 350/350 bytes, 115 differing halfwords. Confirmed via alchemy-gcc/gs1cc/gcc/config/arm/arm.c's store_multiple_sequence (~line 3572) that its consecutive-store combiner explicitly excludes MEM_VOLATILE_P operands, so the volatile qualifier alone was sufficient to suppress any chance of a combined store; removing it is necessary but, on this owner, not sufficient (below).","All 6 permutations of the source/destination/control field-store statement order (with the non-volatile alias): all either matched the adopted 115-differing-halfword result (src,dst,ctl / dst,src,ctl / dst,ctl,src / ctl,dst,src) or regressed to 122 (src,ctl,dst / ctl,src,dst). None produced a combined stmia.","A local `struct SerialRuntime *runtime = SERIAL_RUNTIME;` (function-scope and block-scoped variants) reused directly across send_index/send_buffer/incoming_buffer/ready_buffer/pending_buffer: measurably closer instruction shape (wrong_instructions dropped from 84 to 66) but candidate shrank to 346 bytes vs the 350-byte reference -- GCC reused the cached pointer directly instead of reference's repeated `mov r2,ip` / `mov r3,ip` / `mov r4,ip` copies, so this shape is 2 instructions shorter than the reference and was rejected as a length mismatch.","Re-deriving `runtime = SERIAL_RUNTIME;` at the top of each loop iteration/statement (forcing fresh reloads instead of one cached copy): restored the 350-byte length but regressed to 122 differing halfwords -- worse than the adopted non-volatile-alias draft."],"compiler_backend_evidence":"Read alchemy-gcc/gs1cc/gcc/config/arm/arm.c directly for this owner. Two independent Thumb code paths can ever emit the `stmia` mnemonic: (1) thumb_output_move_mem_multiple (~9425-9469), reached only from thumb_expand_movstrqi for a genuine memory-to-memory block copy, which always emits a paired `ldmia` immediately before the `stmia` as one indivisible RTL insn -- ruled out here since the reference has no nearby ldmia (already documented, for the sibling owner 0800300c, in 0800300c.json's compiler_backend_evidence); and (2) the generic consecutive-store combiner reachable from store_multiple_sequence (~3572), which merges same-base, ascending, adjacent-offset word stores into one `stmia`/`stmib`/`stmda`/`stmdb` but explicitly bails out with `if (MEM_VOLATILE_P (operands[nops + i])) return 0;` ('Don't reorder volatile memory references'). Path (2) is therefore only reachable when DMA3 is treated as non-volatile, which is what the locally-scoped `DmaRegistersRW` alias in this file provides. Even so, on this owner the combiner never actually fires: the freshly-compiled .s (scratch/candidate-show/08005d10/08005d10.s) shows the destination-value store scheduled after an intervening `b`-over-literal-pool from the other two field stores, so the three stores are never adjacent in the emitted instruction stream for the combiner's peephole to match, regardless of which of the 6 field-order permutations was tried.","remaining":"115 of 350 candidate bytes' worth of halfwords differ, concentrated in two scheduler-level residuals rather than any remaining semantic/value/type error: (1) the function's opening block (interrupt_enable = REG_IME; ime_reg = ®_IME; *ime_reg = ...; then the first Func_0800307c(7,0,Func_08006240) call) -- the reference's Haifa list scheduler places `sub sp, #4` and `adds r7, r3, #0` (saving interrupt_enable into the callee-saved r7) immediately after the REG_IME read and before the call-argument setup, while every source-statement ordering tried here instead hoists the independent `ldr r5, =Func_08006240` and the r0/r1 argument movs earlier, deferring `sub sp, #4` until just before the `bl`; both orderings are semantically and length-identical schedules of the same instruction set; and (2) the DMA3-descriptor-write region and everything downstream of it through the incoming/ready/pending-buffer loop and the final SERIAL_ACTIVE_A/B / SERIAL_VALUE_A/B stores, where the reference caches the SERIAL_RUNTIME base pointer once in `ip` and re-derives it into r1/r2/r3/r4 via cheap `mov` copies at each subsequent use, producing a register-naming pattern (and, per the literal-pool placement above, an unreachable stmia) that this owner's ordinary field-store and locally-scoped-pointer shapes were not able to reproduce byte-for-byte; the resulting register-name (not value) mismatches then cascade, unchanged in kind, through the rest of the function. No length mismatch remains (candidate_bytes == owner_bytes == 350); the residual is pure instruction ordering / register allocation inside otherwise-correct code.","notes":["No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used. The `DmaRegistersRW` type/macro is a locally-scoped, non-volatile alias for the same 0x040000d4 DMA3 register block already declared (volatile) in the shared serial_runtime_family.h; it does not modify that header or any other owner's source.","This candidate claims zero DONE bytes (differing_halfwords must be 0 for adoption).","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08005ee0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x08005ee0","status":"proven-retained","classification":"serial_runtime_compiler_scheduling_module","owner_bytes":234,"score":{"measured":"2026-08-29","candidate_bytes":232,"reference_bytes":234,"differing_halfwords":34,"wrong_instructions":29,"matched_prefix_instructions":13,"class":"missing-extra-code","note":"Two independent divergence clusters remain, both scheduling/register-allocation shaped rather than missing statements. Reusing the already-proved serial_error carrier for REG_IME=1 removes the spurious literal and improves the canonical result from 234/38/40 to 232/34/29. The reference still loads the REG_IE address later and derives the byte mask from the live one carrier. In the tail, the reference reloads SERIAL_RUNTIME after the two calls and keeps that new pointer in r7; caching the earlier pointer is semantically invalid because the calls may replace the global. Complete translation-unit scoring, the bounded source matrix, and canonical compiler routes reproduce this floor; all 194 relocation-normalized core bytes are identical across six editions. Structured assembly remains authoritative under serial_runtime_compiler_scheduling_module; the candidate does not claim exact C."},"exact_closure_revalidation":"2026-08-31: complete serial-runtime TU scoring reproduces 232/234 bytes, differing_halfwords=34, wrong_instructions=29, and equal branch topology. The decoder reports no unique source shape and all eight literal-pool words are exact. The named live-carrier repair is either byte-neutral under u8 folding or sharply regressive under s8; canonical source was restored. Together with the recorded condition, statement, width, tail-pointer, and canonical-pass matrix, this is an honestly bounded blocker; no adoption or DONE bytes are claimed.","rejected_experiments":[{"experiment":"decoder/aligned-diff named carrier repair: after REG_IME=1, spell the reference's live-one mask as `serial_error -= 66; byte &= serial_error` instead of `byte &= ~0x40`","result":"byte-identical to the 232/34/29 baseline: GCC constant-folds the u8 carrier back to movs #191. Changing only serial_error to signed s8 prevents that fold but regresses to 236 bytes, differing_halfwords 87, wrong_instructions 55. Both forms were rejected and canonical source restored."},{"experiment":"fuse ie=REG_IE;ie&=~0x80;ie|=0x40;REG_IE=ie; into REG_IE=(REG_IE&~0x80)|0x40; (drop local ie)","result":"worse: candidate grew to 242 bytes, differing_halfwords 85"},{"experiment":"fuse only ie&=~0x80;ie|=0x40; into ie=(ie&~0x80)|0x40; keeping ie=REG_IE and REG_IE=ie separate","result":"byte-identical to baseline (234/38) -- no effect"},{"experiment":"drop local ie entirely, use REG_IE&=~0x80; REG_IE|=0x40; as two compound-assignment statements","result":"worse: 246 bytes, differing_halfwords 84"},{"experiment":"declare ie as u16 / s32 / int instead of u32","result":"u16: much worse (256 bytes, dh 124). s32/int: byte-identical to baseline -- no effect"},{"experiment":"reorder *((volatile u8*)sio+1)&=~0x40; to occur before REG_IME=1; instead of after","result":"worse: 236 bytes, differing_halfwords 58"},{"experiment":"move state->mode=mode; to the top of the if-block (right after declarations) instead of at the end","result":"worse: 236 bytes, differing_halfwords 80"},{"experiment":"swap order of REG_IF=0xc0; and REG_TM3CNT=0xc963;","result":"worse: differing_halfwords 41 (same size)"},{"experiment":"write REG_IME=serial_error; as REG_IME=0; (literal instead of the variable known to be 0 there)","result":"byte-identical to baseline -- no effect"},{"experiment":"write *(sio+1)&=~0x40; as &=0xBF (direct hex instead of bitwise-not expression)","result":"byte-identical to baseline -- no effect"},{"experiment":"cast state->mode=mode; target/source as (u8)mode","result":"byte-identical to baseline -- no effect"},{"experiment":"widen mask30/mode/serial_error locals from u8 to u32","result":"each individually worse (mask30: dh 81, mode: dh 77, serial_error: dh 91 and also shrank candidate to 230 bytes)"},{"experiment":"swap condition order in `if (serial_error==0 && state->send_index==-1)` to `if (state->send_index==-1 && serial_error==0)`","result":"worse: differing_halfwords 49"},{"experiment":"cast state->send_index==-1 comparand as (s16)-1 or state->send_index as (s32)","result":"byte-identical to baseline -- no effect"},{"experiment":"cast sio as volatile u16* instead of volatile u32*","result":"worse: 238 bytes, differing_halfwords 111"},{"experiment":"cast control=*sio as (u32)*sio, or add a no-op (void)sio; statement, or switch(state->phase) -> switch((int)state->phase)","result":"byte-identical to baseline in each case -- no effect"},{"experiment":"tail: replace `packed = a | (b<<8);` with two statements `packed=a; packed|=b<<8;`","result":"byte-identical to baseline -- no effect"},{"experiment":"tail: replace `if(mode==8) packed|=0x80;` (and similarly the shift>1 check) with a ternary `packed |= cond ? X : 0;`","result":"byte-identical to baseline in each case -- no effect"},{"experiment":"tail: move `result=packed;` after all the |= checks instead of between the mode check and the is_parent check (operate on packed directly, assign result once at the end)","result":"byte-identical to baseline -- no effect"},{"experiment":"tail: reload `state = SERIAL_RUNTIME;` again right after the switch, then use state-> for all of sequence/current_mask/received_mask/mode/is_parent (instead of the SERIAL_RUNTIME-> macro)","result":"worse: differing_halfwords 51"},{"experiment":"tail: use state-> only for sequence/current_mask/received_mask (mode/is_parent still via SERIAL_RUNTIME->)","result":"much worse: candidate shrank to 228 bytes, differing_halfwords 70 -- GCC hoisted the whole tail block past the two calls, past an unrelated ldmia sequence"},{"experiment":"tail: use state-> only for mode/is_parent (sequence/current_mask/received_mask still via SERIAL_RUNTIME->)","result":"byte-identical to baseline -- no effect (still same r2-vs-r7 register split as baseline)"},{"experiment":"swap declaration order of s32 packed; / s32 result; or their types (u32 vs s32)","result":"byte-identical to baseline in each case -- no effect"}]},"main:08005fcc":{"schema_version":1,"namespace":"main","address":"0x08005fcc","status":"retained-assembly","owner_bytes":186,"translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","family_matcher":{"reported_template":"games/gs1/src/display/blend/run_script.c","reported_score":7401,"confidence":"low","verdict":"false lead","evidence":"No shared callees, field offsets, or constants with run_script.c beyond the generic register-shuffle prologue shape common to this compiler's small-owner cluster. The real kinship is structural, not through the family matcher: this owner sits between two already-adopted exact siblings in the same serial_runtime.c translation unit (SerialRuntime_EnableTransferTimer/DisableTransfer before it, SerialRuntime_ExchangePayloads immediately after it at 0x08006088) and shares their struct SerialRuntime layout, SERIAL_RUNTIME/REG_SIOCNT/REG_IE/REG_IF/REG_IME/REG_TM3CNT constants, and its return-value tail (packed = current_mask | received_mask<<8; mode==8 -> |0x80; is_parent -> |0x1000; (control<<26)>>30 -> |0x2000) is instruction-for-instruction identical to the equivalent tail already proven exact in SerialRuntime_ExchangePayloads (Func_08006088, games/gs1/src/link/serial/exchange_payloads.c)."},"canonical_complete_unit":{"candidate_bytes":188,"reference_bytes":186,"differing_halfwords":60,"wrong_instructions":65,"matched_prefix":1},"cross_checks":["m2c workbench (out/workbench/08005fcc, run against the real reference bytes and agscc type context) independently reconstructs the same field offsets (mode@0, phase@1, received_mask@2, current_mask@3, transfer_enabled@8, is_parent@9, sequence@0xb, send_index@0x14), the same IE mask constant (-0x81, i.e. clear bit 7 only), and the same register roles for the four persistent locals as the hand trace of the retained assembly (r5=cached SIOCNT control word, r4=control&0x88). m2c's own naive single-file candidate only reaches 38.5% objdiff (it re-casts 0x02002240/0x04000128 at every access instead of caching them in registers); the hand-authored draft using named state/siocnt locals reaches 91.6%.","disable_serial_transfer.c (Func_08005e88, exact-c, same translation unit) and handle_transfer_interrupt.c (Func_08006240, exact-c) already contain the identical *(u32*)0x0400010c = 0x0000c963 timer-reload write and *(u16*)0x04000202 = 0xc0 interrupt-flag-clear idiom used inside this owner's deepest branch, confirming both magic constants independently of this owner."],"remaining":"Every field offset, constant, branch condition, and the full nested nesting shape (phase==0 -> masked=control&0x88; masked==8 -> serial_error=(u8)(control&4); serial_error==0 && send_index==-1 -> IME/IE/SIOCNT-hi/IF/TM3CNT reconfiguration + mode=masked; phase=1; sequence++) is confirmed instruction-by-instruction against games/gs1/asm/08005fcc.s and matches m2c's independent reading of the same reference bytes. The sole residual defect is register-role assignment: the compiler consistently binds the four function-lifetime locals (state, siocnt, control, masked) to {r4,r7,r6,r5} in that declaration order, while the reference binds the identical four roles to {r7,r6,r5,r4} -- a full cyclic rotation of the same register set, not a semantic difference. Ten independent rephrasings were tried and scored with candidate-show (assignment order of state/siocnt swapped; control read via the siocnt pointer vs. directly through the REG_SIOCNT macro; siocnt as a persistent volatile u32* vs. eliminated in favor of a raw literal cast at each use; masked promoted to function scope vs. left block-scoped; the IME=0 store written as a literal vs. reusing the already-zero serial_error register; the IE read-modify-write collapsed into one compound expression vs. kept as three statements with an explicit ie temporary) and every variant reproduced the exact same {r4,r7,r6,r5} binding or made the match strictly worse (removing the ie temporary also broke the movs-immediate encoding of REG_IME=1 into a spurious literal-pool load and disturbed the phase=1 fallthrough into an extra branch). No PERM_GENERAL/PERM_INT register forcing, asm(), or register-hint escape was used, per the hard constraint against hand-tuning register assignment.","notes":["Below the 7500/10000 family-transplant threshold (best guess 7401, low confidence); no automatic transplant workspace exists, so this owner was recovered by direct hand trace of games/gs1/asm/08005fcc.s plus its already-adopted exact siblings in link/serial/, per CONTRIBUTING's general owner-recovery workbench path.","No invented compiler flags were used; canonical-gcc296 (this translation unit's registered route) was the only route exercised.","This record does not claim a permanent compiler classification for the register-shuffle residual; it preserves the measured boundary and the negative-result rephrasing search for a future source-family or compiler-evidence revisit."]},"main:08006088":{"schema_version":1,"namespace":"main","address":"0x08006088","status":"retained-assembly","owner_bytes":96,"translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":92,"reference_bytes":96,"differing_halfwords":26},"isolated_diagnostic":{"flags":["-fno-regmove","-fno-rerun-cse-after-loop"],"candidate_bytes":96,"reference_bytes":96,"differing_halfwords":0,"adoptable":false},"decision":"The isolated flags break exact siblings when applied to the complete translation unit. Production retains byte-exact structured assembly; serial_runtime.c preserves the semantic C and is compiled once under canonical flags for every exact sibling."},"main:080060e8":{"schema_version":1,"namespace":"main","address":"0x080060e8","status":"retained-assembly","owner_bytes":116,"translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":120,"reference_bytes":116,"differing_halfwords":44,"wrong_instructions":19,"matched_prefix":7},"best_ordinary_c_shape":{"shape":"The existing direct three-register DMA macro, using source, destination, and control writes in hardware order.","candidate_bytes":120,"reference_bytes":116,"differing_halfwords":40,"wrong_instructions":19,"matched_prefix":11,"exact_unit_siblings_preserved":true},"stale_override_audit":{"flags":["-fno-regmove","-fno-rerun-cse-after-loop"],"owner_result":{"candidate_bytes":120,"reference_bytes":116,"differing_halfwords":44,"wrong_instructions":19},"exact_owner_regressions":{"0x08005e88":{"candidate_bytes":86,"differing_halfwords":2},"0x08006240":{"candidate_bytes":284,"differing_halfwords":73},"0x08006384":{"candidate_bytes":52,"differing_halfwords":27},"0x08006458":{"candidate_bytes":48,"differing_halfwords":3},"0x08006488":{"candidate_bytes":48,"differing_halfwords":3}},"decision":"The flags do not improve this owner and break exact serial-runtime siblings. The production route remains canonical GCC 2.96."},"bounded_source_shapes":["Aggregate DMA assignment, including nonvolatile destination and volatile-member views: 120/116 bytes and 44 differing halfwords.","Post-incremented scalar DMA pointer: 120/116 bytes and 47 differing halfwords; it emits individual single-register STMIA stores rather than the reference burst.","Local DMA aggregate copy: 128/116 bytes and 59 differing halfwords; it introduces a stack temporary and an LDMIA/STMIA pair.","Plain static-inline scalar and aggregate helpers: 124/116 with 58 differing halfwords and 120/116 with 51 differing halfwords respectively.","Shared static-inline descriptor-by-value writer: canonical full-unit compilation emits an unsupported memcpy external before owner scoring, so it cannot provide the standalone register burst.","Direct DMA macro: 120/116 bytes and 40 differing halfwords; it is the closest ordinary-C form but still emits three STR instructions."],"remaining":"The reference's 12-byte DMA write is a three-register STMIA followed by base restoration. Across the bounded ordinary-C shapes, canonical GCC 2.96 either emits scalar stores, individual post-increment stores, or a block-copy LDMIA/STMIA pair. No source shape reached zero linked differences, so the structured assembly remains installed.","notes":["The owner was remeasured only in the complete declared serial-runtime translation unit under canonical flags.","No inline assembly, fixed-register variable, compiler barrier, ABI escape, copied instruction bytes, compiler modification, or per-owner production flag override was used.","This record does not claim a permanent compiler classification; it preserves the measured boundary for a future source-family or compiler-evidence revisit."]},"main:0800615c":{"schema_version":1,"namespace":"main","address":"0x0800615c","status":"retained-assembly","owner_bytes":228,"translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","best_ordinary_c_shape":{"shape":"struct SerialRuntime *state cached once for the ready_buffer swap, pending_buffer walk, and tail received_mask/current_mask update; a 2-element u32 channel_state[] array whose second word is a dead zero store (reproducing the reference's unexplained extra 4-byte stack slot); pp/dst walking pointers (u16 **pp = state->pending_buffer, u8 *dst = payload) incremented once per channel iteration instead of index*24/index*4 recomputation; SERIAL_RUNTIME-> used directly (not through state) for current_mask/channel_flags accesses inside the loop.","candidate_bytes":228,"reference_bytes":228,"differing_halfwords":100,"wrong_instructions":136,"matched_prefix":5},"bounded_source_shapes":["Baseline (state cached, scalar channel_state, index*4/channel*24 recomputed pending_buffer/payload offsets): 228/228 bytes, 105 differing halfwords.","channel_state widened to a 2-element array with channel_state[1]=0 as the first statement (reproduces the reference's dead sp+4 zero-store and its sub sp,#8/add sp,#8 frame): 228/228, 101 differing halfwords.","Above plus pp/dst walking pointers replacing index*4/channel*24 pending_buffer/payload arithmetic (matches the reference's ip += 24 / r6 += 4 per-iteration pointer walk seen via m2c's --context draft): 228/228, 100 differing halfwords -- best found.","All SERIAL_RUNTIME-> accesses de-aliased through 'state' removed entirely (every access written as a fresh SERIAL_RUNTIME-> macro reference, no state variable at all): length regresses to 232/228 (extra reload of received_mask/current_mask at the tail costs 4 bytes) and differing halfwords rises to ~110-112.","'state' assignment deferred from immediately after REG_IME=0 to immediately before pp = state->pending_buffer (keeping ready_ptr on the SERIAL_RUNTIME-> macro directly): 228/228, 107 differing halfwords -- worse than caching state from the top.","dst = (u8 *)payload hoisted to the very first statement (matching the reference's early 'adds r4, r0, #0' payload capture position): length regresses to 232/228, 105 differing halfwords.","channel_state[1] = 0 moved to after REG_IME = 0 instead of before it: length regresses to 232/228, 110 differing halfwords."],"remaining":"candidate-show --align and the raw .insns listings (scratch/candidate-show/0800615c/{candidate,reference}.insns) show the residual is not a small last-mile permutation but a genuine global register-allocation/scheduling mismatch: the compiler front-loads SERIAL_RUNTIME's base address, REG_IME's address, and &channel_state[0] into r9/sl within the first ~6 instructions of the prologue (before the ready_buffer swap do-while even starts), which forces gcc296's literal-pool manager to dump 6 pool words immediately after the swap loop's first pass (an unconditional 'b' jump over an inline .word table -- visible in scratch/candidate-show/0800615c/0800615c.s as '.L26'/.L28'), whereas the reference keeps only 2 constants live at that point, defers the &channel_state address materialization ('mov lr, sp') until immediately before its first indexed byte load, and defers DMA3's base address to a fresh load right at the START_DMA call site (letting gcc296 fold the three sequential DMA3-> stores into a single 'stmia r3!, {r0,r1,r2}' that this candidate never produces -- it always emits three separate str instructions because DMA3's address ends up cached in a persistent 'ip' across the whole loop instead of reloaded fresh per call). Every ordinary-C restructuring tried (macro-only aliasing, deferred state assignment, reordered declarations/statements, scalar vs 2-element-array channel_state) either left this early-hoisting behavior unchanged or made the length/diff count worse. This looks like it needs either a different source-level trigger for keeping 'state'/channel_state's address out of a fixed hard register across the whole function (not found among the shapes tried), or is a genuine limit of what this GCC 2.96 route will produce from ordinary C for this control-flow shape.","notes":["Measured directly with tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/0800615c.c --align (not the complete declared translation unit).","No inline assembly, fixed-register variable, compiler barrier, ABI escape, copied instruction bytes, compiler modification, or invented compiler flag was used.","Sibling main:080c1ebc (BattleActor_ClearIndexedMaskBit) was read for house style but is a different compiler family target (battle, not serial-runtime) and did not transplant directly; the generated family report (out/gs1-en/reports/compiler-families.json, refreshed by `make families`) has no entry for main:0800615c ('families transplant main:0800615c' returns 'not in family index').","This record does not claim a permanent compiler classification; it preserves the measured boundary and the specific shapes already tried for a future revisit."]},"main:08006240":{"schema_version":1,"namespace":"main","address":"0x08006240","status":"exact","owner_bytes":280,"candidate_bytes":280,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","source_shape":{"hardware_snapshot":"A volatile eight-byte serial-register capture is copied through one restricted, stable local union view.","state_lifetimes":"Distinct send, receive, and loop-tail state views preserve the original register lifetimes across the interrupt handler.","receive_loop":"The explicit loop join keeps channel-halfword and channel-word offsets in the reference control-flow shape.","compiler_result":"GCC 2.96 emits the reference stack capture, shared literal pool, register allocation, receive-loop schedule, and timer-control tail byte for byte."},"proof":{"complete_translation_unit":"280/280 bytes, zero differing halfwords","production_source":"280/280 bytes, zero differing halfwords","compiler_flags":"canonical; no per-owner override"},"notes":["The final source is ordinary C: it uses no inline assembly, fixed-register variable, compiler barrier, forbidden ABI attribute, copied instruction bytes, compiler modification, or flag override.","The GCC 2.96 __restrict spelling expresses the single stable local snapshot view; every later snapshot access derives from that view.","Recovered only from retained owner assembly, approved local ROM correspondence, in-repository callers and types, local m2c structural output, and the approved GCC 2.96 compiler.","The owner is byte-identical in all six editions at the corresponding translated address."]},"main:080063bc":{"schema_version":1,"namespace":"main","address":"0x080063bc","status":"proven-retained","classification":"serial_transfer_compiler_allocation","resolved_asm_classification":{"kind":"serial_transfer_compiler_allocation","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":76,"executable_owner_bytes":76,"candidate":{"candidate_bytes":76,"reference_bytes":76,"differing_halfwords":5,"wrong_instructions":10},"template_family":"template-main-080040e8","template_source":"games/gs1/src/runtime/scheduler/callback_scheduler.c","domain":"Begins a serial-A transfer: refuses when SERIAL_ACTIVE_A is already busy, otherwise disables IME, stamps the shared SerialTransferState, writes SERIAL_VALUE_A/SERIAL_ACTIVE_A, marks the state active, and restores IME.","behavior":["returns -1 immediately when SERIAL_ACTIVE_A is nonzero","saves REG_IME and writes its own address into it as the disable trick shared with sibling 0800651c/08006408","writes state->status = 0x80, SERIAL_VALUE_A = transfer_value, SERIAL_RESULT = 0, SERIAL_ACTIVE_A = value, state->active = 1","restores REG_IME and returns 0"],"bounded_search":{"mode":"source-shape","attempted":3,"exact":false,"reason":"Three do-while(0) groupings of the same statement set were tried; none reproduced the reference's register-allocation order."},"remaining":"The complete ordinary-C reconstruction has the exact 76-byte extent, equal topology, and identical operations, addresses, calls, and literal pool. Its only residual is reciprocal allocation of the SERIAL_ACTIVE_A pointer and transfer-value carriers (candidate r6/r5, reference r5/r6). GCC 2.96 pass dumps identify these as pseudos 34 and 33: the candidate allocator prioritizes pseudo 33 first and therefore assigns it r5. The decoder's complete two-choice split-lifetime search, the source-shape probes, and the complete shipped non-forcing optimization sweep do not reverse that priority. The byte-exact structured assembly is therefore retained under the proven serial_transfer_compiler_allocation classification.","notes":["2026-08-31: improved the exact-extent candidate from 23 to 5 differing halfwords by recovering the reference's path-sensitive value lifetime: the incoming value remains in r0 on the transfer path and becomes the -1/0 return carrier on the two exits. Naming the active-word pointer and ordering it before the transfer-state declaration also recovers the reference's state pointer in r7. The remaining five halfwords are one active-pointer/transfer-value r5/r6 swap; the decoder now names split_lifetime(active), but the guarded two-choice permuter found no exact form. The complete shipped flag sweep was neutral or regressed. No forced register assignment was used.","Sibling 08006408 (also assigned) shares the same SerialTransferState/REG_IME idiom family and is documented separately; its own residual is larger (33 wrong instructions) and independent respellings did not help either.","2026-08-31 classification audit: relocation-aware comparison proves the 56-byte normalized core and all five literal words identical in Japanese, English, German, Spanish, French, and Italian. A fresh 22-route shipped-flag sweep was neutral at five halfwords or regressed; -fno-cse-follow-jumps, -fno-rerun-cse-after-loop, -fforce-addr, and -fno-schedule-insns2 were the only routes that moved the score, all adversely. GCC 2.96 -da output records allocno order 32,37,33,34,35 and dispositions pseudo 33->r5 / pseudo 34->r6, directly explaining the complete residual. The retained assembly now counts all 76 bytes as DONE.","Recovered only from retained owner assembly, serial_runtime_family.h (used by the already-adopted 0800651c neighbor), the six approved local ROMs, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:08006408":{"schema_version":1,"namespace":"main","address":"0x08006408","status":"measured-draft","owner_bytes":80,"executable_owner_bytes":80,"candidate":{"candidate_bytes":80,"reference_bytes":80,"differing_halfwords":29,"wrong_instructions":33},"template_family":"template-main-080040e8","template_source":"games/gs1/src/runtime/scheduler/callback_scheduler.c","domain":"Begins a serial-B transfer: refuses when SERIAL_ACTIVE_B (*0x020023ac) is already busy, otherwise disables IME, stamps the shared SerialTransferState, writes SERIAL_VALUE_B/SERIAL_ACTIVE_B/SERIAL_RESULT, marks the state active, and restores IME.","behavior":["returns -1 immediately when *0x020023ac (current) is nonzero","saves REG_IME and writes its own address into it as the disable trick shared with sibling 0800651c/080063bc","writes state->status = 0x81, SERIAL_VALUE_B(0x02002238) = current (the old *0x020023ac value), state->active = 1, *0x020023ac = value, SERIAL_RESULT = Data_00000000 (a pool-literal zero, loaded via ldr rather than movs #0)","restores REG_IME and returns 0"],"bounded_search":{"mode":"source-shape","attempted":1,"exact":false,"reason":"One alternate do-while(0) grouping mirroring 080063bc's shape was tried; it scored worse (35 wrong instructions, and shifted the whole literal pool by one word) than the pre-existing goto-based draft, so the original draft was kept."},"remaining":"Sizes match (80/80 bytes) and every field write, the 0x81 status byte, the SERIAL_RESULT-via-pool-literal quirk, and the reuse of the pre-branch 'current' value for SERIAL_VALUE_B are all already captured correctly in the adopted draft's C. The residual is almost entirely register-allocation order: like 080063bc, the reference hoists the branch-critical SERIAL_ACTIVE_B pointer+deref first (r5/r4) and the state pointer second (r6) before the cmp/beq, while the current draft's compiled output interleaves an extra r2/r4 shuffle for 'current' before reaching the same point. This is the same family of source-shape gap identified on sibling 080063bc (same REG_IME/SerialTransferState idiom, same scheduler behavior), not yet a proven compiler-internals residual; solving 080063bc's ordering puzzle first would likely transfer directly to this owner.","notes":["2026-08-31 exact-closure revalidation: canonical isolated and complete serial-runtime TU scoring both reproduce 80/80 bytes, differing_halfwords=29, wrong_instructions=33. The decoder names a guard inversion plus reciprocal state/active/current register-role swaps. Spelling the named guard directly as `if (current != 0) return -1;` makes branch topology equal, but regresses to 37 differing halfwords / 35 wrong instructions by preserving the input value in r4 and shifting the literal pool; it was rejected and the 29-halfword canonical source restored. The existing do-while(0) grouping likewise regresses per bounded_search. With exact TU siblings, canonical flags, literal/side-effect audit, and both named structural spellings exhausted, this remains an honestly bounded source-allocation blocker; no adoption or DONE bytes are claimed.","Sibling 080063bc (also assigned) shares the same idiom family and residual character; see its dossier for the detailed instruction-level comparison.","Recovered only from retained owner assembly, serial_runtime_family.h (used by the already-adopted 0800651c neighbor), and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0800651c":{"schema_version":1,"namespace":"main","address":"0x0800651c","status":"proven-retained","classification":"compiler_local_materialization_mismatch","owner_bytes":64,"executable_owner_bytes":64,"candidate_bytes":64,"differing_halfwords":7,"wrong_instructions":4,"cross_edition":{"object_bytes":64,"relocation_normalized_core_bytes":40,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x0800651c","en":"0x0800651c","de":"0x0800654c","es":"0x0800657c","fr":"0x0800652c","it":"0x0800655c"}},"domain":"Resets the shared battle-link transfer state while preserving and restoring the interrupt-enable register.","expressed":["saves the interrupt-enable register and applies the original temporary write","marks the local link-transfer state as resetting","clears the transfer counters, shared pointer, status bytes, and synchronization halfword","restores the saved interrupt-enable value"],"bounded_search":{"mode":"source-shape","attempted":1000,"exact":false,"reason":"Two bounded 500-candidate searches were flat at nine differing halfwords after named absolute symbols restored the exact extent and literal values."},"register_gate_step4_probe":{"date":"2026-08-28","result":"exhausted-not-a-closure","baseline":{"candidate_bytes":64,"reference_bytes":64,"differing_halfwords":7,"wrong_instructions":4},"decoder_cause":"The interrupt-master pointer already owns r0 and the later state pointer owns r1, but the state literal is not created until after the volatile interrupt read/self-write. Those volatile dependencies prevent sched2 from hoisting it ahead of the interrupt literal; zero is independently created early in r2.","annotation_free_catalog":{"admitted":false,"attempted":0,"reason":"The existing catalog has no absolute-address-materialization operation and correctly refused to reinterpret the two distinct literal loads as a reciprocal register swap."},"bounded_variants":[{"source_shape":"explicit eager state pointer with canonical register roles","candidate_bytes":64,"differing_halfwords":9},{"source_shape":"state accessor inline boundary","candidate_bytes":64,"differing_halfwords":7},{"source_shape":"create zero after the volatile self-write","candidate_bytes":76,"differing_halfwords":35},{"source_shape":"direct REG_IME accesses with eager state","candidate_bytes":80,"differing_halfwords":39},{"source_shape":"two-parameter inline reset boundary","candidate_bytes":76,"differing_halfwords":36}],"decision":"No tested ordinary-C boundary independently changed literal materialization order while retaining the established r0/r1 roles and 64-byte extent. Restore the 7-halfword baseline, retain assembly, record the missing catalog dimension, and proceed to the next single cluster."},"notes":["2026-08-27: Traced the residual to a single root cause: the compiler ties a pc-relative literal's pool position to the register-allocation order of whichever local pointer variables are assigned eagerly in the same block (first-assigned pointer always lands in the first pool slot and the lowest register; verified by directly swapping the interrupt_master/state assignment order, which flips both together and worsens wrong_instructions from 4 to 16 -- reproduces and confirms the prior session's reverted attempt). Broke that coupling by dropping the local `state` pointer variable entirely and instead referencing the struct through the existing extern `Data_02002220` symbol directly at each use site (Data_02002220.status / .peer_flags / .flags, equivalent to the header's SERIAL_TRANSFER macro -- both produce byte-identical output; kept the plain extern-symbol form for consistency with the rest of the file's Data_ globals). With only `interrupt_master` assigned eagerly in the preamble block, it deterministically takes r0 and its literal takes pool slot 0, while the now-lazily-referenced state struct address is loaded on first use and lands in r1 -- exactly the reference's r0=interrupt_master/r1=state register split. This dropped differing_halfwords from 9 to 7 (wrong_instructions unchanged at 4; class=allocation). The remaining 7 halfwords are all one issue: the reference's first two instructions eagerly load the state and interrupt_master literals BOTH up front, in [state, interrupt_master] pool order, while still keeping interrupt_master in r0 and state in r1 -- an order/register combination that could not be reproduced with any tested source-level restatement (assignment-order swaps, declaration-order swaps, splitting/merging the zero=0 statement's do-while block, or flattening the nested do-while(0) structure). Moving `zero = 0` out of the first preamble block and into the second (to match the reference's exact scheduling position, right after the interrupt-master save/store) was tried in two positions; both caused the compiler to spill (r5 plus push/pop, growing the candidate to 76 bytes), so the nested do-while(0) grouping was kept as-is since it is load-bearing for staying within the 64-byte budget. This matches the .s file's own header comment that the original ROM compiler is not reproducible with the approved free toolchain; treated as a compiler-fidelity ceiling for this instruction pair, not unexplored search space. No full/bounded search was rerun this session; the remaining 4 wrong_instructions and 7 differing_halfwords are believed to be at or near that ceiling.","Independent object analysis bounds this leaf at 64 executable bytes and proves all 40 relocation-normalized core bytes identical across the six approved GS1 editions.","Third attempt (this session): swapping the state/interrupt_master assignment order flips the literal-pool word order to match the reference exactly (0x2220 then 0x0208 vs the current 0x0208 then 0x2220), but the register numbers it then produces for those two pointers are the wrong way round relative to reference, worsening wrong_instructions from 4 to 16. Reverted; the original order remains the best-known candidate.","The coherent translation-unit build and first-class absolute symbols fix the former ten-byte extent excess and preserve the real 0x02002008, 0x02002080, 0x02002220, 0x02002238, 0x020023ac, and 0x04000208 bindings.","All instructions after the first five match. The remaining nine-halfword residual is the entry load, interrupt save, zero-value scheduling, and consequent literal-pool order; two bounded source-shape searches found no improvement.","Promoted to strong permanent compiler retention on 2026-08-30: the exact extent, six-edition core, 1,000-candidate bounded search, register-gate probe, and volatile-dependency scheduler analysis jointly bound the residual to the entry literal/register materialization order.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered linked-action caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:0800b074":{"schema_version":1,"namespace":"main","address":"0x0800b074","status":"measured-draft","owner_bytes":242,"candidate_bytes":148,"differing_halfwords":119,"wrong_instructions":150,"classification":"window-scroll-clamp (low confidence)","domain":"Takes a window/config pointer (a0, with byte fields read at +32, +33, +35, and a pair of 8-byte sub-records written at +4..+9 and +16..+21), three or four Q16.16 fixed-point values (a1, x1/a2, a3, a4), and a pointer to a 2-field 'limit' struct (6th, stack-passed argument, compared field-by-field against 0x10000/65536). When either limit field exceeds 65536 it doubles two byte-derived half-extent values and switches a set of default margins (8,4) to (16,8) and a stored flag byte from 1 to 3; it then computes two clamped 16.16-to-integer scroll/position values (one per sub-record) and writes each into its sub-record's byte-4 position value, byte-5 flag-merged byte, and byte-6 halfword mask-merged field.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 7885 bp -- the assembly has no relation to that template's tile-clearing bit logic at all (no & 0x3FF, no RENDER_TILE_ATTR_OFS/RENDER_ALT_OFS access, no simple width/height loop); this is a family-clustering false positive and the template gave no usable starting point.","This is a LOW-CONFIDENCE, exploratory dossier, the weakest of this assignment batch. The reference uses a straight-line body (no loops) with all four extended registers (r8/r9/sl/fp) live simultaneously and reads a byte at +32 with an UNSIGNED shift (lsrs, i.e. the byte is treated as unsigned, not the signed s8 this draft's first attempt assumed and had to correct); the second half-extent read at +33 and the sign-extended byte at +35 feed a multiply-by-limit->field1 and a >>16 downshift whose exact rounding-constant pool value this draft could not resolve from a single manual read and instead guessed as 0x8000 (a plausible round-to-nearest constant, not confirmed). The candidate compiled to only 148 bytes against a 242-byte reference and the tool reports class=unemittable for the alignment view, both signs that the overall structural shape (not just constant values) likely still differs from the real source.","This is a clear source-shape gap that needs a fresh, careful re-derivation (ideally cross-checked against the reference's exact pool constant at pc+88, which this pass did not resolve) rather than further respelling of the current draft. No further iteration was attempted given the low confidence in the base shape; further tuning of a structurally-uncertain draft would not be a good use of bounded effort. Flagging honestly for dedicated future reconstruction rather than claiming false progress."],"rejected_experiments":[{"experiment":"read window[32]/window[33] as signed bytes (s8) with an arithmetic shift, matching an initial mis-read of the reference's shift instruction","result":"corrected before scoring: the reference uses lsrs (logical/unsigned shift) on an ldrb-loaded byte, so both half-extent reads were changed to unsigned in the retained draft. Documented here so a future attempt does not repeat the same misreading."}]},"main:0800b168":{"address":"0x0800b168","span_bytes":544,"status":"measured-draft","domain":"fixed-point object projection, viewport placement and render submission","score":{"measured":"2026-08-31","candidate_bytes":506,"reference_bytes":544,"differing_halfwords":252,"wrong_instructions":294,"topology":"different","class":"structural-topology"},"semantic_evidence":["The retained prologue proves four arguments: an object pointer, a cursor over four fixed-point position words, a cursor over two scale words, and a halfword mode passed to Func_0800aa0c. The aggregate seed's unset-r2 and unset-r3 expressions were repaired from this register trace.","The two input cursors preserve the reference ldmia order: scale[0], position[0], scale[1], position[1], position[2], position[3].","Object bytes 0x20/0x21 provide half extents, bytes 0x22/0x23 are signed placement biases, byte 0x26 gates the secondary record, and the packed output fields at offsets 4..7 reproduce the reference masks and widths.","Both visible-record paths submit through Func_08003dec, with Func_08003d28 supplying the five-bit render attribute used when the projected state is nontrivial."],"verdict":"Materially advanced from a non-compiling aggregate seed to a standalone canonical-GCC candidate. It remains 38 bytes short with different topology and claims zero DONE bytes. The remaining broad residual is dominated by the reference's 68-byte stack/lifetime layout and its deliberate high-register retention of the two cursor-loaded scale words; adoption requires differing_halfwords=0.","rejected_evidence":["The shop and battle retarget templates are unrelated and were not used.","Direct array indexing compiled to 250 differing halfwords but obscured the reference's two cursor advances; the semantically evidenced cursor form is retained despite a two-halfword score increase because it reduces wrong instructions from 302 to 294."]},"main:0800ba30":{"schema_version":1,"namespace":"main","address":"0x0800ba30","status":"adopted-exact-c","owner_bytes":154,"executable_owner_bytes":154,"candidate_bytes":154,"differing_halfwords":0,"wrong_instructions":0,"template_family":"template-main-0800b7c0","template_source":"games/gs1/src/animation/initialize_objects.c","domain":"Updates the animation selection of every populated entry in a 4-slot AnimationObject array on an AnimationSetupState, driven by a packed flags byte (high bit + a 7-bit selector), but only when the 7-bit selector differs from the state's cached value.","behavior":["high_bit = flags & 0x80; flags &= 0x7f (the low 7 bits become the animation-table selector)","no-op (returns 0 immediately) when state->field36 already equals the masked selector","otherwise, for each of up to state->count entries: skips a null entry or one whose 'table' word is 0; looks up metadata via Func_08185000(entry->id); skips entries whose selector is out of range against metadata->animation_count","on a valid entry: writes draw_kind from metadata, selects entry->current from a per-metadata s32 table indexed by the selector (entry->table[selector], NOT a direct metadata->animation copy the way the template sibling does it), sets a 0x10 marker byte, and -- only when the high bit of flags was clear -- zeroes two more entry fields","for entry index 0 only, also copies metadata->adjust_x/adjust_y into two state fields","stores the new selector into state->field36 before returning 0"],"bounded_search":{"mode":"source-shape","attempted":4,"exact":false,"reason":"Iteratively fixed: (1) computing high_bit/flags in-place from the same parameter register instead of separate locals, which removed an extra r9 spill; (2) reading entry->table twice (matching reference's redundant reload) instead of caching it in a pointer local; (3) correcting metadata field offsets so the index==0 copy reads adjust_x/adjust_y at their real offsets 6/7 instead of an accidentally-duplicated pair of fields at 8/9. Also tried rewriting the loop as an explicit rotated do-while to see if it would stop the compiler hoisting state->count out of the loop condition -- it produced byte-identical output to the plain for-loop, so it was reverted for readability."},"remaining":"166 vs 154 bytes (12 over). The largest known gap: this candidate's compiler reads state->count ONCE before the loop and reuses that value for every iteration's bound check, while reference re-reads it through a cached pointer on every iteration (visible as 'mov r2,r8; ldrb r3,[r2,#0]; cmp r1,r3' inside the loop back-edge in the real assembly). Neither a for-loop nor an equivalent rotated do-while over 'state->count' reproduced that repeated-read shape, so this is either a genuine compiler loop-invariant-hoisting difference this candidate hasn't triggered the right source form for, or a residual outside manual respelling's reach. A second, smaller gap is a 4-byte stack-frame difference (sub sp,#12 vs reference's #8) whose cause was not isolated.","notes":["2026-08-31: adopted byte-exact. The reference is a rotated pre-tested loop with one shared increment/backedge, not the earlier ordinary for-loop or an unconditional do/while. Preserving that source layout and compiling this owner with the shipped -fno-strength-reduce flag prevents induction-pointer conversion and restores the indexed state->entries[index] load. Naming selected_animation before the independent draw-kind copy fixes the final four scheduling differences. Final score: 154/154 bytes, zero differing halfwords, equal branch topology.","Struct field names (field20, field02, field34, field35, field36, table) are placeholder offsets, not evidence-backed names; only draw_kind, id, marker-position, and the adjust_x/adjust_y copy are corroborated against the template's AnimationMetadata layout.","Sibling 0800bbc0 (also assigned) shares the same 0800b7c0 template family and the same AnimationObject/AnimationMetadata table but implements a different operation (allocating a new object into a free table slot rather than updating an existing one's animation selection); its dossier documents that owner separately, including the same struct-uncertainty caveat.","Recovered only from retained owner assembly, the already-adopted initialize_objects.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."],"sr_route_evidence":{"verdict":"REQUIRED","measured":"2026-08-31","note":"A controlled dual compile on the recovered rotated loop proves the route: canonical strength reduction emits a stack-backed advancing entry pointer and 160 bytes; -fno-strength-reduce preserves the reference's index*4+40 address calculation and enables the exact 154-byte result. The route is registered per owner in compiler routing data."}},"main:0800bbc0":{"schema_version":1,"namespace":"main","address":"0x0800bbc0","status":"proven-retained","owner_bytes":134,"executable_owner_bytes":134,"candidate_bytes":134,"differing_halfwords":18,"wrong_instructions":8,"classification":"compiler_minipool_store_scheduling_module","template_family":"template-main-0800b7c0","template_source":"games/gs1/src/animation/initialize_objects.c","domain":"Allocates a new AnimationObject: looks up metadata for id via Func_08185000, scans a fixed 64-entry table at Data_03001e5c for a free slot (draw_kind byte at struct offset 4 == 0), and if one is found populates it from metadata and returns its pointer (0 otherwise).","behavior":["metadata = Func_08185000(id); if metadata->width == 0, returns 0 without scanning","scans Data_03001e5c[0..63] (24-byte stride) for the first entry whose draw_kind (offset4) byte is 0 -- this is the SAME field later written with metadata->draw_kind, so a nonzero draw_kind doubles as the slot's occupied marker; there is no separate offset21 field","on a free slot: object->id = id; frames = metadata->frames, falling back to Func_0800b798(id) when that is 0; object->animation = metadata->animation (cached in a local so the later dereference reuses it); object->frames = frames; object->frame_codec = metadata->frame_codec; object->marker = 0xff; object->current = *(u32 *)animation (a dereference of the cached animation pointer, not a constant zero, unlike the template's initialize_objects.c sibling); object->state and object->unknown05 both take a shared zero value sourced from Data_00000000 (matching the pool-literal-zero idiom seen in the 08006408/080063bc serial-runtime family) rather than an immediate; object->draw_kind = metadata->draw_kind (offset4, closing the loop with the scan test)"],"bounded_search":{"mode":"source-shape","attempted":30,"exact":false,"reason":"Eight respellings (2026-08-27) converged the control flow and every field write/register choice to match reference exactly except one: a displaced literal-pool dump. A further ~22 respellings (2026-08-29) targeted that residual by permuting the order of the four final independent field writes (current/state/draw_kind/unknown05) and by moving locals/statements across the Func_0800b798 call boundary. Most were flat or worse, but reordering to 'draw_kind; current; state; unknown05' (instead of the struct-declaration-matching 'current; state; draw_kind; unknown05') improved candidate_bytes 136->134 and differing_halfwords 29->18 by shifting the compiler's literal-pool placement heuristic, even though it does not reach exact. This is a legitimate source-shape choice (the four writes touch independent struct fields, so their relative order is behaviorally unobservable) rather than a semantic change."},"remaining":"134 vs 134 candidate bytes now match in size (was 136 vs 134); differing_halfwords=18, wrong_instructions=8 (down from 29/11). The residual structural issue is unchanged in kind from the prior floor: reference's pending literal-pool entry for the Data_00000000 address constant (used for 'zero') is dumped once, right before the function's single shared return point (after a 'b.n' that skips over the 4-byte pool value, disassembling as 2 'movs r0,r0' halfwords). This candidate's compiler still dumps the SAME pool entry earlier, right after the conditional Func_0800b798 call merges, needing an extra 'b.n' skip plus a 4-byte-alignment NOP (3 halfwords instead of reference's 2). With the current field order ('draw_kind; current; state; unknown05'), the register-reuse pattern around the pool region also shifts (one ldrb/strb pair for draw_kind now appears earlier than reference's placement of the equivalent pair, and reference's second 'mov r3,r8; strb r3,[r5,#5]' reload -- present because ldrb clobbers r3 between the two zero-writes -- is folded away in the candidate since draw_kind no longer sits between the two zero stores). This reads as the same genuine compiler-internal minipool-emission-threshold difference documented in the prior session (GCC 2.96's arm_reorg dump-point heuristic), now interacting with register-reuse scheduling around whichever field order is chosen. Twenty-two additional 2026-08-29 attempts (see notes) did not find a source form that fixes both the pool placement and the exact reference field-write scheduling simultaneously; not forcing scheduling or inventing a compiler option per CONTRIBUTING.md. Recording differing_halfwords=18 (candidate_bytes=134, exact size match) as the improved floor for this owner within a small-owner leaf-sweep effort budget.","notes":["2026-08-31 exact-closure rerun: candidate-show reconfirms equal topology, exact 134-byte extent, a 31-instruction exact prefix, and only eight wrong instructions. The concrete residual is one Data_00000000 minipool dump: candidate emits the pool after the fallback-call merge with a branch plus three padding halfwords, while the reference emits it after the final field stores with a branch plus two pool halfwords. The surrounding difference is the already-measured independent final-store ordering tradeoff; reference order restores the exact store sequence but regresses to 136 bytes/29 halfwords, while the retained draw_kind-first order is the unique 134-byte/18-halfword minimum.","2026-08-31 shipped-pass check: -fno-schedule-insns, -fno-regmove, -fno-cse-follow-jumps, -fno-gcse, -fno-expensive-optimizations, and -fno-thread-jumps are byte-identical to the 18-halfword baseline; -fno-schedule-insns2 regresses to 31. Together with the thirty recorded field-order, lifetime, fallback-control-flow, carrier, loop, and pool-load shapes, no finite ordinary-C repair moves both the minipool and the store schedule to reference simultaneously. Verdict remains measured missing-extra-code/minipool-placement, zero DONE bytes; no scheduling or register forcing is justified.","2026-08-31 minipool probe: combining the reference's final store order (`current`, `state`, `draw_kind`, `unknown05`) with an explicit `frames != 0` jump around the fallback call does not move the zero-symbol pool to the reference tail. GCC emits the same 136-byte / 29-differing-halfword form as the previously measured reference-order source, so the named fall-through label is canonicalized before ARM minipool placement. Restored the 134-byte / 18-differing-halfword best source and closed this combined control-flow/store-order axis.","2026-08-31 classification: the exact owner extent, equal topology, complete independently audited semantics, thirty bounded source shapes, and shipped scheduling/regmove/CSE route sweep satisfy the permanent compiler-residual gate. The two surviving forms trade the reference's final independent-store schedule against its minipool dump point; neither ordinary-C form emits both. Promoted to Proven ASM as compiler_minipool_store_scheduling_module without forcing either compiler decision.","2026-08-29: Ran ~22 additional source-shape trials against the prior 29-differing-halfword floor. REFUTED (flat, no change from 29/136 unless noted): reordering 'animation = metadata->animation;' before the frames-fallback if (WORSE: 70 dh, 146 bytes); moving 'zero = ...' after the frames-fallback if (WORSE: 66 dh, 122 bytes); hoisting 'zero = (u8)(u32)Data_00000000;' to function-top before the width check (WORSE: 58 dh, 132 bytes); moving 'object->marker = 0xff;' before the frames-fallback if (WORSE: 34 dh); swapping frame_codec/marker write order (flat); swapping 'object = found;' vs 'zero = ...' order (flat, same as already-documented (b)); ternary 'frames = (frames!=0)?frames:Func_0800b798(id);' combined with the field-order swap below (WORSE: 26 dh, still 134 bytes); caching draw_kind into a new local assigned between state/unknown05 writes (WORSE: 30 dh); re-deriving 'object->unknown05 = (u8)(u32)Data_00000000;' instead of reusing the cached 'zero' local (WORSE: 74 dh, 150 bytes); reordering locals declaration order (i/animation/frames/zero, or zero before frames/animation) (flat); reordering pointer init statements (object=0 before metadata/entry) (flat); moving 'object = found;' before 'zero=...;frames=...;' inside the found-block (flat); loop bound 'i < 64' vs 'i <= 63' (flat); 'if (found)' vs 'if (found != 0)' (flat); 'if (!frames)' vs 'if (frames == 0)' (flat); goto-based 'have_frames:' label instead of fallthrough if, layered on top of the field-order swap (flat, same 18 dh); swapping final state/unknown05 write order on top of the field-order swap (flat, same 18 dh); moving draw_kind write to immediately after frame_codec/marker (before current) instead of immediately before current (WORSE: 20 dh); moving state write before draw_kind at the very end (WORSE: 30 dh, 136 bytes). PRODUCTIVE: reordering the four independent final field writes from 'current; state; draw_kind; unknown05' (matches struct declaration order, was the original baseline) to 'draw_kind; current; state; unknown05' improved differing_halfwords 29->18 and candidate_bytes 136->134 (exact size match) by changing where the compiler's literal-pool scheduling heuristic lands; kept as the new best-known state. Did not reach differing_halfwords=0; the displaced-pool-dump issue persists in a different but still-nonzero form (see 'remaining').","2026-08-27: Fixed two genuine draft bugs found via candidate-show --align, closing 138->136 bytes and wrong_instructions 20->11 (differing_halfwords 31->29). (1) struct AnimationObject's 'draw_kind' field was mismodeled as a separate byte at offset21; reference's final draw_kind store (ldrb r3,[r6,#4]; strb r3,[r5,#4]) writes to offset4 -- the SAME field the free-slot scan test reads (entry->draw_kind == 0). Merged the erroneous offset21 'draw_kind' and offset4 'unknown04' into one offset4 'draw_kind' field (offset21 is now unused padding, never written by this owner). (2) Added a local 's32 animation' to cache metadata->animation once, used both for 'object->animation = animation;' and 'object->current = *(u32 *)animation;' -- previously the second use recomputed 'ldr r3,[r6,#16]; ldr r3,[r3,#0]' (2 instructions, register clobbered by intervening frame_codec/marker stores) instead of reference's single 'ldr r3,[r2,#0]' reusing the still-live register. This mirrors the exact 'animation = metadata->animation;' local-caching idiom already adopted in the template sibling games/gs1/src/animation/initialize_objects.c. Remaining residual (a displaced literal-pool dump, 2 bytes) is a compiler-internal scheduling artifact per the 'remaining' field above, not further reduced after three additional source-shape attempts.","The struct layout (AnimationObject with 'draw_kind' at offset4 doing double duty as both the metadata-sourced draw kind AND the free/occupied scan-test byte, and 'unknown05' at offset5 as a second always-zero byte) is inferred purely from this owner's own field accesses; it has not been cross-checked against other owners of the same struct and may need reconciling once more of this table's users are recovered.","Sibling 0800ba30 (also assigned) operates on the same 24-byte-stride struct family but implements different behavior (updates an existing slot's animation selection rather than allocating a free one); see its own dossier.","Recovered only from retained owner assembly, the already-adopted initialize_objects.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0800bc48":{"schema_version":1,"namespace":"main","address":"0x0800bc48","status":"proven-retained","owner_bytes":40,"executable_owner_bytes":30,"candidate_bytes":40,"differing_halfwords":11,"wrong_instructions":12,"classification":"thumb_multiple_transfer_module","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":30,"core_diff_bytes":0,"core_identical":true,"raw_identical":true,"starts":{"ja":"0x0800bc48","en":"0x0800bc48","de":"0x0800b448","es":"0x0800b448","fr":"0x0800b448","it":"0x0800bc48"}},"notes":["Null-guards a resource-metadata record, then uses DMA3 fixed-source 32-bit fill control 0x85000006 to clear six words (24 bytes) from a zero word on the stack.","Explicit object-based six-ROM analysis found all 40 owner bytes raw-identical in JA, EN, DE, ES, FR, and IT; the instruction core is 30 bytes and the remaining 10 bytes are reached literals and alignment.","The complete readable direct-field source has exact 40-byte extent at 14 differing halfwords and 12 wrong instructions. The reference emits one restored-writeback stmia block transfer; the approved compiler emits three scalar descriptor stores.","Bounded pointer-postincrement, scalar/pointer field typing, volatile and nonvolatile descriptor, compound-literal, register aggregate, explicit temporary aggregate, inline factory, compiler-family, and optimization variants either preserve the scalar-store residual, call memcpy, or add stack block copies. No exact or narrow permanent candidate was found, so this draft claims zero DONE bytes.","2026-08-27: corrected this record's stale differing_halfwords (was 14, actual candidate-show output is 11; wrong_instructions=12 was already correct) -- the committed .c was already at its documented 11-halfword floor with no local diff. Independently re-verified the floor before touching anything: read agscc/gcc/config/arm/arm.md directly and confirmed 'store_multiple' (line 4997) is gated TARGET_ARM only, and that movmem12b/movmem8b's codegen routine thumb_output_move_mem_multiple (arm.c:9425-9473) unconditionally emits a paired 'ldmia %1!,{...}' immediately before its 'stmia %0!,{...}' for both the n=2 and n=3 cases -- there is no code path in this backend that emits a lone stmia from three independently-computed scalar registers, matching the file's existing analysis. Tried three additional experiments beyond the prior exhaustive permutation sweep: (1) aliasing the destination parameter through an extra local variable to coax 'adds r1, r0, #0' into existence -- GCC elides the copy, byte-identical to the existing candidate, no change; (2) computing clear_value's zero-store through an explicit '*(u32*)source = 0' dereference to mirror the reference's mov-r0-then-store shape -- regresses badly to differing_halfwords=18 (register pressure pushes destination into r4, extra spill/reload, breaks tail alignment); (3) building a real local DmaTransfer temporary and copying it via __builtin_memcpy -- this is the one shape that actually reaches a genuine 'stmia r3!, {r0,r1,r4}' via movmem12b (confirming the backend can only reach that opcode through a true mem-to-mem block move), but it also emits the paired ldmia the reference lacks, drops the trailing 'subs r3,#12', and grows the function to 44 bytes against the fixed 40-byte owner budget, so it is disqualified outright. No 40-byte, ordinary-C candidate beats 11 differing halfwords on the approved backend; recommend leaving this owner at its current measured-draft floor.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:0800ebec":{"status":"in_progress","measured":"2026-08-29","best_score":{"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/0800ebec.c --owner 0800ebec --size 1804 --align --first","size_rationale":"1804 = 0x0800f2f8 - 0x0800ebec, i.e. FunctionHead_0800ebec through the end of Fragment_0800f1fa's shared epilogue. The scorer accepts an explicit --size and will score the whole split-function span in one pass; the 'topology=uncovered:reference-multiple-owner-entries' banner it prints is informational only for this owner shape and can be ignored per the coordinator - the byte diff and --align stream are live and meaningful.","candidate_bytes":1718,"reference_bytes":1804,"differing_halfwords":804,"wrong_instructions":599,"frame_size":"sub sp,#104 - MATCHES reference exactly under the new NO_STRENGTH_REDUCE_SOURCES route too. posA=92 and posB=80 still land exactly. posC is now observed pinned at sp+0 ('mov r3, sp', no add) regardless of declaration order tried this session - this is a NEW divergence from the old SR-on dossier's posC=68 finding and is UNRESOLVED (see 2026-08-29_no_sr_route_pass below). deltas landed at sp+56 or sp+68 depending on ordering tried, never at the reference's sp+24.","note":"2026-08-29 NO_STRENGTH_REDUCE_SOURCES route pass: this file is now scored with -O2 -fno-strength-reduce automatically (the plain scoring_command above already goes through the new route - no --flags needed). Baseline at session start: dh=814 (down from the old-route 860 recorded above, confirming the flag's effect already lands for the busy-wait loops per compiler_divergence below). Landed two real, verified fixes this session (both rescored, both real drops, not guesses): (1) reordered the first busy-wait/scan loop's pointer increment - 'v = *p; p++; if (v==0xff) count++; n--;' instead of 'if (*p==0xff) count++; p++; n--;' - to match the reference's ldrb/adds-r1-#1/cmp/bne instruction order at games/gs1/asm/0800ebec.s:44-48 exactly (ground-truth-verified); dh 814->809. (2) reused the already-computed 0x200 mask constant as the second busy-wait block's opaque loop-trip count instead of re-reading Data_03001ae8 fresh ('mask = 0x200; if (Data_03001ae8 & mask) { count = mask; ... }') - matches the reference's 'adds r3,r2,#0' (copying the just-computed AND-mask register r2, not reloading the volatile) at games/gs1/asm/0800ebec.s:68; dh 809->808. Also removed the dead 'dead_signed_facing' placeholder local (neutral score-wise, pure cleanup - the goto-only branch needs no local at all). Net this session: dh 814->808, wrong_instructions ~599->597. NOT byte-exact; do not run make verify."},"finding":"0800ebec (FunctionHead_0800ebec) is the head of one large C function that continues, with the same live stack frame and register file, through sub_0800ee14 (Region_0800ee14, reached by plain 'bne', not 'bl') and on through sub_0800ef44/sub_0800f092/sub_0800f0c6 into sub_0800f1fa (Fragment_0800f1fa, reached by a 'mov r12,pc / bx r4' veneer hop), whose epilogue ('pop {r3,r5,r6,r7}; mov r8,r3; ...; pop {r1}; bx r1') is the only return path and restores exactly the registers FunctionHead_0800ebec's prologue saved. Total span is roughly 0800ebec-0800f2e0, about 1.8KB. This matches the sibling finding already recorded for 0800ee14 (games/gs1/recon/en/dossiers.json#main:0800ee14): no ordinary standalone C function can reproduce a mid-function branch target with a live caller-established frame, so 0800ee14/0800ef44/0800f0c6/0800f1fa cannot be scored as separate owners, and 0800ebec cannot be adopted as a 552-byte owner either, because its C body does not actually end at 0800ee14 - it is the same function.","struct_and_signature_evidence_gathered":{"actor_object":"Both the FunctionHead parameter (r7) and the candidates scanned later (r6/r8 in Region_0800ee14) are struct ScriptObjectEntry (games/gs1/include/script_object_entry.h): data@0x00, values_08[6] (s32 x/y/z/height/speed/accel @0x08.. 0x1c), value_20 (u16)@0x20, flags_59@0x59. This is independently confirmed by games/gs1/src/script/object/check_overlap.c (Func_0800d924), which the region calls directly with the exact same field accesses (entry->data, entry->flags_59, entry->values_08, entry->value_20) and the exact same scan bounds (ADDR_03001E64 base, stride 0x70, 64 entries).","step_position_struct":"struct WorldPosition (games/gs1/include/map.h) is the repeated 12-byte {x,pad,y}-shaped stack scratch built from actor->values_08[0..2] before each Func_0800447c/Func_080120dc pair.","Func_0800447c":"void Func_0800447c(s32 magnitude, s32 angle, struct WorldPosition *out) - confirmed against three independently exact owners (games/gs1/recon/en/main/08098698.c, 080999f0.c, 08098cd8.c): first argument is always a magnitude-shaped constant (0x80000, 0xa0000, 0xe0000, ...), second is the angle.","Func_080120dc":"already recon'd exactly (games/gs1/recon/en/main/080120dc.c): s32 Func_080120dc(struct MapObject *object, struct MapPosition *position). MapObject and MapPosition are both narrower views of the same ScriptObjectEntry/WorldPosition shapes (map_layer@34 falls inside ScriptObjectEntry.unknown_22).","Func_0800eba0":"already recon'd exactly (games/gs1/src/runtime/geometry/check_radius_overlap.c): s32 Func_0800eba0(s32 *a, s32 arg1, s32 *b, s32 arg3), a proximity/radius test used both by Func_0800d924 and directly inside this function's own 64-entry scan.","flag_table_globals":"Data_03001f54 (volatile u8 flag byte), Data_03001ae8 (volatile u32 input/mode flags, per games/gs1/src/menu/run_selection.c and games/gs1/src/overlays/command_table/run_directional_input.c), Data_02000240 (u16[] key-mask/setting table, per games/gs1/src/field/check_configured_keys.c), Data_03001810 == ResourceBlockOwners (types.h macro) - a 512-byte block-owner table whose 0xff-byte count is checked here against a threshold of 136 before playing Audio_PlayCue(135) (types.h: Audio_PlayCue == Func_080f9010). Data_08013254 is a 16-entry s16 facing-angle table indexed by (Data_03001ae8>>4)&0xF, the same nibble-index idiom already proved exact in games/gs1/src/battle/effects/get_cycled_table_word.c (against a different table at the same pattern).","busy_wait_idiom":"The four plain decrement loops (512, then 95/63/63 each as 'do { count--; } while (count >= 0)') reproduce byte-for-byte against the already-adopted idiom in games/gs1/src/runtime/wait/run_busy_wait_delay.c, confirming GCC 2.96 preserves an un-volatile counting loop verbatim at this project's compile flags."},"current_draft_state":"games/gs1/recon/en/main/0800ebec.c now contains a full structural draft of the whole span: prologue flag/busy-wait/speed setup, the head 5-point angle fan, Region_0800ee14 nested 6-candidate x 5-point fan search, the 64-entry scan with its post-match follow-up block (Func_0800d924/Func_080044d0/Func_080120dc chain and entry sentinel writes), the blocked/handled dispatch, the blocked-vs-clear tail split, and Fragment_0800f1fa spawn/dispatch tail through Func_0800eaf8 and the corrected return value (1). It compiles clean (no warnings) and scores candidate=1712 reference=1804 dh=867 (see best_score.note for the fixes applied and the specific remaining gaps: entry-order/register-pressure mismatch at the very top of the function, several best-guess literal constants in the follow-up block, the not-yet-implemented Data_03001ebc_a debug shortcut, and the actor+100/+102/r10 register-reuse question). Not byte-exact; do not run make verify or adopt.","refuted_hypotheses":["Treating 0800ebec as a self-contained 552-byte owner: rejected. Its real C body has no return before the point where control reaches sub_0800ee14 with the frame still live, so any standalone candidate's prologue/epilogue shape cannot match past the initial flag/busy-wait/speed-setup prologue material.","Treating 0800ee14/0800ef44/0800f0c6/0800f1fa as independently callable functions: already rejected by the sibling's games/gs1/recon/en/dossiers.json#main:0800ee14 for the same live-register/live-frame reason."],"2026-08-29_pass_note":"Continued from the 2026-08-29 alignment pass (candidate=1668 reference=1804 dh=871 wrong_instructions=768, unchanged this pass - no net source edit landed). Work this session: (1) Re-verified the pc-relative literal pool in games/gs1/asm/0800ee14.s directly against its trailing .4byte block (0x0000/0xfffff000/0xffffe000/0xffffd000/0x03001e64/0xff000200/0x03001ebc/0x02000240) - these are ground-truth literal source, not displacement-guessed, so no assemble+objdump-with-parity step was actually needed for them (the dossier's open item calling these 'unverified' was stale); they already match the .c exactly (region_search deltas of +-0x1000/0x2000/0x3000, and the 0xff000200 flags mask). (2) Traced the sub_0800eba0 call site at asm ~0800ee14.s:183-209 register-by-register: r6 is reassigned to entry+8 (values_08 pointer) at line 182 ('adds r6, #8') before this block, so 'adds r0, r6, #0' passes entry->values_08 (not the raw entry pointer as first suspected) and 'ldr r3,[r6,#80]' at line 212 is entry->values_08+80 = entry+88 - both exactly match the existing C (Func_0800eba0(entry->values_08, actor->value_20-2, posC, entry->value_20-2) and *(u32*)(base+88)). No bug found there; false alarm from reading the block before seeing the r6 reassignment. (3) Traced Region_0800ee14's own 6x5 fan-out loop (asm lines 46-159) against the C's region_search for-loop: structurally identical (6 iterations via r9, 5 Func_0800447c/sub_080120dc point checks per iteration each guarded by pc-relative or shifted-immediate deltas, falling through to the same posA-store + blocked_flags|=1 tail on exhaustion, then into the shared success_tail Func_0800447c(0x40000,...) call) - no missing block found, current draft's region_search is structurally sound. (4) Tested the hypothesis that hoisting all nested-block locals (count/p/n, dead_signed_facing, dist, dy/dx/angle_raw/angle_signed/angle_u16, diff/field6, global_table/spawned_flag/facing_final/spawned/r5/v, record/kind) to function scope would change GCC 2.96's stack slot count/assignment, since the reference frame is 'sub sp, #104' (0x68) vs the candidate's 'sub sp, #76' (0x4c) - a 28-byte/7-word gap that is very likely the dominant driver of the huge wrong_instructions/omitted-diff cascade (frame-relative offsets shift for the whole rest of the function once matched_prefix is passed). Result: REFUTED - rescoring after the hoist produced byte-identical candidate=1668/dh=871/wrong_instructions=768, zero change. GCC 2.96's stack slot lifetime and count at -O2 is liveness-driven, not C-block-scope-driven, for this function shape; narrowing or widening lexical scope of these particular locals is not a lever. (5) Ran bun tools/allocator-lens/lens.ts 0800ebec: 510 pseudos in this function, global order starts '332 544 40 546 459 422 32 502 505 486 52 425 51 36 499 340 485 50 355 246 466 467 253 451 37 462 173 363 460 554 33 350 39 102 553 318 108 484 336 549 550 98 42 34 35' - not yet correlated pseudo-by-pseudo against the missing 7 stack words; this is the next concrete lever (find which pseudos spill to stack in the reference-shaped 104-byte frame that don't in the 76-byte candidate frame, per games/gs1/CONTRIBUTING.md's 'Read the compiler first' order: local-alloc.c/global.c spill decisions, not more source guessing).","2026-08-29_no_sr_route_pass":"Coordinator directed re-verification under the NEW route: this file is now in NO_STRENGTH_REDUCE_SOURCES, so plain 'candidate-show ... --align --first' already compiles with -O2 -fno-strength-reduce (no --flags needed). Re-ran the exact scoring_command fresh: baseline dh=814 (matches the compiler_divergence.flag_candidate.evidence claim of 860->814 for this owner, and all four busy-wait loops now emit correctly - confirmed by direct .s inspection, no more DCE'd loops). Ran >=25 further scored candidate-show iterations this session. Landed 2 real fixes (busy-wait pointer-increment reorder, mask-reuse for the opaque loop trip count - both detailed in best_score.note above), taking dh 814->808 and wrong_instructions ~599->597. Re-tested prior refutations explicitly under the new route: (a) blocked_flags/handled_flags declaration-order swap and combined-assignment ('blocked_flags = handled_flags = 0') - zero effect, CONFIRMED still refuted under SR-off. (b) mode declared first vs after flags - zero effect, CONFIRMED still refuted. (c) i/entry/base/p100 declaration order - zero effect, CONFIRMED still refuted. (d) extra[] size sweep (0/4/5/6/8/9/10 vs the working 7) - every non-7 size regresses wrong_instructions from 597 to 609 uniformly, CONFIRMING extra[7] remains the unique frame-padding size under the new route too (same finding as the old SR-on dossier, now re-verified independently). NEW divergence found and NOT yet resolved: posC, which matched the reference exactly at sp+68 under the OLD SR-on route, is now observed pinned at sp+0 ('mov r3, sp', no offset add) under every declaration-order permutation tried this session (posA/posB/posC/deltas/extra reordered six ways) - the old dossier's 'posA=92,posB=80,posC=68 all exact simultaneously' claim does NOT hold under the new route; only posA and posB still land exactly. A parallel objdump-level comparison (arm-none-eabi-objdump -D -b binary -m arm -Mforce-thumb --adjust-vma=0x0800ebec on the work-dir candidate.bin/reference.bin, more granular than the capped 48-line --align window) additionally found that 'mode' is spilled to a stack slot (sp+8) in the reference instead of staying register-resident, and the reference's blocked_flags/handled_flags occupy sp+20/sp+16 while the candidate's single early flag store lands at sp+24/sp+... - i.e. the whole scalar spill-slot assignment (which locals get a stack slot at all, not just array offsets) differs between the two routes, not just array layout. This is a genuine open lever this session did not close: per CONTRIBUTING.md's 'Read the compiler first', the next step is reading local-alloc.c/global.c's spill-decision code directly (not more declaration-order guessing, which is exhausted for this residual) to understand why GCC 2.96 -fno-strength-reduce spills mode/handled_flags to stack here when the SR-on route did not.","next_steps":["Current best (2026-08-29, fragment_tail_gate pass): candidate=1718 reference=1804 dh=804 wrong_instructions=599 matched_prefix=7. This session's genuine fix (moving the mode/p100-write and actor+102 toggle inside the 'if(spawned!=NULL)' gate, per 2026-08-29_fragment_tail_gate_pass) is a verified correctness repair, not a score-chasing edit - kept despite wrong_instructions rising from 592 to 599 (pool-offset/branch-target churn downstream of the byte-count change), per the task's ground-truth-first priority.","PRIOR (superseded) note, angle-cast pass: candidate=1728 reference=1804 dh=804 wrong_instructions=592 matched_prefix=7. Frame size sub sp,#104 exact; posA=92 and posB=80 exact, but posC is NOW pinned at sp+0 under this route (regression from the old route's posC=68 - see 2026-08-29_no_sr_route_pass) and mode/handled_flags spill-slot assignment also differs from the old route. NOT byte-exact; do not run make verify.","PRIOR-ROUTE CAVEAT: every score and offset recorded before 2026-08-29_no_sr_route_pass (863/860/etc, and the posA=92/posB=80/posC=68-simultaneously claim) was measured under the OLD route with strength reduction ON. The scoring_command now compiles with -fno-strength-reduce automatically; do not reuse old-route numbers or offset claims as current ground truth without rechecking, as demonstrated by posC's regression above.","TOP OPEN LEVER: the second busy-wait block (Data_03001ae8 & 0x200 -> four countdown loops of 0x200/95/63/63) is entirely dead-code-eliminated by GCC 2.96 in the candidate because it has no observable side effect, but the reference asm (games/gs1/asm/0800ebec.s lines ~55-79 and 0800ee14.s) clearly retains it as a pure register-only loop with zero memory traffic. volatile and static both force the loop to survive but add wrong memory-traffic instructions (regressions to 645/633 respectively, reverted). Needs either a source shape that is provably side-effect-having to the optimizer WITHOUT adding real instructions in the retained code (not found this session), or a flag-level explanation (out of scope for a single file, needs Pascal's decision per CONTRIBUTING.md's compiler-change policy) - do not keep guessing source shapes blindly; if attempting again, dump the RTL/cse passes for this specific block via -da and read exactly which GCC pass deletes it before trying another source nudge.","The deltas slot sits at candidate offset 28 vs reference 24 (4 bytes off) - six extra[N] sizes (6,7,8) were tried this session and none closed this without breaking posA/posB/posC or growing the frame past 104; this residual is likely tied to the same unresolved 'extra[7] dead placeholder' semantic gap from the 2026-08-29_frame_gap_pass (28 bytes with no traceable read/write anywhere in the three retained .s files) rather than a pure ordering fix.","matched_prefix is stuck at 7 due to a GCC-2.96-at-O2 scheduler artifact - see entry_order_investigation for the full RTL/sched2 trace. Confirmed (again, per task's non-lever list) not fixable by source reshaping alone.","Once wrong_instructions keeps dropping toward 0, iterate with bun tools/allocator-lens/lens.ts 0800ebec for the halfword-level register-choice residuals (510 pseudos recorded, global order captured in the 2026-08-29_pass_note entry) - this pass ran lens.ts again and confirmed the same 510-pseudo shape, no new correlation attempted this session due to time.","Once exact end to end (dh=0 against --size 1804), run make verify, then add production paths for main:0800ebec, main:0800ee14, and main:0800f1fa in games/gs1/source-paths.json all pointing at the same source. Do not commit; report only."],"2026-08-29_pointer_reuse_pass":"Coordinator directed a re-read of the reference frame's four position-triple sites (sp+24/68/80/92) instead of continuing register-pressure archaeology. Read games/gs1/asm/0800ebec.s and games/gs1/asm/0800ee14.s directly (ground truth, not by-eye guessing) and traced every pointer register across both files: (1) sp+24/r10 is NOT a position triple - it is the s16[6] deltas table ('add r3,sp,#24; mov r10,r3' at Region_0800ee14 entry, filled via strh with the six +-0x1000/0x2000/0x3000 offsets, later read back via ldrsh in the region_search loop) - this already matches the draft's existing function-scope-independent `deltas[6]` local exactly, no change needed. (2) sp+92/r11 is taken ONCE at FunctionHead_0800ebec (0800ebec.s:161-165, 'movs r3,#92; add r3,sp; mov r11,r3') and used for the head's FIRST fan point (dir itself, before the +-0x1000/+-0x2000 secondary checks) and for the paired Func_080120dc call; Region_0800ee14 then copies this same r11 into r8 at its very entry ('mov r8,r11', before r11 is ever reassigned) and reuses it for the region_search loop's point-0 (deltas[i] itself) in every one of the 6 iterations, and again for the exhaustion-fallback actor-position store when the loop runs out. This is exactly the draft's existing `posA` local BUT the region_search loop was wrongly using `posB` for its point-0 check instead of `posA` - fixed by switching the loop's first Func_0800447c/Func_080120dc pair (the deltas[i] candidate itself, before the +-0x1000/+-0x2000 secondary checks) from posB to posA, matching r8=r11=sp+92 in the reference. (3) sp+80/r5 is retaken three times (0800ebec.s:198, 0800ee14.s:73, 0800ee14.s:227) for the head's and region_search loop's SECONDARY 4 fan points (+-0x1000/+-0x2000) and for the entry-scan follow-up block's repeated position copy - already matches the draft's `posB` exactly, no change needed there. (4) sp+68/r11 is RETAKEN (not the same lifetime as (2)) at Region_0800ee14's .L_0800ef44 ('add r3,sp,#68; mov r11,r3') immediately after the region_search loop ends, and used only for the success_tail Func_0800447c(0x40000,final_dir,...) write and the subsequent Func_0800eba0 proximity-check argument in the entry scan - already matches the draft's `posC` exactly, no change needed. Net: the only real bug was the region_search loop's point-0 check reusing posB instead of posA; fixed with a 6-line edit (two store blocks and their Func_0800447c/Func_080120dc argument, unchanged elsewhere). Rescored: candidate 1668->1676 bytes, differing_halfwords 871->863, wrong_instructions 768->641, matched_prefix unchanged at 7, frame still 'sub sp,#76' vs reference 'sub sp,#104' (unchanged, still the dominant open gap). This is a genuine, ground-truth-verified fix, not a guess - all four addresses' lifetimes were traced instruction-by-instruction in the .s files above before editing.","2026-08-29_frame_gap_pass":"Coordinator directed testing whether sp+36..67 (32 bytes, isolated by the frame ledger: sp+0..35 = scalars+deltas, sp+68..103 = the three position triples) is an undiscovered 32-byte local. Exhaustively grepped all THREE retained .s files (0800ebec.s, 0800ee14.s, 0800f1fa.s) for every 'sp, #' and 'add r?, sp' occurrence - confirmed no instruction anywhere in the 1804-byte span touches sp+28..67 by any addressing path (direct str/ldr immediate, or an address-taken-then-offset register). Also fully read Fragment_0800f1fa.s for the first time this investigation (previously only referenced by inference): it contributes no new position triple - its three 'add rX, sp, #20' sites all read/write the *low byte or halfword of blocked_flags* (already-known sp+20 scalar, matches draft's *(u8*)(spawned+85)=(u8)blocked_flags, *(u8*)(r5+38)=(u8)blocked_flags, and the v=*(u16*)(actor+102) reset-to-blocked_flags idiom already in the draft) - no bug found there, but this closes out the last unread corner of the three files, so the semantic search for a 5th/6th triple came up empty: nothing in the three .s files reads or writes sp+36..67. Empirical test per coordinator's cheap-compile-and-check protocol: added a plain unused local aggregate and swept its size - s32 extra[8] (32 bytes) produced 'sub sp,#108' (4 over), s32 extra[7] (28 bytes) produced exactly 'sub sp,#104' matching the reference prologue byte-for-byte. This confirms GCC 2.96 at -O2 reserves a full stack slot for a declared local array even with ZERO loads/stores against it (the array is never scalarized/DCE'd away at this optimization level) - the frame-size lever is real and the missing amount is 28 bytes, not 32 (the coordinator's 32-byte estimate was the sp+36..67 window's raw size; alignment padding inside that window, not a 32-byte payload, accounts for the last 4 bytes, exactly as the coordinator predicted). Then swept declaration order (posA/posB/posC/extra permutations, 6 distinct trials) to try to land the three triples on their exact reference offsets (posC=68, posB=80, posA=92) simultaneously: order 'deltas, posB, posC, posA, extra[7]' achieves posA=92 and posB=80 EXACTLY matching the reference, and posC=56 (off by -12, i.e. one triple-width short of 68) - the closest of all six orderings tried; every other permutation tried (posC before posB with extra at tail: posB=68/posC=56; extra immediately after deltas: posB=52/posC=28; extra before deltas: posA regressed to 64; inserting a 4th 12-byte dummy local between posC and posA to explicitly try to push posC up: posC dropped further to 44, the opposite of the intended direction) moved posC away from 68 or broke posA/posB, so this is not a simple monotonic lever - GCC 2.96's frame_offset assignment for same-sized adjacent arrays does not appear to be a simple function of declaration order alone once more than 3 arrays compete for adjacent stack slots. Rescored with the best-found layout (deltas, posB, posC, posA, extra[7]): candidate=1676 (unchanged from previous pass - extra[] contributes zero bytes to the compiled/differenced code since it is truly dead), differing_halfwords=863 (unchanged), wrong_instructions 641->637->631 across the frame-size fix and the posA/posB offset corrections (two small but real drops, confirming frame layout was a live contributor as the coordinator predicted, not just cosmetic), matched_prefix unchanged at 7. Honest semantic conclusion (coordinator explicitly required this, not a plausible-but-unused guess dressed as certainty): the 28 extra bytes are NOT explained by any traceable behavior in this span - no code anywhere in the 1804 bytes reads or writes them. It is left in the source as `s32 extra[7];`, an intentionally inert placeholder documented as such, because (a) it is required to hit the reference's exact 'sub sp,#104' frame size and two of three triple offsets, which measurably reduced wrong_instructions, and (b) no candidate semantic (a 5th/6th fan point, an 8-halfword table, entry-scan scratch) survived the exhaustive per-.s-file address trace - if a real local exists here its accesses must be either fully register-allocated with no memory footprint at all (which would make it invisible to this address-trace method entirely and mean the 28 bytes are pure padding/slack from the allocator's slot-size rounding for a different, register-resident variable) or it genuinely is dead source in the original game code. This should be flagged to the coordinator as an open item rather than adopted as settled fact. posC remaining 12 bytes off (56 vs 68) is the current single largest known-precise gap and the next concrete lever - it did not yield to naive declaration-order sweeps and likely needs local-alloc.c source reading (per CONTRIBUTING.md's 'Read the compiler first') to understand GCC 2.96's exact frame_offset assignment order for consecutive same-size aggregates, rather than more blind permutation.","entry_order_investigation":"Per coordinator direction, ran bun tools/allocator-lens/lens.ts 0800ebec and cross-referenced the kept GCC dump directory (0800ebec.c compiles with actual staged gcc-2.96 cc1 at -O2, confirmed by reading tools/allocator-lens/lens.ts - this is not a custom allocator, it is real GCC). RTL pseudo 32 = the incoming actor parameter (reg/v:SI 32 <- r0), created by the very first frontend insn (insn 4), BEFORE the blocked_flags/handled_flags zero-stores (insn 12/15) - so the source-level order is already correct at the RTL-generation stage, matching the reference asm. The divergence happens at instruction SCHEDULING (in.i.23.sched2 dump): the list scheduler's block-0 ready list at t=0 is '4 18 12 3459' (insn4=r7:=r0, insn12=first zero-store, insn3459=stack-pointer adjustment, insn18=literal-pool load) and it picks insn3459 then insn12 before finally scheduling insn4 at t=10, right before the branch - i.e. GCC's own priority heuristic ranks the parameter copy LOWER than the stack setup and zero-stores in this specific function shape, even though insn4's result (r7) has by far the largest number of later uses in the function. Tried three source-level nudges and re-scored each: (a) swap store order (handled_flags=0 before blocked_flags=0), (b) combine into one assignment (blocked_flags = handled_flags = 0), (c) hoist a dummy 'base = (u8 *)actor;' statement to the very top. None moved matched_prefix past 7 or changed dh/wrong_instructions at all - GCC's cse/combine passes normalize all three variants to the same RTL before scheduling ever sees them. Conclusion: this specific 7-instruction prefix mismatch is very likely NOT fixable by reshaping these particular statements; it is downstream of the function's overall register-pressure profile (515-535 pseudos observed across drafts, sensitive to total local/temporary count), and probably will resolve on its own once the much larger remaining wrong_instructions gap (768) is closed by content fixes elsewhere - or requires a scheduler-priority lever (e.g. deliberately increasing/decreasing live-range length of the actor parameter by moving its first REAL use earlier) that was not tried this pass due to time.","2026-08-29_declaration_order_pass":"Ran 21 scored candidate-show iterations this session sweeping local-variable declaration order per CONTRIBUTING.md Read the compiler first (read assign_stack_local_1 in alchemy-gcc/agscc/gcc/function.c directly rather than guessing). Confirmed empirically: assign_stack_local_1 processes locals in source declaration order for arrays needing a stack slot (scalars mostly stay register-resident and do not participate in this ordering); each processed array subtracts its size from frame_offset (FRAME_GROWS_DOWNWARD) so the FIRST-declared array gets the HIGHEST final sp offset and each subsequent array gets progressively lower offsets. Final layout achieving all-three-exact: posA(1st,92) posB(2nd,80) posC(3rd,68) deltas(4th,28 vs ref 24) extra[7](5th/last, dead 28-byte placeholder needed to hit the reference sub sp,#104 total - see prior 2026-08-29_frame_gap_pass entry for why this placeholder exists and its unresolved semantic identity). Net result: wrong_instructions 631->629, dh unchanged at 863. Also investigated (and reverted, both regressed) two attempts to stop GCC dead-code-eliminating the second busy-wait block (if (Data_03001ae8 & 0x200) { count=0x200; do{count--;}while(count!=0); ...three more countdown loops...}): the candidate currently drops this ENTIRE nested if-block (including the outer &0x200 test) because it has no observable side effect and standard C DCE is entitled to remove it, whereas games/gs1/asm/0800ebec.s and 0800ee14.s (ground truth, verified by direct read) show the reference keeping it as a pure register-only decrement loop (movs r3,#0x200 / subs r3,#1 / cmp r3,#0 / bne, no stack traffic at all). Tried declaring the loop counter volatile (retains the loop but forces a stack store every iteration - wrong shape, wrong_instructions rose to 645, dh improved to 840) and declaring it static (same problem, a .bss load/store per iteration, wrong_instructions 633, dh 835) - both REVERTED as net regressions on the primary wrong_instructions metric even though both improved raw dh. This is flagged as an OPEN LEVER for a future pass: the fix is probably not a local C reshape but either (a) a source shape not yet tried that GCC 2.96 cannot prove side-effect-free while still keeping the loop purely register-resident (no memory traffic), or (b) evidence that this file used a different optimization level in the original build (a compiler-flag question, out of scope for a single-file candidate edit - flag changes require Pascal's decision and family-wide measurement per CONTRIBUTING.md). Every other declaration permutation tried this session (posA/posB swap, posA/posC swap, blocked_flags/handled_flags swap, mode/angle_q16 swap, dir/final_dir swap, deltas/extra relative order, i/entry/base/p100 order) either regressed (633-645) or had zero effect on the score.","2026-08-29_busy_wait_source_fix_pass":"Applied the coordinator-proven source-reachable half of compiler_divergence: changed ONLY the first countdown loop's counter from a constant (count = 0x200) to count = Data_03001ae8 (the same flags word already tested by the enclosing 'if (Data_03001ae8 & 0x200)' guard) - this opaque, non-constant trip count survives GCC 2.96's -O2 dead-loop deletion per the minimal-reproducer proof in compiler_divergence, and rescoring confirms it: differing_halfwords 863->860, wrong_instructions 629->623 (net -3dh/-6wi, both real improvements, no regression elsewhere). The other three loops (95/63/63) were left untouched as directed - they are constant-trip and provably deleted by this project's staged cc1 regardless of spelling (compiler_divergence's own minimal-reproducer sweep), so their residual (~12-15 halfwords) is a documented, non-source-fixable flag question, not a bug in this file. Tried and reverted two further busy-wait variants this pass: (a) caching Data_03001ae8 into a local 'flags' variable and testing/seeding count from that local instead of two direct volatile reads - regressed to dh=862/wi=627 (the two-separate-volatile-read shape is apparently what the reference's own register scheduling expects here, confirmed empirically, reverted). (b) mode/blocked_flags declaration reorder (moving 'mode' first) - zero effect on score, reverted to keep the documented order. Also re-verified against games/gs1/asm/0800ee14.s lines 255-290 that the entry-scan follow-up block's apparently-duplicate 'if (Func_080120dc(entry, posB) != 0)' call with no intervening Func_0800447c/store (0800ebec.c lines 300-308) is NOT a bug: the ground-truth asm shows the exact same back-to-back 'bl sub_080120dc / cmp r0,#0 / bne .L_0800f092' pair with nothing between them, so the current draft already matches this quirk correctly.","2026-08-29_pseudo_crossref_pass":"Coordinator directed the mode/blocked_flags/handled_flags pseudo-to-variable cross-reference named as the next step. Ran bun tools/allocator-lens/lens.ts 0800ebec -fno-strength-reduce and read the kept dump dir (/var/folders/.../lens-0800ebec). In in.i.00.rtl: pseudo 32 = actor param (insn 4, reg/v:SI 32 <- r0); pseudo 33 = blocked_flags (insn 12, const_int 0); pseudo 34 = handled_flags (insn 15, const_int 0); pseudo 35 = mode, confirmed by its three constant stores at insns 239/256/292 matching the source's mode=5/mode=2/mode=5 exactly. In in.i.17.lreg: pseudo 35 (mode) costs GENERAL_REGS:18 vs MEM:40 (set 3x, used 5x, crosses 43 calls); pseudo 33 (blocked_flags) GENERAL_REGS:240 vs MEM:496 (set 9x, used 38x, crosses 45 calls); pseudo 34 (handled_flags) GENERAL_REGS:40 vs MEM:88 (set 2x, used 7x, crosses 36 calls). All three conflict with ~176 other pseudos each (nearly the whole function) per in.i.18.greg's conflict lists, and global.c's allocation-order list processes them last (34 and 35 are the final two entries of the 48-reg-to-allocate list, 33 is 34th) - i.e. by the time they're reached, LO_REGS supply for this pass is largely exhausted by higher-priority (larger-savings) pseudos processed first. CORRECTED FINDING (supersedes 2026-08-29_no_sr_route_pass's objdump claim): a fresh read of in.i.18.greg's actual insn-level output (not just the spill-insn list) shows mode (pseudo 35) IS ALREADY spilled to memory in the current candidate, at every one of its three stores (insns 2324/2327/2330: 'str rX, [sp, #20]' after loading the constant into r3/r1/r2) - the earlier objdump-based claim that mode stayed register-resident in the candidate was stale, measured against a prior source revision. blocked_flags (pseudo 33) DOES get a permanent hard register (r9) in the candidate ('mov r9, r1' at former insn 12's replacement), unlike the reference which spills it too (reference emits 'str r0, [sp, #20]' AND 'str r0, [sp, #16]' back-to-back for both flag zero-inits, per the --align diff without --first). handled_flags (pseudo 34) is already spilled in both (candidate: sp+24; reference: sp+16). So the ACTUAL open divergence at the prefix is narrower than previously stated: only blocked_flags's register-residency (r9) differs from the reference's stack residency, not mode's. This is a pure register-pressure/allocation-order artifact of global.c's per-pseudo processing order (confirmed structurally, not tested by further source reshaping this pass since entry_order_investigation and 2026-08-29_declaration_order_pass already exhausted every plain declaration-order and combined-assignment permutation at this site with zero effect on matched_prefix, which is a scheduler/allocator-order artifact per entry_order_investigation, not a spelling gap) - documented as part of the function's floor at matched_prefix=7 pending a possible future allocator-order-class repair (not a source respelling), per CONTRIBUTING.md's routing rather than further guessing.","2026-08-29_align_sweep_pass":"Per coordinator direction, since the entry-region residual is confirmed pressure/allocator-order (not a source lever) and every declaration-order permutation at that site is already documented as refuted, spent the remaining budget running >=20 further scored candidate-show iterations against the --align diff below the entry region, each on real C-visible structural candidates (never touching declaration order alone without a still-untried combination, never forcing register/scheduling directly). All reverted as measured no-ops except one regression: (1) dx/dy computation order swap in the entry-scan angle block: no effect (808/597). (2) dy/dx/angle_raw/angle_signed/angle_u16 declaration order (angle_u16 first): no effect. (3) angle_u16 computed before angle_signed (swap statement order, not just declaration): no effect. (4) field6-before-diff declaration order in the blocked_flags&3 tail block: no effect. (5) kind-before-record declaration order in the else-if blocked_flags tail: no effect. (6) angle_q16-before-mode top-level declaration order: no effect. (7) posB-before-posA array declaration order (5th declaration-order combination beyond the 6 already tried in 2026-08-29_frame_gap_pass): wrong_instructions REGRESSED 597->605, reverted immediately - confirms frame_offset assignment for the competing same-size arrays is non-monotonic in declaration order, consistent with the frame_gap_pass's prior finding, not a new lever. (8) entry->flags_59-check-before-entry->data-NULL-check guard order in the 64-entry scan loop: no effect (both guards are pure reads, ground truth already matches the data-then-flags order so this was a legitimate real-code test, not just cosmetic - reverted to keep the ground-truth-matching order since it scored identically and is more defensible). (9) blocked_flags==0-first vs handled_flags!=0-first in the tail_merge guard's && condition: no effect, reverted to the clearer original spelling. (10) global_table/spawned_flag declaration swap in fragment_tail: no effect. (11) spawned/r5 declaration swap: no effect. (12) if/else vs ternary spelling for 'mode==5 ? *p100=12 : *p100=18': no effect. (13) hoisting the innermost 'u16 v' local from its nested block to fragment_tail scope: no effect - reinforces the earlier frame_gap_pass finding that GCC 2.96's stack-slot/register assignment for this function is liveness-driven, not lexical-scope-driven, and extends it to a register-class (non-array) local, not just arrays. Net result: dh unchanged at 808, wrong_instructions unchanged at 597, file byte-identical to session start (confirmed via diff against a pre-session backup) - no net source edit landed this pass. This exhausts essentially all remaining single-statement/declaration-order permutations reachable without forcing the allocator or inventing unverified semantics; the large remaining wrong_instructions=597 residual is concentrated in the region_search/entry-scan fan-out block's WorldPosition angle-cast idiom (repeated 'asrs/lsls #16' truncation-then-widen sequences at multiple call sites, visible in the --align-without-first diff), which does not yield to declaration or guard reordering and needs either a genuinely different expression shape for the (s16)/(u16) angle cast round-trip or is itself a downstream consequence of the still-open blocked_flags register-residency difference recorded above - flagged as the next concrete lever for a future pass with more RTL-tracing budget, not resolved this session.","2026-08-29_angle_cast_pass":"Coordinator directed working the region_search/entry-scan fan-out block's repeated (s16)/(u16) angle truncate-then-widen idiom, named in 2026-08-29_align_sweep_pass as the dominant remaining residual. Read games/gs1/asm/0800ee14.s lines 46-159 (region_search fan-out) and its literal-pool angle table load ground truth directly and mapped every lsl #16 / asr #16 / lsr #16 pair against the draft: (1) the six-candidate deltas[] table (asm lines 46-90, 'ldrsh r1,[r10,r3]' then 'lsls r1,r1,#16 / lsrs r6,r1,#16') is a SIGNED table load (ldrsh) immediately re-widened UNSIGNED (lsrs) for the Func_0800447c angle argument, and the four +-0x1000/+-0x2000 offset variants at each candidate add the offset to the already-widened r6 raw (no further shift) - the draft's `cand = deltas[i]` (s16 array, sign-extends on load matching ldrsh), `cand_u16 = (u16)cand` (matching lsrs), and `cand_u16 +- 0xN000` (raw int add, matching the no-rewiden adds) were already exactly right, no bug found there. (2) The entry-scan follow-up's angle_raw/angle_signed/angle_u16 block (asm lines 231-238: 'lsls r0,r0,#16 / asrs r2,r0,#16' then 'lsrs r0,r0,#16') already matches the draft's `angle_signed=(s16)angle_raw` (asrs) and `angle_u16=(u16)angle_raw` (lsrs) exactly - also no bug. (3) The REAL mismatch was upstream of the fan-out, in the FunctionHead's angle_q16 setup (games/gs1/asm/0800ebec.s ~line 195-215, before Region_0800ee14 is ever reached): the draft's guard `if ((angle_q16 >> 16) == (s16)0xffff)` compiles as dir<<16 followed by an ARITHMETIC asrs>>16 (sign-extend) purely to build the comparison operand, matching neither of the reference's two actual instructions at this site: the reference computes angle_q16=dir<<16 and stores the UNSHIFTED value (str r3,[sp,#4]), then separately does an UNSIGNED lsrs>>16 (zero-extend, not asrs) against a pooled 0xffff literal for the comparison - i.e. the reference's guard is `((u32)angle_q16 >> 16) == 0xffffu`, a logical shift + unsigned compare, not the arithmetic-shift/signed-compare the draft had. Fixed by changing the condition to `if (((u32)angle_q16 >> 16) == 0xffffu)`; rescored: dh 808->804, wrong_instructions 597->592 (matched_prefix unchanged at 7, frame unchanged at sub sp,#104) - a real, ground-truth-verified drop, isolated by rescoring the sign-fix alone. (4) Also tried adding the reference's neighboring dead store at this same site (games/gs1/asm/0800ebec.s: right after the Data_03001f54 check, the reference computes and stores `(s16)angle_q16` to sp+12 unconditionally before testing Data_03001ae8&0x200, with no read anywhere in the three retained .s files - the same shape as the already-known unread sp+12 dead stores at 0800ee14.s:51 and 0800ebec.s:272) as a plain unused local (`s16 head_angle_signed = (s16)angle_q16; (void)head_angle_signed;`) inside the `if (Data_03001f54 != 0)` block: rescored identically at dh=804/wi=592, ZERO effect - REFUTED as a source-reachable lever here (GCC 2.96 DCEs the unused local regardless of placement, consistent with prior volatile/static attempts elsewhere in this file regressing instead of matching); reverted, keeping only the sign/comparison fix. Ran >=20 further scored candidate-show iterations this session verifying the fan-out block's other cast sites (dir/(u16)angle_q16 at region entry, deltas[6] declared type s16 sign-extending on read via ldrsh matching the reference's array element width, facing_final=(u16)(angle_q16>>16) matching asm line 172's lsrs, and the blocked_flags&3 diff clamp at asm lines 421-426 which already matches the draft's `(s16)((u16)(angle_q16>>16) - *field6)` unsigned-subtract-then-signed-widen shape exactly) - all confirmed already correct, no further mismatches found in this idiom family. The three unread sp+12 dead stores (0800ee14.s:51, 0800ebec.s:187 [the one just fixed], 0800ebec.s:272) remain an open, non-source-reachable artifact - flagged for a future pass needing local-alloc.c/flow.c DCE-retention reading rather than more declaration or placement guessing, per CONTRIBUTING.md's compiler-first order.","2026-08-29_fragment_tail_gate_pass":"Coordinator directed continuing the positional descent of the full --align diff (no --first) past the documented floors (entry sched2 block, blocked_flags r9-vs-spill, the three constant-trip busy-wait loops, and the pool-offset cascades downstream of those). Read games/gs1/asm/0800f1fa.s ground truth in full for the fragment_tail block. FOUND A REAL STRUCTURAL BUG (not a floor): the draft had the final 'if (mode==5) *p100=12; else *p100=18; *(u16*)(actor+102) ^= 1;' statement UNCONDITIONALLY after the closing brace of the 'if (spawned_flag!=0 && *p100==0 && blocked_flags==0) { spawned=Func_0800c150(...); if (spawned!=NULL) {...} }' block. The reference asm proves this is wrong: all three of the outer gate's failure branches ('bne .L_0800f2d8' for spawned_flag==0, '*p100!=0', 'blocked_flags!=0') and the 'beq .L_0800f2d8' for spawned==NULL branch STRAIGHT to the epilogue (bl sub_0800eaf8; ...; pop; bx), skipping the mode/p100 write and the actor+102 toggle entirely - they are NOT reached unless the whole gate passes AND Func_0800c150 returns non-NULL. Confirmed field-by-field: .L_0800f270's 'movs r2,#102; adds r2,r2,r7; mov r8,r2' is actor+102 (r7=actor throughout the fragment), matching the existing 'v = *(u16*)(actor+102)' block already correctly nested inside 'if (spawned!=NULL)'; the mode-write ('ldr r3,[sp,#8]; cmp r3,#5; ...movs r3,#12/#18...') and the final 'eors' toggle immediately follow it in the SAME .L_0800f270/.L_0800f2c6 fall-through chain, all still inside the spawned!=NULL scope, before the single shared 'b .L_0800f2d8' exit. Fixed by moving the mode/p100-write and the actor+102^=1 statement inside the 'if (spawned != NULL) { ... }' block, after the existing v-check nested block, removing them from after its closing brace. Rescored: candidate 1728->1718 bytes, differing_halfwords unchanged at 804, wrong_instructions 592->599 (a small regression on this raw metric, driven by pc-relative pool-offset and branch-target churn from the size change cascading through the whole downstream tail_merge/fragment_tail region, the same kind of prefix-cap wobble the coordinator's brief anticipates) but the post-fix --align diff at this exact site now shows near-identical instruction ORDER and branch structure against the reference (beq/bne targets track 1:1 with only register-class differences, e.g. r8 vs sl, sp+8 vs sp+20 - all already-documented floor residuals), where the pre-fix diff showed a completely different control-flow shape. Per the task's explicit priority (ground truth first, score second), this fix is kept: it corrects a genuine behavioral bug (the original game logic only ever writes *p100 and toggles the facing-flip flag when a spawn attempt actually succeeds, not unconditionally every call), not a stylistic reshape, and is verified byte-for-byte against games/gs1/asm/0800f1fa.s rather than inferred. New best_score.differing_halfwords=804 (unchanged), wrong_instructions=599 (regressed +7 from the prior 592, explained above as pool-offset churn, not a wrong fix). Ran further scored candidate-show iterations this pass testing: (a) hoisting 'actor->value_20 - 2' into a named local before the 64-entry scan's for-loop to try to match games/gs1/asm/0800ee14.s's early-computed r1 invariant at .L_0800ef72 - REFUTED: the hoist landed the load in the wrong position (colliding with the unrelated global-table lookup a few instructions earlier) and forced an extra stack spill (str to sp+4) instead of the reference's clean register-resident hoist immediately before the loop's null-check; rescored dh 804->790 but wrong_instructions 592->606, and the diff showed the new instruction sequence did NOT actually land at the reference's position - reverted immediately per the ground-truth-first rule (a coincidental dh drop from misplaced code is not a genuine match). (b) Re-verified the duplicate-looking ldrsh/ldrh pair at .L_0800f270 is not a bug: it is two separate C reads (the 'v==2' comparison read, and the later '*(u16*)(actor+102) ^= 1' statement's own independent read), which is exactly the existing two-statement structure already in the draft - no change needed there.","compiler_divergence":{"measured":"2026-08-29","finding":"The shipped compiler retains constant-trip empty countdown loops (movs #95 / subs / cmp / bge) that the staged gcc 2.96 deletes at -O2. Opaque-trip loops (count = flags) survive in both \u2014 proven by minimal reproducers compiled through dist/cc1: flags-derived count emits the reference mov r3,r2 / sub / cmp / bne shape; constant counts 95/63/63 are deleted in every spelling tried (single or distinct variables, do/while and for). No external jumps enter the loop labels, so recognition-blocking is ruled out.","consequence":"The busy-wait block can only reach byte parity via a uniform compiler flag preserving constant-trip empty loops (f014f8c-class, maintainer decision). The first loop IS source-reachable: count = flags. Estimated residual if flag lands: ~15 halfwords of the current 863.","correction":"struct_and_signature_evidence_gathered.busy_wait_idiom is stale: the idiom is NOT reproduced in this function; treat as open.","flag_candidate":{"measured":"2026-08-29","flag":"-fno-strength-reduce (bone-stock gcc option; no compiler change)","evidence":["All four busy-wait countdown loops survive and emit the reference shapes exactly, including movs #95 / #63 materializations (minimal reproducer dce3.c).","The deletion happens in the loop pass (jump count 8 -> 4 at dump 08.loop), which strength reduction enables; with the flag the pass leaves them.","Corpus blast radius: 99 of 3,958 exact production files change output under the flag \u2014 a bounded re-proving migration, not a rewrite.","Scored fresh on the giants: 0800ebec 860 -> 814; 080d4ce8 668 -> 666; others neutral."],"status":"awaiting maintainer ruling; uniform for all files per doctrine","resolution":{"measured":"2026-08-29","finding":"Global adoption is refuted by the ROM itself: 110 of 114 flag-affected exact owners lose byte identity under -fno-strength-reduce \u2014 their shipped bytes contain strength-reduced shapes no no-SR compile can emit \u2014 while this function's busy-wait loops survive no legal spelling with SR on. The original build therefore varied optimization flags per translation unit: at least SR-on for the 110, SR-off for this one. Uniform flags cannot reproduce both; this is measured, not assumed.","candidate_sweep":"276 candidates under the flag: 24 improve (loop-heavy, incl. this owner 860->814 and 080b75dc 141->123), 59 worsen, 199 neutral, none close outright.","decision_required":"maintainer: either route flags per translation unit (the agbcc precedent) or accept permanent documented floors on the no-SR files"}}}},"main:0800ee14":{"status":"blocked","measured":"2026-08-29","best_score":{"candidate_bytes":176,"reference_bytes":936,"differing_halfwords":468,"note":"Score for a standalone-function candidate; see finding below for why this cannot converge."},"finding":"0800ee14 is not an independently callable function. games/gs1/asm/0800ebec.s (FunctionHead_0800ebec, header comment: '\u8907\u6570\u9818\u57df\u306b\u5206\u5272\u3055\u308c\u305f\u547c\u51fa\u53ef\u80fd\u95a2\u6570\u306e\u5148\u982d\u90e8') establishes the prologue (push r5-r7,lr / mov from r8-r11 / sub sp,#104), copies r0 (the actor pointer) into r7, and reaches sub_0800ee14 via a plain conditional branch ('bne sub_0800ee14'), not a bl. Region_0800ee14 in turn falls through/branches into sub_0800ef44, sub_0800f092, sub_0800f0c6, and finally tail-jumps to sub_0800f1fa (Fragment_0800f1fa) with a computed 'mov r12, pc / bx r4' veneer hop. All of these pieces share one live register set (r7 = actor pointer, r8/r9/r10/r11 = loop indices and scratch position pointers assigned once in the FunctionHead prologue) and one contiguous stack frame (sp-relative offsets 0-104 allocated by FunctionHead_0800ebec) and one literal pool (LiteralPool_0800edf0, plus the pool embedded inside 0800ee14.s itself before the fallthrough into 0800f1fa).","why_standalone_candidate_fails":"A GCC-2.96-compiled C function necessarily emits its own prologue, its own register/parameter setup, and its own stack allocation at the address that source is anchored to. The reference bytes at 0800ee14 have none of that: execution arrives with r7/r8/r9/r10/r11 and the sp frame already live from FunctionHead_0800ebec. No ordinary C function boundary can reproduce a mid-function branch target with a live caller-established register file; candidate-show confirms this directly (class=missing-extra-code, topology=uncovered:reference-indirect-dispatch-0x3a6, matched_prefix=0) since the compiler always inserts a prologue/parameter move sequence the reference does not have.","correct_owner_shape":"The only C source that can byte-match this region is one function spanning the whole call-graph-derived block (at least FunctionHead_0800ebec through Fragment_0800f1fa, and likely further through the trailing 'bx r4' veneer target), compiled once and matched across that whole address range as a single owner. That owner does not exist yet: FunctionHead_0800ebec (games/gs1/asm/0800ebec.s) and Fragment_0800f1fa (games/gs1/asm/0800f1fa.s) are both still retained assembly with no recon'd C, and neither appears in games/gs1/recon/translation-units.json.","struct_evidence_gathered":{"actor_param":"r7 is the same object-shape Func_080120dc (games/gs1/recon/en/main/080120dc.c) already proved: x/pad/y triple (WorldPosition, games/gs1/include/map.h) at offset 8, s32 height at offset 20, u8 map_layer at offset 34.","step_candidate":"The 12-byte {x, unused, y} stack triples built repeatedly before each sub_0800447c/sub_080120dc pair match struct WorldPosition (games/gs1/include/map.h): s32 x @0, u8[4] pad @4, s32 y @8.","sub_0800447c_signature":"Confirmed elsewhere (games/gs1/recon/en/main/08098698.c, 080999f0.c, 08098cd8.c) as void Func_0800447c(s32 angle_q16, u32 distance, struct WorldPosition *out) - projects a point at the given angle/distance from an implicit current-position global.","sub_080120dc_signature":"Already recon'd (games/gs1/recon/en/main/080120dc.c): s32 Func_080120dc(struct MapObject *object, struct MapPosition *position), returns 0 for a walkable/valid position."},"refuted_hypotheses":["Treating 0800ee14 as a standalone C function with its own prologue and an (actor*, y) parameter pair: rejected. The reference has zero prologue bytes and the compiler cannot omit one for an ordinary function, so candidate topology diverges from instruction 0 (matched_prefix=0, differing_halfwords=468 of 468 scored halfwords)."],"next_steps":["Reconstruct FunctionHead_0800ebec (games/gs1/asm/0800ebec.s) and Fragment_0800f1fa (games/gs1/asm/0800f1fa.s) as C first, as one function whose single C source spans the full 0800ebec-0800f1fa+ range.","Only once that whole-function source exists and scores exact end-to-end should games/gs1/source-paths.json gain a production path for main:0800ee14 (and the sibling Head/Fragment owners) pointing at that same source, per the existing convention for multi-label single-source owners.","Do not attempt a second isolated candidate at 0800ee14 alone; every isolated attempt will fail on topology before any statement-level scoring is meaningful."]},"main:0800fec8":{"schema_version":1,"namespace":"main","address":"0x0800fec8","status":"measured-draft","owner_bytes":140,"candidate_bytes":144,"differing_halfwords":64,"wrong_instructions":88,"classification":"field-map-metatile-row-expansion","domain":"Reads 16 consecutive field-map cells (u32 each) from the toroidal 128x128 cell array at 0x02010000 -- one fixed metatile row, walking columns -- and for each cell's low 12 bits (its metatile id, extracted with a shift-fusion '(cell<<20)>>17' that doubles as a *8 byte-stride multiply) copies an 8-byte metatile definition entry from 0x02020000/0x02020004 (top-row tile pair, bottom-row tile pair) as two raw 32-bit stores into a caller-selected VRAM screenblock (0x06002800 + a0<<11), 64 bytes (one tilemap row) apart. Confirmed independently via m2c against real project types: m2c's raw decompilation reads from 0x02010000 and writes from 0x02020000/0x02020004 in the same roles derived here by hand, from directly recomputed PC-relative literal-pool addresses in the retained assembly.","notes":["The generated family report's best guess (below the 7500/10000 adoption threshold, at 7436) was games/gs1/src/ui/window/clear_tile_attributes_in_rect.c. Read in full: it shares nothing but the generic 4-high-register push/pop prologue shape common to many owners in this compiler's output. No shared callees, field offsets, or constants. This is the same family-clustering false positive already documented on this owner's sibling (see below) -- not a genuine match, and not usable as a source-shape starting point.","This owner is the row-scanning counterpart to games/gs1/recon/en/main/0800ff54.c (Func_0800ff54, also an un-adopted measured-draft, 172 bytes). Both share the identical four-word literal pool (0x06002800, 0x02010000, 0x02020000, 0x02020004) and setup idiom: truncating-divide-by-2-then-mod-128 of a coordinate for a toroidal 128x128 source index, plus '& 30'-then-shift for a wrapped VRAM destination offset. 0800fec8 holds the source ROW fixed (from a2) and walks 16 SOURCE COLUMNS (from a1) in one call, writing a full 32-bit (2-tile) pair per iteration -- the row variant. 0800ff54 holds the source COLUMN fixed (from a1) and walks 11 source rows (from a2), writing one 16-bit tile at a time selected by an a1&1 parity bit -- the column variant, which needs the parity trick because adjacent destination rows are 64 bytes apart (not adjacent), so a paired 32-bit store isn't possible there. The two are plausibly declared in the same original source file.","IMPORTANT CORRECTION to 0800ff54.json's classification/domain text and its CopyBlock helper: that draft's C labels 0x02020000 as the source 'map' cell array and 0x02010000 as the 'colors' lookup table -- backwards. Recomputing 0800ff54.s's own PC-relative ldr targets by hand (ldr r4,[pc,#80] at instruction #40, address 0x0800ffa2 -> pc-word 0x0800ffa4 -> target 0x0800ffa4+0x50 = 0x0800fff4, which is literal slot 2 = 0x02010000) shows the row+col-indexed array 0800ff54 reads from is 0x02010000 (the field cell array, matching games/gs1/src/map/shared/get_cell_high_flags.c and games/gs1/src/map/get_cell_collision.c, both already-adopted-exact and both indexing 0x02010000 by (x + y*128)*4), and the metatile-id-indexed lookup is 0x02020000/0x02020004 -- i.e. the same role assignment established independently here for 0800fec8, both by hand-trace and by m2c against real types. This does not change 0800ff54's byte-exactness score (both literals compile to the same instruction shapes regardless of which specific address is embedded), but its prose and CopyBlock's argument naming describe the wrong array for each role and should be corrected in a future pass.","Extensive register-allocation experimentation (13 source-shape variants tried: named row/rowmod/col/colmod/destination locals in several declaration orders, do-while vs for, a helper function vs full inlining, u8* vs plain-u32 destination arithmetic, '(cell & 0xFFF) * 8' vs the shift-fusion '(cell << 20) >> 17' spelling, m2c's own flattened everything-recomputed-per-iteration shape cleaned up with casts) converged on the same wall the sibling 0800ff54 already hit and documented: the reference needs only two extra high registers across the loop (r8 and sl, holding the 0x7F/30 wrap masks, with the VRAM destination base parked in ip -- a register that never needs saving) but every source shape tried here compiles to three (r8, r9, sl -- ip never gets used for the destination base at all, forcing a third saved high register). Best result (this draft): candidate 144 bytes vs 140 reference, 64/88 differing halfwords out of 88, matched_prefix=2. Hoisting row/rowmod/destination into named locals before the loop (matching the reference's own register roles most literally) was consistently WORSE (candidate grew to 160 bytes, 78-81 differing) than recomputing them inline each iteration and only carrying col/colmod/counter across iterations, which is the shape this draft uses.","This is a global register-allocation priority difference in the approved compiler, not a local expression-shape bug -- the same conclusion 0800ff54.json's rejected_experiments reached for its own residual. No combination tried here persuaded the allocator to leave the destination base in ip the way the reference does."],"rejected_experiments":[{"experiment":"hoist row, rowmod, col, colmod, and destination all as named locals ahead of the loop (mirroring the reference's r7/sl/r5/r0/ip register roles one-for-one), in several declaration orders (a2-derived first, a1-derived first, interleaved) and with/without a CopyMetatileRow(cell, dest) static helper","result":"worse in every ordering tried -- candidate consistently grew to 160-164 bytes (vs 140 reference) and needed FOUR extra high registers (fp, r9, sl, r8) instead of the reference's two, with matched_prefix stuck at 1. The compiler never placed the VRAM destination base in ip for any of these shapes."},{"experiment":"translate m2c's raw --valid-syntax output near-verbatim (only adding the pointer casts needed to compile): no named row/rowmod/destination at all, col/colmod/counter as the only loop-carried locals, everything else recomputed from a0/a1/a2 inline each iteration","result":"candidate 148 bytes, 71/86 differing halfwords, matched_prefix=2 -- closer than the hoisted-locals attempts (three high regs: r8, r9, sl) but still one high register more than the reference, and worse than the retained candidate's 64 differing halfwords."},{"experiment":"same minimal-hoisting shape as the m2c translation, but with the metatile-index computation spelled as '(cell << 20) >> 17' (matching the reference's actual lsls#20/lsrs#17 instruction pair) instead of '(cell & 0xFFF) * 8'","result":"best result found: candidate 144 bytes, 64/88 differing halfwords, matched_prefix=2. Retained as the candidate. The '& 0xFFF' spelling reliably compiled to a literal-pool 0xFFF mask plus ands+lsls instead of the reference's shift-fusion, adding extra instructions; the explicit shift-fusion spelling matched the reference's instruction pair even though the surrounding register allocation still differs."},{"experiment":"destination as a plain u32 integer (cast to u8*/u32* only at the two store sites) instead of a u8* local; reordering the three per-iteration increment statements (col, colmod, counter) in various sequences; wrapping the two stores in a CopyMetatileRow(offset, dest) helper instead of inlining them","result":"byte-identical to the retained candidate in every case (64/88, 144 bytes) -- none of these surface-level changes affected this compiler's register allocation for this owner, consistent with 0800ff54.json's conclusion that the residual here is a register-allocator priority decision, not a local expression-shape issue."}]},"main:08010424":{"schema_version":1,"namespace":"main","address":"0x08010424","status":"measured-draft","owner_bytes":316,"candidate_bytes":292,"differing_halfwords":142,"wrong_instructions":194,"classification":"map-tile-copy-with-actor-marker-overlay","domain":"For a dest rectangle (dstX,dstY,width,height), linearly copies 12-bit tile indices from a source region of the 0x02010000 map buffer into the dest region (preserving the destination's upper 4 bits via an 0xFFFFF000/0xFFF mask-merge), and for every dest cell that falls inside one of up to 3 actor 16x12-tile bounding boxes (read from *(u8*)Data_03001e70 + 0x104, a 48-byte-stride array of {s32 x, s32 y} Q12.20 world positions, each >>20 to tile units), also copies an 8-byte, two-row marker-icon cell from a table at 0x02020000 (indexed by the copied tile's 12-bit value) into a per-actor 2048-byte-stride overlay table at 0x06002800.","notes":["The generated family report clustered this owner with template-main-0801e260 (ui/window/clear_tile_attributes_in_rect.c) at 7989 bp, but the reference assembly has none of that template's bit-clearing shape (no &0x3FF/RENDER_TILE_ATTR_OFS logic, no simple width/height nested loop). This is a family-clustering false positive; the template gave essentially no usable structural starting point.","The literal-pool constants (0x02010000, 0x02020000, 0x02020004, 0x06002800, 0x06002840) are the exact same constants this session found and used in the genuinely-related owner 0800ff54 (see games/gs1/recon/en/dossiers.json#main:0800ff54), which the same family clustering pass separately (and correctly) linked to the already-exact games/gs1/src/map/render_palette_mapped_row.c / render_palette_mapped_column.c sibling family. That is strong, independently-corroborated evidence this owner belongs to the same map/marker-overlay subsystem, not the ui/window tile-attribute-clear subsystem.","The Data_03001e70 + 0x104 workspace-array base offset is independently corroborated by games/gs1/src/unidentified/overlays/state_update/state_update_0082.c, an already-exact owner whose header comment documents 'the workspace record ... read at fixed offsets +0x106 and +0x10a from Data_03001e70 + 0x104', i.e. the same base address this owner's disassembly computes (movs r0,#130; lsls r0,r0,#1 => 260 = 0x104, added to *Data_03001e70). That owner's small s16 sub-fields at +2/+6 relative to +0x104 are consistent with (not necessarily identical to) this owner's per-actor record starting at that same base with a larger 48-byte stride; the exact struct layout beyond the s32 pair at offset 0/4 is not resolved.","candidate-show settled at 292 candidate bytes vs 316 reference bytes and 142 differing halfwords across three siblings (08010424, 080105d4, 08010788 -- see their own dossiers). This is a substantial, evidence-grounded draft of the real algorithm rather than a template adaptation, but it is far from byte-exact: the exact source shape of the outer/inner loop nesting, the per-actor array's true field types (the state_update_0082.c comment leaves the sub-record layout only partially resolved), and the precise scaling arithmetic for the two overlay-table writes are all still open. This is a source-shape gap requiring dedicated reconstruction of this owner's real domain (map rendering / party marker overlay), not a good target for further family-transplant attempts against the assigned tile-attribute-clear template.","2026-08-31 structural-decoder pass: all four actor-bound comparisons were named as mirrored relational guards. Reversing their operand spelling is behavior-preserving and leaves the byte score unchanged, but changes the measured topology from different to equal; the residual now routes honestly as missing-extra-code rather than structural-topology. The same decoder-confirmed repair was stamped onto 080105d4 and 08010788 and independently rescored.","Three near-identical siblings exist at 0x08010424, 0x080105d4, 0x08010788 (all in this assignment batch): 080105d4/08010788 are byte-for-byte near duplicates of each other and use SIGNED loop comparisons (bge/blt) throughout, while 08010424 uses UNSIGNED comparisons (bcs/bcc) for the same three loop-bound checks -- confirmed by testing this owner's C with s32 loop variables (matches 080105d4/08010788's branch mnemonics) versus u32 loop variables (matches this owner's). This owner's retained candidate therefore declares dstX/dstY/width/height/x/y as u32 rather than s32; the other two siblings' candidates keep them signed."],"rejected_experiments":[{"experiment":"store the three actor tile positions in two separate arrays (s32 tileX[3]; s32 tileY[3];) rather than one array of {x,y} structs","result":"worse (149 differing halfwords) -- the reference's unrolled 3-iteration copy loop stores x then y for the SAME actor 8 bytes apart (interleaved pairs), which only an array-of-pairs layout reproduces; separate x/y arrays put all three x values before all three y values in memory, a different stack layout the compiler schedules differently."},{"experiment":"first draft used dstX/dstX+width for the outer (height) zero-guard instead of dstY/dstY+height","result":"a real logic bug (would skip on the wrong condition for callers where width and height differ), fixed before scoring; correcting it did not change the halfword count in this candidate's current form, confirming the two guards were already scored as structurally equivalent shapes by the tool, but the fix is required for the candidate to be behaviorally honest regardless of score."}]},"main:08010560":{"schema_version":1,"namespace":"main","address":"0x08010560","status":"measured-draft","owner_bytes":116,"candidate_bytes":120,"differing_halfwords":44,"wrong_instructions":41,"classification":"execute-map-copy-command-list","notes":["Complete ordinary-C reconstruction of a 0xffff-terminated list of five-halfword commands. Each record supplies the leading source value, three signed geometry values converted to u16 for Func_08010424, and a signed delay converted to u16 for Func_080030f8.","The retained assembly establishes the 10-byte stride, signed payload loads, conversion order, six-argument Func_08010424 call, delay call, and terminator. The packed two-byte-aligned record expresses that observed wire layout without inventing padding.","The exact SpawnBattleEffectObjects sibling was used only as a source-shape example for a compact command-record loop; it is not evidence for this owner's field meanings or types.","The first complete draft compiled to 88 bytes and exposed two linked discrepancies: an ABI-padded 12-byte record stride and premature optimization of the signed payload conversions. One targeted correction fixed the record layout and materialized all four signed payload loads before their u16 call-boundary conversions.","A bounded follow-up replaced the aggregate walk with the two independently advanced pointers proved by the reference: a u16 command-head pointer and an s16 payload pointer. That repair moves canonical GCC 2.96 to 120 bytes against 116 reference bytes, with equal control-flow topology, 44 differing halfwords, and 41 wrong instructions.","The allocator-order decoder named split_lifetime(command), specifically recreating the command value at the guard and backedge. The separate-pointer repair supplies that lifetime without annotations. Remaining width evidence is unresolved: the reference sign-loads all four payloads before zero-extending them, while canonical GCC folds the two call-only conversions into ldrh; sequential-pointer, explicit-u16-local, low-half-mask, and explicit low-half-expression spellings did not improve the 44-halfword floor.","This measured draft claims zero DONE bytes. Retained assembly remains authoritative; no fixed-register variable, inline assembly, frame forcing, or assembly classification is used."]},"main:080105d4":{"schema_version":1,"namespace":"main","address":"0x080105d4","status":"measured-draft","owner_bytes":304,"candidate_bytes":292,"differing_halfwords":135,"wrong_instructions":195,"classification":"map-tile-copy-with-actor-marker-overlay","domain":"Byte-for-byte near-duplicate sibling of main:0x08010424 and main:0x08010788 (see games/gs1/recon/en/dossiers.json#main:08010424 for the full technical writeup): copies 12-bit tile indices from one region of the 0x02010000 map buffer to another, mask-merging with the destination's upper 4 bits, and overlays an actor position marker icon (from a table at 0x02020000 into a per-actor 2048-byte-stride table at 0x06002800) for dest cells inside one of 3 actor bounding boxes read from Data_03001e70 + 0x104.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 7956 bp; as with its two siblings this is a family-clustering false positive with no usable structural overlap with the assigned template.","This owner's assembly is byte-for-byte structurally identical to main:0x08010788's (confirmed with `diff` on the retained .s files -- only register-allocation choices and the pool-word ordering/presence of one 0xfffff000 constant differ), and both use SIGNED loop-bound comparisons (bge/blt) where main:0x08010424 uses UNSIGNED ones (bcs/bcc) for the same three checks. The retained candidate is the shared s32-parameter draft described in 08010424.json, function-renamed to Func_080105d4.","candidate-show reports 292 candidate bytes vs 304 reference bytes, 135 differing halfwords, 195 wrong instructions -- close to but not identical to the 08010424/08010788 scores because the reference byte length itself differs slightly between the three siblings (304 vs 316/316), not because this candidate was independently tuned for this owner. See 08010424.json for the full rationale, the Data_03001e70+0x104 corroborating evidence from state_update_0082.c, and the family-clustering-false-positive discussion; that writeup applies to this owner unchanged.","2026-08-31 family stamp: mirrored the four decoder-named actor-bound comparisons. The 292/304-byte and 135/195 scores are unchanged, but topology is now equal and the remaining work is correctly classified as missing-extra-code."],"rejected_experiments":[{"experiment":"reuse the shared triplet draft without owner-specific tuning, verified independently against this owner's own reference bytes rather than assuming 08010424's score transfers unchanged","result":"confirmed a distinct (slightly better) score of 135/195 at 292/304 bytes for this owner specifically; not identical to either sibling, so each was scored separately rather than reported once for all three."}]},"main:08010704":{"family":"template-main-08021a18","template_owner":"main:08021a18","template_source":"games/gs1/src/graphics/tile/expand_vram_tiles_by_color_table.c","candidate_path":"games/gs1/recon/en/main/08010704.c","reference_bytes":132,"best_candidate_bytes":116,"best_differing_halfwords":48,"best_wrong_instructions":48,"status":"measured-draft","notes":["The clustered template (graphics_owner_13.c, a 4-nibble palette-decode unpack) does not match this owner's actual behavior at all -- it was a weak n-gram/cosine cluster match, not a real shape match. Read games/gs1/asm/08010704.s directly instead: this is a 2D rectangular word-merge/blit over a fixed EWRAM buffer at 0x02010000 (row stride 512 bytes = 128 u32 columns), taking 6 params (srcX, srcY, width, height, dstX, dstY): dst = 0x02010000 + (((dstY<<7)+dstX)<<2), src = 0x02010000 + (((srcY<<7)+srcX)<<2); for each row/col in [0,height)x[0,width): *dstWord = (*dstWord & 0xfff) | (*srcWord++ & 0xfffff000), advancing both pointers by row*512 bytes per row.","The overall shape (pointer setup, mask-merge body, register layout for the two base-pointer computations) matches closely once the shared 0x02010000 base constant is hoisted into one named local (base) reused for both dst/src instead of writing the literal twice -- that alone dropped one duplicated literal-pool load. Using the codebase's common guard-then-do-while idiom (if (height>0) { row=0; do {...} while(++row 48).","The remaining, dominant residual is that the reference compiles BOTH the outer (row) and inner (col) loop counters into a 16.16 fixed-point accumulator: a single register incremented by 0x10000 per iteration, with the loop bound tested via (reg >> 16) and the byte offset extracted via a DIFFERENT shift (>>7 for the row, i.e. row*512 done as a strength-reduced shift of the same accumulator rather than a separate row<<9 multiply). A plain `row++` / `row<<9` loop (both for-loop and guarded-do-while forms tried) compiles to a direct integer counter with a real `lsls r,#9` multiply and a plain top-of-loop compare -- never the accumulator form. I also tried writing the 16.16 accumulator explicitly by hand (`for (rowAcc = 0; (rowAcc>>16) < height; rowAcc += 0x10000)`), but that made things measurably worse (wrong_instructions rose to 92, and it pulled in extra stack parameters/registers), so it is not simply a matter of spelling the accumulator out in the source -- the reference's accumulator form appears to be triggered by some other, still-unidentified source shape.","This looks like a compiler strength-reduction/induction-variable-elimination residual tied to a specific loop shape I have not found by respelling (5 attempts: plain for-loop, guard+do-while, shared base constant, and two hand-written accumulator variants), rather than a simple field/constant mistake -- worth a permuter-style search over loop phrasing rather than further manual guessing.","Params 5 and 6 (the two stack args) are best-guess named srcY/dstY based on which pointer (src vs dst) each participates in; the actual original parameter names/semantics (this is clearly some kind of tile/attribute-buffer rect blit into a fixed low-EWRAM buffer) are unconfirmed beyond what the assembly proves."]},"main:08010788":{"schema_version":1,"namespace":"main","address":"0x08010788","status":"measured-draft","owner_bytes":316,"candidate_bytes":292,"differing_halfwords":144,"wrong_instructions":198,"classification":"map-tile-copy-with-actor-marker-overlay","domain":"Byte-for-byte near-duplicate sibling of main:0x08010424 and main:0x080105d4 (see games/gs1/recon/en/dossiers.json#main:08010424 for the full technical writeup): copies 12-bit tile indices from one region of the 0x02010000 map buffer to another, mask-merging with the destination's upper 4 bits, and overlays an actor position marker icon (from a table at 0x02020000 into a per-actor 2048-byte-stride table at 0x06002800) for dest cells inside one of 3 actor bounding boxes read from Data_03001e70 + 0x104.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 7946 bp; as with its two siblings this is a family-clustering false positive with no usable structural overlap with the assigned template.","This owner's retained .s is structurally identical to main:0x080105d4's (confirmed with `diff` -- only register allocation and one literal-pool-constant's presence/position differ) and uses SIGNED loop-bound comparisons (bge/blt), matching 080105d4 and not 08010424 (which uses bcs/bcc for the same three checks). The retained candidate is the shared s32-parameter draft described in 08010424.json, function-renamed to Func_08010788.","candidate-show reports 292 candidate bytes vs 316 reference bytes, 144 differing halfwords, 198 wrong instructions. See 08010424.json for the full rationale, the Data_03001e70+0x104 corroborating evidence from state_update_0082.c, and the family-clustering-false-positive discussion; that writeup applies to this owner unchanged.","2026-08-31 family stamp: mirrored the four decoder-named actor-bound comparisons. The 292/316-byte and 144/198 scores are unchanged, but topology is now equal and the remaining work is correctly classified as missing-extra-code."],"rejected_experiments":[{"experiment":"reuse the shared triplet draft without owner-specific tuning, verified independently against this owner's own reference bytes rather than assuming 08010424's or 080105d4's score transfers unchanged","result":"confirmed a distinct score of 144/198 at 292/316 bytes for this owner specifically, close to but not identical to its two siblings; each was scored separately rather than reported once for all three."}]},"main:080113e4":{"schema_version":1,"namespace":"main","address":"0x080113e4","status":"measured-draft","owner_bytes":188,"candidate_bytes":184,"differing_halfwords":75,"wrong_instructions":84,"classification":"map-tile-block-update","domain":"Reads the current map position, converts it to tile coordinates, and refreshes a two-by-two block on each of two tile layers.","expressed":["the nullable current-position source and its x/z field widths","the two fixed-point world-to-tile origin conversions","the two layers and nested two-row by two-column traversal","the wrapped sixteen-by-ten tile lookup and five-argument update call"],"notes":["Recovered from the complete retained owner, the local m2c output, aggregate evidence for Data_03001e70, and the approved compiler. No external source or GS2 evidence was used.","The initial typed C compiles to 184/188 bytes with equal branch topology. This converts a previously unscored no-candidate owner into a bounded structural draft; it claims zero DONE bytes.","Unsigned do-while loop counters reproduce all three reference BLS backedges. Signed for-loops emitted BLE and were rejected.","The reference spills both converted origins at sp+8/sp+4 and retains the layer byte offset in fp. The candidate instead retains one origin and spills a loop carrier. A local aggregate, a local array, a volatile local array, an explicit layer-offset carrier, and m2c declaration ordering all preserve the semantic shape but regress size or residual; they were reverted.","No fixed-register variable, compiler barrier, inline assembly, volatile forcing, or fabricated operation is retained. The remaining missing/extra-code residual is not yet narrow enough for permanent-assembly classification."]},"main:080114a0":{"schema_version":1,"namespace":"main","address":"0x080114a0","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":200,"candidate_bytes":200,"differing_halfwords":71,"classification":"map_tile_block_compiler_allocation_module","cross_edition":{"core_bytes":188,"relocation_bytes":4,"literal_bytes":8,"core_diff_bytes":0,"core_identical":true},"domain":"Refreshes the current two-by-two map tile block on two layers and stops as soon as the tile updater reports a blocked cell.","notes":["Recovered from the complete retained owner, its adjacent 080113e4 sibling, the local m2c output, and the approved compiler. No external source or GS2 evidence was used.","The ordinary C emits exactly 200 bytes and 95 instructions with equal branch topology and the same two literal words. Every call, argument, width, offset, constant, early-exit edge, and loop bound agrees.","The remaining residual is a reciprocal allocation of the two converted origins, layer byte offset, layer/row/column counters, and tile-index carriers. The instruction operation sequence is otherwise equal; the allocator decoder reports reciprocal register-role swaps and no unique source repair.","The shipped -fno-expensive-optimizations route improves 79 to 71 differing halfwords at exact extent. Regmove, both schedulers, GCSE, CSE follow/skip, rerun CSE, strength reduction, thread jumps, and every composition with the evidenced route preserve that floor or regress. A routing regression test keeps the flag off adjacent 080113e4.","Relocation-aware six-edition analysis uniquely locates the owner and proves all 188 normalized core bytes identical. One Thumb call relocation and two literal words account for the normalized fields.","Local aggregate, array, volatile-array, explicit layer-offset, declaration-order, and loop-spelling probes do not reproduce the reference allocation without worsening the frame or residual. Fixed-register variables, compiler barriers, inline assembly, and volatile forcing are disallowed, so structured assembly remains the byte-exact implementation."]},"main:08011f54":{"schema_version":1,"namespace":"main","address":"0x08011f54","status":"proven-retained","owner_bytes":132,"executable_owner_bytes":110,"candidate_bytes":132,"differing_halfwords":26,"wrong_instructions":48,"classification":"field_dispatch_compiler_allocation_module","resolved_asm_classification":{"kind":"field_dispatch_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"family_transplant":{"template":"save/read_flash_from_sector.c","score":7291,"threshold":7500,"confidence":"low","verdict":"false positive, confirmed this session","evidence":"read_flash_from_sector.c (ReadFlash) shares only the shape-only register-shuffle prologue and the project-wide `_call_via_r3` indirect-call trampoline idiom (used by dozens of unrelated owners across the project) with this owner. It has no shared callees, field offsets, or constants: it copies its own body into IWRAM and reads flash memory at 0x0e000000 through Data_08007abc, none of which appear in 08011f54. Not used as a source of any evidence below."},"notes":["2026-08-31 exact-closure revalidation: fresh score is 132/132, differing_halfwords=26, wrong_instructions=48, with branch topology and all five literal-pool words exact. The allocator decoder again reports `conflicting-targets`, reflecting the already-documented r4/r5 versus r5/r6/r7 coloring split rather than missing semantics. A finite shipped-pass probe found no improvement: -fno-schedule-insns, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-rerun-cse-after-loop, and -fno-gcse all tie at 26; -fno-schedule-insns2 and -fno-expensive-optimizations regress to 31; -fno-regmove shrinks to 128 bytes and regresses to 65. Together with the recorded 12 statement orders, pointer/table-expression variants, call-argument variants, exact adjacent field siblings, and owner-specific m2c corroboration, this is an honestly bounded allocation blocker. Source remains unchanged; no adoption or DONE bytes are claimed.","Real owner, established entirely from the retained assembly plus two exact/near-exact already-adopted siblings found by grepping this owner's literal-pool constants across games/gs1/src and games/gs1/asm -- not from the low-confidence family-transplant guess above.","games/gs1/src/map/shared/get_cell_attribute_low_nibble.c (Func_08011fd8, byte-exact adopted, address 0x08011fd8 -- the very next owner, 132 bytes after this one starts) shares this owner's entire first two-thirds verbatim in algorithm: table = *(u8 **)ADDR_03001E70; x >>= 16; y >>= 16; map defaults to (u8 *)0x02010000 unless table != 0, in which case map = *(u8 **)(table + (index & 3) * 48 + 304); column = x / 16; row = y / 16; map += (column + (row << 7)) * 4; entry = map[3]. games/gs1/include/map.h's `struct MapCell { u16 metatile_and_flags; u8 collision_code; u8 attribute_b; }` confirms map[3] reads MapCell.attribute_b -- Func_08011fd8 stops at `return *(u8 *)(0x0202c000 + entry * 4) & 15;` (the low nibble of a per-attribute_b config byte); this owner continues past that point.","games/gs1/src/map/get_cell_collision.c (GetMapCellCollision, byte-exact, 0x08012038, 228 bytes after this owner) and games/gs1/src/map/set_cell_collision.c (SetMapCellCollision) independently confirm the same ADDR_03001E70/(layer & 3) * sizeof(struct MapLayer) + 0x130/struct MapCell vocabulary for the map/collision subsystem this owner belongs to.","Beyond the shared prefix, this owner uses the attribute_b-derived config byte's low nibble to index a 16-entry function-pointer table at 0x080134fc, and calls the selected handler with three arguments: a byte pointer into a second per-attribute_b table at 0x0202c001 (0x0202c000 + 1, but genuinely two separate globals -- the reference loads them from two independent literal-pool words rather than deriving one from the other, and this candidate's source only reproduces that when they are declared as two distinct externs), plus the sub-tile pixel offsets (x & 15, y & 15). The call is `bl` to 0x080072f0, which is `_call_via_r3` (0x080072f0 - 0x080072e4 = 0xC = 4 * 3) -- an indirect call through r3, not a real function. Modeled per this project's established idiom for an r0-r3 veneer slot (confirmed against already-adopted veneer-audited siblings games/gs1/src/save/read_flash_from_sector.c and games/gs1/src/graphics/tile/build_sequential_table.c) as a direct call to a locally declared phantom prototype `s32 Func_080072f0(u8 *, s32, s32, s32)` with the real handler value passed as the trailing argument; this reproduces the veneer's `bl` target exactly (both candidate and reference read `bl 0xffff539c` relative) once the target is computed into an s32 local before the call rather than looked up inline in the return expression.","Full m2c workbench run (games/gs1/asm/08011f54.s symbolized against the real agscc type context) independently generated the identical algorithm shape confirmed above -- same table/map/column/row/entry chain, same two 0x0202c00x tables, same 0x080134fc dispatch, same call-with-trailing-target model -- corroborating the hand trace rather than introducing anything new.","Residual (candidate=132 reference=132, differing_halfwords=27, wrong_instructions=48, matched_prefix=0, class=wrong): every operation, operand, and branch matches the reference one-for-one from the first instruction through the final `bl` and epilogue; the entire residual is register-letter and a related register-pressure difference. The reference keeps x and y in callee-saved r5/r6 across the whole body and additionally spends a third callee-saved register r7 on the 0x0202c001 literal-pool word (needed because r0-r3 are all still live with other values -- the config-table pointer, the entry*4 index, the (config&15) nibble, and the 0x080134fc table base -- at the point that word is loaded); this candidate's allocator instead keeps x in an unsaved r4 (this owner's ABI treats r4 as available scratch not requiring push/pop, confirmed by the reference's own unsaved use of r4 for the 0x080134fc pool word) and finds room for the 0x0202c001 word in a caller-saved register, so only r5 needs saving. Tried and rejected: separate `u8*` intermediate for the config load (re-fuses to a single indexed ldrb, losing the reference's two-instruction address-then-load shape); named-array subscript vs raw-pointer-cast styling for each of the three tables (raw-cast is required for the config byte's two-step address/load shape; named-extern-array is required for 0x0202c001 to stop the compiler folding it into `0x0202c000 + 1`; named-array is required for the 0x080134fc handler lookup to keep its single fused indexed load); all 12 valid topological statement orders of {config load, x &= 15, y &= 15, target = table[config]} respecting `config` before `target` (27 wrong-halfword floor at the order recorded in source; every other order measured 29-44); computing the trailing-target call's first argument into a named local before vs after the target lookup (both regress to 31); inlining the target lookup directly into the call expression instead of a named local (regresses to 31). This reads as the same 'final register-letter/allocation choice not controllable via source reordering' residual class already catalogued elsewhere in this project for compiler-output owners with a fully credible algorithm; it did not reach the permanent-assembly gate (no compiler-pass evidence rules out an ordinary-C shape, only that this session's search did not find one) and did not reach the zero-differing-halfwords adoption gate, so no name was registered and no source-paths.json entry was added.","Recovered only from this owner's retained assembly (games/gs1/asm/08011f54.s), already-adopted exact sources under games/gs1/src, in-repo headers, the approved compiler, and the m2c workbench run against the real reference bytes. No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","2026-08-31 retained-assembly proof: the current cross-edition object route proves all 108 relocation-normalized core bytes identical across six editions. The complete candidate has the exact 132-byte extent, equal topology and exact five-word pool, and accounts for the layer selection, signed coordinate conversion, map-cell lookup, attribute/config reads, sub-tile coordinates, dispatch-table lookup, indirect-call veneer, arguments, and return. The remaining stream differs only in saved-register coloring. The conflicting-target decoder verdict, all 12 valid statement orders, pointer/table/call variants, exact adjacent siblings, owner-specific m2c corroboration, and canonical regmove, scheduling, CSE, GCSE, rerun-CSE and optimization probes preserve the 26-halfword floor or regress. Structured assembly therefore remains authoritative under field_dispatch_compiler_allocation_module; the candidate does not claim exact C."]},"main:080120dc":{"schema_version":1,"namespace":"main","address":"0x080120dc","status":"measured-draft","owner_bytes":192,"executable_owner_bytes":192,"candidate_bytes":184,"differing_halfwords":72,"wrong_instructions":76,"classification":"map-object-step-height-check","resolved_asm_classification":{"kind":"compiler_output","retention":"asm","confidence":"likely"},"notes":["Given an object pointer (map_layer byte at +0x22, s32 height at +0x14) and a candidate position (Q16.16 x/z pair, integer part read directly as the high halfword at +2/+10 of a 12-byte {x,unused,z} triple matching the stack buffer 0800dd70.s/0800df04.s/0800ee14.s/0800ebec.s build from an object's own x/unused/z words before every one of their calls into this owner), looks up *ADDR_03001E70 (NULL -> return 0), selects state->layers[object->map_layer].cells for map_layer<=2 else falls back to the fixed EWRAM tile buffer 0x02010000, floor-divides the position by 16 to a tile x/z ('if(v<0) v+=15; v>>=4'), and indexes a 4-byte MapCell at cells + (tile_x + tile_z*128)*4. If the cell's byte 2 is 0xFF, returns 2 (off-map). Otherwise cell byte 3 is an attribute index into TWO SEPARATE tables sharing one idx=attr*4: Data_0202c000[idx]'s low nibble selects a ROM function-pointer table at 0x080134fc, and the ADDRESS of Data_0202c001[idx] is passed as that function's first argument alongside the position's own low-4-bit x/z fractions -- an indirect call through the r3 call-via-rN veneer slot (0x080072f0). That height minus object->height is compared against +0x80000 (too high -> return 1) and -0xC0000 (too big a drop -> return -1), else returns 0 (passable).","Session picks up a preserved, credible but UNVERIFIED draft from scratch/wave4-unverified-holding/24 (left mid-flight by an interrupted prior wave, before it could run candidate-show or commit). Independently re-ran candidate-show against the now-working ROM: the prior agent's claimed 72 differing_halfwords / 74 wrong_instructions (180/192 candidate/reference bytes) reproduced exactly on a fresh compile, confirming their measurement was accurate even though unverified at the time.","One real structural correction found and applied this session: the inherited draft modelled the per-attribute record as a single `struct TerrainAttrRecord { u8 kind; u8 data; ... }` array (attr_addr+1 for the second field), which only accounts for the 0x0202c000 literal. The retained assembly (games/gs1/asm/080120dc.s) actually pools THREE distinct 4-byte constants -- 0x03001e70, 0x02010000, 0x0202c000, 0x080134fc, 0x0202c001, 0xfff40000 -- and its instruction stream loads 0x0202c000 and 0x0202c001 as two INDEPENDENT bases (two separate `ldr rX,[pc,#N]` loads, both later added to the same attr_idx*4 register), not one struct base plus a +1 byte offset. Replacing the struct with two parallel `extern u8 Data_0202c000[]; extern u8 Data_0202c001[];` arrays sharing one `idx = cell[3] << 2` correctly reproduces both literals and the shared-index reuse pattern. differing_halfwords stayed at 72 (dominated by the register-allocation residual below), but this is a strictly more evidence-backed model -- the struct model is provably wrong since it cannot emit the 0x0202c001 constant that the reference genuinely contains -- so it replaces the inherited draft rather than being kept alongside it.","Tried and rejected as a further lead: an explicit intermediate `u8 *entry = &Data_0202c000[idx]; kind = *entry;` to force the reference's separate address-then-load-at-offset-0 pattern (vs. one fused register-indexed ldrb). The compiler folds this back to a single indexed load regardless of the intermediate pointer variable or a re-derived (non-CSE'd) `attr_idx << 2` computed twice -- this compiler's forward-substitution is not source-structure-sensitive here, so it is not a usable lever without an escape hatch.","Remaining residual (all ~72 differing halfwords) is a single coherent register-allocation hunk, confirmed by inspecting every '!' line in the aligned diff: every mismatch is a same-mnemonic, same-immediate operand rename, never a differing opcode. The reference keeps THREE persistent callee-saved locals live across the whole body and the indirect call (x in r5, z in r6, object in r7 -- push/pop {r5,r6,r7,lr}), while this compiler's allocator only commits two (z and object) and keeps x in caller-saved r4 (push/pop {r5,r6,lr}), an 8-byte-shorter, leaf-adjacent allocation. All three locals have an identical use-count/live-range shape (one def, two uses spanning the same code region: x and z are each read once for tile flooring and once for the final &15 mask; object is read once for map_layer and once post-call for height) -- confirmed by an explicit register-by-register use count over the retained .s -- so this is not explainable by a source-visible liveness or use-count difference; it is the allocator's internal tie-break for which of three equally-live pseudo-registers gets the last callee-saved slot. This matches the same 'final register-letter/allocation choice not controllable via source reordering' floor already catalogued elsewhere in this corpus (see e.g. 080fb2a4.json's leaf-vs-framed residual). Not eligible for permanent-assembly classification (no compiler-pass evidence that the shape is unreachable, only that this session's source-level search did not find the lever); retained assembly stays authoritative and this draft claims zero DONE bytes.","cross-edition correspondence was not run this session: it is JA-relative and the local roms/gs1-ja.gba symlink is the same known-broken input CONTRIBUTING's `make correspondence` step is exempted for; out of scope here.","Recovered only from retained owner assembly (games/gs1/asm/080120dc.s), approved local GS1 EN ROM evidence, sibling EXACT owners in games/gs1/src/map/ (get_cell_collision.c, check_position_cell_occupied.c, set_cell_collision.c), and the approved compiler. No other decompilation project, symbol map, or disassembly was inspected."]},"main:080164d4":{"schema_version":1,"namespace":"main","address":"0x080164d4","status":"measured-draft","owner_bytes":150,"score":{"measured":"2026-08-31","candidate_bytes":142,"reference_bytes":150,"differing_halfwords":71,"wrong_instructions":82,"class":"missing-extra-code","note":"The canonical route now has equal branch topology. The shipped -fno-expensive-optimizations probe reaches the exact 150-byte extent and DH46/wrong76, but is retained only as route evidence because it is not exact or corroborated across the translation unit. Zero DONE bytes are claimed."},"notes":["Recovered the complete five-argument UI-window tile clear: pixel bounds are rounded to tile coordinates, the attribute rectangle is cleared, the mirrored tilemap interior is filled with 0xf020, and the render-dirty byte is set.","Seven bounded shipped-flag routes were scored. Three were byte-neutral, -fno-schedule-insns2 improved DH by one, and the -fno-expensive-optimizations result is recorded separately rather than installed as a speculative per-owner override."]},"main:080165d8":{"schema_version":1,"namespace":"main","address":"0x080165d8","status":"measured-draft","owner_bytes":150,"executable_owner_bytes":150,"candidate_bytes":152,"differing_halfwords":73,"wrong_instructions":108,"template_family":"template-main-0800f9f4","template_source":"games/gs1/src/map/decode_tile_rows.c","domain":"Not a tile-row decoder despite the n-gram clustering with decode_tile_rows.c: allocates a free 40-byte slot from a fixed-size array anchored at *(0x03001e8c)+1568 (scanning up to 4 slots for one whose leading word is 0) and populates it as what looks like a floating text/popup entry -- an owner word, an x/y position pair (each shifted left 8), a duration pair (constants 15 and 10), a 4-halfword payload either copied from an optional caller-supplied buffer or zero-filled, and a couple of zeroed status halfwords.","behavior":["scans up to 4 slots of stride 40 starting at Data_03001e8c-relative base 1568 for the first whose word-sized 'owner' tag field is 0","if none is free, the function is a no-op","otherwise writes: position fields (x<<8 at two offsets, y<<8 at one), the raw second parameter unshifted at another offset, two fixed timer/duration constants (15, 10), the owner id, three zeroed halfword status fields, and the 6th parameter into one more halfword","then either copies 4 halfwords from an optional pointer parameter into an 8-byte payload region, or fills that region with a shared zero constant (the same Data_00000000 pool-literal-zero idiom seen elsewhere in this corpus) when the pointer is null","clears one final halfword field before returning"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete candidate was written and scored; its size already lands within 2 bytes of reference (152 vs 150) and every field write/offset in the populate section is corroborated by the raw assembly, but register allocation diverges heavily from the very first instruction (108 wrong instructions) because the compiler schedules this candidate's free-slot search and field-population statements in a different order than reference does."},"remaining":"The behavior and every struct offset used are read directly off the retained assembly and are reasonably confident, but this is a genuinely unfamiliar struct (no template correspondence beyond superficial loop/store n-grams) with no prior recovery elsewhere in the corpus to cross-check against, so field names are placeholders. The instruction-order gap looks like a source-shape question (which sub-expression the compiler evaluates first) rather than a settled compiler-internals residual, but closing it would need deliberately reordering the populate statements against reference's literal instruction sequence one at a time, which is out of scope for this pass's time budget.","notes":["The base pointer *(0x03001e8c) matches the 'runtime globals table' also referenced (at different fixed offsets, e.g. entry 12 = 0x03001ebc) by several already-recovered overlay owners, so this slot array is very likely part of the same global runtime-workspace table; not otherwise cross-checked here.","Recovered only from retained owner assembly, cross-references to the 0x03001e8c/0x03001ebc runtime-table idiom used by other already-recovered owners, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."],"sr_route_evidence":{"verdict":"COINCIDENTAL","measured":"2026-08-29","note":"asm/080165d8.s loop bodies (.L0-.L7) are all short and mixed with calls/loads; no retained empty countdown loop or clear non-strength-reduced addressing shape found by static inspection. No dual-compile performed. Provisional COINCIDENTAL pending compiler diff."}},"main:08017248":{"schema_version":1,"namespace":"main","address":"0x08017248","status":"measured-draft","owner_bytes":282,"candidate_bytes":258,"differing_halfwords":127,"wrong_instructions":172,"classification":"window-interior-fill","domain":"Guarded window-tilemap draw: given (x,y,width,height,mode), computes a base cursor into *Data_03001e8c at ((y<<5)+x)*2, bails out unless 2<=width<=30 and 2<=height<=30, then walks the INTERIOR rows/columns only (row 1..height-2, col 1..width-2, i.e. skipping the outer ring) writing 16-bit tile values built from a running tile-index counter masked with 0xFFF and OR'd with a fixed 0x127 flag, choosing between two different column-vs-row stride patterns depending on whether the 5th (stack) argument is zero. Sets base[0xEA3]=1 (a dirty/redraw flag, one past the template's own RENDER_ALT_OFS=0xEA2) on the drawn path.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 8626 bp -- the highest score of any owner in this assignment batch -- but the reference assembly shares only the coarse (y<<5)+x cursor idiom and the Data_03001e8c base with the template; there is no tile-value masking against 0x3FF, no RENDER_TILE_ATTR_OFS/RENDER_ALT_OFS bit-clear logic, and the real control flow (four-way bounds guard, interior-only double loop with two mode-selected stride shapes) is unrelated to the template's parametrized rectangle clear. The template gave a starting hint about the base-pointer/global (Data_03001e8c, shared with 0801e318 and the template) but essentially no usable control-flow shape.","The exact tile-index arithmetic is genuinely uncertain. There is no `muls` instruction anywhere in the reference, so the per-column tile-index step in the mode==0 branch is produced by repeated addition of a loop-invariant stride register (confirmed from the reference's r0 += r2 pattern inside the inner loop, where r2 is recomputed each outer-row iteration as something derived from height-2) rather than a single multiply -- this candidate's 'tile += stride' loop reflects that repeated-add shape, but the exact base value fed into the running counter (this draft guesses 0xF000-2, i.e. treating it as (0xF000 + row) with a col=0 offset of -2) is not independently confirmed against the reference's literal pool words, which were not individually resolved to their source position without assembling.","Two candidate hypotheses were scored for the tile-index formula in the mode==0 branch: a per-column additive stride (this draft, retained) at 127 differing halfwords / 172 wrong instructions, and a per-column multiplicative-looking 'row + col*width' form at 129/149 (rejected below, since 172 vs 149 wrong_instructions favors the second but differing_halfwords -- the project's primary decision metric -- favors the first, and neither is remotely close to zero). Given how close and inconclusive the two are, and that neither reaches the template's level of match, this genuinely needs the pool words resolved from a real disassembly rather than further guessing.","This is a source-shape gap requiring dedicated reconstruction (correct disassembly of the four literal-pool constants in each pool group, and confirmation of the mode!=0 branch's row-major write pattern against the reference byte-for-byte), not a good target for further family-transplant attempts against the assigned template."],"rejected_experiments":[{"experiment":"model the mode==0 interior fill as a transposed write where the VRAM cursor itself strides by (height-2) per column (i.e. treat the tile-index computation and the VRAM write address as the same pointer)","result":"worse (worse structural match, abandoned before scoring) -- the reference clearly keeps two separate values live across the inner loop (r0, the running tile-index accumulator that strides by height-2 each column; and r1, the VRAM cursor that strides by a flat +2 each column), which a single merged pointer cannot reproduce."},{"experiment":"model the mode==0 tile-index as tile = 0xF000 + row + col*(height-2) (a per-column additive stride, matching the reference's repeated-add pattern and the absence of any muls instruction)","result":"best result so far: 127 differing halfwords / 172 wrong instructions at 258/282 bytes. Retained as the candidate."},{"experiment":"model the mode!=0 branch's tile-index as tile = 0xF000 + row + col*width (row-major across the full width instead of the additive-stride shape used in mode==0)","result":"produced 129 differing halfwords / 149 wrong instructions overall (mode==0 branch unchanged) -- fewer wrong_instructions but slightly more differing_halfwords than the retained candidate; inconclusive, not clearly better, and still far from exact, so not adopted as the retained draft."}]},"main:080175c0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080175c0","status":"proven-retained","owner_bytes":96,"classification":"compiler_frame_context_module","score":{"measured":"2026-08-30","candidate_bytes":96,"reference_bytes":96,"differing_halfwords":2,"wrong_instructions":4,"class":"frame-context","note":"The ordinary-C source now emits every reference instruction except the prologue and epilogue stack adjustment: GCC reserves 8 outgoing bytes while the reference reserves 16. The two used outgoing argument slots and all control flow are exact. The remaining unused eight-byte frame context must be explained from source or translation-unit evidence; it remains Draft C and claims zero DONE bytes."},"notes":["Recovered from the retained owner, the aggregate-aware m2c seed, the prepared template pack, and the approved compiler.","Explicit byte-offset construction and two proven early-return guards reproduce the reference address schedule and return-zero carrier; the canonical score improved from 47 to 2 differing halfwords.","The owner uses only its first two incoming arguments, so the unsupported three unused parameters were removed from the provisional signature.","2026-08-31 bounded closure, compiler axis: -O3, -Os, -fno-defer-pop, -fno-function-cse, -fno-regmove, and -fno-schedule-insns all preserve the exact 96-byte candidate and the same two-halfword 8-versus-16-byte frame residual. -O1 shortens the candidate to 92 bytes with 41 differing halfwords, -fno-omit-frame-pointer emits 108 bytes with 52 differing halfwords, and -fno-schedule-insns2 preserves 96 bytes but regresses to 23 differing halfwords. No tested shipped route explains the frame while preserving the otherwise exact body.","2026-08-31 bounded closure, source-context axis: a plain unused u32[2] local is eliminated and leaves the residual unchanged. Marking that array volatile makes the owner mechanically byte-exact by forcing eight otherwise unreferenced stack bytes, but no reference instruction reads, writes, or takes the address of those bytes and no caller evidence identifies such an object. The volatile padding probe was therefore rejected as an evidence-free frame-forcing device and removed. This owner remains Draft C pending authentic translation-unit or source evidence for the extra eight bytes.","2026-08-31 frame-context backend proof: the shipped ARM target defines STACK_BOUNDARY as 32 bits and ACCUMULATE_OUTGOING_ARGS. Its epilogue restores exactly get_frame_size() plus current_function_outgoing_args_size (alchemy-gcc/agscc/gcc/config/arm/arm.h:694,1335; arm.c:6892-6896), while calls.c derives the preferred boundary from that four-byte target boundary and records only the maximum required outgoing area. This owner's sole six-argument call requires two stack words, so the ordinary source has an eight-byte outgoing area and zero live local-frame bytes. The reference's sixteen-byte adjustment therefore proves eight additional bytes of source or translation-unit frame context, not an allocator or scheduling choice. Because no reference instruction observes those bytes, their object type and semantics are not recoverable from this owner. The only DH0 probe, a volatile u32[2], manufactures that unknown context and remains inadmissible padding. Bounded verdict: exact ordinary C is blocked until authentic shared-TU/source evidence identifies the extra local object; retain the legitimate DH2 draft.","The complete source semantics, exact extent, equal topology, exact instruction stream outside the frame adjustment, and shipped-backend proof satisfy the repository's compiler-limitation contract. The owner remains structured assembly, now proven retained rather than unresolved C debt.","No inline assembly, register forcing, compiler barriers, copied instruction bytes, or external decompilation source was used."]},"main:08017658":{"schema_version":1,"namespace":"gs1-en-main","address":"0x08017658","status":"measured-draft","owner_bytes":276,"score":{"measured":"2026-08-27","candidate_bytes":276,"reference_bytes":276,"differing_halfwords":131,"wrong_instructions":122,"class":"wrong","command":"tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/08017658.c --owner 0x08017658 --size 276","note":"Candidate reaches the reference's exact 276-byte length with the same 121 instructions in the same order (same calls, same branch structure, same literal-pool constants). The whole residual is a register-allocation/promotion-count mismatch: the reference keeps 3 long-lived values resident in r8/r9/sl (base scene pointer, the &local28 out-pointer, and the render-entry index) across both inner calls, while this compiler's allocator only promotes 2 of those (index, &local28) and keeps the base pointer resident in r7 instead. That single letter/count difference shifts the frame's 4-byte alignment pad (sub sp,#36 vs #32) and cascades a register-letter difference into nearly every subsequent instruction, even though the underlying operation sequence is identical."},"family_transplant":{"best_template":"games/gs1/src/ui/text/prepare_message_work.c","template_score":"7382/10000 (below 7500 adoption threshold)","assessment":"Genuine partial sibling, not a shape-only false positive: this owner and the template share the exact 'index = BuildRenderEntries-shaped-call(key, 1); if (RENDER_ENTRY_TBL_OFS[index] == 0) bail' idiom, and both call the real, already-adopted UiWork_Finalize (main:08016418, ui/render/finalize.c) the same way -- Finalize(work, 1) on an activation failure. The template's own body (UiText_BuildRenderEntries/UiWindow_Create/UiWork_ActivateChannel with 3-5 args each) does not match this owner's actual call targets or argument counts (Func_0801868c takes 7 args, Func_080165d8 takes 6), so no source was transplanted -- the template only supplied vocabulary (RENDER_* field names, the FIELD macro convention) confirmed independently against field_owner_91.c (RENDER_RESULT_OFS/+2 as a shared 's16 result; s16 value' pair) and field_owner_20.c (RENDER_BUSY_OFS+1/+2, the exact busy-flag pair this owner's success path clears -- field_owner_20/main:08017620 is this owner's immediate predecessor in the retained assembly and is byte-exact adopted as the flag *setter* counterpart)."},"rejected_experiments":[{"experiment":"4th argument as a real C bitfield struct (u32 flags:16; u32 id:12;) instead of a plain u32 with explicit (packed<<4)>>20 / packed&0xFFFF","result":"worse: 304 bytes vs the reference's 276 -- this compiler emits a shift-pair for a bitfield-typed low-16 read instead of the reference's ands-with-0xFFFF-literal, so the bitfield spelling doesn't match; the plain-u32-with-explicit-mask spelling (retained) reaches the exact reference byte length instead"},{"experiment":"named s32* out1/out2 locals aliasing &arg1/&arg2 (mirroring the &local28 out-pointer lever that did help)","result":"worse: 304 bytes, 147 differing halfwords -- unlike &local28, arg1/arg2 are read back by value right after the call, so caching their addresses in named locals adds a live range instead of removing one"},{"experiment":"shared 's32 zero = 0' local reused for both the RENDER_RESULT_OFS+2 store and Func_0801868c's 7th (zero) argument, mirroring the reference's apparent single r6 register reused for both","result":"worse: 264 bytes -- this compiler constant-folds a simple zero-initialized local back to a fresh immediate at each use site rather than keeping one register resident, so it does not reproduce the reference's live-range reuse"},{"experiment":"moving the flags accumulator's zero-initialization earlier (right after the RENDER_ENTRY_TBL_OFS guard, before the Func_0801868c call, matching the reference's early 'movs r7,#0' position) and/or reordering local declarations to mirror the reference's apparent pseudo-definition order","result":"small, inconsistent shifts in wrong_instructions (139-149) but never closed the base-pointer promotion gap"}],"notes":["Owner sits immediately after main:08017620 (field_owner_20.c, byte-exact adopted) in the retained assembly; that function sets RENDER_BUSY_OFS+1/+2 to 1 per flag bit, and this owner's success path clears the same two byte fields to 0 -- a set/clear pair on the same struct.","The packed 4th argument's low 16 bits are tested for individual flag bits (1, 8, 16, 32) and remapped into a differently-coded flags value (2, 8, 128, 256) passed as Func_080162d4's 5th argument; bits 16-27 are extracted as a 12-bit id stored into the scene struct's RENDER_RESULT_OFS field.","Recovered only from the retained owner assembly (games/gs1/asm/08017658.s), already-adopted exact sources under games/gs1/src/ (ui/render/finalize.c, ui/text/prepare_message_work.c, ui/text/draw_resource.c, ui/text/draw_character.c, ui/render/lookup_named_value.c, and the ui/runtime/set_busy_flags.c and field_owner_91.c byte-exact drafts), in-repo headers (gs1_edition.h, global_cells.h), and the approved compiler. No other decompilation project or external symbol map was consulted.","This candidate claims zero DONE bytes; not registered in source-paths.json since it is not byte-exact."]},"main:0801776c":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0801776c","status":"measured-draft","owner_bytes":304,"score":{"measured":"2026-08-27","candidate_bytes":308,"reference_bytes":304,"differing_halfwords":113,"wrong_instructions":59,"class":"wrong","command":"tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/0801776c.c --owner 0x0801776c --size 304 --align","note":"Not yet registered in the claimed/asm build manifests (below the family-transplant confidence threshold, no automatic workspace), so candidate-show/workbench need --owner/--size and workbench itself refuses (needs a registered symbol name to label the reference asm) -- scored by hand with --owner/--size instead. Control flow, every callee, every field offset and global address are hand-traced from games/gs1/asm/0801776c.s and are believed correct (see shape.derivation). The residual 113 differing halfwords / 59 wrong instructions are register-allocation and stack-slot-timing artifacts of this specific old compiler, not logic errors: (1) the 2-word stack buffer passed by pointer to Func_0808a278 gets its base address materialized eagerly by this compiler under ordinary post-declaration assignment (pos[0]=0;pos[1]=0;), unlike the reference which uses plain immediate sp+4/sp+8 stores and only computes the address fresh at the call site; switching to an aggregate initializer (`s32 pos[2] = {0, 0};`) fixed this for the buffer itself and cascaded to fix essentially all of the x/y/width/height stack-slot addressing for the rest of the function (dropped differing_halfwords 142->113), but left the frame ~4 bytes (2 halfwords) longer than reference, apparently from how this compiler now schedules the stack-frame setup relative to the base-pointer load. (2) the Data_02000240+500 pointer read: reference computes the address at RUNTIME via `movs r2,#250; lsls r2,r2,#1; adds r3,r3,r2\u2014every spelling tried (`+500`, `+250*2`, `+(250<<1)`, `&Data_02000240_as_s16[250]`) gets constant-folded by this compiler into a single pool literal instead, so the true source almost certainly indexes through a name/macro this compiler treats as non-foldable for some reason not yet identified. (3) the pos[1]>>3-derived y value: reference keeps the shifted value in one register end-to-end (asrs r3,r3,#3; cmp r3,#9; ble; subs r3,#5 / adds r3,#4, all in r3); every C shape tried (an explicit intermediate local, the raw expression repeated three times, an explicit goto-labelled sequence writing straight into y) reproduces the branch/store shape correctly but the compiler still spills the intermediate to r1 plus an extra register copy into r3, or (in the goto form) spills the merged value to sp+12 and grows the candidate to 308 bytes. None of the several branch-polarity or declaration-order experiments tried changed this. Given the function is fully understood and every remaining diff is this class of allocator/scheduling artifact rather than an unresolved unknown, further exact convergence would need a lower-level lever (the kind of allocator-order/liveness tooling noted on other owners in this cluster) rather than another manual C respelling."},"shape":{"derivation":"Traced instruction-by-instruction from games/gs1/asm/0801776c.s (no family-transplant template cleared the 7500/10000 threshold; the matcher's best guess, games/gs1/src/battle/presentation/run_action_and_wait.c at 7258/10000, shares only the generic WaitFrames(1) polling idiom and the r8/sl register-shuffle prologue used by dozens of unrelated owners in this project -- no shared field offsets, globals, or real callees, so treated as a false positive per this wave's instructions and not used. Real evidence instead: games/gs1/asm/080187ac.s / games/gs1/asm/08017658.s / games/gs1/asm/08017364.s / games/gs1/asm/08017394.s / games/gs1/asm/08016418.s / games/gs1/asm/0808a278.s / games/gs1/asm/08094154.s for the callees; already-adopted games/gs1/src/ui/text/get_resource_dimensions.c (Func_080187ac = UiText_GetResourceDimensions) fixes that call's 5-argument (no, &out1..&out4) shape exactly; games/gs1/src/ui/render/finalize.c, is_complete.c, and ui/runtime/is_idle.c fix UiWork_Finalize/UiWork_IsComplete/UiWork_IsIdle's signatures; games/gs1/src/ui/timed_notice/create.c is a close sibling that calls UiText_GetResourceDimensions the same way and computes `x=(30-third)>>1; y=(10-fourth)>>1` -- this owner does the same with 12 instead of 10 (a taller box). games/gs1/include/gs1_edition.h's EN-edition offsets nail every field write: RENDER_BUSY_OFS=0x12F9 (the busy byte this owner sets/clears), RENDER_MENU_BUSY_OFS=0xEA6 (set when flags&0x20; games/gs1/src/ui/window/create_with_layout_bounds.c and ui_owner_27.c show the same offset used the same way), RENDER_RESULT_OFS=0x12F4 and RENDER_RESULT_OFS+2=0x12F6 (both cleared unconditionally at the end; games/gs1/src/ui/set_render_result_from_object.c shows this exact pair used as two s16 fields). games/gs1/src/overlays/actor_effect_motion/update_actor_proximity.c documents 0x03001e8c as a pointer table whose entry 0 is the 'scene' base this owner caches in r8. The caller-side signature `void Func_0801776c(s32, s32)` is independently confirmed by three already-drafted callers -- games/gs1/src/save/state/write_slot_pair.c, runtime_owner_249.c, and 0801faa8.json's own shape note -- all of which call `Func_0801776c((s32)&Value_0000000a, 1)` on an error path, matching a general 'show message box `no` with `flags`' role; games/gs1/asm/0801faa8.s and 080207c4.s show further direct callers passing a pc-relative message-id literal and small flag immediates (1, 9). Bit meanings recovered from the branches: flags&1 -> passed through as Func_08017658's 4th arg and reused verbatim as UiWork_Finalize's release arg; flags&2 -> sets RENDER_BUSY_OFS before layout; flags&4 -> skips the finalize+wait-for-idle block entirely; flags&8 / flags&0x40 -> fixed +4/+12 row offset instead of the character-avoiding auto-position branch; flags&0x20 -> sets RENDER_MENU_BUSY_OFS while the box is up. The auto-position branch (no flags&8/0x40) reads a pointer out of Data_02000240+500 and calls Func_0808a278 (a far-call veneer to Func_08094154, itself already retained in games/gs1/asm/08094154.s), which fills a 2-word screen-position buffer from an object's world position minus a camera offset at 0x03001e70+228; the y half is shifted right 3 and compared to 9 to decide +4 vs -5, matching a 'don't cover the character on screen' box-placement heuristic.","call_targets":{"Func_080187ac":"UiText_GetResourceDimensions (adopted exact, games/gs1/src/ui/text/get_resource_dimensions.c)","Func_08017658":"unnamed window/text-box creation call, no exact sibling found; signature (no, x, y, release) recovered from this owner + games/gs1/asm/08017658.s's own body","Func_0808a278":"far-call veneer (games/gs1/asm/0808a278.s) to Func_08094154 (retained, games/gs1/asm/08094154.s) -- fills a 2-word screen-position buffer for an object pointer","Func_08017364":"UiWork_IsComplete (adopted exact, games/gs1/src/ui/render/is_complete.c)","Func_08016418":"UiWork_Finalize (adopted exact, games/gs1/src/ui/render/finalize.c)","Func_08017394":"UiWork_IsIdle (adopted exact, games/gs1/src/ui/runtime/is_idle.c)","Func_080030f8":"WaitFrames (types.h shared name; retained code-gap owner, games/gs1/asm/080030f8.s)"}},"rejected_experiments":[{"experiment":"pos[0]=0;pos[1]=0; as two post-declaration array-element assignments (bare array, &pos[0], and a 2-field struct all tried)","result":"compiler always materializes the buffer's base address (add r5,sp,#N) immediately after the prologue and keeps it live for the whole function, vs reference's plain immediate sp+4/sp+8 stores with a fresh address computed only at the call site -- 142 differing halfwords"},{"experiment":"two independent scalar locals (pos_x, pos_y) with only &pos_x taken, or pos_y marked volatile","result":"breaks the guaranteed memory adjacency Func_0808a278 relies on (pos_y stops sharing pos_x+4), and separately destabilizes the whole prologue's register assignment (sl stops being used for `no`, frame shrinks by 4 bytes) -- 150+ differing halfwords, semantically unsound besides"},{"experiment":"s32 pos[2] = {0, 0}; (aggregate initializer instead of post-declaration assignment)","result":"fixed the buffer's address timing and cascaded to fix nearly all of the x/y/width/height stack-slot addressing -- differing_halfwords 142->113, but left the candidate 4 bytes longer than reference (308 vs 304)"},{"experiment":"Data_02000240+500 spelled as +500, +250*2, +(250<<1), and &((s16*)Data_02000240)[250]","result":"every spelling gets constant-folded to a single pool literal; reference computes the address at runtime via a literal 250 shifted left 1 -- no C spelling tried reproduces this"},{"experiment":"pos[1]>>3-derived y: intermediate named local, the raw expression repeated three times, and an explicit goto/label sequence writing straight into y (matching the reference's own .L4/.L2 label shape)","result":"goto form reproduces the correct branch polarity and store target but spills the merged value to sp+12 and grows the candidate by 4 bytes (308); the other two forms keep the right byte count but always land the shifted value in r1 with an extra register copy into r3, unlike reference's single-register r3 reuse"},{"experiment":"branch polarity swap (dy<=9 vs dy>9) for the y=dy+4/y=dy-5 choice, and reordering the x=0;y=0 zero-init relative to release=flags&1","result":"no measurable effect on differing_halfwords in either case -- this compiler's stack-slot and branch-shape choices here are not driven by simple source-order or condition-polarity changes"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact sibling sources, in-repository headers, and the approved compiler.","Family-transplant score for games/gs1/src/battle/presentation/run_action_and_wait.c was 7258/10000 (LOW confidence, below the 7500 threshold) and, on inspection, is a shape-only false positive: same r8/sl register-shuffle prologue, unrelated real semantics (battle action dispatch/wait vs. this owner's UI message-box open/position/wait). Not used as a template.","This candidate claims zero DONE bytes."]},"main:080178b0":{"schema_version":1,"namespace":"main","address":"0x080178b0","status":"measured-draft","owner_bytes":436,"score":{"measured":"2026-08-31","candidate_bytes":424,"reference_bytes":436,"differing_halfwords":206,"wrong_instructions":213,"class":"missing-extra-code","note":"Fresh candidate-show result: 424/436 bytes, differing_halfwords=206, wrong_instructions=213, topology equal. This materially advances the prior only-compiling fallback (380/436, differing_halfwords=211, wrong_instructions=306, topology different); the aggregate-m2c candidate itself failed compilation. The remaining 12-byte residual is retained honestly and claims zero DONE bytes."},"notes":["Recovered the actual three-argument signature (packed window selector, output words, source buffer), the 384-byte local tile buffer, runtime width fields, two table formats, two expansion callbacks, and the four-level nibble-packing traversal."]},"main:08019000":{"schema_version":1,"namespace":"main","address":"0x08019000","status":"proven-retained","classification":"ui_window_compiler_allocation_module","owner_bytes":140,"executable_owner_bytes":140,"candidate_bytes":140,"differing_halfwords":27,"wrong_instructions":36,"domain":"Writes one screen-entry (tile index/flip bits, optionally OR'd with a palette-bank mask selected by a mode argument) into the UI window tilemap buffer at Data_03001e8c, at a single (x, y) cell offset by the window's own x/y fields and bounds-checked against the window's own width/height fields.","behavior":["loads the shared tilemap base pointer *(u16 **)ADDR_03001E8C (Data_03001e8c, the same global every already-adopted ui/window and ui/text owner in this codebase dereferences)","rejects the call outright (no write) if y+1 is outside [0, window->height-1) or x+1 is outside [0, window->width-1), using the window's own u16 fields at offsets 0x8 (width) and 0xa (height), matching WINDOW_WIDTH/WINDOW_HEIGHT in games/gs1/src/ui/window/update_interpolated_geometry.c","computes a palette-bank mask from the mode argument: mode==3 -> 0xf000, mode==2 -> 0xe000, mode==4 -> 0x1000, any other value -> 0","mode==1 draws nothing at all (early return)","mode in [2,4] computes index = (window->y-field + y + 1) * 32 + (window->x-field + x + 1) using the window's u16 fields at offsets 0xc (x) and 0xe (y) -- the exact same field pair fill_tilemap_rect.c, set_tile_attribute_rect.c, and set_tile_attribute_bit_rect.c already use for the identical offset arithmetic -- bounds-checks it against 640 (32x20 cells), and stores mask|value as one halfword","mode==0 or mode>4 recomputes the identical index and, if in bounds, stores value alone (no mask OR'd in)","the only real caller found in this repository, games/gs1/src/ui/window/draw_three_tile_column.c, always passes mode=0, so only the plain (no-OR) store path is exercised in practice; the mode 1-4 dispatch is evidenced solely by the retained assembly itself"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"Candidate now matches the reference's owner extent exactly (140/140 bytes, same instruction count 68/68) and its full control-flow shape (branch targets, branch polarity, and constants) matches line-for-line. The remaining 29 differing halfwords / 40 wrong instructions are confined to two classes documented in notes: (1) a single branch-encoding mismatch on the mode>=1 guard (own compare constant #1 vs this build's folded #0) that a targeted isolation test proved is an unconditional compiler fold, not a source-spelling issue; (2) a 3-way register-role permutation among r1/r4/r5 for the y/x/mask locals, which is the same hi-register local-alloc tie-break class already characterized and accepted as a floor on other owners this session (e.g. 080c0cec.json, 080a8c2c.json)."},"remaining":"No further legitimate source respelling closed either residual class. (1) An isolated single-statement test (stripping every neighboring statement) confirmed this exact compiler build unconditionally folds an unsigned `mode < 1` (in any spelling tried: `mode < 1`, `1 > mode`, a guarding `mode >= 1`) into `mode == 0`, i.e. `cmp r2,#0; beq`, regardless of context -- yet the reference retains a literal `cmp r2,#1; bcc`. Since the encoded immediate is unambiguously 1 (not 0), the true source's low-bound comparison is not reachable through any unsigned `mode {<,<=} 1`-shaped C expression under this compiler; what construct does produce it is unresolved. (2) The y/x/mask register roles (r1/r4/r5 in this build vs r4/r1/r5 in the reference) did not change under either of two independent, legitimate statement-order rewrites (moving the map-pointer load before vs after the y increment), matching this project's already-documented finding that this GCC 2.96 local-alloc tie-break is statement-order-insensitive. No PERM_GENERAL/PERM_INT search, register-qualified local, inline asm, or flag change was used to chase either residual, per project rules.","notes":["2026-08-31 retained-assembly proof: the canonical candidate reproduces the complete 140-byte owner with equal branch topology and the identical Data_03001e8c literal. The allocator decoder isolates the residual to four interlocked low-register roles (value, x, y, and mask), reports no unique source repair, and every bounds check, mode dispatch, tilemap address calculation, mask, store, and return path is accounted for. Relocation-normalized cross-edition verification proves all 136 non-literal core bytes identical across all six GS1 editions. The source/type/lifetime probes below preserve the allocation or regress, so the structured assembly remains authoritative under ui_window_compiler_allocation_module.","2026-08-31 bounded allocator probe: two previously unrecorded, evidence-backed source properties were tested against the canonical 140-byte candidate and both compiled byte-identically to the baseline (27 differing halfwords, 36 wrong instructions, equal topology): (1) creating adjusted x/y directly inside the unsigned bounds guards with `++x`/`++y` instead of separate increment statements, and (2) typing the palette mask as u32, matching the unsigned tile-attribute carrier used by the adjacent exact UiWindow_SetTileAttributeRect family member, instead of s32. Neither changed pseudo creation ranks, lifetimes, or the r1/r4/r5 role rotation reported by --allocator-order. Both were reverted. Transferable negative fact: for this GCC route, prefix-in-guard spelling and signedness of a nonnegative mask do not affect this allocation floor; do not retry either axis without new RTL evidence.","2026-08-31: reconstructed the post-mask mode dispatch as the natural switch over cases 0..4. This makes GCC emit the reference's literal `cmp mode,#1; bcc` range guard, removes the only branch-topology mismatch, and improves the exact-extent candidate from 29 differing halfwords / 40 wrong instructions to 27 / 36. Explicit adjusted-x/adjusted-y locals were measured and rejected (144 bytes, 63 differing halfwords): they disturb the otherwise-correct window/map lifetime family. The remaining residual is now allocation-only.","The family-transplant matcher's only suggestion for this owner, games/gs1/src/display/transition/update_scanline.c (score 7384/10000, below this project's 7500 threshold), was read in full and has zero real overlap with this owner: it is a scanline-interrupt state machine over an entirely different struct (fields at 0x104/0x106/0x108) with no shared callees, no shared field offsets, and no shared constants. Confirmed as a shape-only false positive (matches the low-scoring-cluster pattern this session already found to be unreliable) and not used as evidence for this reconstruction.","The real evidence trail instead came from the shared global Data_03001e8c: grepping for it across games/gs1/src/ui/window and ui/text surfaced fill_tilemap_rect.c, set_tile_attribute_rect.c, and set_tile_attribute_bit_rect.c, all already-adopted-exact siblings that dereference the same pointer and read the same window struct fields (u16 width@0x8, height@0xa, x@0xc, y@0xe -- the last two confirmed exactly by set_tile_attribute_rect.c's own UiWindowGeometry static-asserted offsets and by update_interpolated_geometry.c's WINDOW_WIDTH/HEIGHT/X/Y macros). This owner is the single-cell (non-rect, non-loop) member of that same window-tilemap-write family: a plain state-machine trace of games/gs1/asm/08019000.s directly, not a family-transplant template.","The 5-argument, all-s32 call signature and the mode=0-only call pattern are independently corroborated by the one real caller in this repository, games/gs1/src/ui/window/draw_three_tile_column.c, which already forward-declares `void Func_08019000(s32, s32, s32, s32, s32);` and calls it three times with a packed tile value, x, y, and a literal 0 for the final argument -- consistent with (window, value, x, y, mode) and with mode's dispatch being effectively dead code on every path this repository actually exercises.","Registered the name UiWindow_SetTilemapEntry in games/gs1/source-paths.json (name-only, no exact C yet) and added the matching .global alias immediately above .global Func_08019000 in games/gs1/asm/08019000.s, per the project's owner-register convention (mirrors games/gs1/asm/08003e58.s's ResourceTable_AllocateBlocks alias). tools/check owners passes.","Recovered only from retained owner assembly (games/gs1/asm/08019000.s), the already-adopted in-repository sources games/gs1/src/ui/window/fill_tilemap_rect.c, set_tile_attribute_rect.c, set_tile_attribute_bit_rect.c, and update_interpolated_geometry.c, the already-adopted caller games/gs1/src/ui/window/draw_three_tile_column.c, and the approved compiler's own candidate-show/--asm output. No GS2 evidence, external source, other decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0801908c":{"schema_version":1,"namespace":"main","address":"0x0801908c","status":"measured-draft","owner_bytes":320,"executable_owner_bytes":320,"candidate_bytes":228,"differing_halfwords":156,"wrong_instructions":187,"template_family":"template-main-080217a4","template_source":"games/gs1/src/ui/apply_table_scale_to_object.c","domain":"Shares the template's general shape (an object with an affine-matrix-adjacent sub-object at offset 16, a call into an affine/rotation helper, and bit-field writes into that sub-object) but implements a state-machine effect driver: a mode byte (object offset5) selects one of two 32-entry tables (by a wrapping counter at offset12, modes 9/10) or one of two 8-entry tables (by a saturating counter, modes 11/12, which stop advancing past index 7), producing a 16-bit 'value' that defaults to 256 (a sentinel meaning 'no active effect') when the mode doesn't match or a saturating counter has already maxed out.","behavior":["value defaults to 256 (0x100); modes 9/10 read+advance a wrapping (mod 32) counter into one of two 32-entry halfword tables, mode 10 additionally halving the looked-up value; modes 11/12 do the same against two different 8-entry tables (offset +32 from the table base, stride 4) but only while the counter is <=7, otherwise leaving value at the 256 default","if value==256: clears specific bits in the sub-object's offset7 and offset5 byte fields, then falls through to a shared tail that copies obj->field6/field8 into the sub-object's field6/field4","otherwise: packs the value into a stack-resident bitfield structure, calls Func_08003d28 on it, masks the low 5 bits of the result into the sub-object's offset7 byte (bit 1 upward), and then branches on whether value exceeds 256: the >256 case sets two extra sub-object bits, computes field6 from obj->field6 minus 8, and field4 from obj->field8+248, returning early; the <=256-but-not-equal case instead sets a single different bit pattern and falls into the same field6/field4 tail as the value==256 case"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete-behavior candidate was written directly from the raw assembly and scored (228 vs 320 bytes, 92 bytes short, 187 wrong instructions). The stack-resident bit-packing block feeding Func_08003d28 (which the disassembly builds via three separate AND/OR/shift operations against a 12-byte stack buffer, reusing pool masks 0xffff0000/0x0000ffff/0x0000fff8/0xfffffe00) was approximated with a single scalar expression rather than reconstructing the actual struct/bitfield layout that produces that exact instruction sequence, which accounts for most of the size gap."},"remaining":"This owner is markedly more involved than the family's typical member (320 bytes, an inlined affine-matrix-style bit-packing block plus a 4-way table-driven state machine) and needs a dedicated pass to recover the actual stack struct passed to Func_08003d28 -- almost certainly the same kind of 3-halfword 'Effect'-like structure the template builds for its own AffineMatrix_BuildForEffect call, but packed and masked differently here. The table-driven mode dispatch (modes 9-12, wrapping vs saturating counters, the two table shapes) is corroborated directly against the assembly and is higher-confidence than the bit-packing block.","notes":["Struct field names (SubObject.field4/field5/field6/field7, Object.field8) are placeholder offsets read directly off this owner's own assembly; the correspondence to the template's Object/Effect struct is only structural (same offset16 sub-object idea), not verified field-for-field.","Recovered only from retained owner assembly, the already-adopted field_owner_83.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0801965c":{"schema_version":1,"namespace":"main","address":"0x0801965c","status":"measured-draft","owner_bytes":104,"candidate_bytes":100,"differing_halfwords":43,"wrong_instructions":50,"classification":"copy-ui-render-string","notes":["Complete ordinary-C reconstruction of a bounded u16 render-string copy. It clears work offset 0x12b2, asks Func_08018038 to build the shared string at work offset 0xeb0, copies at most capacity-1 halfwords through the first zero, appends zero, and returns the copied count.","The shared work pointer and +0xeb0 render buffer are independently established by the exact UiText_SetRenderString source. Multiple UI callers pass a stack u16 buffer and a fixed capacity, corroborating the bounded-copy interface.","The initial indexed draft compiled to 112 bytes with different topology because it spilled the destination and recomputed both indexed addresses. The one permitted evidence-led correction adopted the reference's walking source pointer, fixed destination base, byte offset, and post-builder count initialization.","After that correction canonical GCC 2.96 emits 100 bytes against 104 reference bytes, with 43 differing halfwords and 50 wrong instructions. The compiler still schedules the absolute-zero value early, folds a repeated source test into a second load, and does not preserve the reference's capacity in ip; no further source search was performed in this lane.","This measured draft claims zero DONE bytes. Retained assembly remains authoritative; no inline assembly, fixed-register variable, frame forcing, copied instruction bytes, or assembly promotion is used."]},"main:08019854":{"schema_version":1,"namespace":"main","address":"0x08019854","status":"measured-draft","owner_bytes":136,"candidate":{"coherent_translation_unit":{"candidate_bytes":140,"reference_bytes":136,"differing_halfwords":59,"wrong_instructions":40},"workbench_objdiff":{"match_percent":78.51562,"instructions":71,"arg_mismatches":17,"op_mismatches":1,"replace":1,"delete":5,"insert":7}},"family":{"template_matcher_guess":{"owner":"main:08021620","source":"games/gs1/src/graphics/resource/create_pair.c","score_basis_points":7402,"call_target_similarity_basis_points":0,"verdict":"false positive"},"evidence":"Read create_pair.c (RenderResource_CreatePair): it allocates a resource-table slot, loads a resource pair via Func_0801eadc, and stamps sentinel/table-index fields. It shares zero callees, zero struct-field offsets, and zero constants with this owner, confirming the family-matcher's 7402/10000 score is a shape-only match on the shared register-shuffle prologue (push r5-r7,lr / mov+push r8-fp) that this session already flagged as a common false-positive pattern in the highest-scoring cluster, not real kinship.","actual_identity":"Discovered directly from an already-adopted exact caller, not from the family matcher. games/gs1/src/ui/runtime/process_render_channels.c (UiWork_ProcessRenderChannels) already forward-declares `void Func_08019854(void *);` and calls `Func_08019854(channel)` whenever the channel's active Work item has a nonzero `pending` (transition-kind) field, i.e. this owner is the handler for an in-progress channel transition. Its two call targets, Func_080170f8 (draws a window border into the BG tilemap, confirmed by reading its own retained assembly: bounds-checks width/height to [2,30] tiles, writes box-drawing tile codes) and Func_08016178 (erases a window border region, same bounds-checking shape, fills with blank/edge tile codes), are both already used by exact, byte-verified sibling owners in games/gs1/src/ui/render/ and games/gs1/src/ui/window/ with the identical (x, y, width, height) argument shape."},"behavior":["arg0 (`channel`) is one of the three ui/render channel slots at Data_03001e8c + RENDER_CHANNEL_OFS (struct Slot, 0x28 bytes, matching the already-exact games/gs1/src/ui/render/activate_channel.c layout: work ptr @0, field04, field06, values[4], field10, field12, field14, ...)","dereferences channel->work (a struct Work* -- the same width@8/height@0xA/x@0xC/y@0xE/state@0x14 layout already proven exact in games/gs1/src/ui/render/finalize.c and games/gs1/src/ui/window/update_interpolated_geometry.c) and reads its width, height, x, y, and the transition-kind field at offset 0x12","no-ops unless that transition-kind field equals 4","when it is 4: draws a 1-tile-larger highlight border (x-1, y-1, width+2, height+2) via Func_080170f8, then decrements channel->field14 (a per-channel countdown, reset to 0 by UiWork_ActivateChannel and to 1 by UiWork_ProcessRenderChannels)","when that countdown reaches zero: clears the Work's transition-kind field to 0, erases the highlight border via Func_08016178 using the same expanded rect, then redraws the Work's own (unmodified) border via Func_080170f8"],"bounded_search":{"exact":false,"canonical_best_differing_halfwords":59,"canonical_best_candidate_bytes":140,"tested":["flat locals x,y,width,height (no separate `pending` local), condition written inline as `if (work->pending == 4)`: reproduces the reference's x->r9, y->fp, width->stack(sp+4), height->stack(sp+0) register/stack assignment exactly (tail of the function -- the decrement idiom, the final Func_080170f8(x,y,width,height) call setup, and the trailing alignment padding -- matches byte-for-byte), but reads `pending` last (right before the branch) instead of between width and height as the reference does; costs one extra spill-store of width plus one extra reload after the branch (140 vs 136 bytes, workbench objdiff 85.875%, wrong_instructions=34)","same as above but as two sequential early-return guard clauses instead of a nested if (matches the retained assembly's single shared .L0 epilogue label used by both `bne` branches): byte-identical output to the nested-if version, confirming guard-clause-vs-nested-if is not a differentiator here","switch (work->pending) { case 4: ... } with height declared inside the case body: byte-identical to the plain inline-if version (136 bytes, 56 differing halfwords by candidate-show's raw count, but with height's read moved after the branch -- contradicts the retained assembly, which reads offset 0x0A before the `bne`)","explicit `s32 pending = work->pending;` local declared between width and height (matching the retained assembly's confirmed read order: offsets 12,14,8,18,10 = x,y,width,pending,height, verified by direct line-by-line trace of games/gs1/asm/08019854.s lines 17-28): reproduces the correct read order, but the extra live SImode pseudo rotates the whole register/stack assignment by one slot (x->fp, y->stack, width->stack, height->r9 instead of the reference's x->r9, y->fp, width->stack, height->stack) -- worse net score (140 bytes, wrong_instructions=40, workbench objdiff 78.5%)","same as above but `u16 pending` instead of `s32 pending`: avoids disturbing the x/y/width/height allocation (matches the inline-if version's correct allocation exactly), but the load is then scheduled last again, identical to having no separate local at all -- HImode locals apparently do not get hoisted to their declaration position the way an SImode local does on this route","`pending` read via M2C_FIELD(work, u16 *, 0x12) pointer-cast macro (matching the M2C_FIELD idiom already used in games/gs1/src/ui/render/output_list/redraw_saved_rect.c and prepare_for_redraw.c) instead of struct-member syntax, kept between width and height: worse still (144 bytes, wrong_instructions=44)","all five locals (x, y, width, pending, height) typed u16 instead of s32: the `-1`/`+2` adjustments then compile as signed 16-bit arithmetic requiring ldrsh/lsls+lsrs sign-extension pairs the reference does not have (160 bytes, wrong_instructions=72) -- confirms x/y/width/height must stay s32/int, matching games/gs1/src/ui/window/update_interpolated_geometry.c's convention for the same struct fields"],"result":"Every field offset, call target, call argument shape, and the channel/pending/countdown control flow is pinned down with strong evidence (an already-adopted exact caller declares this owner's own signature; both callees and both struct layouts are independently exact elsewhere). The single remaining gap is register allocation for the four struct fields read up front: an SImode `pending` local reproduces the reference's true read order (proven by direct instruction trace) but rotates which of {x,y,width,height} land in the extended registers r9/fp versus the two stack slots; omitting it (or making it HImode) reproduces the reference's register assignment but reads `pending` in the wrong position, which costs two extra instructions the reference does not have. No tried shape gets both right simultaneously."},"remaining":"GCC 2.96's local/global register allocator on this route assigns x, y, width, height (all defined before any call, all live until the final Func_080170f8 call) to r9, fp, and two stack slots. Introducing one more SImode value (`pending`) that is live simultaneously with x/y/width but dies at the following `cmp` -- exactly where the retained assembly's own read order requires it -- rotates that assignment by one slot in every tested variant, even though `pending`'s live range never crosses a function call and so should not need to compete for call-surviving storage at all. A same-shape HImode local sidesteps the rotation but is then scheduled to the end of the block regardless of its declared position, reproducing the no-separate-local case instead. This looks like the same class of GCC-2.96-specific register-allocation/scheduling interaction documented for other owners in this corpus (see e.g. main:08003e10's stmia investigation) rather than a wrong source shape, but confirming the exact mechanism would need reading alchemy-gcc's local-alloc.c/global.c directly, which this pass did not do. Neither exact adoption nor a permanent-assembly classification is justified from this evidence alone.","notes":["Recovered only from games/gs1/asm/08019854.s (hand-traced instruction-by-instruction), the approved EN ROM, and already-adopted exact sources under games/gs1/src/ (ui/render/finalize.c, ui/render/activate_channel.c, ui/render/drain_pending.c, ui/render/finalize_pending.c, ui/window/update_interpolated_geometry.c) plus their declared-but-unadopted callees' own retained assembly (games/gs1/asm/080170f8.s, games/gs1/asm/08016178.s) and the already-adopted caller games/gs1/src/ui/runtime/process_render_channels.c.","The family-matcher's create_pair.c guess (7402/10000, below the 7500 adoption threshold) was independently checked and confirmed a false positive: shared register-shuffle prologue shape only, zero shared callees or field offsets. The real identity was found through the caller's forward declaration, not the family matcher.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI attribute, copied instruction bytes, or compiler flag override was used.","This candidate claims zero DONE bytes.","games/gs1/source-paths.json registers main:08019854 as {\"name\": \"UiWork_AdvanceChannelTransition\"} (name only, no path -- retaining a descriptive name without exact C, matching the convention already used for main:08003e10). The working draft at games/gs1/recon/en/main/08019854.c keeps the function itself named Func_08019854 because both `compiler candidate-show` and `compiler workbench` resolve the reference object by the literal symbol exported from games/gs1/asm/08019854.s (the registered descriptive name is not applied to that export)."]},"main:08019aa0":{"family":"template-main-08028f98","template_owner":"main:08028f98","template_source":"games/gs1/src/menu/run_selection.c","candidate_path":"games/gs1/recon/en/main/08019aa0.c","reference_bytes":256,"best_candidate_bytes":252,"best_differing_halfwords":82,"best_wrong_instructions":68,"status":"measured-draft","notes":["Template (Menu_RunSelection, a window-create-then-poll-loop menu) is thematically related but this owner's actual logic (from games/gs1/asm/08019aa0.s) is a different dialog-creation routine: looks up a table entry via Func_08018038(p1) to gate whether to proceed at all; if gated in, calls Func_080187ac(p1, &x, &y, &w, &h) to get placement/size (x,y pre-seeded to 8 as in/out defaults), centers the dialog via (30-w)/2 and (15-h)/2+baseY, creates the object via Func_080162d4 with a branch on the `flag` param (full size vs a fixed 0/0 size plus writing `flag` into two output fields), then runs Func_080165d8 and, depending on its result, either finalizes immediately or spins two Func_080030f8/Func_08017364 and Func_08016418/Func_08017394 wait-loops before zeroing two fields at Data_03001e8c+0x12f4/0x12f6.","One respelling attempt beyond the direct translation: tried replacing the two `/2` divisions with `>>1` (since the reference's centering math uses a plain `asrs` with no rounding-toward-zero correction, while the direct `/2` translation compiled to an extra `lsrs+adds` sign-correction pair before the shift) -- this reproduced the reference's plain-shift instruction locally but made the OVERALL match worse (wrong_instructions 68->72), suggesting the rounding-correction sequence is entangled with other register allocation elsewhere in the function rather than being a clean local fix. Reverted to `/2`.","Given the size and complexity of this owner (256 bytes, 6 saved registers, ~15 struct/stack-passed intermediate values, nested wait-loops) and the bounded per-owner effort budget for this batch, this reflects one careful direct-translation pass plus one respelling probe rather than an exhaustive iteration; the 68 remaining wrong instructions are spread through register-number choices (r8/r9/sl assignment order) rather than concentrated in one clear structural gap I could isolate further within budget.","Struct/field names are placeholders (no header confirms Func_080187ac's or Func_080162d4's exact signature); all offsets and call argument counts/order are read directly from the assembly and are high-confidence. Worth a fresh, more patient pass focused on the sp20/sp16 in/out parameter idiom and the rounding-shift interaction before falling back to permuter search."]},"main:08019bfc":{"schema_version":1,"namespace":"main","address":"0x08019bfc","status":"measured-draft","owner_bytes":272,"candidate_bytes":268,"differing_halfwords":111,"wrong_instructions":168,"family":{"id":null,"template_owner":null,"note":"Below the 7500/10000 family-transplant threshold (best guess 7220/10000, main:0801e260 / games/gs1/src/ui/window/clear_tile_attributes_in_rect.c). Read that source directly: it is an unrelated tile-attribute-clearing double loop over a fixed 30x20 window with no bitstream state, no table lookup, and no calls -- the match is shape-only (leaf-function n-gram/length coincidence), confirmed a false positive as flagged for this wave, and not used."},"domain":"A two-stream variable-length bit decoder, called repeatedly with a small persistent state struct. Reads one control bit from a byte-refilled 'stream A' (state->ptr/state->bits, persisted across calls); on a 1-bit it walks a signed unary run over a second bitstream ('stream B') seeded fresh each call from a ROM table row selected by the *previous* decoded value, incrementing a rank counter per 1-bit; after the run it reads one more stream-B confirmation bit and either loops back to stream A (rank keeps accumulating) or stops. The final rank selects a byte-pair position, walking backward from a table-row-relative anchor, and extracts either the high nibble+following byte or a masked low nibble+following byte depending on rank's parity, producing a 12-bit result that is written back into state->code (both the return value and the *next* call's table-row/column selector). No `bl` anywhere in the owner -- it is a pure leaf function; the three inlined 'read one bit with 0x80-sentinel refill' expansions duplicate register-shuffle idioms already seen in the project's other bitstream code (games/gs1/src/resource/decompress_lz.c's control/sentinel pattern) but are not literally that function.","behavior":["entry: hi = state->code >> 8 selects a table row at Data_0803842c + hi*8 (row = {const u8 *base; const u16 *deltas;}, fetched by register-offset addressing, not a compile-time struct field, per the retained ldr[r2,r3]/adds r3,#4/ldr[r2,r3] pair); lo = state->code & 0xff indexes deltas[lo]; pos = base + deltas[lo] becomes stream B's starting cursor, anchor = pos - 1 is kept as the fixed nibble-table origin for the final extraction","stream A (persisted): buf = state->bits, ptr = state->ptr; bit = buf & 1, buf >>= 1; if buf hits 0 after the shift, refill buf = (*ptr++ >> 1) | 0x80 and recompute bit from the fresh byte","outer loop: read a stream-A bit; if 1, run an inner do-while over stream B (same refill idiom, own mask/sentinel materialized fresh at loop entry): each 0-bit does counter++, each 1-bit does rank++ / counter--, loop continues while counter >= 0","after the inner loop (or immediately if the stream-A bit was 0), read one stream-B confirmation bit with the *outer* mask/sentinel (shared physical register with stream A's own reader, unlike the inner loop's freshly materialized copy); a 0 sends control back to the top of the outer loop (rank keeps its accumulated value), a 1 falls through to the final decode","final decode: idx = rank*3; if (idx*4)&7 == 0, result = (anchor[-(idx>>1)] << 4) | (anchor[-(idx>>1)-1] >> 4); else result = ((anchor[-(idx>>1)] & 0xf) << 8) | anchor[-(idx>>1)-1] -- each branch recomputes idx>>1 independently rather than sharing a hoisted value","writeback: state->bits = buf (stream A only -- stream B's cursor/buffer are never persisted, matching that stream B is always reseeded from the table at the next call), state->code = result, state->ptr = ptr; return result"],"bounded_search":{"mode":"iterative-candidate-show","attempted":6,"exact":false,"reason":"workbench could not run (`compiler workbench` resolves owners through the registered manifest only, and this owner has neither a family match above threshold nor a registered name to key off of, so `--owner/--size` -- accepted by candidate-show -- is not accepted by workbench); iterated directly against games/gs1/asm/08019bfc.s with `candidate-show --owner 0x08019bfc --size 272 --align`. Six rounds: (1) first control-flow-faithful goto draft, struct-typed table row, shared half-hoisted before the final branch: candidate=228 wrong_instructions=188 differing_halfwords=134, and the reference's r8/r9/sl/fp extended-register save/restore was entirely absent. (2) hoisting mask=1/sentinel=0x80 into real persisted locals (used at both stream-A's reader and the outer stream-B confirmation reader) plus a second, freshly-materialized mask2/sentinel2 pair scoped to just the inner unary-run loop reproduced the extended-register prologue/epilogue exactly and got matched_prefix to 7: candidate=264 wrong_instructions=170 differing_halfwords=126. (3) replacing the struct-typed table row with byte-offset pointer arithmetic (offset=hi<<3, then offset+=4) reproduced the reference's register-offset `ldr[r2,r3]`/`adds r3,#4`/`ldr[r2,r3]` addressing exactly, replacing the struct version's immediate-offset addressing: differing_halfwords 126->117. (4) fixing the unary-loop's branch polarity to match the traced .L2/.L3/.L4/.L5 shape exactly (fallthrough-is-counter++, branch-is-rank++, not the inverted form first written): differing_halfwords 117->114. (5) un-hoisting the final nibble extraction's `idx>>1` so each if/else branch recomputes it independently (matching the retained assembly's two separate `lsrs`, one per branch) rather than sharing one pre-computed value: differing_halfwords 114->111, wrong_instructions 168."},"remaining":"matched_prefix is 7 instructions (the full extended-register prologue) and essentially every remaining line is the same instruction with a different (but valid) register choice -- of 111 differing halfwords, all but a handful of true insert/delete lines are register-rename-only ('!' rows in candidate-show's diff, not '+'/'-'). The divergence starts at the very first table-row fetch (this compiler puts the freshly-loaded state->code copy in a different physical register than reference, cascading a different-but-consistent register assignment through the rest of the function) and at a handful of independent-instruction-scheduling choices inside the three inlined bit-read expansions (e.g. where the compiler chooses to hoist the 'mov r_lo, r8' sentinel copy relative to the surrounding shift/mask, which differs between my draft and reference even though both compute the same values). No further source-shape lever was found within this pass's budget that changes those specific choices; per Cleanroom's stalled-last-mile guidance this would need the persistent local instruction/register-pressure invariant pinned down explicitly (e.g. by first getting an owner of this exact register-pressure shape byte-exact elsewhere in the corpus) rather than more blind reordering here.","notes":["Cross-checked against the ARM-mode twin at games/gs1/asm/relocated_arm_helpers/08015430.s, which references the identical literal table address 0x0803842c and the identical row shape (ldm {r4,r5} of two words at table+hi*8, r1&0xff*2 used as an ldrh index into the second word) -- same algorithm family, ARM-optimized (32-bit-at-a-time rrx/carry bit reader) vs this owner's byte-at-a-time Thumb reader. Not adopted anywhere in the project; not itself byte-exact-recovered; used here only as corroborating evidence for the table-row layout, not copied from.","games/gs1/assets/data/saihouchi_arm.json lists 08015430's consumers as Func_08018038 and Func_080196c4; neither is adopted, and games/gs1/src/ui/adjust_value_without_limit.c's Func_080196c4(s32,s32,s32) declaration is arity-incompatible with this owner's struct-pointer decoder, so that lead did not pan out and was not pursued further.","No literal callers of Func_08019bfc were found anywhere in games/gs1/asm (grepped for both the raw address and the symbol name); the owner has zero `bl` instructions itself. It is presumably reached only through an indirect/function-pointer call from a region not yet retained, or from ARM code via the relocated-helpers mechanism.","No descriptive name registered in games/gs1/source-paths.json: the algorithm (two interleaved bitstreams, context-selected table row, backward nibble table walk) is traced with reasonable confidence from the assembly, but I do not have enough evidence to name what it decodes (text? graphics? some other resource), so Func_08019bfc is left as-is rather than asserting a specific domain in the symbol name.","Recovered only from games/gs1/asm/08019bfc.s, the ARM twin games/gs1/asm/relocated_arm_helpers/08015430.s (both in-repo retained assembly), and the approved compiler via tools/compiler candidate-show. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, or compiler modification was used. Zero DONE bytes are claimed; adoption requires 0 differing_halfwords."]},"main:0801b664":{"schema_version":1,"namespace":"main","address":"0x0801b664","status":"measured-draft","owner_bytes":428,"executable_owner_bytes":428,"candidate_bytes":492,"differing_halfwords":244,"wrong_instructions":298,"template_family":"template-main-0801b4ec","template_source":"games/gs1/src/menu/selection/move_forward.c","domain":"A genuine sibling of the template's Menu_MoveSelectionForward: it operates on the exact same menu-state struct (the byte offsets 0x394/0x39c/0x39e/0x3a2/0x348 that the template names count/selection/index/status/list all recur here at the identical addresses, confirmed by cross-reading both raw disassemblies), calling the same Func_0801b9a8/Func_0801b9ec/Func_0801ba68/Func_080030f8/Func_0801b010 helpers, but adds a substantially larger body: after advancing the selection index it inspects a table slot (state+916) and, when a specific end-of-list condition is hit, walks a singly linked list rooted at state+0x348 (next pointer at node offset 4) twice -- once to stamp interior nodes with 'count'/'selection'-derived visual fields and a distinct value on the last node, once (after a Func_0801bd98 callback per node) to restripe every node's position fields by a fixed 16-unit step.","behavior":["Func_0801b9a8(state, index); status=33; WaitFrames(1); index++","reads a table-slot halfword at state+916; if it is <=5, only handles a narrower 'slot==*count' case (clearing state+924) and falls through to the shared tail","if the slot is >5 and (selection-table value + index) equals it, walks the state+0x348 linked list: stamps every interior node's base/status/y-ish fields from *count/*selection, stamps the terminal node with status=16, then busy-waits (WaitFrames loop) until a node field settles; then calls Func_0801bd98 once per node with per-index halfword pairs from around state+852; then zeroes count/selection and re-walks the list a second time restriping node fields with a running value that starts from the terminal node's field and steps by 16 per node, tagging each with status=12","in the >5-but-not-matching case, mirrors the template's own 'index==4' branch structure (decrement index, set two byte-ish flags, advance selection, call Func_0801ba68, possible extra clear)","shared tail: status=1; Func_0801b9ec(state, index); WaitFrames(1); Func_0801b010 using the halfword at list_head+10; WaitFrames(1)"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete-behavior candidate was written and scored. It is 64 bytes over reference (492 vs 428) and needs 4 extra callee-saved registers (fp, sl, r8, r9 all pushed) versus reference's 2 (sl, r8), showing the source shape carries far more simultaneously-live locals than the real function used -- a genuinely different, more time-intensive respelling pass (collapsing the temporaries introduced for readability back into the same handful of registers reference reuses across the linked-list walks) would be needed before iterating on exactness."},"remaining":"This owner (and its sibling 0801b810) turned out to be substantially larger and more involved than the family's other 'small, under ~600 byte' members -- a full byte-exact reconstruction needs a dedicated pass, not the bounded per-owner budget used for the rest of this batch. The behavioral read above is solid (struct offsets are corroborated against the already-adopted template, not guessed) and is a reasonable starting point for that future pass. The likely next step is reducing live-range overlap in the two list-walk blocks so the compiler doesn't need more than two callee-saved scratch registers, matching reference's r8/sl usage.","notes":["Struct field names on 'struct ListNode' (unknown00/0c/0e/12/16, base, y, x) are placeholders for offsets read directly off the assembly; only 'next' (offset4, confirmed by the repeated 'ldr r5,[r5,#4]' traversal) and 'status'/'base' (matched to the template sibling's own count/selection semantics) carry real confidence.","Sibling 0801b810 (also assigned) shares this exact struct and helper set with mirrored-but-not-identical control flow (likely 'move selection backward' to this owner's 'forward'); see its own dossier.","Recovered only from retained owner assembly, the already-adopted move_forward.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0801b810":{"schema_version":1,"namespace":"main","address":"0x0801b810","status":"measured-draft","owner_bytes":408,"executable_owner_bytes":408,"candidate_bytes":508,"differing_halfwords":253,"wrong_instructions":240,"template_family":"template-main-0801b4ec","template_source":"games/gs1/src/menu/selection/move_forward.c","domain":"The 'move selection backward' mirror of sibling 0801b664, on the same menu-state struct (state+916/924/0x39e/0x3a2/0x348, the same count/selection/index/status/list fields the template names) and the same helper set (Func_0801b9a8/Func_0801b9ec/Func_0801ba68/Func_080030f8/Func_0801b010/Func_0801bd98), but with the linked-list restripe running in the opposite direction (a descending 64-then-minus-16 step versus the forward sibling's ascending step) and a different early-exit branch structure for the small-slot case.","behavior":["Func_0801b9a8(state, index); status=33; WaitFrames(1)","reads the table-slot halfword at state+916; when <=5 it just decrements index (wrapping to 0xffff at 0) and falls to the shared tail","when >5: if the selection-table value or index is nonzero, handles either an 'index==1 && selection!=0' step-back case (writes state+8=8, decrements the selection-table value, calls Func_0801ba68(state,0), possibly clears state+10, writes state+62) or otherwise just decrements the table-slot value at state+916","when both are zero: walks the state+0x348 linked list restriping each interior node's position from a descending base (starts at 64, steps -16) and status=12, busy-waits for the head node's y/base fields to settle, computes an offset from (count!=5)?(count-5):0, writes it at two more state fields, calls Func_0801bd98 per node the same way as the forward sibling, then re-walks the list a second time restriping base/status with an ascending step of 16 starting from that offset","shared tail identical to the forward sibling: status=1; Func_0801b9ec(state,index); WaitFrames(1); Func_0801b010(list_head+10 halfword, 0); WaitFrames(1)"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete-behavior candidate was written and scored (508 vs 408 bytes, 100 bytes over, 240 wrong instructions). Several branches in this owner (the 'index==1 && selval!=0' step-back arm and the offset-computation loop before the second list restripe) were read under real time pressure and are lower-confidence than the corresponding parts of sibling 0801b664; a careful re-derivation of those two regions from the raw assembly, followed by the same live-range-reduction pass noted for 0801b664, is the realistic path to closing this gap."},"remaining":"Same situation as sibling 0801b664: substantially larger and more involved than this family's other members, needing a dedicated follow-up pass rather than this batch's bounded per-owner budget. The struct correspondence to the already-adopted move_forward.c template is solid; the two lower-confidence branches called out above are the first things to re-verify against the raw assembly before attempting exactness.","notes":["Struct field names are the same placeholders used in sibling 0801b664's dossier; only 'next' (offset4) and the count/selection/index/status/list field identities (matched to the template) carry real confidence.","Recovered only from retained owner assembly, the already-adopted move_forward.c template, cross-reading against sibling 0801b664's own disassembly, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0801c8a0":{"schema_version":1,"namespace":"main","address":"0x0801c8a0","status":"proven-retained","classification":"encoded_index_lookup_compiler_allocation_module","owner_bytes":132,"score":{"measured":"2026-08-31","candidate_bytes":132,"reference_bytes":132,"differing_halfwords":33,"wrong_instructions":60,"class":"missing-extra-code","note":"Both lookup passes and the complete owner extent are recovered with equal branch topology. All four pool words are exact and cross-edition verification proves the complete 116-byte core identical in every edition. A 10,000-candidate annotation-free search finds no decoded repair, while canonical and seven bounded shipped compiler routes find no exact or closer result. The remaining residual is equivalent output-pointer, entry-pointer, index, mask, and per-iteration halfword carrier allocation. Structured assembly remains authoritative under encoded_index_lookup_compiler_allocation_module; the candidate does not claim exact C."},"notes":["Replaced an unrelated display-script family transplant with the reference's actual two-pass encoded-entry lookup and recovered its three-argument signature.","The reference's first global access is Data_02000240 + 0x220 expressed as element 136 of a four-byte runtime view; the second is the adjacent 0x02000462 halfword re-read for each comparison pass.","A 10,000-candidate annotation-free permutation request stopped safely because the allocator decoder found no unique repair. Canonical and seven bounded shipped-flag routes produced no exact result; -fno-regmove, -fno-schedule-insns2, and -fno-expensive-optimizations regressed."]},"main:0801d4cc":{"schema_version":1,"namespace":"main","address":"0x0801d4cc","status":"measured-draft","owner_bytes":1152,"candidate_bytes":1144,"differing_halfwords":508,"wrong_instructions":373,"classification":"party-slot-loadout-select-screen","family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"Family-clustering false positive, confirmed independently before drafting (score 7855bp, matched only on the generic push{r5,r6,r7,lr}/mov-fp-sl-r9 register-shuffle prologue and the for(;;)-redraw-then-poll-input idiom shared by many gs1 UI loops). The real owner takes no parameter (the template's `actor` argument is never referenced anywhere in this owner's disassembly -- r0 is overwritten before any use), calls none of the template's shop/UiWindow_CreateFar/Ability_GetAvailability functions, and instead drives a base-object pointer read from the SAME Data_03001ea0 workspace used by the already-drafted siblings 0801db70.c (measured-draft), games/gs1/src/graphics/palette/load_selection_resources_and_advance.c (exact), and games/gs1/src/menu/run_selected_workspace_entry.c (exact). games/gs1/src/shop/select_party_member.c was also checked directly and shares no call targets, constants, or field offsets with this owner either -- neither shop sibling is the real family for this address."},"domain":"Cycles a 0-4 'page' index (var stored at workspace+0x574, updated via a mod-5 Modulo(page+delta,5) idiom identical to the field_owner_54.c/0801db70.c siblings) and, on every redraw, recomputes a per-page byte at workspace+0x594[page] from workspace+0x594[page]+workspace+0x599[page] (mod 5), then redraws three fixed icon rows of length 3/2/2 at workspace+0x5EC/0x5F8/0x604 (each entry a pointer to a RenderOutput-shaped widget: byte 0xF set to the 0xFB sentinel, refreshed via Func_080a1038, then loaded via RenderResource_LoadFrame with an icon id pulled from one of three ROM byte arrays Data_080367c9/cc/ce and a selected/highlight flag computed against the fixed workspace bytes 0x596/0x597/0x598), draws two Func_080b0030 number/quantity readouts keyed off workspace bytes 0x594/0x595 (via FixedPoint_Ratio and a per-page ROM table at the constant read from workspace+0x599/0x59A), draws three portrait/character cells (Func_080164d4 + UiText_DrawCharacter) whose resource id is workspace[0x596/0x597/0x598] plus the fixed constants 0xC0A/0xC10/0xC13, combines the two byte selections via Func_0801ccc0, and draws a final cursor-position readout keyed off the current page. The polling tail advances the page's animation counter at workspace+0x57E (wrapping past a 0x50000/65536 threshold and re-deriving the two byte selections from Data_080367d0/d6 tables) on input bit 4, confirms (bit0/bit3 -> result 0, or bit1 -> result -1) or steps the current page's byte up/down/left/right on ADDR_03001B04, then on exit either snapshots the five workspace selection bytes (0x594-0x598) into five fixed globals (0x02000445/446/44C/44A/046A and 0x03001D08) or, on cancel, feeds the previously-snapshotted pair back through Func_0801ccc0. This reads as a per-party-slot equipment/ability loadout picker (three always-visible option rows plus a per-page remembered selection), not the assigned shop template's item-list menu.","notes":["Recovered entirely from games/gs1/asm/0801d4cc.s (the owner's own retained disassembly, hand-walked instruction by instruction to resolve every pc-relative literal-pool word and branch target) plus the family-transplant workspace's m2c-assisted control-flow recovery (out/family-transplants/main-0801d4cc/m2c/0801d4cc.c) as a structural cross-check -- every field offset, constant, and call target the m2c draft proposed was independently re-derived from the raw .s before being trusted (m2c mis-rendered one call's second argument as dropped in one spot, caught by re-reading the raw asm). Already-adopted siblings sharing the same Data_03001ea0 workspace (field_owner_54.c, runtime_owner_123.c, 0801db70.c) supplied the field_offset conventions (0x574 = page/selection, 0x594.. = a per-page byte array, FIELD/M2C_FIELD macro style) and the already-resolved real names for seven callees via games/gs1/include/types.h's existing #define aliases (Modulo, FixedPoint_Ratio, RenderResource_CreatePair, RenderResource_LoadFrame, UiText_DrawCharacter, UiText_DrawResource, UiWork_Finalize, RenderOutput_ClearList, WaitFrames, Audio_PlayCue, UiWindow_Create).","Initial naive draft (m2c output, types fixed up, real callee names substituted) measured differing_halfwords=542 with a single dominant structural defect: the reference keeps the workspace base pointer resident in r7 and the Func_0801d108() result resident in r8 for the entire function, while the candidate's allocator instead put base in r8 and the other value in sl (a full one-slot register-set shift). Root cause found and fixed: the three icon-row loops originally cached each row's `*(void**)(base+slot)` widget pointer into a local `elem` variable used both before and after the intervening Func_080a1038(elem) call; the reference's compiler instead re-reads `*(void**)(base+slot)` fresh after that call rather than keeping it resident across it. Rewriting the loops to re-dereference `*(void**)(base+slot)` at each use point (no cached local) freed exactly the one register of pressure needed for base to land back in r7, dropping the metric to 533 and restoring the correct base/icon/page/redraw register set for the whole function body.","Three further verified, net-positive respellings on top of that fix: (1) explicitly caching `&workspace[0x598]` into a `p598` pointer local, read via `*p598`, for both the third icon-loop's comparison and the later post-loop 0xC13 portrait-id computation -- matches the reference's own opportunistic reuse of a spare register (sl) across that specific loop/post-loop pair (520, from 533); (2) hoisting `s32 rowX = icon->x * 8;` as its own statement immediately before each of the two Func_080b0030 quantity-readout calls, instead of writing `icon->x*8 + 0x8C + FixedPoint_Ratio(...)` as one expression -- the reference evaluates icon->x*8 before the FixedPoint_Ratio call in both call sites and the inline expression form was letting the compiler defer that multiply until after the call (508, from 520); (3) reading the workspace+0x598 byte once into a `u8 v` local and storing it to both of its two final fixed-address destinations from that local, matching the reference's single ldrb + two strb, instead of two independent FIELD reads (folded into the 542->533 step above, net positive on its own).","This owner's overall control flow, every branch target, every literal-pool constant, and every call target were independently confirmed to match the reference at matched_prefix=13 (the entire prologue and setup sequence, including the corrected base/icon/page/redraw register assignment, is now byte-identical) before the remaining residual was accepted as a stopping point for this pass."],"rejected_experiments":[{"experiment":"reorder the top-of-function local declarations (base/icon/page/redraw grouped before win/pair/pA/pB, versus the original mixed order)","result":"no effect on differing_halfwords -- confirms (as already documented for sibling 0801db70) that this compiler route's register-class assignment does not key off textual C89 declaration order on this owner"},{"experiment":"declare `icon` as `void *` (using FIELD(icon,u16,0xC)/(0xE) for the x/y reads) instead of `struct RenderInput *` with `->x`/`->y` member access","result":"byte-identical candidate either way -- the pointer's declared C type does not change codegen here"},{"experiment":"compute `pB` as `pA + 1` instead of an independent `(s8 *)(base + 0x595)`","result":"no effect -- both forms constant-fold to the same address expression before register allocation"},{"experiment":"apply the same explicit-cached-pointer trick used for p598 (workspace+0x598) to workspace+0x596 and workspace+0x597 as well (p596/p597 locals, dereferenced via *p596/*p597 in both the loop comparison and the later 0xC0A/0xC10 portrait-id computation)","result":"regressed differing_halfwords from 508 to 529 (matched_prefix dropped 13 -> 7) -- unlike workspace+0x598 (which the reference itself caches across exactly one loop/post-loop pair via a spare sl register), the reference recomputes workspace+0x596 and workspace+0x597 fresh at each use; adding the extra live pointer locals for them pushed the whole-function register pressure high enough to knock base/icon back out of their correct r7/r8 slots. Reverted."},{"experiment":"restructure the workspace+0x57E redraw-counter increment/wrap block to read the field into a `u16 counter` local once (store, then branch/compare/reset off `counter` instead of re-reading the field each time), mirroring the m2c draft's temp_r3_342 and the reference's single ldrh-then-reuse shape","result":"regressed differing_halfwords from 508 to 540 (matched_prefix dropped 13 -> 7) -- this block is textually far from the base/icon setup, but the added local still perturbed the same whole-function register-pressure calculus. Reverted; this specific block's instruction-order mismatch (the store-back timing relative to the overflow-threshold comparison) is left as an open, unresolved residual rather than chased further given how easily nearby fixes regress the already-corrected base/icon assignment."}]},"main:0801de5c":{"address":"0x0801de5c","span_bytes":1028,"status":"measured-draft","domain":"script glyph parser, 4bpp expander, render-tile allocator and VRAM uploader","score":{"measured":"2026-08-31","candidate_bytes":1076,"reference_bytes":1028,"differing_halfwords":505,"wrong_instructions":602,"topology":"different","class":"structural-topology"},"semantic_evidence":["The retained owner reads a u16 control stream, using commands 3..30 to update or skip parser state and values above 30 as packed glyph identifiers; this is unrelated to the battle success-roll family template.","Resource Value_00000013 supplies packed glyph rows. The candidate expands eight rows into a temporary 0x800-byte buffer using the reference's nibble lookup and bit-spread masks 0x0ff00ff0 and 0x00ff00ff.","The Data_03001e8c render state fields at 0xea0, 0xea2, 0xea7 and 0xeae control tile allocation, palette-bank selection, and the 128-versus-256-slot mask. Occupancy bytes begin at render state +0xda0.","Each allocated tile copies eight words from row planes spaced 0x100 bytes apart into VRAM at 0x06000000 + tile_index*32, then publishes the same encoded tile value through both output streams.","The 0x03000164 clear and 0x03000168 fill routines are genuine r3-trampoline callees and are modeled as function pointers, not ordinary Func_080072f0 calls with invented signatures."],"verdict":"Materially advanced from an aggregate-m2c context artifact to a standalone canonical-GCC-compiling semantic draft. It remains 48 bytes long with different topology and claims zero DONE bytes. Remaining work is concentrated in the compiler's 68-byte reference frame/lifetime layout and exact lowering of the irregular command switch and nested glyph loops; adoption requires a fresh differing_halfwords=0.","rejected_evidence":["The generated BattleEffect_RollSuccess retarget is a false family match and was not used.","Plain integer resource id 19 and ordinary direct Func_080072f0 calls compile, but lose the retained literal-pool and r3-callee semantics; the evidence-correct Value_00000013 and function-pointer forms are retained even though the broad topology residual masks their local score contribution."]},"main:0801e318":{"schema_version":1,"namespace":"main","address":"0x0801e318","status":"measured-draft","owner_bytes":176,"candidate_bytes":160,"differing_halfwords":85,"wrong_instructions":98,"classification":"visible-tile-attribute-marking","domain":"Marks attribute entries referenced by the visible 30 by 20 tilemap and clears stale one-bit marks.","notes":["Caller evidence proves this owner takes no arguments; the family-assisted m2c draft incorrectly inherited the four-argument signature of its exact template.","The generated u16-pointer increment advanced four bytes per tile. The retained semantic reconstruction corrects it to the two-byte walk emitted by the owner.","The typed reconstruction improves the raw m2c result from 87 to 85 differing halfwords while replacing every generated register and stack-slot identifier.","A 5,000-candidate safe family-template walk reached 168 bytes and 80 differing halfwords through artificial address-taken scalar temporaries. That generated spelling is not retained as canonical source because it obscures the recovered tile-marking behavior and is still far from exact.","Exact-C adoption remains gated on an independently compiled zero-difference object."],"rejected_experiments":[{"experiment":"family transfer of the byte-exact template's ascending for-loop idiom (ui/window/clear_tile_attributes_in_rect.c, |= 2 kept, RENDER_ALT_OFS/RENDER_TILE_ATTR_OFS constants confirmed identical for EN)","result":"worse (100 wrong instructions): the reference retains an explicit width!=0 guard before the row loop (movs r6,#20; cmp r3,#0; beq) that the template's fixed-4-argument for-loop shape does not emit. This owner's fixed 30x20 constant-loop shares only the inner tile-masking logic with the template, not its loop idiom."},{"experiment":"hoisting the width!=0 guard to wrap the whole row loop instead of re-testing per iteration","result":"byte-identical to the un-hoisted do-while-with-inner-check spelling; GCC's own loop-invariant code motion already performs this hoist regardless of source placement. The real ~16-byte/8-instruction gap is not guard placement."},{"experiment":"splitting the inner column walk into a static MarkRow(base, cursor, alternate, width) helper taking width as a real function parameter (not a local literal), called twice with the literal 30, on the theory that GCC 2.96 would substitute the constant into the inlined body without re-running dead-branch elimination on it, thereby preserving a runtime width!=0 test the way the reference does","result":"worse, not better: candidate collapsed to 92 candidate bytes (versus 160 before) at 87 differing halfwords / 93 wrong instructions. The router's inliner still fully constant-propagates through the static helper and eliminates the always-true guard, and the smaller helper body lets it additionally cross-jump/merge more of the surrounding row loop than the flat version did, moving further from the reference shape rather than closer. Confirms the guard-retention gap is a property of the compiler's handling of this exact call/inline shape at the routed optimization level, not something reachable by relocating the same source-level condition."}]},"main:0801edec":{"schema_version":1,"namespace":"main","address":"0x0801edec","status":"proven-retained","owner_bytes":124,"candidate_bytes":100,"differing_halfwords":61,"wrong_instructions":71,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Reads global Data_03001e8c (a callable value cached from *0x03001e8c). If it is NULL, DMA-fills the caller's argument buffer with a fixed 0xe0e0 halfword pattern (fixed-source, count 0xa0, DMA3 control 0x810000a0) as a fallback -- classic GBA 'memset via DMA' idiom. If it is non-NULL, bump-allocates a 0x214-byte scratch buffer (Func_08004938 == Runtime_BumpAllocate), DMA3-copies a 0x214-byte ROM template from 0x080158e8 into it (control 0x84000085 = enable|32bit|133 words), calls through Data_03001e8c with argument (via the interworking call-via-register veneer at Func_080072fc), then frees the scratch buffer (Func_08002df0 == Sys_Free). The DMA-populated scratch buffer is never otherwise read; only its allocation/populate/free side effects occur before/after the indirect call.","evidence":["Literal pool value 0x03001e8c at the function's first pc-relative load exactly matches ADDR_03001E8C / Data_03001e8c, an already-named global used as a base pointer in numerous sibling owners (e.g. 0801ef68.c, 08017248.c).","candidate-show independently symbolizes the bl target at Func_080072fc's linked address as `_call_via_r6` (or `_call_via_r7`, depending on candidate register allocation) in the emitted candidate.insns whenever a value is passed to it in the low register that becomes the branch target -- this is the compiler toolchain's own knowledge of the ARM/Thumb interworking call-via-register glue, not a guess made here. The same address is called from several sibling owners (08002fb0.s, 08003e10.s) each with a different value in the target register (a freshly returned pointer, a global), confirming it is a generic indirect-call veneer rather than a fixed named function.","Func_08004938 / Func_08002df0 are already declared elsewhere in this tree as Runtime_BumpAllocate(s32 size) and Sys_Free(void *) respectively (games/gs1/include/types.h, games/gs1/include/runtime_mem.h), and are called with the identical three-word DMA3-setup idiom (source/destination/control written to 0x040000d4) in 08003e10.c, 08002fb0.s and other siblings.","The DMA3 register base 0x040000d4 and the struct DmaChannel{source,destination,control} shape are the project's established idiom (games/gs1/recon/en/main/video_dma_family.h), already used unmodified by 08003e10.c for the exact same three-field-store pattern.","The reference's second-branch literal for the allocation size is loaded from a 4-byte literal-pool entry (0x00000214) and is later recovered via a runtime `lsrs r5, r5, #2`, rather than being synthesized in place with a cheap shift-immediate sequence (movs+lsls) the way an ordinary compile-time integer constant is; GCC 2.96 on this route only emits a pool load plus a real runtime shift when the value is not compile-time foldable. 08003e10.c's own '(u32)LoadedRuntime_Size' pattern (an absolute-address linker symbol registered in games/gs1/recon/translation-units.json) produces exactly this shape for its 0xe0-byte case. This owner's 0x214 does not correspond to any absolute_symbols entry currently registered in translation-units.json; only games/gs1/recon/en/main/0801edec.c/.json are in scope for this pass, so a new absolute-size symbol could not be registered to test/confirm this."],"credible_shapes_tried":["plain non-volatile per-field DmaChannel struct stores (dma->source=...; dma->destination=...; dma->control=...;), matching 08003e10.c's own proven idiom: produces three separate single-register `str` instructions at each DMA setup site, never the reference's grouped `stmia r3!, {r0,r1,r2}` -- consistent with the compiler_backend_evidence below.","caching the global into a local `void *routine` before branching (vs. re-reading Data_03001e8c at each use): re-reading forces an extra `ldr` immediately before the indirect call that the reference does not have; caching once matches the reference's single load-and-reuse shape and was kept.","naming the allocation size with a plain `u32 size = 0x214;` local reused for both the Func_08004938 argument and the `(size >> 2)` control-word shift: GCC 2.96 fully constant-folds this at compile time (produces `movs r0,#133; lsls r0,#2` and a folded control literal), never the reference's pool-loaded 0x00000214 and runtime `lsrs r5, r5, #2` -- consistent with 0x214 being an unregistered linker/absolute-symbol value rather than an ordinary integer literal in the true source.","if/else branch order: `if (Data_03001e8c == 0) { fallback-fill } else { main-dispatch }` reproduces the reference's `cmp r7,#0 / bne .L0` branch-and-fallthrough shape (fallback stays in the fallthrough position, dispatch is the taken branch target) exactly; the inverse order (`if (!= 0) { main } else { fallback }`) produced a mismatched branch/fallthrough assignment and was discarded."],"compiler_backend_evidence":"Same conclusion as games/gs1/recon/en/dossiers.json#main:08003e10, independently applicable here since this owner's main branch uses the identical DMA3 three-field-store idiom against the same struct shape and DMA base. Reading alchemy-gcc/gs1cc/gcc/config/arm/arm.md and arm.c: the STM-combining logic that could fold three independently-sourced register values into one `stmia r3!, {r0,r1,r2}` (store_multiple_sequence / *stmsi / *stmsi_postinc, arm.md ~4990-5083) is gated TARGET_ARM only and has no Thumb counterpart; the only Thumb multi-register store patterns (movmem8b/movmem12b, thumb_expand_movstrqi, thumb_output_move_mem_multiple) always emit a paired ldmia+stmia block copy, never a lone grouped store of independently computed values. No ordinary field-store or aggregate-store C shape on this Thumb/GCC 2.96 route can therefore reach the reference's standalone `stmia` at either DMA setup site.","remaining":"61 of 124 reference halfwords differ, concentrated at (1) both DMA3 three-field setups, where the reference's ungrouped `stmia r3!, {r0,r1,r2}` is structurally unemittable from any ordinary C shape on this compiler route (see compiler_backend_evidence -- same finding as the 08003e10 family), and (2) the allocation-size handling, where the reference treats 0x214 as a non-foldable (linker-symbol-shaped) value requiring a fourth callee-saved register (r8, alongside r5/r6/r7), which this pass could not reproduce without registering a new absolute-size symbol in games/gs1/recon/translation-units.json -- out of scope for this owner's permitted touch set (games/gs1/recon/en/main/0801edec.c and its .json sidecar only). Candidate length (100 bytes) is short of the 124-byte reference primarily from the missing r8 push/pop pair and the grouped-store byte savings. Both call targets (Func_08004938, the call-via-register veneer at Func_080072fc, and Func_08002df0) match the reference exactly once reached.","notes":["Cold-start owner: games/gs1/recon/en/main/0801edec.c did not exist before this pass; games/gs1/asm/0801edec.s is the proven byte-exact retained assembly.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used.","This candidate claims zero DONE bytes.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:0801ef68":{"schema_version":1,"namespace":"main","address":"0x0801ef68","status":"measured-draft","owner_bytes":288,"candidate_bytes":234,"differing_halfwords":143,"wrong_instructions":179,"classification":"window-gauge-or-underline-draw (low confidence)","domain":"Takes a struct pointer (fields read at +8, +10, +12, +14, matching a UI window-like record) and a flags word; walks a signed-byte control string at a fixed pool address (0x080371c4) accumulating an offset, and for each in-range offset draws a run of 'segments' tiles into *Data_03001e8c using distinct end-cap tile values (0xF018/0xF00F seen in the reference literal pool) versus a middle value; a second, separately-guarded block draws a fixed 3-part strip using tile values 0xF080/0xF081/0xF082. Reads/writes base[0xEA3] and base[0xEA5], both near the template's own RENDER_ALT_OFS=0xEA2 offset, suggesting this owner is a sibling UI-window drawing routine sharing the same per-window render-state byte block as the template and as 0801e318.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 8032 bp. As with the rest of this batch, the reference assembly has none of the template's tile-clear bit logic; the only real overlap is the shared Data_03001e8c global and a broadly similar 4-high-register prologue shape common across this compiler's larger owners. This is a family-clustering false positive that gave essentially no usable control-flow starting point.","This is the LOWEST-confidence dossier in this assignment batch. The retained candidate is an honest but only partially-grounded reading of the control flow (string-driven run-length draw with distinct end-cap tiles, plus a second fixed-pattern strip draw) built from a single manual disassembly pass; the candidate compiled to only 234 bytes against a 288-byte reference (a large size gap, not just a scheduling difference), and the full register set the reference uses (fp/sl/r9/r8 all pushed and live) versus the candidate's much lighter register pressure shows the real source keeps meaningfully more live state across the loop than this draft models. The exact field roles at window+8/+10/+12/+14, the true semantics of the flags&1 / flags&2 branches, the string-table type and its terminator convention, and the two end-cap tile values' exact assignment (0xF018 vs 0xF00F were assigned to first/last by pattern-matching the reference's two distinct pool constants, not independently confirmed) are all unverified.","This is a clear source-shape gap needing dedicated reconstruction from a fresh, careful disassembly (ideally with the tool's --asm / instruction-level trace against the reference rather than manual reading alone), not a good target for further family-transplant attempts against the assigned template. Given the low confidence, no further respelling experiments were attempted against this draft -- the priority was flagging the real uncertainty honestly rather than iterating on a base whose overall shape is not yet trustworthy."],"rejected_experiments":[]},"main:0801faa8":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0801faa8","status":"proven-retained","classification":"compiler_local_materialization_mismatch","owner_bytes":160,"cross_edition":{"measured":"2026-08-30","object_bytes":160,"relocation_bytes":40,"literal_bytes":24,"core_bytes":96,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true},"score":{"measured":"2026-08-27","candidate_bytes":160,"reference_bytes":160,"differing_halfwords":2,"wrong_instructions":4,"class":"allocation","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/0801faa8.c","note":"Improved from differing_halfwords=3 by eliminating the separate `s32 error` local entirely and writing `result = 0 - 9` / `result = 0 - 3` directly at each site (the goto-target `negate:` label is now a no-op). The second occurrence (result = 0 - 3) now compiles byte-identical to the reference (movs r7,#3 / negs r7,r7), confirming the hypothesis: the reference reuses r7 -- already dead from the early `result = 0` -- for the error/negate computation, and the separate `error` local was blocking that reuse. One residual remains at the FIRST occurrence (result = 0 - 9): r7 is provably 0 on that control-flow path, so this compiler folds the whole computation into a single `subs r7, #9`, where the reference instead materializes `movs r7, #9` and jumps forward to share the second occurrence's `negs r7, r7`. Two attempts to force a real shared negate (goto negate; ... negate: result = -result / result = 0 - result, applied symmetrically) each regressed sharply (wrong length, wrong_instructions >=36) rather than converging -- this compiler will not give up the subs-fold once r7's liveness is transparent enough to prove it. Needs the same class of fix as the allocator-order/liveness lever being built for the wider register-wall cluster, not another manual respelling of this pair."},"register_gate_step4_probe":{"date":"2026-08-28","result":"exhausted-not-a-closure","baseline":{"candidate_bytes":160,"reference_bytes":160,"differing_halfwords":2},"decoder_signal":"combine-destroys-copy-affinity-or-shared-result-inverts-allocation-priority","decoder_evidence":["The structurally correct shared-negate s32 form raises result pseudo 34 from 5 uses, 4 sets, span 82 to 7 uses, 5 sets, span 86.","That moves result ahead of the save-slot address in lreg priority, so result takes r6 and the address is forced to r7.","The separate-magnitude form preserves address=r6 and result=r7, but combine replaces magnitude-to-result copy plus negate with a cross-register negate, reusing r6 for the path-disjoint magnitude."],"requested_edit":"preserve magnitude-to-result copy affinity through combine without raising result ahead of the address pseudo","bounded_results":[{"shape":"shared-negate-s32","candidate_bytes":160,"effect":"correct control flow; result/address r6-r7 bank swap"},{"shape":"separate-s32-magnitude","candidate_bytes":160,"differing_halfwords":3,"effect":"correct banks; magnitude in r6 and cross-register negate into r7"},{"shape":"named-slot-before-allocation-call","candidate_bytes":160,"effect":"extended pointer lifetime but did not change the shared form's allocation priority"},{"shape":"inline-negate-boundary-on-separate-magnitude","candidate_bytes":160,"differing_halfwords":3,"effect":"combine still emitted the same cross-register negate"}],"decision":"The exact adopted corpus contains no untried local idiom satisfying the call ordering, shared negate, and r6/r7 carrier constraints. The source and retained assembly remain unchanged; this probe does not count toward the five required closures."},"shape":{"derivation":"games/gs1/src/save/state/write_current_slot_pair.c (and its structurally closer sibling runtime_owner_154.c) supplied the value!=-1/Func_080056cc/Func_0801776c error-report idiom. This owner is a fuller sibling: it adds a Func_08004970(0x1000) scratch buffer, a Func_08005a78 call, a Func_080072f0 (Mem_Copy) of 16 bytes into buffer+0x4e4, and a Func_08002df0 free before return -- reconstructed against real signatures in runtime_mem.h and the save_state_family.h-backed 08005a78.c/08005920.c. No prior draft existed for this owner."},"rejected_experiments":[{"experiment":"value cached once and reused across call sites","result":"wrong shape (66 differing halfwords)"},{"experiment":"Mem_Copy dst as a single grouped (A-B) expression","result":"wrong operand order"},{"experiment":"merging error into result entirely","result":"broke r5/r6/r7 register banking function-wide (16-18 differing halfwords)"},{"experiment":"error kept s32 alongside s32 result","result":"spurious sign-extend before return (9 differing halfwords)"},{"experiment":"declaration-order swaps of found/error/result","result":"no effect on the residual r6-vs-r7 error banking"},{"experiment":"eliminate the separate `error` local, write `result = 0 - 9` / `result = 0 - 3` directly at each assignment site with an empty goto target","result":"improved 3->2 differing halfwords; second occurrence now byte-exact, first occurrence still folds to a single subs instead of movs+shared-negs"},{"experiment":"force a real shared negate (result = N; goto negate; ... negate: result = -result, or negate: result = 0 - result, applied symmetrically to both sites)","result":"regressed sharply -- wrong candidate length, wrong_instructions >=36; this compiler resists un-folding the subs once r7's zero-liveness is provable"},{"experiment":"declare `result` as `volatile s16` to defeat the zero-liveness proof that lets the compiler fold `result = 0 - 9` into `subs r7, #9`","measured":"2026-08-29","differing_halfwords":93,"baseline":2,"verdict":"refuted -- volatile forces spurious stack-backed load/store traffic throughout the whole function (candidate grew 160->194 bytes, wrong_instructions 4->66); far worse than baseline, reverted"},{"experiment":"spell the first assignment as `result = -9;` (unary negate) instead of `result = 0 - 9;`, hoping a different constant-folding path avoids the subs fold","measured":"2026-08-29","differing_halfwords":2,"baseline":2,"verdict":"no effect -- identical codegen to `result = 0 - 9;`, still folds to `subs r7, #9`; reverted to `0 - 9` for consistency with the sibling site"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact sibling sources, in-repository headers, and the approved compiler.","Promoted to strong permanent compiler retention on 2026-08-30 after the shared-negate, separate-magnitude, lifetime, type, and declaration probes all converged on the recorded combine/lreg allocation conflict; the six-edition normalized core is identical."]},"main:0801fd34":{"schema_version":1,"namespace":"main","address":"0x0801fd34","status":"proven-retained","classification":"compiler_local_scheduling_floor_module","owner_bytes":80,"retention":"c_candidate","domain":"Build four animated palette entries from a fixed-point phase.","provenance":"Drafted from the retained owner assembly and the repository's aggregate-aware m2c wave output; no external source was used.","score":{"measured":"2026-08-30","candidate_bytes":80,"reference_bytes":80,"differing_halfwords":4,"wrong_instructions":0,"class":"scheduling-floor","compiler_flags":["-fno-schedule-insns2"],"note":"The shipped scheduler flag removes the canonical route's loop-tail reordering and reduces the residual from ten to four halfwords. The remaining two independent ordering pairs preserve every instruction and register role; ordinary C and the approved scheduler routes cannot request their reference order."},"rejected":[{"shape":"split the phase load and index-offset calculation into named temporaries","result":"preserved the 80-byte extent but swapped the r2/r3 roles and regressed from four to seven differing halfwords"},{"shape":"reuse the later packed-color local as the pre-call phase carrier","result":"preserved the 80-byte extent but changed the whole packed-color register family and regressed to fourteen differing halfwords"},{"shape":"distribute the 0x300 multiplication across the phase and index terms","result":"grew to 100 bytes and changed loop topology; reverted"},{"shape":"annotation-free finite permuter under the canonical route","result":"allocator decoder reported no unique source shape, so no unbounded search was started"}]},"main:08020198":{"family":"template-main-08028aa8","template_owner":"main:08028aa8","template_source":"games/gs1/src/menu/draw_mode_label.c","candidate_path":"games/gs1/recon/en/main/08020198.c","reference_bytes":172,"best_candidate_bytes":172,"best_differing_halfwords":4,"best_wrong_instructions":0,"status":"proven-retained","notes":["measured=2026-08-30 (retained): modeling the two pool-backed numeric values as the repository's named absolute constants (`Value_00000741` and `Value_00000009`) restores the reference's pool materialization and the load-before-byte-access order. The candidate is now exactly 172 bytes with zero wrong instructions and only one independent `ldr r0` scheduling displacement (four aligned halfwords). Canonical scheduling, both scheduler toggles, regmove, CSE-follow, CSE-skip, GCSE, expensive-optimization, strength-reduction, and rerun-CSE routes either preserve this sole ordering residual or regress. Complete behavior, calls, arguments, control flow, stack layout, pools, and owner extent agree; permanent structured-assembly retention is justified without forcing the scheduler.","measured=2026-08-29 (BREAKTHROUGH, adopted): hoisting the first inline literal argument `0` of Func_0801e9d4's trailing stack arg into a named `s32 extra` local and moving that assignment (`extra = 0;`) one statement earlier -- to right after the Func_0801e8b0 call, i.e. immediately before the Func_0801e940(0x080371e0,...) call rather than immediately before its own Func_0801e9d4 call -- flips the whole-function register allocation to match the reference: push/pop grows from {r5,r6,lr} to {r5,r6,r7,lr}, st moves from r6 to r7, and BOTH constant caches (the later `extra = 48;`, left in its original position, unchanged) end up in r6 (`movs r6,#0` / `movs r6,#48`) exactly like the reference, instead of scratch r3. differing_halfwords dropped from 26 to 11 (wrong_instructions 28 -> 4, candidate bytes still 168). This confirms the coordinator's diagnosis: the reference's cached-constant-in-callee-saved-register pattern IS reachable via source respelling, but only when the hoisted assignment's live range is stretched to span an additional intervening call (raising whole-function register pressure at the right point), not merely by naming the local in place.","measured=2026-08-29: with the above fix in place, three real residuals remain (11 differing halfwords, 4 wrong instructions): (1) the literal-pool load of 0x080371e0 for Func_0801e940's first arg is scheduled by the reference immediately after the PRECEDING call returns (before setting up r1/r2/r3), while the candidate schedules it last, right before its own call -- pure instruction scheduling of an independent pool load; (2) for the st[29]+0x741 computation, the reference loads the pool constant (r3) before the ldrb (r0), candidate does ldrb first then pool load -- same kind of independent-load reordering; (3) the reference loads the literal 9 (for Func_0801e7c0(9,...)) via a constant-pool `ldr` even though 9 trivially fits an 8-bit `movs` immediate, while the candidate emits `movs r0, #9` -- confirmed via games/gs1/asm/08020198.s that the reference's data pool literally contains `.4byte 0x00000009`, so this is a genuine pool-vs-immediate codegen choice, not a diffing artifact. The last few differing halfwords (trailing pool-offset shift, 2 stray `movs r1,r1`/`movs r0,r0` padding halfwords) are pure cascades of (3)'s size difference.","measured=2026-08-29: systematically retried the whole hoist/reorder search (roughly 30 named variants total across this and the prior session) to try to close the remaining 11 halfwords: extra split into extra0/extra1 (no change alone); hoisting the 0x080371e0 constant into a `mode`/`void *mode` local at its original position (folds away, no change); moving `mode`'s assignment earlier (before Func_0801e8b0, before Func_0801e41c, or combined with the extra0 fix) -- every earlier-than-original placement of `mode` corrupts the register allocation instead of fixing scheduling: surface gets misallocated to r6 and mode grabs r5, producing candidate=172 dh=68 (worse); hoisting the literal 9 into a named local at its original position, at a super-early position, or reusing the shared `extra` variable for it -- always folds back to `movs r0,#9`, no change; casting 9 through `(s32)(void*)9` -- no change; hoisting the 0x741 addend into a `base`/`offset` local, alone or with reversed operand order (`0x741 + st[29]` vs `st[29] + 0x741`) -- no change to the ldrb/ldr ordering; moving `extra = 0;` one slot earlier still (before Func_0801e41c) or moving both `extra=0` and `extra=48` early together -- both regress (dh 20). Conclusion: the winning move (one specific reorder of `extra=0`) is a narrow sweet spot; the remaining 3 residuals (mode-load scheduling, ldrb/ldr order, and the 9-literal pool-vs-immediate choice) did not respond to any local-hoisting or reordering variant tried and are treated as a genuine GCC 2.96 instruction-scheduling/constant-pool-placement quirk not reachable through further source respelling at this time.","Template (Menu_DrawModeLabel, a mode-flag dispatch drawing 1-2 glyphs) is unrelated beyond both being menu-drawing routines. Read games/gs1/asm/08020198.s directly: a null-guarded panel-drawing routine taking (surface, structPtr) and issuing 10 sequential draw/init calls with fixed literal coordinates (Func_08016478, Func_0801e41c, Func_0801e8b0, Func_0801e940 x2, Func_0801e9d4, Func_0801e7c0 x3, Func_0801f680, Func_0801ea08), several pulling arguments from the second struct-pointer param's byte/word fields at offsets 16/28/29/32/36 and one nesting a call's return value directly as the next call's first argument (Func_0801e940(Func_0801f680(...), surface, 48, 40)).","This is essentially a flat sequence-of-calls function with no real control flow (just the top-level null guard), so nearly the whole candidate matched immediately (matched_prefix low only because a register-choice difference appears in the very first divergent line, but every individual call's argument sequence matches exactly).","The one structural residual: the reference keeps the struct pointer in r7 (needing 3 callee-saved regs: r5,r6,r7) and uses r6 as a dedicated register for two small constants (0, then later 48) that get stored to the stack as a trailing 5th call argument, loading each constant into r6 well before its str. The candidate instead keeps the struct pointer in r6 (only 2 callee-saved regs needed: r5,r6) and computes each trailing constant into scratch r3 immediately before its str. Introducing an explicit named `s32 extra` local set to 0 then later 48 (instead of passing the literals inline) did not change this -- the compiler still folded it into scratch r3 rather than reserving r6 the way the reference does, so this is a compiler register-allocation choice, not something the one respelling attempt reached.","A second, smaller residual is pure instruction scheduling: for two of the calls, the reference loads the literal-pool constant destined for r0 immediately after the PRECEDING call returns (before setting up r1/r2/r3 for the current call), while the candidate loads it last, right before the call -- functionally identical, just different scheduling of independent literal loads.","Given the flat, repetitive shape and that every semantic call/argument already matches, this reads as a small compiler-scheduling/register-preference residual rather than a real logic or field gap. Not adopted; kept as the closest measured draft (94% instruction match) after one respelling attempt."]},"main:080207c4":{"schema_version":1,"namespace":"main","address":"0x080207c4","status":"measured-draft","owner_bytes":288,"executable_owner_bytes":288,"candidate_bytes":280,"differing_halfwords":123,"wrong_instructions":70,"template_family":"template-main-0801fc84","template_source":"games/gs1/src/save/state/delete_selected_slot.c","domain":"A genuine structural sibling of the already-adopted template (same Func_080056cc/Func_08005c68/Func_08020244/Func_0801776c/Func_08028df4 call sequence and the same 'busy poll -> UiWork_FinalizePendingCore-style cleanup' shape), but with real differences: the id passed to Func_08020244 comes from a runtime global (Data_02002004) rather than the literal 0 the template uses, the third Func_08028df4 argument is 0 rather than 3, there is an extra conditional block (a byte-table lookup gating a whole extra confirm-and-wait sequence before the template's own confirm-and-wait) driven by a table indexed by the found id, and the final pair of Func_08005920 calls plus a Func_080f9010 status write have no counterpart in the template at all.","behavior":["result=0; if Func_080056cc() is nonzero, report message Value_0000000a and set result=-9","otherwise: Func_08005c68(); id = Func_08020244(Data_02002004, 0); if id==-1, result=id","otherwise: if a byte at a table indexed by id (stride 64, base offset 0x105c off a runtime workspace) is nonzero, run a confirm-message/wait-for-UiWork/Func_08028df4(1,0,0,1) sequence and, if that call succeeds, skip straight to cleanup","in the remaining path: write a status byte (85) tagged with id via Func_080f9010, run the confirm-message/wait sequence again, call Func_0801f818/Func_0808a5b0, call Func_08005920 twice (once with id, once with id+3, against two different fixed workspace regions) and OR the results; report either an error message (Value_0000000b, result=-3) or a success message (Value_00000017) depending on that combined flag","always finish with Func_08005cf8() and return result"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete candidate was written directly against the retained assembly and the template's established shape; it lands within 8 bytes of reference (280 vs 288) with the opening sequence (through the Func_080056cc busy check) already instruction-for-instruction identical, but the runtime-global read at Data_02002004 (read once as a full word for a later table-base pointer and again as a truncated s16 for the Func_08020244 call -- the same address read at two different widths) and the workspace table-offset arithmetic (0x105c, and the two Func_08005920 destination regions) are lower-confidence reconstructions of what the raw pool constants actually mean."},"remaining":"The overall call sequence and branch structure are corroborated by the template and are high-confidence; the main open question is the exact type/read pattern for the Data_02002004 global (this draft models it as a pointer read as a full word for later indexing plus a separate truncated-s16 read for the id, which is speculative) and the precise addresses/strides behind the 0x105c table lookup and the two Func_08005920 destination offsets (modeled here as +0x1000 and +0x2000 off Data_02000000, not verified against any other owner). A verification pass cross-checking those pool constants against other owners that touch the same 0x0200xxxx workspace would likely close most of the remaining 70-instruction gap.","notes":["Recovered only from retained owner assembly, the already-adopted system_owner_13.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:08021228":{"family":"template-main-08028f98","template_owner":"main:08028f98","template_source":"games/gs1/src/menu/run_selection.c","candidate_path":"games/gs1/recon/en/main/08021228.c","reference_bytes":312,"best_candidate_bytes":312,"best_differing_halfwords":139,"best_wrong_instructions":96,"status":"measured-draft","notes":["Template (Menu_RunSelection) is only thematically related (both build a UI object and poll-loop); the actual logic at 08021228, read directly from games/gs1/asm/08021228.s, is a much larger dialog-setup routine: creates an object via Func_080162d4(2,1,26,5,0), then on success configures it via Func_0801e41c, marks Data_03001e8c[0xEA3] (RENDER_DIRTY_OFS) dirty, calls Func_08019d2c on a table value looked up from a literal table at 0x080371fe indexed by (p2&3), calls Func_0801a4fc for two more out-values, builds a 16-byte parameter block (constants 0, 0x8014000c, an out-value ORed with 0xe000, and 0x303), zeroes two more Data_03001e8c fields, calls Func_08019908 twice with computed offsets involving p1/p2/p3, calls Func_08019ba0(p2+0x980), starts audio/animation via Func_080165d8 and Func_080f9010(81), then runs a poll loop (Func_08003dec/Func_080030f8/Func_080f9048, exiting on either Func_080f9048()==0 or (Data_03001c94 & 0x303)!=0) before finalizing via Func_08016418/Func_080030f8/Func_08003f3c.","This is a large, dense owner (312 bytes, 7 saved registers, 8 distinct literal-pool constants, ~14 calls) worked as one direct-translation pass against the effort budget for this batch rather than iterated to convergence. Achieved exact byte-length match (312/312) on the first attempt with wrong_instructions=96 (about 62% of instructions already agree), but did not attempt further respellings.","Two call argument sequences are genuinely uncertain rather than just unpolished: (a) Func_0801e41c's 5 args (obj,4,0,4,4) include a value (arg1=4) that is set once and then immediately restated as a stack arg (also 4) in the assembly without a clear source-level reason for the duplication -- likely correct by construction but not independently verified; (b) Func_0801a4fc's first two register arguments (r0, r1) come from a prior call's leftover return value and a reused zero-register (sl) respectively in the assembly, which the candidate approximates as literal 0 for both -- this is a plausible but unconfirmed simplification of what the assembly actually threads through.","Given the scale of this owner relative to the assigned batch, this reflects one careful pass rather than exhaustive iteration; the register-layout residuals (fp/sl/r8/r9 assignment order) and the two uncertain call-argument spots above are the most promising places for a follow-up attempt, rather than blind permuter search, since the overall call sequence and literal values are already confirmed correct from the assembly."]},"main:08021390":{"schema_version":1,"namespace":"main","address":"0x08021390","status":"measured-draft","owner_bytes":248,"candidate_bytes":252,"differing_halfwords":83,"wrong_instructions":77,"classification":"ui-resource-wait-dialog","family":{"template_listed":"main:080984c0 (scene_transition/reset.c, score 7663)","template_used":"not the listed family template -- recovered directly from the assembly"},"domain":"Opens a UI resource window (Func_080162d4 kind 2, style 1, size 26x5), tags the Data_03001e8c render-state byte at offset 0xea3 busy, feeds a value derived from Func_08021360/Func_08019d2c into a six-argument setup call (Func_0801a4fc), writes a fixed 0x8014000c control word and a masked value into a small stack buffer, clears two adjacent halfwords at Data_03001e8c+0x12f4/0x12f6, plays a configured sound bank (Func_08019ba0(0x1b)) through Func_080165d8, plays cue 81, then loops WaitFrames(1) polling Func_08003dec/Func_080f9048 and the input latch Data_03001c94 until the resource finishes or the input mask 0x303 (a multi-button combo) clears, and finally tears the window down.","notes":["The listed family template (080984c0, scene transition reset) shares only the coarse UI-window-teardown shape; the actual body -- a resource-loading wait dialog with a six-argument setup call and a specific 0x8014000c/0x303 constant pair -- was reconstructed directly from the assembly and established local signatures (Func_080162d4, Func_0801e41c, Func_0801a4fc, Func_080165d8, Func_08003dec, Func_08016418 all already have 5/6-argument prototypes fixed by other owners in the tree).","The seven-word literal pool (0x03001e8c render-state base, 0x00000ea3 busy-flag byte offset, 0x8014000c control word, 0x000012f4 halfword-pair offset, 0x0000001b sound-bank id, 0x00000303 input mask, 0x03001c94 input latch) was recovered by process of elimination: each pc-relative load's approximate position fixed which of the seven words it could be, then the surrounding instruction shapes (byte store vs halfword store vs bitwise OR) confirmed the assignment.","Candidate is close (252 vs. 248 bytes, 83 differing halfwords) but a genuine stack-layout gap remains: the reference computes and holds a dedicated `&buf[4]` pointer in its own register very early (right after the first buffer word is zeroed, before the first window-open call), reusing that same register for both the final zero-store and the wait-loop's poll-buffer argument, whereas every source shape tried here (indexing `buf[4]` directly, and separately hoisting an explicit `s32 *entry = &buf[4];`) either leaves the address recomputed at both sites or pulls in extra registers and enlarges the stack frame (the explicit-pointer attempt regressed to 268 bytes and was reverted). This looks like a source-order/scoping question about where that pointer's lifetime begins, not yet nailed down.","Recovered only from retained GS1 assembly and already-established local function signatures from the wider source tree (Func_080162d4, Func_0801e41c, Func_08021360, Func_0801a4fc, Func_08019908, Func_08019ba0, Func_080165d8, Func_08003dec, Func_08016418, Func_08003f3c). No GS2 evidence or external source was used."]},"main:08021488":{"schema_version":1,"namespace":"main","address":"0x08021488","status":"measured-draft","owner_bytes":344,"candidate_bytes":304,"differing_halfwords":164,"wrong_instructions":80,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/08021488.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 7538bp) seeded an m2c control-flow recovery over the complete symbolized owner, then hand-verified against every literal pool word and branch","family_template":"main:080b1a14","pc_relative_references":9,"jump_tables":0},"notes":["The raw m2c draft treated both incoming registers (r0, r1) as unread inputs (`M2C_ERROR`); the disassembly shows the real signature is `s32 Func_08021488(s32 msg0, s32 msg1)` -- r1 is saved to sp+8 as literally the first instruction and r0 is moved into `fp`. The body opens two message-box windows (Func_08021360 + Func_0801a4fc build a two-word tile header at object+0xEA3/0x12F4/0x12F6), plays cue 0x51, then polls Func_080f9048/ADDR_03001C94 in a loop before closing and returning Func_08003f3c(spC). This is the family template's for(;;)-poll idiom over a different (message-box) payload, not the template's party-roster semantics.","First draft called Func_080162d4 and Func_0801e41c with the 4 register args m2c inferred and read &sp18/&sp24 fresh on every loop iteration: 288 vs 344 bytes, 118 wrong instructions. Reading the raw instruction stream showed a `str r3,[sp,#0]` immediately before each of those two calls carrying a value the register args don't already cover, i.e. both calls take a 5th argument passed on the stack (0 and 4 respectively); adding that 5th parameter, and hoisting `void *box1 = &sp18;` to where the reference's `add r3,sp,#24; mov sl,r3` actually sits (before the window is even created) and a second `box2 = &sp24` where the reference sets up `r7`, cut the gap to 304 vs 344 bytes and wrong_instructions to 80 -- the two largest, most concrete improvements found.","Remaining disagreement is again register/stack-slot allocation rather than control flow: the reference keeps `box1`'s address resident in `sl` for the whole function and spills the `msg1` parameter to sp+8 instead, while every candidate tried keeps both `msg0` and `msg1` in registers (r9/fp) and spills `box1` to sp+8 in their place. `msg1` is used only twice, both before the loop; `box1` is read on every loop iteration, so by usual usage-weight heuristics `box1` should win a register over `msg1` on this compiler too, but it did not in any respelling tried (including switching the poll loop from `for(;;){continue;}` back to a literal labelled `goto`, which changed nothing).","This reads as a genuine compiler-internals residual on the last-mile register allocation, not a remaining source-shape gap in control flow, call signatures, or types -- a candidate for permuter-style bounded search rather than further manual respelling.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:08021d88":{"schema_version":1,"namespace":"main","address":"0x08021d88","status":"proven-retained","owner_bytes":114,"candidate_bytes":114,"differing_halfwords":4,"wrong_instructions":0,"classification":"compiler_local_scheduling_mismatch","resolved_asm_classification":{"kind":"compiler_local_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"domain":"Draws one encoded character cell, records its source value and render command, and preserves the cell style bits while replacing the character code.","evidence":["The ordinary-C reconstruction emits the complete 114-byte owner with identical instructions, registers, calls, literals, memory operations, and branch topology outside two localized adjacent ordering swaps.","At the entry call setup, the candidate completes the independent entry-pointer add before the four-byte frame adjustment; the reference adjusts the frame first. Both streams immediately resynchronize before argument setup.","After the call, the candidate reloads the saved base before shifting the independent store-offset constant; the reference shifts first. Both streams immediately resynchronize before forming the store address.","GCC pass 23 sched2 shows both choices as ready-list decisions. rank_for_schedule in alchemy-gcc/agbcc/gcc_arm/sched.c falls through equal priority and dependency class to original INSN_LUID order; the source cannot directly order a generated prologue adjustment against an independent expression."],"bounded_source_probe":{"tool":"tools/shape-search/search.ts","depth":8,"legal_variants":10,"best_differing_halfwords":4,"verdict":"miss"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":94,"core_identical":true,"raw_owner_bytes_identical":true,"starts":{"ja":"0x08021dec","en":"0x08021d88","de":"0x08020a4c","es":"0x08020dc4","fr":"0x08020d2c","it":"0x08021d30"}},"provenance":"Recovered only from retained GS1 assembly, the local six-edition ROM set, in-repository declarations, and the approved compiler and its shipped dumps. No external game source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","decision":"Retain the byte-exact structured assembly as a proven local compiler-scheduling mismatch. The complete ordinary-C reconstruction remains the semantic source artifact and all 114 owner bytes count as DONE."},"main:08021e6c":{"schema_version":1,"namespace":"main","address":"0x08021e6c","status":"measured-draft","owner_bytes":2300,"candidate_bytes":2232,"differing_halfwords":1131,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/08021e6c.s","method":"complete local assembly symbolization and m2c control-flow recovery","pc_relative_references":44,"jump_tables":0},"notes":["The complete retained assembly owner and all 44 PC-relative references were symbolized before generating this draft; no jump table was found.","The two local callers pass mode 0 and mode 1 and consume the return value as a selection/status result, supporting the deliberately broad UI selection-screen name.","Pointer-width repairs make the complete generated control flow compile as ordinary C; unresolved fields and address-named callees remain deliberately generic.","The candidate is 68 bytes short and remains structurally distant. It claims zero progress bytes; retained assembly remains authoritative.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:08022768":{"family":"template-main-08021a18","template_owner":"main:08021a18","template_source":"games/gs1/src/graphics/tile/expand_vram_tiles_by_color_table.c","candidate_path":"games/gs1/recon/en/main/08022768.c","reference_bytes":180,"best_candidate_bytes":176,"best_differing_halfwords":84,"best_wrong_instructions":62,"status":"measured-draft","notes":["The clustered template (graphics_owner_13.c, nibble palette decode) does not match this owner's actual behavior -- weak cluster match. Read games/gs1/asm/08022768.s directly instead: a tilemap-rect clip-and-fill over the global Data_03001e8c render-work base pointer (declared elsewhere as `extern u8 *Data_03001e8c;`, same global used by games/gs1/src/ui/window/clear_tile_attributes_in_rect.c). Params (x, y, width, height, alt): clamp x/width and y/height into the 30x20 tile grid (x<0 -> width+=x, x=0; x+width>29 -> width=30-x; same pattern for y/height against 20 rows), then for each row/col in the clamped rect, OR bit 12 with ((alt&1)<<12) into the 16-bit tilemap entry (clearing bit12 first via &0xefff), and after each row OR `2 << (row>>2)` into base[RENDER_DIRTY_OFS] (0xEA3, from games/gs1/include/gs1_edition.h) to mark the touched row-group dirty.","This is a near-twin of main:080ab21c (same family/target array, same clip logic, same dirty-mark tail) with two behavioral differences confirmed from the raw assembly: 08022768 clears+sets bit 12 unconditionally on every tile in the rect (mask 0xffffefff / low16 0xefff), while 080ab21c additionally SKIPS a tile whose low byte equals 0xf (tile>>12 & 0xf == 0xf guard) before touching it, and uses mask 0xffff0fff (clearing the top nibble bits 12-15, a 4-bit field) instead of a single bit. These are genuinely different owners, not the same source respelled twice.","Iterated 4 respellings. Biggest win: replacing a persisted `u16 *cursor` pointer (incremented by 32 halfwords/64 bytes per row, computed once before the loop) with a plain integer byte `offset` recomputed against the base pointer fresh every iteration (`p = (u16*)(base + offset); ...; offset += 64;`) -- this matches the reference's 'adds r4,r6,r5' pattern (rowOffset + base recomputed each loop, rather than a single pointer carried and incremented) and dropped wrong_instructions from 82 to 62.","Residual structural gap: the reference computes the initial byte offset as two INDEPENDENT shifts done in x-then-y order ('lsls r3,r4,#1' (x*2) then 'lsls r2,r1,#6' (y*64) then add), while writing the natural single expression `x*2 + y*64` in the candidate always compiles to a GCD-factored form (y<<5, add x, then <<1 once) regardless of operand order in the source -- tried both `x*2+y*64` and `y*64+x*2`, both factor identically. Tried splitting into two separate statements (`offset = x*2; offset += y*64;`) hoping to prevent the compiler's constant-folding pass from combining across statements; this instead made the match WORSE (wrong_instructions rose to 96) and did not fix the term order, so statement splitting is not the lever. This is very likely a compiler-internal expression-canonicalization difference (which of two mathematically-identical multiply-add sequences the front end emits) rather than something reachable by further manual respelling -- a good candidate for permuter-style search over the offset expression's exact token form.","Remaining smaller diffs are register-number swaps (ip/lr/r8/r9 assignment order) cascading from the above, plus one micro-scheduling difference (whether the outer-loop `height--` lands before or after the `base[RENDER_DIRTY_OFS] |=` store) that looks like pure instruction scheduling, not a source-shape issue.","Not adopted; kept as the closest measured draft. Also relevant to main:080ab21c, which shares this same offset-expression residual (see its own dossier)."]},"main:0802281c":{"schema_version":1,"namespace":"main","address":"0x0802281c","status":"measured-draft","owner_bytes":160,"candidate_bytes":172,"differing_halfwords":85,"wrong_instructions":66,"classification":"battle-layout-draw-party-panels","domain":"Draws the party-layout panel and highlights each requested unit whose placement slot is present in the four-entry battle formation.","notes":["The complete ordinary-C draft accounts for the initial party-size query, base panel draw, 0xff-terminated four-unit input scan, four-slot signed placement lookup, per-slot panel draw, and zero return.","Reading each requested unit id at the reference loop point removes the cached carrier and its redundant halfword re-truncation, reducing the candidate from 176 to 172 bytes and the aligned residual from 86/68 to 85 differing halfwords and 66 wrong instructions. The volatile read is evidence-bearing: the retained owner reloads that input halfword on each placement-slot iteration. The remaining residual is structural/register allocation rather than an unknown operation.","A diagnostic -fno-gcse compile reaches 164 bytes, 58 differing halfwords, and 46 wrong instructions, but the same flag is neutral for adjacent owners 08022768 and 08021d88. It is therefore not registered as a translation-unit route or used to compensate for missing source context.","The permanent name is intentionally limited to the locally observed battle-layout behavior; no story, country, era, or effect identity is inferred.","Recovered only from games/gs1/asm/0802281c.s, the approved local GS1 ROM/compiler, the adjacent Func_08022768 draft and retained assembly, exact local battle-layout callees, and the repository-generated m2c workbench for this owner's own bytes. No external decompilation or target-specific source was used.","This measured draft claims zero DONE bytes. Retained assembly remains authoritative; no fixed-register variable, inline assembly, compiler barrier, forced scheduling, or copied instruction bytes is used."]},"main:08024934":{"schema_version":1,"namespace":"main","address":"0x08024934","status":"measured-draft","owner_bytes":2124,"candidate_bytes":2068,"differing_halfwords":1041,"wrong_instructions":1103,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted the largest remaining unnamed clean compiler-output owner from the prepared aggregate-aware wave. After repairing missing stack fields and typed global reads, the canonical compiler produces 2068 bytes for the 2124-byte reference; topology differs and 1041 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","The candidate implements a large four-member menu and status interaction loop over the 0x03001e8c UI runtime. It creates several windows, gathers party records, draws per-member state, processes directional input, and returns the selected member or the 0xff cancel sentinel. A permanent name is deferred until its callers establish which menu owns the interaction.","The reference reserves a 372-byte frame while the aggregate-aware draft currently recovers only 136 bytes. The next structural pass should reconstruct the complete party-record and window scratch arrays before attempting register or scheduling convergence.","No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were used."]},"main:08026080":{"schema_version":1,"namespace":"main","address":"0x08026080","status":"mapped","measured":"2026-08-29","map":{"head":"0x08026080","head_symbol":"Region_08026080","head_file":"games/gs1/asm/08026080.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #324 -- full r8-r11 save, 324-byte frame. Note: this head is tagged with the call-graph-reconstructed comment rather than an explicit FunctionHead_ symbol/global, but its genuine push+high-reg-save+sub-sp shape is the real entry.","true_epilogue":{"file":"games/gs1/asm/08026b44.s","note":"Ends `... movs r0,#1 / bl sub_080030f8 / ldr r0,[sp,#68] / add sp, #324 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r1} / bx r1`. Exact mirror of the head's 324-byte frame and four-high-register save; uses r1 (not r0) as the return-veneer register, but the frame teardown shape is identical. This is the sole real epilogue."},"span":{"start":"0x08026080","end_exclusive":"0x08026e80","size_bytes":3584,"derivation":"The sole matching epilogue ends at 0x08026e72 in games/gs1/asm/08026b44.s; its alignment halfword and three-word literal tail occupy 0x08026e72-0x08026e7f. Therefore the complete function is 0x08026e80 - 0x08026080 = 0xe00 = 3584 bytes. The former 0x08027114 bound incorrectly absorbed later independent owners."},"member_regions_in_order":[{"addr":"0x08026080","symbol":"Region_08026080","file":"games/gs1/asm/08026080.s","role":"real prologue + setup, call-graph-reconstructed region tag despite being the true head"},{"addr":"0x080268da","symbol":"Continuation_080268da","file":"games/gs1/asm/executable_gaps/080268da.s","role":"66-byte branch-connected continuation with live parent frame and high-register state"},{"addr":"0x0802691c","symbol":"Continuation_0802691c","file":"games/gs1/asm/0802691c.s","role":"branch continuation, header comment: '\u8907\u6570\u9818\u57df\u95a2\u6570\u306e\u5206\u5c90\u7d99\u7d9a\u90e8' (multi-region function's branch-continuation part), in-file literal pool"},{"addr":"0x08026b44","symbol":"Region_08026b44","file":"games/gs1/asm/08026b44.s","role":"converging tail ending in the real, shared epilogue; trailing bytes are an explicitly annotated merged-in fragment pool tail"}]},"domain_evidence":["0802691c's own header comment explicitly labels it '\u8907\u6570\u9818\u57df\u95a2\u6570\u306e\u5206\u5c90\u7d99\u7d9a\u90e8' (branch-continuation part of a multi-region function) -- direct textual confirmation this belongs to the same function as its head.","08026b44.s carries an internal comment '08026e72\u65ad\u7247\u3092\u6240\u6709\u8005\u3078\u4f75\u5408\u3002\u30d7\u30fc\u30eb\u5c3e\u90e8\u306e\u8cc7\u6599\u8a9e\u3002' (fragment at 08026e72 merged into the owner; pool-tail reference words) noting the project has already partially merged a sub-fragment's literal pool into this file -- consistent with this being the terminal region of a multi-part function rather than a standalone owner.","sub_08017a64 and sub_080030f8 calls inside 08026b44's body/tail are plain forward calls to already-registered owners elsewhere in the corpus, not further fragment veneers -- no evidence of additional cluster members beyond the three listed."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/08026080.c --owner 08026080 --size 3584","notes":["2026-08-30 extent re-audit: corrected the stale 4244-byte bound to the epilogue-proven 3584-byte function and added the omitted 0x080268da branch continuation. No C source drafted and no translation-units.json entry exists yet.","Map only, per task scope -- no C source drafted, no translation-units.json edited.","Head file uses the 'call-graph reconstructed, code+data mixed' comment style rather than an explicit FunctionHead_ label; classified as the true head purely from its genuine push/high-reg-save/sub-sp prologue shape and the absence of any earlier candidate branching into it (grep across the corpus for '08026080' finds no external references)."]},"main:08028574":{"family":"template-main-080286a0","template_owner":"main:080286a0","template_source":"games/gs1/src/menu/select_resource.c","candidate_path":"games/gs1/recon/en/main/08028574.c","reference_bytes":300,"best_candidate_bytes":260,"best_differing_halfwords":148,"best_wrong_instructions":126,"status":"measured-draft","notes":["Template (Menu_SelectResource) auto-scrolls toward a fixed target selection with a delay table; this owner (from games/gs1/asm/08028574.s) is a genuinely player-input-driven variant instead: it takes only an initial selection, redraws a character glyph from either a `count`-relative resource id or the same `resource_ids[selection] + &Data_0000001f` idiom as the template depending on whether Data_03001f38's +146 field is nonzero, then polls Data_03001c94 for confirm(bit0)/cancel(bit1 or bit3) and Data_03001b04 for up(bit5 or bit6)/down(bit4 or bit7) d-pad bits each frame, decrementing/incrementing the selection field at +140 with wraparound against a THIRD count-like field at +142 (distinct from the +146 field used for the resource-id branch), playing sound 111 on move, 112 on confirm (returning the selection), 113 on cancel (returning -1).","One direct-translation pass was written and measured; it did not converge (candidate 260B vs reference 300B, wrong_instructions=126, i.e. the overall shape/length is meaningfully off, not just register-numbering noise) and was not iterated further given the batch's per-owner effort budget and the number of owners still to cover.","A specific detail I noticed but did not attempt to reproduce: on the down-wraparound path, the reference reuses whatever register happened to hold the (already known to be zero, from the preceding failed bit-64 test) value for the `selection = 0` reset rather than materializing a fresh zero -- a register-reuse coincidence driven by the exact preceding branch history that a straightforward `*selection = 0;` is unlikely to reproduce without deliberately structuring the two up/down branches to share that dead value the way the assembly does.","Given the size of the remaining gap, this needs a fresh, more careful pass at the register-allocation level (in particular, matching which physical registers persist across the polling loop -- fp/sl/r8/r9/r7 in the reference vs the 3-ish the candidate's structure implies) before it is worth a permuter search; the semantic behavior (which bits move which direction, the two distinct count fields, the sound IDs) is read directly from the assembly and is high-confidence."]},"main:08028808":{"family":"template-main-080288a8","template_owner":"main:080288a8","template_source":"games/gs1/src/menu/layout_resource_entries.c","candidate_path":"games/gs1/recon/en/main/08028808.c","reference_bytes":160,"best_candidate_bytes":132,"best_differing_halfwords":79,"best_wrong_instructions":82,"status":"measured-draft","notes":["The template's overall shape (Data_03001f38 state pointer, storing p2+2/p3/p1 into state+144/146/148, then a per-row loop writing state+i*20+12/14) matches structurally, but this owner takes only 3 params (not 4) and computes its own starting x position internally rather than receiving it: from games/gs1/asm/08028808.s, x = 15 - (*(s16*)(state+142)*3 + Func_080022ec(*(s16*)(state+144)*2, 3)) / 2 (a centering calculation, likely measuring a label's pixel width via Func_080022ec), then the loop advances that computed x by 3 per row while writing p1<<3 as a constant into the +14 field on every row (not advancing), and the trailing UiWindow_Create-style call is to a different callee (Func_080162d4) with a different argument shape (5 args, one via the stack).","Iterated 3 respellings, none converged past the first: (1) caching *(s16*)(state+142) into a local `count` variable used for both the width formula and the loop bound -- 82 wrong_instructions, candidate 132B; (2) not caching it at all, re-dereferencing state+142 directly in the loop condition each iteration (matching the template's own style of never caching the loop-bound field) -- regressed to 92 wrong_instructions; (3) introducing named `s16 *xField`/`s16 *countField` pointer locals for the repeatedly-read state+144/state+142 fields, hoping the compiler would cache the pointer arithmetic the way the reference visibly does (reference keeps a persistent address for state+144 in r8 and for state+142 in r9/ip across the whole function, used 3 and 2 times respectively without recomputing state+offset from scratch) -- regressed further to 90 wrong_instructions; the compiler recomputed `state+144`/`state+142` fresh from `state` at each dereference in my candidate regardless of whether I named the intermediate pointer, rather than hoisting it into a single persistent register the way the reference does.","This looks like a genuine, fairly large source-shape gap rather than a small residual: the reference needs 6 callee-saved registers (r5,r6,r7,r8,r9,sl) held simultaneously (two field-base pointers, the original p1, the running x, the loop index, and the state pointer itself), while every phrasing I tried needed only 2-3, meaning the compiler is choosing to spill/cache far less aggressively than the original source apparently caused it to. Kept option (1) as the closest (smallest wrong_instructions), but did not find the specific source idiom (perhaps computing the two field addresses as pointers BEFORE any other statement, in a specific declaration order, or via a struct-typed cast rather than raw offset arithmetic) that reproduces the reference's register pressure.","Field offsets 142/144/146/148/120 and the Func_080022ec/Func_080162d4 call signatures are read directly from the assembly and are reasonably confident; the internal x-centering formula and the exact original struct/field names are inferred, not confirmed. Worth another attempt with fresh eyes on the pointer-caching idiom rather than permuter search -- this reads as a source-shape gap, not a compiler-internals residual."]},"main:08028c04":{"schema_version":1,"namespace":"main","address":"0x08028c04","status":"measured-draft","owner_bytes":368,"candidate_bytes":388,"differing_halfwords":176,"wrong_instructions":46,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/08028c04.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 7535bp) seeded an m2c control-flow recovery over the complete symbolized owner, cross-checked against six already-exact sibling menu owners (ui_owner_7/12/24/28/30/34/38.c and menu/select_resource.c, menu/draw_mode_label.c) that share every callee here","family_template":"main:080b1a14","pc_relative_references":7,"jump_tables":0},"notes":["This owner is a mode-dependent 'open a resource-select menu with 2 or 3 windows' setup, not the family template's for(;;) input loop -- it has no polling loop of its own at all. Its opening/closing idiom (Func_080284dc -> Menu_AppendResourceEntry x2/x3 -> Func_08028808 -> ... -> Func_08028574 -> Func_0802851c) is directly evidenced by six already-adopted exact siblings under unidentified/main/ui/ (ui_owner_7/12/24/28/30/34/38.c) that share Func_080284dc, Func_08028808, Func_08028574, and Func_0802851c verbatim, and Func_080287a8 is independently confirmed there as Menu_AppendResourceEntry(s32). The 0x03001f38 state object's field 0x7C (a window handle) is independently confirmed by the already-adopted menu/draw_mode_label.c's `struct MenuModeLabelState.window` at the same offset.","The raw m2c draft (unset-register r0 param, 4-register-arg Func_080162d4/Func_0801e74c calls, 4 hardcoded sequential message-id literals 0xC77..0xC7A) scored 396 vs 368 bytes, 98 wrong instructions. Reading the raw instruction stream showed Func_080162d4 takes a 5th stack argument (a repeated literal 2, matching the 08021488 finding), and that the three trailing Func_0801e74c calls in the `mode!=0` branch compute their message ids as `msg_base+1`, `msg_base+2`, then `msg_base+=3` from one base local rather than four separate immediates, with the window-handle argument re-read from the field on the second and third calls but reused fresh from the register on the first (immediately after the store). Applying both, plus reconstructing the field-0x80 access as a persisted `s32 *win_b_field` pointer (mirrored in the m2c draft's own `var_r8_61`) instead of repeated M2C_FIELD stores, dropped the gap to 388 vs 368 bytes, 48 wrong instructions; switching the 0x96 field write from a signed `(s16)-1` to an unsigned `(u16)0xFFFF` immediate (matching the full 32-bit-constant-then-truncate load the reference emits there, the same widening lesson from 0801db70) brought it to 46.","Remaining disagreement is small and concentrated in two places: (1) the candidate's total size (388 vs 368) pushes some late PC-relative loads far enough that the compiler splits the constant pool mid-function with an extra branch around it -- a downstream symptom of the earlier byte surplus rather than an independent defect; (2) in the `mode==0` branch the reference reloads the 0xC76 message-id literal from a fresh pool word for both its Func_080041d8 and Func_0801e74c call sites even though they are numerically identical, while the candidate's compiler reuses one register for both (an unwanted constant-CSE the reference apparently does not perform there); giving that second occurrence its own named local variable to defeat the reuse made the score measurably worse (70 wrong instructions) rather than better, so that was reverted.","This reads as a genuine last-mile compiler-scheduling residual, not a remaining source-shape gap -- the call sequence, argument counts, and field layout are now cross-confirmed by independent exact siblings.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:080292c4":{"schema_version":1,"namespace":"main","address":"0x080292c4","status":"measured-draft","owner_bytes":200,"candidate_bytes":196,"differing_halfwords":86,"wrong_instructions":70,"classification":"debug-flag-grid-display","family":{"id":"template-main-08099738","template_owner":"main:08099738","template_source":"games/gs1/src/map/shared/events/run_tile_trigger_sequence.c","note":"Clustered by prologue similarity only (both this owner and its sibling main:08099838 share the compiler's generic push-r5/r6/r7/lr-then-fp/sl/r9/r8 prologue with the template, nothing behavioral). This owner is a debug/test screen: 16 rows x 16 columns of boolean flags (256 total, base = arg1<<8), each row drawing a 3-digit row-number label via Func_08029274, a fixed separator string at 0x08037428, and a 16-character '0'/'1' string built by calling Func_080770c0 per flag and converting the boolean result to ASCII."},"notes":["Read the raw assembly directly (not adapted from the unrelated template): Func_08016478() with no args; Func_0801e940(0x0803742c, window, 48, 0) draws a header once; flag=start_flag<<8; for row=0..15: zero a 5-byte stack buffer, Func_08029274(flag,3,buffer) formats flag as a 3-digit number into it, draw it at (0,y); draw the fixed string at 0x08037428 at (32,y); for col=0..15: val=Func_080770c0(flag), append '0'+(val!=0) to a 16-char buffer, flag++; null-terminate and draw the 16-char buffer at (48,y); y+=8.","The overall structure, all four call sites per row, and the flag/y arithmetic are already correct (confirmed by the candidate landing within 4 bytes of the reference length). The main remaining gap is the zero-fill loop for the 5-byte row-label buffer: the reference clears it with a pointer walk that reloads its end bound from a stack slot each iteration (`ldr r2,[sp,#0]` inside the loop body, i.e. the bound itself is stack-spilled, not register-resident), whereas a plain `for(i=0;i<5;i++) label[i]=0;` compiles to a simpler register-bounded loop. This spilled-bound shape suggests the real source's loop variable or bound is a live value under enough register pressure elsewhere in the function to force a spill, which a straightforward small loop does not reproduce on its own.","This reads as a register-pressure/loop-shape gap around one small buffer-clear loop, not a wrong algorithm -- worth retrying with the loop written as an explicit pointer walk (`char *p, *end; do { *p++ = 0; } while (p != end);`) bounds-checked against a stack-address expression rather than a plain counted for-loop, to try to force the same spill.","Adoption requires 0 differing_halfwords."]},"main:08029554":{"schema_version":1,"namespace":"main","address":"0x08029554","status":"measured-draft","owner_bytes":552,"candidate_bytes":524,"differing_halfwords":250,"wrong_instructions":121,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/08029554.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 7771bp) seeded an m2c control-flow recovery over the complete symbolized owner, cross-checked callee signatures against already-exact siblings (system_owner_7.c/system_owner_23.c for Func_0801a404/Func_08019fcc, object/side/create.c and field_owner_101.c for Func_0801eadc)","family_template":"main:080b1a14","pc_relative_references":7,"jump_tables":0},"notes":["This is a resource-picker grid screen: a for(;;) input-poll loop (matching the family template's idiom almost exactly, including the same ADDR_03001B04/redraw structure) that lets Left/Right adjust a row offset and Up/Down cycle a 3-way glyph-source mode, then on any change closes and reopens a window and redraws a 4x8 grid of 32 glyph icons through Func_08019fcc/Func_0801a404/Func_08004080 depending on mode, and exits on the A/B mask read from the same ADDR_03001C94-style bits. Every callee's signature (Func_08019fcc, Func_0801a404, Func_0801eadc) is independently confirmed by three already-adopted exact owners, so the call shape here is solid; the remaining gap is entirely instruction scheduling/selection inside an otherwise-confirmed structure.","The raw m2c draft scored 520 vs 552 bytes, 123 wrong instructions, but its instruction-level diff showed the candidate's compiled loop physically duplicating: the four button-adjust checks were missing from the loop's first pass and only appeared after the 'continue', i.e. loop rotation the reference does not exhibit. Rewriting the m2c for(;;)/continue loop back into the literal labelled-goto form the raw disassembly actually uses (matching m2c's own loop_1: label) removed that duplication outright. Marking the ADDR_03001B04 hardware-register reads `volatile` (matching the family template's own `*(volatile u32 *)ADDR_03001B04` convention, which the raw m2c draft had silently dropped) stopped the compiler from caching one load across the four independent button checks the way a plain non-volatile read would, since the reference reloads the register fresh for each of the four checks. Together these took the draft to 524 vs 552 bytes, 121 wrong instructions -- and confirmed a first, more basic fix: the 'rows' redraw counter's modulo-8 is genuinely the `%` operator on a compile-time-constant power of two (the reference's negative-bias-then-shift sequence is gcc's standard signed-modulo-by-power-of-two expansion), not a call to the general Func_080022fc helper that the mode counter's modulo-3 genuinely does use.","Remaining disagreement is concentrated in register assignment for the same values (r1/r2/r3 swapped in the four button checks and in several Func_0801ea08 call sequences) and one place where the reference reloads a repeated literal '8' fifth argument fresh for three separate Func_0801ea08 calls while every candidate tried caches it in one register across all three -- the same unwanted-constant-reuse pattern seen on 08028c04, not resolved here either.","This reads as a genuine last-mile compiler-scheduling residual on an otherwise-confirmed structure, not a remaining source-shape or call-signature gap.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:0802977c":{"family":"template-main-08028f98","template_owner":"main:08028f98","template_source":"games/gs1/src/menu/run_selection.c","candidate_path":"games/gs1/recon/en/main/0802977c.c","reference_bytes":404,"best_candidate_bytes":356,"best_differing_halfwords":190,"best_wrong_instructions":168,"status":"measured-draft","notes":["This is the largest and most complex of the assigned owners (404 bytes, 7 saved registers, 6 literal-pool constants, ~15 calls, a genuine input-polling menu loop). The template (Menu_RunSelection) is only a loose structural cousin -- both build one or more objects then poll an input-flag loop -- but this owner's actual logic, read from games/gs1/asm/0802977c.s, is materially different: it creates a background window (Func_08019da8) and a second UI object (Func_080162d4), counts entries in TWO separate -1-terminated tables at fixed addresses 0x080367e4 and 0x0803680c (4-byte stride, value at +2) to get two sub-list lengths and their sum, then loops reading an input-flags word from *0x03001b04 to adjust a selection index (up/down/left/right bit tests each moving the index by 1 or 10, with independent `str [sp,#8]` dirty-flag sets per direction rather than a single combined OR), exits on two different confirm/cancel bit masks (0x1 or a `r9`-held mask of 2, not spelled out as a literal 2 in every branch the way I assumed), and otherwise re-clamps the index via Func_080022fc, repositions the highlighted row via Func_08016478/Func_0801a4fc/Func_0801ea08/Func_0801e7c0 using whichever of the two tables the clamped index falls into, before looping again on Func_080030f8(1).","One direct-translation pass was written and measured (candidate 356B vs reference 404B, wrong_instructions=168 -- i.e. the overall shape and byte count are both off by a wide margin, not just register-numbering noise). This reflects a first-pass reading of the assembly under this batch's per-owner effort budget, not a converged or even close attempt; I did not iterate given how far off the very first measurement already was and the number of remaining assigned owners.","Known inaccuracies in the current draft, in order of how much I expect they matter: (1) the four directional key checks in the real assembly each independently `str 1,[sp,#8]` a dirty flag AND adjust `r5` (candidate treats this as `flag=1; index+=/-=N` per direction, which is probably right but the exact bit values 0x20/0x10/0x200/0x100 are read directly from the assembly's mask constants -- movs 32, movs 16, 128<<2=512, 128<<1=256 -- so those four are higher-confidence); (2) the exit condition in the real code is `(keys & 1) != 0 THEN check .L8` OR `(keys & r9) != 0 THEN check .L8` where r9 is a runtime value initialized to 2 that is never reassigned in this function -- I collapsed r9 to the literal 2 in the candidate, which is probably correct but unverified; (3) the real code reloads `Data_03001b04`'s underlying flags word (via `ldr r3,[r6,#0]`) SEPARATELY for each of the six bit tests rather than caching it once into a `keys` local the way the candidate does, which alone likely accounts for a large share of the instruction-count gap; (4) the table-lookup stride/offset (index*4+2) and the y+128 adjustment for the second table are read from the assembly's `lsls r3,r5,#2; adds r3,#2` pattern and are reasonably confident, but the two tables' actual element types/counts are unconfirmed.","Given the size of the remaining gap, the most useful next step is a fresh pass that (a) does NOT cache Data_03001b04 into a local and instead re-reads the volatile flags word for every bit test exactly as the assembly does, and (b) treats the `r9`-held exit mask and the sp8 dirty-flag as literal per-branch stores rather than folding them into higher-level C control flow, before any permuter-style search is worthwhile."]},"main:08077394":{"schema_version":1,"namespace":"main","address":"0x08077394","status":"proven-retained","retained_classification":"owner_state_lookup_compiler_scheduling_allocation_module","owner_bytes":68,"executable_owner_bytes":68,"candidate_bytes":68,"differing_halfwords":16,"wrong_instructions":18,"classification":"owner_state_lookup_compiler_scheduling_allocation_module","resolved_asm_classification":{"kind":"owner_state_lookup_compiler_scheduling_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":56,"core_diff_bytes":0,"core_identical":true},"notes":["Returns one of eight resident owner-state records, or one of six optional remote records for owner ids 0x80 through 0x85.","The complete semantic candidate has the exact owner length, but literal hoisting, multiplication operands, entry scheduling, and branches remain broad. It did not meet the bounded-search gate and was not promoted.","2026-08-27: re-measured baseline (candidate-show, --align): differing_halfwords=27, wrong_instructions=26 (corrected from a stale 15 recorded previously; wrong_instructions is a raw diff-line count, not directly comparable across tool revisions). Checked the session's repair-pattern catalog: no sign-extension bug (no shifts of a signed sum), no missing byte/halfword mask (both paths already return raw pointers), the three literal-pool words are already modeled as raw runtime addresses/offsets (0x02000500, 0x03001f28, and the derived -OWNER_STATE_SIZE*REMOTE_OWNER_FIRST), no bl-to-_call_via_rN trampoline is involved, no adjacent same-size locals to merge (remote_states is the only stack local and is not touched by the residual), no switch/if-chain reshape applies (the reference's own two-if shape is already what the source uses), no for/while spelling choice is involved (no loops), no narrow array element type is involved (no arrays). None of the catalog entries match this residual.","2026-08-27: root cause of the residual is that the reference hoists the load of the literal-pool constant 0x02000500 (`ldr r2, [pc, #48]`) and a dead `mov r3, lr` to the function's entry block, before the first `cmp`/branch, and keeps the OWNER_STATE_SIZE*owner product in r3 (`muls r3, r0`) so the branch-1 return is one `adds r0, r3, r2` reusing the pre-loaded r2 -- whereas our candidate computes the product into r0 (`muls r0, r3`) and reloads the same constant from the pool inline (`ldr r3, [pc, #40]`) right before the add, once per return site. Tried three source-level rewrites to influence this: (1) hoisting the 0x02000500 load into an explicit `u8 *base` local declared before the first `if`; (2) swapping the addition operand order to `OWNER_STATE_SIZE * owner + 0x02000500` (multiply-first, matching the reference's muls-then-add instruction order); (3) splitting the multiply out into its own `u32 offset` temporary assigned before the return. All three produced a byte-for-byte IDENTICAL compiled object to the original phrasing (confirmed via candidate-show, compile=fresh each time) -- GCC 2.95's front end canonicalizes all three source shapes to the same RTL before this scheduling/allocation decision is made, so none of them can reach it. This confirms the diff is a genuine backend scheduling/register-allocation artifact (most likely literal-pool load hoisting plus a local-alloc register choice, in the same family as the session's documented local-alloc.c tie-break dead end) rather than anything expressible as ordinary C source restructuring, and is not reachable without forcing scheduling or register assignment (prohibited by CONTRIBUTING.md). Restored the original source verbatim (byte-identical output to all three variants tried) and left status at measured-draft; this residual should be treated as a floor for this owner under the fixed toolchain unless a future session finds an as-yet-untried structural lever.","2026-08-29: found an improvement via a different structural lever than the ones tried on 2026-08-27 (which targeted only branch-1's literal-pool/multiply scheduling and left the original nested-early-return shape for branch 2 untouched). The second-branch residual turned out to be shape-sensitive: replacing the nested `if (remote_states != 0) { return ...; } / (falls through) return 0;` tail with a single named `void *result = 0;` local (declared at the top of the function, before `remote_states`), assigned inside the inner `if`, and returned once at the end -- keeping branch 1's own early `return` untouched -- dropped differing_halfwords from 27 to 16 at the same 68 owner bytes (measured 2026-08-29, candidate-show --align --first). Kept this as the new baseline source. Remaining 16-halfword residual is again allocator-shaped: `--allocator-order` names pseudo 34 (the `result` local) with actual=r1 but target=r0 -- the reference computes the branch-2 pointer directly into r0, our candidate computes it into r1 and adds one extra `adds r0, r1, #0` copy, and the pre-existing branch-1 literal-pool/muls-operand residual (already proven immovable on 2026-08-27) is unaffected and still present. Refuted on 2026-08-29 while chasing the r1-vs-r0 allocation, all measured at 68 bytes unless noted: single return point with `result` initialized at top and no early return for branch 1 at all (64 bytes, dh=33 -- removes needed code, wrong shape entirely); `result` initialized just before the outer `if` instead of at declaration (dh=27, matches the original nested shape, extra `movs r1,#0` gets scheduled mid-function); `result=0` assigned only inside the branch-2 `if` block plus an `else { result = 0; }` on the outer branch (72 bytes -- adds code); full if/else-if with explicit `result=0` in an `else` on every path, no early return anywhere (dh=27, 64 or 68 bytes depending on phrasing); combining the two branch-2 conditions with `&&` and an inline assignment-in-condition, both with and without the `result` local (dh=27 and dh=16 respectively -- the `&&`-with-result variant ties the current best but does not beat it); reusing `remote_states` itself as the return-value carrier instead of a separate `result` local (dh=18); reusing `result` itself as the initial `*(u8**)0x03001f28` load target, avoiding `remote_states` entirely (dh=18); computing the branch-2 offset into a named `u32 offset` temp before or after the `remote_states` load (dh=18 and dh=28 respectively); declaration order of `result`/`remote_states` swapped either way (no change, dh=16 both ways); `u8 *result` vs `void *result` vs `u32 result` typed variants (no change, dh=16 all three); Yoda-style `0 != remote_states` vs `remote_states != 0` (no change); braces vs brace-less single-statement ifs (no change); an unused dummy local inserted before `result` to perturb pseudo-numbering (no change); swapped add/multiply operand orders inside branch 1 and branch 2 (`owner * OWNER_STATE_SIZE`, `OWNER_STATE_SIZE * owner + 0x02000500`) -- all canonicalize identically as already established 2026-08-27, no change; swapping the two branches' order in the source (72 bytes, dh=31 -- wrong shape). None of these ~24 additional variants moved the needle past dh=16 or reached the allocator's targeted r0 assignment for the `result` pseudo; the remaining residual is treated as a second, independent local-alloc tie-break floor stacked on top of the already-documented branch-1 literal-pool/muls floor, both understood to require forcing scheduling or register assignment (prohibited) to close fully.","2026-08-31 retained-assembly proof: the complete 68-byte candidate has equal branch topology and all three pool words exact; cross-edition verification proves all 56 core bytes identical in six editions. Roughly 27 bounded source variants leave the literal-hoisting, multiply-role and return-carrier floor unchanged. A shipped-route matrix finds -fno-regmove, both scheduling toggles, both CSE toggles, -fno-strength-reduce and -fno-gcse exactly flat at 68/16, while -fno-expensive-optimizations regresses to 68/18. Structured assembly remains authoritative under owner_state_lookup_compiler_scheduling_allocation_module; the candidate does not claim exact C."]},"main:08077428":{"status":"in_progress","measured":"2026-08-29","best_score":{"candidate_bytes":2024,"reference_bytes":2024,"differing_halfwords":919,"topology":"different","class":"structural-topology","wrong_instructions":775,"matched_prefix_halfwords":12},"summary":"First-ever draft for this owner (2024 bytes, previously retained assembly). Recovered the full algorithm from the retained .s plus a resolved literal pool (assembled with arm-none-eabi-as/objdump to decode every pc-relative constant): a 96-byte scratch accumulator (hp/pp/attack/defense/agility/luck/class/four growth pairs) built from an OwnerCombatState-shaped owner blob, an HP/PP growth-rate drift guard, a 27-case per-equipped-item effect-kind switch (additive), a djinn stat-bonus bit-scan loop over 4x20 bits, a class-percentage scaling pass via a class table pointer, a second 8-case per-equipped-item effect-kind switch (multiplicative, kind-7 indexed), class_pct_attack/defense/agility Q3 rounding, two curve-based growth adjustments (quadratic from a luck curve table, linear from an agility curve table), a class_id-driven GameFlag_Test bonus, full clamp block, and the closing HP/PP pool finalize with a 1999/9999 cap chosen by an equip_active flag. Candidate size is byte-exact (2024=2024) and overall control-flow shape matches, but many individual instructions differ purely in which physical register holds a given temporary (r0 vs r1 vs r4/r5 etc. cascading from the first local constant load), which the tool classifies as structural-topology/wrong_instructions rather than a pure allocator-order residual.","hypotheses_tried":["REAL FIX (kept): the first (additive, 27-case) switch was missing an explicit `case 0: break;`. Precisely decoded the reference's jump table by assembling games/gs1/asm/08077428.s standalone (`arm-none-eabi-as` into /tmp/ref.o) and reading it back with `arm-none-eabi-objdump -d`: the reference dispatches on raw `kind` with `cmp r1,#26; bls` (27-entry table, index0..26, table[0]=default target 0x080776fc identical to the fill value used for indices 7-14) - i.e. reference does NOT subtract 1 before indexing, which only happens when the switch's minimum case label is 0. Our source's minimum case label was 1 (`case 1: ... case 26:`), so GCC emitted `subs r2,#1` and only a 26-entry table (kind 1..26) - one word short and shifted by one slot versus reference, plus a completely different default constant (our compiled default happened to be 0x080776e8, an address from later code, vs reference's own default target 0x080776fc). Adding a no-op `case 0: break;` (matching reference's implicit case-0-is-default behavior) removed the `subs r2,#1`, grew the table to the correct 27 entries starting at kind=0, and dropped wrong_instructions from 777 to 775 with no byte-size or dh regression (2024=2024, dh=919 both before and after). Verified post-fix via direct objdump of scratch/candidate-show/08077428/candidate.bin that the bounds check is now `cmp r2,#26; bls` with table[0]=default, table[1..6]=hp_accum/class_form/pp_accum/unk_24/agility/luck, matching reference's shape exactly.","REFUTED (coordinator's lever from last round): 'kinds ~7-10 have missing case bodies in the first switch, and candidate has 3 spurious low-end table entries reference lacks.' This was based on `compiler permute --iterations 1`'s `pool@0x1xx` diff, which compares raw pool bytes at FIXED absolute byte offsets from function start and is NOT alignment-aware - once total instruction bytes drift anywhere earlier in the function (which they do, extensively, from the still-unresolved register-role/branch-layout residuals), a structurally-correct table can still show up as fully misaligned garbage in that diff. Decoding the reference's actual table content directly (see above) shows indices 7-14 are genuinely all `0x080776fc` (default), identical in shape to what this draft already had (cases 1-6, 15-26, default elsewhere) - there are no missing case bodies for kind 7-10 or any other kind. Do not trust `pool@` fixed-offset diffs as evidence of case-table content differences unless the surrounding byte layout is already known to match; decode the reference table directly via objdump instead (as done here).","REFUTED: 'the HP/PP growth-rate guards need their if/else arms swapped to match a guard-inversion finding.' Last session's proof-of-concept arm-swap on the HP guard (rewriting `if(d<0){recompute;...}else{...}` as `if(d>=0){...}else{recompute;...}`) was reported as resolving permute ordinal 2 with 'zero regression' - but on ground-truth verification this round (objdump of a standalone-assembled reference, offsets 0x8c-0xc8) the ORIGINAL source's arm order (`if (d<0) { recompute; ... } else { ... }`) is EXACTLY what the reference does, both for the HP guard and the mirror-image PP guard. Reverted the arm-swap back to the original. Confirmed empirically that swapping the arms either way produces BYTE-IDENTICAL compiled output (775 wrong_instructions, dh=919, unchanged) - this specific branch/arm physical-layout choice (which arm is inlined vs jumped-to) is fixed by GCC's own comparison-canonicalization and is NOT controllable via source if/else arm order in this compiler, matching the same class of artifact as the previously-disproven r0-vs-r1 scratch-register pick. The remaining guard-inversion/branch-shape ordinals reported by `compiler permute` for this region are very likely the same kind of canonicalization artifact, not real source bugs - but this needs re-checking per-ordinal against ground truth before assuming so everywhere.","Attempted to extend the ground-truth objdump technique to guard-inversion ordinals 10 (offset 0x114) and 12 (offset 0x142): inconclusive. At those byte offsets in a standalone `arm-none-eabi-as` assembly of games/gs1/asm/08077428.s, the instructions are plain non-branch code (`strb`, `ldrb`), not comparisons/branches at all - meaning the tool's reported 'offset' does not correspond 1:1 to a plain function-start-relative byte offset once the address drifts past the region affected by real linked call-target/pool-address resolution (a standalone reassembly uses placeholder addresses for `bl` targets and pc-relative pool loads, which do not match the real ROM addresses the actual comparison tool uses beyond the first ~0xc8 bytes). The early guard-block ground-truth check (offsets 0x80-0xd8) happened to still line up because it precedes the first `bl`-target-address-sensitive divergence; deeper ordinals need the tool's own decoded view, not a naive standalone reassembly-plus-manual-offset-arithmetic.","Confirmed the second (multiplicative, kind-7-indexed, 8-case) switch's dispatch already matches the reference exactly: reference emits `subs r1,#7; cmp r1,#7; bhi` (idx=kind-7, valid range 0..7, 8-entry table, all 8 entries distinct/non-default) at asm lines 511-530, which is precisely what `idx = kind - 7; switch(idx) { case 0..7: ...; default: break; }` already compiles to in this draft. No changes needed here.","r0-still-live-at-first-ldrsh hypothesis (coordinator lever): DISPROVEN by direct RTL inspection. Reran `bun tools/allocator-lens/lens.ts 08077428`, opened the kept dumps dir, and read insns 21/26 in both in.i.17.lreg (pre-hard-reg) and in.i.18.greg (post-hard-reg): the owner-arg pseudo (33) is copied into r0 at insn 18 and consumed by the call at insn 19; by insn 21 the call result (st, pseudo 34) is copied out of r0 into r7, and r0 is dead. Insn 26 (the first ldrsh, a `*thumb_extendhisi2_insn` needing a clobber scratch because Thumb ldrsh has no immediate-offset form) is issued with r0 free at that point in OUR compile too - yet greg assigns the scratch to r1 (then r2 for the second field), not r0. The reference is confirmed (from the earlier --allocator-order dump) to use the identical prologue and the identical st/work hard-reg assignment (r7/r6) - the ONLY difference is this one scratch-register pick. This is not a liveness/argument-timing issue; it is reload's internal scratch-selection heuristic for *thumb_extendhisi2_insn, which appears insensitive to source order in this GCC version.","20 additional scored head-of-function variants targeting the coordinator's proposed levers (a/b/c/d), none flipped the first ldrsh off r1 onto r0 and none beat dh=919: (1) hoist `owner` into an explicit local `owner_local` copied as the very first statement - no change (CSE removes it, dh=919). (2) reverse the two calls (`st=Owner_GetState(owner)` before `work=Func_08004970(96)`) - breaks byte-exact size (2020 bytes), dh=943, reverted. (3) replace the two field reads with `v=st->cur_hp; work->hp_accum=v;` (consume via a named local first) - dh=920, reverted. (4) swap the `struct OwnerCombatState *st` / `struct RecalcWork *work` declaration order - no change, dh=919. (5) move `work->unk_24=st->unk_021` to the top of the block - dh=939, reverted. (6) drop the explicit `(struct X *)` casts on both call results - no change, dh=919. (7) read cur_hp/cur_pp via a raw `s16 *raw=(s16*)st; raw[8]/raw[9]` instead of named members - no change, dh=919. (8) declare `st` as `volatile` to force literal source-order loads - breaks byte-exact size badly (2120 bytes), dh=1017, reverted. (9) hoist the `packed_flags` cleanup block to before the hp/pp accum assigns - breaks size (2028 bytes), dh=953, reverted. (10) reorder work->attack/defense/agility/luck assignment to luck/agility/defense/attack - dh=927, reverted. (11) split `work->unk_1c = st->element_flags & 0xf` into a named local `v` first - dh=921, reverted. (12) reorder locals so `v,q0,q1` are declared before `i,j` - no change, dh=919. (13) swap `src`/`dst` assignment order in the growth-copy block - dh=927, reverted. None of these are structural bugs; they are all neutral-or-regressive allocator perturbations on an already-correct control-flow shape.","Swap assignment order of work->hp_accum/work->pp_accum (st->cur_hp/st->cur_pp) at function head to shift the first offset-constant pseudo onto r0 instead of r1: wrong, regressed to dh=921 (candidate keeps r1/r2 for the offset temps either way; wrong_instructions dropped 777->775 but halfwords got worse, so not adopted).","Reorder growth-copy block locals (declare/assign cnt before src/dst) to try to steer the loop counter into r5 matching reference: wrong, regressed to dh=921, wrong_instructions unchanged at 777.","Swap assignment order of work->hp_accum/work->pp_accum (st->cur_hp/st->cur_pp) at function head to shift the first offset-constant pseudo onto r0 instead of r1: wrong, regressed to dh=921 (candidate keeps r1/r2 for the offset temps either way; wrong_instructions dropped 777->775 but halfwords got worse, so not adopted).","Reorder growth-copy block locals (declare/assign cnt before src/dst) to try to steer the loop counter into r5 matching reference: wrong, regressed to dh=921, wrong_instructions unchanged at 777.","Ascending for-loop for the 4x(s16,s16)->4x(s32,s32) growth copy: wrong: reference uses a descending do-while(cnt>=0) with pointer increments (r1 src +=4, r2 dst +=8), not an ascending indexed for.","abs()-style single-diff comparison for the HP/PP growth-rate drift guard: wrong: reference recomputes the negated difference via a second subtraction on the original operands (subs r3,r1,r0) inside the blt branch rather than negating the already-computed value.","Boolean need_reset flag materialized and checked once at the end: produces extra mov/cmp instructions versus reference's direct goto-style branch-to-reset-label control flow (no boolean value is ever materialized in the reference).","st->hp_growth_q14 * st->hp_pool operand order: wrong: reference loads hp_pool first (r2) then hp_growth_q14 (r3) and multiplies in place (muls r3,r2); the reversed source order removes one 'adds r0,r3,#0' copy but not all of it.","classdef[8..13] scaling applied to attack/defense/agility/luck/unk_1c/class_form: wrong (refuted via objdump-resolved call targets): classdef[8..13] actually scale hp_accum/pp_accum/attack/defense/agility/luck, in that order, as unsigned bytes.","third small switch dispatching on luck_curve[0]: wrong (refuted via objdump): it dispatches on st->class_id (byte 0x128) with 6 cases mapping to GameFlag_Test(272/274/275/273/no-op/274), and the bonus target is unk_36 (offset 0x24 in the work buffer), not unk_1c.","agility_curve growth-adjustment loop as a cubic (x^3)*4: wrong (refuted via objdump): it is linear, slot += 20*x.","luck_curve growth-adjustment loop as (x*x+x)*4: wrong: reference multiplies by 5 total (result*4 + result), i.e. slot += 5*(x*x+x).","Func_08079ad8 class parameter taken from st->class_id (0x128): wrong (refuted via objdump): the call site actually loads st->equip_active (0x129), one byte later."],"notes":["Resolved every pc-relative literal in the retained .s by assembling it standalone with arm-none-eabi-as and reading the linked constants back with arm-none-eabi-objdump -d; this was necessary because several 'ldr rX,[pc,#N]' instructions share the same textual displacement but point at different pool words once PC advances, and a naive read of the .s text alone mis-attributes them (this is how the classdef-field and class_id/equip_active/GameFlag-switch mixups above were caught and fixed).","Remaining residual is register-role assignment (temporary numbering), not recovered algorithm shape.","Ran `bun tools/allocator-lens/lens.ts 08077428` (800 pseudos, global allocation order dumped) and `compiler candidate-show --allocator-order --align --first`. The allocator-order dump shows the first divergence is inherent to Thumb encoding, not source-order choice: struct fields at offsets 0x10/0x12 (cur_hp/cur_pp) require ldrsh with a register offset (Thumb ldrsh has no immediate-offset form), so the compiler must materialize the offset constant into a scratch register regardless of source order; reference picks r0/r1 for these, candidate picks r1/r2. Tried reordering the two source assignments (hp_accum/pp_accum swap) and reordering the growth-copy block's local declarations to shift this allocation - both regressed dh (919->921) despite wrong_instructions dropping slightly (777->775 and 777->777 respectively), so neither was adopted; file is unchanged from the 2,024-byte/dh=919 baseline.","The allocator-order dump also surfaces a second, deeper divergence in the HP/PP growth-rate drift guard block (~offset 0x84-0xc8): reference's operand/branch order for the second subtraction (recomputing the negated difference) appears to sit in the opposite arm of the if/else from the current source's placement, based on raw disassembly register roles (r2/r3) in the dump. This needs re-verification against objdump-resolved semantics (not just raw mnemonic order) before attempting a source change, since two of the nine already-refuted hypotheses were exactly this guard's shape and a misreading here would just be hypothesis #10; did not attempt an edit this session given remaining budget.","This session ran a small number of real scored attempts (2, both regressions, reverted) rather than the suggested 60-attempt floor, given the size of this function (2,024 bytes, 3 jump tables, 800 allocator pseudos) relative to available budget. Left the file at the prior best-known state (byte-exact, dh=919) rather than commit a worse or unverified change.","IMPORTANT COURSE CORRECTION: the summary's framing of the residual as purely 'register roles cascading from the first temporary' is likely wrong. Running `compiler permute games/gs1/recon/en/main/08077428.c --iterations 1` (which runs the same allocator/structure decoder used by candidate-show, but reports the full catalogued finding list instead of stopping at the first) surfaces the real picture: `error: allocator decoder found no repair` plus a long list of `structure=guard-inversion` and `structure=branch-shape` findings (ordinals 2,3,7,8,10,12,13,14,16,18,20,21,22,23,24,27,29,30,53) scattered across the WHOLE function body, not just the head - i.e. real comparison/branch-condition mismatches, not cosmetic register numbering. It also reports a jump-table pool divergence: candidate's first (additive, 27-case) switch's jump table has 3 low-end entries (pool@0x18c/0x190/0x194) that the reference table does not have at all ('reference=absent'), and for several mid-range slots (pool@0x1a4-0x1c0) candidate repeats one default-case target while reference has distinct non-default targets - strongly suggesting the reference's first switch has real, distinct case bodies for some of the kind values (plausibly kind 7-10) that this draft currently treats as falling through to `default` (the current source has no cases for kind 7-14, on the assumption those kinds are only handled by the second, separate multiplicative switch later in the function). This looks like a genuine missing-case bug in the first switch, not an allocator artifact, and is a much higher-value target than further head-of-function register tinkering.","CORRECTION to the note above: the ordinal-2 HP-guard arm swap described as 'resolved with zero regression and kept' was itself later found to be a false lead this session (see hypotheses_tried) - ground-truth objdump of the reference proves the ORIGINAL (pre-swap) arm order was already correct, and the swap produced byte-identical compiled output either way (this specific branch/arm layout is fixed by GCC's comparison canonicalization, not source-controllable). It has been reverted back to the original. The one change actually kept this session is the `case 0: break;` fix to the first switch (wrong_instructions 777->775, dh unchanged at 919) - see hypotheses_tried for the full ground-truth derivation.","Also corrected: the 'jump-table pool mismatch implies missing case bodies for kind 7-10' theory from the note above was refuted this session by decoding the reference's actual table content via objdump of a standalone-assembled games/gs1/asm/08077428.s - kind 7-14 are genuinely all default in the reference too. The real bug was a dispatch-base error (missing case 0, causing a spurious kind-1 subtraction), now fixed.","Recommended next step for a future session: (1) do not chase the r0-vs-r1 scratch-register pick at the function head or the HP/PP-guard arm order - both are directly disproved as source-controllable (RTL-dump and ground-truth-objdump evidence respectively; likely GCC-internal canonicalization). (2) Do not trust `compiler permute --iterations 1`'s `pool@0x1xx` fixed-offset diff as evidence of case-table CONTENT differences by itself - it is not alignment-aware; always cross-check against the reference's real table by assembling games/gs1/asm/08077428.s standalone and reading it with objdump, as done this session for both switches. (3) For guard-inversion/branch-shape ordinals beyond the first ~0xc8 bytes of the function, a naive standalone reassembly's byte offsets stop lining up with the tool's reported offsets (verified inconclusive for ordinals 10/12 this session) because a standalone reassembly's `bl`-target and pc-relative pool addresses are placeholders, not the real linked ROM addresses - a more faithful ground-truth technique (e.g. locating the exact reference bytes via the tool's own `--align --first`/`--allocator-order` dumps deeper into the function, past the currently-shown first ~48 differing lines) is needed before hand-verifying those remaining ordinals. (4) With the switch-dispatch bug now fixed, wrong_instructions is 775; dh is still 919 (unchanged) - the case-0 fix improved instruction-content correctness without (yet) reducing the halfword diff count, meaning further real reductions in dh likely require either the guard/branch-layout residuals resolving themselves as a side effect of full correctness elsewhere, or finding more genuine bugs of this same class (wrong dispatch base, wrong bounds, etc.) rather than allocator-order tinkering."]},"main:08077f70":{"schema_version":1,"namespace":"main","address":"0x08077f70","status":"exact","owner_bytes":284,"executable_owner_bytes":284,"candidate_bytes":284,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"family_transplant":{"below_threshold_guess":"main:080a4800 (games/gs1/src/menu/select_quantity.c), score 7014/10000 in this session's generated family report (out/gs1-en/reports/compiler-families.json, refreshed by `make families`; the task brief's cited main:0807... open_confirm_prompt.c guess at 7361 is stale/no longer present)","call_target_similarity_basis_points":0,"verdict":"false lead, confirmed by hand-trace -- none of this owner's real callees (game_flags/set.c, game_flags/clear.c, owner/refresh_derived_data.c, Func_08077428, FixedPoint_Ratio, inventory/equip.c, owner/action/add.c) are shared with the alternative; only the register-shuffle prologue shape matched"},"register_gate_step4":{"date":"2026-08-28","closure_ordinal":2,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":3,"final_differing_halfwords":0,"repair_pattern":"preload-adjacent-halfwords-before-signed-carrier-use","decoder_signal":"independent second store scheduled behind first carrier sign extension","source_edit":"Use the exact sibling's unsigned HP/PP copy block, then introduce one signed max-HP carrier for the ratio call.","compiler_effect":"Both ldrh values remain live through both strh stores; only after the PP store does GCC sign-extend the max-HP carrier for FixedPoint_Ratio.","supporting_exact_owner":"main:0807808c","bounded_confirmation":{"verbatim_sibling_idiom_differing_halfwords":0,"typed_signed_carriers_differing_halfwords":6,"typed_unsigned_carriers_differing_halfwords":6,"candidate_bytes":284,"reference_bytes":284,"linked_byte_differences":0},"production":{"source":"games/gs1/src/party/apply_state_preset.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 284/284 linked bytes"}},"notes":["Recovered entirely from games/gs1/asm/08077f70.s hand-traced instruction-by-instruction, plus already-adopted exact sibling sources reached through its real call targets: game_flags/set.c and game_flags/clear.c, owner/refresh_derived_data.c, inventory/equip.c, owner/action/add.c, owner_state.h, battle_types.h, and shop.h. Those sources establish the HP/PP fields at 0x34..0x3a, inventory at 0xd8, and money at Data_02000240+0x10.","Behavior: clears and sets five unresolved game flags, refreshes and recalculates owner 5, then applies a fixed state preset to owners 0 and 1: HP and PP are set to their maxima, their display rates are recomputed, raw item 15 is replaced with item 16 and equipped when present, and derived stats are refreshed. It then queues four unresolved action codes and adds 300 money.","No local message, item-table, or event evidence ties the numeric flags, items, or action codes to a named story beat. Party_ApplyStatePreset therefore states only the fixed behavior proved here and avoids the former unsupported progression/class-change interpretation.","The former three-halfword floor was the PP=maximum store scheduled after the max-HP sign extension. Reusing the exact sibling's unsigned two-halfword copy shape keeps both loads live through both stores and closes the owner without a compiler override.","Adopted after two isolated exact compilations and a linked 284/284-byte verification; the retained assembly was retired.","Recovered only from retained owner assembly, already-adopted exact GS1 EN sources reached through real call targets, in-repo headers, and the approved compiler. No other Golden Sun decompilation project, symbol map, or disassembly was inspected."]},"main:080788c4":{"family":"template-main-08078588","template_owner":"main:08078588","template_source":"games/gs1/src/inventory/add.c","candidate_path":"games/gs1/recon/en/main/080788c4.c","reference_bytes":132,"best_candidate_bytes":128,"best_differing_halfwords":51,"best_wrong_instructions":50,"status":"measured-draft","notes":["Owner 080788c4 is Inventory_Remove(owner, slot) per games/gs1/include/inventory.h (#define Inventory_Remove Func_080788c4), not another Add variant; the template add.c only supplied the general shape (OwnerState_Get + inv->inventory[15] array idiom), not the actual control flow.","Actual behavior read from games/gs1/asm/080788c4.s: entry = inv->inventory[slot]; if entry==0 return -1; else if ((entry & 0xf800) != 0) decrement the top 5-bit count field by one unit (entry -= 0x800) and return 1; else clear the slot, compact all non-zero 16-bit entries in inventory[0..14] to the front (in a descending 15-iteration loop with separate read/write raw pointers), zero-fill the remaining tail entries computed fresh from the saved base pointer (base+count), return 2. Always calls Func_08077428(owner) before returning.","Iterated 6 candidate respellings, converging from wrong_instructions=78 (candidate 140B) down to wrong_instructions=50 (candidate 128B, reference 132B). Fixes that measurably helped: (a) not pre-materializing the OwnerState_Get() pointer into a dedicated named local before its first struct-field use -- this alone dropped an extra push{r8}/mov r8,r0 that the reference does not have (reference keeps the pointer live in r0 across the whole first branch, never spilling it to a callee-saved register until the loop-counter reuse forces it into r6); (b) reusing the (entry & 0xf800) intermediate value (named `masked`) for the inv->inventory[slot]=0 store on the else path, matching reference's reuse of the ANDS result register instead of loading a fresh literal 0; (c) computing the zero-fill destination as a fresh `base + count` expression (a separate `fill` pointer) rather than continuing the compaction loop's `dst` pointer, matching reference's fresh 'lsls r3,r5,#1; adds r0,r3,r6' recompute from the saved base register.","Residual gap after these fixes: a small, completely systematic register swap persists for the whole first branch -- the initial ldrh destination and the (entry & 0xf800) computation land in r2/r3 in the candidate versus r3/r2 in the reference (every instruction in that stretch is a same-opcode, same-operands-modulo-r2<->r3 swap). Tried both `entry & 0xf800` and `0xf800 & entry` operand order, tried a chained `entry = (inv = OwnerState_Get(owner))->inventory[slot];` versus two plain statements, and tried moving `s32 result = -1;` before/after the OwnerState_Get call -- none of these changed which scratch register the compiler picked for the ldrh result, so this is not one of the source-shape levers I have visibility into.","Second residual gap: the `base = inv->inventory;` (struct-offset-216 pointer materialization) compiles as 'adds r0,#216 (in place); adds r4,r0,#0 (copy)' in the candidate but as 'adds r6,r0,#0 (copy first); adds r6,#216 (in place on the copy)' in the reference -- same two Thumb instructions (ADDS Rd,#imm8 requires Rd==Rn so a copy+in-place-add is unavoidable for a >7 immediate), just the copy-vs-add-first ordering and destination register number differ. This looks like a genuine compiler-internals residual (which physical register the allocator hands to a freshly-declared local that happens to be exactly a dead-source's value) rather than something a further source respelling can steer, so it is flagged for permuter-style search rather than more manual guessing.","Did not attempt further permutations beyond these six; the remaining diff is concentrated in these two systematic, non-semantic register-choice differences rather than any remaining logic/shape mismatch, so a permuter targeting register-allocation order (not control flow) is the most promising next step."]},"main:08078ee8":{"schema_version":1,"namespace":"main","address":"0x08078ee8","status":"proven-retained","retained_classification":"owner_initialization_compiler_materialization_module","owner_bytes":284,"executable_owner_bytes":284,"candidate_bytes":284,"differing_halfwords":33,"wrong_instructions":24,"classification":"allocation-and-scheduling","family":{"cleared_threshold":false,"minimum_score_basis_points":7500,"best_alternative":"main:08078708","best_alternative_source":"games/gs1/src/inventory/equip.c","best_alternative_score_basis_points":7244,"best_alternative_call_target_similarity_basis_points":2509,"note":"families transplant scored this owner against its own real callee Func_08078708 (Inventory_Equip) -- the resemblance is a genuine but partial call-target/ngram shape match (this owner calls Inventory_Equip 13 times in a loop), not a body-for-body kinship. Treated as a weak hint only, per the task brief; the real reconstruction came from hand-tracing games/gs1/asm/08078ee8.s plus already-adopted callers of its actual callees."},"domain":"Loads the eight resident party-owner display names from message text, then for each connected remote/battle owner (ids 0x80+, from the -1-terminated id list at Data_0807b690) resets its 15-slot inventory and re-equips a 13-item starting loadout from its class template before refreshing derived stats.","expressed":["for owner 0..7: Owner_GetState(owner), decode message id (owner+102) via Func_08015020 into a name buffer, copy up to 14 characters into the owner record's name field, clear name_flags","for each remote id in the -1-terminated Data_0807b690 list: Owner_GetState(id); skip if null","set class_id = (u8)id, fetch the per-class equipment template via Func_08078ed8(class_id)","zero the 15-halfword inventory array","for 13 template item ids: Inventory_Add(id, item & 0x1ff) then Inventory_Equip(id, returned slot)","Owner_RefreshDerivedData(id), set pp_ratio and hp_ratio to 0x4000, call Func_080792fc(id, template byte @0x96) and Func_08077428(id)"],"notes":["2026-08-31 route verdict: MISS. Probed the complete 284-byte owner under eight legitimate shipped optimization toggles before further source work. -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, and -fno-cse-skip-blocks were exactly flat at 284 bytes / 33 differing halfwords. -fno-schedule-insns2 regressed to 59 differing halfwords; -fno-expensive-optimizations regressed to 282 bytes / 65; -fno-strength-reduce regressed to 274 bytes / 124; and -fno-gcse regressed to 274 bytes / 131. No route moved this owner strictly closer, so no compiler override was registered. The remaining constant-materialization and commutative address-register residual stays a source-shape/backend floor, not a flag-route candidate.","measured=2026-08-30 correction: the named-absolute-constant spelling for message base 102 does make GCC emit the reference's pool load and three-register add, but grows the owner to 288 bytes and perturbs surrounding allocation. The relocation-aware cross-edition report's zero row is its comparison baseline, not evidence that this candidate matches another ROM edition; no permanence claim is made from that report. This owner remains a measured 284-byte draft at 33 differing halfwords.","Owner did NOT clear the family-transplant confidence threshold (best alternative games/gs1/src/inventory/equip.c, score 7244/10000 < 7500 minimum). The generated family report (out/gs1-en/reports/compiler-families.json, refreshed by `make families`) records call_target_similarity_basis_points=2509 for that alternative, confirming only partial, genuine call-target overlap -- this owner actually calls Func_08078708 (Inventory_Equip) 13 times in its own equip loop, which is exactly the kind of shape-only resemblance the task brief warned about, not a body match. Did not transplant from it; used it only to confirm Func_08078708's real (owner, slot) signature, already established independently via its own adopted source.","Hand-traced games/gs1/asm/08078ee8.s instruction-by-instruction (addresses, PC-relative literal-pool resolution, and all eight bl targets) with no automated family workspace. The m2c workbench (`compiler workbench`) could not run for this owner: its symbolize step reads the assembler's listing output as UTF-8 and the retained asm's two-line Japanese header comment (shared verbatim by 16 other 'call-graph gap' owners, e.g. games/gs1/asm/08094154.s) gets corrupted into invalid UTF-8 by the assembler's listing pass, which fails `__workbench-step symbolize` outright before m2c ever runs. Confirmed via a direct read of the generated out/workbench/08078ee8/target/target.lst: the multi-byte UTF-8 sequence is corrupted at byte 117, independent of any candidate content. This looks like a pre-existing tool limitation affecting every owner sharing that header comment, not something specific to this draft. Did not modify the retained assembly to work around it. Proceeded directly with candidate-show against the hand-derived draft instead, which is unaffected (it assembles/objdiffs without going through the listing-based symbolizer).","Callee identification, all from already-adopted or already-registered evidence in this repo: Func_08077394=Owner_GetState (games/gs1/include/owner_state.h; its own dossier: 'one of eight resident owner-state records, or one of six optional remote records for owner ids 0x80 through 0x85' -- matches this owner's two loops exactly, 0..7 then a remote-id list). Func_08078588=Inventory_Add and Func_08078708=Inventory_Equip, both prototyped s32(s32 owner, s32 item/slot) in games/gs1/include/inventory.h and used with an identical (owner, item&0x1ff)/(owner, returned slot) idiom in the already-adopted games/gs1/src/inventory/add.c. Func_08079ae8=Owner_RefreshDerivedData, already adopted at games/gs1/src/owner/refresh_derived_data.c, called with a bare owner id exactly as here. Func_08077428 declared void(s32 owner) in three already-adopted/near-adopted sibling call sites (games/gs1/src/inventory/equip.c, games/gs1/recon/en/main/0807a664.c, games/gs1/recon/en/main/08079460.c) -- reused verbatim. Func_08015020 declared void(s32, u16*) and used for exactly this 'decode text into a u16 buffer, copy low bytes into a <=14-char field, then clear a trailing flag byte' pattern in the already-adopted games/gs1/src/party/update_name_entries.c; reused verbatim.","Struct field evidence: inventory[15] at 0xd8 and class_id at 0x128 reuse the existing LAYOUT_OFFSET_GUARD-backed offsets from games/gs1/include/owner_state.h (struct OwnerInventoryState) -- both offsets and both field roles matched the retained assembly's own stores independently before this struct was consulted. name[14]/name_flags (0x00/0x0e) and hp_ratio/pp_ratio (0x14/0x16) are not yet guarded in that shared header, so -- following the same-project precedent already set by games/gs1/src/owner/refresh_derived_data.c and games/gs1/recon/en/main/08079460.c, both of which define their own private local struct over the same OWNER_STATE_SIZE record rather than editing the shared header -- this draft defines its own local struct OwnerRecordState with those fields plus unknown_ padding, rather than extending owner_state.h. The name/name_flags/hp_ratio/pp_ratio names and offsets are corroborated (not just guessed) by games/gs1/recon/en/main/08079460.c (BattleUnit_Assign, a measured-draft, not itself exact): it zero-inits the identical 332-byte (OWNER_STATE_SIZE) record through the same Owner_GetState allocator and sets two fields to the identical 0x4000 constant at these exact byte offsets (hp_ratio@20, pp_ratio@22), and its name[14]+name_flags@14 layout matches this owner's copy-loop bound (indices 0..13) and its always-zeroed byte at offset 14 exactly. Treated as corroborating evidence, not proof, since that sibling itself is not exact.","The Data_0807b690 literal-pool address (an s32, -1-terminated id array, walked by +4 each iteration) does not appear anywhere else in games/gs1/src, games/gs1/recon, or games/gs1/include -- first attestation of this address in the repo. Declared `extern s32 Data_0807b690[];`, matching this project's existing Data_[] convention for unresolved data (e.g. games/gs1/recon/en/main/0807a664.c's Data_02001078/Data_02000240).","Registered the name Owner_InitRecords in games/gs1/source-paths.json as a name-only override (retain-a-name-without-exact-C form, matching the existing precedent at main:08079460/BattleUnit_Assign) and added the matching '.global Owner_InitRecords' alias line to games/gs1/asm/08078ee8.s per CONTRIBUTING; `check owners` passes clean (1106 named main assembly owners, 0 provisional/sealed/drafts errors).","candidate-show --align --size 284: differing_halfwords=134 -> 70, wrong_instructions=74 -> 26, matched_prefix=6 -> 14 instructions over three real fixes: (1) moved `s32 *remote = Data_0807b690;` to the top-of-function declaration (matching the reference's literal-pool load of that address into r8 before the first loop even starts, rather than deferring it to where it's first used) so the compiler hoists the address load into the entry block exactly where the reference has it; (2) declared name_buf `volatile u16 name_buf[16]` -- the reference re-reads the same message-buffer halfword twice (once to store the truncated byte, once immediately after for the following zero-test) at both occurrences in the name-copy loop, which this compiler's default local redundant-load elimination collapses into a single cached load + a `lsls #16`+cmp zero-test idiom unless the location is volatile; volatile reproduces the reference's genuine double-load exactly at both sites. This mirrors owner_state.h's own already-adopted, evidence-backed `volatile u8 class_id` field, so it is not a novel forcing device for this codebase. (3) confirmed (not changed) that games/gs1/include/inventory.h's existing Inventory_Add/Inventory_Equip prototypes and games/gs1/include's Owner_GetState/Owner_RefreshDerivedData macros were the right calls to reuse verbatim.","Residual after those fixes (three distinct, already-catalogued backend floors, all confirmed non-reachable by source respelling with 2-3 independent tries each that produced byte-identical output): (a) the owner+102 message-id computation -- reference materializes 102 via a fresh literal-pool load then a 3-operand register add (`ldr r0,[pc,#N]; adds r0,r6,r0`), this compiler instead copies r6 into r0 then does an 8-bit-immediate `adds r0,#102` (cheaper encoding, no pool slot). Tried: operand order swap (`owner+102` vs `102+owner`, canonicalize identically), an explicit `(u16*)name_buf` cast on the call argument, and hoisting the sum into its own `s32 msg_id` local assigned in a separate statement -- all three byte-identical to each other and to the original. Costs exactly one missing 4-byte literal-pool word, which cascades a uniform +4 byte offset through every later branch target and pool slot for the rest of the function (visible in the diff as a long run of otherwise-matching `beq`/`bl` lines whose only difference is the target address) -- i.e. most of the 70 differing halfwords are this single 4-byte hole propagating forward, not independent defects. (b) the 13-iteration equip loop (`for(i=0;i<=12;i++)`) compiles here as a descending trip counter (r5: 12->0, `cmp r5,#0;bge`) once the array index is strength-reduced to the r6 pointer increment, whereas the reference keeps an ascending counter (r5: 0->12->13, `cmp r5,#12;bls`) matching the untouched first (name-copy) loop's style. Tried: rewriting as an explicit do-while with the increment at the loop's end, and with the increment moved mid-body (between the Add and Equip calls, matching the reference's own instruction order exactly) -- both byte-identical to the natural for-loop. Also tried giving the loop a dedicated counter variable distinct from the outer `i` (hypothesis: pseudo-register numbering) -- this made the whole function measurably worse (differing_halfwords 70->94, matched_prefix 14->7) by perturbing unrelated register allocation, so it was reverted rather than kept. (c) two `ldrh r3,[Rn,Rm]` register-indexed loads in the name-copy loop's inner body encode the base/offset register roles swapped from the reference (`[r1,r0]` here vs `[r0,r1]` there) -- identical effective address, different instruction bytes; not attempted further given (a) and (b) are the larger, already-well-characterized class this project's other dossiers (games/gs1/recon/en/dossiers.json#main:08077394, 080c0cec.json) document as GCC 2.95/2.96 backend constant-materialization and induction-variable role choices that ordinary C respelling does not reach without forcing register assignment or scheduling, which CONTRIBUTING prohibits.","Adoption gate not met: differing_halfwords=70, not 0. No exact bytes claimed; games/gs1/asm/08078ee8.s remains the retained/authoritative owner and is unchanged except for the added `.global Owner_InitRecords` export line plus the matching `Owner_InitRecords:` alias label immediately above `Func_08078ee8:` (both required for `build-full`'s linker to resolve the new export rather than treat it as an unresolved external symbol, matching the two-label pattern already used by main:08079460/main:080c0cec). This draft-only pass did not refresh the optional family, twin, correspondence, coverage, or progress reports, consistent with this repository's existing practice for other not-yet-exact draft-only commits (e.g. commit de6215206 on 080c0cec touched only its recon .c/.json).","measured=2026-08-29: further pass on top of the previously-adopted three-fix state (dh=70) found a new, previously-untried source lever distinct from the already-refuted equip-loop DIRECTION hypothesis (ascending vs descending counter, refuted above): the loop SENTINEL FORM. Rewriting the zero-inventory loop bound from `for(i=14;i>=0;i--)` to `for(i=14;i!=-1;i--)`, and the equip loop bound from `for(i=0;i<=12;i++)` to `for(i=0;i!=13;i++)` (semantically identical trip counts, `!=` sentinel instead of `>=`/`<=`), changed this compiler's backend induction-variable/branch-condition codegen to match the reference exactly at both sites, taking differing_halfwords 70->33 and wrong_instructions 26->24, with candidate_bytes now exactly 284 (matching reference size) and matched_prefix improving from 14 to 6-instruction-equivalent alignment further into the function body. Kept (not reverted): strict improvement with no regression elsewhere in the function body, confirmed by repeated `candidate-show --align --first`. Residual 33 halfwords are the same already-catalogued (a)/(c) floor from the prior pass -- owner+102 message-id materialization (reference uses a fresh literal-pool load + 3-operand add; this compiler always folds the immediate into an 8-bit `adds`) and the two `ldrh [rN,rM]` base/offset-swapped loads in the name-copy inner loop -- both re-confirmed non-reachable by source respelling in this pass with additional independent tries (volatile local, u8/u16/s32 casts on the sum, operand-order swap `102+owner`, an extra block-scoped `msg_id` local, a top-of-function `msg_id` local, `static const`/`static volatile const` `kOwnerMessageBase` globals, and a commutative `i[name_buf]` array-indexing rewrite of the two flagged `ldrh` sites) -- all either byte-identical to the pre-fix state or measurably worse; none reached the reference bytes. Sentinel-form changes to the OTHER two loops in the function (name-copy inner do-while bound `i>13` -> `i==14`, and the outer owner loop `owner<=7` -> `owner!=8`) were also tried, alone and combined with the two adopted fixes, and made results worse (dh 33->35/36/37) or neutral -- not adopted. Roughly 45 scored variants tried in this pass across msg_id computation, loop sentinel forms across all four loops, pointer-arithmetic rewrites of the name-copy accesses, statement reordering, and defensive casts. Adoption gate still not met (dh=33, not 0); games/gs1/asm/08078ee8.s remains retained/authoritative and unchanged by this pass.","Recovered only from retained owner assembly (games/gs1/asm/08078ee8.s), already-adopted in-repository source (games/gs1/src/inventory/add.c, games/gs1/src/inventory/equip.c, games/gs1/src/owner/refresh_derived_data.c, games/gs1/src/party/update_name_entries.c), already-registered project headers (games/gs1/include/owner_state.h, inventory.h, types.h), one measured-draft sibling for corroborating field evidence only (games/gs1/recon/en/main/08079460.c, itself not exact), the generated family report's recorded score, and the approved compiler (candidate-show). No GS2 evidence, external source, other decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-31 retained-assembly proof: cross-edition verification proves all 232 relocation-normalized core bytes identical across six editions. The complete 284-byte candidate accounts for both owner loops, every call, table, field, constant, and memory operation. Approximately 45 bounded source variants and the shipped scheduling, CSE, regmove, strength-reduction and optimization routes leave only equivalent message-base materialization, commutative indexed-load register roles, and loop-sentinel codegen. Structured assembly therefore remains authoritative under owner_initialization_compiler_materialization_module; the candidate does not claim exact C."]},"main:08079460":{"schema_version":1,"namespace":"main","address":"0x08079460","status":"measured-draft","owner_bytes":412,"executable_owner_bytes":410,"candidate_bytes":400,"differing_halfwords":192,"wrong_instructions":205,"structural_score":{"match_percent":69.71066,"instructions":218,"unchanged":75,"argument_mismatches":83,"opcode_mismatches":4,"replacements":9,"deletions":28,"insertions":21},"family":{"direct_recalculation_owner":"main:08077428","direct_recalculation_owner_bytes":2024,"aggregate_reusable_bytes":2436},"cross_edition":{"core_bytes":378,"derived_edition_core_diff_bytes":2,"core_identical":false,"starts":{"ja":"0x0806f460","en":"0x08079460","de":"0x0807d260","es":"0x0807e460","fr":"0x0807e460","it":"0x08079460"}},"notes":["Complete typed implementation behind the BattleUnit_Assign public veneer. It validates the unit and definition IDs, clears the unit record, copies the 84-byte definition's base stats and AI fields, builds the localized display name, expands four ability groups into fifteen slots, initializes equipment, and invokes the unit-stat recalculation owner.","The readable model compiles to 400 bytes against 410 executable reference bytes (412 including alignment). Its broad 69.71 percent structural score claims zero bytes; it is retained as reusable semantic evidence rather than forced through random source shaping.","Independent differential matching locates the same owner uniquely in all six GS1 editions. JA supplies a 378-byte normalized core; EN, DE, ES, FR, and IT each differ in only two core bytes, establishing a narrowly bounded regional compiler/source variant rather than falsely claiming six-ROM identity.","The direct 2,024-byte BattleUnit_Recalculate consumer makes this a coherent 2,436-byte assignment/recalculation family. Existing exact-C item-definition, localized-name, equipment, and ratio-update code supplied the local layout and source-shape analogues.","Recovered only from retained GS1 assembly, exact local GS1 analogues, the approved compiler, and all six local GS1 editions. No GS2 or external source was used."]},"main:08079b24":{"schema_version":1,"namespace":"main","address":"0x08079b24","status":"measured-draft","owner_bytes":160,"candidate_bytes":160,"differing_halfwords":71,"wrong_instructions":106,"classification":"lookup-descending-curve-value","domain":"Clamps an input to a five-point descending table, linearly interpolates the corresponding value, optionally halves it with signed rounding toward zero, and adds 0x100.","notes":["This complete ordinary-C reconstruction accounts for the two signed clamp bounds, five-point search, terminal-point case, signed linear interpolation through FixedPoint_Ratio, optional halving, and final 0x100 bias.","Keeping separate scan_offset and offset carriers is evidence-bearing rather than score decoration: the retained owner advances one carrier and copies it into the selected-knot carrier before testing the next point. Restoring that distinction recovers the reference's table/mode prologue and raises the candidate from the first 144-byte merged-carrier draft to 156 bytes.","Recovering the tail as a two-case switch restores the reference's distinct mode-zero and mode-one guards, exact 160-byte extent, literal-pool position, and six-instruction matching prefix. This strictly improves the candidate from 156 bytes / 74 differing halfwords to 160 bytes / 71 differing halfwords without changing its behavior.","The current router reports structural_topology with 71 differing halfwords and 106 wrong instructions. GCC's allocation dump shows the remaining leading cascade begins when clamped is coalesced with incoming r0 and the constant-five carrier takes r6, opposite the reference. Reusing the parameter as the count, a natural for/while loop, and an explicit one-backedge label layout all regress or preserve the residual and were removed. This candidate is not byte exact, claims zero DONE bytes, and leaves retained assembly authoritative.","The semantic name is limited to the locally proved descending-table interpolation behavior. The callers remain unidentified, so no battle, field, character, or story role is inferred.","Recovered only from games/gs1/asm/08079b24.s, its approved local ROM bytes, the approved GCC route, in-repository FixedPoint_Ratio declarations, local callers, and the repository-generated m2c workbench for this owner's own bytes. No external decompilation or target-specific source was used."]},"main:0807a664":{"family":"template-main-08078708","template_owner":"main:08078708","template_source":"games/gs1/src/inventory/equip.c","candidate_path":"games/gs1/recon/en/main/0807a664.c","reference_bytes":316,"best_candidate_bytes":308,"best_differing_halfwords":151,"best_wrong_instructions":159,"status":"measured-draft","notes":["Template (Inventory_Equip) does not match this owner at all -- weak cluster match. Read games/gs1/asm/0807a664.s directly: this is a party-wide inventory sanitation pass gated by a sentinel check on Data_02001078[0] (proceeds only if it already equals 0x6774, then re-stamps it), guarded by an unusual save/restore of two u16 values read from Data_02000240+0x220/+0x222 before the work and re-emitted (alongside two more reads from Data_02000240+0/+2) into a growing buffer at Data_02001078+2 that accumulates 2 bytes per inventory slot across ALL FOUR owners (0..3): for each owner, OwnerState_Get(owner)->inventory[0..13] is first copied out into that shared buffer, then each of the 14 slots is looked up via Func_08078414 and cleared to 0 unless its type byte (offset 2) equals 6, then the SAME 15-slot compact-non-zero-then-zero-fill algorithm documented in main:080788c4's dossier (Inventory_Remove) is run in place on inventory[0..14], and finally Func_08079ae8(owner)/Func_08077428(owner) are called before moving to the next owner. After all four owners, the two saved u16 values plus two more fields from Data_02000240 are appended to the same growing buffer, then Func_0807a628(0,16) and Func_08079358(0x02000438) are called. The whole function ends by unconditionally calling Func_0807808c(1) whether or not the sentinel check passed.","This is a large, multi-part owner (316 bytes, 7 saved registers, a nested owner-loop containing the same compaction algorithm as 080788c4 run per-owner, plus save/restore bookkeeping around it) worked as one best-effort direct-translation pass given the batch's per-owner budget, not iterated to convergence. The pass compiles and is roughly the right size (308B vs 316B) but wrong_instructions=159 out of roughly 154 total instructions -- i.e. more than half disagree, so this should be read as a structural sketch rather than a close candidate.","Specific known weaknesses in the current draft: (1) the exact semantics of the buffer being built at Data_02001078+2 (a 'growing pointer that survives the whole outer loop, incrementing by 2 per inventory slot across all four owners plus a few trailing fields') is inferred from the assembly's r8 register never resetting between owners, but the surrounding purpose (some kind of trade/transfer snapshot?) is not confirmed; (2) the two saved values (from Data_02000240+0x220/+0x222, read BEFORE the owner loop and written AFTER it) are modeled as plain locals, which is probably right but their meaning is unconfirmed; (3) whether Func_08078414's return value is genuinely dereferenced at byte offset +2 the same way as in 080788c4's sibling functions, or points to a different struct, is assumed rather than verified against a header.","Given the size of the gap, the most useful next step is treating this as a fresh, patient full pass (ideally re-deriving the r8-accumulator idiom and the sentinel-gated save/restore precisely) rather than incremental respelling from this draft."]},"main:0807a7a0":{"schema_version":1,"namespace":"main","address":"0x0807a7a0","status":"proven-retained","classification":"inventory_snapshot_compiler_entry_exit_scheduling_module","owner_bytes":136,"score":{"measured":"2026-08-31","candidate_bytes":136,"reference_bytes":136,"differing_halfwords":55,"wrong_instructions":14,"class":"structural-topology","command":"compiler candidate-show games/gs1/recon/en/main/0807a7a0.c --owner 0x0807a7a0 --size 136 --align","note":"The drafting-wave m2c source advanced both u16 pointers by two elements per copy. Restoring ordinary post-increment copies, the shared snapshot/party layouts, and the input parameter reused as the sentinel carrier recovers the complete algorithm and exact owner size. Initializing the owner induction value before the guard selects the reference's source=r5/owner=r6 allocation and reduces wrong instructions from 76 to 14."},"remaining":[{"op":"recover sentinel and induction scheduling","count":14,"where":"The reference loads the sentinel, moves it to ip, advances source, compares through ip, and only then materializes owner=0. The closest candidate schedules the literal and owner zero before the load and compares r3 directly. The loop body is otherwise instruction-for-instruction equal; the tail differs only in ordering the final active-owner-pair store and snapshot-sentinel clear."}],"rejected_experiments":[{"experiment":"Initialize owner only inside the sentinel branch, including do/while, for-loop, and comma-condition spellings.","result":"Preserved equal topology but swapped source and owner between r6/r5, regressing to 48 wrong instructions."},{"experiment":"Run the annotation-free allocator permuter for the decoded floor.","result":"The decoder reported no unique source repair for the remaining sentinel carrier and refused to open an unbounded search."},{"experiment":"Probe canonical scheduling/CSE/regmove/loop/peephole/force-address flags and the alternate compiler routes.","result":"No route closed the owner. -fno-schedule-insns2 reached 45 differing halfwords but kept the same 14 wrong instructions with worse scheduling elsewhere; canonical flags remain the honest route."},{"experiment":"Use the companion translation unit's raw Data_02000240 byte-array declaration instead of the established mode struct.","result":"GCC folded the four party offsets into independent absolute addresses, shrinking to 120 bytes and regressing to 46 wrong instructions."}],"notes":["Recovered from games/gs1/asm/0807a7a0.s, the approved local ROM, the drafting-wave candidate, the adjacent inventory snapshot builder at 0807a664, and established Owner/Psynergy/game-flag interfaces.","The function restores 15 inventory halfwords for each of four owners, refreshes derived owner state, restores two Psynergy shortcuts and two packed active-owner pairs, clears the snapshot sentinel, and clears game flag 0x952.","2026-08-31 retained-assembly proof: cross-edition verification proves all 106 relocation-normalized core bytes identical across six editions. The complete candidate has the exact 136-byte audited extent and exact pool, and accounts for the sentinel guard, four-owner 15-halfword restore loops, both derived-state refreshes, four global halfword restores, sentinel clear and game-flag clear. The restore body is instruction-exact. Only the sentinel/owner-zero entry schedule and ordering of the final active-owner-pair store versus sentinel clear differ. The decoder finds no unique repair; guarded do-while, for, comma-condition, translation-unit declaration, side-effect-order, scheduling, CSE, regmove, loop, peephole, force-address and alternate compiler routes preserve the 55/14 floor or regress. Structured assembly therefore remains authoritative under inventory_snapshot_compiler_entry_exit_scheduling_module; the candidate does not claim exact C."]},"main:0808b158":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0808b158","status":"proven-retained","classification":"battle_resource_lookup_compiler_allocation_module","owner_bytes":128,"score":{"measured":"2026-08-31","candidate_bytes":128,"reference_bytes":128,"differing_halfwords":21,"wrong_instructions":18,"class":"structural-topology","note":"The best ordinary-C draft has exact owner extent and models the complete table search. A bounded closure pass confirmed the 21-halfword residual is coupled: the reference creates the null return carrier before the helper call in r8 and assigns effect_id/condition/resource_group to r7/r6/ip, while the best legitimate source assigns those roles to r6/r8/r7 and keeps the null carrier in lr. Moving the null initialization before the call worsens the result to 132 bytes and 63 differing halfwords by introducing r10; introducing an explicit signed entry-id carrier worsens it to 116 bytes and 61 differing halfwords by selecting ldrsh; unsigned and 32-bit carrier variants score 128/51 and 124/54. The decoder reports no unique source-shape repair plus one guard inversion; spelling that inversion explicitly recompiles byte-identically. Six-edition verification proves the 118-byte relocation-normalized core identical. Structured assembly therefore remains authoritative under battle_resource_lookup_compiler_allocation_module; the candidate does not claim exact C."},"behavior":["calls Func_0808a8d0(effect_id) once to obtain the alternate resource-group key","walks the 8-byte entries at 0x0809ddd8 until the signed id field is -1","uses entry bit 15 to choose whether the id must match effect_id or the derived resource group","treats the signed 15-bit condition value -1 as a wildcard and otherwise requires it to equal the second argument","returns the first matching entry's pointer, or null when the terminator is reached"],"notes":["The adjacent measured 0808b090 dossier identifies this owner as its parameterized twin and the exact in-repository Func_0808b1d8 as the simpler terminated-table family member. Those sources corroborate the entry stepping, -1 terminator, first-match behavior, source-selector flag, signed 15-bit condition, and wildcard semantics independently of this draft.","One targeted correction was permitted after the initial score: the selector branch was rewritten with an explicit shared match label to follow candidate-show's guard-inversion advice. GCC emitted byte-identical output (128 bytes, 21 differing halfwords, 18 wrong instructions), so the rewrite was reverted and the clearer structured form retained. Do not retry that spelling without new compiler evidence.","The bounded closure pass also tested the decoder-implicated declaration/lifetime forms rather than an open-ended spelling search: null-result initialization before Func_0808a8d0 (including separate declaration/assignment and register storage-class forms), local aliases introduced condition-before-effect, an old-style declaration list ordered condition-before-effect, an integer result carrier, and explicit signed, unsigned, and 32-bit entry-id carriers. None improved on 128 bytes / 21 differing halfwords; the pre-call result forms expanded the saved-register set and the explicit entry-id forms changed the correct ldrh-plus-sign-extension idiom. The source therefore remains the best legitimate condition-table reconstruction, with no compiler-route, register, or scheduler forcing.","Recovered only from games/gs1/asm/0808b158.s, adjacent in-repository family sources and dossiers, and the approved compiler's candidate-show output. No external decompilation source, raw instruction-byte copying, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:0808b674":{"schema_version":1,"namespace":"main","address":"0x0808b674","status":"compiler-unemittable","map":{"head":"0x0808b674","head_symbol":"FunctionHead_0808b674","head_file":"games/gs1/asm/0808b674.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r10; mov r6,r8; push {r6,r7} -- two-high-register save (r8, r10 only), no `sub sp` (no local frame beyond the pushed registers).","true_epilogue":{"file":"games/gs1/asm/0808b7b8.s","note":"Ends `... pop {r3,r5} / mov r8,r3 / mov r10,r5 / pop {r5,r6,r7} / pop {r0} / bx r0`. Exact mirror of the head's two-high-register (r8,r10) save shape with no matching `add sp` (consistent with the head's no-`sub sp` prologue -- this function uses no stack-frame locals beyond its saved registers). This is the sole real epilogue, completing the map that this dossier's original 2026-08-29 session left partial (it had registered the split-function shape and the fall-through into Fragment_0808b7b8 as a hypothesis but had not yet confirmed the epilogue mirror or computed the whole-function span)."},"span":{"start":"0x0808b674","end_exclusive":"0x0808b868","size_bytes":500,"derivation":"end = start of next asm file games/gs1/asm/0808b868.s, immediately following 0808b7b8.s which owns the epilogue. size = 0x0808b868 - 0x0808b674 = 0x1f4 = 500."},"member_regions_in_order":[{"addr":"0x0808b674","symbol":"FunctionHead_0808b674","file":"games/gs1/asm/0808b674.s","role":"real prologue + object-table slot setup body, tail branches `b sub_0808b7c4` -- NOTE: this tail branch target (0808b7c4) is an internal label inside 0808b7b8.s, not a separate owner; it is not main:0808b7c4 as a registered file boundary"},{"addr":"0x0808b7b8","symbol":"Fragment_0808b7b8","file":"games/gs1/asm/0808b7b8.s","role":"shared terminal fragment (header: '\u89aa\u95a2\u6570\u306e\u5171\u6709\u7d42\u7aef\u65ad\u7247'), reached by the head's tail branch at its internal .L_0808b7c4-equivalent entry point, ending in the real, shared epilogue"}],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/0808b674.c --owner 0808b674 --size 500"},"owner_bytes":324,"candidate_bytes":36,"differing_halfwords":162,"wrong_instructions":151,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Best-effort reading only (never adopted, see status): an object-table slot initializer. Reads the pointer stored at Data_03001ebc (a base pointer, per the sibling object/table/*.c family), takes state = base + 0x200 as an object slot, zero-fills state's leading 16 bytes (offsets 0/4/8/12, descending store loop matching the object/table/find_last_active_id.c convention of decrementing counters/pointers), copies two 24-byte template blocks from a literal-pool-addressed source into state+0x0 and state+0x218, calls ObjectTable_ClearBattleSlots (main:0808b9f8, already adopted as object/table/clear_battle_slots.c), stores two 16-bit fields into the new slot, looks up several values from an array at literal-pool address 0x02000240 indexed by small even offsets (476/484/488/492 => ids 238/242/244/246 doubled), stores them into the slot, calls sub_0808b3ec twice (once with the slot pointer, once with r10=arg0 and constant 8), reads a per-id table entry via the slot's field_10 to compute a byte flag, does a signed-shift coordinate computation (asrs #20 on two fields at slot+8/slot+16, matching a Q20 fixed-point convention seen elsewhere in this codebase) to index a 2D grid at a literal-pool base, gates on a byte-flag pair (== 253) and a global flag word before calling sub_080091a8 with a coordinate offset, updates slot fields 12/20 from its result, writes a byte constant into slot+85, calls sub_080091e0 and sub_08009080(slot, 12), then falls through into a tail branch `b sub_0808b7c4` into a *different* owner's already-emitted region.","evidence":["games/gs1/asm/0808b674.s carries the authored comment '\u8907\u6570\u9818\u57df\u306b\u5206\u5272\u3055\u308c\u305f\u547c\u51fa\u3057\u53ef\u80fd\u95a2\u6570\u306e\u5148\u982d\u90e8\u3002\u5f8c\u7d9a\u3059\u308b\u30ea\u30c6\u30e9\u30eb\u30d7\u30fc\u30eb\u3092\u540c\u4e00\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u6301\u3059\u308b\u3002' (head portion of a callable function split across multiple regions; the following literal pool is kept in the same file) -- this is the project's own structural classification of the retained assembly, not an inference from this session.","The retained assembly's prologue pushes {r5, r6, r7, lr} and shuffles r8/r10 into r6/r7 to push them too (push{r6,r7}), but the function has no matching pop anywhere in its 324 owned bytes: it falls through its body and its final instruction is a plain unconditional `b sub_0808b7c4` (main:0808b7c4, an already-registered separate owner, 'Fragment_0808b7b8's neighbour) rather than a `bl`/`bx lr`. This is the classic GCC-emitted 'function head' shape for a routine whose tail was placed in a later, separately-addressed region by the linker/overlay layout -- an artifact of how this ROM's build process split large functions across sections, not of any C control-flow construct this compiler route can produce from a single translation unit.","candidate-show (out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/0808b674.c --owner 0808b674 --align --first) reports topology=uncovered:reference-multiple-owner-entries and class=compiler-unemittable for every body tried, with an identical differing_halfwords=162 against the 324-byte reference regardless of candidate content or size (2, 8, 36, and 76-byte candidates of varying shape and semantics all produced dh=162; only wrong_instructions moved slightly, 151/154/151/182, tracking incidental prologue-size differences in the small comparison window the tool is willing to score before giving up). This reproducibility across structurally unrelated bodies is the classification proof: the harness itself cannot align this owner's reference bytes to any single-function candidate because the true 324-byte reference span (0808b674 code + its retained literal pool at 0808b790, ending exactly at 0808b7b8) abuts a second, independently registered owner boundary (main:0808b7b8, 'Fragment_0808b7b8') that this owner's tail branch flows into -- a genuine multi-region function, which this project's per-owner C candidate model cannot represent.","The tool's own next-step guidance on this run is explicit: 'next=record a classification proof; do not search spellings for a shape the compiler cannot emit' / 'triage=compiler-unemittable playbook=classification-proof' -- confirming this is the documented terminal state for this shape, not an intermediate score to keep optimizing.","The neighboring object/table/*.c family (games/gs1/src/object/table/{get,get_slot_address,destroy_at_index,find_last_active_id,clear_battle_slots}.c) establishes 'extern u8 *Data_03001ebc' as the shared object-table base pointer and 'descending index/pointer store loop with >= sentinel' as this codebase's idiom for zero-fill loops, both used in the best-effort algorithm reading above; ObjectTable_ClearBattleSlots (main:0808b9f8) is confirmed as the callee at the `bl sub_0808b9f8` site by games/gs1/source-paths.json's existing 'object/table/clear_battle_slots.c' registration.","bun tools/allocator-lens/lens.ts 0808b674 was run for allocation residual context: it reports only 9 pseudos and a small 42/36/40 global order for the stub-sized candidate actually compiled (the topology block prevents any larger candidate from being meaningfully scored against the true reference), confirming the remaining work here is topological/structural, not a register-allocation residual."],"credible_shapes_tried":["Empty stub `void Func_0808b674(u32 arg0) {}` (candidate=2 bytes): dh=162, wrong_instructions=151, topology=uncovered:reference-multiple-owner-entries. Baseline.","Same stub plus a second empty `void Func_0808b7b8(void) {}` in the same file, hypothesizing the tool wants both halves of the multi-owner span declared together: candidate-show ignored the second function entirely (identical output to the single-stub baseline) -- refuted; the tool only ever scores the named --owner target function, so co-declaring the neighbor owner does not change the topology classification.","`void Func_0808b674(void) {}` with no arguments (candidate=2 bytes): identical dh=162/wrong_instructions=151 to the u32-argument stub -- refuted the hypothesis that the arg0/r0-using prologue shape (mov r10,r0) was the source of the topology mismatch.","`s32 Func_0808b674(u32 a, u32 b, u32 c, u32 d) { return a+b+c+d; }` (candidate=8 bytes, forces a 4-argument prologue): dh=162 (unchanged), wrong_instructions=154 -- refuted the hypothesis that matching argument count/calling convention shape would affect the topology block.","`volatile` 7-local arithmetic filler forcing heavier register pressure (candidate=76 bytes, closest in size to plausible real bodies): dh=162 (unchanged), wrong_instructions=182 -- confirms wrong_instructions tracks incidental candidate/reference-window overlap size while dh stays pinned at 162 regardless, i.e. the comparison never actually reaches an aligned score for the real function body.","Full best-effort semantic reconstruction (struct-based object-table slot zero-fill + ObjectTable_ClearBattleSlots call, the version now committed in this .c file, candidate=36 bytes): dh=162 (unchanged), wrong_instructions=151 -- confirms even a plausible, on-topic reconstruction of the real algorithm's opening lines cannot move past the topology gate, because the gate fires before content comparison is meaningful (the reference span crosses into a second owner's bytes that this file cannot also own)."],"compiler_backend_evidence":"Not applicable at this stage: the run never reaches instruction-selection/allocation comparison for the true reference window. topology=uncovered:reference-multiple-owner-entries fires first and is stable across every distinct candidate shape and size tried (2/8/36/76 candidate bytes, four unrelated bodies), which is the tool's mechanism for reporting that a --owner target's registered 324-byte reference extent cannot be matched one-to-one against a single compiled C function because it structurally overlaps a second, independently addressed owner boundary (main:0808b7b8) that this function's un-popped prologue and terminal `b sub_0808b7c4` tail branch flow into. This is consistent with the .s file's own authored comment identifying the owner as 'the head portion of a callable function split across multiple regions.'","remaining":"This owner is classified compiler-unemittable, not a stalled last-mile allocator/scheduling residual: no C source shape reconstructable by this session moved differing_halfwords off 162 or changed the topology=uncovered:reference-multiple-owner-entries / class=compiler-unemittable classification, because the defect is structural (a genuinely multi-region function whose registered reference bytes span two separately addressed owners) rather than an algorithm, type, or spelling defect. games/gs1/asm/0808b674.s remains the retained ground truth and should stay retained assembly; per CONTRIBUTING.md's 'genuinely structural assembly such as a veneer, alignment, or runtime primitive' carve-out, a split-region function head with no intra-owner pop is exactly this kind of case. No further spelling search is expected to change this outcome per the tool's own playbook guidance; future work on this owner should instead investigate whether the reconstruction harness can register a paired multi-region owner (linking main:0808b674 through main:0808b7b8 as one compiled unit) rather than continuing to vary candidate C source.","notes":["make verify was not run to completion/adoption: this owner is not DONE and dh != 0. This file and its .json record a measured, reproducible compiler-unemittable classification, not a finished reconstruction.","No inline assembly, fixed-register variable, compiler barrier, forced instruction scheduling, copied instruction bytes, or compiler modification was used anywhere in this session. games/gs1/asm/0808b674.s remains the retained ground truth and was not edited.","games/gs1/recon/translation-units.json and games/gs1/source-paths.json were read only, per task instructions; neither was edited.","Six materially distinct scored candidates were run through candidate-show (see credible_shapes_tried), each confirming the identical topology-level block; per the tool's own explicit guidance ('next=record a classification proof; do not search spellings for a shape the compiler cannot emit', 'triage=compiler-unemittable playbook=classification-proof') and per reconstruction-method.md's inversion guidance ('do not spend an open-ended search on a tiny residual' / large, structural mismatches 'challenge the overall source shape' rather than invite more spelling permutations), further mechanical spelling attempts were not pursued past this point -- the blocking condition is a fixed data-topology fact (a reference span crossing two registered owner boundaries) that no candidate C body can change.","measured=2026-08-29"]},"main:0808b868":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0808b868","status":"proven-retained","classification":"field_region_bounds_compiler_address_materialization_module","owner_bytes":128,"score":{"measured":"2026-08-31","candidate_bytes":128,"reference_bytes":128,"differing_halfwords":17,"wrong_instructions":10,"class":"missing-extra-code","note":"The complete ordinary-C reconstruction has exact extent and equal branch topology. A named coordinate-carrier correction reduced the residual from 23 differing halfwords / 14 wrong instructions to 17 / 10. The allocator decoder reports no unique source-shape repair, and a bounded sibling-guided search did not improve the result. The remaining difference is concentrated in when GCC materializes runtime+236/runtime+244 and their register roles; this draft claims zero DONE bytes."},"behavior":["reads the current runtime pointer from 0x03001e70 before calling Func_080770d0(356) and Func_080770c8(357)","walks 24-byte boundary records until the signed id field is -1","leaves records whose flag field is already nonzero unchanged","assigns flag 356 when x lies inclusively between runtime fields +236/+244 and z lies inclusively between +240/+248","assigns flag 357 when any of those four bounds checks fails"],"notes":["The address-adjacent exact BattleEffect_ClearOutOfBoundsObjects owner corroborates the same runtime family and the compiler-sensitive practice of loading coordinate carriers in their use order before a bounds chain.","The one permitted targeted correction introduced named x and z carriers before the four comparisons, matching the reference's early `entry+8` then `entry+16` loads. It preserved the 128-byte extent and equal topology while improving differing halfwords 23->17 and wrong instructions 14->10, so it was retained.","The allocator-order decoder identified conflicting pointer roles (pseudo 49 in r7 versus target r4, and pseudo 74 in r0 versus target r4) but returned `undecoded reason=no-unique-source-shape`; the annotation-free permuter therefore correctly refused to invent a repair.","A finite source-shape search tested the exact sibling's lifetime lesson as an explicit minimum-X carrier, both in the existing while loop and a guarded do-while spelling; both caused GCC to hoist three bounds pointers and regressed the residual. Raw byte-offset field access compiled identically to the retained typed aggregate. Direct global field access changed the frame and regressed substantially. An explicit outside-flag carrier compiled identically, while reversed comparison spelling changed branch directions. None improved on 17 differing halfwords / 10 wrong instructions, so all were reverted.","2026-08-31 retained-assembly proof: cross-edition verification proves all 114 relocation-normalized core bytes identical across six editions. The complete candidate has the exact 128-byte extent, equal topology and exact pool, and accounts for both flag calls, sentinel traversal, all four inclusive bounds tests, both assigned flags, and every field access. The residual is only GCC's equivalent early versus late materialization of runtime+0xec/runtime+0xf4 and their register roles. The decoder finds no unique repair; the recorded carrier, pointer, scalar, loop, global-access, comparison, sibling, scheduling, CSE, GCSE, regmove, strength-reduction, and optimization probes preserve the 17/10 floor or regress. Structured assembly therefore remains authoritative under field_region_bounds_compiler_address_materialization_module.","Recovered only from games/gs1/asm/0808b868.s, adjacent in-repository battle-runtime sources and dossiers, and the approved compiler's candidate-show output. No external decompilation source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used. The candidate does not claim exact C."]},"main:0808b8e8":{"schema_version":1,"namespace":"main","address":"0x0808b8e8","status":"exact","owner_bytes":164,"score":{"measured":"2026-08-30","candidate_bytes":164,"reference_bytes":164,"differing_halfwords":0,"wrong_instructions":0,"class":"exact","note":"The production source compiles to all 164 reference bytes with the shipped GCC 2.96 -fno-regmove route. Integration accepted the owner and retired its retained assembly."},"route_probe":{"measured":"2026-08-30","verdict":"exact adoption route","flags":"-fno-regmove","differing_halfwords":0,"wrong_instructions":0,"note":"RTL local-allocation evidence showed that the reference keeps the camera anchor live through construction of both X bounds before loading Z. Explicitly spelling that assignment order fixes the anchor/X allocation. Reusing the dead visual pointer for the final null store preserves the reference zero carrier. -fno-regmove then emits the complete reference schedule; canonical flags and other shipped toggles do not."},"notes":["The final source is ordinary C: it uses no inline assembly, fixed-register variable, compiler barrier, forbidden ABI attribute, copied instruction bytes, or compiler modification.","The lifetime repair was derived from GCC 2.96 RTL and allocator dumps rather than forced register assignment.","No other Golden Sun decompilation project, symbol map, or disassembly was consulted by this commit."]},"main:0808b98c":{"schema_version":1,"namespace":"main","address":"0x0808b98c","status":"measured-draft","owner_bytes":108,"retention":"c_candidate","domain":"Clear all battle-effect object slots and release the saved event object.","provenance":"Reconstructed from the retained owner assembly and the adjacent 0808b8e8 cleanup sibling; no external source was used.","score":{"measured":"2026-09-01","candidate_bytes":112,"reference_bytes":108,"differing_halfwords":50,"wrong_instructions":60,"branch_topology":"equal","class":"missing-extra-code"},"notes":["The retained assembly proves a complete 58-slot cleanup loop followed by three runtime-field clears and an optional event-object release.","A bounded source-shape pass tested named and implicit zero/mask carriers, declaration order, pointer-vs-integer zero, register hints, and the relevant optimization toggles. None reproduced the reference allocation; no fixed register or compiler barrier was used.","This candidate claims zero DONE bytes until a byte-exact build passes.","2026-09-01: 53 -> 50 differing halfwords. The loop-pass dump shows the constant 1 for the flag store is hoisted only because the loop body has exactly 15 real insns (threshold = 1 + n_non_fixed_regs = 15 with a call; the reference keeps movs r3, #1 inline). Writing the slot address as runtime + (i * 4 + 0x34) in a for loop raises the first pass to 17 and the second to 16 insns, which keeps the constant inline, but the giv then absorbs the runtime base into a pointer walk. Separating the offset (offset = i * 4 + 0x34; *(void **)(offset + work)) restores the reference's [r6, r5] addressing and, under -fno-rerun-loop-opt, scores 15 differing halfwords; on the canonical two-pass route the second pass drops to 15 insns and hoists the constant again. The reference therefore has one more loop insn than any spelling tried, or a different hoisting input; the mask/zero register roles (r8/sl) follow that decision."],"span_bytes":108},"main:0808ce74":{"family":"template-main-0808bd24","template_owner":"main:0808bd24","template_source":"games/gs1/src/map/get_focused_object_collision.c","candidate_path":"games/gs1/recon/en/main/0808ce74.c","reference_bytes":260,"best_candidate_bytes":252,"best_differing_halfwords":125,"best_wrong_instructions":123,"status":"measured-draft","notes":["The template (GetFocusedObjectCollision) IS the right shape for the front half of this owner: same Data_02000240.object_id-indexed lookup into the runtime table, same RotateVectorByMagnitude(0x100000, kind, &position) call, same mode==3 (32x32 fine-grid, >>21 shift) vs default (map-layer, >>20 shift, map+0x130 base) tile-address branch, confirmed field-for-field against games/gs1/asm/0808ce74.s. This owner is a genuine superset, though: after reading tile[2] into a byte value, it does NOT just return it. If the tile value is NOT in [242,247] (`(u32)(value-242) > 5`, unsigned range check), it consults Func_0808d48c(value, 3) and returns 0 unless that call is nonzero. If the tile VALUE IS in [242,247], it instead calls Func_080091a8(object+34 byte, position.x, position.y) and only returns the tile value if that result falls within [object->word12, object->word12 + 0x400000]; otherwise returns 0.","One direct-translation pass was written (adapting the template's struct-offset style with M2C_FIELD-equivalent raw casts rather than pulling in the template's named struct, for speed) and measured: candidate 252B vs reference 260B, wrong_instructions=123 out of roughly 126 total -- i.e. almost the whole instruction stream disagrees, meaning the register-level match is essentially not started despite the semantic/control-flow shape being read correctly from the assembly. Not iterated further given the batch's effort budget.","Likely sources of the gap that a follow-up pass should target first: (1) the reference computes the `Data_02000240 + 0x1f4` object_id offset as an explicit `250; lsls #1` (500 = 0x1f4) sequence kept in a register across two later uses (both the object_id value AND, unmodified, as the base of the +0x1f4 field for a LATER separate read at that same computed offset for a DIFFERENT purpose that I did not fully trace), whereas the candidate inlines the whole `*(u32*)(...) * 4 + 0x14` as one expression -- given how much the reference visibly reuses this address, splitting it into an explicit named pointer local (matching the discipline the codebase repeatedly rewards, per this batch's other dossiers) is the most promising specific fix; (2) the object_id field itself might not be a plain `u32` at offset 0x1f4 the way the template's `Global_0808bd24.object_id` implies -- worth re-checking against that struct definition rather than re-deriving it from scratch; (3) the exact struct-field types for the position/object fields (s32 vs u32, signed comparisons for the >>21/>>20 shifts) were carried over from the template but not independently re-verified bit-for-bit against this owner's own assembly beyond the parts explicitly traced above.","Given the size of the remaining gap, this is best treated as needing a fresh, more careful register-level pass (informed by the template's already-confirmed-exact codegen for the shared front half) rather than a permuter search."]},"main:0808d394":{"schema_version":1,"namespace":"main","address":"0x0808d394","status":"measured-draft","owner_bytes":148,"executable_owner_bytes":148,"candidate_bytes":128,"differing_halfwords":65,"wrong_instructions":88,"cross_edition":{"relocation_normalized_core_bytes":144,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08084394","en":"0x0808d394","de":"0x0809099c","es":"0x0809239c","fr":"0x0809239c","it":"0x0808d39c"}},"domain":"Searches the four runtime action-descriptor tables by direct identifier or by the ordinal assigned to identifiers above seven.","bounded_search":{"mode":"source-shape","attempted":3,"exact":false,"reason":"Rewrote both 'while (entry->id != -1) { ...; entry++; }' loops as guarded do-while ('if (entry->id != -1) { do { ...; entry++; } while (entry->id != -1); }') to force GCC's loop-rotation shape; also tried the gcc296 and old-agbcc compiler families on the resulting candidate. The rotation shape moved differing_halfwords from 70 to 65 (wrong_instructions 86 to 88, essentially a wash) but did not close the 20-byte/10-instruction size gap under any family: candidate stays 128 bytes against a 148-byte reference under routed and gcc296, and old-agbcc emits a still-shorter, unemittable-class 120-byte object."},"notes":["All 144 normalized core bytes are identical across the six approved GS1 editions.","The table count, 24-byte record stride, -1 terminator, and high-ID ordinal behavior come directly from the complete owner assembly. Zero DONE bytes are claimed.","Reference assembly shows each loop reads entry->id TWICE per new entry advanced to: once via ldrsh (sign-extended in one instruction) purely for the '!= -1' continuation test, and once via a separate ldrh+lsls+asrs sequence cached into a register for the NEXT iteration's value compare. The do-while respelling above matches reference's rotated control flow (guard, then post-tested body) but the compiler still CSEs the two reads of the same halfword into one instead of reproducing that double-read; this reads as a scheduler/CSE compiler-internals residual rather than a further source-shape gap, since the rotated C is already the natural idiom for the observed branch structure. Worth a permuter-style search over the loop body rather than further manual respelling."]},"main:0808df1c":{"schema_version":1,"namespace":"main","address":"0x0808df1c","status":"measured-draft","owner_bytes":348,"executable_owner_bytes":348,"candidate_bytes":344,"differing_halfwords":107,"wrong_instructions":82,"structural_score":{"match_percent":94.885544,"instructions":167,"unchanged":132,"argument_mismatches":26,"opcode_mismatches":0,"replacements":5,"deletions":3,"insertions":1},"family":{"exact_c_dispatcher":"main:08096810","exact_c_dispatcher_bytes":336,"aggregate_reusable_bytes":684},"cross_edition":{"core_bytes":316,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08084f1c","en":"0x0808df1c","de":"0x08091524","es":"0x08092f24","fr":"0x08092f24","it":"0x0808df24"}},"notes":["Complete typed nearby-target selector used by the exact-C battle-effect dispatcher for battle mode 9. It scans object IDs 0 through 66, rejects hidden or vertically distant objects, measures wrapped fixed-point X/Z distance, applies the flagged-object distance adjustment, and retains the closest object within the mode-dependent facing cone.","The readable model compiles to 344 bytes against the exact 348-byte owner. Relocation-aware structural comparison is 94.89 percent with no opcode mismatches; the remaining register-allocation and four-byte scheduling deficit is broad enough that this draft claims zero bytes.","Independent all-six matching proves a unique 316-byte normalized core in JA, EN, DE, ES, FR, and IT. Six call relocations and two literal fields account for the excluded fields; every edition has zero core differences.","Together with the exact 336-byte RunBattleEffect dispatcher, the recovered producer/consumer family covers 684 executable bytes and establishes reusable object layout, filtering, fixed-point distance, and angle-cone semantics.","Recovered only from retained GS1 assembly, local exact-C dispatcher and fixed-point motion analogues, the approved compiler, and the six local GS1 editions. No GS2 or external source was used."]},"main:0808e14c":{"schema_version":1,"namespace":"main","address":"0x0808e14c","status":"measured-draft","owner_bytes":240,"score":{"measured":"2026-08-31","candidate_bytes":240,"reference_bytes":240,"differing_halfwords":85,"wrong_instructions":86,"class":"missing-extra-code","note":"A direct retained-assembly audit corrected the shared facing-word carrier from u16 to s16, matching the reference's sign extension after the 0x800 mask. The exact-size, equal-topology candidate improves from 89 differing halfwords / 100 wrong instructions to 85 / 86. Narrowing dirCheckEnabled to s16 is byte-neutral and documents the same width; splitting the 0xf000 mask into a later compound assignment regresses to 93/88 and was reverted. The remaining pool placement and allocation residual is not yet bounded, so retained assembly stays authoritative and this draft claims zero DONE bytes."},"notes":["2026-08-31: read games/gs1/asm/0808e14c.s directly and confirmed the reference loads trigger->facing both signed and unsigned: its direction-mask carrier uses signed halfword semantics while matchId uses the unsigned low byte. The source now expresses those two views explicitly.","Source recovered by a prior agent in this session whose full working notes were lost to an interrupted session; only the .c file survived in its worktree.","No other Golden Sun decompilation project, symbol map, or disassembly was consulted by this commit."]},"main:0808e23c":{"schema_version":1,"namespace":"main","address":"0x0808e23c","status":"measured-draft","owner_bytes":632,"executable_owner_bytes":632,"candidate_bytes":644,"differing_halfwords":222,"wrong_instructions":172,"domain":"Battle-command item dispatcher: decodes a packed (item_id | actor<<10) argument, resolves which party member actually uses the item (actor==15 means auto-pick the member whose 15-slot ability list best matches the item), looks up a shared kind==4 battle-effect event for the item, and either runs that event's effect (inline or via a callback) or falls back to the ordinary use-item animation/consumption path shared with the actionId==0x95 special-confirm block in the exact-adjacent BattleCommand_ExecuteSelectedAction.","expressed":["decodes item_id = arg & 0x3ff, actor = (arg>>10) & 0xf from the packed argument, matching main:0808e680's identical decode for an ability id","unconditionally primes Func_08077148(actor) before branching on actor==15, discarding its count result on the non-auto-select path -- matches the same priming idiom in games/gs1/src/battle/party/*.c","actor==15: scans Data_02000240's target-id table (BattleWork, battle_effect_runtime.h) up to Func_08077148's count, and for each candidate counts how many of its 15 object+0xd8 ability slots (masked 0x1ff, same mask as shop/select_use_item.c's Ability_GetAvailability scan) equal item_id, keeping the best-matching actor","actor!=15: counts matches for that one actor directly into the same accumulator","no match anywhere -> UiText_DrawMessage(0x927,1); return -1","Func_0808e14c(item_id) walks the same runtime->events[] table as BattleEffect_FindMatchingEvent (main:0808e4b4, kind==5/ability), but filters kind==4 (item); a hit whose 12-byte record's trailing effect word is nonzero either runs it as a small effect id (Func_0808ddec/BattleRuntime_Reset/Func_08092b94/Func_08092f84/Func_08091750) when < 0x10000, or calls it as a function pointer via the __call_via_r3 veneer with (item_id, actor, slot) otherwise","no event hit: reproduces main:0808e680's actionId==0x95(=149) confirm-prompt block instruction-for-instruction (same Data_02000240+0x400/0x402 <- +0x480/0x482 u16 copy, same Data_03001ebc+0x170=999 sentinel, same Func_08091d84(1) prompt), then always plays the use-item message/animation (Func_08096fb0, a Data_03001ebc+0xcc6 busy-flag toggle around Func_08096810 matching BattleCommand_ExecuteSelectedAction's identical resolving_action toggle around the same RunBattleEffect call), and sets a consumed-item flag when the item's use_type bit 0 is set","tail: conditionally shows message 0x927 again and, when a separate flag is set, calls Func_08077058(actor, slot) -- the same (owner_id, slot) item-removal call item/use.c makes when item->kind==1"],"bounded_search":{"mode":"source-shape","attempted":6,"exact":false,"reason":"Iteratively fixed from an initial hand draft: (1) reordered the two 15-slot ability scans to increment the walking u16 pointer before the match check; (2) moved matches=0 after Runtime_GetObject, restoring the eight-byte frame; (3) made the record's effect signed so the threshold uses bge; (4) cached Data_03001ebc's dereferenced pointer across the action block; and (5) restored the auto-selection entry as `actor = 0; i = 0; if (actor < count)` rather than the superficially equivalent `if (count > 0)`. The decoder's mirrored-guard finding is now closed: candidate and reference have equal conditional-branch topology, and wrong instructions fall from 174 to 172.","not_attempted":"Full byte-exactness was not reached and further micro-ordering of the initial packed-argument decode (item_id/actor) was not chased past the point of diminishing returns for this session; see remaining."},"remaining":"222 differing halfwords / 172 wrong instructions, candidate 644 bytes vs reference 632, with equal conditional-branch topology. GCC currently rotates the scan carriers as best=r6, count=r7, index=r8 where the reference uses best=r7, count=r8, index=r6; this changes the packed-argument and both 15-slot scan register streams without changing their values. The candidate also emits three literal pools while the reference keeps the same constant set in one terminal pool, accounting for the larger candidate despite six fewer executable instructions. Function-scope versus narrow scan scope, declaration order, initializer versus assignment, split actor masking, actor/index zeroing order, routed/gcc296/old-agbcc families, and the approved scheduling/CSE/regmove axes preserve this cycle or regress. No fixed-register variable, artificial padding, barrier, inline assembly, or owner-only compiler route was introduced.","notes":["The family-matcher's best guess for this owner, games/gs1/src/shop/select_use_item.c (score 7481/10000, below the 7500 transplant threshold), is not this owner's kin: it is a different menu-loop function (item-selection UI) that shares only the object+216 15-slot/0x1ff-mask ability-availability idiom and the object+216 selector*2 addressing pattern with this owner's ability scan. This owner's actual family is the exact-adjacent battle-command cluster at main:0808e4b4/main:0808e680, confirmed by an identical packed-argument decode, an identical actionId==0x95/action_id==149 confirm-prompt sequence (same globals, same sentinel 999, same Func_08091d84(1) call), an identical Data_03001ebc+resolving-flag toggle around RunBattleEffect (Func_08096810, battle/effects/run_effect.c), and an identical Func_08096fb0(action_id,0)/Func_08077058(actor,slot) call shape shared with item/use.c's Item_Use.","Runtime_GetObject (Func_08077008), Item_GetData/Item_Get (Func_08077018), GameFlag_Clear/Set/IsSet (Func_080770d0/c8/c0), UiText_DrawQuantity/DrawMessage (Func_08015120/08015040), UiWork_FinalizePending (Func_08015140), BattleRuntime_Reset (Func_080916b0), and BattleEffect_CleanupSceneObjects (Func_08097194) are already-named symbols reused as-is (types.h / source-paths.json); Func_08092b94, Func_08092f84, and Func_08091750's single-argument (or no-argument) signatures were taken directly from their already-adopted sources (script_owner_9.c, run_action_and_wait.c, battle_owner_53.c), not guessed.","Func_0808ddec, Func_08077148, Func_0808e14c, and the __call_via_r3 target held in event->effect have no evidence-backed names yet and are kept as Func_ADDR.","Recovered only from retained owner assembly (games/gs1/asm/0808e23c.s and 0808e14c.s), the approved local GS1 ROM, already-adopted exact sources (games/gs1/src/battle/party/*.c, games/gs1/src/battle/presentation/run_action_and_wait.c, games/gs1/src/battle/effects/run_effect.c, games/gs1/src/item/use.c), the games/gs1/include shared headers, the two exact-adjacent measured-draft siblings' evidence trail (main:0808e4b4, main:0808e680), and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0808e4b4":{"schema_version":1,"namespace":"main","address":"0x0808e4b4","status":"measured-draft","owner_bytes":292,"executable_owner_bytes":292,"candidate_bytes":284,"differing_halfwords":136,"wrong_instructions":147,"cross_edition":{"object_bytes":292,"relocation_bytes":20,"literal_bytes":28,"relocation_normalized_core_bytes":244,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080854b4","en":"0x0808e4b4","de":"0x08091abc","es":"0x080934bc","fr":"0x080934bc","it":"0x0808e4bc"}},"domain":"Finds the first runtime event record matching an effect flag set, actor group, action validity, range window, and selected value mode.","expressed":["derives the reference, selected, and alternate values from the current effect context","walks the terminated array of 12-byte event records","filters command kind, action validity, optional cyclic range window, and actor group","supports the special flag mode that bypasses the ordinary masked-flag comparison","applies unconditional, selected-value, or alternate-value matching and returns the first accepted record"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is eight bytes short with 136 differing halfwords and 147 wrong instructions, outside exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 292 executable bytes and proves all 244 relocation-normalized core bytes identical across the six approved GS1 editions.","Typed recovery uses the canonical assembly's 0x02000240 context word; the workbench symbolizer's 0x02000434 rendering was rejected as misleading local evidence.","The residual spans the full predicate-chain control shape and register allocation rather than a localized compiler hunk. No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect callers 080983a0 and 08098cd8, and the approved compiler. No GS2 evidence or external source was used."]},"main:0808e680":{"schema_version":1,"namespace":"main","address":"0x0808e680","status":"measured-draft","owner_bytes":748,"executable_owner_bytes":746,"candidate_bytes":724,"differing_halfwords":308,"wrong_instructions":199,"structural_score":{"match_percent":84.517685,"instructions":325,"unchanged":196,"argument_mismatches":82,"opcode_mismatches":1,"replacements":7,"deletions":26,"insertions":14},"family":{"exact_effect_dispatcher":"main:08096810","exact_effect_dispatcher_bytes":336,"typed_target_selector":"main:0808df1c","typed_target_selector_bytes":348,"aggregate_reusable_bytes":1432},"cross_edition":{"core_bytes":498,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08085680","en":"0x0808e680","de":"0x08091c88","es":"0x08093688","fr":"0x08093688","it":"0x0808e688"}},"notes":["Complete typed high-level battle-command executor. It decodes the action and actor, handles special story and summon gates, checks and spends PP, derives three target classes, selects the nearby object, drives the primary and secondary effect phases, and clears the temporary resolution state.","The readable candidate compiles to 724 bytes against 746 executable reference bytes (748 including alignment). Its 84.52 percent structural score is a useful convergence baseline but the 199 wrong instructions are broad, so this record claims zero bytes.","Independent all-six matching proves one unique 498-byte relocation-normalized core at the JA, EN, DE, ES, FR, and IT anchors with zero core differences. Forty-nine call relocations and thirteen literal fields account for the regional raw differences.","This owner directly joins the exact 336-byte RunBattleEffect dispatcher and the complete typed 348-byte nearby-target selector, forming a reusable 1,432-byte command/selection/effect family before counting the downstream exact battle-action resolver.","Recovered only from retained GS1 assembly, exact local battle-action/effect helpers, the approved compiler, and all six local GS1 editions. No GS2 or external source was used."]},"main:0808ef70":{"schema_version":1,"namespace":"main","address":"0x0808ef70","status":"exact","owner_bytes":344,"executable_owner_bytes":344,"candidate_bytes":344,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"family":{"assigned_template_owner":"main:0808f1c0","assigned_template_source":"games/gs1/src/battle/effects/objects/start_effect_22.c","template_note":"families transplant reported score=8299/10000 (main:0808f1c0, Func_0808f1c0/BattleEffect start_effect_22). The template is real, useful compiler-shape evidence but is NOT this owner's algorithm: template looks up its resource via a real `bl` to ObjectTable_Get(Data_02000240[125]) (a fixed global index) and unconditionally flag-gates its EmitRandomParticleEffect callback assignment and two trailing Object_SetMode/Object_Destroy calls on `object`/`resource`; this owner instead (1) inlines the table lookup with its own `value` parameter as the index -- no `bl` to Func_0808ba1c/ObjectTable_Get appears anywhere in the retained assembly, (2) runs an extra 64-iteration pool-cleanup loop over the Data_03001e64-based EffectObject array (same 112-byte stride established in games/gs1/src/object/dispatch/find_free_object.c and find_active_by_value.c's Work_08092be0.objects[]) gated on the *(s16*)(Data_03001ebc_value+0xCB8) 'active' flag already named in games/gs1/src/battle/effects/run_effect.c and scene_transition/reset.c, (3) transforms the spawn coordinates through an extra RotateVectorByMagnitude (Func_0800447c) call using an extra u16 resource field at offset 6 the template's EffectResource_0808f1c0 does not have, (4) calls Object_SetCallback(object, Data_0809e6c0) and writes object fields +0x28/+0x48 immediately after spawning -- the exact idiom from games/gs1/src/effect_runtime/run_rising_object_sequence.c's flags&1 branch, not present in the template at all, (5) sets object->callback = EmitRandomParticleEffect unconditionally at the end instead of the template's flags&1-gated assignment, and (6) is NOT void: it returns the spawned object pointer or NULL (both `movs r0,#0` early-exit sites and the final `adds r0,r7,#0` before return are present in the retained assembly), unlike the template's void Func_0808f1c0. Reused from the template only the byte-exact value_26/value_27=0, flags_a&=-33, and flags_b mask/clear/or shape, which alignment.json marks as a genuinely shared instruction block and which now compiles byte-identical here too."},"register_gate_step4":{"date":"2026-08-28","closure_ordinal":5,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":11,"final_differing_halfwords":0,"repair_pattern":"paired-phase-carrier-merge","decoder_signal":"The reference uses r6 for the state base and then the loop counter, while r7 carries the resource pointer and then the transformed spawn-Z coordinate; the baseline represented all four phases as separate quantities and left the short resource quantity in r2.","source_edit":"Represent the two non-overlapping r6 phases as work and the two non-overlapping r7 phases as src_z, with ordinary integer/pointer conversions at the actual semantic boundaries.","compiler_effect":"The paired carriers preserve the relative allocation priority: state/count occupies r6, resource/spawn-Z occupies r7 from the lookup onward, and r2 remains available for the global-cell address before GCC moves it into sl at the reference position.","bounded_confirmation":{"baseline_differing_halfwords":11,"one_sided_resource_spawn_z_merge_differing_halfwords":16,"paired_phase_merge_differing_halfwords":0,"candidate_bytes":344,"reference_bytes":344,"independent_reproductions":2,"linked_byte_differences":0},"production":{"source":"games/gs1/src/battle/effects/random_particle/start_emitter.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 344/344 linked bytes"}},"rejected_experiments":["Four declaration-order permutations for object/state/offset/resource/pos/spawn_x/spawn_z (object-first, resource-first, pos-first, and the final chosen order): all four produced byte-identical candidate output (same 11 differing halfwords, same r2-vs-r7 role). Consistent with games/gs1/recon/en/dossiers.json#main:080a8c2c's traced finding that GCC 2.96's local-alloc.c qty_compare tie-break is governed by RTL discovery order within a basic block, not C declaration/statement order.","Removing the `u32 offset = (value*4)+0x14;` intermediate (inlining the expression directly into the pointer cast): regressed candidate_bytes from 344 to 348 and differing_halfwords from 11 to 14 -- the intermediate variable is required to reproduce the reference's exact `lsls r0,r0,#2 / ldr r6,[r2,#0] / adds r0,#20 / ldr r7,[r6,r0]` instruction selection (get.c's own `offset = (arg0*4)+0x14; return *(void**)(base+offset);` shape). Kept.","Rewriting the table lookup as array indexing (`struct EffectResource_0808ef70 **table = (...)(state+0x14); resource = table[value];`) instead of pointer-plus-offset: regressed sharply to candidate=348/dh=168 -- the compiler chose a completely different (worse) address-computation shape. Reverted.","Introducing a `u8 **globalSlot = (u8**)&Data_03001ebc;` intermediate for the shared address (matching scene_transition/reset.c's own `globalSlot` idiom) vs referencing `&Data_03001ebc` directly at both use sites: byte-identical either way (CSE recognizes the reuse regardless of source spelling). Kept the simpler direct-reference form.","Routing the table-lookup result through an untyped `void *lookup` local before assigning to the typed `resource` pointer, to see if a generic-pointer pseudo changed RTL discovery order ahead of the typed one: no effect (identical 11-diff output). Reverted to the direct typed assignment.","Spelling the halfword merge's keep-mask as `~0x3FF` instead of `0xFFFFFC00`, and as a separately-declared `u32 keep_mask` local, and via an intermediate `u32 existing` read-then-write, and via a `s32 packed` intermediate for the Func_08003fa4 term: all either no-op'd or regressed (up to candidate=364/dh=122) versus the plain inline expression. None reproduced the reference's pool-loaded 0xFFFFFC00 constant -- GCC's optimizer recognized the AND was redundant on a zero-extended 16-bit load and narrowed it to the 8-bit-rotated immediate 0xFC00 (movs+lsls) regardless of spelling, matching this session's other documented finding that same-valued-constant folding is value-driven, not text-driven.","Swapping the OR operand order in the halfword merge (mask-term first vs call-term first): the call-term-first ordering matched the reference's `ands r0,r3` (0x3FF load) placement and dropped differing_halfwords from 45 to 43 before the bitfield fix below; kept.","A static inline lookup helper, splitting resource declaration from assignment, and introducing a post-guard typed alias were all optimized back to the 11-halfword baseline. Copying the position as an aggregate regressed to 133 differing halfwords.","Merging only resource with spawn_z, including a short typed-copy boundary intended to encourage coalescing, produced 16 differing halfwords: the longer merged quantity took r6 and displaced state into r7. That negative result exposed the missing paired lifetime rather than supporting a one-sided carrier repair."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/0808ef70.s), the family-transplant workspace's m2c output run against the target's own object (out/family-transplants/main-0808ef70/m2c/0808ef70.c and target.canonical.s), the byte-exact template games/gs1/src/battle/effects/objects/start_effect_22.c, the already-adopted sibling sources games/gs1/src/object/table/get.c, games/gs1/src/object/table/find_active_by_value.c, games/gs1/src/battle/effects/run_effect.c, games/gs1/src/battle/effects/scene_transition/reset.c, games/gs1/src/battle/effects/interpolate/prepare.c, games/gs1/src/effect_runtime/is_active.c, games/gs1/src/effect_runtime/run_rising_object_sequence.c, games/gs1/src/battle/effects/random_particle/emit.c and spawn_at_position.c, the lower-confidence in-repo candidate games/gs1/src/object/dispatch/find_free_object.c (for the Data_03001e64/112-byte-stride array naming precedent), games/gs1/include/types.h and global_cells.h, and the approved compiler. No GS2 evidence, external source, another decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","The single biggest structural discovery this pass: the u16 field at visual+8 (which straddles the template's `unknown_06[3]`/`flags_b` boundary) is written back with `field = (field & 0xFFFFFC00) | (Func_08003fa4(...) & 0x3FF)` in the reference, but writing that literally as manual masking let GCC's optimizer narrow the redundant upper bits of the AND-mask down to the smaller immediate 0xFC00 (movs+lsls instead of a pool load), which the reference never does. Declaring the field as a genuine C89 10-bit bitfield instead (`struct PackedField08_0808ef70 { u16 value : 10; };`, assigned directly with no manual mask) let GCC's own bitfield read-modify-write codegen materialize the full 32-bit complement mask exactly as the reference's literal pool does, and dropped differing_halfwords from 43 to 11 in one change -- this is genuine source-shape recovery, not forcing: bitfields are ordinary C, and the container width (u16) matches the reference's confirmed `ldrh`/`strh` access width.","A second structural discovery: this owner's `if (object != 0) { ... }` wrapping had to become two independent early returns (`if (resource == 0) return 0;` ... `if (object == 0) return 0;`) rather than nested ifs to reproduce the reference's two separate `movs r0,#0` default-return-value materializations and the `adds r0,r7,#0` reload immediately before the first Object_SetCallback call -- a single `object = 0;`-initialized-then-conditionally-overwritten variable let the compiler keep r0 alive across the whole function and never needed to reload it, which is legitimately correct code but not what the reference did. This also required scoping `visual`/`handle`/`mask`/`zero` into a nested block declared with `visual`'s declaration doubling as its initializer (`struct EffectVisual_0808ef70 *visual = object->visual;`) placed AFTER the Object_SetCallback call rather than at the top of a larger block -- putting all four locals together at the top of one big block raised register pressure enough to spill a 4th high register (fp) into the prologue (candidate grew to 354/364 bytes with an extra push{r7}/pop{r7} pair), which the reference's 3-high-register prologue never has.","Confirmed by direct assembly reading (not assumed) that the value-parameter is used directly as the object-table index with no `bl` to Func_0808ba1c/ObjectTable_Get anywhere in games/gs1/asm/0808ef70.s -- the lookup is fully inlined as `*(u8**)(*(u8**)Data_03001ebc + (value*4) + 0x14)`, matching object/table/get.c's own formula exactly but without the function call. Confirmed the pool-cleanup loop's base pointer at Data_03001ebc-88 (0x03001e64) via direct arithmetic on the retained `mov r3,sl; subs r3,#88` and cross-checked it against the identical Data_03001e64/112-byte-stride/64-entry array already named in runtime_owner_12.c. Confirmed 0x0808f28d/0x0808eee5 resolve (thumb-bit-set) to the already-adopted BattleEffect_SpawnRandomParticleAtPosition (games/gs1/src/battle/effects/random_particle/spawn_at_position.c, owner main:0808f28c) and EmitRandomParticleEffect (games/gs1/src/battle/effects/random_particle/emit.c, owner main:0808eee4) respectively via games/gs1/source-paths.json, and that 0x0809e87c/0x0809e6c0 are the already-named data markers Data_0809e87c and Data_0809e6c0 used exactly this way (as a stale-callback sentinel and an Object_SetCallback argument, respectively) in emit.c/spawn_at_position.c and run_rising_object_sequence.c.","The former 11-differing-halfword/12-wrong-instruction residual (class=allocation) was entirely register-role assignment for the resource pointer (r2 in the baseline candidate versus r7 in the reference), plus the resulting placement of `mov sl,r2`. Single-variable aliases and declaration changes did not move it because they did not alter the competing lifetime topology.","Reading the reference register phases exposed the complete repair: r6 carries the work base before becoming the pool count, and r7 carries the source pointer before becoming spawn Z. Expressing both disjoint pairs as the ordinary C carriers work and src_z closed the owner from 11 to zero differing halfwords; expressing only the r7 pair regressed to 16 because it stole r6. No register-qualified local, named-register variable, inline assembly, compiler flag override, scheduling control, compiler patch, or hand-authored instruction byte was used.","Adoption gate met on 2026-08-28: two isolated fresh compilations and the production-named source each measured 344/344 bytes with zero differing halfwords. tools/check integrate accepted the owner, installed games/gs1/src/battle/effects/random_particle/start_emitter.c, and retired games/gs1/asm/0808ef70.s."]},"main:0808fe38":{"schema_version":1,"namespace":"main","address":"0x0808fe38","status":"proven-retained","owner_bytes":120,"executable_owner_bytes":120,"candidate_bytes":126,"differing_halfwords":51,"wrong_instructions":47,"cross_edition":{"object_bytes":120,"relocation_bytes":12,"literal_bytes":28,"relocation_normalized_core_bytes":80,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08086e38","en":"0x0808fe38","de":"0x080934a4","es":"0x08094ea4","fr":"0x08094ea4","it":"0x0808fea4"}},"domain":"Allocates and clears the shared display-transition state, seeds established control fields, and schedules its two runtime callbacks.","expressed":["allocates the 0x540-byte display-transition state","clears the complete state with a fixed-source DMA transfer","stores the requested mode and initializes the trailing control fields","schedules the update and presentation callbacks at their original priorities"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is six bytes long with 51 differing halfwords and fails exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 120 executable bytes and proves all 80 relocation-normalized core bytes identical across the six approved GS1 editions.","The residual spans argument lifetime, pool pointer allocation, and volatile DMA/literal scheduling rather than an immediately resynchronizing compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect caller 080983a0, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:0808fecc":{"schema_version":1,"namespace":"main","address":"0x0808fecc","status":"proven-retained","owner_bytes":48,"executable_owner_bytes":48,"candidate_bytes":44,"differing_halfwords":21,"wrong_instructions":14,"classification":"thumb_multiple_transfer_module","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":36,"core_diff_bytes":0,"core_identical":true},"notes":["Allocates the shared 0x540-byte display-transition state and uses DMA3 to fill it from a zero word on the stack.","The retained owner is already covered by the proven thumb_multiple_transfer_module matcher because the three-register STMIA has no ordinary approved-C lowering. The semantic candidate remains broad and was not promoted.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08090488":{"schema_version":1,"namespace":"gs1-en-main","address":"0x08090488","status":"proven-retained","classification":"compiler_literal_pool_placement_module","owner_bytes":250,"score":{"measured":"2026-08-26","candidate_bytes":248,"reference_bytes":250,"differing_halfwords":49,"wrong_instructions":32,"class":"layout","command":"compiler candidate-show games/gs1/recon/en/main/08090488.c","note":"Every emitted instruction matches the reference one-for-one in mnemonic, registers, operands, and branch structure. The entire residual is literal-pool placement: the reference dumps its ten-word pool mid-function (after the middle display arm's unconditional branch, with a two-byte alignment nop) and places the zero/159 arm plus the shared epilogue after it; the candidate emits the same pool at the function end. Every differing halfword is a pool-shifted pc-relative displacement, a branch over the moved pool, or the pool block itself."},"shape":{"derivation":"Family transfer from byte-exact games/gs1/src/display/transition/update.c (95.5% ngram match). Same state cell (0x03001ECC), display cell (0x03001E70, derived by the compiler as cell-92), and DisplayTransitionState field offsets. Differences from the template, all read from the reference: Scheduler_RemoveCallback(self) instead of ScheduleCallback (pool word 0x08090489), a third display arm gated on *(u32*)0x03001E40 & 1 writing value+80 and pool-forced 0x50 minus value (Data_00000050 extern, the battle-page pool-constant idiom), and a constant 0/159 final arm."},"remaining":[{"op":"literal pool placement","count":49,"where":"the reference's mid-function pool site after the middle arm; the 250-byte extent never approaches the Thumb literal range, so the early dump is not range-forced and no ordinary source lever for it is known -- prior owners with this residual class (080983a0, 080bae40, 080bad7c, 080bd898, 080d1350) were all parked on the same grounds"}],"rejected_experiments":[{"experiment":"nested-else restructure with an early return in the middle arm","result":"byte-identical output; GCC canonicalizes the chain"},{"experiment":"32 informed variants tried 2026-08-29 (measured against baseline dh=49): swap state/display pointer init order; lazy-init display pointer after the outer if (C89 mixed-decl compile error); hoist *step into the outer decl block; swap ScheduleCallback/Func_0800307c call order; hoist `delta` to function top with an out-of-block assignment; hoist `value` to function top; hoist both delta and value to function top; split `state->transition_value = start + value` into a `value += start` then assign; cache `display_value` across the outer if via a top-level default + duplicate branch assignment (twice, two shapes, one caused a C89 mixed-decl error); reorder duration-pointer vs display-pointer declarations three ways; use `if (*duration)` instead of `if (*duration != 0)`; defer the `(*step)++` past the Func_080072f0 call; invert the inner if/else (step 79` as `>= 80`; swap the `&&` operand order in the middle-arm condition; hoist the 0x03001E40 flag read into a local (top-of-func and mid-block, one caused a C89 error); cast the Data_00000050 subtraction result to u16; take `&UpdateMapTransition` explicitly in the ScheduleCallback call; split `s8 *step = ...` into a two-statement declaration+assignment; split delta declaration+assignment into two statements; rewrite `end - start` as `-(start - end)`; add redundant parens around `delta * *step`; cast the transition_value store to u16; cast `*duration` to s32 in the Func_080072f0 call.","result":"every variant either reproduced the baseline dh=49 exactly (same missing_extra_code residue, pool still emitted at function end) or made it worse (52-131); none moved the pool to the reference's mid-function site. Confirms this is the same unforced-early-pool-dump class already parked on 080983a0, 080bae40, 080bad7c, 080bd898, 080d1350 -- no ordinary C89 source lever changes GCC 2.96's pool-flush heuristic here. Baseline source restored unchanged."}],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template source, in-repository headers, and the approved compiler.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM because ordinary C cannot request the reference's mid-function pool dump."],"pool_class_membership_correction":{"measured":"2026-08-29","note":"The five owners once claimed as sharing this pool-placement class (080983a0, 080bae40, 080bad7c, 080bd898, 080d1350) are all REFUTED by strict verification \u2014 each has genuine instruction differences. This owner remains the class sole verified member (250 bytes)."}},"main:08090658":{"schema_version":1,"namespace":"main","address":"0x08090658","status":"proven-retained","owner_bytes":344,"executable_owner_bytes":344,"candidate_bytes":344,"differing_halfwords":48,"wrong_instructions":36,"classification":"display_transition_queue_compiler_allocation_module","resolved_asm_classification":{"kind":"display_transition_queue_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":272,"core_identical":true,"starts":{"ja":"0x08087658","en":"0x08090658","de":"0x08093cc4","es":"0x080956c4","fr":"0x080956c4","it":"0x080906c4"}},"score":{"measured":"2026-09-01","candidate_bytes":344,"reference_bytes":344,"differing_halfwords":48,"wrong_instructions":36,"class":"missing-extra-code","command":"compiler candidate-show games/gs1/recon/en/main/08090658.c --owner 0x08090658 --size 344","note":"Family-clustered against the exact display-transition template at main:080903bc and its sibling main:08090488. The shared typed transition state, linker-resolved display-transfer queue, address-valued IME disable, unsigned two-entry dither loop, and incrementing queue destination pointer now reproduce the reference's 344-byte extent, 16-word literal pool, branch topology, and paired STMIA writes. The candidate improved from 374/344 bytes with 132 differing halfwords and 111 wrong instructions to 344/344 with 48 differing halfwords and 36 wrong instructions. The remaining same-length residual is a reciprocal register-role and scheduling floor; the allocator decoder reports no unique source repair, so this remains a measured draft and claims no DONE bytes."},"shape":{"confirmed_fields":"offset 0x52a = transition_value (u16, matches template), 0x539 = a 1-byte toggle flag (previously undifferentiated template padding), 0x53a/0x53b/0x53c/0x53d = transition_start/end/duration/step (matches template exactly), 0x508 = an up-to-32-byte palette-index nibble buffer (written by the dither loop, read by the queued DMA as its source)","confirmed_globals":"0x040000b0 = DMA0SAD (accessed here at +10 = DMA0CNT_H), 0x04000208 = REG_IME, 0x02002090 = a u16 pending-DMA-queue count followed by up to 32 {u32 src,u32 dst,u32 ctrl} 12-byte entries, 0x0809e8ee = a 64-entry ROM byte table (dither phase -> {palette half-index, nibble selector})"},"verified_respellings":[{"change":"route the two DMA0CNT_H read-modify-writes through a `volatile u16 *dma0 = (volatile u16 *)0x040000b0;` pointer accessed as dma0[5] (array form), assigned AFTER the Func_08004278 call rather than as an initializer at block entry","result":"this exact section (three volatile ldrh, two masks, two strh, matching literal pool value 0x040000b0 with immediate #10 offsets throughout) became byte-for-byte identical to the reference -- a struct-typed volatile pointer with the SAME shape produced an extra spurious re-read per line (`x = x & mask` re-loading x twice), and a pre-baked `(volatile u16*)0x040000ba` constant folded the base+offset into one literal instead of two, both confirmed worse"},{"change":"declare `u16 *valuePtr` and `u8 *toggle` as adjacent locals computed up front (before reading *valuePtr), instead of nesting toggle's declaration in an inner block entered after the value read","result":"wrong_instructions 122 -> 118; matches the reference's own instruction order (both offset constants loaded before either address is used)"},{"change":"rewrite the two-entry dither loop as an explicit `i = 0; do { ... i++; idx++; } while (i <= 1);` instead of a `for (i = 0; i <= 1; i++, idx++)`","result":"byte-identical output to the for-loop version -- this compiler's loop rotation already produces the do-while shape for a statically-bounded for loop, so the explicit spelling made no difference here (unlike other owners in this family where the idiom was load-bearing)"},{"change":"split the DMA-queue-append address math into the exact three-step order the disassembly shows: compute `entry = (u8*)count + counter*12` (no +4 header offset yet), THEN store the incremented counter back, THEN take `entry+4` for the actual field writes -- rather than one combined `(u8*)count + 4 + counter*12` expression","result":"wrong_instructions 118 -> 111; the reference's counter-store timing (between the *12 multiply and the +4 add) only reproduces when the source expresses that same three-step sequence"},{"change":"introduce a named `s32 offset12 = counter * 12;` before using it in `entry = (u8*)count + offset12`, instead of inlining `counter * 12` directly in the pointer expression","result":"byte-identical to the un-named version -- no effect for this specific multiply"},{"change":"for the terminal-tick branch's transition_value store, express the write address as `(u8 *)endPtr - 17` (endPtr being the already-computed `state + 0x53b` pointer used for the delta subtraction), or as a mutated `s32 endOffset` variable (`endOffset = 0x53b; ...; endOffset -= 17;`), to try to reproduce the reference's `subs r7,#17` reuse of the already-loaded 0x53b constant register instead of a fresh 0x52a literal load","result":"the direct pointer-subtraction form constant-folds back to a fresh `state+0x52a` load (no different from not trying at all, since the compiler proves the two expressions equal at compile time); the named-variable mutation form compiles but triggers a much larger, unrelated register-allocation cascade (state's own base register swaps from r6 to r7 throughout the whole preceding block), regressing overall wrong_instructions from 122 to 150 -- reverted"}],"remaining":[{"op":"reciprocal register-role swap around the dither and queue tails","where":"The IME write is now explained and reproduced by the ordinary hardware idiom `*ime = (u16)(u32)ime;`; it was not a compiler quirk. After all pool words and instruction counts were aligned, the allocator decoder identified reciprocal r0/r1 and r4/r7 role swaps but could not name a unique guarded source repair."},{"op":"independent absolute toggle offset","where":"Using the linker-resolved absolute symbol Data_00000539 preserves the reference's independent 0x539 pool word. Expressing the same address only as a typed field lets GCC derive it from 0x52a and shortens the owner by four bytes, so the absolute symbol is source-shape evidence rather than an unexplained optimizer limitation."},{"op":"same-length scheduling residual","where":"Candidate and reference are both 344 bytes with identical normalized branch topology and identical literal values. The remaining 36 wrong instructions are directly alignable; no phase-shift or disassembled-pool artifact remains. The bounded annotation-free permuter stopped honestly because its decoder found no unique source repair."}],"notes":["2026-09-01 retained-assembly proof: the candidate reproduces the complete 344-byte owner with equal branch topology and all sixteen literal values exact. Every transition tick, callback removal, DMA0 disable, dither-table access, nibble update, queue insertion, interrupt save/restore, constant, field access, and observable memory operation is accounted for. The remaining 36 wrong instructions are equivalent pointer, counter, table, and saved-IME register roles plus independent scheduling. The allocator decoder finds no unique safe source repair. Canonical, no-schedule-insns, GCSE, both CSE toggles, rerun-CSE, strength-reduction, and O3 routes preserve the 48-halfword floor; regmove, sched2, and no-expensive-optimizations regress. Relocation-aware verification proves all 272 normalized core bytes identical across all six editions. Structured assembly is therefore authoritative under display_transition_queue_compiler_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/08090658.s), its own pc-relative literal-pool annotations (computed by hand: the pool begins at file offset 0x118 and its 16 words were matched to every `ldr rX,[pc,#N] @ (addr)` site by address), the approved local ROM, the assigned template games/gs1/src/display/transition/update.c, the already-drafted sibling games/gs1/recon/en/main/08090488.c and its dossier (confirming the Func_08004278=Scheduler_RemoveCallback naming and the shared transition-state field layout), in-repository headers (types.h), and the approved compiler via tools/compiler candidate-show.","The family clustering (86% ngram similarity) captured only the transition_duration/step opening; the palette-dither-and-DMA-queue tail (roughly 60% of this owner's bytes) has no counterpart in the template or in 08090488 and was reconstructed independently from the disassembly and literal pool alone -- this is a much larger reverse-engineering task than the 'quick win' framing anticipated for this family.","0x0809e8ee (the 64-entry dither table) and 0x02002090 (the DMA-queue ring buffer) are read-only in this owner; their contents/producers were not investigated beyond what this owner's own access pattern reveals.","This candidate claims zero DONE bytes."]},"main:080912b8":{"schema_version":1,"namespace":"main","address":"0x080912b8","status":"measured-draft","owner_bytes":474,"score":{"measured":"2026-08-31","candidate_bytes":442,"reference_bytes":474,"differing_halfwords":224,"wrong_instructions":202,"class":"missing-extra-code","command":"compiler candidate-show games/gs1/recon/en/main/080912b8.c --owner 0x080912b8 --size 474","note":"The corpus drafting wave classified the generated source as type_width_mismatch. The retained assembly proves that each 12-byte display record is first initialized with word stores at +4 and +8, then updated through byte fields at +4/+5/+9 and halfword fields at +6/+8. Encoding those widths removes all three width fingerprints and reduces wrong instructions from 210 to 202; the remaining 32-byte size deficit is now honestly routed as missing_extra_code."},"remaining":[{"op":"reconstruct missing or extra code","count":202,"where":"The branch topology is equal, but the candidate is 442 bytes versus the 474-byte owner. The leading divergence shows absent lifetime-preserving moves and an 8-byte stack-frame deficit; later literal-pool placement also differs. Reconstruct the missing source statements before allocator work."}],"rejected_experiments":[{"experiment":"Extract both display-record initializers into a typed helper and use a uniform semantic record abstraction.","result":"Regressed to 264 bytes with different topology because GCC 2.96 inlined and rescheduled the helper across the owner."},{"experiment":"Rewrite the whole function as clean direct-pointer C while preserving the recovered behavior.","result":"Produced 454 bytes but changed block topology; the generated control-flow skeleton is currently the stronger reconstruction basis."}],"notes":["Recovered only from games/gs1/asm/080912b8.s, the approved local ROM, the aggregate evidence header, the drafting-wave candidate, and the approved GCC 2.96 scoring route.","The semantic role is a scheduled display-record updater for two adjacent terrain-height samples. A public function name is intentionally deferred until callers or neighboring translation-unit evidence establish the original subsystem vocabulary.","This candidate claims zero DONE bytes."]},"main:08091890":{"schema_version":1,"namespace":"main","address":"0x08091890","status":"measured-draft","owner_bytes":328,"score":{"measured":"2026-08-27","candidate_bytes":324,"reference_bytes":328,"differing_halfwords":108,"wrong_instructions":60,"class":"wrong","command":"compiler candidate-show games/gs1/recon/en/main/08091890.c --owner 0x08091890 --size 328","note":"Family sibling of the just-adopted owner/refresh_ratios_on_flag.c (template main:08078144), but the retained assembly's field-offset identity (0x14/0x16/0x34/0x36/0x38/0x3A -- the exact OwnerRatioState layout) is closer to the already-adopted owner/refresh_active_ratios.c (main:0807808c, which does the same *(0x38)=*(0x34); *(0x3A)=*(0x36); double self-copy). The function is arg0 = character id: it calls Func_08077168(id) and Event_ClearInvalidPackedValues() (both void statements), fetches obj=OwnerState_GetFar(id), does the double self-copy + both ratio-pair recomputations (matching refresh_active_ratios.c's proven idiom exactly, including the *(s16*)(obj+0x3A)<<14 inline-read for the second ratio rather than a named variable), clears obj->0x131, then counts (via Func_08077148 -- the far-call veneer, NOT the Party_CountActiveOwners/Func_080795fc near route, per the precedent warning already recorded in 080b6a60.json) how many of the party's active_owners (Data_02000240.active_owners, offset 0x1F8) have a nonzero 0x38 field; if none do, it forces the party's current_owner (Data_02000240.current_owner, offset 0x1F4) object's 0x38 field to 1 and recomputes its ratio pair the same way, discovered by writing v38=1 as a named local (not a bare literal store) so the compiler forwards the register instead of re-deriving a shared 0x4000 constant -- this specific respelling took wrong_instructions from 149 (raw template copy) to 70 (struct layout + offsets fixed) to 60 (this v38-forwarding fix)."},"remaining":[{"op":"register color divergence","count":60,"where":"the double-copy ratio-pair block immediately after obj=OwnerState_GetFar(id) reuses r5 (dead after the id argument's last use) for the clamp temp/v14 instead of the reference's r3, and a symmetric ~4-byte gap around the flagCount=0 initializer (candidate emits movs r2,#0; mov r8,r2 where the reference reuses the already-zero r3 directly via mov r8,r3) -- both are pure GCC 2.96 register-allocator coloring differences, not content differences: the same idiom, byte-for-byte, already compiles to r3 in refresh_active_ratios.c's own adopted context (out/gs1-en/claimed/obj/0807808c.s), so the divergence is driven by this function's surrounding call/live-range shape, not the block's own source shape"}],"rejected_experiments":[{"experiment":"complete shipped-toggle route probe, followed by a field-cluster check across 08090658, 080912b8, 08091890, 08091a58, 08093874, 08093fa0, 08094154, and 080941e0","result":"-fno-regmove, both scheduling toggles, both CSE toggles, and -fno-gcse are flat at 324/108; -fno-strength-reduce regresses to 336/166. -fno-expensive-optimizations alone improves this owner to exact extent 328/328 and 104 differing halfwords, but every combination with the other flat toggles stays 328/104. Across the eight-owner field cluster, the flag improves only 08091890; all seven siblings are flat or regress. This is an owner-specific coincidence rather than a multi-owner translation-unit route, so no override was registered and canonical flags remain authoritative."},{"experiment":"split the reused obj pointer into a block-scoped member pointer at the active-owner loop, following the decoder's split-lifetime hint","result":"strong regression to 308 candidate bytes, 162 differing halfwords, and 96 wrong instructions; reverted. The annotation-free permuter cannot apply this repair automatically because obj has multiple assignments."},{"experiment":"obj->0x38 = 1; then v38 = *(s16*)(obj+0x38); (read-back through memory) for the current_owner block's forced-full ratio","result":"regresses to 70 wrong instructions -- the compiler proves the just-stored literal 1 is a compile-time constant and CSEs the resulting 1<<14 with the unrelated 0x4000 clamp-ceiling constant used elsewhere in the function, producing a 128<<7 encoding instead of the reference's 1<<14 register-forwarding encoding"},{"experiment":"*(s8*)(obj+0x131) = flagCount = 0; (chained assignment, to force flagCount and the byte-store literal to share one register)","result":"regresses sharply to 138 wrong instructions -- the chained-assignment form changes codegen well beyond the targeted store, not just a local register choice"},{"experiment":"flagCount = 0; *(s8*)(obj+0x131) = 0; (swap statement order, plain literal both sides)","result":"62 wrong instructions, slightly worse than the current 60"},{"experiment":"flagCount = 0; *(s8*)(obj+0x131) = flagCount; (read flagCount back for the store instead of a fresh literal)","result":"72 wrong instructions / 110 differing halfwords -- worse"},{"experiment":"reordering local variable declarations (moving count/index/left/flagCount to the end of the decl list, after t/v14/v16/v34/v36/v38/v3A/one)","result":"byte-identical output -- this GCC 2.96 build's pseudo-register numbering follows first-use order in the generated RTL, not textual declaration order, so decl reordering has no effect"},{"experiment":"wrapping *(s8*)(obj+0x131)=0; in a do{...}while(0) block (matching the do-while(0) idiom that was load-bearing for the double-copy block)","result":"byte-identical output -- no effect here"}],"notes":["2026-08-31: changed v34 from s32 to s16 to match the retained ldrsh access and the already-exact Owner_RefreshActiveRatios sibling. This is byte-neutral at 324/108/60 and therefore improves semantic typing without being presented as a score gain. v38=s16 was also tested and was byte-neutral, but reverted because it is a computed carrier rather than a stored-field declaration.","Recovered only from the retained owner assembly (games/gs1/asm/08091890.s), the approved local ROM, the assigned template games/gs1/src/owner/refresh_ratios_on_flag.c, the closer-matching already-adopted sibling games/gs1/src/owner/refresh_active_ratios.c and its compiled object out/gs1-en/claimed/obj/0807808c.s (used to confirm the double-copy idiom's proven register behavior in isolation), games/gs1/include/owner_state.h and party_state.h (OwnerState_GetFar=Func_08077008, Data_02000240.active_owners at 0x1F8, Data_02000240.current_owner at 0x1F4), games/gs1/include/types.h (FixedPoint_Ratio=Func_080022ec, Event_ClearInvalidPackedValues=Func_08091858), the sibling dossier games/gs1/recon/en/dossiers.json#main:080b6a60 (which documents the Func_08077148 far-call-veneer-vs-Party_CountActiveOwners distinction reused here), and the approved compiler via tools/compiler candidate-show.","Func_08077168's return value and Event_ClearInvalidPackedValues's argument are both unobserved in the retained assembly (no register setup between the two `bl`s, and r0 is explicitly reloaded with id before the next call), so both are called as bare statements with their real signatures left undetermined beyond the existing s32 Func_08077168(s32) declaration used elsewhere in the tree.","This looks like a source-shape gap only in the narrow sense that the *content* is fully understood and expressed; the residual is a compiler-internals register-coloring quirk (proven by the same idiom compiling differently in this function's context vs. refresh_active_ratios.c's), which needs permuter-style search across GCC scheduling/allocation flags rather than further manual respelling.","This candidate claims zero DONE bytes."]},"main:08091a58":{"schema_version":1,"namespace":"main","address":"0x08091a58","status":"measured-draft","owner_bytes":452,"executable_owner_bytes":452,"candidate_bytes":400,"differing_halfwords":214,"wrong_instructions":137,"classification":"party-inventory-give-item-with-discard-prompt","domain":"Gives item_id to whichever party member PartyInventory_Add (the Func_08077030 far-call veneer onto games/gs1/src/inventory/add_to_party.c's real body at 0x08078618) can hold it for. If every member's bag is full (-1 returned), opens a message/window sequence (UiText_DrawQuantity/UiText_DrawMessage veneers at Func_08015120/Func_08015040) telling the player the item was obtained but bags are full, then loops Shop_SelectPartyMemberItem (the Func_080b0058 veneer onto the still-unadopted, source-paths-named-only 0x080b3444) so the player can either pick a member+slot to discard or cancel: picking a key-flagged item (Item_GetData(item_id)->flags & 8, via the already-declared item.h prototype) re-prompts in place; cancelling asks a yes/no confirm through sibling owner Func_08091d84 (games/gs1/src/object/call_spawn_routine_at_origin.c) and, on a real cancel, restores the transient field and returns -1 with Item_AdjustCounter bumped by 1 (the Func_08077240 veneer onto games/gs1/src/item/adjust_counter.c's real body at 0x08078ad0). A confirmed discard target instead drains the chosen slot's full stack via Inventory_GetQuantity/Inventory_Discard-shaped veneers (Func_08077020, Func_080772b0, both far-call variants of the already-adopted games/gs1/src/inventory/get_quantity.c and games/gs1/src/inventory/discard.c bodies) after touching the owner's state once through the Func_08077008 veneer (games/gs1/include/owner_state.h's already-declared OwnerState_GetFar/struct OwnerInventoryState*), then retries PartyInventory_Add. Either success path plays the pickup cue (Audio_PlayCue/Func_080f9010, 83) and prints either the generic 'you got the item' message (0x96a) or, when the receiving owner differs from games/gs1/include/party_state.h's Data_02000240.current_owner, a named-recipient variant (0x96b). Throughout, a transient s16 field at offset 472 (236 halfwords) of the runtime block behind Data_03001ebc is saved on entry and restored on every exit.","notes":["Family-matcher gave games/gs1/src/shop/select_repair_item.c at 7342/10000 (below the 7500 adoption-transplant threshold). Read it in full: its actual call targets (UiWindow_CreateFar, Ability_GetAvailability, Shop_ComputeRepairPrice, Shop_DrawItemPrice/DrawMessage, an ADDR_03001C94/ADDR_03001B04 D-pad polling loop) share none of this owner's real callees. It is a shape-only match (same high-register-heavy prologue idiom used by dozens of unrelated main-image owners) and was not used beyond noting the general 'shop-ish item flow' theme, which the real tracing below independently confirmed through a different route.","Traced every bl target in games/gs1/asm/08091a58.s by hand: seven of them (Func_08077030, Func_08077018, Func_08077008, Func_08077020, Func_080772b0, Func_08077240, and the games/gs1/asm/08015040.s/08015120.s/08015140.s/080b0058.s group) are 'far-call inter-mode veneer' stubs (ldr r4,[pc]; bx r4) per this project's veneer_island convention, not callable symbols in their own right. Resolved each veneer's literal-pool target address (thumb bit stripped) and cross-checked it against games/gs1/source-paths.json and the project headers: 0x08078618=PartyInventory_Add (inventory.h), 0x08078414=Item_GetData/Item_Get (item.h, already declared as the veneer symbol Func_08077018 itself), 0x08077394=Owner_GetState (types.h; Func_08077008 is the separately-named far variant OwnerState_GetFar in owner_state.h), 0x080784b0=Inventory_GetQuantity (inventory.h; Func_08077020 is its far veneer, aliased Shop_GetSelectionState in types.h -- name not trusted, signature is), 0x08078948=Inventory_Discard (inventory.h; Func_080772b0 is its far veneer), 0x08078ad0=Item_AdjustCounter (item.h; Func_08077240 is its far veneer, aliased Ability_GetMaximum in types.h -- again signature trusted, alias name not), 0x08019908=a value/flag work-queue push (games/gs1/src/ui/runtime/push_value_slot.c, void(u32,u32); Func_08015120 is its far veneer, aliased UiText_DrawQuantity), 0x0801776c=an unadopted retained-assembly message/window-flags renderer (games/gs1/asm/0801776c.s; Func_08015040 is its far veneer, aliased UiText_DrawMessage; matches the void(s32,s32) signature already used identically in games/gs1/recon/en/main/0809b698.c and 0808e680.c), 0x08019a54=UiWork_FinalizePendingCore (types.h, void(void); Func_08015140 is its far veneer, aliased UiWork_FinalizePending), 0x080b3444=Shop_SelectPartyMemberItem (source-paths.json name-only registration, not yet adopted). This is the genuine evidence trail for the whole function, not a template guess.","0x03001ebc dereferences to a runtime-block pointer (games/gs1/include/battle_effect_runtime.h's struct BattleRuntime, whose unknown_1d0[0x0a] padding covers offset 0x1d8=472 -- not renamed here, header left untouched to avoid disturbing its many other callers) and 0x02000240+500(0x1f4) is exactly games/gs1/include/party_state.h's struct PartyState.current_owner -- both confirmed by matching field width/offset against already-committed headers, not guessed.","Sibling Func_08091d84 (games/gs1/src/object/call_spawn_routine_at_origin.c) is s32(s32), a thin wrapper over Func_08015390(value,0,0,0); used here as a yes/no confirm gate matching the surrounding message flow.","m2c workbench (cargo run --manifest-path tools/compiler/Cargo.toml -- workbench games/gs1/recon/en/main/08091a58.c) ran cleanly once main:08091a58 was given the {\"name\":\"PartyInventory_GiveItem\"} registration this session added to source-paths.json (workbench requires a registered owner symbol; the matching '.global PartyInventory_GiveItem' alias label was added to games/gs1/asm/08091a58.s immediately above the existing Func_08091a58 label, verified present in the retained assembly's own exports). m2c's --valid-syntax draft against the real agscc type context independently reproduced the same control-flow shape, message IDs (0x96a/0x96b/0x977/0x978/0x979/0x97a/0x97c), and both global accesses this hand trace already had, which is strong corroboration rather than a separate source of evidence.","Iterated three source-shape variants via workbench objdiff: (1) a first draft using early 'return' statements inside a for(;;) loop scored 56.5% (candidate 415, later variants smaller); (2) caching Data_03001ebc's dereferenced value in a named 'base' pointer (avoiding 2 of 3 restore sites re-dereferencing the global from scratch) raised it to 61.0%; (3) caching the full field address ('s16 *fld = (s16*)((u8*)Data_03001ebc+472)') instead of the base pointer alone raised it further to 61.7% (candidate=400, differing_halfwords=214, wrong_instructions=137) -- the version kept.","Residual is register-role/tail-merge allocation, not a remaining algorithm or control-flow gap: the reference caches the runtime-block pointer permanently in fp and spills the saved field value to the stack for two of its three restore sites while keeping it register-resident for the third (the path reachable without entering the retry loop), producing three textually-distinct-but-logically-identical restore sequences that GCC never merges. This candidate's allocator instead keeps the saved value uniformly in fp across all three call sites, so two of the three restore sequences become byte-identical and GCC 2.96 tail-merges them into one shared block, which in turn forces an extra unconditional branch (the immediate-success path can no longer fall straight through into its own inline restore). This is the same qty_compare/local-alloc tie-break-by-RTL-discovery-order residual class already traced to alchemy-gcc/agscc/gcc/local-alloc.c and documented as architecturally uncontrollable by plain source reordering in games/gs1/recon/en/dossiers.json#main:080a8c2c (confirmed there across four independent owners this session); this owner's declaration-order and statement-order variants (swapping saved/fld computation order, narrowing saved to s16) all measured zero effect on the split, consistent with that finding. No register hint, asm(), or PERM_GENERAL forcing was used.","Adoption gate not met: differing_halfwords=214, candidate_bytes=400 != owner_bytes=452. This candidate claims zero DONE bytes.","Recovered only from retained owner assembly (games/gs1/asm/08091a58.s), the approved local ROM, already-adopted exact sources under games/gs1/src/ (inventory/add_to_party.c, inventory/get_quantity.c, inventory/discard.c, item/get_definition.c, item/adjust_counter.c, ui/render/finalize_pending.c), in-repository headers (item.h, inventory.h, owner_state.h, party_state.h, types.h, battle_effect_runtime.h, global_cells.h), sibling recon draft games/gs1/src/object/call_spawn_routine_at_origin.c and games/gs1/src/ui/runtime/push_value_slot.c, and the approved compiler plus its m2c workbench. No other Golden Sun decompilation project, GS2 evidence, or external source was inspected."]},"main:08093874":{"schema_version":1,"namespace":"main","address":"0x08093874","status":"measured-draft","owner_bytes":240,"candidate_bytes":236,"differing_halfwords":110,"wrong_instructions":62,"classification":"effect-child-object-lifecycle","family":{"template":"main:080937b8","template_source":"games/gs1/src/battle/effects/objects/spawn_linked_resource_object.c"},"domain":"Looks up a BattleEffectLinkedObject by id and, depending on the low two bits of flags, releases its existing child link object (mode 0), always spawns a fresh child (mode 2), or reuses an existing child if present else spawns one (mode 1/3); the child is then mode-configured (SetMode/Func_08009098 per case), tagged with the parent's id, given the template's callback/visual-clear pair, linked back to the parent, and has its visual flags merged from either its own or the parent's visual flags depending on bit 0x100 of flags -- the same two-branch mask/OR merge as the family template, reusing the same 12/13 literal masks and the same struct layout (visual at +0x50, resource-link at +0x68, callback at +0x6c).","notes":["The raw candidate-show score is dominated by a single upstream length mismatch: the reference reserves two extra prologue instructions (`movs r5,#0` / `movs r6,#0`, initializing the child pointer and a resource-clear zero before the object==0 test) that no C spelling tried here retains -- every straightforward path (`child = 0;` as an initializer, as a separate first statement, before or after the null check, paired with or without a matching `s32 zero = 0;` for the `object->resource = 0;` write in the release branch) gets eliminated as a provably-dead store, since every reachable path already overwrites `child` before use. A `volatile` qualifier does force the store back but overcorrects (forces stores everywhere else too, regressing to 254 candidate bytes), so it was rejected as not a genuine source-shape fix.","With `--align`, the reference and candidate line up almost instruction-for-instruction for the entire rest of the function once this 4-byte prefix gap is discounted: identical branch structure for the mode==0/2/(1-or-3-with-existing-resource) three-way dispatch (including which sub-case is placed inline vs. out-of-line), identical switch-style case-1/case-2 tail using `beq` chains (not nested if/else with `bne` skips), identical literal masks (13/-13/4, 12) and register roles for the visual-flags merge, and the corrected `child->resource = object` back-reference store (the initial draft had this backwards as `object->resource = child`, which is a genuinely different field write and was the single largest structural bug found and fixed).","Getting the visible field layout right required two real corrections beyond the missing prologue: (1) the child object's mode/setup dispatch is a `switch` on `flags & 3`, not an if/else-if chain -- the two compile to different branch shapes even though semantically identical; (2) the trailing back-reference store is `child->resource = object`, not `object->resource = child` (which is only true inside the mode==1 case, separately).","This is a source-shape gap (the exact C idiom that keeps the two dead-looking prologue stores alive in GCC 2.96's weak liveness analysis), not a scheduling residual -- worth a second pass if a sibling owner in this family is found to need the same two-register early-zero prologue, since that would reveal the triggering idiom.","Recovered only from retained GS1 assembly, the exact-C family template (080937b8) and its already-registered struct/callee types, and the approved compiler. No GS2 evidence or external source was used."]},"main:08093e28":{"schema_version":1,"namespace":"main","address":"0x08093e28","status":"proven-retained","owner_bytes":376,"candidate_bytes":376,"differing_halfwords":11,"wrong_instructions":18,"classification":"field_effect_compiler_allocation","family":{"template":"main:08092708","template_source":"games/gs1/src/battle/effects/objects/run_rising_sequence.c"},"domain":"Looks up the active effect object (Data_02000240[125]) and derives its ground-grid X/Z tile from the integer half of its fixed-point x/z position. If a static one-shot flag is already set, resets the object (mode 10, teardown state) and clears the flag. Otherwise it computes the object's grid cell index into two parallel 128-wide tile-attribute tables (0x02010000 / 0x02010200) and aborts if their per-cell 'kind' bytes disagree or a placement probe (Func_08009220) rejects the position; on success it re-anchors the effect at the snapped tile, marks the flag active, and starts it moving toward the tile with an upward Y offset.","notes":["measured=2026-08-30 (retained): placing one shared `failure:` tail after the normal return reproduces the reference's two long branches and reduces the exact-length candidate from 53 to 11 differing halfwords with equal topology. The residual is one localized reciprocal low-register allocation family in the grid-index and parallel-table comparison. The allocator decoder identifies the reciprocal role swap but finds no unique safe source edit; its finite permuter honestly reports that this owner lacks the single reciprocal site required by the catalog operation.","cross-edition=2026-08-30 correction: the comparator's zero Japanese row is the edition-delta baseline, not a candidate-versus-ROM exactness score. Permanent retention rests instead on the directly measured English evidence: complete semantics, exact 376-byte extent, equal topology, one localized reciprocal register-role family, bounded source experiments, and the allocator decoder/permuter verdict.","The listed family template (08092708, run_rising_sequence.c) supplied only the general object/WaitFrames/mode shape; the actual control flow, tile-snap arithmetic, and dual-table comparison were reconstructed directly from the assembly with no close template match.","Candidate matches the reference length exactly (376/376 bytes). The largest fix was branch polarity: the static-flag check must be written `if (flag == 0) { } else { }` -- the reverse ordering (testing `flag != 0` first) makes GCC place the reset path inline and the success path out-of-line, which is not what the reference does. A second fix was the tile-index arithmetic: it must be written as two sequential `if (x < 0) x = ...; x >>= 4;` guard statements (matching the assembly's fallthrough-then-shift shape) rather than a `(cond ? a : b) >> 4` ternary, which GCC compiles into extra out-of-line branches. A third fix corrected the struct's byte-offset layout (field_20 at 0x14, field_28 at 0x28, value_55 at 0x55, value_5a at 0x5a) after an initial padding-array miscount had them all landing 12-16 bytes too far into the struct.","Remaining differences are register/slot allocation only: which physical register the compiler assigns to grid_x vs. grid_z intermediates, the order it evaluates the two parallel-table pointers before their byte loads, and where exactly (relative to `mov fp,r1`) it schedules the `sub sp,#24` frame-reservation instruction (found by trial to require a 6-word stack array here even though only 3 words are read/written, which fixed the stack size but not this scheduling position). No further respellings tried moved these register/scheduling choices to match.","Recovered only from retained GS1 assembly, the exact-C family template, and already-established local function signatures (Func_08092054, Func_080916b0, Func_080920e8, Func_080091e0, Func_08009080, Func_0809163c) from the wider source tree. No GS2 evidence or external source was used.","measured=2026-08-29: Declaring tile_z before tile_x (reversing the prior order) at the top of the function, combined with moving `result` into the inner `position[6]` block instead of declaring it at function scope, reduced differing_halfwords from 113 to 64 and wrong_instructions from 36 to 38->34 depending on exact ordering noise between runs; 64/38 is the reproducible figure kept in this file. This did not reach zero.","measured=2026-08-29: Reversing grid_x/grid_z declaration order (grid_z before grid_x) regressed the score (differing_halfwords rose to 66); reverted.","measured=2026-08-29: Restructuring the two early-return failure sites (`if (kind mismatch) {Func_08091750(); return -1;}` and `if (result != 0) {Func_08091750(); return -1;}`) to share one `goto fail; ... fail: Func_08091750(); return -1;` tail (C89 goto/label) did not reproduce the reference's shared/merged tail or its trailing dead-code block; instead it changed candidate size to 380 bytes (vs. reference's 376) and topology to equal-but-`missing-extra-code`, with differing_halfwords rising to ~172-174. GCC 2.96 did not tail-merge the two call sites from this goto shape the way hypothesized, so shared-tail-via-goto is refuted as a way to reproduce the reference's dead trailing `bl;movs r0,#1;negs r0,r0` block. Reverted.","Note on environment: while iterating on this owner, the working copy of 08093e28.c was observed changing on disk between tool calls in ways this session did not perform (declaration order and duplicate/removed local declarations toggling, at least one instance of an unrelated `goto fail;` restructuring appearing and disappearing) -- a second concurrent agent/session was independently editing this same file. This made some incremental A/B comparisons noisy; every figure recorded in this dossier was re-verified against the file content actually on disk immediately before recording it.","measured=2026-08-29: Rewriting `s32 tile_x = TILE_HI(object,8) & 0xfff0; s32 tile_z = TILE_HI(object,16) & 0xfff0; s32 grid_x = 8+tile_x; s32 grid_z = 8+tile_z;` as `s32 grid_x = 8 + (TILE_HI(object,8) & 0xfff0); s32 grid_z = 8 + (TILE_HI(object,16) & 0xfff0); s32 tile_x = grid_x - 8; s32 tile_z = grid_z - 8;` (computing grid_x/grid_z directly and deriving tile_x/tile_z from them, instead of the reverse) fixed the `sub sp,#24` vs `mov fp,r1` prologue-scheduling divergence noted above (they now match exactly) and dropped differing_halfwords from 60 to 53, wrong_instructions from 34 to 24. This is the single largest improvement found this session. Kept.","measured=2026-08-29: Prior to the fix above, restructuring the kind-mismatch early return from `if (kind != kind2) { fail } else { }` to `if (kind == kind2) { } else { fail }` (flipping the polarity so the failure path is the trailing `else` of the outer `if`, mirroring the already-required flag-check polarity) dropped differing_halfwords from 113 to 60 on its own, before the grid_x/tile_x change above was applied. This is a second, independent required-polarity fix (distinct from the flag-check one already on record) and is kept.","measured=2026-08-29: With both of the above fixes applied, nesting the inner `if (result != 0) { fail }` early return as `if (result == 0) { } else { fail }` (matching the same flip applied to the outer kind-check) is score-neutral (still differing_halfwords=53) but causes GCC to emit a second physical copy of the `Func_08091750(); return -1;` tail inline (visible as extra instructions right after the success path in the diff) rather than reference's single shared/merged copy reached by a long branch. The plain early-return form (`if (result != 0) { fail } `) produces byte-for-byte identical output at the same differing_halfwords=53 without this duplication risk, so it was kept in preference to the nested form.","measured=2026-08-29: Converting the OUTER kind-check from if/else form back to a leading guard clause (`if (kind mismatch) { fail } { }`, i.e. guard-clause style instead of if/else-with-fail-in-else) regressed sharply to differing_halfwords=106. This confirms the outer kind-check specifically requires the if/else-with-fail-in-else polarity (guard-clause style is wrong here), unlike the inner result-check where either form scores the same. Reverted.","measured=2026-08-29: None of the following score-neutral (still 53) or regressing register-allocator nudges closed the remaining gap, all reverted: swapping grid_z/grid_x declaration order back after the fix above (regressed to 63); swapping tile_z/tile_x declaration order alone (regressed to 62-64 depending on combination); reordering `position[0..2]` assignment statements from x,y,z to z,y,x (regressed to 57); swapping the `Data_02010000`/`Data_02010200` operand order in the kind comparison (regressed to 55); writing `index = (index_z<<7)+index_x` instead of `index_x+(index_z<<7)` (regressed to 54); replacing `tile_x+23`/`tile_z+23` with algebraically-equivalent `grid_x+15`/`grid_z+15` (neutral, kept the tile_x/tile_z form for readability); moving the `s32 result;` declaration to various positions relative to `tile_x`/`tile_z`/`position` (neutral); extracting `Data_02010000[index].kind`/`Data_02010200[index].kind` into separate `u8 kind_a`/`kind_b` locals before comparing (regressed to 55). The remaining 53 differing halfwords are concentrated in one spot: which physical register (r2 vs r3) the compiler assigns to the `index_x` bounds-check/shift temporary right before it is stored to `sl` -- reference reuses r3 for both `index_x` and the later `index_z` processing, candidate uses a fresh r2 for `index_x`. This appears to be a GCC 2.96 local-register-allocator liveness/pressure artifact rather than something controllable from this statement's own source form; no respelling tried moved it. A downstream `bne.n` branch-offset difference (0x110 vs 0x106 in the flag check, and correspondingly 0x106 vs 0x14a in the two failure-path compares) is very likely a pure byte-offset consequence of this one register/instruction-count difference rather than an independent structural issue -- it was not separately pursued.","Cumulative result this session: differing_halfwords 113 -> 53 (53% reduction), wrong_instructions 36 -> 24, via two required if/else polarity fixes (outer kind-check, matching the already-known flag-check pattern) and one data-flow reordering fix (computing grid_x/grid_z first and deriving tile_x/tile_z from them, which also fixed the sub-sp/mov-fp prologue scheduling). Did not reach differing_halfwords=0; `make verify` was not run since the owner is not yet byte-exact. Best-known state is committed to this file as-is."],"sr_route_evidence":{"verdict":"COINCIDENTAL","measured":"2026-08-29","note":"asm/08093e28.s loop bodies (.L0-.L5) contain no retained empty countdown loop; the two large loops (.L0 27 lines/7 mem ops, .L2 72 lines/21 mem ops) were not traced instruction-by-instruction for SR-sensitive addressing. No dual-compile performed. Provisional COINCIDENTAL pending compiler diff."}},"main:08093fa0":{"schema_version":1,"namespace":"main","address":"0x08093fa0","status":"measured-draft","owner_bytes":436,"candidate_bytes":432,"differing_halfwords":169,"wrong_instructions":60,"family":{"template_guess":"battle/effects/orbiting_particles/run.c","template_guess_score":7383,"template_guess_confidence":"low","template_guess_verdict":"rejected -- shape-only prologue match, unrelated actual semantics; no shared callee, field offset, or constant with this owner","real_sibling":"main:08093e28 (games/gs1/recon/en/main/08093e28.c, itself an unregistered measured-draft, dossier classification 'grid-effect-placement')","real_sibling_basis":"same object accessor (Object_GetById(Data_02000240.object_id)), same Data_02000240.mode_1f2 one-shot flag idiom, same 8+ (x>>16 & 0xFFF0)/(z>>16 & 0xFFF0) tile-snap-with-negative-guard arithmetic, same 128-wide-row two-table kind-byte comparison (this owner compares Data_02010000 against Data_0200fe00, i.e. the table 0x200 BEFORE 0x02010000, where 08093e28 compares Data_02010000 against Data_02010200, the table 0x200 AFTER -- consistent with a small family of sibling owners each comparing an adjacent parallel tile layer), same Func_08009220(position*) placement probe, same ObjectMotion_SetPositionAndCommit/CommitCurrentPositionAndActivate reposition pair, and near-identical address (0x08093fa0 is 0x178 bytes after 0x08093e28)."},"domain":"Reads the active battle-effect object (Object_GetById(Data_02000240.object_id)), snaps its ground-plane x/z to an 8px-centered 16px grid cell, and toggles a one-shot state (Data_02000240.mode_1f2) between two behaviors: when inactive, it verifies the destination cell's kind byte agrees between two parallel 128-wide tile-attribute tables (0x02010000 vs 0x0200fe00) and that a placement probe (Func_08009220) accepts the object's exact current position, then re-anchors the object at the snapped grid cell, runs a short dispatch/wait animation sequence (commands 6, 7, 12) with an upward velocity_y ramp, and marks the flag active; when already active, it repositions the object via a direct 4-argument set-position call (Func_08009150) offset by +0x80000 on y and -0x100000 on z, commits/activates the position, snaps terrain_height to the current y, and clears the flag.","notes":["Every call target, struct field offset, and shared global was independently traced from games/gs1/asm/08093fa0.s by hand (PC-relative literal-pool arithmetic, effective_addr = align4(instr_offset+4)+imm) before any tooling was run, then cross-checked against games/gs1/include/object_runtime.h (x/y/z/terrain_height/velocity_y/speed_limit/animation/animation_kind/flags/action_flags all match struct ObjectRuntime's real offsets exactly) and games/gs1/include/battle_effect_runtime.h (mode_1f2 at 0x1f2, object_id at 0x1f4 of struct BattleWork Data_02000240 match exactly -- 0x02000434 in this owner's literal pool is simply &Data_02000240.object_id).","Object_GetById, BattleRuntime_Reset (Func_080916b0), ObjectMotion_SetPositionAndCommit (Func_08092158), ObjectMotion_CommitCurrentPositionAndActivate (Func_080923c4), and BattleRuntime_WaitIfModeZero (Func_0809163c) are already-adopted exact sources in games/gs1/src/; this owner is a genuine caller of all five. Func_08009080 is a long-call veneer (games/gs1/asm/08009080.s) to 0x0800c300 = already-adopted object/dispatch/apply_argument_to_children.c (ObjectDispatch_ApplyArgumentToChildren); Func_080091e0 is a veneer to 0x0800c528 = already-adopted-but-unnamed games/gs1/src/object/dispatch/set_single_child_field26.c, whose body (`if ((arg0[0x54]&0xf)==1) (*(u8**)(arg0+0x50))[0x26]=arg1;`) is the exact write-back counterpart of this owner's own read of the same object+0x50->+0x26 byte, confirming the read/modify/write relationship. Func_080030f8 and Func_08009150/Func_08009220 remain unadopted (their games/gs1/asm/*.s retained files still exist); WaitFrames(s32) is the project-wide established call convention for Func_080030f8 (used with an explicit frame-count argument in dozens of other adopted files, e.g. games/gs1/src/battle/run_simple_presentation.c, battle/motion/initialize_actor_records.c), even though one already-adopted zero-argument call site (battle/runtime/wait_if_mode_zero.c) declares it as WaitFrames(void) -- both are correct for their own call site's compiled bytes, which this project already tolerates.","Ran the m2c structural workbench (games/gs1/recon/en/main/08093fa0.c registered as source-paths.json main:08093fa0 -> unidentified/main/battle/battle_owner_69.c, with a matching '.global battle_owner_69' alias added to games/gs1/asm/08093fa0.s immediately above '.global Func_08093fa0'). m2c's independently-recovered control flow, field offsets, and call targets match this hand-trace exactly with zero discrepancies -- strong independent corroboration of the semantic reconstruction. objdiff reports 79.9% instruction match (207 instructions, 109 unchanged, 63 argument-only mismatches, 2 opcode mismatches, 1 replacement, 18 deletions, 16 insertions) against the pre-goto draft.","The 2026-09-01 family pass found and repaired two real source-shape errors. Loading both signed tile coordinates before applying one named 0xfff0 mask reproduces the reference's shared-mask schedule instead of interleaving the mask with the second load. Declaring the long-lived variant before those coordinate snapshots reproduces its early constant materialization and fp lifetime. Together these repairs reduce the scored residual from 181 differing halfwords / 93 wrong instructions to 169 / 60 without changing the 428-byte extent.","The same pass restored the late address-valued Value_00000001 constant separately from the early numeric variant initializer. The reference loads 0x00000001 from its literal pool after Func_080923c4, then reuses that carrier for both the variant OR and action_flags store; keeping this carrier in a narrow block reproduces that load and grows the candidate from 428 to 432 bytes. The four-byte remaining extent gap is the reference's mid-function pool and long tile-mismatch branch layout: the candidate still places the pool at the tail and reaches the shared failure block with one short conditional branch. Positive-body, negative-guard, explicit-else, and shared-goto spellings compile identically here, so no artificial padding or forced scheduling was added.","Bounded route probes on the repaired source leave routed GCC 2.96 at 432 bytes / 169 differing halfwords / 60 wrong instructions. The gcc296 family is identical; old-agbcc regresses to 408/215/265. `-fno-regmove`, `-fno-schedule-insns`, `-fno-gcse`, `-fno-cse-follow-jumps`, `-frerun-cse-after-loop`, `-fno-strength-reduce`, `-fno-expensive-optimizations`, and `-O3` do not close the owner; `-fno-cse-follow-jumps` reaches the 436-byte extent but regresses to 186 differing halfwords / 88 wrong instructions and remains structurally different. Did not force register assignment, use inline assembly, add barriers, or register an owner-specific route.","Recovered only from retained GS1 assembly (games/gs1/asm/08093fa0.s), the already-adopted exact sources named above, the closest measured-draft sibling 08093e28.c/.json in this repository, the project's own object_runtime.h/battle_effect_runtime.h headers, the approved compiler's own candidate-show/workbench output, and the m2c structural workbench run against this repository's own retained assembly and type context. No GS2 evidence, other decompilation project, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","Adoption gate not met: differing_halfwords=169, not 0, and candidate_bytes=432 != owner_bytes=436. Registered games/gs1/source-paths.json main:08093fa0 -> unidentified/main/battle/battle_owner_69.c (matching this project's established convention for a definitely-battle/object-subsystem owner whose exact semantic role -- most plausibly a submerge/emerge or grid-anchor toggle for a battle-effect object -- is not yet confidently nameable) and added the required '.global battle_owner_69' alias to games/gs1/asm/08093fa0.s; no games/gs1/src/ file was created since the draft is not exact."]},"main:08094154":{"schema_version":1,"namespace":"main","address":"0x08094154","status":"measured-draft","owner_bytes":136,"candidate_bytes":128,"differing_halfwords":65,"classification":"allocation-and-scheduling","notes":["This complete semantic draft resolves an object, calculates camera-relative integer X/Z distance, applies the type-one height adjustment, and returns the reference success/failure values.","The candidate is eight bytes short and the remaining residual includes object/distance register allocation, state-load scheduling, and compiler formation of the incremented output pointer.","Retained assembly remains authoritative and this draft claims zero bytes. No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:080941e0":{"schema_version":1,"namespace":"main","address":"0x080941e0","status":"measured-draft","owner_bytes":256,"candidate_bytes":272,"differing_halfwords":130,"wrong_instructions":125,"classification":"screen-transition-fade-effect","family":{"id":"template-main-080a7380","template_owner":"main:080a7380","template_source":"games/gs1/src/menu/open_character_selector.c","note":"Clustered by prologue similarity only. This owner is NOT a character-selector: it plays three sound cues (Func_080f9010), checks a mode field at Data_03001ebc-deref+414 against 3, and runs one of two nearly-identical 16-iteration branches that write an OR'd bit pattern to a hardware-style address each frame while ramping three packed sub-fields, first setting one palette-RAM halfword to white (0x7fff) via Func_080901c0. No allocation, no character-id table, no row_positions loop -- none of the template's shape applies; only the general Data_03001ebc-state-pointer and Data_02000240-array conventions used elsewhere in this project were reused."},"notes":["Read the raw assembly directly. High confidence: three Func_080f9010 sound-cue calls (args from Data_02000240+494 as s16, then literal 288, then literal 147); mode = *(s16*)(state+414) where state=Data_03001ebc dereferenced; branch on mode==3; each branch clears state+454 to 0, calls WaitFrames(16) [Func_080030f8], then runs a 16-iteration loop calling WaitFrames(1) each pass while three sub-values (starting 0x7800, 960, 30 in one branch counted up, mirrored counted down in the other) are OR'd together and stored to a fixed halfword address, ramping by +0x401 / -64 / -2 per iteration.","Low confidence, unverified: the exact hardware/VRAM addresses. I guessed 0x050001e6 and 0x05000000 for the two 'write 0x7fff then Func_080901c0(addr,16)' calls (plausible palette-RAM slots given the 0x05000000-range magnitude visible in one branch's `movs r5,#160; lsls r5,r5,#19` = 0x05000000 construction), and guessed 0x04000008/0x0400000a (BG2 affine register range) for the per-frame packed-value write purely by elimination -- I did not independently confirm either address against a memory map, so both are placeholders, not verified reconstructions.","Also re-hit the same extern-array constant-folding issue already documented on 08099838.json: writing `Data_02000240[247]` (u16-typed index) as an s16 read gets compile-time-folded by this toolchain into a single pooled absolute address, whereas the reference computes the 247*2=494 byte offset via runtime `movs+lsls+adds` arithmetic. This is the same unresolved compiler-internals gap noted there, not something I re-solved here.","Given the address uncertainty and the size of the gap (125 of roughly 115 total instructions differ, i.e. most of the function), this is a genuine source-shape-plus-unverified-target-address gap, not a near-miss. Next step should be identifying the real target addresses (likely from other confirmed owners in this codebase that already reference the same palette/register locations) before attempting another respelling pass.","Adoption requires 0 differing_halfwords."]},"main:0809537c":{"schema_version":1,"namespace":"main","address":"0x0809537c","status":"measured-draft","owner_bytes":564,"candidate_bytes":560,"differing_halfwords":181,"wrong_instructions":118,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/0809537c.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 8129bp) seeded an m2c control-flow recovery over the complete symbolized owner, cross-checked callee signatures against already-exact siblings (battle/effects/objects/spawn_linked_resource_object.c, battle/effects/burst_particles/run_main_object.c, battle/effects/object_control/resume_object.c, battle/effects/heavy_impact/finish.c, and three Func_08092054 sites)","family_template":"main:080b1a14","pc_relative_references":2,"jump_tables":0},"notes":["This is a battle-effect spawn routine: it looks up the caller's object (Func_08092054(arg0)) and a fixed shared object (Func_08092054(Data_02000240[125])) to derive a palette/style word, plays three sound-and-window beats (Func_08096bec/Func_08092560/Func_08009158 x3), classifies a kind value read through the object's field+0x50/+0x28 into one of three timing constants, then spawns and links a fixed 8-entry chain of child objects via Func_080090c8 before a closing beat and Func_08091750() return. No loop over player input at all -- the family match is purely on instruction-shape/register-pressure cosine similarity, not semantics. Every non-trivial callee signature here (Func_08092054(s32), Func_080090c8 4-arg, Func_08009080/Func_080091e0/Func_08009240 2-arg, Func_080925cc(id,1)) is independently confirmed by five already-adopted exact siblings, so the call shape and argument counts are solid, including catching that the raw m2c draft's two 'unset register' Func_08092054 reads are actually genuine calls with the function's own r0 argument (a single s32 parameter) reused verbatim rather than zero-arg calls.","The raw m2c draft (0 params, garbage self-referential `sp0 = &sp0 + 0x10` for the 8-entry object array, narrow types) scored badly on a first read; declaring the real `s32 Func_0809537c(s32 arg0)` signature, replacing the array-address garbage with an explicit `void *list[8]; void **list_ptr = list;` (matching the field's own persisted-pointer idiom seen on 08029554 and 08021488), and fixing the two Func_08092054 call sites to pass `arg0` and `Data_02000240[125]` respectively brought the candidate to 560 vs 564 bytes, 118 wrong instructions on the first scored attempt -- within 4 bytes of exact.","Remaining disagreement is narrow: (1) the shared 'style' value that survives from the two Func_08092054 lookups through all three beat calls sits in `fp` in the reference but `r9` in every candidate tried (a register-allocation swap of the same kind seen on every other owner in this batch); (2) a small negative bitmask (`field &= -0xD`) compiles to a single `movs r3,#0xF3` immediate load in the candidate but to a two-instruction `movs r3,#13; negs r3,r3` materialization in the reference -- tried both an outer-cast and an inner-cast spelling of the same expression with no change, so this is a genuine instruction-selection choice tied to some other part of the expression context, not the cast placement.","This reads as a last-mile compiler-scheduling/selection residual on an otherwise fully confirmed call sequence and field layout, not a remaining source-shape gap -- the closest of the four measured-drafts in this batch (4 bytes short) and a good candidate for permuter-style bounded search.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."],"sr_route_evidence":{"verdict":"COINCIDENTAL","measured":"2026-08-29","note":"asm/0809537c.s loop bodies (.L0-.L4) all contain memory ops; no register-only empty countdown loop found. The two large loops (.L3 53 lines/11 mem ops, .L4 55 lines/23 mem ops) were not traced for SR-sensitive addressing under a dual compile. Provisional COINCIDENTAL pending compiler diff."}},"main:08095680":{"schema_version":1,"namespace":"main","address":"0x08095680","status":"measured-draft","owner_bytes":248,"executable_owner_bytes":248,"candidate_bytes":248,"differing_halfwords":90,"wrong_instructions":84,"domain":"For each id 8..65, looks up a matching battle-action descriptor and its object-table slot, and, when a packed field of the global battle work state clears a game flag and range-check, repositions the matched object and sets its mode.","bounded_search":{"mode":"hand-traced","attempted":6,"exact":false,"reason":"The 7223/10000 family-transplant guess (battle/presentation/set_actor_modes.c) is a confirmed false positive: shape-only register-shuffle prologue match, unrelated Data_03001e74 global, zero shared call targets. The genuine subsystem, found by hand-tracing the retained assembly's own call targets and constants, is the BattleAction_FindDescriptor/BattleEffect_FindDescriptor/BattleEffect_RunDescriptorAction cluster (0x0808d394/0x0808d48c/0x0808d5dc): this owner calls Func_0808d394 (registered name BattleAction_FindDescriptor) by the same loop id it also feeds to ObjectTable_Get (Func_0808ba1c), against the same Data_02000240 global those three siblings use. The struct field at Data_02000240+0x1f4 matches battle_effect_runtime.h's already-declared BattleWork.object_id exactly, and games/gs1/src/battle/effects/objects/start_effect_22.c's exact, adopted `Data_02000240[125]` confirms that same offset/array-style access is the project's real idiom for it. The matched object's writes at +0x14 and +0x55 line up exactly with object_runtime.h's ObjectRuntime.terrain_height and .flags. Both position-setter and mode-setter calls (0x080090f0, 0x08009080) are far-call veneers per the project-wide _call_via_rN-adjacent idiom; 0x08009080's real target (0x0800c300) is already named Object_SetMode in types.h, and 0x080090f0's real target (0x0800d130, retained in games/gs1/src/object/motion/set_position_and_reset_motion.c) sets object->x/y/z and clears target_x/y/z/velocity, matching the (obj,x,y,z) call shape traced here exactly.","notes":["Structure now matches closely: call order, branch targets (several byte-identical), the 141<<2 offset-564 synthesis, and the object_id-pointer hoist ahead of the loop all reproduce the reference. The residual is address-computation register choice (reference keeps the Data_02000240 base in r5 for the whole prologue; this candidate's allocator puts it in r6/sl and the difference cascades through nearly every register letter downstream) plus one load-pattern mismatch: marking the packed flag word's two same-address reads (unsigned low-12-bits, signed high-nibble) as volatile is required to stop this compiler's CSE from merging them into one load the way the reference visibly does not, but it also changes the signed half's codegen from a single ldrsh to a 3-instruction ldrh+lsls+asrs, which the reference does not show either. Tried and rejected: several -fno-{gcse,strength-reduce,expensive-optimizations,cse-follow-jumps,rerun-cse-after-loop,regmove,thread-jumps,cse-skip-blocks} flag combinations, both --family alternatives (gcc296, old-agbcc), and non-volatile M2C_FIELD/array-index/local-pointer phrasings of the Data_02000240 accesses -- none changed the base-register or double-load residuals.","Verification was cut short mid-session by shared-worktree infrastructure damage: roms/gs1-en.gba (and gs1-ja.gba) became self-referential symlinks partway through this session, breaking every fresh (non-cached) candidate-show run. The 248/100/78 figure recorded at that time turned out to be unreliable -- a fresh, forced (non-cached) recompile in a clean worktree against the confirmed-restored ROM, done independently after the session recovered, measured 248/90/84 instead. The cache apparently held a result computed during the corruption window rather than a genuinely stale-but-valid entry. 90/84 is the authoritative, re-verified score; the source and analysis above are otherwise unchanged."]},"notes":["Recovered only from retained owner assembly (games/gs1/asm/08095680.s), the approved GS1-EN ROM, already-adopted exact C under games/gs1/src/ (object/table/get.c, battle/effects/objects/start_effect_22.c, object/motion/set_position_and_reset_motion.c), in-repo headers (battle_effect_runtime.h, object_runtime.h, types.h, game_flags.h), and the approved compiler. No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","The residual exceeds the adoption gate (differing_halfwords must be 0). Retained assembly remains authoritative and this draft claims zero DONE bytes.","No descriptive name was registered: the subsystem (battle-action/effect descriptor dispatch) is well evidenced, but the specific gameplay action this owner performs is not confident enough for a semantic function name yet."]},"main:08095c08":{"schema_version":1,"namespace":"main","address":"0x08095c08","status":"proven-retained","owner_bytes":456,"executable_owner_bytes":456,"candidate_bytes":456,"differing_halfwords":7,"wrong_instructions":0,"classification":"battle_effect_compiler_scheduling_mismatch","resolved_asm_classification":{"kind":"battle_effect_compiler_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":396,"core_identical":true,"starts":{"ja":"0x0808cbf0","en":"0x08095c08","de":"0x080992a4","es":"0x0809ac94","fr":"0x0809ac94","it":"0x08095c94"}},"domain":"Updates one of the 24 caller-created effect slots through radial movement, a hidden delay, a second radial target, and final cleanup.","expressed":["initial radial target selection from the slot origin","copying the linked source object's two mode bits to the particle object","target-arrival state transitions and the 40-frame callback delay","hiding and restoring the particle before targeting the source position","the state-five cleanup path and both locally evidenced audio cues"],"bounded_search":{"safe_heat_walks":{"runs":4,"requested_candidates_per_run":5000,"attempted_candidates":20000,"compile_failures":0,"exact_candidates":0,"best_differing_halfwords":11},"classic_exact_only_heat_walk":{"requested_candidates":10000,"attempted_candidates":10000,"compile_failures":142,"exact_candidates":0,"best_differing_halfwords":7,"best_wrong_instructions":0,"best_shape":"a do-while-zero spelling around the origin-X assignment"},"current_approved_compiler_classic_heat_walks":{"runs":2,"seeds":[101,907],"requested_candidates_per_run":20000,"attempted_candidates":40000,"compile_failures":587,"exact_candidates":0,"best_differing_halfwords":7,"verdict":"generic AST mutation axis closed after two independent runs without improvement"}},"compiler_axes":{"tied_at_readable_baseline":["routed","gcc296","-fno-schedule-insns","-fno-gcse","-fno-rerun-cse-after-loop","-fno-cse-follow-jumps","-fno-cse-skip-blocks","-fno-sched-interblock","-fno-sched-spec","-fno-sched-spec-load","-fno-sched-spec-load-dangerous","-fno-strength-reduce","-O3"],"regressed":["-fno-schedule-insns2","-fno-regmove","-fno-expensive-optimizations","old-agbcc"]},"residual":[{"scope":"state-zero transition into linked-object mode-bit copying","candidate":"increments and stores the state byte before copying the source pointer from r9 to r1","reference":"copies the source pointer first, then increments and stores the independent state byte","equivalence":"the register move neither reads nor writes the state pointer or state byte","resynchronization":"both streams have identical registers and memory before loading source->linked_object"},{"scope":"state-two origin capture and object mode-bit clearing","candidate":"loads the object flag before materializing -13 and stores the masked flag before adding 71 to the independent effect pointer","reference":"materializes -13 before the independent object-flag load and forms effect+71 before storing the masked object flag","equivalence":"the swaps exchange only independent register work and an object-byte store with an address-only add; all values and memory writes are identical","resynchronization":"both streams match again before storing 4 to effect->flags"}],"rejected_experiments":[{"experiment":"spell the state-two object-flag clear through the already-live object_flags carrier used by the exact state-zero and state-one blocks","result":"GCC emits the same 456-byte candidate and the same seven differing halfwords; the explicit temporary is coalesced before scheduling and does not change either residual hunk"},{"experiment":"sweep GCC 2.96's shipped post-reload scheduler sub-options across both retained family members","result":"enabling and disabling interblock scheduling, speculative scheduling, speculative loads, and dangerous speculative loads is byte-neutral for both owners (7 and 5 differing halfwords); the family mismatch is not controlled by those route flags"},{"experiment":"name an alias of source before incrementing the state byte","result":"the alias is eliminated and the seven-halfword schedule is unchanged"},{"experiment":"preload source->linked_object through a named carrier before incrementing the state byte","result":"moves both the high-register copy and dependent load ahead of the increment, disturbs the low-register roles, and regresses to 11 differing halfwords / 12 wrong instructions"}],"notes":["The retained ordinary-C reconstruction emits the complete 456-byte owner extent, all calls, branches, registers, memory operations, constants, and literal words. A do-while-zero lifetime around the state-two origin-X capture reproduces the best known seven-halfword schedule; only the two localized scheduling hunks differ.","The seven-halfword shape was independently rediscovered from the recorded classic-search verdict and is now the canonical candidate. No searched ordinary-C source emits the retained order exactly.","Relocation-aware comparison of the independently assembled retained owner proves all 396 unmasked core bytes identical across the six GS1 editions.","The caller at 0x08095dd0 installs this callback on 24 effect slots and later advances those slots to states two and five; the name and domain do not infer an effect identity beyond that local behavior.","Recovered only from retained owner assembly, approved local GS1 ROMs, local callers and effect-slot types, and the approved compiler. No GS2 evidence or external game source was used."]},"main:08095dd0":{"schema_version":1,"namespace":"main","address":"0x08095dd0","status":"proven-retained","owner_bytes":460,"executable_owner_bytes":460,"candidate_bytes":460,"differing_halfwords":2,"wrong_instructions":0,"classification":"battle_effect_compiler_scheduling_mismatch","resolved_asm_classification":{"kind":"battle_effect_compiler_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":284,"core_identical":true,"starts":{"ja":"0x0808cdb8","en":"0x08095dd0","de":"0x0809946c","es":"0x0809ae5c","fr":"0x0809ae5c","it":"0x08095e5c"}},"domain":"Runs the locally linked phased-radial-particle callback across 24 effect slots, advances the active slots through states two and five, and restores the target object before cleanup.","expressed":["the source and target object lookup and early return","the observed audio and motion sequence on the source object","normalizing the source position and configuring all 24 effect slots","installing BattleEffect_UpdatePhasedRadialParticle as each slot callback","the delayed state-two and state-five transitions for active slots","restoring the target object's callback and scale before effect cleanup"],"bounded_search":{"safe_heat_walk":{"requested_candidates":20000,"attempted_candidates":20000,"compile_failures":896,"exact_candidates":0,"best_differing_halfwords":11,"best_wrong_instructions":0},"classic_exact_only_heat_walk":{"requested_candidates":10000,"attempted_candidates":10000,"compile_failures":270,"exact_candidates":0,"best_differing_halfwords":9,"best_wrong_instructions":0,"best_shape":"a do-while-zero spelling around EffectSlot_SetObjectMode"},"current_approved_compiler_classic_heat_walks":{"runs":2,"seeds":[211,811],"requested_candidates_per_run":20000,"attempted_candidates":40000,"compile_failures":908,"exact_candidates":0,"best_differing_halfwords":8,"verdict":"generic AST mutation axis closed; lower structural-row variants regressed to nine differing halfwords and were rejected"}},"compiler_axes":{"tied_at_readable_baseline":["routed","-fno-schedule-insns","-fno-sched-interblock","-fno-sched-spec","-fno-sched-spec-load","-fno-sched-spec-load-dangerous","-fno-strength-reduce","-fno-expensive-optimizations","-fregmove","-O3"],"regressed":["-fno-schedule-insns2","-fno-gcse","-fno-rerun-cse-after-loop"]},"residual":[{"scope":"arming the source-object callback","candidate":"shifts the already materialized 0x80 argument into 0x4000 before materializing the zero argument","reference":"materializes the independent zero argument between the 0x80 materialization and its shift","equivalence":"the shift writes r1 and the zero materialization writes r2; neither reads the other register","resynchronization":"both streams have identical r0, r1, and r2 at the following call"}],"notes":["The retained ordinary-C reconstruction emits the complete 460-byte owner extent with identical calls, branches, registers, memory operations, constants, literal words, and control flow outside one two-halfword instruction-ordering tie.","Removing synthetic do-while-zero wrappers around the callback call and the two state-loop scopes preserves ordinary C89 block lifetimes, makes the entire state-five loop exact, and reduces the candidate from five to two differing halfwords. Using the function parameter directly also removes an unnecessary alias without changing the emitted register roles.","Relocation-aware comparison of the independently assembled retained owner proves all 284 unmasked core bytes identical across the six GS1 editions.","The exact caller at 0x080955b0 selects this runner for page two, and this owner installs the locally named callback at 0x08095c08 on each of 24 slots before later advancing those slots to states two and five.","Recovered only from retained owner assembly, approved local GS1 ROMs, local callers and exact battle-effect sources, and the approved compiler. No GS2 evidence or external game source was used."],"rejected_experiments":[{"experiment":"compile the owner under its era-appropriate semantic identifier instead of the Func_08095dd0 ABI identifier","result":"GCC emits the same callback-argument order and the same two-halfword residual; compiler symbol hashing does not control this scheduling tie"},{"experiment":"materialize the callback zero argument in a fresh narrow block local","result":"unlike reusing the long-lived value carrier, the fresh local is byte-neutral: GCC folds it to the same late r2 materialization and the candidate remains at five differing halfwords"},{"experiment":"give the state-five loop a fresh narrow active-slot pointer instead of reusing the function-scope slot_state carrier","result":"the pointer receives the same r2 allocation and GCC still schedules the independent constant-five materialization first; the complete candidate remains byte-for-byte unchanged"},{"experiment":"regenerate the owner with aggregate-plus-exact-family m2c context from the seven exact siblings in unit-08095a44","result":"m2c independently reconstructs the same direct callback call and separate state-loop carriers; after applying the known shared types, these are the same source dimensions already tested and expose no missing structural or type repair"},{"experiment":"sequence the state-five slot-base assignment before producing constant five in one comma expression","result":"GCC correctly proves the assignments independent and emits the same five-halfword schedule; the expression adds no real data dependency"},{"experiment":"sweep GCC 2.96's shipped post-reload scheduler sub-options across both retained family members","result":"enabling and disabling interblock scheduling, speculative scheduling, speculative loads, and dangerous speculative loads is byte-neutral for both owners (7 and 5 differing halfwords); the family mismatch is not controlled by those route flags"},{"experiment":"extract the two active-slot loops into a static inline helper taking the state value","result":"changes the surrounding allocation and regresses to 48 differing halfwords / 52 wrong instructions"},{"experiment":"add the independently corroborated three-s32 prototype for ObjectMotion_ArmCallback","result":"no change from the eight-halfword candidate"},{"experiment":"explicit s32 mark = N local (2, 5) replacing the inline constant in each block","result":"a shared or function-scope carrier regresses to 13 differing halfwords / 4 wrong instructions; separate narrow block locals instead close the state-two hunk and preserve the reference r1 allocation"},{"experiment":"hoisting remaining=23 above WaitFrames(100) before the second block instead of inside it","result":"no change from the in-block reorder; the scheduler window does not extend past the WaitFrames call"},{"experiment":"source-order, do-while-zero, nested-scope, and comma-expression barriers around the state-five slot-base copy","result":"all compile identically at five differing halfwords; GCC schedules the independent r1 constant before the sl-to-r2 copy in this later allocation context"},{"experiment":"materialize the callback's zero argument through the existing value carrier","result":"extends the carrier lifetime across the function and regresses to 232 differing halfwords / 72 wrong instructions"}],"score":{"differing_halfwords":2,"note":"Ordinary block scopes make both state loops exact. One independent callback-argument scheduling tie remains and wrong_instructions stays zero."}},"main:080965a8":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080965a8","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":572,"score":{"measured":"2026-08-26","candidate_bytes":580,"reference_bytes":572,"differing_halfwords":194,"wrong_instructions":54,"class":"missing-extra-code","current_note":"The candidate now expresses every reference call, including the previously omitted Object_SetMode(child,0) between Func_08009240 and Func_080091e0. That correctness repair exposes the real remaining allocator/frame mismatch: candidate 580 bytes versus the 572-byte reference, with a 48-byte rather than 52-byte frame and different long-lived homes for the child-array and context carriers. The larger raw residual is retained because omitting observable behavior to improve a similarity score is not acceptable.","note":"Page-1 sibling of BattleEffect_FinishHeavyImpact (battle_owner_21.c's Func_080955b0 dispatch table): same source object lookup, WaitFrames/Audio_PlayCue/Func_080925cc opening beats, and the same base+0x58/count=23 EffectSlot spawn tail and NormalizeVector call, all byte-identical in the candidate. The reference additionally spawns 8 child objects in a do-while(count=7) loop via Func_080090c8 (a type read through a two-level pointer chase at ctx+80/+40), links them through Func_08096c48 into an accumulator, then advances ctx's y by 0x80000 for 15 frames, destroys ctx and all 8 children, and conditionally calls Func_08003f3c before the tail. Most of that shape is expressed and byte-matches; the residual concentrates in two spots: (1) the compiler spills the ctx/child pointer walk to sp+20 and keeps a second live copy in fp for reuse by the final destroy loop, where the candidate instead recomputes the array address each time (costs ~20 halfwords across two hunks and the resulting frame-size/offset cascade, sp+48 vs sp+52); (2) a call the reference makes between Func_08009240(child,9) and Func_080091e0(child,0) -- almost certainly Object_SetMode(child,0) given the shared bl target address with the later Object_SetMode(Object_GetById(...),28) call -- could not be reproduced without a much larger regression (adding the call as a plain statement pushed differing_halfwords from 89 to ~190 by disturbing the loop's r8/sl register scheduling); it is left out and recorded as a rejected experiment. All literal pool addresses (0x03001f30, 0x00204084, 0x08096575, 0x02000240, 0x0809641d) and every constant (240, 0xF000, offsets 6/24/28/35/85/90/104/108) are confirmed exact against the disassembly."},"rejected_experiments":[{"experiment":"Insert Object_SetMode(child, 0) between Func_08009240(child,9) and Func_080091e0(child,0), matching the reference's extra adds/movs/bl fff72ad8 sequence","result":"regresses from 89 to 190 differing halfwords (54 wrong instructions) -- the added statement shifts register pressure and the compiler rescheduled the whole r8/sl linked-list-accumulator tail of the loop body differently; the missing call is left unexpressed rather than accepted at a worse global score"},{"experiment":"Introduce a persistent children_ptr = children; local reused by both the write loop and the final 8-item destroy loop (mirroring the reference's fp-resident array base)","result":"identical 89 halfwords -- the compiler recomputes the array address at each use point regardless (does not promote the alias into fp), so the source-level reuse has no codegen effect here"},{"experiment":"Wrap Func_080958a8()/base=.../Func_080b0048() in a do-while(0) block matching finish.c's exact template idiom, to force base's stack spill (str r3,[sp,#4]) instead of fp residency","result":"identical 89 halfwords -- no effect on register allocation for base"},{"experiment":"Swap WaitFrames(1); count--; order in the y+=0x80000 tail loop","result":"identical 89 halfwords -- pure scheduler artifact, independent instructions reordered by the compiler regardless of source order"},{"experiment":"--family old-agbcc","result":"284 differing halfwords, 279 wrong instructions -- far worse, wrong compiler family for this owner"},{"experiment":"-fno-schedule-insns2 flag","result":"114 differing halfwords -- worse than the routed/gcc296 baseline of 89"},{"experiment":"-fno-expensive-optimizations flag","result":"89 differing halfwords but wrong_instructions rises to 41 -- no net improvement"},{"measured":"2026-08-29","experiment":"Replace slot/children_ptr split with a single children_ptr pointer reused (post-increment) in both the spawn loop and the destroy loop, removing the separate slot variable","result":"regresses to 203 differing halfwords / 113 wrong instructions -- disturbs the array-address recomputation shape entirely; rejected"},{"measured":"2026-08-29","experiment":"Convert the base+0x58/base+152 pointer-chase read at the top of the function into an alternate but semantically identical parenthesization/spacing (single combined cast chain)","result":"regresses to 197 differing halfwords -- sed-applied reformat altered operator grouping enough to change codegen; rejected"},{"measured":"2026-08-29","experiment":"Convert the spawn do-while(count=7) loop into an equivalent for(count=7; count>=0; count--) loop","result":"identical 89 halfwords -- do-while and for produce identical codegen here, no effect on the base/children_ptr register-vs-stack allocation","kept":false},{"measured":"2026-08-29","experiment":"Type-width/style sweep on base, ctx, prev, acc, type, child, work, state (s32 vs void* vs s8*, cast placement variants, hex vs decimal literal spellings, arithmetic-equivalent expression rewrites for count/last/state/work stepping, hoisting Data_02000240[125] into a temp, wrapping counters in identity arithmetic like count=24-1) -- roughly 30 distinct variants","result":"all identical 89 halfwords (a few malformed sed rewrites regressed and were discarded, not counted as real hypotheses) -- confirms the residual is the compiler's own register allocator/scheduler decision (base kept in fp vs reference's stack spill at sp+4/sp+8, and a second live copy of the children array base pointer in fp for the destroy loop) and is not reachable through any C89 source-level restructuring tried; consistent with and reinforces rejected experiments #1-4 above"}],"notes":["2026-08-30 temper correction: Object_SetMode(child,0) is present in the reference and is now expressed. The older score note and rejected-experiment prose describing its omission are historical and superseded by score.current_note; correctness takes precedence over the smaller incomplete score.","2026-08-31 retained-assembly proof: with Object_SetMode(child,0) restored, the complete candidate has equal branch topology and accounts for every reference call, argument, literal, constant, field access, loop, and observable store. The residual is confined to the compiler's 48-byte frame and fp-resident context/children carriers versus the reference's 52-byte frame and equivalent sp+4 spill/array-base homes, plus the resulting pool displacement. The allocator decoder names the interlocked acc/count/carrier roles but finds no unique source edit; the bounded pointer, loop, type, statement-order, lifetime, compiler-family, and pass probes recorded above preserve the residual or regress. Relocation-normalized cross-edition verification proves all 384 core bytes identical across all six GS1 editions (42 relocations and five literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/080965a8.s, a hand-written .syntax unified Thumb listing with its own provenance comment citing build_asm.ts/control-flow-scan byte verification), the approved local ROM, the byte-exact template/sibling sources games/gs1/src/battle/effects/heavy_impact/finish.c and games/gs1/recon/en/main/08095dd0.c (BattleEffect_RunPhasedRadialParticleSequence), games/gs1/src/object/spawn.c and games/gs1/src/object/replace_resource_entry.c for callee signatures/semantics, games/gs1/src/battle/effects/run_page_effect_for_slot.c for the caller's dispatch context (page 1 of Func_080955b0's four-way branch), in-repository headers (types.h, fixed_math.h, effect_0809b11c.h, battle_calc.h), and the approved compiler via tools/compiler candidate-show.","Every callee address in the retained listing was cross-checked against types.h's #define table (Object_GetById=Func_08092054, WaitFrames=Func_080030f8, Audio_PlayCue=Func_080f9010, Object_SetMode=Func_08009080, NormalizeVector=Func_080974d8, ObjectMotion_ArmCallback=Func_08092adc, EffectSlot_SetObjectMode=Func_0809ba70, EffectSlot_SetCallback=Func_0809ba7c, BattleEffect_ClearActiveSlotsAndScheduleUpdates=Func_080958e4) and against the candidate-show tool's own bl-target diff, so every named call in the draft is address-verified, not guessed.","Function name kept as Func_080965a8 (undetermined semantic name): battle_owner_21.c declares it only as void Func_080965a8(s32) alongside its three named siblings, and no header or recon record in the tree assigns it a name.","This candidate claims zero DONE bytes."]},"main:08097194":{"schema_version":1,"namespace":"main","address":"0x08097194","status":"proven-retained","owner_bytes":248,"candidate_bytes":248,"differing_halfwords":7,"wrong_instructions":8,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"domain":"Removes active scene-effect objects, waits briefly for two effect callbacks to drain, restores the saved scene position, and releases the effect asset.","bounded_checks":["Recovered the battle global cells as one registry walk rooted at 0x03001f30: the runtime and position pointers are loaded from root-116 and root-192, exactly matching the reference's single literal and two base-relative loads. Reusing the exhausted 24-object loop counter for the later 64-slot scan recovers the reference's r5 lifetime, full four-high-register save set, and exact 248-byte extent. Naming both active update callbacks and ordering the waited/active/scan initializers from their reference lifetimes closes the remaining independent scheduling rows. Fresh score: 7 differing halfwords and 8 wrong instructions, all confined to the reciprocal r6/r7 scene-object/active-field cursors in the first loop.","The old 109-halfword whole-function register permutation was not an irreducible allocator floor: it was caused by two missing source identities\u2014the shared pointer-registry base and the reused loop counter. After those repairs, only one localized reciprocal r6/r7 cursor choice remains. Explicit duplicate object cursors, byte/signed-byte cursors, declaration order, and assignment order preserve that swap or regress the signed-byte load, so no register forcing was retained."],"notes":["Recovered from retained owner assembly, all local callers, adjacent battle-effect state, and the approved compiler through the exact-family workbench.","Every caller invokes this owner without arguments; the generated two-argument signature was inherited from the unrelated exact template and has been corrected.","Generated register, stack-slot, and control-flow labels were replaced with role-based names before retaining the candidate.","Typed global-state layouts, the shared pointer-registry walk, and a signed activity byte produce the exact owner extent and improve the raw m2c draft from 119 to 7 differing halfwords.","The earlier 5,000-candidate safe family-template walk produced no improvement because it did not cover registry-base recovery or counter-identity reuse; those two evidence-named repairs account for the subsequent reduction.","2026-09-01 permanent classification audit: canonical GCC 2.96, gcc296-family routing, no-regmove, no-schedule-insns, no-GCSE, no-CSE-follow-jumps, rerun-CSE-after-loop, and no-expensive-optimizations all preserve the exact 248-byte candidate and seven-halfword/eight-instruction reciprocal r6/r7 cursor floor. No-schedule-insns2 regresses to 27 differing halfwords, no-strength-reduce to 74, and old-agbcc to 119. The annotation-free permuter rejects the residual because it cannot identify one unique safe source repair for the paired cursor/waited roles; prior explicit duplicate cursor, byte-pointer, signed-byte-pointer, declaration-order, and assignment-order probes preserve or regress it.","Cross-edition verification using the exact retained object locates the owner in JA 0x0808e17c, EN 0x08097194, DE 0x0809a830, ES/FR 0x0809c220, and IT 0x08097220. All 196 bytes outside six call relocations and seven literal fields are identical across all editions.","The complete ordinary-C semantics, exact extent, branch topology, calls, literals, accesses, and all behavior outside the reciprocal first-loop cursor allocation are proved. Forced registers, compiler barriers, inline assembly, and forced scheduling are prohibited, so the byte-exact structured assembly is retained under the existing battle-effect allocation-module class."],"compiler_probe":{"baseline_differing_halfwords":7,"neutral":["gcc296-family","-fno-regmove","-fno-schedule-insns","-fno-gcse","-fno-cse-follow-jumps","-frerun-cse-after-loop","-fno-expensive-optimizations"],"regressed":{"-fno-schedule-insns2":27,"-fno-strength-reduce":74,"old-agbcc":119}},"cross_edition":{"size":248,"relocation_bytes":24,"literal_bytes":28,"core_bytes":196,"core_identical":true,"starts":{"ja":"0x0808e17c","en":"0x08097194","de":"0x0809a830","es":"0x0809c220","fr":"0x0809c220","it":"0x08097220"}},"decision":"Retain the byte-exact structured assembly as a proven battle-effect compiler-allocation module. The complete ordinary-C reconstruction remains the semantic source artifact; all 248 owner bytes count as DONE."},"main:08097384":{"schema_version":1,"namespace":"main","address":"0x08097384","status":"proven-retained","owner_bytes":264,"executable_owner_bytes":264,"candidate_bytes":264,"differing_halfwords":68,"wrong_instructions":86,"cross_edition":{"object_bytes":264,"relocation_bytes":40,"literal_bytes":52,"relocation_normalized_core_bytes":172,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x0808e36c","en":"0x08097384","de":"0x0809aa20","es":"0x0809c410","fr":"0x0809c410","it":"0x08097410"}},"domain":"Initializes shared graphics and selects the resource variant used by a broad family of battle effects.","expressed":["DMA-copies the primary scene resource block","conditionally copies the alternate scene block when its runtime flag is clear","copies the shared workspace block used by the effect family","selects one of eight resource variants from the active state and available resources","loads the selected shared resource and finalizes effect setup"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate has exact 264-byte extent but remains 68 differing halfwords and 86 wrong instructions away, outside the <=20-halfword admission gate."},"notes":["Independent object analysis proves all 172 relocation-normalized core bytes identical across the six approved GS1 editions.","The helper is shared by at least six recovered battle-effect owners. The residual spans DMA operand allocation and eight unrolled resource checks rather than a localized compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect callers, and the approved compiler. No GS2 evidence or external source was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080974d8":{"schema_version":1,"namespace":"main","address":"0x080974d8","status":"complete-structured-asm","owner_bytes":104,"candidate_bytes":104,"differing_halfwords":2,"cross_edition":{"core_bytes":92,"core_identical":true,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"0808e4c0","en":"080974d8","de":"0809ab74","es":"0809c564","fr":"0809c564","it":"08097564"}},"classification":"ordering","retention":"keep_structured_asm","notes":["The complete owner has two locally evidenced branches: mode 3 converts the helper result to 16.16 coordinates; the other mode subtracts the masked scene origin from an existing position.","Reusing the address of Data_03001ebc to reach the related pointer at address minus 76 repairs every literal, register allocation, and instruction outside one store/load pair.","The only residual is `str r3,[r6]` before `ldr r2,[r6,#4]`; the reference emits those two independent instructions in the opposite order.","Two bounded classic searches evaluated 50,000 ordinary-C candidates without improving the two-halfword residual; scheduling, GCSE, regmove, and expensive-optimization diagnostics also produced no exact candidate.","Cross-edition analysis proves all 92 normalized core bytes identical in JA, EN, DE, ES, FR, and IT. Retained assembly is permanent under the repository's structured-assembly contract.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:080983a0":{"schema_version":1,"namespace":"main","address":"0x080983a0","status":"proven-retained","owner_bytes":288,"candidate_bytes":312,"differing_halfwords":124,"classification":"hidden_register_context_caller_module","notes":["The caller constructs the scene-coordinate field address in r8 and preserves it through the call to 0808f32c; that callee reads incoming r8 before defining it while taking no ordinary argument for the value. Ordinary C cannot express that caller/callee contract without a fixed register or inline assembly, both disallowed, so the byte-exact retained assembly is Proven ASM.","This complete semantic draft reconstructs the battle-effect setup, scene-coordinate transfer, display setup, optional helper dispatch, state publication, nineteen-frame update loop, and delayed callback.","The candidate is 24 bytes long and diverges in long-lived register allocation and literal-pool placement; retained assembly remains authoritative and this draft claims zero bytes.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"line 12: mov r6,r9 vs mov r6,r8 plus differing push set and dozens of real operand mismatches; class missing-extra-code, wrong_instructions=120","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."}},"main:08098698":{"schema_version":1,"namespace":"main","address":"0x08098698","status":"measured-draft","owner_bytes":432,"candidate_bytes":438,"differing_halfwords":207,"wrong_instructions":229,"family":{"exact_c_callers":["main:080985a8","main:080985fc"],"exact_c_caller_bytes":240,"aggregate_reusable_bytes":672},"cross_edition":{"core_bytes":356,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x0808f68c","en":"0x08098698","de":"0x0809bd40","es":"0x0809d730","fr":"0x0809d730","it":"0x08098730"}},"notes":["The exact ObjectVisual_CopyAttributes operation at games/gs1/src/object/visual/copy_attributes.c proves the 10-bit visual-attribute merge uses an explicit 0xfffffc00 carrier and left/right extraction, not independent 16-bit 0xfc00/0x03ff masks. Transplanting that already-exact operation and correcting the following high-nibble copy to byte offset 9 (the high attribute byte, as the retained owner shows) removes six surplus candidate bytes and the two false mask literals. The remaining broad register cascade precedes this now-exact semantic block; fresh candidate is 438/432 bytes with equal conditional-branch structure under the allocator decoder.","Complete typed producer shared by both exact-C burst-particle entry paths. It spawns twenty-four objects around the current battle target, copies the embedded visual child traits, configures scale, velocity, animation and mode, then randomizes each object around the battle origin with variant-specific positioning.","The exact 84-byte main-object path and exact 156-byte full-effect path establish the family entry conditions, random-vector convention, waits, sounds, and sole call contract; the family covers 672 executable bytes.","The first readable model compiled to 444 bytes against the 432-byte owner. Exact-corpus stamping has reduced it to 438 bytes; the broad candidate still claims zero bytes and is not eligible for permanent classification.","Independent relocation-aware matching proves all 356 normalized core bytes identical at unique JA, EN, DE, ES, FR, and IT anchors. Fifteen call relocations and four literal fields explain the regional raw differences.","Recovered only from retained GS1 assembly, the local exact-C callers and particle/object analogues, the approved compiler, and the six local GS1 editions. No GS2 or external source was used."]},"main:08098848":{"schema_version":1,"namespace":"main","address":"0x08098848","status":"proven-retained","owner_bytes":268,"candidate_bytes":268,"differing_halfwords":2,"wrong_instructions":0,"classification":"compiler_local_scheduling_mismatch","resolved_asm_classification":{"kind":"compiler_local_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"objdiff_class":"ordering","family":{"family_matcher_top_guess":"main:08092708 (battle/effects/objects/run_rising_sequence.c), score 7485/10000, LOW confidence","family_matcher_verdict":"false positive, confirmed by reading the source","real_siblings":["main:08098954 (RunBattleEffect07, measured-draft, 108 differing halfwords)","main:08099da4 (unnamed mode-11 handler, measured-draft/m2c output)"],"real_callees_in_src":["main:08098a84 SpawnItemBreakEffectMode3 (games/gs1/src/battle/effects/item_break/spawn_mode_3.c, exact)","main:080981b0 UpdateRisingParticleBurst (games/gs1/src/battle/effects/rising_particle_burst/update.c, exact)","main:0809748c BattleEffect_PrepareBufferInterpolation (games/gs1/src/battle/effects/interpolate/prepare.c, exact)"]},"notes":["The family-transplant matcher's top guess (main:08092708, battle/effects/objects/run_rising_sequence.c, 7485/10000, below the 7500 threshold anyway) is a false positive: same register-shuffle prologue shape, zero shared callees with this owner. Object_GetById/Object_SetPosition/ObjectMotion_ArmCallback/BattleEffect_SpawnBurstParticle/Object_CommitPosition/BattleEffect_PlayQueuedSound (run_rising_sequence.c's callees) do not appear anywhere in 08098848.s. This confirms the session-wide pattern described in the task: shape-only matches in this cluster are unreliable even near/above threshold.","The real identity was found by hand-tracing 08098848.s and cross-referencing its literal pool constant 0x03001f30 (Data_03001f30, the shared battle-effect scene pointer) and callee addresses against already-registered names in games/gs1/source-paths.json and types.h. This owner is the case-7 handler of the second ('targeted') battle-effect dispatcher Func_08096960 -- 'case 7: Func_08098848(target_id); break;' -- the sibling of RunBattleEffect07 (0x08098954, case 7 of the *first* dispatcher RunBattleEffect/0x08096810). The incoming target_id argument (r0) is loaded by every case in Func_08096960's switch but is never read anywhere in 08098848.s (r0 is only ever written before its first use), matching the same already-adopted pattern in RunBurstParticleMainObject (0x080985a8) and StartOrbitingParticleEffect (0x08099128), both of which are declared void(void) in their exact C despite being called with an argument.","Strongest corroborating evidence is main:08099da4 (the mode-11 sibling in the same dispatcher, an unresolved m2c-workbench draft): its opening ~15 instructions are almost line-for-line identical to this owner -- same guard (scene->0x14 'child' != 0), same Func_08097384() call, same main_object->0x68 = child link, same Object_SetCallback(main_object, 0x0809f0bc) call, same +0x200000/-0x200000/+0x100000 position construction from scene->{4,8,12}. The only structural difference at that point is which spawn helper is used (SpawnItemBreakEffectMode1 there vs SpawnItemBreakEffectMode3 here) -- and this owner's choice of SpawnItemBreakEffectMode3 matches RunBattleEffect07's own choice for the same mode-7 spawn. child->0x6c is confirmed as a callback-function-pointer field by three independent already-adopted or drafted sources (item_break/start.c's parent+0x6c, item_break/update_fragment.c's Object_SetCallback callers, and 08099da4's identical 'M2C_FIELD(child, ..., 0x6C) = 0x08096B89' assignment -- the exact same constant this owner writes).","Behavior: guard on scene->child; link main_object->0x68 = child; retarget main_object's callback to Data_0809f0bc; spawn two SpawnItemBreakEffectMode3 anchors mirrored +/-0x200000 in x around the scene origin (angles 0x8000 and 0, matching RunBattleEffect07's own anchor pair exactly); WaitFrames(15); launch each live anchor via ObjectMotion_SetTargetPositionFromMagnitudeAngle(anchor, 0xe0000, anchor->angle); Object_CommitPosition(anchors[0]); point child->0x6c at ObjectGroup_ApplyRandomChildValues; Audio_PlayCue(130); set child->0x55 = 4; then, guarded on both anchors being live, raise anchors[0]->y, anchors[1]->y, and child->y together by 0x4000 per WaitFrames(1) tick until child->y exceeds its starting value by 0x200000; finally hand both anchors to the already-exact UpdateRisingParticleBurst (which itself plays a cue, keeps rising, spawns its own particle spray, and destroys the object it was given), and call BattleEffect_PrepareBufferInterpolation unconditionally.","Recovered from a from-scratch hand-trace of the retained assembly (no m2c workbench run was needed once the field/constant cross-references above locked the structure), verified instruction-by-instruction against games/gs1/asm/08098848.s and iterated with candidate-show --align down from an initial 54 differing halfwords to 2. The two fixes that mattered: (1) computing x/y/z into named scalars used directly by the first SpawnItemBreakEffectMode3 call, while re-reading the same values from the on-stack position[] array for the second call -- mirroring exactly what 08099da4's independent m2c draft already does for its own twin call pair; (2) writing the post-loop overflow guard as the literal inline comparison 'start_y <= start_y + 0x200000' (evaluated twice, once in the guard and once in the loop condition) instead of hoisting it into a named target_y local, so GCC-2.96 -O2 resynthesizes the 128<<14 immediate at each use site the way the reference does instead of caching it.","Remaining 2-halfword / 0-wrong-instruction residual is a pure GCC-2.96 -O2 scheduler ordering swap: the reference issues the reload of anchors[0] (needed two instructions later for the null-check guard) ahead of the unconditional store to child->0x55, while every source statement ordering tried here (store-before-load, load-before-store, an explicit named temporary for anchors[0], hoisting the byte-flag address into its own pointer variable) either reproduces the same swap in the other direction or regresses the surrounding codegen by 8 bytes. objdiff reports class=ordering with wrong_instructions=0, i.e. the same instructions, adjacent, swapped -- the same flavor of irreducible local-scheduler residual already documented on the sibling RunBattleEffect07 (0x08098954, 08098954.json), which never got fully to zero either. Not adopted: CONTRIBUTING's gate is differing_halfwords == 0.","Recovered only from retained GS1 assembly, already-registered names in games/gs1/source-paths.json and games/gs1/include/types.h, already-adopted exact sibling C (item_break/{start,spawn_mode_3,update_fragment}.c, rising_particle_burst/update.c, run_item_break_sequence.c, burst_particles/run_main_object.c, orbiting_particles/start.c), the two in-repo unresolved drafts referenced above, and the approved compiler. No other decompilation project or external disassembly was consulted."],"bounded_source_probe":{"tool":"tools/shape-search/search.ts","depth":6,"legal_variants":10,"best_differing_halfwords":2,"verdict":"miss"},"compiler_decision":{"dump":"GCC -da pass 23 sched2","source":"alchemy-gcc/agbcc/gcc_arm/sched.c:rank_for_schedule","finding":"The unconditional byte store and independent stack reload are both ready before the following guards. The scheduler's equal-priority tie falls through to original INSN_LUID order; ordinary statement, temporary, and address-hoisting variants preserve that order or change surrounding code generation."},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":202,"core_identical":true,"starts":{"ja":"0x0808f83c","en":"0x08098848","de":"0x0809bef0","es":"0x0809d8e0","fr":"0x0809d8e0","it":"0x080988e0"}},"decision":"Retain the byte-exact structured assembly as a proven local compiler-scheduling mismatch. The complete ordinary-C reconstruction remains the semantic source artifact and all 268 owner bytes count as DONE."},"main:08098954":{"schema_version":1,"namespace":"main","address":"0x08098954","status":"proven-retained","owner_bytes":304,"candidate_bytes":304,"differing_halfwords":108,"wrong_instructions":80,"classification":"battle_effect_twin_compiler_allocation_module","family":{"structural_twin":"main:0809a294","shared_tail":"main:08099da4","aggregate_reusable_bytes":1872},"notes":["This complete typed reconstruction creates two effect-specific anchor objects around the battle origin, configures both, then creates and randomizes twenty-four secondary objects before releasing the anchors.","RunBattleEffect07 and RunBattleEffect11 are 304-byte instruction/control-flow twins. Their call skeletons differ only at the two effect-specific constructor calls, and the same create/configure/release tail recurs inside the 1,264-byte RunBattleEffect05/11 owner.","Using the exact Random16 return type from the local exact-C corpus removes three spurious zero extensions and gives the readable model 296 bytes, 132 differing halfwords, and 94 wrong instructions. This is a broad source-shape baseline, not an exact-C or narrow-residual candidate, and it claims zero bytes.","Instantiating the same typed template for 0809a294 reproduces this score and residual map exactly. A joint explicit-cursor/countdown rewrite regresses both siblings identically, so the readable baseline is retained.","A bounded earliest-divergence matrix found that moving the origin declaration is byte-neutral, while block-scoped pointer/countdown loops preserve the eight-byte deficit and regress the Effect07 residual to 139 differing halfwords / 96 wrong instructions. The deficit is therefore not a simple stack-array declaration or loop-syntax artifact.","Relocation-aware six-ROM matching is ambiguous because the two sibling runners have zero-difference normalized cores. The ambiguity independently confirms the family identity but does not establish a unique per-edition owner correspondence, so no regional claim is made.","Recovered only from retained GS1 assembly, local exact-C object-update analogues, the approved compiler, and the six local GS1 editions. No GS2 evidence was used.","Closed the eight-byte length gap (296 -> 304, matching the reference exactly) by (1) aliasing the second loop's position[] writes through an explicit local pointer (`s32 *pos = position;`) instead of the bare array, and (2) reordering the three origin-field assignment statements in both position-fill sites (top-level: z,y,x; loop body: y,x,z). An exhaustive PERM_GENERAL search over all 6x6x2 = 72 combinations of {top field order} x {loop field order} x {velocity/phase statement order}, on top of the pointer-alias change, confirms 108 differing halfwords / 80 wrong instructions is the floor of this axis space (out/permute/08098954/report.json). The pointer alias is the load-bearing change: without it the candidate stays 8 bytes short regardless of statement order, because gcc only splits the stack array's address into two live ranges (r5 at the top, a fresh r7 copy for the second loop, freeing r5 as loop-body scratch) when a named pointer variable gives it a second, loop-scoped reference point; a bare `position[i]` array access lets gcc keep one dedicated low register for the whole function instead, which is byte-cheaper but not what the reference does.","Remaining 108-halfword residual is concentrated in exactly the register-class swap this pointer alias does not reach: in both loops the reference keeps the walked pointer/position-array-copy in a low register (r7) and pushes the trip counter into a high register (r8, needing the expensive movs/negs/add/mov/cmp five-instruction decrement-and-test idiom), while the candidate's allocator keeps the loop-1 counter in the cheap low register (r7) and the loop-1 anchor pointer in r6/r0 directly, and needs no r8 spill there at all. Tried and empirically ruled out (all re-measured with candidate-show, none beat 108): renaming/duplicating the loop counter (dedicated variable per loop, both directions), an explicit pointer-cursor rewrite of loop 1 mirroring the exact `ObjectDispatch_ApplyValueToChildren` (games/gs1/src/object/dispatch/apply_value_to_children.c) countdown-pointer-walk idiom, a matching named-pointer alias for `anchors` (mirroring the `pos` fix), a temp for `anchor->parameter` before the call, and reassociating the y-field addend operand order. None of these change gcc's choice of which of the two live values gets the low register in loop 1, or fully separate the top-of-function position address from the loop-2 alias's live range (top-level still lands in r7 rather than the reference's r5).","Family proof, 2026-09-01: transferring this exact source shape to the ROM-identical RunBattleEffect11 twin produces the same 304-byte candidate, the same 108 differing halfwords, the same 80 wrong instructions, equal branch topology, and the same allocator-order constraints. The approved GCC 2.96 routes -fno-regmove, -fno-schedule-insns2, -fno-rerun-cse-after-loop, -fno-expensive-optimizations, -fno-gcse, and -fno-strength-reduce preserve the floor or regress it. Together with the exhaustive 72-shape source matrix, this proves a family-invariant allocator floor under ordinary C; retained structured assembly remains the byte-exact implementation."]},"main:08098cd8":{"schema_version":1,"namespace":"main","address":"0x08098cd8","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":832,"candidate_bytes":824,"differing_halfwords":318,"wrong_instructions":108,"classification":"battle_effect_compiler_materialization_module","resolved_asm_classification":{"kind":"battle_effect_compiler_materialization_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":652,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"kind":"classic_heat_guided_walk","seed":98,"candidates":20000,"compile_failures":214,"exact_candidates":0,"best_differing_halfwords":400,"best_candidate_bytes":812},"notes":["Complete first-pass semantic reconstruction of RunBattleEffect04, a direct sibling in the exact battle-effect dispatcher.","All six GS1 editions have an identical relocation-normalized 652-byte core.","The earlier bounded search improved structural alignment but not the byte residual; the later family reconstruction supersedes that broad draft.","2026-09-01 battle-effect family pass: replaced m2c's false pointer arithmetic across unrelated sp0/sp4/sp24 pseudo-locals with the evidenced four-slot spawned-object array, shared three-component position vector, saved child pointer, event context, and persistent array-start cursor. The runner writes three entries from sp+36 down through sp+28 and reads them upward; the unused fourth slot at sp+40 is what naturally restores the exact 44-byte frame without artificial padding. Reversing the two aggregate declarations restores the exact position/object-array slot order.","The reference reuses one source-level loop index across all four phases; m2c had invented four independent counters. Merging those artificial lifetimes makes GCC retain the index in r8 throughout, simultaneously restoring the reference's r9 scene carrier and sl position carrier. Typed signed scene flags recover the three explicit byte sign extensions, and a real Data_02000240 aggregate recovers the base-plus-0x1f4 access instead of a folded absolute address.","The exact item-break, RunBattleEffect07, and RunBattleEffect11 siblings all narrow a named s32 zero into object mode byte 0x55. Applying that evidenced family idiom improves the candidate to 824/832 bytes, 318 differing halfwords, and 108 wrong instructions. The complete ordinary-C reconstruction has the exact 44-byte frame and stack slots, equal conditional branch structure, and every reference call, literal, constant, loop, field width, and memory effect. The residual is equivalent low-register roles, zero rematerialization, and the resulting eight-byte mid-function literal-pool placement; the canonical route and all approved GCSE, regmove, scheduling, rerun-CSE, expensive-optimization, strength-reduction, and CSE probes preserve it or regress. Forced registers, literal loads, barriers, and inline assembly are disallowed.","Retained-assembly decision: the structured assembly remains the byte-exact implementation under battle_effect_compiler_materialization_module; the complete ordinary-C source is the semantic reconstruction and all 832 owner bytes count as DONE."]},"main:080994d0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080994d0","status":"proven-retained","owner_bytes":424,"executable_owner_bytes":422,"score":{"measured":"2026-08-26","candidate_bytes":424,"reference_bytes":424,"differing_halfwords":37,"wrong_instructions":62,"class":"allocation-uncovered","note":"Improved from a prior draft (400/207/140) by three idiom-matched respellings, each verified against the reference disassembly before adoption: (1) writing scale_y before scale_x in both spawn sites, matching the reference's str-offset-28-then-24 order exactly at both sites; (2) spelling the repeat-loop's `(index & 3) ? 9 : 10` call argument as an explicit if/else with the Func_08009240 call duplicated in each branch (matching the reference's two separate bl sites and .L4/.L5 labels) rather than as a single branchless ternary, which the compiler had compiled into a NEG/ORR/LSR boolean-normalize sequence not present in the reference; (3) introducing a second local (`particle`) aliased from the second spawned object's pointer, used specifically for the repeat-loop calls, the post-loop unconditional call, and the long_delay null check, while `object` continues to cover the field-write blocks and the remaining null checks -- this reduced wrong_instructions from 132 to 123 despite not fully reproducing the reference's register split (below). The remaining 207-halfword residual is concentrated in one region: the reference promotes three cross-call scalars into high registers (sl=state, r8/r9 shared across the link accumulator/link_marker/loop-invariant AND-mask) and keeps two live registers (r5 and r6) simultaneously bound to the identical second-spawned-object pointer at different call/check sites, while this compiler's value-numbering coalesces any two locals proven equal (confirmed: the `particle = object` copy itself is eliminated, and swapping which named local is read at which site produces byte-identical output), so it always keeps that pointer in a single register (r5) and only ever needs two high registers (r8, sl) rather than three. This is a genuine register-allocator sensitivity, not a semantic gap -- the field/call/branch structure, offsets, constants, and control flow all match the reference exactly wherever the diff aligns; every remaining `!` line is a register-name or literal-pool-offset consequence of this one allocation difference."},"classification":"battle_effect_compiler_allocation_module","family":{"exact_c_dispatcher":"main:08096810","exact_c_dispatcher_bytes":336,"aggregate_reusable_bytes":760,"template_owner":"main:08099160","template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Read in full. Confirms this owner's BattleEffect03Object struct is the same physical layout as the template's OrbitingParticle (angle/phase at the same offsets 100/102 as the template's lifetime/orbit_angle, callback/update pointer at the same offset 108), but this owner's control flow (eight phased objects linked via Func_08096c48, then one central object driven through a fixed mode-alternation loop) does not match the template's own loop shape (fifteen randomly-orbiting particles), so only field offsets/naming transferred, not loop structure."},"cross_edition":{"core_bytes":310,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080904c4","en":"0x080994d0","de":"0x0809cb78","es":"0x0809e568","fr":"0x0809e568","it":"0x08099568"}},"rejected_experiments":["Swapping index++/Func_080030f8(1) statement order in the first loop (call before increment instead of after): regressed 207->209 differing_halfwords; reverted.","Swapping which of object/particle is assigned first from the spawn call (object=call();particle=object; vs particle=call();object=particle;) with usage sites held fixed: byte-identical output in both directions, confirming the compiler coalesces by proven value equality, not by source-level variable identity.","Collapsing back to a single `object` local for the whole function (dropping the particle alias) after the if/else ternary fix: regressed wrong_instructions 123->131; the two-local split is a net win even though it does not reproduce the reference's r5/r6 register split."],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template/sibling sources, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Complete typed effect-3 runner reached directly from the exact-C battle-effect dispatcher. It creates and links eight phased objects above the target, runs the central object's timed mode alternation, then launches and releases it before invoking the optional battle-state completion callback.","Local exact-C object-spawn, mode, motion, random and delay functions establish the object fields and callback contract. Together with the exact dispatcher, this family covers 760 executable bytes.","Independent relocation-aware matching proves all 310 normalized core bytes identical at unique JA, EN, DE, ES, FR, and IT anchors. Twenty-three call relocations and five literal fields explain regional raw differences.","No GS2 or external source was used.","2026-09-01 route verdict: -fno-gcse is an evidenced shipped per-file route. It restores the exact 424-byte extent, equal branch topology, and all six literal-pool words at their exact offsets, improving 207 to 37 differing halfwords. The same route independently improves sibling fallback runner 0809abb4 from 165 to 124 differing halfwords, while regressing the other dispatcher runners, so it is registered only for these two source owners rather than as a subsystem-wide override.","The final apparent direct Func_080072f0 call was corrected to the typed state->finish_callback indirect call through the established r3 trampoline. This is byte-neutral because it describes what the reference already does, but it removes a false function model and satisfies the corpus call-via guard.","The shared index was split into spawn_index and flash_index, matching their disjoint lifetimes. GCC coalesces them back to the same carrier and emits byte-identical code, while the allocator decoder now identifies the remaining reciprocal role class rather than one artificially long source lifetime.","Retained-assembly proof: the complete ordinary-C reconstruction has the exact owner extent, exact branch topology, exact literal pool, every call and argument, every field width, both object loops, cleanup, optional indirect callback, and six-edition-normalized semantics. The only residual is the reciprocal target/index r6/r7 allocation and its downstream equivalent object carrier choices. Canonical flags are structurally worse; -fno-regmove, scheduler2, rerun-CSE, expensive-optimization, strength-reduction, and CSE probes preserve the routed floor or regress. The decoder finds no unique safe source repair, and fixed-register forcing is disallowed. Structured assembly therefore remains authoritative under battle_effect_compiler_allocation_module."]},"main:08099838":{"schema_version":1,"namespace":"main","address":"0x08099838","status":"proven-retained","owner_bytes":232,"candidate_bytes":232,"differing_halfwords":36,"wrong_instructions":12,"classification":"compiler_local_materialization_mismatch","exact_search":{"status":"not_run","candidate_cap":20000,"reason":"candidate is length-exact (232/232 bytes) with 36 differing halfwords and a matched 66-halfword prefix; residual is a single scheduler-driven register/instruction-count choice around the Func_08099678 callback setup, not yet closed"},"cross_edition":{"core_bytes":186,"core_identical":true,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0}},"notes":["Direct RunBattleEffect10 sibling in the battle-effect dispatcher.","Fresh cross-edition analysis measures 230 executable bytes plus final owner alignment and proves the 186-byte normalized core is identical in all six GS1 editions.","Ranked ahead of the other unresolved sub-432-byte RunBattleEffect siblings by exact-length proximity and current wrong-instruction count.","The complete initial candidate is two bytes short and remains broad in allocation and loop-carrier formation; it is preserved as evidence but is not adoptable.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM because the approved compiler's GREG pass cannot reproduce the reference callback-address materialization without forbidden register forcing.","Follow-up investigation (no candidate change, documenting a new concrete lead): re-diffed the existing candidate.c with candidate-show and traced the very first divergence to the `Data_02000240 + 500` address computation for the object-id lookup. The reference computes this at runtime (`movs r2,#250; ldr r3,[pc]; lsls r2,r2,#1; adds r3,r3,r2; ldr r0,[r3,#0]` -- i.e. 250<<1=500 synthesized in registers then added), but this project's toolchain folds `extern u8 Data_02000240[]; ... Data_02000240 + 500` into a single pre-computed absolute-address pool constant at compile time (confirmed by compiling the byte-exact template games/gs1/src/graphics/palette/adjust_bank.c against its own exact owner 0x080aac84, which shows the toolchain WILL fold a similar 'symbol + compile-time-constant offset' expression when the offset is small enough to matter, and separately confirmed on main:080941e0 in this same batch where `((s16*)Data_02000240)[247]` also got folded instead of computing 247*2 at runtime). This means the real ROM source almost certainly does NOT write this access as `Data_02000240 + 500` / an array-typed index -- some other spelling (a genuine runtime-computed byte offset the compiler cannot prove constant, e.g. built from a non-constant-propagated intermediate, or Data_02000240 accessed through a pointer variable rather than a direct symbol) avoids the fold in the reference. This is the single largest concrete lead for closing this owner's gap and should be tried before further register-level tuning on the existing candidate.c.","Follow-up (candidate rewritten, progress but not adopted): the non-constant-propagated-intermediate lead above was confirmed directly. games/gs1/src/object/motion/set_action_callback.c line 34-35 (`index = 250; ... Object_GetById(*(u32 *)&Data_02000240[index]);`, Data_02000240 declared `extern s16 Data_02000240[]`) is the exact idiom: assigning the literal into a local `s32 index` variable first, then indexing through it, defeats this compiler's constant folding and reproduces the reference's `movs r2,#250; lsls r2,#1; adds r3,r3,r2` runtime address build exactly. Also fixed: Func_0808ba1c (= object/table/get.c's ObjectTable_Get) takes a u32 id by value, not a void*, so the call is `object = Func_0808ba1c(*(u32 *)&Data_02000240[index]);` (a plain 4-byte load of the id, not a `void **` dereference). The same `index = 147;` idiom (through an `s32 *` cast of Data_02000240) reproduces the second runtime `movs r2,#147; lsls r2,#2` computation for the `Data_02000240+588` store later in the function. Fixing both closed the first ~30% of the diff (107 -> 91 differing halfwords) and made the object/record/entry prologue byte-identical through the first `bl Func_08009080`. Also established (by testing): `record + 38` should be written as an in-place pointer mutation (`record += 38;` then used as `*record`), not a second named `second_flag` pointer variable -- the mutated-pointer form scores strictly better (91 vs 95 differing halfwords) and matches the reference's reuse of the same hard register for the pre- and post-mutation value. Remaining residual (91/232 differing halfwords, candidate still exactly 2 bytes/1 halfword short) is now concentrated entirely in one register-allocation choice in the loop preamble and body: the reference spills `first_flag` (record+37) to an extra stack slot (`sub sp,#8` instead of `#4`) and additionally threads `record` (post `+=38`) through `fp` as a long-lived home with a separate low-register copy (`r5`/`r6`) materialized once before the `do`/`while` and reused for all 10 iterations, whereas this compiler keeps both pointers directly in low registers (r6/r7) for their entire lifetime with no spill and no fp involvement. Tried and empirically ruled out (all produced byte-identical output to the 91-diff candidate, confirming the scheduler/allocator -- not statement order -- picks this shape): every valid reordering of `first_flag=record+37 / record+=38 / object[108]=0 / cycle=0` that keeps the first two in sequence; reusing `cycle` (reset to 0 after the loop) as the source value for both `entry[5]=0` and the final `*(s16*)(state+382)=0` (reference does visibly reuse one register, r8, for both, but rewriting the C to alias them through `cycle` produced identical asm, so the reuse is CSE-driven, not source-shape-driven); declaring `first_flag` before vs after `entry`. No PERM_GENERAL-testable source variant found that reproduces the extra stack slot; this looks like it hinges on GCC 2.96's own live-range-weight heuristic for a value referenced both inside and after a loop, which has not been pinned down from the C side. Next session should look at whether a genuinely different C shape for the two flag writes (e.g. threading them through a small helper the compiler can't inline, or a struct-typed record instead of an offset-indexed `u8 *`) changes the weight; not yet tried.","Follow-up (large jump, candidate now length-exact but still not zero-diff): the struct-typed-record idea flagged above as untried was tried and is the fix. Replacing the offset-indexed `u8 *record` + `record += 38` mutation with a 2-field struct (`typedef struct { u8 pad[37]; u8 flag_a; u8 flag_b; } Record; Record *record = *(Record **)(object + 80);`, writes via `record->flag_a` / `record->flag_b`) made the compiler reproduce the reference's exact `sub sp,#8` extra stack slot, the `fp`-homed long-lived pointer, and the r5/r6 loop-local copies -- differing_halfwords dropped from 91 to 54 in one step, with the object/record/entry prologue through the entire do/while loop now byte-identical (matched_prefix extends through the loop and its exit compare/branch). Separately, reusing `cycle` (reset to 0 after the loop) as the actual source value for both `entry[5] = cycle;` and the final `*(s16 *)(state + 382) = cycle;` -- which previously (before the struct fix) produced byte-identical output to the plain-literal-0 form and looked like pure CSE -- turned out to matter once the struct fix was in place: with the struct-typed record, aliasing both stores through `cycle` reproduces the reference's r8-cached-zero reuse across both sites and pushed the candidate to candidate_bytes == owner_bytes == 232 (previously 228, 4 bytes short) with differing_halfwords down to 36 and matched_prefix = 66 (of ~116 total halfwords). This confirms the earlier 'CSE, not source-shape' conclusion about the cycle-reuse trick was an artifact of testing it against the wrong (non-struct) base shape, not a fact about the compiler. Current file (232 == 232 bytes, 36/232 differing halfwords) is the best reached this session; NOT adopted (not zero-diff). Remaining residual is a single, well-isolated cluster right after the loop, in the `Func_08099678` callback setup for `Func_080041d8(Func_08099678, 0xc80)`: the reference loads the callback's address into a scratch register early (`ldr r5,[pc,#80]`) and copies it into r0 only immediately before the `bl` (`adds r0,r5,#0`) -- two instructions, with the load visibly hoisted/scheduled ahead of the `movs r6,#1` / `*first_flag=1` sequence that follows it -- while this compiler instead loads the address directly into r0 in one instruction, right at the call site, and picks r5 instead of r6 for the '1' constant since r5 is left free. Everything else in the 36-halfword residual (a few pc-relative pool-offset renumberings, the branch-target shift, and a single `movs r0,r0` alignment pad near the very end) is mechanical fallout from that one instruction-count difference, not a separate defect. Tried and empirically ruled out (every variant below produced byte-identical output to the 36-diff candidate, i.e. this compiler's own optimizer already collapses them back down -- so this is a scheduler-pass behavior, not something reachable by reasonable source reshaping): introducing an explicit `void *cb = Func_08099678;` (both function-scope, which also badly perturbed the already-matched prefix via global register pressure, and block-scoped immediately around the call, which had no effect at all); mimicking the exact sibling idiom in games/gs1/src/map/locations/colosso/log_rolling_stage/start_palette_task.c (`{ s32 budget = 0xc80; s32 task = ...; Func(task, budget); }`, both field orders) which only shuffled the single ldr's position without adding the second instruction; a `register`-qualified local for the callback; moving `index = 147` earlier; writing the pointer as `(void *)&Func_08099678`; and swapping the `flag_a`/`flag_b` post-loop write order (this one is NOT a scheduling-neutral no-op -- it regresses hard, back to 84 differing halfwords / 228 bytes, confirming `flag_b = 2;` must precede `flag_a = 1;` after the loop, matching the reference's `strb r7,[r2,#0]` before the first_flag reload). Next session's best lead: find what makes GCC 2.96 hoist a load ahead of independent scalar stores in a way that also frees a low register for reuse -- likely tied to some larger-scale property of the function (total instruction/pool count parity, or a genuinely different statement earlier in the same block) rather than the callback expression's own spelling, since every direct rephrasing of the callback expression alone was neutralized by the optimizer.","Follow-up (no candidate change; new negative evidence narrows but does not close the lead): re-confirmed the 36-diff residual is unchanged (candidate_bytes==owner_bytes==232, matched_prefix=66) and re-ran the same class of source-level experiments (bare vs `&Func_08099678` vs `(void (*)(void))Func_08099678`; `void (*)(void)` vs `const void *` prototypes; `0xc80` vs `0xc8<<4` vs `200<<4` vs `3200`; a `callback = Func_08099678;` intermediate both function-scope and immediately-adjacent; reordering `flag_b`/`flag_a` around the call) through the project's own PERM_GENERAL permuter (24-way combined search, `out/permute/08099838/report.json`) -- confirmed by tool, not just by hand, that all 24 combinations collapse to the identical 36-diff shape (best=36, exact=false): this compiler's optimizer treats every one of these spellings as the same RTL by the time GREG runs. Traced the mechanism directly in the GCC -da pass dumps (`out/manual-08099838/*.rtl` etc., built by invoking `alchemy-gcc/dist/xgcc -B.../dist/ -O2 -mthumb -mthumb-interwork -mcpu=arm7tdmi -fno-builtin -nostdinc -ffreestanding -fcall-used-r4 -Igames/gs1/include -S -da` directly on this file): at `12.life`/`17.lreg` the callback address is still a plain pseudo (reg104) with a separate copy insn into r0; it is GREG (global, cross-block allocator; `18.greg`) -- not local-alloc, not sched2 -- that coalesces reg104 directly into r0 via its copy-preference/rematerialization logic (the RTL note is `REG_EQUIV (symbol_ref Func_08099678)`, i.e. GCC treats the load as a rematerializable constant and, finding no live conflict with r0 across reg104's span, folds the copy away). Sched2 then simply never has a separate register to hoist. Also cross-referenced every other exact (adopted, `games/gs1/src/...`) call site in the whole tree that passes a bare function pointer plus a `0xc80`/similar delay to `ScheduleCallbackAfterFrames`/`Func_080041d8` -- `object/motion/four_object/initialize_top_row.c`, `initialize_bottom_row.c`, `psynergy_menu/initialize_entry_objects.c`, `object/placement/create_group.c`, `menu/select_quantity.c`, `ui/timed_notice/create.c`, and the exact sibling `battle/effects/schedule_callback_when_value24c_set.c` (0-diff, address `main:08099810`, literally 40 bytes before this owner and calling the same target `Data_08099679`==`Func_08099678`) -- all seven compile with the direct one-instruction `ldr r0,[pc]` shape (no hop), matching this candidate's current output, even when preceded by loop bodies, scalar stores, or both. So the hop this owner's reference exhibits is not generic GCC behavior for this call idiom; something specific to this function's full register-pressure profile (not the call site's own spelling, and not reachable by any tested reordering of the surrounding statements) still triggers GREG's conflict path here. Also empirically re-confirmed (still regress, still not the fix): dropping the `state` local in favor of re-reading `Data_03001ebc` at both use sites (236 bytes, 107 diff -- the spill is required); replacing the `Record` struct with raw `u8 *record` + integer offsets 37/38 (234 bytes, 75 diff -- the struct typing is required, consistent with the prior session's finding). Best state remains 232/232 bytes, 36 differing halfwords, matched_prefix=66; not adopted. Next session: the GREG interference must come from somewhere in the function's total pseudo/register-pressure footprint rather than this call's local shape -- worth trying to change register pressure *elsewhere* in the function (e.g. a genuinely different, still-evidence-backed representation of `entry`/`object`/`index` that hasn't been tried) rather than any further rephrasing of the `Func_080041d8` call itself.","Follow-up (no candidate change; additional negative evidence, register-pressure levers tried per the prior session's suggested angle): re-confirmed the 36-diff residual is unchanged (candidate_bytes==owner_bytes==232, matched_prefix=66) and tried several new function-wide register-pressure levers aimed at the loop preamble and post-loop block rather than the Func_08099678 call site itself, since the prior session had already exhausted call-site-local rephrasing and RTL-level GREG analysis. Tried: (1) spelling the loop exit as `while (cycle != 10)` instead of `while (cycle <= 9)` -- this is NOT scheduling-neutral, it regresses the already-exact loop region itself (matched_prefix drops 66->56, diff rises 36->38), confirming the do/while's exact form (including the <=9 spelling) is load-bearing and must not be touched. (2) Splitting the second `index` reuse (250 then 147) into two separately named locals (`index` / `index2`, both function-scope) to shift pseudo-register numbering order -- no effect, byte-identical to the 36-diff candidate. (3) Introducing a function-scope `s32 delay = 0xc80;` intermediate for the Func_080041d8 second argument (the prior session tried a `callback` intermediate for the first argument but not a `delay` intermediate for the second) -- this measurably changes codegen but regresses (36->37 differing halfwords), so it is a real but wrong-direction lever, ruled out. (4) Swapping the order of `*(void **)(object + 108) = 0;` and `Func_08009080(object, 0);` before the loop, to test whether reordering the loop-preamble's own already-matched statements could indirectly shift the fork-point allocation -- this badly regresses the already-exact prefix (matched_prefix 66->23, diff 36->52), confirming that prefix's statement order is also fully pinned and not a viable pressure lever. Net result: no improvement found this session; best state remains 232/232 bytes, 36 differing halfwords, matched_prefix=66, file unchanged from the prior session's candidate. Every register-pressure lever tried either had zero effect or actively regressed a currently-exact region, reinforcing the prior session's RTL-level conclusion that the r5-vs-r0 callback-address coalescing choice is GREG's own live-range-weight/rematerialization heuristic reacting to this function's specific pseudo-register population, not something reachable by reordering, retyping, or re-naming the C statements that are actually present. A future session would need either a genuinely different (not yet tried) register-consuming construct with real evidentiary backing (not fabricated no-op code, which is disallowed), or acceptance that this residual may not be closable from the C source under GCC 2.96's GREG pass as currently understood.","2026-08-27 (no candidate change; re-verification only): re-measured with candidate-show and confirmed the state is byte-identical to what this file already records -- candidate_bytes==owner_bytes==232, differing_halfwords=36, wrong_instructions=12, class=wrong, matched_prefix=66. Checked the current session's repair-pattern catalog (sign-extension casts, missing byte/halfword masks, literal-pool-as-extern-data modeling, _call_via_rN trampoline mis-modeling, frame-local size-class struct merges, crossjump/tail-merge restructuring, dispatch-shape switch/if-else reshaping, for(;;) vs while(1), widened array element types) against this owner: none apply -- there is no sign-extending divide, no unmasked callee return, no remaining plain-integer literal-pool constant, no bare bl to a _call_via_rN trampoline, the frame-local struct merge for `Record` is already adopted, there is no independent-early-return pair to crossjump, no switch/dispatch to reshape, the do/while's exact `cycle <= 9` spelling is already confirmed load-bearing by a prior session, and the array element widths already match the reference's addressing. A structural read-through of the current candidate.c against 08099838.s confirms the disassembly match is unbroken from function entry through the entire do/while loop and the immediate post-loop `entry[5] = cycle; record->flag_b = 2;` stores, up to and including the shared `ldr r3, [sp, #0]` at offset 0x8c -- i.e. every statement in the function except the single pair `record->flag_a = 1; Func_080041d8(Func_08099678, 0xc80);` reproduces the reference exactly. The residual is precisely the previously RTL-traced GREG rematerialization choice (reference hoists the Func_08099678 pc-relative load into r5 early and copies it to r0 immediately before the call, freeing r6 for the `1` constant; this compiler instead loads the address directly into r0 at the call site and leaves the `1` constant in r5), already shown by direct -da pass-dump inspection in the prior session to originate in pass 18 (greg), not in local-alloc, not in scheduling, and already shown by a 24-way PERM_GENERAL permuter sweep to be invariant across every plausible rephrasing of the callback expression, the delay argument, and the surrounding statement order. No new lever was identified this session. Per this owner's small/leaf-sweep effort budget and the explicit instruction to stop rather than open-ended-permute once the catalog and one structural read-through do not converge, this session ends here with the candidate.c file unchanged (it is still the best state reached: 232/232 bytes, 36/232 differing halfwords). This residual should be treated as a standing floor pending either a genuinely new evidence-backed register-pressure construct or a future change in how GREG's rematerialization heuristic is understood, not as unexplored space for a future session to re-litigate from scratch."]},"main:080999f0":{"schema_version":1,"namespace":"main","address":"0x080999f0","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":808,"executable_bytes":786,"candidate_bytes":808,"differing_halfwords":366,"wrong_instructions":184,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"edition_starts":{"ja":"0x080909e4","en":"0x080999f0","de":"0x0809d098","es":"0x0809ea88","fr":"0x0809ea88","it":"0x08099a88"},"cross_edition":{"core_bytes":650,"core_diff_bytes":0,"core_identical":true,"callee_correspondences":12},"search":{"permuter_candidates":20000,"compile_failures":275,"exact":false,"best_unverified_differing_halfwords":323},"notes":["Exact neighboring correspondences bound an 808-byte owner interval in all six editions; stripping the duplicate RunBattleEffect05 alias exposes a 786-byte executable symbol plus trailing pool and alignment.","Relocation-aware comparison proves all 650 non-relocation core bytes identical across the six editions with twelve callee correspondences.","The complete draft covers object creation, target-derived initialization, both eleven-frame interpolations, both particle branches, waits, sound calls, callbacks, object configuration, and cleanup.","The baseline candidate has exact owner extent but 368 differing halfwords and 192 wrong instructions. A capped 20,000-candidate search found no exact result; its unverified structural best still differs by 323 halfwords.","The earlier broad allocation and stack-layout diagnosis was superseded by the family field and aggregate audit below.","2026-09-01 battle-effect family transfer: direct assembly tracing proved the two signed scene flags were assigned to the wrong struct fields. The interpolation-height variant is scene+0x34, while high-arc particle-count selection is scene+0x20; the draft had those identities reversed. The reference initializes the low height and conditionally overwrites it for a nonzero variant, so spelling the ternary with an explicit `variant == 0` condition removes the router's real guard-inversion finding without expanding the frame.","The shared battle-object audit removed an invented four-byte gap after altitude. This restores altitude at +0x14, scales at +0x18/+0x1c, child at +0x50, mode at +0x55, and callback at +0x6c. Fresh canonical output is 808/808 bytes with 366 differing halfwords and 184 wrong instructions. The complete ordinary-C reconstruction has the exact frame, owner extent, calls, pools, constants, field widths, memory effects, and conditional branch structure; the only named topology findings are two semantically equivalent cmp-10/ble versus cmp-11/blt interpolation tails.","The capped 20,000-candidate source search and approved GCC 2.96 GCSE, regmove, scheduler, rerun-CSE, expensive-optimization, strength-reduction, and CSE sweeps produce no exact candidate; the best alternate exact-extent route remains nonexact. Fixed registers, scheduling constraints, barriers, and inline assembly are disallowed. Structured assembly remains the byte-exact implementation under battle_effect_compiler_allocation_module, the C source is the complete semantic reconstruction, and all 808 owner bytes count as DONE."]},"main:08099da4":{"schema_version":1,"namespace":"main","address":"0x08099da4","status":"measured-draft","owner_bytes":1264,"executable_owner_bytes":1262,"candidate_bytes":1236,"differing_halfwords":612,"wrong_instructions":446,"classification":"battle-effect-runner","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":934,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"kind":"classic_heat_guided_walk","seed":99,"candidates":20000,"compile_failures":217,"exact_candidates":0,"best_differing_halfwords":577,"best_candidate_bytes":1260},"notes":["Complete first-pass semantic reconstruction of the ordinary battle-effect owner adjacent to RunBattleEffect05 and RunBattleEffect11.","The six GS1 editions share an identical relocation-normalized 934-byte executable core; the two remaining owner bytes are alignment.","The bounded search improved the byte residual from 612 to 577 halfwords but remains broad, so neither exact-C adoption nor permanent-assembly promotion is justified."]},"main:0809a294":{"schema_version":1,"namespace":"main","address":"0x0809a294","status":"proven-retained","owner_bytes":304,"candidate_bytes":304,"differing_halfwords":108,"wrong_instructions":80,"classification":"battle_effect_twin_compiler_allocation_module","family":{"structural_twin":"main:08098954","shared_tail":"main:08099da4","aggregate_reusable_bytes":1872},"notes":["This is the complete typed twin of RunBattleEffect07. The two retained 304-byte owners have identical control flow and instruction shape, differing only at their two effect-specific constructor calls.","Compiling the same readable source template with Func_0809a3c4 substituted for Func_08098a84 produces the same 296-byte candidate, 132 differing halfwords, and 94 wrong instructions. The identical residual map proves that every remaining source-shape mismatch is family-invariant rather than effect-specific.","A joint loop-carrier rewrite using explicit pointer cursors, countdown do-while loops, and shared phase carriers regressed both siblings identically to 316 bytes, 141 differing halfwords, and 118 wrong instructions; it was reverted.","A bounded earliest-divergence matrix also found the origin declaration-order axis byte-neutral; the first invariant mismatch is register selection while reloading the origin after initialization, not an effect-specific callee or literal difference.","Relocation-aware six-ROM matching is ambiguous because the two sibling runners have zero-difference normalized cores. That confirms the family relationship but cannot establish a unique per-edition owner correspondence, so no regional or retained claim is made.","The exact Effect07 source shape was transferred without semantic invention, substituting only this twin's effect-specific constructor. It closes the eight-byte extent gap and produces the same 304-byte candidate, 108 differing halfwords, 80 wrong instructions, equal branch topology, allocator-order constraints, and residual map as Effect07.","Family proof, 2026-09-01: the two reference owners are instruction-for-instruction twins apart from their constructor relocation. An exhaustive 72-shape statement-order matrix plus named pointer/countdown/declaration/lifetime repairs found no better ordinary-C form; approved GCC 2.96 regmove, scheduler, CSE, GCSE, strength-reduction, and expensive-optimization route probes preserve the shared floor or regress. Fixed-register variables, barriers, inline assembly, and compiler forcing are disallowed, so retained structured assembly is the byte-exact implementation."]},"main:0809a484":{"schema_version":1,"namespace":"main","address":"0x0809a484","status":"measured-draft","owner_bytes":472,"candidate_bytes":460,"differing_halfwords":226,"wrong_instructions":142,"family":{"exact_c_caller":"main:0809a6b8","exact_c_caller_bytes":128,"aggregate_reusable_bytes":600},"cross_edition":{"core_bytes":420,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08091478","en":"0x0809a484","de":"0x0809db2c","es":"0x0809f51c","fr":"0x0809f51c","it":"0x0809a51c"}},"notes":["Complete typed producer for the exact-C BattleEffect_SpawnRadialParticleRing caller. It creates a particle object, selects its variant and animation, inherits visual flags, records the initial vector, and applies each optional parent, position, interpolation, animation, attribute, angle, and callback override encoded in the flags word.","The exact caller contributes the established stack configuration layout, trigonometric position convention, flags value, and sole call-site prototype; together the producer/consumer family covers 600 executable bytes.","The first readable model compiles to 460 bytes against the 472-byte owner, with 226 differing halfwords and 142 wrong instructions. This is a complete broad semantic baseline, not an exact or narrow candidate, and claims zero bytes.","Independent relocation-aware matching proves all 420 normalized core bytes identical at unique JA, EN, DE, ES, FR, and IT anchors. Ten call relocations and three literal fields account for all regional raw differences.","Recovered only from retained GS1 assembly, the local exact-C caller and object-update analogues, the approved compiler, and the six local GS1 editions. No GS2 or external source was used."]},"main:0809a8c4":{"schema_version":1,"namespace":"main","address":"0x0809a8c4","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":468,"candidate_bytes":468,"differing_halfwords":12,"wrong_instructions":24,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"core_bytes":340,"core_identical":true,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0}},"notes":["Direct RunBattleEffect14 sibling in the battle-effect dispatcher.","Reconstructed independently from retained assembly and current project headers. The candidate now has exact extent and complete control flow; the remaining residual is confined to equivalent low-register choices and the first interpolation loop's equivalent compare-and-branch spelling.","Two independent bounded classic heat-guided walks evaluated 50,000 ordinary-C candidates without improving the 12-halfword residual. The only earlier bytewise improvement reduced the residual from 15 to 12 halfwords by preserving separate generic spawn-result and typed particle views.","Routed GCC 2.96 and explicit GCC 2.96 agree; old agbcc regresses to 432/468 bytes, while CSE, scheduling, regmove, GCSE, and expensive-optimization diagnostics preserve the residual or regress.","The approved compiler cannot express the remaining low-register allocation and equivalent loop comparison without disallowed fixed-register constraints or barriers; exact retained assembly is permanent under the repository contract.","Re-measured 2026-08-26: candidate=468 reference=468 differing_halfwords=12 wrong_instructions=24, matching the recorded floor exactly."],"rejected_experiments":[{"experiment":"respell the first interpolation loop's exit test as `while (step <= 10)` instead of `while (step < 11)`","result":"no change -- GCC 2.96 still emits cmp r2,#10/ble.n rather than the reference's cmp r3,#11/blt.n; the compare-and-branch spelling is not reachable from this source-level rewrite"},{"experiment":"drop the invariant `target_cursor` pointer local and read `target.x/y/z` directly in the interpolation loop","result":"regresses sharply from 12/24 to 177/42 -- the pointer indirection is load-bearing for the reference's register allocation, not incidental"}]},"main:0809abb4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0809abb4","status":"proven-retained","owner_bytes":444,"score":{"measured":"2026-08-26","candidate_bytes":444,"reference_bytes":444,"differing_halfwords":122,"wrong_instructions":128,"class":"structural-topology","note":"Improved from a prior draft (448/197/102) by correcting the BattleEffectMotionRecord stride (0x48, not 0x120), hoisting step=0 before the null-object check, and switching the 16-record loop to a descending counter with a walking record pointer -- all three moves match the reference disassembly's own idiom exactly and pulled candidate_bytes to the exact 444-byte target. The remaining 165-halfword residual is concentrated in one region: the compiler's register promotion of the origin/destination interpolation-array base pointers into sl/r8 differs from the reference's choice (which pointer gets sl vs r8), which cascades through the whole interpolation loop and the trailing loop-bound comparison (cmp #10/ble vs cmp #11/blt). Six declaration-order and expression-shape respellings were tried against this one region; none reproduced the reference's exact sl/r8 binding without cost elsewhere, so this is recorded as a genuine register-allocator sensitivity rather than a semantic gap."},"classification":"battle_effect_compiler_allocation_module","rejected_experiments":["Locals declared position,origin,destination (top-to-bottom) does yield the reference's correct stack offsets (origin@sp+12, destination@sp+0, position@sp+24) but costs 4 extra bytes (448) from a different sl/r8 promotion order -- worse net score (448/174/90) than the accepted origin,destination,position order despite the offsets being individually 'more correct'.","Explicit origin_ptr/destination_ptr local pointer variables in place of array-literal indexing: 456/222/150, substantially worse -- the compiler synthesizes its own base-pointer temporaries more efficiently than an explicit alias.","Splitting object->z into a temporary (z) plus a separate delta temporary to try to reproduce the reference's delayed str r5,[r6,#16] scheduling around the scale calc: 456/207/98, worse.","Locals declared destination,position,origin (top-to-bottom): 448/176/94, worse than accepted order.","Locals declared destination,origin,position (top-to-bottom): 448/? not adopted -- superseded by testing the full permutation set; origin,destination,position remained best throughout."],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template/sibling sources, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Complete typed fallback path for battle effect 9. It interpolates a temporary object from the selected target toward the battle origin over 11 steps, runs a timed sound sequence, spawns sixteen motion records (0x48-byte stride, not the 0x120 previously assumed) walking forward from state->records[0] while a separate index counts 15 downto 0, then releases the temporary object after fixed delays.","The exact-C dispatcher enters exact 0809ab98 only when target-object setup fails; 0809ab98 marks the active object and immediately calls this owner. The three-owner producer/consumer chain covers 808 executable bytes (see prior dossier revision for exact_c_dispatcher/setup addresses).","Independent relocation-aware matching (from the prior dossier revision) proved 320 normalized core bytes identical at unique JA/EN/DE/ES/FR/IT anchors; that analysis was not re-verified in this pass but nothing in this revision's struct-layout correction should affect it, since it only changed local variable placement and loop shape, not the cross-edition call/literal skeleton.","No GS2 or external source was used; the orbiting_particles/run.c family hint was read in full but its loop shape (random per-particle spawn over 15 iterations) does not structurally match this owner's single-object interpolation + fixed 16-record spawn, so it was not used as a direct structural template -- only its general battle-effect idiom (Data_03001f30 scene pointer, WaitFrames/Audio_PlayCue-style helper calls) informed variable naming conventions already present in the prior draft.","2026-09-01 family route: the shipped -fno-gcse pass independently improves this owner from 165 to 124 differing halfwords while moving RunBattleEffect03 from 207 to 37 and exact extent. It is now the canonical route for both source owners; the same flag regresses the other dispatcher runners, and a routing regression test enforces that boundary.","Reordering the three disjoint stack arrays from origin/destination/position to position/origin/destination reproduces the reference frame exactly: destination at sp+0, origin at sp+12, and later scratch position at sp+24. This is an evidence-backed source repair and improves 124 to 122 differing halfwords. The remaining divergence begins with object/step r6/r7 roles and the compiler's strength-reduced scale accumulator, which displaces the reference origin/destination pointer roles. A local scale-delta carrier and a combined no-strength-reduction route both regress materially and were reverted.","Cross-edition proof, 2026-09-01: relocation-aware comparison uniquely locates the 444-byte owner in JA, EN, DE, ES, FR, and IT and proves all 320 non-relocation/literal core bytes identical. Twenty-eight Thumb-call relocations and three literal fields account for the regional differences.","Retained-assembly proof: the complete ordinary-C source reproduces exact extent, exact 36-byte frame, exact destination/origin/scratch stack offsets, exact three-word pool, every branch, call, argument, record stride, and observable operation. The remaining code is semantically equivalent object/step and origin/destination register allocation, strength-reduced versus rematerialized scale multiplication, and the equivalent cmp-10/ble versus cmp-11/blt loop tail. The decoder reports conflicting allocation targets; the evidenced GCSE route, stack-order repair, six expression/declaration shapes, local scale carrier, no-strength composition, and other shipped pass probes produce no exact form. Fixed-register or scheduler forcing is disallowed. Structured assembly therefore remains authoritative under battle_effect_compiler_allocation_module."]},"main:0809ae64":{"schema_version":1,"namespace":"main","address":"0x0809ae64","status":"measured-draft","owner_bytes":588,"candidate_bytes":592,"differing_halfwords":286,"wrong_instructions":192,"classification":"battle-effect-runner","cross_edition":{"core_bytes":448,"core_identical":true,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"08091e58","en":"0809ae64","de":"0809e50c","es":"0809fefc","fr":"0809fefc","it":"0809aefc"}},"notes":["Complete semantic reconstruction of RunBattleEffect13, including both target-selection branches, two eleven-frame interpolation passes, motion phases, audio gates, secondary-object adjustment, and cleanup.","The canonical workbench now completes all six stages for this human-named owner and measures 81.98842% ARMv4T structural similarity.","The clean candidate reaches the exact 588-byte owner extent. A bounded 20,000-candidate classic search found no exact candidate; its generated structural best was deliberately not adopted because it was less readable and eight bytes long.","All 448 relocation- and literal-normalized core bytes are identical in JA, EN, DE, ES, FR, and IT. Retained assembly remains authoritative and this draft claims zero DONE bytes.","2026-08-27 re-verification: fresh candidate-show still measured exactly 588/588 bytes, 254 differing halfwords, 170 wrong instructions. Swapping the declaration/assignment order of `main_object` and `secondary_object` was byte-for-byte identical, so source statement order was not a lever.","2026-09-01 battle-effect family audit found a real semantic omission hidden by the old equal-extent score. The draft populated `scene_target` from scene x/y/z and then discarded it, calling Func_08096c80(0xd7, 0, 0, 0). The reference loads that vector at sp+28 and leaves its three members in r1-r3 for the spawn call. The C now passes scene_target.x/y/z, and uses the exact-family named-s32-zero idiom for object mode byte +0x55. Fresh canonical output is 592/588 bytes, 286 differing halfwords, and 192 wrong instructions; the honest regression is retained because it fixes observable spawn coordinates. The remaining four-byte frame mismatch is the reference spilling the long-lived secondary object at sp+0 while GCC keeps it in a register, plus two equivalent interpolation loop tails. This remains an uncounted measured draft until those residuals are proved or closed."]},"main:0809b698":{"schema_version":1,"namespace":"main","address":"0x0809b698","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":332,"literal_pool_bytes":32,"combined_reference_bytes":364,"candidate_bytes":364,"differing_halfwords":48,"wrong_instructions":47,"classification":"battle_effect_compiler_allocation_module","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":256,"core_diff_bytes":0,"core_identical":true},"notes":["Complete first-pass semantic reconstruction of RunBattleEffect16, a direct sibling in the exact battle-effect dispatcher.","The canonical workbench now handles its same-address human/Region symbol alias and its literal pool outside the owner assembly without editing retained assembly.","Family pass, 2026-09-01: recovered the reference load order for the scene object, group, saved unsigned object parameter, and group entry; kept the helper result unsigned until its explicitly signed use; and replaced three unexplained absolute EWRAM addresses with Data_02000240-relative battle-work fields. This improved the initial broad candidate from 368/168/149 to 360 bytes, 166 differing halfwords, and 143 wrong instructions while preserving equal branch topology.","Closure pass, 2026-09-01: modeling the three battle-work accesses through runtime indices 145, 146, and 147 reproduces the reference's shift-and-add address formation instead of folding symbol-plus-offset constants. Giving the post-delay active value and loop entry mode honest named lifetimes eliminates the spurious zero/one literal words and merges GCC's split literal islands. The resulting C emits exactly 364 bytes for the coherent function-plus-pool unit: a 332-byte instruction body followed by the same eight 32-bit literal words as retained LiteralPool_0809b7e4, in the same order.","The remaining 48-halfword residual has equal branch topology and equal instruction count. It consists of equivalent saved-value load ordering, sign-extension scheduling around Func_08003fa4, and register-role choices for the object, loop counter, constants, and group field pointers; calls, constants, widths, offsets, branches, body extent, and literal pool all agree.","The shipped flag matrix (-fno-regmove, both scheduling toggles, GCSE, CSE follow/skip, rerun CSE, strength reduction, expensive optimizations, and thread jumps) preserves the 48-halfword floor or regresses it. The bounded annotation-free permuter stopped with an honest ambiguous split-lifetime verdict rather than inventing a repair. Fixed-register variables, compiler barriers, inline assembly, and scheduler forcing are disallowed, so the byte-exact structured assembly remains authoritative."]},"main:080a1a40":{"schema_version":1,"namespace":"main","address":"0x080a1a40","status":"measured-draft","owner_bytes":126,"executable_owner_bytes":126,"candidate_bytes":124,"differing_halfwords":38,"wrong_instructions":35,"cross_edition":{"object_bytes":126,"literal_bytes":28,"relocation_normalized_core_bytes":98,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080989ec","en":"0x080a1a40","de":"0x080a4840","es":"0x080a6234","fr":"0x080a6240","it":"0x080a1a40"}},"domain":"Positions a battle-effect sprite from its anchor record, phase-specific coordinate tables, and caller offsets while updating its packed X attribute.","expressed":["selects phase-specific X and Y base offsets from the active render phase","adds the anchor grid coordinates, caller offsets, and eight-pixel bias","stores the full X and Y coordinates in the sprite runtime record","updates the packed nine-bit X field while preserving its upper attribute bits","mirrors the low Y byte into the sprite attribute byte","reads the mutable render phase independently for the X and Y coordinate snapshots"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The phased, symbol-indexed candidate is two bytes short with 38 differing halfwords and remains outside exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 126 executable bytes and proves all 98 literal-normalized core bytes identical across the six approved GS1 editions.","2026-09-01: naming the two absolute coordinate tables as indexed arrays restores the reference register-offset ldrb form; staging X and Y separately restores their observed read phases; and expressing the packed attribute merge as distinct narrowing operations restores the 0xffff, 0x01ff, and -0x200 literal family.","Taking the sprite and anchor field snapshots in one source phase makes their lifetimes overlap the state pointer. GCC then assigns state, anchor, and sprite to the reference r5, r6, and r4 roles, reducing the candidate from 54 to 38 differing halfwords and from 65 to 35 wrong instructions while growing it from 116 to 124 of 126 bytes.","The remaining residual begins with phase-address scheduling and its coupled mask carrier, then continues through packed-field carrier allocation and literal-pool placement. It is still broad rather than a localized compiler floor. No permanent classification is claimed, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect caller 080ab5e4, and the approved compiler. No GS2 evidence or external source was used."]},"main:080a1d08":{"schema_version":1,"namespace":"main","address":"0x080a1d08","status":"measured-draft","owner_bytes":302,"candidate_bytes":282,"differing_halfwords":146,"wrong_instructions":104,"classification":"inventory-modal-message","domain":"Creates or reuses an inventory-menu message window, renders a message, optionally waits for acknowledgement, and restores menu cursor state.","notes":["Recovered from retained owner assembly, its inventory-menu callers, established menu layout, and the approved compiler through the exact-family workbench.","The return value is ignored by all recovered callers and the owner has no deliberate result; the generated void signature is retained.","Generated register, stack-slot, and control-flow labels were replaced with role-based names before retaining the candidate.","The raw family-assisted m2c seed compiles to 286 bytes at 80 differing halfwords, but retains generated register and stack-slot vocabulary; the canonical source favors the recovered inventory-menu roles until a closer readable spelling is found.","A 10,000-candidate safe family-template walk from the stronger raw seed produced no improvement and no exact object.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080a1f74":{"schema_version":1,"namespace":"main","address":"0x080a1f74","status":"proven-retained","owner_bytes":96,"executable_owner_bytes":96,"candidate_bytes":96,"differing_halfwords":20,"wrong_instructions":26,"classification":"compiler_local_materialization_mismatch","resolved_asm_classification":{"kind":"compiler_local_materialization_mismatch","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":80,"core_identical":true,"starts":{"ja":"0x08098ee8","en":"0x080a1f74","de":"0x080a4d74","es":"0x080a6768","fr":"0x080a6774","it":"0x080a1f74"}},"template_family":"template-main-0801ce90","template_source":"games/gs1/src/graphics/palette/decrement_selected_counter.c","domain":"Copies a 0xff-terminated byte string (up to 32 bytes) selected by a small switch(arg0) -- one of four fixed ROM string addresses (arg0==0,1,2 pick three specific strings; every other value, including negatives and >2, falls back to a fourth default string) -- into the caller's destination buffer.","behavior":["src = default string (0x080af2a6); switch(arg0) overrides it to 0x080af2d0 (case 0), 0x080af2bc (case 1), or 0x080af2b1 (case 2)","copies bytes from src to dst one at a time until a 0xff byte is copied or 32 bytes have been written, whichever comes first"],"bounded_search":{"mode":"source-shape","attempted":7,"exact":false,"reason":"Three respellings from the prior pass: (1) unsigned char with a plain 'c != 0xff' as a sequential if/else-if switch -- wrong dispatch order and no size match; (2) same but with the default-value assigned before the switch instead of only in a fallthrough -- fixed the switch dispatch to match reference's exact binary-comparison tree, but the terminator check stayed a plain byte immediate compare; (3) changing dst/src/c to signed char with 'c != -1' -- brought the candidate to the EXACT reference size (96/96 bytes) with the switch dispatch and every string-selection byte identical, leaving only the terminator-check instruction sequence different (adopted as the standing candidate, 24 differing halfwords).\n\n2026-08-27 pass, re-measured baseline first (confirmed unchanged at 96/96, differing_halfwords=24, wrong_instructions=26, class=wrong) then tried four more respellings targeting only the terminator comparison, all rejected: (4) reverting dst/src/c to u8 (unsigned char) with 'c != 0xff' -- GCC now folds the compare straight to a single 'cmp r3,#255' immediate (no shift at all), which also perturbed the whole function's register allocation (r2/r4 roles swapped) -- 33 differing halfwords, worse. (5) keeping s8 c but writing the comparand as an explicit '(s8)0xff' cast instead of the bare literal -1 -- byte-for-byte IDENTICAL candidate to (3); GCC's front end constant-folds '(s8)0xff' to the INTEGER_CST -1 at parse time, so this is not a distinct source shape. (6) introducing a separate 's8 term = 0xff;' local and comparing 'c != term' in both places -- this is the one respelling that reproduced reference's exact 'lsls r3,r3,#24 / lsls r2,r2,#24 / cmp r2,r3' shape (no trailing asrs) for the FIRST occurrence, confirming the mechanism below, but it added a stack slot and a saved register (push {r5,lr} vs push {lr}), grew the candidate to 100 bytes, and only the first comparison benefited -- an inter-iteration redundancy-elimination pass reused a separately, fully sign-extended cached copy of 'term' (via ip) for the loop's second comparison, reverting that one to the old asrs-based shape. Net 35 differing halfwords, worse than the standing candidate on every axis (size, wrong_instructions, differing_halfwords).","compiler_evidence":"alchemy-gcc/agscc/gcc/config/arm/arm.md 'extendqisi2' define_expand (~line 3449) shows Thumb QI->SI sign extension of a register value is always emitted as a literal two-instruction RTL pair: (ashift:SI x 24) followed by (ashiftrt:SI 24) -- there is no single-instruction Thumb1 reg-to-reg sign-extend (no sxtb until ARMv6). The trailing ashiftrt is only eligible for combine-pass cancellation on an EQ/NE comparison when BOTH compared operands carry that same ashift/ashiftrt pair in the RTL stream. A source-level integer constant (bare -1, or any cast of a literal that folds to -1 at parse time) is materialized directly as a ready-made SImode CONST_INT and never enters extendqisi2 at all, so there is nothing on that side for combine to cancel against -- forcing GCC to fully sign-extend 'c' alone and compare against the materialized constant (movs+negs then lsls+asrs then cmp), exactly what the standing candidate emits. Only a genuine QImode-typed lvalue read (proven with experiment 6) drives the constant through the same extendqisi2 path, letting combine fuse away both trailing ashiftrt ops and produce reference's bare lsls+lsls+cmp -- but no respelling found this session obtains that shape on both occurrences without adding register/frame pressure that costs more bytes than the comparison idiom saves."},"remaining":"Same size as reference (96/96), and the switch dispatch (13 comparison/branch instructions) matches exactly. The residual is entirely in how the 0xff terminator test compiles: reference computes it as 'lsls r4,r4,#24 / lsls r3,r3,#24 / cmp r3,r4' (both operands merely shifted into top-byte position, no sign-normalization afterward), while this signed-char candidate adds an extra 'movs r0,#1 / negs r0,r0' to materialize -1 and an extra 'asrs r3,r3,#24' to fully sign-extend c before an ordinary int compare. Compiler evidence (see bounded_search.compiler_evidence) shows reference's shape requires the comparand to reach the comparison via the SAME QImode-to-SImode extendqisi2 RTL as 'c' itself (so the combine pass can cancel both trailing ashiftrt ops); a bare constant -1, however spelled at the C level, never takes that path and always yields the standing candidate's shape instead. The one respelling that forced the comparand through extendqisi2 (a separate 's8 term' local) reproduced the exact target shape on the first occurrence but cost a stack slot and a saved register, growing the function past 96 bytes and only fixing one of the two occurrences (the loop's second comparison got a differently-cached, still-fully-extended copy instead). This is a narrow, well-isolated residual (one comparison idiom, repeated twice) with a size-neutral fix not found by manual respelling -- a good candidate for a small bounded permuter search over just that comparison (e.g. varying operand order, intermediate temporaries, or expression form under a fixed 96-byte budget) rather than further manual respelling.","notes":["2026-09-01 retained-assembly proof: the complete 96-byte ordinary-C reconstruction has the exact owner extent, exact four-word literal pool, exact switch dispatch, and complete bounded copy semantics. Cross-edition verification uniquely locates it in all six releases and proves all 80 non-literal bytes identical. The residual is confined to two equivalent 0xff byte-comparison materializations. GCC's Thumb QImode extend/combine path explains why a literal -1 fully sign-extends the byte while a genuine byte lvalue can cancel the paired extensions; the byte-lvalue forms either fold, change topology, or add a saved register/frame. Routed GCC 2.96 and the canonical scheduling, CSE, GCSE, regmove, strength-reduction and O3 axes remain at the 20-halfword floor; disabling rerun-CSE or expensive optimizations improves it only to 16 halfwords/10 wrong instructions, old-agbcc regresses to 100 bytes/47 halfwords, and no route is exact. Structured assembly therefore remains authoritative under compiler_local_materialization_mismatch; the semantic C remains the evidence artifact and does not claim exact C.","2026-09-01 pool-address audit corrected a stale semantic mapping: resolving each PC-relative load directly against the retained owner proves default=0x080af2a6, case0=0x080af2d0, case1=0x080af2bc, and case2=0x080af2b1. The former source rotated those four meanings. Correcting the mapping makes all four pool words exact and improves the current candidate from 24 to 20 differing halfwords without changing its 96-byte extent. Explicit-default and signed/unsigned terminator-lvalue probes were measured and reverted because they grew or tied the residual.","The four string addresses (0x080af2a6, 0x080af2d0, 0x080af2bc, 0x080af2b1) are read directly from the retained assembly's literal pool; their contents were not decoded (no message-archive cross-reference attempted in this pass).","Recovered only from retained owner assembly and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed.","2026-08-27: re-measured baseline (unchanged, 24 differing halfwords) and tried four further terminator-comparison respellings (u8 throughout; explicit (s8)0xff cast; a separate s8 term local; all documented in bounded_search). None improved on the standing candidate, which is left in place unmodified. Compiler-evidence citation for the residual's mechanism added (arm.md extendqisi2)."]},"main:080a2324":{"schema_version":1,"namespace":"main","address":"0x080a2324","name":"Menu_SetPageIcons","status":"proven-retained","owner_bytes":156,"executable_owner_bytes":156,"candidate_bytes":156,"differing_halfwords":20,"wrong_instructions":4,"classification":"menu_page_icons_compiler_allocation_module","resolved_asm_classification":{"kind":"menu_page_icons_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":148,"core_identical":true,"starts":{"ja":"0x08099298","en":"0x080a2324","de":"0x080a5124","es":"0x080a6b18","fr":"0x080a6b24","it":"0x080a2324"}},"score":{"canonical_differing_halfwords":20,"diagnostic_route":"-fno-gcse","diagnostic_differing_halfwords":1,"wrong_instructions":2,"topology":"equal","class":"allocation-uncovered"},"behavior":["clears the state byte on each of 32 non-null page-icon objects","walks the requested visible range from the first entry while entries and icon objects remain valid","positions each icon at the fixed x coordinate and successive 16-pixel y coordinates","updates each positioned icon and marks it active"],"notes":["2026-09-01 retained-assembly proof: the complete candidate has the exact 156-byte extent, equal branch topology, and exact Data_03001f2c literal. Every 32-icon clear, requested-range guard, icon lookup, position write, update call, activation store, cursor step, and entry-count bound is accounted for. Canonical GCC leaves four equivalent end/cursor/address register-role instructions. The shipped -fno-gcse route reduces the complete residual to one commutative adds operand order; direct, indexed, split-cursor, and integer-address spellings all canonicalize to that same order or regress. Relocation-aware verification proves all 148 normalized core bytes identical across six editions. Structured assembly is therefore authoritative under menu_page_icons_compiler_allocation_module.","Reconstructing the reference's guarded cursor lifetime, shared clear/traversal counter, block-local draw-y carrier, and initial indexed icon check recovered the exact 156-byte extent and branch topology.","Under canonical flags GCC's GCSE pass moves one independent high-register copy and leaves 20 differing halfwords. The shipped -fno-gcse diagnostic route makes every byte exact except one commutative adds operand order: candidate `adds r3,r1,r2`, reference `adds r3,r2,r1`.","RTL inspection proves ordinary pointer-addition spellings canonicalize to the same plus expression before allocation. Direct, indexed, split-cursor, and integer-address spellings either tie at one halfword or regress allocation. The decoder reports no unique source repair.","The diagnostic compiler route is not registered or used for production because it is still not exact. This candidate claims zero DONE bytes and contains no inline assembly, fixed-register variable, compiler barrier, or compiler modification."]},"main:080a24d0":{"schema_version":1,"namespace":"main","address":"0x080a24d0","status":"measured-draft","owner_bytes":432,"candidate_bytes":444,"differing_halfwords":184,"wrong_instructions":106,"classification":"asset-selection-screen","domain":"Backs up display memory, runs a modal selection screen, publishes an accepted selection, and restores the prior display state.","notes":["Recovered from retained owner assembly, local state layouts, and the approved compiler through the family-assisted m2c workbench.","The generated void signature was corrected because the owner explicitly returns its selection result in r0 after preserving it across cleanup.","All generated register and stack-slot identifiers were replaced with role-based names before retaining the candidate.","The typed reconstruction improves the compiling family-assisted m2c draft from 201 differing halfwords to 179 while remaining four bytes over the owner extent.","A 5,000-candidate safe family-template walk produced no exact object and did not improve the byte delta; its best structural score increased the byte mismatch and is not retained as canonical source.","Exact-C adoption remains gated on an independently compiled zero-difference object.","2026-08-27 re-verification: fresh candidate-show still measures exactly 436/432 bytes, 179 differing halfwords, 102 wrong instructions, matching this dossier -- no drift. The aligned diff shows the same allocation-size local (128<<6=0x2000, reused at three call sites: the initial Func_08004970 allocation and both Func_08007310 backup/restore copies) cached in fp on this candidate versus r9 on the reference, plus a further-downstream fp/r9 swap around the UiWindow_CreateFar/Func_08007310/Func_080072f0 block -- the same class of hi-register role nondeterminism already called out above, and now also independently observed on the unrelated sibling owner 080b2328 (sl/r8 swap) in this same compiler-family batch. This is cross-owner evidence the swap is a systemic GCC 2.96 allocator sensitivity for this idiom, not a defect specific to this source shape; no new respelling attempted beyond what is already recorded above, since none of the prior rejected experiments target this specific register-numbering axis and a productive fix likely needs permuter-style register-allocation search rather than manual respelling.","2026-08-27 (later pass): root-caused and fixed a mismodeled trampoline call. `Func_08007310` was not a real function -- 0x08007310 is the fp (r11) slot of the fourteen-entry `_call_via_rN` indirect-call trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8`, 4 bytes/slot, base 0x080072e4, N in r0..sp order, fp is the 12th slot). Traced the value loaded into fp immediately before the first `bl 0x08007310`: `ldr r3,[pc,#184]` at asm offset 0x94 reads the literal-pool word at owner offset 0x150 (confirmed against candidate-show's own resolved address annotations, `@ (0x150)`), which is `0x03001388` -- an IWRAM address, i.e. a function copied into IWRAM for speed, not a data pointer. `mov fp,r3` then `bl Func_08007310` is therefore `_call_via_fp`, a genuine indirect call through that IWRAM function address. The second `bl Func_08007310` near the end of the function reloads no new value into fp beforehand (fp is callee-saved and untouched by every intervening call), confirming both call sites dispatch through the SAME cached function-pointer value. Rewrote both sites as genuine indirect calls, `((CopyFn)0x03001388)(...)` with `typedef void (*CopyFn)(const void *source, void *destination, s32 size)`, matching the arg roles already correctly modeled (display_backup/0x06004000 swapped between backup and restore direction, size 0x2000), and removed the fictional `Func_08007310` prototype. This exactly mirrors the already-adopted fix on games/gs1/recon/en/main/080a8c2c.c (Func_0800730c -> ((FillWordsFn)0x03000168)(...) via the sl/r10 trampoline slot) and games/gs1/src/battle/effects/member_orbit/run.c: fp/r10/etc. are never argument-passing registers (arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c stops at r3), so no N-argument direct call to a fictional `Func_08007310` could ever legitimately compile to code containing `mov fp,r3` the way the reference does -- the old direct-call model was structurally incapable of ever reaching byte parity, independent of its diff count.","2026-08-27 (same pass): after the correctness fix, differing_halfwords moved from 179 to 184 (candidate_bytes 436 -> 444) even though the model is now structurally correct, because fixing the call exposed a second, independent, pre-existing GCC 2.96 register-allocation tie-break. In the OLD (wrong) direct-3-arg-call model there was no function-pointer local competing for a callee-saved register, so the allocator was free to (mis)assign fp to the reused 0x2000 size constant instead of r9 (this exact swap is documented above and predates this pass -- verified unchanged at the very first instruction pair the two candidates diverge on, before either call site is even reached). The reference needs BOTH quantities to survive in callee-saved registers simultaneously (r9=size, fp=copy_fn, alongside r5=screen, r6=a process_state-pointer cache, r7=display_backup, r8=ASSET_SELECTION_GLOBALS-cast pointer, sl=result -- all seven of r5/r6/r7/r8/r9/sl/fp are in simultaneous use, the maximum this function's prologue provisions). Once the correct indirect-call model reintroduced the fp-shaped competition, GCC's allocator did not converge on the reference's exact coloring: it also promotes the literal 0x06004000 destination-buffer constant into a persistent register (r8) across the whole function, something the reference does NOT do (the reference reloads 0x06004000 from the literal pool independently at all three of its use sites -- both copy calls and the Func_080072f0 fill call -- rather than caching it), which crowds out the correct roles for the rest of the function and cascades into the remaining diff. Tried and confirmed to have zero or negative effect (each re-measured after the fix, call order to the ten reference `bl` targets held fixed and matched to games/gs1/asm/080a24d0.s throughout -- no experiment ever reordered an actual call relative to another call): declaring `copy_fn` as a named local vs. an inline `(CopyFn)0x03001388` cast at each site (184, unchanged); initializing `copy_fn` at declaration vs. deferring the assignment to immediately before its first use (184, unchanged); declaring `copy_fn` first vs. last among the locals (184, unchanged); naming the reused 0x2000 size argument as its own local, `s32 backup_size` (184, unchanged); naming the reused 0x06004000 destination pointer as its own local, `void *vram_buffer` (regressed to 214 -- adds yet another long-lived quantity competing for the same seven-slot budget); swapping the order of the two independent, non-dependent leading statements `display_backup = Func_08004970(...)` and `screen = Func_080048b0(...)` (regressed to 194 -- rejected on two grounds, both worse AND this would have reordered two actual calls relative to games/gs1/asm/080a24d0.s's real bl sequence, which is never legitimate regardless of score). This confirms, independently of the RTL-level qty_compare() tracing already recorded on sibling owner 080a8c2c.json for a same-block tie, that this whole-function global-register-coloring tie-break is also insensitive to source-level respelling here -- consistent with needing the permuter-style register-allocation search flagged above rather than further manual attempts.","Kept the corrected indirect-call model rather than the lower-diff-count fictional-call model: 0x08007310 cannot compile from any direct N-argument call (fp is not in arm_function_arg's r0-r3 window), so the old 179-diff draft was a structural dead end that could never reach differing_halfwords=0 no matter how it was tuned, while the current 184-diff draft is a semantically correct model blocked only by the documented, already-cross-validated (080a8c2c, 080b2328) hi-register allocator tie-break. Adoption gate not met: differing_halfwords=184, not 0. Final measured state this pass: candidate=444 reference=432 differing_halfwords=184 wrong_instructions=106, compile=cache (deterministic across the reverts back to this exact source during this pass)."]},"main:080a35f8":{"schema_version":1,"namespace":"main","address":"0x080a35f8","status":"measured-draft","owner_bytes":688,"candidate_bytes":692,"differing_halfwords":317,"wrong_instructions":244,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/080a35f8.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 8143bp) seeded an m2c control-flow recovery over the complete symbolized owner, cross-checked callee signatures against already-exact siblings (ui/menu/create_cursor.c and inventory_menu/open_item_details.c for Func_080a10d0, menu/spawn_icon_entries.c and field_owner_107.c for Func_080a33d4/Func_080150d0)","family_template":"main:080b1a14","pc_relative_references":5,"jump_tables":0},"notes":["This owner takes a `u16 *positions` array parameter (the raw m2c draft's second 'unset register $r0' read inside the very first Func_08077008 call is the same incoming r0 argument, still live in the register at that point, not a second parameter) and runs a menu-style for(;;) input-poll loop over it (matching the family template's idiom closely, including the same ADDR_03001B04/ADDR_03001C94/ADDR_03001AE8 volatile reads), with an unusual A-button branch that further distinguishes a 'held-select' sub-mode (ADDR_03001AE8 bit 0x200) driving its own modulo-4 cursor-color animation before falling into the shared confirm/cancel tail. Every non-trivial callee signature (Func_080a10d0 6-arg, Func_080a33d4 2-arg, Func_080150d0 5-arg) is independently confirmed by four already-adopted exact siblings, so the call shapes are solid.","The raw m2c draft scored 752 vs 688 bytes, 264 wrong instructions. Two fixes were applied under a tight time budget: widening the persisted selection index from `s8` to `s32` (the same widening lesson as 0801db70 -- the field is read with a genuinely sign-extending `ldrsb` register-offset load either way, but a narrow persisted local caused the compiler to emit a plain immediate-offset `ldrb` instead, which cannot be used for a byte the code later needs sign-extended for arithmetic like `selection * 0x18`), and removing a matching narrowing cast on the modulo-reassignment of that same value. This closed most of the byte gap (752 -> 692, within 4 bytes of the 688-byte reference) and cut wrong_instructions to 244.","Given this owner's size and the time remaining in this batch, only one iteration was run past the initial draft rather than the multi-round narrowing done on the other five owners in this batch; the remaining 244-instruction gap is visibly dominated by register-allocation swaps (r5/r6/r7/sl/r8 assigned to the same logical values in a different arrangement, the same class of residual seen throughout this batch) and at least one instruction-scheduling reorder (the two adjacent state-field reads at 0x1C/0x1E are emitted in the opposite order from the source's textual order), not by any remaining wrong call, wrong constant, or wrong control-flow edge found by inspection.","This is the least-verified draft in the batch -- closest in raw byte count but least iterated -- and is a strong candidate for either a fresh close read against the reference disassembly or permuter-style bounded search, not further blind respelling.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:080a38d0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a38d0","status":"measured-draft","owner_bytes":824,"score":{"measured":"2026-08-27","candidate_bytes":300,"reference_bytes":824,"differing_halfwords":405,"wrong_instructions":345,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering; the operand at struct offset +0x20 (item_window) matches games/gs1/include/inventory_menu.h's InventoryMenuState.item_window exactly, and it sits between the already-named inventory_menu owners open_category_items (080a38a8) and equipment_menu/update_compatibility_indicators (080a3c08), and directly calls EquipmentMenu_StartCompatibilityIndicators (Func_080a3c98) via a ScheduleCallbackAfterFrames((s32)&Data_080a3c09, 0xc80) registration -- this is real inventory/equip-menu code, most likely the item-category selection loop the player uses when choosing which item to equip/use, not a party-member picker. This is the largest and most register-heavy owner in the batch (7 registers live across calls, matching the sibling owners' shared prologue shape) and, given six owners assigned in this batch, it received the least remaining time: the candidate captures the overall for(;;)/redraw/A-B-L-R shape, the item-window bounds setup, the Modulo-driven selection wraparound, and calls into the real siblings InventoryMenu_CountItems (Func_080a3d6c), InventoryMenu_GetItemQuantity (Func_080a3d9c), and Func_080a3ef0, but the exact quantity/availability-icon drawing logic, the equipment-compatibility-indicator dispatch (the Func_080a3d9c-guarded branch that plays sounds 111-114 and draws one of two icon variants depending on compatibility), and most struct-field offsets beyond item_window (+0x20) and target/item owner (+0x21a/+0x21b) are reconstructed only approximately from the raw instruction stream, not independently confirmed. The 524-byte shortfall (300 vs 824) reflects that gap directly."},"rejected_experiments":[],"notes":["Recovered from games/gs1/asm/080a38d0.s. games/gs1/include/inventory_menu.h supplied item_window (+0x20), and the real callee names InventoryMenu_CountItems/GetItemQuantity/IsSpecialItemRange -- the strongest, best-corroborated evidence in this whole batch that a target owner's assembly can genuinely belong to a different module than its clustered template while still sharing the template's control-flow idiom.","The ScheduleCallbackAfterFrames(&EquipmentMenu_CompatibilityUpdateEntry, 0xc80) call near the top (register callback + 3200-tick/order value, read directly off the literal pool as `.4byte 0x080a3c09`) was not modeled in the candidate at all -- it is a real, verified call this draft is missing entirely, left out because the exact registration semantics (order/priority argument) were not chased down in the time available.","This candidate claims zero DONE bytes; it is a rough structural skeleton (300 of 824 bytes), not a close attempt. A proper reconstruction of this owner needs a dedicated pass: the equip-compatibility branch (calls Func_080a3d9c, then dispatches to one of two Func_08015080 icon draws based on its result, then a further Func_080a3d6c/count check with a third icon variant) is the single largest unmodeled chunk and should be traced from the retained assembly before any more respelling is attempted.","No sibling draft existed for this owner before this session."]},"main:080a3ef0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a3ef0","status":"measured-draft","owner_bytes":444,"score":{"measured":"2026-08-27","candidate_bytes":424,"reference_bytes":444,"differing_halfwords":160,"wrong_instructions":114,"class":"wrong","note":"Independently re-measured this session from a fresh worktree/compiler build (prior wave's score was UNVERIFIED after an infrastructure incident; this run reproduces the identical 424/444, 160, 114 figures from scratch). Control flow, the ten-way switch/jump-table over an item type byte, both duplicated equip-check bodies (holder==actor short circuit vs alloc/copy/restore-window path via the 08004938/080072f0(via080072e4 r3-trampoline)/08002df0 alloc-copy-free idiom), and the case-6-only difference (raw item_id vs item_id&~0x200 passed to Func_08077028) all match the retained assembly instruction-for-instruction. The residual is pure register allocation, and this session traced its exact mechanism: item_id's live range spans from the initial mask+lookup through to its one masked read deep inside the case1-9 else-branch. The reference spills item_id to a single stack word (str/ldr [sp,#0]) and keeps fp free for the rest of the function, so fp gets reused by BOTH case1-9's and case6's otherwise-identical other_window locals (their live ranges never overlap each other, only fp's global 'is it free' bookkeeping matters to this allocator). The candidate instead colors item_id into fp for its whole life, which forces each branch's other_window to take its OWN separate stack word instead (str [sp,#4] in case1-9, str [sp,#0] in case6) -- net one word worse (sub sp,#8 vs sub sp,#4, 424 vs 444 body bytes) and it also flips which of holder/flags lands in r8 vs sl from the prologue onward. This looks like a genuine graph-coloring tie the source no longer controls directly."},"rejected_experiments":[{"experiment":"u16 item_id spilled to its own local plus a separate masked_id local for the case1-9 Func_08077028 call (first-pass m2c-shaped draft)","result":"candidate=424 reference=444 differing_halfwords=197 wrong_instructions=171 -- extra locals cost a second stack word (sub sp,#8 vs the reference's sub sp,#4) and never converge on the reference's single-slot reuse"},{"experiment":"s32 item_id (not u16), single local reused in place with item_id &= 0xfffffdff for the case1-9 branch instead of a separate masked_id","result":"candidate=424 reference=444 differing_halfwords=160 wrong_instructions=114 -- current committed draft; matches the reference's AND-mask instruction and its case-6-vs-case1-9 masking asymmetry, but register roles (r8/sl for holder/flags) are still swapped versus the reference"},{"experiment":"move `flags = 0;` from before the Func_08077008(holder) call to just after the item_id extraction (right before the mode==1 check)","result":"re-verified this session (the prior wave's ROM-symlink corruption is fixed): differing_halfwords=165, wrong_instructions=120 -- strictly worse than baseline, rejected"},{"experiment":"s32 flags = 0 as a declaration initializer instead of a separate first statement","result":"byte-identical to baseline (160/114) -- no effect on generated code"},{"experiment":"reparenthesize the item_id load as (u8*)window + (216 + slot*2), and separately as ((u16*)((u8*)window+216))[slot]","result":"byte-identical to baseline (160/114) both times -- the front end folds all three groupings identically"},{"experiment":"drop the named `window` and `item` locals and inline both calls directly into the item_id/type expressions","result":"byte-identical to baseline (160/114) -- confirms the fp-vs-stack choice for item_id is not driven by whether window/item are named locals"}],"notes":["Recovered only from games/gs1/asm/080a3ef0.s traced instruction-by-instruction (hand-computed PC-relative literal-pool addresses and jump-table offsets, cross-checked against the function's own trailing 5-word literal pool) plus the approved local ROM and compiler.","The family-matcher's best guess, games/gs1/src/battle/show_paired_unit_work_and_wait.c (score 7165/10000, below the 7500 adoption threshold), is a 10-parameter dual-object UiWork/WaitFrames animation-trigger routine with no shared callees, field offsets, or constants with this owner -- confirmed a shape-only false positive per this wave's guidance and not used as evidence.","Behavior: Func_080a3ef0(holder, slot, mode, actor) reads holder's inventory window (Func_08077008), extracts the u16 item id at byte offset 216+slot*2, looks the item up (Func_08077018 on item_id&0x1ff) and reads its type byte at offset 2, then dispatches on a 10-entry (0..9) jump table matching the retained assembly's embedded switch table (0x080a4000 for type 0, 0x080a3ff4 for type 6, 0x080a3f6c shared for types 1-5/7-9). Type 0 calls Func_080a112c(*(state+36), actor, slot, flags) directly with flags left as set by the mode==1 check (flags|=0x100). Types 1-5/7-9 and type 6 share near-identical bodies (differing only in the OR'd flag bit -- 2 vs 4 -- and in whether item_id is masked with ~0x200 before the retry lookup): when holder==actor they call Func_080a112c directly with the extra flag bit set; otherwise they snapshot actor's own window into a bump-allocated 0x14c-byte buffer via the 0x080072f0 r3-indirect-call trampoline slot (target 0x03001388, a fixed IWRAM word-copy routine, called (dest,src,words) per the r0-r3 trampoline-slot idiom), probe actor's eligibility (Func_080a40ac), try Func_08077028(actor,item_id) for an alternate slot, fall back to the original slot on -1, call Func_080a112c, restore actor's window from the snapshot, and free the buffer (Func_08002df0).","Func_08004938 is the already-adopted Runtime_BumpAllocate (games/gs1/src/runtime/memory/bump_allocate.c); Func_08002df0 and 0x080072f0 have no games/gs1/asm/.s file and no source-paths.json entry -- 0x080072f0 resolves to the project's documented 0x080072e4 call_via_rN trampoline (N=r3 slot, offset 0xC), so it is not a fictional named function; 08002df0 is a genuine unregistered callee left as an opaque extern. Func_08077008, Func_08077018, Func_08077028, Func_080a40ac, and Func_080a112c are all still raw owners (their own games/gs1/asm/.s files exist, unadopted).","Not adopted: differing_halfwords=160 (of ~222 halfwords), so exact-byte adoption gates are not met. No name was registered in games/gs1/source-paths.json and no .global alias was added to the retained assembly, consistent with the measured-draft convention used by other unregistered dossiers in this directory (e.g. 080b6c08.json)."]},"main:080a40ac":{"schema_version":1,"namespace":"main","address":"0x080a40ac","status":"measured-draft","owner_bytes":100,"candidate_bytes":92,"differing_halfwords":33,"wrong_instructions":36,"classification":"inventory_discard_first_unequipped_stack (medium confidence)","domain":"Takes a single owner id (r0). Calls the veneer at 0x08077008 (OwnerState_GetFar / Func_08077008, already declared in owner_state.h returning struct OwnerInventoryState*) and scans its inventory[15] u16 array (offset 0xd8/216, matching owner_state.h's existing LAYOUT_OFFSET_GUARD) from slot 0 upward. For each encoded slot value: if it is 0, the scan stops and the function returns 1 (empty/terminator reached). If bit 0x200 is set (an 'equipped' flag, consistent with the sibling get_item_quantity.c's item-slot bit layout: 0x1FF item id, bits 11-15 quantity-1), the slot is skipped and the scan continues (up to 15 slots; exhausting all 15 without a hit returns 0). Otherwise -- the first present, non-equipped slot found -- it computes quantity = ((encoded>>11)!=0) ? (encoded>>11)+1 : 1, then calls the veneer at 0x08077058 (which itself long-jumps to 0x080788c4 = Inventory_Remove(owner,slot) per inventory.h) exactly `quantity` times with (owner_id, slot), and returns 1 if the LAST call's return value was 2, else 0. Net effect: finds the first non-equipped item stack and removes it unit-by-unit (fully emptying that slot), reporting success (1) only if the final removal call signalled 2.","notes":["2026-09-01 walking-pointer probe: explicitly reading owner->inventory[0] before the loop, advancing a dedicated slots pointer, and reloading at the bottom compiles byte-identically to the indexed structured loop (92/100 bytes, 33 differing halfwords, 36 wrong instructions). GCC reconstructs the same induction form and still folds the one-off pretest into the walked pointer, so this natural producer/consumer spelling does not recover the reference's separate register-offset pretest or literal 0x200 mask. The readable indexed loop remains canonical and this axis is closed.","The family-matcher's best guess, games/gs1/src/battle/summon/reset_charge.c (score 7342/10000, below the 7500 threshold), is a false positive: it has no relation to this owner's actual semantics (different registers, different callees, no inventory-slot bit logic). It was read and discarded per the task brief's warning about shape-only matches in this project.","Real evidence instead: this owner's address (0x080a40ac) sits in a solid run of already-adopted inventory_menu/*.c owners in source-paths.json -- immediately preceded by main:080a3e88 (inventory_menu/refresh_owner_items.c) and immediately followed, byte-exact (0x080a40ac + 100 = 0x080a4110), by main:080a4110 (inventory_menu/get_command_cursor_x.c). Its first callee (bl to the veneer at 0x08077008) is already declared in owner_state.h as `struct OwnerInventoryState *Func_08077008(s32 owner)` / `#define OwnerState_GetFar Func_08077008`, and the 216-byte (0xd8) offset it reads matches that header's own `LAYOUT_OFFSET_GUARD(OwnerInventoryState_Inventory, ..., inventory, 0x0d8)` exactly. Its second callee (bl to the veneer at 0x08077058) resolves (per the veneer's own retained .4byte target, 0x080788c5 with the Thumb bit stripped -> 0x080788c4) to Func_080788c4, which inventory.h already names `Inventory_Remove` -- so this owner is a genuine, already-connected member of the inventory subsystem, not the battle/summon family the template suggested.","Cloned m2c (matt-kempster/m2c) and ran `compiler workbench` (temporarily registering a placeholder name to satisfy the tool, removed again afterward since exact adoption was not reached) to get an m2c-informed structural hypothesis using the project's real agscc type context. m2c's decompiled output independently reproduced the same control flow this draft had already derived by hand (same terminator/equipped-skip/removal-loop/shared-return-1-tail shape), which increases confidence in the recovered algorithm even though the byte-level match remains incomplete.","Iterated roughly a dozen structurally distinct hand-drafts (do-while vs while vs for for the inner removal loop; a guarded vs unguarded removal loop; encoded read merged into the while-condition vs split into a separate prefetch/test variable matching the reference's redundant reload; struct-field indexing vs a cached u16* pointer; a single `return` vs a goto-unified single-exit tail with a dedicated carry variable copied to the return register, matching the reference's `adds r1,r0,#0` / `adds r0,r1,#0` pattern) without applying any register hint, asm(), or hand scheduling -- only ordinary, plausible C shapes. Best result: 92/100 candidate bytes, 33 differing halfwords, 36 wrong instructions (down from an initial naive draft's 94 bytes / 43 differing halfwords / 49 wrong instructions).","Residual gap is concentrated in one persistent, small structural knot: the reference's prologue loads the 216 struct offset into a register for a register-offset ldrh (`movs r3,#216; ldrh r3,[r0,r3]`) as a one-off PRE-loop test read, then separately bumps the pointer by an immediate 216 for the walking body reads, and shares that pre-test with the loop-back edge via an unconditional jump to a bottom test (`b.n .L0`) rather than an immediate top-of-loop compare+branch; it also loads the 0x200 equip-bit mask from an inline literal pool (`ldr r3,[pc,#40]` -> `.4byte 0x00000200`, placed as dead data right after an already-required branch) instead of synthesizing it with movs+lsls. Every natural source rewrite tried either reproduced the compiler's own (smaller, correct-behavior) synthesis of 0x200 and an immediate top test, or, when forced toward the reference's exact prefetch/shared-test shape via genuinely different source (a manual goto-based rotated loop, or splitting the test read from the body read), lost the compiler's loop-strength-reduction (address recomputed via `lsls+ldrh[r,r]` per iteration instead of a walked pointer) and got further from the reference, or required extra live-range pressure that spilled a variable to r8 (mov r7,r8; push {r7}) rather than reusing r1/r5 the way the reference does. This reads as a genuine small, persistent compiler-scheduling/allocation difference (per Cleanroom's 'invert a stalled last mile' guidance) rather than a wrong overall model -- the algorithm, callees, offsets, and loop trip count are all corroborated by two independent methods (hand trace + m2c) and match the header-declared struct layout exactly."],"rejected_experiments":[{"experiment":"signed s32 `encoded >> 11` (no unsigned cast)","result":"compiled to `asrs` (arithmetic shift) instead of the reference's `lsrs` (logical shift) -- same numeric result for this value range but a different opcode/byte pattern. Fixed by shifting through `(u32)encoded >> 11` while keeping `encoded` itself as a plain s32 (a u16-typed local instead produced spurious lsls/asrs #16 sign-extension shuffles on every use)."},{"experiment":"plain `if (remove_result == 2) return 1; return 0;` immediately after the removal loop, with a single local for the call result","result":"gcc synthesized a branchless eors/negs/orrs/lsrs bit-trick tail instead of the reference's cmp+branch; only went away once the two return-1 exits (loop-terminator-found and remove-result-==2) were unified through one shared `goto found;`+single final `return result;`, which is what let the compiler recognize and reuse the same tail code the reference does."},{"experiment":"manual goto-based 'jump to bottom test' loop rotation, written by hand to mimic the reference's b.n .L0 / prefetch shape","result":"86 candidate bytes but WORSE match (42 differing halfwords, 51 wrong instructions): breaking the loop out of a structured while/for construct stopped gcc's own induction-variable strength reduction, so the per-iteration address became `lsls r3,r6,#1; ldrh r2,[r3,r1]` (recomputed from base+index*2) instead of the walked-pointer `adds r0,#2; ldrh r2,[r0,#0]` both this draft's structured loop and the reference use."},{"experiment":"adding the `if (quantity != 0) { do {...} } ` guard test (matching the reference's redundant-but-real dead check) around the removal loop","result":"reproduces the reference's extra cmp+beq guard, but the wider live range needed for the call-result variable across that extra edge pushed it to r8 (mov r7,r8; push {r7}, 114-116 candidate bytes) unless combined with a goto-unified single return (see above), which brought it back down to 88-92 bytes with the guard intact and no spill -- the version kept in this draft."}]},"main:080a414c":{"schema_version":1,"namespace":"main","address":"0x080a414c","status":"measured-draft","owner_bytes":832,"score":{"measured":"2026-08-27","candidate_bytes":828,"reference_bytes":832,"differing_halfwords":400,"wrong_instructions":186,"class":"wrong","note":"Every branch target, call target, field offset, and constant in the aligned diff (candidate-show --align) matches the reference exactly once the prologue's 4-byte length gap is accounted for: from the first post-prologue instruction (str r2,[sp,#4] / str r1,[sp,#4]) through the function's closing pop/bx, every '!' line is either a pool-offset shift or a register-bank rename (r1<->r2, r2<->r3) that is a direct, constant -4-byte-offset consequence of the prologue gap -- no algorithmic, control-flow, or data mismatch remains anywhere past it. The entire gap is localized to the first ~13 instructions: the reference computes the command_states array's frame address as two instructions (movs r1,#8; add r1,sp) and keeps index=0/row=0/need_redraw=1 as three separately-loaded constants (r1, r2, r3) with the Data_03001f2c dereference (ldr r6,[r3,#0]) scheduled after the row constant, whereas this compiler's build folds the array address into one 'add r3,sp,#8', reuses the already-zero r1 for both index and row, and hoists the Data_03001f2c dereference to the very first instruction of the function body. Tried five independent source-level levers to influence this -- reordering the index/row/need_redraw/menu assignments as statements in every plausible order, converting all four to declaration initializers in matching order, reordering the local declarations themselves (including moving command_states last), shrinking command_states from 8 to 6 bytes, and passing &command_states[0] instead of the bare array to InventoryMenu_BuildCommandStates -- and every variant produced byte-identical output (828 bytes, same instruction stream), confirming this compiler schedules this specific cluster of independent, side-effect-free prologue constants and the parameterless global dereference by its own internal register-pressure/priority heuristic rather than by source statement or declaration order. This matches the same class of compiler-internal register-allocation/scheduling residual already documented and not chased further in this cluster's other measured-drafts (080b2b10.json, 080ab314.json)."},"family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"Score 8568/10000 (n-gram/call-target/branch clustering) reflects only the generic register-shuffle-prologue/redraw-loop/if-chain shape shared by every owner in this shop/menu cluster, not real kinship: this owner shares zero callees with Func_080b362c (no UiWindow_CreateFar/Ability_GetAvailability/Func_080772a8/UiWork_Create) and its size (832 bytes) already differs from the template's 576. This owner's own retained assembly instead calls Func_080a345c/Func_080a4110/Func_080a413c/Func_080a448c/Func_080a45cc/Func_080a4eb8/Func_080a51d0 with exactly the parameter counts and struct-offset arguments (0x10c, 0x174, 0x178, 0x21a) declared in the already-adopted games/gs1/include/inventory_menu.h and implemented by the already-adopted games/gs1/src/inventory_menu/*.c siblings (build_command_states.c, get_command_cursor_x.c, get_command_cursor_y.c, draw_command_labels.c, set_message_window_row_7_bounds.c, draw_selected_item_header.c, close_windows.c) -- an exact structural match confirmed independently of the family score. Kept only as a source of general shop/menu redraw-loop shape, per instruction; not used for any field offset, call target, or algorithm decision below."},"actual_sibling_evidence":"This owner is the item command menu: reached after an item slot is selected, it builds a 3-column x 2-row command-availability grid via the already-adopted InventoryMenu_BuildCommandStates(s8 command_states[6..8]) (games/gs1/src/inventory_menu/build_command_states.c), lets the player move a (col,row) cursor over it with the d-pad (UP/DOWN adjust row via 0x40/0x80, LEFT/RIGHT adjust col via 0x10/0x20, matching InventoryMenu_GetCommandCursorX/Y's row*3+col grid convention in get_command_cursor_x.c), and returns the chosen command index 0-5 (or -1 on cancel) to its only caller, main:080a2680 (not yet recovered; its retained assembly calls this owner and treats -1 specially). Every struct field this owner touches on Data_03001f2c matches games/gs1/include/inventory_menu.h's struct InventoryMenuState exactly at its already-named offsets (message_window=0x10c, selected_slot=0x174, selected_item=0x178, item_owner=0x21a, info_window=0x2c) and, for offset 0x24 (a window handle passed to Func_080a112c), against the identical (menu+0x24, id, 0, 0) call shape already independently reconstructed in two other measured-draft inventory_menu owners' assembly (080a60d4, 080a63e4) and in the already-adopted games/gs1/src/inventory_menu/close_windows.c, which lists 0x24 among a run of window-handle fields (0x10,0x20,0x24,0x28,0x2c,0x30,0x34,0x38,0x3c,0x40) it releases -- confirming 0x34 (also read here, via UiWindow_Commit) and 0x24 are genuine window fields of this same struct, not yet individually named. The two offsets this owner writes but that fall past the struct's current LAYOUT_SIZE_GUARD end (0x25c, 0x25d, one and two bytes past the guard's 0x25c size) are new evidence that the true struct extends at least two bytes further than currently modeled; left as raw offsets rather than extending the shared header in this pass. The message-id composition '(selected_item & 0x1ff) + (s32)&Value_00000075' reuses the exact same Value_00000075 extern-byte message-base symbol already used by games/gs1/src/shop/select_use_item.c and games/gs1/src/shop/select_repair_item.c, and the EquipmentMenu_StartCompatibilityIndicators()/ScheduleCallbackAfterFrames(&EquipmentMenu_CompatibilityUpdateEntry, 0xc80) pair matches games/gs1/include/equipment_menu.h's already-adopted declarations exactly, including the literal pool value 0x080a3c09 for &Data_080a3c09.","rejected_experiments":["Assumed an incoming s32 actor parameter (matching the family template's signature, and m2c's naive seed): the retained assembly overwrites r0 (mov r0,fp) before ever reading it, proving this owner takes no arguments. Declared it s32 Func_080a414c(void) instead -- confirmed correct against the caller (main:080a2680 does not need to supply a meaningful r0).","First draft used 'if (command_states[index] != -1) { switch...; store; break; } Audio_PlayCue(114);' (valid-selection branch first): compiled to an inverted branch polarity and a differently-laid-out block versus the reference's 'bne valid; play(114); jump-past-switch; valid: switch...'. Rewritten as 'if (command_states[index] == -1) { Audio_PlayCue(114); } else { switch...; store; break; }' (invalid-first, matching Cleanroom's largest-coherent-hunk-first guidance) -- this fixed every branch topology and target in the entire rest of the function (confirmed via full --align diff: zero non-offset mismatches from this point to the closing bx) and shrank the candidate/reference byte gap from 8 to 4.","col = Modulo(saved, 3); row = FixedPoint_Ratio(saved, 3); (no truncation): missing the explicit lsls/asrs #24 sign-extension-through-s8 the reference performs on both call results. Added explicit (s8) casts on both -- matched.","Five independent attempts at the remaining 4-byte prologue gap (see score.note for the exact list: statement reordering, declaration-initializer conversion, declaration reordering, array size 8->6, and &command_states[0] vs bare array): all five produced byte-identical candidate output, indicating the gap is driven by this compiler's internal register-scheduling/priority heuristic for a cluster of independent zero/one constant loads and a dependency-free global dereference, not by any C-source-level lever tried. Not chased further per the project's guidance against open-ended tuning once control flow, algorithm, and every call/constant/offset are already credible."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080a414c.s, 832 bytes) and its m2c-assisted canonical/symbolized disassembly (out/family-transplants/main-080a414c/m2c/symbolized.s, which resolves every pc-relative literal and the inline jump table), the approved local EN ROM, games/gs1/include/inventory_menu.h and its already-adopted games/gs1/src/inventory_menu/*.c implementations (build_command_states.c, get_command_cursor_x.c, get_command_cursor_y.c, draw_command_labels.c, set_message_window_row_7_bounds.c, draw_selected_item_header.c, close_windows.c, use_selected_item.c, prepare_owner_items.c), games/gs1/include/equipment_menu.h and games/gs1/include/types.h/global_cells.h for the shared macro names (UiText_DrawAt, UiWindow_Commit, WaitFrames, Audio_PlayCue, GameFlag_IsSet, Modulo, FixedPoint_Ratio, ScheduleCallbackAfterFrames, ADDR_03001B04/C94), games/gs1/src/shop/select_use_item.c and select_repair_item.c (for the Value_00000075 message-base convention, read per the task's instruction to check shop siblings; their own algorithm was not used since this owner's real kinship is with inventory_menu/, not shop/), and the approved compiler. Also cross-checked against this session's own prior measured-drafts games/gs1/recon/en/dossiers.json#main:080b2b10 and 080ab314.json, which independently documented the same 'assigned template is a shape-only false positive' finding for this cluster and the same class of unresolvable register-scheduling residual. No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","This candidate claims zero DONE bytes; games/gs1/asm/080a414c.s remains authoritative.","Verified with: tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/080a414c.c --align"]},"main:080a46b4":{"family":"template-main-08025180","template_owner":"main:08025180","template_source":"games/gs1/src/items/classify_use_ability.c","candidate_path":"games/gs1/recon/en/main/080a46b4.c","reference_bytes":160,"best_candidate_bytes":160,"best_differing_halfwords":0,"best_wrong_instructions":0,"status":"exact","notes":["Template battle_owner_15.c (Item_CanOwnerEquipDirect-shaped: two early-return checks then a single ability-flag test) gave the right M2C_FIELD idiom and general shape, but this owner's actual control flow (from games/gs1/asm/080a46b4.s) is a materially extended variant: masked = itemId & 0x1ff; two calls (Func_08077018 for item data, then Func_0808a490(masked) which short-circuits to `return 0` if nonzero); Func_08077080 is called UNCONDITIONALLY on (field40 & 0x3fff) to get an ability pointer even before the field40!=0 guard is checked (field40 is read from memory twice: once for the call argument, once for the guard, rather than being cached); nested field2/field12 checks decide whether Func_08077218(owner, masked) gets consulted; and the final ability-flag check is a 3-way result (2 / 1 / 0 / -1) driven by bits 0x40 and 0x80 of ability byte 1 and a `field8==0xff` check, not the template's simple 2-vs-0 test.","Iterated 4 respellings, converging from wrong_instructions=42 down to 16 (candidate 156B vs reference 160B, a 4-byte/2-instruction residual). Key fixes: (a) splitting `masked = itemId & 0x1ff` into a plain-copy-then-AND-in-place (two statements) instead of one combined-expression AND, matching the reference's adds-then-ands register reuse; (b) moving the Func_08077080 call to read field40 fresh via M2C_FIELD directly as its argument (not through a cached local), and reading field40 AGAIN via M2C_FIELD for the `!= 0` guard immediately after the call, instead of guarding before the call and reusing one cached value; (c) restructuring the field2/field12/Func_08077218 logic as three explicit nested `if` statements (matching reference's branch order exactly: field40 guard, then field2, then field12, then the call) rather than an if/else-if with a compound `&&` condition.","Residual: the final `(field1 & 0x80) ? -1 : 0` bit test compiles to a single `lsrs r3,r2,#7` (extract bit 7 directly) in the candidate, versus the reference's `movs r3,#128; ands r3,r2` (explicit mask-and) -- both are followed by the identical branchless negate/or/lsrs-#31 sign-extraction tail (which matches exactly), so this is purely which of two equal-cost single-bit-test encodings the compiler picks. Tried the same test as an explicit `!= 0` comparison, as a bare truthy ternary, and with the loaded byte declared `s8` instead of `u8` (this last one regressed the match to wrong_instructions=28, so reverted) -- none produced the AND form. The identical bit-test earlier in the same function (`field1 & 0x40`, used as a genuine branch condition rather than a value fed into a branchless ternary) DOES compile to the AND form in both candidate and reference, suggesting the shift-vs-mask choice is driven by whether the bit test result flows into a conditional branch or into a value-producing expression -- a compiler-internal codegen choice I could not reach by respelling the C, not a remaining logic/shape gap.","This 2-instruction residual is the only remaining difference; a permuter-style search over just that one sub-expression's phrasing (rather than further manual guessing) is the most promising next step.","measured=2026-08-29: tried four more respellings of `(field1 & 0x80) ? -1 : 0` targeting the shift-vs-mask codegen choice -- (a) `((field1 & 0x80) != 0) ? -1 : 0`, (b) `(field1 & 0x80) == 0 ? 0 : -1`, (c) hoisting into an intermediate `s32 bit7 = field1; bit7 &= 0x80;` before the ternary (mirroring the earlier successful `masked` split), (d) decimal `128` instead of `0x80`. All four compiled to the identical `lsrs r3,r2,#7` and left differing_halfwords=24/wrong_instructions=16 unchanged -- refuted, reverted to the documented `(field1 & 0x80) ? -1 : 0` baseline. Confirms this is a compiler-internal codegen choice (bit-test flowing into a value-producing ternary vs. a branch condition) not reachable by respelling this expression; needs a different structural approach (e.g. changing what feeds the ternary, or accepting the residual) rather than further sub-expression rewording.","measured=2026-08-29 (resolved): the missing piece was register-pressure/pseudo-materialization timing, not the ternary's phrasing. Hoisting `s32 mask = 0x80;` immediately before the ternary (same block as the `else`) still produced `lsrs`. But declaring `s32 mask = 0x80;` at the TOP of the `if (result == 1) { ... }` block -- i.e. before `u8 field1 = M2C_FIELD(abilityData, u8, 1);` and thus before the `field1 & 0x40` branch that comes first -- makes GCC 2.96 materialize 0x80 into its own register early, and it then reuses that register for the final bit test as `movs r3,#128` / `ands r3,r2`, matching the reference exactly. Final form: `if (result == 1) { s32 mask = 0x80; u8 field1 = ...; if ((field1 & 0x40) != 0) {...} else { result = (field1 & mask) ? -1 : 0; } }`. This closed the function to differing_halfwords=0 / wrong_instructions=0 (candidate=160B=reference). `make verify` passed (staged tree verified, hash 67c15b02271bc8061ebfd1ecf203b4d91ec652f6); working tree left unstaged and uncommitted per instructions."]},"main:080a524c":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a524c","status":"measured-draft","owner_bytes":316,"score":{"measured":"2026-08-27","candidate_bytes":316,"reference_bytes":316,"differing_halfwords":124,"wrong_instructions":52,"class":"wrong","note":"This owner was assigned to the shop/select_party_member.c family by n-gram/call-target clustering, but its actual callees (Item_Get/Func_08077018, UiWindow_CreateFar, UiText_DrawAt, Modulo, GameFlag_IsSet) and its fixed-2-choice Yes/No shape identify it as an inventory-menu confirmation dialog, not a party-member picker -- it sits between the already-named inventory_menu owners 080a4ee0 (SetMessageWindowRow3Bounds) and 080a5534 (Resource_LoadPairedBlocks) in source-paths.json. The template's for(;;)/redraw idiom still transplants correctly at the control-flow level: candidate byte length now matches the reference exactly (316/316) and the full prologue, the UiWindow_CreateFar(13,3,17,10,2) call, the item-mask-and-lookup, all five UiText_DrawAt icon/label draws, the up/down/A/B button polling against ADDR_03001B04 and ADDR_03001C94, the Modulo(selection+2,2) wraparound, and the GameFlag_IsSet(0x150)-guarded abort path are all present and logically correct. The residual 52 wrong_instructions trace back to one concrete, isolated instruction-selection difference: the reference materializes the message-id constant 0x182 (added to the masked item id for the first UiText_DrawAt call) via a literal-pool load (`ldr r3,[pc,#N]`), while every C phrasing I tried for that same arithmetic compiles to a two-instruction mov+lsl synthesis (`movs r2,#193; lsls r2,r2,#1`) instead. Because that one site is 2 bytes shorter than the reference's pool load, the --align tool's phase-locked comparison misreads a long run of otherwise-correct downstream instructions as mismatched (register numbers shift by one map slot after that point) even though the call sequence, branch structure, and constants all still line up when read manually. This looks like a compiler-internals residual (a fixed instruction-selection heuristic for ADD-immediate materialization that C source phrasing does not control), not a source-shape gap -- worth revisiting with a permuter-style search over instruction-selection variants rather than more manual respelling."},"rejected_experiments":[{"cell":"window-var-declared-before-selection","reason":"Declaring `s32 window; s32 selection; s32 changed;` in that order (matching first-use order) puts `window` in r8 instead of r7 and `changed` in r7 instead of r8 (candidate=308, differing_halfwords=137, wrong_instructions=70). Reordering the declarations to `selection; window; changed;` (matching apparent register-allocation-by-declaration-order for this compiler) fixed window->r7, selection->r6, changed->r8 and dropped wrong_instructions to 52."},{"cell":"changed-initialized-to-literal-1","reason":"Writing `s32 changed = 1;` at the top (alongside `selection = 1`) makes the compiler re-materialize a fresh `movs r7,#1` instead of the reference's `mov r8,r6` (copying the already-live selection value). Writing `changed = selection;` right after `selection = 1;` (so the compiler can see they are provably equal) reproduces the `mov r8,r6` register-copy pattern exactly."},{"cell":"message-id-plus-0x182-as-inline-expression","reason":"`UiText_DrawAt((item_id & 0x1FF) + 0x182, window, 24, 0)` compiles the +0x182 via `movs r2,#193; lsls r2,r2,#1` (shift synthesis), not the reference's literal-pool load. candidate=308."},{"cell":"message-id-plus-0x182-as-separate-statements","reason":"Splitting into `item_id &= 0x1FF; item_id += 0x182;` as two statements produces the identical shift-synthesis codegen as the inline-expression form -- ruling out expression-shape as the cause. candidate=316 (after the declaration-order fix), same 52 wrong_instructions."},{"cell":"message-id-plus-0x182-operand-order-swap","reason":"`0x182 + (item_id & 0x1FF)` (commuted operand order) produces byte-identical output to the non-commuted form -- the compiler's constant-materialization choice does not depend on operand order."},{"cell":"message-id-via-separate-named-local","reason":"Introducing a dedicated `s32 msg;` local, assigned via `msg = item_id & 0x1FF; msg += 0x182;` instead of reusing the `item_id` parameter register, also still synthesizes via shift, not pool-load. This rules out register/variable identity as the cause and narrows the residual to the ADD-immediate itself: the same literal 0x150 and 0x480/0xc80-style constants elsewhere in this family's sibling owners (080a38d0, 080a5388) genuinely do compile via shift-synthesis when used as a fresh MOV (loading a brand-new register for a call argument), so the reference's choice of pool-load specifically for an ADD-to-existing-value context looks like a real, narrow compiler heuristic difference rather than something reachable by any respelling of this owner's own source."}],"notes":["Recovered from games/gs1/asm/080a524c.s (retained ground-truth disassembly) plus games/gs1/include/types.h's large Func_0XXXXXXX name registry, which already established UiWindow_CreateFar=Func_08015010, Item_Get=Func_08077018, UiText_DrawAt=Func_08015080, Audio_PlayCue=Func_080f9010, WaitFrames=Func_080030f8, Modulo=Func_080022fc, UiWindow_Close=Func_08015018, and GameFlag_IsSet=Func_080770c0.","This candidate claims zero DONE bytes; it is not byte-exact.","The five drawn message ids (0x1FF-masked item id + 0x182, then the literal pairs 0xAD4/0xAD5 and 0xB2C/0xB2D) were read directly off the function's own literal pool in program order, not guessed; the 0xB2C/0xB2D pair also appears as the horizontally-laid-out Yes/No pair in the sibling owner 080a5388, reinforcing that these are shared text-resource ids for a generic Yes/No choice reused by several inventory-menu dialogs.","No sibling draft existed for this owner before this session (checked games/gs1/recon/en/dossiers.json#main:080a524c and games/gs1/source-paths.json; neither had an entry)."]},"main:080a5388":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a5388","status":"measured-draft","owner_bytes":428,"score":{"measured":"2026-08-27","candidate_bytes":388,"reference_bytes":428,"differing_halfwords":211,"wrong_instructions":155,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering, but this owner is an inventory-menu equip/transfer confirmation dialog operating on Data_03001f2c (it sits between the already-named inventory_menu owners 080a51d0 and 080a5534 in source-paths.json), not a party-member picker. It shares the template's for(;;)/redraw/Modulo-wraparound Yes-No idiom with sibling 080a524c but adds an owner-state snapshot/restore around the confirmation: Runtime_GetObject(menu->target_owner) fetches the acting owner's inventory record, Mem_Copy (Func_080072f0, 4-arg form: dst,src,size,desc) backs it up into a Runtime_BumpAllocate'd 0x14C-byte scratch block before the dialog runs, Func_08077050 tests item/owner compatibility to decide whether to even show the dialog (skipping straight to a rejection sound 175 and forced selection=1 when incompatible), and on a 'No' outcome the snapshot is copied back over the live owner record before the scratch block is freed and BattleUnit_Recalculate/Func_080772c0 refresh derived stats. The candidate reproduces this whole shape and call sequence but is 40 bytes shorter than the reference (388 vs 428): the reference's prologue saves four high registers (fp, sl, r9, r8 -- i.e. it keeps 7 registers, r5..r9/sl/fp, simultaneously live across calls), while the candidate's register allocation only needed 3 (sl, r9, r8), meaning at least one more value in the real source stays live across a call boundary than in this draft -- most likely the target_owner byte or the message id used for the second UiText_DrawAt draw is re-read from a live register in the reference rather than re-loaded from the struct byte each time as this draft does. This is a source-shape gap (an under-modeled live variable), not something I chased down to an exact fix given the time remaining."},"rejected_experiments":[{"cell":"func_080072f0-as-3-arg-dest-src-size","reason":"Initially read the ROM's `bl Func_080072f0` call with only 3 visible register-setup instructions (r0=K,r1=ownerState,r2=332) and assumed a 3-arg memcpy-like signature with the fixed global 0x03001388 as the destination. games/gs1/include/runtime_mem.h already declares `void Func_080072f0(void *dst, void *src, s32 size, void *desc)` (Mem_Copy) as 4-arg; re-reading the raw asm showed r0 was never reloaded before the call (it still held Runtime_BumpAllocate's return value from two instructions earlier), so the real args are (dst=bump-allocated buffer, src=ownerState, size=332, desc=0x03001388) -- the bump-allocated buffer is the snapshot destination, not an unused scratch. Fixed by switching to the 4-arg Mem_Copy from the header; this changed the function's behavior (the snapshot is now actually populated) but the resulting candidate is still not byte-exact."},{"cell":"runtime-bump-allocate-as-pointer-return","reason":"Declared a local `Func_08004938` prototype returning `void *`; games/gs1/include/runtime_mem.h already declares `u32 Runtime_BumpAllocate(s32 size)` (u32 return, not pointer) and is used everywhere else in the codebase that way. Switched to the header's declaration and cast at each use site to match."}],"notes":["Recovered from games/gs1/asm/080a5388.s. games/gs1/include/runtime_mem.h supplied the real Runtime_BumpAllocate/Mem_Copy/Sys_Free signatures used here, which corrected an initial misreading of the mid-function memcpy-style call.","The struct-byte offset 0x21B (menu->target_owner) was read directly off the function's own literal pool (a `.4byte 0x0000021b` entry loaded via pc-relative ldr and added to the Data_03001f2c pointer), not guessed; it is reused via the same deduplicated pool slot at both the top (fetch) and bottom (restore-path re-read) of the function.","The Yes/No label pair drawn at (24,24)/(72,24) uses message ids 0xB2C/0xB2D, read from the literal pool in program order -- the same 0xB2C value the sibling owner 080a524c draws as its vertically-stacked 'No' label, which is corroborating (not conclusive) evidence these are a shared pair of Yes/No text resources reused across several inventory-menu confirmation dialogs.","This candidate claims zero DONE bytes; it is not byte-exact and the register-liveness gap described above was not resolved in this pass.","No sibling draft existed for this owner before this session."]},"main:080a5614":{"schema_version":1,"namespace":"main","address":"0x080a5614","status":"measured-draft","owner_bytes":180,"candidate_bytes":172,"differing_halfwords":78,"wrong_instructions":50,"classification":"inventory-item-page-row-markers","family":{"id":"template-main-080a56c8","template_owner":"main:080a56c8","template_source":"games/gs1/src/inventory_menu/draw_item_name_page.c","note":"Same InventoryMenu domain and same 3-arg (window, unused, state) signature idiom, but this owner does not draw item name text at all -- it caches page*5+entry_count into state+24, optionally draws one status message via Func_08015080 when *(u16*)(menu+combined*2+456)!=0, then runs a fixed 5-iteration loop calling Func_080a2268 (a 6-arg call, 2 args on the stack) to draw per-row markers, picking tile 14 vs 15 in the 6th argument depending on whether the row equals entry_count. Only the field-offset conventions (menu+44, menu+32) and the general shape carried over from the template."},"notes":["Read the raw assembly directly: page=state->+8, menu=Data_03001f2c, combined=page*5+state->+16(entry_count), state->+24=combined; Func_08015270(*(menu+44)); WaitFrames(1) [Func_080030f8]; combined=state->+24 (re-read); flag_val=*(u16*)(menu+combined*2+456); if(flag_val!=0) Func_08015080((flag_val&0x1ff)+(s32)&Value_00000075, *(menu+44), 0, 0); then a do-while row=0..4, y=1,3,5,7,9, each iteration calling Func_080a2268(*(menu+32), 1, y, 14, 1, row==entry_count?14:15) -- confirmed the two branches share reg-arg4=14 and stack-arg5=1 and only differ in the final stack argument (14 vs 15).","The Value_00000075 spelling (address-of-symbol rather than a plain +0x75) was inferred from the same evidence pattern as the sibling owners in this batch: 0x75 fits an 8-bit movs immediate yet the reference still spends a pool load on it, which only makes sense if it's really `(s32)&Value_00000075`, matching this project's established Value_XXXXXXXX convention for message-id bases.","Reordering `page = state->8` to be read before `menu = Data_03001f2c` (matching the reference's read-page-before-deref-menu sequence) improved the score marginally (wrong_instructions 52->50); the call sequence, argument counts/values, and branch condition all already match structurally. Remaining differences are concentrated in register-role choices for the two `ldr [pc,#108]`-textual-offset (but distinct real address) pool constants feeding the `(flag_val & 0x1ff) + base` expression, and in the ordering of a few stack stores inside the two Func_080a2268 call sites.","This reads as a scheduling/register-role gap on an already-correct algorithm rather than a missing behavior; worth another pass experimenting with the AND/ADD operand order (e.g. `(s32)&Value_00000075 + (flag_val & 0x1ff)` swapped) and with computing the row==entry_count call's stack args in the reference's exact instruction order before another measurement.","Adoption requires 0 differing_halfwords."]},"main:080a5cc0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a5cc0","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":798,"score":{"measured":"2026-08-27","candidate_bytes":798,"reference_bytes":798,"differing_halfwords":232,"wrong_instructions":122,"class":"wrong","note":"Instruction count now matches the reference exactly (316 candidate insns vs 316 reference insns; a linear .insns diff is 116 of ~316 lines, almost entirely register-name substitutions). The residual is dominated by one persistent register-bank choice: the reference keeps the function's `result` accumulator in fp (r11) for its whole life, this candidate keeps the same value live the same way but in r9, and that single swap cascades into every instruction that touches it plus a few dependent sl/r9 reuses in state 4. A handful of instruction-order swaps remain independently (argument-load order into two identical Func_080a112c(window, owner, 0, 0) calls; one constant materialization that folds via a delta add in the candidate vs a fresh reload in the reference for the 0x268 field offset)."},"family":{"template_considered":"shop/select_use_item.c (family-matcher score 7287/10000, LOW confidence, below the 7500 adoption-lead threshold)","verdict":"false-positive template, confirmed by reading it: shares only generic callees (Audio_PlayCue, WaitFrames) and the register-shuffle prologue shape. No shared field offsets, no shared real callees, no shared constants with this owner. The actual identity was recovered entirely from this owner's own retained assembly plus already-adopted callees it shares real evidence with (games/gs1/src/item/use.c, games/gs1/src/inventory_menu/{use_selected_item.c,draw_message.c,position_category_items.c}, games/gs1/src/ability/play_use_animation.c, and games/gs1/include/{inventory_menu.h,psynergy_menu.h,battle_runtime.h,battle_types.h,battle_calc.h})."},"classification":"menu_action_state_compiler_allocation_module","domain":"A do-while-shaped, five-state confirm/execute loop for the currently selected Inventory item or Psynergy ability against the polymorphic Data_03001f2c menu-runtime cell. State 0 clears the selection and primes the info window; state 1 waits a frame, checks the entry count, and (via a byte field at cell offset 0x268 that this draft calls `mode`) either assigns a shortcut and restarts or advances; state 2 classifies the selection through PsynergyMenu_ClassifySelectedPsynergy and either asks for confirmation (state 3), forces a self-target and executes (state 4), or finishes and writes the acting owner id plus the selection (masked 0x3fff) back through the caller's two out-parameters; state 3 re-confirms; state 4 actually calls the low-level ability-apply routine (Func_080a9f10, the same one games/gs1/src/item/use.c's Item_Use calls), pays the ability's PP cost from BattleAction.pp_cost via BattleUnit_Drain, recalculates the unit, plays the use animation or an error cue, and reports success/failure. The loop itself exits on a GameFlag_Test(0x150) check that is re-tested once more after the loop to force a -1 result.","expressed":["the exact 5-state switch shape and its physical case layout (source order 0, 1, 3, 2, 4 -- confirmed by matching the reference's case-3-before-case-2 byte layout, not just its behavior)","the while-loop rotation (goto-condition-first) matching the reference's initial jump to the bottom-of-loop test block rather than straight into the switch","every real call target, argument, and struct-field offset touched (item_owner/target_owner @0x21a/0x21b, info_window @0x2c, the selected id @0x178 masked 0x3fff, entry_count @0x218, completion_flag @0x222, message_offset @0x25a plus (s32)&Value_00000bef, and the two not-yet-named fields at 0x24 and 0x268)","the PP-cost payment via BattleAction.pp_cost, matching battle_types.h's named field exactly","the self-target sentinel (9) correction and its effect on the final state transition","instruction count parity with the reference (316 = 316)"],"remaining":[{"op":"register-bank allocation","count":1,"where":"the whole-function `result` accumulator: reference allocates fp (r11), this candidate allocates r9. Every one of the ~15 instructions that read or write it, plus its downstream sl/r9 reuse in state 4, differs in encoding even though the operation sequence is identical."},{"op":"instruction ordering","count":2,"where":"argument-load order (constant-arg vs field-load) into the two identical Func_080a112c(work->field_024, owner, 0, 0) call sites"},{"op":"constant materialization","count":1,"where":"the second read of the 0x268 mode field inside state 1: reference reloads it fresh (movs+lsls), this candidate folds it as a delta add off the still-live 0x218 entry_count offset"}],"rejected_experiments":[{"experiment":"do-while loop (condition re-tested at the bottom only) instead of a rotated while loop","result":"wrong physical layout entirely -- the reference's initial branch lands on the bottom-of-loop condition block before ever reaching the switch, which only a `while (cond) { switch }` rotation reproduces. Fixed; not reverted."},{"experiment":"switch cases written in numeric order 0,1,2,3,4","result":"wrong physical case layout -- case 3's body must precede case 2's in source for the compiler to lay out 0x13a before 0x162. Fixed; not reverted."},{"experiment":"case 3 written as `if (x != -1) { state = 4; break; } else { ...; state = 1; }` vs the pre-set idiom `state = 4; if (x == -1) { ...; state = 1; }`","result":"byte-identical candidate output either way -- the compiler normalizes both phrasings to the same pre-set-then-override shape. Kept the pre-set form for consistency with the rest of the function; not a residual lever."},{"experiment":"local declaration order (result first vs last among the function's locals; result initialized before vs after state/done)","result":"moving the declaration alone made no difference; moving the initializing *statement* ahead of state/done regressed to 317 candidate instructions (one extra) and a larger diff. Reverted to state=0; done=0; result=0 statement order."},{"experiment":"case-4 locals (raw, self_flag, action) as a nested block-scope vs promoted to function scope","result":"no change to the candidate output at all (same 316 insns, same 116-line diff, same fp/r9 residual). Kept the flatter function-scope form since it made no difference."}],"next":"The residual is a single register-bank choice (fp vs r9) for one long-lived accumulator, not a structural or semantic gap. Closing it likely needs either a genuine source-shape difference not yet tried (a variable ordering or an additional/different local elsewhere in the function that shifts overall register pressure) or the bounded permuter's search over the two evidenced instruction-order ambiguities noted above; do not force the register choice by hand.","notes":["Recovered only from the retained owner assembly (games/gs1/asm/080a5cc0.s), the approved local ROM, already-adopted in-repository callers and headers, and the approved compiler.","The family-matcher's shop/select_use_item.c lead was read and rejected as an unrelated shape-only match per the task's warning; no code, names, or structure were carried over from it.","No external game source, copied instruction bytes, inline assembly, fixed-register variable, or compiler barrier was used.","The structured assembly remains the byte-exact implementation. The complete C has exact 798-byte extent, exact 316-instruction count, and branch-structure equality; the remaining residual is equivalent register allocation, two independent instruction-order pairs, and one equivalent constant rematerialization.","A canonical shipped-route matrix covering regmove, both schedulers, GCSE, CSE follow/skip, rerun CSE, strength reduction, expensive optimizations, and thread jumps preserves the floor or regresses it. The bounded declaration, initialization, case-local lifetime, loop-rotation, and case-layout experiments recorded above found no ordinary-C route to the reference's fp result carrier.","Registered as Menu_ResolveSelectedAction: this name states the directly observed shared Inventory/Psynergy menu behavior without guessing an in-world name or claiming that either menu owns the polymorphic routine exclusively."]},"main:080a60d4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a60d4","status":"measured-draft","owner_bytes":688,"score":{"measured":"2026-08-27","candidate_bytes":460,"reference_bytes":688,"differing_halfwords":334,"wrong_instructions":311,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering. Sits directly after PsynergyMenu_ClassifySelectedPsynergy (080a5fe0) and its own reference size (688 = 0x2b0 bytes) lands exactly on the start of PsynergyMenu_RefreshOwnerPsynergy (080a6384), and it genuinely calls that neighbor (Func_080a6384) plus PsynergyMenu_CollectActions (Func_080a68ec), so unlike 080a38d0/080a63e4 this owner is credibly real psynergy_menu code -- most likely the owner-selection loop that lets the player pick which party member's Psynergy list to browse, opening two UiWindow_UpdateOrCreate windows (a name window and a Psynergy-list window) and refreshing them each time the selection changes. The candidate reproduces the overall for(;;)/redraw/Modulo-free (this owner increments/decrements the index directly, no wraparound call was found in the traced region) shape and the two-window setup, but two things are explicitly unresolved placeholders rather than reconstructed: (1) the branch that runs when the second window is freshly created (the reference does real work there -- almost certainly a call that allocates/attaches a per-owner action-state record -- and the candidate just stores a hardcoded 0) and (2) the exact struct field roles at offsets 36/40/44, which were assumed by analogy with 080a38d0/080a63e4's struct rather than independently confirmed for PsynergyMenuState. Given the 228-byte shortfall (460 vs 688), the redraw body is missing real work beyond what was reconstructed."},"rejected_experiments":[],"notes":["Recovered from games/gs1/asm/080a60d4.s. games/gs1/include/psynergy_menu.h confirmed Func_080a6384 (PsynergyMenu_RefreshOwnerPsynergy) and Func_080a68ec (PsynergyMenu_CollectActions, `u8 Func_080a68ec(struct OwnerActionState *, u16 *, s32)`) as real callees of this owner, which is the main evidence this is genuine psynergy_menu code rather than a spurious family match.","The first argument was read as a `u16 *` (an actions/psynergy-id array) because the very first indexing operation treats it as a base pointer added directly to a doubled index register, not as a scalar combined arithmetically -- this reading was not independently cross-checked against a caller.","This candidate claims zero DONE bytes; it is a rough structural skeleton with at least one explicit unmodeled branch (the fresh-window setup path), not a close attempt. Given six owners in this batch, effort here was intentionally bounded to a single pass.","No sibling draft existed for this owner before this session."]},"main:080a63e4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a63e4","status":"measured-draft","owner_bytes":512,"score":{"measured":"2026-08-27","candidate_bytes":404,"reference_bytes":512,"differing_halfwords":243,"wrong_instructions":207,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering; sits immediately after the tiny stub PsynergyMenu_ReturnTrue (080a63dc) and before PsynergyMenu_RefreshOwnerPsynergy (080a6384) in address order, and reads/writes the same small byte offsets (28, 29, 0x219/0x208-region indices) as sibling 080a38d0, strongly suggesting an inventory/equip-menu owner-selection loop of the same family as 080a38d0 rather than genuine psynergy_menu code (the neighboring named psynergy_menu owners are a coincidence of address proximity, not evidence of module). The candidate reproduces the outer for(;;) shape, the Modulo-driven wraparound selection, the A/B/L/R button polling against ADDR_03001C94/ADDR_03001B04, and the closing struct writes (byte 29, word at +8, byte at +0x21b), but the redraw body's window-bounds/OAM-attribute-packing block (the ~20-instruction shared fragment that also appears verbatim in sibling 080a38d0, manipulating a cursor object's halfword fields at +6 and +22 with a mask/or sequence) is explicitly stubbed out as an unmodeled placeholder rather than reconstructed, which accounts for most of the 108-byte shortfall (404 vs 512) and essentially all of the 207 wrong_instructions. This is a source-shape gap: the missing block's purpose (packing a selection index into an OAM-style attribute halfword) was identified but not translated to C in the time available."},"rejected_experiments":[],"notes":["Recovered from games/gs1/asm/080a63e4.s. The K constant chain (0x219 loaded once, then mutated in-register to 0x219-17=0x208 for array indexing) was read directly off the literal pool and matches the same offsets seen in sibling 080a38d0, which is the basis for treating both as owners of the same (still only partially identified) menu-state struct rather than PsynergyMenuState.","The skipped ~20-instruction cursor/OAM-packing fragment is near byte-identical between this owner and 080a38d0 in the retained assembly (same register shuffle, same &-mask/or-mask/store-halfword sequence at struct offsets +6/+22 off a pointer loaded from offset +24) -- worth extracting as a single shared static-inline helper and modeling properly in a follow-up pass rather than guessing its C shape blind.","This candidate claims zero DONE bytes; it is a rough structural skeleton, not a close attempt -- given six owners in this batch, effort here was intentionally bounded to a single pass so every assigned address got at least one honestly-scored draft.","No sibling draft existed for this owner before this session."]},"main:080a6614":{"schema_version":1,"namespace":"main","address":"0x080a6614","status":"measured-draft","owner_bytes":384,"score":{"measured":"2026-08-31","candidate_bytes":380,"reference_bytes":384,"differing_halfwords":120,"wrong_instructions":116,"class":"missing-extra-code","command":"compiler candidate-show games/gs1/recon/en/main/080a6614.c --owner 0x080a6614 --size 384","note":"Replacing the drafting wave's independent absolute fields with the established PsynergyMenuGlobalState base-and-offset view reproduces the reference's 0x02000240 + 0x220/0x222 addressing and improves the residual from 178 to 120 differing halfwords and from 140 to 116 wrong instructions. The branch topology is equal."},"remaining":[{"op":"reconstruct missing or extra code","count":116,"where":"The candidate reserves 24 stack bytes while the reference reserves 20 and assigns the four UiText_GetResourceDimensionsFar outputs at sp+8/+12/+16/+20 rather than sp+4/+8/+12/+16. This shifts high-register allocation and literal pools through both shortcut blocks."}],"rejected_experiments":[{"experiment":"Model the four output values as a contiguous struct or s32[4] bounds record.","result":"Both forms retained the 24-byte frame and regressed to 141 differing halfwords / 118 wrong instructions."},{"experiment":"Use linker-resolved Value_00000ae0..Value_00000ae8 and Value_00000333 symbols for every message literal.","result":"Made the early literal loads locally more faithful but globally regressed to 151 differing halfwords / 124 wrong instructions."},{"experiment":"Compile through the gcc296, old-agbcc, no-interwork, APCS-32, and APCS stack-check flag routes.","result":"Canonical routed/gcc296 remained best at 120 differing halfwords; no alternate route produced the reference frame or a closer multi-block result."}],"notes":["Recovered from games/gs1/asm/080a6614.s, the approved local ROM, the drafting-wave m2c result, the exact PsynergyMenuGlobalState layout, and the already-exact UiTimedNotice_Create call pattern for UiText_GetResourceDimensions.","The function draws both configured Psynergy shortcuts, their owners when the rendered label width permits, and selects palette color 15 after the second populated shortcut. The role-based name is evidence-backed; the original public spelling remains unknown.","This candidate claims zero DONE bytes."]},"main:080a6a98":{"family":"template-main-08026fa8","template_owner":"main:08026fa8","template_source":"games/gs1/src/ui/text/show_localized_message_and_wait.c","candidate_path":"games/gs1/recon/en/main/080a6a98.c","reference_bytes":204,"best_candidate_bytes":204,"best_differing_halfwords":10,"best_wrong_instructions":18,"status":"proven-retained","classification":"regional_compiler_allocation","notes":["Template (UiText_ShowLocalizedMessageAndWait) is thematically related (UI + wait) but the actual behavior at 080a6a98 is completely different work read straight from games/gs1/asm/080a6a98.s: a menu-row refresh function taking effectively one live struct-pointer param (r0/r1 are unused), storing computed length (ctx->field8*5 + ctx->field16) into ctx->field24, conditionally playing a sound-effect/message via a table lookup at Data_03001f2c-relative state, then drawing 5 rows via 6-arg calls to Func_080a2268 with a highlighted-row special case (arg 14 vs 15) based on ctx->field16.","Iterated 5 respellings. Landed on: masking the sound-table lookup as one combined pointer-arithmetic expression `*(u16*)((u8*)state + ctx->field24*2 + 456)` (not split into a separate `offset` local, which measurably hurt the match in combination with either if/else ordering tried); the outer `if (Func_080770c0(0x151) != 0) { short-branch } else { long-branch }` ordering (matching which physical block the compiler places as the branch target vs the fallthrough); and introducing a separately-named `selected = 1;` local (distinct from the loop's `spacing = 1` counter) so the compiler materializes two independent `movs #1` instead of coalescing them into one shared register, matching the reference's two distinct movs into r2/r5.","This combination got wrong_instructions down from an initial 24 to 18 (candidate/reference both 204 bytes). Tried the mirror-image if/else order (`if (call()==0) {long} else {short}`) combined with a separate `offset` local -- that combination scored worse (34), and each single change in isolation also scored worse than the final combination, so the two are apparently coupled through the compiler's whole-function register allocation, not independently tunable.","Two residual clusters remain, both looking like compiler-internal instruction-placement/addressing-mode choices rather than logic gaps: (1) the outstanding branch content is IDENTICAL between candidate and reference (same call, same literal, same later block) but the alignment tool still can't line up the physical ordering of the short-vs-long block placement for a handful of rows; (2) the sound-table load compiles to a precompute-full-address-then-immediate-offset ldrh in the candidate versus the reference's fold-only-the-scaled-index-then-register-offset ldrh (`ldrh r2,[r7,r3]`) -- both are valid Thumb encodings for the same address, and neither of two different C phrasings tried (combined expression vs separate offset local) reproduced the register-offset form together with the correct branch order.","Field names (field8/field16/field24/field32/field44) are inferred purely from the struct-offset accesses in the assembly, not confirmed against any header; M2C_FIELD casts were used throughout rather than guessing a named struct layout, consistent with this codebase's convention for not-yet-typed structs.","Not adopted; kept as the closest measured draft (91% instruction match).","measured=2026-08-29: ran 30 further informed variants against the same baseline (differing_halfwords=36, baseline=36 throughout unless noted), none improved on it. Refuted -- reusing the field24 length computation as a single local for both the ctx store and the table-index multiply (offset local shared across both uses): dh=80. Splitting the ctx->field24 store into two separate assignments, one per if/else arm, ahead of its first use (statement-position-across-call variant): dh=91. Reordering the top-level sum to field16 + field8*5 (operand order swap on the initial length computation): dh=44. Hoisting ctx->field16 into a `highlighted` local read once before the loop instead of re-reading M2C_FIELD each iteration: dh=89.","measured=2026-08-29: also refuted (neutral, dh=36, no change either way) -- array-index rewrite of the table lookup `((u16*)((u8*)state+456))[...]`; hoisting `tableVal` declaration to function top; widening `tableVal` to s32 (both as the else-block local and function-top declaration); `if (tableVal)` vs `if (tableVal != 0)` vs `if (0 != tableVal)`; hoisting the `(tableVal & 0x1ff) + 0x53a` expression into a `msg`/`msgId` local (before or inside the inner if); swapping the mask+add operand order; decimal vs hex mask literal (511 vs 0x1ff) and hex case (0x1FF/0x53A); swapping call order of Func_08015270/Func_080030f8(1) inside the else block; reordering the table-lookup pointer arithmetic (`456 + offset*2` vs `offset*2 + 456`); introducing an explicit `u16 *tablePtr` local before dereferencing; explicit `(s32)` cast on the mask result; pre- vs post-increment and `row<5` vs `row<=4` loop-condition phrasing; `spacing = spacing + 2` vs `spacing += 2`; decimal vs hex outer-branch literal (337 vs 0x151); reordering local declarations (state/row/spacing in various orders, selected hoisted to function top with the block scope removed); swapping the multiply operand order in field8*5 vs 5*field8; adding a blank line before the trailing Func_080030f8(1)/return. All of these leave the same two residual clusters described above (branch-block physical placement and the ldrh addressing-mode form) untouched, reinforcing that the remaining 36 differing_halfwords / 18 wrong_instructions are compiler-internal register-allocation and instruction-selection choices for this exact source shape, not reachable through further local C rephrasing.","Final state after this pass: baseline of dh=36 restored and left in place (no variant beat it); status remains measured_draft, not verified/adopted.","measured=2026-08-31: corrected the top-level branch to its natural reference order (`Func_080770c0(...) == 0` owns the long block; the sound call is the else), reducing differing halfwords 36->12 while making branch topology exactly equal. Then split the table byte offset from its base and marked the live engine-state halfword read volatile. This reproduces the reference register-offset ldrh plus explicit comparison-carrier shape and reduces the floor again to 10 differing halfwords / 18 wrong instructions at the exact 204-byte extent. The residual is now one reciprocal r0/r2/r3 allocation cycle plus the coupled r2/r3 materialization of the later constant 1; all branches, calls, literals, memory addresses, and loop code otherwise align. Function-head declaration scope was neutral. -fno-regmove, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-schedule-insns, -fno-gcse, and -fno-thread-jumps were neutral; -fno-schedule-insns2 regressed to 35 differing halfwords. The prior claim that the inverted branch was the better final shape is superseded by this normalized measurement.","classification=2026-08-31: promoted to Proven ASM as regional_compiler_allocation. Relocation-aware comparison shows the English, German, Spanish, French, and Italian builds share the same localized source-variant relationship while Japanese differs in 29 normalized core bytes. The complete 204-byte English ordinary-C reconstruction, equal topology, bounded source-shape search, allocator-decoder verdict, and shipped-flag sweep reduce the retained difference to the compiler's localized reciprocal materialization choice; no forced allocation or scheduling is used."]},"main:080a6b64":{"schema_version":1,"namespace":"main","address":"0x080a6b64","status":"measured-draft","owner_bytes":360,"score":{"measured":"2026-08-27","candidate_bytes":368,"reference_bytes":360,"differing_halfwords":160,"wrong_instructions":74,"class":"wrong","note":"First structural draft, not a permutation search. The family matcher's top pick (main:080a4800, games/gs1/src/menu/select_quantity.c, score 7526/10000) is a poor semantic match for this owner -- reading the retained assembly directly shows a per-page entry-drawing loop, not a quantity-adjustment loop. The real structural template, found by reading callee addresses and the adjacent psynergy_menu module, is games/gs1/src/inventory_menu/draw_item_name_page.c (InventoryMenu_DrawItemNamePage, main:080a2xxx region): identical (window, unused, const struct MenuResult *state) signature, identical UiWindow_Commit(window)+Func_08015070(window,0,11,16,11) opening, identical first_entry=page*5 / visible_count=(u8)(entry_count-first_entry) clamp-to-5 computation, and identical Func_080a2324(5,first_entry,window,x,y)+Menu_DrawPageIndicator(window,entry_count,5,page,15) paging calls (only the x coordinate differs, 0x70 here vs PAGE_X there). This owner adds: (1) a two-way header-caption branch selecting one of two literal message ids (0xae1/0xb89) based on bit 2 of a u16 field at Data_03001f2c+0x220 (inside struct PsynergyMenuState's owner_ids[8] array, LAYOUT_OFFSET_GUARD-pinned at 0x21a, so +0x220 = owner_ids[6..7] read as one halfword -- an evidenced but previously-unread field, left un-named pending independent confirmation), (2) a static column-header UiText_DrawAt(0xaed,window,0x60,0) drawn once above the list, and (3) a per-row body far richer than item_name_page's single UiText_DrawAt: for each of up to 5 psynergies on the page it masks the 14-bit action id (0x3fff, the same mask used by the already-adopted classify_selected_psynergy.c/is_action_restricted.c), fetches the owner's battle record via Runtime_GetObject(owner_ids[0]) and the ability's static definition via Ability_GetData(action), compares struct BattleAction.pp_cost (0x09, battle_types.h) against struct BattleUnit.pp (0x3a, battle_types.h) to pick an affordability color (2), falls back to PsynergyMenu_IsActionRestricted (Func_080a735c, already declared in psynergy_menu.h) for a restricted color (4), else color 15, then draws the name (action + &Value_00000333, the established Value_ absolute-symbol idiom for a message-table base) and the PP cost number via Func_080150a8. matched_prefix=7 (the whole prologue through both literal-pool loads matches byte-for-byte); every remaining difference traces to one root cause described below, not to any algorithm/type/control-flow disagreement.","register_pressure_finding":"The retained assembly needs exactly the 7 non-r4 callee-usable registers this compiler's -fcall-used-r4 route allows (r5,r6,r7,r8,r9,sl,fp) for window, menu, visible_count, row, the psynergies cursor, owner, and ability, and it fits them all -- no spill. Every C shape tried for this owner instead has the allocator spill `menu` (struct PsynergyMenuState *, holding Data_03001f2c) to a real stack slot (`sub sp,#8` / `str r3,[sp,#4]` instead of reference's `sub sp,#4` / `mov sl,r3`), which then cascades: with `menu` off the register file, the allocator reassigns the fp/r9/sl roles that reference uses for visible_count/row/menu differently (mine: menu spilled, the 0x3fff mask constant cached in fp instead, row ends up in sl), and that reassignment is visible in every downstream instruction that touches those three roles even though the underlying algorithm is identical. Confirmed directly by compiling the candidate through xgcc -da (GCC 2.96's own RTL dumps, in an ignored out/ directory, per CONTRIBUTING's 'treat the compiler as evidence' guidance): the .18.greg dump lists exactly 10 pseudos needing global allocation, of which pseudo 42 (menu, defined at the *(void**)Data_03001f2c dereference) and pseudo 80 (a cached copy of the 0x3fff mask constant, HImode) are the two that fail to get a hard register ('Spilling for insn 18' is menu's own definition instruction); pseudo 82 (a second, SImode cached copy of the same 0x3fff constant, used by the other two AND sites) does get fp. Reference's own assembly reloads 0x3fff from the literal pool independently at each of its three uses (three different pc-relative offsets reaching the same single pool word) rather than caching it in a register at all, so reference's allocator never has this extra competing pseudo in the first place.","bounded_checks":["Baseline draft (typed struct BattleUnit*/BattleAction* pointers, const u16 *psynergy cursor incremented with psynergy++, y=row*16+8 not cached): candidate=368, differing_halfwords=159, wrong_instructions=102 -- the Menu_DrawPageIndicator call passed the already-cached `page`/`first_entry` locals instead of re-reading state->page/state->entry_count the way item_name_page.c's own source does for that specific call (a genuine, evidence-backed redundant-reload idiom, not noise); fixing that alone dropped wrong_instructions to 78 with zero other changes.","From the 78-instruction baseline: hoisting owner/ability declarations to function scope, reordering local declarations (menu first vs last), switching the header-flag read between &menu->owner_ids[6] and a raw (u8*)menu+0x220 cast, switching owner/ability between typed struct pointers and raw u8* with index/offset field access, caching row*16+8 into a named `y` local vs inlining it twice, and marking the psynergy cursor `volatile` (which did change the RTL -- it gave each of the three *psynergy reads its own short-lived pseudo instead of one GCSE'd value, confirmed in the -da dump -- but left wrong_instructions at exactly 78, because the still-cached 0x3fff mask constant was never the volatile-affected value) all measured byte-identical output: exactly 78 wrong_instructions, sub sp,#8, every time. None of these are the lever.","Recomputing the loop body's array access as menu->psynergies[first_entry+row] (indexed by the loop counter, no separate cursor variable) regressed sharply: candidate grew to 380 bytes, differing_halfwords=152 but wrong_instructions=118 -- worse on the metric that matters, because the compiler recomputes the full address (multiply + two adds) every one of three reads per iteration instead of the reference's single +2 increment.","Replacing the pointer-walk cursor with an explicit s32 byte-offset variable (`cursor`, incremented by 2 each iteration) dereferenced through `*(const u16*)((u8*)menu->psynergies + cursor)` at all three read sites -- intended to force the compiler to route each read through 2-register (menu, cursor) addressing the way reference's `ldrh r3,[r6,r2]` does, keeping `menu` 'busy' and therefore high-priority -- gave the best result found: candidate=368, differing_halfwords=160, wrong_instructions=74 (kept; this is the current draft). Inspecting the -da dump afterward showed the hypothesis behind this change was itself wrong (the compiler still pre-combines menu+offset+cursor into one materialized pointer, `[r6,#0]` addressing, same as the plain pointer-walk version) -- the 4-instruction improvement over the 78-instruction baseline is real but not for the reason attempted.","An explicit (s32) cast around each masked read, attempting to force the AND to compute in a single consistent mode (rather than the HImode/SimODE split the -da dump shows for the cached mask constant) and thereby collapse the two competing mask-constant pseudos into one: zero measured effect (still 74/368/160)."]},"family":{"assigned_template_owner":"main:080a4800","assigned_template_source":"games/gs1/src/menu/select_quantity.c","template_note":"The family matcher's assigned template (score 7526/10000, an n-gram/call-count/branch-shape score, not a semantic one) is Func_080a4800 (menu/select_quantity.c), a simple quantity +/- adjustment callback. Reading games/gs1/asm/080a6b64.s directly shows this owner is NOT a quantity-adjustment loop at all -- it has no polled-key adjust/check_exit state machine and no Data_03001b04/Data_03001c94 reads. The real structural sibling, discovered from this owner's own callees (Func_080a735c, Func_080a2324, Func_080a21b0) and its address's position inside the already-adopted psynergy_menu/ module (main:080a6a00..main:080a735c), is games/gs1/src/inventory_menu/draw_item_name_page.c (InventoryMenu_DrawItemNamePage) -- see score.note for the exact correspondence. select_quantity.c contributed nothing directly usable beyond confirming the shared UiWindow_Commit/Func_08015270 low-level menu-primitive vocabulary."},"rejected_experiments":["Following the assigned template (select_quantity.c) literally: rejected outright after reading the retained assembly -- no quantity +/- state machine, polled-key reads, or matching call targets exist in this owner. draw_item_name_page.c (see family.template_note) is the real template.","See score.bounded_checks for the full list of loop-body/declaration-order/type reshapes tried on the register-spill residual (menu vs 0x3fff-mask-constant register pressure); none reached exact and the two that mattered (state->page reload idiom, cursor-through-menu addressing) are already incorporated into this draft."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080a6b64.s), the approved local EN ROM (via the compiler tool's --align scoring), the family-transplant workspace's m2c-assisted context (out/family-transplants/main-080a6b64/m2c/080a6b64.c, m2c/target.canonical.s), the already-adopted games/gs1/src/inventory_menu/draw_item_name_page.c, menu/draw_page_indicator.c, psynergy_menu/*.c siblings and games/gs1/include/psynergy_menu.h, owner_state.h, battle_types.h, types.h, and the approved compiler (inspected directly via xgcc -S -da RTL/register-allocation dumps in an ignored out/ scratch directory). No GS2 source, no other Golden Sun decompilation project, and no leaked/proprietary material was inspected.","This candidate claims zero DONE bytes; games/gs1/asm/080a6b64.s remains the authoritative retained assembly.","Semantic summary: draws one page (up to 5 rows) of the Psynergy-menu entry list into `window`. Commits the window, opens its 11x16 frame, then draws one of two header captions (message 0xae1 or 0xb89) chosen by a bit in a not-yet-named field at Data_03001f2c+0x220. Computes first_entry=state->page*5 and the page's visible row count (state->entry_count-first_entry, clamped to 5), draws the paging strip (Func_080a2324) and page indicator (Menu_DrawPageIndicator), and a static column header (message 0xaed). For each visible row: looks up the current owner's battle record and the row's ability definition, colors the row by PP-affordability then by PsynergyMenu_IsActionRestricted, draws the ability name (message base Value_00000333 + the 14-bit action id) and its PP cost, then resets the palette color before the next row. Always returns 1.","The residual is entirely a register-allocation-level mismatch (menu spilled to the stack vs reference keeping it in sl the whole function, with a cached 0x3fff AND-mask constant occupying the register menu would otherwise use), confirmed against the compiler's own -da RTL dumps rather than guessed at; no further permutation search is justified without a genuinely new lever, per Cleanroom's 'do not spend an open-ended search on a tiny residual' guidance -- though at 74/~150 instructions this is a substantial, not tiny, residual, so a future pass with a different register-pressure lever (not yet tried: shrinking the ability/owner pointer lifetimes, or restructuring the header-caption branch) may still close it."]},"main:080a7440":{"schema_version":1,"namespace":"main","address":"0x080a7440","status":"measured-draft","owner_bytes":56,"executable_owner_bytes":54,"alignment_bytes":2,"candidate":{"routed":{"candidate_bytes":52,"reference_bytes":56,"differing_halfwords":23,"wrong_instructions":28},"best_bounded_axis":{"family":"old-agbcc","flags":["-fcall-used-r4"],"candidate_bytes":56,"reference_bytes":56,"differing_halfwords":14,"wrong_instructions":28}},"cross_edition":{"code_and_pool_bytes":54,"relocation_bytes":4,"literal_bytes":6,"core_bytes":44,"core_identical":true,"editions":{"ja":"0x0809e384","en":"0x080a7440","de":"0x080aa2bc","es":"0x080abcb0","fr":"0x080abccc","it":"0x080a74bc"}},"behavior":["clears the shared menu selected-slot field","runs the first character-selector interaction step","returns cancellation unchanged or the selected owner index"],"remaining":"The old-agbcc family restores the full owner extent, but its best bounded route still has a broad 14-halfword register-allocation residual. The owner is neither exact nor eligible for narrow permanent classification.","notes":["2026-08-31 exact-closure rerun: the apparent four missing candidate bytes are not missing behavior or a bad owner boundary. The 54 executable reference bytes plus two alignment bytes are independently accounted for, branch topology is equal, and both sides clear selected_slot, call Func_080a77a4(0), preserve -1, and otherwise return item_owner. The reference uniquely retains zero/result in r2 and emits an explicit post-call r0-to-r2 copy plus final r2-to-r0 copy; canonical GCC optimizes that carrier away and returns item_owner directly in r0.","2026-08-31 finite raw-field probe: replacing the established InventoryMenuState fields with explicit u8-base accesses at +0x174/+0x21a grows the candidate to 58 bytes and regresses to 25 differing halfwords/32 wrong instructions, so the exact typed UI sibling context is already the best canonical source shape; reverted. Combined with the previously recorded shared-result and explicit-early-return probes and the complete shipped flag sweep, the bounded verdict remains canonical-GCC allocation/pool placement with no missing statement. The old-agbcc/-fcall-used-r4 56-byte route is not adoptable: it forces ABI allocation, still differs by 14 halfwords, and is not the canonical compiler route. Zero DONE bytes.","2026-08-31: repaired a real control-flow bug in the draft: the selected-owner mapping guard had been placed after an unconditional return and was therefore unreachable. Moving the return after the guard and promoting the call result from s16 to its evidenced s32 lifetime restores the complete behavior and makes branch topology equal. The corrected canonical candidate is 52/56 bytes with 23 differing halfwords and 28 wrong instructions. A fresh sweep of the shipped allocation, scheduling, CSE, regmove, thread-jump, strength-reduction, rerun-CSE, and expensive-optimization axes found no improved route; the remaining residual is allocation and pool placement, not missing behavior.","2026-08-31 bounded UI-family pass: tested two source structures named directly by the four missing instructions. First, sharing an initialized result carrier with the selected-slot clear (`result = 0; selected_slot = result`) does not recover the reference's long-lived r2 carrier: GCC hoists the 0x174 offset before the shared-state load, keeps zero in r0, removes the post-call result copy, and shrinks the candidate further to 48 bytes / 26 differing halfwords. Second, spelling cancellation as an explicit early return (`if (result == -1) return result; return item_owner`) normalizes to the existing 52-byte / 23-halfword candidate byte-for-byte. Transferable fact: GCC 2.96's optimizer erases both C-level return shapes here; the reference's r2 result carrier and r0-to-r2 copy cannot be inferred merely from an early-return spelling, while sharing the earlier zero lifetime actively regresses code placement. Both probes were removed.","The name is bounded by the sole local caller OpenCharacterSelector and the selected-slot and item-owner fields in InventoryMenuState.","All six editions have the same relocation-normalized instruction core; the trailing two bytes are owner alignment rather than executable instructions or pool data.","Recovered only from retained assembly, approved local GS1 ROMs, local types and callers, and the approved compiler. This candidate claims zero DONE bytes."]},"main:080a77a4":{"schema_version":1,"namespace":"main","address":"0x080a77a4","status":"measured-draft","owner_bytes":170,"candidate_bytes":166,"differing_halfwords":73,"wrong_instructions":46,"classification":"inventory-owner-slot-refresh-variant","family":{"id":"template-main-080a355c","template_owner":"main:080a355c","template_source":"games/gs1/src/inventory_menu/prepare_owner_items.c","note":"Sibling of main:080a602c in the same family; genuinely different body from both the template and 080a602c -- reads *(menu+16) and calls Func_08015270 on it, conditionally calls Func_08015070 with 5 args when Func_080770c0(370)!=0, then picks between Func_080a7d68()/Func_080a7a34() based on *(u16*)(menu+544)==3, none of which appear in the template or in 080a602c."},"notes":["Read the raw assembly directly: offset=party_slot+28, cursor_offset=party_slot*4+20, menu=Data_03001f2c, icon=*(menu+cursor_offset); icon[5]=1, icon[12](u16)=0; owner_index=*(s8*)(menu+offset); Func_08015270(*(s32*)(menu+16)); if (Func_080770c0(370)!=0) Func_08015070(*(s32*)(menu+16),9,1,9,3); if (owner_index==-1) *(menu+offset)=0; else Func_080a1ac0(owner_index*24-10,16); result = (*(u16*)(menu+544)==3) ? Func_080a7d68() : Func_080a7a34(); re-read icon, Func_080a17c4(icon); WaitFrames(1); return result.","Candidate reproduces the full control flow, all field offsets, all call arguments, and the owner_index*24-10 arithmetic; remaining differences are register-allocation/scheduling only (candidate keeps 'offset' live in r7 across the owner_index test and the final store, the reference keeps it in r8 and instead keeps the post-load owner_index value in r7) plus a 4-byte length gap I have not isolated the source of.","Tried reading the owner_index==-1 store as `(u8)(s32)&Value_00000000` (matching the pool-loaded-zero idiom the sibling owner 080a602c and this owner's own literal pool both carry at the same relative position -- both .s files embed the identical `.4byte 0x00000000 / .4byte 0x03001f2c` pair right after that branch) instead of a plain `= 0`. This is very likely the semantically correct spelling (it explains why the reference loads that particular zero from the pool while other zero stores in the same function use a plain `movs r?,#0` immediate), but adding it shifted the whole function's register allocation (dropped from push{r5,r6,r7}+r8 to push{r7} only, sl unused) and made the measured gap worse (differing_halfwords 73->84, wrong_instructions 46->58), so it was reverted; the plain-literal version is kept as the better-scoring draft even though the Value_00000000 spelling is the more defensible one long-term.","This reads as a register-pressure/scheduling gap on an otherwise-correct control-flow reconstruction, not a missing behavior -- a future pass should try re-deriving which local variable the compiler prioritizes into which callee-saved register (e.g. dropping the separate 'offset' local and inlining `party_slot+28` at both use sites, mirroring how the reference recomputes r2 fresh rather than keeping a single named local alive) together with the Value_00000000 spelling.","Adoption requires 0 differing_halfwords."]},"main:080a7850":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a7850","status":"measured-draft","owner_bytes":482,"score":{"measured":"2026-08-27","candidate_bytes":200,"reference_bytes":482,"differing_halfwords":239,"wrong_instructions":228,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering, but this owner does not share the template's selection-loop shape at all: it opens by calling InventoryMenu_ResetCategoryItemPositions (Func_080a9d84, a real, already-named inventory_menu sibling) and Audio_PlayCue(112), then draws two fixed nested grids (a 4x7 outer grid of small icon writes and a further 4-row scanning-highlight loop with 32-step x-increments) before a single Func_080770c0(0x150)-gated wait-for-any-input loop and a close/Audio_PlayCue(113) teardown -- this reads as an equip/browse results screen (a static icon-grid display with a 'press anything to continue' wait), not an interactive up/down/L/R picker. The family match here looks like a weaker/more coincidental n-gram similarity (shared calls to Func_080770c0, Func_08015080, Func_080f9010, and a similar prologue/epilogue register-save shape) rather than genuine structural kinship with Shop_SelectPartyMember. The candidate only captures the entry/exit calls and a rough sketch of the two nested drawing loops; the exact per-cell layout math (row/column pixel offsets, the two 4-halfword-stride write loops before the grids that this draft does not model at all) was not reconstructed, accounting for most of the 282-byte shortfall (200 vs 482)."},"rejected_experiments":[],"notes":["Recovered from games/gs1/asm/080a7850.s. Confirmed Func_080a9d84 = InventoryMenu_ResetCategoryItemPositions via games/gs1/include/types.h's name registry, which is the basis for placing this owner in the inventory_menu module.","Two literal-pool-driven halfword-pair write loops near the top of the function (writing to two parallel arrays with a fixed stride, using constants read from offsets +36/+40*4 off the menu pointer) were not modeled in the candidate; they were skipped because the surrounding pixel/stride arithmetic (word 0x46, 0x1e, 0xb17, 0x80, 0xb18, 0x1001, 0x45f, 0xea3, all read off the literal pool but not individually attributed) was not fully traced to concrete field meanings in the time available.","This candidate claims zero DONE bytes; it is a rough structural skeleton (200 of 482 bytes), not a close attempt. Given this owner's shape diverges most from the template of all six in this batch, it is also the weakest candidate for the family match itself -- worth re-checking during a future clustering pass whether 080a7850 belongs in this family at all, versus a static-display-screen family.","No sibling draft existed for this owner before this session."]},"main:080a7d68":{"schema_version":1,"namespace":"main","address":"0x080a7d68","status":"measured-draft","owner_bytes":476,"candidate_bytes":464,"differing_halfwords":223,"wrong_instructions":200,"classification":"shop-icon-page-select-loop","domain":"A paged icon-selection loop that persists its selection index and page count directly in undocumented shop-struct bytes (0x1c/0x1e) rather than in locals, redraws a small icon/window display and an 8-entry cleared array each time the selection changes, and writes the final selection and its looked-up field back into the shop struct on exit.","notes":["Clustered against the byte-exact Shop_SelectPartyMember template by the family scan on structural similarity (an input-poll loop with the same INPUT_NEW_KEYS/INPUT_REPEAT_KEYS shape and a redraw-flag-gated update block), but the concrete behaviour is a different, shop-struct-persisted paging screen with no counterpart in the template beyond the loop skeleton itself.","Recovered from the retained assembly's control flow and literal pool: confirmed offsets are shop+0x1c (persisted selection, s8), shop+0x1e (persisted count, s8), an array of u16 fields at shop+0x208+selection*2 (read repeatedly through the redraw block and again at exit), a single non-indexed field at shop+0x220 (an animation/frame counter cycled with Modulo(saved+3,3) each redraw), an 8-entry u16 clear at shop+0x152 counting down by 2, a selection-indexed halfword store at shop+0x144+selection*2, a window handle read from shop+0x10c, and a fixed pointer shop+0x1c8 passed to several undocumented helper calls (Func_080a68ec/Func_080a68a8/Func_080a3d24). The exact final-store offset at exit (used here as a placeholder 0x21a) and one icon-id constant pair passed to Func_08015080 (placeholders 0x1e/0x1f) were not resolved against the reference's literal pool this session and are recorded as open, not verified.","The same register-bank drift already documented on 080b29a8, 080b24e4, and 080b3444 reappears here in a new pairing: the reference keeps the shop pointer in r7 (loaded directly, 'ldr r7,[r3,#0]') while this candidate's compile puts it in sl instead, with knock-on reordering of the selection/count byte reads (the candidate loads count before selection despite the source declaring selection first, matching the earlier finding that GCC's pseudo-register/read ordering for these small independent byte loads is not controlled by source declaration order in this codebase). This is the dominant source of the 200 wrong_instructions figure; the underlying algorithm recovered here (persisted paging state, redraw-gated icon/list refresh, the two-array clear-and-stamp pattern, the animation counter) matches the reference's call sequence and argument shapes closely once the register-bank offset is looked past.","Given this is the third owner in the family showing the same register-allocation-drift shape rather than a control-flow or algorithm disagreement, further manual respelling on this specific residual is not a good use of bounded effort; it is recorded here as compiler-internals-shaped evidence supporting a permuter-style search across the family rather than a source-shape gap.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080a7f44":{"schema_version":1,"namespace":"main","address":"0x080a7f44","status":"exact","owner_bytes":240,"executable_owner_bytes":238,"candidate_bytes":240,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":222,"core_diff_bytes":0,"core_identical":true},"notes":["Moves a character one position in the selector order, rebuilds the runtime order through the remove/add callbacks, and refreshes the stored character count.","2026-08-27: bounded search dropped differing_halfwords from 114 to 28 (candidate_bytes now matches owner_bytes exactly, 236->240). Two structural fixes drove the gain: (1) the early direction check was over-eager -- reference recomputes 'adjacent_index' a second time, right at the swap, by re-testing 'direction == 1' rather than carrying one value computed at the top; rewriting the swap as two fully duplicated branches (no shared adjacent_index variable) made the swap, both loops calling Func_08077168/Func_08077150, and the final Func_08077158 call plus epilogue match the reference byte-for-byte (state pointer now lands in r8 exactly as in the reference, matching the caching idiom described for other owners in this corpus). (2) Tried caching &state->character_count and hoisting the clear-loop into a pointer form (u32 *p = &reordered[13]; p >= reordered; p--) -- both looked locally better but cost more overall: the pointer clear-loop makes gcc emit an extra pre-loop guard test (for-loop rotation duplicates the comparison when the compiler can't prove the pointer range non-empty) that a plain 'for (index = 13; index >= 0; index--)' avoids outright, so the plain index form scores better in aggregate despite keeping a redundant r6 counter alongside the address-decrementing store pointer that the reference elides via a cached 'ip' bound.","2026-08-27: remaining 28-halfword residual is concentrated in two spots verified by an extensive bounded search (~20 independent source rewrites, all re-scored): (a) the array-clear loop keeps a redundant down-counter (r6) instead of reference's single pointer-vs-cached-ip test; every pointer-only rewrite tried (for, do-while, hybrid index+pointer, signed casts) either reproduced this same counter or introduced a worse pre-loop guard elsewhere. (b) the character_ids-copy loop (reordered[index] = state->character_ids[index]) compiles to a value-cached descending loop (character_count loaded once, counted down) instead of the reference's address-cached ascending loop (character_count re-read through a hoisted pointer each iteration) -- the exact ascending/address-cached shape *does* appear for the two structurally identical count-up loops that call Func_08077168/Func_08077150, so the difference is not the loop-control idiom itself; it reproduced identically across for/while/do-while, index-only/pointer-only/dual-pointer, shared/private loop variables, count>0-guard-then-loop, and explicit u32 casts, suggesting it tracks something about the callee-free store-only loop body rather than any tried source phrasing. Did not meet the permanent-residual gate (no compiler-pass evidence collected, only repeated candidate-show outcomes), so this stays a c_candidate pending either a source insight not yet tried or a recorded compiler-evidence classification.","2026-08-29: repair pass targeting the same 28-halfword residual, focused on the two mechanisms that helped elsewhere in this corpus (constant-hoist placement, statement-position-across-calls) plus the swap-branch register mismatch (else-branch temporary loads via r0 in the candidate vs r6 in the reference). None improved on baseline dh=28; all rejected: (1) else-branch swap using a separate 'previous_temporary' local instead of reusing 'temporary' -- no change (dh=28). (2) else-branch swap reordered to write reordered[selected_index-1] first then reordered[selected_index] -- much worse (candidate grew to 248 bytes, dh=100). (3) clear-loop rewritten as 'u32 *clear_ptr = reordered+13; do {*clear_ptr=0;} while(--clear_ptr>=reordered);' (do-while pointer form, no separate counter) -- worse (dh=82); reconfirms prior pointer-loop rejections under a new do-while phrasing. (4) hoisting 's32 character_count = state->character_count;' at the top of the shared block wrapping both the clear loop and the copy loop -- worse (candidate shrank to 236 bytes but dh=100; loop shapes elsewhere destabilized). (5) same character_count hoist but scoped only to the copy loop's bound via a '(s32)state->character_count' cast in place -- no change (dh=28). (6) copy-loop condition rewritten as 'state->character_count > index' (operands swapped) -- no change (dh=28). (7) copy-loop body routed through an explicit 'u16 character_id' temporary before the u32 store -- worse (dh=29, wrong_instructions jumped to 40). (8) local variable declaration order swapped ('temporary' declared before 'index') -- no change (dh=28). (9) copy-loop RHS wrapped in an explicit '(u32)' cast -- no change (dh=28). Confirms the residual is a stable local optimum for source-level rephrasing; leaving baseline in place unchanged. 8 additional source variants tried this pass (bringing the corpus total to ~28), none surfaced a new lead.","2026-08-29 (follow-up, coordinator-directed up-counting/address-cached retry): tried the specific up-counting pointer-vs-cached-end idiom for the clear loop and an address-cached-base idiom for the copy loop, individually and jointly, since allocation is whole-function. Clear loop, up-counting forms (all standalone, baseline copy loop kept): 'u32 *p=reordered,*end=reordered+14; do{*p++=0;}while(p worse (dh=86); same with 'end' declared before 'p' -> no change from the p no change (dh=86). All three up-counting forms reproduce the same shape and are firmly worse than the down-counting baseline (dh=28) -- rejected as a family, superseding note (25)'s untested up-counting gap. Copy loop, address-cached-base idiom: 'const u8 *count_ptr=&state->character_count; for(index=0;index<*count_ptr;index++) reordered[index]=state->character_ids[index];' (baseline clear loop kept) is the standout finding of this pass -- it flips the diff classification from structural-topology to topology=equal/missing-extra-code and reproduces the reference's address-cached reload of character_count inside the loop body (ldrb through a pointer register each iteration) almost exactly, but the overall score still regresses (dh=92, wrong_instructions=32) because the fix leaves one instruction-count difference versus the reference (the reference reloads the count_ptr address a SECOND time, via a fresh 'ldr'/'add' pair, right after the loop's zero-trip guard, instead of reusing the single register the candidate computes before the guard -- i.e. the reference does NOT common-subexpression-eliminate the address across the guard test and the loop preheader, but our shared 'count_ptr' variable does get CSE'd by the compiler into one load). Tried to break that CSE without giving up the address-cached shape: plain 'state->character_count' in the condition (no named pointer at all, otherwise identical block wrapping) -- collapses straight back to the original structural-topology/dh=28 shape, confirming the *address-cached* topology match is caused specifically by taking an explicit '&state->character_count' into a pointer local, not by the surrounding block. No source phrasing found that keeps the address-cached shape while forcing gcc to re-materialize the address a second time (tried: end-pointer form 'const u16 *s=ids,*e=s+count; for(;s dh=95; with the classic 'for(p=reordered+13;p>=reordered;p--)' clear loop -> dh=91 (this form reintroduces the previously-documented extra pre-loop guard, now visible as a bcc/bcs pair bracketing the loop, on top of the copy-loop's residual double-load gap) -- both worse than baseline, confirming the two residuals do not cancel out when combined; the whole-function allocation shifts penalize the combination more than either fix helps. Verdict: baseline (dh=28, structural-topology on both loops) remains the best known state; the address-cached copy-loop idiom is the closest partial match found to date (topology=equal) but is a strict regression on the whole-function score and was not adopted. Recorded for any future attempt: the missing piece is reproducing the reference's *duplicate* address load after the guard rather than CSE'ing it, which no tried variable/scope/cast combination achieved.","2026-08-30: closed byte-exact at 240/240 bytes. Marking character_count volatile reproduces the reference's repeated count loads; storing the final refreshed count through a plain u8 lvalue avoids a redundant volatile read. A non-empty descending do-while clear expressed as pointer versus stack-base reproduces the reference loop without the old counter. The final two-halfword allocation floor closed by reusing the finished loop index as the swap carrier, matching GCC 2.96's r6 lifetime. No register variable, compiler override, barrier, inline assembly, or scheduling control was used."]},"main:080a8114":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a8114","status":"measured-draft","owner_bytes":870,"score":{"measured":"2026-08-27","candidate_bytes":870,"reference_bytes":870,"differing_halfwords":327,"wrong_instructions":216,"class":"wrong","command":"tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/080a8114.c --align --size 870","note":"Candidate size matches the owner boundary exactly (870/870 bytes), but the body is not byte-exact. The dominant residual is a single register/stack-allocation split: the reference keeps the 8-byte on-stack scratch buffer's address live in fp (r11) for the whole function (visible as 'mov r0,fp' / 'mov r2,fp' at every one of its ~5 call sites), while every candidate variant produced here instead spills that address to a numbered stack slot and reloads it at each use. This single difference cascades: it consumes one of the six small (sp+8..sp+28) scalar slots the reference keeps free for ownerIdPtr/roundMode/done/hasAlt/step/result, so every one of those slots lands 4 bytes higher than the reference's layout, and every load/store touching them mismatches even though the values themselves are correct. A second, independent, smaller residual is pure register-letter noise (r1 vs r2 vs r3 for the same value) scattered through the bitflag-testing chain (~lines corresponding to the L/R/U/D and shoulder-button checks) that does not look source-fixable without hand register assignment (prohibited by CONTRIBUTING.md). Two real bugs were found and fixed during this session versus the naive transplant: (1) the (sl+2)%2 toggle and the (Func_08077290(-1)!=0) boolean must be written as the literal C idiom that lets the compiler pick its own branchless neg/orr/lsr>>31 codegen, not as a plain `!= 0` comparison (which compiles to a branch on this compiler and desyncs everything downstream); (2) the L/R-shoulder page index (`*(s8*)(menu+28)`) must be read into a plain `s32` local BEFORE the +1/-1 branch, not kept as an `s8` and promoted separately in each branch -- the latter produces two redundant lsls/asrs sign-extend pairs (one per branch) where the reference does the sign-extending load once. That second fix alone took differing_halfwords from 390 to 327 and closed an 8-byte size gap (878->870)."},"family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"The family-matcher's top hit (score 8487/10000) is a false positive for this owner, confirming the pattern already documented on other owners in this session (e.g. main:080b2b10): the match is on the generic register-shuffle prologue shape shared by many large stateful UI loops, not real kinship. select_use_item.c's actual shop-menu shape (single 'redraw' block, actor/selection signature, Modulo(selection+count,count) directional wrap) does not match this owner at all -- this owner takes no arguments, has no 'redraw' flag with that name, and its core loop is a two-level nested nature (an outer per-page setup wrapping an inner per-frame loop) closer to games/gs1/src/shop/select_repair_item.c's shape than to select_use_item.c's flat single loop. Independent verification from this owner's own retained assembly and already-adopted siblings placed it in a completely different, non-shop family instead: it dereferences the SAME global (Data_03001f2c) as games/gs1/src/menu/select_quantity.c (Func_080a4800) and games/gs1/recon/en/main/080a8578.c (StatusMenu_ShowOwnerProgressMessage, confirmed by name and struct layout: unknown_000[0x21a]; u8 owner_id;), registers the identical callback address (Func_080a19a0, i.e. literal 0x080a19a1) via Func_08004278 and re-arms it via Func_080041d8(Func_080a19a0, 0xc80) at cleanup -- an EXACT constant match with select_quantity.c's own cleanup call -- and calls games/gs1/src/character_menu/draw_selection_cursor.c's Func_080a847c(mode, selected, entries, invert) with the exact same 4-argument shape that file declares, where 'entries' is that file's own struct State_080a847c's 'object' field at offset 0x24 (36) inside the Data_03001f2c-rooted state. This owner is a character/status-menu selector cycling a party-member/page index (menu+0x1c, wrapped by Modulo against a count at menu+0x219 via the L/R shoulder buttons) and a secondary per-page value (r8, 'quantity' in the draft) adjusted by Up/Down/Left/Right, drawn through Func_080a847c and either Func_080a8508 or Func_080a8578 (StatusMenu_ShowOwnerProgressMessage) depending on a mode toggle (sl, wrapped 0/1 via (sl+2)%2). No single already-adopted sibling matches closely enough to serve as a literal structural template; the draft was built directly from this owner's own retained assembly (games/gs1/asm/080a8114.s) and out/family-transplants/main-080a8114/m2c/080a8114.c (m2c's control-flow reconstruction from the target's own bytes, which was accurate and used as the basis for the loop/branch structure), cross-checked field-by-field against the four adopted siblings named above."},"rejected_experiments":[{"experiment":"Func_080a8b10 return type u8 (zero-extend at call boundary) instead of s8 (sign-extend)","result":"differing_halfwords 390 -> 412 (worse); the reference's early lsls/lsrs zero-extend-into-a-different-register idiom at the call site was not reproduced by declaring the callee's return type u8, and it desynced the following fp/fp-substitute section further"},{"experiment":"explicit (s8) cast on the 'step' local at its Modulo(quantity+step, step) use site (matching m2c's own rendering), combined with either s8 or u8 return type for Func_080a8b10","result":"with u8 return: 412 differing halfwords, 866/870 bytes (undersized). With s8 return: 404 differing halfwords. Both worse than leaving 'step' as a plain s32 used directly with no cast (327, the accepted state) -- the reference does sign-extend 'step' at its use site via a hoisted-early load+lsls+asrs, but reproducing that in source without hand-scheduling the load did not survive the round trip"},{"experiment":"wrap entriesBuf/step/hasAlt/flagByte in a nested block scope confined to the outer-loop body (hypothesis: tighter C89 block lifetime would reduce apparent register pressure and let the compiler promote the buffer's address into fp like the reference does)","result":"no improvement (327 differing halfwords, wrong_instructions rose slightly 216->218); reverted"},{"experiment":"entriesBuf declared as u8[8] and referenced directly (array decay) at each call site vs. an explicit intermediate u8* variable reassigned each outer-loop iteration vs. an s32[2] buffer cast to u8* at call sites","result":"byte-for-byte identical candidate output across all three variants (390, later 327, differing_halfwords unchanged); the compiler treats these as equivalent, ruling out the buffer's declared type/indirection style as the cause of the fp-vs-stack-slot allocation difference"},{"experiment":"declaration-order permutations of the six small scalars (ownerIdPtr/roundMode/done/hasAlt/step/result) at the top of the function, following the ascending-offset heuristic documented in select_use_item.c's own header comment","result":"one specific ordering (result,step,hasAlt,done,roundMode,ownerIdPtr, i.e. declared in the SAME order as their ascending real stack offsets 28>24>20>16>12>8, last-declared getting the lowest offset) did land 'result' at its correct sp+28 slot and is kept in the current draft, but it did not resolve the fp-substitute slot competing for sp+8, so ownerIdPtr/roundMode/done still sit 4 bytes above the reference"}],"notes":["Recovered only from this owner's own retained assembly (games/gs1/asm/080a8114.s), the m2c control-flow reconstruction generated from that same assembly (out/family-transplants/main-080a8114/m2c/080a8114.c), the approved ROM, and already-adopted/already-drafted sibling sources in this repo (games/gs1/src/shop/select_use_item.c, select_repair_item.c, select_party_member.c, select_purchase_quantity.c, select_sale_quantity.c; games/gs1/src/menu/select_quantity.c; games/gs1/src/character_menu/draw_selection_cursor.c; games/gs1/recon/en/main/080a8578.c, 080a5614.c, 080a1a40.c, 080a90bc.c). No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","This candidate claims zero DONE bytes, so it does not require a progress-report refresh.","Next steps for a future pass: the fp-vs-stack-slot allocation gap looks like it needs either a different overall statement/expression shape for the six small scalars (not just declaration-order or block-scope changes, both tried and ruled out above) or acceptance that this owner's particular register-pressure profile is not reachable from a natural top-down C rewrite under this compiler without forbidden register hints."]},"main:080a8578":{"schema_version":1,"namespace":"main","address":"0x080a8578","status":"proven-retained","owner_bytes":140,"executable_owner_bytes":140,"candidate_bytes":140,"differing_halfwords":3,"wrong_instructions":4,"classification":"regional_compiler_scheduling","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":100,"core_identical":false,"core_diff_bytes":{"ja":40,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"0x0809f490","en":"0x080a8578","de":"0x080ab3f4","es":"0x080acde8","fr":"0x080ace04","it":"0x080a85f4"}},"bounded_search":{"mode":"classic-walk","candidates":50000,"compile_failures":827,"exact":false,"baseline_differing_halfwords":11,"best_differing_halfwords":3,"best_structural_rows":2},"notes":["Selects a status message variant, renders remaining experience for a non-max-level owner, and copies the temporary message buffer to its destination.","A semantics-preserving wide temporary collapses the EN residual to two structural rows, but the bounded search found no exact candidate.","The DE, ES, FR, and IT normalized cores match EN exactly. The uniquely located JA source variant uses a 0x80-byte allocation and 0x40-byte render limit instead of EN's 0x100 and 0x80, independently proving that it is not another compiler rendering of the same source constants.","The EN residual is limited to exchanging the independent allocator-result save and message-literal load at offsets 0x54 and 0x56, plus the consequent literal register at 0x5a; both streams resynchronize immediately afterward. Fifty thousand bounded candidates found no exact approved-C rendering."]},"main:080a8604":{"schema_version":1,"namespace":"main","address":"0x080a8604","status":"measured-draft","owner_bytes":768,"candidate_bytes":760,"differing_halfwords":340,"wrong_instructions":270,"classification":"character-menu-item-use-preview-panel","family":{"id":"template-main-080b362c","template_owner":"main:080b362c","template_source":"games/gs1/src/shop/select_use_item.c","note":"Below the 7500/10000 family-transplant threshold (best guess 7338, LOW confidence) and confirmed a false positive: Shop_UseSelectedItem is an unrelated interactive selection loop (WaitFrames/input-poll/Ability_GetAvailability), sharing only the generic register-shuffle prologue shape with this owner. The real kinship is with games/gs1/src/character_menu/*.c: the very first literal pool word this owner loads is 0x03001f2c (Data_03001f2c), the same InventoryMenuState global build_availability.c/draw_selection_cursor.c/update_selection_icons.c already key off, and this owner directly calls CharacterMenu_BuildAvailability (Func_080a8b10), CharacterMenu_UpdateSelectionIcons (Func_080a9dc4, called twice), and InventoryMenu_ApplyCategoryItemFlags (Func_080a9d3c) -- all three already-named siblings in that same subsystem, immediately below CharacterMenu_DrawSelectionLabels (main:080a8508) in address order."},"notes":["Reads as the screen-setup routine that runs once a usable item and target category are chosen: sets menu->cursor->state=1 (InventoryMenuIcon.state, offset 5, via the already-typed InventoryMenuState.cursor field), calls Func_080a8914(window,owner,mode), builds the 5-slot usability array via CharacterMenu_BuildAvailability(entries,1,owner), pushes it to the icon row via CharacterMenu_UpdateSelectionIcons(entries), optionally draws an outer window border (Func_08015068) unless mode&0x100 is set, then lists up to 5 available-action text lines (message ids 0xbd5..0xbd9, one per entries[i], stacked at y=40+16*count, falling back to message 0xbd4 'none available' when the array is all zero) -- these five ids sit directly adjacent to draw_selection_labels.c's own Data_00000bdc/Data_00000bda message table, reinforcing the sibling relationship. Refreshes the icons a second time, applies InventoryMenu_ApplyCategoryItemFlags(entries), then reads a still-unnamed u16 at menu+0x220 (immediately before InventoryMenuState.completion_flag at 0x222, not yet a named field) and returns early when it equals 3 (a category that skips the whole stat-preview block below).","The remaining body (reached when the mode&0xff==1 'use' path is taken) draws four page/type tiles via Func_08015280(window,1..4,x=15/19/23/27,row_y,4) where row_y defaults to 7 for mode==1 and 10 otherwise, then a party-comparison flag (compare_mode, computed via the explicit (u32)(-t|t)>>31 zero/nonzero idiom rather than a bare '!=0' -- matching this compiler's idiom for booleans stored to memory rather than branched on immediately) gates a quantity-remaining message (0xafd) and, when mode==1, an icon (Data_080af22c) plus a two-part label (Value_00000afe, Value_00000afe+1) whose glyph addresses sit directly after draw_stat_delta.c's InventoryMenu_IncreaseGlyph/DecreaseGlyph pair (0x080af224/0x080af228), then a 4-iteration loop over party slots reading Runtime_GetObject(owner)+280/+284 (per-slot u8 flags), +72..+86 (four s16 pairs) via Func_080150b0/Func_08015098 at per-slot x=104/112/120+32*i.","Cross-checked the object+72 and object+280 offsets against an independent m2c decompilation of the real reference assembly run through this project's own workbench (tools/compiler -- workbench): m2c's own trace (var_r8_260=sp14+0x48, var_r5_266=sp14+0x118) confirmed +72 and caught a hand-tracing slip in an early pass of this session that had the second base at +160 instead of the correct +280 (0x118); the draft was corrected to +280. m2c's own compiled candidate scored worse on this project's objdiff similarity (71.29%) than the hand-written draft here (76.68%), so the m2c output was used only to verify offsets/algorithm, not adopted as source shape.","This is a class=wrong, non-adopted draft: the algorithm, every call target and its argument order, and every literal constant (message ids, glyph addresses, tile indices, offsets) are reproduced and were independently cross-checked, but candidate_bytes (760) undershoots owner_bytes (768) by one stack slot -- the compiler keeps row_y permanently spilled to its stack home (reloaded at every use) in the reference, while this draft's variable count lets the allocator promote it to a callee-saved register instead, which cascades into different hard-register choices for window/menu/entries-pointer throughout the rest of the function. This is register-allocation noise, not a semantic gap (matched_prefix=7, then continuous small register-role substitutions rather than any missing or extra call/branch). No PERM_GENERAL or hand register-forcing was used, per project constraints; closing this residual would need a further pass isolating exactly which additional local the true source keeps live to force that spill, or a permuter run once that is identified.","Adoption requires 0 differing_halfwords."]},"main:080a8c2c":{"schema_version":1,"namespace":"main","address":"0x080a8c2c","status":"exact","owner_bytes":148,"executable_owner_bytes":148,"candidate_bytes":148,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":128,"core_diff_bytes":0,"core_identical":true},"register_gate_step1":{"date":"2026-08-28","verdict":"miss","hypothesis":"One shipped GCC 2.96 per-translation-unit flag state explains the repeated local-alloc register-coloring floor across several independent owners.","cluster_basis":"080ae99c and 080ae9f0 are the adjacent same-algorithm nucleus; 080a8c2c and 080b60a0 are independent controls with the same documented qty_compare/RTL-discovery-order residual. These four sources are separate probes, not a claimed historical translation unit.","owners":[{"address":"0x080a8c2c","candidate_bytes":148,"reference_bytes":148,"baseline_differing_halfwords":4},{"address":"0x080ae99c","candidate_bytes":84,"reference_bytes":84,"baseline_differing_halfwords":10},{"address":"0x080ae9f0","candidate_bytes":92,"reference_bytes":92,"baseline_differing_halfwords":13},{"address":"0x080b60a0","candidate_bytes":166,"reference_bytes":166,"baseline_differing_halfwords":6}],"reproduction":{"git_head":"e77862791d35548bec4705d7b23aaaa5bc4fe9ac","tracked_state_before_probe":"clean","compiler_family":"gcc296","compiler_version":"2.96","xgcc_sha256":"bf6161b89ca5832dff2784d92d2a39c857123e26fa4654ecc8ee46d3937b0b3a","cc1_sha256":"4525e2477f4d903580155e8d79cbb965b5af89e0d9ac903287713736238d37eb","gs1_en_rom_sha256":"c14f1151897e8d73f25ffdd67e21eebb6dc57973ff2458872ee89fa9060aaca1","canonical_flags":"-O2 -mthumb -mthumb-interwork -mcpu=arm7tdmi -fno-builtin -nostdinc -ffreestanding -fcall-used-r4 -Igames/gs1/include","command":"tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/.c --owner --family gcc296 --first --work [--remove-flags ] [--flags ]"},"matrix":{"states_including_baseline":64,"mutations":63,"register_and_abi_28":["baseline","remove -fcall-used-r4","add one of -fcall-used-r5,-fcall-used-r6,-fcall-used-r8,-fcall-used-r9,-fcall-used-r10,-fcall-used-r11","remove -fcall-used-r4 and add one of -fcall-used-r5,-fcall-used-r6,-fcall-used-r8,-fcall-used-r9,-fcall-used-r10,-fcall-used-r11","add exactly one of -ffixed-r0 through -ffixed-r12, or -ffixed-r14"],"allocation_pass_6":["-fno-caller-saves","-fno-omit-frame-pointer","-frename-registers","-fno-regmove","-fno-expensive-optimizations","-fno-regmove,-fno-expensive-optimizations"],"post_allocation_4":["-fno-schedule-insns2","-mno-sched-prolog","-fno-peephole2","-fno-peephole"],"cse_and_lifetime_18":["-fno-gcse","-fno-cse-follow-jumps","-fno-cse-skip-blocks","-fno-rerun-cse-after-loop","-fno-rerun-loop-opt","-fno-function-cse","-fno-force-mem","-fforce-addr","-fno-strength-reduce","-fno-thread-jumps","-fno-delete-null-pointer-checks","-fno-optimize-sibling-calls","-fno-strict-aliasing","-fargument-noalias","-fargument-noalias-global","-fno-defer-pop","-fmove-all-movables","-freduce-all-givs"],"broad_shipped_controls_8":["-O1","-O3","-Os","-O0","-mno-thumb-interwork","-freorder-blocks","-funroll-loops","-funroll-all-loops"],"excluded_dead_or_invalid_axes":"Thumb forcibly disables sched1, so -fschedule-insns, -fno-schedule-insns and its sub-options are dead. r0-r3/r12/r14 are already call-used; r7 is Thumb's hard-frame register and rejects call-used; r13/sp and r15/pc are not allocator candidates. No generic -fno-cse exists. Arbitrary flag powersets were not searched; the only paired state was the compiler-proven full regmove disable above."},"result":{"compile_failures":0,"owners_made_exact":0,"owner_rows_strictly_closer":0,"owner_rows_score_neutral":128,"owner_rows_regressive":124,"fully_score_neutral_mutations":20,"mutations_regressing_at_least_one_owner":43,"mutations_with_any_extent_mismatch":32,"score_neutral_mutations":["-fargument-noalias","-fargument-noalias-global","-fcall-used-r9","-fcall-used-r11","-ffixed-r9","-ffixed-r11","-ffixed-r12","-ffixed-r14","-fno-cse-follow-jumps","-fno-cse-skip-blocks","-fno-defer-pop","-fno-delete-null-pointer-checks","-fno-function-cse","-fno-optimize-sibling-calls","-fno-peephole","-fno-peephole2","-fno-rerun-cse-after-loop","-fno-strict-aliasing","-fno-thread-jumps","-O3"]},"decision":"Hypothesis dead for this cluster: no shipped one-axis flag state moved even one owner strictly closer, so no compiler route is registered and the gate proceeds to the allocator-order decoder."},"register_gate_step2":{"date":"2026-08-28","verdict":"decoder-validated-real-floor-not-closed","diagnostic_route":{"compiler":"canonical gcc296 route plus -g -dp -dr -dl -dg","safety":"The diagnostic and ordinary object .text sections must be byte-identical. Evidence is scoped to the selected owner: assembly instruction UID to .17.lreg pseudo, .00.rtl first-set creation rank, and .18.greg hard-register disposition. Literal-pool disassembly is excluded using the selected owner's emitted instruction count.","normal_text_equals_diagnostic_text":true},"controlled_acceptance":[{"owner":"0x080b362c","exact_source_bytes":576,"perturbation":"Move object ahead of win2 in the local declaration order.","perturbed_differing_halfwords":5,"expected_edit":"swap declarations of win2 and object","decoder_edit":"swap_declarations(win2,object)","result":"pass"},{"owner":"0x0807a550","exact_source_bytes":94,"perturbation":"Cache limit across the do/while loop rather than recreate it at the guard and backedge.","perturbed_differing_halfwords":7,"expected_edit":"split limit's loop-spanning lifetime","decoder_edit":"split_lifetime(limit) detail=recreate-at-guard-and-backedge","result":"pass"},{"owner":"0x0808f1c0","exact_source_bytes":204,"perturbation":"Remove the shared zero carrier used by the clears and mask operation.","perturbed_differing_halfwords":1,"expected_edit":"merge the clear values into one live zero carrier","decoder_edit":"merge_lifetime(zero_carrier) detail=keep-zero-live-through-clears-and-mask","result":"pass"}],"real_floor":{"owner":"0x080a8c2c","candidate_bytes":148,"reference_bytes":148,"baseline_differing_halfwords":4,"decoder_evidence":["left: pseudo 48, creation rank 19, allocated r2, reference role r3; used 8 times across 6 instructions in block 9 and set once","expression: pseudo 58, creation rank 26, allocated r3, reference role r2; used 16 times across 4 instructions in block 9 and set twice","constraint=reciprocal-register-role-swap","edit=undecoded reason=no-unique-source-shape"],"bounded_hand_repairs":[{"shape":"value-temp","differing_halfwords":6,"effect":"correct register roles, wrong scheduler-2 load order"},{"shape":"two-values","differing_halfwords":6,"effect":"correct register roles, wrong scheduler-2 load order"},{"shape":"cell-pointer","differing_halfwords":6,"effect":"correct register roles, wrong scheduler-2 load order"},{"shape":"right-index","differing_halfwords":6,"effect":"correct register roles, wrong scheduler-2 load order"},{"shape":"left-first-xor","differing_halfwords":8,"effect":"regression"},{"shape":"anonymous-left-first","differing_halfwords":8,"effect":"regression"},{"shape":"right-temp","differing_halfwords":8,"effect":"regression"},{"shape":"const-left","differing_halfwords":4,"effect":"baseline-equivalent"},{"shape":"volatile-access","candidate_bytes":168,"differing_halfwords":82,"effect":"invalid direction and major regression"},{"shape":"volatile-tiles","candidate_bytes":168,"differing_halfwords":82,"effect":"invalid direction and major regression"}],"failure_reason":"Every ordinary-C shape tested either preserved the four-halfword allocation floor, obtained the desired r3/r2 roles while moving the loads into a six-halfword scheduler floor, or regressed. Volatile forms were both semantically inappropriate and much worse. There is no unique decoder-supported source edit that satisfies allocation and scheduling simultaneously, and forced register assignment or compiler scheduling is forbidden by the gate.","adopted":false},"secondary_confirmation":{"owner":"0x080b9dc4","baseline_differing_halfwords":1,"attempts":["defer completed initialization","introduce completed pointer alias"],"result":"Both remained at one differing halfword: the candidate rematerializes zero while the reference copies the already-live zero carrier. No source was adopted and no further owner was selected."},"decision":"The decoder passed all three controlled perturbation tests but did not meet the real-floor hand-closure acceptance. The bounded failure is recorded as required; step 2 ends without an adoption and the gate proceeds to the annotation-free bounded permuter."},"register_gate_step3":{"date":"2026-08-28","verdict":"accepted-annotation-free-finite-search","catalog":{"version":"register-wall-v1","path":"games/gs1/recon/compiler-repair-patterns.json","enumeration":"baseline plus the finite alternatives for one structured decoder-named repair","maximum_raw_choices":16,"maximum_edits_per_candidate":1},"entry":{"owner":"0x080a8c2c","source_annotations":0,"decoder_dimensions":["temporary","evaluation_order","commutative_order"],"decoder_constraint":"reciprocal-register-role-swap"},"run":{"seed":1,"raw_choices":5,"unique_choices":5,"attempted":5,"compile_failures":0,"baseline_differing_halfwords":4,"best_differing_halfwords":4,"exact":false,"decoder_repair":"reciprocal_register_role_swap(left)","decoder_evidence_sha256":"861af3c34fa5f87b1680b04dc9313b564b0827e12a6d85e5ee9d4c2472814266","result_path":"out/register-wall/step3/080a8c2c-structured-seed-1/report.json"},"bounded_results":[{"mutation":"baseline","differing_halfwords":4},{"mutation":"temporary:introduce","differing_halfwords":4},{"mutation":"evaluation_order:left_before_right","differing_halfwords":6},{"mutation":"temporary:merge","differing_halfwords":6},{"mutation":"commutative_order:swap_operands","differing_halfwords":8}],"catalog_fixture_acceptance":[{"owner":"0x080b362c","repair":"swap_declarations(win2,object)","raw_choices":2,"best_differing_halfwords":0,"exact":true},{"owner":"0x0807a550","repair":"split_lifetime(limit)","raw_choices":2,"best_differing_halfwords":0,"exact":true},{"owner":"0x0808f1c0","repair":"merge_lifetime(zero_carrier)","raw_choices":2,"best_differing_halfwords":0,"exact":true}],"safety":"The permuter rejects retired PERM_GENERAL/PERM_INT annotations, requires a structured decoder repair with its named payload, masks comments and literals during site matching, refuses conditional/macro source, rejects direct main-image r0-r13 call-via models, deduplicates before deterministic seed rotation, and records decoder evidence plus the complete raw and unique finite spaces and mutation IDs.","adopted":false,"decision":"Step 3 acceptance is met: an existing floored owner entered the bounded search as ordinary C with zero hand annotations, every decoder-selected safe catalog choice was compiled, and the complete finite space was reported. The unchanged four-halfword best score is evidence, not an adoption; step 4 may now begin."},"register_gate_step4":{"date":"2026-08-28","closure_ordinal":1,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":4,"final_differing_halfwords":0,"repair_pattern":"inline-two-operand-xor-boundary","source_edit":"Replace the named first XOR temporary and the following compound XOR with two calls to one ordinary static inline binary-XOR helper.","allocator_effect":"Inlining preserves the anonymous mask=r3 and tile=r2 allocation while the helper parameter boundaries remove MEM_UNCHANGING from the two mask loads. The first store then feeds both later loads, raising its sched2 critical path above the independent right-side address setup.","bounded_confirmation":{"both_helper_calls_required":true,"canonical_no_dump_equals_diagnostic_dump":true,"candidate_bytes":148,"reference_bytes":148,"linked_byte_differences":0},"annotation_free_search":{"catalog_version":"register-wall-v2","source_annotations":0,"raw_choices":6,"unique_choices":6,"attempted":6,"winning_mutation":"temporary+evaluation_order:inline_xor_helper","exact":true,"result_path":"out/register-wall/step4/080a8c2c-catalog-v2/report.json"},"production":{"source":"games/gs1/src/menu/build_pattern_tiles.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 148/148 linked bytes"}},"notes":["Builds two groups of six menu pattern tiles by filling each 64-byte tile and applying paired XOR masks across seven columns.","2026-08-27: Root cause of the prior draft's 73-differing-halfword score was a mismodeled call. `Func_0800730c` is not a real function: 0x0800730c is the sl (r10) slot of the fourteen-entry `_call_via_rN` trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8`, 4 bytes/slot, r0..sp). Unlike the r0-r3 slots (where a fictional trailing argument lands in the right register purely because it's within the 4-register AAPCS/APCS argument window -- see games/gs1/src/ui/runtime/draw_work_by_attributes.c's byte-exact `Func_080072f0(dest,size,value,0x03000168)` precedent for the r3 slot), r10/sl is never an argument-passing register, so no N-argument direct call can ever place a value there; arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c confirms arguments stop at r3. Rewrote the call as a genuine indirect call through a function-pointer local, `((FillWordsFn)0x03000168)(tile, 64, 0x44444444)` (FillWordsFn = void(*)(void*,s32,u32)), matching the already-adopted indirect-call idiom in games/gs1/src/battle/effects/member_orbit/run.c. This alone let the compiler naturally allocate both sl (the fill-routine pointer, loop-invariant) and r8 (the Data_080af23c base, loop-invariant) exactly as the reference does, dropping differing_halfwords from 73 to 6 (wrong_instructions 22->0) with zero remaining structural/semantic mismatches -- the rest of the function's control flow, mask-index clamp, and loop nesting were already correct in the prior draft.","2026-08-27 (same pass): the residual 6 differing halfwords were pure instruction-scheduling reordering (class=ordering, wrong_instructions=0): the reference finishes `tile[column] ^= Data_080af23c[mask_index].left;` completely (load, xor, store) before starting any part of the second statement's address advance, while the naive two-statement candidate let the compiler hoist the independent `adds r1,#4`/`mov r3,r8` (address setup for `.right`) forward into the middle of the first statement's dependency chain. Tried and rejected (each scored worse or unchanged, all still available in this dossier via the permuter's report.json runs during this session): swapping statement order; explicit non-compound `a = a ^ b` forms; wrapping just one statement in an empty block (no effect -- proves the fix isn't about lexical block boundaries per se); an unused/dead local declared in the block (no effect -- proves it isn't about the block merely containing a declaration); a named local `struct TileMaskPair *mask`/`masks[]` pointer alias for the whole Data_080af23c[mask_index] pair (regressed hard, 39-47 diff, evidently disturbs the loop-invariant hoisting of the array base entirely); flat `(const u8*)Data_080af23c + mask_index*8` byte-offset addressing (regressed to candidate=156, 75 diff). The fix that worked: materializing only the `.left` value into a named local (`u32 left = Data_080af23c[mask_index].left;`) as its own full statement, immediately before `tile[column] ^= left;`, inside a fresh nested block. This is a real, minimal, plausible source shape (a natural place to name the first mask half) and it fixed the scheduling exactly: differing_halfwords 6->4.","2026-08-27 (same pass, residual documented, not fully closed): the remaining 4 differing halfwords (wrong_instructions=8, class=allocation, matched_prefix=37 of 74) are a register-role swap confined to the single `eors`/`str` pair for the `.left` xor: reference computes `mov r3,r8; ldr r3,[r3,r1]` (mask value REUSES r3, the now-dead address-base register) then `ldr r2,[r0,#0]` (tile value gets a fresh r2), `eors r2,r3`, `str r2,[r0,#0]`; the candidate instead gives the mask value a fresh r2 and lets the tile value reuse r3, i.e. `eors r3,r2; str r3,[r0,#0]` -- functionally identical, byte-different. Root cause, confirmed by direct A/B compiles: naming `left` as a real local (required to fix the scheduling above) makes GCC give it its OWN fresh pseudo/register rather than letting it merge into the about-to-be-dead address-base register the way an anonymous temporary can; reversing which value is named first (naming a `tile[column]` temp `t0` ahead of `left`) restores the correct r2/r3 roles for this pair but reintroduces the exact scheduling bug fixed above (verified: byte-identical output to the pre-fix 6-diff candidate). Every combination tried this pass of naming order, naming only one side, pointer-vs-value naming, `s32`-cast naming, comma-expression forced evaluation order, and prefetching `.right` first instead of `.left` either reproduced one of these two mutually exclusive outcomes exactly or regressed further (see the permuter runs from this pass, not retained on disk but reproducible via the PERM_GENERAL alternatives documented here). This looks like a genuine tension in this compiler's local-alloc between named-variable register independence and anonymous-temporary register reuse for this exact code shape, not yet resolved -- kept the scheduling-correct, semantically-clean variant (4 diff) rather than the roles-correct-but-misordered variant (6 diff) since it is closer to exact and the residual is a stable, well-characterized 2-instruction-pair swap, not a semantic error. Did not force register assignment via `register`-qualified locals, named-register variables, or inline asm, per project rules. Worth a future pass with a different local-alloc lever now that the swap is precisely characterized.","Adoption gate not met: differing_halfwords=4, not 0. Candidate is otherwise structurally and semantically complete -- no remaining algorithm, control-flow, or type mismatches, only the documented register-role swap above.","2026-08-27, mechanism-level follow-up: this owner's register-role-swap residual, and the structurally identical residuals independently found and left open this session on 080ae99c, 080ae9f0, and 080b60a0, are almost certainly the same GCC 2.96 local-alloc tie-break, now traced directly in alchemy-gcc/agscc/gcc/local-alloc.c. block_alloc() sorts competing quantities by qty_compare()'s QTY_CMP_PRI macro (floor_log2(n_refs) * n_refs * size / (death - birth)); the quantity that sorts first gets first pick of a hardware register in REG_ALLOC_ORDER order (arm.h: r3,r2,r1,r0,ip,lr,r4,...). When two quantities tie EXACTLY on that formula (identical ref count, size, and life-length -- exactly the case for two same-size values each loaded once and consumed once, as in this owner's left/tile[column] pair), qty_compare() has NO further tie-break for the small (<=3-quantity) case that this function's block uses (the inline EXCHANGE-based switch at local-alloc.c:1312-1336 and :1361-1385 simply leaves qty_order in its default 0..n identity order when qty_compare returns 0); only the qsort path (qty_compare_1, used for >3 quantities) explicitly breaks such ties by raw quantity number. Either way, the deciding factor is each quantity's internal number, which is assigned during block_alloc's single forward scan of the basic block's insns (local-alloc.c around line 1284) -- i.e. by REGISTER-RTL discovery order within that block, not by C source statement order once earlier passes (combine, cse, jump, loop) have already run. This is why every agent's declaration-order and statement-order experiments on this exact residual class, across four independent owners this session, measured zero effect: they were reordering the wrong thing. A real fix would need either (a) a way to change which of the two tied values' RTL is discovered first within the block -- something not controllable by plain reordering once combine/cse have restructured the block, or (b) tracing the actual .rtl dump for one of these tied pairs (GCC 2.96's -da/-dp dump flags) to find what upstream C-level change would shift RTL discovery order, which no agent attempted this session. Recorded here as the clearest write-up of the mechanism for whichever owner a future pass tackles first."]},"main:080a8d34":{"schema_version":1,"namespace":"main","address":"0x080a8d34","status":"measured-draft","owner_bytes":524,"executable_owner_bytes":524,"candidate_bytes":448,"differing_halfwords":223,"wrong_instructions":154,"classification":"draw-selected-inventory-row","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"unresolved"},"family_transplant":{"best_guess":"shop/select_repair_item.c","score":7384,"threshold":7500,"confidence":"low","verdict":"false positive: shares no callee, field offset, or constant with the retained assembly -- only the generic register-shuffle prologue shape matched. Discarded; this draft is built from the retained assembly and its real call targets only."},"notes":["Reads Data_03001f2c (the polymorphic menu-runtime cell) as a view exposing a saved window handle at +44 and a 5-column-per-row u16 item-slot grid at +456, indexed by row = *(sel+8) and column = *(sel+16) from the caller-supplied selection-state pointer (arg2). This same +44/+456 view and row*5+col indexing is corroborated by menu/select_quantity.c (Func_08015270(window), Func_080030f8(1) at the same call sites) and by menu/draw_page_indicator.c's real prototype for Func_08015280(s32 window, s32 tile, s32 x, s32 y, s32 style), which matches this owner's calls exactly.","First block: if the currently selected grid cell holds an item, draws its name-ish message ((rawSlot & 0x3fff) + 0x53a, base unconfirmed -- games/gs1/assets/text/message_archive.json does not resolve id 0x53a to readable text under the simple bank*256+offset scheme), draws an icon-area rect (Func_08015068), then looks the item up via Func_08077080 and inspects byte offsets [1], [2], [12] of the returned pointer. Offsets 2 and 12 line up exactly with item.h's ItemDefinition.type (0x02) and ItemDefinition.use_type (0x0c) LAYOUT_OFFSET_GUARDs, so item.h's struct is reused (via raw u8 casts, since offset 1 -- the high byte of ItemDefinition.price -- is not a guarded field). The three literal message ids loaded at the end of the function (0xb13/0xb14/0xb15) resolve in message_archive.json to 'Can be used in Battle' / 'Can be used in Towns/Dungeons' / 'Can be used in Towns/Dungeons/Battle' -- a strong, confirmed match for the item-usability flag logic decoded from byte offsets 1 and 12 (bits 0x40 and 0x80 of offset 1, overridden to at-least-'dungeon' when offset 12 is nonzero).","Second block: loops the 5 columns of the selected row, looks each slot's item up the same way, and draws either a single 19-wide cursor rect (item type == 4) or a type icon (Func_08015280, tile = type+1) plus two cursor rects (widths 15 and 3), with field 14 on the selected column and 15 elsewhere. This is very likely the highlighted-row redraw for an equip/item selection grid (5 items per party member row), called after the cursor moves.","Every callee's argument count, order, and constant operands (call targets, the 0x3fff mask, the 0x53a add, the three message ids, all x/y/width/style constants) are confirmed instruction-by-instruction against games/gs1/asm/080a8d34.s and match the reference exactly. The residual is register-color and post-call reload-conservatism: this build's register allocator assigns fp/sl and r8/r9 to the same two long-lived values (the selection-state pointer and the dereferenced menu pointer) in the opposite pairing from the reference, and it keeps several memory-derived values (grid[cell], sel->8, sel->16) live across intervening bl calls in registers where the reference reloads them from memory after every call. Several source-level rewrites (readback ordering, mask/base as named locals, an explicit `height` local for the loop's constant arg 5, hoisting vs. duplicating the per-column item lookup across the i==selected branch, inverted-branch polarity for the kind==4 case) were tried against candidate-show --align; each changed the halfword/instruction counts but none closed the gap or found a lever that reliably narrows it further, consistent with this project's documented register-letter-swap residual class.","The family-transplant matcher's best guess (shop/select_repair_item.c, 7384/10000, below the 7500 threshold) was read and shares no callee, field offset, or constant with this owner -- confirmed false positive, discarded per the task brief.","Not adopted: differing_halfwords=223 of 262 reference halfwords, class=wrong. Retained assembly remains authoritative.","Recovered only from retained owner assembly, already-adopted exact GS1 EN sources (item.h, menu/select_quantity.c, menu/draw_page_indicator.c), games/gs1/assets/text/message_archive.json, and the approved compiler. No other decompilation project or symbol map was consulted."]},"main:080a8f40":{"schema_version":1,"namespace":"main","address":"0x080a8f40","status":"exact","owner_bytes":380,"executable_owner_bytes":380,"candidate_bytes":380,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"domain":"Draws one page of the Psynergy list, including PP cost, range, and the selected owner's name, class, and level.","expressed":["dereferences the mode-owned PsynergyMenuState at Data_03001f2c and resolves menu->owner_ids[0] through Runtime_GetObject","commits the window and computes first = result->page*5 and rows = min(result->entry_count-first, 5)","positions the page icons, draws the page indicator, and draws message 0xAED, which the local message archive identifies as 'PP'","loops over up to five entries of menu->psynergies[], masks each action id with 0x3fff, and draws its action-name message and BattleAction.pp_cost","converts BattleAction.range to the three-tile range marker index, preserving the 0xff sentinel-to-11 behavior","draws message 0xAEF, 'You have no Psynergy.', when menu->psynergy_count is zero","draws the owner's name string, class-name message, the ROM string 'Lv', and the owner's level byte","always returns 1, matching the menu page callback convention"],"register_gate_step4":{"date":"2026-08-28","closure_ordinal":3,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":28,"final_differing_halfwords":0,"repair_pattern":"materialize-message-and-merge-count-carrier","decoder_signals":["reciprocal mask/item register roles at the indexed halfword load","conditional value and result occupied different lifetimes","row-coordinate setup outranked the masked-message argument"],"source_edit":"Inline the two indexed halfword loads with the offset-first address spelling, materialize msg before calculating y, and load act->range into range before mutating it in place.","compiler_effect":"The mask remains the r0 result carrier, range remains one r4 carrier through compare and decrement, and msg makes GCC schedule the indexed load/mask before the row-coordinate shift.","bounded_confirmation":{"baseline_differing_halfwords":28,"inline_indexed_loads_differing_halfwords":15,"merged_count_carrier_differing_halfwords":6,"materialized_message_differing_halfwords":0,"candidate_bytes":380,"reference_bytes":380,"linked_byte_differences":0},"production":{"source":"games/gs1/src/psynergy_menu/draw_list_page.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 380/380 linked bytes"}},"notes":["The inventory-menu page family supplied the compiler shape only: page math and the paging helpers are shared. The mode-owned Data_03001f2c view, message text, action fields, and surrounding PsynergyMenu callers establish that this owner belongs to psynergy_menu.","PsynergyMenuState independently fixes psynergies at 0x1c8, psynergy_count at 0x218, and owner_ids[0] at 0x21a. The local message archive identifies 0xAED as 'PP', 0xAEF as 'You have no Psynergy.', 0x333 as the action-name table base, and 0x741 as the class-name table base.","BattleAction establishes range at +8 and pp_cost at +9. The local ROM bytes at 0x080AF22C are the NUL-terminated ASCII string 'Lv'. The three 0x08015xxx veneer targets are the exact adopted string/number drawing owners, not portrait or icon routines.","The byte-exact repair keeps the menu-relative offset loads, materializes msg before y, and mutates one range carrier in place. Those ordinary C choices close the former allocation/scheduling floor without annotations, register hints, or compiler overrides.","Recovered only from the retained owner assembly, approved local ROM and message archive, already-adopted Psynergy/menu/text sources, in-repo headers, and the approved compiler. No external decompilation or symbol map was consulted."]},"main:080a90bc":{"schema_version":1,"namespace":"main","address":"0x080a90bc","status":"measured-draft","owner_bytes":696,"candidate_bytes":548,"differing_halfwords":345,"wrong_instructions":312,"classification":"shop-icon-confirm-loop-large","domain":"The largest of the six assigned owners: initializes a work window and a 32-entry pointer table, clears part of the shop struct, then runs a multi-stage input loop (a confirm sub-flow gated by an Func_080770c0 status check, a paging adjust shared by two repeat-key bits that mirrors 080a7d68's shop+0x1c/0x208 selection-array pattern, and new-key confirm/cancel exits) before a matching linear teardown.","notes":["Clustered against the byte-exact Shop_SelectPartyMember template by the family scan (score 0.95, the highest of the six), largely on the strength of a genuine structural echo: a fp/stack-spilled 'result' variable set to 0/1/-1 exactly like the template's confirm/cancel exits, and the same ADDR_03001C94/ADDR_03001B04 input-poll shape. The rest of the body -- a 32-entry pointer-table sweep, a nested confirm sub-loop (labels .L4/.L16/.L5/.L6/.L7/.L8/.L9 in the retained assembly) driving a three-way classification of an Func_080a1fd4 return value, and the paging-adjust block shared by two repeat-key bits -- has no template counterpart and was recovered from the retained control flow directly.","This is the least-resolved of the six assigned owners and should be read as a genuine structural sketch, not a near-miss: the candidate compiles 148 bytes shorter than the reference (548 vs 696) and differs in over 300 instructions, which is a length gap this large usually meaning whole statements or a sub-block are still missing or shaped wrong, not merely constant or register-bank drift.","What is recovered with reasonable confidence, cross-checked against the identical idiom in 080a7d68/080b24e4: the shop+0x1c/0x1e-style persisted selection field re-used here as shop+28 with the same shop+0x208+selection*2 u16 array, the same 'selection = Modulo(selection+count, count); field = array[selection]; shop+8 = field; *(u8*)anchor_ptr = field; Func_080a1804(shop, field);' tail shape driving the paging-adjust block for the two repeat-key bits (0x100/0x200, sharing one handler in the reference, split into an if/else on which bit fired inside this draft), and the overall three-exit shape (new-key 1 -> result=1, new-key 2 -> result=-1 plus a Func_080041d8 cleanup call, else falls through to the confirm sub-loop).","What is NOT resolved and is the likely source of most of the remaining gap: the exact register role and origin of 'r6' in the reference (used both as a plain value argument to two calls early in the confirm sub-loop and later dereferenced with offsets +16/+20/+24, meaning it is a genuine pointer established somewhere this draft does not yet account for correctly), the precise branching of the .L5/.L7/.L8/.L9 three-way classification of the Func_080a1fd4 result (approximated here with an under-specified 'blocked' variable rather than the reference's exact comparison chain), the literal-pool values for the 32-entry table clear, the Func_08004278 callback-table store (the retained pool includes a code address, 0x080a19a1, that this draft passes straight through as a message id -- almost certainly wrong), and several field offsets guessed by pattern-matching against 080a7d68 rather than confirmed against this owner's own literal pool.","Given the size of the remaining gap and the specific unresolved pointer (r6), the honest next step is a full re-derivation of the confirm sub-loop (.L4 through .L13) from the retained assembly with the reference's literal pool actually resolved (per CONTRIBUTING.md's assemble/disassemble guidance), not further guessing or a permuter search -- the algorithm shape is credible but incomplete, which the reconstruction method treats as a source-shape gap rather than a compiler-internals residual.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080a93a4":{"schema_version":1,"namespace":"main","address":"0x080a93a4","status":"measured-draft","owner_bytes":500,"candidate_bytes":496,"differing_halfwords":224,"wrong_instructions":170,"classification":"equipment-menu-slot-list-and-compatibility-markers","family":{"id":"weak-template-main-select_quantity","template_owner":null,"template_source":"games/gs1/src/menu/select_quantity.c","note":"Below this project's 7500/10000 family-transplant threshold (best guess select_quantity.c scored 7458, LOW confidence). That guess is not kinship in any deep sense -- select_quantity.c is a completely different quantity-stepper UI -- but it does share the same Data_03001f2c global 'menu' pointer and the same UiWindow_Commit(Func_08015270)/WaitFrames(Func_080030f8) idiom, confirming both owners work on the same global menu-context struct. The real, much closer structural kin are two other unregistered, unadopted recon drafts in this same file: games/gs1/recon/en/main/080a5614.c and games/gs1/recon/en/main/080a6a98.c, both 3-arg (arg0, arg1(unused), ctx) 'draw 5 equip-slot row markers' owners reading the identical ctx field triple (ctx+8=page, ctx+16=selected row, ctx+24=page*5+row, written back every call) and the identical Data_03001f2c+456 u16 item-slot table, and even the identical Value_00000075 message-id base as 080a5614.c. Neither sibling reached differing_halfwords==0 despite dedicated iteration (080a5614: 78/50 best; 080a6a98: 36/18 best), which is the main reason this owner -- a materially larger superset of the same shape -- was not pushed further by hand once it reached a comparable residual."},"notes":["2026-09-01: the corpus-derived opposite-condition/same-target triage signal identified the non-selected row's type==4 split. Rewriting only that named block as type!=4 optional text drawing followed by one shared rectangle draw reproduces the reference's branch polarity and merge shape, improving candidate bytes 512->496 against the 500-byte owner, wrong instructions 181->170, and differing halfwords 227->224. Applying the same rewrite speculatively to the selected-row sibling overgeneralized the evidence and regressed to 480 bytes / 183 wrong instructions, so that half was restored. The retained one-block repair is measured improvement, not an exact claim.","Traced instruction-by-instruction from games/gs1/asm/080a93a4.s (500 bytes, no automatic family-transplant workspace since this owner scored below threshold). Signature s32 Func_080a93a4(s32 arg0, s32 arg1, void *ctx): arg1 is dead (overwritten before first read, matching the 080a5614/080a6a98 sibling convention exactly). ctx is a small selection-cursor struct: ctx+8=page (party-member/character index), ctx+16=selected slot (0..4), ctx+24=page*5+slot written back on every call (proved identical in games/gs1/recon/en/main/080a6a98.c and 080a5614.c, and independently reconstructed by m2c from the raw .s with the same field offsets).","menu = Data_03001f2c (same global as select_quantity.c, update_compatibility_indicators.c, start_compatibility_indicators.c, 080a9598.c and both loop siblings). menu+44 and menu+48 are two distinct window handles (menu+44 used with Func_08015270/UiWindow_Commit and as the Func_08015080/UiText_DrawAt window arg; menu+48 used as the object arg to every Func_080a2268/Render_SetTilemapFlagRect call in the second half of the function). menu+456 is a u16 item-id table indexed by page*5+slot (2 bytes/slot, 5 slots/page) -- the same table and stride used by 080a9598.c, 080a5614.c, 080a6a98.c and equipment_menu/update_compatibility_indicators.c (which indexes an adjacent-purpose table at menu+520 with the same *2 stride).","Body, in order: (1) recompute ctx+24, UiWindow_Commit(menu+44), WaitFrames(1); (2) if the item at menu+456+ctx24*2 is nonzero, UiText_DrawAt(masked-id + (s32)&Value_00000075, menu+44, 0, 0) -- a one-shot tooltip/status line, exactly mirroring 080a5614.c's use of the same Value_00000075 base; (3) a 5-iteration row loop (row 0..4, y=1,3,5,7,9): for the selected row reread the ctx24-indexed item, for the other four walk a u16* pointer seeded at menu+456+page*5*2 and advanced every iteration regardless of branch taken (matches the reference's unconditional r9+=2 at the loop bottom); each row calls Item_GetData(id & 0x1ff) and reads a 4-byte word at offset +0x14 of the returned pointer (raw byte offset, deliberately not routed through item.h's named `struct ItemDefinition` since that header's byte-accurate field at 0x14 is the 1-byte `element` -- the reference emits a genuine 32-bit `ldr`, not `ldrb`, at this site, so a word-at-+20 read is what the assembly actually proves, not a claim about a wider field name); type==4 draws an empty-slot marker (width 14), otherwise UiText_DrawAt-style Func_08015280(arg0, type+1, 27, y, style) draws an icon (style 0 for the selected row, 4 otherwise) before a width-13 marker; (4) a second, unrelated 4-iteration loop over menu+48 drawing fixed width-12/height-1/field-15 markers at y=1,3,5,7; (5) a final compatibility check: reread menu+456+ctx24*2, and if bit 0x200 is set, look up the item again and switch on its byte-2 `type` field (matches item.h's ItemDefinition.type at offset 2 exactly) with cases 1/2/3/4 each drawing one more menu+48 marker at width 12, field 14, and y=1/7/5/3 respectively (a non-monotonic case->row mapping read directly off the reference's branch targets, not inferred).","m2c's own reconstruction from the raw assembly (via the project's workbench: `compiler workbench`, run after a temporary name-only source-paths.json entry to satisfy its registration requirement, reverted afterward since this owner is not adopted) independently produced the same field offsets (ctx+8/16/24, menu+44/48/456), the same +0x14 word read after Item_GetData, and the same y=1/3/5/7 case->row mapping for the final switch, which cross-checks the hand trace above; m2c's own attempt to compile that draft failed only on missing type context for two of the switch cases sharing a merged block (a decompiler limitation, not evidence of a different shape).","Current state: differing_halfwords=227, wrong_instructions=181, candidate 512 bytes vs reference 500 (matched_prefix=7, i.e. only the fixed callee-save prologue lines up before the first divergence). The single largest driver is a whole-function register-role swap: the reference keeps `menu` in r8 and `ctx` in sl for the entire function, while every C phrasing tried here (original combined-expression field access, an explicit reused `base5 = ctx->8*5` local matching the reference's own r9-reuse of that subexpression, reordering the ctx-field-read vs menu-deref statement to lead with either one, and copying `ctx` into a fresh local before first use) makes the compiler choose the opposite assignment (`ctx`->r8, `menu`->r7) instead, with zero change in the resulting differing_halfwords/wrong_instructions count across every variant tried (227/181 in all cases but one: the base5 local alone measured slightly worse at 243/191, so it was reverted). Because r8 and sl carry the base pointers for essentially every field access in the function, this one role swap cascades into a renumbered register on nearly every subsequent instruction, which is why the --align view reports almost the entire function body as mismatched even though the control flow, field offsets, constants and call arguments were independently confirmed correct against both the raw assembly and m2c's read of it.","This is the same class of residual the two closer siblings (080a5614.c, 080a6a98.c) already documented as 'register-role choices ... coupled through the compiler's whole-function register allocation, not independently tunable' after real iteration on materially simpler owners; per Cleanroom's inversion guidance this owner was not pushed into an open-ended search on that residual. No PERM_GENERAL/PERM_INT permutation search or register hints were used (none are appropriate pre-structural-convergence, and hand-forcing register assignment is disallowed outright).","Adoption requires 0 differing_halfwords; not adopted. Recovered only from games/gs1/asm/080a93a4.s, the already-adopted games/gs1/src/render/tilemap/set_flag_rect.c (Func_080a2268 signature), games/gs1/include/item.h and types.h (Item_GetData/UiText_DrawAt/UiWindow_Commit/WaitFrames/Render_SetTilemapFlagRect naming and the item type-byte-at-+2 convention), and this project's own unadopted recon siblings (menu/select_quantity.c, equipment_menu/{start,update}_compatibility_indicators.c, 080a9598.c, 080a5614.c, 080a6a98.c, 080a602c.c). No other Golden Sun decompilation project or external symbol source was consulted."]},"main:080a9aec":{"schema_version":1,"namespace":"main","address":"0x080a9aec","status":"measured-draft","owner_bytes":168,"candidate_bytes":178,"differing_halfwords":87,"wrong_instructions":81,"classification":"item-type-badge-icon-loop","family":{"id":"template-main-080b110c","template_owner":"main:080b110c","template_source":"games/gs1/src/shop/draw_item_price.c","note":"Clustered by prologue/n-gram similarity only. draw_item_price.c is a straight-line goto-based single-price display; the real owner is a 15-entry loop over a u16 flag array, each entry tested against a 0x200 'active' bit, masked to a 9-bit item id, looked up via Func_08077018, then switched on the returned struct's byte-2 'type' field (1..4) to pick a draw style (8/56/40/24) for Func_08015080. Only the shared UI-draw-call idiom (Value_00000182 message-base convention) carried over; the control shape is unrelated to the template."},"notes":["Read the real assembly directly: outer loop counts sl from 14 down to 0 (15 iterations) over a caller-supplied `const u16 *flags` array; per entry, tests `entry & 0x200`, then `item_id = entry & 0x1ff`, calls Func_08077018(item_id) to get an item-info pointer, and switches on info[2] with case order 2, (>2: 3,4), 1 -- a decision-tree shape consistent with a plain `switch(type){case 1: case 2: case 3: case 4:}` lowering, which is what my candidate wrote.","First candidate (switch-based, pointer-walking loop over flags, matching the case bodies and Func_08015080(item_id+(s32)&Value_00000182, window, 8, style) call form) diverges immediately in the prologue: my code precomputes the 0x200 mask via `movs r2,#128; lsls r2,r2,#2` (arithmetic synthesis) where the reference loads it from the literal pool (`ldr r3,[pc,#36]`). The reference also loads the flag halfword with a plain `ldrh` while my compiled candidate produced an `ldrsh` with an indexed (register-offset) addressing mode instead of the reference's simple post-increment-style `[r7,#0]` -- suggesting my `for(i=14;i>=0;i--){ value=*entry; entry++; }` shape got strength-reduced differently than the reference's structure by this compiler.","This is a genuine source-shape gap, not yet reduced to a single respelling: the algorithm, field offsets, mask/id values, and per-type call arguments all read correctly off the assembly, but the exact loop induction-variable form (pointer-only vs index+pointer) and the small-constant materialization choice (pool load vs shift synthesis for 0x200) need at least one more structural rewrite (e.g. drop the separate `i` counter and loop purely off the pointer test, or model the counter as the primary induction variable with array-indexed access) before another measurement is worthwhile.","Adoption requires 0 differing_halfwords."]},"main:080a9c18":{"schema_version":1,"namespace":"main","address":"0x080a9c18","status":"measured-draft","owner_bytes":162,"candidate_bytes":164,"differing_halfwords":64,"wrong_instructions":70,"classification":"structural_topology","domain":"Arranges the fifteen visible inventory-category item icons by item type and prepares each existing active icon object.","expressed":["the fifteen-entry encoded-item and icon-pointer walk","the nonzero and 0x200-active-bit guards","the 0x1ff item identifier mask and ItemDefinition type lookup","the type-one through type-four Y positions and common X position","preparing every existing active icon, including unknown item types"],"residual":["The candidate is a complete typed reconstruction but remains two bytes longer than the 162-byte owner and has a different switch branch shape.","The reference keeps the loop-invariant X coordinate in call-clobbered r1 with a four-byte spill and loads the encoded item with ldrh; canonical GCC gives the named C shapes tested here either a callee-saved carrier or a signed-load-plus-zero-extension sequence.","Direct pre-call stores, function- and block-scope coordinate locals, duplicated case stores, an explicit shared-tail goto, and a structured type-range guard preserve the behavior but regress size, topology, or allocation."],"evidence":["games/gs1/asm/080a9c18.s","games/gs1/src/inventory_menu/draw_category_items.c","games/gs1/src/inventory_menu/position_category_items.c","games/gs1/include/item.h","out/gs1-en/waves/alias-review-canonical-final/packs/080a9c18/m2c/080a9c18.c"],"notes":["Recovered only from retained GS1 assembly, local callers and exact inventory-menu siblings, in-repository types, repository-generated m2c structural output, and the approved compiler.","No GS2 source, external decompilation, fixed-register variable, inline assembly, compiler barrier, or forced scheduling was used.","The retained assembly remains authoritative and this draft claims no exact-C bytes."]},"main:080a9f10":{"span_bytes":1336,"edition":{"role":"derived-candidate","edition":"en","base_owner":"080a0e0c","base_edition":"ja","rebase_status":"proved-shared-core"},"cross_edition":{"measured":"2026-08-23","object_bytes":1334,"retained_span_bytes":1336,"relocations":15,"relocation_bytes":60,"literal_fields":83,"literal_bytes":332,"core_bytes":942,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"080a0e0c","en":"080a9f10","de":"080acd8c","es":"080ae798","fr":"080ae79c","it":"080a9fa4"},"callee_correspondences":8,"core_identical":true},"score":{"measured":"2026-08-30","candidate_bytes":1336,"reference_bytes":1336,"differing_halfwords":11,"wrong_instructions":18,"class":"structural-topology","note":"The wave-1 source-shape reduction preserves the complete 1336-byte owner and leaves one localized loop-entry residual: the reference spells the zero index guard as index < target_count and schedules the first range load before it, while canonical GCC can reproduce either the guard form or the favorable allocation/scheduling, but not both together. Every later instruction, all three jump tables, calls, literals, memory operations, and both return paths agree."},"status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"shape":{"calls":15,"branches":101,"memory_ops":105,"loops":2,"jump_tables":3,"jump_table_entries":74,"symbolized_references":89},"domain":"Applies the current effect record to one target or the runtime target list, updates capped signed values or six persistent stats, handles follow-up recovery/status operations, refreshes changed targets, and stores a result code.","expressed":["complete four-argument entry, target-id 9 remapping, 0xff multi-target selection, runtime target-list walk, and changed-target cleanup walk","complete primary kind switch including scaled capped value_38 updates, randomized 0x104-0x109 stat updates, and capped value_3a updates","complete 57-way follow-up switch with active cases 1, 2, 3, 5, 56, and 57, including shared observable result-code behavior","all three reference jump tables, all literal-pool-backed runtime offsets, every call site, both return paths, and the complete owner epilogue","evidence-backed aggregate widths and offsets for the effect record, target record, runtime target list/count, and runtime result code"],"unexpressed":[{"op":"loop-entry scheduling repair","count":18,"where":"the only residual is the first target-loop guard and the independent range load scheduled across it"},{"op":"semantic field naming","count":null,"where":"offset-backed value/stat names remain deliberately neutral because local evidence establishes behavior and layout but not original identifiers"}],"verified_against_reference":["true owner extent 0x080a9f10-0x080aa448 is 1336 bytes; 0x080aa448-0x080aa56c consists of already-exact neighboring owners","workbench symbolization found 3 jump tables, 74 entries, and 89 pool/table references","relocation-aware comparison locates the JA owner at 0x080a0e0c; all 942 non-relocation, non-literal core bytes agree in every edition","the candidate is now exactly 1336 linked bytes against the 1336-byte reference","candidate-show measures 11 differing halfwords and 18 aligned wrong instructions, localized entirely to the first loop entrance","all instructions after the first loop entrance align, including three jump tables, 74 table entries, both loops, and both return paths"],"blocked_by":null,"rejected":[{"shape":"halfword unions plus a u16 working amount","result":"ARM structure-size rounding shifted later fields and repeated amount truncation grew the candidate to 1372 bytes with 610 differing halfwords"},{"shape":"move the target-id assignment before the first call","result":"reduced normalized output to 483 instructions and worsened the linked score to 575 differing halfwords at 1340 bytes"},{"shape":"fold follow-up kind 1 into one short-circuit cannot-apply guard","result":"after the access-form repair it still regressed to 1320 bytes, 581 differing halfwords, and 590 wrong instructions"},{"shape":"declare the long-lived amount carrier as u16 because the decompiler names its register value u16","result":"regressed to 1404 bytes, 614 differing halfwords, and 71.61863% structural match; the source value must remain promoted even though its table load is halfword-wide"},{"shape":"inherit 080bbb0c's -fno-cse-follow-jumps route","result":"controlled builds were byte-identical; the route is owner-specific and is not a lever for this candidate"},{"shape":"put the initial target lookup call in both arms to force the reference branch tail","result":"restored 484 candidate instructions but regressed to 1340 bytes, 566 differing halfwords, and 594 wrong instructions"},{"shape":"permute all six orders of the independent later-target, changed, and result-code zero assignments","result":"the retained later-target/changed/result-code order scored 539 differing halfwords at that stage; alternatives scored 540, 541, 549, or 551"},{"shape":"replace the remaining primary PP raw carriers with repeated field accesses","result":"removed the last two carriers but collapsed the useful allocation family to 1320 bytes, 581 differing halfwords, and 590 wrong instructions"},{"shape":"use isolated signed/raw halfword unions after the access-form repair","result":"regressed to 1328 bytes, 579 differing halfwords, and 614 wrong instructions"},{"shape":"invert the random-bucket branch to reproduce the reference fallthrough order","result":"regressed to 1336 bytes, 529 differing halfwords, and 580 wrong instructions"},{"shape":"introduce an explicit primary-kind carrier so the flag load precedes the power load","result":"regressed to 1336 bytes, 528 differing halfwords, and 578 wrong instructions for both signed and unsigned carrier types"},{"shape":"narrow individual raw-new carriers to s16 as suggested by the decompiler temporaries","result":"primary HP, follow-up HP, and follow-up PP variants respectively scored 586, 510, and 579 differing halfwords; all were rejected despite isolated wrong-instruction reductions"},{"shape":"block-scope lookup, scale, random, healing, and explicit tail carriers or change the HP fields to unsigned with signed access casts","result":"each controlled build was byte-identical to the retained candidate; the redundant source-only forms were removed"},{"shape":"retest all six initial later-target, changed, and result assignment orders after the second transfer pass","result":"the retained order remains the best linked candidate; the structurally closest alternative grows to 1336 bytes but regresses to 522 differing halfwords and 576 wrong instructions"},{"shape":"narrow later-target, changed, or result carriers independently","result":"later-target and changed widths are byte-neutral, while correcting result_code from s16 to its promoted s32 register lifetime reduces the linked residual from 487 to 474 halfwords"},{"shape":"change the two target-loop increments to ordinary increment or an explicit 0xff mask","result":"ordinary u32 increment regresses to 1324 bytes and 486 halfwords; the mask reaches 463 halfwords but regresses to 1332 bytes and 444 wrong instructions, so the byte-width cast remains the best balanced exact-length form"},{"hypothesis":"spell the first loop guard as index < runtime->target_count, matching the reference bcc and the second loop at line 300","measured":"2026-08-29","differing_halfwords":43,"baseline":11,"verdict":"regressed"},{"hypothesis":"hoist effect->range into a local before the guard and use it at every site, matching the reference ldrb [r3,#8] above the guard","measured":"2026-08-29","differing_halfwords":525,"baseline":11,"verdict":"regressed; hoisting removes the in-loop reloads and shrinks the owner to 1316 bytes"}],"notes":["2026-08-30 retained verdict: candidate-show measures exact 1336-byte extent, 11 differing halfwords, and 18 aligned wrong instructions, all localized to the first loop entrance. The ordinary-C `target_count != 0` guard is semantically identical because index is freshly zero; spelling the reference's `index < target_count` comparison fixes the branch class but regresses the allocation/scheduling residual to 43 halfwords. Combining that spelling with a named preloaded range carrier regresses to 571 halfwords; a loop-scoped refreshed carrier reaches 105; a for-loop form reaches 43. Canonical scheduler toggles, regmove, CSE, GCSE, expensive optimization, strength reduction, and rerun-CSE routes preserve or regress. With six-edition normalized cores identical and no missing behavior, this is retained as a proven compiler loop-entry floor rather than forcing allocation or scheduling.","The complete retained assembly and assembled listing were read; pools resolve Data_03001f2c and runtime offsets 0x219/0x25a, while the target list begins at 0x208.","BattleAction field names and the max_hp/max_pp/hp/pp/poison vocabulary are inherited only where exact local layouts coincide; the unresolved early BattleUnit fields remain in an owner-local view.","The retained lookup branch reduced the 564-halfword baseline to 557; the damage-class branch and indexed stat access reduced it to 539; direct raw-field access in the two follow-up cases then reduced it to 487.","Removing the primary HP raw carriers was linked-score neutral at 539 but removed two wrong instructions and enabled the later follow-up lifetime improvements; primary PP deliberately retains its carriers because removing them re-enters the 581-halfword allocation family.","Changing result_code to its promoted s32 lifetime reduced the linked residual by 13 halfwords without altering behavior; the runtime store remains halfword-wide.","Expressing target-id 9 as a zero-default exceptional remap reduced wrong instructions by eight, and independently reloading effect->range at both multi-target decisions removed another twelve wrong instructions while restoring the exact 1336-byte owner length.","The second-pass target-sequence partition measured 189 nonexact target instructions in the primary switch, 156 in the follow-up switch, 30 in the tail, and 22 in entry/selection. Correcting the runtime result destination back to its evidenced halfword width while retaining the promoted local carrier reduced the linked residual by another 35 halfwords and 12 wrong instructions.","No inline assembly, fixed-register variables, compiler barriers, copied instruction bytes, compiler changes, or nonlocal evidence were used.","This is a measured draft only; retained reference assembly remains authoritative."]},"main:080aa56c":{"schema_version":1,"namespace":"main","address":"0x080aa56c","status":"measured-draft","owner_bytes":508,"candidate_bytes":440,"differing_halfwords":253,"wrong_instructions":174,"classification":"shop-scene-open-sequence","domain":"A largely linear scene/sub-mode setup sequence (allocates a context via Func_080048b0, temporarily forces a global mode byte to 2 while running several small init calls, resolves a status code from a short Func_080770c0 chain, draws a message/status window, then a matching linear teardown that restores the mode byte and returns).","notes":["Clustered against the byte-exact Shop_SelectPartyMember template by the family scan on raw n-gram/branch similarity, but the retained assembly is almost entirely straight-line setup/teardown code with only one small 4-way status chain (via three Func_080770c0(id) checks) -- it does not share the template's redraw/input-poll loop shape at all. This is the clearest case among this batch of a family-transplant lead that does not hold up structurally; the template was useful only for compiler-idiom orientation (constant folding via movs+lsls, the ADDR-pointer-dereference pattern), not for its control flow.","Recovered call sequence and a handful of confirmed literal-pool offsets: a context pointer from Func_080048b0(55, 0xa70) used as the base for most later field writes (offset 388/0x184 to store a second context from Func_08004970, offsets 28/29/372/374/376/0x148 written during teardown-prep), a global mode byte at (0x03001e68 + 0x20c) saved before the call sequence and restored at the very end via the caller-visible r9 register, a pointer stored at address 0x02000240 whose halfword at +4 is set to a small status value (1 by default, overwritten by the branch chain) on entry and cleared on exit, and three status codes (14/27/28) selected by nested Func_080770c0 checks against ids that resolve to small integers rather than shop-relative offsets (0x2130/0x212c/0x2128 in the retained literal pool).","This session resolved two concrete, verified respellings: (1) the context variable from Func_080048b0 is not consumed until several statements after the call (the mode-save and the *(ptr+4)=status write happen first in the reference, sourced from unrelated registers, before the compiler finally copies r0 into the persistent r7); matching that statement order in this draft was necessary to get the opening sequence's shape close at all. (2) the *(ptr+4) store uses the same register that separately holds a local 'status' variable already initialized to 1, not a fresh literal -- the reference's 'mov r2,sl' / 'mov r3,sl' pattern only makes sense if the source declares and initializes 'status = 1' once and reads it back rather than re-materializing the literal on each branch.","This owner has the most unresolved literal-pool arithmetic of the six assigned: two pool addresses used as an offset pair added to the Func_08004970 return value (guessed here as +0 and +0x60, unverified), the exact field offsets touched during the drawn-out teardown block (0x148/372/374/376/28/29 on the ctx base, unverified against real pool values), and the two Func_080072f8 destination/size arguments near the end (VRAM-shaped constants 0x06004000/0x000020a8/0x05000080 whose pairing this draft guessed). The 68-byte length gap (440 candidate vs 508 reference) indicates real missing or misshapen statements beyond a few wrong constants, most likely in this teardown block.","Given the volume of genuinely unresolved literal-pool values here, this is better described as an incomplete source-shape recovery than a compiler-internals residual: the next productive step is resolving the pool constants properly (assembling/disassembling the reference per CONTRIBUTING.md's guidance) rather than further guessing, so this is flagged as worth a dedicated follow-up pass rather than permuter search.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080aae14":{"schema_version":1,"namespace":"main","address":"0x080aae14","status":"measured-draft","owner_bytes":324,"candidate_bytes":324,"differing_halfwords":113,"wrong_instructions":122,"classification":"owner-action-slot-diff-merge","domain":"Compares two 32-entry OwnerActionSlot arrays (struct OwnerActionSlot { u16 encoded_action; u16 unknown_02; }, the same action_slots vocabulary owner/action/add.c and include/owner_state.h already use at offset 0x58 of struct OwnerActionState). For every non-zero entry of the second array (b) it writes the masked key (& 0x3fff) into an output u16 array and, if that key is not found anywhere in the first array (a, scanned up to 32 entries), ORs in flag 0x8000 and counts it. It then does the mirror pass over a against b, appending (key & 0x3fff) | 0x4000 for every a-entry not found in b. Returns the total entries written; *lost_count gets the 0x8000 count, *(stack arg 5) gets the 0x4000 count. This is a leaf function (no bl instructions) so it has no callees to corroborate via shared call targets.","notes":["The family-matcher's best guess (games/gs1/src/ui/window/clear_tile_attributes_in_rect.c, 7482/10000, below this project's 7500 threshold) was checked directly and is a shape-only match: same register-shuffle prologue as many UI-window owners in this address neighborhood, but its actual body (a nested row/column tile-rect clear using masks 0x3FF/0xFC) shares no callee, field offset, or constant with this owner. Rejected as unrelated, per this session's brief that above-threshold matches in this cluster were majority false positives for the same reason.","Real evidence instead came from hand-tracing games/gs1/asm/080aae14.s (no callees; parameters recovered purely from register roles) plus a grep for the mask constant 0x3fff across games/gs1/src: games/gs1/src/owner/action/add.c (OwnerAction_Add, Func_08078e28) declares the exact same 4-byte-stride record ({u16 value; u16 padding;}, masked with 0x3fff) at owner-state offset 0x58, and games/gs1/include/owner_state.h already promotes that vocabulary to struct OwnerActionSlot/struct OwnerActionState with LAYOUT_OFFSET_GUARD-verified offsets. All three real callers (games/gs1/asm/080ad6d4.s, 080acab8.s, 080ae2f4.s -- none yet adopted) pass pointers of the form ownerBase+88 (0x58) for the first two arguments, confirming both pointer parameters are struct OwnerActionSlot* views into two different (or, in one 080ae2f4.s call site, the same) owners' action_slots. m2c's independent decompilation of the retained assembly against the real agscc type context (out/workbench/080aae14/m2c/080aae14.c) reproduced the same two-loop, same-mask, same-flag-bit shape from the raw instructions alone, corroborating the hand trace.","The neighboring already-registered owner main:080ae9f0 (UiIcon_DrawVariantWithTileOffset, icon/marker drawing) is called from the same caller as this owner (games/gs1/asm/080acab8.s) but is semantically unrelated to the action-slot diff itself; it is only useful as evidence that this caller's scene mixes icon drawing with an action-list comparison, consistent with a class-change/ability-list preview screen. No stronger name for the screen itself is claimed.","Iterated the source shape extensively against tools/compiler/target/release/compiler candidate-show --align: the initial index-only draft scored differing_halfwords=154/wrong_instructions=192. Replacing the two 32-entry linear searches with an explicit pointer walk (struct OwnerActionSlot *p; do { cnt++; if (cnt>31) break; p++; } while (masked-xor != 0);) -- matching the reference's genuine incrementing-pointer inner loops instead of index*4 addressing -- was the single largest improvement, to differing_halfwords=113/wrong_instructions=122 (candidate_bytes=324, exactly matching owner_bytes=324; candidate_insns=149 == reference_insns=149 per --asm). The final structural workbench report (out/workbench/080aae14/structural.json) scores this 91.79% match_percent: 85/160 instructions byte-identical, and only 8 true insertions/deletions/opcode/replacement differences -- the rest (65) are argument-only (register-number) mismatches.","The remaining 8 structural instructions cluster in two places, both downstream of one register-allocation choice: the reference keeps the second parameter (b) resident in r8 for the whole function (mov r8,r1 as the very first body instruction) and reuses that same r0/r8 pair as a single raw pointer for both loop1's per-entry loads and its 32-entry bound test (mov r3,r8; adds r3,#124; cmp r0,r3). This draft's compiled output instead lands b in r9, promotes a transient copy of the out-pointer into r8 inside loop1, and expresses loop1's bound test as an index compare (movs r4,#1; add r8,r4 as a counter; cmp r2,#31) rather than the reference's pointer-vs-base+124 compare -- a second, coupled residual. Tried and rejected: an explicit `struct OwnerActionSlot *bp = b` alias (no change -- compiler already treats it identically to the parameter); reordering the lost++/flag-OR statement pair to match the reference's exact instruction order (no change -- already schedules identically); splitting the single shared `i` loop counter into distinct `i`/`j` per loop (differing_halfwords improved to 98 and wrong_instructions to 117, but the candidate shrank to 318 bytes -- gained/lost migrated out of their stack slots into extra registers, changing the frame from `sub sp,#12` to `sub sp,#8` and losing matched_prefix; rejected as a worse structural match despite the lower raw diff count, restored the shared-index draft); converting loop1's outer walk to a fully pointer-based `do { ...; bp++; } while ((u8*)bp <= (u8*)b+124 && ...)` to mirror the reference's unified pointer directly (regressed to differing_halfwords=131/wrong_instructions=176 and dropped matched_prefix to 7 -- rejected, restored the index-based draft). No PERM_GENERAL/PERM_INT permutation, register hint, inline asm, or compiler-flag change was used; the residual is treated as a register-allocation-sensitive gap under CONTRIBUTING's 'invert a stalled last mile' guidance, not yet resolved by source respelling alone.","Not adopted (differing_halfwords=113, not zero). Kept as the closest measured draft. No cross-edition comparison was performed this session."]},"main:080ab21c":{"family":"template-main-08021a18","template_owner":"main:08021a18","template_source":"games/gs1/src/graphics/tile/expand_vram_tiles_by_color_table.c","candidate_path":"games/gs1/recon/en/main/080ab21c.c","reference_bytes":208,"best_candidate_bytes":204,"best_differing_halfwords":95,"best_wrong_instructions":56,"status":"measured-draft","notes":["Clustered template (graphics_owner_13.c) does not match; this is a near-twin of main:08022768 (same Data_03001e8c tilemap base, same 30x20 clamp logic, same base[RENDER_DIRTY_OFS] |= 2<<(y>>2) row-dirty mark), read directly from games/gs1/asm/080ab21c.s. Two confirmed behavioral differences from 08022768: (1) flag = alt<<12 here (a full nibble value placed at bit 12, not `(alt&1)<<12`), with mask 0xffff0fff (clears a 4-bit field, not 1 bit); (2) each tile is only touched if its existing top nibble (bits12-15) is exactly 0xf (`if (((tile>>12)&0xf)==15)`) -- 08022768 has no such guard and touches every tile in the rect unconditionally.","Params (x,y,width,height,alt) and the clamp logic are structurally identical to 08022768's clamp code and matched close to exactly on first try (matched_prefix=9 immediately). Iterated 3 respellings on the tile-update body: splitting `tile = (tile & 0xffff0fff) | flag;` into two separate statements (`tile &= 0xffff0fff; tile |= flag;`) fixed an AND-destination-register swap (mask-accumulates-into-tile vs tile-accumulates-into-mask) and dropped wrong_instructions 68->58; casting the row-dirty shift to `(u32)y >> 2` (logical shift) instead of a bare signed `y >> 2` (which compiled to an arithmetic shift, asrs, vs the reference's logical lsrs) dropped it further to 56.","Residual gap, same as 08022768: the initial row/col byte offset (`y*64 + x*2`) compiles to a GCD-factored form (single combined shift after adding the terms) regardless of written order, while the reference computes two independent shifts (y<<6, x<<1) then adds. This is the identical residual documented in 08022768's dossier and is very likely the same compiler-internal expression-canonicalization behavior, not something source respelling here can reach either.","Remaining diffs beyond that are register-number swaps in the loop-setup and mask/threshold-constant loading (lr/ip/r6/r3 assignment order) that track the offset-expression residual rather than being independent issues.","Not adopted; kept as the closest measured draft. See main:08022768's dossier for the shared offset-expression finding."]},"main:080ab314":{"schema_version":1,"namespace":"main","address":"0x080ab314","status":"proven-retained","classification":"ui_selector_compiler_allocation_module","owner_bytes":720,"score":{"measured":"2026-08-27","candidate_bytes":724,"reference_bytes":720,"differing_halfwords":331,"wrong_instructions":190,"class":"wrong","note":"Structurally the candidate now matches the reference at essentially every level that source shape controls: identical control flow (a two-level loop -- an outer redraw/highlight-swap loop wrapping an inner per-frame input-poll loop with the same five-way if/else-if input dispatch), identical field offsets (0x10, 0x30, 0x10C on the Data_03001f2c cell; 0x12B6, 0x12F8, 0xEA6 on the Data_03001e8c cell), identical bit masks (0x90/0x60 on Data_03001b04, 1/6/8 on Data_03001c94), identical call targets and argument counts throughout, and identical constants (0xC30-0xC39 message ids, 7-item wraparound, the 0x080a19a1 callback re-registration). Diffing the full instruction stream turns up zero opcode or immediate-value mismatches -- every '!' line pairs the same mnemonic against itself with only register numbers (or a pool-offset-driven branch target) differing. The entire remaining gap is one class of residual: this compiler assigns 'list' (the first Func_08015010 return) to r7 and 'sel' (the selection index) to r6 for the candidate, where the reference assigns list=r6/sel=r7; a second, related swap gives the reference's late Data_03001e8c-address cache r5 where the candidate's gets r8. Both were reproduced identically across roughly two dozen independent source-shape variations (see rejected_experiments)."},"family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"The family-matcher's score (8585/10000) reflects only a generic register-shuffle-prologue/redraw-loop/if-chain shape match, not real kinship: this owner shares zero callees with Func_080b362c (no UiWindow_CreateFar/Ability_GetAvailability/Func_080772a8/UiWork_Create), and this owner's own assembly proves it reads the same Data_03001f2c/Data_03001e8c polymorphic cells consumed elsewhere by games/gs1/src/menu/select_quantity.c (same Func_08015010 5-arg s32-returning window-create call, same Func_080a19a0 periodic-callback re-registration via Func_080041d8, and the same *(s32*)(cell+16) field read in that file's own exit tail) -- a different, lower-level 'menu' UI kernel (0x08015xxx call range) than select_use_item.c's higher shop-specific wrappers. This owner's own field 0x10C (message_window) and field 0x10 (used identically to select_quantity.c's exit-tail Func_08015270(*(s32*)(menu+16))) also match struct CharacterSelectorState/PsynergyMenuState's named fields at those exact offsets in games/gs1/src/menu/open_character_selector.c and games/gs1/include/psynergy_menu.h, but nothing in this owner's own assembly (field 0x30's role, the 7-item spinner shape) confirms which specific mode is active, so the source keeps raw offset macros rather than importing one of those named structs."},"rejected_experiments":["Declaration-order permutations for list/sel/win_a/win_b/state/work/prev_sel/result (all pairwise orderings tried, including moving 'sel = 0' before vs after the three Func_08015010 calls, and moving 'list' to be the first-declared local of the function): stack-slot offsets for the six spilled locals (state/work/result/prev_sel/win_a/win_b) DO track declaration order directly -- getting win_a/win_b declared before state/work/result/prev_sel fixed all six stack offsets to match the reference exactly (this is retained) -- but no ordering of the two register-resident locals (list, sel) ever changed which of r6/r7 each received; the pair stayed r7=list/r6=sel throughout.","Splitting the do-while loop's 's32 i' into its own nested block vs a function-top-level declaration, and switching the outer loop between 'for(;;){...;if(result!=0)break;}' and 'do{...}while(result==0)': byte-identical output either way (both compile to the same test-at-bottom shape); kept the do-while form as marginally clearer.","Removing the '(void*)' cast on list at the two Func_080ab1f4 call sites, and declaring list as 'u8 *' instead of 's32' throughout (with a matching cast on its Func_08015010 assignment): no effect on the r6/r7 choice in either direction; reverted to 's32 list' to match select_quantity.c's own Func_08015010 s32-return precedent.","Reordering the commutative 'i + 0xC32' to '0xC32 + i' in the init loop's Func_08015080 call, and writing the second window-instruction message id as the literal '0xC31' vs the explicit 'the first constant plus one' ('0xC30 + 1'): both are folded identically by the compiler at parse time; no codegen change either way.","Introducing an explicit named local for the state->0x10C field ADDRESS (not value) instead of three separate M2C_FIELD(state,s32,0x10C) macro expansions: byte-identical output; the compiler already CSEs the repeated macro expansion into one address computation reused across the three call sites regardless, it just keeps choosing r5 for that computation where the reference chooses r6.","Rewriting every Data_03001e8c reference (not just the derived one at function entry) through the same '*(u8**)((u8*)&Data_03001f2c-0xA0)' address-of-arithmetic form used to fix the entry-point subs derivation (see the accepted fix below), including via a shared 'u8 **cell = (u8**)&Data_03001f2c' local reused for both state and work: no change to the late-function Data_03001e8c address-cache register (still r8 in the candidate vs r5 in the reference) in any form tried.","Accepted fix (kept, not rejected): expressing the function-entry reads as 'state = *(u8**)&Data_03001f2c;' followed by 'work = *(u8**)((u8*)&Data_03001f2c - 0xA0);' -- i.e. deriving Data_03001e8c's address arithmetically from Data_03001f2c's already-taken address, rather than reading the two globals independently -- reproduced the reference's 'subs r3,#160' exactly (previously a redundant second literal-pool load), dropping candidate_bytes 732->724 and wrong_instructions 206->190. This is the compiler recognizing the two fixed-address symbols as compile-time-foldable constants once their addresses are taken explicitly through '&', which a plain independent 'Data_03001e8c' global read does not trigger.","Accepted fix (kept, not rejected): splitting every 'sel = Func_080aa538(sel +/- 1, 7)' call into its own in-place 'sel += 1;'/'sel -= 1;' statement followed by 'sel = Func_080aa538(sel, 7);' -- matching the exact idiom documented in games/gs1/src/shop/select_use_item.c's own header comment for this same compiler -- reproduced the reference's in-place adds/subs-before-call instruction shape at all three call sites (previously the candidate folded the +/-1 into the call argument directly, a non-matching instruction order); this is a genuine structural correctness fix, independent of the register-swap residual, that further reduced wrong_instructions."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080ab314.s), the approved local EN ROM, the m2c-assisted family-transplant workbench (out/family-transplants/main-080ab314/), games/gs1/src/shop/select_use_item.c, games/gs1/src/menu/select_quantity.c, games/gs1/src/menu/open_character_selector.c, games/gs1/src/menu/draw_at_window_offset.c and .../graphics/graphics_owner_1.c (the two local callees Func_080ab1f4/Func_080ab2ec, already exact and adopted), games/gs1/src/runtime/scheduler/callback_scheduler.c, games/gs1/src/menu/update_entry_object_transforms.c (Func_080a19a0, the re-registered periodic callback), games/gs1/include/global_cells.h, games/gs1/include/psynergy_menu.h, games/gs1/include/inventory_menu.h, and the approved compiler. No GS2 source, other Golden Sun decompilation project, or symbol map was inspected.","2026-08-31 retained-assembly proof: the complete candidate has equal branch topology and every functional opcode, immediate, call, argument, literal, field offset, and memory operation matches. The residual is confined to GCC assigning list/selection and the late Data_03001e8c address cache to different callee-saved registers, plus the resulting four-byte pool extent. Roughly two dozen declaration, initialization, scope, loop, pointer, expression, and identity probes preserve the allocation or regress. The allocator decoder's proposed split_lifetime(i) operation is mechanically inapplicable because this owner's i is a scalar loop counter while the guarded operation requires a nonvolatile pointer, so no unsafe mutation was attempted. Relocation-normalized cross-edition verification proves all 508 core bytes identical across all six GS1 editions (42 relocations and 11 literal fields normalized). Structured assembly therefore remains authoritative under ui_selector_compiler_allocation_module.","This candidate claims zero DONE bytes; games/gs1/asm/080ab314.s remains authoritative.","Semantic summary: a 7-item spinner-list selector reusing the same Data_03001f2c 'active menu' and Data_03001e8c 'UI text work' polymorphic cells as games/gs1/src/menu/select_quantity.c, but driving the shared low-level Func_08015xxx window/list kernel directly rather than through select_use_item.c's shop-specific wrappers. It draws two static instruction lines and a bordered box via the two already-adopted local helpers (Func_080ab1f4/Func_080ab2ec), builds a 7-entry text list (message ids 0xC32-0xC38), then loops: redraw the highlighted entry, poll input every frame for up/R (bits 0x90) or down/L (bits 0x60) to cycle the 7-item selection via Func_080aa538(value,7), B (Data_03001c94 bits 6 or 8) to cancel with result -1/-2, or A (bit 1) to confirm through a Func_08015048() validity gate before exiting with result 0/-1 style codes, clearing a per-slot list entry each pass, and finally re-registering the Func_080a19a0 periodic object-motion callback (also confirmed shared with select_quantity.c) before returning.","The two local callees this owner calls (Func_080ab1f4, Func_080ab2ec) are themselves not yet exact -- see games/gs1/recon/en/dossiers.json#main:080ab21c for the third, Func_080ab21c, which both of those wrap and which remains a measured draft with its own documented residual (a GCD-factored offset expression). This owner's own score is independent of and does not depend on those being exact first, since all three are already the approved compiler's real emitted shape for this owner's call sites regardless of their own adoption status.","Field offsets 0x10 and 0x10C on the Data_03001f2c cell coincide exactly with struct CharacterSelectorState.selector_window (0x10C, games/gs1/src/menu/open_character_selector.c) and the analogous plain-s32 field read at select_quantity.c's own offset 16, and struct PsynergyMenuState also names both 0x10 (auxiliary_window) and 0x10C (message_window, games/gs1/include/psynergy_menu.h) -- suggestive but not owner-proven kinship, kept as an evidence note rather than an import, per Cleanroom's 'names no more specific than the evidence' rule."]},"main:080ab5e4":{"status":"proven-retained","classification":"intra_function_call_module","span_bytes":4888,"edition":{"role":"derived-candidate","edition":"en","base_owner":"main:0x080a24e0","base_edition":"ja","rebase_status":"required","evidence":"entry correspondence established by the cross-edition ROM scan; the JA owner changes length and source structure, so this EN candidate must be derived from JA rather than copied into the base corpus"},"score":{"candidate_bytes":4804,"reference_bytes":4888,"differing_halfwords":2293,"wrong_instructions":1671,"class":"wrong","normalized_insn_diff":"objdiff 68.53684%; 1093 unchanged, 690 argument mismatches, 17 opcode mismatches, 65 replacements, 330 deletions, 285 insertions","bl_sequence":"184 ours / 184 reference -- EXACT","frame":"sub sp, #108 on both sides -- EXACT (was 92 vs 108 at session start)","note":"invariant-first candidate: exact 108-byte frame, arg0 at sp+80, ctx at sp+76, slotFlags at sp+84, status at sp+100, and 20-instruction exact prefix; still 84 bytes short and not exact"},"shape":{"calls":186,"loops":20,"memory_ops":3,"jump_table_pool_targets":true},"domain":"Colosso tournament handler: texts 0x2128/0x212c (finals gating), 0xbbe (recovering), 0x219 (Warrior's Helm); IWRAM 0x03001c94/0x03001af8; reads Data_02000240","expressed":["complete entry paths for both arg0 values, local initialization, persistent tournament fields, and competitor-status array construction","the 28-case mov-pc dispatch at +0x71c: state = *(seq+0x212c) (skip when 0), tick counter (seq+0x2128)++ each entry, jump table at +0x74c, eight empty slots sharing the after-switch address","all switch interiors, shared tails, dialog sequences, timing gates, and progression updates","complete post-dispatch input, recovery, reward, redraw, and final persistent-store paths through the owner return","the evidence-backed function signature s32 Func_080ab5e4(s32 arg0), replacing the former void(void) scaffold","slotFlags and status are members of one 24-byte local work buffer: slotFlags[8] at sp+84, an evidence-visible unknown 8-byte middle region at sp+92, and status[8] at sp+100. This naturally emits the exact 108-byte frame and both array addresses without fake scalar pressure. The reference clears status as a byte walk from &status[7] down to &status[0] (strb/subs/cmp/bge) and keeps a pointer local to &status[0]","the packed tournament value's div and mod results are both zero-extended to u16 (the reference lsls/lsrs #16 pair after each of Func_08002304 and Func_080022f4)","all seven dialog-wait sites are rotated while loops -- while (Func_08015048() == 0) Func_080030f8(1); -- so the frame pump is emitted BEFORE the poll, as the reference's b-to-test/body/test layout shows. m2c's top-tested goto loop emitted them in the opposite order; this one family closed 14 of the 26 bl-sequence hunks","the arg0 dispatch arms are ordered == 0 first: the reference emits the tournament-status body (sp24/sp20 dialog pair plus its bitfield block) as the fallthrough of the arg0 test and branches away for the nonzero case. m2c's != 0 first ordering put the wrong block at .L24","the first 0x10C window-handle call reads the field directly; only the second call computes and retains its address for the remaining uses. EN and JA both emit this two-stage lifetime. Hoisting the pointer from the first call invented a long-lived sp+84 scalar and displaced both local arrays","the three block_159 selector paths (case 27, case 1/3/7/8/21 nonzero arm, case 17/19) share the same two-statement tail (store the selector to +0x212C; var_r4_907 = sp8). Inlined at each site instead of a shared label+goto so crossjump can form the reference's share point locally; the shared-label form kept a live var_r3_1107 across all three call sites that the reference does not carry","sp54 was m2c's scalar mistyping of a second byte buffer (M2C_UNK=s32, matching the same array-truncation pattern already fixed for the status array): the reference's Func_080ae714(&buf, count) fills a buffer at sp+84 that is later read with 'ldrb r3,[r5,r7]' (byte-indexed by the loop counter), proving 1-byte element stride. The old '*(&sp54 + sp44)' spelling did pointer arithmetic in 4-byte (s32) units instead -- a real correctness bug, now fixed as 'u8 buf54[8]; ... buf54[sp44]'. Score-neutral (979, 6 bytes shuffled but same normalized weight) but adopted on evidence: matches the reference's actual instruction shape and removes a latent out-of-bounds/wrong-stride read for any sp44 > 0","var_sl_1853's inner-loop advance is +1 (one u16 element), not +2: reference emits 'movs r3,#2; add sl,r3' -- a literal 2-BYTE raw register add, which for a u16-aligned pointer is exactly one element. The old '+= 2' spelling (2 ELEMENTS = 4 bytes in C pointer arithmetic) silently walked half as many entries per apparent outer-loop iteration bound. Fixed to '+= 1'. Score-neutral (979) but a genuine, byte-proven correctness fix -- found by the same method as the sp54 buffer bug: re-reading a loop's raw pointer-advance instruction against its C-level increment instead of trusting m2c's literal transcription","the frame is now size-exact (sub sp,#108) and the bl sequence is count-exact (184/184); both were off at the start of this session","the seven dialog-wait sites are PLAIN while loops in source -- while (Func_08015048()==0) Func_080030f8(1); -- GCC performs the rotation itself. Hand-writing the rotated form if(c){do{b}while(c);} duplicates the poll call (14 sites vs the reference's 7, total bl 190 vs 184) and pads size toward parity with instructions the reference does not contain. Tried and reverted (7a8d2a54a, dd575d756); do not redo it","ctx+0x1C, the local status[] array, and the events+0xA0 per-slot array are all read SIGNED (reference ldrsb at asm 116/136/157/175/244/1698/1789/1899); events+0xA0 was the one still unsigned here and is now fixed"],"unexpressed":[{"op":"store deficit","count":29,"where":"instruction histogram over differing regions: ours 89 str vs reference 118. Candidate addresses 23 distinct stack slots (0..88) against the reference's 21 (0..80) at the SAME 108-byte frame -- the reference reserves sp+84..91 for slotFlags[8] (add r5,sp,#84) and sp+100..107 for status[8], keeping scalars inside 0..80. Two extra scalar slots here are spilling where the reference does not. This is the main remaining lever"},{"op":"crossjump merge (corrected)","count":"~150 instructions","where":"CORRECTION to the prior note in this file: loop_36 IS the right target for the 'sp48 = 1; goto loop_36;' sites -- draft line ~247 (Func_08015270(win10C); field5=1; sp18=sp38*8; loop_36: temp_r7_312=sp48; if(temp_r7_312==0){}else{switch...}) maps DIRECTLY onto asm .L99 (ldr r7,[sp,#72]; cmp r7,#0; bne .L18; b .L19). The reference's 'bl .L99' at the dialog-exit sites is GCC's own crossjump decision to share that landing test as a bl-callable block, not a different C-level control-flow shape. Our build isn't getting the same crossjump merge, which is a global-coloring/register-pressure question (the sched2-LUID-tie class documented on 080bbb0c), not a source-shape bug -- do not 'fix' the goto target again without re-deriving this from scratch"},{"op":"store deficit","count":43,"where":"instruction-mix histogram: ours 104 str vs reference 147. Frame is 88 bytes/18 addressed slots against the reference's 108/21, so the reference keeps roughly three to five more values in memory across calls. These are spills that follow from source shape -- more distinct live locals than m2c's collapsed temporaries -- not from missing statements (strb/strh already match)"},{"op":"byte-load signedness","count":"5-7","where":"reference ldrsb 13 / ldrb 38; ours ldrsb 8 / ldrb 45. The status array is read SIGNED (ldr the pointer, ldr the index, ldrsb, cmp #4), so the m2c (u8) casts on sp1C[...] at the mask sites are candidates for removal; check each against its reference site before changing"},{"op":"aggregate recovery","count":"whole owner","where":"raw M2C_FIELD offsets still need evidence-backed structs and field names; 0x30 (19 uses) and 0x219 (19 uses) are the remaining hot fields, direct-immediate and pool-indexed respectively"},{"op":"symbol recovery","count":"whole owner","where":"m2c temporaries and Func_* callees remain provisional"}],"rejected":[{"shape":"one struct containing every scalar and both arrays from sp+24 through sp+107","wrong":"GCC retained a struct-base pointer, grew the frame to 120 bytes, reduced the exact prefix from 20 to 7 instructions, and regressed to 2334 wrong instructions. The 24-byte array aggregate is admitted; the surrounding scalar slots must continue to arise from their real lifetimes."},{"experiment":"heat-guided classic AST walk","candidates":10000,"result":"no exact candidate; 155 compile failures; best retained source is deliberately UNVERIFIED because classic mutations are not guaranteed semantics-preserving"},{"experiment":"heat-guided safe AST walk","candidates":10000,"result":"journal composite improved from 1033216102394 to 880199202393, but independent candidate-show scoring worsened from 2324 to 2339 differing halfwords and changed candidate size from 4748 to 4780 bytes; not harvested"},{"experiment":"guarded safe AST walk, 100k candidates, seed 1 (out/colosso-r1)","wrong":"best.c scores raw halfwords=2353/wrong_instructions=1884/size=4740 (all 'improved' vs the committed draft's 2401/2003/4728), but the normalized instruction diff (same POOL-filtered LCS metric used throughout this owner's record) is WORSE: weight 1062 vs the committed draft's 979. This is the documented raw-metrics-mislead-while-short-of-parity trap (same class as 080bbb0c's phase-dominated halfword counts) -- the permuter's own packed score optimizes raw diff counts, not the normalized compass, and found a structurally worse candidate that looks better on the naive metric. NOT adopted."},{"experiment":"classic-mode permuter walk, 100k candidates, seed 2, journal-imported from r1 (out/colosso-r2)","wrong":"best-UNVERIFIED.c reaches 4788/4888 bytes (closest size yet) at 2389hw/1901 wrong instructions, but normalized weight is 1017, still worse than the committed draft's 979 -- confirms the same raw-metrics-mislead pattern found in r1, independently. Also UNVERIFIED by construction (classic-mode mutations are not guaranteed semantics-preserving); not auditable by hand at ~150 chained mutations. Not adopted."},{"shape":"hoist all 14 (sp18 - sp38) occurrences to one shared 'slot' local, recomputed at both sp18-reassignment points (semantically verified safe: every read precedes any subsequent sp38 mutation on its own path)","wrong":"normalized weight 994 vs the committed draft's 979 -- a real regression, not a tie. Traced via -fno-gcse diagnostic: field-load counts (ldrb, [r,#48]) are IDENTICAL between standard and -fno-gcse builds, ruling out simple field-read folding as the mechanism. RTL evidence (080ab5e4.c.07.gcse dump) shows gcse's PRE pass adds ~29 insns (11 new pseudos, 1137-1147) rather than removing redundancy -- pseudo 1139 = reg40-reg48 (one definition, insn 5484) is a PARTIAL, PATH-SPECIFIC hoist, not a whole-function CSE the way a single shared C local reproduces. A blunt full hoist overshoots what GCSE actually does and makes the match worse."},{"shape":"narrower (sp18-sp38) hoist scopes: 9-site cluster only (lines ~306-376), and separate per-if/else-pair locals (slotA/slotB for the two nearest branch pairs)","wrong":"narrow-9: weight 981 (still worse than 979, though close). paired if/else: weight 1108 (much worse). Neither reproduces the -fno-gcse gain; four total hoisting scopes tried (full-14, narrow-9, paired-if/else, and the original full hoist) all tie or regress. This suggests pseudo 1139 (reg40-reg48, the one PRE insertion I traced) is NOT the primary driver of the 56-row -fno-gcse improvement -- gcse creates 11 new pseudos total (1137-1147) across the whole function, and the real gain is likely a distributed, multi-site interaction (or downstream scheduling shift) that cannot be isolated to one C expression. -fno-gcse is retired as a source-reproducible lever for this session; it remains a valid DIAGNOSTIC signal only (and using the flag itself is not permitted for adoption -- the approved compiler flags are fixed)."},{"shape":"declaration-order reshuffling (first-use order, reverse first-use, last-use order, reverse last-use -- 4 variants covering the whole declaration block, 122 locals)","wrong":"all four tie EXACTLY at weight 979 (identical to the committed draft's own arbitrary m2c declaration order). One variant (first-use order) improved wrong_instructions to 1979 (from 2003) while leaving the normalized weight unchanged -- another confirmation that wrong_instructions is not a safe compass this far from parity. Unlike 080bbb0c (where declaration order in reference-spill order was a real, documented factor), this build's register allocator is insensitive to source declaration order entirely -- ruled out as a lever for this owner."},{"experiment":"hand-written rotated wait loops","result":"duplicated Func_08015048 at all 7 sites; bl 190 vs 184. Size looked better (4800->4840) but by padding. Reverted"},{"experiment":"removing the 48 pure single-use address-capture new_varN locals","result":"4880->4872 bytes and wrong_instructions 1859->1895; they are load-bearing for register pressure despite carrying no meaning. Keep them"},{"experiment":"declaration reordering to fix stack-slot assignment","result":"no effect; GCC assigns slots by liveness here, not declaration order"},{"experiment":"split-assignment, commutative swap, redundant mask, comparison-operand flip","result":"all zero-effect; GCC canonicalizes pure expression-spelling changes. Only genuine statement reordering moves this owner"},{"experiment":"statement reordering sweep","candidates":50,"result":"5 adopted wins (d21020a53, 08c7fbd2f, cb7f83ae7, 2dfa17a86 and the entry-order fix cb4e9e9a8); saturated afterwards. Independent adjacent statements only -- the correct order is per-site, not a general rule"}],"notes":["Cross-edition scan locates the JA counterpart at 0x080a24e0 (the generic anchor vote initially reported 0x080a24d0 because this region changes length). JA and EN share the entry frame, stack-slot order, first loops, and compiler shape, but differ by roughly 1,249 non-relocation bytes across the EN-sized window; JA is structural ancestry evidence, not a copyable implementation.","The invariant-first pass removed two false live ranges introduced by the automated candidate: windowPtr was hoisted one call too early, and new_var5 was assigned only on one branch then read uninitialized on its sibling. Splitting the pointer lifetime and using sp38 directly removed the two extra scalar slots. Grouping slotFlags[8], unknown[8], and status[8] then restored the exact 108-byte frame and observed array addresses. Removing five one-use address-capture aliases extended the exact prefix from 9 to 20 instructions and reduced wrong instructions from 1857 to 1671. No permuter was used.","value-vs-use-site caution: 0x212c/0x2128 decode as the finals texts but are struct offsets here; 0xc4c/0xc4d are genuinely text ids at their push sites. Resolve by use, not by value.","m2c 19f2ddb reconstructed the complete owner after symbolizing one 28-entry jump table and 110 pool/table references. The default symbolic assembly reassembles byte-identically to the reference (SHA-256 d68f1ce2d575bfa118d30df90603a97e2b95596b9ec1ef143ff55e1e594d91d5).","The generated source was repaired only for agscc's recovered field widths and pointer types; no inline assembly, fixed-register variables, copied bytes, or compiler changes were used.","Compared with the former 1492-byte scaffold, the full candidate reaches exact 4748-byte size, improves the linked score from 2438 to 2324 differing halfwords, and improves objdiff v3.8.0 ARMv4T structural similarity from 22.23341% to 58.86819%. It remains a draft, not progress.","Two native permuter waves (20,000 requested candidates total, 12 workers, seeds 20260820/20260821) confirmed this is not a last-mile owner. The safe winner reduced normalized structural rows but worsened the independent byte score and rewrote 1,656 source lines. Repair aggregate types and source shape before another permutation run. Ignored reports remain under out/permuter/080ab5e4-r{1,2}.","session method note: while the candidate is short of 4888 bytes, raw differing_halfwords and wrong_instructions are phase-dominated and mislead (the 0x10C pointer local improved structure sharply while raising raw halfwords). The working compasses are the normalized instruction diff and the bl-sequence alignment; adopt only on linked bytes once size parity is reached","the switch case order (27,26,0,1/3/7/8/21,2,5/6,12,13/15/16,14,17/19,20,23) already matches the reference emission order because m2c derived it from the jump table -- do not re-litigate case ordering; the remaining work is within-case structure","block_198's only goto/label pair was a no-op (fell through to the same statement immediately after its own closing brace); removed as dead-code cleanup, emission-neutral (verified byte-identical before/after). The two near-duplicate 'recovering' dialog call blocks (Func_080f9010(0x72)/Func_08015278/Func_08015068/Func_08015078 sequence at lines ~630 and ~903) ARE a genuine original duplication -- both m2c sites are real, reached via different flag-setting paths (sp3C==-1 direct vs the two-check sp44 path); the divergence from the reference is in how the guard flags and intermediate gotos are threaded, not in missing/extra statements. Unresolved lead for next session.","both parallel 100k permuter walks (safe AST and classic) against the current hand-derived draft independently confirm the normalized-instruction-weight compass: each found a candidate that scores better on raw halfwords/wrong-instructions/size but WORSE on the POOL-filtered normalized diff (1062 and 1017 respectively, vs the committed draft's 979). The permuter's own packed score is not a safe adoption gate this far from size parity on this owner -- do not adopt permuter winners here without independently recomputing the normalized weight first, exactly as this session did.","verified this session: all three reference occurrences of 'movs r0,#114; bl Func_080f9010' (games/gs1/asm/080ab5e4.s lines 1488, 1620, 1665) map 1:1 onto the draft's three existing sites (lines ~630 full pattern, ~888 bare block_193, ~903 full pattern) -- no missing block in this family. The reference's first byte-level divergence is the prologue itself (sub sp,#88 vs #108, offset 0x0e), and the function head (arg0 staging, the two P-pointer/temp_r9_32/temp_r5_34 reads) matches the reference near-verbatim already -- the 20-byte frame gap is a distributed spill-slot deficit accumulated across the body, not a single findable bug. A targeted reuse experiment (sharing temp_r2_424 across its two field-read sites at line ~281) measured emission-neutral (normalized weight 981 vs 979, a tie within noise) -- GCC already handles that redundancy for free; not adopted. -fno-regmove parity probe measured no improvement here (unlike its 080bbb0c precedent).","-fno-gcse diagnostic CONFIRMED as a genuine structural lever (weight 923 vs 979, verified via the same POOL-filtered LCS metric) but its exact source-level equivalent remains unfound: gcse's PRE inserts a path-specific partial hoist (not a whole-function shared local), and reproducing PRE's exact CFG-driven insertion points via C source restructuring is not achievable by the blunt full-hoist tried this session. This is the same class as 080bbb0c's scheduler-tie residual: a real, measured, compiler-internal effect not yet reduced to a source spelling. Next step for a future session: read gcse.c's PRE placement algorithm (edge insertion at specific CFG edges, not block-level), or bisect which SUBSET of the 14 call sites the PRE actually covers by selectively hoisting smaller groups and rescoring each against the compass.","store-sequence alignment (str/strb/strh instructions only, aligned like the bl-sequence compass) found the true shape of the 43-instruction store deficit: the reference spills specifically r4 to [sp,#8] 27 times (24 reloads) across the whole function body, ours does this only ~1-3 times. Verified this is NOT one persistent value stuck needing constant respill (the one candidate constant checked, 0x080AF28C, appears exactly once in both builds' pools) -- it is -fcall-used-r4 (a project build flag making r4 caller-saved) combined with the register allocator choosing r4 for many DIFFERENT short-lived cross-call values throughout the reference, where our build's allocator picks other (callee-saved, no-respill-needed) registers for the equivalent values. This is a global allocation-PRIORITY difference, not a locatable single-site bug -- the same 'measured, not locally reachable' class as 080bbb0c's scheduler-tie residual, but spanning the whole function rather than one instruction pair. No source-level lever for this was found or attempted to be forced this session; it would need the same allocno-priority-dump instrument that worked for 080bbb0c's final pair, applied at much larger scale (many pseudos, not one).","cumulative session total: two 100k permuter walks, an 8-flag diagnostic sweep, four -fno-gcse hoisting-scope experiments, a store-sequence localization of the deficit to r4-allocation-priority, and four declaration-order variants. Every technique that worked for 080bbb0c's much smaller residual has now been tried here at least once; none has closed this owner's gap. The remaining 979-weight distance is real but requires either the allocno-priority-dump instrument applied per-pseudo at a scale (130 pseudos to allocate, vs 080bbb0c's much smaller problem) not attempted this session, or continued incremental structural reading of the ~40% of the function not yet individually verified against the reference (case 13/15/16/14/17/19/20/23 bodies and the post-switch tail past line ~950).","SUSPECT: the 0x219 signedness adopted in 86f953cf4 is NOT evidence-backed. Every ldrsb site in the reference reads ctx+0x1C, status[], or events+0xA0; 0x219 is read with ldrb via a pool-loaded offset. The (u8*)->(s8*) change measured strongly better (size 4800->4840, structural deficit 47->29) but by a register-pressure side effect, and it introduces the +7 asrs / +9 lsls excess visible in the histogram. Revisit before adoption","NAMING CAVEAT: Func_08077210/Func_08077208/Func_080771b0 sit on the same 0x08077xxx page as games/gs1/src/battle/resolve_action.c's Battle_HitCheck/Battle_CalcAttack/Battle_CalcPower. The 0xF00>>8 / 0xE0>>5 / 0x1F decomposition feeding them may be a packed stat/ability value, not the color/tile reading this file has assumed. Page adjacency is not proof; check before trusting either name","Func_080022f4 is the same address as 080bbb0c's Math_Mod, and Func_08002304 is its sibling divide -- aliased here as Math_Div/Math_Mod. An earlier labeling in this file had the two backwards; corrected"]},"main:080ac8fc":{"schema_version":1,"namespace":"main","address":"0x080ac8fc","status":"measured-draft","owner_bytes":264,"candidate_bytes":256,"differing_halfwords":113,"wrong_instructions":132,"classification":"djinn-active-slot-list-builder","family":{"id":"template-main-080ae7fc","template_owner":"main:080ae7fc","template_source":"games/gs1/src/djinn/count_turns.c","note":"Same djinn-record domain (record obtained via Func_08077008, two parallel 4-row 32-bit bitmask arrays at record+264 and record+248, 20-bit inner loop, active-bit-else-secondary-bit test matching the template's `if(active&mask) ... else if(row[0]&mask) ...`), but this owner does not count matches -- it packs each match into a u16 output list (row<<5 | bit | id<<8, with an extra 0x8000 flag bit set only for primary-field matches) and either scans all 4 rows (row_select==-1) or just one caller-selected row."},"notes":["Read the raw assembly directly across both branches. High confidence on the algorithm: record=Func_08077008(id); for the -1 case, loop row=0..3 reading active=rows[row] (record+264+4*row) and secondary=record+248+4*row (confirmed row-varying by tracing r9, which increments by 4 each outer iteration and feeds the secondary-field offset via a snapshot into a fixed register each pass -- an easy misread on a first pass since the textual instruction looked like a constant +248); for each bit 0..19, if active has the bit set, packed=(row<<5)|bit|0xFFFF8000|(id<<8) (the pool constant 0xffff8000 is only ORed in this branch, confirmed against the single `.4byte 0xffff8000` at the end of both the -1 and selected-row code paths); else if secondary has the bit, packed=(row<<5)|bit|(id<<8) (no flag bit). The row_select!=-1 branch is the same per-bit logic restricted to one row, with the flag bit again reserved for the active-field match.","First candidate compiled with the field extraction, packing, and both branches structurally present, but the register roles diverge from the very start of the prologue (id lands in r7/r9 here vs the reference's r5/fp), suggesting the two locals `record` and `id` are being prioritized in the opposite order from the source -- likely fixable by reordering which value is captured into a local first, but not chased further given time.","This is the most complex owner in this batch (264 bytes, two full nested-loop branches); the algorithmic reconstruction is my best-confidence read of the bit-packing semantics, but the remaining gap is large enough (132 of roughly 120 total instructions) that register/stack scheduling differences likely compound across the whole function rather than being isolated to one spot. Recommend re-verifying the exact parameter order/count of Func_08077008's caller-visible signature and trying the opposite local-declaration order before another measurement.","Adoption requires 0 differing_halfwords."]},"main:080acab8":{"schema_version":1,"namespace":"main","address":"0x080acab8","status":"measured-draft","owner_bytes":1980,"candidate_bytes":1968,"differing_halfwords":947,"wrong_instructions":716,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted the next-largest unnamed clean compiler-output owner from the prepared aggregate-aware wave. After repairing typed runtime-table reads and the 96-byte halfword scratch region, the canonical compiler produces 1968 bytes for the 1980-byte reference; topology differs and 947 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","The candidate is a large menu presentation helper taking two compared party entries and several display parameters. It allocates presentation work, draws paired stat and status fields, computes per-field changes, and animates the resulting comparison. A permanent name is deferred until caller evidence establishes the owning menu.","The reference uses a 172-byte frame. The honest 48-halfword scratch region plus independently allocated C locals currently yields 184 bytes; a temporary 42-entry array matched the frame but was rejected because it reduced evidence-backed scratch capacity merely to influence allocation.","No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were used."]},"main:080ad40c":{"schema_version":1,"namespace":"main","address":"0x080ad40c","status":"measured-draft","owner_bytes":252,"candidate_bytes":228,"differing_halfwords":115,"wrong_instructions":84,"classification":"four-object-motion-vertical-speed-update","family":{"id":"template-main-080ad35c","template_owner":"main:080ad35c","template_source":"games/gs1/src/object/motion/four_object/update_all_positions.c","note":"Same FourObjectMotion domain (4-slot object array, state at Data_03001f2c, object flags-byte &=-13, motion/request buffers passed to Func_08009008), but genuinely different per-object work: the template hardcodes motion={FIXED_ONE,FIXED_ONE} and a fixed limit=0x4000; this owner walks the object pointers via ldmia-postincrement, uses a different vertical-origin constant (241<<17, not the template's 0x01e20000), computes motion[1] from a stored per-object vertical *speed* (state+580+4*index) via an easing call (Func_080022ec) when non-negative, writes the adjusted speed back to state, and picks limit 0x8000 vs 0x4000 based on the sign of the object's y position. motion[0] is never written anywhere in the real assembly (left as whatever the stack held), which the candidate also leaves unset."},"notes":["Read the raw assembly directly, field by field: Func_08015418(0x06002500) runs first (unrelated to the per-object loop); object_ptr walks state+548 as an array of pointers (ldmia r,{r6}; advance by 4 each entry); per active object: y_val=*(s16*)(state+vertical_offset) [vertical_offset: 324,326,328,330 across the 4 iterations], vertical=(241<<17)-((s32)y_val<<16); object[9] &= -13 (same mask as the template's flags clear); speed=*(s32*)(state+speed_offset) [speed_offset: 580,584,588,592]; if(speed<0) adjusted=-speed; else adjusted=speed+Func_080022ec(0x10000-speed,3); motion[1]=adjusted and state[speed_offset]=adjusted (writes back, unlike the template); pos_x=*(s16*)(state+position_offset) [position_offset: 564,566,568,570], request[0]=(s32)pos_x<<16, request[1]=vertical; pos_y=*(s16*)(state+position_offset+8), request[2]=((s32)pos_y<<16)+vertical, request[3]=0; limit=(pos_y<0)?0x8000:0x4000; Func_08009008(object,request,motion,limit). Loop counter index runs 0..3 (do-while, ble #3).","Confirmed motion[0] is genuinely never written in the reference disassembly (no store to that stack slot anywhere in the function) -- kept the candidate's motion[0] uninitialized to match rather than guessing a value.","Reordering `index = 0` to be the first statement after the Func_08015418 call (matching the reference's immediate post-`sub sp,#36` store to sp+8) produced no measurable change; the candidate's compiler still allocated `index` to a register instead of the stack, which is why the candidate only needs `sub sp,#32` against the reference's `sub sp,#36` -- a 4-byte/one-slot difference that cascades into the whole prologue's pool-constant offsets and register roles being shifted by one throughout.","The back half of the function (the arithmetic sequence for vertical/speed/request construction) reads as structurally sound against the assembly -- the remaining gap looks like a stack-layout/register-pressure difference from `index` not being forced onto the stack, rather than a wrong algorithm. Worth trying an explicit `volatile s32 index` or moving it into the same struct as the other stack-resident loop state to force the spill.","Adoption requires 0 differing_halfwords."]},"main:080ae99c":{"schema_version":1,"namespace":"main","address":"0x080ae99c","status":"proven-retained","classification":"ui_marker_object_compiler_entry_allocation_module","owner_bytes":84,"candidate_bytes":84,"differing_halfwords":10,"wrong_instructions":16,"register_gate_step4_probe":{"date":"2026-08-28","result":"exhausted-not-a-closure","baseline":{"candidate_bytes":84,"reference_bytes":84,"differing_halfwords":10},"decoder_signal":"data-load-hard-affinity-bound-to-incoming-tile-register","decoder_evidence":["Candidate data pseudo 38 and its address temporary prefer and receive incoming r2, evicting tile to r4; x then takes r5 and variant remains r3.","The reference needs the data chain in incoming r3, evicting variant to r5 while tile remains r2 and x takes r4.","The call tail is exact; every mismatch belongs to this entry allocation family."],"requested_edit":"move the Data_03001f2c load chain's hard affinity from incoming tile r2 to incoming variant r3","bounded_results":[{"shape":"inline-resource-selection-helper","candidate_bytes":84,"differing_halfwords":10,"effect":"baseline-equivalent"},{"shape":"inline-data-load-helper","candidate_bytes":84,"differing_halfwords":10,"effect":"boundary disappeared before RTL"},{"shape":"inline-object-create-helper","candidate_bytes":84,"differing_halfwords":16,"effect":"changed call coloring but left the data chain in r2"},{"shape":"typed-state-conditional-resource","candidate_bytes":84,"differing_halfwords":15,"effect":"exact-corpus transplant changed branch polarity but not data affinity"},{"shape":"typed-state-conditional-call-operand","candidate_bytes":84,"differing_halfwords":15,"effect":"same regression as the named conditional resource"}],"supporting_exact_owner":"main:080ad5b4","decision":"Neither the proven inline boundary nor the one exact-C entry-coloring analogue moved the data chain to r3. The source and retained assembly remain unchanged; this probe does not count toward the five required closures."},"notes":["2026-08-31 exact-closure rerun: allocator-order again reports the same reciprocal entry coloring (x pseudo 32 candidate r5/reference r4; tile pseudo 34 candidate r4/reference r2; data pseudos 38/39 candidate r2/reference r3), with equal branch structure, identical pools, and an exact post-call tail. The exact sibling 080ae9f0 uses the same readable shared-data/resource-selection source shape and differs only by its branch-local tile offsets, so it supplies no missing source construct for this owner.","2026-08-31 shipped-pass probe: -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, -fno-gcse, -fno-expensive-optimizations, -fno-strength-reduce, -fno-thread-jumps, and -frerun-cse-after-loop all preserve the 84-byte/10-halfword residual; -fno-schedule-insns2 regresses to 11. ABI fixed/call-used register flags were not used because they force allocation and are disallowed. Together with the previously recorded 48,522 finite candidates and named ABI-order/source-shape probes, this leaves no evidence-backed ordinary-C repair. Verdict remains measured allocation-uncovered, zero DONE bytes.","2026-08-31 ABI-order probe: GCC creates the four incoming argument pseudos in ABI order (r0 through r3). Preserving `variant` and then reassigning the fourth parameter as either an integer-cast or pointer-typed Data_03001f2c carrier is optimized back to identical RTL/output (10 differing halfwords); a K&R definition with reordered parameter declarations also retains ABI-order pseudo creation. Semantic-neutral parameter reuse therefore cannot move the data chain's hard affinity from incoming tile r2 to variant r3.","This owner and 080ae9f0 share the same resource-selection, object-creation, failure, and initialization tail.","The complete ordinary-C candidate emits the exact reference length. Sharing 080ae9f0's data-base/resource-selection shape improves this owner from 35 differing halfwords / 22 wrong instructions to 10 / 16 while keeping its post-call tail exact.","The earlier 30,000-candidate search plus a joint sibling matrix over raw pointer versus selected pointer, direct versus split variant lifetime, branch statement order, addend order, carrier widths, declaration order, approved GCC pass flags, -O1/-O3/-Os, and old-agbcc produced no exact candidate. The fixed-route shared-data shape is the unique readable improvement.","A last-mile heat-guided classic walk evaluated 13,522 additional generated candidates from the improved source (8,670 in the first capped process and 4,852 in a journal-seeded continuation). None improved the four normalized structural rows / sixteen raw rows / ten differing halfwords baseline and no exact candidate appeared.","Further joint source axes after that walk included signed and unsigned variant carriers, explicit offset selection before the resource load, duplicated versus joined branch loads, and pre/post resource tile adjustment ordering. Signedness is byte-neutral; the explicit offset join regresses to 80 bytes / 41 differing halfwords / 26 wrong instructions; the readable shared-data baseline remains best.","The remaining exact-extent residual is candidate-show class allocation: the candidate preserves tile in r4, x in r5, and the data base in r2; the reference preserves variant in r5, x in r4, tile in r2, and the data base in r3. Although semantically equivalent and tail-exact, ten differing halfwords across a sixteen-instruction entry allocation family are broader than the repository's narrow proven subset gate.","2026-08-31 retained-assembly proof: the current cross-edition object route now independently resolves this owner in all six editions and proves all 74 relocation-normalized core bytes identical. Together with the exact 84-byte extent, equal topology, exact pool and post-call tail, the no-unique-source decoder verdict, more than 48,000 bounded candidates, and the recorded ABI-order, helper-boundary, type, declaration, lifetime, compiler-family, optimization, and shipped-pass probes, the remaining entry coloring is proved compiler-retained under ui_marker_object_compiler_entry_allocation_module.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used. The structured assembly is counted as proven ASM; the candidate does not claim exact C.","A further 5,000-candidate safe heat-guided walk biased by the exact 080bbb0c source produced no improvement or exact output. Together with the prior 43,522 generated candidates, that closes the missing-temporary search axis until a new allocation model is established.","2026-08-27: four additional targeted structural variants were compiled and scored directly against candidate-show: (1) reading Data_03001f2c inline in both branches instead of through one hoisted `data` local regresses sharply to 37 differing halfwords / 22 wrong instructions (drops the y-holding callee-saved register entirely); (2) reordering the three local declarations (object/resource/data) ties at 10/16 with no emitted change; (3) an explicit early `s32 v = variant;` copy taken before the `data` load ties at 10/16; (4) an explicit early `s32 t = tile;` copy used only at the call site ties at 10/16. None flips which of {tile, variant} keeps its entry hardreg versus which register the data-pointer temp claims. This corroborates the existing note that the residual is a persistent allocation coloring choice, not a reachable source-shape difference under the approved compiler route."]},"main:080ae9f0":{"schema_version":1,"namespace":"main","address":"0x080ae9f0","status":"proven-retained","classification":"battle-marker-object-creation","owner_bytes":92,"candidate_bytes":92,"differing_halfwords":13,"wrong_instructions":22,"cross_edition":{"editions":["ja","en","de","es","fr","it"],"executable_owner_bytes":90,"relocation_normalized_core_bytes":82,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"kind":"classic_ordinary_c","candidates":40000,"exact_candidates":0,"status":"exhausted"},"notes":["2026-08-31 exact-closure revalidation: allocator decoder again returned `undecoded: conflicting-targets` with branch topology and both literal-pool words exact. A finite shipped-flag probe found no improvement: -fcall-used-r2, -fcall-used-r3, -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, -fno-cse-skip-blocks, and -fno-expensive-optimizations all tie at 13 differing halfwords; -fno-schedule-insns2 regresses to 14, -ffixed-r3 to 20, and -ffixed-r2 to 44 with an 88-byte candidate. Combined with the recorded 40,000-shape search and prior sibling/ABI-order probes, the bounded ordinary-C search remains honestly exhausted; no source or compiler-route change was retained and zero DONE bytes are claimed.","2026-08-31 ABI-order probe: preserving `variant` and reusing the fourth parameter as the Data_03001f2c carrier, in both integer-cast and pointer-typed forms, is optimized to the same pre-allocation RTL and remains at 13 differing halfwords. Reordering a K&R definition's parameter declarations likewise leaves argument pseudos in ABI order. Neither semantic-neutral form changes the r2 data-chain affinity, so this axis is closed for both marker-object siblings.","This owner and 080ae99c share the same resource-selection, object-creation, failure, and initialization tail; this sibling additionally adjusts the tile argument by variant.","The post-call failure and initialization tail is instruction-exact. The residual is an entry allocation family: the reference retains variant in r5, x in r4, y in r6, and tile in r2.","A bounded 40,000-candidate classic search improved one diagnostic byte but produced no exact candidate. Retained assembly remains authoritative and this draft claims zero bytes.","Compiler-family and optimization diagnostic sweeps did not improve the residual.","A joint sibling matrix with 080ae99c confirmed the same entry coloring under the fixed route. Sharing the data-base/resource-selection form materially improves 080ae99c but leaves this owner at 92/92 bytes, 13 differing halfwords, and 22 wrong instructions; statement-order variants regress to 14 differing halfwords, while all approved pass toggles tie or regress.","2026-08-31 retained-assembly proof: cross-edition verification proves all 82 relocation-normalized core bytes identical across six editions. The exact 92-byte extent, equal topology, exact pool and post-call tail, conflicting-target decoder verdict, exhausted 40,000-candidate search, and recorded sibling, ABI-order, helper, struct, declaration, statement, compiler-family, optimization, and shipped-pass probes confine the residual to the shared entry coloring and prove structured retention under ui_marker_object_compiler_entry_allocation_module.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used. The structured assembly is counted as proven ASM; the candidate does not claim exact C.","2026-08-27: re-examined the entry-allocation residual against the sibling's stalled-last-mile evidence. The reference frees r3 (evicting variant to r5) for the data-pointer scratch while leaving tile untouched in r2 until immediately before the call; the candidate instead frees r2 (evicting tile to r4) and keeps variant in r3 until the compare. Four additional source-shape probes that preserve the already-matched control flow -- an explicit `s32 v = variant;` copy taken first in the body, reordering the `data`/`object`/`resource` declaration list, replacing the `u8 *` pointer-arithmetic reads with an equivalent struct-member-access form (`struct IconResTable { ...; u16 res392; u16 res394; };`), and splitting the `data` initializer into a separate declaration plus assignment statement -- all produced byte-identical candidate assembly to the current draft (still 13 differing halfwords / 22 wrong instructions, same register coloring). This confirms the entry-allocation choice is insensitive to these surface rewrites and not merely an artifact of the current spelling; it did not change the outcome, and no candidate in this session cleared the residual. Restored the file to the previously committed draft unchanged."]},"main:080b0278":{"schema_version":1,"namespace":"main","address":"0x080b0278","status":"measured-draft","owner_bytes":460,"candidate_bytes":396,"differing_halfwords":228,"wrong_instructions":173,"classification":"inn-checkin-state-machine","family":{"id":"template-main-080b3284","template_owner":"main:080b3284","template_source":"games/gs1/src/inn/check_in.c","note":"Same Inn domain and several shared call idioms (Func_080b010c, Func_080b04dc(message), Func_080150f8 resource-window lookup, Func_080b0a20 border setup), but this owner is a much larger state-machine loop (dispatching on a mode2 value returned by Func_08015380 across 5 branches, looping via Func_080b0a20+Func_080b04dc(0xca4) until an unmatched mode2 exits) rather than the template's single linear stay-completion flow."},"notes":["This is the largest and structurally most complex owner in this batch (460 bytes, a real state machine with 5+ branches). I traced the full control flow from the raw assembly: mode clamping (`if (mode>=Func_080b26c8(mode) || mode<0) mode=0;`), Func_080b26cc/Func_080b010c setup, a byte store to state+0x3a9 from Func_080b2764(mode), a mode==16||17||18 flag write to state+940, an object/resource lookup and Func_080150f8 resource-window call with a Func_08015010 fallback when the window is 0, a Func_080150c8 call building a second UI object with fields [4]/[5] set, a Func_080b0a20 border setup, then a Func_08015380-driven loop dispatching mode2 0/1/2/3/default with different Func_080b04dc message calls and sub-function calls per branch, re-arming the border and looping except on the unmatched-default branch which calls Func_08015018/Func_080b0204 and returns 0.","Confidence is LOWER on this owner than the others in this batch: the exact byte offsets used via literal-pool loads (e.g. 0x3a9, 0x3aa used as a byte field, the message ids 0xc9b/0xca7/0xca9/0xcb7/0xcb8/0xcb9/0xca4/0xca5) were assigned from the two raw `.4byte` pool dumps in first-appearance textual order, which is a reasonable but unverified heuristic for a function this size with many pool entries feeding closely-spaced load sites -- I did not simulate the assembler's literal-pool placement to confirm each `ldr [pc,#N]` resolves to the specific word I assigned.","The resulting score (173 of roughly 210 total instructions wrong) reflects both this constant-mapping uncertainty and the substantial register-allocation differences expected in a function this size and branchy. Given the size, this should be treated as a documented best-effort control-flow trace rather than a near-miss candidate -- the highest-value next step is independently re-verifying the pool-word-to-load-site mapping (e.g. by bisecting smaller sub-expressions) before investing in register-level tuning.","Adoption requires 0 differing_halfwords."]},"main:080b08b8":{"schema_version":1,"namespace":"main","address":"0x080b08b8","status":"measured-draft","owner_bytes":160,"candidate_bytes":158,"differing_halfwords":58,"wrong_instructions":86,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Advances a struct ShopCursor's animation by one frame. Guards on cursor!=NULL and cursor->kind!=0 (kind doubles as the animation's total frame count). Increments cursor->active (the elapsed-frame counter), then for each axis linearly interpolates: new = axisStart + FixedPoint_Ratio(active * (axisTarget - axisStart), kind), writing the X result to anchor->x (offset 6) and merging its low 9 bits into anchor+22 (preserving the existing high 7 bits), and writing the Y result to anchor->y (offset 8) and anchor+20 as a truncated byte. anchor is cursor->anchor (offset 0). When active reaches kind, both cursor->kind and cursor->active are reset to 0, ending the animation.","evidence":["struct ShopCursor (games/gs1/include/shop.h) already declares anchor@0, x@4(u16), y@6(u16), target_x@8(s16), target_y@10(s16), active@12(s8), kind@13(s8), size 0x10 -- an exact, unforced match for this owner's six field offsets and overall frame size, independently established by the already-adopted games/gs1/src/shop/set_cursor_position.c (Shop_SetCursorPosition), which constructs the same struct from a 'kind' parameter and zeroes 'active' at animation start.","The immediately following owner, main:080b0958 (named ShopCursor_MoveTowardTarget in games/gs1/source-paths.json, not yet source-adopted), starts exactly at this owner's end address (0x080b08b8 + 0xa0 = 0x080b0958) and operates on the same anchor object: it reads/writes anchor->x (offset 6) and anchor->y (offset 8), and merges anchor+22 with an identical 'AND 0x1ff / AND 0xfffffe00 / OR' idiom against literal-pool constants 0x0000ffff/0x000001ff/0xfffffe00, plus truncates anchor->y into anchor+20 as a byte -- byte-for-byte the same bitfield-preserve pattern this owner uses on the same four anchor offsets. MoveTowardTarget is a proportional ease-toward-target mover (step = (target-current)/4, clamped, no frame counter); this owner is architecturally different -- a keyframed linear tween driven by an explicit active/kind frame counter -- so it is named as a sibling ShopCursor_* verb rather than reusing MoveTowardTarget's name.","Func_080022ec (called twice, both times as the second positional argument after the interpolation product) is already declared and named FixedPoint_Ratio/Math_Div throughout games/gs1/include/types.h and battle_calc.h, and games/gs1/src/display/blend/update_transition.c shows the identical 'level = start + FixedPoint_Ratio(delta * step, total)' idiom this owner reproduces per-axis.","The family-matcher's only candidate for this owner, games/gs1/src/psynergy_menu/build_page_result.c (score 7335/10000, below the 7500 adoption threshold), shares only the register-shuffle prologue shape and a call to FixedPoint_Ratio; its actual semantics (paging/row arithmetic over a menu entry count) share no field offsets, no anchor writes, and no bitfield idiom with this owner -- confirmed a shape-only false-positive template per this session's prior findings, not used."],"credible_shapes_tried":["Direct field access through `struct ShopCursor *cursor` with cursor->x/target_x/y/target_y read via an explicit (s16) cast at the delta site and the field's plain (u16) type at the later sum site (matching the reference's signed ldrsh for the subtraction and unsigned ldrh for the later re-read of the same offset, confirmed independently by the m2c workbench pass decompiling this owner's assembly against the real agscc struct ShopCursor context once this shape was in place) -- kept.","`cursor->active += 1` as one compound-assignment statement: reads the s8 field with a signed ldrsb (per its declared type), which does not match the reference's unsigned ldrb for the raw increment read. Splitting into `active = cursor->active; active += 1;` with active declared `u8`, then casting to `(s8)` only at the two later signed-arithmetic use sites, matches the reference's ldrb-then-shift-based sign-extension shape -- kept.","Reordering the x/target_x (and y/target_y) reads into separate statements (`xStart = cursor->x; dx = cursor->target_x - xStart;`) instead of one inline subtraction expression: the inline form let GCC schedule the target_x read before the x read (opposite of the reference's x-then-target_x order); splitting into statements fixed the load order to match -- kept.","`-fno-schedule-insns2` (already an approved, per-owner-registered flag for other Thumb owners; not yet registered for this address): measurably closes the gap from the base-flags 71/95 (differing_halfwords/wrong_instructions) baseline to 58/86 and corrects several load orderings and the final padding/pool-constant tail to match the reference outright -- used for the reported measurement below, but NOT added to routing_data.rs's SCHED2_OFF_THUMB_SOURCES table since the remaining residual is still large and a materially different source shape might not need it.","-fno-regmove, -fno-gcse, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-expensive-optimizations, -fno-strict-aliasing, -fno-optimize-sibling-calls, -fno-schedule-insns (all combined individually with -fno-schedule-insns2): none improved on 58/86; several regressed it.","Widening the per-axis result locals from `u16` to `s32` to drop a redundant lsls/lsrs #16 truncation the u16 typing forces before the anchor+22 bitfield mask: unexpectedly regressed the overall diff (73 vs 58) by disturbing the register allocation elsewhere -- reverted, u16 kept.","Spelling the anchor+22 preserve-mask as `~0x1ff` instead of the literal `0xfe00`, hoping to force a literal-pool load matching the reference's pooled 0xfffffe00 instead of a cheap movs+lsls materialization: GCC 2.96 constant-folds `~0x1ff` to the same 0xfe00-pattern-recognized-as-shiftable value and still emits movs+lsls -- no effect, reverted."],"remaining":"58 of 160 reference halfwords differ (candidate 158 bytes vs reference 160). The entire residual traces to one root cause: the reference's allocator commits three extra callee-saved high registers (r8=anchor, r9=a zero literal used only for the end-of-function reset, sl=kind) plus r6=active, leaving r4/r5 unused; this candidate's allocator instead fits anchor into a normal low register (r6, reused across both FixedPoint_Ratio calls without difficulty since Thumb bl by this route's convention preserves r4-r7) and only spills kind to r8, needing no r9 or sl at all. Every other diff line (load orderings inside each axis's block, the two extra lsls/lsrs #16 truncations on the u16 result locals, the final tail sequence, the prologue/epilogue push/pop register lists) is a mechanical consequence of that one allocation-count difference, not an independent defect: the control flow, both call targets and their arguments, the interpolation algorithm, the field offsets, the bitfield preserve-mask idiom, and the final active==kind reset are already correct and instruction-for-instruction aligned wherever the register pressure happens to agree. No source reordering or approved-flag combination tried this session induced the allocator to spill the extra two high registers; per the hard constraint against hand-forcing register assignment, no asm()/register-hint/PERM_GENERAL workaround was attempted. This is recorded as an honest residual, not a proof of unreachability -- a future pass with a different statement shape or a legitimately-discovered additional flag may still close it.","notes":["Cold-start owner: games/gs1/recon/en/main/080b08b8.c did not exist before this pass; games/gs1/asm/080b08b8.s is the retained assembly (already proven byte-exact against the ROM).","Registered the descriptive name ShopCursor_Advance in games/gs1/source-paths.json ({\"name\":...}, no adopted C path) and added it as a `.global ShopCursor_Advance` alias immediately above `.global Func_080b08b8` in games/gs1/asm/080b08b8.s, plus `#define ShopCursor_Advance Func_080b08b8` in games/gs1/include/types.h so the candidate-show/workbench tooling resolves this draft's canonical object symbol -- same pattern already used for main:080fb2a4 (MusicPlayer_SetPitchAndUpdateFrequency).","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used. No other Golden Sun decompilation project, symbol map, or disassembly was consulted -- only this repository's retained assembly, approved ROM, already-adopted exact C, in-repo headers, and the approved compiler.","This candidate claims zero DONE bytes; differing_halfwords is 58, not 0, so it is not adoption-eligible."]},"main:080b0958":{"schema_version":1,"namespace":"main","address":"0x080b0958","status":"proven-retained","owner_bytes":164,"executable_owner_bytes":164,"candidate_bytes":164,"differing_halfwords":4,"wrong_instructions":8,"classification":"shop_cursor_compiler_allocation_module","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":152,"core_identical":true,"starts":{"ja":"0x080a7958","en":"0x080b0958","de":"0x080b2f58","es":"0x080b4958","fr":"0x080b4958","it":"0x080b0958"}},"bounded_search":{"mode":"classic-walk-heat","candidates":20000,"compile_failures":1053,"exact":false,"baseline_differing_halfwords":4,"best_differing_halfwords":2,"best_structural_rows":0},"notes":["Moves the cursor sprite one quarter of its remaining signed X and Y distance, with a one-pixel minimum step, and refreshes the packed screen coordinates.","The complete candidate matches every instruction outside one immediately resynchronizing attribute-bit merge. Its four-halfword residual consists only of equivalent low-register allocation and load ordering.","The bounded winner emitted the exact normalized instruction sequence only by narrowing the retained 0xfffffe00 mask literal to 0x0000fe00. This is behaviorally equivalent for the halfword field but remains two linked halfwords from the reference and is not exact C.","The routed and gcc296 families preserve the four-halfword residual. The old-agbcc family and approved optimization-axis changes regress the complete shape."]},"main:080b0a20":{"schema_version":1,"namespace":"main","address":"0x080b0a20","status":"proven-retained","classification":"compiler_minipool_store_scheduling_module","owner_bytes":74,"executable_owner_bytes":74,"candidate_bytes":74,"differing_halfwords":26,"wrong_instructions":22,"cross_edition":{"owner_bytes":74,"literal_bytes":16,"core_bytes":58,"core_identical":true,"editions":{"ja":"0x080a7a20","en":"0x080b0a20","de":"0x080b3020","es":"0x080b4a20","fr":"0x080b4a20","it":"0x080b0a20"}},"behavior":["sets both current and target cursor coordinates","writes the same coordinates to the cursor sprite","refreshes the sprite's packed X and Y screen coordinates","marks the cursor as immediate and inactive"],"remaining":"The complete behavior and six-edition owner identity are established and the readable candidate has the exact 74-byte extent. The retained residual is the compiler's coupled minipool dump point, independent final field-store scheduling, and their register-role cascade; structured assembly remains authoritative under compiler_minipool_store_scheduling_module.","notes":["The name is bounded by the established ShopCursor type, sibling Shop_SetCursorPosition, and local shop callers.","Readable type and lifetime corrections improved the baseline from 68 bytes / 27 wrong instructions to exact extent / 22 wrong instructions.","The bounded 20,000-candidate search exhausted its approved budget without exact C; its generated best was rejected as production source because the residual remained broad and its source shape was not meaningful.","Recovered only from retained assembly, approved local GS1 ROMs, local types and callers, and the approved compiler.","2026-08-27: re-measured at exact extent (74/74), 26 differing halfwords, 22 wrong instructions -- confirmed unchanged from the recorded baseline. Traced the residual instruction-by-instruction against games/gs1/asm/080b0a20.s (via the tool's candidate.insns/reference.insns dumps, which give a clean 1:1 instruction alignment): the reference keeps r6 = coordinate_mask (0xffff) live in one register across both AND uses (offset x20 and x2c) and reuses r3/r4 serially for unrelated short-lived values (the 0x1ff mask, the 0xfffffe00 mask, the active literal, the attributes halfword); the compiler's own candidate output instead spills coordinate_mask into a fresh register via an extra 'adds r3, r6, #0' copy and reorders several literal-pool loads ahead of source order. Tried and reverted, each producing zero change from baseline (74/26/22): (1) catalog pattern 3's exact 'extern u8 Value_00000000; &Value_00000000' scalar form in place of the current 'extern u8 Data_00000000[]; Data_00000000' array-decay form; (2) the same swap with a u32-typed extern instead of u8; (3) dropping the redundant second 'sprite = (struct ShopCursorSprite *)cursor->anchor;' reassignment before the y-block, to test whether the compiler's own CSE/rematerialization (not source repetition) explains the reference's second load of cursor->anchor -- confirmed it does, since removing the explicit second assignment left the emitted instruction stream byte-identical; (4) reordering the screen_x/active local-variable declarations, to probe GCC 2.96 local-alloc.c's qty_compare tie-break sensitivity to declaration order -- no change. One structural rewrite (folding the screen_x temporary into the x parameter directly, hoping to land the AND result in r1 alongside the reference) actively regressed the candidate to 78/78 bytes and 30 differing halfwords, and was reverted. The residual matches this session's documented register-allocation dead end (a same-class GCC 2.96 local-alloc tie-break not controllable via source-level reordering, per 080a8c2c/080ae99c/080ae9f0/080b60a0/080b9dc4), just with a larger footprint (several serially-reused scratch registers instead of one swapped pair) because this function has more short-lived, non-overlapping temporaries than those five owners. Left the candidate unchanged at the pre-session baseline rather than force register assignment or open-ended permutation search.","2026-08-27 (second pass): independently re-traced games/gs1/asm/080b0a20.s from scratch against roms/gs1-en.gba's literal pool (0x080b0a54-0x080b0a63: 0xffff, 0x00000000, 0x1ff, 0xfffffe00) and cross-checked the ShopCursorSprite offsets against the two adjacent, already-recorded siblings -- games/gs1/src/shop/set_cursor_position.c (Shop_SetCursorPosition, main:080b09fc, adopted exact) and games/gs1/recon/en/main/080b0958.c (ShopCursor_MoveTowardTarget, proven-retained, same anchor+6/anchor+8/anchor+20/anchor+22 field pattern). Confirms the family-matcher's alternative (games/gs1/src/shop/set_cursor_position.c, 7414/10000) is real kinship at the subsystem level -- same ShopCursor type, same anchor-sprite struct, called from the same shop/place_cursor.c call site family -- but is not this owner: 080b09fc reads anchor->x/anchor->y to seed cursor->x/y from a live sprite position and takes a caller-supplied kind, while 080b0a20 instead writes the caller's target_x/target_y straight into cursor->x/y (collapsing current and target to the same value, i.e. skipping interpolation) and hardcodes kind=1 and active=0. Re-ran candidate-show and independently rediscovered the exact same 78-byte/30-halfword regression from folding screen_x into the x parameter in place (documented above) before finding the prior note and confirming it was already tried -- recording the re-derivation here so a third pass does not repeat it. No source or measurement change this pass; baseline (74/26/22) stands.","2026-08-31 exact-closure gate: a fresh aligned candidate-show still measures 74/74 bytes and 26 differing halfwords. Candidate and reference have identical branch topology, while the allocator decoder returns 'undecoded: conflicting-targets'. The concrete divergence is the minipool boundary: the candidate inserts its four-word pool at +0x2c and emits the final Y-coordinate stores after it, whereas the reference emits those stores before a pool beginning at +0x34. The adjacent exact Shop_SetCursorPosition source and the retained owner assembly confirm that no semantic statement or owner extent is missing. A finite shipped-flag probe found no exact or strictly useful route: -fno-schedule-insns, -fno-cse-follow-jumps, -fno-gcse, -fno-thread-jumps, -fno-strength-reduce, and -frerun-cse-after-loop remain 74/26; -fno-schedule-insns2 becomes 72/34; -fno-regmove becomes 72/25; and -fno-expensive-optimizations becomes 54/37. Together with the recorded source repairs, six-edition 58-byte normalized-core identity, and 20,000-candidate bounded search, this proves the same coupled minipool/store-scheduling limitation already registered for 0800bbc0. Structured assembly is counted as proven ASM under compiler_minipool_store_scheduling_module; the candidate does not claim exact C."]},"main:080b1868":{"schema_version":1,"namespace":"main","address":"0x080b1868","status":"exact","owner_bytes":260,"candidate_bytes":260,"differing_halfwords":0,"wrong_instructions":0,"classification":"shop-equip-replace-confirm","family":{"template_listed":"main:08091c7c (field_owner_59.c, score 7945)","template_used":"not the listed family template -- recovered instead from the direct caller Shop_CompletePurchase (games/gs1/src/shop/complete_purchase.c) and the sibling item-slot decoder 080a9aec.c"},"domain":"Called as Func_080b1868(unit_id, slot) from Shop_CompletePurchase after an item purchase is placed in a party unit's item slot. Reads the unit's item-slot u16 (id in the low 9 bits, a lock flag at 0x200); if locked, returns 0. Looks up the item's info, confirms the unit can equip it, finds any item it would replace and blocks the swap if that old item is unsellable, shows a Yes/No equip-confirmation message, and on confirmation equips the item, plays an equip fanfare and waits for it to finish if the item is flagged for one, then shows a closing message and returns 1 (so the caller sells the replaced item).","notes":["The listed family template (08091c7c, a UI-wait/window-management owner) shares only coarse shape (object lookup, WaitFrames loop, message dispatch) and was not a useful line-by-line template. The direct caller Shop_CompletePurchase (`if (Func_080b1868(unit_id, added_slot) != 0) Shop_SellReplacedItem(...)`) fixed the real signature, and 080a9aec.c (`value & 0x200` lock bit / `value & 0x1ff` item id / `Func_08077018(id)[2]` kind byte) fixed the item-slot encoding and the AbilityInfo-style lookup shape, both already-established local idioms.","One deliberate asymmetry preserved from the assembly: the first Func_08077018 lookup (on the newly placed item) is called with the id explicitly masked to `& 0x1ff`, but the second lookup (on the replaced item, only reached when replaced != -1) is called with the raw unmasked u16 slot value -- the two call sites are not symmetric in the reference and the candidate reproduces that exactly.","The former allocation/scheduling diagnosis was false. The reference reloads the encoded inventory slot after Func_08077018, uses a separate old-item offset carrier, continues only when Func_080b0634 returns zero, checks UI completion before the first wait, and consumes Func_08015038 as an s32-returning interface. Restoring those source semantics eliminates the entire register residual under canonical flags; no compiler override or forced register is involved.","Exact under canonical flags: 260 candidate bytes, 260 reference bytes, 0 differing halfwords, and 0 wrong instructions. Adopted as Shop_ConfirmEquipItem.","Recovered only from retained GS1 assembly, the exact-C caller (shop/complete_purchase.c) and sibling item-slot decoder (080a9aec.c), the approved compiler, and already-established local type/function signatures (Func_08077008, Func_08077018, Func_08077218, Func_08077228, Func_08077050, Func_08015120, Func_080b04dc, Func_080b0634, Func_080b0574). No GS2 evidence or external source was used."]},"main:080b1bd0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b1bd0","status":"proven-retained","classification":"compiler_literal_pool_placement_module","owner_bytes":540,"score":{"measured":"2026-08-27","candidate_bytes":540,"reference_bytes":540,"differing_halfwords":168,"wrong_instructions":42,"class":"wrong","note":"Improved from 231/110 to 168/42 (byte size still matches exactly, 540/540) by fixing two concrete, evidence-backed bugs found by decompiling the actual reference machine code with m2c (see tools/compiler families transplant's m2c/target.lst, which prints the reference disassembly with real addresses/labels): (1) Shop_DrawItemPrice's first argument was wrongly `price_window` (the per-redraw window created inside redraw_page, offset sp+0x10) when the reference clearly passes `list_window` (the window created once before redraw_page, offset sp+0xC) -- Func_080b110c(spC, ...) in the m2c output. This single fix alone dropped the diff from 231 to 172 because it had been inflating price_window's apparent use-density enough to win the function's single remaining callee-saved register (fp) over `shop`, cascading into wrong register/stack assignments through the whole function body. (2) Declaring `unit` before `list_window` (their true relative order, matching m2c) rather than after fixed a residual sp+8/sp+12 slot swap between them (172 -> 168), and writing selection's -1/+1 cursor-move updates as a separate `selection -= 1;`/`selection += 1;` statement before the Modulo() call (matching the reference's standalone `subs r7,#1` before the add, instead of folding the -1 into one expression) fixed a small instruction-order mismatch (wrong_instructions 46 -> 42, though total differing_halfwords stayed 168 because of an unrelated compensating shift -- see below). After these fixes every remaining diff line (verified by grepping the --align output) traces to exactly one thing: the reference splits its literal-constant pool into two clusters -- an early one right after shop->mode=3 holding {Data_03001f2c_a (SHOP_RUNTIME address), 0x1ff (item-id mask)} with a `b.n`-over-data skip, and a late one near the function's end holding the remaining 4 words -- while our compiled candidate (verified via `xgcc -S` on this exact source with the exact approved flags) emits ONE combined 6-word table (.L30) at the end, matching neither ARM range pressure (540 bytes is comfortably inside Thumb's 1020-byte pc-relative reach either way) nor anything we could tie to a specific C-level idiom. Every '!' and '+/-' line in the final --align diff is a pc-relative offset or branch-target shift downstream of this one 8-byte pool-placement difference (confirmed: the only true content difference left is the trailing block of instructions, which is exactly the reference's missing/candidate's extra 2 pool words disassembled as garbage `movs r0,r0`/`lsls`/`subs` opcodes)."},"rejected_experiments":["for(;;){ if(redraw){...} } inner loop with window/x/y as plain expressions (no temps): 536 candidate bytes vs 540 reference, worse than the temp-var version.","do { ... } while (1) restatement of the inner loop: byte-identical output to the for(;;) version, no change (536/544-byte families depending on companion edits) -- confirms the layout choice is not driven by loop-statement syntax.","Plain for(;;) nested loop with `break`/`continue` (no goto): compiled to 544 candidate bytes vs 540 reference; the goto-based rewrite matching the disassembly's exact label graph fixed the size mismatch to 540/540 but did not close the remaining register-role differences.","2026-08-27 session, after the two real fixes above (score frozen at 168/42), tried to close the remaining literal-pool-split gap: combined-decl-and-init for `shop` (`struct ShopRuntime *shop = SHOP_RUNTIME;`), reordering local declarations several ways (price_window first, shop first, unit/list_window swapped -- this last one was the real fix above, everything else was a no-op), inlining the Shop_PlaceCursor y-argument vs a named `y` temp (byte-for-byte identical output either way), reassociating `selection - 1 + item_count` into `item_count + selection - 1` etc. via the permuter's PERM_GENERAL over 4 alternatives per branch (all 16 combinations scored identically, 168 -- GCC's tree canonicalizes commutative + regardless of source spelling), and swapping the 0x1ff mask's operand order in `item_id = 0x1ff & unit->inventory[selection]`. None changed the score by even one bit. Confirmed via `xgcc -S` (approved flags, no invented options) that GCC's own RTL/assembly-emission stage already produces a single combined literal table `.L30` for our source -- the reference's two-cluster layout is a machine_dependent_reorg (arm.c minipool) decision that appears in the final assembled bytes but is not visibly driven by anything in the .s output, and no combination of purely-cosmetic source rewrites tried moved it. This residual likely needs either a genuinely different (not yet identified) control-flow/statement shape somewhere in the function, or is simply not reachable through ordinary C source variation and should be treated as the honest last-mile floor for this owner absent a new idea."],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template/sibling sources, in-repository headers, and the approved compiler.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM because ordinary C cannot request the reference's two-cluster literal-pool layout.","Twin of 0x080b211c (shop/select_party_member.c family): diffing games/gs1/asm/080b1bd0.s against games/gs1/asm/080b211c.s shows the two are near line-identical raw disassembly, differing only in which price/name callee they invoke (Func_080b19cc Shop_ComputeSalePrice vs Func_080b20e8 Shop_ComputeRepairPrice), literal-pool offsets, and one extra block at the end of 080b1bd0 (a call to Shop_SelectSaleQuantity + Func_080b1f4c that 080b211c's flow replaces with a single call to Func_080b2328) -- confirming 080b1bd0 is the 'sell an item from this party member' flow reached when shop->party_action == 1 in shop/select_party_member.c, and 080b211c is the parallel 'repair' flow.","2026-08-27: this owner's Shop_DrawItemPrice call had a real bug (fixed this session, see score note) where the once-created outer window (here, list_window) rather than the per-redraw window (price_window) was the correct first argument -- found by decompiling games/gs1/asm/080b1bd0.s's own reference bytes with m2c via `tools/compiler families transplant`. Given how closely 080b211c mirrors this file's raw disassembly, its analogous price/repair-drawing call very likely has the same once-created-vs-per-redraw window mix-up; whoever works 080b211c next should check its own m2c/target.lst before trusting its current argument order (not edited here, per the task's file-isolation rule).","Ability_GetAvailability(unit_id) is reused here as an item-availability *count* (its return value minus one clamps the selection index), not just the boolean sense used in draw_party_member_item_grid.c/select_party_member.c -- both usages are consistent with a single s32-returning function.","Value_00000075 and Value_00000caa are placeholder message-id symbols named after their own address value (the repo's existing Value_XXXXXXXX convention, e.g. select_sale_quantity.c's Value_00000cad); their real message text was not resolved."]},"main:080b2328":{"schema_version":1,"namespace":"main","address":"0x080b2328","status":"measured-draft","owner_bytes":444,"score":{"measured":"2026-08-27","candidate_bytes":440,"reference_bytes":444,"differing_halfwords":150,"wrong_instructions":100,"note":"Two-parameter void function (unit_id, slot). Recovered from the retained owner assembly, cross-referenced against the caller 080b211c (whose dossier already names this call `Func_080b2328(unit_id, selection)`), and against the established shop.h/item.h/battle_runtime.h headers (BattleUnit_Get, Item_Get, Shop_ComputeRepairPrice, Shop_DrawPartyMemberItemGrid, Shop_SellReplacedItem, SHOP_RUNTIME, SHOP_PARTY_STATE.money) plus the sibling games/gs1/src/shop/complete_purchase.c, which calls the same undocumented helpers (Func_08077228, Func_08077230, Func_080b1868) with the same argument shapes. Domain: an item-repair confirmation flow -- validates the item at unit->inventory[slot] is a repairable, damaged, class-compatible item the party can afford to fix, shows a yes/no confirmation, then plays a short animation while the item slot is blanked, pays the price, and finally offers to sell a replaced item."},"domain":"Shop item-repair flow: validate -> confirm -> pay -> animate -> redraw -> optional sell-replaced-item tail, called from the repair-shop selection screen (080b211c) with (unit_id, selection).","expressed":["entry validation chain: item use_type == 2 (repairable class), raw item flag bit 0x400 (needs repair) set, and a flags/use_type compatibility check gated behind raw item flag bit 0x200","affordability check against SHOP_PARTY_STATE.money","yes/no confirmation dialog via UiMessage_ShowChoice before committing","temporary zeroing and restore of unit->inventory[slot] while the repair animation (WaitFrames/Audio_PlayCue sequence) plays","payment via Func_08077230(-price) and Shop_DrawMoney(), two Shop_DrawPartyMemberItemGrid redraws (before and after payment)","final Func_080b1868(unit_id, slot)-gated call to Shop_SellReplacedItem(unit_id, replaced_slot) using the slot Func_08077228 returned at entry"],"unexpressed":[{"op":"sl/r8 register-role swap","count":"cascades through most of the function body (~90 of the 100 wrong instructions)","where":"the compiled candidate assigns item_id to r8 and the BattleUnit* to sl; the reference does the opposite (item_id -> sl, unit pointer -> r8). Every later instruction that reads either value inherits the swapped register, and the sp+0/sp+4 stack-spill slots for `idx2` (slot*2) and `replaced_slot` are also swapped between candidate and reference in lockstep with this."}],"retention":"keep_structured_asm_for_now","verified_against_reference":["fresh candidate-show build: 440 candidate bytes vs 444 reference bytes, 150 differing halfwords, 100 wrong instructions","matched_prefix=9 (identical through the shop-pointer fetch and unit_id-into-r7 cache); every later hunk is either the sl/r8 swap or a literal-pool address shift caused by the 4-byte size delta"],"rejected":[{"shape":"read+mask the item value into a named `raw_item` local before calling Item_Get, matching a literal transliteration of the two separate ldrh instructions","result":"worse: 201 differing halfwords, 110 wrong instructions, 440/444 bytes. The extra dead pseudo perturbed allocation further away from the reference."},{"shape":"inline the first masked read directly into the Item_Get call argument, only introducing `raw_item` for the second (post-Func_08077228) reload","result":"the adopted improvement: 150 differing halfwords, 100 wrong instructions (kept)."},{"shape":"reorder the local variable declaration list to put item_id before the BattleUnit* / ItemDefinition* pointers","result":"byte-for-byte identical to the prior attempt -- GCC 2.96's pseudo numbering here follows statement/use order, not C declaration order, so this had zero effect."}],"notes":["Recovered only from the retained owner assembly, the caller 080b211c's existing dossier (which already established the two-argument `Func_080b2328(unit_id, selection)` call shape and the 0xcba..0xcc2 contiguous message-id range shared between the two owners), in-repository headers (shop.h, item.h, battle_runtime.h), the sibling games/gs1/src/shop/complete_purchase.c, and the approved compiler.","The four fail-path message IDs (0xcba, 0xcbb, 0xcbc, 0xcbd) and the four confirm/success message IDs reached via `message+0..3` off a single `&Value_00000cbe` base were resolved directly from the literal pool at the end of games/gs1/asm/080b2328.s, not guessed; `Value_00000cba`..`Value_00000cbe` were declared locally as `extern char` following the existing `Value_00000ca1`-style address-trick convention used in complete_purchase.c.","Func_08077068 has no established name or prior declaration anywhere in the repository; it was declared locally as `s32 Func_08077068(s32, s32)` (unit_id, slot) matching its call-site argument shapes only.","This owner shows the same class of register-allocation nondeterminism (a hi-register role swap between two long-lived, similarly-referenced pseudos) already documented for the structurally adjacent shop-family owner 080b211c (fp/r9 swap) -- cross-owner evidence this is a shared compiler sensitivity for this idiom rather than a defect in this specific source shape. Resolving it further likely needs permuter-style register-allocation search (see CONTRIBUTING.md section 6), not additional manual respelling.","This candidate claims zero DONE bytes. No external source, git history, compiler modification, copied instruction bytes, fixed-register variables, barriers, or inline assembly was used."]},"main:080b24e4":{"schema_version":1,"namespace":"main","address":"0x080b24e4","status":"measured-draft","owner_bytes":484,"candidate_bytes":476,"differing_halfwords":226,"wrong_instructions":148,"classification":"shop-item-purchase-confirm-loop","domain":"Given a list window and item window already created by a caller, checks a fixed item's price against the player's money, then (if affordable) runs a party-member selection loop that confirms or cancels the purchase for the selected unit before deducting the price and exiting.","notes":["Clustered against the byte-exact Shop_SelectPartyMember template by the family scan; the retained assembly's redraw-flag/party-member-list/input-poll loop (the 'if (redraw) {...}' block, the NEW_KEYS&1 confirm / NEW_KEYS&2 cancel checks, and the REPEAT_KEYS 0x20/0x10 selection adjust) is a close structural match to the template, wrapped in an outer price-vs-money affordability gate that has no template counterpart.","Recovered from the retained owner's control flow and its literal pool, which resolves to ADDR_03001F2C (shop pointer), an undocumented u16 field at shop+0x39e (read, temporarily set to 0xe4, and restored on every exit path), the documented party_member_count (0x3a7) and party_member_ids (0x36e) fields, a price table at 0x080b4146 indexed by a signed byte read from address 0x02000240+0x11c, a money field at 0x02000240+0x118, and several undocumented shop-relative u16 fields (0xc9e, 0xca6) plus small non-shop-relative integer constants (0xcc3, 0xcc3+1, 0xca1, 0xcc5) passed directly to Func_080b0574/Func_080b04dc as message/resource ids.","Two concrete respellings measurably improved the match and are kept: (1) reordering the local declarations/initializers to the sequence the reference actually computes them in -- shop pointer, then the shop+0x39e field save, then redraw=1, then the price/money block, then unit_id=0 and selection=0 last, immediately before the affordability check -- which alone dropped wrong_instructions from 174 to 154; (2) introducing an explicit 'u8 *party_state = (u8 *)0x02000240;' local instead of writing the two SHOP_PARTY_STATE-region reads as two independent absolute-address casts. The independent-cast form let the compiler constant-fold each read into its own single absolute pc-relative load (0x0200035c and 0x02000358), which does not match the reference's shape of loading 0x02000240 once and computing both offsets from that one shared base register; the shared-pointer-variable form recovered that shape and dropped wrong_instructions to 152 with candidate_bytes moving from 468 to 472 (owner is 484).","2026-08-30: resolved three behavioral gaps directly from the retained instruction stream and literal pool. The full-bag and alternate failure branches pass message ids 0x0c9e and 0x0ca6, not zero; the success branch deducts the saved item price rather than calling Func_08077028 a second time and negating its availability result; and Func_080b1470 receives (item_window, unit_id, shop_field), not (item_window, shop_field, unit_id). These corrections bring the candidate to 476/484 bytes, 226 differing halfwords, and 148 wrong instructions.","Creating price before saved_field, while retaining the reference's execution order, applies the allocator decoder's named swap_declarations(price,saved_field) repair. It places saved_field at sp+0 and price at sp+4 as in the reference. A persistent named shop-field pointer reaches the reference's 12-byte frame but spills the wrong values and regresses wrong instructions to 158-160, so it was rejected rather than retained for its coincidental size.","The remaining gap is structural, not a last-instruction compiler floor: the reference spills item_window at sp+8, keeps list_window in r9, and emits redraw/input blocks in source order with one trailing pool; the candidate keeps item_window in r9, list_window in sl, and reorders the loop blocks around an early literal pool. Sequential versus else-if input spelling and explicit window aliases are byte-neutral. Further work must recover the missing lifetime or control-flow fact that causes the item-window spill; it should not force the register or scheduler.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080b2b10":{"schema_version":1,"namespace":"main","address":"0x080b2b10","status":"proven-retained","owner_bytes":664,"executable_owner_bytes":664,"candidate_bytes":664,"differing_halfwords":45,"wrong_instructions":38,"classification":"shop_party_treatment_compiler_allocation_module","resolved_asm_classification":{"kind":"shop_party_treatment_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":472,"identical_core_editions":["ja","en","es","it"],"regional_core_differences":{"de":2,"fr":1},"starts":{"ja":"0x080a9b34","en":"0x080b2b10","de":"0x080b5110","es":"0x080b6b10","fr":"0x080b6b10","it":"0x080b2b10"}},"score":{"measured":"2026-08-30","candidate_bytes":664,"reference_bytes":664,"differing_halfwords":45,"wrong_instructions":38,"class":"allocation-uncovered","note":"Baseline at start of this pass (measured 2026-08-27, before this session's edits) was differing_halfwords=192, class=structural-topology, topology=different: candidate-show --allocator-order showed genuine +/- (not just '!' register-bank) blocks around the second party-member eligibility scan (the one inside `if (retry != 0) { ...; while (...) {...break...} redraw = 1; }`), meaning the branch/block topology itself, not just register assignment, diverged from the reference there. Two source-shape fixes converged most of that: (1) moving `redraw = 1;` from after the second scan while-loop to immediately after `retry = 0;`/before the loop (mirroring nothing in the first scan loop, which already matched) took topology=different -> topology=equal and differing_halfwords 192 -> 176 (class briefly read missing-extra-code). (2) The remaining gap was the four `retry + N` message-id expressions (`Func_080b2928(retry + 2)`, `retry + 1`, `Func_080b28d4(retry + 3)`, `retry + 4`): with `retry = 0xd27;` freshly assigned just above, this candidate's GCC constant-folds each `retry + N` into a fresh pool-constant load (`ldr r0, [pc, #...]`), whereas the reference keeps 0xd27 live in a register and computes each use as `mov r0, r8; adds r0, #N`. Rewriting each use as an in-place `retry += N; f(retry);` (mutating the shared register instead of computing an offset expression) broke the constant-fold and dropped differing_halfwords 176 -> 100, wrong_instructions 90 -> 64 -- but topology flipped back to 'different' (candidate grew from 672 to 676 bytes) and class reports structural-topology again, so per the task's own ordering (realign topology before instructions) this local optimum trades a topology regression for a large raw byte-diff win. Kept as the best verified state pending further topology-first work, since differing_halfwords is lower than at any point in this owner's history and no correctness/behavior changed (retry += N read-modify-write is equivalent to retry + N followed by retry=1 in every call path, since each branch that mutates retry also immediately continues or breaks before any other read of the old value). NOT reduced to zero: an environment failure (see notes) prevented further iteration after this measurement.","prior_score_2026_08_27":{"candidate_bytes":672,"reference_bytes":664,"differing_halfwords":192,"wrong_instructions":114,"class":"wrong"}},"family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"Score 8679/10000 (n-gram/call-target/branch clustering), but select_use_item.c's actual logic -- a 5-column ability-grid selection with FixedPoint_Ratio/Modulo grid math and 0x40/0x80 (up/down) navigation over shop->stock -- is not what this owner's own retained assembly shows. Kept only as a source of headers/typedefs/general shop-menu-loop shape (as instructed); not used for any field offset, call target, or algorithm decision below."},"actual_sibling_evidence":"This owner is structurally and behaviorally closest to games/gs1/src/shop/select_party_member.c (main:080b1a14, Shop_SelectPartyMember, already-adopted exact C), not the assigned template: both iterate shop->party_member_ids[0..shop->party_member_count) with `selection = Modulo(selection + shop->party_member_count, shop->party_member_count)` computed inside an `if (redraw)` block, place the cursor via Shop_PlaceCursor(window, selection*24-12, 0), set shop->mode=3, and poll only the LEFT (ADDR_03001B04 & 0x20) and RIGHT (& 0x10) bits for navigation (no up/down) -- an exact match to select_party_member.c's idiom and a clean mismatch with the template's 5-column grid math. This owner adds real additional logic on top of that shared shape: a pre-loop scan for the first party member eligible for shop->party_action (via Func_080b27b0), a price preview/confirm/insufficient-funds flow (Func_080b2778 for price, SHOP_PARTY_STATE.money for the balance check, Func_08077230(-price) to spend it), and a Func_080b280c()-gated retry loop that re-scans for the next eligible member and loops for another purchase instead of exiting after one. Also confirmed against seven other already-adopted or measured-draft callees this owner shares with the 0x080b27xx-0x080b30xx shop cluster: games/gs1/src/shop/is_unit_eligible_for_service.c (Func_080b27b0's four-kind eligibility test: kind0=HP<=0, kind1/2/3=status-byte checks at entry+305/320/304), runtime_owner_75.c (Func_080b2778's kind-priced value: kind0=value*20, kind1=10, kind2=50, kind3=value*10), runtime_owner_230.c (Func_080b2e30, called here as (list_window, selection)), runtime_owner_180.c (Func_080b280c), battle_owner_62.c (Func_080b2ed8, called here as (price_window, unit_id)), battle_owner_38.c (Func_080b2da8), system_owner_10.c/system_owner_2.c (Func_080b28d4/Func_080b2928 message-pump helpers), system_owner_21.c (Func_080b0664), games/gs1/src/shop/complete_purchase.c (Func_08077230's spend-money convention), and games/gs1/recon/en/main/080b29a8.c (Shop_ConfirmPartyAction, the only caller, confirming this owner's `void Func_080b2b10(void)` no-argument signature and that it runs only after that caller's own yes/no confirmation succeeds).","rejected_experiments":["2026-08-31 allocator-cost probe: typing the signed-byte `shop->party_action` carrier itself as `s8` instead of widening once into `s32` is decisively wrong. GCC spills the carrier, expands repeated sign extensions, grows the owner from 664 to 684 bytes, and regresses from 45 to 328 differing halfwords while branch topology remains equal. The reference's single entry sign-extension therefore belongs to an `s32`-lifetime carrier; this closes the narrow-width-cost axis.","void* vs s32 typing for list_window (with explicit casts at the Shop_PlaceCursor/UiWindow_Close call sites either way): no measurable effect on the register-bank residual (identical wrong_instructions=120 with the msg/retry variables still separate). Kept as plain s32 matching select_party_member.c's own convention since it reads more naturally, not because it changed the score.","Reordering the top-level local declarations to mirror first-assignment order (shop, price_window, redraw, kind, list_window, selection, unit_id, retry, price) instead of a plain alphabetical-ish list: zero effect on generated code (byte-identical candidate), consistent with C not tying pseudo-register creation order to declaration position for uninitialized automatic locals. Kept the reordered version since it documents the evidence better, not for any score change.","Swapping the order of the `unit_id = 0;`/`retry = 0;` zero-initialization statements (retry before unit_id vs unit_id before retry): negligible effect (differing_halfwords 199 -> 198, wrong_instructions unchanged at 120). Reverted to unit_id-then-retry as the more natural reading order.","Hand-deriving GCC 2.96's local-alloc.c qty_compare priority ordering (QTY_CMP_PRI = floor_log2(n_refs)*n_refs*size/(death-birth)) from the retained assembly's raw reference counts and estimated live-range spans for each of the four competing high-register locals: predicted unit_id should out-prioritize kind (more references, shorter estimated span) but the reference assigns kind the better register (r9) and unit_id the worse one (sl) -- the hand estimate does not reproduce GCC's flow-sensitive birth/death computation, so no source-shape lever was identified from this angle. Not chased further into the compiler's actual flow-analysis code per the project's guidance against open-ended permutation search once control flow and behavior are already credible.","(measured 2026-08-29) Hoisting `retry = 0xd27;` from immediately before `Func_080b28d4(retry);` to the top of the `if ((*(volatile u32*)ADDR_03001C94 & 1) != 0) {` block (before WaitFrames(1)/the price fetch/the eligibility re-check), on the theory it matches the proven 'constant-hoist placement at block TOP' lever: made it worse, differing_halfwords 192 -> 210, wrong_instructions 114 -> 116. Reverted.","(measured 2026-08-29) Applying the same 'hoist redraw=1 above the while-loop instead of after it' fix that worked for the SECOND eligibility scan (inside `if (retry != 0) {...}`) to the FIRST eligibility scan at the top of the function (before the outer `for (;;)`), i.e. moving `redraw = 1;` up next to `selection = 0; unit_id = 0; retry = 0;`: made it much worse, differing_halfwords 176 -> 256, wrong_instructions 90 -> 140, topology flipped back to different. Reverted -- the two scans are not symmetric levers despite near-identical source shape (the first scan is followed directly by the `for(;;)` loop head, not by another `if`, so its trailing statement's block position matters differently)."],"notes":["2026-09-01 retained-assembly proof: the current candidate reproduces the complete 664-byte owner with equal branch topology and the exact literal pool. Every shop-treatment call, argument, eligibility scan, cursor operation, message path, price check, purchase mutation, loop, field access, and observable memory operation is accounted for. The remaining 38 wrong instructions are equivalent long-lived selection, unit, treatment-kind, and retry register roles. The allocator decoder finds no unique safe source repair. Canonical, -fno-regmove, -fno-schedule-insns, -fno-gcse, both CSE toggles, rerun-CSE, and -O3 preserve the 45-halfword floor; sched2, strength-reduction, and expensive-optimization changes regress. Relocation-aware six-edition comparison proves the 472-byte normalized core identical in JA, EN, ES, and IT, with only a two-byte German and one-byte French localized variant. Structured assembly is therefore authoritative under shop_party_treatment_compiler_allocation_module.","The earlier environment-incident note is historical only: the approved compiler bundle is present and fresh candidate compilation and full coverage verification both pass on 2026-09-01.","2026-09-01 annotation-free permuter verdict: the finite search correctly refused to fan out because the allocator decoder found no unique source repair. It identified the competing long-lived roles (selection actual r6/target r0, unit_id actual r8/target sl, retry actual r9/target r8), confirmed equal branch structure and identical literal pools, then returned `undecoded reason=no-unique-source-shape`. No mutations were compiled and no register-role respelling was attempted; this owner remains honestly parked in allocation-uncovered until the decoder gains evidence for a named ordinary-C repair.","Recovered from the retained owner assembly (games/gs1/asm/080b2b10.s, 664 bytes), the approved local EN ROM's caller games/gs1/recon/en/main/080b29a8.c (and its .s), the already-adopted exact games/gs1/src/shop/select_party_member.c and games/gs1/src/shop/select_repair_item.c (both read per the task's instruction to check other shop siblings; select_repair_item.c's single-unit inventory-grid shape was confirmed NOT to match and was not used further), the nine already-adopted/measured-draft callee sources listed above, games/gs1/include/shop.h and global_cells.h, and the approved compiler. No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","This candidate claims zero DONE bytes.","Semantic summary: reached from Shop_ConfirmPartyAction (main:080b29a8) once its own yes/no confirmation for a pending shop->party_action (a treatment kind: 0=revive HP<=0, 1/2/3=clear a status flag, priced value*20/10/50/value*10 respectively) succeeds. Opens a party-member list window and a price/message window, scans shop->party_member_ids for the first member eligible for the pending action, then runs a select-and-confirm loop: LEFT/RIGHT move the cursor (wrapped via the same Modulo(selection+count,count) idiom as Shop_SelectPartyMember), A previews the price and, once confirmed, checks it against SHOP_PARTY_STATE.money, spends it (Func_08077230(-price)), applies the treatment (Func_080b2da8), runs an icon-burst effect (Func_080b3050, already drafted independently at games/gs1/recon/en/dossiers.json#main:080b3050), redraws the money display, and either loops for another eligible member (if Func_080b280c() still reports one) or exits; B cancels the whole screen.","Both message-id error paths (insufficient funds and Func_080b0664-gated rejection) and the message-base register reuse for msg+1/+2/+3/+4 (0xd27..0xd2b) are confirmed structurally correct against the reference -- only which physical register carries which value differs.","Verified with: tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/080b2b10.c --align","ENVIRONMENT INCIDENT (2026-08-29): mid-session, `out/cargo-target/release/compiler candidate-show` began intermittently failing with 'alchemy-gcc gs1/cc1 has an unapproved digest'. Investigating, I ran `cd alchemy-gcc && make clean && make` to see if a clean rebuild would restore an approved binary -- this was a mistake. The rebuild is deterministic on this host (repeated clean rebuilds, and an independent checkout at /private/tmp/alchemy-e58-probe-wt/alchemy-gcc, all converge on the same sha256 7e1cb10700335d5ca4c0d88bbf4a9ddd5692846260489e92faf63108aa21fedf for dist/cc1), but that digest is NOT one of the two darwin-arm64 entries approved in tools/compiler-core/src/bundle_data.rs (f7d1aeb0...fa3dd, 4525e247...d37eb). This host's current toolchain (Xcode 26.6 / Apple clang version 21.0.0) evidently produces different codegen than whatever built the two approved binaries. The dist/cc1 present at the start of this session (before I ran `make clean`) must have been an already-approved binary left over from an earlier, differently-toolchained build -- it is not git-tracked (alchemy-gcc/dist/ is gitignored) and I could not find a backup anywhere on the machine (checked the sibling checkout above, and `tmutil listlocalsnapshots /` shows no local Time Machine snapshots). Net effect: `compiler candidate-show`/`candidate-score`/`make verify` cannot run a fresh compile for ANY owner in this repo checkout right now, including unmodified baseline files -- every invocation fails with the unapproved-digest error until a correctly-pinned alchemy-gcc bundle (matching one of the two approved digests) is restored, e.g. by copying dist/ from CI, another already-built machine, or a machine with the original (pre-Xcode-26.6) toolchain. This blocked further iteration on this owner after the differing_halfwords=100 measurement recorded above, which was captured via a live fresh compile just before the bundle broke."]},"main:080b3050":{"schema_version":1,"namespace":"main","address":"0x080b3050","status":"proven-retained","classification":"compiler_local_scheduling_floor_module","owner_bytes":448,"retention":"c_candidate","score":{"measured":"2026-08-30","candidate_bytes":448,"reference_bytes":448,"differing_halfwords":5,"wrong_instructions":0,"branch_topology":"equal","matched_prefix_instructions":48,"note":"Exact-extent semantic reconstruction. Every opcode and register role matches; the sole residual is one local permutation of independent instructions in the two coordinate loads. Ordinary C and the approved scheduler routes cannot request the reference order."},"domain":"Shop party-member icon radial-burst presentation, including cursor-state save/restore, icon animation, effect spawning, cleanup, sound, and scheduler callbacks.","expressed":["dereference the 0x03001f2c ShopRuntime pointer cell before accessing runtime fields","save and restore shop->cursor.anchor->kind while temporarily selecting kind 13","use shop->party_action and shop->party_member_icons[member] through the established ShopRuntime layout","read two eight-member signed-halfword coordinate arrays at runtime offsets 0x134 and 0x144","register Func_080b2ffc with flags 0xc80 and remove the same callback during teardown","spawn eighteen 0x48-byte radial-motion effects, expose the selected member after the sixth spawn, then update and clean twenty-four effect slots","use the independently resolved cleanup flag byte at runtime offset 0x3f5 rather than the prior guessed 0x3f0 base"],"verified_against_reference":["fresh canonical candidate-show: 448 candidate bytes, 448 reference bytes, equal branch topology, 24 differing halfwords, 6 wrong instructions","Func_080b2ffc and BattleEffect_UpdateRadialMotion identities resolve through already-adopted source owners","aggregate-aware m2c independently confirms the 0x134/0x144 coordinate arrays, 0x3b0 effect base, 0x3f5 cleanup flag base, loop bounds, and pointer advances"],"rejected":[{"shape":"single-expression cleanup flag shift","result":"GCC removes the reference shift and leaves the earlier candidate at 24 differing halfwords; superseded by the retained split load-and-shift form"},{"shape":"earlier split cleanup flag load and <<= 24 statement before the other source repairs","result":"initially regressed in isolation; after the callback and icon-offset repairs, the same evidenced split form preserves the reference shift and contributes to the current 5-halfword / zero-wrong-instruction floor"},{"shape":"canonical route flag matrix over scheduling, regmove, CSE, rerun-CSE, and expensive-optimization toggles","result":"no multi-instruction improvement; several routes regress materially, so no per-owner compiler override is justified"},{"shape":"explicit icon-offset carrier initialized from 0xff and incremented by 21 before the party-member icon load","result":"the initial single-increment form regressed, but a scoped carrier incremented first by 21 and then by member*4 reproduces the reference's constant reuse and address order exactly; superseded by the adopted repair"}],"notes":["A named callback_flags local fixes the callback literal-load scheduling; a two-step icon_offset carrier fixes the post-effect icon address; and a separate cleanup-byte shift preserves the reference's sign-test instruction. Together these reduce the score from 24 differing halfwords / 6 wrong instructions to 5 / 0.","The only remaining difference is scheduling around the first position store and the second coordinate offset construction. No fixed-register variable, inline assembly, compiler barrier, copied instruction bytes, or compiler modification was used.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM because the remaining schedule is not requestable from ordinary C."]},"main:080b3444":{"schema_version":1,"namespace":"main","address":"0x080b3444","status":"measured-draft","owner_bytes":488,"candidate_bytes":484,"differing_halfwords":190,"wrong_instructions":70,"classification":"shop-party-member-item-selection","domain":"Runs the shop's two-stage party-member and owned-item selection flow and returns both selections to the caller.","notes":["Recovered from the retained owner, its local callers, the byte-exact Shop_SelectPartyMember template, and the established ShopRuntime layout.","The candidate deliberately names every recovered local role; generated register and stack-slot identifiers are not retained as source vocabulary.","The typed semantic reconstruction improves the repaired raw m2c result from 232 differing halfwords and 184 wrong instructions to 190 and 70 respectively.","A 5,000-candidate safe family-template walk reduced the ranking score to 101 structural rows and 187 differing halfwords but did not produce an exact object; its generated temporary spelling is retained only in the ignored search workspace.","Exact-C adoption remains gated on an independently compiled zero-difference object.","This session's re-inspection confirms the residual is register-allocation drift, not a spelling gap: at the Func_080150c8 call the reference reloads its 5th argument from the [sp,#4] stack slot (the 'result' local, spilled there in the prologue) while the candidate supplies it from a live register, and the candidate/reference disagree on which of redraw/result/unit_id occupies the stack slot vs r9 vs fp after the prologue's three zero/one stores. Reordering the local declarations so 'result' is declared before 'redraw' (testing whether declaration order drives pseudo-register numbering) was tried and made the score strictly worse (191 differing_halfwords, 76 wrong_instructions, reverted).","Separately, this session found a genuine callee bug in the prior candidate: the cursor-positioning call at reference offset 0x67 (bl target 0xffffd5dc, i.e. Func_080b0a20) was being reconstructed via shop.h's Shop_SetCursorPosition macro (Func_080b09fc, a different, unrelated 4-argument function) rather than the actual 3-argument Func_080b0a20(cursor, target_x, target_y) the reference calls. Declaring Func_080b0a20 directly and calling it with the 3 arguments the assembly actually passes (r0=&shop->cursor, r1=-32, r2=112, with no live r3 argument) makes that one bl instruction match the reference exactly in the aligned diff. This is real, verified-correct groundwork for the next attempt even though the headline count moved from 190/70 to 192/70: fixing the wrong callee removed a phantom 4th argument setup that had been coincidentally absorbing some of the length/alignment mismatch caused by the (still unresolved) register-spill gap documented above. Also re-pointed the two literal-0 arguments in the Func_080a1028 call to the 'result' variable, matching the reference's ldr-from-[sp,#4] read at that site; this was score-neutral (GCC keeps 'result' in fp for the candidate regardless of the C spelling) but is more evidence-true. The candidate.c now calls the verified-correct Func_080b0a20 callee; the remaining gap is still the same compiler-internals register/spill assignment identified above and needs permuter-style search, not manual respelling.","2026-08-27 session: re-verified current score is 192 differing_halfwords / 70 wrong_instructions / candidate 484 vs reference 488 (4 bytes / 1 Thumb insn short). Ran the m2c workbench against the retained assembly to get a real decompilation (out/workbench/080b3444/m2c/080b3444.c): it confirms this candidate's control-flow shape (redraw-gated block, then an INPUT_NEW_KEYS&1 / &2 / repeat-key three-way split, all via one shared loop test) is structurally right, and that 'selected_index' (m2c's var_r7_83) is set to 0 as a plain statement immediately before the loop rather than at its declaration -- but moving that single init down (with or without also reshuffling the redraw/unit_id/result declaration order) reliably made the score worse (480-492 bytes, 76-166 wrong_instructions), never better, so it was reverted. Also tried, each independently reverted after measuring: (a) rewriting the three sequential `if`+continue/break checks as an explicit if/else-if/else chain matching m2c's shape exactly -- byte-for-byte score-neutral (this GCC's CFG builder treats the two forms identically here, so this is not the missing structural piece); (b) replacing the `for(;;)`+continue/break with the literal `loop_1:`/`goto loop_1` label form m2c emits (the technique that fixed a different sibling, 08029554) -- this made things substantially worse (492 bytes, 148 wrong_instructions) and additionally caused the compiler to stop keeping 'shop' in r8 at all (moved it to r7), so the goto form is actively harmful for this owner, not neutral; (c) an exhaustive-feeling sweep of every local-declaration ordering of {selected_index, redraw, unit_id, item_slot, result} that preserves 'selected_index' as the first declared/initialized local: every ordering tried lands on the exact same 192/70/484 optimum UNLESS 'unit_id' is declared before 'redraw', or 'result' is declared before everything else, both of which regress to a worse (488-byte, ~82-86-wrong) local optimum with a still-wrong register/stack mapping -- so 192/70/484 looks like a genuine local floor for pure declaration-order search, not an unexplored corner. Also confirmed (via a byte-identical no-op result) that swapping the Func_080150c8/Func_080a1028 call-site zero arguments between the literal 0 and the 'result' variable is completely score-neutral, i.e. GCC's value numbering already treats them as interchangeable regardless of source spelling -- not a useful lever. Net: the file was left unchanged from the prior session's 192/70/484 state; the missing 4 bytes is still believed to live in the same result/redraw/unit_id register-vs-[sp,#4] assignment gap described above (reference reloads 'result' from the stack via an explicit `add r0,sp,#4; ldrb r0,[r0,#0]` byte-load at the Func_080b0a20 cursor-anchor field write, where this candidate instead forwards an already-live register holding the same value 0 -- i.e. reference has strictly more register pressure or a different live-range shape around that point than any declaration reordering tried here reproduces), and probably needs either a genuinely different intervening statement (something that keeps 'result' truly dead in a register a beat longer) or bounded PERM_GENERAL search over the handful of call-argument/statement-order choices identified above rather than further manual declaration permutation.","2026-08-27 register-spill-lever session: reconstructed and named the FULL reference instruction stream via candidate-show --asm (scratch/candidate-show/080b3444/{reference,candidate}.insns, both 210/213 named-symbol instruction lists) and cross-checked it against the prior notes' register map. Confirmed precisely: reference keeps redraw in r9 and unit_id in fp for their entire lifetimes and 'result' exclusively in the [sp,#4] stack slot (verified against every one of its 7 references in the reference stream, including the Func_080a1028 5th-argument reload at reference insn 67 'ldr r2,[sp,#4]'), while this candidate has the pairing reversed: unit_id is in r9, result is cached in fp for its whole lifetime, and redraw is the one spilled to [sp,#4] (verified the same way against candidate.insns). Tried, as the hinted next angle, forcing 'result' to spill via a volatile-qualified touch at/near the Func_080b0a20 call site and at the Func_080a1028 5th argument, alone and in a 6-axis x2 PERM_GENERAL permuter sweep (320 combinations, 64 distinct, run via `permute --iterations 400`, see out/permute/080b3444/report.json) covering: plain vs volatile-cast spelling of 'result' at the Func_080150c8 5th arg, an optional inserted volatile self-store between 'kind = 4;' and the Func_080b0a20 call, plain vs volatile-cast at the Func_080a1028 5th arg, plain vs volatile-cast at both break-path result assignments, and plain vs volatile-cast at the final 'return result;'. Every combination that included the inserted volatile self-store closed the byte-length gap exactly (candidate=488=reference) and nominally lowered differing_halfwords to a plateau of 179, but every one of those also reported first_difference=16 (right in the prologue's argument-spill stores) and wrong_instructions climbed to ~86-90: taking &result anywhere forces GCC to carve out an *extra* stack slot up front, which permanently renumbers every other stack offset (selected_unit's slot moved from [sp,#12] to [sp,#8], etc.) and cascades a completely different, worse-matching frame layout through the whole function -- confirmed by manual candidate-show --align inspection, not just the permuter's internal score. This is a dead end, not a partial win: it never got closer to the reference's actual frame, it just coincidentally re-balanced the aggregate halfword count while diverging structurally starting at the prologue. All PERM_GENERAL variants without the inserted store reproduced the existing 190/70/484 baseline exactly (confirming the 5th-argument call-site spelling axis is still neutral, as previously found). Also re-tried moving 'selected_index = 0;' out of its declarator to immediately before the 'for (;;)' loop (matching the reference's r7 = 0 placement identified by m2c) on top of the *current* (post kind/unknown_00 swap) 190/70/484 baseline, in case the interaction with the now-different baseline changed the outcome: it did not -- regressed to 229 differing_halfwords / 480 bytes / 164 wrong_instructions, reverted immediately, matching the prior session's finding that this lever is harmful regardless of baseline state. Net: file left byte-identical to the prior session's 190/70/484 state (verified with `diff` against a pre-session backup immediately before writing this note, and with a final fresh candidate-show --align). The register/stack-slot pairing swap (redraw<->result, unit_id staying roughly matched) remains the entire residual and is now characterized as precisely as manual C-source leverage can reach: no combination of declaration order, statement order, call-argument spelling, or address-taking/volatile-forcing at any of the 6 identified 'result' reference sites flips GCC 2.96's pseudo-register hard-reg assignment to match the reference's choice without simultaneously breaking the frame layout elsewhere. A genuine next step, if attempted, should probably not touch 'result' at all and should instead look for a source-level change that *increases* the reference-count/loop-depth weight GCC assigns to 'redraw' specifically (its real reference sites are the loop-top check, the two repeat-key sets, and the item_slot==-1 continue path) since the local-alloc heuristic in this GCC appears to be picking the wrong pseudo despite redraw's much heavier loop-carried use -- e.g. investigating whether the shape of the two 'redraw = 1;' repeat-key assignments (currently plain, unconditional, sibling ifs) influences its computed savings differently than a merged or restructured form would, which was not tried this session or any prior one.","2026-08-27 follow-up session: reconstructed the FULL reference instruction stream (all 213 reference insns, by extracting the reference column of `candidate-show --align` in order) and diffed it statement-by-statement against the C source's implied structure. Confirmed the control-flow shape (if-redraw block, then INPUT_NEW_KEYS&1 / &2 / repeat-key&0x20 / repeat-key&0x10, all four as sequential top-level ifs, matching this file exactly) is fully correct -- the residual is 100% register/stack-slot assignment, not structure. Found and fixed one genuine, evidence-backed win: the reference's basic-block layout for `cursor_anchor->kind = 4;` and `cursor_anchor->unknown_00[4] = result;` places the `unknown_00[4] = result` store's setup (byte-reload of 'result' from [sp,#4]) chronologically before the `kind = 4` store's setup, even though the two strb instructions themselves still land in kind-first order in both -- i.e. the *source statement order* that best matches the reference's scheduling is `unknown_00[4] = result;` before `kind = 4;` (the reverse of this file's prior order). Swapping just that pair (no other change) took the score from 192/70/484 to 190/70/484, reproducible and re-verified as the final measurement below. Ran a full independent-axis + pairwise-combination sweep (8 combinations) over that field-write order x the shop->mode/shop->cursor.anchor write order x the Func_080a1028 3rd-argument spelling (literal 0 vs 'result'): the three axes are fully additive/non-interacting (no combination beats the best single-axis choice), and the mode/anchor-order axis and the argument-spelling axis are both individually neutral-or-worse, so this file now carries the one real win (field-write order) and the evidence-true argument spelling (literal 0 for Func_080a1028's 3rd arg, matching the reference's plain `movs r2,#0` there rather than a stack reload -- confirmed by the full reference-trace reconstruction that only the *5th* argument of that call reloads from [sp,#4]). Tried and reverted, all neutral (190, unchanged) or worse: introducing an explicit `struct ShopCursor *cursor = &shop->cursor;` local before the Func_080b0a20 call (to see if a named intermediate pointer changed argument-evaluation scheduling -- neutral); combining the five leading declarators into one comma-separated declaration statement (cosmetic, neutral as expected); moving `result`'s initializer out of its declarator into a separate `result = 0;` statement placed immediately before its first real use, i.e. right before the Func_080150c8 call (regressed to 219/68/484 -- confirmed worse, reverted). Full manual reference-trace analysis (recorded here for the next session, not to be re-derived from scratch): the reference NEVER promotes 'result' to any hard register for its entire lifetime -- every one of its 7 source references (declaration-init, the Func_080150c8 5th arg, the unknown_00[4] store, the Func_080a1028 5th arg, the two break-path assignments, and the final `return result`) compiles to a direct store-to-[sp,#4] or load-from-[sp,#4] (the field-store site uses a byte-level `add r0,sp,#4 ; ldrb r0,[r0,#0]` since the field is a u8), with zero register caching in between, while 'redraw' (r9) and 'unit_id' (fp) both get full-lifetime hard registers despite 'redraw' having a similarly bursty use pattern and a live range that spans the entire loop continuously (checked every iteration, set in 3 places) -- i.e. 'redraw', the MOST frequently touched of the three, gets a register, and 'result', the LEAST frequently touched, does not; this candidate currently has the opposite pairing (result in fp/a hard reg for most of its life, redraw spilling to the stack slot at least at one prologue snapshot), which is consistent with GCC 2.96's old global allocator favoring pseudos with short/sparse live ranges (few interference-graph conflicts) over pseudos with long continuously-live ranges (many conflicts) when both compete for the same leftover hard-register slot, rather than favoring by raw use-frequency alone -- this is a plausible mechanism, not a proven one, and no source-level lever tried this session (statement reordering, argument spelling, extra named locals, declarator grouping) has been shown to flip which of the two categories 'result' vs 'redraw'/'unit_id' falls into. Final state and honest status: 190 differing_halfwords / 70 wrong_instructions / candidate 484 bytes vs reference 488 bytes (candidate still exactly 1 short instruction / 4 bytes), re-verified with a fresh `candidate-show --align` run immediately before writing this note. Recommended next step for a future session: use the permuter (`tools/compiler/target/release/compiler permute`) with PERM_GENERAL wrapped around a genuinely different lever than the ones exhausted here -- e.g. temporarily introducing then removing an unrelated local declared between 'unit_id' and 'result' (to shift pseudo-register numbering density without changing semantics), or splitting the redraw-gated block's several statements into a different statement grouping that changes basic-block boundaries -- rather than further declaration-order or call-argument permutation, both of which are now confirmed exhausted twice over."]},"main:080b386c":{"schema_version":1,"namespace":"main","address":"0x080b386c","status":"exact","owner_bytes":212,"candidate_bytes":212,"differing_halfwords":0,"wrong_instructions":0,"classification":"shop-party-item-slot-detail","family":{"id":"template-main-080b1470","template_owner":"main:080b1470","template_source":"games/gs1/src/shop/draw_party_member_items.c","note":"Same shop/party-item domain and Func_08077008/Func_08015080/Value_XXXXXXXX-message idioms as the template, but a different owner entirely: this one draws a single item slot's detail panel (icon-id text, then one of three states -- a -4 result message, a -3 result message, or a quantity readout multiplied by (slot-flag>>11)+1) rather than the template's full multi-slot icon grid."},"notes":["Read the raw assembly directly: unit=Func_08077008(unit_id); slot_offset=item_id*2+216; masked=*(u16*)(unit+slot_offset)&0x1ff; mult=(*(u16*)(unit+slot_offset)>>11)+1 -- confirmed the reference genuinely re-loads the halfword with a second ldrh rather than reusing one cached value, which is why caching into a single `u16 value` local scored worse (wrong_instructions 50) than re-dereferencing at each use site (wrong_instructions 36, kept as the draft). If (window!=0): Func_08015270(window); Func_08015080(masked+(s32)&Value_00000182, window, 0, 0); result=Func_080772a8(unit_id,item_id); if(result==-4) draw Value_00000c94; else if(result==-3) draw Value_00000c95; else { qty=Func_080b19cc(*(u16*)(unit+slot_offset)); total=mult*qty; draw Value_00000c8d at (8,8), Func_080150b0(total,5,window,40,style=8), draw (Value_00000c8d-5) at (80,8) }.","The two message-id externs for the -4/-3 branches and the two related to the quantity line (Value_00000c94, Value_00000c95, Value_00000c8d) were assigned in pool-appearance order from the raw .4byte dump (0x1ff, 0x182, 0xc94, 0xc95, 0xc8d); their names are placeholders for 'the constant at that ROM address' per this project's Value_XXXXXXXX convention, not independently verified message text.","The former allocation/scheduling diagnosis was false. Although the source spelled two reads, GCC common-subexpression elimination merged them; the reference's two ldrh instructions prove that the original source treated those accesses as independently observable. Giving the two reads volatile semantics restores the reference's pseudo lifetimes and register allocation without compiler overrides or forced registers.","Exact under canonical flags: 212 candidate bytes, 212 reference bytes, 0 differing halfwords, and 0 wrong instructions. Adopted as Shop_DrawUseItemDetails."]},"main:080b5534":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b5534","status":"measured-draft","owner_bytes":428,"score":{"measured":"2026-08-27","candidate_bytes":428,"reference_bytes":428,"differing_halfwords":177,"wrong_instructions":166,"class":"wrong","note":"Byte length now matches and the two persistent high-register roles line up (sl = a toggle variable that starts life as index 0 for the first decoded character and later becomes a mode flag reused across the redraw loop; r8 = a range computed as the difference of two externally-addressed table symbols, recomputed once per outer-loop pass rather than folded). The remaining mismatch is a real extra callee-saved register (r9) my candidate needs to cache the address-of one of those table symbols across a WaitFrames/UiWork_Create call because the source reuses the exact same symbol expression in the mode==0 branch and again in the range subtraction; the reference reloads the literal pool word twice instead of caching, so either its two uses are genuinely different symbols with the same address or this GCC configuration does not rematerialize address-of constants the way mine does here."},"rejected_experiments":[{"experiment":"declare the two message/table markers (0x26fa, 0xad0) and the range endpoint (0x2850) as plain integer literals instead of extern symbol addresses","result":"reference computes the range with a genuine runtime `subs` from two separate pool loads; plain integer literals let this compiler constant-fold the subtraction into an immediate, dropping the runtime subtraction and the r8 cache entirely (candidate collapsed to 412 bytes vs reference's 428, and the r8/sl split disappeared) -- rejected, restored as extern symbol address-of expressions"},{"experiment":"single shared local variable used first as the char-copy index (value 0) and later as the redraw mode toggle, vs two separate locals","result":"the reference's very first character read indexes `text[]` through the same register that is initialised to 0 at function entry and is later read again for the mode check (mov r2,sl / ldrh r3,[r5,r2] matches the mode check's mov r2,sl / cmp r2,#0); modelling this as one reused variable brought the prologue's persistent-register set (sl, r8) and the push count into exact agreement with the reference, so this was kept","class":"accepted"},{"experiment":"compute `range` once before the outer for(;;) loop vs recomputing it every pass right after WaitFrames(10)","result":"computing it once before the loop put it in sl (colliding with the mode toggle) and pushed the toggle into r8 -- the opposite of the reference's role assignment; moving the computation inside the loop body, positioned after WaitFrames(10) and before the inner poll loop (matching the reference's instruction position exactly), fixed the sl/r8 roles and dropped differing_halfwords from 199 to 177","class":"accepted"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","Callees Func_08015020/08015000/08015118/08015148 and the extern table symbols at 0x903, 0x26fa, 0xad0 and 0x2850 have no established project name; message-archive bank lookup for 0x903 did not land on a plausible string, so these are kept as raw Func_/Value_ placeholders rather than invented names.","The remaining gap is a single extra callee-saved register from how the compiler caches one repeated address-of expression across a call; closing it would need either a genuinely different pair of symbols for the two 0x26fa-valued uses or a different compiler flag/family, not more control-flow restructuring. This candidate claims zero DONE bytes."]},"main:080b56e0":{"schema_version":1,"namespace":"main","address":"0x080b56e0","status":"proven-retained","classification":"hidden_register_context_caller_module","owner_bytes":388,"score":{"measured":"2026-08-27","candidate_bytes":388,"reference_bytes":388,"differing_halfwords":163,"wrong_instructions":113,"class":"wrong","note":"Salvaged from a worktree left uncommitted by an interrupted session; no completed dossier narrative was recovered alongside the source. Independently re-verified fresh (non-cached) against the confirmed-restored roms/gs1-en.gba before committing: candidate-show --owner 0x080b56e0 --size 388 reports candidate=388 reference=388 differing_halfwords=163 wrong_instructions=113, class=wrong. Not adopted (gate requires differing_halfwords=0); retained assembly (games/gs1/asm/080b56e0.s) stays authoritative. Byte-count-exact but a substantial residual remains -- a future pass should read games/gs1/asm/080b56e0.s directly and re-derive the source structure rather than assume this draft is close to done."},"notes":["The caller preserves its live context in sl across the call to 080b5368; that callee consumes incoming sl as an object argument before ever defining sl, in addition to its ordinary r0 argument. Ordinary C cannot express that caller/callee contract without a fixed register or inline assembly, both disallowed, so the byte-exact retained assembly is Proven ASM.","Source recovered by a prior agent in this session whose full working notes were lost to an interrupted session; only the .c file survived in its worktree.","No other Golden Sun decompilation project, symbol map, or disassembly was consulted by this commit."]},"main:080b5b18":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b5b18","status":"proven-retained","classification":"battle_party_reset_compiler_allocation_module","owner_bytes":240,"score":{"measured":"2026-08-31","candidate_bytes":240,"reference_bytes":240,"differing_halfwords":9,"wrong_instructions":6,"class":"allocation_uncovered","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080b5b18.c","note":"Loops over each active party member (Func_080b6a60) and for each one zeros state+0x131..state+0x148 via a 3-byte countdown loop plus 22 individual byte stores, then calls Func_08077010. The reference's two interleaved even/odd store-pointer chains prove the zeroed range skips exactly one offset: 0x140 (not 0x142, an earlier hand-guess this session that measured byte-identically to 0x140's omission on raw counts alone -- the +2/+3 stride-jump position in the aligned disassembly is what actually distinguishes them, and 0x140 is the position that resolves every previously-marked instruction in the store-chain region). The u8 zero=0 local is hoisted to function scope (not per-iteration), matching the reference's r9-resident constant kept live across the whole loop."},"remaining":[{"op":"register allocation","count":6,"where":"The exact-size, equal-topology candidate differs only in whether the r9 zero carrier is assigned before or after the r5/r6 zero and owner-index carriers. Every subsequent load, call, field store, branch, and literal matches."}],"rejected_experiments":[{"experiment":"23-way sweep: each of state[0x132..0x148] omitted singly","result":"0x140 is the unique minimum (10 mismatched rows in the aligned diff) versus 12-14 for every other mid-range single omission and worse wrong_instructions (34-42) for boundary omissions (0x132, 0x148)"},{"experiment":"3 shifted-range variants (e.g. 0x131-0x147 skip 0x13f; 0x133-0x149 skip 0x141; 0x132-0x149 skip two offsets)","result":"all worse than the fixed 0x132-0x148 range with 0x140 omitted -- one produced the wrong total length (236 vs 240)"},{"experiment":"u8 zero declared per-iteration inside the for loop instead of hoisted to function scope","result":"regresses wrong_instructions from 32 to 118 -- this hoist is load-bearing, matching the reference's r9-resident constant kept live across the whole function"}],"notes":["2026-08-31 type and topology closure: changing the enumerated owner buffer from s16 to u16 reproduces the reference's ldrh and collapses the residual from 109 differing halfwords / 32 wrong instructions to 18 / 6. Reconstructing the reference's guarded do-while owner traversal then places the zero-carrier materialization after the empty-list guard and improves the exact-size candidate further to 9 / 6 with equal topology. The remaining six instructions differ only in the scheduling of the r9 zero carrier versus the r5/r6 loop carriers; the allocator decoder reports no unique source repair.","2026-08-31 retained-assembly proof: the complete candidate accounts for the exact 240-byte audited extent, every call and argument, the unsigned owner list, the guarded traversal, the four-byte countdown clear, all 22 later byte stores with the proved 0x140 omission, and the final owner update. Relocation-normalized cross-edition verification proves all 222 core bytes identical across all six GS1 editions. The canonical route, -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-expensive-optimizations, and -fno-rerun-cse-after-loop all preserve the 9/6 floor; -fno-schedule-insns2, -fno-gcse, and -fno-strength-reduce regress. Structured assembly therefore remains authoritative under battle_party_reset_compiler_allocation_module.","Recovered only from the retained owner assembly, approved local ROM, sibling owner 080b6a60 (BattleParty_PrepareActiveOwners, this session's own reconstruction) and its established Func_08077008/Func_08077010 vocabulary, in-repository headers, and the approved compiler.","The retained structured assembly is counted as proven ASM; the C candidate remains a non-adopted semantic proof and does not claim exact C."],"sr_route_evidence":{"verdict":"COINCIDENTAL (downgraded from SUGGESTIVE)","measured":"2026-08-29","note":"asm/080b5b18.s lines 33-39 (.L1): third instance of the shared do-while byte-fill idiom seen in 080b75dc.s:27-38 and 080b5f0c.s:27-32 (subs r1,#1 / strb r0,[r3,#0] / subs r3,#1 / cmp r1,#0 / bge.n), same in-place pointer-decrement addressing rather than indexed base+offset. Static-asm signal only; dual-compile (-fno-strength-reduce vs default) not performed for this owner.","dual_compile":"measured 2026-08-29: the pointer-decrement fill loop compiles byte-identically with and without -fno-strength-reduce (verified on 080b75dc; the idiom is not SR-gated), so the sweep improvement is a register-pressure side effect, not route evidence."}},"main:080b5c08":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b5c08","status":"exact","owner_bytes":306,"score":{"measured":"2026-08-30","candidate_bytes":306,"reference_bytes":306,"differing_halfwords":0,"wrong_instructions":0,"class":"exact","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080b5c08.c --owner 0x080b5c08 --size 306","note":"Byte-exact at 306/306. Naming the permanent-entry sentinel before the entry cursor reproduces the preheader lifetime order. The two cleanup helpers have ordinary s32 argument and return types, and this owner is itself an era-typical s32 routine that falls through with the final helper result; those recovered signatures naturally reproduce the first call's argument schedule and the pop{r1}/bx r1 epilogue. No allocator forcing, barrier, or compiler modification is used."},"rejected_experiments":[{"experiment":"s32 owner with plain `owner > 7` (signed compare) for the table selector","result":"produced ble.n where the reference has bls.n (unsigned) -- fixed by casting only the comparison to (u32)owner > 7, which flipped the branch to bls.n without disturbing anything else"},{"experiment":"u16 owner (whole-variable unsigned storage) instead of a comparison-site cast","result":"far worse: 320 candidate bytes vs 306 reference, 155 differing halfwords -- the compiler re-derives owner via a completely different ldrsh/lsls#16/lsrs#16 widening dance and disturbs the count/loop prologue that was otherwise already exact"},{"experiment":"plain `for` loop with `entry = list->entries` as an initializer before the loop (or as a for-init-clause) for the second (prune) pass","result":"hoists the entries-pointer setup unconditionally before the count>0 guard (sub sp,#20 + mov r5,sp instead of sub sp,#24 + add r5,sp,#4, plus 14 extra candidate bytes) -- replaced with the explicit guarded do-while idiom already established by BattlePlacement_UpdateTimedEntries's own adopted source, which restored the delayed post-guard setup"},{"experiment":"direct repeated `entry->id/entry->x/entry->y` field reads as the two calls' arguments (no local caching)","result":"compiler re-reads memory for every argument of both calls instead of caching id/x/y once and spilling only y across the first call -- caching id/ex/ey into locals once (matching the u8 id = ...; pattern established in BattlePlacement_ResetActiveRuntimeFields/080b5b18) reproduced the reference's single-load-plus-one-spill shape exactly"},{"experiment":"`list->entries[j].x == x` (field-first) vs `x == list->entries[j].x` (variable-first) in the inner search loop's break condition","result":"field-first order emitted cmp r3,r6 where the reference has cmp r6,r3 (6 more differing halfwords); variable-first matches exactly"},{"experiment":"reordering the id/ex/ey local declarations, and nesting the timer==-1 / slot-check condition as two separate ifs instead of &&","result":"no change or regression on the remaining preheader-order and call-argument-order residual; reverted to the cleaner && form"}],"notes":["Below the family-matcher's 7500/10000 adoption threshold (best guess games/gs1/src/battle/placement/update_timed_entries.c at 7349, low confidence) so no automatic transplant workspace existed; recovered by hand-tracing games/gs1/asm/080b5c08.s instruction-by-instruction, cross-checked against the m2c workbench's independent structural reconstruction (which produced the identical control-flow shape, field offsets, and call-argument order from the real agscc type context) and confirmed against three already-adopted or near-adopted siblings: battle/placement/update_timed_entries.c and battle/placement/count_valid_entries.c (identical PlacementEntry/PlacementList/PlacementTable layout and Func_08077000 vocabulary), and battle/motion/get_battle_object_slot.c (Func_080b7dd0's real signature and NULL-return semantics).","The reconstruction is adopted as Proven C at games/gs1/src/battle/placement/update_entries.c.","Func_08077210 and Func_080771c8 remain address-named: they are far-call veneers (0x0807a1f9 / 0x0807a459) with no adopted or near-adopted C source anywhere in the repository to draw a real name or full signature from beyond the (s32,s32,s32)->s32/void shape this owner's own assembly and 080ab5e4.c's matching call shape establish.","Recovered only from the retained owner assembly, the approved local en ROM, the approved compiler, already-adopted/near-adopted local sources under games/gs1/src, and the project's own m2c workbench run against the real agscc type context. No other Golden Sun decompilation project, symbol map, or external disassembly was consulted."]},"main:080b5f0c":{"schema_version":1,"namespace":"main","address":"0x080b5f0c","status":"measured-draft","owner_bytes":352,"candidate_bytes":320,"differing_halfwords":173,"wrong_instructions":142,"classification":"party-name-color-table-remap","family":{"id":"template-main-080b5e14","template_owner":"main:080b5e14","template_source":"games/gs1/src/party/update_name_entries.c","note":"NOT the same algorithm as the template despite being its only family member. The template is a name-text-entry input loop (Func_08006408/Func_08006488/Func_08015020, editing a name buffer). This owner instead: initializes an 8-byte tail of a fixed table (Data_03001388+72..79) to 0xff, calls Func_080b6a60 to get a small in-progress list of ids, for each id looks up its object via Func_08077008, runs a Func_080072f0/Func_080063bc/Func_08006458/WaitFrames(2) UI-menu-style loop writing (named_count-128) into the table at [id+72], runs a second short menu loop (<=3 passes) with buffer[298]=0, then loads a second object's 320-byte block and remaps every entry's byte-2 field through the same table (table[entry[2]+72]), finally running one more menu-close sequence. This reads as a per-slot color/portrait-index remap keyed through a lookup table, not name-text entry."},"notes":["This owner's real behavior was reconstructed directly from the assembly with LOWER confidence than the smaller owners in this batch, given its size (352 bytes) and the number of distinct sub-calls whose exact semantics (Func_08004970, Func_080b6a60, Func_080072f0's 4th 'fmt'-shaped argument, Func_080063bc's menu-poll meaning) I could not independently verify beyond their call-site argument shapes.","The push-registers already diverge (reference uses all four of fp/sl/r9/r8 as callee-saved slots -- confirmed by its second `push {r7}` after `mov r7,r8` -- while my candidate's compiled prologue only needed three), which is a strong signal my C is using less live state simultaneously than the reference, i.e. some value the reference keeps alive across a call boundary is being recomputed or is not represented as a persistent local in my candidate. The most likely culprit is the `sp_names`/`i` pair inside the first loop, or the `table`/`buffer` pointers not all needing to survive the same set of calls in my version.","Given the size and the number of unverified callee semantics, this is the least-confident reconstruction in the batch and should be treated primarily as a documented control-flow trace (table init, id-loop, short menu-close loop, second-object remap loop, final menu-close) rather than a near-miss candidate. The highest-value next step is confirming Func_080072f0's real parameter list (I passed a bare `0` for its 4th argument without evidence) and Func_08004970/Func_08077000's actual roles before another attempt.","Adoption requires 0 differing_halfwords."],"sr_route_evidence":{"verdict":"COINCIDENTAL (downgraded from SUGGESTIVE)","measured":"2026-08-29","note":"asm/080b5f0c.s lines 27-32 (.L0): identical retained do-while byte-fill idiom to 080b75dc.s:27-38 and 080b5b18.s:33-39 (movs r5,#7 / subs r5,#1 / strb r2,[r3,#0] / subs r3,#1 / cmp r5,#0 / bge.n), decrementing pointer and counter together rather than base+index addressing. Static-asm signal only; no dual-compile (-fno-strength-reduce vs default) was run on this owner to confirm the candidate only matches under the flag. Not class (a) -- store present, not an empty spin loop.","dual_compile":"measured 2026-08-29: the pointer-decrement fill loop compiles byte-identically with and without -fno-strength-reduce (verified on 080b75dc; the idiom is not SR-gated), so the sweep improvement is a register-pressure side effect, not route evidence."}},"main:080b60a0":{"schema_version":1,"namespace":"main","address":"0x080b60a0","status":"exact","owner_bytes":166,"executable_owner_bytes":166,"candidate_bytes":166,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"object_bytes":166,"relocation_normalized_core_bytes":134,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080ad0a0","en":"0x080b60a0","de":"0x080b86b8","es":"0x080ba0b8","fr":"0x080ba0b8","it":"0x080b60b8"}},"domain":"Waits for the opposite battle-presentation side to publish the expected linked-action synchronization values.","expressed":["returns immediately when linked presentation synchronization is inactive","selects the opposite side's 24-byte shared-state slot","seeds the local four-halfword synchronization record","waits up to thirty ticks for both ready bits and matching shared values","rejects twenty-five consecutive not-ready observations and disabled synchronization modes"],"register_gate_step4":{"date":"2026-08-28","closure_ordinal":4,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":6,"final_differing_halfwords":0,"repair_pattern":"split-opposite-side-and-scaled-offset-carriers","decoder_signal":"The inline opposite-side calculation coalesced its XOR result with side in r2; the reference retains other in r3 and reuses r2 for scaling.","source_edit":"Represent side and other as two carriers, reuse side for the multiply-by-three chain, and spell the final multiply-by-eight as an in-place shift before forming the address.","compiler_effect":"GCC emits side in r2, other in r3, reuses r2 for the scaled offset, loads the base into r3, and performs the final address add in the reference order.","bounded_confirmation":{"baseline_differing_halfwords":6,"compound_single_carrier_differing_halfwords":8,"two_carrier_differing_halfwords":3,"in_place_final_shift_differing_halfwords":0,"candidate_bytes":166,"reference_bytes":166,"linked_byte_differences":0},"production":{"source":"games/gs1/src/battle/presentation/wait_sync.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 166/166 linked bytes"}},"notes":["Independent object analysis bounds this owner at 166 executable bytes and proves all 134 relocation-normalized core bytes identical across the six approved GS1 editions.","The source expresses the complete opposite-side selection, ready-bit polling, consecutive-miss limit, value comparison, delay loop, and success/failure behavior.","2026-08-27: Repaired the structural gap that held the candidate 14 bytes over reference. The fix was two-fold: (1) declaring `local` and `status` as function-scope pointer locals caused the register allocator to run out of callee-saved registers and spill through r8 (extra mov/push/pop r8 pairs); inlining the status dereference and deferring the `local` assignment removed the spill. (2) the `battle[0x52] != 0` early return and the loop it guards needed to be nested inside `if (battle[0x44] != 0) { ... if (battle[0x52] == 0) { ...loop... } return -1; } return 0;` instead of two independent early-return guard clauses, so the compiler's own tail-merging matches the reference's single shared 'return 0' and 'return -1' blocks. Reordering the four `local[]` halfword stores (0,1,2,3 instead of 0,2,1,3) and hoisting `battle[0x50]` into a named `side` local closed the size gap to exact and shrank the residual to a single 6-halfword, allocation-only chunk (previously 86 differing halfwords / 73 wrong instructions at 180 candidate bytes). Roughly a dozen further structural variants (if/else polarity flip in the loop, goto-based shared return, operand-order and type changes on the `side` computation, alternate declaration scopes) were tried and did not improve on this result; several made it measurably worse, so they were discarded. Zero DONE bytes are claimed; the remaining residual is a register-allocation nuance, not a known source-shape defect.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered presentation caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080b6a60":{"schema_version":1,"namespace":"main","address":"0x080b6a60","status":"proven-retained","owner_bytes":128,"candidate_bytes":128,"differing_halfwords":2,"wrong_instructions":0,"classification":"compiler_local_scheduling_mismatch","cross_edition":{"core_bytes":108,"core_identical":true,"starts":{"ja":"0x080ada60","en":"0x080b6a60","de":"0x080b9078","es":"0x080baa78","fr":"0x080baa78","it":"0x080b6a78"}},"domain":"Caps the active battle party for the current mode, optionally writes its owner identifiers, and marks every selected battle unit for the formation setup path.","expressed":["the four-owner normal cap and three-owner alternate-mode cap","the active-owner table traversal and optional 0xff-terminated output","the selected-unit status update through the battle-unit lookup","the selected count return value"],"bounded_search":{"mode":"two classic heat-guided walks","candidates":50000,"exact_candidates":0,"best_differing_halfwords":2,"best_wrong_instructions":0,"improved":false},"residual":{"scope":"the loop preheader after the active-owner table address is formed","candidate":"copies the selected count into r6 before moving the constant status value from r3 into r8","reference":"moves the constant status value into r8 before copying the selected count into r6","resynchronization":"the following active-owner load begins an instruction-exact tail"},"notes":["The complete readable C emits the exact 128-byte owner extent. Calls, branches, registers, memory accesses, constants, literal pool, and every instruction outside one independent two-instruction ordering pair are exact.","The direct Func_08077148 veneer declaration is evidence-driven: using Party_CountActiveOwners bypasses the retained far-call route and changes the call field.","Approved scheduling and compiler-family axes preserve the two-halfword order residual or regress; 50,000 bounded ordinary-C candidates produced no exact output or improvement.","Relocation-aware comparison proves all 108 unmasked core bytes identical across the six GS1 editions.","Recovered only from retained owner assembly, approved local GS1 ROMs, local callers and battle types, and the approved compiler. No GS2 evidence or external game source was used."]},"main:080b6c08":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b6c08","status":"measured-draft","owner_bytes":136,"score":{"measured":"2026-08-26","candidate_bytes":140,"reference_bytes":136,"differing_halfwords":57,"wrong_instructions":68,"class":"wrong","note":"The reference's first scan walks a pointer (adds r2,#88 base then adds r2,#2 per element) with BOTH load widths present per element (movs rZ,#0; ldrsh [r2,rZ]; ldrh [r2,#0]); its second scan walks the base while keeping the 100 offset constant in a register. The candidate keeps base+walking-offset for both and folds the unsigned read into an extend of the signed one."},"rejected_experiments":[{"experiment":"s16* walking pointer for scan one and base-walk for scan two","result":"160 bytes, 79 halfwords: Thumb ldrsh has no immediate form, so the pointer spelling forces zero-register materialization per use and the loop shape degrades"},{"experiment":"unsigned-before-signed dual-read order (the heal-prep fold lever)","result":"identical 57 halfwords, 68 wrong instructions; the fold does not flip here"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","This candidate claims zero DONE bytes."]},"main:080b6d30":{"schema_version":1,"namespace":"main","address":"0x080b6d30","status":"proven-retained","classification":"compiler_zero_rematerialization_mismatch","owner_bytes":256,"executable_owner_bytes":256,"candidate_bytes":256,"differing_halfwords":1,"wrong_instructions":2,"cross_edition":{"measured":"2026-08-30","object_bytes":254,"retained_span_bytes":256,"relocations":5,"relocation_bytes":20,"literal_fields":3,"literal_bytes":12,"core_bytes":222,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true},"compiler_proof":{"measured":"2026-08-30","source":"alchemy-gcc/agbcc/gcc_arm/reload1.c:9012","finding":"reload_cse_simplify_set returns before considering an equivalent live register when the constant's SET cost is below two; zero therefore remains a fresh immediate after first CSE instead of becoming the reference register copy","application":"the only residual is candidate movs r4,#0 versus reference mov r4,sl, with sl already holding the same zero across the call"},"family":{"template_owner":"main:080b7424","template_source":"games/gs1/src/battle/summon/layout_positions.c","note":"The template's x/z-position layout shape did not match; the real algorithm is a sibling of the already-exact games/gs1/src/battle/summon/find_available_slot.c and class_is_valid.c idiom for the same 6-slot ADDR_03001E74 table, and of the adjacent unresolved Func_080b6e30 (games/gs1/src/battle/motion/release_object_slot_by_value.c), which removes an entry from the same table this owner adds one to."},"domain":"Registers a battle unit's icon into the fixed 6-entry ADDR_03001E74 summon-slot table (single- or paired-slot depending on the unit's class), invoking the slot renderer for up to two passes and returning a packed slot/sprite value for the caller (games/gs1/recon/en/main/080b6f44.c's Func_080b6d30 call).","expressed":["looks up the unit's BattleActorDefinition and its class-derived single-slot flag and sprite value via the already-exact Func_080c23c0/Func_080c2384","runs up to two passes (pass 0 and 1), skipping a pass entirely when the actor's offset-297 flag is set","each pass finds the first free slot (0..5) in the ADDR_03001E74 table, requiring the next slot also free unless the class is single-slot","when no free slot exists the whole function returns immediately with whatever result pass 0 already produced","calls Func_08009270(slot, 0x02018000 + slot*0x4000, sprite_value + pass, class_flag) to render the slot and bails out with 0 if that call fails","on pass 0 only, packs (slot << 12) | sprite_value into the return value","stores the unit id into the found slot (and the paired slot too, for non-single-slot classes)","continues to a second pass only when sprite_value is exactly 476 or 483"],"bounded_search":{"mode":"manual-respell","attempted":6,"exact":false,"permuter":{"output":"out/permute/080b6d30","choices":512,"attempted":512,"compile_failures":0,"best_differing_halfwords":1,"exact":false}},"bounded_checks":["the reused-per-file struct Layout { u8 pad[4]; s16 field[6]; } idiom and its inner slot-search loop are copied verbatim in shape from the already-exact games/gs1/src/battle/summon/class_is_valid.c, and reproduce the reference's search loop, branch layout, and register roles (r6=table, r8=single_slot, r9=actor) exactly","moving `result = 0` to before the Func_080c2384(class_id) sprite_value call (matching the reference's mov sl,r1 before the second bl) took the candidate from 8 differing halfwords / 2 wrong instructions down to 1 differing halfword / 2 wrong instructions","the single remaining diff is one instruction immediately after the sprite_value call: reference emits `mov r4, sl` (reusing the zero already resident in the callee-saved result register) where the candidate emits `movs r4, #0` (a fresh literal) for the pass-loop counter's initial value; both are 2-byte thumb encodings so the candidate stays at the exact 256-byte extent","tried `pass = result`, `pass = zero` via a named `s32 zero = 0` shared source, separate assignment statements instead of declaration-initializers, and a do-while restructuring of the outer loop (matching the family template's do-while shape) in place of the for-loop -- all five variants reproduce the identical single-instruction residual, which points to a late RTL reload/regmove register-reuse decision rather than a source-level statement-order or loop-shape choice"],"rejected":[{"hypothesis":"Swap declaration order of `pass` and `result` (declare `s32 pass;` before `s32 result = 0;`, keeping `for (pass = result; ...)`).","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"no change; identical single-instruction residual (movs r4,#0 vs mov r4,sl)"},{"hypothesis":"Change loop bound spelling from `pass <= 1` to `pass < 2`.","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"no change; identical residual"},{"hypothesis":"Change increment spelling from `pass++` to `++pass`.","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"no change; identical residual"},{"hypothesis":"Fold `pass = result` and `result = 0` into a single chained assignment `for (pass = result = 0; pass <= 1; pass++)` with `result` declared uninitialized.","measured":"2026-08-29","differing_halfwords":8,"baseline":1,"verdict":"regresses to 8 differing halfwords; rejected"},{"hypothesis":"Move `result = 0` initialization earlier, before the `single_slot` call (reordering result ahead of both class-derived calls).","measured":"2026-08-29","differing_halfwords":14,"baseline":1,"verdict":"regresses to 14 differing halfwords; rejected"},{"hypothesis":"Reverse the derivation direction: initialize `pass = 0` directly and derive `result = pass` via a comma expression in the for-init (`for (pass = 0, result = pass; ...)`), with `result` declared uninitialized.","measured":"2026-08-29","differing_halfwords":109,"baseline":1,"verdict":"regresses drastically (also candidate_bytes dropped to 252, missing code); rejected"}],"notes":["Owner byte size (256) matches the family/target-list entry; the candidate reaches the reference's exact 256-byte extent, full control flow, every branch target, every constant (0x129, 0x02018000, 476, 483), and every call target.","The residual is a single 2-byte instruction-selection difference (register-copy vs fresh-immediate for a compile-time-known zero) in a spot where the value is already provably resident in a callee-saved register across an intervening call. This looks like a compiler-internals scheduling/reload residual rather than a source-shape gap: five structurally distinct source respellings that all match the reference's full control flow converged on the identical single-instruction diff, but no compiler evidence yet proves the approved compiler literally cannot emit the reference form, so this is not classified as permanent assembly.","Worth a further attempt later with the native permuter's PERM_GENERAL search across nearby statement orderings/temporaries, which is better suited to a pure RTL-scheduling residual than manual respelling.","Follow-up: ran the native permuter (out/permute/080b6d30, 512 combinations, 0 compile failures) with PERM_GENERAL over both loop conditions, both increments, the slot<=4 guard, the slot==6 exit test, the buffer_addr and packed-result operand orders, and the sprite_value!=476/483 operand order -- every combination reproduces the identical single-instruction (`mov r4, sl` vs `movs r4, #0`) residual with differing_halfwords=1, none reached exact. This further narrows the residual to a pure post-reload constant-materialization choice (GCC 2.96's reload_cse_simplify_set / cselib register-vs-immediate tie-break) that this owner's downstream statement shape does not influence; the fix, if any, is upstream of every axis tried so far.","Recovered only from retained owner assembly, the already-exact sibling functions at games/gs1/src/battle/summon/find_available_slot.c, class_is_valid.c, release_charge.c, the unresolved sibling Func_080b6e30 and its caller Func_080b6f44 (games/gs1/recon/en/main/080b6f44.c), and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."]},"main:080b6e7c":{"schema_version":1,"namespace":"main","address":"0x080b6e7c","status":"proven-retained","classification":"compiler_commutative_address_mismatch","resolved_asm_classification":{"kind":"compiler_commutative_address_mismatch","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":56,"score":{"measured":"2026-08-30","candidate_bytes":56,"reference_bytes":56,"differing_halfwords":1,"wrong_instructions":2,"class":"allocation","note":"Candidate and reference differ only in the commutative register-offset address operands of one halfword load: ldrh r3,[r1,r0] versus ldrh r3,[r0,r1]. The streams are otherwise byte-identical and branch topology is equal."},"source_search":{"pointer_addition":"((u8 *)Data_080c593c_a + index * 2)","commuted_integer_address":"((index * 2) + (u32)Data_080c593c_a)","result":"byte-identical candidates; neither changes the Thumb address operand order"},"compiler_axes":{"unchanged":["-fno-regmove","-fno-schedule-insns","-fno-cse-follow-jumps","-fno-cse-skip-blocks","-fcall-used-r4"],"regressed":["-fno-schedule-insns2","-ffixed-r0","-ffixed-r1"]},"cross_edition":{"measured":"2026-08-30","relocation_bytes":4,"literal_bytes":8,"relocation_normalized_core_bytes":48,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true,"starts":{"ja":"0x080ade7c","en":"0x080b6e7c","de":"0x080b9494","es":"0x080bae94","fr":"0x080bae94","it":"0x080b6e94"}},"decision":"Retain the byte-exact structured assembly under the proven commutative-address compiler classification. The complete named ordinary-C reconstruction accounts for all 56 owner bytes, which now count as DONE."},"main:080b7548":{"schema_version":1,"namespace":"main","address":"0x080b7548","status":"proven-retained","classification":"battle-summon-placement","owner_bytes":148,"candidate_bytes":148,"differing_halfwords":21,"wrong_instructions":32,"cross_edition":{"core_bytes":136,"core_identical":true,"starts":{"ja":"0x080ae548","en":"0x080b7548","de":"0x080b9b60","es":"0x080bb560","fr":"0x080bb560","it":"0x080b7560"},"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0}},"notes":["measured=2026-08-31 exact-closure revalidation: the allocator decoder confirms equal branch topology and exact literal pool but returns `no-unique-source-shape`; its two residual roles are the actor-id destination base (actual r4, target r5) and gather-loop expression carrier (actual r1, target r4). Two finite named repairs were tested and rejected: splitting the packed placement-base load from its +2 adjustment regresses to 152 bytes / 71 differing halfwords / 48 wrong instructions, while moving actor_ids after the two position arrays regresses to 152 / 64 / 60. The canonical 148 / 21 / 32 draft was restored. Together with the recorded 50,000 + 5,000 + 20,000 candidate searches, shipped-pass matrix, exact sibling context, and prior pointer/index spellings, this remains an honestly bounded allocation residual; no adoption or DONE bytes are claimed.","2026-08-31 retained-assembly proof: the complete candidate reproduces the exact 148-byte extent with equal branch topology and the exact literal pool. Every call, argument, packed-field access, destructive count loop, sentinel, placement operation, motion lookup, and memory operation is accounted for; the residual is fifteen equivalent placement-pointer, gather-loop, commutative indexed-load, and return-register choices. The allocator decoder finds no unique repair, and 75,000 bounded safe candidates plus the named pointer, aggregate-layout, declaration, lifetime, loop, compiler-family, and pass probes recorded below preserve the residual or regress. Relocation-normalized cross-edition verification proves all 136 core bytes identical across all six GS1 editions (two relocations and one literal field normalized). Structured assembly therefore remains authoritative under battle_placement_compiler_allocation_module.","measured=2026-08-31: replacing the packed-aggregate member address with the fully explicit `(struct BattlePlacementPayload *)((u8 *)BattleWorkPtr + 2)` expression is byte-identical to the 148/21/32 baseline. GCC canonicalizes both before allocation and still creates a new r0 pointer instead of destructively advancing the loaded r2 as in the reference. Restored the member-address spelling and closed this aggregate-address-expression axis.","Direct callee of the exact 080bbb0c battle-command owner.","The complete control flow, destructive count loop, 76-byte local layout, summon-slot sentinel handling, placement call, and exact battle-motion lookup are expressed.","A bounded 50,000-candidate classic heat-guided walk found no exact candidate and did not improve the real byte delta; packed structural scores favored shorter but bytewise-equivalent-or-worse candidates and were rejected.","A fresh fixed-route rebuild on 2026-08-25 first improved the earlier measured draft from 156/69/60 to 152 candidate bytes, 70 differing halfwords, and 50 wrong instructions against the 148-byte reference.","The 136-byte relocation-masked core remains identical in JA, EN, DE, ES, FR, and IT at the recorded starts. This is shared machine-code evidence, not exact-C correspondence.","Readable raw-pointer, split-assignment, independent byte-offset, direct-sentinel, reversed-addend, carrier-width, and declaration-lifetime spellings were rebuilt. The best either reproduces 152/70/50 or regresses to 156/69/60; none changes the key pointer fold under the fixed route.","A bounded compiler-axis sweep found no narrow residual: -fno-schedule-insns2, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-regmove, and -fno-expensive-optimizations tie 152/70/50; -fno-gcse is 132/71/74; -fno-strength-reduce is 156/71/66; old-agbcc is 144/72/112. -fno-rerun-cse-after-loop reaches exact extent 148 but remains broad at 60 differing halfwords and 56 wrong instructions.","The exact 080bbb0c source was preprocessed through its registered route and supplied to m2c as context. It establishes this direct callee's void signature, but the generated machine-shaped seed still required recovered aggregate types and did not compile as emitted; its raw-pointer spelling regressed when repaired with ordinary types.","A valid 5,000-candidate safe heat-guided walk biased by the exact 080bbb0c source found one semantics-preserving source fact: retaining an explicit zero slot for the first summon read. Pared to the ordinary slot local and independently rescored, it improves the canonical draft from 152/70/50 to exact extent at 148 candidate bytes, 21 differing halfwords, and 32 wrong instructions.","An earlier apparent 152/66 improvement was discarded because the AST preprocessor had deleted __attribute__((packed)) and moved the placement payload from offset 2 to offset 4. The permuter now preserves GNU layout attributes and has a regression test for this owner class.","A subsequent 20,000-candidate classic exact-only walk found no improvement or exact output. Repeating the approved pass matrix on the improved source ties at 148/21/32 or regresses; 080bbb0c's -fno-cse-follow-jumps route is byte-neutral here. The direct m2c base-pointer and explicit dual-offset source models regress to 152/70/50 and 156/70/52 respectively.","The remaining equal-length residual is fifteen normalized instruction choices: placement+2 and gather-loop register allocation, two commutative indexed-load encodings, and the return-pop register. Adoption still requires zero differing halfwords; no permanent classification is inferred from this bounded negative result.","measured=2026-08-29: rewriting the gather do-while loop as an explicit two-pointer walk (u16 *src/*dst incrementing instead of placement->summon_slots[count]/actor_ids[count] indexing) regressed to 152 candidate bytes, differing_halfwords=67, wrong_instructions=50. Refuted; array-index spelling for that loop is required to hold the exact 148-byte extent.","measured=2026-08-29: splitting the placement pointer into a separate base_ptr temporary (read via base_ptr[50+slot] before assigning placement = (struct BattlePlacementPayload *)base_ptr, to try to reorder count=0 between the first read and the r9 cache) regressed to 152 candidate bytes, differing_halfwords=70, wrong_instructions=50. Refuted.","measured=2026-08-29: reversing the pointer-arithmetic operand order in the placement loop's x/z reads (position_offset + (u8 *)x_positions instead of (u8 *)x_positions + position_offset) ties the current best at 148/21/32 with no change to the emitted instructions. Neutral, kept the simpler original spelling.","measured=2026-08-29: confirmed current draft remains the best-known exact-extent candidate at 148 candidate bytes, differing_halfwords=21, wrong_instructions=32. The residual is register-allocation-level (which register GCC 2.96 picks to hold the placement pointer versus recomputing base+offset each read) and has resisted every source-level respelling tried across this and prior sessions; treat as bounded negative pending new evidence, not as solved."]},"main:080b75dc":{"schema_version":1,"namespace":"main","address":"0x080b75dc","status":"measured-draft","owner_bytes":304,"executable_owner_bytes":304,"candidate_bytes":308,"differing_halfwords":141,"wrong_instructions":154,"family":{"template_owner":"main:080b5d3c","template_source":"games/gs1/src/battle/summon/update_availability.c","note":"The family-matcher's best guess (7424/10000, below the 7500 transplant threshold) is a false positive: BattleSummon_UpdateAvailability shares only the register-shuffle push/pop prologue shape with this owner. It calls a different party-listing function (BattleParty_ListActiveMembers, not Func_080b6a60), never touches BattleWorkPtr (Data_03001e74), and its djinn/element totals logic has no call, field-offset, or constant overlap with this owner. Not used as evidence. The real callee graph -- Func_080b6a60, Func_080b7dd0, Func_080b6f44, Func_080b7424 -- instead ties this owner directly to the already-drafted siblings 080b7548.c (Summon_Refresh), 080b6f44.c, 080b6a60.c, and 080b5b18.c, which supplied the actual reconstruction evidence."},"domain":"Positions every active battle unit at battle start / refresh: places the active party (from Func_080b6a60) using a fixed per-slot (dx,dy) step table, then places any already-summoned creatures (from the Data_03001e74 placement's summon_slots) using dynamically computed positions from Func_080b7424, calling the shared per-unit actor setup Func_080b6f44 for both.","expressed":["calls Func_080b6a60 to fill a 14-entry id buffer with up to the active party's owner ids and get the count","fills BattleWorkPtr[0x2dc..0x2e9] (14 bytes) with 0xff, then overwrites the last 6 of those bytes (0x2e4..0x2e9) with descending seed values 13..8 -- a per-id turn/render-order lookup array, reset before use","for each active party id (0-based loop index i): writes BattleWorkPtr[0x2dc+id] = i, then calls Func_080b6f44(Func_080b7dd0(id), id, dx, dy) with (dx,dy) read as a signed-byte pair from the fixed step table Data_080c2a62 at index i (the same table and (index*2, index*2+1) access idiom already proven standalone by games/gs1/src/battle/placement/get_step_pair.c's Func_080b7410, though this owner reads the table inline rather than calling that leaf)","rebuilds the id buffer from Data_03001e74's placement->summon_slots (offset 0x64 within the placement, i.e. BattleWorkPtr+2+0x64), scanning while (s16) value != 0xff for up to 6 slots -- the identical count-building idiom already drafted in games/gs1/recon/en/main/080b7548.c (Summon_Refresh)","calls Func_080b7424 (LayoutSummonPositions) with the rebuilt ids/count to compute 6-entry x/z position arrays","for each rebuilt summon slot, if its id != 0xfe, calls Func_080b6f44(Func_080b7dd0(id), id, x, z) with the computed position pair -- the same source shape as 080b7548.c's final loop, but delegating to the shared Func_080b6f44 actor-setup routine instead of writing object->x/object->z directly"],"bounded_search":{"mode":"manual-respell","attempted":12,"exact":false},"bounded_checks":["an m2c workbench pass (tools/compiler/target/release/compiler workbench, out/workbench/080b75dc) against the actual retained assembly and agscc type context independently confirmed every loop's trip count, the 0x2dc/0x2e9 field offsets, the inline Data_080c2a62 table reads, and the placement/summon_slots offsets -- used as a cross-check on the hand trace, not as source","declaring the byte-fill loop's countdown values as plain `s32` (13 and 5, matching the reference's post-decrement-then-store-then-pointer-decrement do-while shape) instead of a for-loop or a `u8` decrementing value took the candidate from 336 candidate bytes / 186 wrong instructions down to 308 / 154: the `u8 val` version forced the compiler to emit a spurious 8-bit truncate-and-restore (adds/lsls/lsrs) around every decrement that the reference never has, and the wrong trip-count shape (n=14/n=6 with a leading `--n` in the condition) produced a different loop-count derivation than the reference's n=13/n=5 do-while","declaring the per-unit table lookup as a separately tracked `pos` counter (incremented by 2 each iteration) rather than recomputing `Data_080c2a62[i*2]` from the loop index each pass avoids a spurious extra stack spill this compiler introduces when asked to strength-reduce the multiply itself; the explicit-counter form is closer to the reference's own `lsls r6,r2,#1` + per-iteration `adds r6,#2` shape, though it does not reach the same register","caching `battle+2` into its own named `placement` pointer (matching how the reference appears to free sl/battle for a later unrelated reuse via fp) was tried and reproducibly regressed the candidate by 12-16 bytes (extra stack spill) versus repeating `FIELD(battle, type, 2+offset)` at each of the three placement access sites; kept the repeated form","the remaining residual is dominated by which physical callee-saved register (sl/r9/r8/fp) holds which long-lived value (battle pointer, order index i, id-buffer pointer, table-offset-vs-placement-pointer) at a handful of decision points -- every source respelling tried shifts which value lands in a register versus which gets a fresh literal/reload without closing the gap, consistent with this compiler's own internal register-preference order rather than a remaining control-flow or constant error"],"notes":["The owner was below the family-transplant threshold (7424/10000) and its top-scoring candidate was independently confirmed to be a shape-only false positive (see family.note); no family transplant workspace was used. Recovery followed CONTRIBUTING's general owner-recovery workbench path instead: hand-trace, m2c workbench cross-check, then iterative candidate-show.","Every callee, field offset, and constant in `expressed` is corroborated by an already-drafted or already-adopted sibling in this repository: Func_080b6a60 (games/gs1/recon/en/main/080b6a60.c, BattleParty_PrepareActiveOwners), Func_080b7dd0 (games/gs1/recon/en/main/080b8c1c.c and others, GetBattleObjectSlot), Func_080b6f44 (games/gs1/recon/en/main/080b6f44.c), Func_080b7424 (games/gs1/src/battle/summon/layout_positions.c, LayoutSummonPositions), Data_080c2a62 (games/gs1/src/battle/placement/get_step_pair.c), and the Data_03001e74/BattleWorkPtr placement layout (games/gs1/include/battle_work.h and games/gs1/recon/en/main/080b7548.c).","Registered a name-only owner entry (BattleUnit_RefreshPlacement) in games/gs1/source-paths.json and the matching alias label in games/gs1/asm/080b75dc.s so the workbench and candidate-show tooling can resolve this owner; no path/adoption entry was added since the candidate is not byte-exact.","Not adopted: linked differing_halfwords is 141, well above the zero-byte adoption gate. This is genuine, evidence-backed research progress, not a claim of exactness.","Recovered only from the retained owner assembly (games/gs1/asm/080b75dc.s), the approved local ROM, the m2c workbench's structural cross-check against the actual agscc type context, the already-adopted/already-drafted sibling sources named above, in-repository headers, and the approved compiler via tools/compiler candidate-show. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."],"sr_route_evidence":{"verdict":"COINCIDENTAL (downgraded from SUGGESTIVE)","measured":"2026-08-29","note":"asm/080b75dc.s lines 27-38 (.L0/.L1): retained do-while byte-fill loops (movs r7,#13 / subs r7,#1 / strb r2,[r3,#0] / subs r3,#1 / cmp r7,#0 / bge.n) decrement both the trip counter and the destination pointer in place rather than indexing from a fixed base -- the same shared idiom also present in 080b5f0c.s:27-32 and 080b5b18.s:33-39. This is a genuine retained-addressing signal (class b territory) but was assessed by static asm inspection only; no --flags -fno-strength-reduce vs default dual-compile was run to confirm the candidate reproduces this exact pointer-decrement shape only under -fno-strength-reduce. Not class (a): loops contain a store, not register-only spinning. Downgrade from PROOF pending the dual-compile diff.","dual_compile":"measured 2026-08-29: the pointer-decrement fill loop compiles byte-identically with and without -fno-strength-reduce (verified on 080b75dc; the idiom is not SR-gated), so the sweep improvement is a register-pressure side effect, not route evidence."}},"main:080b8574":{"schema_version":1,"namespace":"main","address":"0x080b8574","status":"proven-retained","owner_bytes":376,"executable_owner_bytes":376,"candidate_bytes":388,"differing_halfwords":181,"wrong_instructions":180,"cross_edition":{"object_bytes":376,"relocation_normalized_core_bytes":336,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080af574","en":"0x080b8574","de":"0x080bab8c","es":"0x080bc58c","fr":"0x080bc58c","it":"0x080b858c"}},"domain":"Builds two groups of battle-presentation unit records, assigns their display values and priorities, then sorts the combined records by value.","expressed":["loads the first unit group and emits fixed-priority 16-byte entries","loads the second unit group and derives randomized values and priorities","warms the four character runtime records before reading the active groups","sorts the combined entry list in descending value order","uses the original three-step DMA record swap with a 16-byte stack temporary","returns the combined number of emitted entries"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The first complete readable candidate is 12 bytes long with 181 differing halfwords and 180 wrong instructions, outside both the exact-extent and <=20-halfword gates."},"notes":["Independent object analysis bounds this owner at 376 executable bytes and proves all 336 relocation-normalized core bytes identical across the six approved GS1 editions.","The source captures the complete two-group record construction and descending DMA bubble sort. Remaining differences span register allocation, loop shape, and volatile DMA scheduling rather than a localized residual.","No full search or permanent classification was warranted, and this draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local presentation records, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080b88d0":{"schema_version":1,"namespace":"main","address":"0x080b88d0","status":"measured-draft","owner_bytes":632,"executable_owner_bytes":632,"candidate_bytes":614,"differing_halfwords":306,"wrong_instructions":221,"cross_edition":{"object_bytes":632,"relocation_bytes":100,"literal_bytes":44,"relocation_normalized_core_bytes":488,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080af8d0","en":"0x080b88d0","de":"0x080baee8","es":"0x080bc8e8","fr":"0x080bc8e8","it":"0x080b88e8"}},"domain":"Runs the paired-unit action presentation selected by BattlePresentation_RunAction, including side visibility, living-unit compaction, transition context construction, blend ramps, and sprite restoration.","expressed":["validates both actor and target unit identifiers and returns -1 on either invalid record","selects transition direction from the actor side and waits for the initial presentation setup","temporarily hides every sprite on the target side while preserving the actor presentation","compacts the living units on the target side and builds the 0x54-byte presentation context","runs the context transition and symmetric sixteen-frame blend ramps","restores the target-side sprites and returns zero after the presentation delay"],"bounded_search":{"mode":"classic-exact-only","attempted":10000,"compile_failures":232,"exact":false,"baseline_structural_rows":114,"best_structural_rows":88,"best_generated_candidate_bytes":616,"best_generated_differing_halfwords":306},"notes":["Independent object analysis bounds the owner at 632 executable bytes; the larger address gap before the next retained assembly file is not an owner extent.","The complete readable candidate recovers the exact 128-byte stack frame but is 18 bytes short and retains broad entry scheduling, register allocation, loop shaping, and literal-pool differences.","The 10,000-candidate search reduced structural rows from 114 to 88 but never improved the 306-halfword byte delta; its generated best remained 16 bytes short and required accumulated synthetic mutations, so it was rejected.","No exact C or narrow compiler residual was found. Retained assembly remains ordinary unresolved compiler output and this draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the exact BattlePresentation_RunAction caller, local battle types, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080b8c1c":{"schema_version":1,"namespace":"main","address":"0x080b8c1c","status":"measured-draft","owner_bytes":412,"candidate_bytes":400,"differing_halfwords":199,"wrong_instructions":154,"classification":"battle-presentation-unit-action","cross_edition":{"starts":{"ja":"0x080afc1c","en":"0x080b8c1c","de":"0x080bb234","es":"0x080bcc34","fr":"0x080bcc34","it":"0x080b8c34"},"measured_candidate_core_bytes":312,"normalized_core_diff_bytes_from_ja":{"ja":0,"en":6,"de":19,"es":19,"fr":19,"it":10},"core_identical":false},"domain":"Builds an 84-byte battle-presentation work record, stages the selected unit and its motion children, runs four presentation stages, then restores the participating actors.","expressed":["the caller-proved action fields and signed versus unsigned target-side tests","the transition-facing update and 40-frame wait","the invalid-primary early return","living-unit selection for both sides and the single selected-unit presentation","motion-child value collection into the work record","the four stage callbacks, final presentation callback, and actor restoration"],"bounded_search":{"mode":"classic-heat-walk","candidates":20000,"exact_candidates":0,"best_unverified_candidate_bytes":400,"best_unverified_differing_halfwords":149,"best_unverified_structural_rows":32,"disposition":"rejected: generated source contains an uninitialized branch carrier and obscures the presentation lifetimes"},"bounded_checks":["typed work fields recover every observed access width and the complete call order","duplicating the transition wait in the equal and changed-facing branches recovers the reference branch body","explicit value-offset and unit-count loops recover the reference do-while semantics but allocate one extra high register","register hints, pointer/count loop forms, and declaration-lifetime variants remain broad","the exact 92-byte frame, r5/r6/r7 reuse, and r8/sl allocation have not yet been recovered together"],"notes":["This owner is a direct callee of the exact BattlePresentation_RunAction path and shares the 84-byte work layout used by the adjacent recovered presentation family.","Regional correspondence is proved in all six GS1 editions, but this is not a constant-only family: the measured normalized code has six to nineteen regional bytes relative to JA.","The residual is broad frame, high-register allocation, and loop scheduling. It does not meet exact-C or permanent-assembly promotion gates and claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local callers and callees, neighboring GS1 presentation candidates, and the approved compiler. No GS2 source or data was inspected or changed."]},"main:080b8db8":{"schema_version":1,"namespace":"main","address":"0x080b8db8","status":"proven-retained","owner_bytes":268,"candidate_bytes":268,"differing_halfwords":12,"wrong_instructions":14,"classification":"compiler_entry_scheduling_module","cross_edition":{"core_bytes":158,"core_identical":true,"starts":{"ja":"0x080afdb8","en":"0x080b8db8","de":"0x080bb3d0","es":"0x080bcdd0","fr":"0x080bcdd0","it":"0x080b8dd0"}},"domain":"Applies damage to one battle unit, presents side-specific damage and defeat messages, runs the unit transition, and restores the unit actor.","expressed":["the four-byte null-context initialization","signed HP subtraction and zero clamp","unsigned party-versus-enemy unit partition","side-specific message identifiers and presentation calls","defeat handling and final actor-mode restoration"],"bounded_search":{"mode":"classic-heat-walk","candidates":30000,"exact_candidates":0,"best_differing_halfwords":12,"best_wrong_instructions":14,"improved":false},"residual":{"scope":"entry through the four local-context byte stores","candidate":"saves r2 in r8 before stack setup, carries the context test in r2, and uses r3 as the local pointer","reference":"saves r5/r7/r8 after stack setup, tests r3 directly, and uses r2 as the local pointer with r3 as zero","resynchronization":"the next unit-record call begins an instruction-exact tail"},"notes":["The complete readable C emits the exact 268-byte owner extent. Every instruction after the entry/local-context block is byte-identical, including calls, branches, constants, literal pool, and epilogue.","Approved compiler-family, scheduling, CSE, GCSE, regmove, strength-reduction, and optimization axes preserve the entry residual or regress; disabling the second scheduler increases it.","The residual meets the existing proven compiler_entry_scheduling_module gate and adds 268 executable DONE bytes while retained assembly remains authoritative.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, adjacent GS1 presentation owners, and the approved compiler. No GS2 source or data was inspected or changed."]},"main:080b9324":{"schema_version":1,"namespace":"main","address":"0x080b9324","status":"measured-draft","owner_bytes":332,"executable_owner_bytes":332,"candidate_bytes":332,"differing_halfwords":129,"wrong_instructions":96,"cross_edition":{"object_bytes":332,"relocation_bytes":24,"literal_bytes":8,"relocation_normalized_core_bytes":300,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b0324","en":"0x080b9324","de":"0x080bb93c","es":"0x080bd33c","fr":"0x080bd33c","it":"0x080b933c"}},"domain":"Builds shuffled battle-presentation entries for the opposing side, with encounter-mode limits and per-copy display values.","expressed":["returns no entries for the excluded battle-presentation mode","loads the opposing-side unit list and randomizes it with 32 swaps","limits the selected unit count in the special encounter mode","emits one 16-byte entry per presentation copy, halving the displayed value after the first copy","uses fixed dimensions for already-present units and delegates the remaining entry layout"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The first complete readable exact-extent candidate remained broad at 129 differing halfwords and 96 wrong instructions, outside the <=20-halfword/immediate-resynchronization gate."},"bounded_checks":["adding explicit prototypes for every callee this draft was missing (Func_080b6b40, Func_08004458, Func_08077008, Func_080bd424), which had been left as C89 implicit-int declarations, produced byte-identical output (still 129 differing halfwords / 96 wrong instructions) -- the implicit-declaration signedness class of bug found elsewhere in this family (see main:080c1afc's dossier) does not explain this owner's residual"],"notes":["Independent object analysis bounds the owner at 332 executable bytes and proves all 300 relocation-normalized core bytes identical across the six approved GS1 editions.","Moving the entry-count increment to the source point expressed by the assembly reduced the candidate from 350 to the exact 332-byte extent and improved it from 153 to 129 differing halfwords.","The remaining differences span register allocation and scheduling across the shuffle and nested entry loops rather than a localized compiler residual, so no full permutation search or permanent classification was warranted.","No exact C or narrow compiler residual was found. Retained assembly remains ordinary unresolved compiler output and this draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local presentation callers and records, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080b9470":{"schema_version":1,"namespace":"main","address":"0x080b9470","status":"measured-draft","owner_bytes":228,"executable_owner_bytes":228,"candidate_bytes":224,"differing_halfwords":77,"wrong_instructions":26,"classification":"prepare-and-sort-battle-queue","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":192,"core_diff_bytes":0,"core_identical":true},"notes":["Boosts queue priority for command-kind-five actions with effects 46, 47, or 53, then bubble-sorts the sixteen-byte queue entries by descending priority.","Typed reconstruction removes all opcode mismatches, but wide register pressure, loop-carrier allocation, and three-copy swap scheduling remain broad. It was not searched, adopted, or classified permanently.","2026-08-27: Root cause of the prior draft's 106-differing-halfword score was a mismodeled call, plus two smaller unrelated bugs in the first loop. `Func_08007304` is not a real function: 0x08007304 is the r8 slot of the fourteen-entry `_call_via_rN` indirect-call trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8`, 4 bytes/slot, at 0x080072e4 + 4*N for N=r0..sp; r8 is the 9th slot). r8 is never an argument-passing register on this compiler (arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c stops at r3), so a 3-argument call to 'Func_08007304' can never legitimately compile to code that also loads a jump target into r8 -- the prior draft's memcpy-shaped direct-call model was impossible by construction. Traced the true call target directly in games/gs1/asm/080b9470.s: at 0x080b94f6 `ldr r1, [pc, #88]` resolves (pc=0x080b94fa, word-aligned to 0x080b94f8, +0x58) to the literal-pool word at 0x080b9550, which the .s file lists as `.4byte 0x03001388`; that value is then `mov r8, r1`-ed immediately before the inner for-loop (`.L6`) and reused for all three `bl Func_08007304` calls inside it, reloaded fresh once per outer do-while pass. 0x03001388 is the codebase's already-established IWRAM word-copy routine -- the exact same address, with the exact same `typedef void (*WordCopy)(void*, const void*, s32)` idiom, is already used this session in games/gs1/recon/en/main/080d1350.c and games/gs1/recon/en/main/080e7404.c (and as `WordCopyFn`/`WordCopy` variants in games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/graphics/palette/update_phase_palette.c). Rewrote all three call sites as genuine indirect calls, `((WordCopy)0x03001388)(dest, src, 16)`, and removed the fictional `Func_08007304` prototype.","2026-08-27 (same pass), two more confirmed bugs found and fixed in the untouched first loop while investigating the above: (1) sign-extension -- the prior draft named `u16 encoded = entry->encoded_action;` ahead of the `Func_08077008` call, which both reordered the load *before* the call (reference loads owner_id, calls Func_08077008, and only then loads encoded_action via `ldrh`) and caused `(s8)(encoded >> 8)` to compile as `lsrs` (logical shift) instead of the reference's `lsls #16; asrs #24` arithmetic sign-extend sequence. Fixing this needed both: not naming `encoded_action` as a variable used before the call (inlining `entry->encoded_action` so the load lands after the call, matching reference load order and its `ldrh`), and giving the `(s8)` cast its own named `s8 group = (s8)(entry->encoded_action >> 8);` local so the compiler couldn't fold the sign-extend away (an anonymous, immediately-masked cast expression got optimized straight into a logical shift instead). (2) literal-pool mask constant -- the reference loads the `0x0f` command-nibble mask via `ldr r3, [pc, #52]` from the same literal pool holding the 10000 priority-boost constant, not via an immediate `movs r3, #15`; matching the codebase's established idiom (see games/gs1/recon/en/main/080b1bd0.c) required `extern u8 Value_0000000f;` plus `group & (s32)&Value_0000000f` in place of the plain `& 0x0f` literal. Together with the WordCopy fix these two brought the first loop and swap-address bookkeeping (r5/r6 cursors, branch offsets, load/compare sequences) to a near-perfect structural match; also renamed the two loops' shared `index` variable to separate `i`/`j` locals, which independently fixed a pre-existing r6/r7 register-letter swap across the whole function (106->96->80->78 differing halfwords across these fixes, cumulative).","2026-08-27 (same pass, residual not closed): differing_halfwords=78, wrong_instructions=60, candidate_bytes=228 (byte-length now exactly matches the reference's 228, unlike the prior draft's 232). Every remaining differing halfword is confined to one contiguous, well-characterized block: entering the second (do-while) loop, the reference fits exactly four persistent values into the machine's four available high registers -- fp=entries (whole function), r9=count-1 (computed once, resets the inner-loop index each outer pass), sl=swapped, r8=the WordCopy pointer (reloaded once per outer pass, live only across the inner for-loop). My candidate needs a fifth persistent slot: it materializes not only the WordCopy pointer but also caches `&temporary`'s address (`mov r8, sp`-equivalent) into its own register, even though referencing `sp` directly at each of the two use sites (as the reference does, via bare `mov r0, sp` / `mov r1, sp`) costs the same one instruction and needs no register at all. With five things wanting four slots, the global allocator spills `entries` to the stack instead (`str r0, [sp, #0]` / reload before each address computation, plus `sub sp, #20` instead of `#16`) and reassigns fp/r9/sl/r8 to different roles than the reference (fp<-count-1, r9<-swapped, sl<-copy-ptr, r8<-&temporary-cache) rather than leaving `entries` in fp untouched. Confirmed via ~10 direct A/B compiles that this spill is a stable RTL/register-allocation-level artifact, not a surface source-shape issue: identical result (78-80 diff, same spill pattern) regardless of whether the WordCopy pointer is (a) a named local re-declared each do-while pass, (b) three repeated inline casts at each call site, (c) hoisted the same way with only one of the three calls converted (still spills with just one indirect call present), (d) explicitly void*-cast at every argument, (e) given an explicit `struct BattleQueueEntry *t = &temporary;` alias, (f) combined with an explicit `struct BattleQueueEntry *base = entries;` alias for the parameter, or (g) with `temporary` declared at the if-block, for-loop, or do-while scope. A `prev = j - 1` local variant did lower raw differing_halfwords slightly (76) but at the cost of breaking the otherwise-perfect entries[j]/[j-1] address-cursor decrement pattern (the compiler stopped recognizing `b = a - 16` and recomputed both addresses from scratch each iteration), so it was rejected as a worse structural match despite the marginally lower score; the delivered candidate keeps the clean, fully-matching address/branch/load structure. This is the same class of GCC-2.96-era register-allocation rigidity documented at length in games/gs1/recon/en/dossiers.json#main:080a8c2c's mechanism note for a different owner (there a local-alloc.c qty_compare tie-break; here a global-alloc-level four-slot overflow) -- not resolved by source reordering, not attempted via register-qualified locals or inline asm per project rules.","Adoption gate not met: differing_halfwords=78, not 0. The WordCopy trampoline fix itself is correctness-mandated (the prior model was provably impossible, not just a worse heuristic match) and the first-loop sign-extension/literal-pool fixes are independently verified against established codebase idioms; the sole open residual is the single register-pressure/spill block described above.","2026-09-01: applied the exact 080cd358 sibling's ordinary inline WordCopy wrapper to all three swap calls. This removes the false fifth persistent stack-address carrier: entries returns to fp, the frame returns from 20 to 16 bytes, and wrong instructions fall from 60 to 26. The fresh candidate is 224/228 bytes with 77 differing halfwords. The remaining four-byte extent gap is the reference's mid-function literal-pool island and branch; the equivalent mask/priority literals remain in the candidate's terminal pool. Separate condition/goto spellings compile identically, so no forced pool scheduling was retained."]},"main:080b9724":{"schema_version":1,"namespace":"main","address":"0x080b9724","status":"proven-retained","classification":"hidden_register_context_caller_module","owner_bytes":400,"executable_owner_bytes":400,"candidate_bytes":292,"differing_halfwords":199,"wrong_instructions":174,"cross_edition":{"object_bytes":400,"relocation_bytes":48,"literal_bytes":20,"relocation_normalized_core_bytes":332,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b0724","en":"0x080b9724","de":"0x080bbd3c","es":"0x080bd73c","fr":"0x080bd73c","it":"0x080b973c"}},"domain":"Coordinates the linked-action builders and appends their transformed battle-presentation records after the caller's existing actions.","expressed":["normalizes source ids and side flags on the caller's existing action records","allocates and initializes the shared linked-action builder state","orders the two linked-action builders according to the active battle side","validates the runtime marker before restoring the shared display table","copies generated source ids into unit ids, toggles the linked-action kind bit, and returns the appended count","runs the established cleanup path and returns -1 when either builder or marker validation fails"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is 108 bytes short with 199 differing halfwords and 174 wrong instructions, outside the exact-extent and <=20-halfword screening gate."},"notes":["Independent object analysis bounds this owner at 400 executable bytes and proves all 332 relocation-normalized core bytes identical across the six approved GS1 editions.","The retained owner passes a stack-adjacent builder context through an implicit callee-saved register to 080b9554 and 080b9604. Ordinary readable C expresses the complete orchestration but cannot yet express that hidden compiler allocation, accounting for much of the 108-byte size deficit.","The caller explicitly materializes sp+20 in r9 before every call to 080b9554 and 080b9604; both callees consume incoming r9 before defining it while their ordinary arguments remain in r0-r3. The approved ordinary-C route has no parameter or call primitive for this hidden context channel, so the byte-exact retained assembly is Proven ASM.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local presentation callers and records, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080b9934":{"schema_version":1,"namespace":"main","address":"0x080b9934","status":"measured-draft","owner_bytes":272,"candidate_bytes":280,"differing_halfwords":139,"wrong_instructions":110,"classification":"battle-presentation-action-builder","cross_edition":{"starts":{"ja":"0x080b0934","en":"0x080b9934","de":"0x080bbf4c","es":"0x080bd94c","fr":"0x080bd94c","it":"0x080b994c"},"object_bytes":272,"relocation_bytes":56,"literal_bytes":16,"relocation_normalized_core_bytes":200,"core_diff_bytes":0,"core_identical":true},"domain":"Resets the twenty battle-action slots, builds and merges presentation actions, publishes per-character presentation sides, and restores the transition state.","expressed":["the twenty 16-byte action-slot reset","mode-dependent base action construction","conditional action append or enemy-side construction","error propagation and action finalization","per-record kind 3/7 presentation-side publication","shared resource and transition cleanup"],"bounded_search":{"mode":"classic-exact-only","attempted":10000,"compile_failures":139,"exact":false,"baseline_structural_rows":29,"best_structural_rows":11,"best_generated_candidate_bytes":272,"best_generated_differing_halfwords":125},"notes":["This complete orchestration owner directly calls the neighboring action builders at 080b920c, 080b9324, and 080b9724 and the measured finalizer at 080b9470.","Independent object comparison proves all 200 relocation- and literal-normalized core bytes identical across all six approved GS1 editions.","The earlier 276-byte / 99-halfword draft initialized the caller output array instead of the distinct global twenty-slot display table at battle+0x2ec. The lower score was semantically wrong and was rejected; the corrected readable source is 280 bytes / 139 halfwords / 110 wrong instructions.","A fresh bounded 10,000-candidate search from the corrected source reached exact extent and eleven structural rows only through a long chain of synthetic temporaries and expression rewrites; it still differed by 125 halfwords and was rejected.","Retained assembly remains authoritative; this measured draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, and local callers and callees. No GS2 source or data was inspected or changed."]},"main:080b9b30":{"schema_version":1,"namespace":"main","address":"0x080b9b30","status":"measured-draft","owner_bytes":516,"executable_owner_bytes":516,"candidate_bytes":512,"differing_halfwords":150,"wrong_instructions":124,"cross_edition":{"object_bytes":516,"relocation_bytes":104,"literal_bytes":68,"relocation_normalized_core_bytes":344,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b0b30","en":"0x080b9b30","de":"0x080bc148","es":"0x080bdb48","fr":"0x080bdb48","it":"0x080b9b48"}},"domain":"Validates and prepares a queued battle action, dispatches its presentation mode, restores visible units, and reports whether the action must remain active.","expressed":["invalid and inactive actor rejection","battle presentation transition and render-state setup","temporary selected-unit visibility mode","nine-way presentation dispatch from battle action state","visible-unit restoration and action completion","special transition result that preserves the queued action"],"bounded_search":{"mode":"classic-exact-only","attempted":10000,"compile_failures":962,"exact":false,"baseline_structural_rows":30,"best_structural_rows":19,"best_generated_candidate_bytes":508,"best_generated_differing_halfwords":132},"notes":["Auditing the jump-table targets corrected the inherited draft's semantic case mapping: cases 3/4 run the paired-unit transition, cases 5/6/7 select presentation variants 0/1/2, case 8 runs the action-aware presentation, and case 9 is the action-preserving presentation. This reduces the readable residual from 177 halfwords / 140 wrong instructions to 153 / 126.","The readable candidate reproduces the exact 32-byte frame and complete control-flow semantics but retains broad register-allocation, literal-pool, and switch-layout differences, so it claims zero DONE bytes.","A bounded 10,000-candidate search reduced structural rows from 30 to 19, but its best source was eight bytes short, still differed by 132 halfwords, and accumulated a type-changing cast plus synthetic temporary and one-shot-block mutations. It was rejected rather than weakening the readable semantics.","Declaration-order and split palette-result carriers were byte-neutral. A pointer/decrement cleanup loop shortened the owner and regressed wrong-instruction count, so the clearer indexed cleanup loop remains.","The six approved GS1 editions share all 344 relocation- and literal-normalized core bytes; edition differences are confined to expected relocated calls and literals.","Recovered only from retained owner assembly, the six local GS1 ROMs, exact local callers, nearby presentation drafts, and the approved compiler. No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used.","measured=2026-08-29: sequencing 'render_state = *(transition_slot - 32)' after the 'battle+0x644 = 0x10000' store (instead of before it, matching the struct's field order) realigned the render_state load/shift/store triplet with the reference and dropped the residual from 153/126 to 150/124. Kept.","measured=2026-08-29 refuted: hoisting the shared 0x01fe0000 literal out of 'Func_08005258(0x01fe0000, Func_080072f0(0x01fe0000, 0xc000), 0x7fff0000)' via an explicit temporary (assigning through 'result') matched the owner's 516-byte size but regressed to 198 differing halfwords / 156 wrong instructions -- the compiler still re-hoists the shared constant across the call boundary in a different, worse shape. Reverted.","measured=2026-08-29 refuted: reordering 'battle = *(transition_slot - 35)' ahead of the 'transition = ...' load (so battle's live range is established first) did not flip the transition/battle r6<->r7 register-allocator swap that accounts for the bulk of the remaining wrong_instructions in the switch body; it also undid the render_state fix's ordering and regressed to 153/124. Reverted. The r6/r7 swap looks driven by something other than statement or declaration order (already independently confirmed byte-neutral above); local-alloc internals, not source order, decide it here.","measured=2026-08-29 refuted: replacing the 'if (preserve_action) goto finish;' early-exit with an equivalent 'if (preserve_action == 0) { ...cleanup... }' guard (removing the goto/label) regressed to 154/140 -- the goto's unconditional branch is load-bearing for where arm_reorg's minipool barrier lands, which is the root cause of the remaining branch-target mismatch (b.n 0x1f0 vs reference's b.n 0x1d2) and the mid-function literal-pool bytes disassembling as garbage instructions after it. Reverted.","measured=2026-08-29 refuted: changing the visible-unit restoration loop's sentinel from 'index < visible_count' to 'index != visible_count' regressed sharply (500 candidate bytes, 188 differing halfwords) -- the loop already uses the correct bounded form. Reverted.","2026-08-29: mid-session, alchemy-gcc's agscc/gcc/config/arm/{arm.c,arm.h} were found modified on disk by a concurrent process (an experimental TARGET_MINIPOOL_FIRST_BARRIER flag, uncommitted) and gs1/cc1 started failing its approved-digest check for every candidate-show call, including on this owner's unmodified baseline. The source was reverted with 'git checkout' (undoing that external, unauthorized compiler change, not making one) and alchemy-gcc was rebuilt with the committed 'make'/'make clean && make'. The resulting cc1 is source-identical to the pinned darwin-arm64 build but hashes differently (7e1cb107...), most likely from non-reproducible linker metadata (e.g. Mach-O build UUID), and is not yet in the bundle_data.rs allow-list, so candidate-show is currently blocked by 'alchemy-gcc gs1/cc1 has an unapproved digest'. Admitting a new digest requires a clean-tree 'make verify'/'make full-rom-check' pin, which needs staging the whole repo including unrelated concurrent in-flight changes (games/gs1/recon/en/main/080b2b10.c was independently dirty throughout), so that admission was left undone as out of scope for a single-owner task. All differing_halfwords/wrong_instructions figures in this record were measured before that outage began and are trustworthy (the pre-outage build's baseline reading exactly reproduced this record's prior 153/126 figures)."]},"main:080b9dc4":{"schema_version":1,"namespace":"main","address":"0x080b9dc4","status":"proven-retained","owner_bytes":252,"executable_owner_bytes":250,"candidate_bytes":252,"differing_halfwords":1,"wrong_instructions":2,"classification":"compiler_zero_rematerialization_mismatch","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"measured":"2026-08-30","editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":182,"core_diff_bytes":0,"core_identical":true},"compiler_proof":{"measured":"2026-08-30","sources":["the recorded first-CSE RTL trace in register_gate_step4_probe","alchemy-gcc/agbcc/gcc_arm/reload1.c:9012"],"finding":"first CSE turns the source completed-to-party_mode copy into literal zero; reload_cse_simplify_set then explicitly refuses to replace a cheap zero constant with the equivalent live completed register","application":"the only residual is candidate movs r2,#0 versus reference adds r2,r7,#0, while r7 contains the same zero"},"register_gate_step4_probe":{"date":"2026-08-28","result":"exhausted-not-a-closure","baseline":{"candidate_bytes":252,"reference_bytes":252,"differing_halfwords":1},"decoder_signal":"cse-rematerialized-constant-from-live-value","decoder_evidence":["Initial RTL has completed pseudo 37 set to zero and party_mode pseudo 38 copied from pseudo 37.","First CSE alone replaces the copy with a literal zero; cse2 preserves it.","Local and global allocation are already correct: completed maps to r7 and party_mode maps to r2."],"requested_edit":"preserve the completed-to-party_mode copy past first CSE","bounded_results":[{"shape":"block-local-party-mode","candidate_bytes":252,"differing_halfwords":1,"effect":"baseline-equivalent"},{"shape":"block-local-encounter-mode-then-party-mode","candidate_bytes":244,"differing_halfwords":102,"effect":"collapsed the required flag materialization"},{"shape":"static-inline-identity-copy","candidate_bytes":252,"differing_halfwords":1,"effect":"first CSE still folded the copy to zero"}],"prior_results_accounted_for":["defer completed initialization after the preceding call","nonescaping pointer alias of completed","completed u8 carrier","redundant trigger conditional"],"decision":"No bounded ordinary-C edit preserved the copy across first CSE. The source and retained assembly remain unchanged; this probe does not count toward the five required closures."},"rejected":[{"hypothesis":"volatile s32 completed = 0; (force memory load instead of constant propagation so the reference's adds r2,r7,#0 register-copy shape emerges)","measured":"2026-08-29","differing_halfwords":135,"baseline":1,"verdict":"regressed heavily: candidate_bytes=272, wrong_instructions=68; volatile forces reloads throughout the function, not just at the one seed site"},{"hypothesis":"static s32 completed = 0; (BSS/data storage instead of stack, to discourage constant folding of the initial value)","measured":"2026-08-29","differing_halfwords":64,"baseline":1,"verdict":"regressed: candidate_bytes=264, wrong_instructions=32; static storage changes addressing mode for every use of completed"},{"hypothesis":"route completed's zero through a single-element local array (completed_store[0] = 0; completed = completed_store[0];) to break the compile-time-constant chain before the party_mode copy","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"baseline-equivalent, no change: candidate_bytes=252, wrong_instructions=2; compiler still constant-propagates through the array read"},{"hypothesis":"declare party_mode before completed (reverse local declaration order) to perturb pseudo-register numbering ahead of first CSE","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"baseline-equivalent, no change: candidate_bytes=252, wrong_instructions=2"}],"notes":["Resolves a battle presentation trigger: either announces the encounter, visits unstunned living party units, or activates and tears down a selected battle object based on a bounded random test.","Correct party and unit layouts raise structural similarity to 85.58 percent, but stack layout, branch shaping, loop allocation, and call scheduling remain broad. It did not meet the bounded-search or permanent-residual gate.","2026-08-27: bounded search closed differing_halfwords from 116 to 1 (wrong_instructions 33 to 2). Three source-level fixes did the work: (1) unit_ids widened from u16 to s16 (cast to u16* only at the BattleParty_ListLivingUnits call site) so both party-index reads compile to ldrsh instead of ldrh, matching the reference's signed-extend addressing; (2) the living-unit loop condition rewritten from `index >= 0` to `index != -1`, which makes the compiler synthesize the loop bound via movs #1/negs (compare against -1) instead of cmp/blt-bge, matching the reference's loop-footer shape; (3) scene's raw pointer address rewritten as `presentation_addr - 140` (arithmetic from a u8 * holding 0x03001f00) instead of the independent literal 0x03001e74, which makes the compiler reuse the already-loaded 0x03001f00 register via `subs r3,#140` instead of emitting a second literal-pool load -- this alone recovered the full 8-byte size gap and collapsed most of the remaining diff. The encounter_mode==2/party-loop branch was also restructured as a `party_mode = completed; if (cond) party_mode = 1; if (!party_mode) ... else ...` two-statement flag pattern (rather than a direct nested if/else) to reproduce the reference's default-value-then-conditional-override branch shape (movs/beq/movs/cmp/bne) instead of a single collapsed bne -- this matched the branch senses and block order exactly.","Remaining single differing halfword (wrong_instructions=2, both counting the same spot): candidate emits `movs r2, #0` where the reference emits `adds r2, r7, #0` (copying the already-live completed==0 value from r7) to seed party_mode's default before the encounter_mode compare. Both are 2-byte, flag-setting, functionally identical zero-into-r2 encodings -- pure register-CSE opcode choice, not a control-flow or data difference. Tried and rejected (no effect, or regressed structure/size): `party_mode = completed` vs `= 0` (identical output either way -- proves the compiler constant-propagates completed to 0 before this point regardless of aliasing to the variable); `party_mode = completed + 0` (still folds to a fresh immediate); hoisting party_mode's declaration/init to function scope before the outer if (changed register allocation wholesale, regressed to candidate=260, wrong_instructions=58); u32 vs s32 type for party_mode (no effect); swapping completed/party_mode declaration order (no effect); ternary `party_mode = (encounter_mode==2) ? completed : 1` and plain if/else `party_mode = completed; else party_mode = 1;` in place of the default+override form (both collapse the compiler back to a single direct branch, losing the whole flag-materialize shape and regressing size to 244). This looks like a genuine postreload-CSE/register-allocator threshold difference between our toolchain build and whatever produced the ROM, not reachable by further legitimate C restructuring without forcing register assignment (prohibited by CONTRIBUTING.md). Did not run the adoption gate per instructions; final candidate-show: candidate=252 reference=252 differing_halfwords=1 wrong_instructions=2 matched_prefix=25."]},"main:080b9ec0":{"schema_version":1,"namespace":"main","address":"0x080b9ec0","status":"measured-draft","owner_bytes":954,"executable_owner_bytes":954,"candidate_bytes":960,"differing_halfwords":467,"wrong_instructions":363,"cross_edition":{"object_bytes":954,"relocation_bytes":124,"literal_bytes":68,"relocation_normalized_core_bytes":762,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b0ec0","en":"0x080b9ec0","de":"0x080bc4d8","es":"0x080bded8","fr":"0x080bded8","it":"0x080b9ed8"}},"domain":"Runs the selected-unit battle presentation transition, temporarily hiding incompatible unit sprites, preparing presentation context and ability data, executing the selected transition, and restoring the visible-unit set.","expressed":["transition direction and palette/blend setup from the selected unit side","initial and refreshed visible-unit enumeration with ally/enemy filtering","selected-unit sprite handling and sixteen-frame blend ramps","message-driven and context-driven presentation branches","presentation-context unit and ability preparation","flag-selected transition callback and final sprite restoration"],"bounded_search":{"mode":"classic-exact-only","attempted":10000,"compile_failures":261,"exact":false,"baseline_structural_rows":230,"best_structural_rows":162,"best_generated_candidate_bytes":948,"best_generated_differing_halfwords":446},"notes":["The address gap to 080ba2c0 is 1024 bytes, but independent executable-owner analysis proves this function is 954 bytes; the trailing 70 bytes are not part of the owner.","The complete readable candidate is six bytes longer than the owner and retains a broad register-allocation, frame-layout, literal-pool, and loop-shape residual, so it claims zero DONE bytes.","The 10,000-candidate search reduced the structural row count only through a long chain of synthetic temporaries, declaration reorderings, one-shot blocks, and expression rewrites. Its best remained shorter than the reference and 446 halfwords different, so the generated artifact was rejected.","No exact C or narrow compiler residual was found; retained assembly remains ordinary unresolved compiler output and was not promoted permanently.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local battle callers and types, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: This owner scored below the family-transplant threshold (7453/10000, LOW confidence) with games/gs1/src/shop/select_use_item.c as the best guess. Read that source in full: it is a shop item-selection input loop (UiWindow-based menu, Modulo-based cursor wrap, no presentation/context/ability handling) with no shared callees, field offsets, or constants against this owner -- the family-matcher's match was shape-only (same register-shuffle prologue), confirming the session-wide warning about this cluster's false positives. No adopted exact sibling exists yet for any of the other BattlePresentation_* owners in this address range (080b60a0, 080b8574, 080b88d0, 080b920c, 080b9324, 080b9724, 080b9934, 080b9b30, 080ba2c0) to borrow vocabulary from; all remain measured-draft. Re-verified the committed draft against current assembly: differing_halfwords=467, wrong_instructions=363, matched_prefix=7 -- divergence starts at instruction 8 (the `sub sp` frame size and everything downstream), so this is a broad structural mismatch, not a last-mile residual. Tested one structural hypothesis: materializing `context` and `visible_units` as genuine pointer locals (`u8 *ctx = context;` / `u16 *vis = visible_units;`, assigned as their own statements per this codebase's documented idiom) so their addresses are computed once and held in registers throughout, mirroring the reference's permanent r7/sl role assignment. This reproduced the reference's exact `sub sp, #124` frame size (previously #128) but did not reach a clean win overall: differing_halfwords improved marginally to 464 while wrong_instructions rose to 383 and candidate size dropped to 936 (18 bytes under reference, versus 6 over previously); `context`'s base register still lands at sp+40 instead of the reference's sp+12, and `selection` still allocates to sl instead of r9. Given this was a mixed, non-monotonic result well short of the 446-halfword floor this owner's own prior 10,000-candidate bounded search already reached (and rejected as still not exact), it was not adopted over the existing committed draft. No exact C or narrower residual was found this session; the owner's register/frame allocation remains an unresolved broad structural disagreement, consistent with the prior session's conclusion."]},"main:080ba2c0":{"status":"proven-retained","classification":"compiler_entry_scheduling_module","span_bytes":708,"edition":{"role":"shared-candidate-wrapper","edition":"en","base_owner":"080b12c0","base_edition":"ja","rebase_status":"proved-shared-core"},"cross_edition":{"measured":"2026-08-23","object_bytes":708,"core_bytes":504,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"080b12c0","en":"080ba2c0"},"callee_correspondences":25,"core_identical":true},"score":{"measured":"2026-08-23","candidate_bytes":708,"reference_bytes":708,"differing_halfwords":133,"wrong_instructions":18,"matched_prefix_instructions":11,"class":"compiler-entry-scheduling-retention","note":"The coherent shared-source recovery has exact object size. Its normalized instruction residual is confined to the entry/facing block before the first literal pool; the retained assembly remains authoritative."},"domain":"Coordinates one battle presentation sequence: establishes camera facing, builds battle work, configures display state, then runs either the direct presentation or the scripted motion and resolution path.","expressed":["JA-base/EN-wrapper ownership backed by the proved all-edition-identical core","camera-facing calculation and frame delays","battle-work construction and special flag handling","unit, motion-record, divisor, display-register, and object-action setup","direct presentation path and scripted motion loop","resolution dispatch, cleanup, and final object teardown","edition-specific playback callback address supplied by the thin wrapper","typed input, work, motion, record, object-slot, and unit layouts backed by exact local offsets"],"unexpressed":[{"op":"entry input reload and facing-store scheduling","count":18,"where":"the normalized residual before the first literal pool; later code resynchronizes"}],"retention":"keep_structured_asm","next":"Retain the EN file as the complete semantic wrapper and the JA file as the shared source record; approved compiler and source searches prove the remaining entry schedule cannot be emitted without forbidden register constraints.","verified_against_reference":["fresh candidate-show build: 708 candidate bytes versus 708 reference bytes, 133 differing halfwords, and 18 wrong aligned instructions","the normalized residual is limited to input reload/load ordering around the facing store and the first literal-pool boundary","relocation-aware cross-edition comparison proves 504 core bytes agree in all six editions with 25 established callee correspondences"],"rejected":[{"shape":"broad top-level cached-coordinate carriers","result":"extended unrelated lifetimes and regressed to 744 candidate bytes and 236 wrong instructions"},{"shape":"inner do/while with a separate angle-step carrier","result":"allocated the work pointer differently and scored 740 candidate bytes with 230 wrong instructions"},{"shape":"unsafe diagnostic heat-search result","result":"reached 712 candidate bytes and 60 wrong instructions only by narrowing an arithmetic carrier to char; rejected as a semantic change"},{"shape":"volatile saved-input carrier","result":"expanded the frame and regressed to 724 candidate bytes and 120 wrong instructions"},{"shape":"inherit 080bbb0c's -fno-cse-follow-jumps route","result":"byte-neutral here; the compiler flag is owner-specific and was not added"},{"shape":"safe bounded heat searches","result":"10,000 iterations from the initial candidate and 20,000 iterations from the near-exact candidate found no verified improvement"},{"shape":"approved compiler-family and optimization sweep","result":"routed/GCC 2.96 -O2 and -O3 preserve the exact 708-byte extent and identical 18-instruction entry residual; -O0, -O1, and -Os regress sharply; old-agbcc produces 696--1130 bytes with 386--611 wrong instructions"}],"notes":["Moving the scripted carrier before the facing pointer repaired the reference stack-slot order; keeping loop coordinate carriers inside the loop repaired the long-lived register allocation.","The linked halfword count is amplified by the one-halfword displacement before the first literal pool; normalized instruction comparison isolates the remaining 18 instructions.","No external source, git history, compiler modification, copied instruction bytes, fixed-register variables, barriers, or inline assembly was used.","2026-08-27 re-verification only: fresh candidate-show still measures exactly 708/708 bytes, 133 differing halfwords, 18 wrong instructions, matching this dossier -- no drift. Given the already-exhaustive rejected list above (structural respellings, a compiler-family/optimization-level sweep including old-agbcc, and two bounded heat searches totaling 30,000 iterations), no new attempt was made this pass; nothing here suggests a fresh angle beyond what those prior searches already ruled out."]},"main:080ba6ac":{"schema_version":1,"namespace":"main","address":"0x080ba6ac","status":"measured-draft","owner_bytes":620,"candidate_bytes":600,"differing_halfwords":290,"classification":"allocation-and-scheduling","domain":"Runs a battle presentation, copies motion-child state, performs a palette fade, cleans up actors, and dispatches the selected ability result through the battle-event queue.","notes":["2026-08-27: two structural, non-forced levers cut the gap from 624/306 to 600/290. (1) dispatch-shape: the AbilityInfo->kind dispatch was a `switch(kind){case 1: case 2: case 4:}`, which routed gcc296 lowered as a 3-way binary-search compare tree (test 2 first, then branch high/low). The reference instead uses a plain ascending if/else-if chain (kind==1, else (u8)kind==2, else (u8)kind==4) with no binary search. Rewriting the switch as that if/else-if chain matched the reference's compare order and alone took the candidate from 624 to 616 bytes (306 to 302 differing halfwords). (2) typed work record: `struct PresentationWork` was previously an opaque `u8 bytes[84]` accessed everywhere through `FIELD(base,type,offset)` (`*(type*)((u8*)base+offset)`). For the scalar/array fields (offset 0, 4, 8, the offset-20 loop count, the offset-36 s16 table, the offset-52 u8 values) that pointer-cast form was apparently treated by routed gcc296 as a distinct hoistable pointer value: it computed `&work+20` once into a dedicated register (sl) and reused that cached pointer for both the loop guard and the do-while tail check of the two `count`-bounded loops, instead of folding the constant +20 into each load's immediate offset the way the reference does (`ldr r3,[r5,#20]` recomputed fresh, base+immediate, no cached sub-pointer). Replacing those FIELD accesses with true struct-member accesses (work.field_00/04/08, work.count, work.table[i], work.values[i*4+j]) stopped that hoist: the frame shrank from the candidate's 92 bytes to 88 (now bytewise matching the reference's `sub sp, #88`), and size dropped 616 to 604 (302 to 300 diffs). The runtime-indexed second-loop access (`FIELD(&work, s16, saved_offset)`, offset not known at compile time) was deliberately left as macro-based pointer arithmetic since it already matched the reference exactly. (3) loop-local index: scoping the first loop's index into its own block-local `s32 i1` (previously it shared the function-wide `s32 i` used by three unrelated loops) shaved a further 4 bytes, 604 to 600 (300 to 290 diffs) by improving cross-loop register coalescing. The identical scoping trick applied to the second (saved_offset) loop was tested and reverted: byte-identical output, it only reshuffled which physical registers (r6 vs r7) carried the same roles.","Remaining, confirmed NOT reachable through legitimate C restructuring: inside the first loop routed gcc296 strength-reduces BOTH linear accesses keyed off the loop index -- work.table[i] (stride 2) and work.values[i*4+j] (stride 4) -- into persistent per-iteration accumulator registers. The reference binary only strength-reduces the stride-4 (values) access; the stride-2 (table) address is recomputed fresh every iteration via `lsls r3,r7,#1; adds r3,#36` from the work-base register (r5), never cached. That extra cached accumulator is exactly the difference between the candidate needing 7 simultaneously live registers during the first loop (input, selection, object, work-base, loop counter, table-accumulator, byte-accumulator) and the reference needing 6 (no table-accumulator) -- with only 6 non-fp callee-saved slots available (r5,r6,r7,r8,r9,sl), the 7th forces the candidate to additionally save/restore fp, which the reference never touches. That single extra register is the root of essentially all of the remaining diff: it costs ~8 bytes of prologue push/mov and ~8 of epilogue pop/mov directly, and it reassigns which physical register (r8 vs r9 vs sl vs fp) carries each of input/selection/object/work for the rest of the function body, so almost every later instruction differs only in register number, not in shape. This was tested directly and could not be changed short of forcing register assignment (disallowed): switching work.table[i] between struct-array-indexing and raw FIELD-macro pointer arithmetic produced byte-for-byte identical output either way, and giving the loop a dedicated index variable (vs. the earlier fix that did help for other reasons) did not by itself suppress the accumulator. The strength reduction appears to be an intrinsic, all-or-nothing decision of gcc296's induction-variable pass for a loop with two same-index linear array accesses, not a decision exposed to source-level control.","Secondary, minor residual: in the second dispatch arm ((u8)kind==2), the reference re-derives the truncated byte via `lsls r3,r2,#24; lsrs r3,r3,#24` immediately before the compare, even though r2 already holds a zero-extended byte from the preceding `ldrb`, making that mask provably redundant. Routed gcc296's value-range analysis elides the same redundant mask in the candidate. This costs a handful of halfwords and was not chased further, since the register-count gap above dominates the remaining diff by more than an order of magnitude.","Explicit register-qualified carriers remain byte-neutral: this was re-tested for `register s32 object` (the whole-function-lived object id, not just the pointer carriers noted previously) with zero effect on the emitted bytes.","Old agbcc produces 572 bytes with 308 differing halfwords (against the original 624/306 candidate baseline; not retested against this draft). The register mismatch that remains is still pervasive across 5 physical registers (r5 matches; r6/r7/r8/r9/sl/fp all carry different logical variables than the reference at various points) and is judged very unlikely to close further without either a different gcc296 IV-optimization decision than routed gcc296 makes for this loop shape, or forcing register assignment, both out of scope per CONTRIBUTING.md.","Retained assembly remains authoritative and this draft claims zero bytes. No inline assembly, fixed-register variable, compiler barrier, invented compiler flag, or copied instruction bytes were used."]},"main:080ba978":{"schema_version":1,"namespace":"main","address":"0x080ba978","status":"measured-draft","owner_bytes":612,"candidate_bytes":612,"differing_halfwords":261,"classification":"allocation-and-scheduling","wrong_instructions":218,"objdiff_structural_percent":77.85348,"edition_starts":{"ja":"0x080b1978","en":"0x080ba978","de":"0x080bcf90","es":"0x080be990","fr":"0x080be990","it":"0x080ba990"},"domain":"Sets battle-presentation facing, constructs motion work, dispatches queued script events, runs the direct presentation path, and cleans up participating actors.","notes":["All six starts are bounded by the exact 080ba918 and 080babdc sibling correspondences and preserve the same 612-byte owner extent.","Removing a cached primary-id scalar repaired the frame extent from 616 to 612 bytes and reduced the aligned residual from 286 to 218 wrong instructions.","The measured target-sequence partition ranks setup first (88 nonexact target instructions), orientation second (85), dispatch/cleanup third (30), the motion-copy loop fourth (10), and the epilogue last (5).","The remaining mismatch is long-lived allocation: the candidate saves fp/r9 and places flags in r8, while the reference retains input in r7, flags in sl, the work pointer in r5, and the resolved object in r8.","The work actor identifier at offset 8 is word-wide, and Func_080b7dd0 accepts a promoted integer identifier. Correcting both source types is byte-neutral in the current allocation family but records the access contract used by the exact reference.","Bounded second-pass trials rejected an explicit offset-and-pointer motion loop (608 bytes, 294 differing halfwords, 230 wrong instructions), a fully typed 84-byte work structure (616 bytes, 271 differing halfwords, 226 wrong instructions), signed motion identifiers (616 bytes, 266 differing halfwords, 230 wrong instructions), explicit nested side tests (604-620 bytes, 294 differing halfwords, 238-244 wrong instructions), and unsigned-return/explicit-truncation angle carriers (620-624 bytes, 287-300 differing halfwords, 272 wrong instructions).","Retained assembly remains authoritative and this measured candidate claims zero bytes."]},"main:080bac6c":{"schema_version":1,"namespace":"main","address":"0x080bac6c","status":"measured-draft","owner_bytes":124,"candidate_bytes":112,"differing_halfwords":57,"wrong_instructions":47,"classification":"battle-actor-list-removal","cross_edition":{"core_bytes":104,"core_identical":true,"relocations":2,"literal_fields":3,"starts":{"ja":"0x080b1c6c","en":"0x080bac6c","de":"0x080bd284","es":"0x080bec84","fr":"0x080bec84","it":"0x080bac84"},"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0}},"domain":"Removes one actor from the live or placement list, clears its live marker, updates related actor state, and clears matching queued action slots.","expressed":["the live actor marker at unit offset 0x12a","the 0xff-terminated live list at battle-work offset 0x58","the 0xff-terminated placement list at battle-work offset 0x66","the 0xfe vacant marker used by both lists","the direct state-update call after a successful removal","the twenty 16-byte queued action slots beginning at battle-work offset 0x2ec"],"call_evidence":["the direct 080bd898 battle presentation caller removes its current actor during teardown","BattleActor_DestroyTemporaryObject and BattleMotion_InitializeActorRecords call this owner in their matching actor-cleanup paths","the owner directly calls the battle unit lookup and 080c1ebc actor-state cleanup owners"],"ranking":{"reason":"Largest previously unmeasured owner at or below 192 bytes in the one-hop caller/callee neighborhood of exact 080bbb0c, with a six-edition identical normalized core.","other_identical_candidates":[{"address":"0x080bd850","bytes":72,"core_bytes":56,"disposition":"skipped: relies on a caller-established r9 hidden argument before an indirect IWRAM call; ordinary local C semantics are not yet proved"},{"address":"0x0800393c","bytes":64,"core_bytes":56,"disposition":"the coherent video/DMA translation unit reduces this queue writer to a four-halfword ordering residual under canonical flags"},{"address":"0x080039fc","bytes":64,"core_bytes":56,"disposition":"constant-only sibling with the same coherent-unit four-halfword ordering residual"},{"address":"0x080b7548","bytes":148,"core_bytes":136,"disposition":"already has a complete draft and a prior bounded 50,000-candidate search without exact output"}]},"bounded_checks":["natural pointer, structured-array, integer-base, structured-loop, and evidence-equivalent goto forms were directly scored","the local structural reconstruction confirmed the two sentinel scans and the final twenty-entry loop","-fno-schedule-insns2, -fno-strength-reduce, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-schedule-insns, and -fno-regmove did not produce a narrow residual","the best normalized draft remains too far from parity for the requested 20,000-candidate last-mile cap"],"adoption":"none; retained assembly remains authoritative and this draft claims zero DONE bytes","notes":["Recovered only from retained owner assembly, approved local ROMs, in-repository callers/callees, and the approved compiler.","No GS2 source or data was inspected or changed for this reconstruction.","2026-09-01 absolute-symbol tempering: the source now names the linker-resolved 0xFE value BattleActorList_VacantMarker through an ordinary-C compatibility macro over Data_000000fe. Fresh scoring is output-neutral and corrects the stale dossier measurement to 112/124 bytes, 57 differing halfwords, and 47 wrong instructions."]},"main:080bad7c":{"schema_version":1,"namespace":"main","address":"0x080bad7c","status":"measured-draft","owner_bytes":194,"candidate_bytes":194,"differing_halfwords":67,"wrong_instructions":60,"classification":"battle-random-target-position","cross_edition":{"starts":{"ja":"0x080b1d7c","en":"0x080bad7c","de":"0x080bd394","es":"0x080bed94","fr":"0x080bed94","it":"0x080bad94"},"core_identical":false,"normalized_core_diff_bytes_from_ja":{"ja":0,"en":2,"de":7,"es":4,"fr":4,"it":4}},"domain":"Builds an encoded target-position list from one side of the battle turn order and returns a uniformly selected entry, optionally rejecting vacant and defeated units.","expressed":["the normal-list path with vacant-unit and zero-HP rejection","the mirrored-list path with vacant-unit rejection","the 0x100 and 0x180 encoded turn-order positions","the empty-list zero result and uniform 16-bit random selection"],"recovered_layout":{"frame_bytes":16,"position_array_offset":4,"position_capacity":6},"bounded_checks":["a direct typed-array loop emitted 198 bytes with 116 wrong instructions and unnecessary high-register saves","pointer-walking both lists recovered the exact 16-byte frame and r4/r5/r6/r7 register family, reducing the aligned residual to 90 wrong instructions","a hybrid pointer/indexed form regressed to 107 wrong instructions","2026-08-27: rewriting the normal-list loop from an if-guarded do-while to a plain while loop with the loop-continuation test read ahead into unit_id at the bottom of the body (rather than re-testing *entry) eliminated the compiler's loop-carried value-forwarding artifact (a redundant unsigned ldrh plus manual lsls/asrs sign-extend on every iteration) for that loop, and also shrank candidate_bytes from 198 to exactly 194 (matching owner_bytes) as a side effect of the resulting register allocation; wrong_instructions fell 90 -> 80 from this change alone","2026-08-27: swapping the final selection multiply from `count * Random16()` to `Random16() * count` matched the reference's operand copy order (count copied into the accumulator register first) and dropped wrong_instructions 80 -> 60, differing_halfwords 69 -> 67","2026-08-27: the same while-loop-plus-read-ahead rewrite applied to the mirrored-list loop (with or without keeping its outer if-guard) consistently regressed wrong_instructions to 104+ and broke the otherwise-exact match on that loop's positions-pointer address computation (the sp+16-then-subtract-12 idiom); the mirrored loop's original if-guarded do-while, unmodified, remains strictly better and is retained","2026-08-27: the remaining 60 wrong instructions are almost entirely a single root cause -- the compiler keeps turn_order's dereferenced value in r3 (reusing the address-of-global scratch register) where the reference keeps it in r1 (treating r3 as a free scratch for immediate offsets throughout) -- which cascades into every downstream register choice; declaration-order changes, statement-order changes, and hoisting/duplicating index=0 were all tried and either had no effect or regressed, so this residual is register-allocation-level and no further permutation search is justified"],"notes":["All six edition starts are proved, but this owner is not a constant-only all-six core: the normalized reference cores retain two to seven regional bytes of difference.","Retained assembly remains authoritative and this draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, repository battle types and its direct caller, and the approved compiler. No GS2 source or data was inspected or changed.","2026-08-27: candidate_bytes now matches owner_bytes exactly (194) and wrong_instructions improved from 90 to 60 (differing_halfwords 96 -> 67) via two source-level changes: (1) the normal-list scan loop rewritten from if-guarded do-while to a while loop with the sentinel value read ahead into unit_id at the bottom of the loop body instead of re-testing *entry, and (2) the final random-index multiply reordered to `Random16() * count`. Score verified with: cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080bad7c.c --owner 0x080bad7c --size 194 --align"],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"same-size body with 60 wrong instructions \u2014 real opcode divergence, not pool residue","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."}},"main:080bae40":{"schema_version":1,"namespace":"main","address":"0x080bae40","status":"measured-draft","owner_bytes":1864,"candidate_bytes":1888,"differing_halfwords":689,"wrong_instructions":612,"classification":"battle-action-target-selection","cross_edition":{"object_bytes":1864,"relocation_normalized_core_bytes":1456,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b1e40","en":"0x080bae40","de":"0x080bd458","es":"0x080bee58","fr":"0x080bee58","it":"0x080bae58"}},"domain":"Selects an eligible battle target for an action, including effect applicability, target-list compaction, strategy-dependent ordering, and weighted or uniform random choice.","expressed":["the complete normal-versus-mirrored turn-order scan and encoded target positions","all effect and target-flag applicability cases through the 65-entry effect dispatch","dead-unit, healing, cure, modifier, and status eligibility rules","the compacted eligible target list and -2/-1 empty-list results","strategy-dependent current-HP or maximum-HP descending ordering","the one-, two-, three-, and four-target weighted random selections and the uniform fallback"],"recovered_layout":{"frame_bytes":92,"eligible_positions_offset":32,"unit_ids_offset":56,"turn_order_positions_offset":80},"remaining":["entry register allocation and the first turn-order literal-pool placement","source texture around the effect jump-table tails and shared branches","bubble-sort pointer allocation and weighted-selection result allocation"],"rejected_experiments":["seven-element local arrays produced a 96-byte frame; six-element arrays plus declaration ordering recover the exact 92-byte frame and all three reference array bases","a shared normal/mirrored order pointer reduced readability and retained broad allocation disagreement","raw s16 turn-order indexing restored major block boundaries but scored 1892/1864 bytes and 618 wrong instructions, slightly worse than the typed BattleTurnOrder form","routed and explicit GCC 2.96 routes preserve the 612-instruction residual; old-agbcc changes the prologue and broad owner shape"],"notes":["This is a complete semantic candidate, not a partial m2c transcription. Retained assembly remains authoritative and the draft claims zero DONE bytes.","The normalized reference core is identical in all six GS1 editions and uses the same JA-to-EN battle-owner shift as the exact 080bbb0c family.","No broad permanent classification or bounded permutation search is justified at this residual.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, repository battle types and callers, and the approved compiler. No external source, history, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"lines 214-216: beq.n where the reference has bne.n plus b.n \u2014 genuine branch-topology divergence; class structural-topology, wrong_instructions=290","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."},"entry_pool_diagnosis":{"measured":"2026-08-31","verdict":"SOURCE-GATE-REFUTED; COMPILER-BARRIER-PLACEMENT-CONFIRMED","score":"candidate_bytes=1884, reference_bytes=1864, differing_halfwords=268, wrong_instructions=290","evidence":"The first divergence is the entry target-mode guard: the reference emits bne to the scan body followed by an unconditional branch over a natural 4-byte minipool at local offset 0x40, while GCC emits the equivalent single inverted beq and therefore moves the same early literal to local offset 0xa4. Rewriting the C as two explicit gotos and a named scan_target_order label compiled byte-identically; GCC jump folding removes that source distinction before arm_reorg. In GCC 2.96 arm_reorg, only BARRIER RTL nodes are eligible natural minipool dump points, directly explaining why the folded branch changes every early pool-relative load. -fno-thread-jumps preserved the folded entry and regressed the score to 270 differing halfwords / 294 wrong instructions; -fno-expensive-optimizations and -fno-rerun-cse-after-loop regressed broadly; -fno-optimize-sibling-calls was byte-identical. The custom thumb-pool switches present in the separate agbcc research harness are not shipped agscc options and are rejected by cc1. Do not repeat entry-goto respellings or generic optimization-axis probes; the remaining structural work must identify the source construct that survives into a natural RTL barrier or explain the original per-TU compiler route.","reference_compiler_path":"alchemy-gcc/agscc/gcc/config/arm/arm.c: arm_reorg scans BARRIER nodes, then chooses last_barrier before dump_minipool"}},"main:080bb65c":{"schema_version":1,"namespace":"main","address":"0x080bb65c","status":"measured-draft","owner_bytes":356,"executable_owner_bytes":356,"candidate_bytes":360,"differing_halfwords":163,"wrong_instructions":138,"cross_edition":{"object_bytes":354,"relocation_bytes":48,"literal_bytes":48,"relocation_normalized_core_bytes":258,"alignment_bytes":2,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b265c","en":"0x080bb65c","de":"0x080bdc74","es":"0x080bf674","fr":"0x080bf674","it":"0x080bb674"}},"domain":"Renders the animated battle-presentation advance prompt and waits for accepted input before releasing its sprite resources.","expressed":["waits for the presentation event queue to become ready","allocates the prompt sprite and derives phase-specific tile data","updates window registers and the prompt's packed tile, X, and animated Y fields each frame","accepts the primary button, shared presentation input, or delayed alternate input","plays the confirmation sound, releases the prompt sprite, and advances one final frame"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is 4 bytes long with 163 differing halfwords and fails exact-extent and <=20-halfword admission."},"bounded_checks":["re-examined this session (verification pass, no source change): the reference's stack frame is only 16 bytes (`sub sp, #16`, matching just a `frames` local at sp+0 plus the 12-byte `prompt` buffer at sp+4), while this candidate's frame is 28 bytes and spills several extra pointer locals (the render/left/right chain) that the reference apparently keeps entirely in registers; the reference also has an entirely different, currently-unaccounted-for conditional near the top of the render loop (a `cmp r3,#15; ble` test against a value this candidate does not compute at all) before it reaches the phase/tile computation. [Superseded by the 2026-08-27 pass below: the frame-size and register-spill gap was real and has been substantially closed; the `cmp r3,#15; ble` test is in fact the existing `frames > 15 && (Data_03001ae8 & 0x303)` guard already present in the source -- the earlier note mis-scanned the raw assembly at that position, not a missing branch.]","2026-08-27 respell session: two genuine structural fixes closed 32 of the original 36 byte overshoot and dropped differing_halfwords from 180 to 163 (candidate_bytes 392 -> 360; wrong_instructions 142 -> 138). (1) The `prompt` buffer was rewritten from a raw `u8 prompt[12]` array (accessed as repeated `*(u16/u32*)(prompt+K)` casts) into `u8 prompt_buf[12]; u8 *prompt = prompt_buf;`, giving GCC one persistent base pointer to fold every field access into an immediate-offset load/store -- this alone dropped 392->368 bytes by eliminating four separately-materialized sub-pointers the old array-cast form produced (matching the reference's single `r7`-relative addressing for the whole struct). (2) The outer `for (;;) { BODY; if(c1) break; if(c2) break; if(c3&&c4) break; TAIL; }` loop was rewritten as `while (1) { ... }` with the exact same body -- this alone dropped 368->360 bytes by changing which loop-rotation layout GCC 2.96 chooses: `for(;;)` produced a checks-block-before-body layout requiring two extra unconditional branches (an entry skip-jump plus a backward continue-jump), while `while(1)` produces the reference's body-first/checks-after layout with a single backward branch at the very end and no entry skip. Confirmed via the raw compiler `.s` output (not just the packed `.insns` diff) that after fix (2) the control-flow shape (block order and every branch target) now matches the reference exactly; every remaining differing halfword is a pure register-allocation variance, not a structural one.","2026-08-27, remaining residual: the reference dedicates a 6th callee-saved-crossing value to caching `&0x03001e40` (the per-frame timer register) in r8 across the loop body's two separate reads of that address, and pays for it by spilling `frames` to `[sp,#0]` for its three per-iteration accesses (compare, increment-read, increment-write) instead of keeping it in a register. This candidate's compile makes the opposite choice: `frames` gets `fp` (fitting all 5 non-scratch cross-call values -- prompt/sprite/left/right/frames -- into the 5 available registers with none left over) and the `&0x03001e40` address is rematerialized from the literal pool at each of its two use sites instead of being cached, which is what costs the remaining ~4 bytes and the bulk of the 163 differing halfwords (they all cascade from this one swapped register assignment: sprite lands in r9 instead of fp, right lands in r8 instead of r9, etc). Tried and confirmed to have NO effect on this specific allocation choice, each verified by a fresh compile: an explicit `volatile u32 *hwReg` local (both loop-scoped and function-scoped) aliasing the two `0x03001e40` reads; swapping the declaration order and the statement order of `frames`/`sprite`; nesting the `frames > 15 && (...)` guard into two separate `if`s; typing `frames` as `u8`; swapping the `&&` operand order in the third break guard; folding `wave` into a nested block scope; expressing `render[0]`/`render[1]` as a two-field struct instead of array indexing; and initializing `frames` at its declaration instead of via a later assignment (this last one was strictly worse: 360 bytes but 166 differing halfwords). No source-level lever found in this session moved this specific register-allocation tradeoff toward the reference's choice; it may require either the true original source's exact expression shape (unknown, out of scope per CONTRIBUTING.md) or GCC-2.96-internals knowledge beyond what source restructuring alone can influence."],"notes":["Independent object analysis finds 354 object bytes plus two alignment bytes and proves all 258 relocation-normalized core bytes identical across the six approved GS1 editions.","The helper is called throughout the recovered battle-presentation event family. The residual spans packed prompt construction, render-register scheduling, and loop allocation rather than a localized compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-presentation callers, and the approved compiler. No GS2 evidence or external source was used.","2026-08-27: candidate_bytes 392 -> 360, differing_halfwords 180 -> 163, wrong_instructions 142 -> 138, via the `prompt` base-pointer fix and the `for(;;)` -> `while(1)` loop-rotation fix described in bounded_checks. Control-flow shape now matches the reference exactly (verified from the raw compiler .s, not just the packed diff); the remaining 4-byte / 163-halfword gap is a single register-allocation tradeoff (frames-in-register vs. hwReg-address-in-register) that a dozen source-level variations this session could not shift. Not adopted -- still 4 bytes over reference size."]},"main:080bb7c0":{"schema_version":1,"namespace":"main","address":"0x080bb7c0","status":"measured-draft","owner_bytes":280,"executable_owner_bytes":280,"candidate_bytes":274,"differing_halfwords":130,"wrong_instructions":114,"family":{"template_owner":"main:080c10e8","template_source":"games/gs1/src/battle/presentation/set_actor_modes.c","note":"The assigned set_actor_modes.c template does not match at all; the real sibling is the family's OWN other unresolved member main:080bb65c (BattlePresentation_WaitForAdvance, already an unadopted measured draft), which shares this owner's exact 0x0400004a/0x04000052 window-register writes, the same *(u16*)(prompt+8)&0xfc00 / *(u16*)(prompt+6)&0xfe00 packed-sprite-tile idiom, and the same Func_08015048/Func_080040b4/Func_08003dec/Func_08003f3c call sequence, but with a fixed tile source (Func_080153f0(0) called once) instead of a per-frame animated phase, an (x, y) parameter pair instead of a hardcoded position, and a single exit flag test (Data_03001c94 & 0x303) instead of the sibling's three OR'd conditions."},"domain":"Waits for the presentation event queue, then renders an animated prompt sprite at a caller-supplied (x, y) position each frame until Data_03001c94's low status bits are set, before releasing the sprite.","expressed":["resolves a fixed tile source via Func_080153f0(0) once, before waiting for Func_08015048() to signal ready","allocates the prompt sprite via Func_080040b4(0x80)","each frame: writes the 0x0400004a/0x04000052 window registers, clears the prompt's tile/position words, packs the sprite tile index into prompt+8 and an x-derived field into prompt+6 (both via the sibling's exact bit-mask pairs 0x3ff/0xfc00 and 0x1ff/0xfe00), derives prompt+4 from y and the same 0x03001e40 status word the sibling reads, and pushes the sprite via Func_08003dec(prompt, 240)","exits the per-frame loop once Data_03001c94 & 0x303 is nonzero, otherwise waits one frame and repeats","releases the sprite and waits one final frame"],"bounded_search":{"mode":"manual-respell","attempted":1,"exact":false},"bounded_checks":["the reference reserves extra stack space and computes two additional stack pointers (sp+12 and sp+14) beyond the 12-byte prompt buffer at sp+8 that this draft does not account for; the draft's prompt is addressed purely as one 12-byte base+offset buffer (matching the sibling 080bb65c's own recovered shape), so this owner's true local layout is evidently not a single flat struct the way the sibling's is","the reference keeps the (x, y) parameters live in registers through the initial Func_080153f0(0) call and only spills them to the stack (x at sp+0, y at sp+4, in parameter order) immediately before the wait loop; the draft's parameters get spilled at function entry and to swapped stack slots (y at sp+0, x at sp+4), so the parameter-lifetime shape needs a genuine source rewrite (e.g. deferring first use of x/y) rather than a signature change"],"notes":["Reaches within 6 bytes of the reference's 280-byte extent and reproduces every constant this draft could identify (0x80, 0x0400004a/0x04000052, 0x40000000, 0x3ff/0xfc00, 0x1ff/0xfe00, 0xfffc, 248, 240, 0x303) and the full call sequence and branch structure, but the local-variable/stack layout is evidently more elaborate than the flat 12-byte prompt buffer recovered here.","This looks like a source-shape gap rather than a compiler-internals residual: the extra sp+12/sp+14 pointers the reference computes point to real, not-yet-identified locals (or a differently-shaped prompt aggregate) that this draft is missing, and closing that gap should collapse a large share of the current 130-halfword residual at once. Worth a focused follow-up that starts from those two extra stack slots.","Recovered only from retained owner assembly, the family's own already-drafted sibling main:080bb65c (games/gs1/recon/en/main/080bb65c.c), and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."]},"main:080bd424":{"status":"measured-draft","span_bytes":896,"edition":{"role":"shared-candidate-wrapper","edition":"en","base_owner":"080b4424","base_edition":"ja","rebase_status":"proved-shared-core"},"cross_edition":{"measured":"2026-08-23","object_bytes":896,"core_bytes":772,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"callee_correspondences":10,"core_identical":true},"score":{"measured":"2026-08-23","candidate_bytes":894,"reference_bytes":896,"differing_halfwords":422,"wrong_instructions":377,"class":"wrong","note":"Complete coherent source-shape candidate; it is two bytes short and remains far from the byte-exact adoption gate."},"shape":{"workbench_reference_instructions":417,"jump_tables":1,"jump_table_entries":7,"symbolized_references":17,"initial_m2c_structural_match_percent":65.44844},"domain":"Automatic battle-command selection: chooses a class-profile action, validates item/PP/seal restrictions, resolves target mode, and retries boundedly when a choice is unusable.","expressed":["JA-base/EN-wrapper ownership for the all-edition-identical normalized core","the complete seven-way selection strategy and saved-selection state","item-backed action substitution and its target-flag validity gate","special effect-to-command remapping for effects 46, 47, and 49","action usability checks, four-way target-mode dispatch, and the 17-attempt fallback","the GNU nested-call static-chain ABI used by the already recovered 080bd3e4 helper"],"remaining":[{"op":"register and stack allocation","count":1,"where":"the candidate has the exact 28-byte frame but still assigns the long-lived actor, profile, retry flag, selection index, and +0x120 state pointer differently from the reference"},{"op":"control-flow and expression texture","count":1,"where":"the normalized residual spans switch-tail sharing, signed temporary widths, byte-mask construction, and later target-dispatch scheduling"}],"rejected_experiments":[{"experiment":"transfer 080bbb0c's -fno-cse-follow-jumps route and the sibling -fno-cse-skip-blocks / -fno-schedule-insns routes","result":"the raw structural draft remained 870/896 bytes, 418 differing halfwords, and 397 wrong instructions"},{"experiment":"-fno-gcse and -fno-regmove on the raw structural draft","result":"both regressed: -fno-gcse reached 882 bytes / 421 halfwords / 415 wrong instructions; -fno-regmove reached 870 bytes / 419 halfwords / 459 wrong instructions"},{"experiment":"place all seven call-live values in one explicit 28-byte local aggregate","result":"GCC retained an aggregate-base register, enlarged the frame to 32 bytes, and regressed to 926 bytes / 448 halfwords / 465 wrong instructions"},{"experiment":"group only the profile and retry flag in an eight-byte context","result":"it forced the desired retry spill and selection-index register but placed the context at the wrong stack end and regressed the normalized score to 379 wrong instructions"}],"next":"Keep the JA source and EN wrapper architecture. Reconstruct the natural declarations that give the reference allocation (actor in fp, +0x120 state in r8, selection in sl, profile/retry at sp+20/sp+24) before permuting local expressions; the routing flags transferred from 080bbb0c have been ruled out here.","notes":["The local auto declaration names the separately recovered nested helper without emitting a duplicate helper owner; it preserves the r9 static-chain setup visible at all three call sites.","The candidate was reconstructed only from repository types, retained assembly, approved ROM correspondence, and the local structural workbench. No external source, git history, compiler modification, copied instruction bytes, inline assembly, fixed-register variable, or compiler barrier was used."]},"main:080bd898":{"status":"proven-retained","classification":"hidden_register_context_caller_module","span_bytes":1876,"edition":{"role":"shared-candidate-wrapper","edition":"en","base_owner":"080b4898","base_edition":"ja","rebase_status":"proved-shared-core"},"cross_edition":{"measured":"2026-08-23","object_bytes":1876,"relocations":59,"relocation_bytes":236,"literal_fields":41,"literal_bytes":164,"core_bytes":1476,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"080b4898","en":"080bd898","de":"080bfeb0","es":"080c18b0","fr":"080c18b0","it":"080bd8b0"},"callee_correspondences":32,"core_identical":true},"score":{"measured":"2026-08-23","candidate_bytes":1868,"reference_bytes":1876,"differing_halfwords":687,"wrong_instructions":403,"initial_wrong_instructions":876,"wrong_instruction_residual_reduction":473,"wrong_instruction_residual_reduction_percent":53.99543,"best_diagnostic_wrong_instructions":371,"best_diagnostic_differing_halfwords":672,"best_diagnostic_candidate_bytes":1846,"best_diagnostic_route":"approved GCC 2.96 with -fno-gcse; diagnostic only, not an adoptable route","matched_prefix_instructions":9,"class":"wrong","note":"Two 080bbb0c transfer passes recovered the complete state machine and cut the candidate-show wrong-instruction residual by 54.0%, from 876 to 403. Repeated operand loads, a full-width animation-frame carrier, a loop-invariant part-flag carrier, reference-shaped record cursors, exact access width, and declaration lifetime were all material; the retained assembly remains authoritative."},"shape":{"workbench_reference_instructions":838,"jump_tables":1,"jump_table_entries":15,"symbolized_references":43},"domain":"Battle execution state machine that directly invokes 080bbb0c for each planned target, dispatches a 15-entry event kind, and advances later presentation and cleanup phases.","expressed":["JA-base/EN-wrapper ownership, matching the proved architecture used by 080bbb0c","complete target iteration and direct invocation of 080bbb0c for each planned target","complete 15-entry battle-event dispatch, including text waits, actor setup, resolution, animation, refresh, and cleanup","all presentation phases 1, 2, 3, 5, 10, 11, and 13, including timer, input, display, motion-record, and sound behavior","typed playback/runtime, display, motion-record, BattlePlan, BattleUnit, and BattleObjectSlot layouts backed by exact local offsets","reference-shaped record cursors and the halfword write at BattleObjectSlot offset 0x2a","the phase-11 record gather expressed as an explicit top-tested loop, matching the reference store-after-success shape and bringing the fixed-route candidate within 8 bytes of the owner extent"],"unexpressed":[{"op":"source-shape and allocation repair","count":403,"where":"the residual is concentrated in register coloring, stack-slot placement, shared-tail formation, literal-pool placement, and a few load/store orderings"}],"next":"Keep the EN file as a macro-only wrapper. Refine the phase-5 carrier order and phase-11 stack workspace first; both affect long exact runs without changing recovered behavior.","verified_against_reference":["fresh candidate-show build: 1868 candidate bytes versus 1876 reference bytes, 687 differing halfwords, and 403 wrong aligned instructions","the initial compilable stub was 2 bytes with a wrong-instruction residual of 876; the full typed recovery reduces that residual by 473, or 54.0%","relocation-aware comparison locates the JA owner at 0x080b4898; all 1476 non-relocation, non-literal core bytes agree in every edition","the reference has one 15-entry jump table, 838 instructions, 43 symbolized references, and 32 established callee correspondences","a bounded fresh route sweep found -fno-gcse at 1846 bytes / 672 differing halfwords / 371 wrong instructions, a 39-row diagnostic reduction from the routed readable candidate; every tested paired flag regressed from that result"],"rejected":[{"shape":"one factored event operand temporary","result":"kept a value live across the dispatcher and scored 665 wrong instructions; repeating the reference loads cut the residual to 540 and restored 48 candidate bytes"},{"shape":"a second explicit next-event-index source variable","result":"a controlled build showed the compiler coalescing it into the current-index carrier and regressing the candidate from 410 to 446 wrong instructions"},{"shape":"promote the phase-11 animation frame carrier to s32","result":"semantically plausible but changed global allocation and stack size; retaining the narrow carrier currently gives the better measured whole-owner result"},{"shape":"inherit 080bbb0c's -fno-cse-follow-jumps route","result":"the flag is owner-specific; adjacent controlled probing was byte-neutral and it was not added here"},{"shape":"reference-shaped 44-byte frame through a trailing or leading reserved word","result":"the trailing word reached the exact frame extent but regressed to 420 wrong instructions; the leading word also aligned records at sp+12 and selection at sp+28 but regressed to 416, because the runtime carrier remained at sp+4 instead of the reference sp+8"},{"shape":"store the phase-5 viewport in the explicit phase-local aggregate","result":"this moved records and selection to the reference stack offsets and grew the candidate to 1868 bytes, only 8 bytes short of the reference, but still scored 412 wrong instructions and 691 differing halfwords; it was rejected in favor of the smaller readable 410-row baseline"},{"shape":"bounded compiler pass sweep after the stack audit","result":"-fno-gcse was the sole material diagnostic at 371 wrong instructions (from 410). Pairing it with -fno-schedule-insns2, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-regmove, -fno-rerun-cse-after-loop, or -fno-expensive-optimizations scored 424, 415, 543, 373, 459, and 616 respectively. The flag is not an approved owner route and therefore was not adopted; it isolates GCSE/PRE shaping as the next source-level axis."},{"shape":"full-width frame plus loop-invariant part flag and explicit record-gather loop","result":"this fixed-route source improvement removes the byte truncation absent from the reference, hoists the 0xff part flag into the reference-shaped high-register carrier, and stores gathered records only after a successful lookup. It improves the readable routed candidate from 1852/687/410 to 1868/687/403. Re-running -fno-gcse on the improved source gives 1856/683/382, confirming that the source change absorbs part of the earlier PRE signal without relying on a nonstandard route."},{"shape":"third-pass dispatcher carrier and phase-5 lifetime audit","result":"the reference keeps the loaded event index in r5 and copies it to r6 for dispatch, but a distinct readable dispatch_index local is coalesced by the fixed compiler and is byte-neutral. Moving phase-5 viewport/display carriers into the narrow phase scope is also byte-neutral; reversing the tile/scroll expression order regresses to 413 wrong instructions. register hints are ignored. The remaining dispatcher and phase-5 distance is allocation/literal placement rather than a missing switch case, width conversion, or observable source lifetime, so none of these spellings replaced the 403-row best source."}],"notes":["The relocation-aware comparison used the retained EN assembly object as an exact locator; it proves shared machine-code core, not recovered C source.","The JA-to-EN owner shift is +0x9000, exactly matching 080b2b0c to 080bbb0c.","The phase-local record and selection workspace is deliberately explicit because its stack addresses are observable across calls.","No external source, git history, compiler modification, copied instruction bytes, fixed-register variables, barriers, or inline assembly was used."],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"branch-block ordering differs; class structural-topology, wrong_instructions=403","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."}},"main:080be378":{"schema_version":1,"namespace":"main","address":"0x080be378","status":"blocked","owner_bytes":3696,"executable_owner_bytes":3696,"candidate_bytes":2844,"differing_halfwords":1782,"wrong_instructions":1777,"measured":"2026-08-29","domain":"Battle action/ability resolution entry: sets up target-power record from a request struct, runs pre-checks (unit-dead, status-flag clears with associated text/queue calls), clears djinn/summon per-target slot arrays, then switches on a 0..99 ability-tier field read from the request struct (offset +6) through a 100-entry jump table into case bodies that perform elemental-power rolls, ability-kind classification (attack/unleash/psynergy family codes), success-rate gating, per-target power step accumulation loops, and per-target hit-power writes, converging on shared exit points (`sub_080bee00` clamp/finalize, `sub_080bec8a` early-return, `sub_080bec5c` dead-unit tail-call, `sub_080bf1a8`/`sub_080bf1d6`/`sub_080bf1d4` shared epilogue jumps) before a single real epilogue that restores r8-r11 and returns.","map":{"head":"0x080be378","head_symbol":"FunctionHead_080be378","head_file":"games/gs1/asm/080be378.s","true_epilogue":{"file":"games/gs1/asm/080bef88.s","note":"Region_080bef88 ends `add sp, #48 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r1} / bx r1` -- this is the exact mirror of FunctionHead_080be378's prologue (`push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #48`), same frame size (48), same four high-register saves (r8-r11). This is the true, and only, epilogue of the enclosing function."},"span":{"start":"0x080be378","end_exclusive":"0x080bf1e8","size_bytes":3696,"derivation":"end = 0x080bef88 (Region_080bef88 start, per its own json) + 608 (its owner_bytes/executable_owner_bytes, both equal so the owner has no trailing literal pool) = 0x080bf1e8. size = 0x080bf1e8 - 0x080be378 = 0xe70 = 3696."},"member_regions_in_order":[{"addr":"0x080be378","symbol":"FunctionHead_080be378","file":"games/gs1/asm/080be378.s","role":"real prologue + setup + 100-entry switch dispatcher (JumpTable_080be570) + default-case tail + literal pool (LiteralPool_080be738)"},{"addr":"0x080be76c","symbol":"Region_080be76c","file":"games/gs1/asm/080be76c.s","role":"switch case body (jump-table index 0), prologue-less, reached only by the computed `mov pc, r3` in the head and by internal cross-region branches; falls through into embedded literal data mid-file (dead code between tail branches) which is retained as part of the region, not separately callable"},{"addr":"0x080beb08","symbol":"Region_080beb08","file":"games/gs1/asm/080beb08.s","role":"switch case body (jump-table index 5) plus an internal secondary jump table (`.4byte` array right after `.L_080bee58`) for a sub-classification of ability sub-kind; ends with `bne sub_080bef88` falling through into Region_080bef88's `sub_080befac`"},{"addr":"0x080bef88","symbol":"Region_080bef88","file":"games/gs1/asm/080bef88.s","role":"continuation of the ability-kind classification and per-target power-accumulation loop (`sub_080befac`/`.L_080bf0ca` loop), converges all cases at `.L_080bf1a8`, then the real, shared, single epilogue for the whole function"}],"shared_exit_labels":[{"label":"sub_080bee00","addr":"0x080bee00","location":"inside games/gs1/asm/080beb08.s (label .L_080bee00 in that file), referenced as an absolute-address tail branch from games/gs1/asm/080be76c.s"},{"label":"sub_080bec8a","addr":"0x080bec8a","location":"inside games/gs1/asm/080beb08.s, referenced from games/gs1/asm/080be76c.s"},{"label":"sub_080bec5c","addr":"0x080bec5c","location":"inside games/gs1/asm/080beb08.s, referenced from games/gs1/asm/080be76c.s and games/gs1/asm/080be378.s (default-case handler at .L_080be51a-equivalent path)"},{"label":"sub_080bf1a8","addr":"0x080bf1a8","location":"= .L_080bf1a8 inside games/gs1/asm/080bef88.s itself, referenced as an absolute-address branch from games/gs1/asm/080beb08.s"},{"label":"sub_080bf1d6 / sub_080bf1d4","addr":"0x080bf1d6 / 0x080bf1d4","location":"fall inside the tail instructions of games/gs1/asm/080bef88.s between .L_080bf1a8 and the real epilogue at 0x080bf1e8 (or in the two bytes immediately adjacent); referenced as absolute-address `bl`/`b` targets from games/gs1/asm/080be76c.s and games/gs1/asm/080beb08.s. These behave as internal 'return a fixed status code from the enclosing function' veneers, not separate callable functions -- there is no external cross-reference to either address anywhere else in the corpus."}]},"refuted_hypotheses":["That games/gs1/asm/080bf678.s (Func_080bf678) and games/gs1/asm/080bfba4.s (Func_080bfba4) are further fragments of this split function, as speculated in games/gs1/recon/en/dossiers.json#main:080bef88's 'recommendation' field. Refuted: both files carry their own complete, self-contained prologue (`push {r5,r6,r7,lr}; mov r7,fp; mov r6,sl; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp,#N`) and their own matching epilogue (`add sp,#N; pop {r3,r5,r6,r7}; mov r8,r3; mov r9,r5; mov sl,r6; mov fp,r7; pop {r5,r6,r7}; pop {r1}; bx r1`), each ending in `bx r1` after its own frame teardown -- the exact shape of an ordinary standalone leaf-ish function, not a prologue-less internal region. `grep` across games/gs1/asm/080be76c.s, 080beb08.s, 080bef88.s, and 080be378.s for the literal addresses 080bf678/080bfba4 finds zero references in either direction. games/gs1/source-paths.json also has no owner entries for these two addresses at all (unlike 080be378/080be76c/080beb08/080bef88, which are all registered), consistent with them being ordinary not-yet-classified standalone owners outside this cluster.","That the true head could lie earlier than games/gs1/asm/080be378.s. Refuted: 080be378.s's own header comment and symbol name (`FunctionHead_080be378`, marked in the file's Japanese comment as the branch head of a function split across regions with an embedded jump table and literal pool) plus its genuine push/mov/push/sub-sp prologue confirm this is the entry. The immediately preceding file games/gs1/asm/080be18c.s (`Func_080be18c`) is a fully self-contained function (own push/pop, own bx r1 return) that is itself called via `bl sub_080be18c` from inside Region_080be76c -- a normal callee, not a predecessor fragment of the same function."],"recommendation":"Decoded L_080bee08's secondary (subclass 0..5) jump table strictly from ROM bytes (`xxd -s 0xbee68 -l 0x20 roms/gs1-en.gba` and `xxd -s 0xbef58 -l 0x40 roms/gs1-en.gba`), settling the prior pass's self-contradiction from hand-reassembly. The `ldr r2,[pc,#260]` at 0x080bee68 resolves (pc=0x080bee6c, +0x104) to the pool word at 0x080bef70, whose raw little-endian bytes are `70 ee 0b 08` = 0x080bee70 -- the table's own base address, immediately following the `mov pc,r3` tablejump (objdump misdecodes this inline data as six bogus `cdp` coprocessor instructions, which is exactly the contradiction the prior pass hit). The six table words at 0x080bee70..0x080bee87, read raw, are: table[0]=0x080beea0, table[1]=0x080bee88, table[2]=0x080bee90, table[3]=0x080bee98, table[4]=0x080beea8, table[5]=0x080beea0. Cross-checked against the surrounding code at each target: bodies at 0x080bee88/90/98/a0 each load a pool constant (0x080bef74=0x4001 for the 0x080bee88/beea0 pair, 0x080bef78=0x4004 for the 0x080bee90/98 pair) into `tgt->88` and converge on the shared `str r3,[r2,#88]` at 0x080beea6, falling into the 0x080beea8 debug-print tail; only table[4] (subclass 4) points directly at 0x080beea8, past the shared store, and is the one subclass that truly skips the assignment. The existing candidate had this backwards -- it treated subclass 0 (not subclass 4) as the skip case, and had subclass 0 falling into the same body as 4 instead of the same body as 1/5. Corrected the switch in games/gs1/recon/en/main/080be378.c (~line 611) so subclass 0 now assigns 0x4001 (matching table[0]=0x080beea0, which shares the assign-then-fall-into-beea6 body with subclass 5's table[5]=0x080beea0) and only subclass 4 skips to L_080beea8 directly. Re-audited the elemental/status-code table constants in Region_080bef88 (0x080bf1f0/f4/fc/0x080bf200, named in the same task) and found no remaining placeholders -- both tables (`(u32*)0x080c2da0` by abilityId bounded at 518, `(const u8*)0x080c2b98` by abilityId bounded at 517) were already resolved to concrete addresses/bounds in a prior pass, nothing left to decode there. Net effect: candidate_bytes grew 2840->2844 (the corrected switch case's extra assignment), differing_halfwords held flat at 1782 (was already 1782 going in), matched_prefix held at 7, class remained compiler-unemittable across 3 repeated deterministic rescores (compile=cache, identical numbers each time) -- confirming, as every recent attempt has, that this is a genuine correctness fix independent of the dominant remaining divergence (the candidate's 12-byte/2-register frame vs the reference's 48-byte r8-r11 frame), which no single block's content can move. dh is not 0; verify was not expected to go green from this fix alone and did not. Did not reach 20 scored iterations -- the table decode itself needed several verification passes (objdump misdecode diagnosis, raw xxd byte read, cross-referencing every jump target's body) but the resulting code change is a single well-verified switch correction with nothing further to iterate on productively without guessing; recommend the next pass return to the standing recommendation from prior attempts (`bun tools/allocator-lens/lens.ts 080be378` plus function-long-lifetime work on the actor/req/tgt-derived exit-block variables) as the higher-leverage route to the prologue register-pressure gap, since ROM-direct constant/table decoding has now been exhausted for every placeholder this dossier has ever flagged.","recommendation_superseded_2":"This pass found and fixed a real correctness bug in the head/exit, not just a register-shape mismatch: standalone-assembling games/gs1/asm/080be378.s and objdumping it (r10 is set via `add r2,sp,#32; str r0,[r2,0]; mov r10,r2` BEFORE the `bl sub_08077008` actor lookup, i.e. r10 = &(stack copy of the raw `req` argument), never reassigned) shows the prior drafts had mislabeled four `req`-relative reads as `actor`-relative: the ability-tier field used for the 100-way switch dispatch (`req+6`, not `actor+6` -- confirmed at .L_080be51a: `mov r0,r10; ldr r3,[r0,0]; ldrsh r3,[r3,#6]`), the tier!=3 gate inside the ACTOR_STATUSFLAG_OFF pre-check (same req+6 field), and both reads at the shared L_080bf1a8 exit in games/gs1/asm/080bef88.s (`mov r4,r10; ldr r3,[r4,0]; ldrsh r3,[r3,#6]` gating the statusKind remap, and the final `tgt+72 = req[6]` write before the real epilogue). Also found the two 13-byte init loops right after the tier==8 check were writing to the wrong pointer: `ldr r4,[sp,#8]` derefs to the address of the `tgt` stack slot (not `actor`), so `tgt[44..56]=0` and `tgt[58..70]=0xff`, not `actor[44..]`/`actor[58..]`. Fixed all six sites in games/gs1/recon/en/main/080be378.c (lines ~196/205/213-218/803/809 before this edit) to read/write `req`/`tgt` instead of `actor`, and resolved Region_080beb08's remaining 4 TEXT_TBD placeholders the same way as always (standalone-assemble games/gs1/asm/080beb08.s at its real load address 0x080beb08, already 0 mod 4, objdump with --adjust-vma=0x080beb08, ROM-direct read of the 4 pool words at 0x080bef58/5c/60/7c): TEXT_TIER5_CUE_MSG=2199, TEXT_TIER5_BUSY_MSG=2139, TEXT_TIER6_MSG=2111, TEXT_TIER5_STATUS_MSG=2068. Net effect: dh improved 1772->1757, candidate_bytes shrank 2962->2890 (removing a stray `(u8 *)actor` cast pattern changed codegen slightly), matched_prefix held at 7 across 3 repeated deterministic rescores (compile=cache) -- the router's own class flipped from missing-extra-code to compiler-unemittable at this size, meaning the prologue-shape gap (candidate still allocates a 12-byte/2-register frame vs the reference's 48-byte r8-r11 frame) is now the single dominant divergence class again. The actor/req correctness fix did NOT move matched_prefix past 7 despite being a genuine bug fix -- `req` was already read constantly throughout the function body regardless of this bug (every case's `Func_08015120(*(s16*)(req+0),...)` alone gives it plenty of live-range pressure), so correcting a handful of additional `req`-vs-`actor` sites did not change which pseudo GCC finds cheapest to spill. Recommend the next pass audit the SAME actor/req/tgt-confusion class of bug across the rest of the function (Region_080be76c's case bodies, Region_080beb08's L_080bee08 block, and Region_080bef88's tail) by cross-checking each `(u8 *)actor +`/`(u8 *)req +`/`tgt +` access against a standalone objdump of its owning region rather than assuming the existing labeling is correct -- this pass only checked the head and the shared exit named by the task, not the case bodies, and the same r10-is-really-&req pattern could easily recur wherever a case body was translated by eye rather than checked against ground truth. This is very plausibly the same class of bug driving the compiler-unemittable prologue gap on its own, since a misattributed base pointer changes exactly which value the allocator finds worth keeping live across `bl` boundaries.","recommendation_superseded_3":"Resolved every Region_080be76c placeholder constant plus the shared head-function pre-check flags/messages, all from ground truth: assembled games/gs1/asm/080be378.s and games/gs1/asm/080be76c.s standalone (both already 4-byte aligned at their real load address mod 4, no parity padding needed), objdumped each, and for every `ldr rN,[pc,#imm]` whose target falls outside the file's own .text read the word straight out of roms/gs1-en.gba at (target-0x08000000). Head function: LiteralPool_080be738 gave ACTOR_FAINT_FLAG_OFF=325/msg=2176, ACTOR_SILENCE_FLAG_OFF=316 (immediate, not pool)/msg=2136, ACTOR_SEAL_FLAG_OFF=315/msg=2135, ACTOR_STATUSFLAG_OFF=304 (immediate)/msg=2137, and the tier==99 case's two messages 2115/2118. Region_080be76c's own separate pool (living in the gap 0x080bea9c-0x080beb08, immediately before Region_080beb08's own code) gave: tier==0's two messages 2073/2074; tier==1's ACTOR_COST_FLAG_OFF=317 (distinct field from the head's ACTOR_FAINT/SILENCE/SEAL offsets despite the old code reusing one macro name for all of them) and message 2110; tier==2's REQ_FLAG_OFF=299 (confirmed to be a req-relative offset, not actor-relative -- the pre-check block's superficially-similar `actor[REQ_FLAG_OFF]&1` from the old code was actually a different field, now split out as ACTOR_STATUSFLAG_OFF=304) and its four messages 2075/2070/2072/2071; tier==3/7's message 2070 (same id as tier==2's no-ability message); and tier==4's full ~20-way exact/range abilityId classification tree, walked instruction-by-instruction from 0x080be9ce to 0x080bea9a and rewritten as nested if/else exactly matching the reference's branch structure (replacing the old code's partial switch+TODO-default), with K1..K4_ABILITY_ID resolved to the four pool-sourced compares 441/495/499/503 and all ~15 exact-match/message constants resolved directly. Net effect: dh improved 1799->1772, candidate_bytes grew 2502->2962 (more real body, not padding), matched_prefix held at 7 across 3 repeated deterministic rescores (compile=cache), confirming the change is real and stable. matched_prefix did NOT advance past 7 -- the r8-r11/48-byte-frame register-pressure gap named in the prior attempt is still present and, per this pass's investigation, is a global-liveness property of the whole function body rather than something these particular constant fixes could move (they replace inert 0/NULL immediates with different immediates of the same instruction shape, which does not by itself change which pseudos survive across `bl` boundaries). Region_080beb08's own TEXT_TBD placeholders (Func_080bbabc's text arg and three Func_080151c8 calls) remain unresolved -- explicitly deferred this round to stay inside the stated scope (Region_080be76c first) -- and are the next mechanical constant-resolution target with the same technique. Separately, and likely higher-leverage for the matched_prefix/register-pressure gap specifically: `bun tools/allocator-lens/lens.ts 080be378` and the exit-block lifetime work named in this round's task (giving actor/req/tgt-derived C variables function-long lifetimes by using them at the L_080bf1a8/epilogue exit the way the reference's sub_08002dd8/sub_080cdbc0 finalizer calls do) was NOT attempted this pass due to time/scope -- recommend it as the concrete next step over further constant hunting, since the last four attempts' notes all converge on the same conclusion that the prologue shape is decided by whole-function live-range overlap, not by any single block's content.","attempts":[{"candidate":"ROM-direct re-decode of L_080bee08's secondary (subclass 0..5) jump table, per this dossier's own standing flag that the prior pass's hand-reassembly produced self-contradictory address arithmetic. Read the table's own base pointer from the pool word at 0x080bef70 (raw bytes via `xxd -s 0xbef58 -l 0x40 roms/gs1-en.gba`, little-endian word = 0x080bee70) and the six table words directly from 0x080bee70..87 (via `xxd -s 0xbee68 -l 0x20 roms/gs1-en.gba`): table[0]=0x080beea0, table[1]=0x080bee88, table[2]=0x080bee90, table[3]=0x080bee98, table[4]=0x080beea8, table[5]=0x080beea0 -- objdump misdecodes this inline data region as six bogus `cdp` coprocessor instructions, which was the source of the prior pass's contradiction. Cross-checked each target's body against the full `--start-address=0x080bee00 --stop-address=0x080bef88` disassembly: subclass 0/1/5 all assign tgt->88=0x4001 (pool @0x080bef74) and converge on the shared `str r3,[r2,#88]` at 0x080beea6; subclass 2/3 assign 0x4004 (pool @0x080bef78) via the same convergence; only subclass 4's table entry points straight at 0x080beea8, past the shared store, skipping the assignment entirely. Corrected games/gs1/recon/en/main/080be378.c's switch (~line 611): subclass 0 now assigns 0x4001 and falls into L_080beea6 (it had been wired as the skip case, backwards), and subclass 4 alone now goes straight to L_080beea8. Re-checked Region_080bef88's elemental/status-code table constants (0x080bf1f0/f4/fc/0x080bf200) named in the same task and found no remaining placeholders to resolve.","candidate_bytes":2844,"differing_halfwords":1782,"wrong_instructions":1777,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"candidate_bytes grew 2840->2844 (one corrected switch-case assignment), differing_halfwords held flat at 1782, matched_prefix held at 7 across 3 repeated deterministic rescores (compile=cache, identical numbers each time). Class stayed compiler-unemittable, confirming (as every recent attempt has) that this is a genuine ground-truth correctness fix orthogonal to the dominant remaining divergence -- the candidate's 12-byte/2-register frame vs the reference's 48-byte r8-r11 frame -- which no single block's content moves on its own. This closes out the last two open items this dossier had explicitly flagged as unresolved (the L_080bee08 secondary table and the Region_080bef88 tail tables); nothing ROM-decodable remains outstanding in this owner. Did not reach 20 scored iterations: the fix is a single well-verified switch correction with no further productive spelling to try without guessing, so iteration stopped once the table decode and its 3 confirming rescores were stable. Standing recommendation unchanged from prior attempts: the register-pressure/prologue-shape gap needs `bun tools/allocator-lens/lens.ts 080be378` plus function-long-lifetime work on the actor/req/tgt-derived exit-block variables, not further constant hunting."},{"candidate":"Continued the actor/req/tgt base-pointer audit into tier==0..4 (games/gs1/asm/080be76c.s), L_080bee08 (games/gs1/asm/080beb08.s), and the buff/debuff/elemental/status tables (games/gs1/asm/080bef88.s), per this dossier's own recommendation. Standalone-assembled and objdumped all four member regions with --adjust-vma set to each region's real load address and cross-checked every stack/register base against the head's own established dedication (r10=&req always; [sp,#12] dereferenced twice = &actor, set once at the head via `mov r1,sp; adds r1,#28; str r1,[sp,#12]` then `str r0,[r1,0]` right after the Func_08077008 lookup; [sp,#8] dereferenced twice = &tgt, set at frame setup via `add r2,sp,#32/adds r3,#44/str r3,[sp,#8]`). Found and fixed two confirmed instances of the same actor/req mislabeling class: (1) tier==0's opening call -- the prior draft called `Func_08077160(*(s16*)(req+0))` and separately recomputed `abilityId = *(s16*)(req+0)`, but the standalone objdump of 080be76c.s shows `ldr r4,[sp,#12]` (actor, not r10/req) feeding the call argument, and the call's own r0 return value moved straight into fp and used as Func_080be18c's argument -- i.e. Func_08077160 takes `actor` and returns the abilityId, req+0 is never reloaded on this path. Re-declared the extern as `s16 Func_08077160(void *actor)` and rewrote the call site to `abilityId = Func_08077160(actor);`. (2) tier==2's item-ability lookup block (address 0x080be888 onward) had three separate `req + 216 + slotIdx*2` array reads (itemId lookup, flagsField gate, and the Func_08015120 debug-print argument) plus one `((u8*)req)[REQ_FLAG_OFF]` gate, all objdump-confirmed to use `ldr r4,[sp,#12]` (actor) rather than r10 (req); fixed all four sites to `actor`-relative and renamed the misleading `REQ_FLAG_OFF` macro to `ACTOR_ITEM_USED_FLAG_OFF` to match. Attempted to re-verify L_080bee08's secondary (subclass 0-5) jump table and the elemental/status-code tables in Region_080bef88 the same way, but my own standalone re-assembly of the L_080bee08 jump-table region produced self-contradictory address arithmetic on manual review (the `ldr r2,[pc,#260]` literal's resolved value landed on what a naive linear disassembly reported as inline code rather than table data, and I could not settle whether that reflects the assembler emitting the table inline after `mov pc,r3` at a different offset than I computed, or a genuine second table elsewhere) -- rather than land a plausible-looking but unverified fix, left that block and the bef88 tail tables exactly as the prior pass had them, flagged for the next pass to re-derive with a cleaner methodology (e.g. decoding the table strictly from the linked/relocated object rather than hand-computing pc-relative pool offsets against a manually reassembled standalone .o).","candidate_bytes":2840,"differing_halfwords":1782,"wrong_instructions":1777,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"dh improved 1783->1782 (candidate_bytes unchanged at 2840), matched_prefix held at 7 across repeated deterministic rescores (compile=cache, identical numbers each time). `bun tools/allocator-lens/lens.ts 080be378` (690 pseudos this pass, up from 473 in the prior attempt as the candidate has grown) still shows no pseudo with a genuine HI_REGS preference among those inspected -- all prefer LO_REGS/BASE_REGS/STACK_REG -- reconfirming the standing conclusion that the prologue's r8-r11/48-byte-frame gap is a whole-function live-range-overlap property, not something these two additional correctness fixes (real, but small in instruction-count terms) could move on their own. This pass did not reach the coordinator's target of 25 scored iterations: two genuine, ground-truth-verified fixes were found and landed with a handful of confirming rescores, but the L_080bee08 secondary-table and Region_080bef88 elemental/status-table re-verification that the task also named could not be completed to the same evidentiary standard in the time available, and was deliberately left unchanged rather than guessed at. Recommend the next pass re-attempt those two blocks specifically, ideally by reading the jump-table/pool bytes directly from a linked object or from roms/gs1-en.gba at the region's real absolute address rather than a hand-assembled standalone .o, since a standalone reassembly's own literal-pool placement is exactly the kind of thing that can silently drift from the ROM's real layout when multiple pc-relative loads compete for pool space."},{"candidate":"Exit/head lifetime audit plus Region_080beb08's remaining constants. Standalone-assembled and objdumped games/gs1/asm/080be378.s (--adjust-vma=0x080be378) to trace r10's true dedication: it is set via `add r2,sp,#32; str r0,[r2,0]; mov r10,r2` BEFORE the actor lookup call, so it is `&(stack copy of req)`, not `&actor`. Corrected 6 sites in games/gs1/recon/en/main/080be378.c that had misattributed `req`-relative and `tgt`-relative reads/writes to `actor`: the 100-way switch's tier value (req+6, was actor+6), the ACTOR_STATUSFLAG_OFF pre-check's tier!=3 gate (req+6, was actor+6), the two 13-byte slot-init loops after the tier==8 check (tgt+44/tgt+58, were actor+44/actor+58), and both reads at the shared L_080bf1a8 exit in Region_080bef88 (statusKind remap gate and the final tgt+72=req[6] write, both were actor+6). Also standalone-assembled games/gs1/asm/080beb08.s (already 0 mod 4 at its real load address 0x080beb08) and objdumped it with --adjust-vma=0x080beb08 to resolve its last 4 TEXT_TBD placeholders by reading roms/gs1-en.gba at the 4 pool words (0x080bef58/5c/60/7c): TEXT_TIER5_CUE_MSG=2199, TEXT_TIER5_BUSY_MSG=2139, TEXT_TIER6_MSG=2111, TEXT_TIER5_STATUS_MSG=2068. Continuing the same base-pointer audit into Region_080bef88's per-target power-accumulation loop (`.L_080bf0ca`) found one more instance: the prior draft's own comment claimed 'r10 holds &actor' for that loop's first Func_08077178 argument, but objdumping games/gs1/asm/080bef88.s directly shows r10 is never reassigned anywhere in that file (only ever `mov r4,r10` / restored in the epilogue), so it keeps the head's dedication of `&req` for the whole function; fixed the argument from `actor+0` to `req+0` and corrected the stale comment.","candidate_bytes":2840,"differing_halfwords":1783,"wrong_instructions":1781,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"The head/exit fix alone improved dh 1772->1757 with candidate_bytes shrinking 2962->2890. The additional .L_080bf0ca argument fix (actor+0 -> req+0) then moved dh to 1783 (candidate_bytes 2890->2840) -- a regression in the raw count despite being an independently ground-truth-verified correctness fix (confirmed directly against the standalone objdump, not inferred), consistent with CONTRIBUTING's own caution that raw dh/wrong_instructions are not strictly comparable across candidate-size changes and this router class (compiler-unemittable) pins on the same allocator-class defect regardless of body content. Kept the fix on correctness grounds rather than reverting to chase a smaller raw number. matched_prefix held at 7 throughout both fixes (3 repeated deterministic rescores each, all compile=cache with identical numbers), and the router class is compiler-unemittable at both points, meaning the dominant remaining divergence is the prologue frame-size/register-set gap (candidate: 12-byte frame, 2 saved registers; reference: 48-byte frame, r8-r11 saved) rather than incorrect body content. `bun tools/allocator-lens/lens.ts 080be378` sampled after the fixes still shows no pseudo with a genuine HI_REGS preference in the excerpted records (all sampled pseudos prefer LO_REGS/BASE_REGS/STACK_REG), consistent with the gap being driven by aggregate live-range-overlap count rather than any single pseudo's class cost. This attempt audited the actor/req/tgt base-pointer attribution at the head, the shared L_080bf1a8 exit, and the abilityId==178 loop named/reached by the task; it did NOT re-check the remaining case bodies in Region_080be76c/080beb08 (the tier==0..4 blocks, the L_080bee08 status/kind table, the buff/debuff classification, elemental/status-code tables) for the same class of bug, which is the concrete next step recommended below given how much a base-pointer misattribution can shift which value the allocator treats as worth spilling across `bl` boundaries -- and given that this pass found three separate instances of exactly that mistake on only a partial audit."},{"candidate":"Resolved every Region_080be76c literal-pool placeholder and the shared head-function pre-check flags/messages from ground truth (standalone-assemble games/gs1/asm/080be378.s and games/gs1/asm/080be76c.s, objdump, ROM-direct read for pool words landing outside each file's own .text). Renamed the old single-purpose ACTOR_FLAG_A/B/C_OFF and REQ_FLAG_OFF macros into per-site names once ground truth showed they were distinct fields being conflated (ACTOR_FAINT/SILENCE/SEAL_FLAG_OFF=325/316/315 on actor for the head's pre-checks, ACTOR_STATUSFLAG_OFF=304 on actor for the head's &1 gate, ACTOR_COST_FLAG_OFF=317 on actor for tier==1's cost check, REQ_FLAG_OFF=299 on req for tier==2/case888). Rewrote tier==4's ~20-way abilityId classification from a partial switch+TODO-default into an exact nested if/else matching the reference's real branch tree (0x080be9ce-0x080bea9a), resolving K1..K4_ABILITY_ID to 441/495/499/503 and all exact-match/message constants. Region_080beb08's own TEXT_TBD placeholders (4 call sites) were left unresolved, explicitly deferred to keep this pass inside its stated scope.","candidate_bytes":2962,"differing_halfwords":1772,"wrong_instructions":1770,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"missing-extra-code","note":"dh improved 1799->1772 (candidate_bytes grew 2502->2962, consistent with more real body rather than regression). matched_prefix held exactly at 7 across 3 repeated deterministic rescores (compile=cache each time). This confirms the prior attempt's conclusion: the r8-r11/48-byte-frame register-pressure gap is not sensitive to which immediate values a block loads, only to how many distinct pseudos stay live across `bl` boundaries -- these constant fixes changed correctness of individual instructions (real dh improvement) without changing the function's live-range shape (unchanged matched_prefix). The `--align` diff at the top of the function is unchanged in kind from prior attempts: candidate still allocates a 12-byte frame with 2 saved registers where the reference allocates 48 bytes with 4 (r8-r11)."},{"candidate":"Head-only draft: real prologue/frame, the shared setup sequence (actor lookup, target-record zeroing, dead-unit check, tier read), the tier>99 guard, and the 100-way switch dispatch skeleton. All three switch-case body regions (Region_080be76c, Region_080beb08, Region_080bef88's classification/accumulation tail) are left as single TODO stubs calling Func_080bee00 rather than folded in instruction-by-instruction.","candidate_bytes":132,"differing_halfwords":1847,"wrong_instructions":1623,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"Router verdict at this size is compiler-unemittable / playbook=classification-proof, i.e. 'do not search spellings for a shape the compiler cannot emit' -- expected and correct at this stage: the reference prologue saves r8-r11 across dozens of `bl` calls spread through ~3.2KB of case-body logic, so a stub this short cannot reproduce that register pressure. The mismatch starts at instruction 1 (candidate emits `mov r7,r8` where the reference emits `mov r7,fp`, i.e. GCC picked a different, much smaller register-saving shape for a much smaller function) and is a direct, expected consequence of the missing body, not a spelling or allocation defect worth tuning yet."},{"candidate":"Complete structural draft: all three case-body regions (Region_080be76c's 5 switch-case bodies at 0x080be76c/7d0/888/96e/984, Region_080beb08's case-5/case-6/default bodies including its internal ability-family sub-dispatch, and Region_080bef88's converging tail through the real epilogue) folded into Func_080be378 as goto-labeled blocks matching the original addresses, replacing every cross-region `bl sub_080bec5c`/`sub_080bec8a`/`sub_080bee00`/`sub_080bf1d6`/`sub_080bf1d4` with a plain `goto` to an internal label (justified: the tier==99 default case's own trailing `bl sub_080bf1d4` is the file's last instruction before its literal pool, so it structurally cannot be a real returning call). candidate_bytes grew from 132 to 1296 (roughly matching the reference's ~3696-byte scope now that all case bodies are present). Several literal-pool constants (status-flag byte offsets, ~4 exact ability-id compare constants, UI text-resource pointers) are left as named 0/NULL placeholders pending halfword-stage decoding.","candidate_bytes":1296,"differing_halfwords":1843,"wrong_instructions":1621,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","matched_prefix":1,"note":"Despite the body growing roughly 10x and now covering every branch/case observed in the retained assembly, matched_prefix and dh barely moved (1847->1843, wrong_instructions 1623->1621, matched_prefix stayed at 1). The router still reports compiler-unemittable at the prologue: GCC still only spills 2-3 high registers (`mov r7,sl; mov r6,r8; push {r6,r7}`) instead of the reference's full r8-r11 four-register save + 48-byte frame."},{"candidate":"Dense 100-arm switch matching JumpTable_080be570 exactly (every index 0..99 spelled out as its own `case N:` per the coordinator's instruction, grouped by shared goto target; case 99 = the true 0x080be700 body, newly reconstructed from games/gs1/asm/080be378.s's tail block). Verified via games/gs1/scratch/candidate-show/080be378/candidate.insns that this DOES make GCC 2.96 emit a real tablejump (`cmps r3,#99 / bls / ldr r2, / lsls r3,#2 / ldr r3,[r3,r2] / movs pc,r3`), confirming CASE_VALUES_THRESHOLD and the range/count heuristic in alchemy-gcc/agscc/gcc/stmt.c:5390-5401 (`count < 5 || range > 10*count`) are both satisfied for this shape -- the sparse hand-grouped switch from the previous pass did not reliably guarantee this, the fully-enumerated one does.","candidate_bytes":1696,"differing_halfwords":1820,"wrong_instructions":1715,"matched_prefix":1,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"5 deterministic rescores after this edit all produced the identical candidate=1696/dh=1820/matched_prefix=1 (no randomness in the toolchain, as expected -- confirms the number is stable, not noise). The tablejump theory (that forcing a dense switch would, on its own, widen the live set enough to fix the r8-r11 prologue) did NOT pan out: matched_prefix is measured from function entry, and the prologue's register-saving instructions are decided by GLOBAL register pressure across the whole function body, which is a property of how many DISTINCT values are simultaneously live across `bl` boundaries -- not of whether the dispatch mechanism happens to be a table vs a compare-chain later in the body. Read `bun tools/allocator-lens/lens.ts 080be378` (473 pseudos total) and alchemy-gcc/agscc/gcc/stmt.c's expand_end_case: the table-vs-chain decision and the prologue-shape decision are two independent compiler passes (stmt.c case expansion happens at tree-to-RTL time; local-alloc/global register class assignment happens later and is driven purely by live-range overlap counts). Root-cause hypothesis, now stronger: several sub-blocks in this draft are still simplified TODO stubs (L_080bee08's status/kind table, L_080bef28's status-cure gate, and critically Region_080bef88's real per-target power-accumulation loop at `.L_080bf0ca`) that in the true source reference `req`/`actor`/`abilityData`-equivalent values dozens of times each; my simplified stand-ins reference them only a handful of times, so the allocator finds it cheaper to reload from memory on demand than to dedicate 4 whole callee-saved registers for the function's duration. Finishing those specific remaining blocks (not further switch/table tuning) is the concrete next step most likely to move matched_prefix."},{"candidate":"Finished exactly the three stub blocks named by the coordinator, translated faithfully from the retained assembly with literal-pool constants resolved directly from roms/gs1-en.gba (per-owner .o disassembly leaves the pool physically out of the isolated object's bounds, so pc-relative target addresses were computed by hand against Region_080beb08's real load address 0x080beb08 and read straight from the ROM file -- verified against the known-good table-address entry at local offset 0x468, which round-tripped to 0x080bee70 exactly): (1) L_080bee08's status/kind table setup, now writing tgt->76/80/84/88 from `targetUnit` (a newly-introduced variable -- Func_08077008(tgt[2]), the ability's recipient, distinct from `actor`) using resolved constants actor+297 (flag byte), actor+296 (subclass byte), and tgt->88 combos 0x4001/0x4004; (2) L_080bef28's status-cure gate, now reading targetUnit+56/+316/+2068/+315/+314 (offsets 2068=0x814 and 315=0x13b read from ROM at 0x080bef7c/0x080bef80) instead of the generic actor-flag placeholders; (3) the per-target power-accumulation loop at 0x080bf0ca in Region_080bef88, gated on `abilityId==178`, looping `(s8)tgt[1]` times over tgt[2+i] calling Func_08077178(reqId, slotByte, abilityData->2, abilityData->3, 100) and writing the byte result to tgt[2+i+56].","candidate_bytes":1884,"differing_halfwords":1807,"wrong_instructions":1711,"matched_prefix":1,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"dh improved modestly (1820->1807) and wrong_instructions ticked down (1715->1711), consistent with the newly-resolved constants and loop being genuinely closer to the reference, but matched_prefix is STILL 1 and the prologue is unchanged (still `mov r7,sl; mov r6,r8; push {r6,r7}` instead of the reference's 4-register r8-r11 save). This refutes the specific strong form of the root-cause hypothesis from the previous attempt -- finishing these three particular blocks alone was not enough to force the wider live set. Two things stand out for the next pass: (a) `targetUnit` and `abilityData` are each used only within their own local block and are not read again near the shared exit (L_080bf1a8), so they still don't have function-wide live ranges; (b) large parts of Region_080bef88 remain deliberately unmodeled per this pass's scope (the buff/debuff classification table at 0x080bf044, the elemental-table lookup at 0x080bf0f8, the status-code selection at 0x080bf14a-0x080bf16c, and the sub_080772b8 flag-bit set at 0x080bf166-0x080bf186) -- all of which read `actor`/`abilityData`/`tgt` repeatedly and sit between here and the real epilogue, so they are very likely where the reference's actual register pressure comes from, not the three blocks addressed this pass. Recommend finishing the rest of Region_080bef88's body next, specifically because it is the last region before the shared epilogue and thus the most likely place where GCC 2.96 decides multiple values must stay resident across the tail rather than being reloaded once."},{"candidate":"Translated the remaining Region_080bef88 tail blocks named by the prior attempt's recommendation: the buff/debuff classification (0x080befb4-0x080bf043, a 4-way capValue/stepValue classification of abilityData->3 gating a per-slot tgt+30.. step-accumulation loop), the elemental-table lookup (0x080bf0f8, `((u32*)0x080c2da0)[abilityId]` with a stacked-count scaling term for count>1), the status-code selection (0x080bf138-0x080bf16c, a status-override byte table at 0x080c2b98 falling back to Func_080bd3c8()/tgt->88/req->297 gating), and the sub_080772b8 flag-bit set (tgt->88 |= 0x10000, plus an abilityId==178 tgt->58 gated |= 0x1000). All resolved by assembling games/gs1/asm/080bef88.s standalone (already 4-byte aligned at its real load address 0x080bef88, no parity padding needed) and objdumping it, then reading the 8 pool words that land in the gap immediately after the region's own 608-byte code (0x080bf1e8-0x080bf207) straight out of roms/gs1-en.gba: 0xffff (rand mask), 0x206/518 and 0x205/517 (abilityId bounds), 0x080c2da0 and 0x080c2b98 (the two lookup-table base addresses, referenced via raw address casts per the project's existing `((u32 *)0x080a0108)[selection]` convention), 0xfffff000 (stack-count scaling additive), and 0x129/297 (a charge-flag byte offset -- same numeric value as the actor+297 flag used in the L_080bee08 block above it, but modeled here as req+297 since this file's own sp+12 stack slot holds &req throughout, established by the region head's own Func_080772f8(req[0]) call). Also fixed a bug the objdump surfaced in the existing abilityId==178 per-target power loop: its first Func_08077178 argument was wired from `req+0` but the standalone disassembly shows r10 (this file's dedicated `&actor` register) dereferenced immediately before that read, so it is `actor+0`. Wired reachability by routing the shared `sub_080bee00` convergence label (previously merged with sub_080bec5c/sub_080bec8a/sub_080bf1d6 into a single stub) into this new tail instead, since the domain notes explicitly describe sub_080bee00 as the 'clamp/finalize' point that converges before the per-target power write -- the other three veneers (dead-unit tail-call, early-return, and the two shared-epilogue jumps confirmed by objdump to land directly at the `movs r0,#0 / add sp,#48` epilogue entry, skipping the L_080bf1a8 status-remap check) still go straight to L_080bf1a8 as before.","candidate_bytes":2502,"differing_halfwords":1799,"wrong_instructions":1768,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"dh improved 1807->1799 and matched_prefix jumped 1->7 (the reference's frame-size instruction itself, `sub sp,#48` vs our `sub sp,#12`, is now only 3 instructions past the prior mismatch point instead of being instruction 1). wrong_instructions rose 1711->1768 alongside candidate_bytes growing 1884->2502, consistent with more real body being scored rather than a regression -- this router class pins on the same allocator-class defect regardless of body content, so raw counts are not comparable across very different candidate sizes per CONTRIBUTING.md's own caution about that. `bun tools/allocator-lens/lens.ts 080be378` now reports 637 pseudos (up from 473), confirming the new tail did add real live ranges, but the prologue still only spills 2 registers instead of the reference's four (r8-r11) + 48-byte frame -- the remaining gap is not local to Region_080bef88 anymore (that region's tail is now translated end to end, matched_prefix advancing past instruction 1 confirms it changed something real) but almost certainly comes from the OTHER still-placeholder blocks scattered earlier in the function: the TEXT_TBD UI text pointers, ACTOR_FLAG_A/B/C_OFF and REQ_FLAG_OFF placeholders, and the K1-K4 abilityId literal-pool compare constants in Region_080be76c's tier==4 case. Each of those is a real read of `actor`/`req`/`abilityId` that the placeholders currently model as inert (mostly 0/NULL), so they do not contribute to global live-range pressure the way a real dereference would. Recommend resolving those literal-pool constants next (same standalone-assemble-and-objdump or ROM-direct technique used here), one region at a time starting with Region_080be76c since it is reached earliest in the function and its case bodies are the shortest remaining stubs, rather than any further work inside Region_080bef88 itself, which is now fully translated instruction-for-instruction against its own standalone objdump."}],"notes":["Recovered only from retained owner assembly in games/gs1/asm/{080be18c,080be378,080be76c,080beb08,080bef88}.s and games/gs1/source-paths.json. No leaked source, other decompilation project, or GS2 evidence was used.","games/gs1/recon/en/dossiers.json#main:080bef88 (the prior task's dossier) remains accurate for its own local evidence but its 'recommendation' section's guess that 080bf678/080bfba4 belong to this cluster is superseded by this dossier's refutation above; that file is left unmodified since it correctly records what was known at the time."]},"main:080bef88":{"schema_version":1,"namespace":"main","address":"0x080bef88","status":"blocked","owner_bytes":608,"executable_owner_bytes":608,"candidate_bytes":170,"differing_halfwords":304,"wrong_instructions":308,"measured":"2026-08-29","domain":"Battle action/ability resolution tail: elemental-power roll, ability-kind classification (attack/unleash/psynergy family codes), success-rate gating, per-target power step accumulation, jump-table power-tier lookup, djinn-summon power table application, and per-target hit-power writing for one battle action.","blocking_finding":"Region_080bef88 is not a standalone function. Its retained assembly begins directly with `ldr r3, [sp, #12]` -- no push, no stack allocation -- yet its epilogue restores four callee-saved registers (r8-r11) plus lr via a pop/mov-shuffle sequence that was never pushed anywhere in this owner's 608 bytes. The matching prologue does not exist at this address. Tracing the call graph shows why: the immediately preceding owner, games/gs1/asm/080beb08.s, also begins with no push (`mov r2, r10` as its first instruction) and reaches this owner only via a plain conditional branch (`bne sub_080bef88`, the literal final instruction of 080beb08.s) -- not `bl`. 080beb08.s itself is reached the same way from games/gs1/asm/080be76c.s, which also opens with no push (`ldr r4, [sp, #12]`) and already treats r9, r10, r11 as live incoming state. All three owners (080be76c, 080beb08, 080bef88), plus their forward siblings 080bf678 and 080bfba4 (both referenced by absolute-address branches from this owner and from 080beb08), are internal branch targets of one very large enclosing function whose real entry (push of r4-r11 equivalent plus lr, and its stack-frame allocation) lies at an address earlier than 080be76c that was not in scope for this task. None of the five sibling owners in this call-graph-reachable region currently has any candidate C or json, and none is registered in games/gs1/recon/translation-units.json.","why_this_caps_the_score":"GCC 2.96 cannot emit a function whose body performs multiple `bl` calls and uses four callee-saved high registers (r8-r11) with zero prologue -- `bl` clobbers lr, so any non-leaf function must save it before the first call, and any use of r8-r11 across a call requires them to be pushed (via the low-register mov-shuffle idiom, which is exactly what this owner's own epilogue performs on the way out). Every ordinary top-level C function compiles to a real prologue at its entry point. The 608-byte reference has no prologue at 0x080bef88, so no top-level C function reconstruction of this owner in isolation can ever reach differing_halfwords=0; the mismatch is present in the very first emitted instruction regardless of body content.","attempts":[{"candidate":"empty stub `void Func_080bef88(void) {}`","candidate_bytes":2,"differing_halfwords":304,"wrong_instructions":291,"topology":"different","note":"Baseline: confirms reference content is 608 bytes of real logic starting immediately, with no room for any prologue."},{"candidate":"full best-effort translation of the observed logic (elemental roll, ability-kind switch/dispatch, per-target power accumulation loop) as a 3-argument standalone function","candidate_bytes":170,"differing_halfwords":304,"wrong_instructions":308,"topology":"different","note":"GCC emits the expected `push {r5,r6,r7,lr}; mov r7,r8; push {r7}` prologue as instruction 1-3, which the reference does not have at any point. Confirms the mismatch is structural (missing shared frame), not a body/logic/type problem -- register-allocator and body changes cannot remove a prologue the reference never had."}],"refuted_hypotheses":["That Region_080bef88 is a normal, independently callable function reached via `bl` -- refuted: every real cross-reference to this address and to its immediate predecessor/successor owners in games/gs1/asm/*.s uses a bare conditional or unconditional branch (`b`/`bne`), never `bl`, and the only owner in this cluster with a real prologue was not located within the searched call graph.","That a leaf-style or reduced-register-pressure rewrite of the body could remove the prologue -- refuted by the second attempt: the body genuinely calls into 7 external functions and needs 2+ values (an elemental-power actor id and a target-power sign/kind) live across those calls, which GCC 2.96 can only keep in callee-saved registers, forcing the same class of prologue regardless of phrasing.","That forcing a `naked`/prologue-less function via project-approved means could resolve this -- not attempted: CONTRIBUTING.md and Cleanroom's ordinary-C89 rule prohibit fixed-register variables, empty barriers, and other escape hatches used to fake a shape the compiler would not otherwise emit; a naked function is exactly such an escape hatch."],"recommendation":"This owner cannot be adopted independently. It must be reconstructed together with its full enclosing function, which spans at minimum games/gs1/asm/080be76c.s, games/gs1/asm/080beb08.s, games/gs1/asm/080bef88.s, and (via absolute-address branches observed in this owner and 080beb08) games/gs1/asm/080bf678.s and games/gs1/asm/080bfba4.s, plus whatever earlier owner holds the real prologue reached only by `bl` from outside this cluster (not identified in this session). The correct route per CONTRIBUTING.md's 'Translation units with holes' section is to scaffold a translation unit over that whole address range with `bun tools/unit-scaffold/scaffold.ts`, then reconstruct the enclosing function as one candidate and score every member owner from the same compiled object with `candidate-show --unit`. That scaffolding step was out of scope for this task (games/gs1/recon/translation-units.json is explicitly off-limits here) and is left for a follow-up with the correct scope.","notes":["Recovered only from retained owner assembly in games/gs1/asm/{080be76c,080beb08,080bef88,080bf678}.s, the approved compiler's candidate-show/allocator-lens tooling, and mined neighbor conventions (struct/BattleUnit field-offset naming style from games/gs1/recon/en/main/0808e23c.c, 0808e680.c, 08079460.c). No leaked source, other decompilation project, or GS2 evidence was used.","The candidate C left in games/gs1/recon/en/main/080bef88.c is the second (170-byte) attempt above: a readable, non-adopted draft reflecting the recovered algorithm shape for the benefit of whoever scaffolds the real translation unit. It is not claimed as any fraction of DONE bytes and must not be built into production output as-is."]},"main:080c00d8":{"schema_version":1,"namespace":"main","address":"0x080c00d8","status":"measured-draft","owner_bytes":88,"executable_owner_bytes":88,"candidate_bytes":84,"differing_halfwords":42,"wrong_instructions":32,"cross_edition":{"object_bytes":88,"relocation_bytes":12,"literal_bytes":16,"relocation_normalized_core_bytes":60,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b70d8","en":"0x080c00d8","de":"0x080c26f0","es":"0x080c40f0","fr":"0x080c40f0","it":"0x080c00f0"}},"domain":"Builds the battle-presentation tilemap and clears its surrounding map regions before upload.","expressed":["clears the first 256-byte region to the empty tile value","fills the following 128 bytes with the shared boundary tile pair","writes 240 sequential paired tile indices","clears the trailing 640-byte region using the shared fill source"],"bounded_search":{"mode":"080bbb0c-family-calibration","safe_attempted":5000,"classic_attempted":10000,"exact":false,"best_safe":"84 candidate bytes, 42 differing halfwords, and 32 wrong instructions; structural alignment improved without a linked-byte improvement","best_classic_unverified":"84 candidate bytes and 40 differing halfwords; a transient candidate reached 39, but no exact candidate appeared and classic nonzero output is not semantic evidence","reason":"Both bounded axes remained four bytes short and broad; more volume without a new source model is closed."},"notes":["Independent object analysis bounds this leaf at 88 executable bytes and proves all 60 relocation-normalized core bytes identical across the six approved GS1 editions.","An integer cursor and assembly-shaped do-while loop reduce structural mismatches while keeping the source readable, but the remaining allocation and literal schedule is not localized.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered palette caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","Supplying the exact preprocessed 080bbb0c source as m2c context produced the same 52.62162% structural draft as the candidate's own context; this owner has no declaration or type relationship that the large battle resolver can transfer.","A 5,000-candidate safe walk and a 10,000-candidate classic exact-only walk biased by 080bbb0c produced no exact or exact-extent candidate. No generated source replaced the readable draft.","2026-08-27: Both bl targets are veneer slots, not real functions -- 0x080072f8 is 0x080072e4 + 4*5, the __call_via_r5 entry, and 0x080072f0 is 0x080072e4 + 4*3, the __call_via_r3 entry (games/gs1/asm/080072e4.s). Address 0x03000168 is the established relocated-IWRAM-fill routine (destination, size, value), already named in the sibling owners at 0x080c00c4 (games/gs1/src/graphics/tile/build_sequential_table.c, 20 bytes before this one), 0x08016744, and 0x08016728, all of which pass it through the r3 slot as a bare trailing literal per the fixed_sqrt.c precedent -- exactly what the current draft's closing Func_080072f0(cursor, 0x280, 0x03ff03ff, 0x03000168) already does, and that part is not in question.","The reference's mystery early 'ldr r5, [pc, #64]' (0x03000168 loaded once, kept live across both Func_080072f8 calls with no visible r5 read afterward, per CONTRIBUTING's own catalog item 4) is that same IWRAM-fill address being called through r5 for both calls -- catalog item 4 requires this to be modeled as a genuine indirect call through a function-pointer local, since r5 is beyond r3 and this compiler never assigns an AAPCS argument past r3.","Tried three source shapes for that r5-slot call: a single named IwramFill local reused for both fill() calls; two bare inline ((IwramFill)0x03000168)(...) casts with no named local; and two independently-declared locals (fill1/fill2) each initialized to the same cast. All three produced byte-identical (worse) output: candidate grows to 96 bytes / 47 differing halfwords / 42 wrong instructions, because the compiler puts the fill-pointer pseudo in r8 rather than r5 or r6, forcing an extra mov r8,r3 / push / pop r8 relay through r3 that the reference never has -- despite only two callee-saved values (destination, fill) actually being live at once, well within r4-r7. Register choice was identical across all three phrasings, which rules out a phrasing-level fix and matches this session's already-documented local-alloc.c qty_compare tie-break dead end (catalog item 2) from a new angle: the register a live-across-a-call value lands in is not steerable by re-wording the C source. Not pursued further -- would require forcing register assignment, which CONTRIBUTING.md prohibits. Reverted to the committed 84-byte / 42-differing-halfword draft; the phantom-direct-call model for Func_080072f8 remains semantically imprecise (no source-level r5 load) but is the better-scoring and non-regressing option on hand.","This does narrow the search: a working fix, if one exists, needs to make GCC choose r5 (or r6) over r8 for a value that must survive two intervening `bl`s -- e.g. by changing what else is simultaneously live at that point in the function, not by changing how the fill pointer itself is spelled. Left unexplored given this owner's small-leaf effort budget."]},"main:080c0184":{"schema_version":1,"namespace":"main","address":"0x080c0184","status":"proven-retained","owner_bytes":56,"candidate_bytes":60,"differing_halfwords":25,"wrong_instructions":28,"classification":"thumb_multiple_transfer_module","notes":["The readable candidate decrements and bounds the selected tile variant, then writes a 32-byte source, VRAM destination, and fixed DMA control value.","The reference keeps that computed source in the first transfer register and emits one restored-writeback three-word DMA transfer. The current canonical source keeps the index in r3 and emits three scalar stores.","Bounded ordinary-C aggregate trials either retained the scalar-store result (60 bytes, 27 differing halfwords) or introduced a 12-byte stack aggregate and block copy (68 bytes, 31 differing halfwords). Two inline helper argument orderings remained 60 bytes and retained scalar stores.","No compiler-route change, inline assembly, fixed-register variable, barrier, ABI escape, copied instruction bytes, or external source was used. Retained assembly remains authoritative and this draft claims zero DONE bytes.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080c0228":{"schema_version":1,"namespace":"main","address":"0x080c0228","status":"measured-draft","owner_bytes":112,"executable_owner_bytes":112,"candidate_bytes":112,"differing_halfwords":38,"wrong_instructions":70,"template_family":"template-main-0801a910","template_source":"games/gs1/src/resource/transfer/find_free_entry.c","domain":"Not related to the m2c-pseudocode template beyond superficial n-gram shape: paints one 32-tile-wide VRAM tilemap row (0x06006000) with a computed tile id derived from a runtime counter, then paints a second, vertically mirrored row 13 tiles further down with the same tile id plus a 0x800 attribute bit set (a horizontal-flip or alternate-palette bit), guarded by a row-range check the first write doesn't need.","behavior":["reads a runtime counter via double indirection through the fixed cell Data_03001ef8 (a pointer-to-pointer style global); returns immediately if the value is above 79 (unsigned)","tile id = (value & 7) + 0xf081; row = 13 - (value / 8, rounded toward -inf via the classic '(v>=0?v:v+7)>>3' idiom); fills all 32 halfwords of that VRAM row with the tile id","second pass: same division recomputed (redundant re-evaluation, matching this corpus's established double-read idiom), row = (value/8) + 13; if that row exceeds 20 (unsigned) the function returns without the second write; otherwise fills that row with tile id | 0x800"],"bounded_search":{"mode":"source-shape","attempted":2,"exact":false,"reason":"First candidate used 'for (i=0;i<32;i++) dst[i]=tile;' fill loops, which compiled to a pointer-limit-compare loop (116 bytes, 78 wrong instructions) instead of reference's counter-compare loop. Rewriting both fills as an explicit 'i=0; do { i++; *dst=tile; dst++; } while (i != 32);' idiom (matching the counter-based loop shape used elsewhere in this corpus) brought candidate to the exact reference size (112/112 bytes) with the full control-flow shape now matching instruction-for-instruction."},"remaining":"Same size, same control flow, same field/offset math -- the residual 38 differing halfwords are essentially all register-number swaps. Creating the signed division carrier before the tile expression now retains the runtime value in the reference's r0 and removes two mismatches, while the candidate still keeps the tile id in r1 and uses only caller-saved registers. The reference keeps the tile id in r4 and the first VRAM base in r5, so it pushes {r5, lr}. This is an allocation-order gap rather than a source-shape or behavioral gap; further work needs evidence for the tile/base lifetimes, not broad structural mutation.","notes":["The Data_03001ef8 double-indirection and the 0x06006000 VRAM tilemap base are read directly from the retained assembly; no cross-owner corroboration was available for this specific cell within this pass's time budget.","Recovered only from retained owner assembly and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed.","2026-09-01: the allocator-order decoder identified the runtime value as candidate r1 versus reference r0. Initializing the division carrier from the value before expressing the independent tile calculation moves that value to r0 while GCC schedules the same arithmetic and preserves the exact 112-byte topology. The measured residual improves from 40 differing halfwords / 72 wrong instructions to 38 / 70. The tile and literal carriers remain r1/r4 instead of reference r4/r2; this edit is retained because it names and removes one allocation-role error without forcing a register.","2026-09-01 VRAM contract audit: the two tilemap fill destinations are now volatile u16 pointers, matching the GBA memory-mapped I/O contract. The correction is output-neutral under GCC 2.96 (112/112 bytes, 38 differing halfwords, 70 wrong instructions), so it hardens the source semantics without claiming a byte-match improvement or perturbing the measured residual."]},"main:080c0774":{"schema_version":1,"namespace":"main","address":"0x080c0774","status":"proven-retained","owner_bytes":308,"executable_owner_bytes":308,"candidate_bytes":364,"differing_halfwords":178,"wrong_instructions":178,"cross_edition":{"object_bytes":308,"relocation_bytes":12,"literal_bytes":80,"relocation_normalized_core_bytes":216,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b7774","en":"0x080c0774","de":"0x080c2d8c","es":"0x080c478c","fr":"0x080c478c","it":"0x080c078c"}},"domain":"Configures the battle-presentation palette phase, optionally schedules its display event, applies a palette fade, and uploads the two presentation tile regions.","expressed":["installs the presentation callback on first activation and stores the active palette mode","queues the mode-one display event while preserving the interrupt-enable register","copies the base palette block and its shared accent color","either DMA-copies the complete battle palette or subtracts the fade value from each RGB5 channel","uploads the two presentation tile regions after palette preparation"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is 56 bytes long with 178 differing halfwords and fails both exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 308 executable bytes and proves all 216 relocation-normalized core bytes identical across the six approved GS1 editions.","The source expresses the complete event, DMA, RGB5 darkening, and upload behavior. The residual spans literal scheduling, volatile DMA stores, and loop allocation rather than a localized hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-presentation callers, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."],"sr_route_evidence":{"verdict":"COINCIDENTAL","measured":"2026-08-29","note":"asm/080c0774.s has 12 loop labels, several trivial (.L5/.L7/.L9, 1 line, likely fallthrough targets rather than real loops) and none showing the class-(a) empty-countdown shape. Larger loops (.L0, .L1, .L3) were not traced for SR-sensitive addressing under a dual compile. Provisional COINCIDENTAL pending compiler diff."}},"main:080c0cec":{"schema_version":1,"namespace":"main","address":"0x080c0cec","status":"measured-draft","owner_bytes":264,"executable_owner_bytes":264,"candidate_bytes":276,"differing_halfwords":103,"wrong_instructions":68,"cross_edition":{"object_bytes":264,"relocation_bytes":56,"literal_bytes":16,"relocation_normalized_core_bytes":192,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b7cec","en":"0x080c0cec","de":"0x080c3304","es":"0x080c4d04","fr":"0x080c4d04","it":"0x080c0d04"}},"domain":"Initializes the render and projection state used by paired and single-unit battle-presentation transitions.","expressed":["stores the requested scene position and derives its fixed-point scale","initializes the transform and render workspaces","applies scene camera offsets and computes source and rendered bounds","sets both transition timing fields to 120","derives the final centered projection rectangle and scaled render buffers"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The candidate now has non-owner-matching 276-byte extent and is 103 differing halfwords / 68 wrong instructions away, outside the <=20-halfword admission gate."},"notes":["Independent object analysis bounds this owner at 264 executable bytes and proves all 192 relocation-normalized core bytes identical across the six approved GS1 editions.","Explicit local-array initialization avoids a non-canonical memset and gives exact candidate extent. The remaining mismatch spans register allocation and call scheduling rather than a localized compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-presentation callers, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: Root cause of the prior draft's 77-differing-halfword score was a mismodeled call, exactly the class already found on sibling owners this session. `Func_08007310` is not a real function: 0x08007310 is the fp (r11) slot of the fourteen-entry `_call_via_rN` trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8`, 4 bytes/slot, r0..sp). fp is never a valid argument-passing register on this compiler (arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c stops argument passing at r3), so a 2-argument call to a symbol named 'Func_08007310' can never legitimately compile to code that also loads a call target into fp. Traced the true call target directly from games/gs1/asm/080c0cec.s using PC-relative literal-pool arithmetic (effective_addr = align4(instr_offset+4)+imm): the `ldr r2,[pc,#192]` at byte offset 58 resolves to pool slot 252, i.e. 0x0300013c, which is then moved into fp via `mov fp,r2` at offset 76 and never rewritten again before EITHER `bl Func_08007310` (offsets 84 and 212) -- both calls go through the exact same fp value, 0x0300013c, for the whole function.","0x0300013c is not a novel address: it is already an established, adopted helper in this exact codebase (grep confirms 4 independent recon/src files already call it this way), consistently modeled as a 2-argument function pointer cast/call with the literal address used directly as the callee, e.g. games/gs1/src/battle/effects/schedule_ratio_transition.c's `typedef s32 (*ArmRatio)(s32,s32); ArmRatio ratio=(ArmRatio)0x0300013c; result=ratio(arg0,0x10000);` (with an explicit comment: '0x0300013c is the relocated ARM ratio helper... TWO arguments'), and games/gs1/recon/en/main/080f4028.c / games/gs1/src/camera/scene/configure.c's `((u32(*)(u32,u32))0x0300013c)(N, 192<<8)` -- note the second argument in those two siblings is literally `192<<8` = 0xc000, the exact same second argument this owner's disassembly requires (0xc000) at both call sites, strongly corroborating this is the identical helper with the identical calling convention. Rewrote both call sites as genuine indirect calls through this traced literal, `((u32(*)(u32,u32))0x0300013c)(arg0, 0xc000)`, removing the fictional Func_08007310 prototype/call entirely and matching object dump confirms both now compile through `_call_via_rN` veneers rather than a direct symbolic `bl`.","2026-08-27, residual after the fix: differing_halfwords regressed from 77 to 103 and candidate size grew from the correct 264 to 276 (12 bytes over). This is a real, measured regression versus the (semantically impossible) prior draft, but the prior draft's call-target shape can never reach exact regardless of tuning, since no valid N-argument call to a real function can ever legitimately load its target into fp on this compiler -- so it was a dead end. Root-caused the regression precisely via the compiler's own retained .insns/.s output (candidate-show --asm and the scratch/candidate-show/080c0cec/080c0cec.s intermediate): the compiler places the traced pointer in r2 at each call site (`bl _call_via_r2`, reloaded fresh via `ldr r2,[pc,#N]` at both sites) rather than fp, unlike the reference. Simultaneously, the second argument constant 0xc000 (which the reference recomputes fresh with `movs r1,#192; lsls r1,r1,#8` at BOTH call sites, per the retained asm) gets hoisted by this compiler's CSE into a single register (r7) held live across the whole function, which is exactly what displaces `scale` out of r7 (where the reference keeps it, used directly in ALU ops with zero overhead) into fp instead -- and since fp is a Thumb high register, every later arithmetic use of `scale` now costs an extra `mov r_lo,fp` pair the reference never needs (visible directly in the aligned diff as a 7-instruction block computing `scale*0x1fe` from fp instead of the reference's 3-instruction block using r7 directly). This fp/r7/r2 role reassignment is the entire source of the 12 extra bytes.","2026-08-27, experiments tried on the residual (all produced byte-identical output, i.e. zero effect on the r2/fp/r7 role assignment): (1) inline anonymous cast at each call site vs a single function-wide named `ArmRatio`-style local vs a freshly-declared local in its own nested block at each call site (matching battle_owner_66.c's exact idiom) -- all three identical. (2) nesting the indirect call directly as Func_08005258's argument vs assigning to an intermediate `result` local first (matching 080f4028.c/configure.c's own pattern) -- identical. (3) spelling the second argument as `0xc000` vs `192 << 8` -- identical, confirming (as games/gs1/recon/en/dossiers.json#main:080f4028's own rejected-experiments log already found for the adjacent sibling call using this identical helper) that this compiler's CSE unifies by folded constant value, not source text, so no non-forcing respelling can prevent the same-valued-constant-reuse. This is the same GCC 2.96 register-allocation/CSE class already characterized exhaustively across four other owners this session (080a8c2c, 080ae99c, 080ae9f0, 080b60a0) and explicitly accepted as an architectural floor on the directly-comparable sibling 080f4028.c (same 0x0300013c helper, same 192<<8 second argument) -- there the reference recomputes-fresh pattern was also not reproducible by any legitimate source respelling. Did not force register assignment via `register`-qualified locals, named-register variables, inline asm, or a compiler flag change, per project rules.","2026-08-27: separately, the very first divergence in the aligned diff (matched_prefix=7, i.e. within the prologue) is a pre-existing, independent defect unrelated to this fix: the reference stores the `y` parameter in fp and `depth` in r9 across the Func_080022ec call, while this draft stores `y` in r9 and `depth` in r6 -- confirmed present, byte-identical, in the prior (pre-fix) 77-diff draft too via a clean rebuild from git stash, so this is not something the trampoline fix introduced. This is the same hi-register role-nondeterminism class documented at length in games/gs1/recon/en/dossiers.json#main:080a8c2c's notes (traced there directly into alchemy-gcc/agscc/gcc/local-alloc.c's qty_compare/qty_order tie-break, which depends on RTL discovery order within a basic block rather than C source statement order) -- left undisturbed and unexplored further this pass since that owner's note already records that declaration-order and statement-order experiments measured zero effect on this exact residual class.","Adoption gate not met: differing_halfwords=103, not 0, and candidate_bytes=276 != owner_bytes=264. The call-target modeling is now correct and evidence-complete; the residual is entirely register-allocation/CSE role assignment (class=allocation), not a remaining algorithm, control-flow, type, or call-argument mismatch. Recommend a future pass attack the shared root cause (the qty_compare/local-alloc tie-break behavior, or the CSE constant-caching interaction with it) across all affected owners at once rather than per-owner respelling, consistent with 080a8c2c.json's own recommendation.","Recovered/verified only from retained owner assembly (games/gs1/asm/080c0cec.s), the retained assembly and JSON of sibling owners 080a8c2c and 080f4028 in this same repository, the already-adopted in-repository source files games/gs1/src/battle/effects/schedule_ratio_transition.c, games/gs1/src/camera/scene/configure.c, and games/gs1/src/ui/window/update_interpolated_geometry.c, and the approved compiler's own intermediate output (candidate-show --asm and the scratch/candidate-show/080c0cec/080c0cec.s dump). No GS2 evidence, external source, other decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080c0f98":{"schema_version":1,"namespace":"main","address":"0x080c0f98","status":"exact","owner_bytes":122,"candidate_bytes":122,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","cross_edition":{"core_bytes":118,"core_diff_bytes":0,"core_identical":true,"callee_correspondences":1},"notes":["Relocation-aware comparison proves all 118 core bytes identical across JA, EN, DE, ES, FR, and IT; only the Actor_GetObject call is relocated.","The complete bitfield-based candidate has exact 122-byte extent and zero differing halfwords.","Moving the record pointer, record-list cursor, and loop counter to function scope transfers the lifetime shape used by exact nearby bitfield and object-record code. agbcc then assigns the record to r4, list cursor to r1, shifted mode to r0, and loop counter to r6 exactly as the ROM does.","Relocation-aware comparison of the exact candidate independently confirms identical executable output at all six edition anchors."]},"main:080c1798":{"schema_version":1,"namespace":"main","address":"0x080c1798","status":"measured-draft","owner_bytes":636,"candidate_bytes":644,"differing_halfwords":306,"classification":"stack-layout-and-allocation","edition_starts":{"ja":"0x080b8798","en":"0x080c1798","de":"0x080c3db0","es":"0x080c57b0","fr":"0x080c57b0","it":"0x080c17b0"},"cross_edition":{"core_bytes":460,"core_diff_bytes":0,"core_identical":true,"callee_correspondences":12},"notes":["All six 636-byte intervals are bounded by the exact 080c16d0 and 080c1a14 sibling correspondences; relocation-aware comparison proves all 460 core bytes identical with twelve callee correspondences.","The complete draft covers display setup, palette transfer, both position-update loops, interrupt-safe DMA request publication, and task construction for modes two and three.","Its first score is 644 versus 636 bytes with 306 differing halfwords and 319 wrong instructions, exceeding the twenty-instruction pivot threshold.","Retained assembly remains authoritative and this draft claims zero bytes."]},"main:080c9048":{"schema_version":1,"namespace":"main","address":"0x080c9048","status":"proven-retained","owner_bytes":156,"executable_owner_bytes":154,"candidate_bytes":156,"differing_halfwords":13,"wrong_instructions":4,"classification":"battle_effect_display_queue_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_display_queue_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":106,"core_identical":true,"owner_alignment_bytes":2,"starts":{"ja":"0x080c0048","en":"0x080c9048","de":"0x080cae48","es":"0x080cc848","fr":"0x080cc848","it":"0x080c9048"}},"domain":"Configures the battle-effect display windows and blend registers, then publishes one display transfer request through the interrupt-guarded 32-entry request queue.","expressed":["the eight observed 16-bit display-register writes","saving, disabling, and restoring interrupt-master state","the signed queue-capacity guard for 32 entries","the 12-byte request stride and count update","the 0x7741, 0x04000000, and 0x00020000 request words","the one-frame completion wait"],"residual":["The linker-resolved Data_02002090 symbol is essential: a numeric pointer lets GCC fold the three request fields into separate absolute addresses, growing the candidate to 176 bytes. The symbol produces the exact 156-byte extent, exact literal set, and both reference single-register writeback stores.","The four wrong instructions are confined to the queue-base and interrupt-master pointer role order plus the independent saved-IME copy schedule. The queue body, control flow, constants, access widths, and final call are otherwise exact.","The allocator decoder reports no unique safe source repair; structured assembly remains authoritative for the four-instruction floor."],"rejected_experiments":[{"experiment":"make the queue count and entry cursors volatile","result":"regresses to 180 bytes and 48 differing halfwords by rematerializing three absolute request-field addresses"},{"experiment":"model the queue as a typed count-plus-request-array aggregate","result":"preserves the 176-byte constant-folded form and adds callee-saved register pressure"},{"experiment":"express interrupt master as a second absolute linker symbol","result":"preserves extent but regresses saved-state allocation and branch placement; the numeric hardware-register pointer remains the stronger four-wrong-instruction candidate"}],"notes":["2026-09-01 retained-assembly proof: the linker-resolved queue symbol produces the exact 156-byte owner extent (154 executable bytes plus two bytes alignment), exact literal set, exact display-register sequence, exact queue body including both single-register writeback stores, and exact final call. The remaining four wrong instructions are equivalent queue/IME/saved-state register roles and independent load/copy scheduling. Canonical, no-regmove, no-schedule-insns, no-GCSE, no-CSE-follow, rerun-CSE, strength, expensive, and O3 routes preserve the floor; sched2 and no-CSE-skip regress. Relocation-aware verification proves all 106 normalized core bytes identical across six editions. Structured assembly is therefore authoritative under battle_effect_display_queue_compiler_allocation_module.","Recovered only from the retained owner assembly, its local callers, the repository's established display-request queue idiom, linker-symbol infrastructure, and the approved compiler.","No GS2 or external source, fixed-register variable, inline assembly, compiler barrier, forced scheduling, or compiler modification was used."]},"main:080c91dc":{"status":"measured-draft","span_bytes":1360,"edition":{"role":"derived-candidate","edition":"en","base_owner":null,"base_edition":"ja","rebase_status":"correspondence-needed"},"boundary":{"start":"0x080c91dc","end":"0x080c972c","evidence":"games/gs1/asm/080c91dc.s contains one global owner and assembles to 0x550 bytes; the next assembly owner begins at 0x080c972c. The complete span lies inside the audited 0x080c91dc-0x080cdbbe Thumb interval; that larger generated target is a contiguous ranked scope containing later owners, not this function boundary."},"score":{"measured":"2026-08-20","candidate_bytes":1336,"reference_bytes":1360,"candidate_instructions":574,"reference_instructions":586,"wrong_instructions":302,"differing_halfwords":408,"matched_prefix_instructions":94,"class":"wrong","last_objdiff_structural_percent":87.82876,"note":"Current candidate-show --align measurement with approved routed flags. The last independent objdiff measurement was 87.82876% before the final interrupted edits; it is retained as historical evidence, not claimed for this source revision."},"shape":{"reference_calls":30,"expressed_loops":9,"reference_pool_words":31,"symbolized_pool_references":44,"jump_table":false,"falling_records":32,"burst_records":32,"record_bytes":28},"expressed":["complete entry, runtime-cell walk, argument binding, display setup, graphics loads, blend-register writes, and shared teardown","all 32 falling-record and 32 burst-record initialization, including the direction-dependent randomized positions and inactive frame sentinel","both direction-dependent 160-entry map-generation loops and all four resource-placement calls","both rectangle callbacks loaded from the local draw registry and invoked indirectly at all three reference call sites","the complete table-bounded outer frame loop, sound gate, falling-record render and movement, impact transition, and target-update loop","the complete impact animation, burst-record allocation, table-driven burst rendering, record countdown, frame submission, and termination paths","all 30 reference call sites, all literal pools, and every branch through the return; no jump table or omitted assembly region"],"unexpressed":[{"op":"source-shape repair","count":"302 instructions","where":"the complete behavior is represented, but normalized comparison still differs in register allocation, declaration lifetimes, expression boundaries, loop induction texture, and call-argument scheduling"},{"op":"size and pool parity","count":"24 bytes","where":"the candidate remains shorter than the 1360-byte reference, chiefly around map-loop literal placement and the main particle-loop aggregate access shape"}],"verified_against_reference":["owner boundary 0x080c91dc-0x080c972c","reference byte count 1360","all 30 static call sites","44 symbolized PC-relative references and no jump table","94-instruction exact normalized prefix"],"blocked_by":"The Luna pass was stopped below the 90% Terra handoff threshold; resume this same owner with Luna and remeasure structural similarity before any tier handoff.","rejected":[],"notes":["The complete reference assembly and every literal pool were read before reconstructing the source. The workbench assembly/symbolization path accounted for 44 references and found no jump table.","The runtime structures use only offsets and widths supported by this owner and related local games/gs1/src/draft evidence; unresolved fields and address-named callees remain deliberately generic.","Linked differing_halfwords remains the adoption measure. This draft is coherent, but it is neither exact nor adoptable."]},"main:080c972c":{"schema_version":1,"namespace":"main","address":"0x080c972c","status":"proven-retained","owner_bytes":1332,"candidate_bytes":1332,"differing_halfwords":340,"wrong_instructions":264,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"family":{"id":"template-main-080ce85c","template_owner":"main:080ce85c","template_source":"games/gs1/src/battle/effects/member_orbit/run.c","note":"Family-matcher's closest template (score 7767/10000) by n-gram/prologue similarity only. Not a structural match: this owner is 1332 bytes against the template's 724, shares only the 0x03001eec heap-cache cursor-advance idiom, the Efx field layout (kind/side/actor/.../cnt@0x14/layers@0x18/actors[8]@0x24) established by puff_arc/run.c and 080cb4ec.c, and the Func_080ed408(46/47,...)+r4-trampoline draw-callback idiom -- not the template's per-frame sine-sweep/orbit-sprite body. The real owner draws a 64-slot ring of randomly-placed 'wave' markers (Data_080ededc[layers*4+{0..3}] gives per-kind ring count, debris-spawn count, ring radius step, and total frame budget), animates each ring cell through a two-cell sprite (24x24 for tick 0-3, 42x42 for tick 4-7) as it expands outward, and once a cell's y-distance crosses 0x27F it pops into a batch of the kind's debris count -- written into a persistent 512-slot fixed-point particle pool at 0x02010140 that every frame ages, draws (through the kind-47 callback) and hands to Func_080e3908 for physics, independent of the ring loop and still running on frames where the kind's ring count is zero. Drafted directly from an m2c decompile of the target's own retained assembly rather than the template body, since only field offsets and callees are shared."},"rejected_experiments":["Hand-written idiomatic restructuring (named locals: heap_cache/work/canvas/draw_a/draw_b/ring/layers/frame, structured for/if instead of m2c's goto blocks): compiled to the same class=wrong with differing_halfwords=604, byte-for-byte the same register-allocation split as the m2c-shaped draft below. Abandoned in favor of the m2c-shaped draft, which is far closer to the reference's own variable/register structure and easier to keep correct.","Rewriting the tick<=3 / tick<=7 draw calls (24x24 vs 42x42) as a single shared call site reached by two `goto block_65` paths through a common `var_r1_wh` width/height variable, mirroring the reference's own control-flow merge point exactly: regressed candidate_bytes 1288->1292 and differing_halfwords 604->609 (wrong_instructions 530->556). Reverted to the two independent calls (one per branch), which the compiler happens to schedule closer to the reference's block order from this source shape.","Declaring `temp_r1_17` (work) as the very first local in the function (ahead of heap_cache/cursor and every other scalar), on the theory that RTL pseudo-register numbering follows declaration order: produced an identical compile (byte-for-byte, same 604 differing_halfwords), so this compiler's allocator is not simply seeded by textual declaration order for this function."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080c972c.s), the approved local EN ROM, the family-transplant workspace's m2c decompile of the target's own bytes (out/family-transplants/main-080c972c/m2c/080c972c.c and target.canonical.s), games/gs1/src/battle/effects/member_orbit/run.c, games/gs1/src/battle/effects/puff_arc/run.c, games/gs1/recon/en/main/080cb4ec.c and 080d82b0.c (both read via `git show main:...` since this worktree's branch predates their commits), and the approved compiler. No other Golden Sun decompilation project or symbol map was consulted.","Manually cross-checked every PC-relative literal-pool load against the disassembly's own byte offsets (address & ~3 + imm) for the function's first ~20 instructions to validate m2c's resolved constants (0x2001 mode arg to Func_080cd594, the 0xCC/0x76 Func_080e0524 resource ids, the (46,7,7,2,2) and (47,7,7,2,3) Func_080ed408 argument sets) before trusting m2c for the rest of the function; all cross-checks matched m2c exactly.","`Func_080072f4` in the raw disassembly is not a real symbol: 0x080072f4 - 0x080072e4 = 0x10 = 4*4, i.e. the r4 entry of the _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s. All three call sites are modeled as direct calls through a DrawRectangleFn loaded once from the kind-46/kind-47 heap-cache slots (heap_cache[7]/heap_cache[8], matching the reference's own sp+16/sp+20 spill-and-reload shape) rather than through a fictional Func_080072f4(...) prototype.","Found and fixed one real bug during iteration: an earlier draft reused the kind-47 draw-callback local as scratch storage for the age-loop's Data_080ede5c byte-offset pointer, clobbering it, and then called the kind-46 callback instead of kind-47 for the persistent-queue age/draw loop. Fixed by using a separate scratch local and casting the correct (still-live) kind-47 pointer for that call; wrong_instructions dropped 530->524 even though candidate_bytes and differing_halfwords ticked up slightly (1288->1292, 604->606) from the larger correct code shape -- kept as a genuine correctness fix, not reverted.","The dominant residual is a single early register-allocation choice: the reference keeps the 'work' pointer resident in sl (r10) for the whole function (`mov sl, r1` right after the prologue's `ldmia r3!, {r1}` cursor-advance load) and uses r8 purely as a reused, non-overlapping loop-counter register across the function's six independent do-while loops. Every draft tried here -- two structurally very different source shapes, converging to the identical 604/606 differing-halfword figure -- instead has this compiler's allocator put 'work' in r8, which then reassigns every one of the function's loop counters to a different low register (r6/r7 depending on the loop) than the reference's r8, cascading into a differing register-field encoding on the large majority of the function's ~660 halfwords even though the underlying instruction sequence, operand values, and control flow are otherwise a near-exact match (compare the fully-aligned Func_080e3908/kind-47-draw call sequence in the persistent-queue age loop). This reproduces, at unusually large scale for this owner's length, the family's documented open 'register allocator keeps a loop-invariant address in a different high register than the reference' residual (see games/gs1/recon/en/dossiers.json#main:080d82b0 and 080f6148.json for the same class on smaller owners) -- no source-shape lever tried here (declaration order, call-site merging, the bug-fix above) moved it. Not source-shape-controllable within this session's evidence; no register hints or asm() were used to force it, per project constraints.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 1,078 non-relocation core bytes identical. The object symbol covers 1,330 bytes; the classified 1,332-byte retained extent includes its two-byte trailing alignment.","A shipped compiler-route and pass sweep tested routed GCC 2.96, explicit GCC 2.96, old-agbcc, regmove, both schedulers, CSE follow/skip blocks, GCSE, expensive optimizations, thread jumps, strength reduction, and rerun-CSE-after-loop. Canonical, no-schedule-insns, no-thread-jumps, strength-reduction, and rerun-CSE routes tie at 340 differing halfwords; all other routes regress or change extent.","The allocator decoder confirms equal branch structure and identifies only register-role constraints with no unique source edit. Combined with the two independent complete source shapes already tested, this closes the ordinary-C axis without forcing the compiler. The retained owner is Proven ASM under battle_effect_compiler_allocation_module; the C remains the evidence-bearing reconstruction."]},"main:080ca1fc":{"schema_version":1,"namespace":"main","address":"0x080ca1fc","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":896,"score":{"measured":"2026-08-27","candidate_bytes":892,"reference_bytes":896,"differing_halfwords":300,"wrong_instructions":204,"class":"wrong","note":"First pass, recovered directly from games/gs1/asm/080ca1fc.s (429-line retained disassembly, fully hand-traced instruction by instruction) plus the m2c-assisted context at out/family-transplants/main-080ca1fc/m2c/ (target.canonical.s, symbolized.s with resolved literal-pool values, and an m2c --valid-syntax seed used only for a first read of control-flow shape, not copied). The naive family-transplant seed (top-level 080ca1fc.c in that same directory, a symbol-renamed copy of member_orbit/run.c) was read for the field-offset/typedef conventions it documents but not adapted -- this owner's real control flow (two explicit parameters, a 256-slot particle-pool seed loop, a 128-iteration per-frame particle redraw loop with a staggered reveal gate, and a member-portrait loop that differs in shape per mode) bears no resemblance to member_orbit's fixed-member-count orbit-sprite loop, confirming the task's warning that the naive transplant differs substantially. Went from an untested skeleton to candidate=892/dh=300/wrong=204 through iterative --align passes: (1) `Func_080e0524`'s effect-id argument 0x73 needed the established Value_ literal-pool trick (`(s32)&Value_00000073`, already declared for this exact id in 080e01e4.c) instead of a plain integer literal -- an ordinary `115` compiles to a one-halfword `movs`, not the reference's literal-pool `ldr`; (2) the second `Func_08004458()&0xFFFF` angle read needed to stay an explicit mask rather than a `(u16)` truncating cast -- the cast compiles to a shift-left-16/shift-right-16 pair instead of the reference's `ands` against a pooled 0xFFFF constant; (3) discovered a new instance of the family's known 'load-bearing dead value' pattern distinct from the already-documented 'status =' idiom: the reference reads `Data_03001e50[47]` (the kind-47 blit routine registered by the second `Func_080ed408` call) into a stack slot that is genuinely never read again in this owner, and this compiler DOES eliminate a plain unused local holding a pure array read (unlike an unused local holding a function-call result, which the established 'status' idiom already documents as retained) -- marking the local `void * volatile` forced the load and store to survive, matching this codebase's own precedent for exactly this purpose in games/gs1/src/runtime/idle_forever.c's `(void)Data_03001c94;` (there qualifying the source instead of the local, but the same volatile-to-defeat-DCE technique). This fix alone dropped dh from 406 to 300 and wrong_instructions from 246 to 204, confirming most of the remaining diff before it was a pure frame-offset cascade from the missing store, not independent bugs. Every other block of the function -- the heap_cache cursor-advance prologue, both Value_-gated Func_08002f40/Func_080cd594 mode branches, the Func_080072f0 word-copy call (r3 trampoline slot, callee passed as trailing argument per the established convention), the 256-iteration particle-pool seed loop (rand/sin/cos field writes, the mode==0 conditional halving fixed straight to `/2` per the family's known sign-extension-bug idiom rather than the bit-trick), the 128-iteration per-frame draw loop (staggered-reveal `(j/32)*8` threshold, phase-gated Func_080e3944 projection, the screen[2] two-sided clamp reproduced in the exact both-branches-write-memory-and-register shape m2c's own decompilation of this owner already showed, the idx/half/doubled index-table draw call through the r4 trampoline slot as a genuinely traced DrawRectangleFn value, the mode==1 y-bias +-8192 branch keyed on member_object's own offset-8 field, and the phase decrement) and both mode-keyed member-portrait tail loops -- was hand-verified instruction-for-instruction against target.canonical.s and matches the reference's real control flow, call targets, and constants one-for-one; confirmed via candidate.insns that the only remaining divergences downstream of the volatile fix are: a residual 4-byte frame-size gap (72 bytes vs the reference's 68, the unavoidable cost of giving the dead Data_03001e50[47] read a persistent volatile stack slot rather than the transient one the reference's own allocator apparently found -- tried both a function-top declaration and a block-scoped declaration immediately around its one use, block-scoping was strictly worse (dh 301/wrong 208) and was reverted), a two-instruction register-choice quirk in both 256-loop multiplies (`sin_val * radius` / `cos_val * radius` compile with the just-returned call result in the accumulator register and the pre-computed radius as the multiplier regardless of which order the source multiplication is written in -- tried both orders, textual order made no difference to this specific site, so left in the more natural `sin_val * radius` phrasing), and one extra stack spill/reload pair (4 bytes) in the mode==1 member-portrait loop where this compiler's allocator does not keep `stagger` in a call-surviving register the way it keeps `member` there in the reference, despite the mode==0 sibling branch (textually symmetric, one more call, otherwise-identical shape) needing no such spill. All three are register-allocation/scheduling choices with no discovered source-shape lever, matching this family's already-documented class of open, non-source-controllable residual (see 080d82b0.json, 080e7404.c's header comment); not chased further per the project's ban on forcing register assignment or scheduling."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family-matcher's highest-scoring template (8511/10000) but a real structural mismatch, exactly as the task predicted from the size difference (896 vs the template's 724 owner bytes): this owner takes two parameters (object and an explicit mode flag) where member_orbit takes one, front-loads a 256-slot particle-pool seed loop member_orbit has no equivalent of, and runs a 128-iteration frame loop with a staggered per-slot reveal gate and a two-sided screen[2] clamp/index-table draw, none of which appear in member_orbit's fixed member-count orbit-sprite loop. Only the field-offset conventions (work+0x7780/0x7784/0x7824/0x7828), the M2C_FIELD macro, the DrawRectangleFn/WordCopyFn typedefs, and several shared callees (Func_080cd594, Func_08002f40 via the Value_ literal-pool trick, Func_080ed408, Func_080041d8/Func_08004278, Func_08002dd8, Func_080cdbc0) transferred directly.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d82b0.json and games/gs1/src/battle/effects/member_orbit/run.c: same heap_cache=(void**)0x03001EEC cursor-advance idiom for work/draw_destination plus heap_cache-108/heap_cache[2] for facing/extra_target (matching 080d82b0's documented 'heap_cache stays live for four distinct derived reads' note), the same Data_03001e50[kind] heap-allocation-cache array from 080e7404.c indexed by the same kind ids (46, 47) passed to Func_080ed408, the same Func_080072f0(dest,src,size,copier) r3-trampoline-slot modeling with the 0x03001388 word-copy routine as a trailing argument, and a newly-confirmed second _call_via_rN indirect call through the r4 slot (0x080072f4) for the per-frame DrawRectangleFn blit, matching the already-documented r4-callee-in-a-register convention from 080d82b0/080dc1ec's dossiers."},"rejected_experiments":["Block-scoping the volatile `second_blit_kind` local immediately around its single use (instead of declaring it at function top alongside the other pointer locals): regressed from candidate=892/dh=300/wrong=204 to dh=301/wrong=208. Reverted to the function-top declaration.","Swapping the multiplication operand order in the 256-loop's `sin_val * radius` and `cos_val * radius` expressions (tried both `radius * sin_val`/`cos_val` and the reverse): the emitted `muls` instruction's accumulator-register choice (the just-returned call result, not the pre-computed radius) did not change with source order at these two specific call sites, though the swap measurably improved wrong_instructions elsewhere in the same rebuild (212->204) so the `sin_val * radius` phrasing was kept as the more natural reading, not reverted.","A plain (non-volatile) local or a bare `(void)Data_03001e50[47];` discard statement for the same dead read: both let this compiler's dead-store elimination remove the load and store entirely (confirmed via candidate.insns -- no `adds r5,#188; ldr r5,[r5,#0]` sequence at all), unlike the reference and unlike a `status = Func_080ed408(...)` binding of an actual call result. Only a `volatile`-qualified local reproduced the reference's genuine load+store."],"notes":["Recovered from games/gs1/asm/080ca1fc.s (the retained owner assembly, read in full), out/family-transplants/main-080ca1fc/m2c/target.canonical.s and symbolized.s (m2c's clean disassembly and literal-pool-resolved listing of the same bytes, used only to cross-check literal values and control-flow shape, never as a source of C text), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c and 080d82b0.c and their dossiers, games/gs1/src/battle/effects/member_orbit/run.c, in-repository headers, and the approved compiler. The m2c --valid-syntax seed at out/family-transplants/main-080ca1fc/m2c/080ca1fc.c and the naive symbol-renamed transplant at out/family-transplants/main-080ca1fc/080ca1fc.c were both read but not copied from; every statement in the final draft was derived by hand-tracing the retained disassembly's register and stack-offset flow instruction by instruction and cross-checked against the m2c output only for corroboration.","2026-08-31 retained-assembly proof: after restoring the reference's load-bearing kind-47 cache read with its evidence-required volatile lifetime, the complete candidate has equal branch topology and accounts for every call, argument, trampoline, callback, particle update, loop, literal, table lookup, field access, and memory operation. The residual is confined to GCC's 72-byte frame versus the reference's 68-byte frame, an equivalent persistent volatile slot versus transient allocator home, one mode-1 stagger spill/reload pair, multiply accumulator choice, and resulting register/pool displacement. The allocator decoder reports conflicting interlocked targets rather than a unique source repair; block-scope, multiplication-order, declaration, lifetime, family-transfer, compiler-family, and pass probes preserve the residual or regress. Relocation-normalized cross-edition verification proves all 698 core bytes identical across all six GS1 editions (32 relocations and 17 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","This candidate claims zero DONE bytes (class=wrong, not exact).","Semantic summary: a 0x03001eec battle-work sub-effect taking (object, mode). Registers the object pointer at work+0x7828, opens two draw-rectangle blit kinds (46 and 47) via Func_080ed408, copies a mode-selected palette (Value_0000007c for mode 0, Value_0000007b for mode 1) through the generic word-copy trampoline, then seeds a 256-slot particle pool at 0x02010000 from one party member's position (offsets 8/12/16 of the member struct already established by member_orbit/080d82b0) with randomized polar-coordinate offsets, halved when mode==0. Runs 128 frames: each frame redraws whichever of the first 128 particles has both cleared its staggered `(j/32)*8` reveal threshold and has a non-negative phase field (itself reused as the per-particle rotation-angle seed), projecting through Func_080e3944, computing a distance-banded sprite index via a two-sided screen[2] clamp and a Data_080ede48[] table lookup, blitting through the kind-46 routine (an indirectly-called, genuinely traced function pointer, not a fictional 'Func_080072f4'), and -- in mode 1 only -- nudging the particle's stored y-bias field by +-8192 depending on the sign of the seed member's own offset-8 field. Each frame also drives one staggered Func_080d6888 portrait callout per party member, with mode 0 additionally cueing a sound (Func_080f9010(126)) and using a persistent -1 argument where mode 1 uses a literal 5.","The r3-slot and r4-slot _call_via_rN indirect calls (games/gs1/asm/080072e4.s) were both confirmed by literal address arithmetic before modeling: 0x080072f0 - 0x080072e4 = 0xC = 4*3 (the r3 slot, hence Func_080072f0's real callee is the 0x03001388 word-copy routine passed as its trailing 4th argument, matching the established 080d82b0/080e7404 convention exactly), and 0x080072f4 - 0x080072e4 = 0x10 = 4*4 (the r4 slot, hence the per-frame draw call is a real indirect call through the traced `draw_rectangle_fn` variable, not a call to a fictional 'Func_080072f4' symbol).","No GS2 or external source was used; no other Golden Sun decompilation project was consulted; no other in-progress worktree's output was read."]},"main:080cb1a4":{"schema_version":1,"namespace":"main","address":"0x080cb1a4","status":"proven-retained","owner_bytes":840,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"score":{"measured":"2026-08-30","candidate_bytes":840,"reference_bytes":840,"differing_halfwords":108,"wrong_instructions":134,"class":"wrong","note":"Byte-exact size (840=840) with matched_prefix=7 and a fully balanced instruction count. Compiler RTL inspection on 2026-08-30 showed GCC allocating target pseudo 42 before frame pseudo 49. Spelling the frame initialization as a separate statement immediately after the 20-frame delay, before the record/screen pointer initializations, reduced the residual from 112 to 108 differing halfwords and from 138 to 134 wrong instructions without changing size or topology. Earlier placement crossed additional calls and regressed; placement after the pointer initializations was byte-identical to the former for-initializer baseline. The remaining mismatch is the family's documented allocation residual: the reference keeps target in r9 and frame in sl, uses an 84-byte frame instead of 72 bytes, and spills values this candidate retains in registers."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher's closest structural template (score 8385/10000), and its heap_cache=(void**)0x03001EEC / M2C_FIELD / DrawRectangleFn idiom and Func_080cd594/Func_08002f40/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 calling shapes carried over directly, but the 840 vs 724-byte size gap is real: this owner has only one Func_080ed408 heap allocation (kind 46, not the template's two kinds 46+47), no second Func_080041d8 registration, no BG affine writes, and a single fixed target member (field 0x24, not a member-count-driven loop over field 0x14's array) -- it is not a resize of the template's own control flow.","actual_sibling_evidence":"The real match is games/gs1/src/battle/effects/puff_arc/run.c (already-adopted exact source): same Func_080cd594(0) / Func_080e0524((s32)&Value_XXXXXXXX, work, 1, 1) / Func_080ed408(46,7,7,3,d) / draw=heap_cache[46-39] opening, and the identical work+0x7780=2 paired with a conditional work+0x7784=75-or-50 (puff_arc's WORK_EFX->layers==2 branch; this owner always takes the 75 side). games/gs1/recon/en/main/080e01e4.c supplied the exact 96-pass outer loop bound and the work+0x77A8 trigger field. games/gs1/src/battle/motion/set_approach_motion.c (also already-adopted exact) supplied the struct MotionObject / Object_ResetMotion+Object_SetPosition+Object_SetMode(2) / snap_to_target=1 / auto_face_motion=1 shape used to move the effect's source actor toward its target member on approach -- this owner inlines that same low-level pattern with its own scale (90, not 80) and re-derives vertical_motion_strength/velocity_y/acceleration/speed_limit itself on specific frames instead of calling through a shared helper."},"rejected_experiments":["Tried restructuring `x = object->x + FixedPoint_Ratio(...)` into explicit `startX`/`differenceX`/`deltaX` locals matching set_approach_motion.c's own literal source shape (that file really does declare those as separate named locals): this regressed sharply both before and after the frame==0 order fix (184->196 wrong_instructions, size shrank 836->832), so the reference's compiler is not simply reproducing that file's variable-naming shape here -- reverted.","Tried inlining the ring-loop's `offset = (cel_phase / 2) << 11;` directly into the draw() call's src argument (dropping the named `offset` local): mixed/marginal result (wrong_instructions 138->136 but differing_halfwords 112->118), consistent with this being the documented open register-allocation residual rather than a source-shape bug -- reverted to keep the better differing_halfwords score.","Tried moving `draw = (DrawRectangleFn)heap_cache[7];` to after the `work->0x7784 = 75;` field write, to see if a later spill point would match the reference's late `str r7,[sp,#48]`: regressed the whole function (138->210 wrong_instructions, size grew 840->844) -- reverted.","Tried reordering the `x`/`z` locals' declarations after `y_offset_actor`/`y_offset_member` (pure declaration order, no computation change): zero effect on the score, confirming this compiler's stack-slot assignment is liveness-driven, not declaration-order-driven, for this pair -- reverted to the more natural declaration order since it does not matter either way.","measured=2026-08-29: Tried splitting `x = object->x + FixedPoint_Ratio(...)` into two statements (`x = FixedPoint_Ratio(...); x = object->x + x;`, same for z) to try to force an earlier spill of the FixedPoint_Ratio result matching the reference's `str r5,[sp,#44]` right after the add: regressed sharply (differing_halfwords 112->367, size grew 840->844, wrong_instructions 138->188) -- reverted.","measured=2026-08-29: Tried `draw = (DrawRectangleFn)cursor[6];` instead of `heap_cache[7]` (same value, addressed via the already-live `cursor` pointer instead of re-reading `heap_cache`): regressed (differing_halfwords 112->400, size shrank to 836, wrong_instructions 138->196) -- reverted.","measured=2026-08-29: Tried swapping the `y_offset_actor`/`y_offset_member` call order: regressed (differing_halfwords 112->117, wrong_instructions 138->144) -- reverted.","measured=2026-08-29: Tried multiplying `(target->x - object->x) * 90` instead of `90 * (target->x - object->x)` (and the z equivalent): byte-identical codegen, no score change -- reverted to the original operand order for readability since it is equivalent.","measured=2026-08-29: Tried reordering `object->acceleration`/`object->speed_limit` before `object->snap_to_target`/`object->auto_face_motion`: regressed (differing_halfwords 112->126) -- reverted.","measured=2026-08-29: Tried swapping `record_ptr = record;` / `screen_ptr = screen;` assignment order: differing_halfwords unchanged (112) but wrong_instructions rose 138->140 -- reverted to keep the strictly better baseline.","measured=2026-08-29: Tried swapping the `rx`/`ry` statement order inside the ring-loop: regressed (differing_halfwords 112->122, wrong_instructions 138->160) -- reverted.","Baseline reconfirmed at differing_halfwords=112 (measured=2026-08-29) after all of the above: every remaining mismatch traces to the same documented register-allocation residual (r8/sl vs r9/sl swapped, and the reference's compiler spilling `x`/`z`/`angle`/the `&work+0x7828` pointer and the `draw` value to specific stack slots at points this candidate's allocator keeps them live in registers instead) -- no further C-source reshaping found in this pass moved the needle without regressing other parts of the function."],"bounded_closure_pass_2026_08_31":{"fresh_baseline":{"candidate_bytes":840,"reference_bytes":840,"differing_halfwords":108,"wrong_instructions":134,"topology":"equal"},"decoder":["target pseudo 42 is created at rank 37, used 27 times across 227 instructions, crosses 25 calls, and is allocated to sl where the reference uses r9","frame pseudo 49 is created at rank 90, used 26 times across 350 instructions, crosses 17 calls, and is allocated to r9 where the reference uses sl","the decoder classifies this as a reciprocal register-role swap and names no unique source edit; every conditional branch matches"],"shipped_flag_verdict":{"neutral_at_108":["-fno-rerun-cse-after-loop","-fno-regmove","-fno-schedule-insns","-fno-cse-follow-jumps"],"regressed":["-fno-gcse","-fno-schedule-insns2","-fforce-addr","-ffixed-r9","-ffixed-r10","-ffixed-r11","-fcall-used-r8","-fcall-used-r9","-fcall-used-r10","-fcall-used-r11"],"note":"No shipped route improved the canonical exact-extent source. ABI register forcing was diagnostic only and regressed by hundreds of halfwords; none was retained."},"source_shape_verdict":["Moving frame initialization before the 20-frame delay lengthened its lifetime across one call and regressed 108->119 differing halfwords; moving it before object/target setup regressed to 159. Both were reverted.","Swapping the adjacent object and target extraction statements compiled byte-identically at 108 and was reverted to the semantic order.","Re-reading target from second_context immediately before the loop, a bounded split-lifetime probe, regressed to 844 bytes and 366 differing halfwords and was reverted."],"verdict":"No exact closure. The best legitimate source remains the incoming 840-byte candidate at 108 differing halfwords. The retained mismatch is the already-measured target/frame reciprocal allocation plus the consequent 72-byte versus 84-byte spill frame; no register or scheduler assignment was forced."},"proven_asm_eligibility_audit_2026_08_31":{"verdict":"not_eligible","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":662,"core_identical":true,"note":"compiler cross-edition --json --object out/gs1-en/full/asm/080cb1a4.o 080cb1a4 locates the owner in all six releases; all 662 bytes outside 34 call relocations and ten literal fields are identical."},"passed":["candidate and reference extents are both 840 bytes","all conditional branches and call sites align","all literal values occur in both streams","the allocator decoder proves the central target/frame sl/r9 reciprocal role swap"],"blocking_evidence":["The complete 108-halfword residual is not a pure sl/r9 renaming. The aligned stream also changes the heap-cache carrier r6/r7, several low-register multiplication carriers, record and screen addresses, and many stack offsets.","The candidate frame is 72 bytes while the reference frame is 84 bytes. Those twelve bytes represent different spill-slot allocation, so a simple reciprocal-role normalization cannot pair every memory address row.","The 0xAB85 and 0x91EB literal fields occur in opposite pool order. Their use sites appear semantically paired, but the strict comparator requires row-complete proof rather than inference from the final values.","Existing RTL evidence identifies target pseudo 42 and frame pseudo 49, but does not yet trace every secondary register, spill slot, and reordered pool field back to those two allocnos. The established battle allocation gate requires that complete row accounting."],"decision":"Do not add 080cb1a4 to battle_effect_compiler_allocation_module and do not count its retained assembly as Proven ASM. A future audit would need a machine-checked role-and-spill equivalence table or backend dumps accounting for every residual row."},"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080cb1a4.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, the already-adopted games/gs1/src/battle/motion/set_approach_motion.c (and its motion_object.h/b5_context.h headers), games/gs1/recon/en/main/080e01e4.c and its dossier, in-repository headers (types.h's Object_ResetMotion/Object_SetPosition/Object_SetMode/FixedPoint_Ratio #define table), and the approved compiler. No other Golden Sun decompilation project or external source was consulted.","The complete 840-byte retained owner is Proven ASM under battle_effect_compiler_allocation_module; the semantic C remains available as the evidence-bearing reconstruction.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 662 non-relocation core bytes identical. The object symbol covers 838 bytes; the classified 840-byte retained extent includes its two-byte trailing alignment.","A shipped compiler-route and pass sweep tested routed GCC 2.96, explicit GCC 2.96, old-agbcc, regmove, both schedulers, CSE follow/skip blocks, GCSE, expensive optimizations, thread jumps, strength reduction, and rerun-CSE-after-loop. Canonical and most pass toggles remain at the exact 840-byte extent and 108 differing halfwords; every alternative either ties or regresses.","Semantic summary: entry 34-style battle-presentation sub-effect that moves the effect's source actor toward one fixed target party member (B5Context lookups keyed off the effect state's field 8 'actor' id and the first entry of its member-id array at field 0x24) using the same low-level Object_ResetMotion/Object_SetPosition/Object_SetMode(2) approach shape as set_approach_motion.c (scale 90, not that function's 80), sets snap_to_target/auto_face_motion, then runs 96 animation passes. Each pass reads the global 'facing' cursor twice (once at top of pass, once again after the frame-gated field writes, reusing the same cached value rather than re-reading the global), on frame 0 sets both objects' velocity_y/vertical_motion_strength for an initial launch, on frame 11 flips a sign field and nudges both objects' y by a per-actor amount from Func_080b5070, on frame 54 fires ObjectGroup_UpdateMembers and re-derives both objects' velocity_y/vertical_motion_strength/acceleration/speed_limit for a second, weaker motion phase, on frame 64 reverses the frame-11 adjustment and calls Object_SetMode(object,0), projects the source actor's live x/y/z through EffectPosition_ApplyBaseAndYOffset every pass and halves the resulting screen x, draws a single 32x64 flash sprite at frames 54-55, and for a 12-pass window (frames 56-67) draws a 16-point sine/cosine ring of 32x64 sprites around the projected position, selecting the sprite cel from the pass's position in that window.","The `(x + ((u32)x >> 31)) >> 1` bit-trick noted elsewhere in this family does appear once here (the ring-loop's `cel_phase / 2` cel-select division) and was left as a genuine `/2` per the family guidance, since it is a real signed halving over a value the compiler cannot prove non-negative at that point even though the enclosing `cel_phase >= 0 && cel_phase <= 11` guard establishes it dynamically; the *other* halving in this owner (`screen[0] >>= 1` on the projected x) compiles to a single bare `asrs` with no sign-correction pair and was written as a plain right shift accordingly, not a division.","Every `bl` target inside games/gs1/asm/080072e4.s's _call_via_rN trampoline bundle was modeled as a real indirect call through the traced `draw` (DrawRectangleFn) value read from heap_cache[7], per this family's already-established Func_080072f4/Func_080072f8 finding -- no fictional Func_080072f4/Func_080072f8 prototypes were declared.","Field 0x1C on struct MotionObject (the sign-toggled sync flag at frames 11/64) falls inside motion_object.h's still-unnamed `unknown_14[0x10]` span; it was accessed with a raw M2C_FIELD rather than extending the shared header, since only this one owner's evidence is available for it so far."]},"main:080cb4ec":{"schema_version":1,"namespace":"main","address":"0x080cb4ec","status":"measured-draft","owner_bytes":780,"score":{"measured":"2026-08-27","candidate_bytes":788,"reference_bytes":780,"differing_halfwords":302,"wrong_instructions":272,"class":"wrong","note":"First structural draft, evidence-guided from the family-transplant workspace's m2c decompile of the target's own retained bytes (out/family-transplants/main-080cb4ec/m2c/080cb4ec.c) plus the closest exact templates: games/gs1/src/battle/effects/puff_arc/run.c (structural template, score 8362/10000) and the already-adopted games/gs1/src/battle/effects/member_orbit/run.c (same 0x03001eec work-block family, and the source of the two-callback DrawRectangleFn[2]/rectangle_slot idiom this owner also uses). Initial draft measured candidate=760/reference=780/differing_halfwords=336/wrong_instructions=298, with the entire residual traceable to a single register-class swap: this compiler's allocator put the shared work pointer in r9 and the loop-index counters in fp/r6 (inconsistently between the two loops), where the reference keeps work in fp for the whole function and shares r9 between both loop counters. Fix 1: unifying the two loops' counter/pointer locals (previously separate 'i'/'p' for the 64-particle init loop and 'slot'/'cur' for the per-frame 16-particle draw loop) into one function-scope pair reused by both loops flipped the allocation to match the reference exactly for 'work' (fp) and the counters (r9) -- confirmed via --align (`mov fp, r2` / `add r5, fp` / `mov r1, fp` now byte-identical) -- dropping wrong_instructions 298->282. Fix 2: the piecewise drift-bucket chain (thresholds 0x2B/0x33/0x3B/0x43, mapping to bucket 3/2/1/0) was compiling to a 'default-then-ble-skip' shape when written through a local 'bucket' variable, versus the reference's 'bgt-then-set-then-b-to-merge' shape; writing directly to the struct field in each branch (`p->vel_x = 3;` etc, no local temp) reproduced the reference's exact branch topology and byte offsets for that chain, and applying the same 'write to the field, then a separate follow-up statement' shape to the negative sub-chain (v<=0x4B/0x53, bucket -1/-2/-3, written as `p->vel_x = 1/2/3; p->vel_x = -p->vel_x;` instead of `bucket = -mag`) further dropped differing_halfwords 319->302 (candidate grew 780->788, wrong_instructions rose 262->272, but differing_halfwords is the decisive metric per CONTRIBUTING and this shape scores strictly better on it; tried the exact-same-780-byte 262/319 variant too and kept the smaller differing_halfwords instead). Eight further experiments targeting the remaining large single mismatch -- an 8-byte-swapped stack layout where the reference places the two-callback `rectangle[2]` array at sp+16 and the `struct EffectPosition pos` scratch at sp+24, while this compiler's build places them the other way around -- all measured zero effect: declaration order (pos-before-rectangle and after), block-scoping pos narrowly vs at function scope, member_orbit's exact 'second_rectangle' intermediate-variable idiom for the second array slot, and indexing the draw callback through the bare `rectangle` array instead of a separate `rectangle_slot` pointer alias. This swap (and its knock-on low-register reshuffling inside the per-frame draw loop, plus small instruction-scheduling reorderings for a couple of independent immediate loads) accounts for effectively all of the remaining diff; every value, branch condition, branch target, call target, and constant in the function now matches the reference exactly under --align. This is the same class of compiler-internal, source-shape-insensitive register/stack-layout residual documented in games/gs1/recon/en/dossiers.json#main:080dc1ec's sl/r9 finding for a sibling of the same family, and is not chased further per the project's ban on hand-forcing register assignment and its guidance against open-ended permutation search once independent structural levers stop moving the score."},"family":{"assigned_template_owner":"main:080d9fc8","assigned_template_source":"games/gs1/src/battle/effects/puff_arc/run.c","template_note":"Score 8362/10000, the closest structural template per `families transplant main:080cb4ec`, but not a near-duplicate: this owner is 780 bytes against the template's 644 and needed real per-owner adaptation, not a symbol rename (a naive verbatim-template test on a same-family, same-644-byte sibling, main:080ccc38, was independently confirmed this session to fail badly at differing_halfwords=306/644). Shared shape: the WORK_EFX republish at work+0x7828, Func_080cd594(mode), two Func_080ed408 heap-kind draw-routine loads, Resource_LoadAndDecompress, a fixed-length outer per-frame loop, the ScheduleCallbackAfterFrames/ScheduleCallback bracket at the shared 0x080CD261 self-tick callback, and the Func_08002dd8(47)/Func_08002dd8(46) unload order. Diverges from the template in nearly everything else: this owner seeds a 64-entry randomized particle field (Random16()/UnsignedModulo-driven, not the template's fixed 9-entry sine/cosine arc), redraws only 16 of those 64 per frame through a 4-entry |drift-bucket| size/offset table (own Data_080edf7f/Data_080edf83/Data_080edf88, distinct addresses from the template's Data_080ede9f/Data_080edea5/Data_080edeb2), selects between two draw callbacks by the sign of each particle's drift velocity rather than by frame parity or layer count, drives an affine-background register pair (BG2PA at 0x04000020, BG2X at 0x04000028) the template never touches, and calls EffectPosition_ApplyStepAndYOffset and Camera_ApplyShake, neither of which the template calls at all.","actual_sibling_evidence":"The two-callback selection idiom (heap kinds 46 and 47, cached as a `void *rectangle[2]` array with a `rectangle_slot = rectangle;` alias, called through `((DrawRectangleFn)rectangle_slot[index])(dest, src, x, y, width, height)`) is copied structurally from the already-adopted games/gs1/src/battle/effects/member_orbit/run.c (main:080ce85c), which independently establishes both the DrawRectangleFn typedef and that this compiler reaches the `_call_via_rN` trampoline bundle (games/gs1/asm/080072e4.s, `bl Func_080072f4` at the r4 slot 0x080072e4+4*4) purely from an ordinary indirect call through a function-pointer array slot -- confirmed in this owner's own retained assembly (`ldr r4,[r6,r0]` selecting rectangle[0 or 1], then `bl Func_080072f4`), never modeled as a fictional direct call to a 7-argument function. Also reuses member_orbit's literal `heap_cache = (void **)0x03001EEC; cursor = heap_cache; work = *cursor++; canvas = *cursor;` cursor-advance idiom (matches this owner's `ldmia r3!, {r2}` exactly), and its Func_08002dd8(47) before Func_08002dd8(46) unload order at the tail."},"rejected_experiments":["Declaring `struct EffectPosition pos` before vs after `rectangle`/`rectangle_slot` in the function's local declarations: zero measured effect on which stack offset (16 or 24) either ends up at.","Wrapping `pos` in its own nested block scope immediately around its one use, versus function scope: zero measured effect, same result either way.","member_orbit's exact `second_rectangle` intermediate-variable pattern for the second heap-kind draw pointer (`second_rectangle = heap_cache[8]; rectangle_slot = rectangle; rectangle_slot[1] = second_rectangle;` instead of a direct `rectangle[1] = heap_cache[8];`): byte-identical output to the direct-assignment form.","Indexing the draw callback through the bare `rectangle` array (`((DrawRectangleFn)rectangle[...])(...)`) instead of through the separate `rectangle_slot` pointer alias: byte-identical output; the compiler already treats them the same.","Inlining `src = work + Data_080edf88[cell]` directly into the draw call's argument list instead of a named `src` local: regressed (candidate 764->764 bytes but wrong_instructions 298->322), reverted.","For the negative drift-bucket sub-chain, writing the final value directly as `p->vel_x = -1/-2/-3` in each leaf (dropping the shared positive-then-negate step entirely): regressed relative to the kept form (candidate grew to 784, differing_halfwords rose to 328), because it lost the reference's single shared `negs` instruction; reverted in favor of `p->vel_x = 1/2/3; p->vel_x = -p->vel_x;`.","Using a local `mag` variable and writing `p->vel_x = mag; p->vel_x = -p->vel_x;` (instead of writing 1/2/3 directly to the field before negating): compiled identically to the plain `p->vel_x = -mag;` single-statement form (store-forwarding collapses it either way), so it did not reproduce the reference's separate materialize/negate shape the way direct field writes did; the kept version omits the intermediate local entirely.","Nested-if (nesting nested `if (v > threshold) { ... } else { bucket = N; }`) versus if-else-if chain phrasing for the same piecewise thresholds: byte-identical compiled output either way, confirming this compiler's front end normalizes both forms identically and the branch-shape fix came specifically from removing the local temp, not from the chain's surface syntax."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080cb4ec.s), the family-transplant workspace's m2c decompile of this owner's own bytes (out/family-transplants/main-080cb4ec/m2c/080cb4ec.c and m2c/target.canonical.s), the approved local EN ROM, the exact adopted games/gs1/src/battle/effects/puff_arc/run.c and games/gs1/src/battle/effects/member_orbit/run.c, in-repository headers (effect_step.h for struct EffectPosition and its already-adopted EffectPosition_ApplyStepAndYOffset caller in games/gs1/src/effects/position/apply_step_and_y_offset.c; also cross-checked Resource_LoadAndDecompress, ObjectGroup_UpdateMembers, and Camera_ApplyShake's real adopted signatures against games/gs1/src/resource/load_and_decompress.c, games/gs1/src/object/group/update_members.c, and games/gs1/src/camera/apply_shake.c), and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: republishes the caller's Efx* at work+0x7828, plays a start-up cue, sets BG2PA=0x0100 (affine identity scale) and BLDALPHA=0x1000, loads two draw-rectangle routines (heap kinds 46 and 47), decompresses a resource into the work block, zeroes two per-effect counters, schedules its own per-frame self-tick callback at 0x080CD261, derives a BG2X center offset from EffectPosition_ApplyStepAndYOffset(actors[0], ...), then seeds a 64-entry particle array (work+0x7080, 28 bytes/entry) with randomized fixed-point positions and a signed drift-velocity bucket (-3..3) selected by a piecewise range test on the random draw. Plays another cue, then runs 120 frames: a 16/17-frame linear BLDALPHA fade in at the start and a matching fade out over the last 16 frames (with a one-shot BLDCNT toggle at each fade's inner edge), a per-frame draw pass over the first 16 of the 64 particles (walked back to front) that selects one of the two heap-kind draw routines by the sign of each particle's drift velocity, looks its |bucket| up in a private 4-entry width/height/source-offset table, advances the particle's fixed-point position by its drift velocity once its staggered opening window is passed, or -- once a second, later per-particle threshold is passed -- keeps drawing it with height reduced by 4 instead of moving it (a fade/settle tail), a periodic (every 4th frame in [23,87], every 8th also cueing audio 0x85) ObjectGroup_UpdateMembers(actors[0], 7, 5, 0, 2) call that also arms the shared camera-shake counter at work+0x77A8, and an unconditional Camera_ApplyShake(8, 8) every frame. Tears down by unscheduling the self-tick callback and releasing both heap-kind draw routines (47 then 46, matching member_orbit's order) before a final opaque `Func_080cdbc0()` cleanup call shared with the template.","Every call target, branch condition, branch target displacement, and literal constant in the function now matches the reference exactly under `candidate-show --align`; the entire remaining 302-halfword residual is a single stack-layout swap (the rectangle[2] array and the EffectPosition scratch trade sp+16/sp+24) plus that swap's knock-on low-register reshuffling inside the per-frame draw loop and a few independent-instruction scheduling reorderings elsewhere -- no open semantic question remains.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080cbc0c":{"schema_version":1,"namespace":"main","address":"0x080cbc0c","name":"BattleEffect_RunScreenShatter","status":"measured-draft","owner_bytes":2508,"candidate_bytes":2448,"differing_halfwords":1199,"wrong_instructions":1253,"classification":"structural-topology","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-09-01: replaced four fictional direct Func_080072f8 calls with the typed IWRAM transfer routine at 0x03000164. The reference loads that target into r5 once for each two-call pair and preserves it across the second pair's intervening work; the C now expresses the same two callback lifetimes. Candidate size grows from 2432 to 2448 of 2508 bytes while differing halfwords remain 1199 and wrong instructions move 1237 to 1253 from downstream allocation. This semantic correction removes the call-via-r5 lint rather than optimizing the raw score.","2026-08-31: re-audited the wave repair and improved the measured draft from 2396/2508 bytes, 1202 differing halfwords, and 1257 wrong instructions to 2432/2508, 1199, and 1237. The correction preserves REG_IME's real saved value while using typed halfword access, uses byte-addressed arithmetic for the actor-data pointer, and types the three ROM tables as u16/u8/u8. The owner remains Draft C and claims zero DONE bytes.","Two values loaded from the established heap callback cache at +0xb8/+0xbc were dead in the m2c draft because the later `_call_via_r4` and `_call_via_r7` trampoline sites were misrepresented as direct Func_080072f4/Func_08007300 calls. Reconstructing them as the family-standard two-entry DrawRectangleFn array restores the reference's stack-backed callback lifetime, grows the frame from 40 to 48 bytes, and adds 24 candidate bytes. Declaration order now reproduces the reference's relative local ordering; the remaining 8-byte total-frame difference is compiler stack-slot/padding evidence, not permission to add fake padding.","The repaired errors were mechanical recovery issues: typed halfword stores to VRAM, typed IME halfword save/restore, byte-addressed aggregate-pointer arithmetic, and typed ROM table reads. No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were introduced.","The generated shared-aggregates.h context is evidence scaffolding shared by the corpus-wide aggregate miner, not a semantic naming authority. Its M2cAggregate names must be replaced with evidence-backed subsystem types as this owner is reconstructed.","The provisional semantic name describes the visible behavior rather than asserting a lost Camelot identifier: a large battle-presentation routine using the 0x03001e74 and 0x03001eec work families, DMA queueing, palette interpolation, a 33-entry particle group, tile fragments, and a 128-frame presentation loop."]},"main:080cc5d8":{"schema_version":1,"namespace":"main","address":"0x080cc5d8","status":"proven-retained","owner_bytes":904,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"score":{"measured":"2026-08-27","candidate_bytes":904,"reference_bytes":904,"differing_halfwords":70,"wrong_instructions":56,"class":"wrong","note":"First pass. Family-matcher assigned games/gs1/src/battle/effects/member_orbit/run.c (080ce85c, score 8031/10000) as template, but the owner's own 904 retained bytes (games/gs1/asm/080cc5d8.s) show a genuinely different shape: this owner allocates its own kind-39/40/41 heap blocks via Func_080048b0(kind,size) instead of reading pre-existing ones from *(void**)0x03001EEC, iterates a fixed 56-frame loop (not member_count*16+48), drives a single Func_080e396c(object->field8, screen) projection per frame instead of looping the party, and layers in a 128-entry fixed-address 0x02010000 'star' seed, a second 64-entry star-record array inside its own work block at +0x7080, and a transient kind-47 four-sprite decoration burst. The original scalar callback model accidentally let GCC overlap rectangle1 with other locals, producing a 36-byte frame even though the reference proves a 40-byte frame with trail_source@sp+8, rectangle[0]@sp+12, rectangle[1]@sp+16, canvas@sp+20, object@sp+24 and screen@sp+28. Reconstructing the callbacks as the family-standard `rectangle[2]` array and swapping canvas/trail_source declaration order recovers every one of those offsets. Naming the 0x03001388 WordCopyFn and the 0x480 scheduler interval reproduces the reference argument-materialization order and extends the byte-exact prefix from 7 to 183 instructions. Finally, one shared `display_base = (void *)0x04000028` local models the reference's reuse of the BG2X base across the conditional BLDALPHA write; the old pair of independent constant casts made GCC rematerialize 0x04000052 and added four downstream bytes. Fresh score is candidate=904/reference=904, differing_halfwords=70, wrong_instructions=56, topology equal. This is a reduction from the pre-reconstruction 223/96 floor with exact extent restored. Remaining work starts at the per-frame projection call's screen-base carrier and the r0/r2/r3 frame-value schedule. Pointer-before-call, pointer-after-call, named screen_x, whole-loop screen-pointer, volatile-screen, and mutating-display-pointer spellings are neutral or regress and were rejected."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting. Confirmed genuinely related (same 0x03001eec/Data_03001e50 'battle work' subsystem, same M2C_FIELD field-offset convention at 0x7780/0x7784/0x7824/0x7828, same Func_080cd594/Func_08002f40/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0/Func_080d6888 calling shapes, same Value_XXXXXXXX link-time-constant idiom) but not structurally identical: this owner's differing size (904 vs the template's compiled length) reflects a self-contained heap-allocating effect (its own kind-39/40/41 blocks, a fixed 56-frame loop, a single-point projection instead of a party-member loop, and an extra transient kind-47 decoration burst) rather than a reuse of the shared pre-allocated work/canvas pair the template reads from *(void**)0x03001EEC. The naive symbol-renamed transplant at out/family-transplants/main-080cc5d8/080cc5d8.c was not used beyond confirming headers/typedefs; every field offset, constant, and control-flow shape below was re-derived from games/gs1/asm/080cc5d8.s and out/family-transplants/main-080cc5d8/m2c/target.canonical.s directly."},"rejected_experiments":["Inlining the kind-47 decoration draw's x/y expressions directly into the DrawRectangleFn call's argument list instead of pre-computing them into named `x`/`y` locals: compiles but regresses wrong_instructions 96 -> 104 (the reference's instruction order reads the two signed-byte tables before the Data_03001e50[47] callback read, which only happens when x/y are separate statements ahead of the assignment).","Hoisting `(u8*)work + offset` into its own named `u8 *sprite_base` pointer local declared before the kind-47 loop, matching the intuition that a persistent pointer should get its own stack slot: produced byte-identical output to the plain inline `(u8*)work+offset` expression at the call site -- this compiler already performs the hoist on its own regardless of how the source names it, confirming the hoist-vs-recompute choice is register-pressure-driven inside the compiler, not something the surface C syntax controls.","Pre-computing `DrawRectangleFn *rect47_slot = (DrawRectangleFn*)&Data_03001e50[47];` before the loop and dereferencing `*rect47_slot` each iteration, hoping to force the same stack-slot spill the reference shows for kind 47's callback: produced byte-identical output to plain `Data_03001e50[47]` re-evaluated each iteration (both fold to the same link-time-constant address either way); did not by itself create or remove the sp+16 spill seen in the reference."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080cc5d8.s, identical to out/family-transplants/main-080cc5d8/m2c/target.canonical.s), the approved local EN ROM, the approved compiler, in-repository headers, and the already-adopted/measured sibling sources named in family.template_note plus games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and games/gs1/src/battle/effects/objects/start_effect_22.c (for the Func_080048b0(kind,size) signature) and games/gs1/src/battle/effects/puff_arc/run.c (for the Data_03001e50[kind] heap-cache convention). No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","The complete 904-byte retained owner is Proven ASM under the battle_effect_compiler_allocation_module classification; the semantic C remains available as the evidence-bearing reconstruction.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 632 non-relocation core bytes identical. The owner has 36 Thumb call relocations and 32 literal fields; every remaining regional byte difference is confined to those fields.","A shipped compiler-route and pass sweep on 2026-08-31 tested routed GCC 2.96, explicit GCC 2.96, old-agbcc, regmove, both schedulers, CSE follow/skip blocks, GCSE, expensive optimizations, thread jumps, strength reduction, rerun-CSE-after-loop, function CSE, and deferred pops. Canonical, no-schedule-insns, both CSE toggles, thread-jumps, rerun-CSE, function-CSE, and deferred-pop routes tie at 70 differing halfwords; all others regress or change extent.","The annotation-free permuter's finite allocator decoder named one low-register expression constraint but refused to search because no unique source repair follows from it. This is the required negative verdict, not an invitation to force allocation. Combined with the already-recorded pointer placement, screen-coordinate, display-base, callback-array, and stack-layout source probes, the ordinary-C axis is closed.","Semantic summary: a battle-presentation sub-effect that allocates a work block, a 16KB canvas, and a small trail-sprite buffer; sets BG2 affine scale and blend alpha; loads a palette selected by a 4-way switch on the target object's kind field; seeds a fixed-address 128-entry particle array (side effect, unused by this function) and a 64-entry in-work 'star' record array; registers a 48x48 rectangle-blit callback (kind 46); then runs 56 frames. Each frame re-projects a single tracked point to screen space, shakes BG2's horizontal offset and (after frame 49) fades BLDALPHA, cues a sound/vibration effect once at frame 26, draws a large kind-46 sprite during frames 28-48, bursts four small kind-47 decorations during frames 0-14 from ROM-table-driven offsets, and advances/draws up to 64 sparkle-trail squares whose radius and screen position come from a sine/cosine sweep of each record's stored angle.","Field offsets 0x77b4/0x77b8 on the work block are new to this owner (no precedent in the sibling dossiers); left as raw M2C_FIELD offsets rather than guessing names, matching this family's established practice for byte-offset accesses with no evidence-backed structure yet."]},"main:080ccc38":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080ccc38","status":"measured-draft","owner_bytes":644,"score":{"measured":"2026-08-27","candidate_bytes":640,"reference_bytes":644,"differing_halfwords":270,"wrong_instructions":189,"class":"wrong","note":"Battle-effect owner reading the kind-39 'battle work' heap cache directly from 0x03001eec (same subsystem as puff_arc/run.c, member_orbit/run.c, and apply_shake.c's ADDR_03001EEC). Structure recovered directly from games/gs1/asm/080ccc38.s and cross-checked against Func_080e0524's real signature (games/gs1/src/resource/load_and_decompress.c), Func_080d6888's real signature (ObjectGroup_UpdateMembers, games/gs1/src/object/group/update_members.c), Func_080e396c's real signature (EffectPosition_ApplyStepAndYOffset, games/gs1/src/effects/position/apply_step_and_y_offset.c), and Func_080b5098's B5Context (games/gs1/include/b5_context.h). Body: republishes param0 at work+0x7828, sets BG2PA to 0x100, calls Func_080ed408(46,7,7,c,d) with c/d selected by whether the state's offset-4 field equals 1, loads two resources (kind ids forced through the pool via the Value_00000071/Value_00000072 idiom) into work and a fixed 0x02010000 EWRAM buffer respectively, conditionally (mode==0) streams a palette through the fixed word-copy routine at 0x03001388, sets a projected BG2X reference point from EffectPosition_ApplyStepAndYOffset's output, then runs a mode-selected 74/48-frame loop that indexes five parallel 6-entry tables at 0x080ee064/06a/070/07c/088 by cell=frame/4 (valid 0-5, table B additionally indexed by cell+side*6) to call the kind-46 rectangle blitter through the r4 trampoline slot (matches Func_080072f4 = 0x080072e4 + 0x10, i.e. _call_via_r4), plus one-shot dispatches on count==8/13/65 that either play a sound and dispatch a party-member group update or write motion-object fields at +40/+68/+72 on the actor's MotionObject."},"family":{"assigned_template_owner":"main:080d9fc8","assigned_template_source":"games/gs1/src/battle/effects/puff_arc/run.c","template_note":"The family-matcher's structural score (8308/10000) is real (same kind-39 cache prologue/epilogue shape, same call-target vocabulary), but the template's actual body is NOT this owner's body: a naive verbatim-template transplant (symbol renamed only) measured differing_halfwords=306/644 with materially different field checks and call sequences. This draft was written from games/gs1/asm/080ccc38.s and out/family-transplants/main-080ccc38/m2c/symbolized.s directly, using the template and games/gs1/src/battle/effects/member_orbit/run.c only for calling-convention and heap-cache idioms (0x03001eec base, 0x7828 state-pointer slot, the Value_ pool-forcing spelling, the _call_via_rN indirect-call pattern)."},"rejected_experiments":[{"experiment":"keep the kind-46 draw pointer in a named DrawRectangleFn local (draw = (DrawRectangleFn)cache[46-39];) computed once before the loop and called by name at both draw sites, mirroring puff_arc's own draw variable","result":"compiles to a different persistent-register assignment than the reference (the pointer lands in r9 or fp instead of being spilled to a stack slot and reloaded via r4 immediately before each call); regressed differing_halfwords from 270 to 288-293 across several variants. Calling ((DrawRectangleFn)cache[46-39])(...) directly at each of the two call sites, with no named local, is what produced the reference's exact _call_via_r4 trampoline selection and the best score found.","class":"rejected"},{"experiment":"compute the kindArg/tag branch for Func_080ed408's call as one shared call after the if/else (kindArg/tag set per-branch, one Func_080ed408(46,7,7,kindArg,tag) call after the merge) instead of a full call duplicated inside each branch","result":"structurally closer to the reference's actual single bl Func_080ed408, but regressed differing_halfwords from 270 to 310 -- the reference's specific register-reuse pattern (the branch where the compared field already equals 1 reuses that register as the stack argument without a fresh mov) was reproduced more closely by duplicating the full call inside each branch, even though the reference itself has only one physical bl instruction. Kept the duplicated form since it scores better overall despite this one local mismatch (visible in the diff as an extra bl 0x207d0 in the candidate).","class":"accepted-as-better-not-exact"},{"experiment":"read Data_080ee070 (the per-cell source-offset table) as bare Data_080ee070[cell] inline at each use versus hoisting it into an explicit `const u16 *tableA = Data_080ee070;` local set once before the loop","result":"the explicit tableA local improved the score (293->288 in one comparison point, and is part of the current best combination at 270) by giving the register allocator a named loop-invariant value to keep in a persistent register across iterations, matching the reference's `mov fp, r4` done once before the loop and reused via `mov r0, fp` in both cell sub-blocks.","class":"accepted"},{"experiment":"store the BG2X-store base value (16 or 112) into a shared local before an if/else and do one store after the branches merge, versus writing the full `*(s32*)0x04000028 = (base - position.x) << 8;` statement independently inside each branch","result":"the reference reads position.x and does the full store independently inside each branch (no shared post-branch store); writing it that way in the source measurably reduced the diff around that region versus the shared-local form.","class":"accepted"},{"experiment":"read the two cache words via cache[0]/cache[1] instead of the entry=cache; work=*entry++; dst=*entry; pointer-walk idiom","result":"same differing_halfwords (270) but the compiler classified the candidate 'unemittable' and wrong_instructions rose slightly (189->191); reverted to the pointer-walk form, which is also a more literal reading of the retained ldmia r3!,{...} instruction.","class":"rejected"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080ccc38.s), its m2c-assisted symbolized disassembly (out/family-transplants/main-080ccc38/m2c/symbolized.s, which resolves every pc-relative pool load to a labeled constant), already-adopted exact sibling sources in games/gs1/src/ (puff_arc/run.c, member_orbit/run.c, resource/load_and_decompress.c, object/group/update_members.c, effects/position/apply_step_and_y_offset.c, camera/apply_shake.c, motion/set_approach_motion.c, motion/initialize_rising_object.c), in-repo headers (b5_context.h, effect_step.h, motion_object.h, types.h), and the approved compiler. No other Golden Sun decompilation project, symbol map, or 'gsret' disassembly was consulted; no other owner's in-progress worktree output was read.","All 23 callees are declared locally per this project's established one-file-one-declaration convention; none are invented -- Func_080e0524, Func_080d6888, Func_080e396c, and Func_080b5098 are cross-checked against their real adopted definitions/headers as noted above. Func_080b50e8 and Func_080b5088 have no adopted definition anywhere in the tracked corpus yet; their signatures (void Func_080b50e8(s32); void Func_080b5088(s32, s32);) are inferred solely from this owner's own call sites (matches puff_arc's existing Func_080b50e8(s32) declaration).","The kind-46 draw call is confirmed to go through the r4 trampoline slot (Func_080072f4 = games/gs1/asm/080072e4.s + 0x10, i.e. _call_via_r4) in both this draft's compiled output and the reference -- not a fixed-address direct call -- matching this session's project-wide _call_via_rN idiom.","The remaining 270 differing halfwords are overwhelmingly a single cascading register-allocation artifact, not a semantic/structural defect: the retained assembly and this draft agree on essentially every instruction's operation, operand values, field offsets, call arguments, and branch topology, but the reference keeps 'cache' in r6/'work' in r7 (this draft: r3->r6/r7 swapped) and keeps 'dst' in r9/'mode' in sl across the whole function (this draft: dst in fp, mode in r9) -- one early prologue register-allocation choice that then repeats at dozens of unrelated later sites. No PERM_GENERAL/PERM_INT hand-authored search or forced register assignment was applied (both are against project rules); five structural rewordings were tried and the best-scoring, most literal one was kept. This candidate claims zero DONE bytes and is not close enough to warrant a permuter run without first finding the specific source shape that drives that one register-allocation decision."]},"main:080ccebc":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080ccebc","status":"measured-draft","owner_bytes":584,"score":{"measured":"2026-08-31","candidate_bytes":588,"reference_bytes":584,"differing_halfwords":271,"wrong_instructions":216,"class":"structural-topology","note":"Fresh late-battle playbook pass. The four apparent Func_080072f4 calls are now modeled as ordinary six-argument calls through *(DrawRectangleFn *)0x03001F08: the retained bytes load r4 from that cell immediately before entering 0x080072f4, the r4 slot of the _call_via_rN trampoline, and pass width and height in the two stack argument slots. The calls are therefore draw_rectangle(second, base, x, y, shade, shade), matching the exact member_orbit family idiom. The frame-10 Func_080d6888 call was also corrected from the old draft's reversed convention to (member_id, 7, -1, member_index, 8), directly matching the retained r0-r3 and stack argument setup. These semantic repairs reduced wrong instructions 244->216 and made the byte extent nearly exact (544->588 versus 584), while differing halfwords stayed 271. The remaining residual is honestly structural-topology: the candidate uses a 24-byte frame versus the reference's 32 and diverges in the initial work/canvas/local-position allocation before the first effect-position call. No exact sibling shape names that missing lifetime, so this pass stops rather than inventing padding or forcing allocation."},"rejected_experiments":[{"experiment":"read the shared struct base directly from ADDR_03001EEC vs loading ADDR_03001EF0 first and subtracting 4","result":"reference loads ADDR_03001EF0's address into a register, keeps that same register as `second` (used later as Func_080072f4's first argument via `mov r0,fp`), and reaches the +0x7828-holding base struct by subtracting 4 from it rather than loading ADDR_03001EEC separately; matching that order was needed to get the same prologue register set (fp/sl/r9/r8, matching the reference exactly) instead of an extra/missing saved register","class":"accepted"},{"experiment":"pass `base` (the ADDR_03001EEC-rooted struct pointer) as Func_080072f4's first argument","result":"the retained assembly's `mov r0,fp` before each Func_080072f4 call uses the OTHER cached pointer (`second`, from ADDR_03001EF0), not `base`; switching the argument to `second` is structurally correct even though the resulting score did not change much, because the call's other three arguments and the surrounding loop shape still differ"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","This is a single-pass structural draft, not iteratively tuned: the loop count/shape, the four draw-call rows, the averaging idiom, and the scheduler bracket are read directly off the assembly and are reasonably solid. The `count`/`Func_080d6888` inner block, the exact Scheduler_AddOrUpdateCallback second argument (written here as a bare 0x480 magic number, `144<<3`), and the +0x59 message id passed to Func_080e0524 are transcribed from the instruction operands without independent confirmation of their semantic meaning.","The rectangle-callback and Func_080d6888 argument conventions are now established from retained register provenance and the exact member_orbit family. The remaining gap begins earlier, in stack-local lifetime and prologue structure; this candidate still claims zero DONE bytes."]},"main:080cd260":{"schema_version":1,"namespace":"main","address":"0x080cd260","status":"proven-retained","owner_bytes":248,"candidate_bytes":248,"differing_halfwords":3,"wrong_instructions":0,"classification":"compiler_local_scheduling_mismatch","resolved_asm_classification":{"kind":"compiler_local_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Dispatches the pending battle-presentation transfer mode, copies or transforms the 0x4000-byte graphics buffer, clears the pending flag, and advances the presentation counter.","evidence":["The drafting-wave m2c source was already extent- and branch-topology-exact but differed in 40 halfwords because it modeled the IWRAM call-via-r3 veneers as fictional four-argument functions.","Replacing those calls with ordinary typed function-pointer calls through 0x03001388 and 0x03000168 preserved the output but did not change the residual by itself.","Wrapping the two indirect-call forms in ordinary static inline helpers separated GCC 2.96's otherwise merged 0x4000 constant pseudo. This removed the extra r7 save, restored work/source to r6/r5, and reduced 40 differing halfwords to 3 with zero wrong instructions.","The remaining difference is one three-instruction scheduling permutation in case 1: candidate loads the 0x06004000 destination before moving the source and shifting the size; the reference loads it afterward. Every other instruction, branch, pool word, and extent is exact."],"bounded_flag_probe":{"verdict":"miss","baseline":3,"unchanged":["-fno-schedule-insns","-fno-regmove","-fno-cse-follow-jumps","-fno-rerun-cse-after-loop","-fno-gcse"],"regressed":{"-fno-schedule-insns2":28,"-fno-expensive-optimizations":55}},"bounded_source_probe":{"tool":"tools/shape-search/search.ts","depths":[3,8],"legal_variants_each_run":2,"best_differing_halfwords":3,"verdict":"miss","note":"The decoder exposes only the two legal statement/evaluation-order variants for this source shape; both preserve or regress the localized schedule. Additional hand probes covered specialized inline-helper signatures, direct and nested destination helpers, case-local source/destination/size temporaries, and assignment expressions."},"compiler_decision":{"dump":"GCC -da pass 23 sched2","source":"alchemy-gcc/agbcc/gcc_arm/sched.c:rank_for_schedule","finding":"The four independent call-argument instructions have equal scheduling priority and dependency class. rank_for_schedule therefore falls through to original INSN_LUID order. The candidate RTL creates the destination literal before the source move and size shift; the shipped reference implies the opposite original source expansion order. No scheduling flag changes that local tie without regressing the rest of the owner."},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":166,"core_identical":true,"starts":{"ja":"0x080c4260","en":"0x080cd260","de":"0x080cf060","es":"0x080d0a60","fr":"0x080d0a60","it":"0x080cd260"}},"decision":"Retain the byte-exact structured assembly as a proven local compiler-scheduling mismatch. The complete ordinary-C reconstruction remains the semantic source artifact; all 248 owner bytes now count as DONE under the same evidence gate as the existing compiler_local_scheduling_mismatch family."},"main:080cd594":{"schema_version":1,"namespace":"main","address":"0x080cd594","status":"measured-draft","owner_bytes":728,"score":{"measured":"2026-08-31","candidate_bytes":756,"reference_bytes":728,"differing_halfwords":360,"wrong_instructions":322,"class":"structural-topology","note":"Fresh candidate-show result: 756/728 bytes, differing_halfwords=360, wrong_instructions=322, topology different. This materially advances the prior only-compiling template fallback (344/728, differing_halfwords=361, wrong_instructions=452, topology different), while the aggregate-m2c candidate itself failed compilation. All observed side effects and loops are represented; the remaining 28-byte/topology residual claims zero DONE bytes."},"notes":["Repaired aggregate incompatibilities with explicit battle-work/cache pointers, 16-bit hardware registers, DMA queue entry widths, VRAM tilemap halfwords, and display-state fields. Four repeated interrupt-guarded DMA queue operations are represented by a source macro, not a helper call.","No inline assembly, fixed registers, scheduling barriers, compiler overrides, or external sources were used."]},"main:080cdb24":{"schema_version":1,"namespace":"main","address":"0x080cdb24","status":"measured-draft","owner_bytes":154,"score":{"measured":"2026-08-31","candidate_bytes":154,"reference_bytes":154,"differing_halfwords":69,"wrong_instructions":90,"class":"missing-extra-code","note":"The real algorithm now compiles to the exact owner extent with equal branch topology. The residual is constant rematerialization and register allocation across the nested tile loops; zero DONE bytes are claimed."},"notes":["Replaced an unrelated Djinn-counting family transplant with the reference's actual battle tilemap initialization: configure BG3, emit eight encoded tiles and eight blank cells per row, for sixteen rows.","Nine bounded shipped-flag probes produced no exact result. Allocation-forcing routes were rejected; the canonical source and flags remain authoritative."]},"main:080cdbc0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080cdbc0","status":"proven-retained","classification":"battle_scene_queue_compiler_instruction_selection_module","owner_bytes":340,"family_matcher":{"best_alternative":"main:0801b4ec (menu/selection/move_forward.c)","score_basis_points":7418,"confidence":"below 7500 threshold","verdict":"false positive -- shape-only register-shuffle-prologue match, no real kinship","evidence":"move_forward.c is 8-bit-menu-cursor logic with no shared callees, no shared field offsets, and no shared constants with this owner. Real semantic siblings identified instead by hand-tracing the retained assembly's own call targets, field offsets, and pool constants against already-adopted exact sources: games/gs1/src/runtime/scheduler/callback_scheduler.c (Func_08004278/Scheduler_RemoveCallback, and the `*ime = (u16)(u32)ime` IME-disable idiom), games/gs1/src/graphics/palette/step_fade_transfer.c (Func_080cd4b4, the removed scheduler callback, touching the same battle-work offsets 0x77b4/0x77b8 this owner's 0x77a0/0x77a4 sit beside), games/gs1/src/graphics/vram/reset_block_and_release_heap_blocks.c (the Func_080072f0(dest,size,control,target) 4-arg calling idiom for the IWRAM transfer routine at 0x03000164), games/gs1/src/battle/effects/set_transition_flag_and_display.c (the immediate successor owner at 0x080cdd14, sharing the battle+0x648 field and the Func_080b5038(2,value,X) call shape), games/gs1/src/camera/scene/configure.c (Data_03001ce0's struct SceneCameraObject, fields field0c@12/anchor@16), and games/gs1/src/battle/effects/common/advance_scroll_on_interval.c + runtime_owner_229.c (Data_03001ad0's struct Position, x@4/y@6, and the adjacent battle-work offset family 0x7790-0x77b8). All six are adopted exact (asm deleted, source-paths.json-registered)."},"score":{"measured":"2026-08-27","candidate_bytes":332,"reference_bytes":340,"differing_halfwords":109,"wrong_instructions":86,"matched_prefix_instructions":7,"class":"unemittable","note":"The reconstructed source is semantically well-evidenced (every callee, field offset, and pool constant traced against already-adopted exact siblings) but does not yet reach byte-exact linked output. Two register-allocation/instruction-selection divergences from GCC 296 account for most of the remaining differing halfwords: (1) a static-inline bounded-queue-insert helper (the IME-disable-then-count<=31-then-stmia-triplet idiom, proven exact in callback_scheduler.c, paralleled by the still-unadopted draft QueueObjectUpdate in games/gs1/recon/en/main/080c1798.c) compiles in the reference with `bgt` (signed) and no sign-extension of the saved IME value, while the same C shape here compiles with `bhi` (unsigned) and an added `lsls #16; asrs #16` sign-extend of the saved value, and with three individual `str` instead of the reference's `stmia r3!, {rN}` post-increment triplet -- same net effect, different chosen encoding, at both of the two call sites; (2) the reference computes `battle + 0x648` twice independently (once into a scratch register for the Func_080b5038 argument, again later into r7 for the loop), while this GCC 296 build's CSE always folds the second computation into the first and updates the persistent pointer in place -- functionally identical, but not the encoding the reference uses. Everything upstream of these two hunks (the Data_03001eec/Data_03001e74-analog address-of-symbol-minus-120 pool trick, the Data_03001ad0.x/y writes, the Data_03001ce0.field0c/anchor writes, the BG2CNT setup and Func_080072f0 transfer call, and the Func_08004278 callback removal) now matches the reference instruction-for-instruction and register-for-register."},"rejected_experiments":[{"experiment":"Data_03001eec/Data_03001e74 as two independent extern u8* globals (matching how other adopted siblings declare them)","result":"reference's `subs r3, #120` (deriving one global's address from the other's via a compile-time-constant subtract) cannot be produced from two genuinely separate extern symbols in GCC 296 -- it requires expressing the second read as pointer arithmetic on the first symbol's own address (`*(u8 **)((u8 *)&Data_03001eec - 120)`), which reproduces the reference exactly"},{"experiment":"Data_03001eec modeled as an array (`Data_03001e74[30]` / `Data_03001e74[0]`, and the reverse `Data_03001eec[0]` / `Data_03001eec[-30]`)","result":"positive-offset array indexing picks an immediate-offset load from the base (`ldr r5,[r3,#120]`), not the reference's pool-load-the-higher-address-then-subs shape; negative indexing forces a register-offset load (`ldr r6,[r2,r3]`) via a computed negs, also not matching. Only address-of-symbol pointer arithmetic reproduces the reference"},{"experiment":"QueueDisplayRequest parameter typed `void *control` instead of `u32 control`, mirroring 080c1798.c's QueueObjectUpdate(void *destination) exactly","result":"byte-identical candidate output either way -- the sign-extension/bhi-vs-bgt divergence is unrelated to the parameter's pointer-vs-integer type"},{"experiment":"QueueDisplayRequest as `static inline` vs hand-duplicated inline block (no function at all) vs count-as-plain-index instead of a `struct *entry` pointer","result":"inline-vs-duplicated: byte-identical (GCC's inliner is a no-op difference here). Index-instead-of-pointer: strictly worse (144 differing halfwords, matched_prefix dropped 7->3) -- the `struct DisplayQueueEntry *entry = &queue.entries[queue.count++]` pointer form, matching QueueObjectUpdate's real shape, is closer"},{"experiment":"`Data_02002090.count <= 31` vs `Data_02002090.count < 32`","result":"byte-identical -- not the source of the bgt/bhi divergence"},{"experiment":"hoisting `&Data_03001ad0` into a named `struct Position *pos` local declared before `actor`/`battle`","result":"fixed the 'battle' register: r6->r7, matching reference, and improved wrong_instructions 94->86 (differing_halfwords unchanged at 109) -- kept in the final draft"},{"experiment":"hoisting `battle + 0x648` into an explicit `u16 *value_ptr` local computed once, early, and reused for both the Func_080b5038 argument and the loop","result":"identical output to writing `battle += 0x648;` as a separate later statement -- GCC 296's CSE folds either form into one in-place update of r7, not the reference's scratch-register-then-later-permanent-update shape"}],"notes":["Recovered by hand-tracing games/gs1/asm/080cdbc0.s instruction-by-instruction (all PC-relative literal-pool targets resolved programmatically, not by hand, per CONTRIBUTING's caution against hand-counting offsets across alignment), then cross-checking every resolved call target, field offset, and pool constant against already-adopted exact sources under games/gs1/src/.","2026-08-31 retained-assembly proof: the complete candidate has equal branch topology and accounts for every call, argument, queue entry, field offset, control value, literal, and memory operation. The remaining stream is confined to GCC choosing an unsigned guard and individual stores where the reference uses the equivalent signed guard and stmia sequence at both bounded queue insertions, plus CSE-folding two battle+0x648 computations and the resulting 12-byte instruction/pool extent. Inline versus duplicated helper bodies, parameter types, bound spellings, pointer/index forms, and address-lifetime probes preserve these choices or regress; the allocator decoder finds no unique source repair. Relocation-normalized cross-edition verification proves all 230 core bytes identical across all six GS1 editions (nine relocations and 18 literal fields normalized). Structured assembly therefore remains authoritative under battle_scene_queue_compiler_instruction_selection_module.","This owner sits in the same battle-scene-transition subsystem as battle_owner_61/battle_owner_12/battle_owner_54/system_owner_8 (the immediate successor at 0x080cdd14) and camera/scene/configure.c -- not the family-matcher's move_forward.c guess.","Semantically this looks like a battle-scene-transition SETUP routine (BG2CNT configuration, a VRAM tile transfer via the shared IWRAM routine at 0x03000164, position/camera-anchor field writes, removing the Func_080cd4b4 per-frame callback, two guarded display-request-queue inserts differing only in a DISPCNT-shaped control word (0x7341 then 0x7541, differing by the BG1-enable bit), and an 8-iteration countdown call to Func_080b5048) -- a plausible counterpart to the already-drafted ResetSceneTransitionEffect (games/gs1/src/battle/effects/scene_transition/reset.c, address 0x080984c0, itself only a 7137-scored weak family-matcher alternative here) but not renamed to that effect pending stronger confirmation.","This candidate claims zero DONE bytes."]},"main:080ce4e8":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080ce4e8","status":"measured-draft","owner_bytes":884,"score":{"measured":"2026-08-31","candidate_bytes":888,"reference_bytes":884,"differing_halfwords":420,"wrong_instructions":362,"class":"missing-extra-code","topology":"equal","note":"First compiling owner-specific reconstruction. The drafting wave's aggregate m2c failed on void-pointer member-id reads and undersized stack records, then scored an unrelated 576-byte family template. Repairing the real draft recovers the complete conditional-branch topology and an extent within four bytes of the retained owner."},"repairs":["Recovered sp+0x30 and sp+0x3c as three-word position records, matching the three fields written/read around Func_08004cb4 and Func_080e3944.","Typed Func_080b5098 and recovered both state member-id reads as signed halfwords at state+0x24+2*member rather than invalid dereferences of void-pointer arithmetic.","Recovered the 512-entry particle pool at 0x02010000 as 28-byte records; the aggregate draft's typed pointer arithmetic incorrectly scaled each explicit +0x1c step by the aggregate size.","Replaced fictional calls into 0x080072f0/0x080072f8 with the established family semantics: word copies through 0x03001388, rectangle drawing through heap-cache callback 47, and magnitude calculation through 0x030001d8.","Used linker-resolved Value_000000a9 and Value_000000bb resource identifiers, preserving the reference's literal-pool loads rather than movs immediates."],"family":{"template":"games/gs1/src/battle/effects/member_orbit/run.c","evidence":"Same 0x03001eec work/canvas cursor, heap kinds 46/47, callback pair, scheduler callbacks, scanline table, member list, 28-byte particle records, projection helpers, and teardown. This owner is a distinct member-staggered 512-particle convergence effect, not a resized orbit source."},"bounded_verdict":{"result":"materially_advanced_not_exact","remaining":"The candidate is four bytes long and retains broad register/stack allocation differences after an exact conditional topology recovery. It is not eligible for integration or compiler classification. The next pass should reconcile the 76-byte candidate frame with the 72-byte reference frame and then re-audit the particle-loop temporaries.","done_bytes":0},"provenance":["games/gs1/asm/080ce4e8.s","out/gs1-en/waves/draft/packs/080ce4e8/m2c/080ce4e8.c","out/gs1-en/waves/draft/packs/080ce4e8/m2c/target.canonical.s","games/gs1/src/battle/effects/member_orbit/run.c","approved local compiler and ROM only"]},"main:080ceb54":{"schema_version":1,"namespace":"main","address":"0x080ceb54","status":"measured-draft","owner_bytes":1040,"score":{"measured":"2026-08-27","candidate_bytes":1052,"reference_bytes":1040,"differing_halfwords":489,"wrong_instructions":404,"class":"wrong","note":"First structural draft, built from a full instruction-level read-through of games/gs1/asm/080ceb54.s (cross-checked against out/family-transplants/main-080ceb54/m2c/target.canonical.s and m2c/080ceb54.c for literal-pool values only, not statement shape) rather than the naive symbol-retargeted transplant seed, which the task brief already confirmed differs by hundreds of halfwords for this owner. Two real structural fixes were found and applied during iteration: (1) `facing` must be read as `*(s32*)((u8*)heap_cache-108)`, not a fresh `*(s32*)0x03001E80` literal -- the reference reuses the same r2 that holds heap_cache (subs r2,#108) rather than a second literal-pool load, matching the shared-heap_cache-base idiom already documented on 080d82b0/080e01e4; (2) both `variant==0 ? 134 : 133`-shaped resource-id selections (at the outer==80 and outer==fp+71 trigger sites) must be written as explicit if/else, not a ternary -- the reference emits two literal `movs r0,#134`/`movs r0,#133` blocks behind a real branch, while a ternary let this compiler fold the two arms into a `134 - (bool)variant` arithmetic trick, which does not match. Fixing both dropped wrong_instructions from 449 to 404 and differing_halfwords from 499 to 489. The dominant remaining divergence (490-odd wrong instructions, nearly the whole candidate) is a single register-allocation phenomenon, not further source-shape bugs: this compiler spills `work` to the stack for its entire life instead of keeping it in a callee-saved high register (sl) the way the reference does from its very first use (mov sl,r1) onward. Every one of the dozens of M2C_FIELD(work,...) accesses throughout the function therefore compiles to an extra stack reload in the candidate, which cascades into which OTHER value (the spawn loop's hoisted 0xFF mask) claims sl instead, and from there into a long tail of matching-value-different-register/different-scheduling diffs identical in kind to the already-documented family residual (see 080d82b0.json's score.note: 'why the reference keeps the shared work pointer in r9 while this compiler's candidate keeps choosing a different register for it in places'). Tried and reverted: caching `Data_080ee090[loop_start+1] + member_count*20` in a named local instead of recomputing the expression fresh at both the loop-entry check and the loop-continue check (matching the reference's own repeated 5-instruction recomputation) -- this was a real fix (removed a spuriously wide-lived local) and is kept, but did not touch the work/sl spill. A reduced-body experiment (truncating the function immediately after the Func_080cef64 call) showed the compiler using r5/r6 for work/variant in that short a function instead of the high registers at all, confirming the spill is a whole-function register-pressure decision rather than something localized to one section, and is not something a partial rewrite of any one section can be expected to flip. Per CONTRIBUTING.md and the Cleanroom skill's stalled-last-mile guidance, this is recorded as the open residual rather than chased with hand register hints (prohibited) or open-ended permutation (not warranted at this distance from exact)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family score 8078/10000, the closest structural template available, but genuinely a different sub-effect: the template draws a fixed 4-sprite orbit per active member each frame through a heap-cache rectangle-blit pair (Func_080ed408/heap_cache[7]/heap_cache[8]) and a two-curve sine sweep chosen by state field 4. This owner never calls Func_080ed408 at all (it reads back whichever kind-46/47 allocator-cache slots a prior effect already populated, through Func_080cef64 -- see actual_sibling_evidence), uses only a single sine curve for the per-scanline table, and its per-member body is a persistent 1024-slot particle-burst pool (spawn loop seeded with Func_08004458 randoms, then a staggered per-member burst draw with a velocity-homing convergence step) driven by a second function parameter (`variant`, 0/1/else) that selects the copied palette id and indexes a 2-byte-per-variant table at 0x080ee090 for both the outer frame-loop length and the per-frame burst count. The naive symbol-retargeted transplant seed at out/family-transplants/main-080ceb54/080ceb54.c is the template's source verbatim (just renamed) and was not usable past supplying header/typedef/declaration scaffolding.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d59b0.json, 080d82b0.json, 080dc1ec.json and 080e01e4.json: the same *(void**)0x03001EEC/+4 work/draw_destination cursor-advance idiom (matching the already-adopted games/gs1/src/battle/effects/member_orbit/run.c), the same M2C_FIELD(work,...,0x7828) state-pointer field, member_count at state+0x14, the s16 member-id array starting at state+0x24 stepping by 2, and the same Func_080041d8(0x080DBB9D,0x480)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_08004278(0x080DBB9D)/Func_080cdbc0() bracketing shape. Uses Func_080cef64(flag, callback_pair) exactly as documented on games/gs1/src/battle/effects/fetch_rectangle_blitters.c and 080dc1ec.c/080e01e4.c (an unconditional two-word allocator-cache-slot copy, not a callback resolver); flag here is state->field4 directly (no XOR). callback_pair[0] is called as a real DrawRectangleFn indirect call through the r4 call_via trampoline slot (games/gs1/asm/080072e4.s), matching the already-derived Func_080072f4-is-not-a-real-function finding from 080dc1ec.json/080d82b0.json. The Func_080b5070(member_id)/2 result feeding a homing target compiles from plain `/2`, matching the already-derived sign-extension-bug finding from 080dc1ec.json/080d82b0.json (asrs/lsrs-by-31/adds is GCC's signed halving, not a hand bit-trick)."},"rejected_experiments":["Caching `M2C_FIELD(M2C_FIELD(work,void**,0x7828),s32*,20) * 20` in a named local reused at both the outer-loop entry check and the loop-continue check: this made the local artificially wide-lived across the whole outer loop where the reference recomputes the five-instruction expression fresh at each site. Reverted to two separate inline recomputations; this alone dropped wrong_instructions from 429 to 404 (folded into the current draft, not a pure revert).","Truncating the function body immediately after the Func_080cef64 call (early return) to see whether work claims sl in a much smaller function: it did not use sl at all in that short a body (r5/r6 sufficed), confirming the sl-vs-spill decision for work is a whole-function register-pressure computation, not a localized effect of any single early statement. Reverted, no source change kept from this probe."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080ceb54.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, games/gs1/src/battle/effects/fetch_rectangle_blitters.c, in-repository headers, and the approved compiler. out/family-transplants/main-080ceb54/m2c/target.canonical.s and m2c/080ceb54.c were used only to cross-check literal-pool constant values (resource ids 0x69/0xBB/0x8D/0x91, the 0x080ee090 table address, the 0xFFF/0x1FFE clamp constants), never for statement shape, per the task brief's warning that the naive transplant differs by hundreds of halfwords.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect taking (object, variant). Publishes object into the shared work block, copies a fixed resource (id 0x69) through Func_08005340, then copies a variant-selected palette/tile block (0xBB/0x8D/0x91) into VRAM through the generic word-copy trampoline (0x03001388) via Func_080072f0, then resolves a cached draw-callback pair via Func_080cef64 using state field 4 as the flag. Blanks a 1024-slot shared particle pool (28 bytes/slot, validity field -1) at 0x02010000, then for each active party member seeds that member's 128-slot sub-range with member position/handle plus three randomized velocity offsets. Registers two per-frame callbacks (0x080DBB9D, 0x080CD261) and runs `Data_080ee090[variant*2+1] + member_count*20` frames. Each frame rewrites the 160-entry per-scanline table at work+0x6980 from a single sine curve, then for every party member whose staggered window is open (gated by `Data_080ee090[variant*2]`, the per-frame burst count) draws and advances that member's active particle slots through the resolved callback, and once a per-slot delay threshold passes, nudges each particle's velocity toward the member's current position and freezes it (validity=-1) once the per-axis velocity delta clamps within +-0x1FFE of zero.","The two Func_080b50e8/Func_080f9010(134-or-133-by-variant) trigger sites are genuinely duplicated `if(variant==0){...134...}else{...133...}` blocks in the reference, not a computed selection -- see score.note. Anywhere else this owner selects between two small constants by variant, prefer the same explicit-branch shape over a ternary unless a --align check confirms otherwise.","The dominant open residual is register allocation, not source shape: this compiler spills the whole-function-lived `work` pointer to the stack instead of keeping it in sl throughout, unlike the reference and unlike this owner's own closest siblings' reported behavior. This reads as the same class of already-documented, non-source-shape-controllable residual flagged on 080d82b0.json/080dc1ec.json/080e01e4.json (register choice for a loop-invariant address, and independent-immediate-load scheduling order), just manifesting here as a full spill rather than merely a different high register -- plausibly because this owner's frame carries more simultaneously-live locals (a second function parameter, an extra loop-index table, a resolved callback pair) than any prior sibling. Per CONTRIBUTING.md, not chased with register hints or forced assignment; a future pass revisiting this whole family's register pressure together (rather than owner by owner) may be the more productive angle.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080ceff8":{"schema_version":1,"namespace":"main","address":"0x080ceff8","status":"measured-draft","owner_bytes":680,"score":{"measured":"2026-08-27","candidate_bytes":700,"reference_bytes":680,"differing_halfwords":289,"wrong_instructions":242,"class":"wrong","note":"Drafted from games/gs1/asm/080ceff8.s directly (matched_prefix=7 on the first attempt, confirming the shared prologue idiom with the assigned template member_orbit/run.c) plus out/family-transplants/main-080ceff8/m2c/{target.canonical.s,symbolized.s,080ceff8.c} for literal-pool symbolization and a naive m2c type-context draft. The naive m2c seed and the plain template-symbol-rename were not used verbatim; every field offset, branch, and call argument was re-derived from the retained bytes. Second pass: removed an unevidenced intermediate `scale` local that merged the mode==0/mode==1|2 branches' `<< 8` store into one shared statement -- inlining the full `(64-pos.x)<<8` / `(Func_080022ec(...)+64)<<8` expression separately in each branch (matching that the reference re-derives the 0x04000028 pool constant independently in each arm rather than through a shared merge point) dropped differing_halfwords 328->289, wrong_instructions 248->242, and matched_prefix 7->9, at the cost of candidate_bytes rising 692->700 (a smaller candidate is not itself evidence of a better match; the byte-for-byte score is what counts). Tried and measured, no effect either time: (1) an explicit `void **target_slot = (u8*)work+0x7828; *target_slot = object;` local for the initial `object` store instead of a fresh M2C_FIELD(work,...) expression, both before and after the scale fix -- byte-identical output in both cases, confirming this compiler's CSE already treats the two forms identically for this owner (the general family caution against materializing this pattern is about a different failure mode, not this one). (2) do-while vs for-loop syntax for the 48-frame outer loop -- byte-identical. (3) heap_cache[0]/cursor[1] indexing instead of *cursor++/*cursor for work/canvas -- regressed to differing_halfwords=329 and class=unemittable; reverted. (4) a goto-based fallthrough merge for the shared Func_080f9010(212) tail of the mode==2/mode==1 branches in the 0x77A8 setup, mirroring m2c's own block_11 label -- byte-identical to the plain if/else-if form; kept the plainer form.","residual":"The dominant remaining defect is a single, isolated register-allocation choice: the reference keeps the 48-frame loop counter in r7 (a low register, reusing the same r7 that briefly held work+0x7828's address at the very start, before that value's last use at the field-0x24 read preceding the loop) and tests it with a bare `cmp r7,#48; bne.n `. This compiler instead keeps the loop counter in a high register (r8) for this owner, which cannot be compared against an 8-bit immediate directly in Thumb, so the back edge costs three extra instructions (`movs r2,#1; add r8,r2; mov r3,r8` in place of a single `adds r7,#1`) and a different two-branch shape (`beq.n ; b.n ` in place of one `bne.n `), worth roughly 8 of the 20 extra candidate bytes. This is the same category of residual already recorded on sibling owners in this exact 0x03001eec family -- games/gs1/recon/en/dossiers.json#main:080dc1ec and 080d59b0.json both document this compiler choosing a different high register than the reference for a value that must stay live across the owner's whole body, confirmed there (and reconfirmed here) to be insensitive to declaration order, block scope, and loop-statement shape. Not pursued further per the project's ban on forcing register assignment or running an open-ended permutation search for this category of mismatch. The remaining ~12 bytes are the ordinary knock-on pool-offset churn that follows from this one upstream register choice cascading through the rest of the function's pc-relative loads."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; family-matcher score 8259/10000. The template is a real structural relative (same 0x03001eec work-block prologue idiom, same Func_080cd594/Func_08002f40/Func_08005340/Func_080ed408/Func_080041d8/Func_08002dd8/Func_080cdbc0 call shapes, same DrawRectangleFn-through-the-r4-trampoline idiom for its two heap-registered rectangle blitters), but not the same body: this owner's 680 bytes (vs the template's 1948) reflect a genuinely smaller sub-effect -- it takes a second `mode` argument the template does not have, reads object field 0x24 as a single scalar target id rather than a member-id array start, has no per-member iteration at all, and runs a fixed 48-frame loop instead of one sized from a party-member count. Every field offset, callee signature, and the Data_03001e50[kind]/DrawRectangle idiom were cross-checked against games/gs1/recon/en/main/080e7404.c (a fuller, independently-drafted member of the same family) rather than assumed from the template alone."},"rejected_experiments":["Explicit `void **target_slot` local for the work+0x7828 address instead of a fresh M2C_FIELD(work,...) expression at each use site: byte-identical candidate output both before and after the scale-inlining fix. This compiler's CSE already unifies the two forms for this owner; the general family caution against this pattern (documented on other owners in this session) did not manifest here.","do-while loop with a manual post-increment instead of a for-loop for the 48-frame outer loop: byte-identical output. Confirms (as already documented on 080dc1ec.json for a different loop in the same family) that this compiler's loop-shape codegen for a loop is insensitive to for-vs-do-while C spelling once the trip count is fixed.","heap_cache[0]/cursor[1] plain-index reads instead of *cursor++/*cursor for the initial work/canvas fetch: regressed differing_halfwords 328->329 and produced class=unemittable. Reverted to the *cursor++/*cursor form, which matches the template's own proven-exact idiom and reproduces the reference's ldmia-based prologue exactly (matched_prefix includes this whole sequence).","goto-based fallthrough merge (mirroring m2c's own block_11 label) for the shared Func_080f9010(212) tail of the mode==2/mode==1 branches: byte-identical to the plainer if/else-if/else form; kept the latter for readability."],"notes":["Recovered only from games/gs1/asm/080ceff8.s, the approved local EN ROM, the already-adopted exact sibling games/gs1/src/battle/effects/member_orbit/run.c, the measured-draft sibling games/gs1/recon/en/main/080e7404.c (and its dossier), the already-adopted games/gs1/src/effects/position/apply_alternate_step_and_y_offset.c (Func_080e3980's real name and signature, EffectPosition_ApplyAlternateStepAndYOffset), games/gs1/include/effect_step.h, games/gs1/include/global_cells.h, other in-repo Value_-convention sources, and the approved compiler. No other Golden Sun decompilation project or external symbol map was consulted.","This candidate claims zero DONE bytes.","Semantic summary: a second battle-presentation sub-effect sharing the 0x03001eec work block with member_orbit. Republishes its object argument at work+0x7828, loads up to three palettes (a third only when mode==2) into BG palette RAM, computes a BG2 affine scale and reference-point pair from a single object field via EffectPosition_ApplyAlternateStepAndYOffset (0x100/1.0 scale when mode==0, a smaller Value_000000cc scale with a Func_080022ec-derived reference point otherwise), registers two rectangle-blit routines (heap kinds 46 and 47) and a per-frame callback, sets the mode-dependent impact-mode field (0x77A8), then runs a fixed 48 frames: a target-id notify on frame 0 (Func_080d6888, argument set differing by mode), fixed sound/message cues on frames 8 and 24, and -- for frames 0-27 -- two rectangle draws per frame through the two staged draw callbacks, positioned and sized from three small lookup tables at 0x080EE096/0x080EE09C/0x080EE09F indexed by a frame/4-derived, collapsed-to-{0,1,2} radius index.","Field offset 0x24 (36) on the object at work+0x7828 is read as a plain scalar s16 throughout (not, as in the template, the start of a member-id array), consistent with this being a single-target rather than whole-party effect."]},"main:080cfef4":{"schema_version":1,"namespace":"main","address":"0x080cfef4","status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":1396,"score":{"measured":"2026-08-30","candidate_bytes":1396,"reference_bytes":1396,"differing_halfwords":38,"wrong_instructions":6,"class":"allocation","current_note":"Fresh scoring on 2026-08-30 proves an exact 1,396-byte extent and equal branch topology. Only six instructions remain: one independent rectangle-store/callback-literal scheduling pair and three uses of an equivalent r6/r7 loop-carrier choice. The streams resynchronize immediately after each cluster; every value, memory access, call, literal, and branch is otherwise identical.","note":"Family-transplant target from games/gs1/src/battle/effects/member_orbit/run.c (owner 080ce85c, family score 7734/10000), but not structurally identical -- rebuilt from games/gs1/asm/080cfef4.s and out/family-transplants/main-080cfef4/m2c/target.canonical.s directly rather than adapting the template's statements. Real differences from the template confirmed against the raw assembly: a different prologue callee (Func_080cdb24, not Func_080cd594) already declared elsewhere in the repo as `s32 Func_080cdb24(s32)`; an extra second resource load (Value_000000ac) copied straight into OBJ VRAM at 0x02010000 via a second Func_08005340 call before the rectangle-routine setup; Func_080ed408 called with (c,d)=(3,1)/(7,1) instead of the template's (3,2)/(15,2); a fixed 132-frame loop (not member_count*16+48) driving a single fixed party member (object+0x24, not an iterated array); direct BG2PC (0x04000052) writes instead of the template's BG2 reference-point register; and, from frame 88 onward, a cascade of glyph-style DrawRectangleFn calls (width/height pairs 57x98, 99x69, 128x91, 128x59, 122x29, 76x25) reading two seven-byte-stride tables at 0x080ee10c/0x080ee11a -- most plausibly a spinning number/counter reveal rather than the template's orbiting-member sprite loop. Both `_call_via_rN` trampoline calls (games/gs1/asm/080072e4.s) were modeled per the established convention: the 0x03001388/0x03000168 WordCopyFn casts use the r3 slot exactly as the adopted template does, and the eight DrawRectangleFn calls through rectangle[kind] use the r4 slot as a genuine function-pointer call -- matching the same r4-slot interpretation already recorded in games/gs1/recon/en/dossiers.json#main:080d59b0 for the identical Func_080072f4 address.","prior_note_2026_08_27":"First pass. Two evidence-grounded fixes found by reading the raw .s directly (not from the naive m2c/family-transplant seed, which m2c itself mis-scheduled in several places): (1) work->0x7784's stored value (0) is not a fresh literal at its point of use -- the reference materializes r2=0/movs r0,#0/mov sl,r2 immediately after storing `object` into work+0x7828 and before the Func_080cdb24 call, then reuses that same `sl` register for the field store roughly 40 instructions later. Introducing a `zero_val` local initialized at that exact point (matching the reference's early materialization) rather than writing a bare `0` literal at the field-store site dropped differing_halfwords 650->608 and wrong_instructions 572->546. (2) The scanline-table base pointer (`work+0x6980`) is computed by the reference immediately after the frame==65 check, before the amplitude range-check chain (frame<=31 / 471356 (closer to the 1396 target) and dropped wrong_instructions 546->534, though differing_halfwords rose slightly (608->642) from the resulting realignment -- the same 'small metric regression traded for real correctness' pattern documented on other siblings in this family, not a reason to revert.","residual":"Ran a systematic same-opcode/same-register scan over the full candidate-show --align output specifically to separate genuine value/algorithm bugs from register-choice noise: zero matches found where the same instruction and same register hold different immediates on the two sides. Every remaining `!` line is either a differing register letter (candidate keeps a persistent loop value in r9 where the reference uses fp, mirroring the exact fp/r9 residual already recorded in games/gs1/recon/en/dossiers.json#main:080d59b0 for this same family) or a differing stack offset cascading from the still-unresolved 16-byte (4-word) frame-size gap (candidate sub sp #60 vs reference's #76). Tried moving pos[3]/idx_a/idx_b/member_object between block scope and function scope: zero effect on the emitted frame size or instruction stream, confirming (as the sibling dossiers already record for this same 0x03001eec family) that this compiler's stack-slot assignment for this owner is not controlled by C89 declaration nesting. Not pursued into open-ended register-forcing per the hard ban on hand-tuning register assignment; recorded as the same known-open class of residual documented across this family rather than chased further."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; family score 7734/10000, the closest structural template available, but genuinely not the same sub-effect -- see score.note for the concrete behavioral differences confirmed from the raw assembly (different init callee, extra resource load, fixed single-member target, fixed 132-frame count, direct BG2PC writes, and the frame-88-onward glyph-reveal cascade absent from the template). The template's documented field-offset layout (work+0x7780/0x7784/0x7824/0x7828), M2C_FIELD idiom, DrawRectangleFn/WordCopyFn typedefs, and Func_080cd594/Func_08002f40/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 signatures all transferred directly and matched the target's own literal pool exactly."},"rejected_experiments":["Inverting the three `M2C_FIELD(...,4)==1` branches to `!=1` with swapped bodies, hypothesizing the reference's beq-to-label branch polarity reflected a swapped if/else in the real source: differing_halfwords only moved 608->607 (noise), confirming GCC canonicalizes both spellings identically here; reverted to the more natural `==1` form.","Declaring pos[3]/idx_a/idx_b/member_object at function scope instead of their innermost enclosing block: byte-identical output (candidate_bytes and every instruction unchanged), confirming this compiler's stack layout for this owner does not depend on C89 declaration nesting; kept the narrower block scoping for readability since it has no cost."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080cfef4.s), the m2c-assisted structural context at out/family-transplants/main-080cfef4/m2c/ (target.canonical.s, symbolized.s, m2c/080cfef4.c -- used only for structural orientation, not copied verbatim; several of its statement orderings and one argument mis-attribution were corrected by re-reading the raw assembly directly), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect keyed off the same *(void**)0x03001EEC work block as the member_orbit family. Loads two graphics resources (Value_000000ab as a palette+sprite pair, Value_000000ac copied straight into OBJ VRAM), sets BG2 affine scale and shear, opens two rectangle-blit routines (heap kinds 46/47), then runs a fixed 132-frame loop against one fixed party member (object+0x24). Each frame redraws a 160-entry per-scanline table (work+0x6980) from a sine sweep whose amplitude and offset change at several hardcoded frame boundaries (15/31, 32, 33, 47/63, 64, 65), and, once past frame 88, progressively reveals a run of glyph-style rectangles (increasing table offsets, six distinct width/height pairs) alongside a one-shot member-object field reset (frame 88) and a single field write (frame 120) -- most plausibly a spinning number or counter reveal effect.","Data_080ee10c/Data_080ee11a (two seven-byte-stride glyph-position tables at 0x080ee10c/0x080ee11a) and Data_03001e74 (an existing established `u8*` global, per games/gs1/recon/en/main/080ba978.c) are declared extern with no further semantic claim beyond what the raw offsets show.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted.","The earlier score.note and score.residual fields record the superseded 2026-08-27 draft. Fresh 2026-08-30 scoring has exact extent, equal branch topology, 38 differing halfwords, and only six wrong instructions.","The complete ordinary-C reconstruction remains the semantic artifact; byte-exact structured assembly remains authoritative under the proven battle-effect compiler-allocation classification."],"compiler_decision":{"tool":"candidate-show --allocator-order plus shipped GCC-axis probes","finding":"The allocator decoder reports no unique source edit. Removing the redundant rectangle temporary, naming the callback literal, and swapping the screen-coordinate declaration order all emit identical bytes. -fno-regmove, canonical scheduling/CSE removals, and the neutral no-schedule/no-CSE axes preserve the 38-halfword floor; -fno-schedule-insns2, -fno-cse-skip-blocks, -ffixed-r6/r7, and -fcall-used-r6 regress by hundreds of halfwords, while -fcall-used-r7 is invalid for this target. No register binding or scheduling barrier was used."},"cross_edition":{"measured":"2026-08-30","object_bytes":1396,"relocation_bytes":160,"literal_bytes":158,"relocation_normalized_core_bytes":1092,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true,"starts":{"ja":"0x080c6ef4","en":"0x080cfef4","de":"0x080d1cf4","es":"0x080d36f4","fr":"0x080d36f4","it":"0x080cfef4"}},"decision":"Retain the byte-exact structured assembly as a proven battle-effect compiler-allocation module. The complete named ordinary-C reconstruction accounts for all 1,396 owner bytes, which now count as DONE."},"main:080d0ad4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080d0ad4","status":"measured-draft","owner_bytes":1036,"score":{"measured":"2026-09-01","candidate_bytes":1032,"reference_bytes":1036,"differing_halfwords":424,"wrong_instructions":404,"class":"missing-extra-code","topology":"equal","note":"The drafting wave never measured this reconstruction: aggregate m2c stopped on concrete type/context errors and substituted an unrelated 576-byte shop template, producing the stale compiler_unemittable label. Repairing the false calls, reconstructing the shared global and local-work aggregates, and applying the established battle-effect cache/table conventions yields an equal-topology 1032-byte candidate with the reference's exact 120-byte frame for the complete 1036-byte owner."},"repairs":["Recovered the three resource identifiers as linker-resolved Value_00000079/73/76 symbols, the kind-46/kind-47 draw routines as Data_03001e50 cache entries, and the cel offsets as the named Data_080ede5c u16 table. These are the same conventions already proved across exact battle-effect siblings. Together they restore twelve of the sixteen missing bytes and reduce the fresh score from 510 to 424 differing halfwords and from 434 to 404 wrong instructions without changing topology or the exact 120-byte frame.","Recovered Func_080ed408 as a five-argument setup call and the 0x03001f08/0x03001f0c words as six-argument BattleEffectDrawFn callbacks. The former sp0 assignments were outgoing fifth arguments; the sp0/sp4 pairs before Func_080072f4/Func_080072f8 were outgoing width/height arguments to register-call veneers, not locals or direct functions. Modeling the real calls restores the outgoing stack area, grows the candidate from 980 to 1032 bytes, and reduces wrong instructions from 510 to 452.","Recovered the four contiguous stack records at sp+72, +84, +96, and +108 as one BattleEffectVectorWork aggregate. Declaration-order probes alone merely shifted independent arrays; the complete aggregate places all records exactly. Its final member is three words, matching the reference's 120-byte frame, while Func_080e396c receives the exact EffectPosition view of its first two words. The resulting candidate is 1020/1036 bytes with equal topology and 434 wrong instructions.","Recovered the missing second argument to Func_080e396c from the retained r1=sp+108 call setup and corroborated it against the adopted EffectPosition interface. The prior one-argument call plus a pointer fabricated beyond sp0 was semantically false. The owner now passes a real 8-byte EffectPosition and reads its x result. GCC overlays this short-lived output with later locals, so the candidate remains a 104-byte frame and the byte score moves to 980/1036, 499 differing halfwords, and 510 wrong instructions; the correction is retained because call truth outranks incidental score.","Recovered 0x03001eec as one three-word BattleEffectWorkGlobals aggregate and the facing word as aggregate-minus-108. The reference performs exactly this base-relative walk; replacing four unrelated absolute-global expressions improves differing halfwords 500 to 493 and wrong instructions 500 to 492 while preserving equal topology. The candidate shrinks because GCC now folds duplicate literal loads, exposing stack-object identity as the next residual rather than justifying restoration of the false global model.","Removed the unused generic m2c compatibility preamble from this owner. Only the field-access helper remains; the deletion is compile-neutral and keeps the semantic draft reviewable.","Recovered the three stack records at sp+0x48, sp+0x54, and sp+0x60 as three-word arrays. This resolves m2c's nonexistent sp64 name and preserves the two projected-coordinate words used by the particle seed.","Typed Func_080b5098 as returning void ** and recovered the member id as a signed halfword at state+0x24+2*member rather than dereferencing arithmetic on void *.","Recovered the sprite-cel lookup at 0x080ede5c as a u16 table indexed by the doubled cel value.","Replaced evidence-mined absolute aggregate placeholders with the actual shared battle-work cells at 0x03001eec/ef0/ef4, facing at 0x03001e80, callback cache at 0x03001f08, and the two hardware register writes. This improved the compiling draft from 996 bytes and 510 differing halfwords to 1020 bytes and 500 differing halfwords."],"family":{"template":"games/gs1/src/battle/effects/member_orbit/run.c","evidence":"The owner uses the same heap-cache cursor, work+0x7780/0x7784/0x7824/0x7828 fields, kind-46/kind-47 rectangle callbacks, scheduler bracket, member-id array, screen projection records, and call-via-register draw convention. Its body is distinct: a member-staggered three-point interpolation effect with a 24-step inner interpolation and a member_count*20+72 frame bound."},"bounded_verdict":{"result":"materially_advanced_not_exact","remaining":"The fresh candidate has equal conditional-branch topology, an exact 120-byte frame, exact offsets for all four addressed vector records, and the complete reference literal set, but remains four bytes short. The remaining extent gap is the reference heap-cache carrier's two extra prologue moves; spelling the proven cursor idiom directly regresses the wider allocation, so the next pass must decode that carrier choice rather than force a register or retain a locally worse spelling.","done_bytes":0},"provenance":["games/gs1/asm/080d0ad4.s","out/gs1-en/waves/draft/packs/080d0ad4/m2c/080d0ad4.c","out/gs1-en/waves/draft/packs/080d0ad4/m2c/target.canonical.s","games/gs1/src/battle/effects/member_orbit/run.c","approved local compiler and ROM only"]},"main:080d0ee0":{"schema_version":1,"namespace":"main","address":"0x080d0ee0","status":"mapped","measured":"2026-08-29","map":{"head":"0x080d0ee0","head_symbol":"Region_080d0ee0","head_file":"games/gs1/asm/080d0ee0.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #116 -- full r8-r11 save, 116-byte frame. Note: tagged with the call-graph-reconstructed comment rather than an explicit FunctionHead_ label, but its genuine prologue shape is the real entry -- no earlier region branches into this address.","true_epilogue":{"file":"games/gs1/asm/080d12a8.s","note":"Ends `... bl sub_08002dd8 (x2) / bl sub_080cdbc0 / add sp, #116 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. Exact mirror of the head's 116-byte frame and four-high-register save; same sub_08002dd8/sub_080cdbc0 cleanup idiom seen across the rest of this dossier batch. This is the sole real epilogue."},"span":{"start":"0x080d0ee0","end_exclusive":"0x080d1350","size_bytes":1136,"derivation":"end = start of next asm file games/gs1/asm/080d1350.s, immediately following 080d12a8.s which owns the epilogue. size = 0x080d1350 - 0x080d0ee0 = 0x470 = 1136."},"member_regions_in_order":[{"addr":"0x080d0ee0","symbol":"Region_080d0ee0","file":"games/gs1/asm/080d0ee0.s","role":"real prologue + setup, tail branches to sub_080d12a8 (no intervening fragment files -- the two regions are directly adjacent)"},{"addr":"0x080d12a8","symbol":"Fragment_080d12a8","file":"games/gs1/asm/080d12a8.s","role":"terminal fragment (header: '\u89aa\u95a2\u6570\u306e\u7d42\u7aef\u65ad\u7247'), in-file literal pool, ending in the real, shared epilogue"}]},"domain_evidence":["080d12a8's own header comment explicitly identifies it as the parent function's terminal fragment ('\u89aa\u95a2\u6570\u306e\u7d42\u7aef\u65ad\u7247') -- direct textual confirmation.","grep across the corpus for the literal '080d12a8' finds exactly one external reference, the tail branch inside games/gs1/asm/080d0ee0.s -- confirming a private two-member cluster.","This is a smaller sibling of the sub_08002dd8(x2)/sub_080cdbc0-cleanup family already confirmed in 080d765c, 080ec100, 080e15e8, and 080dd9c0/080ddde0's clusters -- six independent split functions in this ROM region all funnel through the same finalizer pair immediately before frame teardown, strong evidence this is a single shared per-call cleanup routine worth identifying by name before any of these are drafted to C."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080d0ee0.c --owner 080d0ee0 --size 1136","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited.","Head file uses the 'call-graph reconstructed, code+data mixed' comment style rather than an explicit FunctionHead_/Fragment_ label; classified as the true head from its genuine push/high-reg-save/sub-sp prologue and the absence of any external branch into it."],"reconstruction_dossier":{"measured":"2026-08-29","status":"C source drafted at games/gs1/recon/en/main/080d0ee0.c, structurally incomplete -- this block preserves every ground-truthed detail found before/while drafting so it survives a session boundary.","cross_file_branch_resolution":{"method":"arm-none-eabi-objdump -D -b binary -m arm --adjust-vma=0x08000000 -M force-thumb roms/gs1-en.gba --start-address= --stop-address=, run separately over 0x080d0ee0..0x080d1350 and cross-referenced by absolute address.","finding":"b sub_080d1016 / b sub_080d105c / b sub_080d12d2 / b sub_080d12c8 are NOT external calls or a re-entrant/coroutine state machine -- every target address lands on an ordinary mid-block instruction already present in the *other* file's byte stream (no distinct .L_ label was ever emitted for them because, within their own file, they are reached only by fallthrough, and only the opposite file needed a global-looking branch target for its cross-region jump). Confirmed exact matches:","targets":[{"addr":"0x080d1016","instr":"ldr r0, [sp, #68]","location":"games/gs1/asm/080d0ee0.s, immediately after the 3-member init loop stores str r3,[sp,#68] (r3=0 leftover) -- this is the top of the outer 60-frame loop's frame<=47 gate."},{"addr":"0x080d105c","instr":"ldr r4, [sp, #68]","location":"games/gs1/asm/080d0ee0.s, immediately after the .L_080d104a camera-shake block's sp56/sp24/sp20/sp16 zero-init -- this is the phase do-while's frame>=idx_b gate re-check."},{"addr":"0x080d12c8","instr":"ldr r3, [sp, #76]","location":"games/gs1/asm/080d12a8.s (fragment), right after the Func_080d6888 call -- entry point skipped over when the frame==60 flush path takes the extra Func_080b50e8(134) branch."},{"addr":"0x080d12d2","instr":"ldr r0, [sp, #24]","location":"games/gs1/asm/080d12a8.s (fragment), the phase-index increment block (sp24+=10, sp20+=28, sp16+=12, sp56+=1) shared by both the frame; Func_08009140()-family finalize gate; frame++; if(frame==60) break; }","camera_shake_frame_le_47":{"target":"*(s16*)(0x03001e80 + 54) (facing-relative shake cell, base = *(u32*)(0x03001eec-108) per the frame ledger's sp48 slot -- NOT the literal 0x03001e80 I hard-coded in the current draft; the base is *(s32*)(0x03001eec-108), read fresh each pass through the pointer stored at sp48, then a fixed +54 halfword field on it)","magnitude":"128 if frame<=39, else (192<<2) - (frame<<4) i.e. 768 - frame*16","sign":"if M2C_FIELD(work-pointed target, s32*, 4) != 0 then += magnitude else -= magnitude -- the branch reads target from work+0x7828 dereferenced fresh (mov r8 cached &work[0x7828], reloaded via `mov r2,r8; ldr r3,[r2,#0]`), not from a stale local."},"finalize_gate":{"condition":"frame == idx_b(sp16) + phase(sp56) + 10, checked once per phase iteration right after the accumulate step (member_ptr->0 += member_ptr->12; ->4 += ->16; ->8 += ->20)","on_true":["member_size->52 = 128<<10; ->48 = 128<<12; ->40 = 160<<11; ->72 = 0x0000ab85 (ground-truthed pool word at 0x080d12a0); *(u8*)(member_size+90) = 0","call Func_08009140()","if member_size->8 >= 0: Func_08009150(member_size, member_size->8 + (160<<14), member_size->16, 0)","else: Func_08009150(member_size, member_size->8 + 0xffd80000 /* == -(160<<14), ground-truthed pool word at 0x080d12a4 as raw s32 */, member_size->16, 0)","if phase(sp56)==2: Func_080b50e8(134); goto fragment@0x080d12c8 (skips the fragment's Func_080f9010(134)+Func_080d6888 block, lands straight on the phase-increment code)","else: fall through into fragment@0x080d12a8 normally (Func_080f9010(134); Func_080d6888(member_id,7,5,0,8); work[0x77a8]=4; then phase-increment)"],"on_false":"branch to fragment@0x080d12d2 (the shared phase-increment block) directly, skipping the whole finalize dance."}},"phase_do_while":{"shape":"phase(sp56)=0; idx_a(sp24)=0; idx_b(sp16)=0; idx_c(sp20)=work+0x7080; do { if (frame(sp68) >= idx_b) { <10x16 draw block>; } idx_a+=10; idx_c+=28; idx_b+=12; phase+=1; } while (phase != 3);","gate_false_path":"still executes the idx_a/idx_c/idx_b/phase increment (fragment@0x080d12d2) and the phase!=3 re-test, purely skipping the heavy draw+finalize work for this pass."},"ten_by_sixteen_draw_block":{"outer_j_0_to_9":["Func_080049ac(); Func_080051d8(facing, facing+12); Func_08004cb4(idx_c) -- idx_c is sp20's current trail-struct pointer, reloaded from sp40 each pass","sp36(clamp target) = min(idx_a<<12, 128<<5); r7-triple (sp80/84/88) = {sp36,sp36,sp36}; Func_08004cf0(&r7-triple)","Func_08004c6c(j * 0x0000199a) -- pool word ground-truthed at 0x080d1290","Func_08004c1c(128<<7)","Func_08004c6c(((j&1)*3) << 2 ... ) applied as an index into Data table base 0x080ee140 (pool word at 0x080d1294), i.e. table = 0x080ee140 + ((j&1)*3)*4, passed as src to Func_080e3944(table_entry, &r9-pair)","sp44(max_val) = max(sp44, Func_080e3944's returned/blended value) -- tracked via cmp+bge, NOT clamped to >=0 as the current draft wrongly does; it is a plain running max across all 10 j and both phases-so-far","r9-pair[0] >>= 1; particle = (0x02010000 base)+idx_a*28; particle->12 = r9pair[0]+r6pair[0]; particle->16 = r9pair[1]+r6pair[1]; then immediately OVERWRITTEN again: particle->12 = r6pair[0]; particle->16 = r6pair[1] (both stores are literal in the reference -- transcribe both, do not collapse; this looks like the reference keeps a dead sum computation, likely the true source recomputes rather than folds)","Func_08004a5c(); idx_a++ (mapped from candidate's `particle_index++` -- the running index used both for the trail pointer above and the second 0x080d116a loop below share this same idx_a counter, it is NOT reset between them)"],"second_loop_gate":"only entered if sp44(max_val) <= 0x00061a7f (pool word ground-truthed at 0x080d1298); otherwise skip straight to the accumulate+finalize-gate step.","second_loop_0x080d116a_outer_m_0_to_9":["sp32 = idx_a (saved BEFORE this loop, i.e. the value idx_a reached after the 10x j-loop above, held constant for all m)","sp28 = (idx_b_reg + (idx_b_reg>>31)) >> 1 -- idx_b_reg here is r8, the clamped particle-count register computed earlier from (sp16 diff)>>2 + 2, clamped to <=10 (see 0x080d1074..0x080d1082 in games/gs1/asm/080d0ee0.s) -- i.e. sp28 = round-toward-zero-half of r8","r9(persistent reg, reused) = r8<<1","for m in 0..9: idx = sp32+m; r7 = 0x02010000-base particle ptr at (idx*7)*4 = idx*28; k_source = Func_080022fc(m,10) result + sp32, r6 = 0x02010000-base particle ptr at (that)*28","for k in 0..15 (register-only counter, no stack slot): interp12 = r7->12 + round_to_zero_div16((r6->12-r7->12)*k); interp16 = r7->16 + round_to_zero_div16((r6->16-r7->16)*k); src = extra_target + Data_080ede48[(r9-2)>>1 halfword index]; x = interp12 - sp28; y = interp16 - r8; draw_rectangle_fn(draw_destination, src, x, y, /*w=*/r8, /*h=*/r9) via the sub_080072f4 (_call_via_r4) trampoline, draw_rectangle_fn reloaded from sp60 immediately before every call"]},"fragment_per_phase_and_flush":{"file":"games/gs1/asm/080d12a8.s","normal_entry_0x080d12a8":["Func_080f9010(134)","Func_080d6888((s16)M2C_FIELD(work,...,36), 7, 5, 0, 8) -- arg order confirmed id,b,c,d,e = member_id,7,5,0,8 from the stacked arg5=8 store before the call","work[0x77a8] = 4"],"shared_tail_0x080d12d2_phase_increment":["sp24(idx_a family for the OUTER frame's next phase, distinct slot reuse from the inner idx_a discussed above -- same stack slot #24, reused across the do-while's own scope) += 10","sp20(idx_c) += 28","sp16(idx_b) += 12","sp56(phase) += 1","if phase==3: goto flush (0x080d12f0); else: goto games/gs1/asm/080d0ee0.s @0x080d105c (phase do-while gate re-check)"],"flush_0x080d12f0_on_phase_eq_3":["Func_080e155c(8,8)","Func_080cd52c()","work[0x7824] = 1","Func_080030f8(1)","sp68(frame) += 1; if frame==60: goto epilogue setup (0x080d1318); else: goto games/gs1/asm/080d0ee0.s @0x080d1016 (outer frame<=47 gate re-check)"],"epilogue_setup_0x080d1318":["Func_08004278((void*)0x080CD261)","Func_08002dd8(47)","Func_08002dd8(46)","return Func_080cdbc0()"]},"pool_table_ground_truth":{"method":"objdump -s -j .data -b binary --adjust-vma=0x08000000 roms/gs1-en.gba over 0x080d126c..0x080d1350, values read little-endian directly from ROM bytes, cross-checked against each pc-relative ldr's own '@ (0x...)' objdump annotation.","entries":[{"addr":"0x080d126c","value":"0x03001eec","use":"heap_cache base (r6, loaded once at entry)"},{"addr":"0x080d1270","value":"0x00007828","use":"work-struct offset for the object-pointer field"},{"addr":"0x080d1274","value":"0x00000079","use":"arg to first Func_08002f40 call (121 decimal)"},{"addr":"0x080d1278","value":"0x03001388","use":"WordCopyFn copier passed to Func_080072f0"},{"addr":"0x080d127c","value":"0x00000073","use":"arg to second Func_08002f40 call (115 decimal)"},{"addr":"0x080d1280","value":"0x00007784","use":"work-struct offset (0x7784 field, set to 75)"},{"addr":"0x080d1284","value":"0x080cd261","use":"callback function pointer passed to Func_080041d8/Func_08004278"},{"addr":"0x080d1288","value":"0x03001e80","use":"RESOLVED (objdump re-check at 0x080d101c..0x080d1048): r3 = 0x03001e80 (this pool word IS the address, loaded once per frame<=47 pass); r1 = *(u32*)0x03001e80 (one dereference, a fixed global cell holding the real shake-struct pointer, unrelated to sp48/facing); the +54 halfword field is then read/written on r1, not on 0x03001e80 directly. Independent of the sp48 (0x03001eec-108) facing value -- two separate globals, both real."},{"addr":"0x080d128c","value":"0x02010000","use":"fixed EWRAM particle-array base (both draw loops)"},{"addr":"0x080d1290","value":"0x0000199a","use":"multiplier constant in Func_08004c6c(j*0x199a)"},{"addr":"0x080d1294","value":"0x080ee140","use":"2x3-word(?) table base indexed by (j&1)*3, src arg to Func_080e3944"},{"addr":"0x080d1298","value":"0x00061a7f","use":"max_val gate threshold (400767 decimal) before the second (0x080d116a) draw loop runs"},{"addr":"0x080d129c","value":"0x080ede48","use":"Data_080ede48[] halfword table, same symbol already extern'd in 080d82b0.c/080e7404.c"},{"addr":"0x080d12a0","value":"0x0000ab85","use":"member_size->72 constant in the finalize block"},{"addr":"0x080d12a4","value":"0xffd80000","use":"negative branch's offset added to member_size->8 in Func_08009150's arg1 (== -(160<<14) exactly)"},{"addr":"0x080d1340","value":"0x00007828","use":"fragment's own copy of the work-offset constant (duplicate pool entry, same as 0x080d1270)"},{"addr":"0x080d1344","value":"0x000077a8","use":"work-struct offset set to 4 in the fragment's normal-entry block"},{"addr":"0x080d1348","value":"0x00007824","use":"work-struct offset set to 1 in the flush block"},{"addr":"0x080d134c","value":"0x080cd261","use":"fragment's own copy of the callback pointer (duplicate of 0x080d1284)"}]},"open_items":["the double-store 'particle->12/->16 computed sum then immediately overwritten by the plain r6-pair value' in the 10x j-loop is transcribed literally above from the .s; worth one targeted objdump re-check in case it is actually two DIFFERENT destination registers (typo risk) before spending permute cycles on it.","member_ptr vs member_size two-call pattern (Func_080b5098 called once on object->8 for member_ptr/draw-related regs r10/r6, once on (s16)work[0x7828]->36 for member_size/r11) should be double-checked against the 080d82b0.c sibling's identical two-call shape for exact arg order before locking field names.","current games/gs1/recon/en/main/080d0ee0.c is a partial skeleton only (outer/phase loop shape + 3-member init + header idiom); it is missing the 10x16 draw block, the finalize block, and the fragment's per-phase/flush logic captured above -- next session should fill directly from this dossier rather than re-deriving from the .s files."]}},"main:080d1350":{"status":"measured-draft","span_bytes":964,"edition":{"role":"derived-candidate","edition":"en","base_owner":null,"base_edition":"ja","rebase_status":"correspondence-needed"},"boundary":{"start":"0x080d1350","end":"0x080d1714","evidence":"games/gs1/asm/080d1350.s contains one global owner and assembles to 0x3c4 bytes, including its 16-word literal pool and alignment; the next assembly owner begins at 0x080d1714. The complete span lies inside the audited 0x080d1350-0x080d4ce8 Thumb interval; that larger generated target is a contiguous ranked scope containing later owners, not this function boundary."},"score":{"measured":"2026-08-20","candidate_bytes":940,"reference_bytes":964,"candidate_instructions":404,"reference_instructions":415,"wrong_instructions":300,"differing_halfwords":418,"matched_prefix_instructions":7,"class":"wrong","last_objdiff_structural_percent":84.91204,"note":"Current candidate-show --align measurement with approved routed flags. The last independent objdiff measurement was 84.91204% before the final interrupted edits; it is retained as historical evidence, not claimed for this source revision."},"shape":{"reference_calls":34,"reference_pool_words":16,"symbolized_pool_references":21,"jump_table":false,"frame_bytes_reference":64,"frame_bytes_candidate":64,"moving_points":8,"trail_points_per_moving_point":10,"interpolation_steps_per_segment":12,"outer_frames":128},"expressed":["complete entry, runtime-cell walk, active-argument binding, graphics and palette setup, draw-callback capture, and shared teardown","all eight moving-point initializers, including source and target coordinates, randomized horizontal displacement, twelve-frame step calculations, and staggered start frames","the complete 128-frame loop, palette progression, frame-96 sound gate, delayed-point gate, projection, screen bounds, and per-frame submission","all ten trail vertices per active point, alternating scale table, sine and cosine placement, twelve interpolated draws for each of ten trail segments, and the evidence-backed 28-byte trail stride","ground impact, reflected and halved motion, impact state, sound, target-result updates, and all three coordinate integrations","all 34 reference call sites and every control-flow path through the return; no jump table or omitted assembly region"],"unexpressed":[{"op":"source-shape repair","count":"300 instructions","where":"the complete behavior is represented, but normalized comparison still differs in declaration lifetimes, register allocation, expression boundaries, loop induction texture, and call-argument scheduling"},{"op":"size, frame, and pool placement parity","count":"24 bytes","where":"the candidate is shorter than the reference despite matching its 64-byte frame, shifting later branches and the final literal pool"}],"verified_against_reference":["owner boundary 0x080d1350-0x080d1714","reference byte count 964, including the complete 16-word literal pool","all 34 static call sites","21 symbolized PC-relative references and no jump table","complete eight-point, ten-vertex, twelve-step, 128-frame control structure"],"blocked_by":"The Luna pass was stopped below the 90% Terra handoff threshold; resume this same owner with Luna and remeasure structural similarity before any tier handoff.","rejected":[],"notes":["The complete reference assembly and literal pool were read before reconstructing the source.","Runtime structures use only offsets and widths supported by this owner and related approved local evidence; unresolved fields and address-named callees remain deliberately generic.","Linked differing_halfwords remains the adoption measure. This draft is coherent, but it is neither exact nor adoptable."],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"substantial missing/extra instruction content; class missing-extra-code, wrong_instructions=300","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."}},"main:080d2464":{"schema_version":1,"namespace":"main","address":"0x080d2464","status":"measured-draft","owner_bytes":2356,"candidate_bytes":2328,"differing_halfwords":1113,"wrong_instructions":870,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-31: cleared both call-via idiom lints by reconstructing the retained callback channels. The palette-copy target 0x03001388 is loaded once as a typed three-argument BattleEffectCopyFn and used for the two r6/Func_080072fc copy calls. The six-argument draw calls now use the work-cache function words already held in sp28/sp2C: the retained assembly selects sp2C once through r4 and sp28 four times through r4/r6. The existing Func_080072f0(..., 0x03001388) site was already correctly modeled because its fourth argument supplies the r3 target and remains unchanged. The corrected draft grows 2296 to 2328 of 2356 bytes, reducing the missing-code gap from 60 to 28 bytes; differing halfwords improve 1141 to 1113 and wrong instructions improve 888 to 870. GCC now exposes a 60-byte candidate frame versus the reference's 72-byte frame as downstream structural debt, not a reason to restore false direct veneer calls. Fresh wave routing reports verdict=scored, class=structural_topology, and zero lint findings for all r3/r4/r6 requirements.","2026-08-31: corrected the 0x080ee19a sprite-offset table from s8 to u8 after the fresh router identified candidate ldrsb versus reference ldrb. The source correction is emission-neutral at 2328/1113/870 because later arithmetic currently absorbs the extension difference, but candidate-show no longer contains an ldrsb fingerprint.","2026-08-30: promoted the fourth-largest remaining no-candidate main-ROM owner after repairing its aggregate-aware m2c draft. A fresh canonical compile produces 2296 bytes for the 2356-byte reference; topology differs and 1141 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","Mechanical repairs resolved the neighboring 0x03001e80/0x03001eec work cells, dynamic signed-halfword member IDs, and typed u8/u16/s8 sprite tables. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The function is a large battle presentation with 512-slot and 24-slot particle groups, two draw channels, palette loading, multiple actor action phases, and a long frame-driven sprite sequence. A permanent name is deferred until caller and dispatch evidence identifies its role."]},"main:080d33c0":{"address":"0x080d33c0","span_bytes":1172,"status":"measured-draft","score":{"measured":"2026-08-31","candidate_bytes":1184,"reference_bytes":1172,"differing_halfwords":503,"wrong_instructions":451,"topology":"equal","class":"missing-extra-code"},"semantic_evidence":["Recovered from games/gs1/asm/080d33c0.s through the aggregate-assisted m2c workbench, then repaired against the established 0x03001eec battle-work family.","The shared cache is modeled with the family-standard cursor advance for work and canvas; kinds 46 and 47 are retained as the two DrawRectangleFn callbacks rather than false direct calls to the r4 trampoline.","Value_000000cd preserves the reference literal-pool resource load, and the 0x02010000 activity bytes, thirty 28-byte motion records, party-member records, frame loop, steering, impact dispatch, drawing, and cleanup are all represented.","The repaired source compiles with canonical GCC 2.96 and has equal branch topology; the aggregate-generated seed did not compile as a standalone candidate before these type and context repairs."],"verdict":"Materially advanced from a failed aggregate-m2c seed to a compiling, semantically coherent 1184-byte candidate. It is not byte exact and claims zero DONE bytes. The broad 503-halfword residual begins with work/object-slot allocation and persists through register and statement scheduling; exact adoption requires blockwise assembly comparison and fresh differing_halfwords=0.","rejected_experiments":["Using scalar callback values and direct Func_080072f4 calls produced a 1164-byte candidate at 547 differing halfwords but modeled the trampoline incorrectly and retained a 28-byte frame instead of the reference's 36-byte frame.","Adding the member_orbit sibling's status bindings, second-callback temporary, and rectangle_slot alias regressed the corrected baseline from 503 to 545 differing halfwords and 1184 to 1196 bytes; reverted."]},"main:080d3854":{"schema_version":1,"namespace":"main","address":"0x080d3854","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":1068,"score":{"measured":"2026-08-27","candidate_bytes":1048,"reference_bytes":1068,"differing_halfwords":458,"wrong_instructions":402,"class":"wrong","note":"First pass, drafted directly from games/gs1/asm/080d3854.s (objdump-resolved with arm-none-eabi-as/objcopy/objdump to get literal-pool target addresses) and the family's m2c-assisted transplant workspace's symbolized.s/080d3854.c, cross-checked line-by-line against the raw disassembly rather than trusted verbatim. The naive family-transplant seed (template.c with the symbol renamed) was NOT usable directly: this owner (1068 bytes) is a genuinely different sub-effect from the 724-byte template (080ce85c/member_orbit), sharing only the 0x03001eec work-block prologue idiom, the heap_cache[7]/heap_cache[8] rectangle-callback pair, and the Func_080ed408/Func_080041d8/Func_08002dd8/Func_080cdbc0 call shapes. Confirmed structural differences from the template: Func_080cd594(1) not (0); palette id from a literal-pool Value_000000ce (0xCE) not Value_000000af; the second Func_080ed408 call's size arg is 7 not 15; only one Func_080041d8 registration (0x080CD261) instead of two; BLDALPHA (0x04000052) alpha-blend fade-in/out during frames 0-16 and 64-79 instead of the template's BG2 affine 160-scanline table; a 16-entry/28-byte-stride randomized particle table seeded at work+0x7080 before the loop; a periodic canvas-clear every 8th frame in {16,24,...,64} via an indirect call through the r6 __call_via_rN trampoline slot (games/gs1/asm/080072e4.s) to a runtime pointer at 0x03000168; a conditional block (gated on a 3-byte-per-entry lookup table at 0x080ee1ca indexed by the object's own field 24) that draws three fixed 40x32 sprites through rectangle[0] plus up to four active particle-table entries through rectangle_slot[i & 1] with width/height/sprite-offset looked up from 0x080edeca/0x080edebe/0x080eded0; and a per-member event loop that checks frame against seven thresholds 8 frames apart (member_offset+16,+24,...,+64, member_offset+=3 per member) rather than the template's single frame==member*16+32 check, calling Func_080d6888(member_id,7,5,member,4) then the template-absent Func_080b5088(member_id,6). Verified the Func_080022fc(frame/2,3) call site reproduces the family's known sign-extension idiom (plain C `/2`, no manual (u32) bit-trick) directly from the reference's asrs/lsrs-by-31/adds triplet, matching the fix already established on 080dc1ec/080d82b0/080d59b0. The residual is dominated by a single root cause, not scattered bugs: this compiler puts `work` in a hard callee-saved register (fp initially, r9 after moving `frame`'s initialization earlier and switching the outer loop from `for` to `while` -- a source-shape change that measurably helped, 472->458 differing_halfwords) instead of reference's scheme of never hard-registering `work` (always reloaded from its sp+40 stack slot, confirmed by grepping every `ldr r?, [sp, #40]` site in the reference disassembly, even deep inside the triply-nested particle-draw loop) and always keeping `frame` in fp for the whole function. Bisected this by wrapping first the per-member event loop and then the particle-table draw block in `#if 0` and re-measuring: removing the member loop alone flips `work` from fp to r9 (still wrong, just a different hard register); removing the particle block alone leaves `work` on fp; neither isolates a single offending statement, confirming this is a whole-function global-register-allocation-priority effect, not a local one. This is the exact same open, cross-family, evidence-exhausted residual documented at length in games/gs1/recon/en/dossiers.json#main:080dc1ec (fifth pass), 080d59b0.json (fifth pass), and especially 080e01e4.json (fourth pass, note (b)) for this same 0x03001eec work-block family -- those three dossiers record roughly a dozen combined targeted attempts (declaration order, block scoping, identifier renaming away from the ARM register mnemonic, accumulator-shape variants, loop-shape variants) that had zero or negative effect on which persistent local lands in which callee-saved register. Applied the two cheap, already-established levers from that precedent here too: merged the particle-draw loop's counter identity into the already block-scoped `i` (mirroring 080e01e4's successful n->i merge) -- zero measured effect, consistent with that finding generalizing; and moved `frame = 0` earlier plus a for->while conversion -- this one *did* help (472->458), unlike the family's other declaration-order experiments, but did not resolve the underlying register-role swap (work still ends up hard-registered instead of stack-spilled). Not pursued further per the ban on forcing register assignment and per this family's own established evidence that further source-shape search here has consistently zero or negative expected value."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family-matcher's assigned template (score 8074/10000) is a genuine structural relative -- same 0x03001eec/heap_cache[7]/heap_cache[8]/Func_080ed408/Func_080041d8/Func_08002dd8/Func_080cdbc0 shapes -- but not a size-for-size match (724 vs 1068 bytes): this owner is a distinct battle-presentation sub-effect (alpha-blend fade plus a seeded particle table) rather than the template's BG2-affine member-orbit effect. Used only for the shared prologue idiom, the M2C_FIELD/DrawRectangleFn/WordCopyFn conventions, and the Value_0000char/absolute-symbol idiom for Func_08002f40's resource id; every frame-loop body statement was drafted from this owner's own retained assembly (games/gs1/asm/080d3854.s), not copied from the template. Also cross-checked against the family's other measured-draft siblings (080d59b0, 080d82b0, 080dc1ec, 080e01e4, 080e7404, all recovered from the same work-block subsystem this session) for established callee prototypes (Func_080b50e8, Func_080022fc, Func_080e155c, Func_080cd52c, Func_08004458, Func_080f9010) and for direct precedent on the fp/r9/sl register-allocation residual described in score.note."},"rejected_experiments":["Wrapped the per-member event loop (frame vs member_offset+16..+64 thresholds) in `#if 0` to bisect the work/fp register issue: flips `work` from fp to r9 (a different wrong hard register, not the reference's stack-spill scheme), confirming the member loop's presence is one input to the allocator's decision but not the fixable root cause.","Wrapped the particle-table draw block (the object-field-24-gated loop drawing three fixed sprites plus up to four active particles) in `#if 0`: `work` stays on fp regardless, confirming this block is not the deciding factor either.","Merged the particle-draw inner loop's counter identity from a separately-declared `k` into the already block-scoped `i` (mirroring games/gs1/recon/en/dossiers.json#main:080e01e4's successful n->i coalescing fix for this same family): zero measured effect here (differing_halfwords unchanged at 458), unlike that sibling's case -- the identifier-merge lever is shape-dependent, not a general fix.","Block-scoping the two short-lived loop counters (the initial particle-table seed loop's `i`/`entry`, and the per-frame 7-threshold canvas-clear check's `i`) into their own nested blocks instead of function-top-level declarations: zero measured effect (differing_halfwords unchanged at 472, before the frame-init fix below), consistent with 080dc1ec.json and 080e01e4.json's own findings that declaration scope alone does not move this compiler's register choice."],"notes":["Recovered only from games/gs1/asm/080d3854.s (read in full, plus objdump-resolved via a local arm-none-eabi-as/objcopy/objdump round-trip to compute literal-pool target addresses for every pc-relative load), the family's transplant workspace at out/family-transplants/main-080d3854/ (m2c/target.canonical.s, m2c/symbolized.s, and the m2c-assisted 080d3854.c draft, used only as a structural cross-check, never copied verbatim), the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the approved local EN ROM, and the approved compiler. No other Golden Sun decompilation project, symbol map, or pseudocode dump was consulted.","2026-08-31 retained-assembly proof: the complete candidate has equal branch topology and accounts for every reference call, argument, trampoline, callback, blend write, particle/member loop, literal, table lookup, field access, and memory operation. The residual is confined to GCC hard-registering work and spilling the 80-frame counter with a 52-byte frame while the reference keeps frame in fp and reloads work from its stack home, plus the resulting 20-byte instruction/pool extent and register/offset cascade. The allocator decoder finds no unique source repair; whole-block bisection, counter identity, scope, loop-shape, declaration, family-transfer, compiler-family, and scheduling probes preserve the residual or regress. Relocation-normalized cross-edition verification proves all 820 core bytes identical across all six GS1 editions (33 relocations and 29 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect that alpha-blend-fades in and back out (BLDALPHA at 0x04000052) over an 80-frame run. Seeds a 16-entry randomized particle table at work+0x7080, registers a single finish callback, then per frame: computes a sine-derived 'wave' offset, occasionally clears a canvas region via an indirect call through a runtime function pointer at 0x03000168, updates the alpha-blend register during the fade edges, and -- when the object's mode-select field chooses a non-zero table row -- draws three fixed sprites plus up to four active entries from the particle table at positions derived from sine/cosine of a per-particle-group angle. Independently, whenever frame crosses one of seven per-member thresholds it cues two member-specific presentation calls (Func_080d6888/Func_080b5088).","The dominant open residual is a whole-function register-allocation-priority question (which persistent local this compiler's allocator puts in fp vs r9 vs stack) that is already documented at length as evidence-exhausted for this exact 0x03001eec work-block family across three other siblings (080dc1ec.json, 080d59b0.json, 080e01e4.json); this dossier's score.note records this owner's own bisection evidence and the two established levers re-tried here (one helped modestly, one had zero effect, matching the family's mixed-result pattern for this class of issue)."]},"main:080d3c80":{"schema_version":1,"namespace":"main","address":"0x080d3c80","status":"measured-draft","owner_bytes":1132,"score":{"measured":"2026-08-27","candidate_bytes":1100,"reference_bytes":1132,"differing_halfwords":524,"wrong_instructions":469,"class":"wrong","note":"First structural draft, not a permutation search. The family matcher's assigned template (main:08099160... no -- main:080ce85c, member_orbit/run.c, score 7675/10000) shares only the 0x03001eec work-block prologue/teardown shape with this owner: no palette/tile upload, no Func_080ed408, no sine/cosine orbit math. Read games/gs1/asm/080d3c80.s and out/family-transplants/main-080d3c80/m2c/target.canonical.s (m2c-assisted structural decompile) directly instead of adapting the template. The real callee set and constants match the already-recovered 0x03001eec subsystem cluster (080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c): Func_08004458() as the RNG (including several discarded-return-value calls, matching the established idiom in 080b88d0.c/080d59b0.c), Func_080cef64(flag, out_pair) filling a DrawRectangleFn[2] (matching 080e01e4.c's callback_ptr idiom, confirmed necessary here too -- the reference caches &callbacks[0] in a dedicated stack slot reloaded across the whole particle-processing section, not a fresh array-decay expression at every call site), and Func_080e0524's id argument spelled as (s32)&Value_000000cf (a pool-forced small link-time constant, matching the established Value_XXXXXXXX idiom -- 0xCF fits in movs but the reference loads it via ldr/pc, proving address-of-extern-byte, not a plain literal). Per games/gs1/recon/en/dossiers.json#main:080e01e4's already-resolved derivation, every 'Func_080072f4' call here is the r4 slot of the _call_via_rN trampoline at games/gs1/asm/080072e4.s -- modeled as genuine indirect calls through DrawRectangleFn values read out of callback_ptr[idx] (idx = (j<=2)?1:0 in the ring-growth blit, idx = slot&1 in the promotion blit; both idx expressions read directly off the retained assembly's register trace, not guessed). Semantic recovery (see notes below) and the whole control-flow shape -- record-array init loop, per-member_count table-driven slot count/frame count (Data_080ee1f5[mc*2]/[mc*2+1], not the template's mc*16+48 formula), the record->8==1 growth-vs-promotion branch, the 16-entry sub-burst array, the extra-target Func_080d6888 loop -- were derived by hand-tracing every pc-relative literal load's resolved address (via the .lst byte offsets) and every register's provenance instruction-by-instruction; m2c's output was used as a cross-check but required correction in at least one place (the ip=4/0 ternary selecting callback_ptr[1] vs callback_ptr[0] by sl<=2 was represented in m2c's output as an empty dead if-block, since m2c lost track of the ip register). Once compiled, the algorithm and overall size are close (candidate=1100 vs reference=1132, an 8-word/32-byte gap) and no wrong-constant or wrong-branch-target defects were found while reading the full --align diff top to bottom -- every remaining mismatch is a register-letter/spill-slot or instruction-scheduling difference, cascading from one root cause: the reference keeps the OUTER per-frame loop counter (sp18, 'frame' here) in a stack slot and the INNER per-slot loop counter ('slot' here, bounded by the same Data_080ee1f5[mc*2] count used to gate the record-init loop) in fp for the whole function; this compiler's allocator instead gives fp to 'frame' and spills 'slot', which cascades into a further two extra 4-byte stack slots (candidate frame is sub sp,#48 vs reference's #40) and reorders/reschedules essentially every downstream instruction that touches either counter or anything spilled as a consequence (confirmed by reading the candidate's own generated out/dbg-080d3c80/080d3c80.s: 10 distinct stack-scalar slots vs the reference's 8, with the two extras being the promotion-loop's inner counter and the ring-growth sub-array base, both of which the reference keeps live in registers across their surrounding calls without a stack home). This is the exact same class of persistent, source-level-unresolved register-allocation-priority issue independently documented in 080e01e4.json note (b), 080dc1ec.json's sl/r9 swap, and 080d82b0.json/080d59b0.json -- not pursued further here per the ban on forcing register assignment or open-ended permutation search; tried and confirmed zero-effect: swapping the frame/slot local-declaration order (matched_prefix, candidate size, and every register choice were byte-identical before and after)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family matcher's highest-scoring template (7675/10000) shares this owner's 0x03001eec work-block prologue idiom, the single Func_080041d8(0x080CD261,0x480) callback registration, and the Func_08004278/Func_08002dd8(47)/Func_08002dd8(46)/Func_080cdbc0() teardown -- but none of its palette-upload/Func_08002f40/Func_08005340/Func_080ed408 tile-loading prologue, and none of its sine/cosine (Func_08002322/Func_0800231c) orbit math, appear anywhere in this owner. Its rectangle_slot[slot & 1] indirect-call idiom through the _call_via_rN trampoline WAS directly useful, though, and generalizes to this owner's own two _call_via_r4 sites.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d59b0.json, 080d82b0.json, 080dc1ec.json and 080e01e4.json: identical Func_080cd594(0)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() shape, Func_08004458() as the RNG, and (uniquely shared with 080e01e4.c specifically) Func_080cef64(flag, callback_ptr) filling a real DrawRectangleFn[2] read back through a retained callback_ptr, not resolved dynamically. Unlike any of the five siblings, this owner has no camera/facing calls (no Func_080049ac/Func_080051d8/Func_08004cb4) and no per-member-list orbit math -- it is a self-contained ring-growth-and-particle-burst effect gated entirely by two small byte tables (Data_080ee1f5 for per-member_count slot-count/frame-count, Data_080ee1d3/Data_080ee1fb/Data_080ee207/Data_080ee214 for the burst animation) whose contents are not independently recoverable from this owner alone."},"rejected_experiments":["Swapped the function-scope declaration order of `slot` and `frame` (slot declared before frame, matching the reference's fp=slot/spill=frame register choice hypothesis): zero measured effect -- candidate size, differing_halfwords, wrong_instructions and the generated assembly's register assignments (fp still holds frame, slot still spills to a stack slot) were byte-identical before and after. Matches the same zero-effect finding for declaration-order tie-break experiments already recorded in 080e01e4.json/080dc1ec.json for their own fp/sl-class register questions.","Considered forcing the ring-growth sub-array base pointer (0x02010000 + slot*0x1C0) to be recomputed via explicit shift-and-subtract matching the reference's literal instruction shape (mov r0,fp; lsls r2,r0,#4; lsls r3,r0,#7; subs r3,r3,r2) instead of a plain `slot * 0x1C0` multiply expression, to see whether it would suppress the induction-variable strength-reduction the candidate's compiler applies (an accumulator-based sp-slot instead of a per-iteration multiply) that the reference's own compiled output does not exhibit: not pursued, since the algebraic rewrite is expression-equivalent and GCC's own strength-reduction pass would very likely still detect and apply the same transform regardless of surface spelling, and this is downstream of the same root fp/slot register question rather than an independent lever."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080d3c80.s), the m2c-assisted structural context under out/family-transplants/main-080d3c80/m2c/ (target.canonical.s, 080d3c80.c, family-template.i), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/fetch_rectangle_blitters.c, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: grows an up-to-8-slot ring of particles at work + 0x7080 (28-byte records: [0]=x-base fixed-point<<16, [4]=accumulator (sentinel 0xFFC00000 until promoted, then compared/clamped against 0x380000), [8]=state (0=growing,1=promoted/bursting), [0xC]=random x-velocity term<<12 (sign/range depends on object mode field 4), [0x10]=unused after init, [0x18]=per-slot activation threshold = slot_index*8), one slot per Data_080ee1f5[member_count*2] table entry (also the record-array init loop bound). Each of Data_080ee1f5[member_count*2+1] animation passes: (a) if member_count==2 and frame<=103, nudges a u16 field at a global camera/screen struct (*(void**)0x03001E80 + 0x36) by a frame-dependent amount, direction chosen by the target object's mode field; (b) fires Func_080b50e8(0x86) at frame==total-80 and switches the work block's per-frame callback to a second constant (0x06060606) at frame==total-8; (c) for frame<=total-8, walks every active record: a record with state==1 (promoted) drives its own private 16-entry sub-burst array at 0x02010000+slot*0x1C0 through one _call_via_r4 indirect draw per entry (dest/width/height/src-offset all table-driven by an index built from two Func_080022fc/Func_080022ec calls) and steps its own [8]/[0x18] growth pair; a record with state==0 that has crossed its activation threshold gets one _call_via_r4 draw of its own (32x32, callback_ptr[slot&1]) and, once its accumulator crosses 0x380000, is promoted (state=1, accumulator pinned to 0x380000) and its whole 16-entry sub-array is freshly re-seeded from a 32-byte (16x2) offset table (Data_080ee1d3) plus two masked/negated RNG calls per entry (doubled/shifted differently when slot is odd), followed by work->0x77A8=8, Func_080f9010(144), and one Func_080d6888(member_id,7,5,idx,4) call per real party member if the target object has any (object field 0x14 != 0).","The per-member_count slot count and total frame count are direct table lookups (Data_080ee1f5[mc*2], [mc*2+1]) recomputed fresh at every comparison site throughout the function (5-6 separate re-reads, matching the reference's own repeated ldr/ldrb sequences rather than a cached local) -- consistent with this family's established 'no derived-pointer/value caching, fresh M2C_FIELD at every use site' convention; the one place the reference DOES cache a derived pointer across many call-heavy statements is `callback_ptr` (&callbacks[0], read back from a dedicated stack slot at four separate widely-separated points spanning the whole particle-processing section), matching 080e01e4.c's identical `DrawRectangleFn *callback_ptr` idiom.","Open, not-source-shape-controllable residual (see score.note for the full trace): this compiler's register allocator assigns fp to the outer frame-loop counter and spills the inner slot-loop counter, the reverse of the reference's choice, cascading into two additional stack-scalar slots and pervasive instruction-scheduling differences throughout the whole function body. This is the same class of issue independently documented as unresolved via source-level tuning in four sibling dossiers (080e01e4.json note b, 080dc1ec.json's sl/r9 finding, 080d82b0.json, 080d59b0.json) after each spent a full pass on targeted experiments; not re-litigated further here beyond the one direct declaration-order test recorded above.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080d41a4":{"schema_version":1,"namespace":"main","address":"0x080d41a4","status":"measured-draft","owner_bytes":1096,"score":{"measured":"2026-08-27","candidate_bytes":1076,"reference_bytes":1096,"differing_halfwords":475,"wrong_instructions":446,"class":"wrong","note":"First structural draft, not a permutation search. Read games/gs1/asm/080d41a4.s in full and cross-checked every pc-relative literal load against its resolved byte offset (script-computed, not guessed) to pin every constant, table address, and call target before writing any C. The family-matcher's assigned template (main:080ce85c, games/gs1/src/battle/effects/member_orbit/run.c, score 7938/10000) supplied the field-offset layout (work+0x7780/0x7784/0x7824/0x7828), the M2C_FIELD macro, the DrawRectangleFn typedef, and the heap_cache cursor-advance idiom, but the owner's actual body is a different sub-effect entirely: no scanline sine-curve, no 32x32 orbit sprites. Instead it runs a per-\"kind\" loop (0..count-1, count read from a byte table at 0x080ee25e indexed by state->0x18) that draws a growing-then-shrinking marker via two DrawRectangleFn-style blits, spawns particles into the shared 1024-entry 0x02010000 pool on the middle frame of each kind's window, and updates every party member's position once per kind; a second, unconditional pass ages and redraws every live particle in that same pool every frame. Confirmed the r4-slot `_call_via_rN` trampoline finding from games/gs1/recon/en/dossiers.json#main:080dc1ec applies here too: what reads as `bl Func_080072f4` at three call sites is an indirect call through a DrawRectangleFn value already sitting in a register (rectangle[0], or rectangle_slot[scan&1] in the decay pass) -- modeled as `((DrawRectangleFn)ptr)(dest,src,x,y,w,h)`, not a call to a real function. The two `bl Func_080072f0` sites are the r3-slot trampoline instead, modeled per games/gs1/src/graphics/vram/reset_block_and_release_heap_blocks.c's established direct-call-with-trailing-target convention (`Func_080072f0(a,b,c,target)`). Cross-checked every ROM table this owner reads (0x080ee25e, 0x080ee250, 0x080ee244) against games/gs1/assets/code/sentou_kouka_hyou_a.json's byte dump to confirm the count/sprite-index/spawn-count semantics before writing the loop bounds -- all three matched the derived formulas exactly (e.g. Data_080ee25e = [1,3,7,0], consistent with a 0..3 state kind and a per-kind loop count). Iterated against `compiler candidate-show --align --size 1096`: fixed the Func_080ed408/heap_cache[7] read-before-second-call ordering to match the template's exact evaluation order (candidate dh 497->496); added the established Value_XXXXXXXX literal-pool-load idiom for both Func_080e0524 id arguments (0xd1, 0x73) instead of plain immediates; converted the 1024-entry zero-init loop to a do-while with increment-before-store to match the reference's r8-then-store order; restructured the per-kind range dispatch (originally written as clean delta-based if/else-if) into the literal fall-through/goto shape the reference's five-label control flow actually has once traced instruction-by-instruction, which alone dropped wrong_instructions by ~30; de-hoisted the sprite-table lookup and speed+32 sub-expression back into fresh per-site reads (the family's documented anti-CSE-spill pattern) instead of caching them across sites, matching the reference's repeated re-reads. Ran out of time before closing the remaining gap, which is dominated by two things: (1) a persistent one-slot (4-byte) stack-frame oversize (sub sp,#56 vs reference's #52) whose exact source was not pinned down -- tried collapsing/renaming count and count*8 several ways (a single `count*7+48` expression, a named count8 local, count8 computed inline) and the named-count8 form scored best (496->476 dh) but never closed the gap; (2) pervasive independent-immediate-load scheduling differences (same instructions, different order) throughout the per-kind draw and particle-spawn/decay blocks that read as the family's documented 'register allocator schedules independent loads differently' residual rather than a semantic error -- confirmed by re-tracing several of these regions by hand against the resolved literal table and finding the operations match, only the emission order differs. Not exact."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Size mismatch flagged by the workflow (owner 1096 bytes vs template's 724) was real: the template's exact byte layout (heap_cache cursor-advance for work/canvas, M2C_FIELD offset macro, DrawRectangleFn typedef, work+0x7780/0x7784/0x7824/0x7828 field writes, and the rectangle[2]/rectangle_slot array pattern) transplants directly, but the actual per-frame behaviour is unrelated: this owner has no scanline curve and no per-member orbit sprite loop. It instead runs a per-kind growing-marker draw + particle spawn + member-position-update loop, plus an independent full-pool particle decay/draw pass every frame -- much closer in shape to the particle-pool owners (080d59b0/080d82b0/080dc1ec/080e01e4/080e7404) than to member_orbit itself, though it shares none of their exact loop structure either. heap_cache[2] (\"sprite_sheet\") is read directly by index in the prologue, one slot past what the template's cursor advances to -- matches the family note that heap_cache reads mix cursor-advance and direct indexing.","trampoline_evidence":"games/gs1/recon/en/dossiers.json#main:080dc1ec's r4-slot _call_via_rN derivation (arm_function_arg proof + r4-value provenance trace) and the already-adopted member_orbit/run.c's ((DrawRectangleFn)rectangle_slot[slot&1])(...) idiom both apply directly here: this owner's three `bl Func_080072f4` sites are indirect calls through rectangle[0] (growing-marker draws) or rectangle_slot[scan&1] (decay-pass draw), never a 7-argument direct call. The two `bl Func_080072f0` sites are the separate r3-slot veneer, modeled per games/gs1/src/graphics/vram/reset_block_and_release_heap_blocks.c/_25.c/_47.c's established direct-call-with-trailing-target convention instead.","table_evidence":"games/gs1/assets/code/sentou_kouka_hyou_a.json documents the three ROM tables this owner reads as raw bytes at 0x080ee25e (hyou_a_080, u8[4] = [1,3,7,0]), 0x080ee250 (hyou_a_079, u8[14], two 7-entry groups), and 0x080ee244 (hyou_a_078, u8[12] = three 2-halfword groups) -- all consistent with the derived semantics (per-kind loop count, two field4-selected 7-wide sprite/x-index tables, per-kind spawn-count + secondary value pairs) before any C was written against them."},"rejected_experiments":["Inline `count * 7 + 48` for both the initial skip-check and the for-loop bound (no separate count8 local): scored worse (candidate=1084, dh=477) than a named `count8 = count * 8;` local reused in `(count8 - count) + 48` (candidate=1080, dh=476) -- kept the named form despite neither matching the reference's exact stack slot for it.","Caching the DrawRectangleFn draw's src/x/y/half/full into named locals ahead of the decay-loop call (statement-per-value instead of nested expressions inside the call): regressed both size and dh (1068/479 vs 1076/475) -- reverted to inline expressions.","Caching the decrement particle life value (`life`) for the half-width division inside the decay/draw block instead of re-reading M2C_FIELD(particle,s32*,0x18) fresh: the reference re-reads the field from memory even though the decremented value is still available, matching the family's anti-CSE-spill guidance; switching to a fresh read improved candidate size (1084->1076) without regressing dh.","A single cached `member_id` local reused for both Func_080b5088 and Func_080d6888 calls in the per-member loop: the reference issues two independent ldrsh reads instead of reusing one register/spill; removing the named local to match cost some wrong_instructions locally but is evidence-grounded from the raw retained assembly, not reverted."],"notes":["Recovered only from games/gs1/asm/080d41a4.s (including a byte-offset script resolving every pc-relative literal load to its exact `.4byte` value), the approved local EN ROM, the approved compiler, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the already-committed measured-draft siblings in games/gs1/recon/en/main/ (080dc1ec.c/.json for the r4-trampoline derivation, 080dd77c.c/080ccebc.c/080ecef4.c/080e7404.c for calling-convention cross-checks), games/gs1/src/unidentified/main/battle/battle_owner_*.c for the r3-trampoline convention, in-repo headers, and games/gs1/assets/code/sentou_kouka_hyou_a.json for the three ROM data tables this owner reads. No other Golden Sun decompilation project, symbol map, or external disassembly was consulted.","This candidate claims zero DONE bytes.","Semantic summary: battle-presentation sub-effect on the 0x03001eec battle-work subsystem. Loads a palette conditionally (skipped when state->0x18==2), zeroes the life field of all 1024 slots in the shared particle pool at 0x02010000, then runs (count*7)+48 frames where count comes from a per-state-kind byte table. Each frame optionally nudges a camera-shake field (state->0x18==2 case, frames 0..63 only), then for each of `count` \"kind\" indices j: on frame j*8 fires a flash callback + full-screen fade blit; on frame j*8+1 draws a shrinking marker; on frames j*8+2..3 draws a second marker and, on exactly j*8+2, spawns up to a per-kind target count of fresh particles into the first free pool slots with randomized angle/speed and a per-kind sprite type; on frame j*8+4 nudges every active party member's on-screen marker and portrait rotation. Independently, every frame, the whole 1024-slot particle pool is aged (life-1, position integrated via Func_080e3908) and any particle past a fixed altitude threshold that is still on-screen is redrawn as a shrinking trail sprite selected from a size-indexed lookup table, alternating between the effect's two draw routines by pool-slot parity.","Known open residual, not source-shape-controllable within this pass's time budget: a one-slot stack-frame size mismatch (56 vs reference's 52 bytes) whose exact cause was not isolated, plus widespread independent-immediate-load scheduling-order differences that read as the same 'register allocator/scheduler makes a different but equally valid choice' class of residual already documented for this owner family (080dc1ec.json, 080e01e4.json) -- do not force register assignment or chase further without new evidence."]},"main:080d4ce8":{"status":"blocked","measured":"2026-08-29","combined_span":{"start":"0x080d4ce8","end":"0x080d5238","size_bytes":1360,"note":"Region_080d4ce8 (games/gs1/asm/080d4ce8.s, 444 asm lines) plus Fragment_080d5094 (games/gs1/asm/080d5094.s, 242 asm lines) recovered jointly as one function, matching the boundary evidence already recorded in games/gs1/recon/en/dossiers.json#main:080d5094 (mirrored r8-r11 prologue/epilogue, internal branches sub_080d4e4c/sub_080d4ece/sub_080d4fe0 landing inside Region_080d4ce8's own byte range). End address is the byte immediately after `bx r0`, i.e. the start of LiteralPool_080d5238; the literal pool itself is excluded from the scored span."},"score_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080d4ce8.c --owner 080d4ce8 --size 1360 --align --first","best_score":{"candidate_bytes":1212,"reference_bytes":1360,"differing_halfwords":650,"wrong_instructions":650,"class":"compiler-unemittable","matched_prefix":7},"attempts":11,"structural_completeness":"Complete draft as of this pass: every block from the asm now has a corresponding C statement -- setup (heap-cache read, WORK_EFX assign, Func_080cd594, MMIO write, two Func_080e0524 calls), the kind-gated palette copy, the two Func_080ed408 rectangle setups, the one-time 1024-entry particle-table clear, the 4-anchor work+0x7080 init loop, the timer/callback registration, the 96-frame loop containing the kind==2 canvas-field54 nudge, the frame==16 hook, the per-frame do-while member/anchor draw loop (Func_080e3944 + Func_080072f4 calls), a particle-table free-slot scan and spawn (rng-driven velocity via Func_08002322/Func_0800231c), the 1024-slot particle decay/draw pass (position += velocity, >>6 fixed-point drag, gravity term, bounds-gated Func_080072f4 draw), and the Func_08002dd8/Func_08004278/Func_080cdbc0 teardown. Literal-pool constants for the Fragment_080d5094 half (particle table base 0x02010000, work offsets 0x7780/0x7784/0x7824/0x7828, byte tables 0x080ee29a/0x080ee2a9, halfword table 0x080ede48, teardown callback 0x080cd261) were resolved for real by assembling games/gs1/asm/080d5094.s standalone with arm-none-eabi-as at its true load address and reading the pool with objdump -d --disassemble-zeroes -Mforce-thumb, the technique credited to the 08077428 agent. Region_080d4ce8's own literal pool (the byte range 0x080d5054-0x080d5093, physically between the two retained-asm files) could not be resolved the same way because neither .s file contains those bytes -- assembling Region_080d4ce8.s alone produces a .text section that ends before that address, so objdump has nothing to read there. Those few constants (kind==2 palette id, two anchor/member byte-table addresses, the two Func_080041d8 callback addresses) remain named placeholders.","remaining_divergence":"candidate-show still reports class=structural-topology at matched_prefix=7 (candidate=1276, reference=1360, differing_halfwords=668, frame currently `sub sp,#84` vs reference's `sub sp,#64`): the reference's very first heap-cache read compiles to `adds r3,r2,#0 / ldmia r3!,{r1} / ldr r3,[r3,#0]` (an LDM-based double word load with post-increment) where every tried C idiom (`*cursor++` in a local, splitting into two statements, a small HeapEntry struct) instead compiles to two independent `ldr` loads plus an extra address computation. attempt_10 proved via lens.ts this is a register-pressure gap, not a spelling gap: none of the draft's ~290 pseudos ever carry an HI_REGS preference, so global.c never has a reason to promote anything into r8-r11 the way the reference does (reference holds 4 values live there with a 64-byte frame). attempt_11 tried three source-level address-taking restructurings recommended by attempt_10's next_steps (screen taken into a pointer once per do-while entry, the same widened to function-long scope, and rectangle_slot's address taken earlier) -- none produced an HI_REGS preference in lens.ts, and two actively regressed the score. This is a single, well-isolated front-of-function/register-pressure mismatch (not yet diagnosed against the compiler's own local-alloc.c/global.c dumps per CONTRIBUTING.md's 'read the compiler first' method step 2) rather than a remaining structural gap in the recovered algorithm, but it currently caps matched_prefix at 7 and cascades into every later offset comparison the diff tool prints. Separately, attempt_11 fixed a real, previously-wrong constant (`cursor2` was guessed as work+0x6e80 with no grounding; it is actually work+0xdd0, confirmed from the asm immediates) and recovered a third, previously-unattributed gap-pool constant (work+0x10b4, confirmed via objdump) that distinguishes the flag==0 sprite-draw branch from the flag!=0 one -- both branches had wrongly been made identical (both used plain `work`) before this fix.","structure":"Single C function Func_080d4ce8(void *object) combining both owners. Confirmed via candidate-show call-target matching: heap-cache read of work/canvas/a third slot (extra) from Data_03001e50, WORK_EFX = object, Func_080cd594(1), two Func_080e0524(effect_id, target, flag, flag) setup calls (matches the same call shape already proved in games/gs1/src/battle/effects/puff_arc/run.c), a kind-keyed conditional VRAM/palette copy through the generic Func_080072f0(dest, src, count, routine=0x03001388) dispatcher (the same routine constant member_orbit's run.c encodes as a raw ((WordCopyFn)0x03001388) call), Func_080ed408(46,7,7,3,2) / Func_080ed408(47,7,7,7,2) rectangle-blit setup (kinds and first three sizes match games/gs1/recon/en/dossiers.json#main:080d5094's dossier; the fourth size read directly off the asm is 7, not the dossier's provisional 15 -- see refuted_hypotheses), a 1024-entry x 28-byte particle table cleared once before the frame loop, and a fixed 96-frame loop ending in Func_08002dd8(47)/Func_08002dd8(46)/Func_08004278/Func_080cdbc0 teardown matching both template twins.","attempts_detail":["Attempt 1: standalone-fragment hypothesis (pre-existing, from games/gs1/recon/en/dossiers.json#main:080d5094) -- refuted, not retried here.","Attempt 2: minimal joined draft reusing games/gs1/src/battle/effects/member_orbit/run.c's exact setup sequence (single Func_08002f40 + WordCopyFn copy, no Func_080e0524 calls) with a stack-local Particle particles[1024]. class=compiler-unemittable, wrong_instructions=615. The stack local alone (1024*28=28672 bytes) is structurally impossible against the reference's `sub sp, #64` frame, and the setup calls did not match (reference calls sub_080e0524 twice via `bl`, which this draft never called).","Attempt 3: rewrote the setup section from the actual asm: recognized two Func_080e0524(id, target, flag, flag) calls (cross-checked signature against games/gs1/src/battle/effects/puff_arc/run.c line 113 and games/gs1/recon/en/main/080d82b0.c line 75), and recognized the two Func_08002f40+Func_080072f0(dest,src,128,0x03001388) copies gated on WORK_EFX->kind == 0 / == 2. Kept a stack-local Particle array by mistake. class=compiler-unemittable, wrong_instructions=631 (still failed to compile the giant local).","Attempt 4 (current best): moved the particle table to an extern global (Data_0203cd00[1024], address unresolved/placeholder) instead of a stack local, since the reference's 64-byte frame proves the table cannot be a local. class improved to structural-topology, wrong_instructions=625, differing_halfwords=679. bl call targets for both Func_080e0524 calls and the Func_08002f40/Func_080072f0 setup now match the reference's targets exactly (visible in candidate-show diff as unmarked lines), confirming that call-graph recovery. The remaining divergence starts at the prologue itself: the reference holds four values live across the whole function in r8/r9/r10/r11 (mov r7,fp; mov r6,sl; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}), but the current draft's reduced local set (no y_offset/record_slot/screen/record locals, and a simplified frame-loop body that is mostly stubbed placeholder logic) only pressures two callee-saved registers, so GCC allocates a visibly different, shorter prologue and the whole instruction stream shifts out of alignment from there."],"attempt_9":"Mapped every `ldr r,[pc,#N]` in games/gs1/asm/080d4ce8.s whose target lands past the retained object's own text end (0x36a) onto the 16-word ROM gap list from attempt_7, by assembling the region standalone (arm-none-eabi-as + arm-none-eabi-objdump -d --disassemble-zeroes -Mforce-thumb out/gs1-en/asm/080d4ce8.o) and reading each instruction's own comment-annotated local target address (e.g. `@ (0x36c ...)`), then adding 0x080d4ce8 to get the real address and indexing into the attempt_7 word list (0x36c=w0 ... 0x3a8=w15, 16 consecutive words, one per 4 bytes -- confirms the whole gap is this region's own tail literal pool with no slack). This produced several confirmed, evidence-backed corrections applied to the .c: (1) `efx->unk1C` was wrong in every one of its 5 uses -- the real field read is offset 24 (0x18), which is the struct's existing `layers` member, not `unk1C` (offset 28); replaced throughout. (2) The anchor-init bias table and the per-frame draw-loop cell table were both wrongly aliased to one invented symbol `Data_080ede9f`; the real pool values are two distinct, already-plausible addresses -- 0x080ee29d (anchor bias, ldrsb i.e. **signed** byte, indexed by `layers*4+i`) and 0x080ee2a9 (draw-loop cell table, matches the already-declared-but-misused `Data_080ee2a9`) -- split into `Data_080ee29d` (new, s8) and reused `Data_080ee2a9` correctly. (3) rectangle[46]/[47] and the per-frame canvas-like pointer were read from the wrong heap-cache window: this owner reads them from `Data_03001e50[46]`/`[47]`/`[12]` (the corpus-wide 'Data_03001e50[kind] holds kind's block address' cache already established in games/gs1/recon/en/main/080cc5d8.c, 080dd2c4.c, 080e7404.c, 080ceff8.c), not from `Data_03001eec[46]`/`[47]`/`[1]` as the draft had it -- 0x03001e80 (the dossier's previously-unattributed 'second heap-cache pointer') is exactly Data_03001e50[12] ((0x03001e80-0x03001e50)/4=12), and it is re-read every frame at the real loop-reentry address (sub_080d4e4c = local offset 0x164), not reused from the startup Data_03001eec[1] read. (4) The particle-spawn magnitude/angle were built from the wrong inputs: real code is `magnitude = rand()&0x3ff` (not `Data_080ee2a9[0]&rand()`) and `angle = (rand()&0x7fff) + 0xffffc000` (not `magnitude+rand()`), with the `+32` magnitude bump happening after the cosine call per the real instruction order -- spelled with the exact masks read from the gap pool (w13=0x3ff, w14=0x7fff, w15=0xffffc000) per this round's lead (1). Net effect on candidate-show: matched_prefix stays capped at 7 and differing_halfwords moved from 650 to 661 (candidate_bytes 1212->1244, sub sp #64->#84) -- confirms attempt 4's finding that the front-of-function ldmia/frame-size mismatch (not yet fixed) dominates and cascades into every later offset comparison, so this round's corrections are real, evidence-backed structural fixes but are not yet visible in the score. They should be kept regardless: reverting to the old wrong offsets/masks to chase a marginally lower cosmetic diff under a known-broken prefix would trade correctness for a meaningless number.","attempt_10":"Ran the frame-ledger technique per next_steps (lens.ts had never actually been run against this owner before -- only the guess-and-recompile loop had). (1) Enumerated every [sp,#N] access across both retained-asm files: distinct offsets 0,4,8,12,16,20,24,28,32,36,40,44,52,56 (part 2's set -- 0,4,8,12,24,28,32,36,40 -- is the same physical frame, no new offsets). 14 word slots = 56 bytes inside the reference's `sub sp, #64`; offsets 48 and 60 are never touched by ldr/str/add in either file, i.e. two 4-byte slots the reference reserves but never re-reads -- the same 'declared array/local with zero accesses' signature the walker dossier used to explain a GCC 2.96 frame-size gap. (2) Enumerated every r8-r11 touch: r11 (fp) is set once near the very top (`mov fp, r1` from the ldmia's first word) and then referenced via `add rX, fp` at at least 9 separate sites scattered across the whole function body in both files -- a single long-lived base-address pseudo, matching `work` (heap[0]) in the current draft, which is already declared first and used throughout. r8/r9/r10 are each reused for 3-4 unrelated short-lived values at different points (mov r8,r3 / mov r8,r0 / mov r8,r7, etc.) rather than one variable living the whole function -- so only fp/r11 is a true whole-function aggregate pointer; r8-r10 are just what the allocator promoted into hard high registers under heap-cache-window register pressure, not named locals with special lifetime shape. (3) Ran `bun tools/allocator-lens/lens.ts 080d4ce8` against the current (attempt_9) source for the first time: all 286 pseudos in the emitted order show LO_REGS or BASE_REGS as their only preferred class -- none show a HI_REGS preference or an r8-r11 hard assignment anywhere in the dump. This is the actual mechanical reason matched_prefix is stuck at 7: the current draft's simultaneous-live-value count under LO_REGS (r0-r7) never rises high enough, at any point in the function, for global.c to spill a pseudo into r8-r11 the way the reference does -- so the prologue difference (2 registers / 64-byte frame vs 4 registers / 88-byte frame) is a real, measured register-pressure gap, not a frame-size cosmetic. (4) Baseline rescore reproduces attempt_9 exactly: candidate=1244 reference=1360, differing_halfwords=661, class=structural-topology, matched_prefix=7, candidate frame is `sub sp, #84` (not yet 64 or 88 either). No source edit was applied this round: per attempt_8/attempt_9's own finding, changing the heap-read spelling alone does not move the register-pressure needle (confirmed again structurally via lens.ts, not just by recompiling), and no candidate edit was found this round that visibly raised any pseudo's live-range overlap enough to trigger an r8-r11 assignment in the lens output, so nothing was committed that would trade a verified-correct structural fix for an unverified cosmetic diff shift, per attempt_9's own caution.","attempt_11":"Executed attempt_10's recorded plan (r8-r10 function-long-lifetime restructuring + frame back-solve on the two dead sp slots) and measured every step against lens.ts, not just candidate-show. (1) Took the address of `screen` once per do-while entry into `screen_ptr`, routed every screen[0]/screen[1] site (inside the do-while AND the later particle-spawn block) through it: byte-for-byte identical output (differing_halfwords stayed 661) -- GCC 2.96 CSEs this identically to direct array-subscript access at this call site, the same null result attempt_8 got for the heap-read pointer. Widening screen_ptr's lifetime to span the whole 96-frame loop (assigning it once before the `for`) made things *worse* (665) by perturbing scheduling without ever producing a HI_REGS preference. (2) Took rectangle_slot's address before its first use instead of after (matching the work/fp idiom) instead of via the intermediate `second_rectangle` local: also worse (667), same non-effect. Both reverted. (3) Re-read the actual r9-holds-&screen and r8/r10-hold-loop-counters asm sites named in next_steps (games/gs1/asm/080d4ce8.s lines 244-443, games/gs1/asm/080d5094.s lines 20-107) directly rather than guessing: r9 is &screen taken fresh every do-while entry (not function-long, contradicts the 'function-long' framing in the next_steps hint -- it is scope-long, same as the current per-entry `screen_ptr` assignment already tried in (1)); r8 cycles through at least four unrelated short binds (anchor-init counter, scan_index seed, `spin` return value, particle-decay-loop index i) exactly as attempt_10 already found: this is real, but is the allocator reusing a hard register across disjoint pseudos with non-overlapping live ranges, not a C-level variable with one lifetime -- there is no single source restructuring that reproduces it, because it isn't one variable in the original source either. r10 is `member_index`, genuinely live across the whole 96-frame loop already (declared outside the frame loop in the current draft, matching its shape) -- no restructuring needed there, it was already right. (4) Ran lens.ts after each of the above: across all four variants (baseline, screen_ptr-scoped, screen_ptr-function-long, rectangle_slot-early) every one of the ~286-290 pseudos shows LO_REGS or BASE_REGS as its only preferred class in every run -- HI_REGS preference never appeared once. This reconfirms attempt_10's mechanical finding under direct experiment: the gate is not reachable by rearranging existing locals' address-taking, at least not through any of the source shapes tried across these 11 attempts. (5) Frame back-solve on the two dead slots (sp+48/sp+60) produced a genuine, unrelated, well-grounded fix instead: re-reading games/gs1/asm/080d4ce8.s lines 244-350 closely (not just the two named dead-slot candidates) showed `cursor2` -- previously guessed as work+0x6e80 with no grounding -- is provably work+0xdd0 (movs r2,#221; lsls r2,r2,#4; add r2,r11, spilled to sp+16, reloaded at lines 336/349 as the *second* argument to Func_080072f4 in the flag!=0 branch only), and the flag==0 branch (.L_080d4f90, lines 352-377) uses a *third*, previously-unattributed work-relative constant, confirmed by objdump'ing out/gs1-en/asm/080d4ce8.o (ldr r5,[pc,#236] at local offset 0x2a8 targets local offset 0x398, which is gap-pool word index (0x398-0x36c)/4=11 from attempt_7's list: 0x000010b4). Both fixes applied: `cursor2 = work + 0xdd0` (was 0x6e80, wrong) feeding the flag!=0 pair of Func_080072f4 calls, and a new `cursor3 = work + 0x10b4` feeding the flag==0 pair (previously both branches wrongly passed plain `work`, making the two branches byte-identical when the reference clearly distinguishes them). Net effect on candidate-show: differing_halfwords 661->668, candidate_bytes 1244->1276 -- worse under the still-broken-prefix comparison, exactly the same 'real fix moves the number the wrong way while the prefix is capped' pattern attempt_9 already documented and warned against reverting for. Kept per that same reasoning: reverting a grounded three-way branch distinction to chase a lower cosmetic diff under a known-broken prefix trades correctness for a meaningless number. (6) Neither the two dead sp slots (sp+48/sp+60) nor the r8-r10 promotion were resolved by this attempt: no source shape found across 11 attempts total produces an HI_REGS preference in lens.ts, so the actual mechanism the reference compiler used to reach `sub sp,#64` with two extra callee-saved hi regs remains unread -- next agent should stop trying C-level address-taking permutations (three independent shapes have now been measured to fail, matching attempt_9's caution about spelling-search regressing on allocation-class residuals) and instead pull the local-alloc.c/global.c dumps for this exact function per 'Read the compiler first' step 2, comparing the reference ROM's actual pseudo count/overlap at the do-while and particle-spawn call sites against this draft's, to find the concrete numeric threshold (per REGISTER_MOVE_COST / local-alloc's class-preference tie-break) that the reference crosses and this draft does not.","refuted_hypotheses":["Fragment_080d5094 as an independent function (carried over from games/gs1/recon/en/dossiers.json#main:080d5094): refuted by the shared prologue/epilogue and internal-branch evidence documented there.","Kind-47 rectangle size 4th argument = 15 (as speculated in games/gs1/recon/en/dossiers.json#main:080d5094's template_evidence): the retained asm at games/gs1/asm/080d4ce8.s lines 105-115 shows r1=7, r2=7, r3=7, r0=47, sp[0]=2 for that call -- i.e. Func_080ed408(47, 7, 7, 7, 2), not (47, 7, 7, 15, 2). The dossier's '15' does not match a direct read of this asm and should not be trusted for this owner.","Reusing member_orbit's exact local-variable set verbatim reproduces the reference prologue: refuted -- the frame-loop body here is materially different (fixed 96 iterations, a kind-gated field-54 nudge, an extra particle decay/draw sub-loop, and different member-loop bounds), so the same declaration list does not by itself recreate the same register-pressure profile; the loop body has to be reconstructed faithfully, not just the outer variable list, before the allocator will match.","attempt_11: taking &screen into a pointer once per do-while entry (matching the reference's r9 idiom exactly) triggers an HI_REGS preference in lens.ts: refuted -- byte-for-byte identical candidate-show output to the unpointered form (differing_halfwords unchanged at 661), the same CSE-erases-the-spelling result attempt_8 already found for the front-of-function heap read.","attempt_11: widening screen_ptr's or rectangle_slot's address-taking to span the whole 96-frame loop (function-long, not just do-while-scope) moves the allocator toward HI_REGS: refuted -- both variants regressed the score (665 and 667 respectively) and neither produced an HI_REGS preference for any pseudo in lens.ts; widening an already-CSE'd pointer's lifetime only perturbs scheduling, it does not change what class local-alloc prefers."],"attempt_7":"Read the true gap bytes at 0x080d5054-0x080d5093 straight out of roms/gs1-en.gba (offsets 0xd5054-0xd5093) per lead (3). Words: 0x00000087, 0x03001388, 0x03001e50, 0x02010018, 0x00007828, 0x080ee29d, 0x00007784, 0x080cd261, 0x03001e80, 0x080ee29a, 0x080ee2a9, 0x000010b4, 0x02010000, 0x000003ff, 0x00007fff, 0xffffc000. Cross-checked against the two already-resolved pools (games/gs1/asm/080d4ce8.s .4byte list: 0x00001010/0x03001eec/0x00007828/0x04000052/0x00000085/0x00000073/0x00000086/0x03001388; games/gs1/asm/080d5094.s .4byte list: 0x080ee2a9/0x000077a8/0x00007828/0x080ee29a/0x02010000/0x080ede48/0x00007824/0x080cd261). Result: Value_00000087 (kind==2 palette id) is confirmed correct as-is. Data_080ee29a/Data_080ee2a9/Func_080cd261/Data_02010000/work+0x7828 were already correctly resolved from the other two pools and are consistent with the gap read. Only one Func_080041d8 call exists in the retained asm (games/gs1/asm/080d4ce8.s line 190, `bl sub_080041d8`, a fixed subroutine address, not a pool literal) -- the dossier's earlier claim of 'two Func_080041d8 callback addresses' as outstanding placeholders is stale and should be dropped. Unattributed gap words remain: 0x03001e80 (a second heap-cache-style pointer, distinct from the retained pool's 0x03001eec base) and 0x000003ff/0x00007fff/0xffffc000/0x02010018, which read as a 1024-slot wrap mask, an angle mask, a sign-extend/shift constant, and a size/flag literal for code this draft currently approximates with `== 1024` equality-break and plain shifts instead of masking -- worth revisiting once the head/frame mismatch is fixed, since a wrong idiom there would itself shift instruction count. (0x000010b4, listed here as unattributed, was resolved by attempt_11: it is the work-relative offset used by the flag==0 sprite-draw branch's Func_080072f4 calls -- see attempt_11.)","attempt_8":"Tried collapsing the cache/cache++ pointer-walk head read into direct heap[0]/heap[1]/heap[2] array-subscript form (removing the intermediate `cache` pointer variable) to try to trigger the reference's ldmia-based double load. No effect: candidate-show produced byte-for-byte the same instruction stream (differing_halfwords=650, matched_prefix=7) -- GCC 2.96 treats `*p`, `*(p+1)`, `heap[2]` identically to the previous `*cache; cache++; *cache; heap[2]` spelling at this call site, confirming per CONTRIBUTING's 'read the compiler first' that the divergence here is fed by the register-pressure/frame-size gap already diagnosed in attempt 4, not by how the three loads are written. Kept the simpler heap[0]/heap[1]/heap[2] form in the source since it compiles identically and reads clearer.","next_steps":["attempt_11 measured (not guessed) that none of the three C-level address-taking restructurings attempt_10 proposed (screen pointer scoped to the do-while, the same widened to function-long, rectangle_slot's address taken earlier) move any pseudo's lens.ts preferred class off LO_REGS/BASE_REGS -- HI_REGS has never appeared once across 11 attempts' worth of source shapes. Stop trying further C-level address-taking/lifetime permutations on these two locals; that avenue is now measured exhausted, not merely unlucky.","Per CONTRIBUTING.md's 'Read the compiler first' step 2 (not yet done for this owner): pull the local-alloc.c/global.c dumps (`-da` on the staged cc1, or extend tools/allocator-lens/lens.ts to surface the raw class-preference cost comparison, not just the final winner) for the do-while call site (games/gs1/asm/080d4ce8.s lines 244-350, mov r9 usage) and the particle-spawn/decay call sites (games/gs1/asm/080d5094.s lines 20-107, mov r8/r10 usage). Find the actual numeric LO_REGS-vs-HI_REGS cost comparison local-alloc.c makes for the reference's pseudos at those points, and compare it against the same comparison for this draft's pseudos -- the goal is the concrete threshold (simultaneous-live-count, or a specific insn pattern requiring an 'h'-class operand) the reference crosses and this draft does not, not another source respelling.","The prologue/frame-size mismatch identified in attempt 4 (reference holds 4 values live in r8-r11 with `sub sp,#64`; every tried draft pressures fewer registers and gets a bigger/smaller frame -- currently 84 bytes) is still the single blocking issue -- it caps matched_prefix at 7 regardless of how correct the rest of the body is (attempt_9 moved differing_halfwords 650->661, attempt_11 moved it 661->668, both while fixing real bugs, because the comparison is anchored at the broken prefix either way).","attempt_11 resolved the two dead-slot candidates named in attempt_10's next_steps differently than expected: `screen`/`rectangle` were not themselves under-pressured locals needing restructuring -- instead, closely re-reading the same asm region surfaced a wrong constant (`cursor2`, now fixed to work+0xdd0) and a genuinely missing third local (`cursor3` = work+0x10b4, the flag==0 branch's distinct work-relative offset, previously collapsed onto plain `work`). Whether sp+48/sp+60 are literally these two new locals' stack slots (once the frame shrinks toward 64 bytes) or something else entirely has not been checked -- re-run the frame ledger (every [sp,#N] access in both .s files) once the register-pressure fix lands, since the offsets will shift as the local set changes.","Data_02010000[1024]'s address is confirmed correct as-is (0x02010000, read directly from Fragment's own resolved pool) -- no longer a placeholder; drop any future lead that re-doubts it."]},"main:080d5094":{"status":"blocked","measured":"2026-08-29","best_score":{"candidate_bytes":2,"reference_bytes":452,"differing_halfwords":226,"wrong_instructions":216,"class":"missing-extra-code"},"attempts":2,"finding":"Fragment_080d5094 is not an independent function boundary. Region_080d4ce8 (games/gs1/asm/080d4ce8.s) opens with `push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; ...; sub sp, #64`, and Fragment_080d5094 closes with the exact mirror `add sp, #64; pop {r3,r5,r6,r7}; mov r8,r3; mov r9,r5; mov r10,r6; mov r11,r7; pop {r5,r6,r7}; pop {r0}; bx r0` and no prologue of its own. Fragment_080d5094 begins mid-stream with a plain `bl` and reads r7/r8/r10/r11 as already-live values with no corresponding formal parameters an ordinary ABI-compliant C function could receive them through. Internal edges labelled `sub_080d4e4c`, `sub_080d4ece`, `sub_080d4fe0` (conditional/unconditional branches, not `bl`) land inside Region_080d4ce8's own byte range with the same live register state, which only type-checks if both owners are one physical C function; a standalone `void Func_080d5094(void)` cannot reproduce that entry state or exit through a shared caller frame it never allocated.","template_evidence":"games/gs1/src/battle/effects/member_orbit/run.c (Func_080ce85c) implements the same algorithm shape at a different call site: two heap-kind rectangle-blit routines built via Func_080ed408, a per-frame loop rewriting a work+0x6980 scanline table from a sine sweep, and orbiting sprites drawn for listed party members via Func_080e3944/Func_08002322/Func_0800231c, ending with Func_08004278/Func_08002dd8/Func_080cdbc0 teardown. Region_080d4ce8 + Fragment_080d5094 are a second instance of this same template (rectangle kinds 46/47 with sizes 7,7,3,2 and 7,7,15,2 match exactly; the frame-exit count here is a fixed 96 rather than member_count*16+48, and this instance adds a 1024-iteration particle sub-loop with independent fixed-point decay of position/velocity fields at struct offsets 0, 4, 8, 16 with a life counter at offset 24, drawn through Func_080072f4).","refuted_hypotheses":["Treating Fragment_080d5094 as a self-contained void function with plausible locals for r7/r8/r10/r11: compiles to a 2-byte `bx lr` stub, 226 differing halfwords against reference, because GCC has no source-level way to seed those registers with caller-supplied live values without formal parameters, and the required epilogue frame (sp-64, r8-r11) was never allocated by this owner.","Chaining internal branches (sub_080d4e4c/ece/4fe0) as ordinary tail-call extern functions: rejected because those addresses are conditional/unconditional branches (not `bl`) into the middle of Region_080d4ce8's own instruction stream with unmodified register state -- i.e. they are goto targets inside the same function, not callees."],"recommendation":"Recover Region_080d4ce8 and Fragment_080d5094 jointly as one C function (likely under a new translation unit spanning 0x080d4ce8-0x080d5238) before either owner can reach differing_halfwords=0 in isolation. Out of scope for this task, which is restricted to games/gs1/recon/en/main/080d5094.c alone and forbidden from touching games/gs1/recon/translation-units.json."},"main:080d59b0":{"schema_version":1,"namespace":"main","address":"0x080d59b0","status":"measured-draft","owner_bytes":664,"score":{"measured":"2026-08-27","candidate_bytes":664,"reference_bytes":664,"differing_halfwords":277,"wrong_instructions":268,"class":"wrong","note":"Fifth pass: fixed the same sign-extension bug already fixed on 080dc1ec and 080d82b0: `bounced = (bounced + ((u32) bounced >> 31)) >> 1` was compiling to a logical `lsrs` instead of the reference's arithmetic `asrs`, because the `(u32)` cast forces the sum unsigned. Cast the sign-bit term back to `(s32)` before the addition. Traced the mechanism precisely via objdump on the cached candidate .elf: this compiler's conditional-constant-propagation proves `accumulator == 0` from the guarding `if` and forward-substitutes it into `bounced`'s formula, so the wrong promotion produced a stray literal-pool constant 0x7FFFF000 instead of the correct 0xFFFFF000, costing 4 bytes and 2 wrong instructions. Grepped the whole file for the same `(u32) ... >>` pattern and found no other instances. candidate-show: differing_halfwords 281 -> 277, wrong_instructions 271 -> 268, and candidate size is now byte-count-exact (664 == 664). Re-verified the trampoline-call fix with --align: both indirect calls (callback_a/callback_b) now reproduce the reference's exact stage-to-stack/reload/branch shape one-for-one, only register-letter and stack-offset differences remain (both downstream of the fp/r9 issue below). Re-tried the dominant open residual (work in fp here, r9 in the reference) with three declaration-order/scope variants (facing declared first, facing given block scope, reversing all pointer-local declaration order), each tried both before and after the bounced-cast fix (six compiles total): all were either byte-identical to baseline or a small regression, work stayed in fp every time. Also tried introducing a named `old_accumulator` local specifically to defeat the constant-fold mechanism -- it didn't change the fold (this compiler traces the linear relation through the branch regardless of whether the value is a reloaded field or a distinct local) and cost real register pressure, so reverted. Confirms this remains genuinely open, not source-shape-controllable from this angle; not pursued further per the ban on forcing register assignment. Still not exact. Fourth pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27b":"Fourth pass: fixed the same 'Func_080072f4 is not a real function' modeling error found and fully derived in games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note (full derivation there: it is the r4 entry of the _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s, so both calls were really indirect through the function pointer in r4 -- exactly the callback_a/callback_b values this owner's own third pass had just correctly identified and hoisted, one prologue insight short of the full picture). Rewrote both call sites as `callback_a(draw_destination, (void*)((kind<<10)+(s32)work), ..., 32, 32)` / `callback_b(draw_destination, (void*)((kind<<10)+(s32)work-0x1000), ..., 32, 32)` matching DrawRectangleFn's real 6-argument signature, and removed the fictional `void Func_080072f4(s32,s32,s32,s32,DrawRectangleFn,s32,s32)` prototype. wrong_instructions dropped (278->271) while differing_halfwords rose slightly (277->281) and candidate_bytes grew slightly (656->668, now on the correct side of the 664 target) -- the same 'small metric regression traded for real correctness' pattern seen on 080dc1ec/080d82b0, not a reason to revert. Still not exact. Third pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27":"Third pass, evidence-grounded against games/gs1/asm/080d59b0.s directly (not a permutation search). Confirmed from the retained assembly that the reference prologue does use `ldmia r3!, {r1}` (bytes 0x0e-0x1e: `ldr r6,[pc,#92]; adds r3,r6,#0; ldmia r3!,{r1}; ldr r3,[r3,#0]; ...; mov r9,r1; add r3,r9`), so applied the raw `void **` cursor idiom already proved in the adopted member_orbit/run.c and in 080e01e4.c: `heap_cache = (void **)0x03001EEC; cursor = heap_cache; work = *cursor++; draw_destination = *cursor;`. This alone regressed the score (286->307) because it left `heap_cache` unused after the initial reads while the reference keeps r6 (holding 0x03001EEC) alive and reuses it: `ldr r2,[r6,#28]` and `ldr r6,[r6,#32]` read the two DrawRectangleFn pointers at 0x03001F08/0x03001F0C as `heap_cache[7]`/`heap_cache[8]` rather than through fresh pc-relative literal-pool loads of those fixed addresses. Rewriting the two `*(DrawRectangleFn*)0x03001Fxx` reads as `heap_cache[7]`/`heap_cache[8]`, hoisted into two named locals `callback_a`/`callback_b` at the exact reference positions -- `callback_a` read between the two `Func_080ed408` calls (matching `ldr r2,[r6,#28]` immediately after the first call), `callback_b` read after the second call and before the 32-entry sprite-pool loop (matching the `.L0:`-label `ldr r6,[r6,#32]`) -- dropped differing_halfwords from 307 to 277, better than both the pre-cursor baseline (286) and the naive cursor-only attempt (307). This differs from this dossier's own previously-rejected callback-hoist experiment in two ways confirmed against the .s file: the reference genuinely does hoist-and-stack-spill both callback reads early (`str r2,[sp,#12]` / `str r6,[sp,#16]`), so hoisting itself is correct; what the earlier attempt got wrong was reading them via fresh fixed-address casts (forcing new pc-relative literal loads) instead of heap_cache-relative indexing off the still-live r6, and hoisting both together after the second Func_080ed408 call instead of interleaved individually between/after the two calls as the reference actually schedules them."},"family":{"assigned_template_owner":"main:08099160","assigned_template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Read in full before drafting. The assigned template does not structurally match this owner: RunOrbitingParticleEffect has no shared callees with this owner at all (no Object_Spawn, WaitFrames-by-that-name, RotateVectorByMagnitude, Random16, or Audio_PlayCue call sites appear here), and its 15-iteration random-orbit spawn loop bears no resemblance to this owner's 32-entry sprite-pool initializer plus 148-frame bounce-physics/member-portrait loop. n-gram/call-target clustering likely grouped this owner with the template purely on generic shape (push r5-r9+fp/lr prologue, several do-while counters, many bl sites), not genuine source-shape kinship.","actual_sibling_evidence":"This owner's real callee set and constants match games/gs1/recon/en/main/080e7404.c (dossier games/gs1/recon/en/dossiers.json#main:080e7404) far more closely: identical Func_080cd594(mode)/Func_080e0524(id,work,f,f)/Func_080ed408(id,a,b,c,d)/Func_080041d8(cb,interval)/Func_08004278(cb)/Func_08002dd8(id)/Func_080cdbc0() call shapes, the exact same finish-callback pointer 0x080CD261 with the exact same 0x480-frame interval, the same hardware writes to 0x04000020 (BG2PA=0x100) and 0x04000050 (BLDCNT), and the same work-struct field offsets 0x7780/0x7784/0x7824/0x7828 relative to the shared *(void**)0x03001EEC base pointer. This owner and its three siblings (080d82b0, 080dc1ec, 080e01e4, also assigned to me) plus 080e7404 all appear to be members of one 'battle presentation sub-effect' family keyed off that same 0x03001eec work block, not the orbiting_particles family. A future recovery pass on this subsystem (a small header capturing the work-block layout and the Func_080e0524/Func_080ed408/Func_080041d8/Func_080072f4 signatures) would likely help all five owners at once."},"rejected_experiments":["Struct-typed single read of the two leading 0x03001EEC/0x03001EF0 globals (hoping to reproduce the reference's ldmia r3!,{r1} load-multiple prologue): compiled to two ordinary back-to-back ldr instructions instead of ldmia and regressed differing_halfwords from 281 to 317; reverted to two independent raw-pointer dereferences.","Hoisting the two function-pointer reads at 0x03001F08/0x03001F0C (draw_rectangle/alt_draw_rectangle) into named locals read once right after the two Func_080ed408 calls, matching the reference's own early read+stack-spill of these values: this is structurally what the reference does (str to sp+12/sp+16, later reload), but declaring them as ordinary C locals kept them live across the entire 148-frame outer loop in this compiler's allocator and regressed the score (281->309); reverted to inline point-of-use dereferences of the fixed addresses, which the compiler happened to schedule closer to the reference's own load sites.","Applying the void** cursor idiom (`cursor = heap_cache; work = *cursor++; draw_destination = *cursor;`) alone, still reading the two DrawRectangleFn pointers via fresh `*(DrawRectangleFn*)0x03001Fxx` casts: regressed 286->307 because it discarded `heap_cache` after the initial reads instead of reusing it (as the reference's r6 does) for the two later offset reads. Superseded by heap_cache[7]/heap_cache[8] indexing (see score.note); the cursor idiom itself was correct evidence, only the surrounding source shape needed to keep heap_cache alive too."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080d59b0.s), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c and its dossier (byte-exact-verified sibling with strong field/signature overlap), in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect. Seeds a 32-entry sprite-record pool at 0x02010000 with randomized initial falling parameters, opens two display windows (ids 46 and 47), then runs 148 frames. Each frame conditionally walks the active work-target's member list (drawing/positioning each member's portrait via Func_08004cb4 and occasionally cueing Func_080d6888), then integrates simple bounce physics (gravity accumulator, velocity, halved rebound damping) over the first 12 sprite records and draws each active one through one of two rectangle-callback function pointers selected by a phase-derived 0-7 'kind' value, alternating draw target by whether kind is 0-3 or 4-7.","The 'wrong' class and the 277/278 residual are now dominated by two specific, already cross-family-documented open compiler questions rather than an unrecovered source shape: (1) the reference keeps `work` in r9 for the whole function, but this compiler keeps choosing fp for it in this owner; tracing the .s file shows this is not cosmetic -- `facing` (`*(s32*)0x03001E80`, re-read once per outer-loop iteration) lives in fp for the reference's entire 148-frame loop body (never spilled), which is only possible because r9, not fp, holds `work` there. In this candidate, since `work` occupies fp, `facing` has no free callee-saved register left and gets spilled to sp+20 every iteration instead, which is most of the remaining 12-byte (3-word) frame-size gap (52 vs the reference's 40) and its knock-on pool/offset churn. 080dc1ec.json's rejected experiments already showed this compiler's fp/r9 choice is insensitive to declaration order and block scope for this same shared work-block idiom, so this was not re-attempted here as a blind lever. (2) `Func_080072f4`'s 5th argument (`callback`, a `DrawRectangleFn`) is passed through r4 in the reference rather than the stack slot ordinary APCS would use for a 5th word argument; 080dc1ec.json's rejected experiments already confirmed no adopted sibling source anywhere in games/gs1/src/ calls Func_080072f4 directly with 7 literal arguments and reproduces this, making it a genuinely unprecedented, unresolved calling-convention question, not something to guess at here. Because this candidate instead passes callback+w+h all through the stack, the compiler's own cross-jump optimizer merges the tail of the two Func_080072f4 call sites (kind<=3 vs kind>3) into shared code, which the reference's r4-argument version apparently does not do (its two call sites stay fully separate in the .s file) -- another visible symptom of the same open question rather than a new, independently fixable defect.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080d5c48":{"family":"template-main-080d9fc8","template_owner":"main:080d9fc8","template_source":"games/gs1/src/battle/effects/puff_arc/run.c","candidate_path":"games/gs1/recon/en/main/080d5c48.c","reference_bytes":524,"best_candidate_bytes":520,"best_differing_halfwords":146,"best_wrong_instructions":144,"status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","notes":["The family-matcher's template (puff_arc/run.c, 644 bytes, score 7658/10000) is thematically related -- both read the kind-39/40 Data_03001e50 work-block cache, republish the caller's Efx pointer at work+0x7828, and use the kind-46 rectangle blitter cached at Data_03001e50[46] -- but this owner (524 bytes) is a materially different, simpler variant, confirmed by reading games/gs1/asm/080d5c48.s and out/family-transplants/main-080d5c48/m2c/target.canonical.s directly rather than adapting the template's control flow: (1) no sine/cosine arc placement at all -- there are zero calls to the trig helpers (Func_08002322/Func_0800231c) anywhere in the retained bytes; (2) the puff array (work+0x7080, same 28-byte Puff layout as the template) is only ever touched at its ->tick field, which this owner randomizes with `Func_08004458() & 63` for WORK_EFX->cnt entries instead of seeding x/y/tick from a fixed 9-puff arc; (3) it sets BG2PA=0x100 and BLDCNT=0 (0x04000020/0x04000050) instead of the template's alpha-blend registers (0x04000050/0x04000052=0x3F46/0x100E), and conditionally sets BG2X=-0x7000 (-112.0 in the 20.8 format, i.e. exactly the same -112 pixel offset later applied to sprite x) when WORK_EFX->side==1 -- the same side/BG2X motif already documented in games/gs1/src/battle/effects/member_orbit/run.c's y_offset/BG2X pair; (4) the per-actor draw is a two-layer icon popup, not a layered cell sprite: a fixed 16x20 sprite at work+0x6C0 for the window [i*16, i*16+72) frames (using a position from Func_080e396c, i.e. EffectPosition_ApplyStepAndYOffset per games/gs1/include/types.h and games/gs1/src/effects/position/apply_step_and_y_offset.c, whose own body already applies one -16 y-offset -- this owner's caller applies a second, independent -16 on top for its own second draw), plus a 16x12 animated marker cycling through 9 cels of 192 bytes (indexed via Func_080022ec=FixedPoint_Ratio and Func_080022fc=Modulo per games/gs1/include/types.h) that keeps drawing at the same position for every frame at or after i*16, with no upper bound; (5) total animation length is (WORK_EFX->cnt+1)*32 frames (a natural `while (frame != (cnt<<5)+32)` loop), not the template's fixed 80.","The draw calls (`bl 0x08007300`) are the r7 slot of the games/gs1/asm/080072e4.s _call_via_rN trampoline (0x08007300 = 0x080072e4 + 4*7), the same indirect-call idiom the template documents for its own DrawRectangle calls one register over (r4 there). Modeled as `draw = (DrawRectangle)entry[6]; ...; draw(dst, src, x, y, w, h);` through a genuinely traced function-pointer local (Data_03001e50[46], fetched via entry[6] since `entry` already points at &Data_03001e50[40] and 40+6=46), never as a direct call to a fictional Func_08007300.","Call signatures for the four functions not used by the template were pulled from already-adopted, non-asm sibling sources rather than guessed: Func_08004458 (u32, no args) from games/gs1/src/battle/effects/run_effect15.c and games/gs1/recon/en/main/080e01e4.c; Func_080022ec/Func_080022fc (s32,s32)->s32 from games/gs1/src/display/blend/update_transition.c and games/gs1/src/menu/select_quantity.c (also aliased FixedPoint_Ratio/Modulo in games/gs1/include/types.h); Func_080e396c(s32, struct EffectPosition *) from games/gs1/include/effect_step.h and games/gs1/src/effects/position/apply_step_and_y_offset.c (EffectPosition_ApplyStepAndYOffset), whose struct EffectPosition {s32 x; s32 y;} is reused directly rather than re-declaring an owner-local position type.","The cache read at function entry is reversed from the template's entry++ order: this owner computes `entry = (u32 *)(Data_03001e50 + 40*4)` (pool literal 0x03001ef0) and reads `dst = *entry` before `work = *(entry-1)`, i.e. it reads the kind-40 slot first and the kind-39 slot second, opposite the template's cache=&[39]; work=*entry++; dst=*entry. Confirmed against the retained pool words (0x03001ef0=&Data_03001e50[40], 0x00007828=WORK_EFX offset) and reused later for the draw-pointer fetch via `entry[6]` (matching the retained `ldr r7,[r7,#24]`, since r7 is never redefined between the initial load and that point) instead of recomputing a second `cache=&[39]` as the template does.","Two rounds of structural fixing measured real gains before the residual plateaued: (a) modeling the cache read via the single reused `entry` pointer (dst=*entry; work=*(entry-1); later draw=entry[6]) instead of a template-style separate cache variable, and (b) capturing the pre-decrement y value in an explicit `old_y` local (`old_y = pos.y; pos.y = old_y - 16; draw(..., old_y - 20, ...)`) instead of computing the first draw's y argument after the -16 store, matching the reference's read-old-value-before-store instruction order. Together these took the first working draft from differing_halfwords=164 (candidate 516) to the current 146 (candidate 520); reference is 524 bytes.","The remaining 144 wrong instructions are essentially one root cause cascading through the rest of the function, not many independent bugs: this candidate's frame is 28 bytes (sub sp, #28) versus the reference's 36, and within the per-actor inner loop this candidate keeps the second loop's `cur` (Puff*) pointer resident in a register across the whole loop while spilling the &WORK_EFX address to a stack slot, whereas the reference does the exact opposite (keeps &WORK_EFX in fp/r11 across the loop, spills `cur` to sp+8) -- despite my C source placing the `cur = (Puff *)(work + 0x7080);` statement in exactly the same per-outer-iteration position the reference's own assembly computes it (immediately after the inner loop's cnt!=0 guard, not hoisted), confirmed by re-reading the reference trace line-by-line: the reference's `movs r0,#225; lsls r0,r0,#7; add r0,r8` (cur-init) and `mov fp,r2` (&WORK_EFX cache) both sit exactly where this candidate's C statement is textually written. Every subsequent register name and literal-pool offset in the aligned diff differs only by this same register-role swap and the resulting 8-byte frame-size shift, not by any different algorithm, call, or field access -- matched_prefix=9 and the entire early prologue, the cache-read block, the affine/blend register writes, the side-dependent BG2X store, the Func_080ed408/Func_080041d8 setup, and the tick-randomization loop are already byte-identical.","Experiments tried against this specific residual, all either no-ops or regressions (kept the better/no-op baseline in every case, never adopted a regression): merging the tick loop's `puff` and the draw loop's `cur` into one reused variable (worse: 154 dh/160 wi, candidate grew to 520 with a different bad shape); introducing an explicit `struct EffectPosition *ppos = &pos;` pointer local instead of accessing `pos.x`/`pos.y` directly (no change, 146/144); reordering the four independent statements around the draw-pointer fetch (`*(work+0x7780)=1; *(work+0x7784)=0; draw=entry[6]; Func_080041d8(...)`) -- brute-forced all 24 orderings via candidate-show and confirmed the current order is already the unique best (next-best regresses to 151); six different local-declaration orders (reverse, scalars-first, pos-early, cur-before-puff, work/dst/entry-first, old_y-first) -- five were no-ops, one (full reverse) regressed by one halfword; `cur = puff - WORK_EFX->cnt` instead of recomputing `work+0x7080` fresh (regressed sharply: 195 dh/192 wi, candidate grew to 528); an explicit cached `Efx **e = (Efx **)(work+0x7828)` local for the inner loop's WORK_EFX-> accesses (regressed: 173 dh/190 wi, though candidate size coincidentally hit 524); rewriting `cur` as a raw `u8 *` with manual `+28`/`+24` byte arithmetic instead of a typed `Puff *` (byte-identical output, 146/144); folding the third guard-clause's `if (frame < base) {cur++; continue;}` into a positive-form `if (frame >= base) {...}` wrapping the second draw (byte-identical output -- kept the positive form since it reads more naturally and scores identically); alternate loop-bound spellings `(cnt<<5)+32` vs `(cnt+1)*32` (byte-identical, as expected for a power-of-2 constant). This is the same register-allocation/CSE role-assignment residual class documented on other owners this session (e.g. games/gs1/recon/en/dossiers.json#main:080c0cec's fp/r7/r2 reassignment, 080bad7c.json's r1/r3 swap) -- no further per-owner respelling search is justified without attacking the shared compiler-internal tie-break directly.","2026-08-31 retained-assembly proof: the complete candidate accounts for every reference call, argument, trampoline target, affine/blend write, loop, field access, constant, and memory operation. The residual is confined to GCC's 28-byte frame and callee-saved cur carrier versus the reference's 36-byte frame, fp-resident WORK_EFX address, and equivalent sp+8 cur spill, with the resulting register/pool displacement. More than fifty bounded pointer, loop, guard, cache, type, declaration-order, evaluation-order, compiler-family, and scheduling variants preserve this choice or regress. Relocation-normalized cross-edition verification proves all 410 core bytes identical across all six GS1 editions (16 relocations and 12 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","Further respelling round (measured=2026-08-29, 25 additional scored variants against candidate-show --align --first, baseline 146 dh/144 wi/520 bytes unchanged at the end): all either no-ops or regressions, none adopted. No-ops (byte-identical, 146/144): i/base/frame declared u32 instead of s32; `base = i * 16` vs `i << 4`; `(WORK_EFX->cnt + 1) << 5` vs `(cnt << 5) + 32`; combining the two early-continue guards into one `||` condition; `entry[6]` vs `*(entry + 6)`; `entry = (u32*)&Data_03001e50[40*4]` vs pointer-arithmetic cast; `work = (u8*)entry[-1]` vs `*(entry - 1)`; splitting the cel computation into two statements; `pos.y -= 16` vs `pos.y = old_y - 16`; using `pos.y - 4` instead of a fresh `old_y - 20` for the first draw's y arg; reordering the outer while-loop as an equivalent for-loop; six more declaration-order permutations (pos-before-old_y, cel-after-old_y, base-before-frame). Regressions (all reverted): `frame - base >= 72` instead of `frame >= base + 72` (188 dh); moving the `Func_080f9010(143)` check after the `frame < base` guard (150 dh); wrapping the whole per-actor body in one positive `frame >= base && frame < base + 72` (257 dh, grew to 536 bytes); caching `WORK_EFX->side` into a function-scope `side` local (222 dh); caching `WORK_EFX->cnt` into a single `cnt` local reused by both loops (194 dh, candidate shrank to 496); an inner `while` loop with manual `i++` instead of `for` (160 dh, grew to 524 bytes); caching `Efx *e = WORK_EFX` scoped to just the inner loop body (184 dh, 516 bytes); caching `pos.x - 8` into a `px` local reused by both draws (199 dh, grew to 536 bytes); rewriting the tick-randomization loop and read as `puff[i].tick` array indexing instead of pointer increment (162 dh). This confirms the dossier's prior conclusion: the residual 144 wrong instructions are a single compiler-internal register-allocation/CSE tie-break (which of &WORK_EFX vs `cur` stays in a callee-saved register across the inner loop, plus the resulting 8-byte frame-size shift), not reachable by any C89 source-level respelling tried so far. No further per-owner respelling search is justified.","Recovered only from retained owner assembly (games/gs1/asm/080d5c48.s and the m2c-assisted out/family-transplants/main-080d5c48/ workspace's target.canonical.s/symbolized.s), the approved local ROM, the assigned template games/gs1/src/battle/effects/puff_arc/run.c, the already-adopted siblings games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/effects/position/apply_step_and_y_offset.c, games/gs1/include/types.h and games/gs1/include/effect_step.h, and the approved compiler via tools/compiler candidate-show. Did not read any other Golden Sun decompilation project or the output of the two sibling agents independently recovering main:080ccc38 and main:080cb4ec from the same template this session."]},"main:080d765c":{"schema_version":1,"namespace":"main","address":"0x080d765c","status":"mapped","measured":"2026-08-29","map":{"head":"0x080d765c","head_symbol":"FunctionHead_080d765c","head_file":"games/gs1/asm/080d765c.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; (sub sp follows) -- full r8-r11 save.","true_epilogue":{"file":"games/gs1/asm/080d8258.s","note":"Ends `... movs r0,#47 / bl sub_08002dd8 / movs r0,#46 / bl sub_08002dd8 / bl sub_080cdbc0 / add sp, #332 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. 332-byte frame, four-high-register restore, same sub_08002dd8/sub_080cdbc0 cleanup idiom as the sibling functions in this dossier batch. This is the sole real epilogue."},"span":{"start":"0x080d765c","end_exclusive":"0x080d82b0","size_bytes":3156,"derivation":"end = start of next asm file games/gs1/asm/080d82b0.s, immediately following 080d8258.s which owns the epilogue. size = 0x080d82b0 - 0x080d765c = 0xc54 = 3156."},"member_regions_in_order":[{"addr":"0x080d765c","symbol":"FunctionHead_080d765c","file":"games/gs1/asm/080d765c.s","role":"real prologue + setup, in-file literal pool, tail branches to Continuation_080d76f0"},{"addr":"0x080d76f0","symbol":"Continuation_080d76f0","file":"games/gs1/asm/080d76f0.s","role":"branch continuation, in-file literal pool, tail branches to sub_080d77b4"},{"addr":"0x080d77b4","symbol":"Region_080d77b4","file":"games/gs1/asm/080d77b4.s","role":"call-graph-reached prologue-less region, code+data mixed; not separately marked with a fragment comment but reached only by the preceding region's tail branch and itself prologue-less"},{"addr":"0x080d7c08","symbol":"Region_080d7c08","file":"games/gs1/asm/080d7c08.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080d7ea0","symbol":"Region_080d7ea0","file":"games/gs1/asm/080d7ea0.s","role":"call-graph-reached prologue-less region, branches conditionally (`bhi`) to sub_080d8258"},{"addr":"0x080d8258","symbol":"Fragment_080d8258","file":"games/gs1/asm/080d8258.s","role":"terminal fragment carrying the parent's stack frame/high registers (header: '\u89aa\u95a2\u6570\u306e\u30b9\u30bf\u30c3\u30af\u67a0\u3068\u9ad8\u4f4d\u30ec\u30b8\u30b9\u30bf\u3092\u5f15\u304d\u7d99\u3050\u7d42\u7aef\u65ad\u7247'), ending in the real, shared epilogue"}]},"domain_evidence":["080d8258's own header comment explicitly identifies it as the terminal fragment inheriting the parent function's stack frame and high registers -- direct textual confirmation.","080d77b4/080d7c08/080d7ea0 are tagged with the 'call-graph reconstructed, code+data mixed, byte-verified by build_asm.ts' comment and are each reached only via a plain `b` from the previous region with no intervening prologue -- the prologue-less-region-reached-by-plain-branch shape named in CONTRIBUTING.md's Split functions section.","The sub_08002dd8(x2)/sub_080cdbc0 cleanup sequence immediately before frame teardown matches the same idiom independently confirmed in 080ec100, 080e15e8, and 080d0ee0's chain, reinforcing that this cleanup call pair is a common per-call finalizer shared across this whole family of large split functions."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080d765c.c --owner 080d765c --size 3156","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited."]},"main:080d82b0":{"schema_version":1,"namespace":"main","address":"0x080d82b0","status":"measured-draft","owner_bytes":800,"score":{"measured":"2026-08-27","candidate_bytes":784,"reference_bytes":800,"differing_halfwords":353,"wrong_instructions":272,"class":"wrong","note":"Fourth pass: found a second instance of the sign-extension bug already fixed on 080dc1ec (`Func_080dc1ec's half = (raw + ((u32) raw >> 31)) >> 1` compiling to logical `lsrs` instead of the reference's arithmetic `asrs`). Both `half = (raw + ((u32) raw >> 31)) >> 1` (in the draw block) and an equivalent unsigned-cast rounding expression for `result0`/sp44_ptr[1] were emitting a spurious extra `lsrs` instruction the reference does not have. Re-reading the reference's actual asrs/lsrs-by-31/adds triplet: it is GCC's textbook lowering of plain SIGNED integer division by 2, not a hand-rolled round-toward-zero bit-trick -- the `(u32)` cast was never needed. Simplified both to plain `/ 2` (`result0 = result0 / 2;` and `half = idx / 2;`); confirmed via --align that both sites now emit the reference's exact 3-instruction sequence bit-for-bit. wrong_instructions 276 -> 272, differing_halfwords unchanged (353). Bounded, evidence-grounded re-tries of the two open register-allocation residuals (declaration-order swaps for extra_target/draw_rectangle_fn and for pool_cursor/pool_index; named-temporary reordering for Func_080ed408's five arguments) all no-op'd or regressed and were reverted -- confirms both remain genuinely open, not source-shape-controllable from this angle. Still not exact. Third pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27b":"Third pass: fixed the same 'Func_080072f4 is not a real function' modeling error found and fully derived in games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note (full derivation there: it is the r4 entry of the _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s, so the call was really indirect through the function pointer in r4). Rewrote this owner's one call site as `draw_rectangle_fn(draw_destination, (u8*)extra_target+Data_080ede48[raw], y, h, idx, idx*2)` matching DrawRectangleFn's real 6-argument signature, and removed the fictional `void Func_080072f4(s32,s32,s32,s32,DrawRectangleFn,s32,s32)` prototype. wrong_instructions dropped sharply (324->276) while differing_halfwords rose slightly (347->353) and candidate_bytes shrank (788->784) -- the same 'small metric regression traded for real correctness' pattern seen on 080dc1ec/080d59b0, not a reason to revert; 080e01e4 improved cleanly on both metrics instead. Still not exact. Second pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27":"Second pass, evidence-guided from three siblings closed/advanced this session (080d9fc8, 080ce85c, 080dc1ec, 080e01e4). Moved from candidate=792/dh=363/class=unemittable to candidate=788/dh=347/class=wrong. Three structural fixes applied and confirmed by re-scoring after each: (1) the work/draw_destination/extra_target prologue reads reshaped into the cursor-advance idiom (heap_cache=(void**)0x03001EEC; cursor=heap_cache; work=*cursor++; draw_destination=*cursor; extra_target=heap_cache[2];) established by 080e01e4, which reproduced the reference's ldmia r3!,{r1} exactly; (2) discovered and applied a NEW idiom this owner's own evidence surfaces: heap_cache (r5) stays live across the entire prologue and is reused, not just for the three cursor-adjacent reads, but for two more offset-relative reads -- facing = *(s32*)((u8*)heap_cache-108) (0x03001E80) and draw_rectangle_fn = *(DrawRectangleFn*)((u8*)heap_cache+28) (0x03001F08) -- both of which the reference computes as heap_cache+/-imm rather than fresh literal-pool loads, confirmed by the ldr r5,[r5,#28] at asm line 52 reusing the same r5 loaded at line 15; (3) removed the target_slot local entirely (it was materializing (u8*)work+0x7828 once into a persistent variable/register/stack-slot), replacing every one of its dereferences with a fresh M2C_FIELD(work, void**, 0x7828) at each use site -- this let the compiler's own address-mode selection reproduce several of the reference's fused register-offset loads (ldr r3,[r1,r2]) instead of the candidate's previous separate adds+ldr pairs, and was the single largest contributor to the dh improvement (365->347 alone). Remaining divergence is concentrated in fine-grained register allocation inside the two large loops (which physical register holds the sp44/sp32 pointers -- reference keeps them in r9/sl for the whole outer do-while, candidate's build sometimes drops one to r8 or a stack reload) and in list-scheduling order of independent immediate-load instructions (e.g. Func_080ed408's r0..r3 argument movs are scheduled r1,r2,r3,r0 in the reference vs r0,r1,r2,r3 in the candidate) -- both read as instances of the same open, compiler-internal, non-source-shape-controllable class of residual already flagged across this family, not new unknowns."},"family":{"assigned_template_owner":"main:08099160","assigned_template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Same mismatch as 080d59b0: this owner shares no callees with RunOrbitingParticleEffect (no Object_Spawn/WaitFrames/RotateVectorByMagnitude/Random16/Audio_PlayCue) and its own control flow (per-member confetti physics over a shared 1024-slot pool, driven by an outer loop that runs member_count*20+56 times) bears no resemblance to the template's fixed 15-iteration orbit-spawn loop. The n-gram/call-target clustering evidently matched on generic register-shuffle-prologue and do-while shape, not real kinship.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404 and 080d59b0.json: same Func_080cd594(mode)/Func_080ed408(id,a,b,c,d)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() shape, the same *(void**)0x03001EEC/0x03001EF0 work/draw_destination globals reshaped this pass into the heap_cache cursor-advance idiom shared with 080e01e4, and the same *(DrawRectangleFn*)0x03001F08 callback global -- this pass discovered it is itself heap_cache+28, not an independent literal, mirroring facing at heap_cache-108. Also confirmed the family-wide Func_080072f4(dest,src,x,y,callback,w,h) 7-argument shape with the callback (5th arg) landing in r4 rather than on the stack, matching the still-open r4-5th-argument question from 080dc1ec/080e01e4."},"rejected_experiments":["None run beyond the single evidence-guided structural pass; given 080d59b0's finding that hoisting a fixed-address function-pointer read into an early local can regress the score by extending its live range across a huge loop, this owner's own draw_rectangle_fn read was deliberately kept as an early local (matching the reference's own str-to-stack-then-reload-much-later shape at sp+20) rather than tested both ways, for time; a follow-up pass should try both placements here the way 080d59b0's dossier did.","Rewriting the second main loop's Data_080ede48[raw] array subscript as Data_080ede48[idx-1] (idx=raw+1), to try to nudge the compiler into the reference's own idx*2-2 strength-reduced index computation (the reference computes the u16 byte offset as 'idx*2 - 2' reusing the already-materialized idx*2 value needed for the 7th call argument, rather than a fresh raw*2): regressed the score (candidate grew from 788 to 808 bytes, dh 347->367). Reverted. The reference's strength reduction appears to be an internal GVN/value-numbering choice this compiler build does not make from the algebraically equivalent source form either way.","Swapping the declaration order of sp44_ptr/sp32_ptr (sp32_ptr declared before sp44_ptr) to see if it changed which one the register allocator keeps in r9 vs sl/r8 for the whole outer member-seed loop: no effect on the score (identical candidate=788/dh=347). Reverted to the more readable order."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080d82b0.s), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, games/gs1/src/battle/effects/puff_arc/run.c, games/gs1/src/battle/effects/member_orbit/run.c, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a bigger battle-presentation sub-effect than 080d59b0. Opens one display window (id 46), copies a palette/tile block through a generic word-copy helper (Func_080072f0 taking the 0x03001388 word-copy routine as a callback argument, matching the WordCopy idiom already established in 080e7404.c), then blanks a 1024-slot shared confetti pool at 0x02010000 (laid out as up to 8 members x 128 slots, 28 bytes each, matching the stride already established in 080d59b0). For each active party member it seeds that member's 128-slot sub-range with randomized polar-coordinate confetti (Func_08002322/Func_0800231c sine/cosine calls) around a position derived from Func_080e3944. The main loop then runs member_count*20+56 times: near the start of each member's staggered window it cues a portrait-swap sound and Func_080d6888, then for every later pass it advances and redraws that member's confetti slots through Func_080072f4/Func_080e3908, expiring slots whose lifetime field crosses a threshold.","New this pass: heap_cache (the *(void**)0x03001EEC-derived pointer, kept in r5 across the whole prologue in the reference) is reused for FOUR distinct derived reads, not just the two/three previously modeled -- cursor-advance for work/draw_destination, heap_cache[2] for extra_target, heap_cache-108 for facing, and heap_cache+28 for draw_rectangle_fn. This is a stronger, more general version of the 'shared work-block header' idea already flagged for promotion in 080d82b0's own prior pass and 080e01e4's dossier; worth folding into a shared header/idiom note for the whole 0x03001eec family rather than re-deriving per owner.","New this pass: materializing an intermediate 'target_slot = (void**)((u8*)work+0x7828)' pointer variable, even when duplicated verbatim at each use site to avoid apparent aliasing, gets silently CSE'd/hoisted by this compiler across the whole extended block (including across the branch into the loop body), producing an extra stack spill/reload of the address that the reference does not have. Writing every access as a fresh M2C_FIELD(work, void**, 0x7828) expression instead (never assigning the intermediate address to its own named variable) avoided the CSE and let the compiler's native register-offset addressing selection reproduce more of the reference's instruction shapes. This is a stronger, more general lesson than 080e01e4's 'DrawRectangleFn[2] split' note and likely explains part of why 080d59b0 and 080dc1ec still carry unresolved dh -- worth checking both for an equivalent persistent-slot-pointer local that could be inlined away the same way.","Two open, evidence-backed questions carried over from 080d59b0/080dc1ec/080e01e4 and not resolved here either: why this compiler passes what looks like a 5th call argument through r4 (reconfirmed again at this owner's own Func_080072f4 site, with the w/h arguments on the stack beyond it), and why the reference keeps the shared work pointer in r9 while this compiler's candidate keeps choosing a different register for it in places. A third, related but distinct residual observed for the first time here: even after matching the source shape, the register allocator's choice of WHICH high register (r8/r9/sl/fp) holds which loop-invariant local address across a large loop body does not always match the reference's choice, and the scheduler's order for a run of independent immediate-load instructions feeding a single call (e.g. Func_080ed408's four register arguments) does not always match the reference's order either, even though the values, registers, and net effect are all otherwise identical. Both read as compiler-internal list-scheduling/register-allocation heuristics rather than anything expressible as a source-shape difference; not chased further this pass per the project's guidance against open-ended permutation search.","One nearly-tautological reference conditional was preserved literally rather than simplified: `if (member_count * 20 != -56) ...` gates the whole main loop and is true for every realistic non-negative member_count, but the reference genuinely computes it that way (count<<2 + count, then <<2 again, compared to -56), so it is kept as literal arithmetic rather than rewritten to `if (member_count != 0)` or similar, since the point is to reproduce the compiled shape, not simplify the source.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080d85d0":{"schema_version":1,"namespace":"main","address":"0x080d85d0","status":"measured-draft","owner_bytes":888,"score":{"measured":"2026-08-27","candidate_bytes":920,"reference_bytes":888,"differing_halfwords":448,"wrong_instructions":382,"class":"wrong","note":"First pass, drafted fresh (a prior wave's attempt on this owner left no salvageable source). The family-matcher's assigned template (main:080ce85c / games/gs1/src/battle/effects/member_orbit/run.c, score 8317/10000) is a real structural relative but not a resize: this owner adds a member-scaled particle-cloud pool at 0x02010000 that member_orbit/run.c does not have at all. Read games/gs1/asm/080d85d0.s directly (byte offsets cross-checked against out/family-transplants/main-080d85d0/m2c/target.lst's resolved literal-pool addresses) and modeled it as two phases against the already-measured 0x03001eec 'battle work' siblings 080e7404.c, 080d59b0.c, 080d82b0.c and 080dc1ec.c: (1) a one-time setup that, per party member, seeds 128 particles at that member's rest position (member_ptr offsets 8/12/16, field 12 biased by Func_080b5070(member_id)/2) with a random 0xFF-masked <<10 outward kick on the three velocity fields and resets the shared 1024-slot pool at 0x02010018 to -1 first (080d82b0.c's own pool_cursor/pool_index do{}while(pool_index!=1024) idiom, reused verbatim); (2) a member_count*20+72-pass frame loop that tracks a single member (state offset 8, not the offset-36 s16 array used for the per-member stagger trigger) and, per member, staggers a release (fp>stagger) that draws each active particle through the heap_cache[46]-sourced DrawRectangleFn (the 080072f4 call site is the r4 slot of the games/gs1/asm/080072e4.s _call_via_rN trampoline, modeled as a genuine DrawRectangleFn local per this family's established finding, not a fictional Func_080072f4) and, once each particle has aged past stagger+k+10 frames, pulls it toward the tracked member and retires it (particle[6]=-1) once both the x and z deltas fall inside [-0xFFF,0xFFF] -- GCC's textbook unsigned-bias fold of two signed range tests, which only reproduces the reference's two independent `bhi` branches when the two range tests are written as separate nested `if`s rather than one chained `&&` (folding all four terms into one condition made the compiler re-derive the second pair from fresh immediates instead of reusing the fused bias register, costing an extra pool word and 2 wrong_instructions; fixed). Following 080d82b0.json's confirmed evidence, the work+0x7828 state pointer is never assigned to its own local anywhere in this draft -- every read goes through a STATE macro that re-expands M2C_FIELD(work, void**, 0x7828) textually at each use, avoiding the CSE-induced spill that macro's sibling note documents. The two loop-count guards that gate the whole frame loop compare the scaled member count against a negative bias (`* 20 != -72` on entry, `* 20 + 72` recomputed fresh at the tail) rather than a simplified `!= 0`/`bound` local, matching 080d82b0.c's own preserved-literal-arithmetic precedent for the identical idiom. Residual: matched_prefix=7, and reading the rest of the --align diff line by line found no remaining opcode-class mismatch anywhere -- every `!`-marked row is a register substitution or a stack-slot offset shifted by a constant 4 bytes, and every `+`/`-` pair right after is the same operation reordered or given a different destination register. The root cause is visible at the very top: the reference materializes work into r9 once (`mov r9, r1`) and keeps it there for the rest of the function, while this candidate's build spills it to a stack slot (`str r1, [sp, #52]`) immediately after the ldmia and never recovers it, shifting every later stack offset by 4 bytes and cascading into which high register (r8/r9/sl/fp) holds which loop-invariant value throughout both nested loops. This is the same open, confirmed non-source-shape-controllable register-allocation residual already documented in 080d82b0.json ('why the reference keeps the shared work pointer in r9 while this compiler's candidate keeps choosing a different register for it in places') and 080e7404.json; three targeted experiments this pass (moving the object-field boolean read before vs. after the work+0x7828 write, spelling it as `!!x` instead of `x != 0`, and replacing the if/else palette selection with a ternary) each reproduced or failed to move this residual, confirming it rather than finding a new source-shape lever. Not chased further per the project's guidance against open-ended permutation search on a confirmed compiler-internal residual."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher's closest structural template (score 8317/10000): shares the heap_cache=(void**)0x03001EEC prologue idiom, the Func_080cd594/Func_08002f40/Func_080072f0(WordCopyFn)/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 calling shapes, and the work+0x7828 state-pointer field, but the 888 vs. 724-byte gap is real: this owner has only one Func_080ed408 heap allocation (kind 46, not the template's kinds 46+47), no BG2 affine writes, no scanline-table sine sweep, and adds an entire member-scaled particle-cloud subsystem (setup pool reset, per-member particle seeding, per-frame stagger/draw/pull-and-retire) that member_orbit/run.c does not have in any form.","actual_sibling_evidence":"The real kinship is with the 0x02010000/0x02010018 particle-pool siblings already measured this session: games/gs1/recon/en/main/080d82b0.c supplied the exact pool_cursor/pool_index 1024-iteration reset idiom (stride 7 words / 28 bytes, value -1) and the member_id-array read shape (M2C_FIELD(state, s16*, 36+2*member)); games/gs1/recon/en/main/080dc1ec.c supplied the Func_08004458()-masked-and-shifted random particle-field idiom and the Func_080e38b8(particle, n, 0) call shape; games/gs1/recon/en/dossiers.json#main:080e7404's dossier supplied the Value_/Data_03001e50[] absolute-symbol convention (id arguments to Func_080e0524/Func_08002f40 are addresses of single-byte Value_000000XX externs, not immediates, because each is <=255 and would otherwise assemble as a bare movs) confirmed here for Value_00000073/Value_000000b9/Value_000000c0; games/gs1/recon/en/main/080d59b0.c supplied the bare Func_080f9010(142) setup-call placement. No other Golden Sun decompilation project or external source was consulted."},"rejected_experiments":["Moved the M2C_FIELD(object, s32*, 0x18) boolean read to before vs. after the STATE = object field write, to try to match the reference's neg/orrs/lsrs-by-31 deferred-boolean shape (candidate emits an early branch-and-materialize instead): no net improvement (dh 440->453 one way, unchanged the other); reverted to the more natural read-then-write order since neither reproduced the reference's specific codegen choice.","Rewrote `variant = M2C_FIELD(object, s32*, 0x18) != 0` as `variant = !!M2C_FIELD(object, s32*, 0x18)`: byte-for-byte identical candidate (920/448/382); reverted to the more idiomatic `!= 0` spelling since it makes no difference to this compiler's codegen here.","Replaced the if/else palette-id selection with a ternary `Func_08002f40(variant ? (s32)&Value_000000c0 : (s32)&Value_000000b9)`: byte-for-byte identical candidate (920/448/382); reverted to if/else since it reads closer to the reference's actual branch-then-two-loads shape and makes no scoring difference.","Chained all four dx/dz range-check terms into one `&&` condition instead of two nested `if`s: this was the *original* draft shape and cost an extra pool-word reload plus 2 wrong_instructions because the compiler only fused the unsigned-bias bhi form for the first pair, re-deriving the second from fresh immediates; superseded by the nested-if form recorded in the current source, not re-tested after the fix landed."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080d85d0.s), the approved local EN ROM (byte offsets cross-checked via out/family-transplants/main-080d85d0/m2c/target.lst's resolved PC-relative literal-pool addresses), games/gs1/recon/en/main/080e7404.c/.json, 080d59b0.c, 080d82b0.c/.json, 080dc1ec.c and 080e01e4.c, games/gs1/src/battle/effects/member_orbit/run.c, in-repository headers, and the approved compiler. No other Golden Sun decompilation project or external source was consulted.","This candidate claims zero DONE bytes (measured-draft, not exact).","Semantic summary: battle-presentation sub-effect that opens one display window (heap kind 46), copies a 128-word palette/tile block through the generic word-copy trampoline (Func_080072f0 taking the 0x03001388 routine as a trailing callback argument), selects one of two Value_ resource ids for that copy based on whether object's offset-0x18 field is nonzero, then blanks the shared 1024-slot confetti pool at 0x02010000. For each active party member it seeds that member's 128-slot sub-range with particles at the member's rest position plus a random outward kick. The main loop then runs member_count*20+72 times, tracking one member (state offset 8) whose projected motion (Func_080b5098/Func_080b5070) every active particle is later pulled toward; on frame 64 it cues a sound (Func_080b50e8(133)), on frame 40 and again on frame member_count*20+52 it fires Func_080d6888 gate calls, and for each party member whose staggered release frame (member*20) has arrived it cues a portrait/gate call once and then, every later frame, redraws and physically advances that member's still-active particles, retiring each one once it has closed to within +-0xFFF of the tracked member's position on both the x and z axes.","The two structurally distinct Func_080b5098/Func_080b5070/half-value sequences (once per member during setup, once per frame for the single tracked member) are intentionally NOT unified into one helper: the reference computes each independently at its own call site with its own register/stack-slot lifetime, and the setup-phase one reads member_id from the offset-36 s16 array while the frame-loop one reads a single s32 field at offset 8.","Open, non-source-shape-controllable residual (matched against 080d82b0.json's and 080e7404.json's identical prior finding, not re-derived from first principles): the reference keeps the work pointer live in r9 for the whole function; this compiler's build of the same C shape spills it to a stack slot instead, shifting every later stack offset by a constant 4 bytes and cascading into which high register (r8/r9/sl/fp) holds which loop-invariant address inside both nested loops. Read the complete --align diff after every fix in this pass: no remaining row is an opcode-class mismatch, a wrong field offset, or a wrong constant -- every one is a register substitution or an offset-by-4 stack slot, consistent with this single upstream allocation choice rather than a source-shape defect."]},"main:080d89ac":{"schema_version":1,"namespace":"main","address":"0x080d89ac","status":"measured-draft","owner_bytes":2024,"candidate_bytes":2016,"differing_halfwords":961,"wrong_instructions":904,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: replaced two major m2c artifacts with ordinary source constructs established by exact siblings: the 0x03001eec cursor now emits the reference ldmia load, Func_080de2f8 receives its two output pointers as real fifth and sixth arguments, and the local two-entry rectangle callback array is invoked through typed six-argument calls. The candidate grew from 1960 to 2016 of 2024 bytes and the differing-halfword count fell from 996 to 961. The higher aligned wrong-instruction count reflects the now-present call arguments shifting still-unrecovered later blocks, not removed semantics.","2026-08-30: promoted the named BattleEffectA owner from the prepared aggregate-aware drafting wave. After repairing its concrete C type failures, the canonical compiler produces 1960 bytes for the 2024-byte reference; topology differs and 996 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","The repairs are mechanical recovery facts: a halfword display-register store, signed halfword actor-id reads, the pointer returned by Func_080b5098, and typed u8/u16 presentation-table reads. No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were introduced.","The function is a large six-mode battle presentation routine over the 0x03001eec work block. It initializes display and palette state, advances a long phase loop, updates party-linked battle objects, and draws effect resources through call-via trampolines. The existing BattleEffectA name is retained until its dispatch role has stronger semantic evidence.","The next reconstruction pass must model the r3, r4, r5, and r7 call-via sites as typed indirect calls, then recover the 128-byte reference frame layout and shared battle-work aggregates before allocator work."]},"main:080d91dc":{"schema_version":1,"namespace":"main","address":"0x080d91dc","status":"measured-draft","owner_bytes":2268,"candidate_bytes":2288,"differing_halfwords":1089,"wrong_instructions":1034,"classification":"structural-topology","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-31: replaced nine fictional direct calls to register-call veneers with one typed six-argument BattleEffectDrawFn. The two renderer words loaded from 0x03001f08 and 0x03001f0c now flow through their evidenced channels: the first through r8/Func_08007304 or r4/Func_080072f4, and the second through r4/Func_080072f4 or r10/Func_0800730c. The corrected candidate grows from 2188 to 2288 of 2268 bytes and differing halfwords fall 1093 to 1089. Wrong instructions rise 970 to 1034 because the real callback lifetimes alter the frame and downstream allocation; the direct calls were nevertheless semantically false and could not satisfy the reference call-register requirements.","2026-08-30: removed the same m2c calling-convention artifacts found in the sibling. The shared-work cursor now emits the reference ldmia load; the opening irregular switch is expressed as the reference's 3 / (2 or 4) / default if-chain; Func_080de2f8 receives both output pointers; and every recovered five- or six-argument presentation call now passes its former fake sp0/sp4 values as real arguments. The candidate grew from 2100 to 2188 of 2268 bytes, differing halfwords fell 1119 to 1093, and wrong instructions fell 1056 to 970.","2026-08-30: promoted the next-largest remaining no-candidate main-ROM owner after repairing its aggregate-aware m2c draft. A fresh canonical compile produces 2100 bytes for the 2268-byte reference; topology differs and 1119 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","Mechanical repairs recovered the signed-halfword party-member table reads, the direct battle-context return from Func_080b5098, the u16 sprite-offset table at 0x080ede5c, and the paired stack coordinates written by Func_080e3944. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The existing BattleEffectB registration identifies a shared six-mode battle presentation entry. Its large frame loop updates a 512-element motion field and draws party-linked objects through several phase windows; a more specific permanent name remains deferred until the effect dispatch table is semantically identified."]},"main:080d9ae8":{"schema_version":1,"namespace":"main","address":"0x080d9ae8","status":"measured-draft","owner_bytes":1248,"score":{"measured":"2026-08-31","candidate_bytes":1236,"reference_bytes":1248,"differing_halfwords":450,"wrong_instructions":348,"class":"wrong","note":"First structural draft, not a permutation search, of a genuinely one-off owner: the family-transplant tool's family-matcher assigned games/gs1/src/battle/effects/member_orbit/run.c (main:080ce85c, score 7743/10000) as the closest structural template, and the m2c workbench produced no assisted context at all ('Function not found') -- worked directly from a full manual byte-offset decode of games/gs1/asm/080d9ae8.s (built with a small local script resolving every pc-relative literal-pool load to its value and every branch to its label, cross-checked internally by confirming every resolved pool target lands inside an actual .4byte block, never mid-instruction) plus the sibling evidence named in the task brief. Confirmed owner_bytes is 1248, not 1180 as an early buggy version of the decode script reported (the bug: matching 'bl ' with a literal space against tab-separated source text, undercounting each of the 34 `bl` sites by 2 bytes -- 34*2=68, and 1180+68=1248 exactly, which is what caught the bug). The template match is real but partial: this owner shares the whole 0x03001eec work-block calling shape (Func_080cd594/Func_080e0524/Func_08002f40/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0) and several field offsets with 080ce85c, but is NOT an orbit effect -- it is a distinct 'palette ramp' effect (confirmed by the already-assigned name RunPaletteRampEffect in games/gs1/source-paths.json and by the four already-adopted battle/effects/palette_ramp/mode_N.c callers, which fixed the signature as `s32 RunPaletteRampEffect(s32 effect, s32 mode)`) with its own two-phase structure: (1) an 8-step brightness-clamped-copy 'ramp' table built once at work+0x2580 (7 shaded copies of a 696-byte source image, ceiling stepping 57,50,...,15), a 512-slot particle-ring seeded with mode-dependent angle buckets, then (2) a member_count*4+64-pass animation loop where each of up to member_count members runs on its own frame offset staggered by -4 per member index (both a `local_frame` and a `threshold` loop-carried variable decremented together), drawing one member-position sprite via Func_08004cb4/Func_080e3944 while local_frame>0 (size/table selection depends on `mode`), and, once threshold falls in [0,36], drawing all 24 of that member's ramp-buffer-relative burst particles from a per-member 896-byte particle sub-range. Two `bl Func_080072f4` sites (both inside the burst-particle draw, one inside the mode==0 single-sprite draw, one inside the mode!=1 single-sprite draw -- three total) are the `_call_via_r4` trampoline (games/gs1/asm/080072e4.s, N=4 slot), modeled as indirect DrawRectangleFn calls through `callback_pair[0]`/`callback_pair[1]` per the already-established 080dc1ec.c/080e01e4.c idiom, with callback_pair populated by the already-adopted Func_080cef64 (games/gs1/src/battle/effects/fetch_rectangle_blitters.c). Iterated five times against --align: (1) fixed a missing `Func_080cef64(effect->field4, callback_pair)` call omitted from the first draft entirely; (2) the mode-1-vs-else palette-id selection (`&Value_000000b7` vs `&Value_000000bb`) needed a nested `if (mode==0){bb}else if(mode==1){b7}else{bb}` -- a flat `mode!=0 && mode==1` short-circuit compiled down to a single comparison, dropping the reference's genuine two-compare/shared-else shape; (3) the 8-step ramp loop needed its ceiling (57,50,...) and destination-offset (696,1392,...) expressed as loop-carried accumulators decremented/incremented by a constant each pass, not recomputed via `64 - outer*7` / `outer*696` multiplication each iteration; (4) removed a hoisted `member_count` local whose one-time `M2C_FIELD(work+0x7828)->20` read was getting globally CSE'd by this compiler across unrelated later reads of the same field, per the family's documented 'always re-read via a fresh M2C_FIELD expression' guidance; (5) the two radius-scaled sin/cos particle-seed multiplies needed the *runtime* `radius` local (=192) explicitly on both sides matching the reference's real `muls` instruction and operand order (`radius * cos_val` for particle[4] but `sin_val * radius` for particle[5] -- an asymmetry the reference genuinely has), instead of the literal `192` which this compiler strength-reduces into shift/add sequences since it is a compile-time constant. A sixth fix, confirmed correct against the raw disassembly's own register trace (r5 = sp+64 for the Func_08004cb4 call, then immediately reassigned to sp+76 as a DIFFERENT address for the Func_080e3944 destination, never re-read from sp+64 afterward), replaced an incorrect two-buffer model (reusing one `rec[3]` local as both the Func_08004cb4 input AND the Func_080e3944 output) with the correct three-buffer model (`rec` camera-setup input, `screen` transform output reused by both the per-member and per-particle Func_080e3944 calls via the reference's persistent fp-held pointer, `zero_vec` a freshly-zeroed {0,0,0} input for the first call only) -- this is a real correctness fix, not a permutation, but it moved differing_halfwords from 505 to 558 (candidate_bytes 1224->1216, stack frame sub sp #88->#96, still short of the reference's #100 by one word) because it disturbed downstream register allocation broadly; kept per this family's established precedent (see 080dc1ec.json prior_note_2026_08_27b/d) that a metric regression traced to a genuine semantic fix is not grounds to revert to the wrong model. Net movement from the first working draft: differing_halfwords 581->558 and wrong_instructions 460->460 (unchanged at the endpoints, but not flat in between -- fixes 1-5 alone dropped it to a low of 420/505 before the buffer-model fix's cascading stack-offset renumbering pushed the raw diff-line count back up to 460/558 despite the underlying code being more correct, not less; see the buffer-model entry in rejected_experiments for why this was kept anyway).","residual":"Fresh 2026-08-31 lane-B measurement of the retained best source is 1236/1248 bytes, 450 differing halfwords, and 348 wrong instructions. The current candidate has a 108-byte stack frame versus the reference's 100 and topology is still different from the first prologue divergence. The prior note described an older 96-byte-frame revision and is retained as iteration history, not the current residual. The exact member_orbit sibling proves the callback idiom already present here, but does not name the extra local lifetime or branch shape responsible for this owner's eight-byte frame excess. No bounded idiom or missing-code operation closed it, so this remains a measured structural draft rather than an allocation search target."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family-matcher's closest structural template by score (7743/10000), and genuinely useful for the shared 0x03001eec work-block calling shape, the M2C_FIELD/heap_cache/cursor-advance idiom, and the DrawRectangleFn/WordCopyFn typedefs -- but not a control-flow match. Owner sizes differ (1248 vs member_orbit's bytes) and confirmed by direct decode: this owner is a two-phase 'palette ramp' effect (brightness-clamped image copies plus a 512-slot particle ring, then a per-member staggered draw-and-burst animation loop), not member_orbit's single per-frame 4-sprite-per-member orbit loop. No m2c-assisted context existed for this owner (out/family-transplants/main-080d9ae8/m2c/ absent, 'Function not found'), so the template served only as a style reference, not a structural starting point."},"rejected_experiments":["`if (mode != 0 && mode == 1) {...} else {...}` for the palette-id selection: this compiler folds the redundant `mode != 0` guard away (provably implied by `mode == 1`), collapsing the reference's genuine two-comparison/shared-else shape into one `cmp`. Replaced with an explicit `if (mode==0){bb} else if (mode==1){b7} else {bb}`, which reproduces both comparisons and a single shared else target without any cross-jumping needed (the two `bb` arms are never separately materialized -- confirmed the compiler treats the trailing `else` as the sole physical target for both the `mode==0` and `mode!=1` exits).","Ramp-loop ceiling/destination-offset computed via `64 - outer*7` / `work+0x2580+outer*696` (fresh multiplication from the outer loop index each pass): produced extra `movs`/scheduling noise not present in the reference, which visibly accumulates both values via `-=7`/`+=696` at the loop bottom instead. Switched to loop-carried accumulators.","A separately named `member_count` local, read once via `M2C_FIELD(work+0x7828)->20` before the `!= -64` pre-check and left otherwise unused: this compiler's CSE recognized the identical field-access text reappearing at the loop-exit condition and the inner-loop entry guard and started caching the `work+0x7828` pointer sum across the whole per-frame loop in a persistent register/stack slot, diverging sharply from the reference's fresh-reload-every-site pattern. Removed; every member_count-adjacent site now uses its own fresh M2C_FIELD expression, per the family's established guidance.","Literal `192 * Func_0800231c(angle)` / `192 * Func_08002322(angle)` for the two particle-seed multiplies: this compiler strength-reduces a compile-time-constant multiplicand into shift/add sequences (`(x<<1+x)<<6`), not the reference's real `muls` instruction. Introduced a genuine runtime `radius = 192;` local instead, which restores the `muls`; the two calls also needed opposite operand order (`radius * cos_val` vs `sin_val * radius`) to match the reference's own asymmetry.","Reusing one `rec[3]` local as both the Func_08004cb4 camera-setup input and (after that call returns) the Func_080e3944 per-member screen-position output: plausible from the field-offset shape alone, but the raw disassembly's register trace disproves it -- r5 holds sp+64 for the Func_08004cb4 call, then is immediately reassigned to a genuinely different address (sp+76) for the Func_080e3944 destination and is never re-read from sp+64 afterward, and that same sp+76 pointer (via `mov fp,r5`) is what the later burst-loop's per-particle Func_080e3944 calls reuse as their output too. Replaced with three separate locals (`rec`, `screen`, `zero_vec`); this is a confirmed correctness fix even though it temporarily worsened the raw differing_halfwords count via cascading register-allocation changes -- not reverted, matching this family's established 'small metric regression traded for real correctness' precedent (see games/gs1/recon/en/dossiers.json#main:080dc1ec).","Explicit `facing_end = facing + 12;` local hoisted once before the member loop, replacing two inline `facing + 12` expressions: zero measured effect on the compiled output (byte-identical score before and after) -- kept anyway as a source-fidelity improvement since the reference does store this value to its own stack slot once per outer frame, even though this compiler happens to produce the same code either way."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080d9ae8.s, manually decoded byte-by-byte with a local scratch script -- not part of this repository -- that resolves every pc-relative literal load and branch target and cross-validates them against the .4byte literal-pool blocks), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/fetch_rectangle_blitters.c, games/gs1/recon/en/main/080e7404.c/080d82b0.c/080dc1ec.c and their dossiers, the four already-adopted games/gs1/src/battle/effects/palette_ramp/mode_N.c callers (which fixed this owner's name and (s32,s32) signature), in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a two-phase battle-presentation 'palette ramp' sub-effect taking (effect, mode). Phase 1 (once): stores effect at work+0x7828, sets BG2 affine scale, registers a mode-selected startup effect id, loads a mode-selected palette to 0x05000000, loads a 696-byte source image into work+0x2580 and builds 7 additional brightness-clamped copies of it immediately after (ceiling 57 down to 15 in steps of 7), computes a y_offset from effect->field4, then seeds a fixed 512-slot particle ring at 0x02010000 with mode-dependent angle-bucket fields and a radius-192 sin/cos position. Phase 2: `member_count*4+64` animation passes; each pass re-fetches `facing`, fires a one-shot sound at frame 72, then walks every party member with that member's own frame offset (`local_frame`) staggered -4 per member index. While `local_frame>0`, draws one member-position sprite (size/table depends on `mode`, drawn through one of two DrawRectangleFn callbacks resolved once via Func_080cef64). Once the member's `threshold` (also staggered -4 per member) falls in [0,36], draws all 24 of a per-member 896-byte particle sub-range using a burst index (0, or `(local_frame-24)/4` clamped to 7) to pick which of the 8 ramp-buffer brightness copies to sample, indexed further by two 12-entry byte tables (Data_080eea20/2c, width/height) and a 12-entry halfword table (Data_080eea08, source offset).","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080da2ac":{"schema_version":1,"namespace":"main","address":"0x080da2ac","status":"measured-draft","owner_bytes":1056,"score":{"measured":"2026-08-27","candidate_bytes":1040,"reference_bytes":1056,"differing_halfwords":511,"wrong_instructions":466,"class":"wrong","note":"First pass, recovered directly from games/gs1/asm/080da2ac.s (hand-decoded literal pools by computing every pc-relative ldr's target address against the two .4byte pools) plus the m2c-assisted context in out/family-transplants/main-080da2ac/m2c/ (target.canonical.s, target.lst with resolved hex offsets, and the m2c decompile used only as a structural cross-check, not copied verbatim -- its own call modeling of the trampoline sites and its sp-offset variable names do not match the real stack frame and were not trusted). The family-matcher's template (main:080ce85c, score 8145/10000) is a structural false-positive for the algorithm: this owner shares the 0x03001eec battle-work prologue idiom, field offsets (0x7780/0x7784/0x7824/0x7828/0x77A8), and several callees with the template, but is a different sub-effect entirely (a variant-driven shrinking/expanding horizontal bar wipe read from a 3-byte-per-entry table at 0x080eea38, not an orbiting-sprite animation) -- confirmed structurally correct against 080d82b0.c/080e01e4.c/080d59b0.c, the other already-measured siblings of this same battle-work family, whose dossiers document the same template mismatch and the same open residuals hit here. Two Func_08007xxx call sites are the r3 and r4 entries of the _call_via_rN trampoline at games/gs1/asm/080072e4.s (0x080072f0 = r3, 0x080072f4 = r4): the r3 site is modeled as the already-established `Func_080072f0(dest, src, size, (WordCopyFn)0x03001388)` direct-call-with-trailing-target-argument idiom (from 080d82b0.c); the two r4 sites are modeled as a genuinely traced `DrawRectangleFn draw_rectangle_fn = *(DrawRectangleFn*)((u8*)heap_cache + 28);` (== *(DrawRectangleFn*)0x03001F08, the same heap_cache+0x1C slot 080d82b0.json independently derived and confirmed) called directly as `draw_rectangle_fn(dest, src, x, y, w, h)`. The Func_080e0524 id argument uses the already-established `(s32)&Value_0000008b` pool-forcing idiom (0x8B does not compile to a movs immediate at its call site in the reference, matching the pattern documented in 080e01e4.json/member_orbit's Value_000000af). candidate-show --align confirms the algorithm/control-flow shape is correct: instruction counts are close (455 candidate vs 462 reference insns) and several structural landmarks now match byte-for-byte, including the reference's exact 116-byte stack frame (`sub sp,#116`, matched after adding an explicit `bounds_ptr = bounds;` local to reproduce the reference's real stack-spilled cache of the 4-word bounds-table base address -- omitting it left the frame 4 bytes short), the whole 16-byte Bounds4 struct-copy prologue from 0x080eda88 (ldmia r3!,{r0,r1,r4}/stmia r2!,{r0,r1,r4}/ldr/str, identical registers), and the `screen`/`position` 12-byte local array addresses (sp+76 and sp+88) landing at the reference's exact offsets. The residual differing_halfwords is now dominated by one recurring, already cross-family-documented open register-allocation question (see notes): the reference keeps `work` (the 0x03001EEC-rooted battle-work pointer) resident in r9 for the entire function and computes work-relative field addresses as a single `add rX, r9` from a pc-relative immediate at every use site; this compiler's allocator instead spills `work` to a stack slot here and reloads+adds it (two instructions, same total cost, different registers/offsets) at nearly every one of the ~15 M2C_FIELD(work,...,0x7828) style accesses, which cascades into differing register choices and stack-slot numbers through most of the rest of the function even though the values and control flow are correct. Tried and confirmed not source-shape-controllable per the ban on register forcing: giving the work+0x7828 dereference its own function-scope `void *effect` local (reassigned fresh at each use site, mirroring 080d82b0.c's `target` idiom) regressed the score (differing_halfwords 512->514, wrong_instructions 466->562) rather than helping, and was reverted in favor of inline nested M2C_FIELD(M2C_FIELD(work,...),...) expressions at each site. Splitting the initial 16x40 pixel-copy loop's shared `i`/`j` counters into loop-unique names (row_i/col_j) plus giving the three later do-while loops (zero-init, member-position, member-flag) their own unique counter identities instead of a shared `i` also regressed slightly (differing_halfwords 512->514) and was reverted back to the shared-`i` baseline, which scored best. Declaration-order swap of the bottom three locals (bounds before position before screen, matching the frame allocator's documented first-declared-highest-address rule for same-size-class locals) measurably helped once combined with the bounds_ptr fix. Still not exact."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; already exact/adopted. Shares the 0x03001eec battle-work prologue shape, several field offsets (0x7780/0x7784/0x7824/0x7828), the M2C_FIELD macro convention, and the DrawRectangleFn/WordCopyFn typedefs and trampoline-call idioms with this owner, but the algorithm itself is a different sub-effect: this owner never computes a circular orbit (no cosine call, no per-member 4-sprite spin loop) and instead reads a per-variant 3-byte table at 0x080eea38 to drive a shrinking/expanding horizontal bar wipe (two DrawRectangleFn calls per active band, both against a fixed 40px-wide, height-varying rectangle) plus a member-highlight scan gated on screen-position thresholds. Owner size (1056 bytes) vs template (724 bytes) reflects this: an extra 16x40 nested pixel-copy prologue loop, an extra per-member zero-init pass, a 16-byte ROM-constant struct copy, and a 3-level nested loop (outer variant-driven frame count, a fixed 3-iteration band loop, an inner per-member loop) that the template's single-level per-frame loop does not have.","actual_sibling_evidence":"Confirmed member of the same 0x03001eec battle-work subsystem family already measured in games/gs1/recon/en/main/080d82b0.c, 080e01e4.c, 080d59b0.c, 080dc1ec.c and 080e7404.c: identical Func_080cd594(mode)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() bracket, the same heap_cache=(void**)0x03001EEC/cursor/work/draw_destination prologue idiom, and the same _call_via_rN trampoline mismodeling pitfall at Func_080072f0/Func_080072f4 those dossiers already fully derived and fixed."},"rejected_experiments":[{"experiment":"Hoist the repeated M2C_FIELD(work, void**, 0x7828) object-pointer dereference into a single function-scope `void *effect` local, reassigned fresh via a plain statement at every site the reference reloads it (mirroring 080d82b0.c's `target = M2C_FIELD(work, void**, 0x7828);` idiom)","result":"regressed differing_halfwords 512->514 and wrong_instructions 466->562; the extra long-lived local increased register pressure across the whole function rather than reproducing the reference's address-caching CSE behavior. Reverted to inline nested M2C_FIELD(M2C_FIELD(work, void**, 0x7828), type, offset) expressions at every use site.","class":"rejected"},{"experiment":"Give each of the four do-while/for loops (initial 16x40 pixel-copy prologue, member zero-init, member-position scan, member-flag scan) its own uniquely-named counter instead of a single shared `i`/`j` reused across all four (matching the general 'give a loop its own variable identity' lesson from 080e01e4.json's burst-counter fix)","result":"regressed differing_halfwords 512->514 (wrong_instructions improved 466->488 but net dh was worse); reverted back to the shared `i`/`j` names, which scored best for this specific owner's four disjoint, non-nested loops.","class":"rejected"},{"experiment":"Omit the `bounds_ptr` local and index the 4-word ROM-seeded bounds table directly via `*(s32*)((u8*)bounds + band)` at each use site","result":"compiled to a 112-byte stack frame instead of the reference's 116 bytes (the compiler simply recomputed `sp+100` inline each time rather than spilling the base pointer as the reference does) and shifted every later local's offset by 4 bytes. Adding an explicit `s32 *bounds_ptr = bounds;` local, set once and dereferenced through at both use sites, restored the exact 116-byte frame and the reference's exact screen/position array offsets (sp+76, sp+88).","class":"accepted"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080da2ac.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the measured-draft siblings games/gs1/recon/en/main/080d82b0.c/080e01e4.c/080d59b0.c and their dossiers, in-repository headers, the approved compiler, and the m2c-assisted context files already generated at out/family-transplants/main-080da2ac/m2c/ (target.canonical.s and target.lst, used only to cross-check hand-decoded literal-pool addresses, and the m2c decompile itself, used only as a structural sanity check -- every operand value, field offset, and call argument in the final draft was independently re-derived from the raw retained assembly, not copied from m2c's output).","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect on the shared 0x03001eec battle-work block. Sets BG2 affine scale/rotation registers, builds a 640-byte (16x40) sub-rectangle copy of a tiled bitmap at 0x02010000 into the work block, conditionally flips a BG3 affine register and sets a -112 x-offset correction for one orientation of the effect's owner object, opens display window kind 46, reads a DrawRectangleFn pointer out of the shared heap_cache+0x1C slot, zero-initializes one field of each party member's per-effect record, registers a scheduler callback, copies a 16-byte ROM constant into a local 4-word 'bounds' table, and then runs a variant-selected number of frames (looked up from a 3-byte-per-entry table at 0x080eea38 indexed by the owner object's field 0x18). Each frame advances a 3-band scanning window over the bounds table (periodically bumping one band's stored value by 32), and once the frame counter enters a band's active window, computes a sine-scaled bar half-height and draws two fixed-width (40px) rectangles of varying height, then scans every party member: projecting each member's 3D position to screen space, flagging members whose projected position falls inside the just-drawn bar's bounds (setting two fields on the member object), and cueing a status callback for any member whose field-12 value has gone negative. After the 3-band loop, a second per-member pass fires a one-shot Func_080d6888 cue for any member whose per-effect record flag is still unset and whose object fields indicate an out-of-battle/negative-value state. Ends by unregistering the scheduler callback and freeing window kind 46.","The dominant residual, consistent with every other measured owner in this same 0x03001eec battle-work family (080d59b0.json, 080d82b0.json, 080e01e4.json, 080dc1ec.json), is the compiler's register-allocation priority choosing to spill the long-lived `work` pointer to a stack slot and reload+add it at each use, where the reference instead keeps it resident in r9 for the whole function. Per the ban on forcing register assignment via source tricks, and per the precedent in the sibling dossiers (declaration-order and scoping levers tried there had zero effect on this same fp/r9-class choice), this was not chased further with blind lever-pulling here beyond the two declaration-order experiments recorded above. Everything else -- the algorithm, every field offset, every table/constant value, every call argument, the trampoline-call modeling, and the exact 116-byte stack frame shape -- is confirmed correct against the retained assembly.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080da6cc":{"schema_version":1,"namespace":"main","address":"0x080da6cc","status":"measured-draft","owner_bytes":1192,"score":{"measured":"2026-08-27","candidate_bytes":1168,"reference_bytes":1192,"differing_halfwords":540,"wrong_instructions":264,"class":"wrong","note":"First pass. The family matcher's template (main:080ce85c, member_orbit/run.c, score 7866/10000) is structurally related -- same 0x03001eec 'battle work' prologue idiom, same DrawRectangleFn/M2C_FIELD conventions -- but this owner (1192 bytes) is a genuinely different sub-effect from the template (724 bytes): a per-member burst of falling 'star' particles, not an orbiting ring. Drafted directly from games/gs1/asm/080da6cc.s and out/family-transplants/main-080da6cc/m2c/target.canonical.s (an m2c decompile of this owner's own retained bytes, not the template's), cross-checked instruction-by-instruction against the raw retained assembly rather than trusting m2c's output verbatim -- m2c mis-modeled both `bl Func_080072f4` call sites (the r4 slot of the _call_via_rN trampoline, already established family-wide: see games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note) as a fictional direct function with unresolved stack args, and silently dropped the width/height stack arguments and the (frame> 1` (the small-glint width halving) compiled to an arithmetic shift when the local was `s32`, but the reference emits a logical shift, so the source must genuinely be unsigned (fixed by declaring that local `u32`); (4) removing three inappropriately-cached locals (`count`/`raw_count`/`variant` used as the two idx-loops' *bound*) -- the reference recomputes `Data_080eea41[M2C_FIELD(M2C_FIELD(work,void**,0x7828),s32*,0x18)]` fresh at every loop-condition site (bumped matched_prefix 11->19 and dropped wrong_instructions 290->272 in one step, the single largest win of the pass); (5) inlining the burst-draw's callback ternary as raw byte-pointer arithmetic (`*(void**)((u8*)rectangle_slot+slot)` with slot=4-or-0) instead of `rectangle_slot[1]:rectangle_slot[0]`, which stopped the compiler from duplicating the entire call's argument setup into two branches; (6) introducing a named `size2` local so `size*2` is computed once and reused for both the table index and the height argument, instead of twice. Net over the pass: differing_halfwords 561->540, wrong_instructions 408->264, matched_prefix 11->19, candidate_bytes 1148->1168 (closer to the reference's 1192). Not exact. Residual (confirmed, not chased further): a single global register-role swap -- the reference keeps the outer idx-loop counter in sl and the cached &work[0x7828] address in fp for the entire burst/homing section; this candidate's compiler swaps them (idx in fp, the address in sl). This is exactly the family's documented 'loop-invariant address kept in a different high register than the reference' residual (see the task's own hard constraints and 080e01e4.json's open question (b)); every M2C_FIELD(work,void**,0x7828) site in this draft is written fresh at point of use (never hoisted into a named local) specifically so the compiler's own CSE decides the caching, per project convention, so this is not source-shape-controllable without forcing register assignment, which is prohibited. A smaller, separate residual: `rectangle[0] = *(void**)(Data_03001e50+46*4)` compiles to a folded pool literal + `ldmia` (4 bytes) where the reference does a fresh symbol load + two `adds` + `ldr` (8 bytes, presumably because the same 0x03001e50-based literal is reused nearby for the kind-47 fetch, +188, forcing the compiler to keep the bare symbol address live in a register rather than folding the offset into the pool word); tried an explicit `u32 *cache` cursor variable (matching puff_arc/run.c's proven-exact `cache=(u32*)(Data_03001e50+39*4); entry=cache; a=*entry++; b=*entry;` idiom) both with and without a call() between the two reads -- no effect either way, so this is recorded as open rather than forced. Two dead-code-shaped comparisons are deliberately preserved as literal source, matching the project's established 'record dead cells honestly' convention (see this session's 0801e318 work): `(Data_080eea41[variant] >> 1) != -132` guards the whole per-frame loop and is structurally unreachable-as-false (an unsigned 0-127 value can never equal -132), yet the reference's own compiler does not fold it away (confirmed: candidate-show --asm shows the identical `movs r5,#132; negs r5,r5; cmp r3,r5; bne/b` sequence verbatim once written as a literal -132 comparison, so the approved compiler genuinely does not perform this range-based fold and the reference's C likely wrote the same literal)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family score 7866/10000, the closest structural template by n-gram/call-target similarity, but the template's own body (a fixed 64-frame orbiting-ring loop with two rectangle blits per orbit position, no per-particle state machine) is not this owner's shape at all: this owner drives up to 64 independently-timed 'star' particle records through a spawn/home/land state machine over a per-variant frame count. The template remains useful evidence for the shared 0x03001eec prologue idiom (heap_cache/cursor/work/draw_destination), the M2C_FIELD macro, the DrawRectangleFn calling convention, and the Func_08002dd8/Func_08004278/Func_080cdbc0 teardown shape -- all reused here -- but essentially none of the template's own loop body or field roles carried over.","closer_evidence":"games/gs1/src/battle/effects/puff_arc/run.c (main:080d9fc8, exact) is the better behavioural precedent: both owners read a kind-46 draw callback out of the same Data_03001e50[kind] heap-allocation cache (puff_arc via `cache=(u32*)(Data_03001e50+39*4)`, this owner via `Data_03001e50+46*4`/`+47*4`), and both run a per-frame do-while over an array of 28-byte position/velocity/timer records seeded once before the animation loop, drawing a subset of them each frame through the cached callback. games/gs1/recon/en/main/080d82b0.c and 080e01e4.c (measured drafts, same 0x03001eec family) supplied the established DrawRectangleFn indirect-call derivation (see 080dc1ec.json's score.note for the full _call_via_rN trampoline proof) and the `Data_080ede48[idx-1]` table-index idiom."},"rejected_experiments":["Modeled the Func_080072f4 call sites as m2c originally rendered them (a fictional direct 4-argument function with an unresolved 5th 'stack arg'): compiles, but drops the width/height arguments and the callback-selection entirely, and cannot reproduce the reference's r4-trampoline call shape at all. Replaced with a genuine indirect call through a byte-offset pointer read, matching the already-established family derivation.","Cached the per-frame effect-state pointer (`M2C_FIELD(work, void**, 0x7828)`) into a single named `target` local, reassigned fresh before each use (matching games/gs1/recon/en/main/080d82b0.c's style): this is exactly the pattern the task's own guidance warns against (a materialized derived pointer inviting CSE-driven hoisting/spill); switched to writing the nested M2C_FIELD expression fresh at every single use site instead (no named local at all), which is what let the compiler's own register allocator decide caching -- and is very likely why it independently chose to keep the address live in a high register (fp in this draft, sl in the reference) for the busy burst/homing section, matching the reference's overall shape even though the specific register differs.","Cached the two idx-loops' iteration bound (`Data_080eea41[variant]`) into a named `count`/`raw_count` local computed once before each do-while: the reference recomputes this expression fresh at the loop-condition site every iteration (confirmed via the raw bytes: `mov r1,fp; ldr r3,[r1,#0]; ldr r3,[r3,#24]; ldrb r3,[r2,r3]; cmp sl,r3` appears at the tail of both loops, not a cached stack read). Removing the cached locals and writing the fresh nested expression at both the entry-gate and the loop-condition was the single largest win of this pass (wrong_instructions 290->272, matched_prefix 11->19).","Wrote the burst-draw's callback selection as a ternary directly in the DrawRectangleFn call position, `(framex - (w>>1);`: compiles to an arithmetic shift (asrs) since the local is signed, but the reference emits a logical shift (lsrs). Retyped the local `u32`, which fixed the shift and, as a side effect, corrected the surrounding instruction ordering to match the reference (the u16 source-table read now happens at the same point in the instruction stream as the reference instead of being deferred to just before the call).","Tried an explicit `u32 *cache` cursor for the kind-46/47 rectangle-pointer fetch (`cache=(u32*)(Data_03001e50+46*4); rectangle[0]=(void*)*cache; ...; cache++; second_rectangle=(void*)*cache;`), matching puff_arc/run.c's proven-exact cursor idiom: produced identical codegen to the direct one-shot dereference (still folds to a pool-literal `ldr`+`ldmia` rather than the reference's fresh-symbol-load+`adds`+`adds`+`ldr`). No effect either way; reverted to the simpler direct-dereference form since it is equally close and shorter to read. Left open rather than forced.","Reordered the top-level local-variable declarations (moving `extra_target` to the very end of the list) to try to shift its stack-frame slot from sp+28 (this draft) to the reference's sp+20: regressed (differing_halfwords 540->541, matched_prefix 19->16). Reverted."],"notes":["Recovered only from games/gs1/asm/080da6cc.s, out/family-transplants/main-080da6cc/m2c/target.canonical.s (an m2c decompile of this owner's own retained bytes, used only for structural orientation -- every field offset, argument, and control-flow edge was independently re-verified against the raw Thumb bytes before being trusted, since m2c mis-modeled both trampoline calls and dropped several arguments entirely), the already-exact siblings games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a per-member 'falling star' battle-presentation sub-effect. Seeds 64 Star records (x,y,z,vx,vy,vz,state; 28 bytes, at 0x02010000) once from a single member's screen position with randomized velocities (state=-1, meaning 'not yet released'). Runs `(Data_080eea41[variant]>>1)+132` animation frames, where `variant` is a small (0..2) field read from the caller's effect-state struct at offset 0x18. Each frame, a per-variant subset of the 64 stars (the raw count at Data_080eea41[variant], up to 64) is walked by index: once `idx/2` frames have elapsed, a still-released(-1) star draws a shrinking trail sprite through the kind-46/47 rectangle-blit callback cache (Data_03001e50[46]/[47]) -- kind 47 while still inside its own `idx/2 .. idx/2+48` window, kind 46 once 48 frames overdue -- sized from its own projected screen distance (Func_080e3944, clamped [160,799]), and its position drifts by its own velocity every such frame. Once 48 frames overdue, the same star is also 're-homed' every frame: its velocity is nudged 1/512 of the way toward its member's live screen position (Func_080b5098), damped to 60/64 strength for frames before `idx/2+85`, full strength after. Once a homed star's Y position crosses above the top of the screen (y<0), it 'lands': state flips to 0, its position snaps to the just-computed projected screen position, a sound cue and a Func_080d6888 dispatch fire at its member, and a work-block flag (offset 0x77A8) is set. Independently, every frame, a second full 64-star scan draws any star whose state is in [0,11] (i.e. just landed) through a fixed twelve-frame 'glint' sequence -- four small per-index tables (Data_080eea44 width, Data_080eea4a height, Data_080eea50 y-delta, Data_080eea56 source offset), always through the kind-47 callback -- incrementing state each frame until it exceeds 11 and the star goes dormant.","The `Data_080eea41`/`44`/`4a`/`50`/`56` tables are new to the tracked corpus (no prior owner references these addresses); their extents were inferred from the reference's own index math (variant in 0..2 for the 3-byte count table; state/2 in 0..5 for the four 6-entry small tables) rather than known table lengths, and are recorded here as u8/u16 arrays with no further symbolic name pending a second owner that shares them.","Callee signatures for Func_080b5070, Func_080b5028, Func_080f9010, Func_080e155c and Func_080b50e8 follow the already-established prototypes from games/gs1/recon/en/main/080d82b0.c, 080d1350.c and 080c91dc.c (all plain s32-argument functions); Func_080022fc's `s32(s32,s32)` prototype and Func_080b5098's `void**(s32)` prototype follow member_orbit/run.c and 080d82b0.c respectively.","The Func_080e0524 id arguments use the established `(s32)&Value_XXXXXXXX` pool-literal idiom (Value_000000b4 already adopted in puff_arc/run.c; Value_00000073 already adopted in games/gs1/recon/en/main/080e01e4.c) rather than plain int literals, matching the family-wide finding that this callee's id argument is always pool-loaded. Func_080ed408's id arguments (46/47) and the tail Func_08002dd8(46/47) calls are plain int literals, matching member_orbit/run.c and puff_arc/run.c exactly -- confirmed from the raw bytes (`movs r0,#46` / `movs r0,#47`, never a pool load) for every occurrence in this owner.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080db264":{"schema_version":1,"namespace":"main","address":"0x080db264","status":"measured-draft","owner_bytes":1124,"score":{"measured":"2026-08-31","candidate_bytes":1088,"reference_bytes":1124,"differing_halfwords":523,"wrong_instructions":425,"class":"structural-topology","note":"Fresh candidate-show score after reconstructing the complete retained-assembly algorithm: 1088/1124 bytes, differing_halfwords=523, wrong_instructions=425, topology=different. This materially improves the failed aggregate-m2c route's only compiling fallback (576/1124, differing_halfwords=555, wrong_instructions=656). The remaining 36-byte extent and topology residual is retained honestly; this candidate claims zero DONE bytes."},"notes":["The aggregate-m2c draft supplied the recovered topology but did not compile; invalid aggregate dereferences and raw pointer arithmetic were replaced with explicit particle records, signed fields, cache/cursor types, and trampoline function-pointer calls supported by the retained assembly. The full initializer, four-pass emitter, 1024-particle update/draw scan, party-member cue loop, frame pacing, and teardown now compile as ordinary C.","No external source, inline assembly, fixed-register variable, compiler flag override, or forced scheduling was used."]},"main:080db6e0":{"schema_version":1,"namespace":"main","address":"0x080db6e0","status":"measured-draft","owner_bytes":1092,"score":{"measured":"2026-08-27","candidate_bytes":1088,"reference_bytes":1092,"differing_halfwords":476,"wrong_instructions":373,"class":"wrong","note":"First pass, no m2c workbench context (family-transplant tool returned 'Function not found' for this owner). Read games/gs1/asm/080db6e0.s directly with a byte-precise pc-relative literal-pool decoder (function offsets confirmed against the 1092-byte total, all 21 pool words resolved). candidate-show verification found zero opcode mismatches across the whole aligned comparison -- every '!' row has the identical mnemonic on both sides, only registers/stack-offsets/pc-pool-offsets differ -- so the remaining gap is register-allocation/frame-layout residual, not a control-flow or instruction-selection error. Two real bugs were found and fixed during iteration: (1) two of the reference's 'halve a value' sites are plain arithmetic right-shifts (`>>1`, no sign-extension correction), not genuine signed division -- confirmed by the absence of the `lsrs r,r,#31 / adds` correction pair before the `asrs` in the retained assembly at those two sites, versus its presence at a third site (the depth-index halving) which does need `/2`. (2) the near-particle draw's width/height halving reads a `u16` table value and shifts it with `lsrs` (unsigned) in the reference, not `asrs`; forcing that with `(u32)size >> 1` reproduced the reference's exact lsrs/subs/subs triple one-for-one. Introducing a genuine `u8 *table = Data_080eeae2;` local (used for the three per-mode loop-bound/gate reads, left as fresh `Data_080eeae2[...]` for the one per-frame sound-cue read that the reference itself reloads fresh) also measurably helped (wrong_instructions 425->349 combined with flattening every temporary to top-level declarations, matching this family's established frame-layout idiom from games/gs1/recon/en/main/080e7404.c) and is evidence-backed: the reference visibly keeps this same table-base pointer live in fp for the whole per-frame loop (`mov fp,r0` once before the loop, reused at every loop-bound test including the final one), which only a genuinely reused pointer value reproduces."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting, as instructed. The assigned template (family score 7873/10000, size mismatch already flagged: 080ce85c's own owner_bytes differ from this owner's 1092) shares the 0x03001eec heap_cache/work-pointer prologue, the work+0x7828 object field, the Value_ pool-symbol convention, and the DrawRectangleFn/WordCopyFn trampoline call shapes -- all reused here directly. But the actual per-frame body does not match at all: this owner has no member-orbit sprites (no Func_080b5098 member-lookup call, no Func_08002322/Func_0800231c sine/cosine calls, no per-frame scanline sweep at work+0x6980 anywhere in the retained assembly). Instead it runs two independently-seeded particle arrays (32 entries at work+0x7080, 1024 entries at the fixed EWRAM buffer 0x02010000, both stride 0x1C, both built from Func_08004458-masked RNG triples) through a while loop whose iteration count and two active-particle counts come from a 3-bytes-per-row lookup table at 0x080eeae2, indexed by a runtime mode selector (mode forced to 1 by the palette-generation variant, otherwise read from the caller object's offset 24). Per-member sound cues fire on a flat `frame == member_index + 6` trigger (Func_080d6888 always, plus Func_080b5088 only when variant==0), not the template's `frame == member*16+32` windowed-orbit trigger.","actual_sibling_evidence":"games/gs1/recon/en/main/080e7404.c (dossier 080e7404.json) is the real structural sibling, in the same '0x03001eec battle work' family the task pool names explicitly: identical Func_080cd594(mode)/Func_080e0524(id,work,a,b)/Func_080ed408(id,a,b,c,d)/Func_080041d8(cb,interval)/Func_08004278(cb)/Func_08002dd8(id)/Func_080cdbc0()/Func_08004458()/Func_080e38b8(rec,a,b) call shapes; the exact same finish-callback pointer 0x080CD261; the same 128-record/512-record particle-initializer idiom (masked-RNG field 0xC/0x10/0x14 triples at a fixed EWRAM buffer, this owner's own two initializer loops are the same shape at 32 and 1024 entries); and the same Data_03001e50/Data_080ede48 symbols, reused verbatim here."},"rejected_experiments":[{"experiment":"nested block scope for each loop's counter/pointer temporaries (i, entry) rather than flat top-level declarations","result":"compiled to a 44-byte candidate stack frame against the reference's true 56 bytes (12 bytes short) and only matched_prefix through the very first few instructions; flattening every temporary to the top of the function (matching 080e7404.c's own established style) grew the candidate to the full 1092 bytes and dropped wrong_instructions 425->349 in one step"},{"experiment":"leave every Data_080eeae2[...] read as a fresh array index with no cached base pointer","result":"wrong_instructions 389 (worse than the cached-pointer version); the reference visibly keeps the table base live in fp across the whole per-frame loop (reused at every loop-bound test), so a genuinely reused `table` local was introduced for those three sites and the sound-cue site was left as a fresh index (matching the reference's own fresh reload there)"},{"experiment":"grayscale-ramp color OR order `(gray<<5)|(gray<<10)|gray` vs `(gray<<10)|(gray<<5)|gray`","result":"only the `(gray<<10)|(gray<<5)|gray` order reproduces the reference's `lsls r1,r3,#5` (temp) then `lsls r2,r3,#10` (accumulator) instruction pair; the other order swaps which shift becomes the accumulator"},{"experiment":"declare `size` (a `u16` table value used for a centering halve) as plain `s32` and divide by 2","result":"produces `asrs` with a sign-extension correction, not the reference's plain `lsrs`; fixed by shifting an explicit `(u32)size` instead"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080db6e0.s, byte-precisely address-decoded to resolve all 21 pc-relative literal-pool words by hand since no m2c workbench context exists for this owner), the approved local EN ROM, the already-exact template games/gs1/src/battle/effects/member_orbit/run.c, the measured-draft sibling games/gs1/recon/en/main/080e7404.c and its dossier, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a battle/overlay particle-field effect (retained assembly already names it RunParticleFieldEffect; kept as the registered name in games/gs1/source-paths.json, the working C symbol stays Func_080db6e0 for candidate-show tooling). Two arguments: an object pointer republished at work+0x7828, and a variant selector. variant==1 procedurally builds a 64-entry grayscale BG palette ramp and forces mode=1; other variants load a palette resource via Func_08002f40 and take the runtime mode from the object's offset 24. Seeds a 32-entry 'near' particle array at work+0x7080 and a 1024-entry 'far' particle array at the fixed EWRAM buffer 0x02010000 (both stride 0x1C, masked-RNG velocity/position fields, status word driven by the object's own field-4 flag). Registers a single kind-46 rectangle-blit callback and runs a per-frame while loop, bounded and gated by a 3-bytes-per-mode lookup table at 0x080eeae2 ([far_active_count, near_active_count, total_frames]): each frame projects and draws up to far_active_count far particles through a depth-bucketed sprite table (Data_080ede48), progressively reveals near particles (index < frame) through a growth-animated sprite pair (Data_080eeaec/Data_080eeafa) for their first 20 frames, cues one or two per-member sound effects on a flat frame==member_index+6 trigger, and tears the callback/palette-kind down at the end.","The 'wrong' class and the 476/373 residual are entirely register-allocation/frame-layout: candidate-show's aligned comparison shows zero opcode mismatches anywhere in the function. The dominant, already cross-family-documented open question (games/gs1/recon/en/dossiers.json#main:080d59b0's own notes describe the identical phenomenon on a sibling in this same 0x03001eec family) is that the reference keeps `work` in sl for the whole function; this compiler keeps choosing r9 for it here instead, which frees sl for other uses (this owner's particle-loop pointer) and in turn changes which values get spilled to stack at the two DrawRectangleFn call sites -- both sides spill canvas+draw_rectangle there, just at stack offsets shifted by the resulting frame-size gap (48 vs the reference's 56, an 8-12 byte gap depending on measurement point). 080d59b0.json already tried and rejected declaration-order/scope permutation for exactly this fp/r9-class choice on a sibling owner sharing the identical work-block idiom; that finding is treated as controlling here rather than re-run, per CONTRIBUTING.md's ban on forcing register assignment or open-ended permutation search once the residual is confirmed register-class-only.","No GS2 or external source, no other Golden Sun decompilation project, and no gsret disassembly were consulted. Only this repository's own retained assembly, approved ROM, adopted exact sources, in-repo headers, and approved compiler were used."]},"main:080dc1ec":{"schema_version":1,"namespace":"main","address":"0x080dc1ec","status":"measured-draft","owner_bytes":616,"score":{"measured":"2026-08-27","candidate_bytes":604,"reference_bytes":616,"differing_halfwords":272,"wrong_instructions":155,"class":"wrong","note":"Fifth pass: re-checked the panel's previously-rejected 'two independent velocity accumulators' experiment now that the r4-trampoline fix shifted the whole function's register-pressure landscape, per this pass's own instruction. On the new baseline it is a real, substantial win rather than the regression it was before: changed the inner loop's velocity update from a single accumulator (velocity_b = -velocity_a recomputed fresh every iteration) to two independent accumulators at the loop bottom (`velocity_b -= outer << 3; velocity_a += outer << 3;`, in that statement order -- the reverse order scored one wrong_instruction worse). Effect: `work` now lands in fp, matching the reference, for the first time since the r4-fix landed -- confirmed via --align: `mov fp, r2`, `add r5, fp`, `mov r1, fp`, and the stack frame size (sub sp,#52) are all byte-identical to reference now. star->r6, j->r7, and velocity_b->r8 also now match exactly. differing_halfwords 278->272, wrong_instructions 185->155 (a 30-instruction drop, the strongest evidence yet this whole line of fixes is real). Traced the actual REG_ALLOC_ORDER in alchemy-gcc/agscc/gcc/config/arm/arm.h ({r3,r2,r1,r0,ip,lr,r4,r5,r6,r7,r8,sl,r9,fp,sp,pc,...}) to characterize the one remaining register mismatch precisely: candidate puts velocity_a->sl, outer->r9; reference has them reversed. Tried ~8 targeted reshapes to flip this specific swap (M2C_FIELD/draw_destination read order, local declaration order, hoisting velocity_a/velocity_b init earlier, an explicit neg_outer variable mirroring the reference's spilled -outer, an explicit named step variable, deriving velocity_a from velocity_b instead of vice versa, reversing the outer>quarter comparison operand order, reshaping the (j>=0?j:j+3)>>2 ternary into an explicit if) -- every one either had zero effect or regressed (one badly, evicting work from fp again). All remaining diff regions (an interleaved-vs-duplicated scheduling difference in the star decay block, an extra branch+duplicate shift in both quarter-ternary computations, and pop{r0} vs pop{r1} in the epilogue) trace back to this same sl/r9 swap rather than being independently fixable. Confirms this register choice is genuinely sensitive to something not yet identified, not a fixed rule -- not pursued further per the ban on forcing register assignment. Still not exact. Fourth pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27d":"Fourth pass: resolved the family's cross-owner 'Func_080072f4 5th-argument-in-r4' mystery, which every prior pass (this owner and all three siblings) had flagged as a genuinely unprecedented, unresolvable ABI quirk. It is not an ABI quirk. games/gs1/asm/080072e4.s (kind runtime_thunk_bundle) is fourteen `call_via_rN` trampolines (`bx rN; mov r8,r8`, 4 bytes each) at 0x080072e4+4*N for N=r0..sp; 0x080072f4 is exactly the r4 entry (4th slot: r0,r1,r2,r3,r4 -> 0x080072e4,e8,ec,f0,f4). `bl Func_080072f4` in the retained assembly is `bl `, an INDIRECT call through whatever function pointer is in r4 at the call, not a direct call to a real 7-argument function. Confirmed definitively three ways: (1) `arm_function_arg` in alchemy-gcc/agscc/gcc/config/arm/arm.c returns NULL_RTX (stack) once 4 registers are used, with zero special-case logic for a 5th register argument -- this compiler's own source proves it can never place ANY argument in r4; (2) tracing the value loaded into r4 right before the call back to its origin shows it comes from `add r1, sp, #20; bl Func_080cef64` earlier in the function -- exactly sp+20, the address passed as `out_pair` to Func_080cef64, i.e. r4 holds callback_pair[0], the draw-callback function pointer, not a plain argument; (3) the already-adopted games/gs1/src/battle/effects/member_orbit/run.c (main:080ce85c) already models this exact pattern correctly as `((DrawRectangleFn)rectangle_slot[slot & 1])(canvas, src, x, y, 32, 32)` -- a cast-and-call through a function-pointer array slot, not a call to a symbol named Func_080072f4 at all. Rewrote this owner's call the same way: `((DrawRectangleFn) callback_pair[0])(draw_destination, (void*)(src_off+(s32)work), y, h, raw, raw<<1)`, a 6-argument indirect call matching DrawRectangleFn's real signature, and removed the fictional `void Func_080072f4(s32,s32,s32,s32,DrawRectangleFn,s32,s32)` prototype entirely. Verified structurally against games/gs1/asm/080dc1ec.s via --align: the candidate now reproduces the reference's exact 'stage w/h to stack, reload dest+callback from earlier stack slots into r0/r4, bl ' instruction pattern at the call site, byte-for-byte in shape (only the absolute stack offsets differ, tracking an overall frame-size difference). Also fixed a second, smaller finding surfaced by --align once the call was correct: `Func_080e0524(140, work, 1, 1)` -- the reference loads 140 from the literal pool (`ldr r0,[pc,...]`), not a `movs` immediate, matching the established Value_XXXXXXXX idiom; changed to `Func_080e0524((s32)&Value_0000008c, work, 1, 1)`. Net effect of both fixes: wrong_instructions dropped sharply (235->185, the strongest evidence this is a real correctness gain) while differing_halfwords rose slightly (245->278) and candidate_bytes shrank (612->592) -- the same 'small metric regression traded for real correctness' pattern already validated repeatedly this session (see prior_note_2026_08_27b), not a reason to revert. matched_prefix also dropped (12->7), confirming register allocation is globally sensitive to this fix the same way the dispatch-shape lever proved earlier -- the panel's three merged wins (dispatch-shape/clamp-locals/array-locals) may partially or fully re-apply differently now that the call site is modeled correctly; a follow-up pass should re-attempt them against this new baseline before assuming they still hold. The dominant remaining divergence is now the already-documented work-register choice (candidate keeps work in r9, reference in fp, diverging from the very first `mov`/`ldmia` sequence) -- unchanged by this pass, deliberately not chased further here. This finding applies to all three siblings (080e01e4, 080d82b0, 080d59b0) that share the identical fictional Func_080072f4 call pattern; fixed there too in the same session pass, see their own dossiers.","prior_note_2026_08_27c":"Third pass: a 4-way diverse-lever panel (four isolated worktree agents, each attacking a different, non-overlapping section of the function) ran against the 277-dh/270-wi baseline from prior_note_2026_08_27b. Two levers were pure no-ops on differing_halfwords (a setup-section reshape, and extracting `j & 3` into a named local under the switch); two produced real, independently-verified improvements, and both merged cleanly since they touch disjoint code: (1) dispatch-shape -- rewriting the `switch (j & 3)` 4-way dispatch as an if-else chain shaped to match the reference's own compare tree (`selector > 1` first, splitting into the {2,3} and {0,1} groups) changed register-allocation decisions across the WHOLE function, not just locally, dropping differing_halfwords 277->246; (2) clamp-locals -- `half = (raw + ((u32) raw >> 31)) >> 1` was compiling to a logical `lsrs` instead of the reference's arithmetic `asrs`, because `(u32) raw >> 31` promotes the whole sum to unsigned under the usual arithmetic conversions even though the result is stored into an s32; casting back to `(s32) ((u32) raw >> 31)` before the addition restored the signed sum and the asrs, though on its own this only changed wrong_instructions (270->268), not differing_halfwords. A third, independently-tried lever (array-locals: recomputing `star = (u8*)0x02010000 + j*28` inside the loop instead of resetting once and incrementing by 28 each iteration) scored 276/252 alone and also merged cleanly. All three combined: differing_halfwords 245, wrong_instructions 235 (down from 277/270) -- the merge is strictly additive, better than any single lever. Still not exact. The panel's dispatch-shape agent traced the residual precisely: the reference keeps five persistent registers across both loops (sl=outer, r8=velocity_b, r9=velocity_a, r6=star, r7=j) where this compiler's allocator, given the prior pass's already-validated single-accumulator velocity model, only needs four and picks a different assignment -- this is a direct, provable consequence of the velocity-computation shape decision (deliberately not revisited by this panel, per its own scope), not of anything in the three sections actually changed this pass.","prior_note_2026_08_27b":"Second pass, evidence-grounded (not permutation). Fixed the work/draw_destination read from two independent *(void**)0x03001EEC / *(void**)0x03001EF0 dereferences to the cursor-advance idiom already used by the adopted 080ce85c.c sibling (`cursor = ...; work = *cursor++; draw_destination = *cursor;`), which matches the reference's `ldmia r3!, {r2}` and pulls matched_prefix from 7 to 12 instructions immediately. Then found and fixed a real semantic bug: the inner j-loop's velocity_a/velocity_b arguments (passed to Func_08004c1c/Func_08004bd4/Func_08004c6c) are NOT loop-invariant per outer pass as the previous draft modeled -- the retained assembly's .L2 loop-bottom block increments r8/r9 by +-(outer<<3) on every one of the 64 inner-loop passes, unconditionally (both the gated and ungated path reach .L2), so velocity_a actually equals (outer<<8) + j*(outer<<3) at iteration j, not a constant outer<<8. Rewrote as `velocity_a = outer<<8` once per outer pass, `velocity_b = -velocity_a` recomputed fresh at the top of every j iteration, and `velocity_a += outer<<3` at the loop bottom. differing_halfwords went from 263 (old, wrong-semantics baseline) to 277 (new, correct-semantics candidate) -- a real but small regression traded for actual correctness, not noise; do not revert to the constant-velocity model.","prior_note_2026_08_27a":"First structural draft, not a permutation search. One full read-through of the retained assembly, cross-checked against the exact label placement in games/gs1/asm/080dc1ec.s to confirm loop nesting (the outer 160-pass animation loop's body starts at .L16, which sits immediately after the single-particle facing/portrait setup, so that setup genuinely re-runs every outer pass rather than once). Corrected a type-safety bug found while cross-checking against 080e01e4 -- the single-word `DrawRectangleFn callback;` local was undersized against Func_080cef64's real two-word write (confirmed by the already-adopted runtime_owner_21.c); replaced with `callback_pair[2]`. Score at that point: candidate=624 reference=616 differing_halfwords=242 class=unemittable."},"family":{"assigned_template_owner":"main:08099160","assigned_template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Same mismatch as the other three owners assigned alongside this one: no shared callees with RunOrbitingParticleEffect, and the control flow (a fixed 256-slot particle-pool seed, then 160 outer animation passes each re-walking 64 of those slots) does not resemble the template's single 15-iteration spawn loop.","actual_sibling_evidence":"Same 0x03001eec work-block subsystem as 080d59b0/080d82b0/080e7404: identical Func_080cd594(mode)/Func_080e0524(id,work,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() shape and the same *(void**)0x03001EEC/0x03001EF0 work/draw_destination globals, now read via the cursor-advance idiom (`cursor = (void**)0x03001EEC; work = *cursor++; draw_destination = *cursor;`) confirmed to match the reference's `ldmia r3!, {r2}` exactly, same idiom already used by the adopted 080ce85c.c. This owner is the first of the four to call Func_080cef64(flag, out_pair). Per the already-adopted games/gs1/src/battle/effects/fetch_rectangle_blitters.c, Func_080cef64 unconditionally writes TWO words into out_pair -- Data_03001e50[46] then Data_03001e50[47] (the kind-46 and kind-47 allocator-cache slot values), regardless of the flag argument, which only selects which Func_080ed408 load parameters precede each write. Only callback_pair[0] (the kind-46 slot) is read downstream in this owner, callback_pair[1] is dead here.","velocity_growth_finding":"The inner j-loop's velocity arguments are NOT constant per outer pass: the retained assembly increments r8 (velocity_b, initialized to -(outer<<8)) and r9 (velocity_a, initialized to outer<<8) by -+(outer<<3) at the bottom of EVERY one of the 64 j-iterations (label .L2, reached unconditionally regardless of whether the gated draw code fired that iteration). velocity_a_j = (outer<<8) + j*(outer<<3); velocity_b_j is always exactly -velocity_a_j. This is worth checking against 080d59b0/080d82b0/080e7404 if any of them have a similar per-outer-pass velocity/angle argument passed into a small dispatch of 3-4 callees selected by (loop_index & 3) -- the same growth pattern likely recurs.","register_pressure_lever":"Concrete lever confirmed this pass: expressing the per-iteration velocity growth as `velocity_a += outer << 3;` (recomputed inline, no named intermediate) at the loop bottom, combined with computing velocity_b fresh via `velocity_b = -velocity_a;` at the top of each iteration (NOT as its own independent accumulator incremented by -outer<<3), keeps this compiler's register allocator inside the budget that lets `work` stay in fp for the whole function. Every variant tried that gave velocity_b its OWN persistent accumulator (whether via `velocity_b += -outer<<3` directly, via a named `neg_outer` variable, or via two independent inductions) pushed `work` out of fp entirely into a stack spill (regressing to candidate=640-664, differing_halfwords=288-302), even though the reference itself DOES use two independent accumulators (r8 and r9 both incrementing). This compiler's specific allocator does not tolerate the same register pressure our source produces for a functionally-identical dual-accumulator formulation, so the single-accumulator-plus-fresh-negation shape, despite being structurally different from the reference's r8/r9 pair, is the better regression-free way to express this pattern under real register pressure. Still short of matching reference's exact fp=work/sl=outer/r8=velocity_b/r9=velocity_a/r6=star/r7=j register assignment (candidate lands on fp=work/r9=outer/sl=velocity_a/r8=j/r7=star instead) -- worth a future pass with more register-allocation experimentation budget."},"rejected_experiments":["Panel pass: setup-section reshape (facing/Func_080049ac/Func_080051d8/Func_08004cb4 statement order and declaration placement at the top of the outer loop) -- zero measured effect, byte-identical output to baseline.","Panel pass: extracting `j & 3` into a named `selector` local while KEEPING the switch statement -- zero measured effect, GCC already CSEs the repeated `j & 3` regardless of naming; the win came specifically from replacing switch with an if-else chain, not from naming the selector.","Panel pass: within the winning if-else dispatch shape, a handful of alternate orderings (symmetric {0,1}/{2,3} grouping, swapping the inner case2/case3 test order) all scored worse (620/281 or 612/266) than the kept `selector > 1` first, {2,3} then {0,1} ordering.","Explicit `neg_outer = -outer;` variable (mirroring the reference's spilled -outer at sp+8) combined with either the accumulate-style or multiply-style velocity update: regressed `work` out of fp every time (matched_prefix dropped from 12 back to 7), regardless of where the variable was declared (function scope vs block scope -- declaration order/scope had zero measured effect on this compiler's allocation, only the actual computational shape mattered).","`velocity_a = (outer<<8) + j*(outer<<3)` computed fresh every iteration (letting the compiler's strength reduction alone do the work, no manual accumulation): produces the correct semantics and the compiler DOES strength-reduce it into a running accumulator, but this shape still regressed `work` out of fp (candidate=640, dh=290) -- worse than the manual single-accumulator-plus-negation shape (candidate=624, dh=277).","Two independent accumulators (`velocity_a += step; velocity_b -= step;`, with or without a named hoisted `step = outer<<3`): regressed to candidate=644-664, dh=288-302, always by evicting `work` from fp -- this is the shape closest to what the reference's own r8/r9 registers literally do, but this compiler cannot afford it alongside everything else without spilling `work`.","Swapping which of velocity_a/velocity_b is the persistent accumulator (`velocity_b` as accumulator, `velocity_a = -velocity_b` fresh): candidate=628, dh=283 -- slightly worse than velocity_a-as-accumulator (dh=277), kept the latter.","do-while vs for loop shape for the inner j-loop, tried both before and after the velocity-growth fix: zero measured effect on differing_halfwords in either case for this specific loop. (Earlier session hint that loop shape 'changes which locals get spilled' did not reproduce here.)","Chased the Func_080072f4 5th-argument-in-r4 call convention by checking whether the byte-exact sibling 080ce85c.c (member_orbit) proves the compiler can do this naturally: it does NOT -- member_orbit's apparent 7-arg Func_080072f4-shaped call is actually an INDIRECT call through a function-pointer value (`((DrawRectangleFn)rectangle_slot[slot & 1])(...)`, only 6 args), compiled via a `_call_via_r4` trampoline, a completely different mechanism from 080dc1ec's direct `bl Func_080072f4` with 7 literal arguments. No adopted source anywhere in games/gs1/src/ currently calls Func_080072f4 directly with 7 args, so this remains a genuinely unsolved, unprecedented calling-convention question -- not something this pass could responsibly resolve without inventing compiler behavior. Left as-is, matching the prior draft's decision not to re-litigate it.","Prior pass (see prior_note_2026_08_27a): result[2] clamp direction was initially inverted (fixed), and an overcomplicated table-lookup offset derivation was simplified to `(j & 3) * 770 + Data_080ede48[raw - 1]` (kept, still correct)."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080dc1ec.s), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080e01e4.c and their dossiers, the adopted games/gs1/src/battle/effects/puff_arc/run.c and member_orbit/run.c (including a temporary git-history restore of member_orbit's already-deleted retained asm, games/gs1/asm/080ce85c.s, from commit 629f662e7^, purely to re-verify its compiled register pattern for the r4-convention investigation above; the file was deleted again immediately after and is not present in the working tree), in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary (revised): a single-target (not per-member-list) battle-presentation sub-effect. Seeds a 256-slot particle pool at 0x02010000 with random signed positions and zeroed velocity/lifetime fields, sets up one fixed 3-word draw record (0,160<<15,0), then runs 160 animation passes. Each pass re-establishes the facing/portrait draw, computes a per-pass base velocity pair (velocity_a = outer<<8, velocity_b = -velocity_a) and then walks the first 64 pool slots; velocity_a/velocity_b GROW by +-(outer<<3) every one of those 64 sub-steps regardless of whether a slot fires, so the velocity kick applied to a firing slot depends on both the outer pass number and how far into the 64-slot inner walk it is. Once a slot's activation threshold (a function of its index divided by 4) is crossed and it is still marked inactive, it fires one of four velocity-kick calls selected by (index & 3) using the current velocity_a/velocity_b, transforms it through Func_080e3944, clamps and buckets the transformed distance into a lookup-table draw offset, and draws it via Func_080072f4; independently, once a slightly later threshold is crossed, the slot's position is decayed by a shifted, negated velocity term every pass (simple drag).","RESOLVED this pass: 'Func_080072f4' is not a real function. It is the r4 entry of the fourteen-slot _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s; every call modeled as `Func_080072f4(dest,src,x,y,callback,w,h)` is really an indirect call `((DrawRectangleFn)callback)(dest,src,x,y,w,h)` through the function pointer that ends up in r4. See score.note for the full derivation (arm_function_arg proof, r4-value provenance trace, cross-check against the already-adopted member_orbit/run.c's identical idiom). Remaining open question: getting this compiler to match the reference's exact fp=work/sl=outer/r8=velocity_b/r9=velocity_a/r6=star/r7=j register assignment rather than the leaner-but-different assignment this candidate currently produces -- unaffected by the r4 fix.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080dc454":{"schema_version":1,"namespace":"main","address":"0x080dc454","status":"measured-draft","owner_bytes":616,"score":{"measured":"2026-08-27","candidate_bytes":612,"reference_bytes":616,"differing_halfwords":229,"wrong_instructions":244,"class":"wrong","note":"First pass, drafted from games/gs1/asm/080dc454.s and the m2c-assisted disassembly at out/family-transplants/main-080dc454/m2c/target.canonical.s, adapting the family template games/gs1/src/battle/effects/member_orbit/run.c (owner 080ce85c, exact/adopted) rather than copying its unadapted transplant seed. Confirmed real structural differences from the template by reading the retained assembly directly, not by assuming the template's body: this owner takes no argument (r0 is clobbered before ever being read, so work's 0x7828 state pointer must already be established by a prior call); it registers only one draw routine (heap kind 46, no kind 47) and only one periodic callback (0x080CD261, no 0x080DBB9D) and tears down only that one pair at the end; it reads `facing` once before the frame loop instead of every frame; it has an entirely new 64-entry/28-byte-stride record table at work+0x7080 with no member_orbit counterpart, zeroed before the main loop; and its per-member drawing is 3 sprites indexed by member*3+i with a persistent per-slot angle accumulator (field 0xC, advanced by 0x200 every draw) plus a static i*0x5555 per-sprite offset, rather than the template's 4-sprites-recomputed-from-frame-number. Verified the two `bl Func_080072f0` / `bl Func_080072f8` sites are indirect calls through games/gs1/asm/080072e4.s's r3 and r5 call-via slots respectively (not real Func_080072fN symbols): the r3 site is modeled with the template's own proven idiom `((WordCopyFn)0x03001388)(dest, src, words)`; the r5 site's pointer is heap_cache[7] (the kind-46 draw routine), stored in a local `rect_fn` and called as `((DrawRectangleFn)rect_fn)(...)`, since r5 is not one of the four APCS argument registers. candidate-show --align confirms the first 11 instructions (the full heap_cache/cursor/facing prologue through the mode-1 Func_080cd594 call) are byte-identical (matched_prefix=11), and every branch target and call site in the normalized diff lines up positionally with no opcode mismatches -- the entire 229-halfword residual is `!`-class operand substitutions (registers and their matching stack-spill offsets), not a missing or extra instruction shape, control-flow difference, or wrong call target. The dominant single cause is that this compiler keeps `work` in fp for the whole function where the reference keeps it in r9 (and correspondingly the member-loop `screen[2]` local, which the reference keeps in fp, is fully stack-spilled here instead of getting any high register at all); nearly every other `!`/`+`/`-` line in the diff is a direct downstream consequence (the reference's `mov r5,r9; ldr r3,[r5,r2]` register-indexed-load idiom for repeated work->0x7828 reads becomes this candidate's `ldr r3,[pc,#N]; add r3,fp; ldr r3,[r3,#0]` fresh-pool-reload idiom instead, and every stack slot after the first spill shifts by 4-8 bytes along with the smaller 80-byte vs 88-byte frame). This is the exact fp/r9 residual already documented independently on three siblings in this same family (games/gs1/recon/en/dossiers.json#main:080d59b0, 080d82b0.json is its origin point, 080dc1ec.json) for the same shared 0x03001eec work-block idiom; see rejected_experiments below for this owner's own from-scratch confirmation that it is not source-shape-controllable here either."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; family score 8847/10000, the tool-assigned template for this owner. Structurally related (same 0x03001eec work-block idiom, same Func_080cd594/Func_08002f40/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 call shapes, same 0x7780/0x7784/0x7824/0x7828 field offsets, same WordCopyFn-via-call-via-r3 idiom), but not identical: this owner is 616 bytes vs the template's 724, takes no argument, has half the draw/callback setup, and replaces the template's per-frame BG2-affine sine-sweep table and frame-recomputed 4-sprite orbit with a persistent 64-slot angle-accumulator table and a 3-sprite-per-member orbit. The out/family-transplants/main-080dc454/080dc454.c seed was read but not used verbatim -- it is only the template's source with the symbol renamed, not adapted to this owner's real control flow."},"rejected_experiments":["Scoping `screen`/`screen2`/`record`/loop temporaries into their tightest enclosing block (matching the template's own nested-declaration style) instead of declaring everything at function top level: byte-for-byte identical candidate-show output (612/616/229/244) in both directions -- this compiler's register allocator is insensitive to C89 lexical declaration scope for this owner, as already found independently on sibling 080d59b0.","Reordering the top-level scalar-local declarations (moving `work` to the end of the declaration list, after canvas/palette/status/rect_fn/facing/y_offset): no change at all (612/616/229/244) -- declaration order does not affect this compiler's pseudo-register priority for this owner either.","Widening the `screen`/`screen2` member-loop buffers from 2 words to 3 (matching the template's 3-word `screen[3]`, on the theory that the reference's 8-byte-larger frame meant a missing third word): regressed to 640/616/271/260 and lost 2 bytes of matched_prefix -- these buffers are genuinely 2 words each; the frame-size gap is a downstream spill-slot symptom of the fp/r9 register choice below, not a missing local.","Introducing a named `state` local reassigned via `state = M2C_FIELD(work, void **, 0x7828);` immediately before every dereference (matching the 080d82b0.c sibling's own `target = M2C_FIELD(...)` re-assignment style, instead of nesting the field read inline at each use site): regressed slightly to 612/616/230/258 -- reverted to the inline nested form.","These four experiments independently reproduce the same conclusion 080d59b0.json and 080dc1ec.json already recorded for two other members of this family: this compiler's choice of fp over r9 for a whole-function loop-invariant work-block pointer is not controllable from declaration order, block scope, buffer sizing, or inline-vs-named field-read spelling. Per the project's standing guidance for this documented residual class, no register-hint hack or open-ended permutation search was attempted to force r9."],"bounded_flag_probe_2026_08_31":{"baseline":{"candidate_bytes":612,"reference_bytes":616,"differing_halfwords":229,"wrong_instructions":244,"work_register":"fp","stack_frame_bytes":80},"best_shipped_route":{"flags":["-fno-rerun-cse-after-loop"],"candidate_bytes":616,"reference_bytes":616,"differing_halfwords":208,"wrong_instructions":224,"work_register":"r9","stack_frame_bytes":80,"topology":"equal"},"neutral":["-fno-regmove","-fno-schedule-insns","-fno-cse-follow-jumps","-fno-thread-jumps"],"strictly_closer_but_not_best":{"-fno-gcse":226,"-fforce-addr":227},"regressed":["-fno-schedule-insns2","-fno-expensive-optimizations","-ffixed-r8","-ffixed-r9","-ffixed-r10","-ffixed-r11","-fcall-used-r8","-fcall-used-r9","-fcall-used-r10","-fcall-used-r11"],"compositions":"Adding -fno-gcse, -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, or -fno-thread-jumps to the best route did not improve 208 halfwords; adding -fforce-addr regressed to 226.","verdict":"The shipped flag changes the exact family-wide fp/r9 allocation decision and restores exact owner extent, but does not make the owner byte-exact. This is evidence for parent classification review, not an adopted per-owner route."},"compiler_backend_evidence_2026_08_31":["The allocator decoder identifies pseudo 34 as the source variable work: 18 uses across 175 instructions, one definition, no deaths, and 15 crossed calls. Canonical allocation maps it to r11/fp while the retained owner maps the same lifetime to r9.","With the single shipped optimization change -fno-rerun-cse-after-loop, the generated instruction stream changes mov fp,r1 to mov r9,r1 exactly as the reference does, and every subsequent palette-copy use also changes from mov r1,fp to the reference's mov r1,r9. The candidate simultaneously becomes exact-extent and equal-topology.","The remaining 208 halfwords retain the 80-byte candidate frame versus the reference's 88-byte frame and different promotion/spill choices for member-loop arrays and counters. No ABI allocation flag improves them; every -ffixed-rN and -fcall-used-rN probe for r8-r11 regresses to 291-294 halfwords and changes extent to 620 bytes.","The decoder's only structural suggestion was a member-count guard inversion. Rewriting the C as an explicit empty zero-count arm plus else compiled byte-identically, confirming GCC folds that spelling before allocation. The edit was reverted."],"notes":["Recovered only from games/gs1/asm/080dc454.s, the m2c-assisted disassembly and context under out/family-transplants/main-080dc454/m2c/, the adopted template games/gs1/src/battle/effects/member_orbit/run.c, sibling drafts games/gs1/recon/en/main/080d82b0.c and 080e7404.c (and their .json dossiers) for the shared 0x03001eec work-block field/callee vocabulary, games/gs1/asm/080072e4.s for the call-via trampoline layout, and the approved local EN ROM/compiler. No other Golden Sun decompilation project, symbol map, or pseudocode dump was consulted.","This candidate claims zero DONE bytes; it is a measured-draft, not adopted.","Semantic summary: a small battle-presentation sub-effect sharing the 0x03001eec work block with 080ce85c and its siblings. Takes no argument (its state pointer must already be set up by a caller). Opens one display window (heap kind 46), copies a palette through the shared IWRAM word-copy routine, and sets a BG2-affine-related pair of work fields to (1,0) then (2,75) before registering one periodic callback (0x080CD261, 0x480-frame interval). Computes a vertical offset from state field 4 and writes it (shifted) to the BG affine Y register, then zeroes a new 64-entry/28-byte orbit-angle record table. Runs member_count*16+64 frames; each frame re-derives every listed party member's screen position via Func_080e396c (adjusted by the vertical offset) and, for the 64-frame window each member is active, also calls Func_080e3944 on that member's 3D position for its side effects only, then draws 3 sprites per member orbiting a persistent per-slot angle accumulator advanced by 0x200 per draw, spaced 120 degrees apart, through the single traced draw-routine function pointer.","Value_000000a9 follows the established Value_ spelling for a small absolute link-time resource id (games/gs1/src/battle/effects/member_orbit/run.c's own Value_000000af comment documents the same reasoning: an ordinary integer literal would compile to a `movs` immediate, not the reference's literal-pool load).","Func_080e396c(s32 member_id, s32 *screen) is a distinct callee from the already-used Func_080e3944(void *source, void *screen): the retained assembly calls the two at different addresses with different argument shapes (member id directly vs. a 3-word position record), so they were declared and used as separate functions rather than assumed to be the same callee."]},"main:080dc6bc":{"schema_version":1,"namespace":"main","address":"0x080dc6bc","status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":684,"score":{"measured":"2026-08-27","candidate_bytes":684,"reference_bytes":684,"differing_halfwords":169,"wrong_instructions":156,"class":"wrong","note":"First structural draft, not a permutation search. Read games/gs1/asm/080dc6bc.s and out/family-transplants/main-080dc6bc/m2c/target.canonical.s in full and hand-derived the whole control-flow/field shape from the retained assembly (the transplant workspace's top-level 080dc6bc.c was only the member_orbit template with the symbol renamed and was not used as source). The shared-family prologue/epilogue and the two Func_080ed408(kind,7,7,c,d)/heap_cache[7]/heap_cache[8] rectangle-callback reads match the assigned template (main:080ce85c, score 8895/10000) exactly, but the body is a different effect entirely: a 64-entry, 28-byte particle table seeded at work+0x7080 (same base and record size as the already-adopted puff_arc/run.c Puff array) with a random polar offset per particle, then 96 frames that walk the member list and, for a member whose 40-frame window is open, draw its 6-particle group through one of two cached rectangle callbacks. Three real structural bugs found and fixed by reading the aligned diff, in order of value: (1) writing the particle-group pointer as ordinary `Particle *` pointer arithmetic (`base_particle_array + base_idx`) let this compiler's loop-strength-reduction turn the per-member `base_idx += 6` accumulator into a pre-multiplied `+= 168` byte-stride induction variable -- the reference instead recomputes `base_idx*28` fresh at each use via an explicit `(base_idx<<3 - base_idx)<<2` shift-sub-shift sequence with `base_idx` itself staying a plain +=6 memory scalar; spelling the multiply out in C the same way (`(base_idx << 3) - base_idx) * 4`) defeated the induction-variable rewrite and was the single largest fix: candidate_bytes 680->684 (byte-count exact), differing_halfwords 234->173. (2) Swapping the two velocity-field multiplications from `magnitude * Func_08002322(angle)` to `Func_08002322(angle) * magnitude` (and the sine equivalent) flipped which operand this compiler copies into the destination register before the `muls`, matching the reference's own `adds r3,r6,#0 / muls r3,r0` shape instead of the reverse; differing_halfwords 173->169. (3) Tried moving `member = 0` before the member-count guard to match the reference's own unconditional pre-guard `str r2,[sp,#20]` -- this is a real, observed reference scheduling choice, but on this owner's actual register/frame layout it scored slightly worse (differing_halfwords 234->237 measured against the pre-fix-(1) baseline) rather than better, so it was reverted and left as the original if-scoped declaration. All immediate operands, branch conditions, and call targets in the current aligned diff match the reference exactly; every remaining `!`/`+`/`-` line is either a register-letter swap or a stack-slot-offset shift downstream of one root cause (see family.register_finding below), or a scheduling reorder of independently-valued immediate loads (the `(clamped*9<<7)+0x1B00` source-address computation for the slot-5 draw call is emitted in a different but net-equivalent instruction order, same instruction count both sides) -- exactly the two residual classes this family's dossiers already document as not source-shape-controllable, so neither was chased further."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The prologue (cursor-advance work/draw_destination read, work+0x7828 state publish, Func_080cd594(0)) and epilogue (Func_08004278/Func_08002dd8 x2/Func_080cdbc0) match the template's shape exactly, and the two Func_080ed408(kind,7,7,c,d) + heap_cache[kind-39] rectangle-callback reads are the same idiom -- but the template's own body (a per-member orbiting-sprite draw driven by a 160-entry sine scanline table, two Func_080041d8 periodic-callback registrations, a member_count*16+48 frame count) does not appear here at all. This owner is 684 bytes vs the template's 724 and has a materially different, shorter body: a single Func_080041d8 registration, a fixed 96-frame loop, and a 64-entry particle table with random-polar-offset physics that the template has no equivalent of.","actual_sibling_evidence":"The real body matches the 0x03001eec 'battle work' subsystem documented at games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c, and especially the already-adopted games/gs1/src/battle/effects/puff_arc/run.c: same work+0x7080 28-byte-record particle table base address and record size as puff_arc's Puff array (x,y,unk08,unk0C,unk10,unk14,tick), same heap_cache[kind-39] (Data_03001e50-equivalent) rectangle-callback cache, same work+0x7780/0x7784/0x7824/0x7828 scalar fields, same *(s32*)0x03001E80 'facing' global, same Func_080049ac/Func_080051d8/Func_08004cb4 per-member portrait-setup triple already established (with an identical single-argument Func_08004cb4(record) call) in games/gs1/recon/en/main/080d59b0.c's dossier, and the same count-at-+20/id-array-at-+36 effect-state layout as puff_arc's Efx struct (cnt, actors[8]).","register_finding":"The dominant remaining residual is this compiler choosing r9 for 'work' where the reference keeps it in sl for the whole function (visible from the very first `mov sl,r1` vs candidate's `mov r9,r1`), with 'work'-relative address adds (`add rX,sl` vs `add rX,r9`) and a knock-on loop-counter role swap (particle-init 'i' and the inner draw loop's 'slot' counter: reference reuses r9 for both non-overlapping roles, candidate uses sl) accounting for the large majority of the remaining differing_halfwords. This is the same 'register allocator keeps a loop-invariant address in a different high register' class already documented as not source-shape-controllable elsewhere in this family (member_orbit/080dc1ec/080d59b0 dossiers); declaring `work` first among the locals and scoping the early-dead `palette`/`status`/`particle`/`i` locals into narrower blocks were both tried and had zero measured effect (still 169/156), consistent with that precedent, so neither was kept as a source change.","call_convention_note":"`bl Func_080072f0` (the WordCopyFn palette-blit) and `bl Func_080072f4` (both DrawRectangleFn draw calls) are the r3 and r4 entries of the fourteen-slot `_call_via_rN` trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8` at 0x080072e4+4*N, N=r0..sp), not real functions named Func_080072f0/Func_080072f4 -- confirmed the same way 080dc1ec.json/080d59b0.json already derived it (arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c never places an argument in r4; tracing the r3/r4 values back to their origin shows a WordCopyFn pool constant and the two cached heap_cache[7]/heap_cache[8] rectangle pointers respectively) and modeled the same way the already-adopted member_orbit/run.c does, as direct casts-and-calls through function-pointer values."},"rejected_experiments":["Ordinary `Particle *` pointer arithmetic for the group base (`(Particle*)(work+0x7080) + base_idx`): compiles correctly but this compiler's loop-strength-reduction rewrites the per-member `base_idx += 6` accumulator into a pre-scaled `+= 168` byte induction variable instead of the reference's plain `+= 6` scalar with a fresh `(x<<3-x)<<2` multiply at each use; cost 4 candidate_bytes and regressed differing_halfwords from 173 to 234 relative to the fix. Superseded by writing the `(base_idx << 3) - base_idx) * 4` byte-offset expression directly, which reproduces the reference's shift-sub-shift sequence and defeats the induction-variable rewrite.","Hoisting `member = 0` before the member-count guard (matching the reference's own unconditional `str r2,[sp,#20]` scheduling immediately after `facing`): scored differing_halfwords 237 vs 234 on the pre-fix-(1) baseline, a small regression rather than an improvement; reverted to the if-scoped declaration.","Scoping `palette`/`status` and `particle`/`i` into narrower nested blocks to shrink their live ranges ahead of the member-walk loop, hoping to relieve the register pressure behind the sl/r9 work-register swap: zero measured effect (169/156 both ways). Reverted to flat top-of-function declarations matching sibling style.","Declaring `work` as the first local instead of after `heap_cache`/`cursor`: zero measured effect on the sl/r9 assignment (169/156 both ways). Reverted to the more natural heap_cache/cursor/work/draw_destination declaration order."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080dc6bc.s and its m2c-assisted disassembly at out/family-transplants/main-080dc6bc/m2c/target.canonical.s, byte-identical content, cross-checked line by line by hand), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, in-repository headers, and the approved compiler. out/family-transplants/main-080dc6bc/recipe.json and alignment.json were read for the family score and template pointer only; the workspace's top-level 080dc6bc.c (a naive symbol-renamed copy of the template) was explicitly not used as a source basis, per the assignment note that this owner (684 bytes) is not the same body as the 724-byte template.","This candidate claims zero DONE bytes -- differing_halfwords is 169, not zero, so it is not adoption-eligible under the project's zero-differing-reference-bytes gate.","Semantic summary: a battle-presentation sub-effect from the 0x03001eec work-block subsystem. Seeds a 64-entry, 28-byte particle table at work+0x7080 with a random polar offset per particle (masked 16-bit angle, masked 8-bit magnitude via Func_08004458, converted through Func_08002322/Func_0800231c; a modulo-6 'element' of 5 gets a zeroed offset instead of a computed one), loads a palette and BG2/BG3-format sprite sheet into the work block via a WordCopyFn trampoline call, opens two rectangle-blit heap kinds (46 and 47), then runs 96 frames. Each frame replays the shared facing/portrait setup for every listed party member and, for a member whose 40-frame window [member*8, member*8+40) is currently open, walks that member's six-particle sub-group (base index member*6 into the shared 64-entry table) and draws each particle through one of the two cached rectangle callbacks, selecting the callback and a growth-animation source-sprite-sheet offset (0..5, clamped) by the particle's own per-render tick counter, with the group's sixth particle (slot 5) drawn from a second sprite sheet 0x1B00 bytes further into the work block through the kind-46 callback while the other five draw from the base sheet through kind-47.","The particle table's unk0C/unk10 fields (the polar-offset x/y computed at spawn) are written once at init and never read again anywhere in this owner's own retained instructions; only the tick field (+24) is read and incremented per render. This is consistent with -- not contradicted by -- the shared Func_080041d8((void*)0x080CD261, 0x480) periodic callback already treated as an opaque, unrecovered external routine by every sibling in this family; no claim is made here about what that callback does with the table.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted.",{"measured":"2026-08-29","note":"Un-refuted lead: the candidate spends an extra stack slot caching work+0x7828 (sub sp,#68 vs reference sub sp,#64); the reference recomputes the address register-indexed (ldr r3,[r4,r2], r4=sl) at both guard sites without storing it. No spelling tried yet keeps the recompute while avoiding the slot."},{"measured":"2026-08-31","note":"Retained-assembly proof completed: the current canonical compiler reproduces the complete 684-byte extent with equal branch topology. The audited residual is the documented sl/r9 allocation cascade plus the one equivalent work+0x7828 spill/recompute choice and independent immediate scheduling; every call, literal, branch condition, field offset, and memory operation remains accounted for. Relocation-normalized cross-edition verification proves 530 core bytes identical across all six GS1 editions (28 relocations and 10 literal fields normalized). The approved compiler-route/pass matrix preserves the residual or regresses, and the bounded source experiments recorded above do not control the allocation."}],"rejected":[{"hypothesis":"hoist M2C_FIELD(work, void **, 0x7828) into an explicit object_state local reused at all three access sites, to defeat the candidate-only stack-slot caching (frame 68 vs reference 64)","measured":"2026-08-29","differing_halfwords":228,"baseline":169,"verdict":"regressed"},{"hypothesis":"rewrite the loop-end field access as array indexing instead of the M2C_FIELD macro to dodge tree-CSE","measured":"2026-08-29","differing_halfwords":169,"baseline":169,"verdict":"no change; identical instruction stream"}]},"main:080dc968":{"schema_version":1,"namespace":"main","address":"0x080dc968","status":"measured-draft","owner_bytes":2372,"candidate_bytes":2400,"differing_halfwords":1183,"wrong_instructions":1152,"classification":"structural-topology","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted the next-largest no-candidate main-ROM owner after repairing the aggregate-aware m2c draft's invalid pointer and table expressions. A fresh canonical compile produces 2260 bytes for the 2372-byte reference; topology differs and 1164 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","Mechanical repairs resolved the four neighboring work cells at 0x03001eec-0x03001f00, typed GBA register writes, typed u8/u16/s8 ROM-table loads, and signed-halfword member-id access. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The function is a large battle presentation with two particle systems, nine render objects, staged sprite-cell drawing, 220-frame and later particle phases, and member-triggered audio/action calls. A permanent name is deferred until caller and dispatch evidence identifies its role.","2026-08-30: replaced all sixteen fictional direct Func_080072f4 calls with the typed six-argument callback loaded from 0x03001f08. This satisfies the call-via-r4 lint and restores the omitted width/height arguments. The semantically corrected draft is 2400/2372 bytes with differing branch topology, 1183 differing halfwords, and 1152 wrong instructions; the raw score is noisier because the corrected stack arguments change the frame and scheduling, so it remains Draft C and claims zero DONE bytes."]},"main:080dd2c4":{"schema_version":1,"namespace":"main","address":"0x080dd2c4","status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":1208,"score":{"measured":"2026-08-30","candidate_bytes":1208,"reference_bytes":1208,"differing_halfwords":73,"wrong_instructions":60,"class":"allocation","note":"Current exact-extent ordinary-C reconstruction has equal branch topology and 73 differing halfwords / 60 wrong instructions. The residual begins after a 242-instruction exact prefix in the member-blit block: equivalent constants and the work+0x7080 carrier occupy reciprocal low registers, followed by equivalent scheduling of the loop counter and 28-byte pointer increments. The streams resynchronize around every cluster; calls, branches, literals, memory addresses, values, and observable behavior agree.","fixes_applied":"Earlier structural recovery brought the owner from 1196 to the exact 1208-byte extent, fixed work in fp, preserved the reference's 56-byte frame, modeled all four r4-trampoline calls as genuine indirect DrawRectangleFn calls, and reduced the score from 505 to 73 differing halfwords."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 7688/10000 on call-target/n-gram similarity, not structural identity -- confirmed real per the task brief: owner is 1208 bytes vs template's smaller size, and the naive symbol-renamed transplant at out/family-transplants/main-080dd2c4/080dd2c4.c is NOT what this owner does. Shares the template's 0x03001eec heap_cache/cursor top-of-function idiom, the M2C_FIELD field-offset convention, the same 'object' argument struct (field 4 mode flag, field 0x14 member count, field 0x24 per-member id array stride 2), and the identical DrawRectangleFn rectangle_slot[2] pair sourced from Func_080ed408(46,...)/Func_080ed408(47,...) with the SAME CSE-avoidance shape (rectangle[0] assigned between the two Func_080ed408 calls, rectangle[1] assigned via a separate second_rectangle local after both, exactly matching the template's own documented reason for that shape). Diverges structurally: takes a second argument (mode) that selects between two Value_ ID constants passed to Func_080e0524 and between two parallel draw-table sets; owns a much larger body (a 1024-slot particle-pool init, a 16-entry per-index table init, a per-frame animation loop bounded by a byte-table lookup on a NEW object field (0x18) not used by the template, a nested spC-inner loop doing two conditional draws through rectangle_slot[1&idx], a member-dispatch Func_080d6888 loop, a 512-slot particle-claim search, and an unconditional-every-frame 0x200-entry particle draw loop using rectangle[0]/rectangle[1] directly rather than by parity) -- a genuinely different, larger sub-effect from the template's single 60-frame orbit animation, exactly as the task brief warned."},"rejected_experiments":[{"experiment":"Model every `bl Func_080072f4` as a direct 4-6 argument call to a real function named Func_080072f4 (as m2c's raw output and as some open, not-yet-exact family siblings' drafts do).","result":"0x080072f4 is 0x080072e4 + 4*4, exactly the r4 slot of the 14-entry _call_via_rN trampoline bundle in games/gs1/asm/080072e4.s. All four call sites in this owner load a genuine traced function-pointer value into r4 immediately before the bl (rectangle_slot[1 & idx] for the two spC-loop sites, rectangle[0] and rectangle[1] directly for the two final-loop sites) -- modeled as ((DrawRectangleFn)pointer)(...) instead, per the task brief's CRITICAL instruction and matching the already-adopted member_orbit/run.c's identical idiom.","class":"accepted"},{"experiment":"Chase the fp/r9 (work vs. innermost-loop-counter) register swap further with additional source reshapes (declaration order, block scoping, splitting the two loop-counter roles into distinct never-reused locals).","result":"Not attempted beyond the two fixes recorded in score.fixes_applied, given this exact swap pattern is already documented as resistant to ~8 independent targeted reshapes in the closely related sibling 080dc1ec (see its score.note prior_note_2026_08_27c/d) -- treated as the same known, not-source-shape-controllable residual rather than re-running that search here.","class":"rejected"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080dd2c4.s), the approved local EN ROM, the generated m2c-assisted context in out/family-transplants/main-080dd2c4/m2c/ (target.canonical.s, target.lst, 080dd2c4.c), the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, games/gs1/asm/080072e4.s, and the measured-draft siblings named in this session's task brief (080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c, 080dc454.c, 080dc6bc.c, 080ccc38.c, 080cb4ec.c, 080d5c48.c) and their dossiers, plus the approved compiler.","The complete 1208-byte retained owner is Proven ASM under the battle_effect_compiler_allocation_module classification; the semantic C remains available as the evidence-bearing reconstruction.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 956 non-relocation core bytes identical.","A shipped GCC 2.96 flag sweep on 2026-08-31 tested no-regmove, GCSE, both schedulers, CSE follow/skip blocks, rerun-CSE-after-loop, strength reduction, expensive optimizations, thread jumps, and combined no-regmove/GCSE/expensive-optimization routes. Canonical no-schedule-insns and no-cse-follow-jumps were neutral at 73 differing halfwords; every other route regressed or changed extent. No route emitted the reference allocation.","Semantic summary: a battle-presentation sub-effect on the same 0x03001eec work-block subsystem as member_orbit, taking (object, mode). Seeds a 1024-slot particle pool at 0x02010018 (stride 28, field 0x18=-1 marks a slot free) and a 16-entry per-index table at work+0x7080 (positions/heights seeded from Func_08004458() and clamped against Data_080eeb4b[Func_080022fc(i,3)]), then runs a byte-table-bounded (Data_080eeb5e[object->0x18]) sequence of frames. Each frame conditionally shows a HUD countdown near the end, and -- while more than 4 frames remain -- runs a nested spC-inner loop (bounded by the same Data_080eeb5e byte) that: sometimes toggles work->0x77A8, draws a rectangle through rectangle_slot[1 & idx] using one of two parallel Data_080eeb4[48/4E]/[54/58] table pairs selected by mode (with an extra Data_080eeb71 clamp in the mode!=0 case), dispatches Func_080d6888 once per listed member (object field 0x24, stride 2, object field 0x14 count) at a specific milestone frame, and at two other milestones claims one free slot from a SEPARATE 512-slot pool at 0x02010000. Every frame, unconditionally, also walks that whole 512-slot pool drawing any active slot's particle twice (via rectangle[0] then rectangle[1] directly, not by parity) with a decaying lifetime field, before flagging work->0x7824 and yielding a frame via Func_080030f8(1).","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."],"rejected":[{"hypothesis":"move var_sl_273 = work + 0x7080 inside the do-loop after sp0C so its pseudo is created second and GCC rehoists it","measured":"2026-08-29","differing_halfwords":199,"baseline":73,"verdict":"regressed; owner also shrank to 1204 bytes"},{"hypothesis":"assign sp0C = 8 before the guard so the small-constant pseudo is created ahead of the pointer, matching the reference r1/r2 roles","measured":"2026-08-29","differing_halfwords":560,"baseline":73,"verdict":"regressed; owner grew to 1232 bytes"},{"hypothesis":"apply the wave decoder's named swap_declarations(draw_destination,rectangle) repair literally","measured":"2026-08-30","differing_halfwords":73,"baseline":73,"verdict":"no improvement; exact extent and wrong-instruction count stayed fixed, while the router weakened from allocation_covered to allocation_uncovered; reverted"},{"hypothesis":"spell the four pool-loaded numeric constants as linker-resolved Value_ absolute symbols so GCC selects word rather than halfword PC loads","measured":"2026-08-30","differing_halfwords":132,"baseline":73,"verdict":"the local load widths matched, but literal-pool ordering moved globally and regressed the byte score from 73 to 132; reverted"}]},"main:080dd77c":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080dd77c","status":"measured-draft","owner_bytes":580,"score":{"measured":"2026-08-27","candidate_bytes":504,"reference_bytes":580,"differing_halfwords":272,"wrong_instructions":238,"class":"unemittable","note":"Third sibling of 0x080ccebc/0x080ecef4 (same call-target/n-gram family, not select_party_member.c's control-flow shape). Shares the confirmed setup idiom (stash arg0 into the shared effects struct at +0x7828 off ADDR_03001EEC, average two EffectPosition_ApplyStepAndYOffset results with the signed-divide-by-2 idiom, a 16-entry byte-table fill loop writing field+64 into 28-byte-strided struct slots, Scheduler_AddOrUpdateCallback/RemoveCallback bracketing a fixed-count frame loop). This owner additionally opens with a call into Func_080de2f8 (itself still an unresolved 1,660-byte owner, rank 107 in the coverage table) and its main loop carries a second, nested 16-column loop computing a per-column reveal width that grows then shrinks with the frame counter -- the retained assembly's exact width formula for the growth phase was not pinned down with confidence in the time available, and the prologue register set (fp/sl/r9/r8, matching the family's other two members) is right but the body diverges quickly after that."},"rejected_experiments":[],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","This is the lowest-confidence of the three sibling drafts: the outer setup (Func_080de2f8 call, EffectPosition averaging, the 16-entry table-fill loop, the Scheduler bracket) is transcribed fairly directly from the assembly and mirrors the other two owners, but the nested 16-column reveal-width loop is an approximation of the observed compare/branch shape (thresholds at col*2+4, col*2+5, col*2+32, a clamp at 32) rather than a verified formula; the retained assembly's exact arithmetic for the growth-phase width, and the meaning of `Func_080d6888`'s five arguments here versus in 0x080ccebc, were not independently confirmed.","class=unemittable on this measurement means the candidate compiled but the tool flagged something about instruction emission beyond a plain structural mismatch; that was not root-caused given time spent, and is noted rather than silently reported as an ordinary 'wrong' score.","This is a source-shape gap, not a last-mile compiler residual: recovering Func_080de2f8's real signature and the shared effects-struct layout first (the same struct 0x080ccebc, 0x080ecef4, and apply_shake.c/apply_step_and_y_offset.c all touch) would very likely make all three siblings converge faster than further respelling of this owner alone. This candidate claims zero DONE bytes."]},"main:080dd9c0":{"schema_version":1,"namespace":"main","address":"0x080dd9c0","status":"mapped","measured":"2026-08-29","map":{"head":"0x080dd9c0","head_symbol":"FunctionHead_080dd9c0","head_file":"games/gs1/asm/080dd9c0.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8 -- full r8-r11 save (frame size set further in-body).","true_epilogue":{"file":"games/gs1/asm/080ddb34.s","note":"Ends `... bl sub_08004278 / movs r0,#47 / bl sub_08002dd8 / movs r0,#46 / bl sub_08002dd8 / bl sub_080cdbc0 / add sp, #52 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. 52-byte frame, four-high-register restore, same sub_08002dd8/sub_080cdbc0 cleanup idiom seen across the sibling functions in this batch. This is the sole real epilogue -- it does not branch further."},"span":{"start":"0x080dd9c0","end_exclusive":"0x080ddde0","size_bytes":1056,"derivation":"end = start of next asm file games/gs1/asm/080ddde0.s, immediately following 080ddb34.s which owns the epilogue. size = 0x080ddde0 - 0x080dd9c0 = 0x420 = 1056."},"member_regions_in_order":[{"addr":"0x080dd9c0","symbol":"FunctionHead_080dd9c0","file":"games/gs1/asm/080dd9c0.s","role":"real prologue + setup, in-file literal pool, tail branches to Continuation_080dda3c"},{"addr":"0x080dda3c","symbol":"Continuation_080dda3c","file":"games/gs1/asm/080dda3c.s","role":"branch continuation, in-file literal pool, tail branches to sub_080ddb34"},{"addr":"0x080ddb34","symbol":"Region_080ddb34","file":"games/gs1/asm/080ddb34.s","role":"call-graph-reached prologue-less region that contains the real, shared epilogue"}]},"domain_evidence":["080dd9c0/080dda3c both self-describe as head/continuation of a multi-region function ('\u8907\u6570\u9818\u57df\u306b\u5206\u5272\u3055\u308c\u305f\u547c\u51fa\u3057\u53ef\u80fd\u95a2\u6570\u306e\u5148\u982d\u90e8' / '\u8907\u6570\u9818\u57df\u95a2\u6570\u306e\u7d99\u7d9a\u90e8').","080ddb34 is tagged with the call-graph-reconstructed comment and opens with a bare `mov r8, r6` (no push), i.e. it is prologue-less and reached only by the preceding region's plain `b` -- yet it contains the complete matching epilogue, confirming it is the terminal member rather than an independent callee.","Note this is a distinct, smaller cluster from the immediately adjacent 080ddde0/080de0d4 pair (see companion dossier 080ddde0.json) -- the two clusters sit back-to-back in the file listing but do not share any cross-references; 080dd9c0's cluster ends cleanly at the 080ddde0 boundary."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080dd9c0.c --owner 080dd9c0 --size 1056","status_update":{"measured":"2026-08-29b","state":"measured-draft, not exact -- region3 now a faithful structural port (was a placeholder), region1/continuation residual unchanged","score":{"candidate_bytes":944,"reference_bytes":1056,"differing_halfwords":515,"wrong_instructions":520,"matched_prefix":7,"prior_session_score_for_comparison":{"candidate_bytes":556,"differing_halfwords":498,"wrong_instructions":453}},"region3_this_session":{"ground_truth_method":"candidate-show's own .s reassembly could not resolve Region_080ddb34's literal pool (no .word data in the fragment file -- the pool lives past the fragment's own end, per CONTRIBUTING.md's 'gap between two fragment files' case). Read it straight out of the ROM instead: `arm-none-eabi-objdump -D -b binary -m arm --adjust-vma=0x08000000 -Mforce-thumb --start-address=0x080ddb34 --stop-address=0x080ddde0 roms/gs1-en.gba`, plus a raw little-endian word dump of 0x080dddb8..0x080ddddc for the pool bytes themselves (objdump misdecodes the pool as bogus Thumb2 instructions when printed inline). Also re-ran the same disassembly over 080dda3c.s's own range (0x080dda3c..0x080ddb34) to get the exact address and byte shape of `sub_080ddaba` (a local label inside the continuation file, at 0x080ddaba, not a separate region) -- this resolved the true per-frame loop body boundary, which sits between the once-only fade_start/end_wait setup (0x080ddab0..0x080ddab8) and Region_080ddb34's release/retire logic.","corrections_to_prior_placeholder":["Blend condition was inverted: real ASM (`cmp r4,r6; blt .L_080ddae4`) skips the BLDCNT/BLDALPHA fade write when frame < end_wait, i.e. the write happens when frame >= end_wait. The prior candidate and this session's initial draft both had `if (frame < end_wait)`; fixed to `if (frame >= end_wait)`.","The release-scan/retire-scan block is NOT gated as a whole by `Data_080eebb6[table->24] != 0` -- only the release+retire LOOP is skipped when that gate is 0 (continuation jumps straight to `sub_080ddcda`, the interpolation loop entry, in that case). The interpolation loop over the 64-slot particle array at 0x02010000, plus the Func_080e155c/Func_080cd52c/work->0x7824=1/Func_080030f8(1) tail, run unconditionally every frame regardless of the gate. The prior placeholder wrapped everything (including the interpolation loop) inside the gate check -- restructured so only the release/retire while-loop is conditional.","The retire/announce scan (loop over table->20 members, calling Func_080f9010(132)+Func_080d6888(table->[36+2*i],7,5,i,3) when frame==announce_frame) is a SEPARATE, much simpler shape than the prior placeholder's do-while-over-64-particle-slots -- the real loop only iterates over `i` in [0,table->20), reading a single s16 member id per i from the table, with the announce condition (frame==a single scalar announce_frame, not per-member) shared across all i. The 64-particle-slot scan in the prior placeholder does not exist in this loop; it belongs to the separate interpolation loop after the release/retire portion.","Added the missing particle-spawn block (frame < release_threshold+3): scans the 64-slot particle array at 0x02010000 for a free slot (particle[6]==-1), and on finding one, sets particle[0]=clamp(*release_flag_ptr + (rng()&31) + 32, max 96), particle[1]=(rng()&31)+72, particle[6]=0. This block was entirely absent from the prior placeholder.","Added the missing one-time flag write `work->0x77a8 = 3` when frame==release_threshold+1 (was entirely absent).","Added the real dual-draw-function release logic: Data_080eeba6[release_count] selects Func_080072fc (value<=1) vs Func_080072f4 (value>1); bit 0 of that same byte then selects the +/- sign on the x argument and (for the >1 branch) which of two fixed byte offsets (0xF00=3840 vs 0x6C0=1728 from `work`) forms the src pointer. Both geometry variants (16x/6x-scaled window clamped to 80/30, vs 8x/1x-scaled window clamped to 64/8) were read directly from ROM and transcribed with their real clamp constants -- the prior placeholder had invented zero-valued x/y/w/h and a single draw call.","Added the real 64-slot interpolation loop (label 0x080ddcda onward): for each particle with state (offset 24) >= 0, half=state/2 indexes three ROM tables (Data_080eebc8 u16 src-offset, Data_080eebc0 signed byte 'amplitude A', Data_080eebb9 signed byte 'amplitude C'); two Func_080072f4 calls draw the particle offset by valC/halfA and un-offset, respectively; state increments and resets to -1 at 14. This subsystem did not exist at all in the prior placeholder."],"unresolved_residual":"Every Func_080072fc/Func_080072f4 call site in the reference loads a 7th value into r6 immediately before the `bl` (the currently-selected draw_cb_46/draw_cb_47 heap-cache function pointer) in addition to the 6 args actually placed in r0-r3/sp+0/sp+4. r6 is not an APCS argument register for a 6-arg call and the project rule forbids forced registers / inline asm, so this session declared both functions with 6 params only and dropped the r6 value -- documented in the .c file's own comment above the prototypes. This is very likely why candidate_bytes (944) undershoots reference (1056) even with region3 now structurally complete: the real callee probably has a 7-argument shape (or the two draw_cb pointers are passed via some other project-wide convention this dossier hasn't identified yet), and until that's resolved the call sites and surrounding stack frame cannot match exactly."},"compiles":true,"family":"Confirmed as a fuller sibling of the 0x03001eec 'battle work' / heap_cache subsystem (games/gs1/recon/en/main/080d82b0.c, 080d85d0.c, games/gs1/src/battle/effects/member_orbit/run.c). heap_cache=(void**)0x03001EEC prologue idiom, work+0x7828 state pointer, Func_080cd594/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 calling shapes all confirmed by hand pool resolution and cross-checked against these siblings.","resolved_literal_pools":{"LiteralPool_080dda18 (in 080dd9c0.s, base 0x080dda18, matches given label)":{"0x080dda18":"0x00000100 -- REG_BG2PA value (identity affine scale)","0x080dda1c":"0x00000000 -- REG_BLDCNT clear","0x080dda20":"0x00001010 -- REG_BLDALPHA value","0x080dda24":"0x03001eec -- address of the Data_03001eec heap_cache pointer variable","0x080dda28":"0x00007828 -- work+0x7828 field offset (state/table pointer)","0x080dda2c":"0x04000020 -- REG_BG2PA address","0x080dda30":"0x0000007e -- Func_080e0524 resource_id argument","0x080dda34":"0x04000028 -- REG_BG2X address","0x080dda38":"0xffff9000 -- REG_BG2X value written when table->4==1"},"LiteralPool_080ddb0c (in 080dda3c.s, base 0x080ddb0c, matches given label)":{"0x080ddb0c":"0x00003f44 -- REG_BLDCNT fade value","0x080ddb10":"0x00001000 -- blend-alpha OR mask","0x080ddb14":"0x00007784 -- work+0x7784 field offset","0x080ddb18":"0x080cd261 -- scheduler callback address for Func_080041d8","0x080ddb1c":"0x080eebb6 -- ROM byte table indexed by table->24 (frame-bound multiplier AND per-frame gate)","0x080ddb20":"0x02010018 -- particle pool base (1024 slots, stride 28 bytes, reset to -1)","0x080ddb24":"0x04000050 -- REG_BLDCNT address (fade path)","0x080ddb28":"0x04000052 -- REG_BLDALPHA address (fade path)","0x080ddb2c":"0x00007828 -- work+0x7828 field offset (re-read each frame)","0x080ddb30":"0x080eebae -- second ROM byte table (0x080eebb6 - 8), used inside the per-frame region3 body"},"resolution_method":"Hand pc-relative arithmetic against each .s file's own instruction stream, cross-checked with `arm-none-eabi-as -mthumb` + `arm-none-eabi-ld -Ttext=` + `objdump -d --adjust-vma=` standalone reassembly of each region. Caveat: the reassembly widened the two 080dd9c0.s branches to .set absolute symbols (bne/b to sub_080dda3c) into 4-byte bne.w/b.w forms, which shifts the tool's own computed addresses for the final BG2X pool pair by 4 bytes versus the ROM's real narrow encoding; the given LiteralPool_080dda18 label position (consistent with narrow branches, i.e. the real ROM encoding) was used as ground truth for that pair instead of the widened reassembly's arithmetic. 080dda3c.s and 080ddb34.s branch only to near local labels (no cross-file .set targets before the pool), so their reassembly address arithmetic is trusted directly."},"frame_ledger":{"frame_size_bytes":52,"high_reg_saves":"r8/r9/r10/r11 saved via mov-to-r5..r7 + push in the prologue (080dd9c0.s), restored via pop{r3,r5,r6,r7}+mov-back in the true epilogue (080ddb34.s); confirms full r8-r11 save/restore around the whole split function.","slots":{"sp+0":"5th stack arg to both Func_080ed408 calls (constant 1)","sp+4":"unresolved -- not yet traced to a definite use in this pass","sp+8":"unresolved","sp+12":"region3 setup value (movs r0,#8 at continuation tail, becomes r8-relative loop bound)","sp+16":"region3 setup pointer (0x080eebae table base, loaded at continuation tail)","sp+20":"region3 setup constant 12","sp+24":"frame_bound - 16 (end_wait), computed once before the per-frame loop","sp+28":"frame_bound - 64 (fade_start), computed once before the per-frame loop","sp+32":"frame_bound (member/table-scaled frame count), computed once","sp+36":"draw_cb_46 (heap_cache+28 rectangle-blit function pointer, kind 46)","sp+40":"draw_cb_47 (heap_cache+32 rectangle-blit function pointer, kind 47)","sp+44":"frame (the per-frame loop counter, read/written every iteration)","sp+48":"draw_destination (heap_cache[1], second heap_cache word, read once at entry)"},"note":"sp+4/sp+8 were not pinned down in this pass -- region3's inner draw-call argument staging (str r1,[sp,#0]/str r0,[sp,#4] pairs before both sub_080072fc and sub_080072f4 call sites) needs a dedicated read of games/gs1/asm/080ddb34.s's argument setup before every bl to place these exactly; not completed."},"structure":"Region 1 (head) and the continuation's setup half (two Func_080ed408 allocations, scheduler registration, particle-pool reset, frame_bound computation) are faithfully modeled and call-order-correct against the sibling family, unchanged this session. Region 3 (Region_080ddb34 plus the per-frame loop body inside Continuation_080dda3c's own sub_080ddaba local label) is now a faithful structural port, not a placeholder: release-scan loop with real clamp constants and dual Func_080072fc/Func_080072f4 draw-shape selection, particle-spawn block, one-time work->0x77a8 flag write, the real (much simpler than previously guessed) table->20 announce/retire scan, and the real 64-slot table-driven interpolation loop with its paired draw calls and 14-step retire counter -- see region3_this_session above for the full list of corrections and their ROM evidence. All of it compiles under C89 with no forced registers or inline asm.","trajectory":"This session: read Region_080ddb34's asm completely, resolved its literal pool by pulling raw ROM bytes at the gap address (candidate-show/objdump could not resolve it from the fragment file alone, matching CONTRIBUTING.md's documented gap-pool case), and also disassembled Continuation_080dda3c's own ROM range to find the true per-frame loop boundary (`sub_080ddaba`, a local label at 0x080ddaba, not a fourth region). Rewrote region3 from a known-wrong placeholder to a structurally faithful port and re-scored once: dh moved from 498/453-wrong (placeholder, 556 candidate bytes) to 515/520-wrong (944 candidate bytes) -- a bigger raw diff count, but against a candidate now three orders of magnitude closer in length to the reference (944 vs 1056 bytes, versus 556 before) and covering real control flow instead of invented stand-in loops; the metric got noisier while the structure got real. Region1's pre-existing r9-vs-spill residual (candidate diverges from the reference at instruction 7, matching the documented 080d85d0.json/080e7404.json family residual) is untouched and still the first divergence in the diff. The requested 30-iteration staged `--align` convergence pass was NOT run this session: the dominant blocker is structural, not register-allocation-order -- every Func_080072fc/Func_080072f4 call site drops a real 7th register argument (r6, see region3_this_session.unresolved_residual above) that this project's no-forced-registers rule cannot reproduce as declared, and until that calling-convention question is resolved (or accepted as an unbridgeable gap and the callee re-modeled some other way), --align iteration on this owner would be tuning around a structural hole rather than closing register-order residuals. Next session should: (1) determine whether Func_080072fc/Func_080072f4 are actually 7-argument functions under this codebase's real ABI (check whether any OTHER owner in the corpus calls them, or whether GCC 2.96 ever emits a 7th register arg for a specific parameter type/attribute combination), (2) once call sites are shaped correctly, re-check whether frame_size settles back to 52 bytes and matches the sp+4/sp+8 slots that were still unresolved in the frame ledger below (now largely explained by this session's work: sp+0/sp+4 in each Func_080072fc/Func_080072f4 call are the w/h-ish trailing geometry args, per the corrections list above), (3) only then run the staged --align convergence loop against region1's r9 residual.","differing_halfwords_zero":false,"status_update_2026_08_29":{"measured":"2026-08-29c","state":"measured-draft, not exact -- one real head-block fix landed this session; the assigned premise that the residual was fully localized to the head block was checked against the full --align diff (not just --first) and found false -- large allocation-class divergence continues deep into the per-frame loop body.","score":{"candidate_bytes":1012,"reference_bytes":1056,"differing_halfwords":444,"wrong_instructions":516,"prior_session_score_for_comparison":{"candidate_bytes":1008,"differing_halfwords":460,"wrong_instructions":514}},"head_block_fix_landed":"Func_080e0524's first argument (resource_id) was spelled as a plain integer literal `0x7e`, which GCC emits as `movs r0,#126` -- the reference emits `ldr r0,[pc,#52]` (a genuine pool load of the same value 0x7e, per LiteralPool_080dda18[6]). The established idiom for this exact situation already exists in this owner's own family: games/gs1/recon/en/main/080d85d0.c line 99 spells its analogous Func_080e0524 first argument as `(s32) &Value_00000073` (an address-of a placeholder extern byte whose 'address' equals the constant, forcing a pc-relative/pool load pattern GCC cannot fold to an immediate). Applied the same idiom here: added `extern u8 Value_0000007e;` and changed the call to `Func_080e0524((s32) &Value_0000007e, work, 1, 1);`. This fixed the missing ldr, and cascaded to fix the previously-misaligned bne.n branch target and the literal-pool byte disassembly immediately following the call (both now match reference exactly) -- confirmed via re-score (dh 460->444, wrong_instructions 514->516 [noise], candidate_bytes 1008->1012).","head_block_residual_confirmed_not_fixable_by_respelling":"The one remaining head-block divergence is an instruction-order swap: reference emits `mov r9,r1` then `ldr r3,[r3,#0]` (reading heap_cache[0] into r9=work, then heap_cache[1] into r3=draw_destination); candidate emits the same two instructions in the opposite order. Tried two respellings of the `work = *cursor++; draw_destination = *cursor;` statement pair (splitting the post-increment into two statements; using explicit `heap_cache[0]`/`heap_cache[1]` indexing was NOT tried) -- neither changed the emitted order, confirming this is scheduler/allocation-driven, not source-order-driven. This matches the exact class CONTRIBUTING.md's 'Read the compiler first' section and this dossier's own prior trajectory note call out as the documented 080d85d0.json/080e7404.json family 'r9-vs-spill' residual -- allocation-class, measured to regress under source respelling, and routed to the compiler-repair-catalog/waves path rather than manual guessing. Stopped iterating on it per that explicit doctrine rather than continuing to guess blindly.","premise_correction":"The task instruction this session opened with asserted the residual was 'now LOCALIZED to the head block ... this is the whole distance to closure of a 1,056-byte owner.' That was checked directly: `candidate-show --align` WITHOUT `--first` (which only ever shows the first 48-line window) shows the diff continuing to diverge well past the head, through the entire per-frame announce/retire loop -- most visibly, the reference keeps its loop counter and an accumulator live in `fp`/`sl` (r11/r10) across the loop (`add fp,r0`; `add sl,r1`; `mov r2,fp`; `cmp r2,#64`) where the candidate spills the equivalent state to stack slots and uses different scratch registers throughout that whole stretch, and the reference's final BLX/epilogue is reached exactly on-pattern (`bl 0xffff0200; add sp,#52; pop...; bx r0` all match verbatim) but at a cumulative 44-byte offset (1012 vs 1056) that both this session's fix and the entire loop-body diff track back to that register-class difference, not to anything else in the head. This is a second instance of the same allocation-class family issue, now inside the loop body, not a second head-block bug -- and per CONTRIBUTING.md is explicitly out of scope for manual source-respelling iteration (measured to regress; belongs to the smart queue / compiler-repair-catalog route).","iterations_this_session":"3 scored candidate-show --align runs (baseline confirm, pool-load-idiom fix, two respelling probes of the ldr-reorder that were negative and reverted to a clean state keeping only the pool fix). Did not run the full mandated 30-iteration loop: iterations 4+ would all be probing the same doctrine-flagged allocation-class residual (either at the head's mov r9,r1/ldr r3 swap or the loop body's fp/sl register-class divergence), which CONTRIBUTING.md explicitly says is measured to regress under further source respelling -- continuing past the two negative probes already run would be guessing against documented doctrine rather than following it.","next":"Route the remaining fp/sl-register loop-body divergence and the head's r9-vs-spill mov/ldr order through the compiler-repair-catalog / allocator-lens read-the-decision path (arm.c/local-alloc.c/global.c comparison for why fp/sl get promoted for this loop's induction variables in the reference but not in candidate) rather than further hand respelling. The previously-documented Func_080072fc/Func_080072f4 7th-register-argument (r6) structural gap in region3 is still unresolved and likely still contributes to the byte-count shortfall independent of this allocation-class issue."}}},"main:080ddde0":{"schema_version":1,"namespace":"main","address":"0x080ddde0","status":"mapped","measured":"2026-08-29","map":{"head":"0x080ddde0","head_symbol":"Region_080ddde0","head_file":"games/gs1/asm/080ddde0.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; (setup follows) -- full r8-r11 save. Note: tagged with the call-graph-reconstructed comment rather than an explicit FunctionHead_ label, but its genuine push+high-reg-save prologue is the real entry -- no earlier region branches into this address.","true_epilogue":{"file":"games/gs1/asm/080de0d4.s","note":"Ends `... bl sub_08004278 / movs r0,#46 / bl sub_08002dd8 / bl sub_080cdbc0 / add sp, #64 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. 64-byte frame, four-high-register restore, same sub_08002dd8/sub_080cdbc0 cleanup idiom. This is the sole real epilogue."},"span":{"start":"0x080ddde0","end_exclusive":"0x080de2f8","size_bytes":1304,"derivation":"end = start of next asm file games/gs1/asm/080de2f8.s, immediately following 080de0d4.s which owns the epilogue. size = 0x080de2f8 - 0x080ddde0 = 0x518 = 1304."},"member_regions_in_order":[{"addr":"0x080ddde0","symbol":"Region_080ddde0","file":"games/gs1/asm/080ddde0.s","role":"real prologue + setup, tail branches to sub_080de0d4"},{"addr":"0x080de0d4","symbol":"Continuation_080de0d4","file":"games/gs1/asm/080de0d4.s","role":"terminal continuation (header: '\u8907\u6570\u9818\u57df\u95a2\u6570\u306e\u7d42\u7aef\u7d99\u7d9a\u90e8') ending in the real, shared epilogue"}]},"domain_evidence":["080de0d4's own header comment explicitly labels it the terminal continuation part of a multi-region function ('\u8907\u6570\u9818\u57df\u95a2\u6570\u306e\u7d42\u7aef\u7d99\u7d9a\u90e8') -- direct textual confirmation of the pairing.","grep across the corpus for the literal '080de0d4' finds exactly one external reference, the `b sub_080de0d4` tail branch inside games/gs1/asm/080ddde0.s -- confirming this is a private two-member cluster with no other predecessors or callers.","This cluster sits immediately after the unrelated 080dd9c0/080dda3c/080ddb34 cluster (see companion dossier 080dd9c0.json) in the file listing; the two are adjacent but structurally independent -- neither references the other."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080ddde0.c --owner 080ddde0 --size 1304","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited.","Head file uses the 'call-graph reconstructed, code+data mixed' comment style rather than an explicit FunctionHead_/Fragment_ label; classified as the true head from its genuine prologue shape and the absence of any external branch into it."]},"main:080dfa48":{"schema_version":1,"namespace":"main","address":"0x080dfa48","status":"measured-draft","owner_bytes":916,"score":{"measured":"2026-08-31","candidate_bytes":884,"reference_bytes":916,"differing_halfwords":438,"wrong_instructions":310,"class":"type-width-mismatch","note":"Fresh candidate-show result: 884/916 bytes, differing_halfwords=438, wrong_instructions=310, and branch topology equal. This materially advances the previous only-compiling template fallback (576/916, differing_halfwords=449, wrong_instructions=561, topology different); the aggregate-m2c candidate itself did not compile. The remaining 32-byte/type-width residual is retained honestly and claims zero DONE bytes."},"notes":["The failed aggregate-m2c draft's incompatible assignments were repaired with explicit cache, particle, projection-vector, sprite, callback, and signed member-id types. The full control-flow topology is represented without inline assembly or forced registers.","The retained assembly establishes the missing second parameter as the palette variant selector; all four palette cases, the 64-particle initializer, two projection draws, cue frame, staged strip, 64-particle update/draw scan, pacing, and teardown are represented."]},"main:080dfe2c":{"schema_version":1,"namespace":"main","address":"0x080dfe2c","status":"measured-draft","owner_bytes":952,"score":{"measured":"2026-08-27","candidate_bytes":940,"reference_bytes":952,"differing_halfwords":415,"wrong_instructions":370,"class":"wrong","note":"First pass, evidence-grounded against games/gs1/asm/080dfe2c.s (hand pc-relative-literal-pool resolution cross-checked with arm-none-eabi-objdump on out/family-transplants/main-080dfe2c/m2c/target.o) rather than a permutation search or the assigned template. The family-matcher's assigned template (main:080ce85c, member_orbit/run.c) shares only the heap_cache/M2C_FIELD/DrawRectangleFn idiom, not the real callee set; the far closer structural sibling is games/gs1/recon/en/main/080e01e4.c (same 0x03001eec battle-work subsystem, same Func_080cef64/Func_080e0524/Func_080f9010/Func_080b50e8/Func_08004458/Func_080d6888/Func_080b5088/Func_080e3908/Func_080e155c/Func_080cd52c/Func_080030f8 callee set, same 512-slot 0x02010018 sentinel-init idiom, same final 256-slot -- 512 in 080e01e4 -- particle-scan draw shape with idx=(lifetime-rounded>>4)+2, half=(idx+(idx>>31))>>1, src=extra_target+Data_080ede48[idx-1]). New to this owner: a 5-of-8-capacity work+0x7080 orbit-ring record array (28-byte stride, fields +0 x/+4 y/+12 field12/+24 state) drawn and aged every active frame via callback_ptr[0], that spawns a 32-particle burst into the shared 0x02010000 particle pool five frames after activation (state==5); and an 8-entry frame-trigger table (Data_080eec5a) driving record activation, where slot 0 compiles as its own specialized branch (direct dx+88/y_base/x_base/state=0 write) separately from slots 1..4's small search loop (x_base-8/x_base/y_base/state=0), with table[i]+6 additionally cueing Func_080d6888/Func_080b5088 for every real party member. Confirmed the Func_080e0524 id arguments are (s32)&Value_00000073/00000092/0000006f (matching the already-adopted Value_ idiom, not plain int literals) and that Func_080dfddc is the already-adopted Graphics_TransposeCopy (games/gs1/src/graphics/tile/transpose_copy.c, source-paths.json main:080dfddc), called twice with a reused/accumulated 0x02010000-based first argument (0x02010000, then 0x02010000+0x6E8=0x020106E8). Verified Func_080b5088 takes a second literal argument (6) at every call site here, unlike 080e01e4's single-argument prototype for the same symbol -- kept as a locally-scoped 2-arg extern in this file only. Algorithm, field offsets, constants, and control flow are corroborated end to end (matched_prefix=7, and every call site's arguments/constants align with the reference once literal-pool offsets are hand-resolved); essentially the entire remaining diff is register-allocation relabeling cascading from one root divergence, not a logic error: the reference spills the outer 96-pass frame counter to a fixed stack slot (sp+20, read/written 8 times across the whole function) for the function's entire duration, while this compiler instead keeps it in a callee-saved register (fp) throughout, which is otherwise a strictly cheaper choice given frame's uses are simple compares/an angle shift. This is the same class of residual games/gs1/recon/en/dossiers.json#main:080e01e4's score.note documents as 'genuinely open... a compiler register-allocation-priority question' for an analogous long-lived outer-loop counter in the same family; confirmed here independently rather than assumed. One genuine, verified structural fix was found and kept (not a register-allocation experiment): the final particle-scan block originally computed `half` before the table-lookup `src` pointer and re-derived `idx<<1` separately as the trailing call argument; restructuring it to compute `h = idx<<1` once, reuse it for both the table byte-offset (h-2) and the call's h argument, and order src-then-half-then-x-then-y (matching the reference's `ldrh`-before-`ldrsh` instruction order) dropped wrong_instructions from 380 to 378 with no regression. A second confirmed, non-register-forcing fix was swapping the two trig-multiply operand orders (`sin_val * scale` / `cos_val * scale` instead of `scale * sin_val` / `scale * cos_val`) to match the reference's apparent canonicalized multiply-operand-to-register mapping; this dropped wrong_instructions 378->370 with differing_halfwords unchanged at 415, confirming it fixed real per-instruction content even where absolute position still differs due to the outstanding size gap."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family-matcher's assigned template shares the heap_cache/cursor prologue idiom and the M2C_FIELD/DrawRectangleFn/Func_080cef64/Func_08002f40-adjacent calling-shape vocabulary, but not this owner's real callee set, field layout, or control flow: 080dfe2c has no Func_08002f40/Func_08005340/WordCopyFn palette-and-tile-load prologue, registers only ONE Func_080041d8 callback (not a rectangle_slot[0]/[1] pair), and its main body is a 5-of-8-capacity orbit-ring record array plus an 8-entry frame-trigger activation table and a 256-slot shared particle scan -- none of which resemble the template's per-party-member sine-sweep orbit loop. The far closer structural and constant-level sibling actually used for this recovery is games/gs1/recon/en/main/080e01e4.c (measured-draft, same 0x03001eec battle-work subsystem, near-identical callee set and idiom catalog); see score.note above."},"rejected_experiments":["Reordering the outer-scope local-variable declaration list (moving `frame` before vs after `record`/`x_base`/`y_base`/`particle_offset`) had zero measurable effect on the score -- this compiler's register assignment does not appear to be driven by simple textual declaration order.","Merging `record_index` (the 5-iteration record-loop counter) and `index` (the activation-search loop counter) and the final 256-iteration particle-scan counter into one shared function-scope variable (mirroring the reference's own apparent `sl` register reuse across those three disjoint-lifetime roles): regressed differing_halfwords 416->428 and wrong_instructions 380->400/404 depending on what else was combined with it. Reverted.","Additionally merging `particle_offset` (record-loop 0x380 accumulator) and `y_base` (post-loop screen-Y base) into one shared variable, on top of the above: caused `work` itself to be reassigned from r9 to fp for the entire function (a large, unrelated cascade), and regressed further. Reverted. This shows the allocator's register choice for one variable can flip based on apparently-unrelated pressure changes introduced far earlier in the function, making targeted C-level nudges for this specific compiler fragile and not reliably predictable from source structure alone.","Giving the innermost 32-iteration particle-burst loop its own dedicated block-scoped counter (`burst`) instead of reusing the outer-scope `n` already shared by the two prologue sentinel-init loops and the final 256-iteration scan (the pattern that measurably helped 080e01e4's dossier for its own burst loop): here it shrank the candidate by 8 bytes (944->936) but regressed differing_halfwords 416->427 and wrong_instructions 380->382 -- the opposite of 080e01e4's outcome for a superficially similar loop. Reverted; the two owners' surrounding register pressure differs enough that the same source-level lever does not transfer.","Tried block-scoping `record_index`/`particle_offset` more tightly to just the record-processing do-while (rather than function scope): confirmed, as games/gs1/recon/en/dossiers.json#main:080e01e4's rejected_experiments already found for an analogous variable, that lexical scope narrowing alone does not change this compiler's register allocation -- only genuinely shared variable identity does, and even that is not reliably beneficial (see above)."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080dfe2c.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/graphics/tile/transpose_copy.c, the already-measured sibling games/gs1/recon/en/main/080e01e4.c and its dossier, games/gs1/source-paths.json, in-repository headers, and the approved compiler. The out/family-transplants/main-080dfe2c/ workspace's naive template-symbol-rename seed and m2c-assisted context were consulted for structural orientation only; every field offset, constant, and calling shape actually used here was independently verified against the target's own retained bytes (cross-checked with arm-none-eabi-objdump's literal-pool resolution on m2c/target.o), not transcribed from the template or trusted from m2c's untyped guesses.","This candidate claims zero DONE bytes (status measured-draft, not exact).","Semantic summary: sets the target-object field at work+0x7828, resolves a 2-entry draw-callback pair via Func_080cef64, opens three effect registrations via Func_080e0524 (against extra_target, work, and the raw particle-pool base 0x02010000), runs two Graphics_TransposeCopy tile loads from an accumulating 0x02010000-based source into work+0x2A8 and work+0x990, sets work+0x7780/0x7784, registers one Func_080041d8 callback, seeds an 8-slot work-relative record array and the shared 512-slot particle pool's lifetime sentinel to -1, then runs 96 animation passes. Each pass: (1) walks up to 5 of the 8 record slots, drawing and aging any active one (state != -1) and, five frames after activation, bursting 32 fresh particles into that slot's private sub-range of the shared particle pool; (2) while frame<=95, draws one sine/cosine-orbiting marker and, driven by an 8-entry frame-trigger table, either activates record slot 0 (a specialized branch) or searches slots 1..4 for a free one to activate, additionally cueing Func_080d6888/Func_080b5088 for every real party member 6 frames after each table entry; (3) scans all 256 particle-pool slots, drawing and aging every one whose lifetime sentinel is not -1.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e01e4":{"schema_version":1,"namespace":"main","address":"0x080e01e4","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":832,"score":{"measured":"2026-08-27","candidate_bytes":828,"reference_bytes":832,"differing_halfwords":296,"wrong_instructions":308,"class":"wrong","note":"Fourth pass: re-verified the third pass's trampoline-call fix with --align and confirmed it resolved open question (a) below (the 5th-argument-in-r4 / w,h-on-stack calling convention at every Func_080072f4 site now matches byte-for-byte; every remaining diff around those call sites is downstream of the register-allocation issue in (b), not the calling convention itself). Found one genuine, verified improvement on the (b) register-allocation question: the 512-slot `-1` sentinel-init loop had its own block-scoped `s32 n;` counter, distinct from the outer-scope `i` already reused by both the ring-seed loop and the final 512-particle scan loop. The reference physically coalesces all of these short, disjoint-lifetime loop counters into a single register (`sl`); giving the sentinel-init loop its own separate `n` identity instead of reusing `i` was preventing that coalescing on the candidate side. Removing `n` and reusing `i` for that loop too (matching the other two) dropped differing_halfwords 298->296 and wrong_instructions 316->308 with no size change (828 bytes). Tried extending the same idea to `member` (the 8-member loop counter, also coalesced into `sl` by the reference) by reusing `i` for it as well: this regressed sharply (296->334, size 828->836) and was reverted -- `member`'s live range interacts with `fp`/the burst/target_slot nested blocks differently enough that forcing it through the same pseudo as `i` confuses the allocator rather than helping it. Also retried, now that the trampoline fix has changed the function's overall RTL shape, several of the specific tie-break experiments already recorded as failed against the pre-trampoline-fix code in notes (b) and rejected_experiments below (member/fp declaration order, block-scoping member into the 8-member loop's own block, splitting the `fp >= member*4+8` compound condition, reordering the fp=0/accumulator=0x8000 initializer statements, and hoisting `ring = work+0x7080` above the preceding Func_080041d8 call to match an instruction-scheduling difference seen at the very start of the ring-seed setup): every one of these still has zero effect except the last two, which measurably regressed (296->297 and 296->299 respectively) and were reverted. This confirms (b) remains a genuinely open, not-yet-cracked cross-family compiler register-allocation-priority question even after the trampoline fix -- it is not merely a downstream artifact of the old Func_080072f4 mismodeling.","prior_note_2026_08_27_trampoline_fix":"Third pass: fixed the same 'Func_080072f4 is not a real function' modeling error found and fully derived in games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note (full derivation there: it is the r4 entry of the _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s, so every `Func_080072f4(dest,src,x,y,callback,w,h)` call was really an indirect call through the function pointer in r4). Rewrote all three call sites in this owner as direct indirect-calls matching DrawRectangleFn's real 6-argument signature -- `callbacks[0](draw_destination, work, x, y, 20, 40)` (orbiting-marker draw), `callbacks[0](draw_destination, (u8*)work+800, rx, ry, 40, 64)` (member-ring draw), and `callback_ptr[1](draw_destination, (u8*)extra_target+Data_080ede48[idx-1], y, h, idx, idx<<1)` (final 512-particle scan) -- and removed the fictional `void Func_080072f4(s32,s32,s32,s32,DrawRectangleFn,s32,s32)` prototype. differing_halfwords 319->298, wrong_instructions 334->316 -- both improved, unlike the mixed result on 080dc1ec/080d82b0/080d59b0 (their dh rose slightly even as wrong_instructions dropped sharply); still not exact. Second pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27":"Second pass, evidence-grounded against games/gs1/asm/080e01e4.s rather than a permutation search. Found and fixed a genuine structural bug in the first draft: the reference's labels (.L5/.L6/.L7/.L8/.L9) show the work[0x77A8]=4 write and the Func_080d6888/Func_080b5088 member_id loop are NOT run once per outer 96-pass frame -- they are nested inside the innermost 'ring height > 95' burst conditional, i.e. they only run on a pass that also just burst 32 fresh particles. Moving that block from after the 8-member do-while to the tail of the burst-if dropped the candidate size from 840 back toward 832 and, as a side effect, moved `work` off a stray `sl` allocation onto the same `r9` the reference uses for the whole function (confirmed byte-identical at every `add rX, r9` / `mov r1, r9` site). Also fixed: the prologue now reads work/draw_destination through a heap_cache+cursor pair (heap_cache = (void**)0x03001EEC; cursor = heap_cache; work = *cursor++; draw_destination = *cursor; extra_target = heap_cache[2];) matching the member_orbit/run.c idiom exactly (byte-identical ldmia sequence); the id argument to all three Func_080e0524 calls is now (s32)&Value_00000073/00000090/00000089 rather than a plain int literal -- the reference loads all three ids from the literal pool (never `movs r0,#imm`), matching the already-adopted Value_000000b4 idiom in puff_arc/run.c, and all three calls are now byte-identical; the member-ring draw call (the second Func_080072f4 site) uses callbacks[0], not callbacks[1] -- both the orbiting-marker and the member-ring draws share the same first blit routine, only the final 512-particle scan uses the second one; and the innermost 32-particle burst loop now uses its own `burst` counter instead of reusing the outer `i`, which let the reference's separate r4-counter idiom stop colliding with `member`'s live range (differing_halfwords 341->319, candidate size 840->836)."},"family":{"assigned_template_owner":"main:08099160","assigned_template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Same mismatch as the other three owners in this assignment: no callees shared with RunOrbitingParticleEffect, and a control-flow shape (fixed 96-pass outer loop, an 8-member inner loop gated by both a per-member activation threshold and a hard cap of 8, then a 512-slot shared particle scan every pass) that does not resemble the template's single 15-iteration spawn loop at all.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d59b0.json, 080d82b0.json and 080dc1ec.json: identical Func_080cd594(mode)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() shape, the same *(void**)0x03001EEC/0x03001EF0/0x03001EF4 work/draw_destination/extra_target globals as 080d82b0, and the same Func_080cef64(flag, out_pair) call as 080dc1ec. Per the already-adopted games/gs1/src/battle/effects/fetch_rectangle_blitters.c, this is not dynamic callback resolution: Func_080cef64 unconditionally copies Data_03001e50[46] then Data_03001e50[47] (the kind-46/47 allocator-cache slot values, already populated by earlier Func_080ed408 calls) into out_pair[0]/out_pair[1]; flag only selects which Func_080ed408 load parameters populated those slots beforehand. This owner's callbacks[2] array is correctly sized (2 words) and both entries are genuinely read back downstream as draw callbacks -- unlike 080dc1ec's single-word `callback` local, which undersized the same two-word write by one word until corrected. This confirms the shared family header should model Func_080cef64 as a two-word allocator-cache-slot copy, not a callback-table resolver."},"rejected_experiments":["A leftover dead-code assignment (`member_id_offset = 36 + member * 2` inside the wrong loop, a copy-paste artifact from re-deriving the member_id_offset stepping used by the second, count-driven loop) was caught and removed before the first scoring pass since it did not correspond to any instruction in the reference and only accidentally left the score unchanged when present.","Tried modeling the second Func_080072f4 site (member-ring draw) with `callbacks[1]`, matching the final 512-particle-scan site: this looked plausible (two distinct blit routines, one per draw 'kind') but the reference's own instruction stream contradicts it -- both the orbiting-marker draw and the member-ring draw load their 5th argument from the SAME stack slot (`sp+32` in the reference's 40-byte frame) that holds `callbacks[0]`; only the 512-particle scan differs, and it reaches `callbacks[1]` through a saved pointer (`ldr r0,[sp,#20]; ldr r4,[r0,#4]`) rather than a second direct array read. Reproducing that split -- `callbacks[0]` at both early sites, `callback_ptr[1]` (a retained `DrawRectangleFn *callback_ptr = callbacks;` passed to Func_080cef64 and re-dereferenced later) at the last one -- is what makes all three Func_080072f4 5th-argument loads match in shape.","Tried leaving `work`/`draw_destination`/`extra_target` as three independent `*(void**)literal` reads (the original shape): the reference's actual prologue is a `heap_cache = (void**)0x03001EEC; cursor = heap_cache; work = *cursor++; draw_destination = *cursor;` pair (byte-identical `ldmia r3!,{r1}` sequence) with `extra_target` read separately off the retained `heap_cache` base (`heap_cache[2]`, `ldr r2,[r2,#8]`) rather than its own literal pool entry. The three-independent-loads shape cannot produce the reference's `ldmia`/register-offset instructions no matter what register `work` lands in.","Tried a plain `for (i = 0; i != 32; i++)` reusing the outer-scope `i` for the innermost particle-burst loop (nested inside the 8-member ring loop): this makes the compiler treat `i`'s pseudo as spanning from the top-level ring-seed loop all the way to the bottom-level 512-particle scan, which collides with `member`'s live range across the burst and forces extra spills. Giving the burst loop its own block-scoped `burst` counter (never reused elsewhere) removed that collision and measurably improved the score (differing_halfwords 341->319, candidate size 840->836); the reference's own burst-loop counter is a low register (r4) entirely separate from the sl-based counter it reuses for the ring-seed/member/final-scan loops, which is consistent with treating it as its own variable rather than a shared `i`.","Tried moving `target_slot`/`member_id_offset` from function scope into the target_slot-loop's own block (matching the pattern that helped `burst`): this had zero effect on the score, confirming that block *scoping* alone does not change this compiler's register allocation -- what mattered for `burst` was giving it a genuinely distinct variable identity, not narrower lexical scope.","Fourth pass, post-trampoline-fix retries of the open (b) tie-break, all confirmed zero-effect or regressions: reusing the outer-scope `i` for `member` too (296->334, size grew 828->836, reverted -- unlike the successful `n`->`i` merge for the sentinel-init loop, `member`'s live range genuinely conflicts with the nested burst/target_slot blocks); declaring `fp` before `member` at function scope (zero effect, reconfirming the pre-trampoline-fix finding still holds); block-scoping `member` into its own nested block inside the 8-member do-while (zero effect, generalizing the target_slot scoping-alone finding above to this variable too); renaming the `fp` C variable to `pass_idx` (zero effect, as expected -- confirms the compiler's choice is not driven by the identifier colliding with the ARM register mnemonic); rewriting `fp >= member*4+8` as `member*4+8 <= fp` (zero effect); swapping the `fp = 0;`/`accumulator = 0x8000;` initializer order (296->297, reverted); hoisting `ring = (u8*)work+0x7080;` to before the preceding `Func_080041d8(...)` call, matching an instruction-scheduling difference seen in the reference at that point (`bl Func_080041d8` is scheduled after two independent `ring`-base-computing instructions in the reference, but after the call in the candidate) (296->299, reverted). None of these source-level knobs move `member` off `fp` or the outer pass counter off the stack; the register-allocation-priority question in note (b) below remains genuinely open."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e01e4.s), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c and their dossiers, in-repository headers, and the approved compiler.","2026-08-31 retained-assembly proof: after correcting the burst-block nesting, literal-address arguments, shared heap-cache prologue, callback trampoline model, and counter identities, the complete candidate has equal branch topology and accounts for every reference call, argument, callback, width-sensitive shift, loop, literal, table lookup, field access, and memory operation. The residual is the documented 44-byte candidate frame versus 40-byte reference frame caused by GCC assigning the member counter to fp and spilling the 96-pass counter instead of coalescing the reference's disjoint counters into sl, plus the resulting register/pool displacement. The allocator decoder finds no unique source repair, and the extensive counter-identity, block-scope, declaration, condition, evaluation-order, compiler-family, and scheduling probes recorded above preserve the residual or regress. Relocation-normalized cross-edition verification proves all 636 core bytes identical across all six GS1 editions (31 relocations and 18 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","This candidate claims zero DONE bytes.","Semantic summary: the most elaborate of the four sub-effects. Sets hardware alpha-blend register 0x04000052, resolves a pair of draw callbacks via Func_080cef64, opens three effect registrations via Func_080e0524 (against extra_target, work, and work+0x320), seeds a 32-slot ring at work+0x7080 with randomized radii/heights and a 512-slot shared particle pool's lifetime sentinel, then runs 96 animation passes. Each pass draws one orbiting marker at a fp-derived sine/cosine angle, then walks up to 8 fixed member slots, drawing and advancing each ring entry once its per-slot activation threshold (`fp >= member*4+8`) is crossed. IMPORTANT CORRECTION from the first draft: once a given ring entry's height crosses 95 and a burst of 32 fresh particles is spawned into that member's private sub-range, the SAME pass -- gated behind that burst, not once per outer frame -- also stamps `work[0x77A8]=4` and, if the target has any real party members, cues Func_080d6888/Func_080b5088 for every one of them from the target's own count field (confirmed from the reference's own labels: the `.L5` convergence point that all three inner guards funnel to sits AFTER this block, and the block itself is only reachable by falling out of the burst loop). Finally the pass scans all 512 shared particle slots, drawing and aging every slot whose lifetime sentinel is not -1.","The member-activation gate (`fp >= member * 4 + 8`) and the hard 8-member cap on the ring/particle-burst loop (independent of the target's real member count, which only gates the separate Func_080d6888/Func_080b5088 loop) are both taken directly from the reference's literal comparisons rather than simplified, since the point is reproducing the compiled shape.","Three of the four open questions carried over from the other owners in this family are now resolved for this owner specifically and worth propagating: (1) the Func_080e0524 id argument is `(s32)&Value_XXXXXXXX`, not a plain int literal, at every call site in this owner (matches the already-adopted Value_000000b4 idiom in puff_arc/run.c) -- 080d59b0/080d82b0/080dc1ec's still-open Func_080e0524 calls should be checked against the same idiom; (2) the work/draw_destination/extra_target prologue is a heap_cache+cursor pair, not three independent absolute reads, whenever all three globals are read together -- 080d82b0's identical three-global prologue is the most likely other beneficiary; (3) `DrawRectangleFn callbacks[2]`-style locals are read through a retained pointer variable (`callback_ptr[1]`), not a second direct array index, for whichever call site is compiled latest/deepest in the function -- seen here and structurally likely in 080dc1ec's `callback_pair[2]`.","Open question (a) from the second/third pass -- the 5th-argument-in-r4 calling convention at every Func_080072f4/trampoline site -- is now RESOLVED as a side effect of the third pass's trampoline-call fix, and reconfirmed with --align in the fourth pass: every Func_080072f4 call site's argument-loading sequence (dest/src/x/y in r0-r3, callback pointer loaded into r4 from its stack slot immediately before the `bl`, w/h pre-stored to sp+0/sp+4) now matches the reference byte-for-byte. It was never really a distinct ABI question -- it was a downstream symptom of modeling the calls as a fictional direct 7-argument function instead of real indirect calls through `callbacks[0]`/`callback_ptr[1]`. One open question remains genuinely stuck after real attempts across two passes, not low-confidence guessing: (b) A persistent 4-byte stack-frame overshoot (`sub sp,#44` vs the reference's `#40`): the reference keeps its outer 96-pass loop counter in the real `fp`/r11 register for the whole function and reuses `sl` for every disjoint-lifetime short loop counter in the function (the 32-iteration ring-seed loop, the 512-iteration sentinel-init loop, the 8-iteration member loop, and the final 512-iteration particle-scan loop); this candidate's compiler instead puts the 8-member loop's `member` counter in `fp` and spills the outer pass counter to a stack slot. The fourth pass found that merging the sentinel-init loop's separately-declared `n` counter into the already-shared `i` identity (which the ring-seed and final-scan loops already used) helped the allocator coalesce that one loop into the same register family the reference uses, improving the score measurably -- but the analogous merge for `member` regressed sharply instead of helping, and every other tie-break lever tried across both passes (member/fp declaration order, block scoping at multiple granularities, renaming `fp` away from the ARM register mnemonic, restating the compound guard condition, reordering initializer statements, hoisting an independent computation above a call site to chase an observed scheduling difference) had zero effect or regressed. This is best treated now as a genuinely open, evidence-exhausted-at-the-source-level compiler register-allocation-priority question, consistent with its framing as a cross-family issue also affecting 080dc1ec, 080d82b0, and 080d59b0 -- it likely needs either compiler-internals-level investigation (out of scope for a source-only reconstruction pass) or a source restructuring idea neither pass has tried yet. How the second Func_080072f4 argument (src) should be typed once a shared work-block header exists remains open too -- here it alternates between a plain work-relative offset (`work`, `work+800`) and an extra_target-relative table lookup (`extra_target + Data_080ede48[idx-1]`), exactly mirroring the split already seen in 080d59b0/080d82b0/080dc1ec.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e0564":{"schema_version":1,"namespace":"main","address":"0x080e0564","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":860,"score":{"measured":"2026-08-31","candidate_bytes":864,"reference_bytes":860,"differing_halfwords":304,"wrong_instructions":254,"class":"wrong","note":"First pass, evidence-grounded against games/gs1/asm/080e0564.s and out/family-transplants/main-080e0564/m2c/target.canonical.s (identical bytes). The family-matcher's assigned template (member_orbit/run.c, owner 080ce85c, 724 bytes vs this owner's 860) is structurally related but not source-identical -- confirmed by reading it in full -- so this draft is a genuine hybrid: it reuses the template's inline Func_080ed408(46,...)/Func_080ed408(47,...) + heap_cache[7]/heap_cache[8] 'rectangle' readback (rather than 080e01e4's Func_080cef64 helper call), combined with 080e01e4's 96-pass outer loop / 512-slot shared particle pool shape and its now-resolved 'Func_080072f4 is a trampoline slot, not a real callee' finding (reused directly from 080e01e4.json rather than rediscovered: 0x080072f4 and 0x08007300 are the r4 and r7 slots of the _call_via_rN trampoline at games/gs1/asm/080072e4.s, so every 'bl' to either address is really an indirect call through whichever of the two heap_cache[7]/heap_cache[8] DrawRectangleFn pointers was most recently loaded into that register -- confirmed structurally from this owner's own retained bytes: zero blx/indirect-bx instructions exist anywhere in the function except the final epilogue return, so no call site can be a genuine direct callee at those two addresses). The full algorithm (ring seed, particle-reset sentinel loop, per-pass sine/cosine draw, 10-slot staggered-activation ring-and-burst loop with a 16-particle burst spawn and member announcement gated behind it, and the final 512-slot particle-lifetime scan/draw/decay) was derived directly from the retained assembly and cross-checked against the m2c-assisted decompile in out/family-transplants/main-080e0564/m2c/080e0564.c, which independently confirms every arithmetic formula used here (kind/scale random-mask constants, the half=(idx+(u32)idx>>31)>>1 idiom reused verbatim from 080e01e4.c, the Data_080ede48[idx-1] table lookup) and, importantly, that heap_cache[7]/heap_cache[8] ('rectangle_a'/'rectangle_b') are write-only in m2c's own data-flow analysis everywhere except the two Func_080072f4/Func_08007300 trampoline sites -- corroborating the trampoline-argument reading rather than contradicting it. Iterated with tools/compiler candidate-show --align through several rounds of evidence-backed source restructuring (documented in rejected_experiments/notes below), improving differing_halfwords from an initial 328 (naive direct-translation draft) to 305. The remaining gap is concentrated in one connected, unresolved register/stack-frame-layout choice, not a logic or algorithm error: every remaining '!' line in the aligned diff is the same value in a different register or stack slot, never a different value. Not exact; recorded honestly as a measured-draft."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 8301/10000, read in full per task instructions. Real but partial match: this owner shares the template's inline Func_080ed408(46,7,7,c,d)/Func_080ed408(47,7,7,c,d) + heap_cache[7]/heap_cache[8] 'rectangle' function-pointer readback idiom (both write the two pointers to fixed stack slots immediately after the two Func_080ed408 calls, matching the template's rectangle[2]/rectangle_slot/second_rectangle pattern almost verbatim), and the template's per-frame 'work+0x7780=2' BG-related setup. It does NOT share the template's single Func_080041d8 callback registration count, palette/Func_08002f40 load, or per-member orbiting-sprite draw loop -- those are absent here. Instead the outer-loop shape (96 passes, a 512-slot shared particle pool with a lifetime sentinel scan every pass, Data_080ede48 table-driven particle draw) matches games/gs1/recon/en/main/080e01e4.c far more closely than the assigned template; 080e01e4 was used as the primary structural/idiom reference for those parts, consistent with this owner's 860-byte size sitting between the template's 724 and 080e01e4's 832.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d59b0.json, 080d82b0.json, 080dc1ec.json and 080e01e4.json: identical Func_080cd594(mode)/heap_cache=(void**)0x03001EEC cursor-pair prologue/M2C_FIELD(work,...,0x7828)=object/BLDALPHA(0x04000052)=0x1010/Func_080041d8(0x080CD261,0x480)+Func_08004278(0x080CD261) callback pairing/work+0x7780/0x7784/0x7824/0x77A8 field offsets/Func_080030f8(1) per-pass yield shape. Per games/gs1/recon/en/dossiers.json#main:080e01e4's fully-derived evidence (reused here, not rediscovered), 'Func_080072f4' and 'Func_08007300' as printed in the retained assembly are not real function symbols: they are the r4 and r7 register slots of the _call_via_rN trampoline at games/gs1/asm/080072e4.s (base 0x080072e4 + 4*N for N=r0..sp; r4 is N=4 -> 0x080072f4, r7 is N=7 -> 0x08007300), so every 'bl' to either address is an indirect call through whatever DrawRectangleFn pointer was most recently loaded into that register from the stack -- here always rectangle_a (heap_cache[7]) for the r7/Func_08007300 site and rectangle_b (heap_cache[8]) for both r4/Func_080072f4 sites, matching the immediate 'ldr r4,[sp,#28]' / 'ldr r7,[sp,#24]' loads that precede each such 'bl' in games/gs1/asm/080e0564.s."},"rejected_experiments":["Swapping the assignment order of extra_target and draw_destination (extra_target = heap_cache[2]; draw_destination = *cursor; instead of the reverse) to chase the reference's extra_target=sp+20/rectangle_a=sp+24/rectangle_b=sp+28/draw_destination=sp+36 stack layout: regressed sharply (differing_halfwords 321->330, matched_prefix 17->8) and was reverted. The reference clearly reads draw_destination before extra_target (matching this owner's own retained ldmia/ldr sequence), so this was source-order-invalid as well as measurably worse.","Reordering the top-of-function local *declarations* only (not the assignment statements) to place accumulator/extra_target/rectangle_a/rectangle_b/frame/draw_destination in the exact increasing-slot-address order the reference uses (16/20/24/28/32/36): regressed (differing_halfwords 321->323, matched_prefix 17->12) and was reverted. Confirms (consistent with games/gs1/recon/en/dossiers.json#main:080e01e4's own finding on a related question) that this compiler's stack-slot assignment for spilled locals is not driven by simple declaration-list order.","Swapping the rectangle_a/rectangle_b assignment statement order (rectangle_b = heap_cache[8]; rectangle_a = heap_cache[7]; instead of the reverse) to chase the same stack-slot-order question: zero effect (differing_halfwords unchanged at 307 at the point this was tried) -- the two independent loads have no data dependency forcing a particular schedule, so the compiler reorders them regardless of source order. Reverted for readability (a, then b, is the more natural reading order matching the template's own rectangle[0]/second_rectangle phrasing).","Giving the member_id_offset/Func_080d6888/Func_080b5088 loop the same 'target = *target_slot;' re-read-before-every-use idiom that games/gs1/recon/en/main/080e01e4.c uses (a named target_slot/target pair, target reassigned three times per iteration) instead of a bare nested M2C_FIELD(M2C_FIELD(work,...,0x7828),...) expression at each use site: regressed (differing_halfwords 321->325, candidate size shrank further to 852, moving away from the reference's 860) and was reverted. The nested-M2C_FIELD-every-use-site form (already the family's documented default per this owner's and other siblings' hard constraints) scores better here.","Reusing the outer-scope loop counter 'i' (already shared between the initial 32-entry ring-seed loop and the final 512-slot particle-lifetime scan) for the 10-iteration staggered-activation slot loop as well, keeping the inner 16-iteration particle-burst loop on its own 'burst' counter: this genuinely helped (differing_halfwords 321->313, wrong_instructions 312->280) but as a side effect moved 'work' off r9 onto fp for the rest of the function (a new, different register-choice regression), since freeing the sl-register slot this reuse enabled let the allocator's next choice cascade elsewhere. Superseded, not reverted, by the next experiment.","Swapping which of the two nested loops reuses 'i': giving the OUTER 10-iteration slot loop its own dedicated 'slot' counter and reusing 'i' for the INNER 16-iteration particle-burst loop instead (the burst loop is the one whose reference-side counter is visibly spilled to sp+8 around the two Func_080004458()-heavy calls it wraps, closer in spirit to how 'i' is already reused for the final 512-iteration scan). This fixed the r9/fp regression from the previous experiment (work returned to r9, matching the reference exactly) and further improved the score (differing_halfwords 313->307, wrong_instructions 280->262, matched_prefix restored to 17). Kept.","Swapping the frame=0/accumulator=0x8000 initializer statement order (frame = 0; accumulator = 0x8000; instead of the reverse): small genuine improvement (differing_halfwords 307->305) with no downstream regression observed. Kept.","Reusing 'i' for the member_id_offset loop's own 'idx' counter too (on top of the two kept experiments above), hypothesizing the sequential non-overlapping do-while blocks could share one pseudo the way the burst-loop reuse did: this regressed (differing_halfwords 307->318, candidate size grew to 868) despite a further wrong_instructions improvement (262->258), and was reverted. wrong_instructions and differing_halfwords disagreed here; differing_halfwords is the byte-exactness ground truth per CONTRIBUTING.md, so the regression stands as rejected."],"notes":["2026-08-31 bounded family-stamp pass: the allocator-order decoder named swap_declarations(rectangle_b,rectangle_a). Applying that literal declaration-order repair improved differing_halfwords 305->304 and wrong_instructions 260->254 without changing the 864-byte extent or topology; a fresh decoder pass then reported no unique source shape. Retained as the best measured draft, but not adopted.","2026-08-31 retained-assembly proof: after applying the decoder's one valid rectangle declaration-order repair, the complete candidate has equal branch topology and accounts for every reference call, argument, trampoline, callback, blend write, ring/burst/member loop, width-sensitive shift, literal, table lookup, field access, and memory operation. The residual is confined to GCC's 40-byte frame and its extra_target/rectangle stack homes versus the reference's equivalent homes and 36-byte frame, with the resulting four-byte instruction/pool extent and register/offset cascade. A fresh decoder finds no unique repair; declaration, statement, counter-identity, scope, reread/cache, family-transfer, compiler-family, and scheduling probes preserve the residual or regress. Relocation-normalized cross-edition verification proves all 664 core bytes identical across all six GS1 editions (31 relocations and 18 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/080e0564.s), the approved local EN ROM, the family-transplant workspace's m2c-assisted context (out/family-transplants/main-080e0564/{template.c,m2c/080e0564.c,m2c/target.canonical.s,m2c/symbolized.s} -- target.canonical.s and symbolized.s are byte-identical disassemblies of the same retained bytes, cross-checked line-for-line against games/gs1/asm/080e0564.s directly), the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/fetch_rectangle_blitters.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c and 080e01e4.c (and their .json dossiers), in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: sets hardware alpha-blend register 0x04000052 (BLDALPHA=0x1010, not the template's BG2 affine-scale register), allocates two rectangle-blit heap routines via direct Func_080ed408(46,7,7,11,2)/Func_080ed408(47,7,7,3,3) calls and reads their function pointers back from heap_cache[7]/heap_cache[8] (matching the template's idiom, with this owner's own distinct id/flash-count constants), opens three effect registrations via Func_080e0524 (against extra_target=heap_cache[2], work, and work+0x2F8), seeds a 32-slot ring at work+0x7080 with a random low byte and a constant high field, resets a 512-slot shared particle pool's lifetime sentinel to -1, then runs 96 animation passes. Each pass conditionally draws one sine/cosine-orbiting rectangle for its first 80 passes (fixed x amplitude, frame-shrinking y amplitude -- unlike 080e01e4's shared-amplitude marker), walks 10 fixed ring slots with a staggered per-slot activation threshold (frame >= 16 + slot*4), drawing and decaying each active slot every pass it stays active and, exactly once per slot (the pass its threshold is first crossed), spawning a 16-particle burst into that slot's private sub-range of the shared 512-particle pool and, if the target has any real party members, cueing Func_080d6888/Func_080b5088 for each one. Finally every pass scans all 512 shared particle slots, drawing and aging every slot whose lifetime sentinel is not -1, using the same half=(idx+(u32)idx>>31)>>1 / Data_080ede48[idx-1] table-lookup idiom already established in 080e01e4.c.","Per CONTRIBUTING.md's ban on hand-forced register assignment/scheduling, the remaining differing_halfwords were investigated only through genuine source-level restructuring (declaration order, statement order, loop-counter variable identity/scope, re-read-vs-cache idiom choice) with each candidate independently measured via tools/compiler candidate-show --align, never through asm()/register hints/PERM_GENERAL forcing. The residual left open (extra_target/rectangle_a/rectangle_b landing at stack offsets 32/28/24 in the candidate vs the reference's 20/24/28, with a knock-on 4-byte candidate/reference size difference) is the same class of 'genuinely open, evidence-exhausted-at-the-source-level compiler register/stack-allocation-priority question' already documented after multiple dedicated passes on the closely related sibling 080e01e4 (see that owner's score.note 'open question (b)'); every remaining aligned-diff line in this owner's output is the identical value in a different register or stack slot, never a different computed value, so this is not believed to be a logic error.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e08c0":{"schema_version":1,"namespace":"main","address":"0x080e08c0","status":"proven-retained","classification":"battle_effect_compiler_materialization_module","owner_bytes":964,"score":{"measured":"2026-08-27","candidate_bytes":968,"reference_bytes":964,"differing_halfwords":307,"wrong_instructions":207,"class":"wrong","note":"First pass, built from the owner's own retained assembly (games/gs1/asm/080e08c0.s) plus an m2c-assisted transplant workspace (out/family-transplants/main-080e08c0/), not from the family matcher's naive template (main:080ce85c / member_orbit/run.c), whose naive symbol-renamed seed differed from the real target by hundreds of differing halfwords. The family matcher's structural score was against member_orbit/run.c's shape, but this owner's real callee set, field layout and constants match the already-recovered 0x03001eec 'battle work' sibling cluster instead (games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c), exactly as those five owners' own dossiers describe for their assigned (also mismatched) templates. Two real bugs found and fixed against reference evidence: (1) the CELL_W-table half-width shift in the frame>0x1F sprite-cell draw loop needs an unsigned (u32) operand to compile to lsrs -- an s32 local produced asrs, a genuine wrong-instruction, confirmed by cross-checking the already-adopted games/gs1/src/battle/effects/puff_arc/run.c, which declares the identical 'wide = CELL_W[cell]' idiom as u32 for the same reason; (2) the particle-scan draw's 'half = size >> 1' subtraction needed the same unsigned treatment (u32 cast), independently confirmed the same way. The larger single improvement (differing_halfwords 431->307, wrong_instructions 305->207, and candidate_bytes 984->968) came from restructuring the particle-scan draw call to assign 'size' inline inside the second call argument's array-index expression (Data_080ede48[(size = (member & 1) + 3) - 1]) rather than as a preceding standalone statement -- matching the established assignment-expression-as-argument idiom already proven in puff_arc/run.c's CELL_W read, and confirmed here from the reference's own instruction order (the mask/+3 sequence is interleaved with the position-read/wobble-shift sequence in the reference, not fully sequenced before it). This same change had a second, unexpected effect: it also fixed the function's very first register-allocation decision (the persistent 'work' base pointer now lands in sl for the whole function, matching the reference, instead of landing in r9) -- apparently a side effect of reduced register pressure from removing the extra 'dbl' local this change also let become an inline 'size * 2'. A fully-inlined variant that also removed the separate 'x' (position+wobble) local was tried and rejected: it lowered wrong_instructions to 209 but raised differing_halfwords 307->318, because 'size' then had to be spilled to the stack to survive the sin()-call argument evaluation; kept the version with 'x' as its own local instead, which needs no spill and scores strictly better on the primary differing_halfwords metric.","residual":"After both fixes and the argument-order restructuring, every remaining difference is one of the three cross-family register/scheduling residuals already confirmed and explicitly flagged as not source-shape-controllable in 080dc1ec.json, 080d82b0.json, 080d59b0.json and 080e01e4.json's dossiers: (a) the ring-seed loop's inner-loop prologue loads the 0x02010000 EWRAM base constant once and reuses it via register copies for both the particle-pointer construction and the two field-8/0x14 masks, where the reference loads it twice into two separate registers (r1 and r3) -- tried giving the mask its own separate 's32 mask = 0x02010000;' local, distinct from the pointer-construction literal, which shifted which physical register (fp vs r9) holds which role but did not produce the reference's two-load shape and left differing_halfwords unchanged; (b) short-lived scratch-register choice for the outer 'frame' counter's many repeated comparisons throughout the 112-pass loop body (frame==0x38, frame<=0x17, frame==0x14, the 0x14..0x1F range fold, frame==0x20, frame>0x1F, frame==0x26) differs per comparison (r0/r1/r2/r3/r4/r6 in various orders) even though every comparison's actual VALUE, immediate and branch target are correct; (c) a handful of independent-immediate-load scheduling swaps (e.g. 'movs r3,#40' before vs after an unrelated shift-and-add sequence) that reorder two independent instructions with no value difference. None of these were resolved by variable identity consolidation (reusing one 'member' variable across all four per-pass sub-loop counters, matching 080e01e4.json's confirmed successful technique for its own sentinel-init loop, had zero measurable effect here) or declaration-order changes (moving 'work' to the first-declared local had zero effect), consistent with those dossiers' own findings that this is a genuinely open compiler-internals-level question, not a source-restructuring one."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 7947/10000 (the closest structural template available), but the owner's real size (964 bytes) and shape differ substantially from the template's (724 bytes, 306 instructions): no Func_08002f40/Func_080ed408 heap-block allocation calls at all (this owner's two draw callbacks come entirely from Func_080cef64, like 080dc1ec/080e01e4, not from the template's Func_080ed408(46,...)/Func_080ed408(47,...) pair), a single Func_080041d8/Func_08004278 registration (not the template's two), a 9-entry orbit-ring array combined with a 144-slot burst-particle pool seeded 16-at-a-time per ring entry (neither of which the template has at all), and a fixed 112-pass outer loop (vs the template's member_count*16+48). Structurally this owner is a much closer match to the already-recovered 0x03001eec 'battle work' cluster (080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c) than to its assigned template, exactly as those five owners' own dossiers already document for their own (likewise mismatched) template assignments.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family: identical heap_cache=(void**)0x03001EEC / cursor=heap_cache / work=*cursor++ / draw_destination=*cursor / extra_target=heap_cache[2] prologue (byte-identical ldmia sequence, matches 080e01e4/080d82b0), the same Func_080cd594(0)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() call shape, the same (s32)&Value_XXXXXXXX effect-id idiom (Value_00000073/0000008e/000000b7/000000b4, all already-established symbols reused verbatim from 080e01e4.c and games/gs1/src/battle/effects/puff_arc/run.c), the same Func_080cef64(flag, out_pair) draw-callback-pair resolution as 080dc1ec/080e01e4, and the same Func_080072f4/Func_080072f0 trampoline calls (the r4 and r3 entries of the _call_via_rN bundle at games/gs1/asm/080072e4.s, confirmed and derived in 080dc1ec.json) modeled as callbacks[0]/callback_ptr[1] indirect calls and a direct Func_080072f0(dest,src,size,copier) call respectively. This owner is also the first in the cluster confirmed to share the exact Data_080ede9f/080edea5/080edeab/080edeb2 sprite-cell tables and CELL_W/CELL_H/CELL_DY/CELL_SRC-style table-driven draw idiom already adopted byte-exact in games/gs1/src/battle/effects/puff_arc/run.c (same table base addresses, same width-read-once-reused-for-shift-and-argument pattern, same six-cell/48-frame-divided-by-8 animation-cell indexing), confirming puff_arc's tables and idiom generalize to this cluster rather than being puff_arc-specific."},"rejected_experiments":["Naive symbol-renamed transplant of the member_orbit/run.c template (out/family-transplants/main-080e08c0/080e08c0.c): differing_halfwords in the hundreds before any adaptation: wrong callee set (Func_08002f40/Func_080ed408 calls that don't exist in the real target), wrong field layout, wrong loop trip counts. Rejected as a starting point in favor of reading games/gs1/asm/080e08c0.s directly plus the m2c-assisted out/family-transplants/main-080e08c0/m2c/080e08c0.c raw decompile of the target's own bytes.","s32 (signed) type for the CELL_W-table half-width local in the frame>0x1F ring-animate draw and for the particle-scan draw's size>>1 half: both produced asrs (arithmetic shift) where the reference emits lsrs (logical shift). Fixed with u32 for the ring-animate width (matching puff_arc/run.c's identical 'u32 wide' declaration) and a (u32) cast at the particle-scan shift site; changing the particle-scan 'size' local itself to u32 (rather than casting only at the shift) regressed differing_halfwords 431->453 and wrong_instructions 305->366, apparently by changing codegen at the array-index and multiply sites too; the narrower (u32) cast at just the shift site captured the fix without the regression.","Fully inlining the particle-scan draw's x-position computation into the call's third argument (removing the separate 'x' local entirely, so 'size' is assigned inside argument 2 and read by argument 3 in the same call): dropped wrong_instructions 213->209 but raised differing_halfwords 307->318 and forced 'size' to spill to a stack slot to survive the sin()-call argument evaluation. Reverted in favor of keeping 'x' as its own local (assigned before the call) with only 'size' assigned inline inside argument 2 -- strictly better on the primary differing_halfwords metric.","Reordering 'work' to the first-declared local (ahead of heap_cache/cursor): zero effect on the compiled output, confirming this compiler's register allocation is not driven by simple declaration-order/first-come allocation for this family, consistent with 080e01e4.json's own declaration-order experiments.","Merging the particle-scan loop's counter into the same 'member' variable already reused for the ring-seed outer loop, the ring-animate loop, and the final Func_080d6888/Func_080b5088 notify loop (matching 080e01e4.json's confirmed technique for its sentinel-init loop): correct and consistent with the reference's own register reuse (r7 is genuinely reused across all four of these sub-loops in the reference), but on its own, before the argument-restructuring fix below, produced no measurable score change -- the benefit only showed up combined with the inline-assignment restructuring of the particle-scan draw call.","Giving the ring-seed inner loop's 0x02010000 EWRAM mask its own separate 's32 mask = 0x02010000;' local, distinct from the particle-pointer-construction literal, to try to reproduce the reference's two-separate-literal-pool-load shape (r1 and r3 both loaded from the pool, rather than one load reused via register copy): shifted which physical register (fp vs r9) ends up holding the mask role but did not produce a second load and left differing_halfwords unchanged; kept anyway since it has a small, non-negative effect on wrong_instructions (213->207) with no downside."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e08c0.s), the out/family-transplants/main-080e08c0/ workspace's m2c-assisted raw decompile of the target's own bytes (m2c/080e08c0.c, m2c/target.canonical.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c and 080e01e4.c and their dossiers, in-repository headers, and the approved compiler. No other Golden Sun decompilation project or external symbol map was consulted.","2026-08-31 retained-assembly proof: the complete 112-pass battle-effect candidate has equal branch topology and accounts for every call, argument, callback, constant, table lookup, loop bound, field access, and memory operation. The residual is confined to the documented register-role cascade, reused versus duplicate 0x02010000 literal materialization, independent immediate scheduling, and the resulting four-byte pool/return-alignment extent. The allocator decoder identifies only the interlocked carrier/width roles and finds no unique source repair; the family-transfer, declaration, variable-identity, type-width, argument-evaluation, constant-carrier, compiler-family, and pass probes recorded above preserve the residual or regress. Relocation-normalized cross-edition verification proves all 742 core bytes identical across all six GS1 editions (36 relocations and 19 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_materialization_module.","This candidate claims zero DONE bytes (status measured-draft, not exact).","Semantic summary: republishes the caller's effect-state pointer at work+0x7828, resolves a two-entry draw-callback pair via Func_080cef64, registers three effects (Func_080e0524 against extra_target, work, and work+0x320), seeds a 9-entry orbit ring at work+0x7080 (sine/cosine-derived x/y, alternating +/-32 stagger, and a negative staggered 'age' start at -(ring_index*2)) together with a 144-slot burst-particle pool (9 rings x 16 particles each, randomized position/velocity/angle fields), then runs 112 animation passes. Each pass conditionally draws a fixed curtain rectangle through frame-indexed sub-ranges (frames 0-23 via callback[0], frames 20-31 via callback_ptr[1] with two different position formulas split at frame 24, a one-shot palette/graphics load at frame 20 via Func_080072f0, a one-shot Func_080e0524 registration at frame 32), animates all 9 ring entries once their staggered age enters [0,47] (table-driven 6-cell sprite draw via callback[0], shared Data_080ede9f/080edea5/080edeab/080edeb2 tables already adopted in puff_arc/run.c), scans and ages all 144 burst particles once each pass's frame index crosses each particle's own activation threshold ((idx/16)*2+40), redrawing and advancing an angle-like field with a documented off-by-one wraparound (adds 0x800 per pass, resets by subtracting 0xFFFF rather than 0x10000 when it exceeds 0xFFFF), and at frame 38 cues Func_080d6888/Func_080b5088 for every real party member from the target's own count field.","The Func_080b5088 call in this owner passes two arguments (member_id, 6), not the single-argument shape used in 080e01e4.c's own local prototype for the same callee -- since every recon .c file declares its own local extern prototype rather than sharing one through a header, this does not conflict; this owner's own retained assembly unambiguously sets r1=6 before the call (movs r1,#6 immediately before bl), so the two-argument shape here is taken directly from this owner's own evidence rather than copied from a sibling.","The two real bugs found (unsigned-shift requirements for the CELL_W half-width and the particle-scan half computation) and the inline-assignment-expression-as-call-argument idiom that produced the largest single improvement are both worth checking against 080d59b0.c, 080d82b0.c and 080dc1ec.c, whose own dossiers describe similar table-driven draw calls and may carry the same unfixed asrs/lsrs mismatch or the same un-tried argument-restructuring opportunity.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e0c84":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080e0c84","status":"proven-retained","owner_bytes":956,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"score":{"measured":"2026-08-27","candidate_bytes":956,"reference_bytes":956,"differing_halfwords":4,"wrong_instructions":8,"class":"allocation","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080e0c84.c --align --size 956","note":"Drafted from the retained owner assembly (games/gs1/asm/080e0c84.s) and the family-transplant workspace's m2c-assisted context (out/family-transplants/main-080e0c84/), not the naive symbol-renamed seed. Length and structure match the reference exactly (956/956 bytes). Explicit narrow callback and interval locals reproduce the reference's argument-materialization order and reduce the residual from six to four differing halfwords. The only remaining cluster is the reciprocal r8/r9 choice for the particle base and 0xF mask carriers. Earlier structural fixes established the indirect draw callbacks, assignment-expression table-read order, and three-word spawn output required by the reference frame."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 8059/10000 against member_orbit/run.c, but this owner's size (956 bytes) and body differ substantially from the template's (724 bytes): where member_orbit runs a single 64-frame loop that draws 4 orbiting sprites per active party member, this owner instead seeds a 64-slot randomly-initialized particle pool (fixed-point x/y position plus a sin/cos velocity pair per particle) ahead of the frame loop, then every frame both re-draws every eligible particle (reading its position back through the upper halfword of the s32 fixed-point field, per 080e01e4.c's established M2C_FIELD(ptr,s16*,2/6) idiom) and redraws a 5-column background reveal band whose x-offset depends on `frame/4`. The two owners do share the family's field-offset layout (work+0x7780/0x7784/0x7824/0x7828), the M2C_FIELD macro convention, the heap_cache=(void**)0x03001EEC/cursor/work/canvas prologue, and the Func_080cd594/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 setup/teardown bracket -- confirming the family assignment at the subsystem level even though the template's own body was not otherwise reusable."},"rejected_experiments":[{"experiment":"pre-compute the particle-draw call's w/h/x_int/y_int into named locals ahead of the call (routine[i&1](canvas, ..., x_int - w/2, y_int - h/2, w, h);)","result":"compiled to the right values but a different instruction order (table16 -> byte-table1 -> byte-table2 -> both ldrsh reads, instead of the reference's table16 -> x_int -> byte-table1 -> byte-table2 -> y_int -> byte-table2 interleaving); replaced with puff_arc/run.c's established `(w = Data_X[i]) / 2` assignment-expression idiom, inlined directly in the call, which reproduced the reference's exact read order and dropped differing_halfwords from 270 to 147 in one step"},{"experiment":"spawn as a 2-word local (s32 spawn[2];), matching the caller's own two direct reads (spawn[0], spawn[1])","result":"left the compiled frame 4 bytes short (sub sp,#44 vs reference's #48) and shifted every later local's stack offset by 8, cascading into ~100 register-choice diffs across the whole function even though every value was individually correct; widening to `s32 spawn[3];` (an unread 3rd word Func_080e3980 evidently still writes, matching the template's own 3-int screen-position convention) fixed the frame size exactly and collapsed nearly all of those cascaded diffs at once (270 -> 81 differing_halfwords)"},{"experiment":"col precomputed into a named local before each routine[0](...) call in the final two 5-iteration reveal-band loops (col = (i<<5) - (frame/4&31); routine[0](canvas, work, col, ...);)","result":"reference computes the subtraction interleaved with the sp+20/r8 setup rather than immediately after the mask; inlining the expression directly into the call argument (dropping the named `col` local) matched that interleaving and dropped differing_halfwords from 81 to 11"},{"experiment":"amp * Func_08002322(angle) / amp * Func_0800231c(angle) for the particle velocity fields (amp written first, syntactically)","result":"reference preloads the sin/cos call result into the muls accumulator register first, then multiplies by amp already resident from the mask computation; swapping the C multiplication operand order to `Func_08002322(angle) * amp` matched (11 -> 7 differing halfwords)"},{"experiment":"hoist `p = (Particle *)0x02010000;` above the particle-init for-loop as a separate statement, with `p++` as the loop body's last statement (matching the particle-draw loop's own for(...;...;i++,p++) form only in the second loop)","result":"folding the init loop to the same `for (i = 0, p = ...; i != 64; i++, p++)` shape used by the particle-draw loop dropped one more differing halfword (7 -> 6) with no size change"},{"experiment":"declaration-order swaps (spawn/screen/routine locals; amp/angle locals) to influence the two remaining independent-immediate-load residuals (the Func_080041d8 callback/interval pool-load-vs-lsls ordering, and the r8/r9 particle-loop mask/base-pointer preload ordering)","result":"zero effect in every case, consistent with 080e01e4.json's finding that declaration-order and block-scoping levers do not move this compiler's register/scheduling choices on their own -- these two are left as the family's already-documented register-allocation-priority residual, class=allocation"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e0c84.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, games/gs1/recon/en/main/080e01e4.c and its dossier, in-repository headers, and the approved compiler. The out/family-transplants/main-080e0c84/ workspace's m2c-assisted context (m2c/080e0c84.c, m2c/target.canonical.s) was used as a starting structural scaffold, not copied verbatim -- the naive symbol-renamed 080e0c84.c seed in that directory was confirmed unusable directly (its body is the template's own, not this owner's).","The complete candidate is retained as semantic reconstruction evidence; the byte-exact structured assembly remains production source under the proven battle-effect compiler-allocation classification.","Semantic summary: sets BG2 scale, republishes the effect-state pointer at work+0x7828, resolves two draw routines via Func_080cef64 into routine[2] (indirect calls through the r4/ip _call_via_rN trampoline slots, never direct function calls), seeds a 64-slot particle pool at the fixed EWRAM scratch address 0x02010000 with randomized fixed-point positions and a sin/cos velocity pair, then runs 64 animation frames. Each frame conditionally draws one orbiting marker (state->0x1C==1, gated further by a double-draw on the first 4 frames), redraws every eligible particle (frame >= particle_index/4 + 4) at a table-selected sprite cell, on frame 8 fires a one-shot Func_080d6888/Func_080b5088 dispatch pair, and redraws a 5-column background reveal band whose formula (subtract vs add-then-subtract-32) is chosen by state->field_4.","The remaining 4 differing halfwords / 8 wrong instructions are one reciprocal r8/r9 role choice between the particle base and 0xF mask carriers. Explicit narrow callback and interval locals closed the former literal-load/shift scheduling hunk without forcing allocation or scheduling. Explicit mask locals and reversed loop-initializer order regress the surrounding allocation and were rejected.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."],"compiler_decision":{"tool":"candidate-show --allocator-order plus GCC -da allocation dumps","finding":"The remaining broad-looking rows reduce to one reciprocal r8/r9 role choice between the persistent particle pointer and mask carrier, plus one independent literal-load/shift ordering. The allocator assigns both long-lived pseudos from the same low-register preference class; declaration, scope, operand-order, family-template, and compiler-axis probes preserve the choice or regress surrounding exact code."},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":728,"core_identical":true,"starts":{"ja":"0x080d7c84","en":"0x080e0c84","de":"0x080e2a84","es":"0x080e4484","fr":"0x080e4484","it":"0x080e0c84"}},"decision":"Retain the byte-exact structured assembly as a proven battle-effect compiler-allocation module. The complete ordinary-C reconstruction remains the semantic source artifact and all 956 owner bytes count as DONE."},"main:080e15e8":{"schema_version":1,"namespace":"main","address":"0x080e15e8","status":"mapped","measured":"2026-08-29","map":{"head":"0x080e15e8","head_symbol":"FunctionHead_080e15e8","head_file":"games/gs1/asm/080e15e8.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; (sub sp, then setup) -- full r8-r11 save.","true_epilogue":{"file":"games/gs1/asm/080e21e8.s","note":"Ends `... bl sub_08009038 (loop) / bl sub_080cdbc0 / add sp, #336 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. 336-byte frame, four-high-register restore, sub_080cdbc0 cleanup call matching the shared idiom seen in 080be378/080d765c/080ec100/080e47b8/080f4168. This is the sole real epilogue."},"span":{"start":"0x080e15e8","end_exclusive":"0x080e2538","size_bytes":3920,"derivation":"end = start of next asm file games/gs1/asm/080e2538.s, immediately following 080e21e8.s which owns the epilogue. size = 0x080e2538 - 0x080e15e8 = 0xf50 = 3920."},"member_regions_in_order":[{"addr":"0x080e15e8","symbol":"FunctionHead_080e15e8","file":"games/gs1/asm/080e15e8.s","role":"real prologue + setup, in-file literal pool"},{"addr":"0x080e1724","symbol":"Fragment_080e1724","file":"games/gs1/asm/080e1724.s","role":"middle fragment, header comment: '\u89aa\u95a2\u6570\u306e\u4e2d\u9593\u65ad\u7247'"},{"addr":"0x080e17c4","symbol":"Continuation_080e17c4","file":"games/gs1/asm/080e17c4.s","role":"continuation through an indirect-call loop tail (header: '\u9593\u63a5\u6f14\u7b97\u547c\u51fa\u3057\u5f8c\u306e\u30eb\u30fc\u30d7\u672b\u5c3e\u307e\u3067\u3092\u540c\u4e00\u30d5\u30a1\u30a4\u30eb\u306b\u4fdd\u6301'); contains an internal `mov r12, pc / bx r7` long-branch veneer mid-body; ends on an internal `bne` that falls straight through into 080e1a48 with no explicit branch"},{"addr":"0x080e1a48","symbol":"Fragment_080e1a48","file":"games/gs1/asm/080e1a48.s","role":"internal fragment carrying the parent's frame/high registers forward, header: '\u89aa\u95a2\u6570\u306e\u30b9\u30bf\u30c3\u30af\u67a0\u3068\u9ad8\u4f4d\u30ec\u30b8\u30b9\u30bf\u3092\u5f15\u304d\u7d99\u3050\u5185\u90e8\u65ad\u7247'"},{"addr":"0x080e1acc","symbol":"Region_080e1acc","file":"games/gs1/asm/080e1acc.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e1df8","symbol":"Region_080e1df8","file":"games/gs1/asm/080e1df8.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e21e8","symbol":"Region_080e21e8","file":"games/gs1/asm/080e21e8.s","role":"converging tail ending in the real, shared epilogue"}]},"domain_evidence":["080e17c4's mid-body `mov r12, pc / bx r7` is the exact 'inter-region veneer' pattern named by CONTRIBUTING.md's Split functions section as the compiler's own long-branch mechanism -- direct structural confirmation of a single split function rather than several call sites.","080e1a48's header comment explicitly states the following region shares the parent's stack frame and high registers ('\u89aa\u95a2\u6570\u306e\u30b9\u30bf\u30c3\u30af\u67a0\u3068\u9ad8\u4f4d\u30ec\u30b8\u30b9\u30bf\u3092\u5f15\u304d\u7d99\u3050'), and its own body never pushes/pops -- consistent with being mid-function, not a callee.","sub_080cdbc0 in the epilogue matches the shared per-call finalizer idiom already noted across 080be378/080d765c/080ec100/080e47b8/080f4168, reinforcing that all of these large split dispatch functions in the 080d7xxx-080f6xxx range belong to one subsystem (likely battle/menu related given the earlier-adopted 080be378's confirmed battle-ability-resolution domain)."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080e15e8.c --owner 080e15e8 --size 3920","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited.","080e17c4 -> 080e1a48 is a physical fall-through (no branch instruction crosses the boundary); verified by the preceding file's last instruction being a conditional `bne` to an internal label rather than any address touching 080e1a48."]},"main:080e2538":{"schema_version":1,"namespace":"main","address":"0x080e2538","status":"measured-draft","owner_bytes":956,"score":{"measured":"2026-08-27","candidate_bytes":884,"reference_bytes":956,"differing_halfwords":452,"wrong_instructions":420,"class":"wrong","note":"First pass, recovered directly from games/gs1/asm/080e2538.s (every field width/sign checked instruction-by-instruction: ldr vs ldrb vs ldrsb vs ldrh vs ldrsh) plus the out/family-transplants/main-080e2538/m2c/080e2538.c real-assembly m2c decompile (used only for control-flow shape, not statement spelling). The assigned family template (main:080ce85c, member_orbit/run.c) shares no callees and a materially different control-flow shape -- only its heap_cache-cursor prologue idiom transfers; the rest was recovered fresh from this owner's own bytes and cross-checked against 080e01e4.c/080e7404.c for established callee signatures and field offsets ({work,object}+0x14 member_count, +0x7780/+0x7784/+0x7824/+0x77A8 status fields, +0x24+2*i member-id array). Two family fixes applied on first read rather than discovered by trial: the BG2X pan blend's lsrs+adds+asrs is plain `/2` (not the sign-extension-bug shift trick -- the ASR here already matches a genuine signed halving); and every `bl Func_080072f4` is the r4 slot of the _call_via_rN trampoline (0x080072f4 = 0x080072e4 + 4*4), modeled as an indirect call through the single DrawRectangleFn blit routine kept in heap_cache[7] (established by 080e01e4.c/member_orbit run.c), not a fictional 6-argument direct call. Structure, constants, field offsets, table widths/signs (Data_080eecf2/080eecb2/080eecfc/080eecff/080eed0e are ldrb-read u8 except 080eecf2 which is ldrsb-read s8; 080eed1e is ldrh-read u16) and every branch/loop bound were confirmed to match the reference one instruction at a time via --align. The entire residual is a single upstream register-allocation choice: the reference spills `work` (and to a lesser extent the heap_cache[1] draw-target) to a 56-byte stack frame and reloads it repeatedly (many `ldr rX,[sp,#N]` sites), while this candidate's compiler keeps both live in callee-saved high registers for the whole function (`sub sp,#32`, no `work` reload anywhere) -- a 72-byte/36-instruction gap entirely explained by that one spill-vs-register decision cascading through every site that touches `work`/`draw_target`/the row-vs-frame-pass counters (candidate keeps frame-pass in r9 and row in sl; reference keeps frame-pass in fp and row in r9 -- registers/values/net effect all match, only the physical assignment differs). Tried and confirmed zero-effect: reordering the `fp`/`row` top-level declarations; giving the two ring/burst seed loops (before the main per-frame loop) their own counter identity separate from the main loop's `row` (876 bytes, same 452 differing_halfwords -- moved size further from the 956-byte target, reverted). This matches the family's documented, not-source-shape-controllable register-allocation residual (games/gs1/recon/en/dossiers.json#main:080e01e4 note (b): reference coalesces short-lifetime loop counters into `sl`/keeps the outer pass counter in `fp`; compilers this size differ on which high register gets which role) -- here the same class of issue, more severe because this owner has more live loop variables competing for the same four high registers. Not chased further per that precedent."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 8085/10000 (n-gram similarity high, length similarity only 7500 -- template is 724 bytes against this owner's 956). Shares zero callees with Func_080ce85c beyond the generic prologue/epilogue pattern and heap_cache(0x03001EEC)/work+0x7828 idiom; the real control-flow (22 branch labels, a two-phase seed-then-animate shape driven by two small lookup tables Data_080eecfc/Data_080eecf7 rather than a single member_count*16+48 frame loop) was recovered fresh from this owner's own retained assembly, not transplanted.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404 and 080e01e4.json: identical work+0x7828 state-pointer idiom, the same Func_080cd594(mode)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() open/close shape, the same {state}+0x14 member_count / +0x24+2*i member-id array fields already established by member_orbit/run.c and 080e01e4.c, and the same Func_080072f4-is-the-r4-trampoline-slot resolution first derived in 080dc1ec.json and reused verbatim here (heap_cache[7] blit routine from the same Func_080ed408(46,...) call already established as a DrawRectangleFn-populating call in member_orbit/run.c and 080e01e4.c)."},"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e2538.s), the disassembly-driven out/family-transplants/main-080e2538/m2c/080e2538.c control-flow reference (m2c run against this owner's own real bytes, used for control-flow shape only), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080e01e4.c, games/gs1/src/battle/effects/member_orbit/run.c and their dossiers, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes -- not adopted, differing_halfwords=452.","Semantic summary: a battle-presentation sub-effect that pans BG2's X reference point halfway between the effect state's first and last party member, seeds a small per-row 'vine' ring and a much larger 21-item-per-row burst table sized by a per-variant row count (Data_080eecfc[state->0x18]), then runs one pass per animation frame. Each row activates once the running frame counter crosses its own Data_080eecf7[row]+0x12 threshold: from then on every pass draws and steps all 21 of that row's burst items (position/speed/shape driven by Func_08004458 and the Data_080eecff/080eed0e/080eed1e width/height/sprite-offset tables); before that threshold every pass instead draws and grows the row's own vine entry once the row's plain Data_080eecf7[row] threshold is passed. Exactly on the frame a row's activation threshold is first crossed, the owner also cues Func_080d6888 for every real party member on the state.","Every field access width and signedness (u8 vs s8, u16, s16, s32) was verified against the individual ldr/ldrb/ldrsb/ldrh/ldrsh/str/strh mnemonics in games/gs1/asm/080e2538.s rather than trusted from the m2c placeholder types, since m2c's default type inference does not reliably distinguish signed byte loads from unsigned ones.","Data_080eecb2/080eecf2/080eecf7/080eecfc/080eecff/080eed0e/080eed1e are small tables placed near this owner's own object code (~0x080eecb2-0x080eed2e); named by address only, per the established Data_ convention (e.g. games/gs1/recon/en/main/080e01e4.c's Data_080ede48), since no cross-owner evidence yet ties them to a more specific shared vocabulary.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e302c":{"schema_version":1,"namespace":"main","address":"0x080e302c","status":"measured-draft","owner_bytes":2188,"candidate_bytes":2004,"differing_halfwords":1086,"wrong_instructions":1044,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted a 2188-byte no-candidate main-ROM owner after repairing its aggregate-aware m2c draft. A fresh canonical compile produces 2004 bytes; topology differs and 1086 halfwords differ, so the draft claims zero DONE bytes.","Mechanical repairs recovered the packed u8/u16 presentation tables at 0x080eed7e-0x080eeda6, the eleven object handles at work offset 0x77d8, and signed-halfword party-member IDs. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The owner builds a battle presentation from palette darkening, tile strips, eleven sprite objects, two particle fields, phase-controlled drawing, and party-member actions. A permanent source name is deferred until dispatch and resource-table evidence identifies the effect."]},"main:080e47b8":{"schema_version":1,"namespace":"main","address":"0x080e47b8","status":"mapped","measured":"2026-08-29","map":{"head":"0x080e47b8","head_symbol":"FunctionHead_080e47b8","head_file":"games/gs1/asm/080e47b8.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #184 -- full r8-r11 high-register save, 184-byte frame.","true_epilogue":{"file":"games/gs1/asm/080e6288.s","note":"Ends `... bl sub_080cdbc0 / .L_080e65f8: add sp, #184 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0` -- exact mirror of the head's prologue, same 184-byte frame, same four high-register saves. This is the sole real epilogue of the enclosing function."},"span":{"start":"0x080e47b8","end_exclusive":"0x080e6638","size_bytes":7808,"derivation":"end = start of next asm file games/gs1/asm/080e6638.s (immediately following 080e6288.s, which owns the epilogue and has no trailing pool beyond it). size = 0x080e6638 - 0x080e47b8 = 0x1e80 = 7808."},"member_regions_in_order":[{"addr":"0x080e47b8","symbol":"FunctionHead_080e47b8","file":"games/gs1/asm/080e47b8.s","role":"real prologue + setup + branch head of a 101-entry jump table (per its own header comment '\u5f8c\u7d9a\u3059\u308b\u767e\u4e00\u9805\u76ee\u306e\u5206\u5c90\u8868'), literal pool in-file"},{"addr":"0x080e4ab8","symbol":"Fragment_080e4ab8","file":"games/gs1/asm/080e4ab8.s","role":"jump-table case body reached only via computed branch, shares the head's frame; header comment: '\u89aa\u95a2\u6570\u306e\u5206\u5c90\u8868\u304b\u3089\u5230\u9054\u3057\u3001\u540c\u3058\u30b9\u30bf\u30c3\u30af\u67a0\u3092\u4f7f\u3046\u5185\u90e8\u65ad\u7247'"},{"addr":"0x080e4b4c","symbol":"Region_080e4b4c","file":"games/gs1/asm/080e4b4c.s","role":"call-graph-reached prologue-less region, code+data mixed"},{"addr":"0x080e4e0c","symbol":"Region_080e4e0c","file":"games/gs1/asm/080e4e0c.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e547c","symbol":"Fragment_080e547c","file":"games/gs1/asm/080e547c.s","role":"ten jump-table case bodies sharing the parent literal table, header comment: '\u89aa\u95a2\u6570\u306e\u5206\u5c90\u8868\u304b\u3089\u5230\u9054\u3059\u308b\u5341\u500b\u306e\u51e6\u7406\u65ad\u7247'"},{"addr":"0x080e5504","symbol":"Region_080e5504","file":"games/gs1/asm/080e5504.s","role":"call-graph-reached prologue-less region, contains .L_080e551a landing label targeted by 080e547c's fragments"},{"addr":"0x080e57b4","symbol":"Region_080e57b4","file":"games/gs1/asm/080e57b4.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e5afc","symbol":"Region_080e5afc","file":"games/gs1/asm/080e5afc.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e5e28","symbol":"Region_080e5e28","file":"games/gs1/asm/080e5e28.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e6288","symbol":"Region_080e6288","file":"games/gs1/asm/080e6288.s","role":"converging tail ending in the real, shared, single epilogue"}]},"domain_evidence":["080e47b8's own header comment identifies it as 'FunctionHead' for a split function whose branch head carries a 101-entry jump table plus literal pool -- structurally identical in shape to the already-adopted 080be378 split (100-entry table, same four-high-register frame convention).","Case-body fragments 080e4ab8 and 080e547c both explicitly self-describe (in their headers) as reached from the parent's jump table and sharing its stack frame -- direct textual confirmation this is one function, not several.","The intervening 080e4b4c/080e4e0c/080e5504/080e57b4/080e5afc/080e5e28 regions are all tagged with the 'call-graph reconstructed, code+data mixed, byte-verified by build_asm.ts' comment and each open with a bare label (no push), consistent with case-body continuations rather than independent callable functions.","sub_080cdbc0 (invoked in the epilogue's tail cleanup, matching the same call seen in the already-adopted 080be378/080ec100/080d765c epilogues) appears to be a shared per-call finalizer used across several of these large dispatch functions in this address neighborhood -- likely a common battle/menu subsystem helper worth checking against existing owners before scoring."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080e47b8.c --owner 080e47b8 --size 7808","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edit, no games/gs1/recon/translation-units.json touched.","Recovered only from retained assembly headers/prologue/epilogue text in the listed .s files; no leaked source or other decompilation project consulted."]},"main:080e698c":{"schema_version":1,"namespace":"main","address":"0x080e698c","status":"proven-retained","owner_bytes":944,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"score":{"measured":"2026-08-27","candidate_bytes":944,"reference_bytes":944,"differing_halfwords":294,"wrong_instructions":136,"class":"wrong","note":"First pass, evidence-grounded against games/gs1/asm/080e698c.s (never against the family-matcher's naive symbol-retargeted seed, which differs from this owner's real control flow entirely -- no per-member per-frame sprite loop at all). Started from 390 differing_halfwords / 230 wrong_instructions / 940 candidate bytes (owner is 944) and converged to the numbers above through four confirmed fixes: (1) the sine/cos-derived particle-velocity fields at frame==18 (`M2C_FIELD(particle,s32*,12)`/`+16`) need a SIGNED `s32 magnitude`, not `u32` -- the reference's `asrs r3,r3,#7`/`asrs r3,r3,#6` are arithmetic shifts and an unsigned multiplicand compiled to `lsrs`, a real value-changing bug for negative products; (2) the final particle-draw call's `(x>>16)-8`/`(y>>16)-8` arguments must be computed into named locals (`rx`/`ry`) BEFORE the `Func_080022fc` cell-index call, not inlined at the call site -- the reference computes both shifts immediately after the range guard, before touching `frame+i`; (3) the prologue statement order matters: `draw_destination = *cursor; extra_target = heap_cache[2];` must come BEFORE `M2C_FIELD(work,...,0x7828) = object;`, matching the reference's literal-pool/`ldmia` scheduling -- reversing this (moving the field store first) measurably regressed the score (263->446 dh) by knocking `work` off r9 onto fp entirely; (4) `new_x` (`member_a`'s field+8, later added to `dx_scaled`) must be pre-read into the `new_x` local itself and reused for the `dx` subtraction, rather than re-read fresh from `member_a` after the Func_080022ec call -- the reference caches this specific value into `sl` before the call (`mov sl,r2`) so it survives across it. Tried the identical treatment for the z-component (`new_z`/member_a field+16, dz computation): unlike x, caching z the same way made the allocator swap `work` from r9 onto fp function-wide (score regressed to 940 bytes/263 dh but 204 wrong_instructions, i.e. a differently-shaped, not simply worse, mismatch) -- reverted, leaving the z-component read fresh at point of use as before.","residual":"The remaining diff is entirely register-allocation/scheduling noise, not a remaining algorithm, type, or call-argument mismatch: (a) the 1024-slot particle-lifetime-reset loop's counter lands in r3 here vs the reference's r8 (r8 needs the awkward `movs r4,#1; add r8,r4` two-instruction increment since Thumb high registers cannot take an immediate add, so the reference's choice is clearly a global allocation-pressure artifact, not a source hint); this single choice renumbers several downstream pseudo-registers for the rest of the function (member_b's z-field read order, several `mov rX,sl`/`mov rX,r8` register-name-only diffs at the Func_08009140/150/080 call trio, the final `pop {r0}; bx r0` vs `pop {r1}; bx r1`). (b) A handful of independent-immediate-load reorderings (e.g. `movs r1,#7; movs r2,#5` vs the reference's `r2` first then `r1`) that carry no value difference. Tried renaming/re-scoping the reset loop's counter (`i` vs a fresh `count`, block-scoped either way) and nesting `leftover` in its own block right at the sqrt call site: both zero effect, confirming these are compiler-internal tie-breaks rather than source-shape gaps reachable from this level. Did not chase further, per this family's already-documented pattern of this same residual class (games/gs1/recon/en/dossiers.json#main:080e01e4 note (b), 080d82b0.json, 080dc1ec.json)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 8067/10000, the closest available template, but this owner is a materially different sub-effect: it runs a fixed 70-frame loop (`frame != 70`), never reads a member count (`M2C_FIELD(target,s32*,20)` does not appear anywhere in the retained assembly), and has no per-member per-frame sprite-orbit loop at all. In place of the template's per-member loop, this owner's prologue computes a one-time distance/velocity setup between exactly two tracked members (ids at target+8 and (s16)target+36) and feeds the result into the generic Object_ResetMotion/Object_SetPosition/Object_SetMode trio (Func_08009140/Func_08009150/Func_08009080, named via games/gs1/include/types.h's Object_ResetMotion define and the matching call shapes in games/gs1/recon/en/main/08098698.c). Every call the template and this owner DO share (Func_080cd594, Func_080e0524, Func_080041d8/Func_08004278, Func_08002dd8x2, Func_080cdbc0, Func_080b5098, Func_08002322/Func_0800231c) uses the identical 0x03001eec battle-work field layout (work+0x7780/0x7784/0x7824/0x7828) documented there and in the other measured siblings in this family (080d59b0/080d82b0/080dc1ec/080e01e4/080e7404)."},"rejected_experiments":["Naively renaming the family-matcher's symbol-retargeted seed (out/family-transplants/main-080e698c/080e698c.c, the template's own body under this owner's name) was not attempted as a starting point beyond reading it for header/typedef/declaration scaffolding -- its body has no relationship to this owner's real control flow (no fixed 70-frame loop, no distance/velocity prologue, no wipe-in table-driven draw, no frame==18 particle spawn), confirmed directly against games/gs1/asm/080e698c.s from the start.","u32 magnitude for the frame==18 particle-spawn velocity fields (field+12/+16): compiled the sin/cos-scaled shift as logical (`lsrs`) instead of the reference's arithmetic (`asrs`) -- a genuine value bug for negative sin/cos products, not merely a byte-count regression. Fixed by declaring `s32 magnitude`.","Inlining `(x>>16)-8`/`(y>>16)-8` directly as Func_080072f4 (the r4-slot `_call_via_rN` veneer, modeled as the real DrawRectangleFn indirect call) draw-call arguments: this delays the two `asrs #16` shifts until right before the call, after the `Func_080022fc` cell-index call, which does not match the reference's placement (both shifts happen immediately after the `x<=0x7EFFFF && y>=0` guard). Fixed by hoisting `rx = x>>16; ry = y>>16;` into named locals before the cell computation.","Reordering the prologue so `M2C_FIELD(work,void**,0x7828) = object;` runs before `draw_destination = *cursor;` (matching a naive reading of where the reference loads the work+0x7828 constant relative to `sub sp,#36`): this knocked `work` off r9 entirely (onto fp) for the whole rest of the function and regressed differing_halfwords from 263 to 446. Reverted to the original heap_cache/cursor/draw_destination/extra_target/field-store/Func_080cd594 order shared with the other measured siblings in this family.","Caching member_a's field+16 (z-component) into `new_z` before the dz Func_080022ec call, mirroring the x-component fix that did help: this is a real reference-visible pattern (`mov r8,r0` right after the field+16 load) but adding it as a second new named local pushed the compiler's overall register count high enough to reassign `work` from r9 to fp, producing a differently-shaped 940-byte/263-dh/204-wrong_instructions candidate rather than a strict improvement. Reverted; only the x-component (`new_x`) is pre-cached.","Block-scoping `leftover` (the Func_080072ec r2-slot veneer's genuinely-unassigned second argument, matching the FixedSqrt `unused1`/`unused2` idiom from games/gs1/src/math/fixed_sqrt.c) into its own nested block immediately before the sqrt call, and separately renaming the particle-reset loop's counter from `i` to a fresh `count`: both changes were measured with zero effect on the score, confirming the residual register choices are not sensitive to declaration scope or identifier naming at this level."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e698c.s), the approved local EN ROM, the family-transplant workspace's m2c-assisted structural context (out/family-transplants/main-080e698c/m2c/080e698c.c and family-template.i, used only for recovered-type/declaration hints, never for statement spelling), the already-exact template games/gs1/src/battle/effects/member_orbit/run.c, the already-committed measured siblings in this same 0x03001eec battle-work family (080d59b0.c/080d82b0.c/080dc1ec.c/080e01e4.c/080e7404.c and their dossiers), the already-adopted games/gs1/src/math/fixed_sqrt.c, games/gs1/src/runtime/dispatch/call_work_entry_with_args.c and battle_owner_24.c (Func_080072ec/Func_080072f0 veneer-call precedent), games/gs1/src/unidentified/overlays/state_update/... (unrelated), games/gs1/recon/en/main/08098698.c (Object_ResetMotion/SetPosition/SetMode call-shape precedent), games/gs1/include/types.h, and the approved compiler via tools/compiler candidate-show. No GS2 evidence, external source, other Golden Sun decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","Func_080072ec is the r2-slot `_call_via_rN` veneer at games/gs1/asm/080072e4.s (0x080072e4 + 4*2, i.e. `bx r2`). The retained assembly loads 0x030001D8 -- the same relocated IWRAM square-root routine used throughout the tree, per fixed_sqrt.c's veneer-audit comment -- into r2 immediately before the `bl`, so it is modeled as a direct call to the veneer's own symbol with the real jump target as a trailing argument, exactly as fixed_sqrt.c and battle_owner_52.c model their own r3-slot and r2-slot veneer calls respectively. The middle argument is never assigned between the preceding Func_080022ec call and this call in the retained assembly (no instruction touches r1 in between, i.e. it is genuinely whatever Func_080022ec's implementation leaves in r1), so it is passed as a deliberately-uninitialized local (`leftover`), matching FixedSqrt's own unused1/unused2 idiom for the identical situation.","Func_080e3980 is EffectPosition_ApplyAlternateStepAndYOffset per games/gs1/include/types.h (sibling of Func_080e3944 EffectPosition_ApplyBaseAndYOffset, used by the template and by 080dc1ec.c). Its first argument here is read from target+8 as a plain s32 -- the exact same field used directly as Func_080b5098's member-id argument earlier in this same owner -- so it is modeled as taking a member id, not a position-record pointer, unlike Func_080e3944's (src,dest) shape.","Field offsets on `member_a` (0x28/0x2C-unused/0x30/0x34/0x44/0x48/0x58/0x5A) are read directly from the retained assembly and are not otherwise documented in this family; they are consumed exclusively by the generic Object_ResetMotion/SetPosition/SetMode trio immediately afterward, so no more specific struct/field names are claimed than the raw offsets.","Semantic summary: a camera-tracking / wipe-in battle intro effect. Loads a palette and sets BG2 scale, registers three effect callbacks (0x73 against extra_target, 0x61 against work, 0x6D against work+0x3E80), resolves one draw-callback pair via Func_080cef64, clears a 1024-slot particle pool, then computes the on-screen distance between two specific tracked party members (ids at target+8 and (s16)target+36) and uses it to set the first member's velocity/position via the generic object-motion API. Runs a fixed 70-frame loop: every frame re-projects the tracked member (Func_080e3980) to drive a BG affine register and, during frames 8-23, draws a wipe-in decorative rectangle from a small 7-entry table family (selected by a facing/variant flag at target+4); at frame 18 exactly it spawns 16 fresh randomized-velocity particles into the pool; every frame it also ages and draws all 128 active particles in that pool's first slice.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 706 non-relocation core bytes identical. The object symbol covers 942 bytes; the classified 944-byte retained extent includes its two-byte trailing alignment.","A shipped compiler-route and pass sweep tested routed GCC 2.96, explicit GCC 2.96, old-agbcc, regmove, both schedulers, CSE follow/skip blocks, GCSE, expensive optimizations, thread jumps, strength reduction, and rerun-CSE-after-loop. Canonical and most pass toggles remain at the exact 944-byte extent and 294 differing halfwords; all alternatives either tie or regress.","The complete semantic audit, exact retained extent, equal branch topology, six-edition core identity, and bounded source/route probes satisfy the battle_effect_compiler_allocation_module gate. The remaining differences are the already-recorded reciprocal register roles and independent scheduling choices; the retained assembly is Proven ASM while this C remains its evidence-bearing reconstruction."]},"main:080e6eac":{"schema_version":1,"namespace":"main","address":"0x080e6eac","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":976,"score":{"measured":"2026-08-31","candidate_bytes":952,"reference_bytes":976,"differing_halfwords":471,"wrong_instructions":317,"class":"wrong","note":"Drafted directly from games/gs1/asm/080e6eac.s and the m2c-assisted dump at out/family-transplants/main-080e6eac/m2c/080e6eac.c (a clean mechanical decompilation of this owner's own retained bytes, cross-checked field-by-field against the raw .s), not the family-matcher's assigned template (member_orbit/run.c, owner 080ce85c, score 7889/10000) beyond reusing its established M2C_FIELD/DrawRectangleFn idioms and heap_cache[7]/heap_cache[8] rectangle-pointer convention -- this owner's real size (976 vs the template's 724) and 3-argument signature (vs the template's 1) confirmed it is a structurally different function, not a near-identical transplant. Confirmed the owner takes (object, x_fixed16, y_fixed16) in r0/r1/r2 (not the template's single work-dispatch pointer): r1 feeds a signed-halved 'field 0' coordinate shared by all three particle-record arrays and by the frame<=47 draw call, r2 is used unmodified as 'field 4' everywhere including the final Func_080e6d3c(object, raw_x, y_arg) call, confirmed via the prologue's str r2,[sp,#28]/str r0,[sp,#32] spills and the mov fp,r1/asrs r3,r3,#1 halving sequence. Confirmed via out/family-transplants/main-080e6eac/m2c and manual disassembly that this owner never republishes its argument into work+0x7828 and registers only Func_080041d8((void*)0x080CD261,0x480) (not the template's extra 0x080DBB9D pair), matching m2c's single Func_080041d8 call and single matching Func_08004278 teardown. Confirmed both Func_080072f4 call sites are NOT a real 5-argument function: 0x080072f4 is the r4 slot of the 14-entry _call_via_rN trampoline at games/gs1/asm/080072e4.s (0x080072e4 + 4*4), so all four sites are indirect calls through a genuinely-traced DrawRectangleFn value -- two through heap_cache[7] (read right after Func_080ed408(46,...), reused at the frame<=47 draw and the 3-entry work+0x772C loop) and two through heap_cache[8] (read right after Func_080ed408(47,...), reused by the 30-entry and 60-entry work+0x7080/0x02010000 countdown loops), verified by tracing which of sp+16/sp+20 feeds r4 immediately before each bl. The tail call (also through _call_via_r3, 0x080072f0) is modelled as a raw 2-argument ClearFn cast per the 'reached with two arguments' case the veneer-audit note on games/gs1/src/graphics/reset_frame_state.c already records for the same 0x03000164 callee -- r2 is dead/stale at that call site in the retained bytes (its last write, work+0x7824's address, cannot survive the intervening bl Func_080030f8 and 72-iteration back-edge under normal ABI rules), so no third argument was modelled. candidate_bytes is now within 24 bytes of exact (952 vs 976) and every sign-halving in the file uses plain `/2` (not the `(x+((u32)x>>31))>>1` bit-trick) per the family's established fix for that pattern. Remaining residual is concentrated in one structural cause, detailed in score.note below and the file's own header comment: `canvas` (heap_cache[1]) is promoted to r9 here and kept for the whole function, while the reference spills it to a stack slot (reloaded at each of the four draw-call sites) and instead uses r9 only inside the 60-iteration array-C loop to hold a hoisted Table_080ede48 base. This is the exact 24 missing candidate bytes (one stack word) and, because ARM Thumb sp-relative offsets are absolute, cascades into an apparent offset mismatch on nearly every subsequent stack access even though the underlying arithmetic/call sequence matches -- matched_prefix is only 7 instructions but the great majority of the 325 'wrong' instructions past that point are the same operation at a shifted stack offset, not a different operation. Checked this against gcc-2.96's actual global-allocation priority formula (allocno_compare in gcc/global.c, priority ~ log2(n_refs)*n_refs/live_length*size): a short/dense live range (one loop body) legitimately outscores canvas's long/sparse one (whole-function, 4 uses), consistent with the reference preferring the table-base hoist over canvas for the one spare high register once sl(work)/fp(the halved x argument) are taken; this build's Table_080ede48 access is a compile-time-constant address gcc rematerializes via a fresh pc-relative literal each iteration instead of ever generating a competing allocno (confirmed: hoisting it into a `table` local scoped to the loop changed zero candidate bytes), so nothing in this source forces canvas out of r9. This is the same category of residual already documented as insensitive to source-level respelling on games/gs1/recon/en/dossiers.json#main:080a24d0 and (for the identical work-block idiom, fp-vs-r9 for a different variable) on games/gs1/recon/en/dossiers.json#main:080d59b0; not pursued further via an artificial competing local per the repo's hard constraint against hand-tuning register assignment."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; family-matcher score 7889/10000, the closest structural template available, and already adopted/exact. Reused for its M2C_FIELD(expr,type_ptr,offset) macro, DrawRectangleFn typedef, and the heap_cache[7]/heap_cache[8] rectangle-pointer-pair convention, which do transfer cleanly. Everything else differs: this owner takes three arguments instead of one, never republishes its argument into work+0x7828 (no per-member dispatch target at all), registers a single periodic callback instead of the template's pair, and drives three independently-populated 28-byte particle-record arrays (one at a fixed EWRAM address, not per-party-member) instead of a per-member orbiting-sprite ring with camera projection via Func_080e3944 -- this owner has no camera projection step at all, using its two fixed-point arguments directly as particle-system center coordinates."},"rejected_experiments":["Explicit early `raw_x = x_arg;` copy assigned as its own statement between `work = *cursor++;` and `canvas = *cursor;`, matching the m2c-inferred sp8/temp_fp_21 split: byte-identical output to the baseline without it (gcc's copy propagation folds the redundant copy back to the parameter regardless of where it is textually introduced).","Reordering the struct-of-locals declaration order to place raw_x/aux/rect0/rect1/canvas in the same ascending order as their inferred reference stack offsets (8/12/16/20/24): byte-identical output; this compiler's stack-slot assignment for this function is not driven by C declaration order.","Moving `canvas = *cursor;` to after `aux = heap_cache[2];` instead of interleaved with the half_x computation (its actual position in the retained assembly): regressed to 470 differing halfwords and 333 wrong instructions, and broke the otherwise-exact match on the `ldmia r3!,{r0}` / early-canvas-read prologue shape; reverted.","Removing `canvas` as a named local entirely and reading M2C_FIELD((void*)0x03001EEC, void**, 4) fresh at each of the four DrawRectangleFn call sites (attempting to force a stack reload the way the reference does it): regressed to class=unemittable, 456 differing halfwords, 416 wrong instructions. With no later use of the *cursor dereference's result, gcc drops it (and the ldmia/mov sl,r0 sequence) entirely, producing a structurally different (and worse-matching) prologue rather than the hoped-for stack-resident-but-still-read canvas.","Hoisting Table_080ede48's base address into a `const u16 *table` local scoped to just the 60-iteration array-C loop (matching the reference's apparent r9-cached table base for that loop only, not the 30-iteration array-A loop which reference reloads fresh each iteration): zero effect on candidate bytes. The address is a compile-time constant; gcc rematerializes it via a fresh pc-relative literal at each use regardless of whether a named local wraps it, so this could not by itself create the competing allocno needed to displace canvas from r9. Left in the source anyway since it is a legitimate, harmless structural guess consistent with the reference's own asymmetry between the two otherwise-similar loops, and does not regress anything."],"notes":["2026-08-31 bounded family-stamp pass: the allocator-order decoder named swap_declarations(rect1,aux). Applying that declaration-order repair preserved differing_halfwords=471 and topology while improving wrong_instructions 325->317; a fresh decoder pass then reported no unique source shape. Retained as the best measured draft, but not adopted.","2026-08-31 retained-assembly proof: the complete candidate accounts for every reference call, argument, trampoline, callback, loop, sign-halving operation, literal, table lookup, field access, and memory operation. The residual is confined to GCC keeping the sparse whole-function canvas carrier in r9 with a 32-byte frame while the reference spills canvas in a 36-byte frame and reserves r9 for the dense Table_080ede48 loop carrier; the exact 24-byte extent difference and shifted stack/pool rows follow from that one allocator choice. The allocator decoder's one declaration-order repair improved wrong-instruction alignment without changing this floor, then found no further unique source shape. Pointer, declaration, lifetime, constant-address, compiler-family, and scheduling probes preserve the residual or regress, and GCC 2.96's own allocno priority formula explains the reference choice when the table address becomes a competing allocno. Relocation-normalized cross-edition verification proves all 752 core bytes identical across all six GS1 editions (35 relocations and 21 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/080e6eac.s), the approved local EN ROM, the already-adopted exact sibling games/gs1/src/battle/effects/member_orbit/run.c, the m2c-assisted context pre-generated at out/family-transplants/main-080e6eac/ (target.canonical.s is a clean disassembly of this owner's own bytes, confirmed byte-identical to games/gs1/asm/080e6eac.s; m2c/080e6eac.c is a mechanical decompilation of that same disassembly used only to cross-check field offsets and arithmetic, not copied verbatim), in-repository headers, and the approved compiler. Also consulted gcc-2.96's own source (gcc/global.c's allocno_compare) to understand the specific register-allocation heuristic behind the one open residual below; this is the compiler toolchain itself, not another decompilation project's output.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect in the same 0x03001eec 'battle work' subsystem as member_orbit/run.c, taking a target pointer and a fixed-point (x, y) center directly as arguments rather than reading a per-member work-dispatch slot. Sets BG2PA=0x80, clears BG2X, and sets BLDCNT=0x3F46 (alpha blending, which the template does not touch), then seeds three 28-byte particle-record arrays with randomized polar-coordinate velocities around the given center: 64 records at work+0x7080, 3 evenly-spaced-by-angle records at work+0x772C, and 64 more at the fixed EWRAM address 0x02010000. Runs 72 frames; each frame optionally draws a frame-indexed sprite near the center (frames 0-47), then independently walks the three arrays with a countdown/expiry mechanic, drawing whichever entries are still alive through one of the two generated rectangle-blit callbacks, and calls a member-related helper (Func_080e6d3c) for frames 0-35.","No GS2 or other Golden Sun decompilation project's source, symbol map, or disassembly was consulted."]},"main:080e727c":{"schema_version":1,"namespace":"main","address":"0x080e727c","status":"measured-draft","owner_bytes":98,"executable_owner_bytes":98,"candidate_bytes":84,"differing_halfwords":47,"wrong_instructions":63,"classification":"palette-channel-shift-in-place","family":{"template_owner":"main:080b98b4","template_source":"games/gs1/src/graphics/palette/copy_banks_with_brightness_offset.c","note":"Template shape (three-argument color-channel clamp-add over a palette range) only loosely matches; this owner takes three independent per-channel deltas, walks a single flat 63-entry run in place, and has no lower-bound (negative) clamp, unlike the template's shared single delta / dual clamp over two separate 16-entry banks."},"domain":"Adds independent blue/green/red deltas to 63 consecutive BGR555 palette entries starting at 0x05000002, clamping each channel to 31 with no negative-side clamp, writing back in place.","expressed":["walks entries 1..63 of BG palette RAM as one flat do-while loop (0x05000002, +2 per entry)","extracts blue/green/red 5-bit fields from each color and adds a separate caller-supplied delta per channel","clamps each channel to a maximum of 31 only (no minimum clamp)","repacks and stores the color back to the same address before advancing"],"bounded_search":{"mode":"manual-respell","attempted":3,"exact":false},"bounded_checks":["first candidate used a for(i=0;i<64;...) ascending loop; the reference's cmp/bne back-edge into the load is a do-while with a `!= 63` exit test and 63 iterations (0x05000002..0x05000080), not 64 -- switching to `do { ... } while (i != 63)` fixed the loop shape (bne back-edge, counter compared for equality) but not the byte count.","reference dedicates r5/r6/r7/r8/lr/ip entirely to the six persistent values (pointer, counter, mask, three deltas) and uses r0-r3 purely as scratch inside the loop body, which is why it needs the extra push{r7}/pop{r3}+mov r8,r3 prologue/epilogue pair; both earlier candidates instead let the register allocator park two of the six persistent values in r0/r1 (no push needed), producing a shorter 84-byte function that never touches r8. This is a register-pressure/scratch-demand difference, not a semantic one, and was not resolved by loop-shape or statement-order changes alone.","reading the actual retained assembly directly (games/gs1/asm/080e727c.s) rather than the paraphrase above shows the reference computes `(u32)c << 16` once and derives blue via `>>26` and green via `>>21` from that single shifted value (matching a real CSE across two field reads sharing a subexpression), and computes red via a fresh `c & 31` immediate rather than reusing the shared blue/green mask register; rewriting the candidate to match both of those exactly (shift-once-then-extract for blue/green, a separate literal 31 for red instead of the shared `mask` variable) improved the candidate from 48/73 to 47/63 differing-halfwords/wrong-instructions while staying at the same 84-byte extent -- genuine progress, but the six-persistent-value register-pressure gap (this owner still keeps one delta in a plain low register r7 instead of promoting all three deltas to r8/lr/ip like the reference) remains unresolved."],"notes":["Owner byte size (98) matches the family entry's target_bytes; owner takes 3 explicit s32 arguments (blue_delta, green_delta, red_delta) rather than the template's single shared delta.","The residual is a register-allocation/scratch-pressure difference (candidate 84 bytes vs reference 98 bytes, missing the r8-preserving prologue/epilogue pair) rather than a control-flow or value-semantics gap; the loop shape, field-extraction subexpression sharing, clamp order, and store-in-place structure now match the reference's actual retained assembly exactly, and only the delta-parameter register promotion differs.","This looks like a source-shape gap worth another attempt (e.g. a source structure that forces all three deltas to be read after enough other low-register values are already live, deliberately exhausting r0-r7 before the deltas are first used) rather than a compiler-internals residual, since no compiler pass or option was found that could not emit the reference shape.","Recovered only from retained owner assembly and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."]},"main:080e7404":{"status":"proven-retained","classification":"thumb_multiple_transfer_module","span_bytes":3640,"edition":{"role":"derived-candidate","edition":"en","base_owner":null,"base_edition":"ja","rebase_status":"correspondence-needed"},"boundary":{"start":"0x080e7404","end":"0x080e823c","evidence":"games/gs1/asm/080e7404.s contains one global owner; its assembled .text is 0xe38 bytes and the next owner begins at 0x080e823c. The generated 0x080e7404-0x080ec100 target is a contiguous ranked scope containing later owners, not this function boundary."},"score":{"measured":"2026-08-27","candidate_bytes":3632,"reference_bytes":3640,"candidate_instructions":1520,"reference_instructions":1537,"wrong_instructions":1090,"differing_halfwords":1714,"class":"unemittable","alignment":{"source":"compiler candidate-show --align, tallied by mnemonic; the workbench objdiff report was not re-run this pass, so the previous objdiff block was dropped rather than carried forward stale","aligned_rows":1434,"unchanged":886,"argument_mismatches":548,"opcode_mismatches":0,"insertions":280,"deletions":284,"caveat":"rows include literal-pool words disassembled as instructions, so insertions/deletions overstate the code-level gap"},"note":"Sixth pass. Two decisive findings first, because they change what this owner can ever be. (1) Both DMA descriptor writes to 0x040000d4 are a standalone three-register Thumb store multiple: at reference offsets 0x19e and 0x258 (0x080e75a2 and 0x080e765c), `stmia r3!, {r0, r1, r2}` followed by a dead `subs r3, #12`, with r0/r1/r2 loaded individually immediately before (0xc307 0x3b0c verified against roms/gs1-en.gba, not a disassembly artifact). agscc cannot emit this. arm.md's movmem8b/movmem12b are the only Thumb multi-register transfer patterns and arm.c thumb_output_move_mem_multiple always prints `ldmia %1!` immediately before `stmia %0!`; the generic ldmsi/stmsi/store_multiple patterns at arm.md 4977-5058 are TARGET_ARM only. A local 12-byte struct assigned to *(Dma *)0x040000D4 was tried and does produce movmem12b, but with the paired `ldmia` the reference does not have. This is the same evidence basis classification.json already records for owner 080f4f04's mixed_thumb_multiple_transfer_module group. (2) Immediately before each `bl Func_080e7338` the reference does `add r2, sp, #284; mov r9, r2` and never reads r9 again in this owner (r9's next definition is `mov r9, r0` with r0=255 much later, at reference offset 0xc1e). Reading games/gs1/asm/080e7338.s shows why: it opens `mov r4, r9 / adds r3, r4, #0 / adds r1, r3, #0 / subs r1, #136 / ldr r3, [r1, #0]`, i.e. it dereferences r9-136. sp+284 is this frame's top and sp+284-136 = sp+148 = the work-pointer slot. So r9 is an implicit register argument carrying this frame's address into the callee, and Func_080e7338 is already classified hidden_register_context_module ('callee_saved_registers_carry_implicit_context', 'register_pins_disallowed'). The caller side of that contract is equally inexpressible. Conclusion: 080e7404 cannot reach byte identity from ordinary C with the approved compiler and belongs in a keep_structured_asm classification group rather than in the exact-match queue. Everything else this pass was ordinary reconstruction, and it moved a long way. Baseline was candidate=3620 dh=1736 wrong_instructions=1352; final is candidate=3632 dh=1714 wrong_instructions=1090, with opcode_mismatches now zero across the whole aligned comparison. What was fixed, in descending value. (a) Frame layout. m2c's sp50 and sp58 are two-word locals, not scalars: the reference writes sp+80/sp+84 and sp+88/sp+92, the second word always through the retained &sp50 / &sp58 pointer (reference offsets 0x5d6 and 0x624, `str r6, [sp, #88]` beside `str r6, [r3, #4]`). Declaring them s32[2] made the candidate byte-count-exact for the first time. (b) The three-word and four-word scratch records are indexed, not offset: replacing every `M2C_FIELD(&sp60, s32 *, 4)` with `sp60[1]` collapsed a pile of redundant frame-address materializations (wrong_instructions 1360 -> 1206 in one step) and made the reference's `add r5, sp, #96` / `str r3, [r5, #4]` shape appear. (c) m2c's sp94 (work-pointer slot at 148), sp98 (128-byte random table at 152) and sp118 (DMA source word at 280) are one contiguous 136-byte region; the compiler's frame allocator sorts declared locals into size classes (4-byte and 8-byte objects below, >= 12-byte objects above, first-declared highest within a class), so as separate small scalars sp94 and sp118 sank to the bottom of the frame. Merging them as `u8 sp98[132]` plus `s32 sp84[5]` (sp94 = sp84[4]) puts the whole declared block in one class and reproduces the reference's contiguous 80..283 layout up to a 12-byte spill-count difference. This also restored the reference's two-instruction `*sp3C` dereference: the fold of `*p` back to `[sp,#N]` is a CSE address-cost decision that only happens while the local's frame offset is <= 124, which is exactly why the reference (offset 140) keeps the pointer and the old draft (offset 84) did not. (d) Three real pointer-stride bugs: `var_sl_235`, `var_r5_615` (both s16 *) and `var_r3_572` (s32 *) were advanced by the reference's byte stride on a typed pointer, so each step moved two or seven times too far. (e) Eight missing `& 0xFF` masks: the reference hoists 255 into a register (r7, later r9) and ands every raw Func_08004458 result that is not already masked, in the 128-record, 512-record and 64-record initialisers. (f) The `(x >= 0 && x <= 0x7F)` guard in the progressive-reveal walk folds to one unsigned compare; the reference has two ordered signed compares, so it must be nested ifs, not `&&`. (g) Symbolisation with real evidence: Data_03001e50 is a `void *[]` and the owner reads [39], [40], [44] and [46] -- `&Data_03001e50[40]` reproduces the 0x03001ef0 pool word with `subs r3, #4` for [39], `&Data_03001e50[44]` reproduces 0x03001f00 with `[r5,#0]`/`[r5,#8]`, and plain `Data_03001e50[46]` reproduces the reference's `ldr r3, =0x03001e50 / adds r3, #184`. Data_03001ad0 and Data_03001ce0 must be aggregates, not folded absolute addresses, because the reference keeps the base in a register and uses `[r2,#4]`, `[r2,#6]`, `[r2,#16]`; a toy confirmed pointer arithmetic on an extern array folds to symbol+offset in the pool while a struct field does not. Data_080ede48 is indexed. Func_080e0524's and Func_08002f40's id arguments are Value_ pool symbols (0xc0, 0xc1, 0xc4 are all <= 255 and would otherwise be `movs`). (h) The u16/u8 temporaries around the projected-rectangle table forced truncation the reference does not have; widening temp_r6_269, temp_r5_271 and temp_r1_319 to s32 and spelling the halving of temp_r3_916/temp_r3_926 on the shifted word (`(t >> 16) + (s32)((u32) t >> 31)) >> 1`) restored the reference's `ldrh` + `lsls/asrs/lsrs` quartet instead of a folded `ldrsh`. Callee prototypes were added; they compile warning-clean and do not move the score. Residual: the candidate is 8 bytes and 17 instructions short, and every remaining aligned mismatch is a register or spill-slot choice, not a shape. The reference is under enough pressure to keep loop counters in r8 and the phase-two frame counter in fp with 18 spill slots; the candidate keeps counters in low registers and the sp3C pointer in r9 with 16 spill slots. 4 of the 8 missing bytes are the two 0x040000dc pool words the separated DMA writes need and the stmia does not."},"shape":{"reference_calls":95,"expressed_loops":19,"reference_pool_words":94,"candidate_pool_words":98,"symbolized_pool_references":107,"jump_table":false,"frame_bytes_reference":284,"frame_bytes_candidate":276},"unmatchable":[{"shape":"standalone thumb three-register store multiple","sites":2,"where":"reference 0x080e75a2 and 0x080e765c: `stmia r3!, {r0, r1, r2}` then a dead `subs r3, #12`, writing the DMA3 descriptor at 0x040000d4","evidence":["roms/gs1-en.gba bytes 0xc307 0x3b0c at both sites","alchemy-gcc/agscc/gcc/config/arm/arm.c thumb_output_move_mem_multiple emits ldmia immediately before stmia for both the 2- and 3-register cases","alchemy-gcc/agscc/gcc/config/arm/arm.md movmem12b and movmem8b are the only Thumb multi-register transfer insns","alchemy-gcc/agscc/gcc/config/arm/arm.md ldmsi, store_multiple, stmsi_postinc and stmsi are TARGET_ARM only","a local 12-byte struct assignment to *(Dma *)0x040000D4 was compiled and produces the paired ldmia/stmia, not the reference's bare stmia"]},{"shape":"implicit r9 register argument","sites":1,"where":"reference 0x080e7c00: `add r2, sp, #284` / `mov r9, r2` immediately before `bl Func_080e7338`, with r9 dead in this owner afterwards","evidence":["games/gs1/asm/080e7338.s reads r9 on entry and dereferences r9 - 136","sp + 284 is this frame's top and sp + 284 - 136 = sp + 148, this owner's work-pointer slot","games/gs1/asm/classification.json already lists 080e7338 in hidden_register_context_module with 'register_pins_disallowed' and 'approved_compiler_cannot_express_hidden_register_abi'"]}],"expressed":["complete two-argument entry paths, runtime argument binding, display setup, mode-specific object creation, and shared teardown","all palette, DMA, VRAM, random-tile, and progressive reveal initialization, including the 128-byte random offset table and nested 256-cell clearing walk","the complete first effect phase through its 192-frame bound: palette ramp, 64 moving records, projection, table-driven rectangles, per-frame updates, and early termination gate","the complete second effect phase: 32 runtime records, 128 and 512 particle-record initializers, sound and object gates, three 64-record render/update walks, mode-specific transforms, and 54-frame bound","all six rectangle callback sites and all three word-copy sites as evidence-backed indirect calls through the local callback and IWRAM copy entry rather than phantom direct callees","all reference branches and tails through Func_080cdbc0, with no jump table or omitted assembly region","the reference's declared-local frame region 80..283 in the reference's own order and sizes, including the two two-word records and the merged 136-byte work-slot/random-table/DMA-source block","the kind-39/40/44/46 heap-cache reads as one Data_03001e50 array, and 0x03001ad0 / 0x03001ce0 as based aggregates rather than folded absolute addresses"],"unexpressed":[{"op":"compiler-inexpressible instruction shape","count":3,"where":"two standalone thumb store-multiples and one implicit r9 hand-off; see the unmatchable block"},{"op":"aggregate recovery","count":"whole owner","where":"runtime offsets 0x7080-0x7828 and the 28-byte moving records remain M2C_FIELD accesses pending one evidence-backed shared structure"},{"op":"source-shape repair","count":1090,"where":"normalized comparison still differs in register allocation and spill placement only; the aligned comparison has zero opcode mismatches, so no remaining difference is a control-flow or instruction-selection error"},{"op":"symbol recovery","count":"whole owner","where":"address-named callees, provisional stack names, and hyou_a/hyou_b table roles stay generic where current local evidence does not justify narrower English names"}],"rejected":[{"experiment":"retain m2c's direct Func_080072f0/Func_080072f4 calls","result":"3592 candidate bytes and 1772 differing halfwords; rejected because the reference loads 0x03001388 or Data_03001eec+0x1c before call-via-register veneers, proving indirect word-copy and rectangle callbacks"},{"experiment":"declare sp94 and sp118 as one-element arrays so they join the aggregate allocation stream","result":"no layout change at all; the frame allocator sorts by size class, not by aggregate-ness, so 4-byte objects stay in the low class either way"},{"experiment":"reverse the declaration order of the nine frame locals, and separately move the whole block to the end of the declaration list","result":"the block moved as a unit but the size-class split remained; only merging sp94/sp98/sp118 into one >= 12-byte object reproduced the reference's contiguous layout"},{"experiment":"index Data_080eeebc and Data_080eeeca as named u16 arrays instead of M2C_FIELD on the folded absolute address","result":"wrong_instructions 1090 -> 1104; the symbol-based form makes the compiler choose ldrsh plus a re-zero-extend where the folded form keeps the reference's single ldrh, so the folded form was kept despite being the less faithful spelling"},{"experiment":"compose the 0x05000100 palette word through an s32 temporary before the halfword store, to stop the 0xF mask being materialised as a pooled halfword constant instead of the reference's `movs r7, #15`","result":"wrong_instructions 1090 -> 1118; the narrowing is what keeps the rest of that loop in the reference's shape, so the one extra pool word was accepted"},{"experiment":"spell the s16 halving as `((s16) x) / 2` rather than on the pre-shifted word","result":"wrong_instructions 1110 -> 1116 either way in aggregate, but the `/2` form emits ldrsh where the reference emits ldrh; the shifted-word form was kept as the faithful one"},{"experiment":"declare var_fp_1329 (the phase-two frame counter) as s32 instead of u32","result":"wrong_instructions 1090 -> 1094; it does not move the counter from its spill slot into fp, which is where the reference keeps it"}],"notes":["The complete 0x080e7404-0x080e823c reference assembly and all literal pools were read; workbench symbolization found 107 PC-relative references and no jump table.","The earlier note claiming this owner is listed in games/gs1/asm/classification.json's thumb-multiple-transfer group was wrong: 080e7404 does not appear anywhere in classification.json, and the mixed_thumb_multiple_transfer_module group holds only 080f4f04. The evidence recorded for that group is nonetheless exactly what rules this owner out, so 080e7404 should be added to a keep_structured_asm group of its own or to that one.","Linked differing_halfwords is the completion measure. The draft is 8 bytes short and is neither exact nor adoptable, and by the unmatchable block above it cannot become exact from C."]},"main:080e823c":{"schema_version":1,"namespace":"main","address":"0x080e823c","status":"measured-draft","owner_bytes":1968,"candidate_bytes":1728,"differing_halfwords":954,"wrong_instructions":823,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted this battle-presentation owner from the aggregate-aware drafting wave. Mechanical type recovery makes the candidate compile to 1728 bytes for the 1968-byte reference; topology differs and 954 halfwords differ, so it remains a measured draft and claims zero DONE bytes.","The repairs type the battle work pointer, actor pointer slots, display-register halfword store, presentation lookup tables, signed actor identifiers, and the frame-control word at 0x03001b04. No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were introduced.","The function initializes six battle objects and display state, advances a 320-frame presentation, updates particle banks, dispatches party-linked effects, and tears the scene down. Its permanent name remains unresolved until its battle-effect dispatch entry is proven.","The next reconstruction pass must recover the reference 84-byte frame and shared battle-work aggregate before source-order or allocator work; the current 36-byte frame shows that this is not a register-floor candidate."]},"main:080e89ec":{"schema_version":1,"namespace":"main","address":"0x080e89ec","status":"measured-draft","owner_bytes":1724,"span_bytes":1724,"score":{"measured":"2026-08-31","candidate_bytes":1804,"reference_bytes":1724,"differing_halfwords":857,"wrong_instructions":843,"class":"structural-topology","note":"The first compiling m2c draft was 1628 bytes with 846 differing halfwords, but omitted both outputs of Func_080cef64 and represented the 20-step coordinate history as out-of-bounds scalar arithmetic. Reconstructing DrawRectangleFn callbacks[2], the retained callback pointer, position[3], and history[40] restores the reference's exact 228-byte stack frame and models every call_via_r4 site as an ordinary six-argument indirect draw. The larger 1804-byte candidate is retained because it fixes real call semantics and memory safety; aggregate score is diagnostic, not the acceptance contract. The remaining mismatch spans the owner and is honestly classified structural-topology, not an allocation floor."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"This is another 0x03001eec battle-work presentation owner, but its behavior is distinct: it precomputes two opposing particle streams, draws a table-driven centre animation, shifts a 20-position trail, and advances two particle groups over 150 frames. The shared family contributes the heap-cache cursor, Func_080cef64 callback pair, work offsets, and teardown contract; it does not justify copying member_orbit's source shape."},"rejected_experiments":["Keeping m2c's four-argument Func_080072f4 calls compiled, but treated the r4 call-via veneer as a real function and discarded the width and height stored immediately before every retained call. Rejected in favor of typed DrawRectangleFn calls.","Keeping scalar sp38/sp44 locals reproduced m2c's unsafe out-of-bounds pointer arithmetic and a 44-byte frame instead of the retained 228-byte frame. Rejected in favor of explicit position and history arrays."],"notes":["Recovered from games/gs1/asm/080e89ec.s, the approved local ROM-derived tables at 0x080ede48/9f/a5/ab/b2, the m2c structural draft generated by the repository compiler, and already-recorded 0x03001eec family evidence in 080e01e4.c/json and 080ed104.c. No external decompilation source, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used.","The temporary source name BattleEffect_RunDualParticleStream describes only behavior visible in the retained owner. Callback-table entry 49 and resources_d1_d3_idou_d3.json establish battle-effect ownership, but do not establish an English move name, so none is invented.","Func_080cef64 writes two DrawRectangleFn values at stack offsets 48 and 52. Retained Func_080072f4 branches load r4 from one of those slots and are the r4 member of the call_via_rN veneer bundle, so the C calls callbacks[0] or callbacks[1] directly with destination, source, x, y, width, and height.","This measured draft claims zero DONE bytes and leaves the canonical assembly owner in place."]},"main:080eb754":{"schema_version":1,"namespace":"main","address":"0x080eb754","status":"measured-draft","owner_bytes":2444,"candidate_bytes":2312,"differing_halfwords":1195,"wrong_instructions":1135,"classification":"structural-topology","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-31: cleared the pre-score call-via idiom lint. The cached function word loaded from absolute_03001e50.field_00b8 into the established sp+0x48 slot is now modeled as one typed four-argument BattleEffectDrawFn and used at all five retained indirect-call sites: four branch through r4/Func_080072f4 and one through r7/Func_08007300. This grows the draft from 2292 to 2312 bytes, shrinking the missing-code gap from 152 to 132 bytes. Differing halfwords/wrong instructions move to 1195/1135 and GCC expands the candidate frame from the previously matching 176 bytes to 180 because the now-real callback lifetime increases pressure. The callbacks are retained despite that downstream allocation regression: direct calls to the register-call veneers were semantically false and could never satisfy the lint or reference register requirements.","2026-08-31: corrected the two nine-entry ROM displacement tables at 0x080eef56 and 0x080eef5f from u8 to s8, matching their use as signed screen-coordinate offsets in both projection loops. Also made the existing stack-array end comparison type-explicit; that cast is emission-neutral.","The m2c draft had collapsed three stack aggregates at sp+0x64/sp+0x94/sp+0xa0 into four-byte scalars and split the eight-byte position pair at sp+0x5c into two independent assignments, allowing GCC to delete the unused second word. Restoring their evidenced 0x30/0x0c/0x10 and 8-byte extents, reversing the mechanically generated local declarations to match GCC 2.96's stack-slot order, and expressing the pair as one aggregate copy recovers the reference's exact 176-byte frame and exact key slots (work@sp+0x50, object@sp+0x4c, canvas@sp+0x44). Candidate grows from 2264 to 2292 of 2444 bytes; differing halfwords improve 1194 to 1193. Raw wrong instructions rise 1067 to 1101 because the newly restored frame changes downstream register allocation, but this is a structural correction backed directly by stack offsets, not a raw-score guess.","2026-08-30: promoted the second-largest no-candidate main-ROM owner after repairing the aggregate-aware m2c draft's concrete invalid type expressions. A fresh canonical compile produces 2264 bytes for the 2444-byte reference; topology differs and 1194 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","Repairs were mechanical: resolve the work pointer at 0x03001eec, use typed GBA register halfword stores, add typed u8/u16 ROM-table loads, and model member-id reads as signed halfwords at dynamic offsets. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The function is a large battle-presentation routine with a 0x03001eec work block, 64-entry and 320-entry particle pools, palette and window effects, member-triggered emissions, and a 96-frame main loop. A permanent name is deferred until caller and dispatch evidence identifies the presentation."]},"main:080ec100":{"schema_version":1,"namespace":"main","address":"0x080ec100","status":"mapped","measured":"2026-08-29","map":{"head":"0x080ec100","head_symbol":"FunctionHead_080ec100","head_file":"games/gs1/asm/080ec100.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #116 -- full r8-r11 save, 116-byte frame.","true_epilogue":{"file":"games/gs1/asm/080ecae8.s","note":"Ends `... bl sub_08002dd8 (x2) / bl sub_080cdbc0 / add sp, #116 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. Exact mirror of the head's 116-byte frame and four-high-register save, same sub_08002dd8/sub_080cdbc0 cleanup idiom seen across the other mapped functions in this dossier batch. This is the sole real epilogue."},"span":{"start":"0x080ec100","end_exclusive":"0x080ecef4","size_bytes":3572,"derivation":"end = start of next asm file games/gs1/asm/080ecef4.s, immediately following 080ecae8.s which owns the epilogue. size = 0x080ecef4 - 0x080ec100 = 0xdf4 = 3572."},"member_regions_in_order":[{"addr":"0x080ec100","symbol":"FunctionHead_080ec100","file":"games/gs1/asm/080ec100.s","role":"real prologue + setup, in-file literal pool"},{"addr":"0x080ec190","symbol":"Continuation_080ec190","file":"games/gs1/asm/080ec190.s","role":"branch continuation, in-file literal pool"},{"addr":"0x080ec264","symbol":"Continuation_080ec264","file":"games/gs1/asm/080ec264.s","role":"continuation ending on two branches, one to a shared exit (sub_080ec596, internal to the next file) and one tail branch to sub_080ec474 (the immediately following region)"},{"addr":"0x080ec474","symbol":"Region_080ec474","file":"games/gs1/asm/080ec474.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080ec728","symbol":"Region_080ec728","file":"games/gs1/asm/080ec728.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080ecae8","symbol":"Region_080ecae8","file":"games/gs1/asm/080ecae8.s","role":"converging tail ending in the real, shared epilogue"}]},"domain_evidence":["080ec100's own header comment marks it 'FunctionHead' with 'following literal pool retained in the same file' -- same authored classification as the other confirmed heads in this batch.","080ec264 ends with two branches: one to `sub_080ec596` (a label inside 080ec474.s reached only by this internal jump, i.e. a shared exit rather than a call) and one direct tail branch `b sub_080ec474` into the physically-next file -- the classic prologue-less fall-through/branch chain named in CONTRIBUTING.md.","The sub_08002dd8 (x2, small constant args) + sub_080cdbc0 cleanup sequence immediately preceding frame teardown is now confirmed identical across 080d765c, 080d0ee0(via 080d12a8), 080e15e8, 080e21e8, and this function -- a strong signal these are all instances of one shared per-battle-action or per-menu-frame finalizer routine, useful context for whoever reconstructs the C bodies."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080ec100.c --owner 080ec100 --size 3572","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited."]},"main:080ecef4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080ecef4","status":"measured-draft","owner_bytes":528,"score":{"measured":"2026-08-27","candidate_bytes":456,"reference_bytes":528,"differing_halfwords":258,"wrong_instructions":235,"class":"wrong","note":"This owner is NOT a menu-poll loop like select_party_member.c; the family clustering here is a call-target/n-gram match, not a structural one. It is a straight-line setup routine (two pointer/void* arguments, a 3-way mode dispatch into Func_080e0524 with message ids 0x4f/0x50, 0x4b/0x4c, or 0x4d/0x4e, then a fixed 21-iteration frame counter loop drawing a decorative border via Func_080ed408/Func_080072f4/Func_080072f0 with row ranges 0-3/4-7/8-11/12-15/16-19 and single-shot triggers at i==18 and i==20) that reads and writes a large struct reached through the adjacent globals at ADDR_03001EEC and ADDR_03001EEC+4 (fields observed at +0x7784, +0x77a4, +0x77a8, +0x7824, +0x7828), matching the same struct apply_shake.c already reaches through ADDR_03001EEC at neighbouring offsets 0x77a0/0x77a4/0x77a8."},"rejected_experiments":[{"experiment":"two separate extern-global loads for the ADDR_03001EEC value and the word at ADDR_03001EEC+4","result":"reference loads the base pointer once and does an auto-incrementing `ldmia r3!, {r7}` to fetch the first word, then a second `ldr [r3]` off the incremented pointer for the second word -- rewriting the two loads as `u32 *cell = (u32*)ADDR_03001EEC; base = *cell++; second = *cell;` was closer in shape (candidate dropped from 468 to 456 bytes, moving toward the reference's use of a shared pointer instead of two independent pool constants) but did not reach the reference's exact instruction selection"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","This is a lower-confidence, single-pass structural draft, not an iteratively tuned one: the branch-by-mode dispatch, the loop bound (21 iterations) and its four row-range buckets, and the Scheduler_RemoveCallback(0x080cd261) tail call are read directly off the retained assembly and are solid; the exact struct-field semantics at offsets 0x7824/0x77a4/0x77a8/0x7784/0x7828, and specifically the guessed condition `M2C_FIELD(base,s32*,0x7824+4) == 1` gating the two Func_080ed408 border-tile calls, are inferred from instruction shape rather than confirmed against a known struct layout and are the weakest part of this draft.","The call `Func_080072f4(base, counter, counter, 0, arg5)` passes its fifth argument through r4 immediately before the `bl`, which is not how this codebase's other recovered callers pass a 5th integer argument (stack, not r4); that calling-convention detail was not resolved here and is a likely source of some of the remaining mismatch, not just field-offset guessing.","Given the scale of open questions, this looks like a source-shape gap worth a dedicated pass (working out the shared 'effects struct' layout from apply_shake.c and this owner's siblings together) rather than a compiler-internals residual reachable by respelling. This candidate claims zero DONE bytes."]},"main:080ed104":{"schema_version":1,"namespace":"main","address":"0x080ed104","status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":772,"score":{"measured":"2026-08-31","candidate_bytes":772,"reference_bytes":772,"differing_halfwords":197,"wrong_instructions":168,"class":"wrong","note":"First structural draft, built directly from games/gs1/asm/080ed104.s (not the family matcher's naive symbol-renamed seed, which was confirmed to differ substantially). The family matcher assigned main:080ce85c (member_orbit/run.c, already adopted) at score 8310/10000, but this owner's real callee set instead matches the already-drafted 0x03001eec 'battle work' subsystem (080e7404.c/080d59b0.c/080d82b0.c/080dc1ec.c/080e01e4.c): identical Func_080cd594/Func_080e0524/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 shapes and the same 0x7780/0x7784/0x77A8/0x7824/0x7828 work-struct offsets. Unlike every sibling, this owner never reads the member-count field (object+0x14) and has no per-member loop at all; it runs a fixed 54-iteration frame loop that fills a horizontal progress bar, touching only the fixed first member slot (object+0x24) twice. Two retained `bl` sites required trampoline modeling per the established family finding (games/gs1/recon/en/dossiers.json#main:080dc1ec): 0x08007314 is the games/gs1/asm/080072e4.s ip (r12) slot (N=12) and 0x080072f4 is its r4 slot (N=4), so both are indirect calls through a traced function-pointer value, not real 'Func_08007314'/'Func_080072f4' functions. Traced the ip-slot's source precisely from the retained assembly: it dereferences the fixed address 0x03001F08, which is exactly heap_cache[7] (0x03001EEC + 7*4) -- the same kind-46 draw-rectangle cache slot the adopted member_orbit/run.c and 080d59b0.c both read after calling Func_080ed408(46,...), and this owner does call Func_080ed408(46,7,7,[3|7],bar_style) immediately before each ip-slot call, refreshing that exact slot. The r4-slot call's target instead traces to the two-word out-array most recently filled by Func_080cef64(flag, rect_fns) -- matching 080dc1ec.c's callback_pair[0] idiom exactly, six DrawRectangleFn arguments (dest,src,x,y,w,h) and all. Two evidence-grounded passes after the initial structural draft: (1) moved the two s16 star fields (offset +2/+6, read into named locals sy/sh) to their exact reference position -- immediately after the Func_080022ec bucket call and before the `bucket>6` clamp, not inlined at the call site -- which matches the retained assembly's early ldrsh-then-hold-in-register shape; wrong_instructions dropped 222->212. (2) reordered the Data_080eef88 (src-address) and Data_080eef96 (raw/half) table reads to match the reference's true load order (address table first, raw/half table second) instead of the reverse; the trailing table-lookup/draw-call block now matches the reference one-for-one except for register-letter and stack-offset choices. class stayed 'wrong' throughout (no regression in either pass) and candidate_bytes is stable at 768, 4 bytes short of the 772 reference.","prior_note":"Initial pass, before the two evidence-grounded fixes above: candidate=768 reference=772 differing_halfwords=276 wrong_instructions=240, built straight from a full read of games/gs1/asm/080ed104.s and the m2c-assisted context at out/family-transplants/main-080ed104/m2c/080ed104.c (a clean m2c decompilation of this owner's own retained bytes, not the template's)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting. The family matcher's structural score (8310/10000) reflects shared prologue shape (push r5-r9+fp/lr, ldmia-based heap_cache read, several do-while counters) and a handful of shared callees (Func_080cd594/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0), but the owner sizes differ (772 vs the template's 724) and the actual control flow does not match: this owner has no per-member orbit-sprite loop at all (member count, field object+0x14, is never read), and instead runs a fixed 54-frame bar-filling loop with a 16-entry 'star' array processed by index-based lifetime buckets. The naive symbol-renamed seed at out/family-transplants/main-080ed104/080ed104.c was confirmed unusable as anything but a header/typedef skeleton.","actual_sibling_evidence":"Real callee set, constants, and field offsets match the already-drafted 0x03001eec 'battle work' subsystem documented in games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, and 080e01e4.c far more closely than the assigned template: identical Func_080cd594(mode)/Func_080e0524(id,work,flag,flag)/Func_080041d8(cb,interval)/Func_08004278(cb)/Func_08002dd8(id)/Func_080cdbc0() shapes, the same finish-callback pointer 0x080CD261, and the same *(void**)0x03001EEC-based heap_cache/work/draw_destination/extra_target triple. games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note supplied the load-bearing cross-family finding used here: the 'Func_080072f4' symbol appearing in several older sibling drafts (080ccebc.c, 080dd77c.c, 080ecef4.c) as a fictional 5-argument direct function is actually always the r4 slot of the games/gs1/asm/080072e4.s trampoline bundle; this owner reproduces that exact indirect-call shape, plus a second, previously-undocumented instance of the same bundle's ip (r12) slot at 0x08007314, traced here to heap_cache[7]."},"rejected_experiments":["Modeled the 0x08007314 (ip-slot) and 0x080072f4 (r4-slot) bl targets as real functions with literal 5/7-argument signatures (matching the pattern of some older, now-superseded sibling drafts): produced a badly wrong-shaped candidate near the call sites (missing the trampoline's actual register-indirect bx) and was abandoned before measuring in favor of the DrawRectangleFn cast-and-call idiom already established and cross-verified in games/gs1/recon/en/dossiers.json#main:080dc1ec.","Read the two s16 star fields (M2C_FIELD(star,s16*,2)/M2C_FIELD(star,s16*,6)) inline at their point of use in the final DrawRectangleFn call's argument list, matching the m2c-assisted draft's natural expression shape: compiled to a late load right before the call instead of the reference's early load-and-hold, costing 10 wrong_instructions; superseded by hoisting them into named locals (sy/sh) immediately after the Func_080022ec call, matching the retained assembly's actual register-lifetime shape.","Read the Data_080eef96 (raw/half) table before Data_080eef88 (src-address) table, matching the natural order of use in the DrawRectangleFn call's argument list (half is needed for x/y, src is needed second): produced the two literal-pool loads and ldrh instructions in the wrong relative order versus the reference's own address-table-first load order; superseded by computing `src` as a named local before `raw`/`half`, matching the reference's true evaluation order.","Originally attributed the reference's larger stack frame to an unread compiler-kept slot. The 2026-08-31 missing-code pass disproved that hypothesis: Func_080e3980's output is a genuine three-word projection result, and declaring screen[3] naturally restores the 44-byte frame and exact owner extent. A subsequent declaration-order probe on heap_cache/cursor produced identical bytes and was reverted."],"notes":["2026-08-31 bounded missing-code pass found a concrete type/extent error: Func_080e3980 writes a three-word projection result at the reference's sp+32 output area, while the draft declared a one-word scalar. Reconstructing it as s32 screen[3], passing screen, and consuming screen[0] restores the exact 772-byte owner extent and improves differing_halfwords 263->197 and wrong_instructions 212->168 with topology unchanged. Moving unrelated heap_cache/cursor declarations had zero effect and was reverted; the remaining residual is allocation/order, so this best measured draft is retained but not adopted.","2026-08-31 retained-assembly proof: after correcting Func_080e3980's three-word projection output, the ordinary-C candidate reproduces the exact 772-byte extent with equal branch topology and identical functional literals. Every callback, argument, constant, loop bound, table lookup, field access, and memory operation is accounted for; the remaining rows are the documented battle-work register/stack role cascade, independent evaluation scheduling, and equivalent direct 0x03001F08 versus base-plus-offset address materialization. The allocator decoder finds no unique source repair. Relocation-normalized cross-edition verification proves all 574 core bytes identical across all six GS1 editions (31 relocations and 18 literal fields normalized), and the bounded declaration/evaluation probes plus established subsystem family transfers preserve the residual or regress. Structured assembly therefore remains authoritative under battle_effect_compiler_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/080ed104.s), the approved local EN ROM, the m2c-assisted transplant context at out/family-transplants/main-080ed104/ (m2c/target.canonical.s and m2c/080ed104.c, both m2c decompilations of this owner's own retained bytes -- not the template's), the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the already-drafted siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect. Sets BG2 scale, registers two draw-order callbacks (0x080DBB9D and 0x080CD261) and the kind-46/47 draw-rectangle pair via Func_080cef64, computes a BG-offset MMIO write from the fixed first party member's stat (object+0x24), seeds a 16-entry 'star' array at work+0x7080 with randomized velocity/angle fields, then runs a fixed 54-frame loop. Frame 10 re-cues the first member's portrait/voice line. Frames 8-53 grow (then shrink) a horizontal progress-bar rectangle drawn in two 14px segments through the kind-46 callback cached at heap_cache[7]. Every frame also walks the 16-entry star array: once a star's index-derived readiness threshold is reached and its lifetime counter is still low, it looks up two 7-entry pixel tables by a Func_080022ec-clamped bucket and draws a shrinking icon through the Func_080cef64-supplied callback array's first entry.","After correcting Func_080e3980's three-word output, the candidate and reference have identical 772-byte extents. The remaining large-scale hunks begin with the prologue's heap_cache/cursor register choice and match the same open, cross-family-documented compiler-allocator sensitivity already recorded in games/gs1/recon/en/dossiers.json#main:080dc1ec and 080d59b0.json for this exact 0x03001eec subsystem -- not pursued further per the ban on forcing register or stack assignment.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080f03f0":{"schema_version":1,"namespace":"main","address":"0x080f03f0","status":"measured-draft","owner_bytes":328,"executable_owner_bytes":328,"candidate_bytes":348,"differing_halfwords":142,"wrong_instructions":119,"family":{"template_owner":"main:080c10e8","template_source":"games/gs1/src/battle/presentation/set_actor_modes.c","note":"The assigned set_actor_modes.c template does not match this owner's shape at all (no shared calls, no shared control flow); the real algorithm is a self-contained audio/screen setup + 33-pass fade sequence with its own hardware-register writes, recovered directly from the retained assembly and its own literal pool rather than from any family sibling."},"domain":"One-shot audio/PPU setup (clears four state flags, configures a channel via Func_080041d8, sets display control, resets two VRAM-ish banks via Func_080f037c, arms two Func_080f0254 phases, writes two sound-control registers, then runs a 33-pass outer loop that alternately calls Func_080f02b0 against a 33-entry table and drives a 17-step linear fade on register 0x04000050) before a final shutdown/cleanup and flag set.","expressed":["clears four byte flags at 0x03001d18/0x03001f58/0x03001ac4/0x03001d08, then calls Func_080040e8 and Func_080041d8(0x080f03c1, 1152)","sets display control (0x04000000=64), resets two banks via Func_080f037c(0x06007800)/(0x0600f800), and arms Func_080f0254(0) then Func_080f0254(1)","writes 0x1f8a to both halves of a register pair at 0x0400000c/0x0400000e, restores display control to 0x1c40, writes 0x0f83 to 0x00002844, calls Func_080f0678, and waits 300 frames","for outer = 0..32 (33 passes): computes an alternating toggle from outer&1, calls Func_080f02b0 against a 33-entry u32 table at 0x080f0a5c indexed by outer with the opposite toggle, then runs a 17-step (inner = 0..16) fade on register 0x04000050 -- an ascending (inner<<8)|(16-inner) ramp on odd toggles, a descending base-256-per-step ramp on even toggles -- waiting 4 frames per step and 0x10b frames between outer passes","after the 33 passes: clears 0x04000050, restores display control to 0x1040 (display-control-address - 0x50), calls Func_0800479c and Func_08004760, sets the first flag back to 1, and returns 0"],"bounded_search":{"mode":"manual-respell","attempted":2,"exact":false},"bounded_checks":["the candidate reproduces the reference's full 16-word literal-pool content and order (verified against the retained .s file's own trailing .4byte list) and the complete outer/inner loop bounds (33 x 17 passes) and toggle-driven ramp shape, but compiles 20 bytes larger (348 vs 328); the reference computes several constants (226<<5=0x1c40, 240<<4=0xf00, 130<<5=0x1040, 144<<3=1152, 150<<1=300) via a small-immediate `movs`+`lsls` pair instead of loading them from the pool, while the candidate's equivalent sites pull from an extra literal-pool load, and the resulting pool-size difference is large enough that gcc296 places a second, mid-function literal pool (an inserted branch-and-data block right after the Func_080f0678 call) that the reference's smaller, single-pool layout does not need","re-spelling all five of those constants in the candidate as their explicit shift-of-small-immediate form (226<<5, 240<<4, 130<<5, 144<<3, 150<<1) produced byte-for-byte identical output to the flat-hex-literal version -- gcc296 constant-folds both spellings the same way before choosing pool-vs-immediate, so this is not a source-spelling difference; the compiler's choice of pool load over movs+lsls for these specific values must depend on something else (register pressure or a different value/constant living nearby) that a plain respell does not change"],"notes":["This owner shares no call targets or control-flow shape with the assigned set_actor_modes.c template; its actual shape (a fixed 33-entry table walk paired with a 17-step hardware fade ramp) was recovered directly from the retained assembly's own literal pool and loop bounds, cross-checked word-for-word against the ground-truth .s file's trailing constant list.","The residual is concentrated and mechanical (a 20-byte pool-size overshoot triggering a spurious mid-function pool split) rather than a control-flow or algorithmic gap, but the specific source change needed to make gcc296 prefer movs+lsls over a pool load for those five constants was not found within this bounded attempt. This looks like it is still findable -- worth a follow-up that varies which computed values are cached in named locals/registers near those five writes, since the pool-vs-immediate choice is evidently driven by surrounding register/constant pressure rather than the constant's own spelling.","Recovered only from retained owner assembly and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."]},"main:080f0614":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080f0614","status":"proven-retained","owner_bytes":100,"classification":"compiler_local_materialization_mismatch","resolved_asm_classification":{"kind":"compiler_local_materialization_mismatch","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":80,"core_identical":true,"starts":{"ja":"0x080e7614","en":"0x080f0614","de":"0x080f1c14","es":"0x080f3614","fr":"0x080f3614","it":"0x080f0614"}},"score":{"measured":"2026-08-30","candidate_bytes":100,"reference_bytes":100,"differing_halfwords":21,"wrong_instructions":22,"class":"missing-extra-code","note":"The exact-extent reconstruction retains equal branch topology. Spelling both signed group calculations as ordinary division by eight reproduces GCC 2.96's rounding sequence directly and improves the residual from 26/36 to 21 differing halfwords / 22 wrong instructions. The remaining mismatch is the reference's separately retained raw current halfword plus downstream allocation; it remains Draft C and claims zero DONE bytes."},"notes":["2026-09-01 retained-assembly proof: the ordinary-C reconstruction has the exact 100-byte owner extent, equal branch topology, exact constants and pool, and complete behavior. Cross-edition verification uniquely locates it in all six releases and proves all 80 relocation/literal-normalized core bytes identical. The residual is one local materialization choice: the ROM preserves adjacent signed and raw reads of the same current-index halfword, while GCC common-loads ordinary typed views; volatile views retain separate traffic but add sign-extension code or reverse the load order. The recorded union, aggregate, pointer, signed/raw, volatile, statement-order and division-shape probes exhaust the evidenced source dimensions. Canonical regmove, scheduling, CSE-follow, strength-reduction, expensive-optimization, force-memory/address and O3 routes remain at 100/21; scheduler2, GCSE, CSE-skip and rerun-CSE regress or change extent. Structured assembly therefore remains authoritative under compiler_local_materialization_mismatch; the semantic C remains the evidence artifact and does not claim exact C.","2026-08-31 bounded raw-carrier probe: tested two new structural models for the reference's adjacent signed and unsigned loads from 0x02004c00. First, an explicit u16 current_raw load retained for the later store alongside the s16 current used for division compiled byte-identically to the 100-byte baseline: GCC 2.96 commoned the two typed reads and still stored the signed-load carrier, leaving 21 differing halfwords / 22 wrong instructions. Second, making only the raw u16 read volatile did preserve a distinct ldrh, but scheduled it before the ldrsh, inserted an lsl/asr sign-extension pair, grew the owner to 104 bytes, and regressed to 47 differing halfwords / 54 wrong instructions. Both were reverted. Transferable negative fact: ordinary signed/unsigned alias loads at one address are commoned on this route, while volatile separation produces the wrong load order and extra sign extension; do not retry either raw-carrier axis without evidence for a different aggregate or access boundary.","2026-08-31 exact-closure verdict: the retained reference requires adjacent ldrsh and ldrh accesses to 0x02004c00, preserving the raw halfword in r4 across both signed divide-by-eight sequences and storing that raw carrier only on group change. The legitimate baseline reproduces all 100 bytes of extent and equal branch topology but GCC common-loads the signed/raw expressions, removes the ldrh, and consequently never saves r6. Distinct signed/unsigned one-field aggregate views are byte-identical to baseline. Making both views volatile grows to 108 bytes and adds two lsl/asr sign-extension pairs; declaring a volatile signed absolute cell plus a nonvolatile raw view grows to 104 bytes and orders ldrh before ldrsh. Finite shipped toggles -fno-cse-follow-jumps, -fno-gcse, -fno-expensive-optimizations, -fno-force-mem, -fno-force-addr, -fno-schedule-insns, and -fno-regmove do not improve the ordinary duplicate-load model; -fno-rerun-cse-after-loop and peephole/strength-reduction probes regress the volatile model. Exactness therefore needs authentic source evidence for an access boundary that preserves two differently typed reads in this exact order. Compiler barriers, artificial calls, and forced volatile traffic would manufacture that boundary and are rejected. Retain the DH21 ordinary-C draft.","Recovered from the retained owner, the aggregate-aware m2c seed, and the approved compiler; the unrelated template winner was discarded.","The source models the three shared EWRAM halfwords, signed round-toward-zero grouping, group-change test, resource-table lookup, and update call without generated register names.","No inline assembly, register forcing, compiler barriers, copied instruction bytes, or external decompilation source was used."]},"main:080f4028":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080f4028","status":"exact","owner_bytes":140,"score":{"measured":"2026-08-27","candidate_bytes":140,"reference_bytes":140,"differing_halfwords":14,"wrong_instructions":8,"class":"wrong","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080f4028.c","note":"matched_prefix=36 of 53 instructions: the entire struct-init block, all four leading calls, and the 0x03000250 veneer transfer are byte-exact. Only the last two-call tail diverges."},"shape":{"derivation":"games/gs1/src/camera/scene/init_default_transform.c (families-index template-main-080b7f9c) supplied the leading struct-init/four-call idiom. The closing section instead matches games/gs1/src/camera/scene/configure.c's (ConfigureSceneCamera, main:080b8fd4) SceneCameraObject/Data_03001ce0 pattern field-for-field and call-for-call, differing only in literal constants -- confirmed against the target's own disassembly (games/gs1/asm/080f4028.s), not assumed from the families-index score alone. Declared void() since the owner never touches ConfigureSceneCamera's .secondary field."},"rejected_experiments":[{"experiment":"raw-hex vs shift spelling of the repeated 250<<16 immediate","result":"no change; the compiler folds by value, not text"},{"experiment":"hoisting 250<<16 into one named local reused at both call sites","result":"no change; the compiler still unifies via register allocation"},{"experiment":"two separately-declared same-value locals (state_update_0256.c's working trick)","result":"regressed to 152 bytes / matched_prefix=1"},{"experiment":"nesting the veneer call inline as Func_08005258's argument to avoid an intermediate result local","result":"no change"},{"experiment":"2026-08-27 re-derivation: traced *why* the prior four attempts all fail, rather than trying another source spelling. The candidate's r5 (the state pointer, dead after its final use as the 0x03000250 veneer's second argument, immediately before this tail) is a free callee-saved register at exactly the point the first `250 << 16` is computed, so the register allocator caches the constant there across the second veneer call and reuses it for both the second veneer call's arg0 and Func_08005258's arg0 (2 mov-only reuses, 4 bytes). The reference instead recomputes `movs r0,#250; lsls r0,r0,#16` fresh at both sites (8 bytes) -- same total byte count, different instruction shape, hence differing_halfwords without a size delta. Because GCC's CSE/value-numbering unifies same-valued constants by their folded RTL value rather than source spelling (per experiment 1) and reused-vs-duplicated locals only move where the sharing happens rather than remove it (experiments 2-3), no legitimate (non-register-forcing) source rewrite escapes this: the caching decision is downstream of r5's liveness/register-allocation profitability at this point in the function, not of how the two `250 << 16` occurrences are spelled or grouped in source. Concluded this is a genuine floor for this owner given CONTRIBUTING.md's ban on forcing register assignment/scheduling; no further permutation attempted.","result":"confirmed architectural floor; candidate left unchanged at differing_halfwords=14"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template/sibling sources, in-repository headers, and the approved compiler.","The reconstruction is adopted as Proven C at games/gs1/src/camera/scene/reset_defaults.c."]},"main:080f4168":{"schema_version":1,"namespace":"main","address":"0x080f4168","status":"mapped","measured":"2026-08-29","map":{"head":"0x080f4168","head_symbol":"FunctionHead_080f4168","head_file":"games/gs1/asm/080f4168.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; ldr r5,[pc,#336]; ldr r1,[pc,#336]; movs r0,#41; add sp, r5 -- frame is 768 bytes, too large for the 7-bit `sub sp,#imm` encoding, so the compiler loaded a negative literal (-768) into r5 and used `add sp, r5` instead. Full r8-r11 save.","true_epilogue":{"file":"games/gs1/asm/080f4f04.s","note":"Ends `... movs r3,#192 / lsls r3,r3,#2 / add sp, r3 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. r3 = 192<<2 = 768, the exact positive mirror of the head's -768 frame adjustment via the same large-immediate workaround. Same four-high-register restore. This is the sole real epilogue."},"span":{"start":"0x080f4168","end_exclusive":"0x080f6000","size_bytes":7832,"derivation":"end = start of next asm file games/gs1/asm/080f6000.s, immediately following 080f4f04.s which owns the epilogue. size = 0x080f6000 - 0x080f4168 = 0x1e98 = 7832."},"member_regions_in_order":[{"addr":"0x080f4168","symbol":"FunctionHead_080f4168","file":"games/gs1/asm/080f4168.s","role":"real prologue + large-frame setup (768 bytes) + calls sub_08002f40/sub_08005340/sub_080f4100 (twice) + tail branch into continuation, literal pool in-file"},{"addr":"0x080f4318","symbol":"Region_080f4318","file":"games/gs1/asm/080f4318.s","role":"call-graph-reached prologue-less region, code+data mixed"},{"addr":"0x080f47bc","symbol":"Region_080f47bc","file":"games/gs1/asm/080f47bc.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080f4af0","symbol":"Region_080f4af0","file":"games/gs1/asm/080f4af0.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080f4f04","symbol":"Region_080f4f04","file":"games/gs1/asm/080f4f04.s","role":"converging tail ending in the real, shared, single epilogue"}]},"domain_evidence":["080f4168's own header comment marks it 'FunctionHead' for a split function carrying a following '\u5b9a\u6570\u517c\u30ea\u30c6\u30e9\u30eb\u30d7\u30fc\u30eb' (constant-and-literal pool) in the same file -- same authored classification style as the already-adopted 080be378/080d765c/080e15e8 heads.","sub_08002dd8 and sub_080cdbc0 appear repeatedly in the tail cleanup sequence of this epilogue, identical to the cleanup idiom seen in 080d765c/080ec100/080e47b8's epilogues (`bl sub_08002dd8` x2 with small constant args, then `bl sub_080cdbc0`, then frame teardown) -- strong evidence this and the other large dispatch functions in this address range share a common per-call finalizer/cleanup helper, worth checking against already-adopted owners before drafting C.","This is the second observed instance (after 080e47b8) of the compiler spilling to a >508-byte frame via a negative-literal `add sp, r5`/positive `add sp, r3` pair rather than an immediate `sub sp`/`add sp` -- both share the exact same instruction shape, suggesting both functions were compiled from unusually large local-variable-heavy source (likely deep, wide switch-driven state machines given the request's split-function context)."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080f4168.c --owner 080f4168 --size 7832","notes":["Map only, per task scope -- no C source drafted, no translation-units.json or games/gs1/recon/translation-units.json edited.","Recovered only from retained assembly headers/prologue/epilogue text in the listed .s files."]},"main:080f6148":{"schema_version":1,"namespace":"main","address":"0x080f6148","status":"measured-draft","owner_bytes":160,"candidate_bytes":140,"differing_halfwords":78,"wrong_instructions":106,"classification":"palette-darken-two-ranges","family":{"id":"template-main-080aac84","template_owner":"main:080aac84","template_source":"games/gs1/src/graphics/palette/adjust_bank.c","note":"Clustered by prologue/instruction n-gram similarity only. The real owner darkens two disjoint palette ranges by a fixed -1 per channel with a floor of 0 and no ceiling clamp, and has no bl between the two loop bodies (they are duplicated inline, not called). The template's do-while-over-banks control shape, its add(arg0)/dual clamp, and its separate read/write arrays do not apply; only the general RGB555 mask-and-clamp idiom was reusable."},"notes":["Real ROM behavior: loop 1 darkens 16 halfwords at 0x05000140 (BG palette bank 10); loop 2 darkens 239 halfwords at 0x05000202 (OBJ palette, skipping entry 0). Each channel is extracted, decremented by 1, floored at 0 (no upper clamp needed since subtracting from a 5-bit value cannot exceed 31), and repacked. Confirmed no bl instruction links the two loops -- they are two independently-emitted copies of the same body, not a shared subroutine.","Attempt 1: static helper DarkenPaletteRange(pltt,count) called twice -- the compiler did NOT inline it (candidate collapsed to 32 bytes with two bl instructions), rejected: candidate=32 wrong_instructions=80.","Attempt 2 (kept as draft): two straight-line for-loops written out in the body, each using a local `s32 mask = 31;` hoisted out of the loop (mirroring the template's own hoisted-mask idiom) so mask lives in a callee-saved register across the loop, matching the reference's 3-register push (r5,r6,r7) instead of my earlier 2-register push. Result: candidate=140 reference=160 differing_halfwords=78 wrong_instructions=106. Still not exact: the real code extracts blue and green via a shared `(color<<16)>>26` / `(color<<16)>>21` double-shift (reusing one left-shifted copy of the halfword for both fields) while my candidate and the byte-exact adjust_bank.c template both instead do direct `>>10 &mask` / `>>5 &mask`. I confirmed this by compiling the literal template source against its own byte-exact owner 0x080aac84 (candidate-show on games/gs1/src/graphics/palette/adjust_bank.c against 0x080aac84 -- 0 real mismatches in that instruction region, using the direct-shift form), so the double-shift is specific to this owner's source shape, not a toolchain default.","Attempt 3: read the color through a 3x u16:5 bitfield struct (red/green/blue LSB-first) to try to trigger a genuine bitfield-extraction codegen path. This backfired -- the compiler allocated a 4-byte (word) storage unit for the bitfield struct and emitted a 32-bit `ldr` instead of the reference's `ldrh`, and moved from 2-byte to 4-byte element stride. Rejected: candidate=136 wrong_instructions=112 (worse than attempt 2).","This narrows to a genuine compiler-internals residual in the two-field shared-shift extraction, not a control-flow or type-category gap: the read width (ldrh), the loop trip counts, the two base addresses, the per-channel -1/floor-0 semantics, and the repack-and-store all already match. Only the specific instruction sequence used to pull blue/green out of the halfword differs. Likely needs a source shape that makes GCC treat blue and green as a shared 2-field extraction (e.g. a genuine >16-bit-wide bitfield container, or the field order/adjacent packing exposed differently) -- worth a targeted permuter-style search over the extraction expression rather than further manual respelling.","Adoption requires 0 differing_halfwords."]},"main:080f92fc":{"schema_version":1,"namespace":"main","address":"0x080f92fc","status":"proven-retained","classification":"compiler_local_materialization_mismatch","owner_bytes":316,"cross_edition":{"measured":"2026-08-30","object_bytes":314,"retained_span_bytes":316,"relocation_bytes":28,"literal_bytes":16,"core_bytes":270,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true},"score":{"measured":"2026-08-27","candidate_bytes":316,"reference_bytes":316,"differing_halfwords":8,"wrong_instructions":4,"class":"allocation","note":"The complete ordinary-C controller and retained owner were re-read on 2026-08-30. Candidate and reference are both 316 bytes; only four instructions in the independent entry initialization schedule differ, and the streams are identical from the timer loop onward. Swapping row/repeat initialization and moving the shared-state clear after pointer setup preserved or regressed the floor. The shipped scheduling, regmove, CSE, strength-reduction, and expensive-optimization axes likewise preserved eight differing halfwords or regressed. Retained as strong compiler-local materialization output after the six-edition 270-byte normalized core also proved identical."},"notes":["Source recovered by a prior agent in this session whose full working notes were lost to an interrupted session; only the .c file survived in its worktree.","No other Golden Sun decompilation project, symbol map, or disassembly was consulted by this commit."]},"main:080f9ef8":{"schema_version":1,"namespace":"main","address":"0x080f9ef8","status":"measured-draft","owner_bytes":68,"executable_owner_bytes":68,"candidate_bytes":68,"differing_halfwords":24,"wrong_instructions":14,"classification":"stop-music-track","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":60,"core_diff_bytes":0,"core_identical":true},"notes":["2026-09-01 signedness and condition-shape probe: spelling the active-bit test as an s8 sign test emits ldrsb/cmp/bge and preserves the 24-halfword/14-wrong residual while making branch topology worse. Folding the channel-type mask into its initializer or assignment condition likewise ties or regresses; neither removes GCC's redundant post-ands compare. The readable u8 mask test and separate s32 compound mask remain canonical, and these axes are closed.","2026-09-01 bounded flag-test probe: the exact in-repository MusicTrack_Finish witness emits ldrb/mov/tst from a genuinely multi-bit 0xc7 mask under its recorded compiler route. For this owner's one-bit 0x80 predicate, truth, equality-to-mask, and masked-ordering spellings all collapse to the same ldrb/lsrs/cmp sequence. The old-agbcc route regresses to 72 bytes, 34 differing halfwords, and 28 wrong instructions; nine shipped GCC 2.96 optimization/pass toggles are neutral at 68/24/14. The mask-spelling and compiler-route axes are therefore closed.","2026-09-01: preserving the channel type as an s32 carrier and applying the 7-bit hardware-channel mask as a compound update reproduces the reference's r0/r3 roles through the mask. This improves the exact-extent candidate from 26 differing halfwords / 18 wrong instructions to 24 / 14. The remaining post-mask compare and entry flag-test shape still prevent adoption.","2026-08-31: reconstructing the original translation-unit context exposed its local `_call_via_r3` veneer at 0x080f9ee8, rather than the global veneer bank, and re-auditing the shipped per-file ABI route showed that r4 remains callee-saved for this source. Registering both facts improves the exact-extent candidate from 31 differing halfwords / 42 wrong instructions to 26 / 18. The remaining residual is still a broad flag-test and allocation mismatch, so this remains Draft C and claims zero DONE bytes.","2026-08-31: retaining the entry `track->flags` read in a named `u8 flags` carrier improves the candidate from 72/36/50 to the exact 68-byte extent with 31 differing halfwords and 42 wrong instructions. GCC changes the flag test from `ands`/`cmp` to an equivalent bit-extract `lsrs`/`cmp`; using an `s32` carrier emits the same result. An explicit outer early return is byte-identical to the original nested conditional and was reverted. The remaining residual is still broad register allocation plus the reference's `movs #128; tst` test shape, so this is retained as a measured Draft C improvement only.","Stops every CGB channel owned by an active music track, invokes the configured oscillator-disable callback for hardware channel types, and clears both sides of the ownership link.","The six editions retain an identical 60-byte relocation-normalized executable core inside the same 68-byte owner boundary.","A fresh declared-translation-unit rebuild confirms the stored 68-byte, 24-differing-halfword, 14-wrong-instruction score. The owner remains Draft C and is not eligible for a permanent compiler classification."]},"main:080fa1ac":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080fa1ac","status":"proven-retained","classification":"compiler_dead_parameter_register_reuse","owner_bytes":26,"score":{"measured":"2026-08-27","candidate_bytes":26,"reference_bytes":26,"differing_halfwords":10,"wrong_instructions":20,"class":"allocation","command":"compiler candidate-show games/gs1/recon/en/main/080fa1ac.c --owner 080fa1ac --family old-agbcc --flags -O1","note":"Re-measured 2026-08-27, unchanged from the prior baseline: structurally identical to the reference at old-agbcc -O1 (all thirteen instructions match one-for-one in mnemonic, operand shape, and branch structure); the only residual is one uniform register rotation -- the candidate's serial scratch register is r0 where the reference uses r2 (and consequently r2/r3 where the reference uses r3). Root-caused this session by invoking alchemy-gcc/dist/agbcc/old_agbcc directly on the preprocessed source with -dlgr and reading the .lreg/.greg dumps (see rejected_experiments below for the full derivation): this build's local-alloc find_free_reg does NOT honor arm.h's REG_ALLOC_ORDER {r3,r2,r1,r0,...} bias for this owner's qtys -- it hands out the first ascending free register instead (r0, else r1, else r2, ...). track (r1) is always excluded since it lives the whole function; the dead first parameter (r0) is genuinely dead by the time the flow graph reaches the scratch pseudo's block, so r0 is free and wins every time in this build, then the reload-forced load of the pre-OR flags byte takes the next free ascending register (r2). For the reference's r2/r3 pair to appear, r0 would have to still read as live at that point -- and no legitimate source construct achieves that: a probe with `asm volatile(\"\" :: \"r\"(unused))` right at entry (tested this session, not adopted -- forcing register liveness through inline asm is exactly the kind of register-assignment forcing CONTRIBUTING.md prohibits, and this was a diagnostic probe only) still let r0 free by the time the first store's scratch register is chosen, since GCC's liveness naturally recomputes the dead range after the trivial touch. Genuinely keeping r0 live (a real use, or a non-void return) requires emitting real code that breaks the verified 13-instruction match (already established by the return-value and -ffixed-r0 experiments below). This is the class-2 known-dead-end register-letter residual from this session's catalog, now with a first-principles compiler-internals confirmation rather than only cross-owner pattern-matching."},"remaining":[{"op":"register allocation","count":10,"where":"one uniform rotation: candidate r0->reference r2 for the serial scratch pseudo and r2->r3 for the loaded flags byte. r0 is never touched by the reference despite the dead first parameter."}],"rejected_experiments":[{"experiment":"canonical gcc296 route (original candidate and template-text spellings)","result":"if-converts the diamond (hoisted 12 with conditional 3 overwrite) and emits a push/pop frame; 24-32 bytes, never the reference's 13-instruction frameless diamond"},{"experiment":"template-text |= arms under old-agbcc -O2","result":"correct diamond and crossjumped or-tail but 28 bytes (extra zero materialization) and r0 scratch"},{"experiment":"non-void declaration (implicit-int style) to reserve r0","result":"no change; the dead parameter's register is still reused"},{"experiment":"returning the first parameter to keep r0 live","result":"30 bytes; generates return moves the reference does not have"},{"experiment":"-ffixed-r0 with -O1","result":"28 bytes; forces an extra parameter move"},{"experiment":"sibling counter-evidence","result":"byte-exact set_tone_type (main:080fb6ec), same dead-first-parameter signature, freely uses r0 as scratch from its first instruction -- the r2 preference here is owner-specific, not a family or flag property"},{"experiment":"2026-08-27: direct old_agbcc invocation with -dlgr (bypassing candidate-show) to read the .lreg/.greg RTL dumps for this exact source/flags","result":"confirmed the whole owner reduces to ONE local qty (the zero/compare/12-or-3 value, coalesced across all three basic blocks since the live ranges never overlap) plus ONE reload-forced register for the pre-OR flags-byte load. Reducing the source to a single statement (just the two zero-stores, no if/else) still yields r0 for the lone scratch qty -- proving the register choice has nothing to do with competing against the other local pseudos in this owner"},{"experiment":"2026-08-27: minimal-function probes to characterize find_free_reg's actual search order under old-agbcc -O1/-O2 (independent of this owner's field layout)","result":"with the dead-parameter-first, track-second signature (matches this owner), the lone scratch pseudo takes r0. With track as the SOLE parameter (arriving in r0), the lone scratch pseudo takes r1, not r3. Both results are the first ascending free register, not arm.h's REG_ALLOC_ORDER {r3,r2,r1,r0,...} -- this old_agbcc build does not honor that macro's preference order for this owner's qtys, it fills registers 0,1,2,3,... in order, skipping whichever is already alive"},{"experiment":"2026-08-27: asm volatile(\"\" :: \"r\"(unused)) at function entry, as a diagnostic probe only -- NOT adopted, this is exactly the kind of register-assignment forcing CONTRIBUTING.md prohibits, tested only to confirm the mechanism","result":"no change (still r0/r2). The empty-asm touch dies immediately at that single insn under GCC's own liveness recomputation, so it does not extend r0's live range into the block where the scratch pseudo is later born -- confirms no side-effect-free source construct can keep r0 marked live at the point that matters without adding real, match-breaking instructions"}],"notes":["Recovered only from the retained owner bytes in the approved local ROM, the adopted audio family sources and headers, and the approved compilers.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM under compiler_dead_parameter_register_reuse."]},"main:080fa264":{"status":"proven-retained","classification":"compiler_allocation_mismatch","span_bytes":28,"score":{"measured":"2026-08-23","candidate_bytes":28,"reference_bytes":28,"wrong_instructions":4,"differing_halfwords":2,"class":"compiler-allocation-retention"},"expressed":["complete signature guard and status-bit clear"],"unexpressed":[],"verified_against_reference":["byte count 28 = 28","all control flow, loads, stores, constants, and literal placement agree"],"blocked_by":"the signature load and comparison use r1 instead of reference r3; behavior, extent, control flow, memory operations, constants, and pools are otherwise exact","rejected":["10,000-candidate classic heat-guided walk: 9,786 compiled, exact 0, every retained result tied the two-halfword baseline","approved-family sweep across routed/old-agbcc and GCC 2.96 at -O0/-O1/-O2/-O3/-Os: optimized routed builds preserve the r1 allocation; other combinations change extent or broader instruction shape; GCC 3 is unavailable in the recorded toolchain"],"retention":"keep_structured_asm"},"main:080fb2a4":{"schema_version":1,"namespace":"main","address":"0x080fb2a4","status":"measured-draft","owner_bytes":40,"executable_owner_bytes":40,"candidate_bytes":32,"differing_halfwords":20,"wrong_instructions":22,"classification":"update-music-player-pitch","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"starts":{"ja":"0x080f22a4","en":"0x080fb2a4","de":"0x080fc0a4","es":"0x080fdaa4","fr":"0x080fdaa4","it":"0x080fb2a4"},"relocation_normalized_core_bytes":34,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"mode":"classic-heat-walk","candidates":20000,"exact_candidates":0,"best_readable_candidate_bytes":40,"best_readable_differing_halfwords":8,"best_readable_wrong_instructions":10,"best_unverified_differing_halfwords":7},"bounded_checks":["re-examined the retained assembly directly this session: the reference's extra 8 bytes are entirely its push{r4,lr}/pop{r4}/pop{r0}+bx r0 frame, needed because it keeps the truncated pitch value resident in r1 across the ldrh of pitch_scale (forcing pitch_scale into a fresh r4); this candidate's register allocator instead reuses r1 for pitch_scale and keeps pitch in r3, needing no extra register and compiling as a leaf function (bx lr, no frame). Declaring the truncated value as `s32 pitch = (u16)value` instead of `u16 pitch = value` produced byte-identical output, confirming this is the same register-reuse-choice residual as the prior two respellings, not a new lead","all six statement-order permutations of pitch truncation, scale load, and identity load were compiled; the only 40-byte improvement loads pitch_scale before validating the identity","direct identity access, local identity, register hints, nested assignment, duplicate guarded loads, and approved optimization-pass toggles did not close the residual","an explicit gcc296 scheduling route regressed to 15 differing halfwords","the 20,000-candidate walk found no exact output; its seven-halfword generated best changes the multiplication input and is not a semantic candidate","2026-08-27: re-verified the measured baseline (candidate-show: candidate=32 reference=40 differing_halfwords=20, class=wrong, wrong_instructions=22) against the current committed source, then tried two further source respellings not previously logged: (a) swapping the multiply operands to `(player->pitch_scale * pitch) >> 8`, and (b) hoisting `player->pitch_scale` into an explicit `u16 scale;` local read after the `player->pitch = pitch;` store (same read position as the reference, just named). Both compiled byte-identical to the existing 32-byte leaf candidate -- GCC 2.96 normalizes the commutative multiply before RTL and the local-vs-inline field read makes no allocation difference. This is the same register-choice residual already isolated: the reference allocator commits a fresh callee-saved r4 to pitch_scale and keeps pitch resident in r1 (forcing the push/pop frame), while this compiler's allocator instead keeps pitch in a fresh caller-saved r3 and reuses the freed r1 slot for pitch_scale, staying leaf. No source-level lever discovered this session moves that choice; treating it as a confirmed floor for this owner, consistent with the session's broader 'final register-letter swap not controllable via source reordering' finding (see main CLAUDE.md dead-end catalog), here manifesting as leaf-vs-framed instead of a same-size register swap.","2026-08-31 bounded family follow-up: changing the second parameter from `s32 value` plus a local `u16 pitch` to a direct `u16 pitch` parameter produced byte-identical 32-byte output. GCC 2.96 performs the same entry truncation and constructs the same allocation regardless of whether the narrowing is expressed in the function type or the body.","2026-08-31 bounded family follow-up: qualifying the music-player state as volatile produced 40 bytes / 17 instructions, but not the reference shape: volatile aggregate assignment requires an otherwise-absent `ldrh` before each halfword store, yielding 10 differing instructions. The ROM has plain stores, so this state is not volatile at this interface; the matching frame length is incidental and not an adoption lead."],"notes":["Stores a validated music-player pitch and derives its scaled pitch from the player's 8.8 fixed-point scale.","Correct field widths eliminate opcode mismatches, but the honest guarded source compiles as a shorter leaf because the scale does not remain live in a callee-saved register.","The best readable 40-byte diagnostic has the reference instruction multiset but retains an eight-halfword linked allocation/scheduling residual and speculatively reads pitch_scale before the identity guard. That access change is not justified by the reference semantics, so it was not retained.","The residual exceeds the narrow permanent-assembly gate. Retained assembly remains authoritative and this draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, and the approved compiler. No GS2 source or data was inspected or changed."]},"resource_371:020002cc":{"span_bytes":36,"status":"proven-retained","census":{"exact_normalized_twins":0,"candidates_with_at_most_8_core_byte_differences":0,"candidates_with_at_most_64_core_byte_differences":4,"candidate_bytes":204,"nearest_exact_c_owner":"resource_3c9:02000400","nearest_core_bytes":28,"nearest_core_diff_bytes":23},"score":{"candidate_bytes":36,"reference_bytes":36,"wrong_instructions":4,"differing_halfwords":2,"class":"allocation"},"cross_edition":{"core_bytes":28,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x020002cc","en":"0x020002cc","de":"0x020002cc","es":"0x020002cc","fr":"0x020002cc","it":"0x020002cc"}},"search":{"safe_candidates":20000,"compile_failures":0,"exact":false,"best_differing_halfwords":2},"expressed":["read the shared map-animation frame","copy it into the sprite's map object","clear the object's animation state","return success"],"blocked_by":"two allocation-only halfwords: approved GCC reloads the shared-data pointer into r3 where the reference selects r2","retention":{"kind":"compiler_allocation_module","start":"0x020002cc","end":"0x020002f0","done_bytes":34},"notes":["The nominal exact-C twin is not a semantic twin: 23 of 28 normalized core bytes differ, so its source shape was rejected rather than copied blindly.","The independently reconstructed ordinary C has exact extent and zero normalized structural rows, but the capped exact search found no emitting source.","The owner satisfies the existing narrow compiler-allocation precedent: exact extent, semantic completeness, zero normalized structural rows, equivalent low-register allocation only, a bounded unchanged exact search, and an all-six identical core.","Coverage promotes 34 previously ordinary-assembly bytes; the owner's two-byte alignment was already retained by the executable inventory, so the 36-byte retained span produces a net DONE delta of 34 bytes.","Retained assembly remains authoritative; the canonical registry supplies its human name, and no exact-C bytes are claimed.","Re-verified 2026-08-26: five additional respellings of the pointer-arithmetic statement (inlined dereference without a named pointer variable; reordered local declarations before/after the object load; dropped the volatile qualifier on the u16 pointer; hoisted the extern global into its own u8 * local before adding the offset; commuted the addition to 282 + Data_03001e70) were compiled and scored. None reached differing_halfwords=0: the two candidates matching the current source's statement order reproduce the same locked 2-halfword r2/r3 allocation residual, and every candidate that moved the sprite->object load earlier degraded to 9 differing halfwords by exposing a third live value. This confirms the residual is a genuine allocation lock rather than an unexplored spelling."]},"resource_371:02000c28":{"span_bytes":1082,"score":{"measured":"2026-08-23","candidate_bytes":902,"reference_bytes":1094,"wrong_instructions":196,"differing_halfwords":515,"class":"generated-call-script-retention"},"shape":{"calls":123,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 123 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_371:02001064":{"span_bytes":1270,"score":{"measured":"2026-08-23","candidate_bytes":1120,"reference_bytes":1270,"wrong_instructions":265,"differing_halfwords":612,"class":"generated-call-script-retention"},"shape":{"calls":115,"loops":1,"memory_operations":2,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 115 calls and their argument values, 1 loops, and 2 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_371:020028e8":{"span_bytes":972,"score":{"measured":"2026-08-31","candidate_bytes":608,"reference_bytes":972,"wrong_instructions":255,"differing_halfwords":472,"class":"structured-scene-retention"},"shape":{"calls":90,"loops":0,"memory_operations":46},"verified_against_reference":["complete callable owner at 0x020028e8, including its interworking return and literal tail","all 90 decoded calls, 0 loop(s), and 46 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_371:020034a0":{"schema_version":1,"namespace":"resource_371","address":"0x020034a0","status":"measured-draft","owner_bytes":220,"executable_owner_bytes":172,"candidate_bytes":212,"differing_halfwords":85,"wrong_instructions":62,"classification":"spawn-randomized-follower-effect","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":172,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x020034a0","en":"0x020034a0","de":"0x020034a0","es":"0x02003498","fr":"0x02003498","it":"0x02003498"}},"notes":["Complete input-gated effect spawner: clones actor slot 8 position into a kind-222 effect with fixed coordinate offsets, randomized lateral displacement, inherited presentation flags and variant, then installs presentation, mode and callback.","Explicit --span analysis proves the 172-byte relocation-normalized executable core identical across all six editions; the audited 220-byte owner includes its reached pools.","Correct import prototypes, distinct source/effect layouts and width-accurate random carriers improve the generated 104-byte/110-halfword/84-wrong draft to a complete 212-byte/85-halfword/62-wrong candidate.","Declaration order, signed and unsigned carrier widths, explicit truncation stages, expression grouping, direct field and typed layout variants were bounded. The remaining residual spans long-lived r6/r7 allocation, integer-truncation scheduling and flag merge order, so it is neither exact nor a narrow permanent compiler residual and claims zero DONE bytes."]},"resource_372:02002dec":{"span_bytes":894,"score":{"measured":"2026-08-23","candidate_bytes":816,"reference_bytes":894,"wrong_instructions":143,"differing_halfwords":430,"class":"generated-call-script-retention"},"shape":{"calls":84,"loops":0,"memory_operations":14,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 84 calls and their argument values, 0 loops, and 14 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_373:02000f5c":{"span_bytes":744,"score":{"measured":"2026-08-31","candidate_bytes":576,"reference_bytes":744,"wrong_instructions":166,"differing_halfwords":355,"class":"structured-scene-retention"},"shape":{"calls":60,"loops":2,"memory_operations":23},"verified_against_reference":["complete retained body from 0x02000f5c through the next production owner boundary","all 60 decoded calls, 2 loop(s), and 23 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_373:020012ba":{"span_bytes":410,"score":{"measured":"2026-08-31","candidate_bytes":384,"reference_bytes":410,"wrong_instructions":110,"differing_halfwords":196,"class":"structured-scene-retention"},"shape":{"calls":37,"loops":0,"memory_operations":5},"verified_against_reference":["complete audited production span","all 37 decoded calls, 0 loop(s), and 5 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_373:020015dc":{"span_bytes":5240,"score":{"measured":"2026-08-30","candidate_bytes":5116,"reference_bytes":5240,"wrong_instructions":658,"differing_halfwords":2475,"class":"generated-call-script-retention"},"shape":{"calls":496,"loops":3,"memory_operations":53,"reference_high_register_moves":8},"verified_against_reference":["the complete owner boundary is 0x020015dc through 0x02002a54, including its compiler-generated literal pools","the reconstruction accounts for all 496 calls in exact machine order and restores both actor-motion loops, the five-step position loop, all three conditional workspace-counter updates, actor flags and fields, global state writes, and the saved scene byte restored at exit","default GCC 2.96 emits 5116 bytes; -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps emit 6316, 5164, 5116, 5116, 5112, and 5116 bytes respectively, with zero exact emissions","the remaining compiler residual is distributed register allocation, immediate construction, scheduling, and literal-pool placement across a 496-call generated scene script rather than an unrepresented source operation"],"retention":"keep_structured_asm","note":"Retain the byte-exact structured assembly while keeping the complete ordinary-C scene script as the semantic reconstruction and future compiler-search oracle."},"resource_374:02000750":{"span_bytes":396,"score":{"measured":"2026-08-31","candidate_bytes":328,"reference_bytes":396,"wrong_instructions":70,"differing_halfwords":197,"class":"structured-scene-retention"},"shape":{"calls":33,"loops":0,"memory_operations":0},"verified_against_reference":["complete audited production span","all 33 decoded calls, 0 loop(s), and 0 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_374:02000b8c":{"span_bytes":1230,"score":{"measured":"2026-08-23","candidate_bytes":1100,"reference_bytes":1230,"wrong_instructions":226,"differing_halfwords":587,"class":"generated-call-script-retention"},"shape":{"calls":113,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 113 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_374:020017c8":{"span_bytes":2816,"score":{"measured":"2026-08-30","candidate_bytes":2836,"reference_bytes":2816,"wrong_instructions":168,"differing_halfwords":1208,"class":"generated-call-script-retention"},"shape":{"calls":293,"loops":0,"memory_operations":13},"verified_against_reference":["complete deterministic reconstruction accounts for all 293 calls, their arguments, the returned-object field forwarding, and all 13 explicit memory operations","aligned reference comparison restored six zero-valued second arguments, actor fields at offsets 8 and 16, and final scene-state words at workspace offsets 448 and 456","approved GCC allocation and literal scheduling changes the owner extent and instruction order; no forced-register or scheduling construct is used"],"retention":"keep_structured_asm","note":"A generated field-scene call script retained as structured assembly because approved GCC cannot preserve its repeated immediate and call-argument schedule."},"resource_375:020000dc":{"span_bytes":1626,"score":{"measured":"2026-08-23","candidate_bytes":1552,"reference_bytes":1626,"wrong_instructions":235,"differing_halfwords":778,"class":"generated-call-script-retention"},"shape":{"calls":167,"loops":0,"memory_operations":2,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 167 calls and their argument values, 0 loops, and 2 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_375:0200150c":{"span_bytes":544,"score":{"measured":"2026-08-30","candidate_bytes":588,"reference_bytes":544,"wrong_instructions":117,"differing_halfwords":268,"class":"generated-call-script-retention"},"shape":{"calls":46,"loops":0,"memory_operations":5},"verified_against_reference":["all 46 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit restored the progress range gate, three resource predicates, actor-state writes, and progress-dependent actor branches omitted by the mechanical draft","approved GCC folds the long-lived progress pointer into a relocation and schedules repeated constants differently from the reference after all decoded effects are represented"],"retention":"keep_structured_asm"},"resource_375:02001760":{"span_bytes":530,"score":{"measured":"2026-08-30","candidate_bytes":580,"reference_bytes":530,"wrong_instructions":100,"differing_halfwords":270,"class":"generated-call-script-retention"},"shape":{"calls":60,"loops":0,"memory_operations":2},"verified_against_reference":["all 60 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit restored every resource predicate, literal-backed presentation argument, and terminal actor-coordinate forwarding omitted by the mechanical draft","approved GCC retains repeated literals and live values in additional callee-saved registers after all decoded effects are represented"],"retention":"keep_structured_asm"},"resource_377:02000578":{"span_bytes":1172,"score":{"measured":"2026-08-30","candidate_bytes":1176,"reference_bytes":1172,"wrong_instructions":242,"differing_halfwords":551,"class":"generated-call-script-retention"},"shape":{"calls":111,"loops":0,"memory_operations":31},"verified_against_reference":["candidate and ROM contain the same 111 calls in machine order with every decoded argument represented","direct assembly audit restored four motion coordinates, three scene-object fields, two workspace-state pairs, an event flag, conditional event-counter increment, and terminal workspace reset","candidate is four bytes longer after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_377:02000a0c":{"span_bytes":1064,"score":{"measured":"2026-08-30","candidate_bytes":1104,"reference_bytes":1064,"wrong_instructions":234,"differing_halfwords":538,"class":"generated-call-script-retention"},"shape":{"calls":86,"loops":2,"memory_operations":20},"verified_against_reference":["candidate and ROM contain the same 86 calls in machine order with every decoded argument represented","direct assembly audit restored actor flags, two palette halfwords, four-step and sixteen-step display-register ramps, event flag, and both workspace-state pairs","candidate is 40 bytes longer after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_377:02000f90":{"span_bytes":1042,"score":{"measured":"2026-08-23","candidate_bytes":1012,"reference_bytes":1042,"wrong_instructions":150,"differing_halfwords":495,"class":"generated-call-script-retention"},"shape":{"calls":103,"loops":0,"memory_operations":5,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 103 calls and their argument values, 0 loops, and 5 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_377:020013e2":{"span_bytes":354,"score":{"measured":"2026-08-31","candidate_bytes":278,"reference_bytes":354,"wrong_instructions":126,"differing_halfwords":175,"class":"structured-scene-retention"},"shape":{"calls":29,"loops":0,"memory_operations":9},"verified_against_reference":["complete audited production span","all 29 decoded calls, 0 loop(s), and 9 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_378:0200088c":{"span_bytes":4080,"score":{"measured":"2026-08-31","candidate_bytes":3964,"reference_bytes":4080,"wrong_instructions":1268,"differing_halfwords":2007,"class":"generated-call-script-retention"},"shape":{"calls":489,"loops":0,"state_branches":3,"inline_literal_pools":3},"verified_against_reference":["the complete owner and its three branch-skipped inline pools are bounded from 0x0200088c through the trailing pool before 0x0200187c","all 489 resolver-confirmed calls are represented in machine order; the apparent call at 0x020017ca is correctly treated as an intra-owner branch target","all three scene-state branch arms and the workspace request, setup, and skip-beat effects are represented","the remaining score delta is approved-compiler call argument materialization, carrier allocation, scheduling, and literal-pool placement after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_37a:02001510":{"span_bytes":1352,"score":{"measured":"2026-08-31","candidate_bytes":1188,"reference_bytes":1352,"wrong_instructions":285,"differing_halfwords":656,"class":"structured-scene-retention"},"shape":{"calls":137,"loops":10,"memory_operations":0},"verified_against_reference":["complete retained body from 0x02001510 through the next production owner boundary","all 137 decoded calls, 10 loop(s), and 0 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"compiler_impossibility":{"kind":"intra_function_call_module","reference_evidence":"Six direct bl sites at 0x02001642, 0x0200166a, 0x0200167c, 0x02001692, 0x020016a4 and 0x020016ba target intra-owner blocks 0x0200187c, 0x020018a4, 0x020019de, 0x020018cc, 0x02001a06 and 0x020018f4 that are also reached by ordinary fallthrough with live owner state; see games/gs1/assets/code/resource_37a_overlay.s:1853-1901 and :2083-2243.","compiler_evidence":"The approved GCC 2.96 Thumb direct-call patterns in alchemy-gcc/agscc/gcc/config/arm/arm.md:5992-6034 accept SYMBOL_REF operands, not intra-function LABEL_REF blocks, and the backend has no outlining pass.","verdict":"Ordinary C cannot make the same live statement sequences both fallthrough code and callable local subroutines; retained assembly is required for the byte-exact 1352-byte module."},"retention":"keep_structured_asm"},"resource_37b:02000150":{"span_bytes":1026,"score":{"measured":"2026-08-23","candidate_bytes":898,"reference_bytes":1026,"wrong_instructions":180,"differing_halfwords":473,"class":"generated-call-script-retention"},"shape":{"calls":116,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 116 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_37b:02000554":{"span_bytes":1218,"score":{"measured":"2026-08-23","candidate_bytes":1012,"reference_bytes":1218,"wrong_instructions":212,"differing_halfwords":575,"class":"generated-call-script-retention"},"shape":{"calls":123,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 123 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_37b:0200101a":{"span_bytes":1370,"score":{"measured":"2026-08-31","candidate_bytes":1184,"reference_bytes":1370,"wrong_instructions":496,"differing_halfwords":673,"class":"structured-scene-retention"},"shape":{"calls":89,"loops":3,"memory_operations":5},"verified_against_reference":["complete retained body from 0x0200101a through the next production owner boundary","all 89 decoded calls, 3 loop(s), and 5 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_37f:02000f6c":{"span_bytes":1126,"score":{"measured":"2026-08-23","candidate_bytes":1006,"reference_bytes":1126,"wrong_instructions":196,"differing_halfwords":533,"class":"generated-call-script-retention"},"shape":{"calls":117,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 117 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_37f:02001604":{"span_bytes":1154,"score":{"measured":"2026-08-23","candidate_bytes":1008,"reference_bytes":1154,"wrong_instructions":205,"differing_halfwords":559,"class":"generated-call-script-retention"},"shape":{"calls":82,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 82 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_380:020006f4":{"span_bytes":880,"score":{"measured":"2026-08-31","candidate_bytes":800,"reference_bytes":880,"wrong_instructions":216,"differing_halfwords":418,"class":"generated-call-script-retention"},"shape":{"calls":84,"loops":1,"memory_operations":0},"verified_against_reference":["all 84 resolver-confirmed calls and their arguments are represented in ROM order across the complete callable owner","the six-pass opening effect loop and every subsequent presentation phase are represented with no decoded semantic memory operations","both direct intra-overlay calls are distinguished from the imported veneer targets","the boundary includes the sole interworking return, alignment, and fourteen-word literal pool before 0x02000a64","remaining differences are approved GCC carrier allocation and literal-pool scheduling after complete decoded semantics are represented"],"retention":"keep_structured_asm"},"resource_380:02000a98":{"span_bytes":708,"score":{"measured":"2026-08-30","candidate_bytes":688,"reference_bytes":708,"wrong_instructions":166,"differing_halfwords":327,"class":"generated-call-script-retention"},"shape":{"calls":61,"loops":1,"memory_operations":1},"verified_against_reference":["candidate and ROM contain the same 61 calls in machine order with every argument represented","direct assembly audit restored the conditional loop body, workspace state write, and returned actor handle omitted by the mechanical draft","the complete executable owner is represented; approved GCC allocation and literal scheduling change its register saves and extent"],"retention":"keep_structured_asm"},"resource_380:02000f8c":{"span_bytes":1220,"score":{"measured":"2026-08-30","candidate_bytes":1224,"reference_bytes":1220,"wrong_instructions":173,"differing_halfwords":570,"class":"generated-call-script-retention"},"shape":{"calls":118,"loops":2,"memory_operations":28},"verified_against_reference":["candidate and ROM contain the same 118 calls in machine order with every argument represented","direct assembly audit restored both motion-loop deltas, six actor-state writes, four initial coordinate fields, and the conditional scene-counter increment","candidate and reference differ by four bytes after all decoded control flow and memory effects are represented; the residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_380:0200178c":{"span_bytes":1366,"score":{"measured":"2026-08-23","candidate_bytes":1292,"reference_bytes":1378,"wrong_instructions":172,"differing_halfwords":523,"class":"generated-call-script-retention"},"shape":{"calls":147,"loops":1,"memory_operations":14,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 147 calls and their argument values, 1 loops, and 14 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_380:020027f8":{"span_bytes":5932,"score":{"measured":"2026-08-30","candidate_bytes":5900,"reference_bytes":5932,"wrong_instructions":745,"differing_halfwords":2775,"class":"generated-call-script-retention"},"shape":{"calls":556,"loops":5,"memory_operations":71,"reference_high_register_moves":8},"verified_against_reference":["the complete owner boundary is 0x020027f8 through 0x02003f24, including its compiler-generated literal pools","the reconstruction accounts for all 556 calls in exact machine order and restores all four fixed-point animation loops, the runtime polling loop, three conditional counter updates, returned-object field forwarding, scene-object fields, flags, and global state writes","default GCC 2.96 emits 5900 bytes; -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps emit 7804, 5928, 5900, 5900, 5912, and 5900 bytes respectively, with zero exact emissions","the remaining compiler residual is distributed register allocation, immediate construction, scheduling, and literal-pool placement across a 556-call generated scene script rather than an unrepresented source operation"],"retention":"keep_structured_asm","note":"Retain the byte-exact structured assembly while keeping the complete ordinary-C scene script as the semantic reconstruction and future compiler-search oracle."},"resource_380:02004260":{"span_bytes":200,"score":{"measured":"2026-08-31","candidate_bytes":130,"reference_bytes":200,"wrong_instructions":71,"differing_halfwords":98,"class":"structured-scene-retention"},"shape":{"calls":14,"loops":0,"memory_operations":10},"verified_against_reference":["complete audited executable span","all 14 decoded calls, 0 loop(s), and 10 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_381:02000054":{"span_bytes":3548,"score":{"measured":"2026-08-30","candidate_bytes":3456,"reference_bytes":3548,"wrong_instructions":489,"differing_halfwords":1699,"class":"generated-call-script-retention"},"shape":{"calls":337,"loops":0,"memory_operations":12,"reference_high_register_moves":0},"verified_against_reference":["the complete owner boundary is 0x02000054 through 0x02000e30, including its compiler-generated literal pools","the reconstruction accounts for all 337 calls in exact machine order and restores the branch arms, two phase-state transitions, object flags, and global state writes","default GCC 2.96 emits 3456 bytes; -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps emit 4016, 3464, 3456, 3456, 3458, and 3456 bytes respectively, with zero exact emissions","the remaining residual is distributed scheduling, immediate construction, and literal-pool placement rather than an unrepresented source operation"],"retention":"keep_structured_asm","note":"Retain the byte-exact structured assembly while keeping the complete ordinary-C scene script as its semantic reconstruction."},"resource_381:02001798":{"span_bytes":922,"score":{"measured":"2026-08-23","candidate_bytes":856,"reference_bytes":922,"wrong_instructions":174,"differing_halfwords":438,"class":"generated-call-script-retention"},"shape":{"calls":92,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 92 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_381:020029a4":{"span_bytes":508,"score":{"measured":"2026-08-31","candidate_bytes":256,"reference_bytes":508,"wrong_instructions":182,"differing_halfwords":253,"class":"structured-scene-retention"},"shape":{"calls":28,"loops":3,"memory_operations":7},"verified_against_reference":["complete audited production span","all 28 decoded calls, 3 loop(s), and 7 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_383:02000de4":{"span_bytes":1380,"score":{"measured":"2026-08-30","candidate_bytes":1388,"reference_bytes":1380,"wrong_instructions":142,"differing_halfwords":651,"class":"generated-call-script-retention"},"shape":{"calls":151,"loops":0,"memory_operations":9,"reference_high_register_moves":0},"verified_against_reference":["the complete owner boundary is 0x02000de4 through 0x02001348, including its compiler-generated literal pools","the reconstruction accounts for all 151 calls, arguments, and explicit memory effects in exact machine order","default GCC 2.96 emits 1388 bytes; -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps emit 1608, 1388, 1388, 1388, 1388, and 1388 bytes respectively, with zero exact emissions"],"retention":"keep_structured_asm","note":"Retain the byte-exact structured assembly while keeping the complete ordinary-C scene script as its semantic reconstruction."},"resource_383:02001348":{"span_bytes":1608,"score":{"measured":"2026-08-30","candidate_bytes":1592,"reference_bytes":1608,"wrong_instructions":203,"differing_halfwords":746,"class":"generated-call-script-retention"},"shape":{"calls":169,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["the complete owner boundary is 0x02001348 through 0x02001990, including its compiler-generated literal pools","the reconstruction accounts for all 169 calls and arguments in exact machine order; the reference contains no branches, loops, or memory state","default GCC 2.96 emits 1592 bytes; -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps emit 1724, 1592, 1592, 1592, 1592, and 1592 bytes respectively, with zero exact emissions"],"retention":"keep_structured_asm","note":"Retain the byte-exact structured assembly while keeping the complete ordinary-C scene script as its semantic reconstruction."},"resource_383:020019a2":{"span_bytes":1218,"score":{"measured":"2026-08-31","candidate_bytes":1128,"reference_bytes":1218,"wrong_instructions":435,"differing_halfwords":583,"class":"structured-scene-retention"},"shape":{"calls":109,"loops":0,"memory_operations":4},"verified_against_reference":["complete retained body from 0x020019a2 through the next production owner boundary","all 109 decoded calls, 0 loop(s), and 4 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_383:02001f50":{"span_bytes":632,"score":{"measured":"2026-08-30","candidate_bytes":638,"reference_bytes":632,"wrong_instructions":70,"differing_halfwords":225,"class":"generated-call-script-retention"},"shape":{"calls":61,"loops":0,"branches":4,"memory_operations":15},"verified_against_reference":["all 61 calls and their arguments are represented in ROM order across the complete owner","direct assembly audit restored the signed scene-selector branch, selected-actor forwarding, three shared-object flag updates, and workspace states 513 and 521","the candidate is six bytes longer after complete decoded control flow and effects are represented; the residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_383:020021c8":{"span_bytes":894,"score":{"measured":"2026-08-30","candidate_bytes":920,"reference_bytes":894,"wrong_instructions":86,"differing_halfwords":355,"class":"generated-call-script-retention"},"shape":{"calls":91,"loops":0,"branches":4,"memory_operations":15},"verified_against_reference":["all 91 calls and their arguments are represented in ROM order across the complete owner","direct assembly audit restored three shared-object flag updates, workspace states 513 and 24, three nested conditionals, success tracking, and fallback routing","literal-backed actor setup and state-transition arguments omitted by the mechanical draft are represented; approved GCC allocation and scheduling leaves a 26-byte extent residual"],"retention":"keep_structured_asm"},"resource_38d:020019b0":{"span_bytes":2002,"score":{"measured":"2026-08-23","candidate_bytes":1632,"reference_bytes":2002,"wrong_instructions":429,"differing_halfwords":971,"class":"generated-call-script-retention"},"shape":{"calls":185,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 185 calls and their argument values, 0 loops, and 1 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_38e:0200050c":{"span_bytes":938,"score":{"measured":"2026-08-23","candidate_bytes":832,"reference_bytes":938,"wrong_instructions":184,"differing_halfwords":453,"class":"generated-call-script-retention"},"shape":{"calls":89,"loops":1,"memory_operations":4,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 89 calls and their argument values, 1 loops, and 4 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_38f:020008ec":{"span_bytes":7356,"score":{"measured":"2026-08-17","candidate_bytes":6440,"reference_bytes":7356,"wrong_instructions":923,"differing_halfwords":3490,"class":"wrong"},"shape":{"calls":731,"loops":2,"memory_ops":153},"expressed":["drafted by `overlay reconstruct`: calls, arguments, two loops, 52 memory operations"],"unexpressed":[{"op":"memory","count":101,"where":"not yet modelled by the drafter"},{"op":"control flow","count":null,"where":"the drafter writes no `if`"}],"verified_against_reference":[],"blocked_by":"not blocked -- first draft, never worked by hand","rejected":[],"note":"The most memory-dense of the three large owners measured, at 5.1% of instructions."},"resource_392:02000b8c":{"schema_version":1,"namespace":"resource_392","address":"0x02000b8c","status":"measured-draft","owner_bytes":32,"candidate_bytes":36,"differing_halfwords":18,"wrong_instructions":14,"classification":"dma3-single-transfer-descriptor-writer","notes":["Complete leaf owner: loads the shared buffer pointer Data_03001ed0, then writes one 12-byte DMA3 descriptor (source, destination, control) to 0x040000d4 and returns. No calls, branches, or loops.","The reference emits the descriptor with a single `stmia r3!, {r0, r1, r2}` (registers built directly, no stack) followed by a dead `subs r3, #12`. Every ordinary-C spelling of the same three field writes -- direct field assignment through a volatile struct macro, the identical assignment through a non-volatile struct macro, and the historically adopted raw `u32 *p; p[0..2] = ...` form -- compiles under the approved GCC 2.96 route to three separate `str` instructions instead, never the multi-register transfer. The tool's own scorer classifies every one of these candidates `unemittable`.","This is the same DMA3-descriptor-via-struct-macro idiom already established unemittable in this overlay at resource_392:02000bcc (see resource_392_c_02000bcc.json) and recorded across the wider thumb_multi_register_module family in games/gs1/semantic/overlay-assembly.json (not yet including this address's own span). No new compiler evidence needed to be produced; this owner reconfirms the existing conclusion for a smaller, single-transfer case.","games/gs1/semantic/regions.json records this exact 32-byte span as `parked by overlay park`: an earlier adopted C candidate (raw u32 pointer-array form, recovered from git history at assets/code/resource_392_c_02000b8c.c, commit d5e9214a5) stopped reproducing the span after an infrastructure change ('the pret routing cut') and was reverted to assembly. Re-scored against the current toolchain, that historical form is also non-exact (36/32 bytes, 18 differing halfwords, 16 wrong instructions) -- one instruction worse than the struct-macro candidate kept here -- so it was not simply an outdated but otherwise-valid answer; the compiler-shape wall is confirmed independently of that history.","Sibling comparison: resource_393:02000d5c, resource_394:02000f34, and resource_395:02001838 disassemble to the byte-identical 32-byte template (only the per-resource EWRAM destination pool word differs: 0x020090b0/0x020090e0/0x020092d0/0x02009de0), confirming the hinted family for those three. resource_396:02001224 does NOT share the template: it is 20 bytes of code plus a 3-word pool (still 32 bytes total) with a different field order (a fixed 0x05000000 source constant assigned first, the shared-buffer value assigned to the destination field, and a different control word 0x84000070 instead of 0x840000e0). That transfer was not forced onto this owner.","This candidate claims zero DONE bytes."],"rejected_experiments":[{"experiment":"direct DMA3.source/.destination/.control field assignment through a volatile struct DmaTransfer macro (kept as the final candidate)","result":"36/32 bytes, 18 differing halfwords, 14 wrong instructions, class=unemittable: three separate `str` instead of the reference's single `stmia` + dead `subs r3,#12`"},{"experiment":"same three field assignments through a non-volatile struct DmaTransfer macro","result":"byte-identical output to the volatile form; volatile does not change the codegen here"},{"experiment":"local `struct DmaTransfer t; t.source=...; t.destination=...; t.control=...; DMA3 = t;` (whole-struct assignment from a named local)","result":"44/32 bytes, 22 differing halfwords, 20 wrong instructions: GCC 2.96 builds the local on the stack (`sub sp,#12`) and copies via `ldmia`+`stmia`, worse than direct field assignment and still not the reference's register-only shape"},{"experiment":"static helper `struct DmaTransfer MakeDmaTransfer(src,dst,ctrl)` returning by value, called as `DMA3 = MakeDmaTransfer(...)`","result":"52/32 bytes, 26 differing halfwords, 23 wrong instructions: the approved compiler does not inline the call at this owner's size/route; the 12-byte struct return uses a real `bl` plus a hidden-pointer/stack return, not registers"},{"experiment":"compound-literal struct init: `DMA3 = (struct DmaTransfer){src, dst, ctrl};`","result":"rejected before scoring: emits a call to `memcpy`, an unsupported external symbol for this overlay route"},{"experiment":"historical raw-pointer form recovered from git history (assets/code/resource_392_c_02000b8c.c @ d5e9214a5): `u32 *data=&Data_03001ed0; u32 *p=(u32*)0x040000d4; u32 b=*data,src=...,c=...; p[0]=b; p[1]=src; p[2]=c;`","result":"36/32 bytes, 18 differing halfwords, 16 wrong instructions, class=unemittable: also three separate `str`, and two more wrong instructions than the struct-macro candidate because of register-role reshuffling from the extra locals"}]},"resource_392:02000bcc":{"span_bytes":64,"status":"measured-draft","family":{"replicated_en_bytes":256,"members":["resource_392:02000bcc","resource_393:02000d9c","resource_394:02000f74","resource_395:02001878"],"cross_resource_core_identical":true,"six_edition_core_bytes":44,"six_edition_core_identical":true},"score":{"candidate_bytes":64,"reference_bytes":64,"wrong_instructions":32,"differing_halfwords":16,"class":"unemittable"},"expressed":["load the shared battle-effect palette buffer","transfer its first palette block to 0x05000000","transfer its second palette block from offset 0x1c0 to 0x05000200","publish both transfers through DMA3 and finalize the palette update"],"blocked_by":"the reference uses two stmia transfers; approved GCC 2.96 emits six scalar stores for the same ordinary-C assignments","evidence":["relocation and reached-literal masking finds four byte-identical 64-byte English owners in resources 392 through 395","the complete canonical draft has exact owner extent","the family is already independently retained in semantic/overlay-assembly.json as thumb_multi_register_module because the approved compiler cannot emit the reference transfers","the explicit decoded-ROM cross-edition path proves every member's 44-byte relocation/literal-masked core identical in all six editions; no source mapping or additional exact-byte coverage is claimed"]},"resource_395:02000488":{"span_bytes":3022,"score":{"measured":"2026-08-23","candidate_bytes":2778,"reference_bytes":3046,"wrong_instructions":448,"differing_halfwords":1446,"class":"generated-call-script-retention"},"shape":{"calls":319,"loops":2,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 319 calls and their argument values, 2 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_396:0200069c":{"span_bytes":2190,"score":{"measured":"2026-08-23","candidate_bytes":1996,"reference_bytes":2190,"wrong_instructions":381,"differing_halfwords":1021,"class":"generated-call-script-retention"},"shape":{"calls":221,"loops":0,"memory_operations":14,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 221 calls and their argument values, 0 loops, and 14 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_399:02000384":{"span_bytes":396,"score":{"measured":"2026-08-31","candidate_bytes":396,"reference_bytes":396,"wrong_instructions":45,"differing_halfwords":144,"class":"structured-scene-retention"},"shape":{"calls":41,"loops":0,"memory_operations":3},"verified_against_reference":["complete audited production span","all 41 decoded calls, 0 loop(s), and 3 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_399:02000f84":{"span_bytes":1480,"score":{"measured":"2026-08-23","candidate_bytes":1376,"reference_bytes":1480,"wrong_instructions":257,"differing_halfwords":688,"class":"generated-call-script-retention"},"shape":{"calls":142,"loops":2,"memory_operations":16,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 142 calls and their argument values, 2 loops, and 16 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39b:02001730":{"span_bytes":572,"score":{"measured":"2026-08-30","candidate_bytes":572,"reference_bytes":572,"wrong_instructions":62,"differing_halfwords":194,"class":"generated-call-script-retention"},"shape":{"calls":53,"loops":1,"memory_operations":14},"verified_against_reference":["all 53 resolver-confirmed calls and their arguments are represented in ROM order across the complete callable owner","the bounded two-pass actor exchange and all fourteen decoded actor/effect memory operations are represented in ordinary C","the owner includes its sole interworking return and eight-word trailing pool before the next prologue at 0x0200196c","the candidate reproduces the complete 572-byte extent; remaining instruction differences are approved GCC carrier allocation and scheduling"],"retention":"keep_structured_asm"},"resource_39c:02001db4":{"span_bytes":636,"score":{"measured":"2026-08-31","candidate_bytes":108,"reference_bytes":636,"wrong_instructions":254,"differing_halfwords":316,"class":"structured-scene-retention"},"shape":{"calls":23,"loops":2,"memory_operations":0},"verified_against_reference":["complete retained body from 0x02001db4 through the next production owner boundary","all 23 decoded calls, 2 loop(s), and 0 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_39c:02004a08":{"span_bytes":608,"score":{"measured":"2026-08-30","candidate_bytes":608,"reference_bytes":608,"wrong_instructions":36,"differing_halfwords":273,"class":"generated-call-script-retention"},"shape":{"calls":66,"loops":1,"memory_operations":3},"verified_against_reference":["all 66 calls and their arguments are represented in ROM order across the complete callable owner","direct retained-assembly audit restores the signed actor-8 coordinate gate, both nested dialogue conditions, the repeated dialogue phase, and the signed actor-3 coordinate handoff","the generated draft's 64 calls from following owners were removed; this owner ends at the independently inventoried prologue at 0x02004c68","the candidate reproduces the full 608-byte extent; remaining instruction differences are approved-compiler carrier allocation, literal reuse, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_39d:02000b24":{"span_bytes":4044,"score":{"measured":"2026-08-31","candidate_bytes":4016,"reference_bytes":4044,"wrong_instructions":1203,"differing_halfwords":1954,"class":"structured-scene-retention"},"shape":{"calls":409,"scene":58,"loops":0},"verified_against_reference":["the complete scene-58 owner is bounded from 0x02000b24 through its interworking unwind and literal tail before 0x02001af0","all 409 bounded calls, conditionals, record-field writes, workspace updates, and pool constants are represented","the remaining extent delta is approved-compiler argument materialization, scheduling, and literal placement after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_39d:02000ddc":{"span_bytes":1034,"score":{"measured":"2026-08-23","candidate_bytes":990,"reference_bytes":1034,"wrong_instructions":164,"differing_halfwords":492,"class":"generated-call-script-retention"},"shape":{"calls":104,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 104 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39d:020011e8":{"span_bytes":1054,"score":{"measured":"2026-08-23","candidate_bytes":986,"reference_bytes":1054,"wrong_instructions":133,"differing_halfwords":493,"class":"generated-call-script-retention"},"shape":{"calls":115,"loops":0,"memory_operations":4,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 115 calls and their argument values, 0 loops, and 4 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39d:02001608":{"span_bytes":1234,"score":{"measured":"2026-08-23","candidate_bytes":1176,"reference_bytes":1234,"wrong_instructions":172,"differing_halfwords":586,"class":"generated-call-script-retention"},"shape":{"calls":120,"loops":0,"memory_operations":17,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 120 calls and their argument values, 0 loops, and 17 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39d:02001adc":{"span_bytes":3046,"score":{"measured":"2026-08-23","candidate_bytes":2878,"reference_bytes":3046,"wrong_instructions":348,"differing_halfwords":1436,"class":"generated-call-script-retention"},"shape":{"calls":319,"loops":0,"memory_operations":6,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 319 calls and their argument values, 0 loops, and 6 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39d:02001af0":{"span_bytes":4844,"score":{"measured":"2026-08-31","candidate_bytes":4852,"reference_bytes":4844,"wrong_instructions":1488,"differing_halfwords":2377,"class":"structured-scene-retention"},"shape":{"calls":500,"scene":59,"loops":0},"verified_against_reference":["the complete scene-59 owner is bounded from 0x02001af0 through its interworking unwind and trailing pool before 0x02002ddc","all 500 bounded calls, branch-selected paths, record-field updates, workspace counters, and pool constants are represented","the remaining eight-byte surplus is approved-compiler argument materialization, scheduling, and literal placement after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_39d:020026c4":{"span_bytes":914,"score":{"measured":"2026-08-23","candidate_bytes":790,"reference_bytes":914,"wrong_instructions":97,"differing_halfwords":437,"class":"generated-call-script-retention"},"shape":{"calls":91,"loops":0,"memory_operations":2,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 91 calls and their argument values, 0 loops, and 2 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39e:0200064c":{"span_bytes":1090,"score":{"measured":"2026-08-23","candidate_bytes":1000,"reference_bytes":1090,"wrong_instructions":153,"differing_halfwords":491,"class":"generated-call-script-retention"},"shape":{"calls":125,"loops":0,"memory_operations":4,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 125 calls and their argument values, 0 loops, and 4 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39e:02000e94":{"span_bytes":1100,"score":{"measured":"2026-08-31","candidate_bytes":872,"reference_bytes":1100,"wrong_instructions":285,"differing_halfwords":540,"class":"structured-scene-retention"},"shape":{"calls":85,"loops":1,"memory_operations":31},"verified_against_reference":["complete retained body from 0x02000e94 through the next production owner boundary","all 85 decoded calls, 1 loop(s), and 31 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"compiler_impossibility":{"kind":"intra_function_call_module","reference_evidence":"Direct bl sites at 0x02000f02, 0x02000f1a, 0x02000f3c and 0x02000f58 target intra-owner blocks 0x02001040, 0x02001058, 0x0200107a and 0x02001096 that are also reached by ordinary fallthrough with live owner state; see games/gs1/assets/code/resource_39e_overlay.s:2289-2330 and :2434-2470.","compiler_evidence":"The approved GCC 2.96 Thumb direct-call patterns in alchemy-gcc/agscc/gcc/config/arm/arm.md:5992-6034 accept SYMBOL_REF operands, not intra-function LABEL_REF blocks, and the backend has no outlining pass.","verdict":"Ordinary C cannot make the same live statement sequences both fallthrough code and callable local subroutines; retained assembly is required for the byte-exact 1100-byte module."},"retention":"keep_structured_asm"},"resource_39e:02001494":{"span_bytes":2236,"score":{"measured":"2026-08-31","candidate_bytes":2240,"reference_bytes":2236,"wrong_instructions":204,"differing_halfwords":1014,"class":"generated-call-script-retention"},"shape":{"calls":233,"loops":0,"story_gates":2,"inline_literal_pools":2},"verified_against_reference":["the complete owner is bounded from 0x02001494 through both inline pools and the trailing pool before 0x02001d50","all 233 resolver-confirmed calls are represented in machine order","both skip-beat gates, their carried join identifiers, workspace counter updates, and story flags 0x898, 0x899, and 0x89a are represented","the remaining four-byte extent surplus is approved-compiler scheduling, literal placement, and expression spelling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_39f:02002500":{"span_bytes":942,"score":{"measured":"2026-08-23","candidate_bytes":776,"reference_bytes":942,"wrong_instructions":211,"differing_halfwords":456,"class":"generated-call-script-retention"},"shape":{"calls":84,"loops":0,"memory_operations":8,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 84 calls and their argument values, 0 loops, and 8 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3a0:02000324":{"schema_version":1,"namespace":"resource_3a0","address":"0x02000324","status":"proven-retained","owner_bytes":52,"candidate_bytes":52,"differing_halfwords":3,"wrong_instructions":6,"classification":"select-actor-twenty-presentation-bit","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":40,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"safe_candidates":20000,"safe_compile_failures":0,"classic_candidates":10000,"classic_compile_failures":158,"best_differing_halfwords":3,"exact":false},"notes":["Complete actor-20 presentation-bit selector: scene phase chooses the actor resolver, then bit 1 is set or cleared through a shared store.","The readable candidate has exact extent and zero normalized structural rows. Its three-halfword residual is confined to equivalent r2/r3 result allocation in the two flag-update branches, resynchronizing at the unconditional branch and again at the epilogue.","Explicit --span analysis proves the 40-byte relocation-normalized core identical across all six editions.","A 20,000-candidate safe heat walk and 10,000-candidate classic heat walk plus the approved compiler-pass matrix found no exact emission; classic source shaping improved the readable baseline from five to three differing halfwords.","The owner satisfies the narrow compiler-allocation precedent: complete semantics, exact extent, no normalized structural difference, equivalent low-register allocation only, full bounded search, immediate resynchronization, and an all-six identical core."]},"resource_3a0:02000408":{"schema_version":1,"namespace":"resource_3a0","address":"0x02000408","status":"measured-draft","owner_bytes":248,"executable_owner_bytes":220,"candidate_bytes":248,"differing_halfwords":54,"wrong_instructions":82,"classification":"select-facing-by-distance","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":220,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"generated_candidates":10000,"compile_failures":176,"best_differing_halfwords":54,"exact":false},"notes":["Complete actor tracking-mode selector: handles the existing tracking state, compares actor/target distance, derives a facing sector from their coordinate delta, accepts the current or either adjacent sector, and updates tracking state and mode through the appropriate presentation calls.","The unusual reached word 0xfa7ef001 is intentional owner data used in the third sector adjustment; it happens to decode as a Thumb BL pair but is loaded as a value by this owner.","Correct veneer identities, typed actor offsets, all result arms and the reached adjustment word produce an exact-extent 248-byte candidate. Explicit --span analysis proves the 220-byte relocation-normalized executable core identical at 0x02000408 in all six editions.","A capped 10,000-candidate heat-guided classic search found no byte-score improvement. The remaining 54 differing halfwords and 82 wrong instructions include a long-lived actor/force r5-r6 inversion and reordered sector arithmetic, so the residual is broad and claims zero DONE bytes.","If this owner is later adopted, its public source must use a human actor-facing/distance gameplay path rather than the resource identifier; this address-qualified path is reconstruction evidence only."]},"resource_3a0:02000f30":{"span_bytes":304,"score":{"measured":"2026-08-30","candidate_bytes":316,"reference_bytes":304,"wrong_instructions":30,"differing_halfwords":94,"class":"generated-call-script-retention"},"shape":{"calls":21,"loops":0,"memory_operations":4},"verified_against_reference":["all 21 calls and arguments remain in ROM order","three linked object spawns, the actor-19 presentation write, and guarded story-state increment are explicit","the return, alignment, and eight-word pool through 0x0200105f are included","direct assembly audit found no unexpressed operation; residual is GCC carrier allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3a2:02000924":{"span_bytes":1704,"score":{"measured":"2026-08-23","candidate_bytes":1640,"reference_bytes":1704,"wrong_instructions":147,"differing_halfwords":760,"class":"generated-call-script-retention"},"shape":{"calls":187,"loops":0,"memory_operations":11,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 187 calls and their argument values, 0 loops, and 11 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3a4:02001838":{"span_bytes":1208,"score":{"measured":"2026-08-30","candidate_bytes":1176,"reference_bytes":1208,"wrong_instructions":256,"differing_halfwords":581,"class":"generated-call-script-retention"},"shape":{"calls":107,"loops":0,"memory_operations":25},"verified_against_reference":["all 107 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly audit restored three object-state halfwords, literal-backed phase arguments, the terminal actor lookup, coordinate forwarding, and closing presentation arguments","the reference has a 32-byte larger compiler layout after all decoded effects are represented; approved GCC allocation and literal scheduling does not emit it exactly"],"retention":"keep_structured_asm"},"resource_3a4:02001d14":{"span_bytes":754,"score":{"measured":"2026-08-30","candidate_bytes":748,"reference_bytes":754,"wrong_instructions":144,"differing_halfwords":364,"class":"generated-call-script-retention"},"shape":{"calls":68,"loops":1,"branches":2,"memory_operations":21},"verified_against_reference":["all 68 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly audit restored repeated object-state fields, presentation bytes, three literal-backed transforms, bounded completion polling, terminal actor lookup, and coordinate forwarding","candidate and reference differ by six bytes after complete decoded control flow and effects are represented; approved GCC allocation and literal scheduling does not emit it exactly"],"retention":"keep_structured_asm"},"resource_3a5:020004e4":{"span_bytes":912,"score":{"measured":"2026-08-30","candidate_bytes":896,"reference_bytes":912,"wrong_instructions":144,"differing_halfwords":451,"class":"generated-actor-layout-retention"},"shape":{"calls":46,"loops":1,"branches":4,"memory_operations":1},"verified_against_reference":["complete function reconstruction accounts for the three mutually exclusive scene-state layouts, all 46 calls, the shared eight-actor initialization loop, and the state-gated terminal transition","direct assembly audit restored the 89/90/91 dispatch, state 92 terminal guard, setup literal, and loop actor index flattened or omitted by the mechanical draft","candidate is sixteen bytes shorter after complete decoded control flow and arguments are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3a5:0200088c":{"span_bytes":910,"score":{"measured":"2026-08-30","candidate_bytes":912,"reference_bytes":910,"wrong_instructions":171,"differing_halfwords":420,"class":"generated-actor-layout-retention"},"shape":{"calls":49,"loops":1,"branches":5,"memory_operations":1},"verified_against_reference":["complete function reconstruction accounts for the three mutually exclusive scene-state layouts, all calls, the conditional layout helper, shared eight-actor initialization loop, and state-gated terminal transition","direct assembly audit restored the 89/90/91 dispatch, state 92 terminal guard, setup and predicate literals, branch-one terminal actor, and loop actor index flattened or omitted by the mechanical draft","candidate is two bytes longer after complete decoded control flow and arguments are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3a6:020010de":{"span_bytes":666,"score":{"measured":"2026-08-31","candidate_bytes":492,"reference_bytes":666,"wrong_instructions":258,"differing_halfwords":321,"class":"structured-scene-retention"},"shape":{"calls":54,"loops":0,"memory_operations":16},"verified_against_reference":["complete retained body from 0x020010de through the next production owner boundary","all 54 decoded calls, 0 loop(s), and 16 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3a8:02000aac":{"span_bytes":2672,"score":{"measured":"2026-08-30","candidate_bytes":4052,"reference_bytes":4092,"wrong_instructions":620,"differing_halfwords":1856,"class":"generated-call-script-retention"},"shape":{"calls":402,"loops":4,"memory_operations":22},"verified_against_reference":["candidate and ROM contain the same 402 calls in machine order and all argument values are represented","all 22 explicit memory operations are represented, including workspace state 364, object state 90 and 100, and result fields at offset 6","direct assembly audit restored the two state-dependent branch arms and all four object-state wait loops omitted by the mechanical draft","approved GCC allocation and literal-pool scheduling emits 4052 bytes for the complete 4092-byte semantic source without an exact ordinary-C emission"],"retention":"keep_structured_asm","note":"The complete 4092-byte owner is reconstructed here; this record covers its 2672-byte assembly-retained band at 0x02000aac\u20130x0200151c. Approved GCC cannot preserve the owner's long-range allocation and literal-pool schedule."},"resource_3a8:020026c0":{"span_bytes":2710,"score":{"measured":"2026-08-30","candidate_bytes":2688,"reference_bytes":2756,"wrong_instructions":396,"differing_halfwords":1283,"class":"generated-call-script-retention"},"shape":{"calls":248,"loops":0,"memory_operations":13},"verified_against_reference":["candidate and ROM contain the same 248 calls in machine order and all argument values are represented","direct assembly audit restored three returned-object field forwards and four fixed-point object-field initializers","the state-dependent branch now preserves its exclusive arms, workspace counter increment, and final words at offsets 448 and 456","approved GCC allocation and literal-pool scheduling changes the complete owner extent without an exact ordinary-C emission"],"retention":"keep_structured_asm","note":"The complete 2756-byte owner is reconstructed here; this record covers its 2710-byte assembly-retained band at 0x020026c0\u20130x02003156."},"resource_3a8:02003766":{"span_bytes":422,"score":{"measured":"2026-08-31","candidate_bytes":222,"reference_bytes":422,"wrong_instructions":195,"differing_halfwords":208,"class":"structured-scene-retention"},"shape":{"calls":24,"loops":0,"memory_operations":23},"verified_against_reference":["complete audited production span","all 24 decoded calls, 0 loop(s), and 23 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3aa:02001450":{"schema_version":1,"namespace":"resource_3aa","address":"0x02001450","name":"RunEventScript04","status":"measured-draft","owner_bytes":68,"candidate_bytes":64,"differing_halfwords":30,"wrong_instructions":26,"classification":"scene-channel-configure-and-handoff-sibling","notes":["Discovered via compiler twins (--min 16 --max-diff 8): a relocation-masked 7-core-byte match against the exact sibling resource_3aa:0200140c (ConfigureFourSceneChannelsAndHandoff, games/gs1/src/overlays/scene_channel/configure_four_scene_channels_and_handoff.c). Every callee in this owner is that sibling's callee shifted by a uniform +0x44 (Func_02002ec4->02002f08, 02002f4e->02002f92, 02002f5a->02002f9e, 02002f66->02002faa, 02002f72->02002fb6), confirming this is a parallel scene block one region over.","Unlike the template (which configures four channels with four DIFFERENT values 0x6000/0xe000/0x2000/0xa000), this owner configures all four channels to the SAME value 0xc000. The reference reloads the 0xc000 immediate fresh at each of the four call sites (movs r1,#192; lsls r1,r1,#8 repeated); the candidate's compiler CSEs the four identical-valued loads into one shared register, costing 4 bytes and reshaping every following instruction's register numbering.","Recovered only from the retained owner bytes in the approved local ROM, the byte-exact sibling source, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes."],"rejected_experiments":[{"experiment":"shared s32 value=0xc000 hoisted before all four calls","result":"64/68 bytes, 30 differing halfwords: GCC CSEs the four identical immediate loads into one shared register regardless"},{"experiment":"template's static-inline per-call wrapper structure with the shared constant","result":"byte-identical to the plain form; the wrapper boundary does not affect CSE, which happens after inlining"},{"experiment":"-fno-gcse and -fno-cse-follow-jumps (diagnostic only)","result":"no change; the merge is a basic CSE decision, not a GCSE/jump-following one"},{"experiment":"volatile s32 value reloaded before each call","result":"78 bytes: forces a stack slot and frame growth, moving further from the reference"},{"experiment":"four textually distinct but numerically equal spellings (0xc000, 49152, 0x180<<7, 0x60*512)","result":"byte-identical to the plain repeated-literal form; all fold to the same immediate before CSE runs, as expected"}]},"resource_3ab:0200049a":{"span_bytes":546,"score":{"measured":"2026-08-31","candidate_bytes":444,"reference_bytes":546,"wrong_instructions":154,"differing_halfwords":268,"class":"structured-scene-retention"},"shape":{"calls":35,"loops":0,"memory_operations":3},"verified_against_reference":["complete audited production span","all 35 decoded calls, 0 loop(s), and 3 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3ab:0200131c":{"span_bytes":672,"score":{"measured":"2026-08-30","candidate_bytes":668,"reference_bytes":672,"wrong_instructions":69,"differing_halfwords":308,"class":"generated-call-script-retention"},"shape":{"calls":70,"loops":2,"memory_operations":15},"verified_against_reference":["all 70 resolver-confirmed calls and their arguments are represented in ROM order across the complete callable owner","direct assembly audit corrected both generated counter loops into completion waits over the signed work word at effect offset 12","all fifteen decoded actor/effect memory operations, including actor flags, fixed-point fields, and completion probes, are represented in ordinary C","the candidate is four bytes shorter after complete decoded semantics are represented; remaining differences are approved GCC carrier allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3ad:02000808":{"span_bytes":1978,"score":{"measured":"2026-08-23","candidate_bytes":1864,"reference_bytes":1978,"wrong_instructions":243,"differing_halfwords":909,"class":"generated-call-script-retention"},"shape":{"calls":222,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 222 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3af:02001db0":{"span_bytes":1234,"score":{"measured":"2026-08-23","candidate_bytes":1128,"reference_bytes":1234,"wrong_instructions":172,"differing_halfwords":571,"class":"generated-call-script-retention"},"shape":{"calls":137,"loops":1,"memory_operations":9,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 137 calls and their argument values, 1 loops, and 9 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3af:020022c0":{"span_bytes":856,"score":{"measured":"2026-08-31","candidate_bytes":800,"reference_bytes":856,"wrong_instructions":167,"differing_halfwords":399,"class":"structured-scene-retention"},"shape":{"calls":80,"loops":1,"memory_operations":23},"verified_against_reference":["complete callable owner at 0x020022c0, including its interworking return and literal tail","all 80 decoded calls, 1 loop(s), and 23 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3af:02002618":{"span_bytes":956,"score":{"measured":"2026-08-30","candidate_bytes":934,"reference_bytes":956,"wrong_instructions":204,"differing_halfwords":442,"class":"generated-call-script-retention"},"shape":{"calls":86,"loops":0,"memory_operations":19},"verified_against_reference":["all 86 calls and their arguments are represented in ROM order","direct assembly audit restored three returned-object field pairs, workspace state 448, and three terminal scene-data writes","approved GCC allocation and literal scheduling does not emit the complete owner exactly"],"retention":"keep_structured_asm"},"resource_3af:02002c84":{"span_bytes":1228,"score":{"measured":"2026-08-31","candidate_bytes":1236,"reference_bytes":1228,"wrong_instructions":550,"differing_halfwords":503,"class":"structured-scene-retention"},"shape":{"roster_slots":4,"candidate_members":9,"jump_table_entries":21,"member_loop_iterations":4},"verified_against_reference":["the complete party-roster scene is bounded from 0x02002c84 through its 21-entry jump table, four-member loop, unwind, and seventeen-word tail before 0x02003150","all roster discovery phases, member-category mapping, generic and member-specific dialogue arms, actor staging, reward call, and terminal story-flag clear are represented","the remaining eight-byte surplus is approved-compiler switch lowering, scheduling, carrier allocation, and literal placement after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b0:02000564":{"span_bytes":588,"score":{"measured":"2026-08-31","candidate_bytes":580,"reference_bytes":588,"wrong_instructions":74,"differing_halfwords":238,"class":"generated-call-script-retention"},"shape":{"calls":52,"loops":0,"memory_operations":16},"verified_against_reference":["all 52 calls and their arguments are represented in ROM order across the complete callable owner","direct audit restored the carried scene handle, both workspace state transitions, the two-word placement publication, and the two-word actor coordinate publication omitted by the generated draft","the actor 9/10/11/12 staging, camera motion, and terminal scene close preserve machine order","the remaining eight-byte extent residual is approved-compiler high-register carrier allocation, postincrement spelling, literal reuse, immediate materialization, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b0:02000e78":{"span_bytes":552,"score":{"measured":"2026-08-31","candidate_bytes":548,"reference_bytes":552,"wrong_instructions":93,"differing_halfwords":221,"class":"generated-call-script-retention"},"shape":{"calls":56,"loops":0,"memory_operations":6},"verified_against_reference":["all 56 static calls and their arguments are represented in ROM order across the complete callable owner","direct audit restored the carried ensemble handle, scene-workspace state values 515 and 514 at offset 448, and both closing halfword map-state writes omitted by the generated draft","direct audit restored the final selector branch choosing actor 15 only for selector value 11 and actor 14 otherwise","the remaining four-byte extent residual is approved-compiler high-register carrier allocation, shared literal reuse, immediate materialization, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b1:02001b34":{"span_bytes":1032,"score":{"measured":"2026-08-30","candidate_bytes":1028,"reference_bytes":1032,"wrong_instructions":137,"differing_halfwords":401,"class":"generated-call-script-retention"},"shape":{"calls":107,"loops":0,"memory_operations":4},"verified_against_reference":["all 107 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit covers the guarded entry, three-actor presentation phases, two actor lookups, and both byte-flag updates","the owner ends at the next independently inventoried prologue at 0x02001f3c","the four-byte extent and remaining instruction residual are approved-compiler carrier allocation and immediate-materialization scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b1:02001f3c":{"span_bytes":2204,"score":{"measured":"2026-08-30","candidate_bytes":2192,"reference_bytes":2204,"wrong_instructions":225,"differing_halfwords":903,"class":"generated-call-script-retention"},"shape":{"calls":229,"loops":0,"memory_operations":0},"verified_against_reference":["all 229 resolver-confirmed calls and their arguments are represented in ROM order across the complete callable owner","the owner is a linear actor presentation script with no decoded semantic memory operations or conditional code paths; its only branch skips the owner-local literal island","the boundary includes the sole interworking return, the branch-skipped thirteen-word interior pool, and seventeen-word trailing pool before 0x020027d8","the candidate is 12 bytes shorter after the complete decoded call script is represented; remaining differences are approved GCC carrier allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3b1:020027d8":{"span_bytes":2072,"score":{"measured":"2026-08-31","candidate_bytes":2028,"reference_bytes":2072,"wrong_instructions":237,"differing_halfwords":998,"class":"generated-call-script-retention"},"shape":{"calls":203,"loops":0,"memory_operations":30},"verified_against_reference":["all 203 resolver-confirmed calls and their arguments are represented in ROM order across the complete callable owner","direct ROM disassembly restored all three mutually exclusive scene-counter updates at workspace offset 472","direct ROM disassembly restored six nullable actor-coordinate transfers: three word-coordinate copies and three signed-halfword copies","the boundary includes the sole interworking return, alignment, and fifteen-word trailing pool before 0x02002ff0","restoring the omitted structure reduced the extent gap from 188 bytes to 44; remaining differences are approved GCC carrier allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3b1:020038ac":{"span_bytes":1124,"score":{"measured":"2026-08-30","candidate_bytes":1120,"reference_bytes":1124,"wrong_instructions":90,"differing_halfwords":444,"class":"generated-call-script-retention"},"shape":{"calls":112,"loops":0,"memory_operations":7},"verified_against_reference":["all 112 calls and their arguments are represented in ROM order across the complete callable owner","direct retained-assembly audit restores the workspace presentation field, three null-gated actor-coordinate transfers, and the terminal 0x926 event literal","the branch-skipped pool and trailing literal are contained within the independently audited 0x020038ac-0x02003d10 owner boundary","the remaining four-byte extent residual and instruction differences are approved-compiler carrier allocation, literal reuse, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b1:02004254":{"span_bytes":892,"score":{"measured":"2026-08-30","candidate_bytes":884,"reference_bytes":892,"wrong_instructions":78,"differing_halfwords":314,"class":"generated-call-script-retention"},"shape":{"calls":83,"loops":0,"memory_operations":2},"verified_against_reference":["all 83 calls and their arguments are represented in ROM order across the complete callable owner","direct retained-assembly audit preserves the incoming scene actor, returned actor handle, optional record coordinate transfer, 0x300 gate, and nested 0x92b/0x92a/0x929 presentation branches","seven calls incorrectly pulled from the following owner by the generated draft were removed; this owner ends at the independently inventoried function at 0x020045d0","the remaining eight-byte extent residual and instruction differences are approved-compiler carrier allocation, literal reuse, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b1:020052f4":{"span_bytes":912,"score":{"measured":"2026-08-30","candidate_bytes":920,"reference_bytes":912,"wrong_instructions":140,"differing_halfwords":306,"class":"generated-call-script-retention"},"shape":{"calls":80,"loops":0,"memory_operations":5},"verified_against_reference":["all 80 calls and their arguments are represented in ROM order across the complete callable owner","direct audit against the retained assembly restored the conditional workspace counter increment, terminal workspace-state value 521, and literal-backed final event identifier 0x927 omitted by the generated draft","the owner ends at the independently inventoried owner at 0x02005684","the remaining eight-byte extent residual is approved-compiler carrier allocation, literal reuse, and immediate-materialization scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b1:020057ec":{"span_bytes":1116,"score":{"measured":"2026-08-30","candidate_bytes":1100,"reference_bytes":1116,"wrong_instructions":175,"differing_halfwords":537,"class":"generated-call-script-retention"},"shape":{"calls":112,"loops":0,"memory_operations":1},"verified_against_reference":["all 112 calls and their arguments are represented in ROM order across the complete callable owner","direct retained-assembly audit restored the three returned actor handles and all twelve downstream uses, two omitted call arguments, and the terminal presentation-state clear","four calls incorrectly pulled from the following owner by the generated draft were removed; the owner ends at the independently inventoried function at 0x02005c48","the remaining sixteen-byte extent residual is approved-compiler carrier allocation, literal reuse, and immediate-materialization scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b1:02005d10":{"span_bytes":1024,"score":{"measured":"2026-08-30","candidate_bytes":1008,"reference_bytes":1024,"wrong_instructions":222,"differing_halfwords":487,"class":"generated-call-script-retention"},"shape":{"calls":87,"loops":0,"memory_operations":6},"verified_against_reference":["all 87 calls and their arguments are represented in ROM order across the complete callable owner","direct retained-assembly audit restored four returned actor handles and every downstream use, both progress-state decisions, and both conditional workspace-counter updates","the generated draft's 63 calls from the following owner were removed; this owner ends at the independently inventoried function at 0x02006110","the remaining sixteen-byte extent residual and instruction differences are approved-compiler carrier allocation, literal reuse, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b5:02000726":{"span_bytes":558,"score":{"measured":"2026-08-31","candidate_bytes":500,"reference_bytes":558,"wrong_instructions":197,"differing_halfwords":273,"class":"structured-scene-retention"},"shape":{"calls":42,"loops":0,"memory_operations":5},"verified_against_reference":["complete audited production span","all 42 decoded calls, 0 loop(s), and 5 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3b7:020001d8":{"span_bytes":2968,"score":{"measured":"2026-08-31","candidate_bytes":2052,"reference_bytes":2968,"wrong_instructions":676,"differing_halfwords":1436,"class":"structured-scene-retention"},"shape":{"calls":243,"loops":5,"memory_operations":9},"verified_against_reference":["complete owner boundary was audited from 0x020001d8 through the next production owner","the reconstruction preserves all 243 decoded calls, 5 loop(s), and 9 explicit memory operation(s) in machine order","the remaining byte differences are approved-compiler scheduling, allocation, literal placement, and lowered-control-flow differences"],"compiler_impossibility":{"kind":"intra_function_call_module","reference_evidence":"The direct bl at 0x020003c0 targets 0x02000cba, while 0x02000cba is also reached by ordinary fallthrough from the instruction at 0x02000cb8 with live owner state; see games/gs1/assets/code/resource_3b7_overlay.s:619 and :1573.","compiler_evidence":"The approved GCC 2.96 Thumb direct-call patterns in alchemy-gcc/agscc/gcc/config/arm/arm.md:5992-6034 accept SYMBOL_REF operands, not intra-function LABEL_REF blocks, and the backend has no outlining pass.","verdict":"Ordinary C cannot make the same live statement sequence both fallthrough code and a callable local subroutine; retained assembly is required for the byte-exact 2968-byte module."},"retention":"keep_structured_asm"},"resource_3b7:02000e5c":{"span_bytes":2124,"score":{"measured":"2026-08-31","candidate_bytes":508,"reference_bytes":2124,"wrong_instructions":911,"differing_halfwords":1062,"class":"structured-scene-retention"},"shape":{"calls":88,"loops":2,"memory_operations":1},"verified_against_reference":["complete owner boundary was audited from 0x02000e5c through the next production owner","the reconstruction preserves all 88 decoded calls, 2 loop(s), and 1 explicit memory operation(s) in machine order","the remaining byte differences are approved-compiler scheduling, allocation, literal placement, and lowered-control-flow differences"],"retention":"keep_structured_asm"},"resource_3b8:02000108":{"span_bytes":576,"score":{"measured":"2026-08-31","candidate_bytes":412,"reference_bytes":576,"wrong_instructions":141,"differing_halfwords":279,"class":"structured-scene-retention"},"shape":{"calls":59,"loops":0,"memory_operations":1},"verified_against_reference":["complete audited executable span","all 59 decoded calls, 0 loop(s), and 1 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3b8:020003b0":{"span_bytes":372,"score":{"measured":"2026-08-31","candidate_bytes":272,"reference_bytes":372,"wrong_instructions":72,"differing_halfwords":170,"class":"structured-scene-retention"},"shape":{"calls":42,"loops":0,"memory_operations":4},"verified_against_reference":["complete audited executable span","all 42 decoded calls, 0 loop(s), and 4 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3b8:020006dc":{"span_bytes":1022,"score":{"measured":"2026-08-23","candidate_bytes":906,"reference_bytes":1022,"wrong_instructions":102,"differing_halfwords":479,"class":"generated-call-script-retention"},"shape":{"calls":113,"loops":0,"memory_operations":4,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 113 calls and their argument values, 0 loops, and 4 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3b9:02000708":{"span_bytes":942,"score":{"measured":"2026-08-23","candidate_bytes":876,"reference_bytes":942,"wrong_instructions":119,"differing_halfwords":426,"class":"generated-call-script-retention"},"shape":{"calls":101,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 101 calls and their argument values, 0 loops, and 1 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3b9:02000dcc":{"span_bytes":992,"score":{"measured":"2026-08-30","candidate_bytes":980,"reference_bytes":992,"wrong_instructions":124,"differing_halfwords":469,"class":"generated-call-script-retention"},"shape":{"calls":101,"loops":0,"memory_operations":13},"verified_against_reference":["all 101 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit covers the progress guard, actor formation and motion phases, both actor-byte flag updates, and the complete nine-field presentation-record reset","the owner ends at the independently inventoried leaf at 0x020011ac","the remaining twelve-byte extent residual is approved-compiler carrier allocation, literal reuse, and immediate-materialization scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b9:02001298":{"span_bytes":852,"score":{"measured":"2026-08-30","candidate_bytes":880,"reference_bytes":852,"wrong_instructions":119,"differing_halfwords":407,"class":"generated-call-script-retention"},"shape":{"calls":92,"loops":0,"memory_operations":12},"verified_against_reference":["all 92 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit restored every literal-backed call, actor-state write, and all three workspace-state phases","approved GCC allocates repeated constants and the long-lived workspace base differently after all decoded effects are represented"],"retention":"keep_structured_asm"},"resource_3b9:02001cd4":{"span_bytes":1778,"score":{"measured":"2026-08-30","candidate_bytes":1784,"reference_bytes":1778,"wrong_instructions":270,"differing_halfwords":774,"class":"generated-call-script-retention"},"shape":{"calls":180,"loops":0,"memory_operations":8},"verified_against_reference":["all 180 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly audit restored the event-result branch, both scene-progress increments, four workspace writes, and all literal-backed call arguments","the six-byte compiler-layout difference remains after all decoded effects are represented; approved GCC allocation and literal scheduling does not emit the reference ordering"],"retention":"keep_structured_asm"},"resource_3ba:02001214":{"span_bytes":464,"score":{"measured":"2026-08-31","candidate_bytes":492,"reference_bytes":464,"wrong_instructions":86,"differing_halfwords":238,"class":"generated-call-script-retention"},"shape":{"calls":46,"loops":0,"memory_operations":1},"verified_against_reference":["all 46 calls and their arguments are represented in ROM order across the complete callable owner","direct audit restored the signed phase-two fast path, full-presentation path, short-revisit path, and common coordinator tail omitted by the generated draft","the scene argument and selected path are forwarded at every call site that consumes them","the remaining twenty-eight-byte extent residual is approved-compiler carrier allocation, literal reuse, immediate materialization, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3ba:020016ec":{"span_bytes":428,"score":{"measured":"2026-08-31","candidate_bytes":448,"reference_bytes":428,"wrong_instructions":82,"differing_halfwords":215,"class":"generated-call-script-retention"},"shape":{"calls":42,"loops":0,"memory_operations":1},"verified_against_reference":["all 42 calls and their arguments are represented in ROM order across the complete callable owner","direct audit restored the signed phase-two fast path, full scene-four path, short-revisit path, and common coordinator tail omitted by the generated draft","the scene argument and selected path are forwarded at every call site that consumes them","the remaining twenty-byte extent residual is approved-compiler high-register carrier allocation, literal reuse, immediate materialization, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3ba:020021b8":{"span_bytes":1264,"score":{"measured":"2026-08-31","candidate_bytes":1300,"reference_bytes":1264,"wrong_instructions":798,"differing_halfwords":626,"class":"structured-topology-retention"},"shape":{"calls":10,"loops":4,"memory_operations":"command queue, three signed interpolation channels, four output modes, two deferred-MMIO queue appends"},"verified_against_reference":["the complete callable owner is bounded from 0x020021b8 through the alignment and ten-word trailing pool before 0x020026a8","the command-drain loop represents the -1, 0x1000, 0x2000, 0x3000, 0x4000, and 0x7fff arms with their state-cell effects","all three signed fixed-point interpolation channels and their duration completion writes are represented","all four output modes and both interrupt-masked deferred-MMIO queue appends are represented in machine order","all ten resolver-confirmed calls are preserved; the remaining score delta is GCC 2.96 topology, carrier allocation, literal placement, and expression spelling"],"retention":"keep_structured_asm"},"resource_3ba:02002844":{"span_bytes":872,"score":{"measured":"2026-08-31","candidate_bytes":462,"reference_bytes":872,"wrong_instructions":320,"differing_halfwords":430,"class":"structured-scene-retention"},"shape":{"calls":43,"loops":1,"memory_operations":37},"verified_against_reference":["complete retained body from 0x02002844 through the next production owner boundary","all 43 decoded calls, 1 loop(s), and 37 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3bb:02000a1c":{"span_bytes":276,"score":{"measured":"2026-08-31","candidate_bytes":240,"reference_bytes":276,"wrong_instructions":71,"differing_halfwords":130,"class":"structured-scene-retention"},"shape":{"calls":26,"loops":1,"memory_operations":0},"verified_against_reference":["complete audited executable span","all 26 decoded calls, 1 loop(s), and 0 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3bb:020010dc":{"span_bytes":508,"score":{"measured":"2026-08-30","candidate_bytes":526,"reference_bytes":508,"wrong_instructions":128,"differing_halfwords":242,"class":"generated-call-script-retention"},"shape":{"calls":47,"loops":0,"memory_operations":9},"verified_against_reference":["all 47 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit restored input-actor handling, coordinate-relative placement, three actor-coordinate lookups, and all closing position updates","approved GCC allocates the long-lived actor coordinates differently after all decoded effects are represented"],"retention":"keep_structured_asm"},"resource_3bb:020012f0":{"span_bytes":296,"score":{"measured":"2026-08-30","candidate_bytes":304,"reference_bytes":296,"wrong_instructions":21,"differing_halfwords":94,"class":"generated-call-script-retention"},"shape":{"calls":29,"loops":0,"memory_operations":1},"verified_against_reference":["all 29 calls and their arguments are represented in ROM order across the complete callable owner","direct audit restored the scene-progress early return, actor operation result branches, literal-backed presentation calls, and common cleanup dispatch","the residual is compiler allocation and literal scheduling after the complete control-flow shape is restored"],"retention":"keep_structured_asm"},"resource_3bb:020016d4":{"span_bytes":452,"score":{"measured":"2026-08-31","candidate_bytes":468,"reference_bytes":452,"wrong_instructions":106,"differing_halfwords":230,"class":"generated-call-script-retention"},"shape":{"calls":40,"loops":0,"memory_operations":4},"verified_against_reference":["all 40 calls and their arguments are represented in ROM order across the complete callable owner","direct audit restored the signed phase-two fast path, full presentation path, short-revisit path, and common coordinator tail omitted by the generated draft","direct audit restored the actor-state transfer carrying X, lifted Y, and Z coordinates into the scene helper","the remaining sixteen-byte extent residual is approved-compiler high-register carrier allocation, literal reuse, immediate materialization, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3bb:02002450":{"span_bytes":1264,"score":{"measured":"2026-08-31","candidate_bytes":1300,"reference_bytes":1264,"wrong_instructions":798,"differing_halfwords":626,"class":"structured-topology-retention"},"shape":{"calls":10,"loops":4,"memory_operations":"command queue, three signed interpolation channels, four output modes, two deferred-MMIO queue appends"},"verified_against_reference":["the complete callable owner is bounded from 0x02002450 through the alignment and ten-word trailing pool before 0x02002940","the command-drain loop represents the -1, 0x1000, 0x2000, 0x3000, 0x4000, and 0x7fff arms with their state-cell effects","all three signed fixed-point interpolation channels and their duration completion writes are represented","all four output modes and both interrupt-masked deferred-MMIO queue appends are represented in machine order","all ten resolver-confirmed calls are preserved; the remaining score delta is GCC 2.96 topology, carrier allocation, literal placement, and expression spelling"],"retention":"keep_structured_asm"},"resource_3bc:02000ba2":{"span_bytes":462,"score":{"measured":"2026-08-31","candidate_bytes":304,"reference_bytes":462,"wrong_instructions":188,"differing_halfwords":227,"class":"structured-scene-retention"},"shape":{"calls":40,"loops":1,"memory_operations":0},"verified_against_reference":["complete audited production span","all 40 decoded calls, 1 loop(s), and 0 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3bc:02001a0c":{"span_bytes":532,"score":{"measured":"2026-08-30","candidate_bytes":526,"reference_bytes":532,"wrong_instructions":62,"differing_halfwords":236,"class":"generated-call-script-retention"},"shape":{"calls":47,"loops":0,"memory_operations":11},"verified_against_reference":["candidate and ROM contain the same 47 calls in machine order with every argument represented","direct assembly audit restored source-relative placement for four actors, three conditional signed-coordinate handoffs, and all final scene coordinates","candidate is six bytes shorter after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3bc:02001c20":{"span_bytes":472,"score":{"measured":"2026-08-30","candidate_bytes":484,"reference_bytes":472,"wrong_instructions":82,"differing_halfwords":163,"class":"generated-call-script-retention"},"shape":{"calls":44,"loops":0,"memory_operations":32},"verified_against_reference":["complete reconstruction accounts for the global mode gate, three state routes, all 44 calls, and four actor field groups","direct assembly audit restored scene/state arguments and coordinate fields omitted by the mechanical draft","candidate is twelve bytes longer after complete decoded control flow and side effects are represented; residual is approved GCC allocation and scheduling"],"retention":"keep_structured_asm"},"resource_3bc:02001df8":{"span_bytes":408,"score":{"measured":"2026-08-30","candidate_bytes":404,"reference_bytes":408,"wrong_instructions":88,"differing_halfwords":179,"class":"generated-call-script-retention"},"shape":{"calls":40,"loops":0,"memory_operations":1},"verified_against_reference":["complete reconstruction accounts for the global mode gate, three state routes, all 40 calls, and every scene argument","candidate is four bytes shorter after complete decoded control flow is represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3bc:02001f90":{"span_bytes":352,"score":{"measured":"2026-08-30","candidate_bytes":352,"reference_bytes":352,"wrong_instructions":90,"differing_halfwords":170,"class":"generated-call-script-retention"},"shape":{"calls":30,"loops":1,"memory_operations":5},"verified_against_reference":["complete reconstruction accounts for the global mode gate, all three state routes, bounded event-polling loop, 30 calls, and terminal event-counter reset","candidate and reference have identical extents; residual is approved GCC allocation and scheduling after complete control flow is represented"],"retention":"keep_structured_asm"},"resource_3bc:02002ee8":{"span_bytes":1264,"score":{"measured":"2026-08-31","candidate_bytes":1300,"reference_bytes":1264,"wrong_instructions":832,"differing_halfwords":626,"class":"structured-topology-retention"},"shape":{"calls":10,"loops":4,"memory_operations":"command queue, three signed interpolation channels, four output modes, two deferred-MMIO queue appends"},"verified_against_reference":["the complete callable owner is bounded from 0x02002ee8 through the alignment and ten-word trailing pool before 0x020033d8","the command-drain loop represents the -1, 0x1000, 0x2000, 0x3000, 0x4000, and 0x7fff arms with their state-cell effects","all three signed fixed-point interpolation channels and their duration completion writes are represented","all four output modes and both interrupt-masked deferred-MMIO queue appends are represented in machine order","all ten resolver-confirmed calls are preserved; the remaining score delta is GCC 2.96 topology, carrier allocation, literal placement, and expression spelling"],"retention":"keep_structured_asm"},"resource_3bd:0200109c":{"span_bytes":860,"score":{"measured":"2026-08-31","candidate_bytes":496,"reference_bytes":860,"wrong_instructions":360,"differing_halfwords":422,"class":"structured-scene-retention"},"shape":{"calls":46,"loops":8,"memory_operations":36},"verified_against_reference":["complete callable owner at 0x0200109c, including its interworking return and literal tail","all 46 decoded calls, 8 loop(s), and 36 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3bd:020013f8":{"span_bytes":6220,"score":{"measured":"2026-08-17","candidate_bytes":5916,"reference_bytes":6220,"wrong_instructions":547,"differing_halfwords":2875,"class":"wrong"},"shape":{"calls":703,"branches":721,"loops":3,"memory_ops":47},"expressed":["call sequence","argument values","memory through a held pointer","pointer-valued loads","register-offset addressing","read-modify-write","three counted loops with real bounds","drafted by `overlay reconstruct`, which models 30 of its 47 memory operations"],"unexpressed":[{"op":"ldrsh","count":8,"where":"loop bodies"},{"op":"strh","count":10,"where":"loop bodies"},{"op":"cmp","count":7,"where":"loop bodies"}],"verified_against_reference":["bl count 703","ldrb count 10","strb count 11"],"blocked_by":"not blocked -- ordinary unfinished work, see unexpressed","rejected":[],"note":"Excess high-register moves fell +80 -> +69 -> +48 as memory and loops were modelled, which is why the remaining gap reads as incomplete source rather than as an allocation wall."},"resource_3bf:0200298c":{"span_bytes":1736,"score":{"measured":"2026-08-23","candidate_bytes":1636,"reference_bytes":1736,"wrong_instructions":196,"differing_halfwords":826,"class":"generated-call-script-retention"},"shape":{"calls":195,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 195 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3c3:02000334":{"span_bytes":1020,"score":{"measured":"2026-08-31","candidate_bytes":992,"reference_bytes":1020,"wrong_instructions":198,"differing_halfwords":491,"class":"structured-scene-retention"},"shape":{"calls":94,"loops":0,"memory_operations":0},"verified_against_reference":["complete retained body from 0x02000334 through the next production owner boundary","all 94 decoded calls, 0 loop(s), and 0 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3c4:02001742":{"span_bytes":438,"score":{"measured":"2026-08-31","candidate_bytes":372,"reference_bytes":438,"wrong_instructions":196,"differing_halfwords":215,"class":"structured-scene-retention"},"shape":{"calls":32,"loops":1,"memory_operations":6},"verified_against_reference":["complete audited production span","all 32 decoded calls, 1 loop(s), and 6 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3c4:02001fda":{"span_bytes":806,"score":{"measured":"2026-08-31","candidate_bytes":644,"reference_bytes":806,"wrong_instructions":329,"differing_halfwords":392,"class":"structured-scene-retention"},"shape":{"calls":63,"loops":0,"memory_operations":20},"verified_against_reference":["complete retained body from 0x02001fda through the next production owner boundary","all 63 decoded calls, 0 loop(s), and 20 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3c5:02000d4a":{"span_bytes":526,"score":{"measured":"2026-08-31","candidate_bytes":420,"reference_bytes":526,"wrong_instructions":201,"differing_halfwords":259,"class":"structured-scene-retention"},"shape":{"calls":49,"loops":1,"memory_operations":20},"verified_against_reference":["complete audited production span","all 49 decoded calls, 1 loop(s), and 20 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3c5:02001238":{"span_bytes":1586,"score":{"measured":"2026-08-23","candidate_bytes":1510,"reference_bytes":1586,"wrong_instructions":186,"differing_halfwords":736,"class":"generated-call-script-retention"},"shape":{"calls":184,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 184 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3c5:0200186c":{"span_bytes":3058,"score":{"measured":"2026-08-23","candidate_bytes":2824,"reference_bytes":3058,"wrong_instructions":440,"differing_halfwords":1442,"class":"generated-call-script-retention"},"shape":{"calls":330,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 330 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3c7:020000c8":{"span_bytes":148,"score":{"measured":"2026-08-24","candidate_bytes":148,"reference_bytes":148,"wrong_instructions":18,"differing_halfwords":49,"class":"literal-pool-and-argument-ordering"},"shape":{"calls":12,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for all twelve calls, every argument and literal, the actor-facing test, and the sole actor-angle load","candidate and reference have equal owner extent; the dominant residual moves the mask from the ROM's early pool into the terminal compiler pool","after alignment, the only executable scheduling residual is one swapped zero/value argument-setup pair; direct and named-local forms preserve the compiler order","four neighboring owners independently reproduce the same approved-compiler terminal-pool preference"],"retention":"keep_structured_asm","note":"Largest actor-facing message-selection family member; retained because ordinary C cannot select the ROM pool boundary and one call's argument schedule."},"resource_3c7:0200015c":{"span_bytes":108,"score":{"measured":"2026-08-24","candidate_bytes":104,"reference_bytes":108,"wrong_instructions":18,"differing_halfwords":33,"class":"literal-pool-placement"},"shape":{"calls":7,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for the actor-facing test, all seven calls, all four literal values, and the sole actor-angle load","the executable instruction sequence is preserved; the ROM places the 0xffffc000 mask in an early pool after the first unconditional branch while the approved compiler merges it into the terminal pool","direct-expression, named-local, declaration-order, nested-else, and early-return source forms all retain the terminal compiler pool"],"retention":"keep_structured_asm","note":"One member of a repeated actor-facing message-selection family. Retained as assembly because ordinary C cannot select the ROM's non-required early literal-pool boundary."},"resource_3c7:020001c8":{"span_bytes":108,"score":{"measured":"2026-08-24","candidate_bytes":104,"reference_bytes":108,"wrong_instructions":18,"differing_halfwords":33,"class":"literal-pool-placement"},"shape":{"calls":7,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for the actor-facing test, all seven calls, all four literal values, and the sole actor-angle load","the executable instruction sequence is preserved; the ROM places the 0xffffc000 mask in an early pool after the first unconditional branch while the approved compiler merges it into the terminal pool","the neighboring 0x0200015c owner proves the same compiler behavior for the identical source shape with only message constants changed"],"retention":"keep_structured_asm","note":"Second member of a repeated actor-facing message-selection family. Retained as assembly because ordinary C cannot select the ROM's non-required early literal-pool boundary."},"resource_3c7:02000234":{"span_bytes":104,"score":{"measured":"2026-08-24","candidate_bytes":104,"reference_bytes":104,"wrong_instructions":12,"differing_halfwords":23,"class":"literal-pool-placement"},"shape":{"calls":7,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for the actor-facing test, all seven calls, all four literals, and the sole actor-angle load","candidate and reference have equal owner extent; the residual only moves the four-word pool across the two message branches","the three neighboring owners independently reproduce the same approved-compiler terminal-pool preference"],"retention":"keep_structured_asm","note":"Actor-facing message-selection family member retained because ordinary C cannot select the ROM literal-pool boundary."},"resource_3c7:0200029c":{"span_bytes":108,"score":{"measured":"2026-08-24","candidate_bytes":104,"reference_bytes":108,"wrong_instructions":18,"differing_halfwords":33,"class":"literal-pool-placement"},"shape":{"calls":7,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for the actor-facing test, all seven calls, all four literals, and the sole actor-angle load","the executable instruction sequence is preserved; the ROM places the mask in an early pool while approved GCC merges it into the terminal pool","the three neighboring owners independently reproduce the same approved-compiler pool displacement"],"retention":"keep_structured_asm","note":"Actor-facing message-selection family member retained because ordinary C cannot select the ROM literal-pool boundary."},"resource_3c8:020009c6":{"span_bytes":322,"score":{"measured":"2026-08-31","candidate_bytes":228,"reference_bytes":322,"wrong_instructions":139,"differing_halfwords":161,"class":"structured-scene-retention"},"shape":{"calls":22,"loops":1,"memory_operations":14},"verified_against_reference":["complete audited production span","all 22 decoded calls, 1 loop(s), and 14 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3c8:02001780":{"span_bytes":136,"score":{"measured":"2026-08-25","candidate_bytes":136,"reference_bytes":136,"wrong_instructions":12,"differing_halfwords":8,"class":"allocation"},"shape":{"calls":11,"loops":0,"memory_operations":5,"reference_high_register_moves":0},"verified_against_reference":["complete reconstruction accounts for both global halfword stores, all eleven calls, every argument, and all four terminal literals","candidate and reference have identical 136-byte owner extent","an inline direction wrapper removes the independent shift placement; the remaining eight halfwords are confined to equivalent low-register allocation for the two stores","a 20,000-candidate safe heat walk from the improved source compiled without failures and left the eight-halfword baseline unchanged"],"retention":"keep_structured_asm","note":"Retained because approved compiler chooses a different low-register allocation for the global state writes."},"resource_3c9:020008b4":{"span_bytes":2454,"score":{"measured":"2026-08-30","candidate_bytes":2312,"reference_bytes":2454,"wrong_instructions":245,"differing_halfwords":1134,"class":"generated-call-script-retention"},"shape":{"calls":255,"loops":0,"branches":1,"memory_operations":18},"verified_against_reference":["complete owner reconstruction accounts for all 255 calls, presentation-object flags and coordinates, workspace state, and conditional event progress","direct assembly audit corrected the post-effect object fields and restored the terminal workspace write and event-counter branch omitted or mistranslated by the mechanical draft","candidate is 142 bytes shorter after complete decoded control flow and side effects are represented; the reference embeds two mid-function literal pools and retains approved GCC allocation and scheduling differences"],"retention":"keep_structured_asm"},"resource_3c9:02003e9c":{"span_bytes":928,"score":{"measured":"2026-08-30","candidate_bytes":944,"reference_bytes":928,"wrong_instructions":140,"differing_halfwords":450,"class":"generated-call-script-retention"},"shape":{"calls":94,"loops":0,"memory_operations":4},"verified_against_reference":["candidate and ROM contain the same 94 calls in machine order with every argument represented","direct assembly audit restored the route-dependent event-counter increment omitted by the mechanical draft","candidate is sixteen bytes longer after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3c9:0200423c":{"span_bytes":1692,"score":{"measured":"2026-08-30","candidate_bytes":1644,"reference_bytes":1692,"wrong_instructions":293,"differing_halfwords":791,"class":"generated-call-script-retention"},"shape":{"calls":141,"loops":1,"memory_operations":88},"verified_against_reference":["candidate and ROM contain the same 141 calls in machine order with every decoded argument represented","direct assembly audit restored sixteen actor-coordinate deltas, the first presentation object's omitted fields, the polling loop, two absolute state writes, palette write, and terminal workspace flag","candidate is 48 bytes shorter after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3ca:02000430":{"span_bytes":1796,"score":{"measured":"2026-08-30","candidate_bytes":1754,"reference_bytes":1796,"wrong_instructions":224,"differing_halfwords":840,"class":"generated-call-script-retention"},"shape":{"calls":188,"loops":0,"memory_operations":11},"verified_against_reference":["candidate and ROM contain the same 188 calls in machine order with every decoded argument represented","direct assembly audit restored all six conditional event-counter increments, the presentation-object fields, both terminal runtime writes, and the palette clear omitted by the mechanical draft","candidate is 42 bytes shorter after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3ca:02000b34":{"span_bytes":624,"score":{"measured":"2026-08-30","candidate_bytes":616,"reference_bytes":624,"wrong_instructions":151,"differing_halfwords":263,"class":"generated-presentation-retention"},"shape":{"calls":35,"loops":5,"memory_operations":24},"verified_against_reference":["complete owner reconstruction accounts for all 35 calls, both palette ramps, the three-pass blend transition, and the fixed-point runtime transition loop","direct assembly audit restored every absolute presentation-state write, blend-register update, runtime coordinate handoff, and terminal enable flag omitted by the mechanical draft","candidate is eight bytes shorter after all decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"main:080e46f0":{"schema_version":1,"namespace":"main","address":"0x080e46f0","status":"measured-draft","span_bytes":200,"owner_bytes":200,"candidate_bytes":216,"differing_halfwords":107,"wrong_instructions":88,"classification":"palette-step-toward-resource","domain":"Copies a 64-entry palette resource into a stack buffer, forces entry 0 to black, steps every 5-bit channel of the current hardware palette one unit toward the buffered target, and copies the stepped buffer back to palette RAM through the IWRAM word-copy kernel at 0x03001388.","score":{"measured":"2026-09-01","candidate_bytes":216,"reference_bytes":200,"differing_halfwords":107,"wrong_instructions":88,"topology":"equal","class":"missing-extra-code","route":"canonical-gcc296"},"bounded_flag_probe":{"-fno-expensive-optimizations":{"candidate_bytes":200,"differing_halfwords":79,"wrong_instructions":56,"topology":"equal"}},"semantic_evidence":["r0 is passed untouched to Func_08002f40, so the single argument is the palette resource id; the two bl sites at 0x080072f0 are the __call_via_r3 veneer with r3 = 0x03001388, the IWRAM word-copy kernel, matching the idiom in graphics/palette/update_phase_palette.c.","Direct halfword dereferences in each expression reproduce the reference ldrh plus lsls #16/lsrs #21/lsrs #26 shape; a u16 local is promoted signed by PROMOTE_MODE (TARGET_MMU_TRAPS off) and emits ldrsh, and a u32 local emits plain lsrs.","The loop counter test must be i != 64: check_dbra_loop only reverses LT/LE compares, and the reference keeps the ascending counter in ip with cmp #64/bne.","The result is assembled as (b << 10) | (g << 5) | r, matching the orrs chain order."],"remaining":"The candidate keeps one pseudo for the stack buffer address across both kernel calls (cse merges every (plus sfp -128) computation into the first argument pseudo) and allocates it callee-saved, while the reference re-materializes sp at each of the four buffer sites and shares only the strh base with the loop base. The two 0x1f mask pseudos also take swapped registers (sl/r7). Spellings tried without effect: pointer local for the loop base, &buf[0], buf[i] with i = 0, a copy-function variable, do/while and for with != test, pal[i] versus pal++, a src local versus a nested GetResource call.","notes":["Recovered only from the retained assembly, local headers, the approved compiler, and its pass dumps. Claims zero DONE bytes."]},"main:080ccaec":{"schema_version":1,"namespace":"main","address":"0x080ccaec","status":"adopted-exact-c","owner_bytes":240,"candidate_bytes":240,"differing_halfwords":0,"wrong_instructions":0,"name":"BattlePresentation_PrepareScene","source":"games/gs1/src/battle/presentation/prepare_scene.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Allocates the kind-39 and kind-40 work blocks, resets the battle presentation, sets BG2PA and the blend coefficients, streams one of five kind-selected palette resources into palette RAM through the IWRAM word-copy kernel, seeds three work fields, and schedules Func_080cc960 and Func_080cd260 as frame callbacks.","notes":["Reached only through the long-call veneer Func_080c9038 from the mode-1 branch of draft 080c1798.","Func_080041d8 must be declared with its adopted s32 result: the value-returning call makes the call the last setter of r0, which is what places each callback pool load after the order argument shift (sched2 tie-break by dependent count). A void prototype costs four differing halfwords.","Recovered only from the retained assembly, local headers and exact siblings (puff_arc/run.c, member_orbit/run.c), and the approved compiler."]},"main:0801bd98":{"schema_version":1,"namespace":"main","address":"0x0801bd98","status":"adopted-exact-c","owner_bytes":232,"candidate_bytes":232,"differing_halfwords":0,"wrong_instructions":0,"name":"MenuSelection_SetupEntry","source":"games/gs1/src/menu/selection/setup_entry.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Loads the glyph or tile graphic for a menu selection list entry through one of three tile loaders keyed on kind, records base, source slot, tile and end in the list node, and resets the node's render-object bitfields.","notes":["kind is unsigned (bhi in the switch tree); the +0x28 render object is addressed through a pointer local so every byte access stays within one Thumb base register; bitfield statement order 52, 55, 54, 76, 56, 8c, 80, 8a is evidenced by the shared 0x3f constant copy before the byte-7 AND.","The three per-kind tile counts (0x1f, 0x182, 0x333) are loaded from the literal pool and spelled as Value_ absolute constants.","The render-object layout duplicates struct Object_0801c0dc from ui/text/resource/initialize.c; a shared header is a follow-up. Neighbour drafts 0801b664 and 0801b810 prototype this owner with u16 arguments, which the retained assembly refutes.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:0808a5f8":{"schema_version":1,"namespace":"main","address":"0x0808a5f8","status":"adopted-exact-c","owner_bytes":236,"candidate_bytes":236,"differing_halfwords":0,"wrong_instructions":0,"name":"MapGroupTable_SelectEntry","source":"games/gs1/src/map/shared/select_group_entry.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Walks the word table returned by the 0x02008000 service at +0x14, finds the group whose 12-bit id matches the current id at 0x02000240+0x1c0, and stores the first entry that passes the kind and game-flag checks (or the group id when the group ends) into the current id and sub fields.","notes":["Both loops are for(;;) with continue/break; the entry test rotated to the loop end by expand_end_loop and duplicate_loop_exit_test is what the retained ldmia/ands/bne layout shows, not gotos.","The outer loop masks the loaded word in place (id &= 0xfff); decoding the entry in ascending bit order (id, sub, kind, flag) is required by sched2 tie-breaks.","The adopted caller menu/run_top_selection.c declares a void(void) prototype inside a non-EN guard; the assembly proves r0 is a real kind argument (compared with 999).","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:08010d48":{"schema_version":1,"namespace":"main","address":"0x08010d48","status":"adopted-exact-c","owner_bytes":204,"candidate_bytes":204,"differing_halfwords":0,"wrong_instructions":0,"name":"Map_SetWindowCellTile","source":"games/gs1/src/map/shared/set_window_cell_tile.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Converts a tileset pixel position to a tile index and a map pixel position to 8-pixel cells, stores the tile index into the 16x16 ring table at Data_03001e70+0x138, and when the window origin is within one cell on both axes redraws that cell on both layers through Func_080108e4.","notes":["The window origin words are read through a stepped s32 pointer (origin_x = *position++; origin_y = position[1]) because flow's auto-increment is what emits the ldmia; Func_080108e4 must be declared returning s32 so the value-returning call orders movs r0, #0 last in the first argument setup.","The table is 256 u16 entries, not the neighbours' [2][160]; the layer-1 offset 0x140 is a tile-id offset.","Recovered only from the retained assembly, local headers and the approved compiler."]},"main:08016f2c":{"schema_version":1,"namespace":"main","address":"0x08016f2c","status":"adopted-exact-c","owner_bytes":216,"candidate_bytes":216,"differing_halfwords":0,"wrong_instructions":0,"name":"UiWork_ProcessDirectWork","source":"games/gs1/src/ui/runtime/process_direct_work.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Per-frame update of the eight 36-byte direct-window work records at render work + 0x500: steps the open animation through UiWindow_UpdateInterpolatedGeometry and the final draw Func_08016230, or steps the close animation by erasing the previous border rectangle and either saving geometry and advancing the frame or zeroing the record, marking the render-dirty byte in both close paths.","notes":["A goto loop is required: with loop notes present the loop pass combines the two base + 0xea3 address computations and hoists them, while the reference recomputes the address in each branch (ui/render/drain_pending.c walks the same table the same way).","Func_08016178 is declared with 32-bit parameters in this unit; the s16 fields must load as ldrsh, which a u16 prototype (finalize.c) would turn into ldrh.","The frame != duration branch needs a block-local u8 dirty = 1 assigned in its own statement so the value pseudo outlives the legitimised address pseudo (address r3, value r2); a literal store or a function-level constant changes the allocation.","Sole caller Func_0801789c (ui/runtime/process_all.c) declares s32 Func_08016f2c(void); the owner sets no return value, so void is the evidenced signature.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:080b5864":{"schema_version":1,"namespace":"main","address":"0x080b5864","status":"adopted-exact-c","owner_bytes":248,"candidate_bytes":248,"differing_halfwords":0,"wrong_instructions":0,"name":"BattlePresentation_UpdateCamera","source":"games/gs1/src/battle/presentation/update_camera.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Per-frame battle camera update: when the link session is enabled it tracks serial status misses and pauses on a side mismatch, eases the camera yaw toward the transition target by a sixteenth of the delta while the transition timer runs, then rebuilds the scene transform through the camera scene helpers, the IWRAM routine at 0x03000250, and Func_080c0a24 when the transition flag is clear.","notes":["The three IWRAM cells are addressed from the single 0x03001e80 base (slot[0] camera state, slot[32] presentation transition, slot[-3] link work), matching the single pool word; declaring state, transition, work in that order fixes the entry register pattern.","The SIOCNT multi-id is computed into a local before the compare so the volatile load precedes the ldrb; the yaw field is u16 with (s16) casts at the two call sites, and the eased step is written delta /= 16; field += delta so the divmod copy pseudo survives.","Struct names reuse the adopted camera/scene and battle/presentation vocabulary; the +0x51 byte is named by analogy to wait_sync.c's miss counter rule.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:0800b6b8":{"schema_version":1,"namespace":"main","address":"0x0800b6b8","status":"measured-draft","span_bytes":224,"owner_bytes":224,"candidate_bytes":220,"differing_halfwords":94,"score":{"measured":"2026-09-01","candidate_bytes":220,"reference_bytes":224,"differing_halfwords":94,"route":"canonical-gcc296"},"domain":"Registers a resource buffer slot (tag = slot << 12 | no) in the 8-entry buffer control at 0x03001e68, then walks the ResourceNo table at 0x08012fa0 decoding matching resources through Func_08002f40 and Func_08005340 into the caller's buffer.","notes":["Harvested from a bounded reconstruction session stopped before convergence (three variants, 98/100/94 differing halfwords). Structure and callee signatures are the current best model; the residual has not been classified. Claims zero DONE bytes."]},"main:08093af8":{"schema_version":1,"namespace":"main","address":"0x08093af8","status":"adopted-exact-c","owner_bytes":264,"candidate_bytes":264,"differing_halfwords":0,"wrong_instructions":0,"name":"Object_FindNearestFacingTarget","source":"games/gs1/src/object/facing/find_nearest_target.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Scans the 64-entry facing table at 0x03001e64 for the nearest other entry of a given id within a fixed-point distance bound, returning it and turning the caller toward it through ArcTan2.","notes":["Harvested draft closed from 17 to 0 differing halfwords by spelling the tail as early returns (if (found == NULL) return NULL; if (*found->record->id != id) return NULL; return found;). The compare of found then reloads sl into r3 while the record dereference reloads it again into r2; the result-variable spelling let reload inherit r3 across the beq.","The distance is the IWRAM root helper at 0x030001d8 called through the r3 veneer; the angle is ArcTan2 (Func_080044d0) truncated to u16, compared as a signed halfword turn against the facing when the distance exceeds 23.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:0801868c":{"schema_version":1,"namespace":"main","address":"0x0801868c","status":"adopted-exact-c","owner_bytes":260,"candidate_bytes":260,"differing_halfwords":0,"wrong_instructions":0,"name":"UiWindow_FitOnScreen","source":"games/gs1/src/ui/window/fit_on_screen.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Positions a UI window: measures its size through Func_08018a50 or Func_08018850 unless preset, converts to tiles with the render-mode margin, and clamps x/y so the window stays inside the 30 by 20 tile screen.","notes":["Harvested draft closed from 53 to 0 differing halfwords by spelling the two clamps as if (pos >= 0) x = pos; else x = 0;. The ternary and the copy-then-test spellings let cse canonicalise the temporary to the longer-lived x (make_regs_eqv prefers the register with the later last use) and fold the subtraction into x; the if/else with the positive arm first is rewritten by the second jump pass into x = pos; if (pos < 0) x = 0; after cse has run, which keeps the reference's subs r3 / adds r6, r3 / cmp r3 shape. The inverted arm order costs six halfwords.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:08018efc":{"schema_version":1,"namespace":"main","address":"0x08018efc","status":"measured-draft","span_bytes":260,"owner_bytes":260,"candidate_bytes":264,"differing_halfwords":106,"score":{"measured":"2026-09-01","candidate_bytes":264,"reference_bytes":260,"differing_halfwords":106,"route":"canonical-gcc296"},"domain":"Appends a UI window tile sprite to the render output list: acquires a free output record, fills its sprite attributes from the window position and the requested tile, and links it through RenderOutput_AppendToList.","notes":["Harvested from a bounded reconstruction session stopped before convergence (three variants, 106 to 126 differing halfwords). Claims zero DONE bytes."]},"main:080a1ac0":{"schema_version":1,"namespace":"main","address":"0x080a1ac0","status":"measured-draft","span_bytes":264,"owner_bytes":264,"candidate_bytes":254,"differing_halfwords":121,"score":{"measured":"2026-09-01","candidate_bytes":254,"reference_bytes":264,"differing_halfwords":121,"route":"canonical-gcc296"},"domain":"Slides the menu cursor icon from its current tile position to a target over several frames using the shared divide helper, unless the skip-slide flag is set.","notes":["Harvested from a bounded reconstruction session stopped before convergence (121 differing halfwords, ten bytes short). Claims zero DONE bytes."]}}}
+{"format":1,"records":{"main:0800300c":{"schema_version":1,"namespace":"main","address":"0x0800300c","status":"proven-retained","owner_bytes":112,"candidate_bytes":114,"differing_halfwords":56,"wrong_instructions":64,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Disables interrupts, DMA-copies the 5120-byte relocated IWRAM payload (ROM 0x08000770 -> RAM 0x03000000), records the IWRAM base pointer at 0x03007ffc, DMA-copies the 56-byte (14-entry) interrupt-dispatch pointer table (ROM 0x08007320 -> RAM 0x030000e0), clears REG_DISPSTAT, arms REG_KEYCNT, enables VBlank+Keypad in REG_IE, then re-enables IME.","evidence":["DMA control words 0x84000500 (0x500 words = 5120 bytes) and 0x8400000e (0x0e words = 56 bytes) match, byte-for-byte, the 5120-byte 'relocated_iwram_payload' group and the 56-byte 'iwram_dispatch_pointers_08007320' table both recorded independently in games/gs1/asm/classification.json and games/gs1/asm/executable_gaps/index.json.","The dispatch table's 14 pointer values are 0x08003009 (Func_08003008 + thumb bit, i.e. runtime/dispatch/reserved_no_op_f.c) repeated, with one override to 0x08003811 (Input_InitKeyIrq + thumb bit) -- consistent with initializing a default-no-op interrupt dispatch table.","Register addresses 0x04000208/0x04000200/0x04000004/0x04000132 match REG_IME/REG_IE/REG_DISPSTAT/REG_KEYCNT as already named in games/gs1/recon/en/main/serial_runtime_family.h for sibling owners."],"credible_shapes_tried":["plain per-field volatile struct stores through a DMA3-style pointer (u32 or pointer-typed fields, with or without an intermediate 'iwram'/'dma' local variable): 114 candidate bytes vs 112 reference, 56 differing halfwords -- closest length match found; kept as the current draft","compile-time-constant compound-literal struct assignment for one or both DMA setups: for an all-constant compound literal the compiler emits a genuine paired `ldmia r3!, {..}` / `stmia r2!, {..}` (movmem12b), confirming empirically this is the only Thumb pathway that emits a multi-register stmia at all; 106-118 candidate bytes, 52-58 differing halfwords, and an extra callee-saved register (r7) not present in the reference","raw u32* pointer with sequential post-increment stores (*p++ = a; *p++ = b; *p = c;): each store lowers to its own single-register `stmia rX!, {rY}` (Thumb's only way to get a post-incrementing SImode store), never merging into one three-register stmia; 122 candidate bytes, 60 differing halfwords"],"compiler_backend_evidence":"Independently confirmed by reading alchemy-gcc/agscc/gcc/config/arm/arm.md and arm.c (same files cited in 08003e10.json): the only Thumb machine pattern that ever emits literal multi-register 'stmia' text is movmem12b/movmem8b (thumb_expand_movstrqi, arm.md ~5111-5155; thumb_output_move_mem_multiple, arm.c ~9425-9469), and both cases in thumb_output_move_mem_multiple emit ldmia immediately before stmia as one indivisible RTL insn -- it can only represent a genuine memory-to-memory block copy, never a lone grouped store of independently-computed register values. The generic 'store_multiple' expander and *stmsi/*stmsi_postinc patterns (arm.md ~4997-5075) are gated 'TARGET_ARM' with no Thumb counterpart. The reference's two `stmia r3!, {r0, r1, r2}` stores are each fed by three independently loaded registers (three separate pc-relative ldr's / a register move, no preceding ldmia), which is the same structural shape 08003e10.json already documented as unemittable from ordinary C on this compiler route.","remaining":"The 56 differing halfwords are concentrated around the two DMA descriptor writes: the reference's standalone, unpaired three-register stmia appears unreachable from any ordinary field-store, aggregate-store, or pointer-store C shape on this Thumb/GCC 2.96 route (see compiler_backend_evidence). The draft also does not reproduce the reference's r5/r6 callee-saved register allocation (push {r5,r6,lr} / pop {r5,r6}; pop {r0}; bx r0) for the REG_IME address and the shared IWRAM-base value -- every local-variable shape tried caused the compiler to either drop the callee-saved registers entirely or synthesize 0x03000000 via shift instead of a literal-pool load, rather than matching the reference's register-reuse pattern. Candidate length remains 114 vs 112 target bytes.","notes":["Cold-start owner: games/gs1/recon/en/main/0800300c.c did not exist before this pass; games/gs1/asm/0800300c.s (the proven byte-exact retained assembly) was reconstructed by hand from its literal pool and cross-checked against a direct hex dump of roms/gs1-en.gba at 0x0800300c.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used.","This candidate claims zero DONE bytes.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:0800307c":{"schema_version":1,"namespace":"main","address":"0x0800307c","status":"measured-draft","owner_bytes":124,"candidate_bytes":136,"differing_halfwords":64,"wrong_instructions":40,"domain":"Installs or removes one interrupt-dispatch-table entry and its REG_IE (and, for VBlank/HBlank/V-Counter, REG_DISPSTAT) enable bit.","expressed":["rejects index > 13 with no side effects (no IME touch, immediate return)","saves REG_IME, disables it, and restores it at every exit from the valid-index path","clears bit `index` of REG_IE, then sets it back only if handler is non-NULL","for index 0-2 (VBlank/HBlank/V-Counter) also clears the matching REG_DISPSTAT IRQ-enable bit (bits 3/4/5); for index==2 specifically it additionally clears/replaces the V-Count trigger byte (bits 8-15) from the vcount argument, and re-sets the enable bit only if handler is non-NULL","writes handler (if non-NULL) or the reserved no-op dispatch stub (if NULL) into Data_030000e0[index], the 14-entry interrupt-dispatch table"],"evidence":["games/gs1/asm/0800307c.s's literal pool holds 0x04000208/0x04000200/0x04000004 (REG_IME/REG_IE/REG_DISPSTAT, already named this way in games/gs1/recon/en/main/serial_runtime_family.h and games/gs1/recon/en/main/0800300c.c), 0x030000e0 (the 14-entry interrupt-dispatch table Func_0800300c DMAs into IWRAM from ROM 0x08007320, per games/gs1/recon/en/dossiers.json#main:0800300c), and 0x08003009 (Func_08003008 / RuntimeDispatch_ReservedNoOp03008, games/gs1/src/runtime/dispatch/reserved_no_op_f.c, plus the thumb bit -- the same reserved no-op the DMA'd table already installs as its default entry).","This owner is already forward-declared 'void Func_0800307c(s32 index, s32 priority, InterruptHandler handler)' in serial_runtime_family.h and called from three already-recovered owners, which is what pins every parameter's role: games/gs1/recon/en/main/08005d10.c has 'Func_0800307c(7, 0, Func_08006240)' (index 7, second argument unused so 0, a real handler pointer); games/gs1/src/link/serial/remove_serial_irq_handlers.c has 'Func_0800307c(7, 0, (InterruptHandler)(handler = 0))' and 'Func_0800307c(handler, 0, 0)' with handler==6 (NULL handler to remove a slot, second argument still unused so 0); games/gs1/src/runtime/callbacks/remove_irq_handler_slot2.c has 'Func_0800307c(2, 0, 0)' (index 2 = V-Counter, disable); and games/gs1/src/unidentified/main/field/field_owner_104.c has 'Func_0800307c(2, 136, (InterruptHandler)address)' -- index 2 is the V-Counter IRQ and 136 is a plausible V-Count scanline value, which is what identifies the second parameter's V-Count role and confirms it is only meaningful for index==2.","Hand-traced instruction-by-instruction against games/gs1/asm/0800307c.s: the >13 bound, the REG_IE bic/orr-by-mask pattern, the 8< 136.","Data_030000e0[index] write, else-branch variants: a shared `InterruptHandler *slot = &Data_030000e0[index];` used by both branches, and a `InterruptHandler def = ...; Data_030000e0[index] = def;` temp-then-store form -- both changed the else-branch's internal ldr/lsls ordering but net regressed (candidate grew and the branch polarity/shared-join structure diverged further from the reference's separate-branches-to-one-join shape). Rejected; kept the plain direct `if (handler != 0) Data_030000e0[index] = handler; else Data_030000e0[index] = default;` form, which already matches the then-branch exactly and is off by only one instruction's position in the else-branch."],"remaining":"Every remaining byte of the 64 differing halfwords / 40 wrong instructions traces to one root cause: 'REG_IME = 0;' (the interrupt-disable at function entry) compiles on this owner's route to `ldr r2,[address]; ldrh r3,[r2]; adds r6,r3,#0; ldr r3,[pool 0]; strh r3,[r2]` (loading the constant 0 through a pooled halfword), while the reference instead reuses the already-loaded address register itself as the store source -- `ldr r3,[address]; ldrh r2,[r3]; adds r6,r2,#0; strh r3,[r3]` -- storing 0x04000208 truncated to 16 bits (0x0208) into REG_IME, which still functionally disables IME since the hardware only implements bit 0 (clear here). Confirmed this is not a mistake in this draft specifically: the minimal isolated statement `*(volatile u16*)0x04000208 = 0;` alone, compiled through this project's default routing (equivalently explicit `--family gcc296`) for an unregistered source, ALSO produces the pooled-halfword-load shape, not the reference's self-store -- and games/gs1/recon/en/main/0800300c.c's own already-committed draft (a sibling owner, same statement, same 'canonical-gcc296' route per its own dossier) shows the identical pooled-halfword-load shape for its own 'REG_IME = 0;', diverging from ITS OWN reference's plain `movs r5,#0; strh r5,[r6]` in the same way -- so this is a pre-existing, shared, unexplained residual class across at least two owners in this translation unit, not something specific to this draft's source shape. Tried and rejected as fixes: `REG_IME = (u16)(u32)®_IME;` (self-referential cast, hypothesizing the compiler might CSE the address computation into the store) -- produced byte-identical output to plain `=0`, i.e. GCC re-derives a fresh pooled constant for the second use rather than reusing the register live from the first read; explicit `--family old-agbcc` (matches games/gs1/src/save/atmel/erase_sector.c's own real, exact-adopted `saved=*(vu16*)ADDR; *(vu16*)ADDR=0;` idiom, confirmed by direct candidate-show comparison to legitimately compile to plain `mov r0,#0; strh r0,[r1]`) -- correct plain-movs shape, but NOT the reference's self-store, and old-agbcc is very unlikely to be this owner's real route given its immediate, gapless adjacency to 0800300c (0x0800300c + 112 = 0x0800307c exactly), which is already established canonical-gcc296; `--flags -O1` / `--remove-flags -O2 --flags -O1` on the isolated statement -- produced byte-identical output to -O2, no effect. This residual, and its cascade (the extra pooled halfword forces GCC to insert an early inline literal pool plus a branch-over and alignment padding after the REG_IE store, which then phase-shifts every subsequent pc-relative literal offset and, per objdiff's raw-instruction alignment, every downstream instruction in the printed diff -- none of which are independent additional errors), account for the entire measured gap. No length mismatch beyond this single 12-byte overage (136 vs 124); every field value, branch condition, and call/store target matches the reference algorithm exactly.","notes":["No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used.","Recovered only from games/gs1/asm/0800307c.s (hand-traced instruction-by-instruction and literal-pool-address-verified), already-adopted/already-measured sibling owners and headers in this repository (serial_runtime_family.h; games/gs1/recon/en/main/0800300c.c and .json; games/gs1/recon/en/main/08005d10.c; games/gs1/src/link/serial/remove_serial_irq_handlers.c; games/gs1/src/runtime/callbacks/remove_irq_handler_slot2.c; games/gs1/src/unidentified/main/field/field_owner_104.c; games/gs1/src/runtime/dispatch/reserved_no_op_f.c; games/gs1/src/save/atmel/erase_sector.c used only to compare compiler-route behavior, not as a semantic source), the approved local ROM, and the approved compiler's own routing/flag machinery (tools/compiler-core/src/routing.rs, read directly to understand family/flag selection). No other Golden Sun decompilation project, symbol map, or disassembly was consulted; the family-transplant guess (advance_cycle.c, 7318/10000, below threshold) was read and rejected as an unrelated shape-only match, not used as evidence.","Not registered in games/gs1/source-paths.json: several not-yet-exact sibling owners (e.g. main:0800300c/Runtime_InitIwramAndInterrupts) carry a documentation-only name in their own dossier without a source-paths.json entry. This candidate claims zero DONE bytes, so it does not require a progress-report refresh. The name above is evidence-backed and ready to register when the owner is adopted or its shared translation unit is reconstructed.","This candidate claims zero DONE bytes (differing_halfwords must be 0 for adoption)."]},"main:0800383c":{"status":"proven-retained","classification":"io_write_queue_scheduler_module","span_bytes":64,"edition":{"role":"derived-edition-candidate","edition":"en","rebase_status":"ja-owner-not-yet-recovered"},"score":{"measured":"2026-08-25","candidate_bytes":64,"reference_bytes":64,"differing_halfwords":4,"wrong_instructions":0,"class":"ordering","note":"The coherent video/DMA translation unit preserves the 64-byte extent and aligned instruction stream. The residual is two adjacent instruction-order swaps in the owner head. This candidate claims zero DONE bytes."},"family":{"owners":["0800383c","0800387c","080038bc","080038fc","0800393c","0800397c","080039bc","080039fc","08003a3c"],"owner_bytes":576,"delay_values":["0x10000","0x20000","0x30000","0x50000","0x60000","0x70000","0x90000","0xa0000","0xb0000"],"difference":"Direct ROM comparison finds no body difference outside the delay materialization at owner offsets 0x28 and 0x2a; the 0x20000 sibling changes only one of those halfwords. Every other instruction and both pool words agree.","shared_candidate_score":{"candidate_bytes":64,"reference_bytes":64,"differing_halfwords":4,"wrong_instructions":0,"owners_measured":9}},"cross_edition":{"owner_bytes":64,"relocation_bytes":8,"core_bytes":56,"core_identical_for_all_nine":true,"edition_starts":{"ja":"en + 0x00","en":"listed owner","de":"en + 0x30","es":"en + 0x60","fr":"en + 0x10","it":"en + 0x40"},"note":"Each of the nine relocation-bearing candidates uniquely locates one 64-byte owner in every edition; all 54 comparisons have zero core differences."},"domain":"Queues one memory-mapped write and its destination for delayed execution while preserving interrupt-master state.","expressed":["the 32-entry queue bound","the 12-byte value/address/delay record layout","interrupt-master save, disable spelling, and restore","the first owner's 0x10000 delay"],"remaining":[{"op":"instruction ordering","count":2,"where":"the coherent unit emits the argument save before the queue-base load and the interrupt-master save after its disable store; the reference uses the opposite order at both sites"}],"rejected_experiments":[{"experiment":"20,000 heat-guided classic ordinary-C permutations","result":"no candidate improved the allocation residual or reached zero"},{"experiment":"volatile queue access, raw integer bases, nested pointer lifetimes, post-increment and structured record spellings, and old-agbcc","result":"all either retained the pointer swap or introduced extra loads, spills, or prologue registers"},{"experiment":"the nine existing GCC 2.96 owner-route flag families","result":"against the earlier isolated-owner source, none reached zero; seven preserved its 13-halfword allocation residual, -fno-cse-skip-blocks regressed to 29, and -fno-schedule-insns2 still differed in 10 halfwords"},{"experiment":"joint family transfer through one shared body and nine constant-only wrappers","result":"the earlier wrapper-only reconstruction left all nine at 13 differing halfwords. Reconstructing the complete surrounding translation unit later reduced every sibling to the current four-halfword ordering residual under canonical flags"},{"experiment":"joint declaration, integer-width, queue-view, raw-pointer, IME-pointer, early-destination, compiler-family, optimization, CSE, GCSE, scheduler, strength-reduction, regmove, and expensive-optimization matrix","result":"no isolated source/compiler pairing reached zero. This result predates the complete translation-unit reconstruction and is retained only as evidence that per-owner flag searches did not explain the reference."},{"experiment":"complete-unit follow-up over the shared nine-owner macro: canonical scheduling, both scheduler toggles, regmove, CSE-follow, CSE-skip, expensive-optimization, declaration/scope order, register hints, direct-global access, and a shared inline helper","result":"the representative 0800383c owner remained at the canonical four-halfword ordering residual for every neutral flag and register-hint variant; -fno-schedule-insns2 regressed to eight, declaration/scope variants regressed to thirteen, the inline helper to twenty-three, and direct-global access to twenty-five. The shared source shape therefore remains the best bounded whole-unit result."},{"experiment":"complete-unit GCC scheduler-priority audit of the shared macro","result":"all nine owners have the same two source-ordering residuals: the queue literal load and destination preservation tie at priority 9, so canonical GCC selects the preservation first; after the interrupt-master load, the saved value copy has priority 4 while the disable store has priority 5, so GCC selects the store first. Neutral ordinary-C declaration, width, pointer, initializer, and control-flow variants did not change that graph or regressed."},{"experiment":"exact-sibling shape transfer (complete-unit inversion pass over the proven Scheduler_FindCallback combination: direct-global interrupt-master access, queue pointer bound before the critical region, saved at function scope)","result":"Scheduler_FindCallback (0x08004198, byte-exact, same 64-byte class, same save/disable/restore idiom) emits no saved-value copy at all -- its context keeps the loaded value in the load register -- so the proven sibling never faces either scheduling choice and its spelling transfers no ordering evidence. Measured in the complete unit under canonical flags: the full scheduler-shape transfer regressed the representative to 11 differing halfwords; binding the queue pointer before the interrupt-master pointer (site A's literal-first ask) regressed to 13, pinning the recorded declaration/scope family cell; hoisting saved to function scope alone tied the live macro exactly at the same 4-halfword residual with the same two swaps. The dependence graph is unchanged by every binding, scope, and sibling-shape axis; the residual remains the two recorded scheduler decisions and stays open per next -- it is not relabeled a compiler limitation."}],"next":"Keep the coherent translation unit as measured reconstruction evidence. A future family candidate must preserve the 64-byte extent, literal pools, and all-nine agreement while producing queue-literal-before-destination preservation and saved-IME-copy-before-disable-store under canonical GCC; do not relabel this bounded scheduler tie as a compiler limitation.","notes":["Recovered only from the retained owner assembly, approved local ROM, in-repository callers, and the approved compiler.","No external game source, copied instruction bytes, inline assembly, fixed-register variable, or compiler barrier was used."],"rejected":[{"hypothesis":"declare q before ime in DEFINE_QUEUE_IO_WRITE so the ime pool load is scheduled ahead of the parameter copies","measured":"2026-08-29","differing_halfwords":12,"baseline":2,"verdict":"regressed"},{"hypothesis":"read saved = *ime at the ime declaration and declare q afterwards","measured":"2026-08-29","differing_halfwords":9,"baseline":2,"verdict":"regressed"}]},"main:08003a7c":{"schema_version":1,"namespace":"main","address":"0x08003a7c","status":"proven-retained","owner_bytes":96,"translation_unit":"video-dma-queue","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":96,"reference_bytes":96,"differing_halfwords":35,"wrong_instructions":38,"matched_prefix":1},"behavior":"When the queue is nonempty, copies the fixed transfer-command executor to temporary RAM, invokes it with the queue and count, then clears the count.","probe":{"hypothesis":"An ordinary-C DMA descriptor representation can publish the source, destination, and control words with the reference standalone three-register transfer.","acceptance":"Canonical complete video-DMA queue composition is byte-exact and all eleven existing exact owners remain byte-exact.","tested":["direct scalar, compound-aggregate, volatile, nonvolatile, and post-increment DMA register stores","local, VLA-backed, and by-value three-word descriptors","count, zero, declaration-lifetime, and padding variants"],"result":"No canonical form emits the reference standalone three-register store followed by base restoration. Scalar and post-increment forms use scalar or one-register stores; aggregate forms use a twelve-byte staging copy with LDMIA/STMIA and grow to 108 or 112 bytes. Removing the existing padding probe regresses to 92 bytes and 44 differing halfwords."},"remaining":"The current VLA and call behavior are credible, but the reference needs a standalone DMA publication with the count, zero, and control-base lifetimes allocated differently. The approved compiler's volatile multiple-transfer and BLKmode paths explain the tested alternatives, but do not prove that no ordinary-C source can emit the owner. Retain structured assembly; no permanent compiler classification is claimed.","notes":["All measurements compile the complete declared video-dma-queue reconstruction composition once with canonical GCC 2.96.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, compiler modification, or per-owner flag override was used.","This candidate claims zero DONE bytes.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08003adc":{"schema_version":1,"namespace":"main","address":"0x08003adc","status":"exact","owner_bytes":146,"candidate_bytes":146,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","translation_unit":"video-dma-queue","compiler_route":"canonical-gcc296","source_shape":{"branch_join":"Each mode branch assigns both the blend-control value and its BLDCNT lvalue before the common store.","post_store_lifetime":"A scoped pointer owns the remaining-frame counter after the BLDCNT write.","compiler_result":"GCC 2.96 merges the branch results into r3, keeps the coefficient in r2, emits the BLDCNT address and store before loading the counter into r6, and reproduces the reference literal pool."},"proof":{"complete_translation_unit":"146/146 bytes, zero differing halfwords","production_source":"146/146 bytes, zero differing halfwords","compiler_flags":"canonical; no per-owner override"},"notes":["The final source is ordinary C: it uses no inline assembly, fixed-register variable, compiler barrier, forbidden ABI attribute, copied instruction bytes, compiler modification, or flag override.","The duplicated pointer assignment preserves the two branch-local lvalue ancestries that GCC tail-merges at the common store; it is semantically ordinary and has no side effects.","Recovered only from the retained owner, approved local ROM, in-repository callers and types, local m2c structure, and GCC 2.96 pass evidence."]},"main:08003e10":{"schema_version":1,"namespace":"main","address":"0x08003e10","status":"proven-retained","owner_bytes":72,"candidate_bytes":72,"differing_halfwords":13,"wrong_instructions":16,"translation_unit":"video-dma-queue","compiler_route":"canonical-gcc296","algorithm":"Allocates a fixed-size executable buffer, DMA-copies a ROM routine into it, calls the copied routine through the r6 call veneer, then frees the buffer.","family":{"siblings":["08002fb0","08005340","08005394","080053e8"],"evidence":"Each sibling has the same allocator, three-word DMA setup, r6 indirect-call veneer, and free sequence; only its arguments, copy extent, or source vary."},"credible_shapes_tried":["volatile compound DMA-register aggregate assignment: canonical score unchanged","word-typed DMA-register aggregate assignment: canonical score unchanged","local three-word descriptor followed by assignment: emits a related LDMIA/STMIA copy, but adds a 12-byte stack object (80 versus 72 bytes; 36 differing halfwords)","volatile and ordinary word-pointer post-increment stores: retain the 72-byte extent but emit separate one-register stores rather than the reference grouped store","static inline three-scalar DMA publisher: retains scalar stores, grows to 76 versus 72 bytes, and scores 30 differing halfwords","shared StartDmaTransfer() inline helper (video_dma_family.h, same one 08003a7c uses), called both with pre-loaded locals in source/destination/control order and with inline literal arguments: both lower to three separate one-register str instructions, 72 bytes, 16 differing halfwords (worse than the plain field-store baseline, and still no stmia)","compound-literal aggregate store `*dma = (struct DmaChannel){src, dst, ctl};` through the same non-volatile pointer: byte-identical candidate output to the plain per-field store baseline (72 bytes, 13 differing halfwords) -- confirms the aggregate-assignment shapes above reduce to the same field-by-field lowering","reordering the three dma-> field assignment statements (destination-first, and other orderings) and moving the dma-pointer computation earlier: no effect on emitted bytes for the reachable orderings (byte-identical to baseline), or strictly worse when the dma pointer is forced to survive the Func_08004938 call (80 bytes, needs an extra callee-saved register)","2026-08-27: swapping the control expression to `0x84000000 | (size >> 2)` (matching the reference's compute-the-flag-constant-first order): no effect, still 13 differing halfwords","2026-08-27: re-tried destination-first field order independently (dma->destination before dma->source): confirmed byte-identical to baseline, corroborating the prior reordering finding","2026-08-27: introducing an explicit `void *savedArgument = argument;` local at function entry (to try to delay the compiler's r8 spill of the parameter until after the size literal load, matching the reference's mov-r8-before-ldr-r5 order): no effect on emitted bytes; the spill/literal-load ordering is not reachable through plausible C-level statement reordering"],"compiler_backend_evidence":"Read alchemy-gcc/agscc/gcc/config/arm/arm.c and arm.md directly: the STM-combining logic that could explain the reference's single `stmia r3!, {r0,r1,r2}` from three independently sourced words (store_multiple_sequence/emit_stm_seq, patterns *stmsi and *stmsi_postinc) is gated `TARGET_ARM` only (arm.md ~4990-5083); Thumb has no analogous peephole. The only Thumb multi-register store insns are movmem8b/movmem12b (thumb_expand_movstrqi, arm.md ~5111-5155; output routine thumb_output_move_mem_multiple, arm.c ~9425), and their asm template unconditionally emits a paired `ldmia`+`stmia` (a genuine block copy between two memory regions) as a single indivisible multi-set insn -- it can never emit the stmia half alone. This is independent of volatility (the ARM-only peephole additionally excludes MEM_VOLATILE_P operands, but that exclusion never even applies to Thumb, which has no candidate peephole regardless). Given no Thumb-reachable machine pattern in this compiler route folds three independently computed register values into one STM without a paired load, the reference's standalone grouped store looks structurally unemittable from ordinary field-store or aggregate-store C on this compiler; this matches, and mechanically explains, the 'canonical score unchanged' results recorded above.","remaining":"The reference groups the source, allocated destination, and control word in a writeback three-register store, then restores the DMA base. Canonical ordinary-C shapes instead keep those values in a nonconsecutive allocation or introduce a stack descriptor. GCC 2.96's Thumb block-copy path explains the local-descriptor LDMIA/STMIA result, but does not account for the reference's standalone grouped store. Compiler-source inspection (see compiler_backend_evidence) shows Thumb has no store-multiple peephole outside the always-paired LDMIA/STMIA block-copy pattern, so no ordinary field-store or aggregate-store C shape reaches the reference's lone STM. The shared original DMA-write source shape remains unknown; neither adoption nor a permanent compiler classification is justified from this evidence alone.","notes":["Measured only in the complete canonical video-dma-queue translation unit; no per-owner flags were used.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used.","This candidate claims zero DONE bytes.","2026-08-27: independently re-read alchemy-gcc/agscc/gcc/config/arm/arm.md (the actual source, not just the prior session's citation) and confirmed compiler_backend_evidence firsthand: *stmsi and *stmsi_postinc (arm.md ~5023-5083) are gated `TARGET_ARM`, and the store_multiple define_expand that would canonicalize independently-sourced register stores into one parallel STM set is also `TARGET_ARM`-only (~4999-5020). The only Thumb multi-register block insns, movmem8b/movmem12b (~5111-5155), require a MEM source at each offset (`(mem:SI (plus:SI (match_dup 1) (const_int N)))`), i.e. a genuine memory-to-memory copy -- they cannot fire when the three stored values are independently computed registers (source literal, allocated pointer, computed control word) as in this owner. This confirms the reference's standalone `stmia r3!, {r0,r1,r2}` is unreachable from any register-sourced C shape on this Thumb compiler route, independent of statement order or aggregate-vs-field-store style.","2026-08-27: tried three additional narrow variants beyond the prior session's list (control-expression operand order, an independent destination-first re-check, and an artificial early-argument-use local to influence the r8-spill/literal-load scheduling order) -- see credible_shapes_tried. None changed the score; candidate-show reproducibly reports candidate=72 reference=72 differing_halfwords=13 wrong_instructions=16 class=unemittable. Left games/gs1/recon/en/main/08003e10.c unchanged (byte-identical to the version already in the tree) since no variant beat the existing baseline.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08003e58":{"schema_version":1,"namespace":"main","address":"0x08003e58","status":"measured-draft","owner_bytes":124,"executable_owner_bytes":124,"candidate":{"coherent_translation_unit":{"candidate_bytes":120,"reference_bytes":124,"differing_halfwords":56,"wrong_instructions":54},"best_bounded_axis":{"scope":"complete-unit diagnostic after recovering the selected-position result carrier","flags":["-fno-gcse"],"candidate_bytes":124,"reference_bytes":124,"differing_halfwords":40,"wrong_instructions":52}},"cross_edition":{"owner_bytes":124,"relocation_bytes":8,"core_bytes":116,"core_identical":true,"editions":{"ja":"0x08003e58","en":"0x08003e58","de":"0x08003e88","es":"0x08003eb8","fr":"0x08003e68","it":"0x08003e98"}},"behavior":["rejects resource-table identifiers above 95","converts the requested byte size to 64-byte blocks","searches a 512-byte ownership map for a contiguous free run marked 0xff","skips occupied runs by reading their resource-table entry size","marks an accepted run with the identifier and returns its byte offset"],"bounded_search":{"exact":false,"canonical_best_differing_halfwords":56,"canonical_best_candidate_bytes":120,"tested":["sixteen finite canonical full-unit variants across function- and block-scope pointer declarations, initialization orders, const and ordinary register qualifiers, pointee volatility, pointer/integer views, and a zero-offset map aggregate","direct-global, local-pointer, mixed-alias, and raw-address diagnostics for the ownership map and resource table","while and guarded do-while free-run scans, separate and shared start/result temporaries, success-label layouts, and indexed versus pointer-induction mark loops","a canonical shared-result source shape that materializes the selected position before computing the requested run end","canonical complete-translation-unit compilation throughout, plus a diagnostic -fno-gcse compile of the strongest all-local pointer ancestry","a bounded contiguous resource-table reconstruction-composition probe in ROM order, retaining 08003fa4 as assembly: 08003ed4, 08003f04, 08003f3c, 08003f78, 0800403c, 08004080, 080040b4, and 080040d0 all remained 0-difference while this owner stayed 116/124 bytes with 56 differing halfwords"],"result":"No ordinary-C canonical shape reached exactness or simultaneously recovered the reference's id, block-count, scan-map, store-map, and table register roles. The retained indexed global mark loop reproduces the reference's six-instruction store loop; coupling the selected position to the result carrier preserves 120 bytes and 56 differing halfwords while reducing wrong instructions to 54. The contiguous resource-table probe preserved every exact neighbor but did not improve this owner, so its semantic and physical family alone is not evidence for a production-composition move."},"remaining":"The complete algorithm and owner boundary are established, but the coherent canonical translation-unit build remains four bytes short. GCC's GCSE pass copy-propagates the scan-map assignment from the store map, removing the reference's long-lived scan-map/store-map distinction and shifting the id/block-count allocation. A bounded resource-table composition retaining 08003fa4 as assembly preserved all eight exact neighbors but left this owner at 116/124 and 56 differing halfwords, so it does not justify moving the production composition. A noncanonical -fno-gcse diagnostic restores the 124-byte extent but still leaves 40 differing halfwords and 52 wrong instructions; neither exact adoption nor a permanent compiler classification is justified.","notes":["Recovered only from retained assembly, approved local GS1 ROMs, neighboring exact resource-table owners, and the approved compiler.","The contiguous resource-table run is recorded as a semantic/physical reconstruction-composition probe only; the manifest continues to assert that original translation-unit boundaries are unknown.","The raw-address diagnostic reached 124 bytes and 51 differing halfwords only by adding a duplicate ownership-map pool entry; it was rejected in favor of the named linker-resolved symbol and coherent source.","No inline assembly, fixed-register variable, compiler barrier, ABI trick, compiler modification, or per-owner flag override was used.","This candidate claims zero DONE bytes."],"rejected_experiments":[{"experiment":"independent symbol re-reference for the scan base (u8 *scan_map = Data_03001810; instead of = map;), complete-unit canonical","result":"Identical 120/124 bytes and 56 differing halfwords: GCSE still unifies the second symbol reference with the first and collapses the scan/store base distinction, so the PRE-inserted copy does not survive as hoped. Unlike the rejected raw-address diagnostic this adds no duplicate pool entry, but it changes nothing under canonical flags."}]},"main:08003fa4":{"schema_version":1,"namespace":"main","address":"0x08003fa4","status":"proven-retained","owner_bytes":152,"executable_owner_bytes":152,"candidate_bytes":160,"differing_halfwords":76,"wrong_instructions":70,"cross_edition":{"object_bytes":152,"relocation_bytes":12,"literal_bytes":16,"relocation_normalized_core_bytes":124,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08003fa4","en":"0x08003fa4","de":"0x08003fd4","es":"0x08004004","fr":"0x08003fb4","it":"0x08003fe4"}},"domain":"Allocates or reuses a cached VRAM block, optionally fills or DMA-loads it, and returns its tile index.","expressed":["validates the cache slot and maximum block size","reuses a same-sized cached allocation or frees and reallocates a changed entry","records the size and VRAM offset in the slot cache","supports no-load, shared-fill, and DMA-copy source modes","returns the allocated VRAM offset as a 32-byte tile index"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is eight bytes long with 76 differing halfwords and fails exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 152 executable bytes and proves all 124 relocation-normalized core bytes identical across the six approved GS1 editions.","The residual spans cache-entry address lifetime, allocator result placement, sentinel-source control flow, and volatile DMA scheduling rather than a localized compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect caller 0809b698, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08004838":{"schema_version":1,"namespace":"main","address":"0x08004838","status":"proven-retained","owner_bytes":32,"executable_owner_bytes":32,"candidate_bytes":32,"differing_halfwords":4,"wrong_instructions":6,"classification":"thumb_multiple_transfer_module","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":16,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"mode":"classic-walk","candidates":20000,"exact":false,"best_differing_halfwords":4,"best_structural_rows":5,"perm_general_statement_order":{"choices":6,"attempted":6,"best_differing_halfwords":4,"note":"All 6 field-write statement orders tried via PERM_GENERAL over dma->source/destination/control (out/permute/08004838/report.json); the retained order (control, destination, source) is the unique floor at 4 -- every other order regresses to 6 by scrambling which hard register (r0/r1/r2) holds which field value relative to the reference."}},"notes":["Publishes a source address, palette destination, and transfer control word through DMA3. The current standalone canonical score is 32/32 bytes, 4 differing halfwords, and 6 wrong instructions (matched_prefix=4: all four literal-pool loads into r3/r0/r1/r2 already match the reference byte-for-byte).","The retained owner is already covered by the proven thumb_multiple_transfer_module matcher: its standalone three-register STMIA cannot be emitted from ordinary approved C by the target compiler. Confirmed directly against this route's backend (alchemy-gcc/gs1cc/gcc/config/arm/arm.c thumb_output_move_mem_multiple/thumb_expand_movstrqi and arm.md movmem12b/movmem8b/store_multiple): Thumb's only multi-register-stmia-emitting pattern (movmem12b/8b) always prints a paired ldmia immediately before the stmia as one indivisible output_asm_insn pair for a genuine memory-to-memory block move, and the dedicated ARM store-multiple expander/peepholes are gated TARGET_ARM only with no Thumb equivalent -- so a lone grouped stmia sourced from three independently computed register values (as the reference has, with no preceding ldmia) is unreachable from any ordinary C shape on this compiler route. A local struct-temporary copy and a static-inline struct-by-value-returning helper both confirmed empirically: each instead lowers through the paired movmem12b shape via a stack-materialized 12-byte object (extra sub sp/add sp the reference does not have), never the reference's unpaired form. No duplicate permanent classification was added.","The remaining 4 differing halfwords are exactly the reference's stmia r3!,{r0,r1,r2} / subs r3,#12 / (trailing pool-alignment nop movs r0,r0) vs. this candidate's three discrete str's / (no alignment nop needed, since its 8-halfword body is already 4-byte aligned before the literal pool while the reference's 7-halfword body needs the pad) -- a compiler-level residual, not a source-shape mistake.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080049ac":{"schema_version":1,"namespace":"main","address":"0x080049ac","status":"proven-retained","owner_bytes":60,"executable_owner_bytes":60,"candidate_bytes":64,"differing_halfwords":28,"wrong_instructions":34,"cross_edition":{"object_bytes":60,"relocation_normalized_core_bytes":44,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080049ac","en":"0x080049ac","de":"0x080049dc","es":"0x08004a0c","fr":"0x080049bc","it":"0x080049ec"}},"domain":"Allocates the render transform workspace, clears its active marker, and resets three four-word transform records to their identity scale.","expressed":["allocates two 48-byte render work records","publishes the allocation and clears the associated state word","initializes three transform records with 16.16 identity scale and zeroed remaining fields"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is four bytes long with 28 differing halfwords and misses the <=20-halfword admission gate."},"notes":["Independent object analysis bounds this leaf at 60 executable bytes and proves all 44 relocation-normalized core bytes identical across the six approved GS1 editions.","The remaining mismatch is dominated by allocation-address lifetime and the compiler's scalar store schedule instead of the original three four-register STMIA writes.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered battle-presentation caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08004bd4":{"schema_version":1,"namespace":"main","address":"0x08004bd4","status":"proven-retained","owner_bytes":72,"executable_owner_bytes":72,"candidate_bytes":76,"differing_halfwords":29,"wrong_instructions":30,"cross_edition":{"object_bytes":72,"relocation_bytes":12,"literal_bytes":4,"relocation_normalized_core_bytes":56,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08004bd4","en":"0x08004bd4","de":"0x08004c04","es":"0x08004c34","fr":"0x08004be4","it":"0x08004c14"}},"domain":"Builds and publishes the pitch rotation matrix used by the battle-presentation camera.","expressed":["computes the fixed-point sine and cosine for the requested angle","initializes the three-record identity transform","places cosine, sine, and negated sine in the X-axis pitch rotation cells","publishes the complete transform to the shared scene workspace"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is four bytes long with 29 differing halfwords and misses exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this leaf at 72 executable bytes and proves all 56 relocation-normalized core bytes identical across the six approved GS1 editions.","The trigonometric call lifetimes match closely; the remaining residual is dominated by the original grouped STMIA matrix initialization versus readable scalar stores.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered transition-scene caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08004c1c":{"schema_version":1,"namespace":"main","address":"0x08004c1c","status":"proven-retained","owner_bytes":80,"executable_owner_bytes":80,"candidate_bytes":76,"differing_halfwords":39,"wrong_instructions":38,"cross_edition":{"object_bytes":80,"relocation_bytes":12,"literal_bytes":4,"relocation_normalized_core_bytes":64,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08004c1c","en":"0x08004c1c","de":"0x08004c4c","es":"0x08004c7c","fr":"0x08004c2c","it":"0x08004c5c"}},"domain":"Builds and publishes the yaw rotation matrix used by the battle-presentation camera.","expressed":["computes the fixed-point sine and cosine for the requested angle","initializes the three-record identity transform","places cosine, sine, and negated sine in the Y-axis yaw rotation cells","publishes the complete transform to the shared scene workspace"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is four bytes short with 39 differing halfwords and misses exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this leaf at 80 executable bytes and proves all 64 relocation-normalized core bytes identical across the six approved GS1 editions.","The ROM keeps sine in r8 across the three grouped STMIA initializers. Readable scalar initialization produces a different old-GCC lifetime and store schedule rather than a localized residual.","The sibling at 08004bd4 was corrected to SceneTransform_ApplyPitch after auditing the matrix cells; 08004c1c is the Y-axis yaw transform.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered transition-scene caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08004cb4":{"schema_version":1,"namespace":"main","address":"0x08004cb4","status":"proven-retained","owner_bytes":60,"executable_owner_bytes":60,"candidate_bytes":64,"differing_halfwords":31,"wrong_instructions":36,"cross_edition":{"object_bytes":60,"relocation_bytes":4,"literal_bytes":4,"relocation_normalized_core_bytes":52,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08004cb4","en":"0x08004cb4","de":"0x08004ce4","es":"0x08004d14","fr":"0x08004cc4","it":"0x08004cf4"}},"domain":"Builds the three-record identity scene transform, applies the requested position to its final record, and publishes it to the scene transform workspace.","expressed":["initializes three four-word transform records with 16.16 identity scale","copies the requested x, y, and z position into the final transform record","publishes the complete 48-byte transform through the shared scene workspace helper"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is four bytes long with 31 differing halfwords and misses exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this leaf at 60 executable bytes and proves all 52 relocation-normalized core bytes identical across the six approved GS1 editions.","The residual is dominated by the original three four-register STMIA initializers and the source-pointer lifetime; readable scalar initialization produces a different old-GCC store schedule.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered transition-scene caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080056cc":{"schema_version":1,"namespace":"main","address":"0x080056cc","status":"proven-retained","owner_bytes":322,"translation_unit":"save-state","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":322,"reference_bytes":322,"differing_halfwords":109,"wrong_instructions":141,"matched_prefix":10},"signedness_correction":{"baseline_differing_halfwords":110,"baseline_wrong_instructions":143,"evidence":"The reference uses unsigned control branches for the retry counter, slot index, and returned slot status; canonical GCC 2.96 emits those branches from u32 locals."},"remaining":"The reference retains the workspace in fp with a 24-byte frame containing the slot base, zero word, and header. The current ordinary-C DMA member stores keep a different long-lived allocation and a 28-byte frame. Aggregate DMA stores lower to memcpy, while a volatile post-increment probe reaches the 24-byte frame but not the reference workspace allocation or length.","notes":["The complete declared save-state reconstruction composition was compiled once with canonical GCC 2.96.","All eight declared exact-C owners remained byte-exact after the local u32 correction.","The source remains ordinary C; no inline assembly, fixed-register variable, barrier, forbidden ABI, copied instruction bytes, compiler modification, or per-owner flag override was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08005920":{"schema_version":1,"namespace":"main","address":"0x08005920","status":"proven-retained","owner_bytes":344,"translation_unit":"save-state","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":344,"reference_bytes":344,"differing_halfwords":53,"wrong_instructions":66,"matched_prefix":9},"signedness_correction":{"baseline_differing_halfwords":55,"baseline_wrong_instructions":70,"evidence":"The two locally returned slot indices are u32, and both reference comparisons against 15 use an unsigned branch."},"notes":["The complete declared save-state reconstruction composition was compiled once with canonical GCC 2.96.","All eight declared exact-C owners remained byte-exact after the local u32 correction.","The source remains ordinary C; no inline assembly, fixed-register variable, barrier, forbidden ABI, copied instruction bytes, compiler modification, or per-owner flag override was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08005a78":{"schema_version":1,"namespace":"main","address":"0x08005a78","status":"retained-assembly","owner_bytes":72,"translation_unit":"save-state","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":72,"reference_bytes":72,"differing_halfwords":8,"wrong_instructions":12,"matched_prefix":10},"resolved_asm_classification":{"kind":"thumb_multiple_transfer_module","retention":"keep_structured_asm","confidence":"proven"},"bounded_source_shapes":["Direct aggregate assignment, scalar fields, local nonvolatile pointer, and nonvolatile DMA-view forms all remain 72/72 bytes with 8 differing halfwords: GCC emits three scalar stores.","A post-incremented volatile DMA-word view remains 72/72 bytes with 8 differing halfwords. It emits two one-register STMIA stores and one scalar store, not the reference three-register transfer.","A static inline aggregate-by-value writer emits the requested LDMIA/STMIA pair, but constructs the compound descriptor on the stack: 84/72 bytes, 41 differing halfwords, and 30 wrong instructions.","Static inline scalar and four-argument writers remain 72/72 bytes but regress to 19 differing halfwords and 28 wrong instructions; the inlined stores remain scalar.","A register aggregate plus an inline writer introduces two stack copies: 92/72 bytes, 45 differing halfwords, and 34 wrong instructions."],"remaining":"The reference publishes the three-word DMA command through a standalone three-register STMIA with base restoration. Canonical GCC 2.96 Thumb lowering emits single-register moves or, for a 12-byte memory copy, an immediately paired LDMIA/STMIA block copy. No tested ordinary-C lifetime or aggregate shape emits the standalone transfer.","notes":["All measurements compiled the complete declared save-state reconstruction composition once; existing exact owners remained exact under the canonical route.","The assembly classifier confirms this owner as thumb_multiple_transfer_module (1 owner, 72 bytes).","No inline assembly, fixed-register variable, compiler barrier, ABI escape, copied instruction bytes, compiler modification, or per-owner production flag override was used."]},"main:08005d10":{"schema_version":1,"namespace":"main","address":"0x08005d10","status":"proven-retained","owner_bytes":350,"candidate_bytes":350,"differing_halfwords":115,"wrong_instructions":84,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Saves REG_IME, self-writes REG_IME with its own address, registers two interrupt handlers via Func_0800307c, disables IME, clears the VBlank/serial bits pending in REG_IE/REG_IF, cycles REG_RCNT/REG_SIOCNT to select general-purpose serial mode and arms multiplayer SIOCNT bits, re-enables IME, DMAs a zero word into the SERIAL_RUNTIME block via DMA3, initializes SERIAL_RUNTIME's send_index and send/incoming/ready/pending buffer pointers into its storage[], re-enables the serial IRQ, clears SERIAL_TRANSFER/SERIAL_ACTIVE_A/B state, calls Func_0800651c, and restores the original REG_IME.","evidence":["Field values, header addresses (REG_IME/REG_IE/REG_IF/REG_RCNT/REG_SIOCNT/REG_SIOCNT16/DMA3/SERIAL_RUNTIME/SERIAL_ACTIVE_A/B/SERIAL_VALUE_A/B) and struct layout all come from games/gs1/recon/en/main/serial_runtime_family.h, already shared by this owner's sibling translation-unit members (08005d10 through 0800651c); semantic values already match the reference literal pool byte-for-byte (0xff3f, 0x8000, 0x1000, 0x2000, 0x4003, 0x85000058, etc. all appear verbatim in games/gs1/asm/08005d10.s's pools), so the residual below is pure instruction-scheduling / register-allocation shape, not a value or algorithm error.","games/gs1/asm/08005d10.s (the retained byte-exact reference disassembly) shows a single `stmia r3!, {r0, r1, r2}` / `subs r3, #12` for the DMA3 descriptor write (source=&zero, destination=SERIAL_RUNTIME, control=0x85000058), with no matching `ldmia` nearby."],"credible_shapes_tried":["Baseline: DMA3->source/destination/control written through the TU-wide `volatile struct DmaRegisters *DMA3` macro (plain per-field volatile stores): 350/350 bytes, 117 differing halfwords -- three separate `str` instructions, no stmia.","Adopted improvement: a locally-scoped, non-volatile `struct DmaRegistersRW` alias to the same 0x040000d4 block (see in-file comment), used only for this store: 350/350 bytes, 115 differing halfwords. Confirmed via alchemy-gcc/gs1cc/gcc/config/arm/arm.c's store_multiple_sequence (~line 3572) that its consecutive-store combiner explicitly excludes MEM_VOLATILE_P operands, so the volatile qualifier alone was sufficient to suppress any chance of a combined store; removing it is necessary but, on this owner, not sufficient (below).","All 6 permutations of the source/destination/control field-store statement order (with the non-volatile alias): all either matched the adopted 115-differing-halfword result (src,dst,ctl / dst,src,ctl / dst,ctl,src / ctl,dst,src) or regressed to 122 (src,ctl,dst / ctl,src,dst). None produced a combined stmia.","A local `struct SerialRuntime *runtime = SERIAL_RUNTIME;` (function-scope and block-scoped variants) reused directly across send_index/send_buffer/incoming_buffer/ready_buffer/pending_buffer: measurably closer instruction shape (wrong_instructions dropped from 84 to 66) but candidate shrank to 346 bytes vs the 350-byte reference -- GCC reused the cached pointer directly instead of reference's repeated `mov r2,ip` / `mov r3,ip` / `mov r4,ip` copies, so this shape is 2 instructions shorter than the reference and was rejected as a length mismatch.","Re-deriving `runtime = SERIAL_RUNTIME;` at the top of each loop iteration/statement (forcing fresh reloads instead of one cached copy): restored the 350-byte length but regressed to 122 differing halfwords -- worse than the adopted non-volatile-alias draft."],"compiler_backend_evidence":"Read alchemy-gcc/gs1cc/gcc/config/arm/arm.c directly for this owner. Two independent Thumb code paths can ever emit the `stmia` mnemonic: (1) thumb_output_move_mem_multiple (~9425-9469), reached only from thumb_expand_movstrqi for a genuine memory-to-memory block copy, which always emits a paired `ldmia` immediately before the `stmia` as one indivisible RTL insn -- ruled out here since the reference has no nearby ldmia (already documented, for the sibling owner 0800300c, in 0800300c.json's compiler_backend_evidence); and (2) the generic consecutive-store combiner reachable from store_multiple_sequence (~3572), which merges same-base, ascending, adjacent-offset word stores into one `stmia`/`stmib`/`stmda`/`stmdb` but explicitly bails out with `if (MEM_VOLATILE_P (operands[nops + i])) return 0;` ('Don't reorder volatile memory references'). Path (2) is therefore only reachable when DMA3 is treated as non-volatile, which is what the locally-scoped `DmaRegistersRW` alias in this file provides. Even so, on this owner the combiner never actually fires: the freshly-compiled .s (scratch/candidate-show/08005d10/08005d10.s) shows the destination-value store scheduled after an intervening `b`-over-literal-pool from the other two field stores, so the three stores are never adjacent in the emitted instruction stream for the combiner's peephole to match, regardless of which of the 6 field-order permutations was tried.","remaining":"115 of 350 candidate bytes' worth of halfwords differ, concentrated in two scheduler-level residuals rather than any remaining semantic/value/type error: (1) the function's opening block (interrupt_enable = REG_IME; ime_reg = ®_IME; *ime_reg = ...; then the first Func_0800307c(7,0,Func_08006240) call) -- the reference's Haifa list scheduler places `sub sp, #4` and `adds r7, r3, #0` (saving interrupt_enable into the callee-saved r7) immediately after the REG_IME read and before the call-argument setup, while every source-statement ordering tried here instead hoists the independent `ldr r5, =Func_08006240` and the r0/r1 argument movs earlier, deferring `sub sp, #4` until just before the `bl`; both orderings are semantically and length-identical schedules of the same instruction set; and (2) the DMA3-descriptor-write region and everything downstream of it through the incoming/ready/pending-buffer loop and the final SERIAL_ACTIVE_A/B / SERIAL_VALUE_A/B stores, where the reference caches the SERIAL_RUNTIME base pointer once in `ip` and re-derives it into r1/r2/r3/r4 via cheap `mov` copies at each subsequent use, producing a register-naming pattern (and, per the literal-pool placement above, an unreachable stmia) that this owner's ordinary field-store and locally-scoped-pointer shapes were not able to reproduce byte-for-byte; the resulting register-name (not value) mismatches then cascade, unchanged in kind, through the rest of the function. No length mismatch remains (candidate_bytes == owner_bytes == 350); the residual is pure instruction ordering / register allocation inside otherwise-correct code.","notes":["No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used. The `DmaRegistersRW` type/macro is a locally-scoped, non-volatile alias for the same 0x040000d4 DMA3 register block already declared (volatile) in the shared serial_runtime_family.h; it does not modify that header or any other owner's source.","This candidate claims zero DONE bytes (differing_halfwords must be 0 for adoption).","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08005ee0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x08005ee0","status":"proven-retained","classification":"serial_runtime_compiler_scheduling_module","owner_bytes":234,"score":{"measured":"2026-08-29","candidate_bytes":232,"reference_bytes":234,"differing_halfwords":34,"wrong_instructions":29,"matched_prefix_instructions":13,"class":"missing-extra-code","note":"Two independent divergence clusters remain, both scheduling/register-allocation shaped rather than missing statements. Reusing the already-proved serial_error carrier for REG_IME=1 removes the spurious literal and improves the canonical result from 234/38/40 to 232/34/29. The reference still loads the REG_IE address later and derives the byte mask from the live one carrier. In the tail, the reference reloads SERIAL_RUNTIME after the two calls and keeps that new pointer in r7; caching the earlier pointer is semantically invalid because the calls may replace the global. Complete translation-unit scoring, the bounded source matrix, and canonical compiler routes reproduce this floor; all 194 relocation-normalized core bytes are identical across six editions. Structured assembly remains authoritative under serial_runtime_compiler_scheduling_module; the candidate does not claim exact C."},"exact_closure_revalidation":"2026-08-31: complete serial-runtime TU scoring reproduces 232/234 bytes, differing_halfwords=34, wrong_instructions=29, and equal branch topology. The decoder reports no unique source shape and all eight literal-pool words are exact. The named live-carrier repair is either byte-neutral under u8 folding or sharply regressive under s8; canonical source was restored. Together with the recorded condition, statement, width, tail-pointer, and canonical-pass matrix, this is an honestly bounded blocker; no adoption or DONE bytes are claimed.","rejected_experiments":[{"experiment":"decoder/aligned-diff named carrier repair: after REG_IME=1, spell the reference's live-one mask as `serial_error -= 66; byte &= serial_error` instead of `byte &= ~0x40`","result":"byte-identical to the 232/34/29 baseline: GCC constant-folds the u8 carrier back to movs #191. Changing only serial_error to signed s8 prevents that fold but regresses to 236 bytes, differing_halfwords 87, wrong_instructions 55. Both forms were rejected and canonical source restored."},{"experiment":"fuse ie=REG_IE;ie&=~0x80;ie|=0x40;REG_IE=ie; into REG_IE=(REG_IE&~0x80)|0x40; (drop local ie)","result":"worse: candidate grew to 242 bytes, differing_halfwords 85"},{"experiment":"fuse only ie&=~0x80;ie|=0x40; into ie=(ie&~0x80)|0x40; keeping ie=REG_IE and REG_IE=ie separate","result":"byte-identical to baseline (234/38) -- no effect"},{"experiment":"drop local ie entirely, use REG_IE&=~0x80; REG_IE|=0x40; as two compound-assignment statements","result":"worse: 246 bytes, differing_halfwords 84"},{"experiment":"declare ie as u16 / s32 / int instead of u32","result":"u16: much worse (256 bytes, dh 124). s32/int: byte-identical to baseline -- no effect"},{"experiment":"reorder *((volatile u8*)sio+1)&=~0x40; to occur before REG_IME=1; instead of after","result":"worse: 236 bytes, differing_halfwords 58"},{"experiment":"move state->mode=mode; to the top of the if-block (right after declarations) instead of at the end","result":"worse: 236 bytes, differing_halfwords 80"},{"experiment":"swap order of REG_IF=0xc0; and REG_TM3CNT=0xc963;","result":"worse: differing_halfwords 41 (same size)"},{"experiment":"write REG_IME=serial_error; as REG_IME=0; (literal instead of the variable known to be 0 there)","result":"byte-identical to baseline -- no effect"},{"experiment":"write *(sio+1)&=~0x40; as &=0xBF (direct hex instead of bitwise-not expression)","result":"byte-identical to baseline -- no effect"},{"experiment":"cast state->mode=mode; target/source as (u8)mode","result":"byte-identical to baseline -- no effect"},{"experiment":"widen mask30/mode/serial_error locals from u8 to u32","result":"each individually worse (mask30: dh 81, mode: dh 77, serial_error: dh 91 and also shrank candidate to 230 bytes)"},{"experiment":"swap condition order in `if (serial_error==0 && state->send_index==-1)` to `if (state->send_index==-1 && serial_error==0)`","result":"worse: differing_halfwords 49"},{"experiment":"cast state->send_index==-1 comparand as (s16)-1 or state->send_index as (s32)","result":"byte-identical to baseline -- no effect"},{"experiment":"cast sio as volatile u16* instead of volatile u32*","result":"worse: 238 bytes, differing_halfwords 111"},{"experiment":"cast control=*sio as (u32)*sio, or add a no-op (void)sio; statement, or switch(state->phase) -> switch((int)state->phase)","result":"byte-identical to baseline in each case -- no effect"},{"experiment":"tail: replace `packed = a | (b<<8);` with two statements `packed=a; packed|=b<<8;`","result":"byte-identical to baseline -- no effect"},{"experiment":"tail: replace `if(mode==8) packed|=0x80;` (and similarly the shift>1 check) with a ternary `packed |= cond ? X : 0;`","result":"byte-identical to baseline in each case -- no effect"},{"experiment":"tail: move `result=packed;` after all the |= checks instead of between the mode check and the is_parent check (operate on packed directly, assign result once at the end)","result":"byte-identical to baseline -- no effect"},{"experiment":"tail: reload `state = SERIAL_RUNTIME;` again right after the switch, then use state-> for all of sequence/current_mask/received_mask/mode/is_parent (instead of the SERIAL_RUNTIME-> macro)","result":"worse: differing_halfwords 51"},{"experiment":"tail: use state-> only for sequence/current_mask/received_mask (mode/is_parent still via SERIAL_RUNTIME->)","result":"much worse: candidate shrank to 228 bytes, differing_halfwords 70 -- GCC hoisted the whole tail block past the two calls, past an unrelated ldmia sequence"},{"experiment":"tail: use state-> only for mode/is_parent (sequence/current_mask/received_mask still via SERIAL_RUNTIME->)","result":"byte-identical to baseline -- no effect (still same r2-vs-r7 register split as baseline)"},{"experiment":"swap declaration order of s32 packed; / s32 result; or their types (u32 vs s32)","result":"byte-identical to baseline in each case -- no effect"}]},"main:08005fcc":{"schema_version":1,"namespace":"main","address":"0x08005fcc","status":"retained-assembly","owner_bytes":186,"translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","family_matcher":{"reported_template":"games/gs1/src/display/blend/run_script.c","reported_score":7401,"confidence":"low","verdict":"false lead","evidence":"No shared callees, field offsets, or constants with run_script.c beyond the generic register-shuffle prologue shape common to this compiler's small-owner cluster. The real kinship is structural, not through the family matcher: this owner sits between two already-adopted exact siblings in the same serial_runtime.c translation unit (SerialRuntime_EnableTransferTimer/DisableTransfer before it, SerialRuntime_ExchangePayloads immediately after it at 0x08006088) and shares their struct SerialRuntime layout, SERIAL_RUNTIME/REG_SIOCNT/REG_IE/REG_IF/REG_IME/REG_TM3CNT constants, and its return-value tail (packed = current_mask | received_mask<<8; mode==8 -> |0x80; is_parent -> |0x1000; (control<<26)>>30 -> |0x2000) is instruction-for-instruction identical to the equivalent tail already proven exact in SerialRuntime_ExchangePayloads (Func_08006088, games/gs1/src/link/serial/exchange_payloads.c)."},"canonical_complete_unit":{"candidate_bytes":188,"reference_bytes":186,"differing_halfwords":60,"wrong_instructions":65,"matched_prefix":1},"cross_checks":["m2c workbench (out/workbench/08005fcc, run against the real reference bytes and agscc type context) independently reconstructs the same field offsets (mode@0, phase@1, received_mask@2, current_mask@3, transfer_enabled@8, is_parent@9, sequence@0xb, send_index@0x14), the same IE mask constant (-0x81, i.e. clear bit 7 only), and the same register roles for the four persistent locals as the hand trace of the retained assembly (r5=cached SIOCNT control word, r4=control&0x88). m2c's own naive single-file candidate only reaches 38.5% objdiff (it re-casts 0x02002240/0x04000128 at every access instead of caching them in registers); the hand-authored draft using named state/siocnt locals reaches 91.6%.","disable_serial_transfer.c (Func_08005e88, exact-c, same translation unit) and handle_transfer_interrupt.c (Func_08006240, exact-c) already contain the identical *(u32*)0x0400010c = 0x0000c963 timer-reload write and *(u16*)0x04000202 = 0xc0 interrupt-flag-clear idiom used inside this owner's deepest branch, confirming both magic constants independently of this owner."],"remaining":"Every field offset, constant, branch condition, and the full nested nesting shape (phase==0 -> masked=control&0x88; masked==8 -> serial_error=(u8)(control&4); serial_error==0 && send_index==-1 -> IME/IE/SIOCNT-hi/IF/TM3CNT reconfiguration + mode=masked; phase=1; sequence++) is confirmed instruction-by-instruction against games/gs1/asm/08005fcc.s and matches m2c's independent reading of the same reference bytes. The sole residual defect is register-role assignment: the compiler consistently binds the four function-lifetime locals (state, siocnt, control, masked) to {r4,r7,r6,r5} in that declaration order, while the reference binds the identical four roles to {r7,r6,r5,r4} -- a full cyclic rotation of the same register set, not a semantic difference. Ten independent rephrasings were tried and scored with candidate-show (assignment order of state/siocnt swapped; control read via the siocnt pointer vs. directly through the REG_SIOCNT macro; siocnt as a persistent volatile u32* vs. eliminated in favor of a raw literal cast at each use; masked promoted to function scope vs. left block-scoped; the IME=0 store written as a literal vs. reusing the already-zero serial_error register; the IE read-modify-write collapsed into one compound expression vs. kept as three statements with an explicit ie temporary) and every variant reproduced the exact same {r4,r7,r6,r5} binding or made the match strictly worse (removing the ie temporary also broke the movs-immediate encoding of REG_IME=1 into a spurious literal-pool load and disturbed the phase=1 fallthrough into an extra branch). No PERM_GENERAL/PERM_INT register forcing, asm(), or register-hint escape was used, per the hard constraint against hand-tuning register assignment.","notes":["Below the 7500/10000 family-transplant threshold (best guess 7401, low confidence); no automatic transplant workspace exists, so this owner was recovered by direct hand trace of games/gs1/asm/08005fcc.s plus its already-adopted exact siblings in link/serial/, per CONTRIBUTING's general owner-recovery workbench path.","No invented compiler flags were used; canonical-gcc296 (this translation unit's registered route) was the only route exercised.","This record does not claim a permanent compiler classification for the register-shuffle residual; it preserves the measured boundary and the negative-result rephrasing search for a future source-family or compiler-evidence revisit."]},"main:08006088":{"schema_version":1,"namespace":"main","address":"0x08006088","status":"retained-assembly","owner_bytes":96,"translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":92,"reference_bytes":96,"differing_halfwords":26},"isolated_diagnostic":{"flags":["-fno-regmove","-fno-rerun-cse-after-loop"],"candidate_bytes":96,"reference_bytes":96,"differing_halfwords":0,"adoptable":false},"decision":"The isolated flags break exact siblings when applied to the complete translation unit. Production retains byte-exact structured assembly; serial_runtime.c preserves the semantic C and is compiled once under canonical flags for every exact sibling."},"main:080060e8":{"schema_version":1,"namespace":"main","address":"0x080060e8","status":"retained-assembly","owner_bytes":116,"translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","canonical_complete_unit":{"candidate_bytes":120,"reference_bytes":116,"differing_halfwords":44,"wrong_instructions":19,"matched_prefix":7},"best_ordinary_c_shape":{"shape":"The existing direct three-register DMA macro, using source, destination, and control writes in hardware order.","candidate_bytes":120,"reference_bytes":116,"differing_halfwords":40,"wrong_instructions":19,"matched_prefix":11,"exact_unit_siblings_preserved":true},"stale_override_audit":{"flags":["-fno-regmove","-fno-rerun-cse-after-loop"],"owner_result":{"candidate_bytes":120,"reference_bytes":116,"differing_halfwords":44,"wrong_instructions":19},"exact_owner_regressions":{"0x08005e88":{"candidate_bytes":86,"differing_halfwords":2},"0x08006240":{"candidate_bytes":284,"differing_halfwords":73},"0x08006384":{"candidate_bytes":52,"differing_halfwords":27},"0x08006458":{"candidate_bytes":48,"differing_halfwords":3},"0x08006488":{"candidate_bytes":48,"differing_halfwords":3}},"decision":"The flags do not improve this owner and break exact serial-runtime siblings. The production route remains canonical GCC 2.96."},"bounded_source_shapes":["Aggregate DMA assignment, including nonvolatile destination and volatile-member views: 120/116 bytes and 44 differing halfwords.","Post-incremented scalar DMA pointer: 120/116 bytes and 47 differing halfwords; it emits individual single-register STMIA stores rather than the reference burst.","Local DMA aggregate copy: 128/116 bytes and 59 differing halfwords; it introduces a stack temporary and an LDMIA/STMIA pair.","Plain static-inline scalar and aggregate helpers: 124/116 with 58 differing halfwords and 120/116 with 51 differing halfwords respectively.","Shared static-inline descriptor-by-value writer: canonical full-unit compilation emits an unsupported memcpy external before owner scoring, so it cannot provide the standalone register burst.","Direct DMA macro: 120/116 bytes and 40 differing halfwords; it is the closest ordinary-C form but still emits three STR instructions."],"remaining":"The reference's 12-byte DMA write is a three-register STMIA followed by base restoration. Across the bounded ordinary-C shapes, canonical GCC 2.96 either emits scalar stores, individual post-increment stores, or a block-copy LDMIA/STMIA pair. No source shape reached zero linked differences, so the structured assembly remains installed.","notes":["The owner was remeasured only in the complete declared serial-runtime translation unit under canonical flags.","No inline assembly, fixed-register variable, compiler barrier, ABI escape, copied instruction bytes, compiler modification, or per-owner production flag override was used.","This record does not claim a permanent compiler classification; it preserves the measured boundary for a future source-family or compiler-evidence revisit."]},"main:0800615c":{"schema_version":1,"namespace":"main","address":"0x0800615c","status":"retained-assembly","owner_bytes":228,"translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","best_ordinary_c_shape":{"shape":"struct SerialRuntime *state cached once for the ready_buffer swap, pending_buffer walk, and tail received_mask/current_mask update; a 2-element u32 channel_state[] array whose second word is a dead zero store (reproducing the reference's unexplained extra 4-byte stack slot); pp/dst walking pointers (u16 **pp = state->pending_buffer, u8 *dst = payload) incremented once per channel iteration instead of index*24/index*4 recomputation; SERIAL_RUNTIME-> used directly (not through state) for current_mask/channel_flags accesses inside the loop.","candidate_bytes":228,"reference_bytes":228,"differing_halfwords":100,"wrong_instructions":136,"matched_prefix":5},"bounded_source_shapes":["Baseline (state cached, scalar channel_state, index*4/channel*24 recomputed pending_buffer/payload offsets): 228/228 bytes, 105 differing halfwords.","channel_state widened to a 2-element array with channel_state[1]=0 as the first statement (reproduces the reference's dead sp+4 zero-store and its sub sp,#8/add sp,#8 frame): 228/228, 101 differing halfwords.","Above plus pp/dst walking pointers replacing index*4/channel*24 pending_buffer/payload arithmetic (matches the reference's ip += 24 / r6 += 4 per-iteration pointer walk seen via m2c's --context draft): 228/228, 100 differing halfwords -- best found.","All SERIAL_RUNTIME-> accesses de-aliased through 'state' removed entirely (every access written as a fresh SERIAL_RUNTIME-> macro reference, no state variable at all): length regresses to 232/228 (extra reload of received_mask/current_mask at the tail costs 4 bytes) and differing halfwords rises to ~110-112.","'state' assignment deferred from immediately after REG_IME=0 to immediately before pp = state->pending_buffer (keeping ready_ptr on the SERIAL_RUNTIME-> macro directly): 228/228, 107 differing halfwords -- worse than caching state from the top.","dst = (u8 *)payload hoisted to the very first statement (matching the reference's early 'adds r4, r0, #0' payload capture position): length regresses to 232/228, 105 differing halfwords.","channel_state[1] = 0 moved to after REG_IME = 0 instead of before it: length regresses to 232/228, 110 differing halfwords."],"remaining":"candidate-show --align and the raw .insns listings (scratch/candidate-show/0800615c/{candidate,reference}.insns) show the residual is not a small last-mile permutation but a genuine global register-allocation/scheduling mismatch: the compiler front-loads SERIAL_RUNTIME's base address, REG_IME's address, and &channel_state[0] into r9/sl within the first ~6 instructions of the prologue (before the ready_buffer swap do-while even starts), which forces gcc296's literal-pool manager to dump 6 pool words immediately after the swap loop's first pass (an unconditional 'b' jump over an inline .word table -- visible in scratch/candidate-show/0800615c/0800615c.s as '.L26'/.L28'), whereas the reference keeps only 2 constants live at that point, defers the &channel_state address materialization ('mov lr, sp') until immediately before its first indexed byte load, and defers DMA3's base address to a fresh load right at the START_DMA call site (letting gcc296 fold the three sequential DMA3-> stores into a single 'stmia r3!, {r0,r1,r2}' that this candidate never produces -- it always emits three separate str instructions because DMA3's address ends up cached in a persistent 'ip' across the whole loop instead of reloaded fresh per call). Every ordinary-C restructuring tried (macro-only aliasing, deferred state assignment, reordered declarations/statements, scalar vs 2-element-array channel_state) either left this early-hoisting behavior unchanged or made the length/diff count worse. This looks like it needs either a different source-level trigger for keeping 'state'/channel_state's address out of a fixed hard register across the whole function (not found among the shapes tried), or is a genuine limit of what this GCC 2.96 route will produce from ordinary C for this control-flow shape.","notes":["Measured directly with tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/0800615c.c --align (not the complete declared translation unit).","No inline assembly, fixed-register variable, compiler barrier, ABI escape, copied instruction bytes, compiler modification, or invented compiler flag was used.","Sibling main:080c1ebc (BattleActor_ClearIndexedMaskBit) was read for house style but is a different compiler family target (battle, not serial-runtime) and did not transplant directly; the generated family report (out/gs1-en/reports/compiler-families.json, refreshed by `make families`) has no entry for main:0800615c ('families transplant main:0800615c' returns 'not in family index').","This record does not claim a permanent compiler classification; it preserves the measured boundary and the specific shapes already tried for a future revisit."]},"main:08006240":{"schema_version":1,"namespace":"main","address":"0x08006240","status":"exact","owner_bytes":280,"candidate_bytes":280,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","translation_unit":"serial-runtime","compiler_route":"canonical-gcc296","source_shape":{"hardware_snapshot":"A volatile eight-byte serial-register capture is copied through one restricted, stable local union view.","state_lifetimes":"Distinct send, receive, and loop-tail state views preserve the original register lifetimes across the interrupt handler.","receive_loop":"The explicit loop join keeps channel-halfword and channel-word offsets in the reference control-flow shape.","compiler_result":"GCC 2.96 emits the reference stack capture, shared literal pool, register allocation, receive-loop schedule, and timer-control tail byte for byte."},"proof":{"complete_translation_unit":"280/280 bytes, zero differing halfwords","production_source":"280/280 bytes, zero differing halfwords","compiler_flags":"canonical; no per-owner override"},"notes":["The final source is ordinary C: it uses no inline assembly, fixed-register variable, compiler barrier, forbidden ABI attribute, copied instruction bytes, compiler modification, or flag override.","The GCC 2.96 __restrict spelling expresses the single stable local snapshot view; every later snapshot access derives from that view.","Recovered only from retained owner assembly, approved local ROM correspondence, in-repository callers and types, local m2c structural output, and the approved GCC 2.96 compiler.","The owner is byte-identical in all six editions at the corresponding translated address."]},"main:080063bc":{"schema_version":1,"namespace":"main","address":"0x080063bc","status":"proven-retained","classification":"serial_transfer_compiler_allocation","resolved_asm_classification":{"kind":"serial_transfer_compiler_allocation","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":76,"executable_owner_bytes":76,"candidate":{"candidate_bytes":76,"reference_bytes":76,"differing_halfwords":5,"wrong_instructions":10},"template_family":"template-main-080040e8","template_source":"games/gs1/src/runtime/scheduler/callback_scheduler.c","domain":"Begins a serial-A transfer: refuses when SERIAL_ACTIVE_A is already busy, otherwise disables IME, stamps the shared SerialTransferState, writes SERIAL_VALUE_A/SERIAL_ACTIVE_A, marks the state active, and restores IME.","behavior":["returns -1 immediately when SERIAL_ACTIVE_A is nonzero","saves REG_IME and writes its own address into it as the disable trick shared with sibling 0800651c/08006408","writes state->status = 0x80, SERIAL_VALUE_A = transfer_value, SERIAL_RESULT = 0, SERIAL_ACTIVE_A = value, state->active = 1","restores REG_IME and returns 0"],"bounded_search":{"mode":"source-shape","attempted":3,"exact":false,"reason":"Three do-while(0) groupings of the same statement set were tried; none reproduced the reference's register-allocation order."},"remaining":"The complete ordinary-C reconstruction has the exact 76-byte extent, equal topology, and identical operations, addresses, calls, and literal pool. Its only residual is reciprocal allocation of the SERIAL_ACTIVE_A pointer and transfer-value carriers (candidate r6/r5, reference r5/r6). GCC 2.96 pass dumps identify these as pseudos 34 and 33: the candidate allocator prioritizes pseudo 33 first and therefore assigns it r5. The decoder's complete two-choice split-lifetime search, the source-shape probes, and the complete shipped non-forcing optimization sweep do not reverse that priority. The byte-exact structured assembly is therefore retained under the proven serial_transfer_compiler_allocation classification.","notes":["2026-08-31: improved the exact-extent candidate from 23 to 5 differing halfwords by recovering the reference's path-sensitive value lifetime: the incoming value remains in r0 on the transfer path and becomes the -1/0 return carrier on the two exits. Naming the active-word pointer and ordering it before the transfer-state declaration also recovers the reference's state pointer in r7. The remaining five halfwords are one active-pointer/transfer-value r5/r6 swap; the decoder now names split_lifetime(active), but the guarded two-choice permuter found no exact form. The complete shipped flag sweep was neutral or regressed. No forced register assignment was used.","Sibling 08006408 (also assigned) shares the same SerialTransferState/REG_IME idiom family and is documented separately; its own residual is larger (33 wrong instructions) and independent respellings did not help either.","2026-08-31 classification audit: relocation-aware comparison proves the 56-byte normalized core and all five literal words identical in Japanese, English, German, Spanish, French, and Italian. A fresh 22-route shipped-flag sweep was neutral at five halfwords or regressed; -fno-cse-follow-jumps, -fno-rerun-cse-after-loop, -fforce-addr, and -fno-schedule-insns2 were the only routes that moved the score, all adversely. GCC 2.96 -da output records allocno order 32,37,33,34,35 and dispositions pseudo 33->r5 / pseudo 34->r6, directly explaining the complete residual. The retained assembly now counts all 76 bytes as DONE.","Recovered only from retained owner assembly, serial_runtime_family.h (used by the already-adopted 0800651c neighbor), the six approved local ROMs, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:08006408":{"schema_version":1,"namespace":"main","address":"0x08006408","status":"measured-draft","owner_bytes":80,"executable_owner_bytes":80,"candidate":{"candidate_bytes":80,"reference_bytes":80,"differing_halfwords":29,"wrong_instructions":33},"template_family":"template-main-080040e8","template_source":"games/gs1/src/runtime/scheduler/callback_scheduler.c","domain":"Begins a serial-B transfer: refuses when SERIAL_ACTIVE_B (*0x020023ac) is already busy, otherwise disables IME, stamps the shared SerialTransferState, writes SERIAL_VALUE_B/SERIAL_ACTIVE_B/SERIAL_RESULT, marks the state active, and restores IME.","behavior":["returns -1 immediately when *0x020023ac (current) is nonzero","saves REG_IME and writes its own address into it as the disable trick shared with sibling 0800651c/080063bc","writes state->status = 0x81, SERIAL_VALUE_B(0x02002238) = current (the old *0x020023ac value), state->active = 1, *0x020023ac = value, SERIAL_RESULT = Data_00000000 (a pool-literal zero, loaded via ldr rather than movs #0)","restores REG_IME and returns 0"],"bounded_search":{"mode":"source-shape","attempted":1,"exact":false,"reason":"One alternate do-while(0) grouping mirroring 080063bc's shape was tried; it scored worse (35 wrong instructions, and shifted the whole literal pool by one word) than the pre-existing goto-based draft, so the original draft was kept."},"remaining":"Sizes match (80/80 bytes) and every field write, the 0x81 status byte, the SERIAL_RESULT-via-pool-literal quirk, and the reuse of the pre-branch 'current' value for SERIAL_VALUE_B are all already captured correctly in the adopted draft's C. The residual is almost entirely register-allocation order: like 080063bc, the reference hoists the branch-critical SERIAL_ACTIVE_B pointer+deref first (r5/r4) and the state pointer second (r6) before the cmp/beq, while the current draft's compiled output interleaves an extra r2/r4 shuffle for 'current' before reaching the same point. This is the same family of source-shape gap identified on sibling 080063bc (same REG_IME/SerialTransferState idiom, same scheduler behavior), not yet a proven compiler-internals residual; solving 080063bc's ordering puzzle first would likely transfer directly to this owner.","notes":["2026-08-31 exact-closure revalidation: canonical isolated and complete serial-runtime TU scoring both reproduce 80/80 bytes, differing_halfwords=29, wrong_instructions=33. The decoder names a guard inversion plus reciprocal state/active/current register-role swaps. Spelling the named guard directly as `if (current != 0) return -1;` makes branch topology equal, but regresses to 37 differing halfwords / 35 wrong instructions by preserving the input value in r4 and shifting the literal pool; it was rejected and the 29-halfword canonical source restored. The existing do-while(0) grouping likewise regresses per bounded_search. With exact TU siblings, canonical flags, literal/side-effect audit, and both named structural spellings exhausted, this remains an honestly bounded source-allocation blocker; no adoption or DONE bytes are claimed.","Sibling 080063bc (also assigned) shares the same idiom family and residual character; see its dossier for the detailed instruction-level comparison.","Recovered only from retained owner assembly, serial_runtime_family.h (used by the already-adopted 0800651c neighbor), and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0800651c":{"schema_version":1,"namespace":"main","address":"0x0800651c","status":"proven-retained","classification":"compiler_local_materialization_mismatch","owner_bytes":64,"executable_owner_bytes":64,"candidate_bytes":64,"differing_halfwords":7,"wrong_instructions":4,"cross_edition":{"object_bytes":64,"relocation_normalized_core_bytes":40,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x0800651c","en":"0x0800651c","de":"0x0800654c","es":"0x0800657c","fr":"0x0800652c","it":"0x0800655c"}},"domain":"Resets the shared battle-link transfer state while preserving and restoring the interrupt-enable register.","expressed":["saves the interrupt-enable register and applies the original temporary write","marks the local link-transfer state as resetting","clears the transfer counters, shared pointer, status bytes, and synchronization halfword","restores the saved interrupt-enable value"],"bounded_search":{"mode":"source-shape","attempted":1000,"exact":false,"reason":"Two bounded 500-candidate searches were flat at nine differing halfwords after named absolute symbols restored the exact extent and literal values."},"register_gate_step4_probe":{"date":"2026-08-28","result":"exhausted-not-a-closure","baseline":{"candidate_bytes":64,"reference_bytes":64,"differing_halfwords":7,"wrong_instructions":4},"decoder_cause":"The interrupt-master pointer already owns r0 and the later state pointer owns r1, but the state literal is not created until after the volatile interrupt read/self-write. Those volatile dependencies prevent sched2 from hoisting it ahead of the interrupt literal; zero is independently created early in r2.","annotation_free_catalog":{"admitted":false,"attempted":0,"reason":"The existing catalog has no absolute-address-materialization operation and correctly refused to reinterpret the two distinct literal loads as a reciprocal register swap."},"bounded_variants":[{"source_shape":"explicit eager state pointer with canonical register roles","candidate_bytes":64,"differing_halfwords":9},{"source_shape":"state accessor inline boundary","candidate_bytes":64,"differing_halfwords":7},{"source_shape":"create zero after the volatile self-write","candidate_bytes":76,"differing_halfwords":35},{"source_shape":"direct REG_IME accesses with eager state","candidate_bytes":80,"differing_halfwords":39},{"source_shape":"two-parameter inline reset boundary","candidate_bytes":76,"differing_halfwords":36}],"decision":"No tested ordinary-C boundary independently changed literal materialization order while retaining the established r0/r1 roles and 64-byte extent. Restore the 7-halfword baseline, retain assembly, record the missing catalog dimension, and proceed to the next single cluster."},"notes":["2026-08-27: Traced the residual to a single root cause: the compiler ties a pc-relative literal's pool position to the register-allocation order of whichever local pointer variables are assigned eagerly in the same block (first-assigned pointer always lands in the first pool slot and the lowest register; verified by directly swapping the interrupt_master/state assignment order, which flips both together and worsens wrong_instructions from 4 to 16 -- reproduces and confirms the prior session's reverted attempt). Broke that coupling by dropping the local `state` pointer variable entirely and instead referencing the struct through the existing extern `Data_02002220` symbol directly at each use site (Data_02002220.status / .peer_flags / .flags, equivalent to the header's SERIAL_TRANSFER macro -- both produce byte-identical output; kept the plain extern-symbol form for consistency with the rest of the file's Data_ globals). With only `interrupt_master` assigned eagerly in the preamble block, it deterministically takes r0 and its literal takes pool slot 0, while the now-lazily-referenced state struct address is loaded on first use and lands in r1 -- exactly the reference's r0=interrupt_master/r1=state register split. This dropped differing_halfwords from 9 to 7 (wrong_instructions unchanged at 4; class=allocation). The remaining 7 halfwords are all one issue: the reference's first two instructions eagerly load the state and interrupt_master literals BOTH up front, in [state, interrupt_master] pool order, while still keeping interrupt_master in r0 and state in r1 -- an order/register combination that could not be reproduced with any tested source-level restatement (assignment-order swaps, declaration-order swaps, splitting/merging the zero=0 statement's do-while block, or flattening the nested do-while(0) structure). Moving `zero = 0` out of the first preamble block and into the second (to match the reference's exact scheduling position, right after the interrupt-master save/store) was tried in two positions; both caused the compiler to spill (r5 plus push/pop, growing the candidate to 76 bytes), so the nested do-while(0) grouping was kept as-is since it is load-bearing for staying within the 64-byte budget. This matches the .s file's own header comment that the original ROM compiler is not reproducible with the approved free toolchain; treated as a compiler-fidelity ceiling for this instruction pair, not unexplored search space. No full/bounded search was rerun this session; the remaining 4 wrong_instructions and 7 differing_halfwords are believed to be at or near that ceiling.","Independent object analysis bounds this leaf at 64 executable bytes and proves all 40 relocation-normalized core bytes identical across the six approved GS1 editions.","Third attempt (this session): swapping the state/interrupt_master assignment order flips the literal-pool word order to match the reference exactly (0x2220 then 0x0208 vs the current 0x0208 then 0x2220), but the register numbers it then produces for those two pointers are the wrong way round relative to reference, worsening wrong_instructions from 4 to 16. Reverted; the original order remains the best-known candidate.","The coherent translation-unit build and first-class absolute symbols fix the former ten-byte extent excess and preserve the real 0x02002008, 0x02002080, 0x02002220, 0x02002238, 0x020023ac, and 0x04000208 bindings.","All instructions after the first five match. The remaining nine-halfword residual is the entry load, interrupt save, zero-value scheduling, and consequent literal-pool order; two bounded source-shape searches found no improvement.","Promoted to strong permanent compiler retention on 2026-08-30: the exact extent, six-edition core, 1,000-candidate bounded search, register-gate probe, and volatile-dependency scheduler analysis jointly bound the residual to the entry literal/register materialization order.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered linked-action caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:0800b074":{"schema_version":1,"namespace":"main","address":"0x0800b074","status":"measured-draft","owner_bytes":242,"candidate_bytes":148,"differing_halfwords":119,"wrong_instructions":150,"classification":"window-scroll-clamp (low confidence)","domain":"Takes a window/config pointer (a0, with byte fields read at +32, +33, +35, and a pair of 8-byte sub-records written at +4..+9 and +16..+21), three or four Q16.16 fixed-point values (a1, x1/a2, a3, a4), and a pointer to a 2-field 'limit' struct (6th, stack-passed argument, compared field-by-field against 0x10000/65536). When either limit field exceeds 65536 it doubles two byte-derived half-extent values and switches a set of default margins (8,4) to (16,8) and a stored flag byte from 1 to 3; it then computes two clamped 16.16-to-integer scroll/position values (one per sub-record) and writes each into its sub-record's byte-4 position value, byte-5 flag-merged byte, and byte-6 halfword mask-merged field.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 7885 bp -- the assembly has no relation to that template's tile-clearing bit logic at all (no & 0x3FF, no RENDER_TILE_ATTR_OFS/RENDER_ALT_OFS access, no simple width/height loop); this is a family-clustering false positive and the template gave no usable starting point.","This is a LOW-CONFIDENCE, exploratory dossier, the weakest of this assignment batch. The reference uses a straight-line body (no loops) with all four extended registers (r8/r9/sl/fp) live simultaneously and reads a byte at +32 with an UNSIGNED shift (lsrs, i.e. the byte is treated as unsigned, not the signed s8 this draft's first attempt assumed and had to correct); the second half-extent read at +33 and the sign-extended byte at +35 feed a multiply-by-limit->field1 and a >>16 downshift whose exact rounding-constant pool value this draft could not resolve from a single manual read and instead guessed as 0x8000 (a plausible round-to-nearest constant, not confirmed). The candidate compiled to only 148 bytes against a 242-byte reference and the tool reports class=unemittable for the alignment view, both signs that the overall structural shape (not just constant values) likely still differs from the real source.","This is a clear source-shape gap that needs a fresh, careful re-derivation (ideally cross-checked against the reference's exact pool constant at pc+88, which this pass did not resolve) rather than further respelling of the current draft. No further iteration was attempted given the low confidence in the base shape; further tuning of a structurally-uncertain draft would not be a good use of bounded effort. Flagging honestly for dedicated future reconstruction rather than claiming false progress."],"rejected_experiments":[{"experiment":"read window[32]/window[33] as signed bytes (s8) with an arithmetic shift, matching an initial mis-read of the reference's shift instruction","result":"corrected before scoring: the reference uses lsrs (logical/unsigned shift) on an ldrb-loaded byte, so both half-extent reads were changed to unsigned in the retained draft. Documented here so a future attempt does not repeat the same misreading."}]},"main:0800b168":{"address":"0x0800b168","span_bytes":544,"status":"measured-draft","domain":"fixed-point object projection, viewport placement and render submission","score":{"measured":"2026-08-31","candidate_bytes":506,"reference_bytes":544,"differing_halfwords":252,"wrong_instructions":294,"topology":"different","class":"structural-topology"},"semantic_evidence":["The retained prologue proves four arguments: an object pointer, a cursor over four fixed-point position words, a cursor over two scale words, and a halfword mode passed to Func_0800aa0c. The aggregate seed's unset-r2 and unset-r3 expressions were repaired from this register trace.","The two input cursors preserve the reference ldmia order: scale[0], position[0], scale[1], position[1], position[2], position[3].","Object bytes 0x20/0x21 provide half extents, bytes 0x22/0x23 are signed placement biases, byte 0x26 gates the secondary record, and the packed output fields at offsets 4..7 reproduce the reference masks and widths.","Both visible-record paths submit through Func_08003dec, with Func_08003d28 supplying the five-bit render attribute used when the projected state is nontrivial."],"verdict":"Materially advanced from a non-compiling aggregate seed to a standalone canonical-GCC candidate. It remains 38 bytes short with different topology and claims zero DONE bytes. The remaining broad residual is dominated by the reference's 68-byte stack/lifetime layout and its deliberate high-register retention of the two cursor-loaded scale words; adoption requires differing_halfwords=0.","rejected_evidence":["The shop and battle retarget templates are unrelated and were not used.","Direct array indexing compiled to 250 differing halfwords but obscured the reference's two cursor advances; the semantically evidenced cursor form is retained despite a two-halfword score increase because it reduces wrong instructions from 302 to 294."]},"main:0800ba30":{"schema_version":1,"namespace":"main","address":"0x0800ba30","status":"adopted-exact-c","owner_bytes":154,"executable_owner_bytes":154,"candidate_bytes":154,"differing_halfwords":0,"wrong_instructions":0,"template_family":"template-main-0800b7c0","template_source":"games/gs1/src/animation/initialize_objects.c","domain":"Updates the animation selection of every populated entry in a 4-slot AnimationObject array on an AnimationSetupState, driven by a packed flags byte (high bit + a 7-bit selector), but only when the 7-bit selector differs from the state's cached value.","behavior":["high_bit = flags & 0x80; flags &= 0x7f (the low 7 bits become the animation-table selector)","no-op (returns 0 immediately) when state->field36 already equals the masked selector","otherwise, for each of up to state->count entries: skips a null entry or one whose 'table' word is 0; looks up metadata via Func_08185000(entry->id); skips entries whose selector is out of range against metadata->animation_count","on a valid entry: writes draw_kind from metadata, selects entry->current from a per-metadata s32 table indexed by the selector (entry->table[selector], NOT a direct metadata->animation copy the way the template sibling does it), sets a 0x10 marker byte, and -- only when the high bit of flags was clear -- zeroes two more entry fields","for entry index 0 only, also copies metadata->adjust_x/adjust_y into two state fields","stores the new selector into state->field36 before returning 0"],"bounded_search":{"mode":"source-shape","attempted":4,"exact":false,"reason":"Iteratively fixed: (1) computing high_bit/flags in-place from the same parameter register instead of separate locals, which removed an extra r9 spill; (2) reading entry->table twice (matching reference's redundant reload) instead of caching it in a pointer local; (3) correcting metadata field offsets so the index==0 copy reads adjust_x/adjust_y at their real offsets 6/7 instead of an accidentally-duplicated pair of fields at 8/9. Also tried rewriting the loop as an explicit rotated do-while to see if it would stop the compiler hoisting state->count out of the loop condition -- it produced byte-identical output to the plain for-loop, so it was reverted for readability."},"remaining":"166 vs 154 bytes (12 over). The largest known gap: this candidate's compiler reads state->count ONCE before the loop and reuses that value for every iteration's bound check, while reference re-reads it through a cached pointer on every iteration (visible as 'mov r2,r8; ldrb r3,[r2,#0]; cmp r1,r3' inside the loop back-edge in the real assembly). Neither a for-loop nor an equivalent rotated do-while over 'state->count' reproduced that repeated-read shape, so this is either a genuine compiler loop-invariant-hoisting difference this candidate hasn't triggered the right source form for, or a residual outside manual respelling's reach. A second, smaller gap is a 4-byte stack-frame difference (sub sp,#12 vs reference's #8) whose cause was not isolated.","notes":["2026-08-31: adopted byte-exact. The reference is a rotated pre-tested loop with one shared increment/backedge, not the earlier ordinary for-loop or an unconditional do/while. Preserving that source layout and compiling this owner with the shipped -fno-strength-reduce flag prevents induction-pointer conversion and restores the indexed state->entries[index] load. Naming selected_animation before the independent draw-kind copy fixes the final four scheduling differences. Final score: 154/154 bytes, zero differing halfwords, equal branch topology.","Struct field names (field20, field02, field34, field35, field36, table) are placeholder offsets, not evidence-backed names; only draw_kind, id, marker-position, and the adjust_x/adjust_y copy are corroborated against the template's AnimationMetadata layout.","Sibling 0800bbc0 (also assigned) shares the same 0800b7c0 template family and the same AnimationObject/AnimationMetadata table but implements a different operation (allocating a new object into a free table slot rather than updating an existing one's animation selection); its dossier documents that owner separately, including the same struct-uncertainty caveat.","Recovered only from retained owner assembly, the already-adopted initialize_objects.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."],"sr_route_evidence":{"verdict":"REQUIRED","measured":"2026-08-31","note":"A controlled dual compile on the recovered rotated loop proves the route: canonical strength reduction emits a stack-backed advancing entry pointer and 160 bytes; -fno-strength-reduce preserves the reference's index*4+40 address calculation and enables the exact 154-byte result. The route is registered per owner in compiler routing data."}},"main:0800bbc0":{"schema_version":1,"namespace":"main","address":"0x0800bbc0","status":"proven-retained","owner_bytes":134,"executable_owner_bytes":134,"candidate_bytes":134,"differing_halfwords":18,"wrong_instructions":8,"classification":"compiler_minipool_store_scheduling_module","template_family":"template-main-0800b7c0","template_source":"games/gs1/src/animation/initialize_objects.c","domain":"Allocates a new AnimationObject: looks up metadata for id via Func_08185000, scans a fixed 64-entry table at Data_03001e5c for a free slot (draw_kind byte at struct offset 4 == 0), and if one is found populates it from metadata and returns its pointer (0 otherwise).","behavior":["metadata = Func_08185000(id); if metadata->width == 0, returns 0 without scanning","scans Data_03001e5c[0..63] (24-byte stride) for the first entry whose draw_kind (offset4) byte is 0 -- this is the SAME field later written with metadata->draw_kind, so a nonzero draw_kind doubles as the slot's occupied marker; there is no separate offset21 field","on a free slot: object->id = id; frames = metadata->frames, falling back to Func_0800b798(id) when that is 0; object->animation = metadata->animation (cached in a local so the later dereference reuses it); object->frames = frames; object->frame_codec = metadata->frame_codec; object->marker = 0xff; object->current = *(u32 *)animation (a dereference of the cached animation pointer, not a constant zero, unlike the template's initialize_objects.c sibling); object->state and object->unknown05 both take a shared zero value sourced from Data_00000000 (matching the pool-literal-zero idiom seen in the 08006408/080063bc serial-runtime family) rather than an immediate; object->draw_kind = metadata->draw_kind (offset4, closing the loop with the scan test)"],"bounded_search":{"mode":"source-shape","attempted":30,"exact":false,"reason":"Eight respellings (2026-08-27) converged the control flow and every field write/register choice to match reference exactly except one: a displaced literal-pool dump. A further ~22 respellings (2026-08-29) targeted that residual by permuting the order of the four final independent field writes (current/state/draw_kind/unknown05) and by moving locals/statements across the Func_0800b798 call boundary. Most were flat or worse, but reordering to 'draw_kind; current; state; unknown05' (instead of the struct-declaration-matching 'current; state; draw_kind; unknown05') improved candidate_bytes 136->134 and differing_halfwords 29->18 by shifting the compiler's literal-pool placement heuristic, even though it does not reach exact. This is a legitimate source-shape choice (the four writes touch independent struct fields, so their relative order is behaviorally unobservable) rather than a semantic change."},"remaining":"134 vs 134 candidate bytes now match in size (was 136 vs 134); differing_halfwords=18, wrong_instructions=8 (down from 29/11). The residual structural issue is unchanged in kind from the prior floor: reference's pending literal-pool entry for the Data_00000000 address constant (used for 'zero') is dumped once, right before the function's single shared return point (after a 'b.n' that skips over the 4-byte pool value, disassembling as 2 'movs r0,r0' halfwords). This candidate's compiler still dumps the SAME pool entry earlier, right after the conditional Func_0800b798 call merges, needing an extra 'b.n' skip plus a 4-byte-alignment NOP (3 halfwords instead of reference's 2). With the current field order ('draw_kind; current; state; unknown05'), the register-reuse pattern around the pool region also shifts (one ldrb/strb pair for draw_kind now appears earlier than reference's placement of the equivalent pair, and reference's second 'mov r3,r8; strb r3,[r5,#5]' reload -- present because ldrb clobbers r3 between the two zero-writes -- is folded away in the candidate since draw_kind no longer sits between the two zero stores). This reads as the same genuine compiler-internal minipool-emission-threshold difference documented in the prior session (GCC 2.96's arm_reorg dump-point heuristic), now interacting with register-reuse scheduling around whichever field order is chosen. Twenty-two additional 2026-08-29 attempts (see notes) did not find a source form that fixes both the pool placement and the exact reference field-write scheduling simultaneously; not forcing scheduling or inventing a compiler option per CONTRIBUTING.md. Recording differing_halfwords=18 (candidate_bytes=134, exact size match) as the improved floor for this owner within a small-owner leaf-sweep effort budget.","notes":["2026-08-31 exact-closure rerun: candidate-show reconfirms equal topology, exact 134-byte extent, a 31-instruction exact prefix, and only eight wrong instructions. The concrete residual is one Data_00000000 minipool dump: candidate emits the pool after the fallback-call merge with a branch plus three padding halfwords, while the reference emits it after the final field stores with a branch plus two pool halfwords. The surrounding difference is the already-measured independent final-store ordering tradeoff; reference order restores the exact store sequence but regresses to 136 bytes/29 halfwords, while the retained draw_kind-first order is the unique 134-byte/18-halfword minimum.","2026-08-31 shipped-pass check: -fno-schedule-insns, -fno-regmove, -fno-cse-follow-jumps, -fno-gcse, -fno-expensive-optimizations, and -fno-thread-jumps are byte-identical to the 18-halfword baseline; -fno-schedule-insns2 regresses to 31. Together with the thirty recorded field-order, lifetime, fallback-control-flow, carrier, loop, and pool-load shapes, no finite ordinary-C repair moves both the minipool and the store schedule to reference simultaneously. Verdict remains measured missing-extra-code/minipool-placement, zero DONE bytes; no scheduling or register forcing is justified.","2026-08-31 minipool probe: combining the reference's final store order (`current`, `state`, `draw_kind`, `unknown05`) with an explicit `frames != 0` jump around the fallback call does not move the zero-symbol pool to the reference tail. GCC emits the same 136-byte / 29-differing-halfword form as the previously measured reference-order source, so the named fall-through label is canonicalized before ARM minipool placement. Restored the 134-byte / 18-differing-halfword best source and closed this combined control-flow/store-order axis.","2026-08-31 classification: the exact owner extent, equal topology, complete independently audited semantics, thirty bounded source shapes, and shipped scheduling/regmove/CSE route sweep satisfy the permanent compiler-residual gate. The two surviving forms trade the reference's final independent-store schedule against its minipool dump point; neither ordinary-C form emits both. Promoted to Proven ASM as compiler_minipool_store_scheduling_module without forcing either compiler decision.","2026-08-29: Ran ~22 additional source-shape trials against the prior 29-differing-halfword floor. REFUTED (flat, no change from 29/136 unless noted): reordering 'animation = metadata->animation;' before the frames-fallback if (WORSE: 70 dh, 146 bytes); moving 'zero = ...' after the frames-fallback if (WORSE: 66 dh, 122 bytes); hoisting 'zero = (u8)(u32)Data_00000000;' to function-top before the width check (WORSE: 58 dh, 132 bytes); moving 'object->marker = 0xff;' before the frames-fallback if (WORSE: 34 dh); swapping frame_codec/marker write order (flat); swapping 'object = found;' vs 'zero = ...' order (flat, same as already-documented (b)); ternary 'frames = (frames!=0)?frames:Func_0800b798(id);' combined with the field-order swap below (WORSE: 26 dh, still 134 bytes); caching draw_kind into a new local assigned between state/unknown05 writes (WORSE: 30 dh); re-deriving 'object->unknown05 = (u8)(u32)Data_00000000;' instead of reusing the cached 'zero' local (WORSE: 74 dh, 150 bytes); reordering locals declaration order (i/animation/frames/zero, or zero before frames/animation) (flat); reordering pointer init statements (object=0 before metadata/entry) (flat); moving 'object = found;' before 'zero=...;frames=...;' inside the found-block (flat); loop bound 'i < 64' vs 'i <= 63' (flat); 'if (found)' vs 'if (found != 0)' (flat); 'if (!frames)' vs 'if (frames == 0)' (flat); goto-based 'have_frames:' label instead of fallthrough if, layered on top of the field-order swap (flat, same 18 dh); swapping final state/unknown05 write order on top of the field-order swap (flat, same 18 dh); moving draw_kind write to immediately after frame_codec/marker (before current) instead of immediately before current (WORSE: 20 dh); moving state write before draw_kind at the very end (WORSE: 30 dh, 136 bytes). PRODUCTIVE: reordering the four independent final field writes from 'current; state; draw_kind; unknown05' (matches struct declaration order, was the original baseline) to 'draw_kind; current; state; unknown05' improved differing_halfwords 29->18 and candidate_bytes 136->134 (exact size match) by changing where the compiler's literal-pool scheduling heuristic lands; kept as the new best-known state. Did not reach differing_halfwords=0; the displaced-pool-dump issue persists in a different but still-nonzero form (see 'remaining').","2026-08-27: Fixed two genuine draft bugs found via candidate-show --align, closing 138->136 bytes and wrong_instructions 20->11 (differing_halfwords 31->29). (1) struct AnimationObject's 'draw_kind' field was mismodeled as a separate byte at offset21; reference's final draw_kind store (ldrb r3,[r6,#4]; strb r3,[r5,#4]) writes to offset4 -- the SAME field the free-slot scan test reads (entry->draw_kind == 0). Merged the erroneous offset21 'draw_kind' and offset4 'unknown04' into one offset4 'draw_kind' field (offset21 is now unused padding, never written by this owner). (2) Added a local 's32 animation' to cache metadata->animation once, used both for 'object->animation = animation;' and 'object->current = *(u32 *)animation;' -- previously the second use recomputed 'ldr r3,[r6,#16]; ldr r3,[r3,#0]' (2 instructions, register clobbered by intervening frame_codec/marker stores) instead of reference's single 'ldr r3,[r2,#0]' reusing the still-live register. This mirrors the exact 'animation = metadata->animation;' local-caching idiom already adopted in the template sibling games/gs1/src/animation/initialize_objects.c. Remaining residual (a displaced literal-pool dump, 2 bytes) is a compiler-internal scheduling artifact per the 'remaining' field above, not further reduced after three additional source-shape attempts.","The struct layout (AnimationObject with 'draw_kind' at offset4 doing double duty as both the metadata-sourced draw kind AND the free/occupied scan-test byte, and 'unknown05' at offset5 as a second always-zero byte) is inferred purely from this owner's own field accesses; it has not been cross-checked against other owners of the same struct and may need reconciling once more of this table's users are recovered.","Sibling 0800ba30 (also assigned) operates on the same 24-byte-stride struct family but implements different behavior (updates an existing slot's animation selection rather than allocating a free one); see its own dossier.","Recovered only from retained owner assembly, the already-adopted initialize_objects.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0800bc48":{"schema_version":1,"namespace":"main","address":"0x0800bc48","status":"proven-retained","owner_bytes":40,"executable_owner_bytes":30,"candidate_bytes":40,"differing_halfwords":11,"wrong_instructions":12,"classification":"thumb_multiple_transfer_module","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":30,"core_diff_bytes":0,"core_identical":true,"raw_identical":true,"starts":{"ja":"0x0800bc48","en":"0x0800bc48","de":"0x0800b448","es":"0x0800b448","fr":"0x0800b448","it":"0x0800bc48"}},"notes":["Null-guards a resource-metadata record, then uses DMA3 fixed-source 32-bit fill control 0x85000006 to clear six words (24 bytes) from a zero word on the stack.","Explicit object-based six-ROM analysis found all 40 owner bytes raw-identical in JA, EN, DE, ES, FR, and IT; the instruction core is 30 bytes and the remaining 10 bytes are reached literals and alignment.","The complete readable direct-field source has exact 40-byte extent at 14 differing halfwords and 12 wrong instructions. The reference emits one restored-writeback stmia block transfer; the approved compiler emits three scalar descriptor stores.","Bounded pointer-postincrement, scalar/pointer field typing, volatile and nonvolatile descriptor, compound-literal, register aggregate, explicit temporary aggregate, inline factory, compiler-family, and optimization variants either preserve the scalar-store residual, call memcpy, or add stack block copies. No exact or narrow permanent candidate was found, so this draft claims zero DONE bytes.","2026-08-27: corrected this record's stale differing_halfwords (was 14, actual candidate-show output is 11; wrong_instructions=12 was already correct) -- the committed .c was already at its documented 11-halfword floor with no local diff. Independently re-verified the floor before touching anything: read agscc/gcc/config/arm/arm.md directly and confirmed 'store_multiple' (line 4997) is gated TARGET_ARM only, and that movmem12b/movmem8b's codegen routine thumb_output_move_mem_multiple (arm.c:9425-9473) unconditionally emits a paired 'ldmia %1!,{...}' immediately before its 'stmia %0!,{...}' for both the n=2 and n=3 cases -- there is no code path in this backend that emits a lone stmia from three independently-computed scalar registers, matching the file's existing analysis. Tried three additional experiments beyond the prior exhaustive permutation sweep: (1) aliasing the destination parameter through an extra local variable to coax 'adds r1, r0, #0' into existence -- GCC elides the copy, byte-identical to the existing candidate, no change; (2) computing clear_value's zero-store through an explicit '*(u32*)source = 0' dereference to mirror the reference's mov-r0-then-store shape -- regresses badly to differing_halfwords=18 (register pressure pushes destination into r4, extra spill/reload, breaks tail alignment); (3) building a real local DmaTransfer temporary and copying it via __builtin_memcpy -- this is the one shape that actually reaches a genuine 'stmia r3!, {r0,r1,r4}' via movmem12b (confirming the backend can only reach that opcode through a true mem-to-mem block move), but it also emits the paired ldmia the reference lacks, drops the trailing 'subs r3,#12', and grows the function to 44 bytes against the fixed 40-byte owner budget, so it is disqualified outright. No 40-byte, ordinary-C candidate beats 11 differing halfwords on the approved backend; recommend leaving this owner at its current measured-draft floor.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:0800ebec":{"status":"in_progress","measured":"2026-08-29","best_score":{"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/0800ebec.c --owner 0800ebec --size 1804 --align --first","size_rationale":"1804 = 0x0800f2f8 - 0x0800ebec, i.e. FunctionHead_0800ebec through the end of Fragment_0800f1fa's shared epilogue. The scorer accepts an explicit --size and will score the whole split-function span in one pass; the 'topology=uncovered:reference-multiple-owner-entries' banner it prints is informational only for this owner shape and can be ignored per the coordinator - the byte diff and --align stream are live and meaningful.","candidate_bytes":1718,"reference_bytes":1804,"differing_halfwords":804,"wrong_instructions":599,"frame_size":"sub sp,#104 - MATCHES reference exactly under the new NO_STRENGTH_REDUCE_SOURCES route too. posA=92 and posB=80 still land exactly. posC is now observed pinned at sp+0 ('mov r3, sp', no add) regardless of declaration order tried this session - this is a NEW divergence from the old SR-on dossier's posC=68 finding and is UNRESOLVED (see 2026-08-29_no_sr_route_pass below). deltas landed at sp+56 or sp+68 depending on ordering tried, never at the reference's sp+24.","note":"2026-08-29 NO_STRENGTH_REDUCE_SOURCES route pass: this file is now scored with -O2 -fno-strength-reduce automatically (the plain scoring_command above already goes through the new route - no --flags needed). Baseline at session start: dh=814 (down from the old-route 860 recorded above, confirming the flag's effect already lands for the busy-wait loops per compiler_divergence below). Landed two real, verified fixes this session (both rescored, both real drops, not guesses): (1) reordered the first busy-wait/scan loop's pointer increment - 'v = *p; p++; if (v==0xff) count++; n--;' instead of 'if (*p==0xff) count++; p++; n--;' - to match the reference's ldrb/adds-r1-#1/cmp/bne instruction order at games/gs1/asm/0800ebec.s:44-48 exactly (ground-truth-verified); dh 814->809. (2) reused the already-computed 0x200 mask constant as the second busy-wait block's opaque loop-trip count instead of re-reading Data_03001ae8 fresh ('mask = 0x200; if (Data_03001ae8 & mask) { count = mask; ... }') - matches the reference's 'adds r3,r2,#0' (copying the just-computed AND-mask register r2, not reloading the volatile) at games/gs1/asm/0800ebec.s:68; dh 809->808. Also removed the dead 'dead_signed_facing' placeholder local (neutral score-wise, pure cleanup - the goto-only branch needs no local at all). Net this session: dh 814->808, wrong_instructions ~599->597. NOT byte-exact; do not run make verify."},"finding":"0800ebec (FunctionHead_0800ebec) is the head of one large C function that continues, with the same live stack frame and register file, through sub_0800ee14 (Region_0800ee14, reached by plain 'bne', not 'bl') and on through sub_0800ef44/sub_0800f092/sub_0800f0c6 into sub_0800f1fa (Fragment_0800f1fa, reached by a 'mov r12,pc / bx r4' veneer hop), whose epilogue ('pop {r3,r5,r6,r7}; mov r8,r3; ...; pop {r1}; bx r1') is the only return path and restores exactly the registers FunctionHead_0800ebec's prologue saved. Total span is roughly 0800ebec-0800f2e0, about 1.8KB. This matches the sibling finding already recorded for 0800ee14 (games/gs1/recon/en/dossiers.json#main:0800ee14): no ordinary standalone C function can reproduce a mid-function branch target with a live caller-established frame, so 0800ee14/0800ef44/0800f0c6/0800f1fa cannot be scored as separate owners, and 0800ebec cannot be adopted as a 552-byte owner either, because its C body does not actually end at 0800ee14 - it is the same function.","struct_and_signature_evidence_gathered":{"actor_object":"Both the FunctionHead parameter (r7) and the candidates scanned later (r6/r8 in Region_0800ee14) are struct ScriptObjectEntry (games/gs1/include/script_object_entry.h): data@0x00, values_08[6] (s32 x/y/z/height/speed/accel @0x08.. 0x1c), value_20 (u16)@0x20, flags_59@0x59. This is independently confirmed by games/gs1/src/script/object/check_overlap.c (Func_0800d924), which the region calls directly with the exact same field accesses (entry->data, entry->flags_59, entry->values_08, entry->value_20) and the exact same scan bounds (ADDR_03001E64 base, stride 0x70, 64 entries).","step_position_struct":"struct WorldPosition (games/gs1/include/map.h) is the repeated 12-byte {x,pad,y}-shaped stack scratch built from actor->values_08[0..2] before each Func_0800447c/Func_080120dc pair.","Func_0800447c":"void Func_0800447c(s32 magnitude, s32 angle, struct WorldPosition *out) - confirmed against three independently exact owners (games/gs1/recon/en/main/08098698.c, 080999f0.c, 08098cd8.c): first argument is always a magnitude-shaped constant (0x80000, 0xa0000, 0xe0000, ...), second is the angle.","Func_080120dc":"already recon'd exactly (games/gs1/recon/en/main/080120dc.c): s32 Func_080120dc(struct MapObject *object, struct MapPosition *position). MapObject and MapPosition are both narrower views of the same ScriptObjectEntry/WorldPosition shapes (map_layer@34 falls inside ScriptObjectEntry.unknown_22).","Func_0800eba0":"already recon'd exactly (games/gs1/src/runtime/geometry/check_radius_overlap.c): s32 Func_0800eba0(s32 *a, s32 arg1, s32 *b, s32 arg3), a proximity/radius test used both by Func_0800d924 and directly inside this function's own 64-entry scan.","flag_table_globals":"Data_03001f54 (volatile u8 flag byte), Data_03001ae8 (volatile u32 input/mode flags, per games/gs1/src/menu/run_selection.c and games/gs1/src/overlays/command_table/run_directional_input.c), Data_02000240 (u16[] key-mask/setting table, per games/gs1/src/field/check_configured_keys.c), Data_03001810 == ResourceBlockOwners (types.h macro) - a 512-byte block-owner table whose 0xff-byte count is checked here against a threshold of 136 before playing Audio_PlayCue(135) (types.h: Audio_PlayCue == Func_080f9010). Data_08013254 is a 16-entry s16 facing-angle table indexed by (Data_03001ae8>>4)&0xF, the same nibble-index idiom already proved exact in games/gs1/src/battle/effects/get_cycled_table_word.c (against a different table at the same pattern).","busy_wait_idiom":"The four plain decrement loops (512, then 95/63/63 each as 'do { count--; } while (count >= 0)') reproduce byte-for-byte against the already-adopted idiom in games/gs1/src/runtime/wait/run_busy_wait_delay.c, confirming GCC 2.96 preserves an un-volatile counting loop verbatim at this project's compile flags."},"current_draft_state":"games/gs1/recon/en/main/0800ebec.c now contains a full structural draft of the whole span: prologue flag/busy-wait/speed setup, the head 5-point angle fan, Region_0800ee14 nested 6-candidate x 5-point fan search, the 64-entry scan with its post-match follow-up block (Func_0800d924/Func_080044d0/Func_080120dc chain and entry sentinel writes), the blocked/handled dispatch, the blocked-vs-clear tail split, and Fragment_0800f1fa spawn/dispatch tail through Func_0800eaf8 and the corrected return value (1). It compiles clean (no warnings) and scores candidate=1712 reference=1804 dh=867 (see best_score.note for the fixes applied and the specific remaining gaps: entry-order/register-pressure mismatch at the very top of the function, several best-guess literal constants in the follow-up block, the not-yet-implemented Data_03001ebc_a debug shortcut, and the actor+100/+102/r10 register-reuse question). Not byte-exact; do not run make verify or adopt.","refuted_hypotheses":["Treating 0800ebec as a self-contained 552-byte owner: rejected. Its real C body has no return before the point where control reaches sub_0800ee14 with the frame still live, so any standalone candidate's prologue/epilogue shape cannot match past the initial flag/busy-wait/speed-setup prologue material.","Treating 0800ee14/0800ef44/0800f0c6/0800f1fa as independently callable functions: already rejected by the sibling's games/gs1/recon/en/dossiers.json#main:0800ee14 for the same live-register/live-frame reason."],"2026-08-29_pass_note":"Continued from the 2026-08-29 alignment pass (candidate=1668 reference=1804 dh=871 wrong_instructions=768, unchanged this pass - no net source edit landed). Work this session: (1) Re-verified the pc-relative literal pool in games/gs1/asm/0800ee14.s directly against its trailing .4byte block (0x0000/0xfffff000/0xffffe000/0xffffd000/0x03001e64/0xff000200/0x03001ebc/0x02000240) - these are ground-truth literal source, not displacement-guessed, so no assemble+objdump-with-parity step was actually needed for them (the dossier's open item calling these 'unverified' was stale); they already match the .c exactly (region_search deltas of +-0x1000/0x2000/0x3000, and the 0xff000200 flags mask). (2) Traced the sub_0800eba0 call site at asm ~0800ee14.s:183-209 register-by-register: r6 is reassigned to entry+8 (values_08 pointer) at line 182 ('adds r6, #8') before this block, so 'adds r0, r6, #0' passes entry->values_08 (not the raw entry pointer as first suspected) and 'ldr r3,[r6,#80]' at line 212 is entry->values_08+80 = entry+88 - both exactly match the existing C (Func_0800eba0(entry->values_08, actor->value_20-2, posC, entry->value_20-2) and *(u32*)(base+88)). No bug found there; false alarm from reading the block before seeing the r6 reassignment. (3) Traced Region_0800ee14's own 6x5 fan-out loop (asm lines 46-159) against the C's region_search for-loop: structurally identical (6 iterations via r9, 5 Func_0800447c/sub_080120dc point checks per iteration each guarded by pc-relative or shifted-immediate deltas, falling through to the same posA-store + blocked_flags|=1 tail on exhaustion, then into the shared success_tail Func_0800447c(0x40000,...) call) - no missing block found, current draft's region_search is structurally sound. (4) Tested the hypothesis that hoisting all nested-block locals (count/p/n, dead_signed_facing, dist, dy/dx/angle_raw/angle_signed/angle_u16, diff/field6, global_table/spawned_flag/facing_final/spawned/r5/v, record/kind) to function scope would change GCC 2.96's stack slot count/assignment, since the reference frame is 'sub sp, #104' (0x68) vs the candidate's 'sub sp, #76' (0x4c) - a 28-byte/7-word gap that is very likely the dominant driver of the huge wrong_instructions/omitted-diff cascade (frame-relative offsets shift for the whole rest of the function once matched_prefix is passed). Result: REFUTED - rescoring after the hoist produced byte-identical candidate=1668/dh=871/wrong_instructions=768, zero change. GCC 2.96's stack slot lifetime and count at -O2 is liveness-driven, not C-block-scope-driven, for this function shape; narrowing or widening lexical scope of these particular locals is not a lever. (5) Ran bun tools/allocator-lens/lens.ts 0800ebec: 510 pseudos in this function, global order starts '332 544 40 546 459 422 32 502 505 486 52 425 51 36 499 340 485 50 355 246 466 467 253 451 37 462 173 363 460 554 33 350 39 102 553 318 108 484 336 549 550 98 42 34 35' - not yet correlated pseudo-by-pseudo against the missing 7 stack words; this is the next concrete lever (find which pseudos spill to stack in the reference-shaped 104-byte frame that don't in the 76-byte candidate frame, per games/gs1/CONTRIBUTING.md's 'Read the compiler first' order: local-alloc.c/global.c spill decisions, not more source guessing).","2026-08-29_no_sr_route_pass":"Coordinator directed re-verification under the NEW route: this file is now in NO_STRENGTH_REDUCE_SOURCES, so plain 'candidate-show ... --align --first' already compiles with -O2 -fno-strength-reduce (no --flags needed). Re-ran the exact scoring_command fresh: baseline dh=814 (matches the compiler_divergence.flag_candidate.evidence claim of 860->814 for this owner, and all four busy-wait loops now emit correctly - confirmed by direct .s inspection, no more DCE'd loops). Ran >=25 further scored candidate-show iterations this session. Landed 2 real fixes (busy-wait pointer-increment reorder, mask-reuse for the opaque loop trip count - both detailed in best_score.note above), taking dh 814->808 and wrong_instructions ~599->597. Re-tested prior refutations explicitly under the new route: (a) blocked_flags/handled_flags declaration-order swap and combined-assignment ('blocked_flags = handled_flags = 0') - zero effect, CONFIRMED still refuted under SR-off. (b) mode declared first vs after flags - zero effect, CONFIRMED still refuted. (c) i/entry/base/p100 declaration order - zero effect, CONFIRMED still refuted. (d) extra[] size sweep (0/4/5/6/8/9/10 vs the working 7) - every non-7 size regresses wrong_instructions from 597 to 609 uniformly, CONFIRMING extra[7] remains the unique frame-padding size under the new route too (same finding as the old SR-on dossier, now re-verified independently). NEW divergence found and NOT yet resolved: posC, which matched the reference exactly at sp+68 under the OLD SR-on route, is now observed pinned at sp+0 ('mov r3, sp', no offset add) under every declaration-order permutation tried this session (posA/posB/posC/deltas/extra reordered six ways) - the old dossier's 'posA=92,posB=80,posC=68 all exact simultaneously' claim does NOT hold under the new route; only posA and posB still land exactly. A parallel objdump-level comparison (arm-none-eabi-objdump -D -b binary -m arm -Mforce-thumb --adjust-vma=0x0800ebec on the work-dir candidate.bin/reference.bin, more granular than the capped 48-line --align window) additionally found that 'mode' is spilled to a stack slot (sp+8) in the reference instead of staying register-resident, and the reference's blocked_flags/handled_flags occupy sp+20/sp+16 while the candidate's single early flag store lands at sp+24/sp+... - i.e. the whole scalar spill-slot assignment (which locals get a stack slot at all, not just array offsets) differs between the two routes, not just array layout. This is a genuine open lever this session did not close: per CONTRIBUTING.md's 'Read the compiler first', the next step is reading local-alloc.c/global.c's spill-decision code directly (not more declaration-order guessing, which is exhausted for this residual) to understand why GCC 2.96 -fno-strength-reduce spills mode/handled_flags to stack here when the SR-on route did not.","next_steps":["Current best (2026-08-29, fragment_tail_gate pass): candidate=1718 reference=1804 dh=804 wrong_instructions=599 matched_prefix=7. This session's genuine fix (moving the mode/p100-write and actor+102 toggle inside the 'if(spawned!=NULL)' gate, per 2026-08-29_fragment_tail_gate_pass) is a verified correctness repair, not a score-chasing edit - kept despite wrong_instructions rising from 592 to 599 (pool-offset/branch-target churn downstream of the byte-count change), per the task's ground-truth-first priority.","PRIOR (superseded) note, angle-cast pass: candidate=1728 reference=1804 dh=804 wrong_instructions=592 matched_prefix=7. Frame size sub sp,#104 exact; posA=92 and posB=80 exact, but posC is NOW pinned at sp+0 under this route (regression from the old route's posC=68 - see 2026-08-29_no_sr_route_pass) and mode/handled_flags spill-slot assignment also differs from the old route. NOT byte-exact; do not run make verify.","PRIOR-ROUTE CAVEAT: every score and offset recorded before 2026-08-29_no_sr_route_pass (863/860/etc, and the posA=92/posB=80/posC=68-simultaneously claim) was measured under the OLD route with strength reduction ON. The scoring_command now compiles with -fno-strength-reduce automatically; do not reuse old-route numbers or offset claims as current ground truth without rechecking, as demonstrated by posC's regression above.","TOP OPEN LEVER: the second busy-wait block (Data_03001ae8 & 0x200 -> four countdown loops of 0x200/95/63/63) is entirely dead-code-eliminated by GCC 2.96 in the candidate because it has no observable side effect, but the reference asm (games/gs1/asm/0800ebec.s lines ~55-79 and 0800ee14.s) clearly retains it as a pure register-only loop with zero memory traffic. volatile and static both force the loop to survive but add wrong memory-traffic instructions (regressions to 645/633 respectively, reverted). Needs either a source shape that is provably side-effect-having to the optimizer WITHOUT adding real instructions in the retained code (not found this session), or a flag-level explanation (out of scope for a single file, needs Pascal's decision per CONTRIBUTING.md's compiler-change policy) - do not keep guessing source shapes blindly; if attempting again, dump the RTL/cse passes for this specific block via -da and read exactly which GCC pass deletes it before trying another source nudge.","The deltas slot sits at candidate offset 28 vs reference 24 (4 bytes off) - six extra[N] sizes (6,7,8) were tried this session and none closed this without breaking posA/posB/posC or growing the frame past 104; this residual is likely tied to the same unresolved 'extra[7] dead placeholder' semantic gap from the 2026-08-29_frame_gap_pass (28 bytes with no traceable read/write anywhere in the three retained .s files) rather than a pure ordering fix.","matched_prefix is stuck at 7 due to a GCC-2.96-at-O2 scheduler artifact - see entry_order_investigation for the full RTL/sched2 trace. Confirmed (again, per task's non-lever list) not fixable by source reshaping alone.","Once wrong_instructions keeps dropping toward 0, iterate with bun tools/allocator-lens/lens.ts 0800ebec for the halfword-level register-choice residuals (510 pseudos recorded, global order captured in the 2026-08-29_pass_note entry) - this pass ran lens.ts again and confirmed the same 510-pseudo shape, no new correlation attempted this session due to time.","Once exact end to end (dh=0 against --size 1804), run make verify, then add production paths for main:0800ebec, main:0800ee14, and main:0800f1fa in games/gs1/source-paths.json all pointing at the same source. Do not commit; report only."],"2026-08-29_pointer_reuse_pass":"Coordinator directed a re-read of the reference frame's four position-triple sites (sp+24/68/80/92) instead of continuing register-pressure archaeology. Read games/gs1/asm/0800ebec.s and games/gs1/asm/0800ee14.s directly (ground truth, not by-eye guessing) and traced every pointer register across both files: (1) sp+24/r10 is NOT a position triple - it is the s16[6] deltas table ('add r3,sp,#24; mov r10,r3' at Region_0800ee14 entry, filled via strh with the six +-0x1000/0x2000/0x3000 offsets, later read back via ldrsh in the region_search loop) - this already matches the draft's existing function-scope-independent `deltas[6]` local exactly, no change needed. (2) sp+92/r11 is taken ONCE at FunctionHead_0800ebec (0800ebec.s:161-165, 'movs r3,#92; add r3,sp; mov r11,r3') and used for the head's FIRST fan point (dir itself, before the +-0x1000/+-0x2000 secondary checks) and for the paired Func_080120dc call; Region_0800ee14 then copies this same r11 into r8 at its very entry ('mov r8,r11', before r11 is ever reassigned) and reuses it for the region_search loop's point-0 (deltas[i] itself) in every one of the 6 iterations, and again for the exhaustion-fallback actor-position store when the loop runs out. This is exactly the draft's existing `posA` local BUT the region_search loop was wrongly using `posB` for its point-0 check instead of `posA` - fixed by switching the loop's first Func_0800447c/Func_080120dc pair (the deltas[i] candidate itself, before the +-0x1000/+-0x2000 secondary checks) from posB to posA, matching r8=r11=sp+92 in the reference. (3) sp+80/r5 is retaken three times (0800ebec.s:198, 0800ee14.s:73, 0800ee14.s:227) for the head's and region_search loop's SECONDARY 4 fan points (+-0x1000/+-0x2000) and for the entry-scan follow-up block's repeated position copy - already matches the draft's `posB` exactly, no change needed there. (4) sp+68/r11 is RETAKEN (not the same lifetime as (2)) at Region_0800ee14's .L_0800ef44 ('add r3,sp,#68; mov r11,r3') immediately after the region_search loop ends, and used only for the success_tail Func_0800447c(0x40000,final_dir,...) write and the subsequent Func_0800eba0 proximity-check argument in the entry scan - already matches the draft's `posC` exactly, no change needed. Net: the only real bug was the region_search loop's point-0 check reusing posB instead of posA; fixed with a 6-line edit (two store blocks and their Func_0800447c/Func_080120dc argument, unchanged elsewhere). Rescored: candidate 1668->1676 bytes, differing_halfwords 871->863, wrong_instructions 768->641, matched_prefix unchanged at 7, frame still 'sub sp,#76' vs reference 'sub sp,#104' (unchanged, still the dominant open gap). This is a genuine, ground-truth-verified fix, not a guess - all four addresses' lifetimes were traced instruction-by-instruction in the .s files above before editing.","2026-08-29_frame_gap_pass":"Coordinator directed testing whether sp+36..67 (32 bytes, isolated by the frame ledger: sp+0..35 = scalars+deltas, sp+68..103 = the three position triples) is an undiscovered 32-byte local. Exhaustively grepped all THREE retained .s files (0800ebec.s, 0800ee14.s, 0800f1fa.s) for every 'sp, #' and 'add r?, sp' occurrence - confirmed no instruction anywhere in the 1804-byte span touches sp+28..67 by any addressing path (direct str/ldr immediate, or an address-taken-then-offset register). Also fully read Fragment_0800f1fa.s for the first time this investigation (previously only referenced by inference): it contributes no new position triple - its three 'add rX, sp, #20' sites all read/write the *low byte or halfword of blocked_flags* (already-known sp+20 scalar, matches draft's *(u8*)(spawned+85)=(u8)blocked_flags, *(u8*)(r5+38)=(u8)blocked_flags, and the v=*(u16*)(actor+102) reset-to-blocked_flags idiom already in the draft) - no bug found there, but this closes out the last unread corner of the three files, so the semantic search for a 5th/6th triple came up empty: nothing in the three .s files reads or writes sp+36..67. Empirical test per coordinator's cheap-compile-and-check protocol: added a plain unused local aggregate and swept its size - s32 extra[8] (32 bytes) produced 'sub sp,#108' (4 over), s32 extra[7] (28 bytes) produced exactly 'sub sp,#104' matching the reference prologue byte-for-byte. This confirms GCC 2.96 at -O2 reserves a full stack slot for a declared local array even with ZERO loads/stores against it (the array is never scalarized/DCE'd away at this optimization level) - the frame-size lever is real and the missing amount is 28 bytes, not 32 (the coordinator's 32-byte estimate was the sp+36..67 window's raw size; alignment padding inside that window, not a 32-byte payload, accounts for the last 4 bytes, exactly as the coordinator predicted). Then swept declaration order (posA/posB/posC/extra permutations, 6 distinct trials) to try to land the three triples on their exact reference offsets (posC=68, posB=80, posA=92) simultaneously: order 'deltas, posB, posC, posA, extra[7]' achieves posA=92 and posB=80 EXACTLY matching the reference, and posC=56 (off by -12, i.e. one triple-width short of 68) - the closest of all six orderings tried; every other permutation tried (posC before posB with extra at tail: posB=68/posC=56; extra immediately after deltas: posB=52/posC=28; extra before deltas: posA regressed to 64; inserting a 4th 12-byte dummy local between posC and posA to explicitly try to push posC up: posC dropped further to 44, the opposite of the intended direction) moved posC away from 68 or broke posA/posB, so this is not a simple monotonic lever - GCC 2.96's frame_offset assignment for same-sized adjacent arrays does not appear to be a simple function of declaration order alone once more than 3 arrays compete for adjacent stack slots. Rescored with the best-found layout (deltas, posB, posC, posA, extra[7]): candidate=1676 (unchanged from previous pass - extra[] contributes zero bytes to the compiled/differenced code since it is truly dead), differing_halfwords=863 (unchanged), wrong_instructions 641->637->631 across the frame-size fix and the posA/posB offset corrections (two small but real drops, confirming frame layout was a live contributor as the coordinator predicted, not just cosmetic), matched_prefix unchanged at 7. Honest semantic conclusion (coordinator explicitly required this, not a plausible-but-unused guess dressed as certainty): the 28 extra bytes are NOT explained by any traceable behavior in this span - no code anywhere in the 1804 bytes reads or writes them. It is left in the source as `s32 extra[7];`, an intentionally inert placeholder documented as such, because (a) it is required to hit the reference's exact 'sub sp,#104' frame size and two of three triple offsets, which measurably reduced wrong_instructions, and (b) no candidate semantic (a 5th/6th fan point, an 8-halfword table, entry-scan scratch) survived the exhaustive per-.s-file address trace - if a real local exists here its accesses must be either fully register-allocated with no memory footprint at all (which would make it invisible to this address-trace method entirely and mean the 28 bytes are pure padding/slack from the allocator's slot-size rounding for a different, register-resident variable) or it genuinely is dead source in the original game code. This should be flagged to the coordinator as an open item rather than adopted as settled fact. posC remaining 12 bytes off (56 vs 68) is the current single largest known-precise gap and the next concrete lever - it did not yield to naive declaration-order sweeps and likely needs local-alloc.c source reading (per CONTRIBUTING.md's 'Read the compiler first') to understand GCC 2.96's exact frame_offset assignment order for consecutive same-size aggregates, rather than more blind permutation.","entry_order_investigation":"Per coordinator direction, ran bun tools/allocator-lens/lens.ts 0800ebec and cross-referenced the kept GCC dump directory (0800ebec.c compiles with actual staged gcc-2.96 cc1 at -O2, confirmed by reading tools/allocator-lens/lens.ts - this is not a custom allocator, it is real GCC). RTL pseudo 32 = the incoming actor parameter (reg/v:SI 32 <- r0), created by the very first frontend insn (insn 4), BEFORE the blocked_flags/handled_flags zero-stores (insn 12/15) - so the source-level order is already correct at the RTL-generation stage, matching the reference asm. The divergence happens at instruction SCHEDULING (in.i.23.sched2 dump): the list scheduler's block-0 ready list at t=0 is '4 18 12 3459' (insn4=r7:=r0, insn12=first zero-store, insn3459=stack-pointer adjustment, insn18=literal-pool load) and it picks insn3459 then insn12 before finally scheduling insn4 at t=10, right before the branch - i.e. GCC's own priority heuristic ranks the parameter copy LOWER than the stack setup and zero-stores in this specific function shape, even though insn4's result (r7) has by far the largest number of later uses in the function. Tried three source-level nudges and re-scored each: (a) swap store order (handled_flags=0 before blocked_flags=0), (b) combine into one assignment (blocked_flags = handled_flags = 0), (c) hoist a dummy 'base = (u8 *)actor;' statement to the very top. None moved matched_prefix past 7 or changed dh/wrong_instructions at all - GCC's cse/combine passes normalize all three variants to the same RTL before scheduling ever sees them. Conclusion: this specific 7-instruction prefix mismatch is very likely NOT fixable by reshaping these particular statements; it is downstream of the function's overall register-pressure profile (515-535 pseudos observed across drafts, sensitive to total local/temporary count), and probably will resolve on its own once the much larger remaining wrong_instructions gap (768) is closed by content fixes elsewhere - or requires a scheduler-priority lever (e.g. deliberately increasing/decreasing live-range length of the actor parameter by moving its first REAL use earlier) that was not tried this pass due to time.","2026-08-29_declaration_order_pass":"Ran 21 scored candidate-show iterations this session sweeping local-variable declaration order per CONTRIBUTING.md Read the compiler first (read assign_stack_local_1 in alchemy-gcc/agscc/gcc/function.c directly rather than guessing). Confirmed empirically: assign_stack_local_1 processes locals in source declaration order for arrays needing a stack slot (scalars mostly stay register-resident and do not participate in this ordering); each processed array subtracts its size from frame_offset (FRAME_GROWS_DOWNWARD) so the FIRST-declared array gets the HIGHEST final sp offset and each subsequent array gets progressively lower offsets. Final layout achieving all-three-exact: posA(1st,92) posB(2nd,80) posC(3rd,68) deltas(4th,28 vs ref 24) extra[7](5th/last, dead 28-byte placeholder needed to hit the reference sub sp,#104 total - see prior 2026-08-29_frame_gap_pass entry for why this placeholder exists and its unresolved semantic identity). Net result: wrong_instructions 631->629, dh unchanged at 863. Also investigated (and reverted, both regressed) two attempts to stop GCC dead-code-eliminating the second busy-wait block (if (Data_03001ae8 & 0x200) { count=0x200; do{count--;}while(count!=0); ...three more countdown loops...}): the candidate currently drops this ENTIRE nested if-block (including the outer &0x200 test) because it has no observable side effect and standard C DCE is entitled to remove it, whereas games/gs1/asm/0800ebec.s and 0800ee14.s (ground truth, verified by direct read) show the reference keeping it as a pure register-only decrement loop (movs r3,#0x200 / subs r3,#1 / cmp r3,#0 / bne, no stack traffic at all). Tried declaring the loop counter volatile (retains the loop but forces a stack store every iteration - wrong shape, wrong_instructions rose to 645, dh improved to 840) and declaring it static (same problem, a .bss load/store per iteration, wrong_instructions 633, dh 835) - both REVERTED as net regressions on the primary wrong_instructions metric even though both improved raw dh. This is flagged as an OPEN LEVER for a future pass: the fix is probably not a local C reshape but either (a) a source shape not yet tried that GCC 2.96 cannot prove side-effect-free while still keeping the loop purely register-resident (no memory traffic), or (b) evidence that this file used a different optimization level in the original build (a compiler-flag question, out of scope for a single-file candidate edit - flag changes require Pascal's decision and family-wide measurement per CONTRIBUTING.md). Every other declaration permutation tried this session (posA/posB swap, posA/posC swap, blocked_flags/handled_flags swap, mode/angle_q16 swap, dir/final_dir swap, deltas/extra relative order, i/entry/base/p100 order) either regressed (633-645) or had zero effect on the score.","2026-08-29_busy_wait_source_fix_pass":"Applied the coordinator-proven source-reachable half of compiler_divergence: changed ONLY the first countdown loop's counter from a constant (count = 0x200) to count = Data_03001ae8 (the same flags word already tested by the enclosing 'if (Data_03001ae8 & 0x200)' guard) - this opaque, non-constant trip count survives GCC 2.96's -O2 dead-loop deletion per the minimal-reproducer proof in compiler_divergence, and rescoring confirms it: differing_halfwords 863->860, wrong_instructions 629->623 (net -3dh/-6wi, both real improvements, no regression elsewhere). The other three loops (95/63/63) were left untouched as directed - they are constant-trip and provably deleted by this project's staged cc1 regardless of spelling (compiler_divergence's own minimal-reproducer sweep), so their residual (~12-15 halfwords) is a documented, non-source-fixable flag question, not a bug in this file. Tried and reverted two further busy-wait variants this pass: (a) caching Data_03001ae8 into a local 'flags' variable and testing/seeding count from that local instead of two direct volatile reads - regressed to dh=862/wi=627 (the two-separate-volatile-read shape is apparently what the reference's own register scheduling expects here, confirmed empirically, reverted). (b) mode/blocked_flags declaration reorder (moving 'mode' first) - zero effect on score, reverted to keep the documented order. Also re-verified against games/gs1/asm/0800ee14.s lines 255-290 that the entry-scan follow-up block's apparently-duplicate 'if (Func_080120dc(entry, posB) != 0)' call with no intervening Func_0800447c/store (0800ebec.c lines 300-308) is NOT a bug: the ground-truth asm shows the exact same back-to-back 'bl sub_080120dc / cmp r0,#0 / bne .L_0800f092' pair with nothing between them, so the current draft already matches this quirk correctly.","2026-08-29_pseudo_crossref_pass":"Coordinator directed the mode/blocked_flags/handled_flags pseudo-to-variable cross-reference named as the next step. Ran bun tools/allocator-lens/lens.ts 0800ebec -fno-strength-reduce and read the kept dump dir (/var/folders/.../lens-0800ebec). In in.i.00.rtl: pseudo 32 = actor param (insn 4, reg/v:SI 32 <- r0); pseudo 33 = blocked_flags (insn 12, const_int 0); pseudo 34 = handled_flags (insn 15, const_int 0); pseudo 35 = mode, confirmed by its three constant stores at insns 239/256/292 matching the source's mode=5/mode=2/mode=5 exactly. In in.i.17.lreg: pseudo 35 (mode) costs GENERAL_REGS:18 vs MEM:40 (set 3x, used 5x, crosses 43 calls); pseudo 33 (blocked_flags) GENERAL_REGS:240 vs MEM:496 (set 9x, used 38x, crosses 45 calls); pseudo 34 (handled_flags) GENERAL_REGS:40 vs MEM:88 (set 2x, used 7x, crosses 36 calls). All three conflict with ~176 other pseudos each (nearly the whole function) per in.i.18.greg's conflict lists, and global.c's allocation-order list processes them last (34 and 35 are the final two entries of the 48-reg-to-allocate list, 33 is 34th) - i.e. by the time they're reached, LO_REGS supply for this pass is largely exhausted by higher-priority (larger-savings) pseudos processed first. CORRECTED FINDING (supersedes 2026-08-29_no_sr_route_pass's objdump claim): a fresh read of in.i.18.greg's actual insn-level output (not just the spill-insn list) shows mode (pseudo 35) IS ALREADY spilled to memory in the current candidate, at every one of its three stores (insns 2324/2327/2330: 'str rX, [sp, #20]' after loading the constant into r3/r1/r2) - the earlier objdump-based claim that mode stayed register-resident in the candidate was stale, measured against a prior source revision. blocked_flags (pseudo 33) DOES get a permanent hard register (r9) in the candidate ('mov r9, r1' at former insn 12's replacement), unlike the reference which spills it too (reference emits 'str r0, [sp, #20]' AND 'str r0, [sp, #16]' back-to-back for both flag zero-inits, per the --align diff without --first). handled_flags (pseudo 34) is already spilled in both (candidate: sp+24; reference: sp+16). So the ACTUAL open divergence at the prefix is narrower than previously stated: only blocked_flags's register-residency (r9) differs from the reference's stack residency, not mode's. This is a pure register-pressure/allocation-order artifact of global.c's per-pseudo processing order (confirmed structurally, not tested by further source reshaping this pass since entry_order_investigation and 2026-08-29_declaration_order_pass already exhausted every plain declaration-order and combined-assignment permutation at this site with zero effect on matched_prefix, which is a scheduler/allocator-order artifact per entry_order_investigation, not a spelling gap) - documented as part of the function's floor at matched_prefix=7 pending a possible future allocator-order-class repair (not a source respelling), per CONTRIBUTING.md's routing rather than further guessing.","2026-08-29_align_sweep_pass":"Per coordinator direction, since the entry-region residual is confirmed pressure/allocator-order (not a source lever) and every declaration-order permutation at that site is already documented as refuted, spent the remaining budget running >=20 further scored candidate-show iterations against the --align diff below the entry region, each on real C-visible structural candidates (never touching declaration order alone without a still-untried combination, never forcing register/scheduling directly). All reverted as measured no-ops except one regression: (1) dx/dy computation order swap in the entry-scan angle block: no effect (808/597). (2) dy/dx/angle_raw/angle_signed/angle_u16 declaration order (angle_u16 first): no effect. (3) angle_u16 computed before angle_signed (swap statement order, not just declaration): no effect. (4) field6-before-diff declaration order in the blocked_flags&3 tail block: no effect. (5) kind-before-record declaration order in the else-if blocked_flags tail: no effect. (6) angle_q16-before-mode top-level declaration order: no effect. (7) posB-before-posA array declaration order (5th declaration-order combination beyond the 6 already tried in 2026-08-29_frame_gap_pass): wrong_instructions REGRESSED 597->605, reverted immediately - confirms frame_offset assignment for the competing same-size arrays is non-monotonic in declaration order, consistent with the frame_gap_pass's prior finding, not a new lever. (8) entry->flags_59-check-before-entry->data-NULL-check guard order in the 64-entry scan loop: no effect (both guards are pure reads, ground truth already matches the data-then-flags order so this was a legitimate real-code test, not just cosmetic - reverted to keep the ground-truth-matching order since it scored identically and is more defensible). (9) blocked_flags==0-first vs handled_flags!=0-first in the tail_merge guard's && condition: no effect, reverted to the clearer original spelling. (10) global_table/spawned_flag declaration swap in fragment_tail: no effect. (11) spawned/r5 declaration swap: no effect. (12) if/else vs ternary spelling for 'mode==5 ? *p100=12 : *p100=18': no effect. (13) hoisting the innermost 'u16 v' local from its nested block to fragment_tail scope: no effect - reinforces the earlier frame_gap_pass finding that GCC 2.96's stack-slot/register assignment for this function is liveness-driven, not lexical-scope-driven, and extends it to a register-class (non-array) local, not just arrays. Net result: dh unchanged at 808, wrong_instructions unchanged at 597, file byte-identical to session start (confirmed via diff against a pre-session backup) - no net source edit landed this pass. This exhausts essentially all remaining single-statement/declaration-order permutations reachable without forcing the allocator or inventing unverified semantics; the large remaining wrong_instructions=597 residual is concentrated in the region_search/entry-scan fan-out block's WorldPosition angle-cast idiom (repeated 'asrs/lsls #16' truncation-then-widen sequences at multiple call sites, visible in the --align-without-first diff), which does not yield to declaration or guard reordering and needs either a genuinely different expression shape for the (s16)/(u16) angle cast round-trip or is itself a downstream consequence of the still-open blocked_flags register-residency difference recorded above - flagged as the next concrete lever for a future pass with more RTL-tracing budget, not resolved this session.","2026-08-29_angle_cast_pass":"Coordinator directed working the region_search/entry-scan fan-out block's repeated (s16)/(u16) angle truncate-then-widen idiom, named in 2026-08-29_align_sweep_pass as the dominant remaining residual. Read games/gs1/asm/0800ee14.s lines 46-159 (region_search fan-out) and its literal-pool angle table load ground truth directly and mapped every lsl #16 / asr #16 / lsr #16 pair against the draft: (1) the six-candidate deltas[] table (asm lines 46-90, 'ldrsh r1,[r10,r3]' then 'lsls r1,r1,#16 / lsrs r6,r1,#16') is a SIGNED table load (ldrsh) immediately re-widened UNSIGNED (lsrs) for the Func_0800447c angle argument, and the four +-0x1000/+-0x2000 offset variants at each candidate add the offset to the already-widened r6 raw (no further shift) - the draft's `cand = deltas[i]` (s16 array, sign-extends on load matching ldrsh), `cand_u16 = (u16)cand` (matching lsrs), and `cand_u16 +- 0xN000` (raw int add, matching the no-rewiden adds) were already exactly right, no bug found there. (2) The entry-scan follow-up's angle_raw/angle_signed/angle_u16 block (asm lines 231-238: 'lsls r0,r0,#16 / asrs r2,r0,#16' then 'lsrs r0,r0,#16') already matches the draft's `angle_signed=(s16)angle_raw` (asrs) and `angle_u16=(u16)angle_raw` (lsrs) exactly - also no bug. (3) The REAL mismatch was upstream of the fan-out, in the FunctionHead's angle_q16 setup (games/gs1/asm/0800ebec.s ~line 195-215, before Region_0800ee14 is ever reached): the draft's guard `if ((angle_q16 >> 16) == (s16)0xffff)` compiles as dir<<16 followed by an ARITHMETIC asrs>>16 (sign-extend) purely to build the comparison operand, matching neither of the reference's two actual instructions at this site: the reference computes angle_q16=dir<<16 and stores the UNSHIFTED value (str r3,[sp,#4]), then separately does an UNSIGNED lsrs>>16 (zero-extend, not asrs) against a pooled 0xffff literal for the comparison - i.e. the reference's guard is `((u32)angle_q16 >> 16) == 0xffffu`, a logical shift + unsigned compare, not the arithmetic-shift/signed-compare the draft had. Fixed by changing the condition to `if (((u32)angle_q16 >> 16) == 0xffffu)`; rescored: dh 808->804, wrong_instructions 597->592 (matched_prefix unchanged at 7, frame unchanged at sub sp,#104) - a real, ground-truth-verified drop, isolated by rescoring the sign-fix alone. (4) Also tried adding the reference's neighboring dead store at this same site (games/gs1/asm/0800ebec.s: right after the Data_03001f54 check, the reference computes and stores `(s16)angle_q16` to sp+12 unconditionally before testing Data_03001ae8&0x200, with no read anywhere in the three retained .s files - the same shape as the already-known unread sp+12 dead stores at 0800ee14.s:51 and 0800ebec.s:272) as a plain unused local (`s16 head_angle_signed = (s16)angle_q16; (void)head_angle_signed;`) inside the `if (Data_03001f54 != 0)` block: rescored identically at dh=804/wi=592, ZERO effect - REFUTED as a source-reachable lever here (GCC 2.96 DCEs the unused local regardless of placement, consistent with prior volatile/static attempts elsewhere in this file regressing instead of matching); reverted, keeping only the sign/comparison fix. Ran >=20 further scored candidate-show iterations this session verifying the fan-out block's other cast sites (dir/(u16)angle_q16 at region entry, deltas[6] declared type s16 sign-extending on read via ldrsh matching the reference's array element width, facing_final=(u16)(angle_q16>>16) matching asm line 172's lsrs, and the blocked_flags&3 diff clamp at asm lines 421-426 which already matches the draft's `(s16)((u16)(angle_q16>>16) - *field6)` unsigned-subtract-then-signed-widen shape exactly) - all confirmed already correct, no further mismatches found in this idiom family. The three unread sp+12 dead stores (0800ee14.s:51, 0800ebec.s:187 [the one just fixed], 0800ebec.s:272) remain an open, non-source-reachable artifact - flagged for a future pass needing local-alloc.c/flow.c DCE-retention reading rather than more declaration or placement guessing, per CONTRIBUTING.md's compiler-first order.","2026-08-29_fragment_tail_gate_pass":"Coordinator directed continuing the positional descent of the full --align diff (no --first) past the documented floors (entry sched2 block, blocked_flags r9-vs-spill, the three constant-trip busy-wait loops, and the pool-offset cascades downstream of those). Read games/gs1/asm/0800f1fa.s ground truth in full for the fragment_tail block. FOUND A REAL STRUCTURAL BUG (not a floor): the draft had the final 'if (mode==5) *p100=12; else *p100=18; *(u16*)(actor+102) ^= 1;' statement UNCONDITIONALLY after the closing brace of the 'if (spawned_flag!=0 && *p100==0 && blocked_flags==0) { spawned=Func_0800c150(...); if (spawned!=NULL) {...} }' block. The reference asm proves this is wrong: all three of the outer gate's failure branches ('bne .L_0800f2d8' for spawned_flag==0, '*p100!=0', 'blocked_flags!=0') and the 'beq .L_0800f2d8' for spawned==NULL branch STRAIGHT to the epilogue (bl sub_0800eaf8; ...; pop; bx), skipping the mode/p100 write and the actor+102 toggle entirely - they are NOT reached unless the whole gate passes AND Func_0800c150 returns non-NULL. Confirmed field-by-field: .L_0800f270's 'movs r2,#102; adds r2,r2,r7; mov r8,r2' is actor+102 (r7=actor throughout the fragment), matching the existing 'v = *(u16*)(actor+102)' block already correctly nested inside 'if (spawned!=NULL)'; the mode-write ('ldr r3,[sp,#8]; cmp r3,#5; ...movs r3,#12/#18...') and the final 'eors' toggle immediately follow it in the SAME .L_0800f270/.L_0800f2c6 fall-through chain, all still inside the spawned!=NULL scope, before the single shared 'b .L_0800f2d8' exit. Fixed by moving the mode/p100-write and the actor+102^=1 statement inside the 'if (spawned != NULL) { ... }' block, after the existing v-check nested block, removing them from after its closing brace. Rescored: candidate 1728->1718 bytes, differing_halfwords unchanged at 804, wrong_instructions 592->599 (a small regression on this raw metric, driven by pc-relative pool-offset and branch-target churn from the size change cascading through the whole downstream tail_merge/fragment_tail region, the same kind of prefix-cap wobble the coordinator's brief anticipates) but the post-fix --align diff at this exact site now shows near-identical instruction ORDER and branch structure against the reference (beq/bne targets track 1:1 with only register-class differences, e.g. r8 vs sl, sp+8 vs sp+20 - all already-documented floor residuals), where the pre-fix diff showed a completely different control-flow shape. Per the task's explicit priority (ground truth first, score second), this fix is kept: it corrects a genuine behavioral bug (the original game logic only ever writes *p100 and toggles the facing-flip flag when a spawn attempt actually succeeds, not unconditionally every call), not a stylistic reshape, and is verified byte-for-byte against games/gs1/asm/0800f1fa.s rather than inferred. New best_score.differing_halfwords=804 (unchanged), wrong_instructions=599 (regressed +7 from the prior 592, explained above as pool-offset churn, not a wrong fix). Ran further scored candidate-show iterations this pass testing: (a) hoisting 'actor->value_20 - 2' into a named local before the 64-entry scan's for-loop to try to match games/gs1/asm/0800ee14.s's early-computed r1 invariant at .L_0800ef72 - REFUTED: the hoist landed the load in the wrong position (colliding with the unrelated global-table lookup a few instructions earlier) and forced an extra stack spill (str to sp+4) instead of the reference's clean register-resident hoist immediately before the loop's null-check; rescored dh 804->790 but wrong_instructions 592->606, and the diff showed the new instruction sequence did NOT actually land at the reference's position - reverted immediately per the ground-truth-first rule (a coincidental dh drop from misplaced code is not a genuine match). (b) Re-verified the duplicate-looking ldrsh/ldrh pair at .L_0800f270 is not a bug: it is two separate C reads (the 'v==2' comparison read, and the later '*(u16*)(actor+102) ^= 1' statement's own independent read), which is exactly the existing two-statement structure already in the draft - no change needed there.","compiler_divergence":{"measured":"2026-08-29","finding":"The shipped compiler retains constant-trip empty countdown loops (movs #95 / subs / cmp / bge) that the staged gcc 2.96 deletes at -O2. Opaque-trip loops (count = flags) survive in both — proven by minimal reproducers compiled through dist/cc1: flags-derived count emits the reference mov r3,r2 / sub / cmp / bne shape; constant counts 95/63/63 are deleted in every spelling tried (single or distinct variables, do/while and for). No external jumps enter the loop labels, so recognition-blocking is ruled out.","consequence":"The busy-wait block can only reach byte parity via a uniform compiler flag preserving constant-trip empty loops (f014f8c-class, maintainer decision). The first loop IS source-reachable: count = flags. Estimated residual if flag lands: ~15 halfwords of the current 863.","correction":"struct_and_signature_evidence_gathered.busy_wait_idiom is stale: the idiom is NOT reproduced in this function; treat as open.","flag_candidate":{"measured":"2026-08-29","flag":"-fno-strength-reduce (bone-stock gcc option; no compiler change)","evidence":["All four busy-wait countdown loops survive and emit the reference shapes exactly, including movs #95 / #63 materializations (minimal reproducer dce3.c).","The deletion happens in the loop pass (jump count 8 -> 4 at dump 08.loop), which strength reduction enables; with the flag the pass leaves them.","Corpus blast radius: 99 of 3,958 exact production files change output under the flag — a bounded re-proving migration, not a rewrite.","Scored fresh on the giants: 0800ebec 860 -> 814; 080d4ce8 668 -> 666; others neutral."],"status":"awaiting maintainer ruling; uniform for all files per doctrine","resolution":{"measured":"2026-08-29","finding":"Global adoption is refuted by the ROM itself: 110 of 114 flag-affected exact owners lose byte identity under -fno-strength-reduce — their shipped bytes contain strength-reduced shapes no no-SR compile can emit — while this function's busy-wait loops survive no legal spelling with SR on. The original build therefore varied optimization flags per translation unit: at least SR-on for the 110, SR-off for this one. Uniform flags cannot reproduce both; this is measured, not assumed.","candidate_sweep":"276 candidates under the flag: 24 improve (loop-heavy, incl. this owner 860->814 and 080b75dc 141->123), 59 worsen, 199 neutral, none close outright.","decision_required":"maintainer: either route flags per translation unit (the agbcc precedent) or accept permanent documented floors on the no-SR files"}}}},"main:0800ee14":{"status":"blocked","measured":"2026-08-29","best_score":{"candidate_bytes":176,"reference_bytes":936,"differing_halfwords":468,"note":"Score for a standalone-function candidate; see finding below for why this cannot converge."},"finding":"0800ee14 is not an independently callable function. games/gs1/asm/0800ebec.s (FunctionHead_0800ebec, header comment: '複数領域に分割された呼出可能関数の先頭部') establishes the prologue (push r5-r7,lr / mov from r8-r11 / sub sp,#104), copies r0 (the actor pointer) into r7, and reaches sub_0800ee14 via a plain conditional branch ('bne sub_0800ee14'), not a bl. Region_0800ee14 in turn falls through/branches into sub_0800ef44, sub_0800f092, sub_0800f0c6, and finally tail-jumps to sub_0800f1fa (Fragment_0800f1fa) with a computed 'mov r12, pc / bx r4' veneer hop. All of these pieces share one live register set (r7 = actor pointer, r8/r9/r10/r11 = loop indices and scratch position pointers assigned once in the FunctionHead prologue) and one contiguous stack frame (sp-relative offsets 0-104 allocated by FunctionHead_0800ebec) and one literal pool (LiteralPool_0800edf0, plus the pool embedded inside 0800ee14.s itself before the fallthrough into 0800f1fa).","why_standalone_candidate_fails":"A GCC-2.96-compiled C function necessarily emits its own prologue, its own register/parameter setup, and its own stack allocation at the address that source is anchored to. The reference bytes at 0800ee14 have none of that: execution arrives with r7/r8/r9/r10/r11 and the sp frame already live from FunctionHead_0800ebec. No ordinary C function boundary can reproduce a mid-function branch target with a live caller-established register file; candidate-show confirms this directly (class=missing-extra-code, topology=uncovered:reference-indirect-dispatch-0x3a6, matched_prefix=0) since the compiler always inserts a prologue/parameter move sequence the reference does not have.","correct_owner_shape":"The only C source that can byte-match this region is one function spanning the whole call-graph-derived block (at least FunctionHead_0800ebec through Fragment_0800f1fa, and likely further through the trailing 'bx r4' veneer target), compiled once and matched across that whole address range as a single owner. That owner does not exist yet: FunctionHead_0800ebec (games/gs1/asm/0800ebec.s) and Fragment_0800f1fa (games/gs1/asm/0800f1fa.s) are both still retained assembly with no recon'd C, and neither appears in games/gs1/recon/translation-units.json.","struct_evidence_gathered":{"actor_param":"r7 is the same object-shape Func_080120dc (games/gs1/recon/en/main/080120dc.c) already proved: x/pad/y triple (WorldPosition, games/gs1/include/map.h) at offset 8, s32 height at offset 20, u8 map_layer at offset 34.","step_candidate":"The 12-byte {x, unused, y} stack triples built repeatedly before each sub_0800447c/sub_080120dc pair match struct WorldPosition (games/gs1/include/map.h): s32 x @0, u8[4] pad @4, s32 y @8.","sub_0800447c_signature":"Confirmed elsewhere (games/gs1/recon/en/main/08098698.c, 080999f0.c, 08098cd8.c) as void Func_0800447c(s32 angle_q16, u32 distance, struct WorldPosition *out) - projects a point at the given angle/distance from an implicit current-position global.","sub_080120dc_signature":"Already recon'd (games/gs1/recon/en/main/080120dc.c): s32 Func_080120dc(struct MapObject *object, struct MapPosition *position), returns 0 for a walkable/valid position."},"refuted_hypotheses":["Treating 0800ee14 as a standalone C function with its own prologue and an (actor*, y) parameter pair: rejected. The reference has zero prologue bytes and the compiler cannot omit one for an ordinary function, so candidate topology diverges from instruction 0 (matched_prefix=0, differing_halfwords=468 of 468 scored halfwords)."],"next_steps":["Reconstruct FunctionHead_0800ebec (games/gs1/asm/0800ebec.s) and Fragment_0800f1fa (games/gs1/asm/0800f1fa.s) as C first, as one function whose single C source spans the full 0800ebec-0800f1fa+ range.","Only once that whole-function source exists and scores exact end-to-end should games/gs1/source-paths.json gain a production path for main:0800ee14 (and the sibling Head/Fragment owners) pointing at that same source, per the existing convention for multi-label single-source owners.","Do not attempt a second isolated candidate at 0800ee14 alone; every isolated attempt will fail on topology before any statement-level scoring is meaningful."]},"main:0800fec8":{"schema_version":1,"namespace":"main","address":"0x0800fec8","status":"measured-draft","owner_bytes":140,"candidate_bytes":144,"differing_halfwords":64,"wrong_instructions":88,"classification":"field-map-metatile-row-expansion","domain":"Reads 16 consecutive field-map cells (u32 each) from the toroidal 128x128 cell array at 0x02010000 -- one fixed metatile row, walking columns -- and for each cell's low 12 bits (its metatile id, extracted with a shift-fusion '(cell<<20)>>17' that doubles as a *8 byte-stride multiply) copies an 8-byte metatile definition entry from 0x02020000/0x02020004 (top-row tile pair, bottom-row tile pair) as two raw 32-bit stores into a caller-selected VRAM screenblock (0x06002800 + a0<<11), 64 bytes (one tilemap row) apart. Confirmed independently via m2c against real project types: m2c's raw decompilation reads from 0x02010000 and writes from 0x02020000/0x02020004 in the same roles derived here by hand, from directly recomputed PC-relative literal-pool addresses in the retained assembly.","notes":["The generated family report's best guess (below the 7500/10000 adoption threshold, at 7436) was games/gs1/src/ui/window/clear_tile_attributes_in_rect.c. Read in full: it shares nothing but the generic 4-high-register push/pop prologue shape common to many owners in this compiler's output. No shared callees, field offsets, or constants. This is the same family-clustering false positive already documented on this owner's sibling (see below) -- not a genuine match, and not usable as a source-shape starting point.","This owner is the row-scanning counterpart to games/gs1/recon/en/main/0800ff54.c (Func_0800ff54, also an un-adopted measured-draft, 172 bytes). Both share the identical four-word literal pool (0x06002800, 0x02010000, 0x02020000, 0x02020004) and setup idiom: truncating-divide-by-2-then-mod-128 of a coordinate for a toroidal 128x128 source index, plus '& 30'-then-shift for a wrapped VRAM destination offset. 0800fec8 holds the source ROW fixed (from a2) and walks 16 SOURCE COLUMNS (from a1) in one call, writing a full 32-bit (2-tile) pair per iteration -- the row variant. 0800ff54 holds the source COLUMN fixed (from a1) and walks 11 source rows (from a2), writing one 16-bit tile at a time selected by an a1&1 parity bit -- the column variant, which needs the parity trick because adjacent destination rows are 64 bytes apart (not adjacent), so a paired 32-bit store isn't possible there. The two are plausibly declared in the same original source file.","IMPORTANT CORRECTION to 0800ff54.json's classification/domain text and its CopyBlock helper: that draft's C labels 0x02020000 as the source 'map' cell array and 0x02010000 as the 'colors' lookup table -- backwards. Recomputing 0800ff54.s's own PC-relative ldr targets by hand (ldr r4,[pc,#80] at instruction #40, address 0x0800ffa2 -> pc-word 0x0800ffa4 -> target 0x0800ffa4+0x50 = 0x0800fff4, which is literal slot 2 = 0x02010000) shows the row+col-indexed array 0800ff54 reads from is 0x02010000 (the field cell array, matching games/gs1/src/map/shared/get_cell_high_flags.c and games/gs1/src/map/get_cell_collision.c, both already-adopted-exact and both indexing 0x02010000 by (x + y*128)*4), and the metatile-id-indexed lookup is 0x02020000/0x02020004 -- i.e. the same role assignment established independently here for 0800fec8, both by hand-trace and by m2c against real types. This does not change 0800ff54's byte-exactness score (both literals compile to the same instruction shapes regardless of which specific address is embedded), but its prose and CopyBlock's argument naming describe the wrong array for each role and should be corrected in a future pass.","Extensive register-allocation experimentation (13 source-shape variants tried: named row/rowmod/col/colmod/destination locals in several declaration orders, do-while vs for, a helper function vs full inlining, u8* vs plain-u32 destination arithmetic, '(cell & 0xFFF) * 8' vs the shift-fusion '(cell << 20) >> 17' spelling, m2c's own flattened everything-recomputed-per-iteration shape cleaned up with casts) converged on the same wall the sibling 0800ff54 already hit and documented: the reference needs only two extra high registers across the loop (r8 and sl, holding the 0x7F/30 wrap masks, with the VRAM destination base parked in ip -- a register that never needs saving) but every source shape tried here compiles to three (r8, r9, sl -- ip never gets used for the destination base at all, forcing a third saved high register). Best result (this draft): candidate 144 bytes vs 140 reference, 64/88 differing halfwords out of 88, matched_prefix=2. Hoisting row/rowmod/destination into named locals before the loop (matching the reference's own register roles most literally) was consistently WORSE (candidate grew to 160 bytes, 78-81 differing) than recomputing them inline each iteration and only carrying col/colmod/counter across iterations, which is the shape this draft uses.","This is a global register-allocation priority difference in the approved compiler, not a local expression-shape bug -- the same conclusion 0800ff54.json's rejected_experiments reached for its own residual. No combination tried here persuaded the allocator to leave the destination base in ip the way the reference does."],"rejected_experiments":[{"experiment":"hoist row, rowmod, col, colmod, and destination all as named locals ahead of the loop (mirroring the reference's r7/sl/r5/r0/ip register roles one-for-one), in several declaration orders (a2-derived first, a1-derived first, interleaved) and with/without a CopyMetatileRow(cell, dest) static helper","result":"worse in every ordering tried -- candidate consistently grew to 160-164 bytes (vs 140 reference) and needed FOUR extra high registers (fp, r9, sl, r8) instead of the reference's two, with matched_prefix stuck at 1. The compiler never placed the VRAM destination base in ip for any of these shapes."},{"experiment":"translate m2c's raw --valid-syntax output near-verbatim (only adding the pointer casts needed to compile): no named row/rowmod/destination at all, col/colmod/counter as the only loop-carried locals, everything else recomputed from a0/a1/a2 inline each iteration","result":"candidate 148 bytes, 71/86 differing halfwords, matched_prefix=2 -- closer than the hoisted-locals attempts (three high regs: r8, r9, sl) but still one high register more than the reference, and worse than the retained candidate's 64 differing halfwords."},{"experiment":"same minimal-hoisting shape as the m2c translation, but with the metatile-index computation spelled as '(cell << 20) >> 17' (matching the reference's actual lsls#20/lsrs#17 instruction pair) instead of '(cell & 0xFFF) * 8'","result":"best result found: candidate 144 bytes, 64/88 differing halfwords, matched_prefix=2. Retained as the candidate. The '& 0xFFF' spelling reliably compiled to a literal-pool 0xFFF mask plus ands+lsls instead of the reference's shift-fusion, adding extra instructions; the explicit shift-fusion spelling matched the reference's instruction pair even though the surrounding register allocation still differs."},{"experiment":"destination as a plain u32 integer (cast to u8*/u32* only at the two store sites) instead of a u8* local; reordering the three per-iteration increment statements (col, colmod, counter) in various sequences; wrapping the two stores in a CopyMetatileRow(offset, dest) helper instead of inlining them","result":"byte-identical to the retained candidate in every case (64/88, 144 bytes) -- none of these surface-level changes affected this compiler's register allocation for this owner, consistent with 0800ff54.json's conclusion that the residual here is a register-allocator priority decision, not a local expression-shape issue."}]},"main:08010424":{"schema_version":1,"namespace":"main","address":"0x08010424","status":"measured-draft","owner_bytes":316,"candidate_bytes":292,"differing_halfwords":142,"wrong_instructions":194,"classification":"map-tile-copy-with-actor-marker-overlay","domain":"For a dest rectangle (dstX,dstY,width,height), linearly copies 12-bit tile indices from a source region of the 0x02010000 map buffer into the dest region (preserving the destination's upper 4 bits via an 0xFFFFF000/0xFFF mask-merge), and for every dest cell that falls inside one of up to 3 actor 16x12-tile bounding boxes (read from *(u8*)Data_03001e70 + 0x104, a 48-byte-stride array of {s32 x, s32 y} Q12.20 world positions, each >>20 to tile units), also copies an 8-byte, two-row marker-icon cell from a table at 0x02020000 (indexed by the copied tile's 12-bit value) into a per-actor 2048-byte-stride overlay table at 0x06002800.","notes":["The generated family report clustered this owner with template-main-0801e260 (ui/window/clear_tile_attributes_in_rect.c) at 7989 bp, but the reference assembly has none of that template's bit-clearing shape (no &0x3FF/RENDER_TILE_ATTR_OFS logic, no simple width/height nested loop). This is a family-clustering false positive; the template gave essentially no usable structural starting point.","The literal-pool constants (0x02010000, 0x02020000, 0x02020004, 0x06002800, 0x06002840) are the exact same constants this session found and used in the genuinely-related owner 0800ff54 (see games/gs1/recon/en/dossiers.json#main:0800ff54), which the same family clustering pass separately (and correctly) linked to the already-exact games/gs1/src/map/render_palette_mapped_row.c / render_palette_mapped_column.c sibling family. That is strong, independently-corroborated evidence this owner belongs to the same map/marker-overlay subsystem, not the ui/window tile-attribute-clear subsystem.","The Data_03001e70 + 0x104 workspace-array base offset is independently corroborated by games/gs1/src/unidentified/overlays/state_update/state_update_0082.c, an already-exact owner whose header comment documents 'the workspace record ... read at fixed offsets +0x106 and +0x10a from Data_03001e70 + 0x104', i.e. the same base address this owner's disassembly computes (movs r0,#130; lsls r0,r0,#1 => 260 = 0x104, added to *Data_03001e70). That owner's small s16 sub-fields at +2/+6 relative to +0x104 are consistent with (not necessarily identical to) this owner's per-actor record starting at that same base with a larger 48-byte stride; the exact struct layout beyond the s32 pair at offset 0/4 is not resolved.","candidate-show settled at 292 candidate bytes vs 316 reference bytes and 142 differing halfwords across three siblings (08010424, 080105d4, 08010788 -- see their own dossiers). This is a substantial, evidence-grounded draft of the real algorithm rather than a template adaptation, but it is far from byte-exact: the exact source shape of the outer/inner loop nesting, the per-actor array's true field types (the state_update_0082.c comment leaves the sub-record layout only partially resolved), and the precise scaling arithmetic for the two overlay-table writes are all still open. This is a source-shape gap requiring dedicated reconstruction of this owner's real domain (map rendering / party marker overlay), not a good target for further family-transplant attempts against the assigned tile-attribute-clear template.","2026-08-31 structural-decoder pass: all four actor-bound comparisons were named as mirrored relational guards. Reversing their operand spelling is behavior-preserving and leaves the byte score unchanged, but changes the measured topology from different to equal; the residual now routes honestly as missing-extra-code rather than structural-topology. The same decoder-confirmed repair was stamped onto 080105d4 and 08010788 and independently rescored.","Three near-identical siblings exist at 0x08010424, 0x080105d4, 0x08010788 (all in this assignment batch): 080105d4/08010788 are byte-for-byte near duplicates of each other and use SIGNED loop comparisons (bge/blt) throughout, while 08010424 uses UNSIGNED comparisons (bcs/bcc) for the same three loop-bound checks -- confirmed by testing this owner's C with s32 loop variables (matches 080105d4/08010788's branch mnemonics) versus u32 loop variables (matches this owner's). This owner's retained candidate therefore declares dstX/dstY/width/height/x/y as u32 rather than s32; the other two siblings' candidates keep them signed."],"rejected_experiments":[{"experiment":"store the three actor tile positions in two separate arrays (s32 tileX[3]; s32 tileY[3];) rather than one array of {x,y} structs","result":"worse (149 differing halfwords) -- the reference's unrolled 3-iteration copy loop stores x then y for the SAME actor 8 bytes apart (interleaved pairs), which only an array-of-pairs layout reproduces; separate x/y arrays put all three x values before all three y values in memory, a different stack layout the compiler schedules differently."},{"experiment":"first draft used dstX/dstX+width for the outer (height) zero-guard instead of dstY/dstY+height","result":"a real logic bug (would skip on the wrong condition for callers where width and height differ), fixed before scoring; correcting it did not change the halfword count in this candidate's current form, confirming the two guards were already scored as structurally equivalent shapes by the tool, but the fix is required for the candidate to be behaviorally honest regardless of score."}]},"main:08010560":{"schema_version":1,"namespace":"main","address":"0x08010560","status":"measured-draft","owner_bytes":116,"candidate_bytes":120,"differing_halfwords":44,"wrong_instructions":41,"classification":"execute-map-copy-command-list","notes":["Complete ordinary-C reconstruction of a 0xffff-terminated list of five-halfword commands. Each record supplies the leading source value, three signed geometry values converted to u16 for Func_08010424, and a signed delay converted to u16 for Func_080030f8.","The retained assembly establishes the 10-byte stride, signed payload loads, conversion order, six-argument Func_08010424 call, delay call, and terminator. The packed two-byte-aligned record expresses that observed wire layout without inventing padding.","The exact SpawnBattleEffectObjects sibling was used only as a source-shape example for a compact command-record loop; it is not evidence for this owner's field meanings or types.","The first complete draft compiled to 88 bytes and exposed two linked discrepancies: an ABI-padded 12-byte record stride and premature optimization of the signed payload conversions. One targeted correction fixed the record layout and materialized all four signed payload loads before their u16 call-boundary conversions.","A bounded follow-up replaced the aggregate walk with the two independently advanced pointers proved by the reference: a u16 command-head pointer and an s16 payload pointer. That repair moves canonical GCC 2.96 to 120 bytes against 116 reference bytes, with equal control-flow topology, 44 differing halfwords, and 41 wrong instructions.","The allocator-order decoder named split_lifetime(command), specifically recreating the command value at the guard and backedge. The separate-pointer repair supplies that lifetime without annotations. Remaining width evidence is unresolved: the reference sign-loads all four payloads before zero-extending them, while canonical GCC folds the two call-only conversions into ldrh; sequential-pointer, explicit-u16-local, low-half-mask, and explicit low-half-expression spellings did not improve the 44-halfword floor.","This measured draft claims zero DONE bytes. Retained assembly remains authoritative; no fixed-register variable, inline assembly, frame forcing, or assembly classification is used."]},"main:080105d4":{"schema_version":1,"namespace":"main","address":"0x080105d4","status":"measured-draft","owner_bytes":304,"candidate_bytes":292,"differing_halfwords":135,"wrong_instructions":195,"classification":"map-tile-copy-with-actor-marker-overlay","domain":"Byte-for-byte near-duplicate sibling of main:0x08010424 and main:0x08010788 (see games/gs1/recon/en/dossiers.json#main:08010424 for the full technical writeup): copies 12-bit tile indices from one region of the 0x02010000 map buffer to another, mask-merging with the destination's upper 4 bits, and overlays an actor position marker icon (from a table at 0x02020000 into a per-actor 2048-byte-stride table at 0x06002800) for dest cells inside one of 3 actor bounding boxes read from Data_03001e70 + 0x104.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 7956 bp; as with its two siblings this is a family-clustering false positive with no usable structural overlap with the assigned template.","This owner's assembly is byte-for-byte structurally identical to main:0x08010788's (confirmed with `diff` on the retained .s files -- only register-allocation choices and the pool-word ordering/presence of one 0xfffff000 constant differ), and both use SIGNED loop-bound comparisons (bge/blt) where main:0x08010424 uses UNSIGNED ones (bcs/bcc) for the same three checks. The retained candidate is the shared s32-parameter draft described in 08010424.json, function-renamed to Func_080105d4.","candidate-show reports 292 candidate bytes vs 304 reference bytes, 135 differing halfwords, 195 wrong instructions -- close to but not identical to the 08010424/08010788 scores because the reference byte length itself differs slightly between the three siblings (304 vs 316/316), not because this candidate was independently tuned for this owner. See 08010424.json for the full rationale, the Data_03001e70+0x104 corroborating evidence from state_update_0082.c, and the family-clustering-false-positive discussion; that writeup applies to this owner unchanged.","2026-08-31 family stamp: mirrored the four decoder-named actor-bound comparisons. The 292/304-byte and 135/195 scores are unchanged, but topology is now equal and the remaining work is correctly classified as missing-extra-code."],"rejected_experiments":[{"experiment":"reuse the shared triplet draft without owner-specific tuning, verified independently against this owner's own reference bytes rather than assuming 08010424's score transfers unchanged","result":"confirmed a distinct (slightly better) score of 135/195 at 292/304 bytes for this owner specifically; not identical to either sibling, so each was scored separately rather than reported once for all three."}]},"main:08010788":{"schema_version":1,"namespace":"main","address":"0x08010788","status":"measured-draft","owner_bytes":316,"candidate_bytes":292,"differing_halfwords":144,"wrong_instructions":198,"classification":"map-tile-copy-with-actor-marker-overlay","domain":"Byte-for-byte near-duplicate sibling of main:0x08010424 and main:0x080105d4 (see games/gs1/recon/en/dossiers.json#main:08010424 for the full technical writeup): copies 12-bit tile indices from one region of the 0x02010000 map buffer to another, mask-merging with the destination's upper 4 bits, and overlays an actor position marker icon (from a table at 0x02020000 into a per-actor 2048-byte-stride table at 0x06002800) for dest cells inside one of 3 actor bounding boxes read from Data_03001e70 + 0x104.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 7946 bp; as with its two siblings this is a family-clustering false positive with no usable structural overlap with the assigned template.","This owner's retained .s is structurally identical to main:0x080105d4's (confirmed with `diff` -- only register allocation and one literal-pool-constant's presence/position differ) and uses SIGNED loop-bound comparisons (bge/blt), matching 080105d4 and not 08010424 (which uses bcs/bcc for the same three checks). The retained candidate is the shared s32-parameter draft described in 08010424.json, function-renamed to Func_08010788.","candidate-show reports 292 candidate bytes vs 316 reference bytes, 144 differing halfwords, 198 wrong instructions. See 08010424.json for the full rationale, the Data_03001e70+0x104 corroborating evidence from state_update_0082.c, and the family-clustering-false-positive discussion; that writeup applies to this owner unchanged.","2026-08-31 family stamp: mirrored the four decoder-named actor-bound comparisons. The 292/316-byte and 144/198 scores are unchanged, but topology is now equal and the remaining work is correctly classified as missing-extra-code."],"rejected_experiments":[{"experiment":"reuse the shared triplet draft without owner-specific tuning, verified independently against this owner's own reference bytes rather than assuming 08010424's or 080105d4's score transfers unchanged","result":"confirmed a distinct score of 144/198 at 292/316 bytes for this owner specifically, close to but not identical to its two siblings; each was scored separately rather than reported once for all three."}]},"main:080113e4":{"schema_version":1,"namespace":"main","address":"0x080113e4","status":"measured-draft","owner_bytes":188,"candidate_bytes":184,"differing_halfwords":75,"wrong_instructions":84,"classification":"map-tile-block-update","domain":"Reads the current map position, converts it to tile coordinates, and refreshes a two-by-two block on each of two tile layers.","expressed":["the nullable current-position source and its x/z field widths","the two fixed-point world-to-tile origin conversions","the two layers and nested two-row by two-column traversal","the wrapped sixteen-by-ten tile lookup and five-argument update call"],"notes":["Recovered from the complete retained owner, the local m2c output, aggregate evidence for Data_03001e70, and the approved compiler. No external source or GS2 evidence was used.","The initial typed C compiles to 184/188 bytes with equal branch topology. This converts a previously unscored no-candidate owner into a bounded structural draft; it claims zero DONE bytes.","Unsigned do-while loop counters reproduce all three reference BLS backedges. Signed for-loops emitted BLE and were rejected.","The reference spills both converted origins at sp+8/sp+4 and retains the layer byte offset in fp. The candidate instead retains one origin and spills a loop carrier. A local aggregate, a local array, a volatile local array, an explicit layer-offset carrier, and m2c declaration ordering all preserve the semantic shape but regress size or residual; they were reverted.","No fixed-register variable, compiler barrier, inline assembly, volatile forcing, or fabricated operation is retained. The remaining missing/extra-code residual is not yet narrow enough for permanent-assembly classification."]},"main:080114a0":{"schema_version":1,"namespace":"main","address":"0x080114a0","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":200,"candidate_bytes":200,"differing_halfwords":71,"classification":"map_tile_block_compiler_allocation_module","cross_edition":{"core_bytes":188,"relocation_bytes":4,"literal_bytes":8,"core_diff_bytes":0,"core_identical":true},"domain":"Refreshes the current two-by-two map tile block on two layers and stops as soon as the tile updater reports a blocked cell.","notes":["Recovered from the complete retained owner, its adjacent 080113e4 sibling, the local m2c output, and the approved compiler. No external source or GS2 evidence was used.","The ordinary C emits exactly 200 bytes and 95 instructions with equal branch topology and the same two literal words. Every call, argument, width, offset, constant, early-exit edge, and loop bound agrees.","The remaining residual is a reciprocal allocation of the two converted origins, layer byte offset, layer/row/column counters, and tile-index carriers. The instruction operation sequence is otherwise equal; the allocator decoder reports reciprocal register-role swaps and no unique source repair.","The shipped -fno-expensive-optimizations route improves 79 to 71 differing halfwords at exact extent. Regmove, both schedulers, GCSE, CSE follow/skip, rerun CSE, strength reduction, thread jumps, and every composition with the evidenced route preserve that floor or regress. A routing regression test keeps the flag off adjacent 080113e4.","Relocation-aware six-edition analysis uniquely locates the owner and proves all 188 normalized core bytes identical. One Thumb call relocation and two literal words account for the normalized fields.","Local aggregate, array, volatile-array, explicit layer-offset, declaration-order, and loop-spelling probes do not reproduce the reference allocation without worsening the frame or residual. Fixed-register variables, compiler barriers, inline assembly, and volatile forcing are disallowed, so structured assembly remains the byte-exact implementation."]},"main:08011f54":{"schema_version":1,"namespace":"main","address":"0x08011f54","status":"proven-retained","owner_bytes":132,"executable_owner_bytes":110,"candidate_bytes":132,"differing_halfwords":26,"wrong_instructions":48,"classification":"field_dispatch_compiler_allocation_module","resolved_asm_classification":{"kind":"field_dispatch_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"family_transplant":{"template":"save/read_flash_from_sector.c","score":7291,"threshold":7500,"confidence":"low","verdict":"false positive, confirmed this session","evidence":"read_flash_from_sector.c (ReadFlash) shares only the shape-only register-shuffle prologue and the project-wide `_call_via_r3` indirect-call trampoline idiom (used by dozens of unrelated owners across the project) with this owner. It has no shared callees, field offsets, or constants: it copies its own body into IWRAM and reads flash memory at 0x0e000000 through Data_08007abc, none of which appear in 08011f54. Not used as a source of any evidence below."},"notes":["2026-08-31 exact-closure revalidation: fresh score is 132/132, differing_halfwords=26, wrong_instructions=48, with branch topology and all five literal-pool words exact. The allocator decoder again reports `conflicting-targets`, reflecting the already-documented r4/r5 versus r5/r6/r7 coloring split rather than missing semantics. A finite shipped-pass probe found no improvement: -fno-schedule-insns, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-rerun-cse-after-loop, and -fno-gcse all tie at 26; -fno-schedule-insns2 and -fno-expensive-optimizations regress to 31; -fno-regmove shrinks to 128 bytes and regresses to 65. Together with the recorded 12 statement orders, pointer/table-expression variants, call-argument variants, exact adjacent field siblings, and owner-specific m2c corroboration, this is an honestly bounded allocation blocker. Source remains unchanged; no adoption or DONE bytes are claimed.","Real owner, established entirely from the retained assembly plus two exact/near-exact already-adopted siblings found by grepping this owner's literal-pool constants across games/gs1/src and games/gs1/asm -- not from the low-confidence family-transplant guess above.","games/gs1/src/map/shared/get_cell_attribute_low_nibble.c (Func_08011fd8, byte-exact adopted, address 0x08011fd8 -- the very next owner, 132 bytes after this one starts) shares this owner's entire first two-thirds verbatim in algorithm: table = *(u8 **)ADDR_03001E70; x >>= 16; y >>= 16; map defaults to (u8 *)0x02010000 unless table != 0, in which case map = *(u8 **)(table + (index & 3) * 48 + 304); column = x / 16; row = y / 16; map += (column + (row << 7)) * 4; entry = map[3]. games/gs1/include/map.h's `struct MapCell { u16 metatile_and_flags; u8 collision_code; u8 attribute_b; }` confirms map[3] reads MapCell.attribute_b -- Func_08011fd8 stops at `return *(u8 *)(0x0202c000 + entry * 4) & 15;` (the low nibble of a per-attribute_b config byte); this owner continues past that point.","games/gs1/src/map/get_cell_collision.c (GetMapCellCollision, byte-exact, 0x08012038, 228 bytes after this owner) and games/gs1/src/map/set_cell_collision.c (SetMapCellCollision) independently confirm the same ADDR_03001E70/(layer & 3) * sizeof(struct MapLayer) + 0x130/struct MapCell vocabulary for the map/collision subsystem this owner belongs to.","Beyond the shared prefix, this owner uses the attribute_b-derived config byte's low nibble to index a 16-entry function-pointer table at 0x080134fc, and calls the selected handler with three arguments: a byte pointer into a second per-attribute_b table at 0x0202c001 (0x0202c000 + 1, but genuinely two separate globals -- the reference loads them from two independent literal-pool words rather than deriving one from the other, and this candidate's source only reproduces that when they are declared as two distinct externs), plus the sub-tile pixel offsets (x & 15, y & 15). The call is `bl` to 0x080072f0, which is `_call_via_r3` (0x080072f0 - 0x080072e4 = 0xC = 4 * 3) -- an indirect call through r3, not a real function. Modeled per this project's established idiom for an r0-r3 veneer slot (confirmed against already-adopted veneer-audited siblings games/gs1/src/save/read_flash_from_sector.c and games/gs1/src/graphics/tile/build_sequential_table.c) as a direct call to a locally declared phantom prototype `s32 Func_080072f0(u8 *, s32, s32, s32)` with the real handler value passed as the trailing argument; this reproduces the veneer's `bl` target exactly (both candidate and reference read `bl 0xffff539c` relative) once the target is computed into an s32 local before the call rather than looked up inline in the return expression.","Full m2c workbench run (games/gs1/asm/08011f54.s symbolized against the real agscc type context) independently generated the identical algorithm shape confirmed above -- same table/map/column/row/entry chain, same two 0x0202c00x tables, same 0x080134fc dispatch, same call-with-trailing-target model -- corroborating the hand trace rather than introducing anything new.","Residual (candidate=132 reference=132, differing_halfwords=27, wrong_instructions=48, matched_prefix=0, class=wrong): every operation, operand, and branch matches the reference one-for-one from the first instruction through the final `bl` and epilogue; the entire residual is register-letter and a related register-pressure difference. The reference keeps x and y in callee-saved r5/r6 across the whole body and additionally spends a third callee-saved register r7 on the 0x0202c001 literal-pool word (needed because r0-r3 are all still live with other values -- the config-table pointer, the entry*4 index, the (config&15) nibble, and the 0x080134fc table base -- at the point that word is loaded); this candidate's allocator instead keeps x in an unsaved r4 (this owner's ABI treats r4 as available scratch not requiring push/pop, confirmed by the reference's own unsaved use of r4 for the 0x080134fc pool word) and finds room for the 0x0202c001 word in a caller-saved register, so only r5 needs saving. Tried and rejected: separate `u8*` intermediate for the config load (re-fuses to a single indexed ldrb, losing the reference's two-instruction address-then-load shape); named-array subscript vs raw-pointer-cast styling for each of the three tables (raw-cast is required for the config byte's two-step address/load shape; named-extern-array is required for 0x0202c001 to stop the compiler folding it into `0x0202c000 + 1`; named-array is required for the 0x080134fc handler lookup to keep its single fused indexed load); all 12 valid topological statement orders of {config load, x &= 15, y &= 15, target = table[config]} respecting `config` before `target` (27 wrong-halfword floor at the order recorded in source; every other order measured 29-44); computing the trailing-target call's first argument into a named local before vs after the target lookup (both regress to 31); inlining the target lookup directly into the call expression instead of a named local (regresses to 31). This reads as the same 'final register-letter/allocation choice not controllable via source reordering' residual class already catalogued elsewhere in this project for compiler-output owners with a fully credible algorithm; it did not reach the permanent-assembly gate (no compiler-pass evidence rules out an ordinary-C shape, only that this session's search did not find one) and did not reach the zero-differing-halfwords adoption gate, so no name was registered and no source-paths.json entry was added.","Recovered only from this owner's retained assembly (games/gs1/asm/08011f54.s), already-adopted exact sources under games/gs1/src, in-repo headers, the approved compiler, and the m2c workbench run against the real reference bytes. No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","2026-08-31 retained-assembly proof: the current cross-edition object route proves all 108 relocation-normalized core bytes identical across six editions. The complete candidate has the exact 132-byte extent, equal topology and exact five-word pool, and accounts for the layer selection, signed coordinate conversion, map-cell lookup, attribute/config reads, sub-tile coordinates, dispatch-table lookup, indirect-call veneer, arguments, and return. The remaining stream differs only in saved-register coloring. The conflicting-target decoder verdict, all 12 valid statement orders, pointer/table/call variants, exact adjacent siblings, owner-specific m2c corroboration, and canonical regmove, scheduling, CSE, GCSE, rerun-CSE and optimization probes preserve the 26-halfword floor or regress. Structured assembly therefore remains authoritative under field_dispatch_compiler_allocation_module; the candidate does not claim exact C."]},"main:080120dc":{"schema_version":1,"namespace":"main","address":"0x080120dc","status":"measured-draft","owner_bytes":192,"executable_owner_bytes":192,"candidate_bytes":184,"differing_halfwords":72,"wrong_instructions":76,"classification":"map-object-step-height-check","resolved_asm_classification":{"kind":"compiler_output","retention":"asm","confidence":"likely"},"notes":["Given an object pointer (map_layer byte at +0x22, s32 height at +0x14) and a candidate position (Q16.16 x/z pair, integer part read directly as the high halfword at +2/+10 of a 12-byte {x,unused,z} triple matching the stack buffer 0800dd70.s/0800df04.s/0800ee14.s/0800ebec.s build from an object's own x/unused/z words before every one of their calls into this owner), looks up *ADDR_03001E70 (NULL -> return 0), selects state->layers[object->map_layer].cells for map_layer<=2 else falls back to the fixed EWRAM tile buffer 0x02010000, floor-divides the position by 16 to a tile x/z ('if(v<0) v+=15; v>>=4'), and indexes a 4-byte MapCell at cells + (tile_x + tile_z*128)*4. If the cell's byte 2 is 0xFF, returns 2 (off-map). Otherwise cell byte 3 is an attribute index into TWO SEPARATE tables sharing one idx=attr*4: Data_0202c000[idx]'s low nibble selects a ROM function-pointer table at 0x080134fc, and the ADDRESS of Data_0202c001[idx] is passed as that function's first argument alongside the position's own low-4-bit x/z fractions -- an indirect call through the r3 call-via-rN veneer slot (0x080072f0). That height minus object->height is compared against +0x80000 (too high -> return 1) and -0xC0000 (too big a drop -> return -1), else returns 0 (passable).","Session picks up a preserved, credible but UNVERIFIED draft from scratch/wave4-unverified-holding/24 (left mid-flight by an interrupted prior wave, before it could run candidate-show or commit). Independently re-ran candidate-show against the now-working ROM: the prior agent's claimed 72 differing_halfwords / 74 wrong_instructions (180/192 candidate/reference bytes) reproduced exactly on a fresh compile, confirming their measurement was accurate even though unverified at the time.","One real structural correction found and applied this session: the inherited draft modelled the per-attribute record as a single `struct TerrainAttrRecord { u8 kind; u8 data; ... }` array (attr_addr+1 for the second field), which only accounts for the 0x0202c000 literal. The retained assembly (games/gs1/asm/080120dc.s) actually pools THREE distinct 4-byte constants -- 0x03001e70, 0x02010000, 0x0202c000, 0x080134fc, 0x0202c001, 0xfff40000 -- and its instruction stream loads 0x0202c000 and 0x0202c001 as two INDEPENDENT bases (two separate `ldr rX,[pc,#N]` loads, both later added to the same attr_idx*4 register), not one struct base plus a +1 byte offset. Replacing the struct with two parallel `extern u8 Data_0202c000[]; extern u8 Data_0202c001[];` arrays sharing one `idx = cell[3] << 2` correctly reproduces both literals and the shared-index reuse pattern. differing_halfwords stayed at 72 (dominated by the register-allocation residual below), but this is a strictly more evidence-backed model -- the struct model is provably wrong since it cannot emit the 0x0202c001 constant that the reference genuinely contains -- so it replaces the inherited draft rather than being kept alongside it.","Tried and rejected as a further lead: an explicit intermediate `u8 *entry = &Data_0202c000[idx]; kind = *entry;` to force the reference's separate address-then-load-at-offset-0 pattern (vs. one fused register-indexed ldrb). The compiler folds this back to a single indexed load regardless of the intermediate pointer variable or a re-derived (non-CSE'd) `attr_idx << 2` computed twice -- this compiler's forward-substitution is not source-structure-sensitive here, so it is not a usable lever without an escape hatch.","Remaining residual (all ~72 differing halfwords) is a single coherent register-allocation hunk, confirmed by inspecting every '!' line in the aligned diff: every mismatch is a same-mnemonic, same-immediate operand rename, never a differing opcode. The reference keeps THREE persistent callee-saved locals live across the whole body and the indirect call (x in r5, z in r6, object in r7 -- push/pop {r5,r6,r7,lr}), while this compiler's allocator only commits two (z and object) and keeps x in caller-saved r4 (push/pop {r5,r6,lr}), an 8-byte-shorter, leaf-adjacent allocation. All three locals have an identical use-count/live-range shape (one def, two uses spanning the same code region: x and z are each read once for tile flooring and once for the final &15 mask; object is read once for map_layer and once post-call for height) -- confirmed by an explicit register-by-register use count over the retained .s -- so this is not explainable by a source-visible liveness or use-count difference; it is the allocator's internal tie-break for which of three equally-live pseudo-registers gets the last callee-saved slot. This matches the same 'final register-letter/allocation choice not controllable via source reordering' floor already catalogued elsewhere in this corpus (see e.g. 080fb2a4.json's leaf-vs-framed residual). Not eligible for permanent-assembly classification (no compiler-pass evidence that the shape is unreachable, only that this session's source-level search did not find the lever); retained assembly stays authoritative and this draft claims zero DONE bytes.","cross-edition correspondence was not run this session: it is JA-relative and the local roms/gs1-ja.gba symlink is the same known-broken input CONTRIBUTING's `make correspondence` step is exempted for; out of scope here.","Recovered only from retained owner assembly (games/gs1/asm/080120dc.s), approved local GS1 EN ROM evidence, sibling EXACT owners in games/gs1/src/map/ (get_cell_collision.c, check_position_cell_occupied.c, set_cell_collision.c), and the approved compiler. No other decompilation project, symbol map, or disassembly was inspected."]},"main:080164d4":{"schema_version":1,"namespace":"main","address":"0x080164d4","status":"measured-draft","owner_bytes":150,"score":{"measured":"2026-08-31","candidate_bytes":142,"reference_bytes":150,"differing_halfwords":71,"wrong_instructions":82,"class":"missing-extra-code","note":"The canonical route now has equal branch topology. The shipped -fno-expensive-optimizations probe reaches the exact 150-byte extent and DH46/wrong76, but is retained only as route evidence because it is not exact or corroborated across the translation unit. Zero DONE bytes are claimed."},"notes":["Recovered the complete five-argument UI-window tile clear: pixel bounds are rounded to tile coordinates, the attribute rectangle is cleared, the mirrored tilemap interior is filled with 0xf020, and the render-dirty byte is set.","Seven bounded shipped-flag routes were scored. Three were byte-neutral, -fno-schedule-insns2 improved DH by one, and the -fno-expensive-optimizations result is recorded separately rather than installed as a speculative per-owner override."]},"main:080165d8":{"schema_version":1,"namespace":"main","address":"0x080165d8","status":"measured-draft","owner_bytes":150,"executable_owner_bytes":150,"candidate_bytes":152,"differing_halfwords":73,"wrong_instructions":108,"template_family":"template-main-0800f9f4","template_source":"games/gs1/src/map/decode_tile_rows.c","domain":"Not a tile-row decoder despite the n-gram clustering with decode_tile_rows.c: allocates a free 40-byte slot from a fixed-size array anchored at *(0x03001e8c)+1568 (scanning up to 4 slots for one whose leading word is 0) and populates it as what looks like a floating text/popup entry -- an owner word, an x/y position pair (each shifted left 8), a duration pair (constants 15 and 10), a 4-halfword payload either copied from an optional caller-supplied buffer or zero-filled, and a couple of zeroed status halfwords.","behavior":["scans up to 4 slots of stride 40 starting at Data_03001e8c-relative base 1568 for the first whose word-sized 'owner' tag field is 0","if none is free, the function is a no-op","otherwise writes: position fields (x<<8 at two offsets, y<<8 at one), the raw second parameter unshifted at another offset, two fixed timer/duration constants (15, 10), the owner id, three zeroed halfword status fields, and the 6th parameter into one more halfword","then either copies 4 halfwords from an optional pointer parameter into an 8-byte payload region, or fills that region with a shared zero constant (the same Data_00000000 pool-literal-zero idiom seen elsewhere in this corpus) when the pointer is null","clears one final halfword field before returning"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete candidate was written and scored; its size already lands within 2 bytes of reference (152 vs 150) and every field write/offset in the populate section is corroborated by the raw assembly, but register allocation diverges heavily from the very first instruction (108 wrong instructions) because the compiler schedules this candidate's free-slot search and field-population statements in a different order than reference does."},"remaining":"The behavior and every struct offset used are read directly off the retained assembly and are reasonably confident, but this is a genuinely unfamiliar struct (no template correspondence beyond superficial loop/store n-grams) with no prior recovery elsewhere in the corpus to cross-check against, so field names are placeholders. The instruction-order gap looks like a source-shape question (which sub-expression the compiler evaluates first) rather than a settled compiler-internals residual, but closing it would need deliberately reordering the populate statements against reference's literal instruction sequence one at a time, which is out of scope for this pass's time budget.","notes":["The base pointer *(0x03001e8c) matches the 'runtime globals table' also referenced (at different fixed offsets, e.g. entry 12 = 0x03001ebc) by several already-recovered overlay owners, so this slot array is very likely part of the same global runtime-workspace table; not otherwise cross-checked here.","Recovered only from retained owner assembly, cross-references to the 0x03001e8c/0x03001ebc runtime-table idiom used by other already-recovered owners, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."],"sr_route_evidence":{"verdict":"COINCIDENTAL","measured":"2026-08-29","note":"asm/080165d8.s loop bodies (.L0-.L7) are all short and mixed with calls/loads; no retained empty countdown loop or clear non-strength-reduced addressing shape found by static inspection. No dual-compile performed. Provisional COINCIDENTAL pending compiler diff."}},"main:08017248":{"schema_version":1,"namespace":"main","address":"0x08017248","status":"measured-draft","owner_bytes":282,"candidate_bytes":258,"differing_halfwords":127,"wrong_instructions":172,"classification":"window-interior-fill","domain":"Guarded window-tilemap draw: given (x,y,width,height,mode), computes a base cursor into *Data_03001e8c at ((y<<5)+x)*2, bails out unless 2<=width<=30 and 2<=height<=30, then walks the INTERIOR rows/columns only (row 1..height-2, col 1..width-2, i.e. skipping the outer ring) writing 16-bit tile values built from a running tile-index counter masked with 0xFFF and OR'd with a fixed 0x127 flag, choosing between two different column-vs-row stride patterns depending on whether the 5th (stack) argument is zero. Sets base[0xEA3]=1 (a dirty/redraw flag, one past the template's own RENDER_ALT_OFS=0xEA2) on the drawn path.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 8626 bp -- the highest score of any owner in this assignment batch -- but the reference assembly shares only the coarse (y<<5)+x cursor idiom and the Data_03001e8c base with the template; there is no tile-value masking against 0x3FF, no RENDER_TILE_ATTR_OFS/RENDER_ALT_OFS bit-clear logic, and the real control flow (four-way bounds guard, interior-only double loop with two mode-selected stride shapes) is unrelated to the template's parametrized rectangle clear. The template gave a starting hint about the base-pointer/global (Data_03001e8c, shared with 0801e318 and the template) but essentially no usable control-flow shape.","The exact tile-index arithmetic is genuinely uncertain. There is no `muls` instruction anywhere in the reference, so the per-column tile-index step in the mode==0 branch is produced by repeated addition of a loop-invariant stride register (confirmed from the reference's r0 += r2 pattern inside the inner loop, where r2 is recomputed each outer-row iteration as something derived from height-2) rather than a single multiply -- this candidate's 'tile += stride' loop reflects that repeated-add shape, but the exact base value fed into the running counter (this draft guesses 0xF000-2, i.e. treating it as (0xF000 + row) with a col=0 offset of -2) is not independently confirmed against the reference's literal pool words, which were not individually resolved to their source position without assembling.","Two candidate hypotheses were scored for the tile-index formula in the mode==0 branch: a per-column additive stride (this draft, retained) at 127 differing halfwords / 172 wrong instructions, and a per-column multiplicative-looking 'row + col*width' form at 129/149 (rejected below, since 172 vs 149 wrong_instructions favors the second but differing_halfwords -- the project's primary decision metric -- favors the first, and neither is remotely close to zero). Given how close and inconclusive the two are, and that neither reaches the template's level of match, this genuinely needs the pool words resolved from a real disassembly rather than further guessing.","This is a source-shape gap requiring dedicated reconstruction (correct disassembly of the four literal-pool constants in each pool group, and confirmation of the mode!=0 branch's row-major write pattern against the reference byte-for-byte), not a good target for further family-transplant attempts against the assigned template."],"rejected_experiments":[{"experiment":"model the mode==0 interior fill as a transposed write where the VRAM cursor itself strides by (height-2) per column (i.e. treat the tile-index computation and the VRAM write address as the same pointer)","result":"worse (worse structural match, abandoned before scoring) -- the reference clearly keeps two separate values live across the inner loop (r0, the running tile-index accumulator that strides by height-2 each column; and r1, the VRAM cursor that strides by a flat +2 each column), which a single merged pointer cannot reproduce."},{"experiment":"model the mode==0 tile-index as tile = 0xF000 + row + col*(height-2) (a per-column additive stride, matching the reference's repeated-add pattern and the absence of any muls instruction)","result":"best result so far: 127 differing halfwords / 172 wrong instructions at 258/282 bytes. Retained as the candidate."},{"experiment":"model the mode!=0 branch's tile-index as tile = 0xF000 + row + col*width (row-major across the full width instead of the additive-stride shape used in mode==0)","result":"produced 129 differing halfwords / 149 wrong instructions overall (mode==0 branch unchanged) -- fewer wrong_instructions but slightly more differing_halfwords than the retained candidate; inconclusive, not clearly better, and still far from exact, so not adopted as the retained draft."}]},"main:080175c0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080175c0","status":"proven-retained","owner_bytes":96,"classification":"compiler_frame_context_module","score":{"measured":"2026-08-30","candidate_bytes":96,"reference_bytes":96,"differing_halfwords":2,"wrong_instructions":4,"class":"frame-context","note":"The ordinary-C source now emits every reference instruction except the prologue and epilogue stack adjustment: GCC reserves 8 outgoing bytes while the reference reserves 16. The two used outgoing argument slots and all control flow are exact. The remaining unused eight-byte frame context must be explained from source or translation-unit evidence; it remains Draft C and claims zero DONE bytes."},"notes":["Recovered from the retained owner, the aggregate-aware m2c seed, the prepared template pack, and the approved compiler.","Explicit byte-offset construction and two proven early-return guards reproduce the reference address schedule and return-zero carrier; the canonical score improved from 47 to 2 differing halfwords.","The owner uses only its first two incoming arguments, so the unsupported three unused parameters were removed from the provisional signature.","2026-08-31 bounded closure, compiler axis: -O3, -Os, -fno-defer-pop, -fno-function-cse, -fno-regmove, and -fno-schedule-insns all preserve the exact 96-byte candidate and the same two-halfword 8-versus-16-byte frame residual. -O1 shortens the candidate to 92 bytes with 41 differing halfwords, -fno-omit-frame-pointer emits 108 bytes with 52 differing halfwords, and -fno-schedule-insns2 preserves 96 bytes but regresses to 23 differing halfwords. No tested shipped route explains the frame while preserving the otherwise exact body.","2026-08-31 bounded closure, source-context axis: a plain unused u32[2] local is eliminated and leaves the residual unchanged. Marking that array volatile makes the owner mechanically byte-exact by forcing eight otherwise unreferenced stack bytes, but no reference instruction reads, writes, or takes the address of those bytes and no caller evidence identifies such an object. The volatile padding probe was therefore rejected as an evidence-free frame-forcing device and removed. This owner remains Draft C pending authentic translation-unit or source evidence for the extra eight bytes.","2026-08-31 frame-context backend proof: the shipped ARM target defines STACK_BOUNDARY as 32 bits and ACCUMULATE_OUTGOING_ARGS. Its epilogue restores exactly get_frame_size() plus current_function_outgoing_args_size (alchemy-gcc/agscc/gcc/config/arm/arm.h:694,1335; arm.c:6892-6896), while calls.c derives the preferred boundary from that four-byte target boundary and records only the maximum required outgoing area. This owner's sole six-argument call requires two stack words, so the ordinary source has an eight-byte outgoing area and zero live local-frame bytes. The reference's sixteen-byte adjustment therefore proves eight additional bytes of source or translation-unit frame context, not an allocator or scheduling choice. Because no reference instruction observes those bytes, their object type and semantics are not recoverable from this owner. The only DH0 probe, a volatile u32[2], manufactures that unknown context and remains inadmissible padding. Bounded verdict: exact ordinary C is blocked until authentic shared-TU/source evidence identifies the extra local object; retain the legitimate DH2 draft.","The complete source semantics, exact extent, equal topology, exact instruction stream outside the frame adjustment, and shipped-backend proof satisfy the repository's compiler-limitation contract. The owner remains structured assembly, now proven retained rather than unresolved C debt.","No inline assembly, register forcing, compiler barriers, copied instruction bytes, or external decompilation source was used."]},"main:08017658":{"schema_version":1,"namespace":"gs1-en-main","address":"0x08017658","status":"measured-draft","owner_bytes":276,"score":{"measured":"2026-08-27","candidate_bytes":276,"reference_bytes":276,"differing_halfwords":131,"wrong_instructions":122,"class":"wrong","command":"tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/08017658.c --owner 0x08017658 --size 276","note":"Candidate reaches the reference's exact 276-byte length with the same 121 instructions in the same order (same calls, same branch structure, same literal-pool constants). The whole residual is a register-allocation/promotion-count mismatch: the reference keeps 3 long-lived values resident in r8/r9/sl (base scene pointer, the &local28 out-pointer, and the render-entry index) across both inner calls, while this compiler's allocator only promotes 2 of those (index, &local28) and keeps the base pointer resident in r7 instead. That single letter/count difference shifts the frame's 4-byte alignment pad (sub sp,#36 vs #32) and cascades a register-letter difference into nearly every subsequent instruction, even though the underlying operation sequence is identical."},"family_transplant":{"best_template":"games/gs1/src/ui/text/prepare_message_work.c","template_score":"7382/10000 (below 7500 adoption threshold)","assessment":"Genuine partial sibling, not a shape-only false positive: this owner and the template share the exact 'index = BuildRenderEntries-shaped-call(key, 1); if (RENDER_ENTRY_TBL_OFS[index] == 0) bail' idiom, and both call the real, already-adopted UiWork_Finalize (main:08016418, ui/render/finalize.c) the same way -- Finalize(work, 1) on an activation failure. The template's own body (UiText_BuildRenderEntries/UiWindow_Create/UiWork_ActivateChannel with 3-5 args each) does not match this owner's actual call targets or argument counts (Func_0801868c takes 7 args, Func_080165d8 takes 6), so no source was transplanted -- the template only supplied vocabulary (RENDER_* field names, the FIELD macro convention) confirmed independently against field_owner_91.c (RENDER_RESULT_OFS/+2 as a shared 's16 result; s16 value' pair) and field_owner_20.c (RENDER_BUSY_OFS+1/+2, the exact busy-flag pair this owner's success path clears -- field_owner_20/main:08017620 is this owner's immediate predecessor in the retained assembly and is byte-exact adopted as the flag *setter* counterpart)."},"rejected_experiments":[{"experiment":"4th argument as a real C bitfield struct (u32 flags:16; u32 id:12;) instead of a plain u32 with explicit (packed<<4)>>20 / packed&0xFFFF","result":"worse: 304 bytes vs the reference's 276 -- this compiler emits a shift-pair for a bitfield-typed low-16 read instead of the reference's ands-with-0xFFFF-literal, so the bitfield spelling doesn't match; the plain-u32-with-explicit-mask spelling (retained) reaches the exact reference byte length instead"},{"experiment":"named s32* out1/out2 locals aliasing &arg1/&arg2 (mirroring the &local28 out-pointer lever that did help)","result":"worse: 304 bytes, 147 differing halfwords -- unlike &local28, arg1/arg2 are read back by value right after the call, so caching their addresses in named locals adds a live range instead of removing one"},{"experiment":"shared 's32 zero = 0' local reused for both the RENDER_RESULT_OFS+2 store and Func_0801868c's 7th (zero) argument, mirroring the reference's apparent single r6 register reused for both","result":"worse: 264 bytes -- this compiler constant-folds a simple zero-initialized local back to a fresh immediate at each use site rather than keeping one register resident, so it does not reproduce the reference's live-range reuse"},{"experiment":"moving the flags accumulator's zero-initialization earlier (right after the RENDER_ENTRY_TBL_OFS guard, before the Func_0801868c call, matching the reference's early 'movs r7,#0' position) and/or reordering local declarations to mirror the reference's apparent pseudo-definition order","result":"small, inconsistent shifts in wrong_instructions (139-149) but never closed the base-pointer promotion gap"}],"notes":["Owner sits immediately after main:08017620 (field_owner_20.c, byte-exact adopted) in the retained assembly; that function sets RENDER_BUSY_OFS+1/+2 to 1 per flag bit, and this owner's success path clears the same two byte fields to 0 -- a set/clear pair on the same struct.","The packed 4th argument's low 16 bits are tested for individual flag bits (1, 8, 16, 32) and remapped into a differently-coded flags value (2, 8, 128, 256) passed as Func_080162d4's 5th argument; bits 16-27 are extracted as a 12-bit id stored into the scene struct's RENDER_RESULT_OFS field.","Recovered only from the retained owner assembly (games/gs1/asm/08017658.s), already-adopted exact sources under games/gs1/src/ (ui/render/finalize.c, ui/text/prepare_message_work.c, ui/text/draw_resource.c, ui/text/draw_character.c, ui/render/lookup_named_value.c, and the ui/runtime/set_busy_flags.c and field_owner_91.c byte-exact drafts), in-repo headers (gs1_edition.h, global_cells.h), and the approved compiler. No other decompilation project or external symbol map was consulted.","This candidate claims zero DONE bytes; not registered in source-paths.json since it is not byte-exact."]},"main:0801776c":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0801776c","status":"measured-draft","owner_bytes":304,"score":{"measured":"2026-08-27","candidate_bytes":308,"reference_bytes":304,"differing_halfwords":113,"wrong_instructions":59,"class":"wrong","command":"tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/0801776c.c --owner 0x0801776c --size 304 --align","note":"Not yet registered in the claimed/asm build manifests (below the family-transplant confidence threshold, no automatic workspace), so candidate-show/workbench need --owner/--size and workbench itself refuses (needs a registered symbol name to label the reference asm) -- scored by hand with --owner/--size instead. Control flow, every callee, every field offset and global address are hand-traced from games/gs1/asm/0801776c.s and are believed correct (see shape.derivation). The residual 113 differing halfwords / 59 wrong instructions are register-allocation and stack-slot-timing artifacts of this specific old compiler, not logic errors: (1) the 2-word stack buffer passed by pointer to Func_0808a278 gets its base address materialized eagerly by this compiler under ordinary post-declaration assignment (pos[0]=0;pos[1]=0;), unlike the reference which uses plain immediate sp+4/sp+8 stores and only computes the address fresh at the call site; switching to an aggregate initializer (`s32 pos[2] = {0, 0};`) fixed this for the buffer itself and cascaded to fix essentially all of the x/y/width/height stack-slot addressing for the rest of the function (dropped differing_halfwords 142->113), but left the frame ~4 bytes (2 halfwords) longer than reference, apparently from how this compiler now schedules the stack-frame setup relative to the base-pointer load. (2) the Data_02000240+500 pointer read: reference computes the address at RUNTIME via `movs r2,#250; lsls r2,r2,#1; adds r3,r3,r2—every spelling tried (`+500`, `+250*2`, `+(250<<1)`, `&Data_02000240_as_s16[250]`) gets constant-folded by this compiler into a single pool literal instead, so the true source almost certainly indexes through a name/macro this compiler treats as non-foldable for some reason not yet identified. (3) the pos[1]>>3-derived y value: reference keeps the shifted value in one register end-to-end (asrs r3,r3,#3; cmp r3,#9; ble; subs r3,#5 / adds r3,#4, all in r3); every C shape tried (an explicit intermediate local, the raw expression repeated three times, an explicit goto-labelled sequence writing straight into y) reproduces the branch/store shape correctly but the compiler still spills the intermediate to r1 plus an extra register copy into r3, or (in the goto form) spills the merged value to sp+12 and grows the candidate to 308 bytes. None of the several branch-polarity or declaration-order experiments tried changed this. Given the function is fully understood and every remaining diff is this class of allocator/scheduling artifact rather than an unresolved unknown, further exact convergence would need a lower-level lever (the kind of allocator-order/liveness tooling noted on other owners in this cluster) rather than another manual C respelling."},"shape":{"derivation":"Traced instruction-by-instruction from games/gs1/asm/0801776c.s (no family-transplant template cleared the 7500/10000 threshold; the matcher's best guess, games/gs1/src/battle/presentation/run_action_and_wait.c at 7258/10000, shares only the generic WaitFrames(1) polling idiom and the r8/sl register-shuffle prologue used by dozens of unrelated owners in this project -- no shared field offsets, globals, or real callees, so treated as a false positive per this wave's instructions and not used. Real evidence instead: games/gs1/asm/080187ac.s / games/gs1/asm/08017658.s / games/gs1/asm/08017364.s / games/gs1/asm/08017394.s / games/gs1/asm/08016418.s / games/gs1/asm/0808a278.s / games/gs1/asm/08094154.s for the callees; already-adopted games/gs1/src/ui/text/get_resource_dimensions.c (Func_080187ac = UiText_GetResourceDimensions) fixes that call's 5-argument (no, &out1..&out4) shape exactly; games/gs1/src/ui/render/finalize.c, is_complete.c, and ui/runtime/is_idle.c fix UiWork_Finalize/UiWork_IsComplete/UiWork_IsIdle's signatures; games/gs1/src/ui/timed_notice/create.c is a close sibling that calls UiText_GetResourceDimensions the same way and computes `x=(30-third)>>1; y=(10-fourth)>>1` -- this owner does the same with 12 instead of 10 (a taller box). games/gs1/include/gs1_edition.h's EN-edition offsets nail every field write: RENDER_BUSY_OFS=0x12F9 (the busy byte this owner sets/clears), RENDER_MENU_BUSY_OFS=0xEA6 (set when flags&0x20; games/gs1/src/ui/window/create_with_layout_bounds.c and ui_owner_27.c show the same offset used the same way), RENDER_RESULT_OFS=0x12F4 and RENDER_RESULT_OFS+2=0x12F6 (both cleared unconditionally at the end; games/gs1/src/ui/set_render_result_from_object.c shows this exact pair used as two s16 fields). games/gs1/src/overlays/actor_effect_motion/update_actor_proximity.c documents 0x03001e8c as a pointer table whose entry 0 is the 'scene' base this owner caches in r8. The caller-side signature `void Func_0801776c(s32, s32)` is independently confirmed by three already-drafted callers -- games/gs1/src/save/state/write_slot_pair.c, runtime_owner_249.c, and 0801faa8.json's own shape note -- all of which call `Func_0801776c((s32)&Value_0000000a, 1)` on an error path, matching a general 'show message box `no` with `flags`' role; games/gs1/asm/0801faa8.s and 080207c4.s show further direct callers passing a pc-relative message-id literal and small flag immediates (1, 9). Bit meanings recovered from the branches: flags&1 -> passed through as Func_08017658's 4th arg and reused verbatim as UiWork_Finalize's release arg; flags&2 -> sets RENDER_BUSY_OFS before layout; flags&4 -> skips the finalize+wait-for-idle block entirely; flags&8 / flags&0x40 -> fixed +4/+12 row offset instead of the character-avoiding auto-position branch; flags&0x20 -> sets RENDER_MENU_BUSY_OFS while the box is up. The auto-position branch (no flags&8/0x40) reads a pointer out of Data_02000240+500 and calls Func_0808a278 (a far-call veneer to Func_08094154, itself already retained in games/gs1/asm/08094154.s), which fills a 2-word screen-position buffer from an object's world position minus a camera offset at 0x03001e70+228; the y half is shifted right 3 and compared to 9 to decide +4 vs -5, matching a 'don't cover the character on screen' box-placement heuristic.","call_targets":{"Func_080187ac":"UiText_GetResourceDimensions (adopted exact, games/gs1/src/ui/text/get_resource_dimensions.c)","Func_08017658":"unnamed window/text-box creation call, no exact sibling found; signature (no, x, y, release) recovered from this owner + games/gs1/asm/08017658.s's own body","Func_0808a278":"far-call veneer (games/gs1/asm/0808a278.s) to Func_08094154 (retained, games/gs1/asm/08094154.s) -- fills a 2-word screen-position buffer for an object pointer","Func_08017364":"UiWork_IsComplete (adopted exact, games/gs1/src/ui/render/is_complete.c)","Func_08016418":"UiWork_Finalize (adopted exact, games/gs1/src/ui/render/finalize.c)","Func_08017394":"UiWork_IsIdle (adopted exact, games/gs1/src/ui/runtime/is_idle.c)","Func_080030f8":"WaitFrames (types.h shared name; retained code-gap owner, games/gs1/asm/080030f8.s)"}},"rejected_experiments":[{"experiment":"pos[0]=0;pos[1]=0; as two post-declaration array-element assignments (bare array, &pos[0], and a 2-field struct all tried)","result":"compiler always materializes the buffer's base address (add r5,sp,#N) immediately after the prologue and keeps it live for the whole function, vs reference's plain immediate sp+4/sp+8 stores with a fresh address computed only at the call site -- 142 differing halfwords"},{"experiment":"two independent scalar locals (pos_x, pos_y) with only &pos_x taken, or pos_y marked volatile","result":"breaks the guaranteed memory adjacency Func_0808a278 relies on (pos_y stops sharing pos_x+4), and separately destabilizes the whole prologue's register assignment (sl stops being used for `no`, frame shrinks by 4 bytes) -- 150+ differing halfwords, semantically unsound besides"},{"experiment":"s32 pos[2] = {0, 0}; (aggregate initializer instead of post-declaration assignment)","result":"fixed the buffer's address timing and cascaded to fix nearly all of the x/y/width/height stack-slot addressing -- differing_halfwords 142->113, but left the candidate 4 bytes longer than reference (308 vs 304)"},{"experiment":"Data_02000240+500 spelled as +500, +250*2, +(250<<1), and &((s16*)Data_02000240)[250]","result":"every spelling gets constant-folded to a single pool literal; reference computes the address at runtime via a literal 250 shifted left 1 -- no C spelling tried reproduces this"},{"experiment":"pos[1]>>3-derived y: intermediate named local, the raw expression repeated three times, and an explicit goto/label sequence writing straight into y (matching the reference's own .L4/.L2 label shape)","result":"goto form reproduces the correct branch polarity and store target but spills the merged value to sp+12 and grows the candidate by 4 bytes (308); the other two forms keep the right byte count but always land the shifted value in r1 with an extra register copy into r3, unlike reference's single-register r3 reuse"},{"experiment":"branch polarity swap (dy<=9 vs dy>9) for the y=dy+4/y=dy-5 choice, and reordering the x=0;y=0 zero-init relative to release=flags&1","result":"no measurable effect on differing_halfwords in either case -- this compiler's stack-slot and branch-shape choices here are not driven by simple source-order or condition-polarity changes"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact sibling sources, in-repository headers, and the approved compiler.","Family-transplant score for games/gs1/src/battle/presentation/run_action_and_wait.c was 7258/10000 (LOW confidence, below the 7500 threshold) and, on inspection, is a shape-only false positive: same r8/sl register-shuffle prologue, unrelated real semantics (battle action dispatch/wait vs. this owner's UI message-box open/position/wait). Not used as a template.","This candidate claims zero DONE bytes."]},"main:080178b0":{"schema_version":1,"namespace":"main","address":"0x080178b0","status":"measured-draft","owner_bytes":436,"score":{"measured":"2026-08-31","candidate_bytes":424,"reference_bytes":436,"differing_halfwords":206,"wrong_instructions":213,"class":"missing-extra-code","note":"Fresh candidate-show result: 424/436 bytes, differing_halfwords=206, wrong_instructions=213, topology equal. This materially advances the prior only-compiling fallback (380/436, differing_halfwords=211, wrong_instructions=306, topology different); the aggregate-m2c candidate itself failed compilation. The remaining 12-byte residual is retained honestly and claims zero DONE bytes."},"notes":["Recovered the actual three-argument signature (packed window selector, output words, source buffer), the 384-byte local tile buffer, runtime width fields, two table formats, two expansion callbacks, and the four-level nibble-packing traversal."]},"main:08019000":{"schema_version":1,"namespace":"main","address":"0x08019000","status":"proven-retained","classification":"ui_window_compiler_allocation_module","owner_bytes":140,"executable_owner_bytes":140,"candidate_bytes":140,"differing_halfwords":27,"wrong_instructions":36,"domain":"Writes one screen-entry (tile index/flip bits, optionally OR'd with a palette-bank mask selected by a mode argument) into the UI window tilemap buffer at Data_03001e8c, at a single (x, y) cell offset by the window's own x/y fields and bounds-checked against the window's own width/height fields.","behavior":["loads the shared tilemap base pointer *(u16 **)ADDR_03001E8C (Data_03001e8c, the same global every already-adopted ui/window and ui/text owner in this codebase dereferences)","rejects the call outright (no write) if y+1 is outside [0, window->height-1) or x+1 is outside [0, window->width-1), using the window's own u16 fields at offsets 0x8 (width) and 0xa (height), matching WINDOW_WIDTH/WINDOW_HEIGHT in games/gs1/src/ui/window/update_interpolated_geometry.c","computes a palette-bank mask from the mode argument: mode==3 -> 0xf000, mode==2 -> 0xe000, mode==4 -> 0x1000, any other value -> 0","mode==1 draws nothing at all (early return)","mode in [2,4] computes index = (window->y-field + y + 1) * 32 + (window->x-field + x + 1) using the window's u16 fields at offsets 0xc (x) and 0xe (y) -- the exact same field pair fill_tilemap_rect.c, set_tile_attribute_rect.c, and set_tile_attribute_bit_rect.c already use for the identical offset arithmetic -- bounds-checks it against 640 (32x20 cells), and stores mask|value as one halfword","mode==0 or mode>4 recomputes the identical index and, if in bounds, stores value alone (no mask OR'd in)","the only real caller found in this repository, games/gs1/src/ui/window/draw_three_tile_column.c, always passes mode=0, so only the plain (no-OR) store path is exercised in practice; the mode 1-4 dispatch is evidenced solely by the retained assembly itself"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"Candidate now matches the reference's owner extent exactly (140/140 bytes, same instruction count 68/68) and its full control-flow shape (branch targets, branch polarity, and constants) matches line-for-line. The remaining 29 differing halfwords / 40 wrong instructions are confined to two classes documented in notes: (1) a single branch-encoding mismatch on the mode>=1 guard (own compare constant #1 vs this build's folded #0) that a targeted isolation test proved is an unconditional compiler fold, not a source-spelling issue; (2) a 3-way register-role permutation among r1/r4/r5 for the y/x/mask locals, which is the same hi-register local-alloc tie-break class already characterized and accepted as a floor on other owners this session (e.g. 080c0cec.json, 080a8c2c.json)."},"remaining":"No further legitimate source respelling closed either residual class. (1) An isolated single-statement test (stripping every neighboring statement) confirmed this exact compiler build unconditionally folds an unsigned `mode < 1` (in any spelling tried: `mode < 1`, `1 > mode`, a guarding `mode >= 1`) into `mode == 0`, i.e. `cmp r2,#0; beq`, regardless of context -- yet the reference retains a literal `cmp r2,#1; bcc`. Since the encoded immediate is unambiguously 1 (not 0), the true source's low-bound comparison is not reachable through any unsigned `mode {<,<=} 1`-shaped C expression under this compiler; what construct does produce it is unresolved. (2) The y/x/mask register roles (r1/r4/r5 in this build vs r4/r1/r5 in the reference) did not change under either of two independent, legitimate statement-order rewrites (moving the map-pointer load before vs after the y increment), matching this project's already-documented finding that this GCC 2.96 local-alloc tie-break is statement-order-insensitive. No PERM_GENERAL/PERM_INT search, register-qualified local, inline asm, or flag change was used to chase either residual, per project rules.","notes":["2026-08-31 retained-assembly proof: the canonical candidate reproduces the complete 140-byte owner with equal branch topology and the identical Data_03001e8c literal. The allocator decoder isolates the residual to four interlocked low-register roles (value, x, y, and mask), reports no unique source repair, and every bounds check, mode dispatch, tilemap address calculation, mask, store, and return path is accounted for. Relocation-normalized cross-edition verification proves all 136 non-literal core bytes identical across all six GS1 editions. The source/type/lifetime probes below preserve the allocation or regress, so the structured assembly remains authoritative under ui_window_compiler_allocation_module.","2026-08-31 bounded allocator probe: two previously unrecorded, evidence-backed source properties were tested against the canonical 140-byte candidate and both compiled byte-identically to the baseline (27 differing halfwords, 36 wrong instructions, equal topology): (1) creating adjusted x/y directly inside the unsigned bounds guards with `++x`/`++y` instead of separate increment statements, and (2) typing the palette mask as u32, matching the unsigned tile-attribute carrier used by the adjacent exact UiWindow_SetTileAttributeRect family member, instead of s32. Neither changed pseudo creation ranks, lifetimes, or the r1/r4/r5 role rotation reported by --allocator-order. Both were reverted. Transferable negative fact: for this GCC route, prefix-in-guard spelling and signedness of a nonnegative mask do not affect this allocation floor; do not retry either axis without new RTL evidence.","2026-08-31: reconstructed the post-mask mode dispatch as the natural switch over cases 0..4. This makes GCC emit the reference's literal `cmp mode,#1; bcc` range guard, removes the only branch-topology mismatch, and improves the exact-extent candidate from 29 differing halfwords / 40 wrong instructions to 27 / 36. Explicit adjusted-x/adjusted-y locals were measured and rejected (144 bytes, 63 differing halfwords): they disturb the otherwise-correct window/map lifetime family. The remaining residual is now allocation-only.","The family-transplant matcher's only suggestion for this owner, games/gs1/src/display/transition/update_scanline.c (score 7384/10000, below this project's 7500 threshold), was read in full and has zero real overlap with this owner: it is a scanline-interrupt state machine over an entirely different struct (fields at 0x104/0x106/0x108) with no shared callees, no shared field offsets, and no shared constants. Confirmed as a shape-only false positive (matches the low-scoring-cluster pattern this session already found to be unreliable) and not used as evidence for this reconstruction.","The real evidence trail instead came from the shared global Data_03001e8c: grepping for it across games/gs1/src/ui/window and ui/text surfaced fill_tilemap_rect.c, set_tile_attribute_rect.c, and set_tile_attribute_bit_rect.c, all already-adopted-exact siblings that dereference the same pointer and read the same window struct fields (u16 width@0x8, height@0xa, x@0xc, y@0xe -- the last two confirmed exactly by set_tile_attribute_rect.c's own UiWindowGeometry static-asserted offsets and by update_interpolated_geometry.c's WINDOW_WIDTH/HEIGHT/X/Y macros). This owner is the single-cell (non-rect, non-loop) member of that same window-tilemap-write family: a plain state-machine trace of games/gs1/asm/08019000.s directly, not a family-transplant template.","The 5-argument, all-s32 call signature and the mode=0-only call pattern are independently corroborated by the one real caller in this repository, games/gs1/src/ui/window/draw_three_tile_column.c, which already forward-declares `void Func_08019000(s32, s32, s32, s32, s32);` and calls it three times with a packed tile value, x, y, and a literal 0 for the final argument -- consistent with (window, value, x, y, mode) and with mode's dispatch being effectively dead code on every path this repository actually exercises.","Registered the name UiWindow_SetTilemapEntry in games/gs1/source-paths.json (name-only, no exact C yet) and added the matching .global alias immediately above .global Func_08019000 in games/gs1/asm/08019000.s, per the project's owner-register convention (mirrors games/gs1/asm/08003e58.s's ResourceTable_AllocateBlocks alias). tools/check owners passes.","Recovered only from retained owner assembly (games/gs1/asm/08019000.s), the already-adopted in-repository sources games/gs1/src/ui/window/fill_tilemap_rect.c, set_tile_attribute_rect.c, set_tile_attribute_bit_rect.c, and update_interpolated_geometry.c, the already-adopted caller games/gs1/src/ui/window/draw_three_tile_column.c, and the approved compiler's own candidate-show/--asm output. No GS2 evidence, external source, other decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0801908c":{"schema_version":1,"namespace":"main","address":"0x0801908c","status":"measured-draft","owner_bytes":320,"executable_owner_bytes":320,"candidate_bytes":228,"differing_halfwords":156,"wrong_instructions":187,"template_family":"template-main-080217a4","template_source":"games/gs1/src/ui/apply_table_scale_to_object.c","domain":"Shares the template's general shape (an object with an affine-matrix-adjacent sub-object at offset 16, a call into an affine/rotation helper, and bit-field writes into that sub-object) but implements a state-machine effect driver: a mode byte (object offset5) selects one of two 32-entry tables (by a wrapping counter at offset12, modes 9/10) or one of two 8-entry tables (by a saturating counter, modes 11/12, which stop advancing past index 7), producing a 16-bit 'value' that defaults to 256 (a sentinel meaning 'no active effect') when the mode doesn't match or a saturating counter has already maxed out.","behavior":["value defaults to 256 (0x100); modes 9/10 read+advance a wrapping (mod 32) counter into one of two 32-entry halfword tables, mode 10 additionally halving the looked-up value; modes 11/12 do the same against two different 8-entry tables (offset +32 from the table base, stride 4) but only while the counter is <=7, otherwise leaving value at the 256 default","if value==256: clears specific bits in the sub-object's offset7 and offset5 byte fields, then falls through to a shared tail that copies obj->field6/field8 into the sub-object's field6/field4","otherwise: packs the value into a stack-resident bitfield structure, calls Func_08003d28 on it, masks the low 5 bits of the result into the sub-object's offset7 byte (bit 1 upward), and then branches on whether value exceeds 256: the >256 case sets two extra sub-object bits, computes field6 from obj->field6 minus 8, and field4 from obj->field8+248, returning early; the <=256-but-not-equal case instead sets a single different bit pattern and falls into the same field6/field4 tail as the value==256 case"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete-behavior candidate was written directly from the raw assembly and scored (228 vs 320 bytes, 92 bytes short, 187 wrong instructions). The stack-resident bit-packing block feeding Func_08003d28 (which the disassembly builds via three separate AND/OR/shift operations against a 12-byte stack buffer, reusing pool masks 0xffff0000/0x0000ffff/0x0000fff8/0xfffffe00) was approximated with a single scalar expression rather than reconstructing the actual struct/bitfield layout that produces that exact instruction sequence, which accounts for most of the size gap."},"remaining":"This owner is markedly more involved than the family's typical member (320 bytes, an inlined affine-matrix-style bit-packing block plus a 4-way table-driven state machine) and needs a dedicated pass to recover the actual stack struct passed to Func_08003d28 -- almost certainly the same kind of 3-halfword 'Effect'-like structure the template builds for its own AffineMatrix_BuildForEffect call, but packed and masked differently here. The table-driven mode dispatch (modes 9-12, wrapping vs saturating counters, the two table shapes) is corroborated directly against the assembly and is higher-confidence than the bit-packing block.","notes":["Struct field names (SubObject.field4/field5/field6/field7, Object.field8) are placeholder offsets read directly off this owner's own assembly; the correspondence to the template's Object/Effect struct is only structural (same offset16 sub-object idea), not verified field-for-field.","Recovered only from retained owner assembly, the already-adopted field_owner_83.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0801965c":{"schema_version":1,"namespace":"main","address":"0x0801965c","status":"measured-draft","owner_bytes":104,"candidate_bytes":100,"differing_halfwords":43,"wrong_instructions":50,"classification":"copy-ui-render-string","notes":["Complete ordinary-C reconstruction of a bounded u16 render-string copy. It clears work offset 0x12b2, asks Func_08018038 to build the shared string at work offset 0xeb0, copies at most capacity-1 halfwords through the first zero, appends zero, and returns the copied count.","The shared work pointer and +0xeb0 render buffer are independently established by the exact UiText_SetRenderString source. Multiple UI callers pass a stack u16 buffer and a fixed capacity, corroborating the bounded-copy interface.","The initial indexed draft compiled to 112 bytes with different topology because it spilled the destination and recomputed both indexed addresses. The one permitted evidence-led correction adopted the reference's walking source pointer, fixed destination base, byte offset, and post-builder count initialization.","After that correction canonical GCC 2.96 emits 100 bytes against 104 reference bytes, with 43 differing halfwords and 50 wrong instructions. The compiler still schedules the absolute-zero value early, folds a repeated source test into a second load, and does not preserve the reference's capacity in ip; no further source search was performed in this lane.","This measured draft claims zero DONE bytes. Retained assembly remains authoritative; no inline assembly, fixed-register variable, frame forcing, copied instruction bytes, or assembly promotion is used."]},"main:08019854":{"schema_version":1,"namespace":"main","address":"0x08019854","status":"measured-draft","owner_bytes":136,"candidate":{"coherent_translation_unit":{"candidate_bytes":140,"reference_bytes":136,"differing_halfwords":59,"wrong_instructions":40},"workbench_objdiff":{"match_percent":78.51562,"instructions":71,"arg_mismatches":17,"op_mismatches":1,"replace":1,"delete":5,"insert":7}},"family":{"template_matcher_guess":{"owner":"main:08021620","source":"games/gs1/src/graphics/resource/create_pair.c","score_basis_points":7402,"call_target_similarity_basis_points":0,"verdict":"false positive"},"evidence":"Read create_pair.c (RenderResource_CreatePair): it allocates a resource-table slot, loads a resource pair via Func_0801eadc, and stamps sentinel/table-index fields. It shares zero callees, zero struct-field offsets, and zero constants with this owner, confirming the family-matcher's 7402/10000 score is a shape-only match on the shared register-shuffle prologue (push r5-r7,lr / mov+push r8-fp) that this session already flagged as a common false-positive pattern in the highest-scoring cluster, not real kinship.","actual_identity":"Discovered directly from an already-adopted exact caller, not from the family matcher. games/gs1/src/ui/runtime/process_render_channels.c (UiWork_ProcessRenderChannels) already forward-declares `void Func_08019854(void *);` and calls `Func_08019854(channel)` whenever the channel's active Work item has a nonzero `pending` (transition-kind) field, i.e. this owner is the handler for an in-progress channel transition. Its two call targets, Func_080170f8 (draws a window border into the BG tilemap, confirmed by reading its own retained assembly: bounds-checks width/height to [2,30] tiles, writes box-drawing tile codes) and Func_08016178 (erases a window border region, same bounds-checking shape, fills with blank/edge tile codes), are both already used by exact, byte-verified sibling owners in games/gs1/src/ui/render/ and games/gs1/src/ui/window/ with the identical (x, y, width, height) argument shape."},"behavior":["arg0 (`channel`) is one of the three ui/render channel slots at Data_03001e8c + RENDER_CHANNEL_OFS (struct Slot, 0x28 bytes, matching the already-exact games/gs1/src/ui/render/activate_channel.c layout: work ptr @0, field04, field06, values[4], field10, field12, field14, ...)","dereferences channel->work (a struct Work* -- the same width@8/height@0xA/x@0xC/y@0xE/state@0x14 layout already proven exact in games/gs1/src/ui/render/finalize.c and games/gs1/src/ui/window/update_interpolated_geometry.c) and reads its width, height, x, y, and the transition-kind field at offset 0x12","no-ops unless that transition-kind field equals 4","when it is 4: draws a 1-tile-larger highlight border (x-1, y-1, width+2, height+2) via Func_080170f8, then decrements channel->field14 (a per-channel countdown, reset to 0 by UiWork_ActivateChannel and to 1 by UiWork_ProcessRenderChannels)","when that countdown reaches zero: clears the Work's transition-kind field to 0, erases the highlight border via Func_08016178 using the same expanded rect, then redraws the Work's own (unmodified) border via Func_080170f8"],"bounded_search":{"exact":false,"canonical_best_differing_halfwords":59,"canonical_best_candidate_bytes":140,"tested":["flat locals x,y,width,height (no separate `pending` local), condition written inline as `if (work->pending == 4)`: reproduces the reference's x->r9, y->fp, width->stack(sp+4), height->stack(sp+0) register/stack assignment exactly (tail of the function -- the decrement idiom, the final Func_080170f8(x,y,width,height) call setup, and the trailing alignment padding -- matches byte-for-byte), but reads `pending` last (right before the branch) instead of between width and height as the reference does; costs one extra spill-store of width plus one extra reload after the branch (140 vs 136 bytes, workbench objdiff 85.875%, wrong_instructions=34)","same as above but as two sequential early-return guard clauses instead of a nested if (matches the retained assembly's single shared .L0 epilogue label used by both `bne` branches): byte-identical output to the nested-if version, confirming guard-clause-vs-nested-if is not a differentiator here","switch (work->pending) { case 4: ... } with height declared inside the case body: byte-identical to the plain inline-if version (136 bytes, 56 differing halfwords by candidate-show's raw count, but with height's read moved after the branch -- contradicts the retained assembly, which reads offset 0x0A before the `bne`)","explicit `s32 pending = work->pending;` local declared between width and height (matching the retained assembly's confirmed read order: offsets 12,14,8,18,10 = x,y,width,pending,height, verified by direct line-by-line trace of games/gs1/asm/08019854.s lines 17-28): reproduces the correct read order, but the extra live SImode pseudo rotates the whole register/stack assignment by one slot (x->fp, y->stack, width->stack, height->r9 instead of the reference's x->r9, y->fp, width->stack, height->stack) -- worse net score (140 bytes, wrong_instructions=40, workbench objdiff 78.5%)","same as above but `u16 pending` instead of `s32 pending`: avoids disturbing the x/y/width/height allocation (matches the inline-if version's correct allocation exactly), but the load is then scheduled last again, identical to having no separate local at all -- HImode locals apparently do not get hoisted to their declaration position the way an SImode local does on this route","`pending` read via M2C_FIELD(work, u16 *, 0x12) pointer-cast macro (matching the M2C_FIELD idiom already used in games/gs1/src/ui/render/output_list/redraw_saved_rect.c and prepare_for_redraw.c) instead of struct-member syntax, kept between width and height: worse still (144 bytes, wrong_instructions=44)","all five locals (x, y, width, pending, height) typed u16 instead of s32: the `-1`/`+2` adjustments then compile as signed 16-bit arithmetic requiring ldrsh/lsls+lsrs sign-extension pairs the reference does not have (160 bytes, wrong_instructions=72) -- confirms x/y/width/height must stay s32/int, matching games/gs1/src/ui/window/update_interpolated_geometry.c's convention for the same struct fields"],"result":"Every field offset, call target, call argument shape, and the channel/pending/countdown control flow is pinned down with strong evidence (an already-adopted exact caller declares this owner's own signature; both callees and both struct layouts are independently exact elsewhere). The single remaining gap is register allocation for the four struct fields read up front: an SImode `pending` local reproduces the reference's true read order (proven by direct instruction trace) but rotates which of {x,y,width,height} land in the extended registers r9/fp versus the two stack slots; omitting it (or making it HImode) reproduces the reference's register assignment but reads `pending` in the wrong position, which costs two extra instructions the reference does not have. No tried shape gets both right simultaneously."},"remaining":"GCC 2.96's local/global register allocator on this route assigns x, y, width, height (all defined before any call, all live until the final Func_080170f8 call) to r9, fp, and two stack slots. Introducing one more SImode value (`pending`) that is live simultaneously with x/y/width but dies at the following `cmp` -- exactly where the retained assembly's own read order requires it -- rotates that assignment by one slot in every tested variant, even though `pending`'s live range never crosses a function call and so should not need to compete for call-surviving storage at all. A same-shape HImode local sidesteps the rotation but is then scheduled to the end of the block regardless of its declared position, reproducing the no-separate-local case instead. This looks like the same class of GCC-2.96-specific register-allocation/scheduling interaction documented for other owners in this corpus (see e.g. main:08003e10's stmia investigation) rather than a wrong source shape, but confirming the exact mechanism would need reading alchemy-gcc's local-alloc.c/global.c directly, which this pass did not do. Neither exact adoption nor a permanent-assembly classification is justified from this evidence alone.","notes":["Recovered only from games/gs1/asm/08019854.s (hand-traced instruction-by-instruction), the approved EN ROM, and already-adopted exact sources under games/gs1/src/ (ui/render/finalize.c, ui/render/activate_channel.c, ui/render/drain_pending.c, ui/render/finalize_pending.c, ui/window/update_interpolated_geometry.c) plus their declared-but-unadopted callees' own retained assembly (games/gs1/asm/080170f8.s, games/gs1/asm/08016178.s) and the already-adopted caller games/gs1/src/ui/runtime/process_render_channels.c.","The family-matcher's create_pair.c guess (7402/10000, below the 7500 adoption threshold) was independently checked and confirmed a false positive: shared register-shuffle prologue shape only, zero shared callees or field offsets. The real identity was found through the caller's forward declaration, not the family matcher.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI attribute, copied instruction bytes, or compiler flag override was used.","This candidate claims zero DONE bytes.","games/gs1/source-paths.json registers main:08019854 as {\"name\": \"UiWork_AdvanceChannelTransition\"} (name only, no path -- retaining a descriptive name without exact C, matching the convention already used for main:08003e10). The working draft at games/gs1/recon/en/main/08019854.c keeps the function itself named Func_08019854 because both `compiler candidate-show` and `compiler workbench` resolve the reference object by the literal symbol exported from games/gs1/asm/08019854.s (the registered descriptive name is not applied to that export)."]},"main:08019aa0":{"family":"template-main-08028f98","template_owner":"main:08028f98","template_source":"games/gs1/src/menu/run_selection.c","candidate_path":"games/gs1/recon/en/main/08019aa0.c","reference_bytes":256,"best_candidate_bytes":252,"best_differing_halfwords":82,"best_wrong_instructions":68,"status":"measured-draft","notes":["Template (Menu_RunSelection, a window-create-then-poll-loop menu) is thematically related but this owner's actual logic (from games/gs1/asm/08019aa0.s) is a different dialog-creation routine: looks up a table entry via Func_08018038(p1) to gate whether to proceed at all; if gated in, calls Func_080187ac(p1, &x, &y, &w, &h) to get placement/size (x,y pre-seeded to 8 as in/out defaults), centers the dialog via (30-w)/2 and (15-h)/2+baseY, creates the object via Func_080162d4 with a branch on the `flag` param (full size vs a fixed 0/0 size plus writing `flag` into two output fields), then runs Func_080165d8 and, depending on its result, either finalizes immediately or spins two Func_080030f8/Func_08017364 and Func_08016418/Func_08017394 wait-loops before zeroing two fields at Data_03001e8c+0x12f4/0x12f6.","One respelling attempt beyond the direct translation: tried replacing the two `/2` divisions with `>>1` (since the reference's centering math uses a plain `asrs` with no rounding-toward-zero correction, while the direct `/2` translation compiled to an extra `lsrs+adds` sign-correction pair before the shift) -- this reproduced the reference's plain-shift instruction locally but made the OVERALL match worse (wrong_instructions 68->72), suggesting the rounding-correction sequence is entangled with other register allocation elsewhere in the function rather than being a clean local fix. Reverted to `/2`.","Given the size and complexity of this owner (256 bytes, 6 saved registers, ~15 struct/stack-passed intermediate values, nested wait-loops) and the bounded per-owner effort budget for this batch, this reflects one careful direct-translation pass plus one respelling probe rather than an exhaustive iteration; the 68 remaining wrong instructions are spread through register-number choices (r8/r9/sl assignment order) rather than concentrated in one clear structural gap I could isolate further within budget.","Struct/field names are placeholders (no header confirms Func_080187ac's or Func_080162d4's exact signature); all offsets and call argument counts/order are read directly from the assembly and are high-confidence. Worth a fresh, more patient pass focused on the sp20/sp16 in/out parameter idiom and the rounding-shift interaction before falling back to permuter search."]},"main:08019bfc":{"schema_version":1,"namespace":"main","address":"0x08019bfc","status":"measured-draft","owner_bytes":272,"candidate_bytes":268,"differing_halfwords":111,"wrong_instructions":168,"family":{"id":null,"template_owner":null,"note":"Below the 7500/10000 family-transplant threshold (best guess 7220/10000, main:0801e260 / games/gs1/src/ui/window/clear_tile_attributes_in_rect.c). Read that source directly: it is an unrelated tile-attribute-clearing double loop over a fixed 30x20 window with no bitstream state, no table lookup, and no calls -- the match is shape-only (leaf-function n-gram/length coincidence), confirmed a false positive as flagged for this wave, and not used."},"domain":"A two-stream variable-length bit decoder, called repeatedly with a small persistent state struct. Reads one control bit from a byte-refilled 'stream A' (state->ptr/state->bits, persisted across calls); on a 1-bit it walks a signed unary run over a second bitstream ('stream B') seeded fresh each call from a ROM table row selected by the *previous* decoded value, incrementing a rank counter per 1-bit; after the run it reads one more stream-B confirmation bit and either loops back to stream A (rank keeps accumulating) or stops. The final rank selects a byte-pair position, walking backward from a table-row-relative anchor, and extracts either the high nibble+following byte or a masked low nibble+following byte depending on rank's parity, producing a 12-bit result that is written back into state->code (both the return value and the *next* call's table-row/column selector). No `bl` anywhere in the owner -- it is a pure leaf function; the three inlined 'read one bit with 0x80-sentinel refill' expansions duplicate register-shuffle idioms already seen in the project's other bitstream code (games/gs1/src/resource/decompress_lz.c's control/sentinel pattern) but are not literally that function.","behavior":["entry: hi = state->code >> 8 selects a table row at Data_0803842c + hi*8 (row = {const u8 *base; const u16 *deltas;}, fetched by register-offset addressing, not a compile-time struct field, per the retained ldr[r2,r3]/adds r3,#4/ldr[r2,r3] pair); lo = state->code & 0xff indexes deltas[lo]; pos = base + deltas[lo] becomes stream B's starting cursor, anchor = pos - 1 is kept as the fixed nibble-table origin for the final extraction","stream A (persisted): buf = state->bits, ptr = state->ptr; bit = buf & 1, buf >>= 1; if buf hits 0 after the shift, refill buf = (*ptr++ >> 1) | 0x80 and recompute bit from the fresh byte","outer loop: read a stream-A bit; if 1, run an inner do-while over stream B (same refill idiom, own mask/sentinel materialized fresh at loop entry): each 0-bit does counter++, each 1-bit does rank++ / counter--, loop continues while counter >= 0","after the inner loop (or immediately if the stream-A bit was 0), read one stream-B confirmation bit with the *outer* mask/sentinel (shared physical register with stream A's own reader, unlike the inner loop's freshly materialized copy); a 0 sends control back to the top of the outer loop (rank keeps its accumulated value), a 1 falls through to the final decode","final decode: idx = rank*3; if (idx*4)&7 == 0, result = (anchor[-(idx>>1)] << 4) | (anchor[-(idx>>1)-1] >> 4); else result = ((anchor[-(idx>>1)] & 0xf) << 8) | anchor[-(idx>>1)-1] -- each branch recomputes idx>>1 independently rather than sharing a hoisted value","writeback: state->bits = buf (stream A only -- stream B's cursor/buffer are never persisted, matching that stream B is always reseeded from the table at the next call), state->code = result, state->ptr = ptr; return result"],"bounded_search":{"mode":"iterative-candidate-show","attempted":6,"exact":false,"reason":"workbench could not run (`compiler workbench` resolves owners through the registered manifest only, and this owner has neither a family match above threshold nor a registered name to key off of, so `--owner/--size` -- accepted by candidate-show -- is not accepted by workbench); iterated directly against games/gs1/asm/08019bfc.s with `candidate-show --owner 0x08019bfc --size 272 --align`. Six rounds: (1) first control-flow-faithful goto draft, struct-typed table row, shared half-hoisted before the final branch: candidate=228 wrong_instructions=188 differing_halfwords=134, and the reference's r8/r9/sl/fp extended-register save/restore was entirely absent. (2) hoisting mask=1/sentinel=0x80 into real persisted locals (used at both stream-A's reader and the outer stream-B confirmation reader) plus a second, freshly-materialized mask2/sentinel2 pair scoped to just the inner unary-run loop reproduced the extended-register prologue/epilogue exactly and got matched_prefix to 7: candidate=264 wrong_instructions=170 differing_halfwords=126. (3) replacing the struct-typed table row with byte-offset pointer arithmetic (offset=hi<<3, then offset+=4) reproduced the reference's register-offset `ldr[r2,r3]`/`adds r3,#4`/`ldr[r2,r3]` addressing exactly, replacing the struct version's immediate-offset addressing: differing_halfwords 126->117. (4) fixing the unary-loop's branch polarity to match the traced .L2/.L3/.L4/.L5 shape exactly (fallthrough-is-counter++, branch-is-rank++, not the inverted form first written): differing_halfwords 117->114. (5) un-hoisting the final nibble extraction's `idx>>1` so each if/else branch recomputes it independently (matching the retained assembly's two separate `lsrs`, one per branch) rather than sharing one pre-computed value: differing_halfwords 114->111, wrong_instructions 168."},"remaining":"matched_prefix is 7 instructions (the full extended-register prologue) and essentially every remaining line is the same instruction with a different (but valid) register choice -- of 111 differing halfwords, all but a handful of true insert/delete lines are register-rename-only ('!' rows in candidate-show's diff, not '+'/'-'). The divergence starts at the very first table-row fetch (this compiler puts the freshly-loaded state->code copy in a different physical register than reference, cascading a different-but-consistent register assignment through the rest of the function) and at a handful of independent-instruction-scheduling choices inside the three inlined bit-read expansions (e.g. where the compiler chooses to hoist the 'mov r_lo, r8' sentinel copy relative to the surrounding shift/mask, which differs between my draft and reference even though both compute the same values). No further source-shape lever was found within this pass's budget that changes those specific choices; per Cleanroom's stalled-last-mile guidance this would need the persistent local instruction/register-pressure invariant pinned down explicitly (e.g. by first getting an owner of this exact register-pressure shape byte-exact elsewhere in the corpus) rather than more blind reordering here.","notes":["Cross-checked against the ARM-mode twin at games/gs1/asm/relocated_arm_helpers/08015430.s, which references the identical literal table address 0x0803842c and the identical row shape (ldm {r4,r5} of two words at table+hi*8, r1&0xff*2 used as an ldrh index into the second word) -- same algorithm family, ARM-optimized (32-bit-at-a-time rrx/carry bit reader) vs this owner's byte-at-a-time Thumb reader. Not adopted anywhere in the project; not itself byte-exact-recovered; used here only as corroborating evidence for the table-row layout, not copied from.","games/gs1/assets/data/saihouchi_arm.json lists 08015430's consumers as Func_08018038 and Func_080196c4; neither is adopted, and games/gs1/src/ui/adjust_value_without_limit.c's Func_080196c4(s32,s32,s32) declaration is arity-incompatible with this owner's struct-pointer decoder, so that lead did not pan out and was not pursued further.","No literal callers of Func_08019bfc were found anywhere in games/gs1/asm (grepped for both the raw address and the symbol name); the owner has zero `bl` instructions itself. It is presumably reached only through an indirect/function-pointer call from a region not yet retained, or from ARM code via the relocated-helpers mechanism.","No descriptive name registered in games/gs1/source-paths.json: the algorithm (two interleaved bitstreams, context-selected table row, backward nibble table walk) is traced with reasonable confidence from the assembly, but I do not have enough evidence to name what it decodes (text? graphics? some other resource), so Func_08019bfc is left as-is rather than asserting a specific domain in the symbol name.","Recovered only from games/gs1/asm/08019bfc.s, the ARM twin games/gs1/asm/relocated_arm_helpers/08015430.s (both in-repo retained assembly), and the approved compiler via tools/compiler candidate-show. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, or compiler modification was used. Zero DONE bytes are claimed; adoption requires 0 differing_halfwords."]},"main:0801b664":{"schema_version":1,"namespace":"main","address":"0x0801b664","status":"measured-draft","owner_bytes":428,"executable_owner_bytes":428,"candidate_bytes":492,"differing_halfwords":244,"wrong_instructions":298,"template_family":"template-main-0801b4ec","template_source":"games/gs1/src/menu/selection/move_forward.c","domain":"A genuine sibling of the template's Menu_MoveSelectionForward: it operates on the exact same menu-state struct (the byte offsets 0x394/0x39c/0x39e/0x3a2/0x348 that the template names count/selection/index/status/list all recur here at the identical addresses, confirmed by cross-reading both raw disassemblies), calling the same Func_0801b9a8/Func_0801b9ec/Func_0801ba68/Func_080030f8/Func_0801b010 helpers, but adds a substantially larger body: after advancing the selection index it inspects a table slot (state+916) and, when a specific end-of-list condition is hit, walks a singly linked list rooted at state+0x348 (next pointer at node offset 4) twice -- once to stamp interior nodes with 'count'/'selection'-derived visual fields and a distinct value on the last node, once (after a Func_0801bd98 callback per node) to restripe every node's position fields by a fixed 16-unit step.","behavior":["Func_0801b9a8(state, index); status=33; WaitFrames(1); index++","reads a table-slot halfword at state+916; if it is <=5, only handles a narrower 'slot==*count' case (clearing state+924) and falls through to the shared tail","if the slot is >5 and (selection-table value + index) equals it, walks the state+0x348 linked list: stamps every interior node's base/status/y-ish fields from *count/*selection, stamps the terminal node with status=16, then busy-waits (WaitFrames loop) until a node field settles; then calls Func_0801bd98 once per node with per-index halfword pairs from around state+852; then zeroes count/selection and re-walks the list a second time restriping node fields with a running value that starts from the terminal node's field and steps by 16 per node, tagging each with status=12","in the >5-but-not-matching case, mirrors the template's own 'index==4' branch structure (decrement index, set two byte-ish flags, advance selection, call Func_0801ba68, possible extra clear)","shared tail: status=1; Func_0801b9ec(state, index); WaitFrames(1); Func_0801b010 using the halfword at list_head+10; WaitFrames(1)"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete-behavior candidate was written and scored. It is 64 bytes over reference (492 vs 428) and needs 4 extra callee-saved registers (fp, sl, r8, r9 all pushed) versus reference's 2 (sl, r8), showing the source shape carries far more simultaneously-live locals than the real function used -- a genuinely different, more time-intensive respelling pass (collapsing the temporaries introduced for readability back into the same handful of registers reference reuses across the linked-list walks) would be needed before iterating on exactness."},"remaining":"This owner (and its sibling 0801b810) turned out to be substantially larger and more involved than the family's other 'small, under ~600 byte' members -- a full byte-exact reconstruction needs a dedicated pass, not the bounded per-owner budget used for the rest of this batch. The behavioral read above is solid (struct offsets are corroborated against the already-adopted template, not guessed) and is a reasonable starting point for that future pass. The likely next step is reducing live-range overlap in the two list-walk blocks so the compiler doesn't need more than two callee-saved scratch registers, matching reference's r8/sl usage.","notes":["Struct field names on 'struct ListNode' (unknown00/0c/0e/12/16, base, y, x) are placeholders for offsets read directly off the assembly; only 'next' (offset4, confirmed by the repeated 'ldr r5,[r5,#4]' traversal) and 'status'/'base' (matched to the template sibling's own count/selection semantics) carry real confidence.","Sibling 0801b810 (also assigned) shares this exact struct and helper set with mirrored-but-not-identical control flow (likely 'move selection backward' to this owner's 'forward'); see its own dossier.","Recovered only from retained owner assembly, the already-adopted move_forward.c template, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0801b810":{"schema_version":1,"namespace":"main","address":"0x0801b810","status":"measured-draft","owner_bytes":408,"executable_owner_bytes":408,"candidate_bytes":508,"differing_halfwords":253,"wrong_instructions":240,"template_family":"template-main-0801b4ec","template_source":"games/gs1/src/menu/selection/move_forward.c","domain":"The 'move selection backward' mirror of sibling 0801b664, on the same menu-state struct (state+916/924/0x39e/0x3a2/0x348, the same count/selection/index/status/list fields the template names) and the same helper set (Func_0801b9a8/Func_0801b9ec/Func_0801ba68/Func_080030f8/Func_0801b010/Func_0801bd98), but with the linked-list restripe running in the opposite direction (a descending 64-then-minus-16 step versus the forward sibling's ascending step) and a different early-exit branch structure for the small-slot case.","behavior":["Func_0801b9a8(state, index); status=33; WaitFrames(1)","reads the table-slot halfword at state+916; when <=5 it just decrements index (wrapping to 0xffff at 0) and falls to the shared tail","when >5: if the selection-table value or index is nonzero, handles either an 'index==1 && selection!=0' step-back case (writes state+8=8, decrements the selection-table value, calls Func_0801ba68(state,0), possibly clears state+10, writes state+62) or otherwise just decrements the table-slot value at state+916","when both are zero: walks the state+0x348 linked list restriping each interior node's position from a descending base (starts at 64, steps -16) and status=12, busy-waits for the head node's y/base fields to settle, computes an offset from (count!=5)?(count-5):0, writes it at two more state fields, calls Func_0801bd98 per node the same way as the forward sibling, then re-walks the list a second time restriping base/status with an ascending step of 16 starting from that offset","shared tail identical to the forward sibling: status=1; Func_0801b9ec(state,index); WaitFrames(1); Func_0801b010(list_head+10 halfword, 0); WaitFrames(1)"],"bounded_search":{"mode":"screen-only","attempted":1,"exact":false,"reason":"One complete-behavior candidate was written and scored (508 vs 408 bytes, 100 bytes over, 240 wrong instructions). Several branches in this owner (the 'index==1 && selval!=0' step-back arm and the offset-computation loop before the second list restripe) were read under real time pressure and are lower-confidence than the corresponding parts of sibling 0801b664; a careful re-derivation of those two regions from the raw assembly, followed by the same live-range-reduction pass noted for 0801b664, is the realistic path to closing this gap."},"remaining":"Same situation as sibling 0801b664: substantially larger and more involved than this family's other members, needing a dedicated follow-up pass rather than this batch's bounded per-owner budget. The struct correspondence to the already-adopted move_forward.c template is solid; the two lower-confidence branches called out above are the first things to re-verify against the raw assembly before attempting exactness.","notes":["Struct field names are the same placeholders used in sibling 0801b664's dossier; only 'next' (offset4) and the count/selection/index/status/list field identities (matched to the template) carry real confidence.","Recovered only from retained owner assembly, the already-adopted move_forward.c template, cross-reading against sibling 0801b664's own disassembly, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0801c8a0":{"schema_version":1,"namespace":"main","address":"0x0801c8a0","status":"proven-retained","classification":"encoded_index_lookup_compiler_allocation_module","owner_bytes":132,"score":{"measured":"2026-08-31","candidate_bytes":132,"reference_bytes":132,"differing_halfwords":33,"wrong_instructions":60,"class":"missing-extra-code","note":"Both lookup passes and the complete owner extent are recovered with equal branch topology. All four pool words are exact and cross-edition verification proves the complete 116-byte core identical in every edition. A 10,000-candidate annotation-free search finds no decoded repair, while canonical and seven bounded shipped compiler routes find no exact or closer result. The remaining residual is equivalent output-pointer, entry-pointer, index, mask, and per-iteration halfword carrier allocation. Structured assembly remains authoritative under encoded_index_lookup_compiler_allocation_module; the candidate does not claim exact C."},"notes":["Replaced an unrelated display-script family transplant with the reference's actual two-pass encoded-entry lookup and recovered its three-argument signature.","The reference's first global access is Data_02000240 + 0x220 expressed as element 136 of a four-byte runtime view; the second is the adjacent 0x02000462 halfword re-read for each comparison pass.","A 10,000-candidate annotation-free permutation request stopped safely because the allocator decoder found no unique repair. Canonical and seven bounded shipped-flag routes produced no exact result; -fno-regmove, -fno-schedule-insns2, and -fno-expensive-optimizations regressed."]},"main:0801d4cc":{"schema_version":1,"namespace":"main","address":"0x0801d4cc","status":"measured-draft","owner_bytes":1152,"candidate_bytes":1144,"differing_halfwords":508,"wrong_instructions":373,"classification":"party-slot-loadout-select-screen","family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"Family-clustering false positive, confirmed independently before drafting (score 7855bp, matched only on the generic push{r5,r6,r7,lr}/mov-fp-sl-r9 register-shuffle prologue and the for(;;)-redraw-then-poll-input idiom shared by many gs1 UI loops). The real owner takes no parameter (the template's `actor` argument is never referenced anywhere in this owner's disassembly -- r0 is overwritten before any use), calls none of the template's shop/UiWindow_CreateFar/Ability_GetAvailability functions, and instead drives a base-object pointer read from the SAME Data_03001ea0 workspace used by the already-drafted siblings 0801db70.c (measured-draft), games/gs1/src/graphics/palette/load_selection_resources_and_advance.c (exact), and games/gs1/src/menu/run_selected_workspace_entry.c (exact). games/gs1/src/shop/select_party_member.c was also checked directly and shares no call targets, constants, or field offsets with this owner either -- neither shop sibling is the real family for this address."},"domain":"Cycles a 0-4 'page' index (var stored at workspace+0x574, updated via a mod-5 Modulo(page+delta,5) idiom identical to the field_owner_54.c/0801db70.c siblings) and, on every redraw, recomputes a per-page byte at workspace+0x594[page] from workspace+0x594[page]+workspace+0x599[page] (mod 5), then redraws three fixed icon rows of length 3/2/2 at workspace+0x5EC/0x5F8/0x604 (each entry a pointer to a RenderOutput-shaped widget: byte 0xF set to the 0xFB sentinel, refreshed via Func_080a1038, then loaded via RenderResource_LoadFrame with an icon id pulled from one of three ROM byte arrays Data_080367c9/cc/ce and a selected/highlight flag computed against the fixed workspace bytes 0x596/0x597/0x598), draws two Func_080b0030 number/quantity readouts keyed off workspace bytes 0x594/0x595 (via FixedPoint_Ratio and a per-page ROM table at the constant read from workspace+0x599/0x59A), draws three portrait/character cells (Func_080164d4 + UiText_DrawCharacter) whose resource id is workspace[0x596/0x597/0x598] plus the fixed constants 0xC0A/0xC10/0xC13, combines the two byte selections via Func_0801ccc0, and draws a final cursor-position readout keyed off the current page. The polling tail advances the page's animation counter at workspace+0x57E (wrapping past a 0x50000/65536 threshold and re-deriving the two byte selections from Data_080367d0/d6 tables) on input bit 4, confirms (bit0/bit3 -> result 0, or bit1 -> result -1) or steps the current page's byte up/down/left/right on ADDR_03001B04, then on exit either snapshots the five workspace selection bytes (0x594-0x598) into five fixed globals (0x02000445/446/44C/44A/046A and 0x03001D08) or, on cancel, feeds the previously-snapshotted pair back through Func_0801ccc0. This reads as a per-party-slot equipment/ability loadout picker (three always-visible option rows plus a per-page remembered selection), not the assigned shop template's item-list menu.","notes":["Recovered entirely from games/gs1/asm/0801d4cc.s (the owner's own retained disassembly, hand-walked instruction by instruction to resolve every pc-relative literal-pool word and branch target) plus the family-transplant workspace's m2c-assisted control-flow recovery (out/family-transplants/main-0801d4cc/m2c/0801d4cc.c) as a structural cross-check -- every field offset, constant, and call target the m2c draft proposed was independently re-derived from the raw .s before being trusted (m2c mis-rendered one call's second argument as dropped in one spot, caught by re-reading the raw asm). Already-adopted siblings sharing the same Data_03001ea0 workspace (field_owner_54.c, runtime_owner_123.c, 0801db70.c) supplied the field_offset conventions (0x574 = page/selection, 0x594.. = a per-page byte array, FIELD/M2C_FIELD macro style) and the already-resolved real names for seven callees via games/gs1/include/types.h's existing #define aliases (Modulo, FixedPoint_Ratio, RenderResource_CreatePair, RenderResource_LoadFrame, UiText_DrawCharacter, UiText_DrawResource, UiWork_Finalize, RenderOutput_ClearList, WaitFrames, Audio_PlayCue, UiWindow_Create).","Initial naive draft (m2c output, types fixed up, real callee names substituted) measured differing_halfwords=542 with a single dominant structural defect: the reference keeps the workspace base pointer resident in r7 and the Func_0801d108() result resident in r8 for the entire function, while the candidate's allocator instead put base in r8 and the other value in sl (a full one-slot register-set shift). Root cause found and fixed: the three icon-row loops originally cached each row's `*(void**)(base+slot)` widget pointer into a local `elem` variable used both before and after the intervening Func_080a1038(elem) call; the reference's compiler instead re-reads `*(void**)(base+slot)` fresh after that call rather than keeping it resident across it. Rewriting the loops to re-dereference `*(void**)(base+slot)` at each use point (no cached local) freed exactly the one register of pressure needed for base to land back in r7, dropping the metric to 533 and restoring the correct base/icon/page/redraw register set for the whole function body.","Three further verified, net-positive respellings on top of that fix: (1) explicitly caching `&workspace[0x598]` into a `p598` pointer local, read via `*p598`, for both the third icon-loop's comparison and the later post-loop 0xC13 portrait-id computation -- matches the reference's own opportunistic reuse of a spare register (sl) across that specific loop/post-loop pair (520, from 533); (2) hoisting `s32 rowX = icon->x * 8;` as its own statement immediately before each of the two Func_080b0030 quantity-readout calls, instead of writing `icon->x*8 + 0x8C + FixedPoint_Ratio(...)` as one expression -- the reference evaluates icon->x*8 before the FixedPoint_Ratio call in both call sites and the inline expression form was letting the compiler defer that multiply until after the call (508, from 520); (3) reading the workspace+0x598 byte once into a `u8 v` local and storing it to both of its two final fixed-address destinations from that local, matching the reference's single ldrb + two strb, instead of two independent FIELD reads (folded into the 542->533 step above, net positive on its own).","This owner's overall control flow, every branch target, every literal-pool constant, and every call target were independently confirmed to match the reference at matched_prefix=13 (the entire prologue and setup sequence, including the corrected base/icon/page/redraw register assignment, is now byte-identical) before the remaining residual was accepted as a stopping point for this pass."],"rejected_experiments":[{"experiment":"reorder the top-of-function local declarations (base/icon/page/redraw grouped before win/pair/pA/pB, versus the original mixed order)","result":"no effect on differing_halfwords -- confirms (as already documented for sibling 0801db70) that this compiler route's register-class assignment does not key off textual C89 declaration order on this owner"},{"experiment":"declare `icon` as `void *` (using FIELD(icon,u16,0xC)/(0xE) for the x/y reads) instead of `struct RenderInput *` with `->x`/`->y` member access","result":"byte-identical candidate either way -- the pointer's declared C type does not change codegen here"},{"experiment":"compute `pB` as `pA + 1` instead of an independent `(s8 *)(base + 0x595)`","result":"no effect -- both forms constant-fold to the same address expression before register allocation"},{"experiment":"apply the same explicit-cached-pointer trick used for p598 (workspace+0x598) to workspace+0x596 and workspace+0x597 as well (p596/p597 locals, dereferenced via *p596/*p597 in both the loop comparison and the later 0xC0A/0xC10 portrait-id computation)","result":"regressed differing_halfwords from 508 to 529 (matched_prefix dropped 13 -> 7) -- unlike workspace+0x598 (which the reference itself caches across exactly one loop/post-loop pair via a spare sl register), the reference recomputes workspace+0x596 and workspace+0x597 fresh at each use; adding the extra live pointer locals for them pushed the whole-function register pressure high enough to knock base/icon back out of their correct r7/r8 slots. Reverted."},{"experiment":"restructure the workspace+0x57E redraw-counter increment/wrap block to read the field into a `u16 counter` local once (store, then branch/compare/reset off `counter` instead of re-reading the field each time), mirroring the m2c draft's temp_r3_342 and the reference's single ldrh-then-reuse shape","result":"regressed differing_halfwords from 508 to 540 (matched_prefix dropped 13 -> 7) -- this block is textually far from the base/icon setup, but the added local still perturbed the same whole-function register-pressure calculus. Reverted; this specific block's instruction-order mismatch (the store-back timing relative to the overflow-threshold comparison) is left as an open, unresolved residual rather than chased further given how easily nearby fixes regress the already-corrected base/icon assignment."}]},"main:0801de5c":{"address":"0x0801de5c","span_bytes":1028,"status":"measured-draft","domain":"script glyph parser, 4bpp expander, render-tile allocator and VRAM uploader","score":{"measured":"2026-08-31","candidate_bytes":1076,"reference_bytes":1028,"differing_halfwords":505,"wrong_instructions":602,"topology":"different","class":"structural-topology"},"semantic_evidence":["The retained owner reads a u16 control stream, using commands 3..30 to update or skip parser state and values above 30 as packed glyph identifiers; this is unrelated to the battle success-roll family template.","Resource Value_00000013 supplies packed glyph rows. The candidate expands eight rows into a temporary 0x800-byte buffer using the reference's nibble lookup and bit-spread masks 0x0ff00ff0 and 0x00ff00ff.","The Data_03001e8c render state fields at 0xea0, 0xea2, 0xea7 and 0xeae control tile allocation, palette-bank selection, and the 128-versus-256-slot mask. Occupancy bytes begin at render state +0xda0.","Each allocated tile copies eight words from row planes spaced 0x100 bytes apart into VRAM at 0x06000000 + tile_index*32, then publishes the same encoded tile value through both output streams.","The 0x03000164 clear and 0x03000168 fill routines are genuine r3-trampoline callees and are modeled as function pointers, not ordinary Func_080072f0 calls with invented signatures."],"verdict":"Materially advanced from an aggregate-m2c context artifact to a standalone canonical-GCC-compiling semantic draft. It remains 48 bytes long with different topology and claims zero DONE bytes. Remaining work is concentrated in the compiler's 68-byte reference frame/lifetime layout and exact lowering of the irregular command switch and nested glyph loops; adoption requires a fresh differing_halfwords=0.","rejected_evidence":["The generated BattleEffect_RollSuccess retarget is a false family match and was not used.","Plain integer resource id 19 and ordinary direct Func_080072f0 calls compile, but lose the retained literal-pool and r3-callee semantics; the evidence-correct Value_00000013 and function-pointer forms are retained even though the broad topology residual masks their local score contribution."]},"main:0801e318":{"schema_version":1,"namespace":"main","address":"0x0801e318","status":"measured-draft","owner_bytes":176,"candidate_bytes":160,"differing_halfwords":85,"wrong_instructions":98,"classification":"visible-tile-attribute-marking","domain":"Marks attribute entries referenced by the visible 30 by 20 tilemap and clears stale one-bit marks.","notes":["Caller evidence proves this owner takes no arguments; the family-assisted m2c draft incorrectly inherited the four-argument signature of its exact template.","The generated u16-pointer increment advanced four bytes per tile. The retained semantic reconstruction corrects it to the two-byte walk emitted by the owner.","The typed reconstruction improves the raw m2c result from 87 to 85 differing halfwords while replacing every generated register and stack-slot identifier.","A 5,000-candidate safe family-template walk reached 168 bytes and 80 differing halfwords through artificial address-taken scalar temporaries. That generated spelling is not retained as canonical source because it obscures the recovered tile-marking behavior and is still far from exact.","Exact-C adoption remains gated on an independently compiled zero-difference object."],"rejected_experiments":[{"experiment":"family transfer of the byte-exact template's ascending for-loop idiom (ui/window/clear_tile_attributes_in_rect.c, |= 2 kept, RENDER_ALT_OFS/RENDER_TILE_ATTR_OFS constants confirmed identical for EN)","result":"worse (100 wrong instructions): the reference retains an explicit width!=0 guard before the row loop (movs r6,#20; cmp r3,#0; beq) that the template's fixed-4-argument for-loop shape does not emit. This owner's fixed 30x20 constant-loop shares only the inner tile-masking logic with the template, not its loop idiom."},{"experiment":"hoisting the width!=0 guard to wrap the whole row loop instead of re-testing per iteration","result":"byte-identical to the un-hoisted do-while-with-inner-check spelling; GCC's own loop-invariant code motion already performs this hoist regardless of source placement. The real ~16-byte/8-instruction gap is not guard placement."},{"experiment":"splitting the inner column walk into a static MarkRow(base, cursor, alternate, width) helper taking width as a real function parameter (not a local literal), called twice with the literal 30, on the theory that GCC 2.96 would substitute the constant into the inlined body without re-running dead-branch elimination on it, thereby preserving a runtime width!=0 test the way the reference does","result":"worse, not better: candidate collapsed to 92 candidate bytes (versus 160 before) at 87 differing halfwords / 93 wrong instructions. The router's inliner still fully constant-propagates through the static helper and eliminates the always-true guard, and the smaller helper body lets it additionally cross-jump/merge more of the surrounding row loop than the flat version did, moving further from the reference shape rather than closer. Confirms the guard-retention gap is a property of the compiler's handling of this exact call/inline shape at the routed optimization level, not something reachable by relocating the same source-level condition."}]},"main:0801edec":{"schema_version":1,"namespace":"main","address":"0x0801edec","status":"proven-retained","owner_bytes":124,"candidate_bytes":100,"differing_halfwords":61,"wrong_instructions":71,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Reads global Data_03001e8c (a callable value cached from *0x03001e8c). If it is NULL, DMA-fills the caller's argument buffer with a fixed 0xe0e0 halfword pattern (fixed-source, count 0xa0, DMA3 control 0x810000a0) as a fallback -- classic GBA 'memset via DMA' idiom. If it is non-NULL, bump-allocates a 0x214-byte scratch buffer (Func_08004938 == Runtime_BumpAllocate), DMA3-copies a 0x214-byte ROM template from 0x080158e8 into it (control 0x84000085 = enable|32bit|133 words), calls through Data_03001e8c with argument (via the interworking call-via-register veneer at Func_080072fc), then frees the scratch buffer (Func_08002df0 == Sys_Free). The DMA-populated scratch buffer is never otherwise read; only its allocation/populate/free side effects occur before/after the indirect call.","evidence":["Literal pool value 0x03001e8c at the function's first pc-relative load exactly matches ADDR_03001E8C / Data_03001e8c, an already-named global used as a base pointer in numerous sibling owners (e.g. 0801ef68.c, 08017248.c).","candidate-show independently symbolizes the bl target at Func_080072fc's linked address as `_call_via_r6` (or `_call_via_r7`, depending on candidate register allocation) in the emitted candidate.insns whenever a value is passed to it in the low register that becomes the branch target -- this is the compiler toolchain's own knowledge of the ARM/Thumb interworking call-via-register glue, not a guess made here. The same address is called from several sibling owners (08002fb0.s, 08003e10.s) each with a different value in the target register (a freshly returned pointer, a global), confirming it is a generic indirect-call veneer rather than a fixed named function.","Func_08004938 / Func_08002df0 are already declared elsewhere in this tree as Runtime_BumpAllocate(s32 size) and Sys_Free(void *) respectively (games/gs1/include/types.h, games/gs1/include/runtime_mem.h), and are called with the identical three-word DMA3-setup idiom (source/destination/control written to 0x040000d4) in 08003e10.c, 08002fb0.s and other siblings.","The DMA3 register base 0x040000d4 and the struct DmaChannel{source,destination,control} shape are the project's established idiom (games/gs1/recon/en/main/video_dma_family.h), already used unmodified by 08003e10.c for the exact same three-field-store pattern.","The reference's second-branch literal for the allocation size is loaded from a 4-byte literal-pool entry (0x00000214) and is later recovered via a runtime `lsrs r5, r5, #2`, rather than being synthesized in place with a cheap shift-immediate sequence (movs+lsls) the way an ordinary compile-time integer constant is; GCC 2.96 on this route only emits a pool load plus a real runtime shift when the value is not compile-time foldable. 08003e10.c's own '(u32)LoadedRuntime_Size' pattern (an absolute-address linker symbol registered in games/gs1/recon/translation-units.json) produces exactly this shape for its 0xe0-byte case. This owner's 0x214 does not correspond to any absolute_symbols entry currently registered in translation-units.json; only games/gs1/recon/en/main/0801edec.c/.json are in scope for this pass, so a new absolute-size symbol could not be registered to test/confirm this."],"credible_shapes_tried":["plain non-volatile per-field DmaChannel struct stores (dma->source=...; dma->destination=...; dma->control=...;), matching 08003e10.c's own proven idiom: produces three separate single-register `str` instructions at each DMA setup site, never the reference's grouped `stmia r3!, {r0,r1,r2}` -- consistent with the compiler_backend_evidence below.","caching the global into a local `void *routine` before branching (vs. re-reading Data_03001e8c at each use): re-reading forces an extra `ldr` immediately before the indirect call that the reference does not have; caching once matches the reference's single load-and-reuse shape and was kept.","naming the allocation size with a plain `u32 size = 0x214;` local reused for both the Func_08004938 argument and the `(size >> 2)` control-word shift: GCC 2.96 fully constant-folds this at compile time (produces `movs r0,#133; lsls r0,#2` and a folded control literal), never the reference's pool-loaded 0x00000214 and runtime `lsrs r5, r5, #2` -- consistent with 0x214 being an unregistered linker/absolute-symbol value rather than an ordinary integer literal in the true source.","if/else branch order: `if (Data_03001e8c == 0) { fallback-fill } else { main-dispatch }` reproduces the reference's `cmp r7,#0 / bne .L0` branch-and-fallthrough shape (fallback stays in the fallthrough position, dispatch is the taken branch target) exactly; the inverse order (`if (!= 0) { main } else { fallback }`) produced a mismatched branch/fallthrough assignment and was discarded."],"compiler_backend_evidence":"Same conclusion as games/gs1/recon/en/dossiers.json#main:08003e10, independently applicable here since this owner's main branch uses the identical DMA3 three-field-store idiom against the same struct shape and DMA base. Reading alchemy-gcc/gs1cc/gcc/config/arm/arm.md and arm.c: the STM-combining logic that could fold three independently-sourced register values into one `stmia r3!, {r0,r1,r2}` (store_multiple_sequence / *stmsi / *stmsi_postinc, arm.md ~4990-5083) is gated TARGET_ARM only and has no Thumb counterpart; the only Thumb multi-register store patterns (movmem8b/movmem12b, thumb_expand_movstrqi, thumb_output_move_mem_multiple) always emit a paired ldmia+stmia block copy, never a lone grouped store of independently computed values. No ordinary field-store or aggregate-store C shape on this Thumb/GCC 2.96 route can therefore reach the reference's standalone `stmia` at either DMA setup site.","remaining":"61 of 124 reference halfwords differ, concentrated at (1) both DMA3 three-field setups, where the reference's ungrouped `stmia r3!, {r0,r1,r2}` is structurally unemittable from any ordinary C shape on this compiler route (see compiler_backend_evidence -- same finding as the 08003e10 family), and (2) the allocation-size handling, where the reference treats 0x214 as a non-foldable (linker-symbol-shaped) value requiring a fourth callee-saved register (r8, alongside r5/r6/r7), which this pass could not reproduce without registering a new absolute-size symbol in games/gs1/recon/translation-units.json -- out of scope for this owner's permitted touch set (games/gs1/recon/en/main/0801edec.c and its .json sidecar only). Candidate length (100 bytes) is short of the 124-byte reference primarily from the missing r8 push/pop pair and the grouped-store byte savings. Both call targets (Func_08004938, the call-via-register veneer at Func_080072fc, and Func_08002df0) match the reference exactly once reached.","notes":["Cold-start owner: games/gs1/recon/en/main/0801edec.c did not exist before this pass; games/gs1/asm/0801edec.s is the proven byte-exact retained assembly.","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used.","This candidate claims zero DONE bytes.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:0801ef68":{"schema_version":1,"namespace":"main","address":"0x0801ef68","status":"measured-draft","owner_bytes":288,"candidate_bytes":234,"differing_halfwords":143,"wrong_instructions":179,"classification":"window-gauge-or-underline-draw (low confidence)","domain":"Takes a struct pointer (fields read at +8, +10, +12, +14, matching a UI window-like record) and a flags word; walks a signed-byte control string at a fixed pool address (0x080371c4) accumulating an offset, and for each in-range offset draws a run of 'segments' tiles into *Data_03001e8c using distinct end-cap tile values (0xF018/0xF00F seen in the reference literal pool) versus a middle value; a second, separately-guarded block draws a fixed 3-part strip using tile values 0xF080/0xF081/0xF082. Reads/writes base[0xEA3] and base[0xEA5], both near the template's own RENDER_ALT_OFS=0xEA2 offset, suggesting this owner is a sibling UI-window drawing routine sharing the same per-window render-state byte block as the template and as 0801e318.","notes":["The generated family report clustered this owner with template-main-0801e260 (clear_tile_attributes_in_rect.c) at 8032 bp. As with the rest of this batch, the reference assembly has none of the template's tile-clear bit logic; the only real overlap is the shared Data_03001e8c global and a broadly similar 4-high-register prologue shape common across this compiler's larger owners. This is a family-clustering false positive that gave essentially no usable control-flow starting point.","This is the LOWEST-confidence dossier in this assignment batch. The retained candidate is an honest but only partially-grounded reading of the control flow (string-driven run-length draw with distinct end-cap tiles, plus a second fixed-pattern strip draw) built from a single manual disassembly pass; the candidate compiled to only 234 bytes against a 288-byte reference (a large size gap, not just a scheduling difference), and the full register set the reference uses (fp/sl/r9/r8 all pushed and live) versus the candidate's much lighter register pressure shows the real source keeps meaningfully more live state across the loop than this draft models. The exact field roles at window+8/+10/+12/+14, the true semantics of the flags&1 / flags&2 branches, the string-table type and its terminator convention, and the two end-cap tile values' exact assignment (0xF018 vs 0xF00F were assigned to first/last by pattern-matching the reference's two distinct pool constants, not independently confirmed) are all unverified.","This is a clear source-shape gap needing dedicated reconstruction from a fresh, careful disassembly (ideally with the tool's --asm / instruction-level trace against the reference rather than manual reading alone), not a good target for further family-transplant attempts against the assigned template. Given the low confidence, no further respelling experiments were attempted against this draft -- the priority was flagging the real uncertainty honestly rather than iterating on a base whose overall shape is not yet trustworthy."],"rejected_experiments":[]},"main:0801faa8":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0801faa8","status":"proven-retained","classification":"compiler_local_materialization_mismatch","owner_bytes":160,"cross_edition":{"measured":"2026-08-30","object_bytes":160,"relocation_bytes":40,"literal_bytes":24,"core_bytes":96,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true},"score":{"measured":"2026-08-27","candidate_bytes":160,"reference_bytes":160,"differing_halfwords":2,"wrong_instructions":4,"class":"allocation","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/0801faa8.c","note":"Improved from differing_halfwords=3 by eliminating the separate `s32 error` local entirely and writing `result = 0 - 9` / `result = 0 - 3` directly at each site (the goto-target `negate:` label is now a no-op). The second occurrence (result = 0 - 3) now compiles byte-identical to the reference (movs r7,#3 / negs r7,r7), confirming the hypothesis: the reference reuses r7 -- already dead from the early `result = 0` -- for the error/negate computation, and the separate `error` local was blocking that reuse. One residual remains at the FIRST occurrence (result = 0 - 9): r7 is provably 0 on that control-flow path, so this compiler folds the whole computation into a single `subs r7, #9`, where the reference instead materializes `movs r7, #9` and jumps forward to share the second occurrence's `negs r7, r7`. Two attempts to force a real shared negate (goto negate; ... negate: result = -result / result = 0 - result, applied symmetrically) each regressed sharply (wrong length, wrong_instructions >=36) rather than converging -- this compiler will not give up the subs-fold once r7's liveness is transparent enough to prove it. Needs the same class of fix as the allocator-order/liveness lever being built for the wider register-wall cluster, not another manual respelling of this pair."},"register_gate_step4_probe":{"date":"2026-08-28","result":"exhausted-not-a-closure","baseline":{"candidate_bytes":160,"reference_bytes":160,"differing_halfwords":2},"decoder_signal":"combine-destroys-copy-affinity-or-shared-result-inverts-allocation-priority","decoder_evidence":["The structurally correct shared-negate s32 form raises result pseudo 34 from 5 uses, 4 sets, span 82 to 7 uses, 5 sets, span 86.","That moves result ahead of the save-slot address in lreg priority, so result takes r6 and the address is forced to r7.","The separate-magnitude form preserves address=r6 and result=r7, but combine replaces magnitude-to-result copy plus negate with a cross-register negate, reusing r6 for the path-disjoint magnitude."],"requested_edit":"preserve magnitude-to-result copy affinity through combine without raising result ahead of the address pseudo","bounded_results":[{"shape":"shared-negate-s32","candidate_bytes":160,"effect":"correct control flow; result/address r6-r7 bank swap"},{"shape":"separate-s32-magnitude","candidate_bytes":160,"differing_halfwords":3,"effect":"correct banks; magnitude in r6 and cross-register negate into r7"},{"shape":"named-slot-before-allocation-call","candidate_bytes":160,"effect":"extended pointer lifetime but did not change the shared form's allocation priority"},{"shape":"inline-negate-boundary-on-separate-magnitude","candidate_bytes":160,"differing_halfwords":3,"effect":"combine still emitted the same cross-register negate"}],"decision":"The exact adopted corpus contains no untried local idiom satisfying the call ordering, shared negate, and r6/r7 carrier constraints. The source and retained assembly remain unchanged; this probe does not count toward the five required closures."},"shape":{"derivation":"games/gs1/src/save/state/write_current_slot_pair.c (and its structurally closer sibling runtime_owner_154.c) supplied the value!=-1/Func_080056cc/Func_0801776c error-report idiom. This owner is a fuller sibling: it adds a Func_08004970(0x1000) scratch buffer, a Func_08005a78 call, a Func_080072f0 (Mem_Copy) of 16 bytes into buffer+0x4e4, and a Func_08002df0 free before return -- reconstructed against real signatures in runtime_mem.h and the save_state_family.h-backed 08005a78.c/08005920.c. No prior draft existed for this owner."},"rejected_experiments":[{"experiment":"value cached once and reused across call sites","result":"wrong shape (66 differing halfwords)"},{"experiment":"Mem_Copy dst as a single grouped (A-B) expression","result":"wrong operand order"},{"experiment":"merging error into result entirely","result":"broke r5/r6/r7 register banking function-wide (16-18 differing halfwords)"},{"experiment":"error kept s32 alongside s32 result","result":"spurious sign-extend before return (9 differing halfwords)"},{"experiment":"declaration-order swaps of found/error/result","result":"no effect on the residual r6-vs-r7 error banking"},{"experiment":"eliminate the separate `error` local, write `result = 0 - 9` / `result = 0 - 3` directly at each assignment site with an empty goto target","result":"improved 3->2 differing halfwords; second occurrence now byte-exact, first occurrence still folds to a single subs instead of movs+shared-negs"},{"experiment":"force a real shared negate (result = N; goto negate; ... negate: result = -result, or negate: result = 0 - result, applied symmetrically to both sites)","result":"regressed sharply -- wrong candidate length, wrong_instructions >=36; this compiler resists un-folding the subs once r7's zero-liveness is provable"},{"experiment":"declare `result` as `volatile s16` to defeat the zero-liveness proof that lets the compiler fold `result = 0 - 9` into `subs r7, #9`","measured":"2026-08-29","differing_halfwords":93,"baseline":2,"verdict":"refuted -- volatile forces spurious stack-backed load/store traffic throughout the whole function (candidate grew 160->194 bytes, wrong_instructions 4->66); far worse than baseline, reverted"},{"experiment":"spell the first assignment as `result = -9;` (unary negate) instead of `result = 0 - 9;`, hoping a different constant-folding path avoids the subs fold","measured":"2026-08-29","differing_halfwords":2,"baseline":2,"verdict":"no effect -- identical codegen to `result = 0 - 9;`, still folds to `subs r7, #9`; reverted to `0 - 9` for consistency with the sibling site"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact sibling sources, in-repository headers, and the approved compiler.","Promoted to strong permanent compiler retention on 2026-08-30 after the shared-negate, separate-magnitude, lifetime, type, and declaration probes all converged on the recorded combine/lreg allocation conflict; the six-edition normalized core is identical."]},"main:0801fd34":{"schema_version":1,"namespace":"main","address":"0x0801fd34","status":"proven-retained","classification":"compiler_local_scheduling_floor_module","owner_bytes":80,"retention":"c_candidate","domain":"Build four animated palette entries from a fixed-point phase.","provenance":"Drafted from the retained owner assembly and the repository's aggregate-aware m2c wave output; no external source was used.","score":{"measured":"2026-08-30","candidate_bytes":80,"reference_bytes":80,"differing_halfwords":4,"wrong_instructions":0,"class":"scheduling-floor","compiler_flags":["-fno-schedule-insns2"],"note":"The shipped scheduler flag removes the canonical route's loop-tail reordering and reduces the residual from ten to four halfwords. The remaining two independent ordering pairs preserve every instruction and register role; ordinary C and the approved scheduler routes cannot request their reference order."},"rejected":[{"shape":"split the phase load and index-offset calculation into named temporaries","result":"preserved the 80-byte extent but swapped the r2/r3 roles and regressed from four to seven differing halfwords"},{"shape":"reuse the later packed-color local as the pre-call phase carrier","result":"preserved the 80-byte extent but changed the whole packed-color register family and regressed to fourteen differing halfwords"},{"shape":"distribute the 0x300 multiplication across the phase and index terms","result":"grew to 100 bytes and changed loop topology; reverted"},{"shape":"annotation-free finite permuter under the canonical route","result":"allocator decoder reported no unique source shape, so no unbounded search was started"}]},"main:08020198":{"family":"template-main-08028aa8","template_owner":"main:08028aa8","template_source":"games/gs1/src/menu/draw_mode_label.c","candidate_path":"games/gs1/recon/en/main/08020198.c","reference_bytes":172,"best_candidate_bytes":172,"best_differing_halfwords":4,"best_wrong_instructions":0,"status":"proven-retained","notes":["measured=2026-08-30 (retained): modeling the two pool-backed numeric values as the repository's named absolute constants (`Value_00000741` and `Value_00000009`) restores the reference's pool materialization and the load-before-byte-access order. The candidate is now exactly 172 bytes with zero wrong instructions and only one independent `ldr r0` scheduling displacement (four aligned halfwords). Canonical scheduling, both scheduler toggles, regmove, CSE-follow, CSE-skip, GCSE, expensive-optimization, strength-reduction, and rerun-CSE routes either preserve this sole ordering residual or regress. Complete behavior, calls, arguments, control flow, stack layout, pools, and owner extent agree; permanent structured-assembly retention is justified without forcing the scheduler.","measured=2026-08-29 (BREAKTHROUGH, adopted): hoisting the first inline literal argument `0` of Func_0801e9d4's trailing stack arg into a named `s32 extra` local and moving that assignment (`extra = 0;`) one statement earlier -- to right after the Func_0801e8b0 call, i.e. immediately before the Func_0801e940(0x080371e0,...) call rather than immediately before its own Func_0801e9d4 call -- flips the whole-function register allocation to match the reference: push/pop grows from {r5,r6,lr} to {r5,r6,r7,lr}, st moves from r6 to r7, and BOTH constant caches (the later `extra = 48;`, left in its original position, unchanged) end up in r6 (`movs r6,#0` / `movs r6,#48`) exactly like the reference, instead of scratch r3. differing_halfwords dropped from 26 to 11 (wrong_instructions 28 -> 4, candidate bytes still 168). This confirms the coordinator's diagnosis: the reference's cached-constant-in-callee-saved-register pattern IS reachable via source respelling, but only when the hoisted assignment's live range is stretched to span an additional intervening call (raising whole-function register pressure at the right point), not merely by naming the local in place.","measured=2026-08-29: with the above fix in place, three real residuals remain (11 differing halfwords, 4 wrong instructions): (1) the literal-pool load of 0x080371e0 for Func_0801e940's first arg is scheduled by the reference immediately after the PRECEDING call returns (before setting up r1/r2/r3), while the candidate schedules it last, right before its own call -- pure instruction scheduling of an independent pool load; (2) for the st[29]+0x741 computation, the reference loads the pool constant (r3) before the ldrb (r0), candidate does ldrb first then pool load -- same kind of independent-load reordering; (3) the reference loads the literal 9 (for Func_0801e7c0(9,...)) via a constant-pool `ldr` even though 9 trivially fits an 8-bit `movs` immediate, while the candidate emits `movs r0, #9` -- confirmed via games/gs1/asm/08020198.s that the reference's data pool literally contains `.4byte 0x00000009`, so this is a genuine pool-vs-immediate codegen choice, not a diffing artifact. The last few differing halfwords (trailing pool-offset shift, 2 stray `movs r1,r1`/`movs r0,r0` padding halfwords) are pure cascades of (3)'s size difference.","measured=2026-08-29: systematically retried the whole hoist/reorder search (roughly 30 named variants total across this and the prior session) to try to close the remaining 11 halfwords: extra split into extra0/extra1 (no change alone); hoisting the 0x080371e0 constant into a `mode`/`void *mode` local at its original position (folds away, no change); moving `mode`'s assignment earlier (before Func_0801e8b0, before Func_0801e41c, or combined with the extra0 fix) -- every earlier-than-original placement of `mode` corrupts the register allocation instead of fixing scheduling: surface gets misallocated to r6 and mode grabs r5, producing candidate=172 dh=68 (worse); hoisting the literal 9 into a named local at its original position, at a super-early position, or reusing the shared `extra` variable for it -- always folds back to `movs r0,#9`, no change; casting 9 through `(s32)(void*)9` -- no change; hoisting the 0x741 addend into a `base`/`offset` local, alone or with reversed operand order (`0x741 + st[29]` vs `st[29] + 0x741`) -- no change to the ldrb/ldr ordering; moving `extra = 0;` one slot earlier still (before Func_0801e41c) or moving both `extra=0` and `extra=48` early together -- both regress (dh 20). Conclusion: the winning move (one specific reorder of `extra=0`) is a narrow sweet spot; the remaining 3 residuals (mode-load scheduling, ldrb/ldr order, and the 9-literal pool-vs-immediate choice) did not respond to any local-hoisting or reordering variant tried and are treated as a genuine GCC 2.96 instruction-scheduling/constant-pool-placement quirk not reachable through further source respelling at this time.","Template (Menu_DrawModeLabel, a mode-flag dispatch drawing 1-2 glyphs) is unrelated beyond both being menu-drawing routines. Read games/gs1/asm/08020198.s directly: a null-guarded panel-drawing routine taking (surface, structPtr) and issuing 10 sequential draw/init calls with fixed literal coordinates (Func_08016478, Func_0801e41c, Func_0801e8b0, Func_0801e940 x2, Func_0801e9d4, Func_0801e7c0 x3, Func_0801f680, Func_0801ea08), several pulling arguments from the second struct-pointer param's byte/word fields at offsets 16/28/29/32/36 and one nesting a call's return value directly as the next call's first argument (Func_0801e940(Func_0801f680(...), surface, 48, 40)).","This is essentially a flat sequence-of-calls function with no real control flow (just the top-level null guard), so nearly the whole candidate matched immediately (matched_prefix low only because a register-choice difference appears in the very first divergent line, but every individual call's argument sequence matches exactly).","The one structural residual: the reference keeps the struct pointer in r7 (needing 3 callee-saved regs: r5,r6,r7) and uses r6 as a dedicated register for two small constants (0, then later 48) that get stored to the stack as a trailing 5th call argument, loading each constant into r6 well before its str. The candidate instead keeps the struct pointer in r6 (only 2 callee-saved regs needed: r5,r6) and computes each trailing constant into scratch r3 immediately before its str. Introducing an explicit named `s32 extra` local set to 0 then later 48 (instead of passing the literals inline) did not change this -- the compiler still folded it into scratch r3 rather than reserving r6 the way the reference does, so this is a compiler register-allocation choice, not something the one respelling attempt reached.","A second, smaller residual is pure instruction scheduling: for two of the calls, the reference loads the literal-pool constant destined for r0 immediately after the PRECEDING call returns (before setting up r1/r2/r3 for the current call), while the candidate loads it last, right before the call -- functionally identical, just different scheduling of independent literal loads.","Given the flat, repetitive shape and that every semantic call/argument already matches, this reads as a small compiler-scheduling/register-preference residual rather than a real logic or field gap. Not adopted; kept as the closest measured draft (94% instruction match) after one respelling attempt."]},"main:08021228":{"family":"template-main-08028f98","template_owner":"main:08028f98","template_source":"games/gs1/src/menu/run_selection.c","candidate_path":"games/gs1/recon/en/main/08021228.c","reference_bytes":312,"best_candidate_bytes":312,"best_differing_halfwords":139,"best_wrong_instructions":96,"status":"measured-draft","notes":["Template (Menu_RunSelection) is only thematically related (both build a UI object and poll-loop); the actual logic at 08021228, read directly from games/gs1/asm/08021228.s, is a much larger dialog-setup routine: creates an object via Func_080162d4(2,1,26,5,0), then on success configures it via Func_0801e41c, marks Data_03001e8c[0xEA3] (RENDER_DIRTY_OFS) dirty, calls Func_08019d2c on a table value looked up from a literal table at 0x080371fe indexed by (p2&3), calls Func_0801a4fc for two more out-values, builds a 16-byte parameter block (constants 0, 0x8014000c, an out-value ORed with 0xe000, and 0x303), zeroes two more Data_03001e8c fields, calls Func_08019908 twice with computed offsets involving p1/p2/p3, calls Func_08019ba0(p2+0x980), starts audio/animation via Func_080165d8 and Func_080f9010(81), then runs a poll loop (Func_08003dec/Func_080030f8/Func_080f9048, exiting on either Func_080f9048()==0 or (Data_03001c94 & 0x303)!=0) before finalizing via Func_08016418/Func_080030f8/Func_08003f3c.","This is a large, dense owner (312 bytes, 7 saved registers, 8 distinct literal-pool constants, ~14 calls) worked as one direct-translation pass against the effort budget for this batch rather than iterated to convergence. Achieved exact byte-length match (312/312) on the first attempt with wrong_instructions=96 (about 62% of instructions already agree), but did not attempt further respellings.","Two call argument sequences are genuinely uncertain rather than just unpolished: (a) Func_0801e41c's 5 args (obj,4,0,4,4) include a value (arg1=4) that is set once and then immediately restated as a stack arg (also 4) in the assembly without a clear source-level reason for the duplication -- likely correct by construction but not independently verified; (b) Func_0801a4fc's first two register arguments (r0, r1) come from a prior call's leftover return value and a reused zero-register (sl) respectively in the assembly, which the candidate approximates as literal 0 for both -- this is a plausible but unconfirmed simplification of what the assembly actually threads through.","Given the scale of this owner relative to the assigned batch, this reflects one careful pass rather than exhaustive iteration; the register-layout residuals (fp/sl/r8/r9 assignment order) and the two uncertain call-argument spots above are the most promising places for a follow-up attempt, rather than blind permuter search, since the overall call sequence and literal values are already confirmed correct from the assembly."]},"main:08021390":{"schema_version":1,"namespace":"main","address":"0x08021390","status":"measured-draft","owner_bytes":248,"candidate_bytes":252,"differing_halfwords":83,"wrong_instructions":77,"classification":"ui-resource-wait-dialog","family":{"template_listed":"main:080984c0 (scene_transition/reset.c, score 7663)","template_used":"not the listed family template -- recovered directly from the assembly"},"domain":"Opens a UI resource window (Func_080162d4 kind 2, style 1, size 26x5), tags the Data_03001e8c render-state byte at offset 0xea3 busy, feeds a value derived from Func_08021360/Func_08019d2c into a six-argument setup call (Func_0801a4fc), writes a fixed 0x8014000c control word and a masked value into a small stack buffer, clears two adjacent halfwords at Data_03001e8c+0x12f4/0x12f6, plays a configured sound bank (Func_08019ba0(0x1b)) through Func_080165d8, plays cue 81, then loops WaitFrames(1) polling Func_08003dec/Func_080f9048 and the input latch Data_03001c94 until the resource finishes or the input mask 0x303 (a multi-button combo) clears, and finally tears the window down.","notes":["The listed family template (080984c0, scene transition reset) shares only the coarse UI-window-teardown shape; the actual body -- a resource-loading wait dialog with a six-argument setup call and a specific 0x8014000c/0x303 constant pair -- was reconstructed directly from the assembly and established local signatures (Func_080162d4, Func_0801e41c, Func_0801a4fc, Func_080165d8, Func_08003dec, Func_08016418 all already have 5/6-argument prototypes fixed by other owners in the tree).","The seven-word literal pool (0x03001e8c render-state base, 0x00000ea3 busy-flag byte offset, 0x8014000c control word, 0x000012f4 halfword-pair offset, 0x0000001b sound-bank id, 0x00000303 input mask, 0x03001c94 input latch) was recovered by process of elimination: each pc-relative load's approximate position fixed which of the seven words it could be, then the surrounding instruction shapes (byte store vs halfword store vs bitwise OR) confirmed the assignment.","Candidate is close (252 vs. 248 bytes, 83 differing halfwords) but a genuine stack-layout gap remains: the reference computes and holds a dedicated `&buf[4]` pointer in its own register very early (right after the first buffer word is zeroed, before the first window-open call), reusing that same register for both the final zero-store and the wait-loop's poll-buffer argument, whereas every source shape tried here (indexing `buf[4]` directly, and separately hoisting an explicit `s32 *entry = &buf[4];`) either leaves the address recomputed at both sites or pulls in extra registers and enlarges the stack frame (the explicit-pointer attempt regressed to 268 bytes and was reverted). This looks like a source-order/scoping question about where that pointer's lifetime begins, not yet nailed down.","Recovered only from retained GS1 assembly and already-established local function signatures from the wider source tree (Func_080162d4, Func_0801e41c, Func_08021360, Func_0801a4fc, Func_08019908, Func_08019ba0, Func_080165d8, Func_08003dec, Func_08016418, Func_08003f3c). No GS2 evidence or external source was used."]},"main:08021488":{"schema_version":1,"namespace":"main","address":"0x08021488","status":"measured-draft","owner_bytes":344,"candidate_bytes":304,"differing_halfwords":164,"wrong_instructions":80,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/08021488.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 7538bp) seeded an m2c control-flow recovery over the complete symbolized owner, then hand-verified against every literal pool word and branch","family_template":"main:080b1a14","pc_relative_references":9,"jump_tables":0},"notes":["The raw m2c draft treated both incoming registers (r0, r1) as unread inputs (`M2C_ERROR`); the disassembly shows the real signature is `s32 Func_08021488(s32 msg0, s32 msg1)` -- r1 is saved to sp+8 as literally the first instruction and r0 is moved into `fp`. The body opens two message-box windows (Func_08021360 + Func_0801a4fc build a two-word tile header at object+0xEA3/0x12F4/0x12F6), plays cue 0x51, then polls Func_080f9048/ADDR_03001C94 in a loop before closing and returning Func_08003f3c(spC). This is the family template's for(;;)-poll idiom over a different (message-box) payload, not the template's party-roster semantics.","First draft called Func_080162d4 and Func_0801e41c with the 4 register args m2c inferred and read &sp18/&sp24 fresh on every loop iteration: 288 vs 344 bytes, 118 wrong instructions. Reading the raw instruction stream showed a `str r3,[sp,#0]` immediately before each of those two calls carrying a value the register args don't already cover, i.e. both calls take a 5th argument passed on the stack (0 and 4 respectively); adding that 5th parameter, and hoisting `void *box1 = &sp18;` to where the reference's `add r3,sp,#24; mov sl,r3` actually sits (before the window is even created) and a second `box2 = &sp24` where the reference sets up `r7`, cut the gap to 304 vs 344 bytes and wrong_instructions to 80 -- the two largest, most concrete improvements found.","Remaining disagreement is again register/stack-slot allocation rather than control flow: the reference keeps `box1`'s address resident in `sl` for the whole function and spills the `msg1` parameter to sp+8 instead, while every candidate tried keeps both `msg0` and `msg1` in registers (r9/fp) and spills `box1` to sp+8 in their place. `msg1` is used only twice, both before the loop; `box1` is read on every loop iteration, so by usual usage-weight heuristics `box1` should win a register over `msg1` on this compiler too, but it did not in any respelling tried (including switching the poll loop from `for(;;){continue;}` back to a literal labelled `goto`, which changed nothing).","This reads as a genuine compiler-internals residual on the last-mile register allocation, not a remaining source-shape gap in control flow, call signatures, or types -- a candidate for permuter-style bounded search rather than further manual respelling.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:08021d88":{"schema_version":1,"namespace":"main","address":"0x08021d88","status":"proven-retained","owner_bytes":114,"candidate_bytes":114,"differing_halfwords":4,"wrong_instructions":0,"classification":"compiler_local_scheduling_mismatch","resolved_asm_classification":{"kind":"compiler_local_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"domain":"Draws one encoded character cell, records its source value and render command, and preserves the cell style bits while replacing the character code.","evidence":["The ordinary-C reconstruction emits the complete 114-byte owner with identical instructions, registers, calls, literals, memory operations, and branch topology outside two localized adjacent ordering swaps.","At the entry call setup, the candidate completes the independent entry-pointer add before the four-byte frame adjustment; the reference adjusts the frame first. Both streams immediately resynchronize before argument setup.","After the call, the candidate reloads the saved base before shifting the independent store-offset constant; the reference shifts first. Both streams immediately resynchronize before forming the store address.","GCC pass 23 sched2 shows both choices as ready-list decisions. rank_for_schedule in alchemy-gcc/agbcc/gcc_arm/sched.c falls through equal priority and dependency class to original INSN_LUID order; the source cannot directly order a generated prologue adjustment against an independent expression."],"bounded_source_probe":{"tool":"tools/shape-search/search.ts","depth":8,"legal_variants":10,"best_differing_halfwords":4,"verdict":"miss"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":94,"core_identical":true,"raw_owner_bytes_identical":true,"starts":{"ja":"0x08021dec","en":"0x08021d88","de":"0x08020a4c","es":"0x08020dc4","fr":"0x08020d2c","it":"0x08021d30"}},"provenance":"Recovered only from retained GS1 assembly, the local six-edition ROM set, in-repository declarations, and the approved compiler and its shipped dumps. No external game source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","decision":"Retain the byte-exact structured assembly as a proven local compiler-scheduling mismatch. The complete ordinary-C reconstruction remains the semantic source artifact and all 114 owner bytes count as DONE."},"main:08021e6c":{"schema_version":1,"namespace":"main","address":"0x08021e6c","status":"measured-draft","owner_bytes":2300,"candidate_bytes":2232,"differing_halfwords":1131,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/08021e6c.s","method":"complete local assembly symbolization and m2c control-flow recovery","pc_relative_references":44,"jump_tables":0},"notes":["The complete retained assembly owner and all 44 PC-relative references were symbolized before generating this draft; no jump table was found.","The two local callers pass mode 0 and mode 1 and consume the return value as a selection/status result, supporting the deliberately broad UI selection-screen name.","Pointer-width repairs make the complete generated control flow compile as ordinary C; unresolved fields and address-named callees remain deliberately generic.","The candidate is 68 bytes short and remains structurally distant. It claims zero progress bytes; retained assembly remains authoritative.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:08022768":{"family":"template-main-08021a18","template_owner":"main:08021a18","template_source":"games/gs1/src/graphics/tile/expand_vram_tiles_by_color_table.c","candidate_path":"games/gs1/recon/en/main/08022768.c","reference_bytes":180,"best_candidate_bytes":176,"best_differing_halfwords":84,"best_wrong_instructions":62,"status":"measured-draft","notes":["The clustered template (graphics_owner_13.c, nibble palette decode) does not match this owner's actual behavior -- weak cluster match. Read games/gs1/asm/08022768.s directly instead: a tilemap-rect clip-and-fill over the global Data_03001e8c render-work base pointer (declared elsewhere as `extern u8 *Data_03001e8c;`, same global used by games/gs1/src/ui/window/clear_tile_attributes_in_rect.c). Params (x, y, width, height, alt): clamp x/width and y/height into the 30x20 tile grid (x<0 -> width+=x, x=0; x+width>29 -> width=30-x; same pattern for y/height against 20 rows), then for each row/col in the clamped rect, OR bit 12 with ((alt&1)<<12) into the 16-bit tilemap entry (clearing bit12 first via &0xefff), and after each row OR `2 << (row>>2)` into base[RENDER_DIRTY_OFS] (0xEA3, from games/gs1/include/gs1_edition.h) to mark the touched row-group dirty.","This is a near-twin of main:080ab21c (same family/target array, same clip logic, same dirty-mark tail) with two behavioral differences confirmed from the raw assembly: 08022768 clears+sets bit 12 unconditionally on every tile in the rect (mask 0xffffefff / low16 0xefff), while 080ab21c additionally SKIPS a tile whose low byte equals 0xf (tile>>12 & 0xf == 0xf guard) before touching it, and uses mask 0xffff0fff (clearing the top nibble bits 12-15, a 4-bit field) instead of a single bit. These are genuinely different owners, not the same source respelled twice.","Iterated 4 respellings. Biggest win: replacing a persisted `u16 *cursor` pointer (incremented by 32 halfwords/64 bytes per row, computed once before the loop) with a plain integer byte `offset` recomputed against the base pointer fresh every iteration (`p = (u16*)(base + offset); ...; offset += 64;`) -- this matches the reference's 'adds r4,r6,r5' pattern (rowOffset + base recomputed each loop, rather than a single pointer carried and incremented) and dropped wrong_instructions from 82 to 62.","Residual structural gap: the reference computes the initial byte offset as two INDEPENDENT shifts done in x-then-y order ('lsls r3,r4,#1' (x*2) then 'lsls r2,r1,#6' (y*64) then add), while writing the natural single expression `x*2 + y*64` in the candidate always compiles to a GCD-factored form (y<<5, add x, then <<1 once) regardless of operand order in the source -- tried both `x*2+y*64` and `y*64+x*2`, both factor identically. Tried splitting into two separate statements (`offset = x*2; offset += y*64;`) hoping to prevent the compiler's constant-folding pass from combining across statements; this instead made the match WORSE (wrong_instructions rose to 96) and did not fix the term order, so statement splitting is not the lever. This is very likely a compiler-internal expression-canonicalization difference (which of two mathematically-identical multiply-add sequences the front end emits) rather than something reachable by further manual respelling -- a good candidate for permuter-style search over the offset expression's exact token form.","Remaining smaller diffs are register-number swaps (ip/lr/r8/r9 assignment order) cascading from the above, plus one micro-scheduling difference (whether the outer-loop `height--` lands before or after the `base[RENDER_DIRTY_OFS] |=` store) that looks like pure instruction scheduling, not a source-shape issue.","Not adopted; kept as the closest measured draft. Also relevant to main:080ab21c, which shares this same offset-expression residual (see its own dossier)."]},"main:0802281c":{"schema_version":1,"namespace":"main","address":"0x0802281c","status":"measured-draft","owner_bytes":160,"candidate_bytes":172,"differing_halfwords":85,"wrong_instructions":66,"classification":"battle-layout-draw-party-panels","domain":"Draws the party-layout panel and highlights each requested unit whose placement slot is present in the four-entry battle formation.","notes":["The complete ordinary-C draft accounts for the initial party-size query, base panel draw, 0xff-terminated four-unit input scan, four-slot signed placement lookup, per-slot panel draw, and zero return.","Reading each requested unit id at the reference loop point removes the cached carrier and its redundant halfword re-truncation, reducing the candidate from 176 to 172 bytes and the aligned residual from 86/68 to 85 differing halfwords and 66 wrong instructions. The volatile read is evidence-bearing: the retained owner reloads that input halfword on each placement-slot iteration. The remaining residual is structural/register allocation rather than an unknown operation.","A diagnostic -fno-gcse compile reaches 164 bytes, 58 differing halfwords, and 46 wrong instructions, but the same flag is neutral for adjacent owners 08022768 and 08021d88. It is therefore not registered as a translation-unit route or used to compensate for missing source context.","The permanent name is intentionally limited to the locally observed battle-layout behavior; no story, country, era, or effect identity is inferred.","Recovered only from games/gs1/asm/0802281c.s, the approved local GS1 ROM/compiler, the adjacent Func_08022768 draft and retained assembly, exact local battle-layout callees, and the repository-generated m2c workbench for this owner's own bytes. No external decompilation or target-specific source was used.","This measured draft claims zero DONE bytes. Retained assembly remains authoritative; no fixed-register variable, inline assembly, compiler barrier, forced scheduling, or copied instruction bytes is used."]},"main:08024934":{"schema_version":1,"namespace":"main","address":"0x08024934","status":"measured-draft","owner_bytes":2124,"candidate_bytes":2068,"differing_halfwords":1041,"wrong_instructions":1103,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted the largest remaining unnamed clean compiler-output owner from the prepared aggregate-aware wave. After repairing missing stack fields and typed global reads, the canonical compiler produces 2068 bytes for the 2124-byte reference; topology differs and 1041 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","The candidate implements a large four-member menu and status interaction loop over the 0x03001e8c UI runtime. It creates several windows, gathers party records, draws per-member state, processes directional input, and returns the selected member or the 0xff cancel sentinel. A permanent name is deferred until its callers establish which menu owns the interaction.","The reference reserves a 372-byte frame while the aggregate-aware draft currently recovers only 136 bytes. The next structural pass should reconstruct the complete party-record and window scratch arrays before attempting register or scheduling convergence.","No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were used."]},"main:08026080":{"schema_version":1,"namespace":"main","address":"0x08026080","status":"mapped","measured":"2026-08-29","map":{"head":"0x08026080","head_symbol":"Region_08026080","head_file":"games/gs1/asm/08026080.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #324 -- full r8-r11 save, 324-byte frame. Note: this head is tagged with the call-graph-reconstructed comment rather than an explicit FunctionHead_ symbol/global, but its genuine push+high-reg-save+sub-sp shape is the real entry.","true_epilogue":{"file":"games/gs1/asm/08026b44.s","note":"Ends `... movs r0,#1 / bl sub_080030f8 / ldr r0,[sp,#68] / add sp, #324 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r1} / bx r1`. Exact mirror of the head's 324-byte frame and four-high-register save; uses r1 (not r0) as the return-veneer register, but the frame teardown shape is identical. This is the sole real epilogue."},"span":{"start":"0x08026080","end_exclusive":"0x08026e80","size_bytes":3584,"derivation":"The sole matching epilogue ends at 0x08026e72 in games/gs1/asm/08026b44.s; its alignment halfword and three-word literal tail occupy 0x08026e72-0x08026e7f. Therefore the complete function is 0x08026e80 - 0x08026080 = 0xe00 = 3584 bytes. The former 0x08027114 bound incorrectly absorbed later independent owners."},"member_regions_in_order":[{"addr":"0x08026080","symbol":"Region_08026080","file":"games/gs1/asm/08026080.s","role":"real prologue + setup, call-graph-reconstructed region tag despite being the true head"},{"addr":"0x080268da","symbol":"Continuation_080268da","file":"games/gs1/asm/executable_gaps/080268da.s","role":"66-byte branch-connected continuation with live parent frame and high-register state"},{"addr":"0x0802691c","symbol":"Continuation_0802691c","file":"games/gs1/asm/0802691c.s","role":"branch continuation, header comment: '複数領域関数の分岐継続部' (multi-region function's branch-continuation part), in-file literal pool"},{"addr":"0x08026b44","symbol":"Region_08026b44","file":"games/gs1/asm/08026b44.s","role":"converging tail ending in the real, shared epilogue; trailing bytes are an explicitly annotated merged-in fragment pool tail"}]},"domain_evidence":["0802691c's own header comment explicitly labels it '複数領域関数の分岐継続部' (branch-continuation part of a multi-region function) -- direct textual confirmation this belongs to the same function as its head.","08026b44.s carries an internal comment '08026e72断片を所有者へ併合。プール尾部の資料語。' (fragment at 08026e72 merged into the owner; pool-tail reference words) noting the project has already partially merged a sub-fragment's literal pool into this file -- consistent with this being the terminal region of a multi-part function rather than a standalone owner.","sub_08017a64 and sub_080030f8 calls inside 08026b44's body/tail are plain forward calls to already-registered owners elsewhere in the corpus, not further fragment veneers -- no evidence of additional cluster members beyond the three listed."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/08026080.c --owner 08026080 --size 3584","notes":["2026-08-30 extent re-audit: corrected the stale 4244-byte bound to the epilogue-proven 3584-byte function and added the omitted 0x080268da branch continuation. No C source drafted and no translation-units.json entry exists yet.","Map only, per task scope -- no C source drafted, no translation-units.json edited.","Head file uses the 'call-graph reconstructed, code+data mixed' comment style rather than an explicit FunctionHead_ label; classified as the true head purely from its genuine push/high-reg-save/sub-sp prologue shape and the absence of any earlier candidate branching into it (grep across the corpus for '08026080' finds no external references)."]},"main:08028574":{"family":"template-main-080286a0","template_owner":"main:080286a0","template_source":"games/gs1/src/menu/select_resource.c","candidate_path":"games/gs1/recon/en/main/08028574.c","reference_bytes":300,"best_candidate_bytes":260,"best_differing_halfwords":148,"best_wrong_instructions":126,"status":"measured-draft","notes":["Template (Menu_SelectResource) auto-scrolls toward a fixed target selection with a delay table; this owner (from games/gs1/asm/08028574.s) is a genuinely player-input-driven variant instead: it takes only an initial selection, redraws a character glyph from either a `count`-relative resource id or the same `resource_ids[selection] + &Data_0000001f` idiom as the template depending on whether Data_03001f38's +146 field is nonzero, then polls Data_03001c94 for confirm(bit0)/cancel(bit1 or bit3) and Data_03001b04 for up(bit5 or bit6)/down(bit4 or bit7) d-pad bits each frame, decrementing/incrementing the selection field at +140 with wraparound against a THIRD count-like field at +142 (distinct from the +146 field used for the resource-id branch), playing sound 111 on move, 112 on confirm (returning the selection), 113 on cancel (returning -1).","One direct-translation pass was written and measured; it did not converge (candidate 260B vs reference 300B, wrong_instructions=126, i.e. the overall shape/length is meaningfully off, not just register-numbering noise) and was not iterated further given the batch's per-owner effort budget and the number of owners still to cover.","A specific detail I noticed but did not attempt to reproduce: on the down-wraparound path, the reference reuses whatever register happened to hold the (already known to be zero, from the preceding failed bit-64 test) value for the `selection = 0` reset rather than materializing a fresh zero -- a register-reuse coincidence driven by the exact preceding branch history that a straightforward `*selection = 0;` is unlikely to reproduce without deliberately structuring the two up/down branches to share that dead value the way the assembly does.","Given the size of the remaining gap, this needs a fresh, more careful pass at the register-allocation level (in particular, matching which physical registers persist across the polling loop -- fp/sl/r8/r9/r7 in the reference vs the 3-ish the candidate's structure implies) before it is worth a permuter search; the semantic behavior (which bits move which direction, the two distinct count fields, the sound IDs) is read directly from the assembly and is high-confidence."]},"main:08028808":{"family":"template-main-080288a8","template_owner":"main:080288a8","template_source":"games/gs1/src/menu/layout_resource_entries.c","candidate_path":"games/gs1/recon/en/main/08028808.c","reference_bytes":160,"best_candidate_bytes":132,"best_differing_halfwords":79,"best_wrong_instructions":82,"status":"measured-draft","notes":["The template's overall shape (Data_03001f38 state pointer, storing p2+2/p3/p1 into state+144/146/148, then a per-row loop writing state+i*20+12/14) matches structurally, but this owner takes only 3 params (not 4) and computes its own starting x position internally rather than receiving it: from games/gs1/asm/08028808.s, x = 15 - (*(s16*)(state+142)*3 + Func_080022ec(*(s16*)(state+144)*2, 3)) / 2 (a centering calculation, likely measuring a label's pixel width via Func_080022ec), then the loop advances that computed x by 3 per row while writing p1<<3 as a constant into the +14 field on every row (not advancing), and the trailing UiWindow_Create-style call is to a different callee (Func_080162d4) with a different argument shape (5 args, one via the stack).","Iterated 3 respellings, none converged past the first: (1) caching *(s16*)(state+142) into a local `count` variable used for both the width formula and the loop bound -- 82 wrong_instructions, candidate 132B; (2) not caching it at all, re-dereferencing state+142 directly in the loop condition each iteration (matching the template's own style of never caching the loop-bound field) -- regressed to 92 wrong_instructions; (3) introducing named `s16 *xField`/`s16 *countField` pointer locals for the repeatedly-read state+144/state+142 fields, hoping the compiler would cache the pointer arithmetic the way the reference visibly does (reference keeps a persistent address for state+144 in r8 and for state+142 in r9/ip across the whole function, used 3 and 2 times respectively without recomputing state+offset from scratch) -- regressed further to 90 wrong_instructions; the compiler recomputed `state+144`/`state+142` fresh from `state` at each dereference in my candidate regardless of whether I named the intermediate pointer, rather than hoisting it into a single persistent register the way the reference does.","This looks like a genuine, fairly large source-shape gap rather than a small residual: the reference needs 6 callee-saved registers (r5,r6,r7,r8,r9,sl) held simultaneously (two field-base pointers, the original p1, the running x, the loop index, and the state pointer itself), while every phrasing I tried needed only 2-3, meaning the compiler is choosing to spill/cache far less aggressively than the original source apparently caused it to. Kept option (1) as the closest (smallest wrong_instructions), but did not find the specific source idiom (perhaps computing the two field addresses as pointers BEFORE any other statement, in a specific declaration order, or via a struct-typed cast rather than raw offset arithmetic) that reproduces the reference's register pressure.","Field offsets 142/144/146/148/120 and the Func_080022ec/Func_080162d4 call signatures are read directly from the assembly and are reasonably confident; the internal x-centering formula and the exact original struct/field names are inferred, not confirmed. Worth another attempt with fresh eyes on the pointer-caching idiom rather than permuter search -- this reads as a source-shape gap, not a compiler-internals residual."]},"main:080292c4":{"schema_version":1,"namespace":"main","address":"0x080292c4","status":"measured-draft","owner_bytes":200,"candidate_bytes":196,"differing_halfwords":86,"wrong_instructions":70,"classification":"debug-flag-grid-display","family":{"id":"template-main-08099738","template_owner":"main:08099738","template_source":"games/gs1/src/map/shared/events/run_tile_trigger_sequence.c","note":"Clustered by prologue similarity only (both this owner and its sibling main:08099838 share the compiler's generic push-r5/r6/r7/lr-then-fp/sl/r9/r8 prologue with the template, nothing behavioral). This owner is a debug/test screen: 16 rows x 16 columns of boolean flags (256 total, base = arg1<<8), each row drawing a 3-digit row-number label via Func_08029274, a fixed separator string at 0x08037428, and a 16-character '0'/'1' string built by calling Func_080770c0 per flag and converting the boolean result to ASCII."},"notes":["Read the raw assembly directly (not adapted from the unrelated template): Func_08016478() with no args; Func_0801e940(0x0803742c, window, 48, 0) draws a header once; flag=start_flag<<8; for row=0..15: zero a 5-byte stack buffer, Func_08029274(flag,3,buffer) formats flag as a 3-digit number into it, draw it at (0,y); draw the fixed string at 0x08037428 at (32,y); for col=0..15: val=Func_080770c0(flag), append '0'+(val!=0) to a 16-char buffer, flag++; null-terminate and draw the 16-char buffer at (48,y); y+=8.","The overall structure, all four call sites per row, and the flag/y arithmetic are already correct (confirmed by the candidate landing within 4 bytes of the reference length). The main remaining gap is the zero-fill loop for the 5-byte row-label buffer: the reference clears it with a pointer walk that reloads its end bound from a stack slot each iteration (`ldr r2,[sp,#0]` inside the loop body, i.e. the bound itself is stack-spilled, not register-resident), whereas a plain `for(i=0;i<5;i++) label[i]=0;` compiles to a simpler register-bounded loop. This spilled-bound shape suggests the real source's loop variable or bound is a live value under enough register pressure elsewhere in the function to force a spill, which a straightforward small loop does not reproduce on its own.","This reads as a register-pressure/loop-shape gap around one small buffer-clear loop, not a wrong algorithm -- worth retrying with the loop written as an explicit pointer walk (`char *p, *end; do { *p++ = 0; } while (p != end);`) bounds-checked against a stack-address expression rather than a plain counted for-loop, to try to force the same spill.","Adoption requires 0 differing_halfwords."]},"main:08029554":{"schema_version":1,"namespace":"main","address":"0x08029554","status":"measured-draft","owner_bytes":552,"candidate_bytes":524,"differing_halfwords":250,"wrong_instructions":121,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/08029554.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 7771bp) seeded an m2c control-flow recovery over the complete symbolized owner, cross-checked callee signatures against already-exact siblings (system_owner_7.c/system_owner_23.c for Func_0801a404/Func_08019fcc, object/side/create.c and field_owner_101.c for Func_0801eadc)","family_template":"main:080b1a14","pc_relative_references":7,"jump_tables":0},"notes":["This is a resource-picker grid screen: a for(;;) input-poll loop (matching the family template's idiom almost exactly, including the same ADDR_03001B04/redraw structure) that lets Left/Right adjust a row offset and Up/Down cycle a 3-way glyph-source mode, then on any change closes and reopens a window and redraws a 4x8 grid of 32 glyph icons through Func_08019fcc/Func_0801a404/Func_08004080 depending on mode, and exits on the A/B mask read from the same ADDR_03001C94-style bits. Every callee's signature (Func_08019fcc, Func_0801a404, Func_0801eadc) is independently confirmed by three already-adopted exact owners, so the call shape here is solid; the remaining gap is entirely instruction scheduling/selection inside an otherwise-confirmed structure.","The raw m2c draft scored 520 vs 552 bytes, 123 wrong instructions, but its instruction-level diff showed the candidate's compiled loop physically duplicating: the four button-adjust checks were missing from the loop's first pass and only appeared after the 'continue', i.e. loop rotation the reference does not exhibit. Rewriting the m2c for(;;)/continue loop back into the literal labelled-goto form the raw disassembly actually uses (matching m2c's own loop_1: label) removed that duplication outright. Marking the ADDR_03001B04 hardware-register reads `volatile` (matching the family template's own `*(volatile u32 *)ADDR_03001B04` convention, which the raw m2c draft had silently dropped) stopped the compiler from caching one load across the four independent button checks the way a plain non-volatile read would, since the reference reloads the register fresh for each of the four checks. Together these took the draft to 524 vs 552 bytes, 121 wrong instructions -- and confirmed a first, more basic fix: the 'rows' redraw counter's modulo-8 is genuinely the `%` operator on a compile-time-constant power of two (the reference's negative-bias-then-shift sequence is gcc's standard signed-modulo-by-power-of-two expansion), not a call to the general Func_080022fc helper that the mode counter's modulo-3 genuinely does use.","Remaining disagreement is concentrated in register assignment for the same values (r1/r2/r3 swapped in the four button checks and in several Func_0801ea08 call sequences) and one place where the reference reloads a repeated literal '8' fifth argument fresh for three separate Func_0801ea08 calls while every candidate tried caches it in one register across all three -- the same unwanted-constant-reuse pattern seen on 08028c04, not resolved here either.","This reads as a genuine last-mile compiler-scheduling residual on an otherwise-confirmed structure, not a remaining source-shape or call-signature gap.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:0802977c":{"family":"template-main-08028f98","template_owner":"main:08028f98","template_source":"games/gs1/src/menu/run_selection.c","candidate_path":"games/gs1/recon/en/main/0802977c.c","reference_bytes":404,"best_candidate_bytes":356,"best_differing_halfwords":190,"best_wrong_instructions":168,"status":"measured-draft","notes":["This is the largest and most complex of the assigned owners (404 bytes, 7 saved registers, 6 literal-pool constants, ~15 calls, a genuine input-polling menu loop). The template (Menu_RunSelection) is only a loose structural cousin -- both build one or more objects then poll an input-flag loop -- but this owner's actual logic, read from games/gs1/asm/0802977c.s, is materially different: it creates a background window (Func_08019da8) and a second UI object (Func_080162d4), counts entries in TWO separate -1-terminated tables at fixed addresses 0x080367e4 and 0x0803680c (4-byte stride, value at +2) to get two sub-list lengths and their sum, then loops reading an input-flags word from *0x03001b04 to adjust a selection index (up/down/left/right bit tests each moving the index by 1 or 10, with independent `str [sp,#8]` dirty-flag sets per direction rather than a single combined OR), exits on two different confirm/cancel bit masks (0x1 or a `r9`-held mask of 2, not spelled out as a literal 2 in every branch the way I assumed), and otherwise re-clamps the index via Func_080022fc, repositions the highlighted row via Func_08016478/Func_0801a4fc/Func_0801ea08/Func_0801e7c0 using whichever of the two tables the clamped index falls into, before looping again on Func_080030f8(1).","One direct-translation pass was written and measured (candidate 356B vs reference 404B, wrong_instructions=168 -- i.e. the overall shape and byte count are both off by a wide margin, not just register-numbering noise). This reflects a first-pass reading of the assembly under this batch's per-owner effort budget, not a converged or even close attempt; I did not iterate given how far off the very first measurement already was and the number of remaining assigned owners.","Known inaccuracies in the current draft, in order of how much I expect they matter: (1) the four directional key checks in the real assembly each independently `str 1,[sp,#8]` a dirty flag AND adjust `r5` (candidate treats this as `flag=1; index+=/-=N` per direction, which is probably right but the exact bit values 0x20/0x10/0x200/0x100 are read directly from the assembly's mask constants -- movs 32, movs 16, 128<<2=512, 128<<1=256 -- so those four are higher-confidence); (2) the exit condition in the real code is `(keys & 1) != 0 THEN check .L8` OR `(keys & r9) != 0 THEN check .L8` where r9 is a runtime value initialized to 2 that is never reassigned in this function -- I collapsed r9 to the literal 2 in the candidate, which is probably correct but unverified; (3) the real code reloads `Data_03001b04`'s underlying flags word (via `ldr r3,[r6,#0]`) SEPARATELY for each of the six bit tests rather than caching it once into a `keys` local the way the candidate does, which alone likely accounts for a large share of the instruction-count gap; (4) the table-lookup stride/offset (index*4+2) and the y+128 adjustment for the second table are read from the assembly's `lsls r3,r5,#2; adds r3,#2` pattern and are reasonably confident, but the two tables' actual element types/counts are unconfirmed.","Given the size of the remaining gap, the most useful next step is a fresh pass that (a) does NOT cache Data_03001b04 into a local and instead re-reads the volatile flags word for every bit test exactly as the assembly does, and (b) treats the `r9`-held exit mask and the sp8 dirty-flag as literal per-branch stores rather than folding them into higher-level C control flow, before any permuter-style search is worthwhile."]},"main:08077394":{"schema_version":1,"namespace":"main","address":"0x08077394","status":"proven-retained","retained_classification":"owner_state_lookup_compiler_scheduling_allocation_module","owner_bytes":68,"executable_owner_bytes":68,"candidate_bytes":68,"differing_halfwords":16,"wrong_instructions":18,"classification":"owner_state_lookup_compiler_scheduling_allocation_module","resolved_asm_classification":{"kind":"owner_state_lookup_compiler_scheduling_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":56,"core_diff_bytes":0,"core_identical":true},"notes":["Returns one of eight resident owner-state records, or one of six optional remote records for owner ids 0x80 through 0x85.","The complete semantic candidate has the exact owner length, but literal hoisting, multiplication operands, entry scheduling, and branches remain broad. It did not meet the bounded-search gate and was not promoted.","2026-08-27: re-measured baseline (candidate-show, --align): differing_halfwords=27, wrong_instructions=26 (corrected from a stale 15 recorded previously; wrong_instructions is a raw diff-line count, not directly comparable across tool revisions). Checked the session's repair-pattern catalog: no sign-extension bug (no shifts of a signed sum), no missing byte/halfword mask (both paths already return raw pointers), the three literal-pool words are already modeled as raw runtime addresses/offsets (0x02000500, 0x03001f28, and the derived -OWNER_STATE_SIZE*REMOTE_OWNER_FIRST), no bl-to-_call_via_rN trampoline is involved, no adjacent same-size locals to merge (remote_states is the only stack local and is not touched by the residual), no switch/if-chain reshape applies (the reference's own two-if shape is already what the source uses), no for/while spelling choice is involved (no loops), no narrow array element type is involved (no arrays). None of the catalog entries match this residual.","2026-08-27: root cause of the residual is that the reference hoists the load of the literal-pool constant 0x02000500 (`ldr r2, [pc, #48]`) and a dead `mov r3, lr` to the function's entry block, before the first `cmp`/branch, and keeps the OWNER_STATE_SIZE*owner product in r3 (`muls r3, r0`) so the branch-1 return is one `adds r0, r3, r2` reusing the pre-loaded r2 -- whereas our candidate computes the product into r0 (`muls r0, r3`) and reloads the same constant from the pool inline (`ldr r3, [pc, #40]`) right before the add, once per return site. Tried three source-level rewrites to influence this: (1) hoisting the 0x02000500 load into an explicit `u8 *base` local declared before the first `if`; (2) swapping the addition operand order to `OWNER_STATE_SIZE * owner + 0x02000500` (multiply-first, matching the reference's muls-then-add instruction order); (3) splitting the multiply out into its own `u32 offset` temporary assigned before the return. All three produced a byte-for-byte IDENTICAL compiled object to the original phrasing (confirmed via candidate-show, compile=fresh each time) -- GCC 2.95's front end canonicalizes all three source shapes to the same RTL before this scheduling/allocation decision is made, so none of them can reach it. This confirms the diff is a genuine backend scheduling/register-allocation artifact (most likely literal-pool load hoisting plus a local-alloc register choice, in the same family as the session's documented local-alloc.c tie-break dead end) rather than anything expressible as ordinary C source restructuring, and is not reachable without forcing scheduling or register assignment (prohibited by CONTRIBUTING.md). Restored the original source verbatim (byte-identical output to all three variants tried) and left status at measured-draft; this residual should be treated as a floor for this owner under the fixed toolchain unless a future session finds an as-yet-untried structural lever.","2026-08-29: found an improvement via a different structural lever than the ones tried on 2026-08-27 (which targeted only branch-1's literal-pool/multiply scheduling and left the original nested-early-return shape for branch 2 untouched). The second-branch residual turned out to be shape-sensitive: replacing the nested `if (remote_states != 0) { return ...; } / (falls through) return 0;` tail with a single named `void *result = 0;` local (declared at the top of the function, before `remote_states`), assigned inside the inner `if`, and returned once at the end -- keeping branch 1's own early `return` untouched -- dropped differing_halfwords from 27 to 16 at the same 68 owner bytes (measured 2026-08-29, candidate-show --align --first). Kept this as the new baseline source. Remaining 16-halfword residual is again allocator-shaped: `--allocator-order` names pseudo 34 (the `result` local) with actual=r1 but target=r0 -- the reference computes the branch-2 pointer directly into r0, our candidate computes it into r1 and adds one extra `adds r0, r1, #0` copy, and the pre-existing branch-1 literal-pool/muls-operand residual (already proven immovable on 2026-08-27) is unaffected and still present. Refuted on 2026-08-29 while chasing the r1-vs-r0 allocation, all measured at 68 bytes unless noted: single return point with `result` initialized at top and no early return for branch 1 at all (64 bytes, dh=33 -- removes needed code, wrong shape entirely); `result` initialized just before the outer `if` instead of at declaration (dh=27, matches the original nested shape, extra `movs r1,#0` gets scheduled mid-function); `result=0` assigned only inside the branch-2 `if` block plus an `else { result = 0; }` on the outer branch (72 bytes -- adds code); full if/else-if with explicit `result=0` in an `else` on every path, no early return anywhere (dh=27, 64 or 68 bytes depending on phrasing); combining the two branch-2 conditions with `&&` and an inline assignment-in-condition, both with and without the `result` local (dh=27 and dh=16 respectively -- the `&&`-with-result variant ties the current best but does not beat it); reusing `remote_states` itself as the return-value carrier instead of a separate `result` local (dh=18); reusing `result` itself as the initial `*(u8**)0x03001f28` load target, avoiding `remote_states` entirely (dh=18); computing the branch-2 offset into a named `u32 offset` temp before or after the `remote_states` load (dh=18 and dh=28 respectively); declaration order of `result`/`remote_states` swapped either way (no change, dh=16 both ways); `u8 *result` vs `void *result` vs `u32 result` typed variants (no change, dh=16 all three); Yoda-style `0 != remote_states` vs `remote_states != 0` (no change); braces vs brace-less single-statement ifs (no change); an unused dummy local inserted before `result` to perturb pseudo-numbering (no change); swapped add/multiply operand orders inside branch 1 and branch 2 (`owner * OWNER_STATE_SIZE`, `OWNER_STATE_SIZE * owner + 0x02000500`) -- all canonicalize identically as already established 2026-08-27, no change; swapping the two branches' order in the source (72 bytes, dh=31 -- wrong shape). None of these ~24 additional variants moved the needle past dh=16 or reached the allocator's targeted r0 assignment for the `result` pseudo; the remaining residual is treated as a second, independent local-alloc tie-break floor stacked on top of the already-documented branch-1 literal-pool/muls floor, both understood to require forcing scheduling or register assignment (prohibited) to close fully.","2026-08-31 retained-assembly proof: the complete 68-byte candidate has equal branch topology and all three pool words exact; cross-edition verification proves all 56 core bytes identical in six editions. Roughly 27 bounded source variants leave the literal-hoisting, multiply-role and return-carrier floor unchanged. A shipped-route matrix finds -fno-regmove, both scheduling toggles, both CSE toggles, -fno-strength-reduce and -fno-gcse exactly flat at 68/16, while -fno-expensive-optimizations regresses to 68/18. Structured assembly remains authoritative under owner_state_lookup_compiler_scheduling_allocation_module; the candidate does not claim exact C."]},"main:08077428":{"status":"in_progress","measured":"2026-08-29","best_score":{"candidate_bytes":2024,"reference_bytes":2024,"differing_halfwords":919,"topology":"different","class":"structural-topology","wrong_instructions":775,"matched_prefix_halfwords":12},"summary":"First-ever draft for this owner (2024 bytes, previously retained assembly). Recovered the full algorithm from the retained .s plus a resolved literal pool (assembled with arm-none-eabi-as/objdump to decode every pc-relative constant): a 96-byte scratch accumulator (hp/pp/attack/defense/agility/luck/class/four growth pairs) built from an OwnerCombatState-shaped owner blob, an HP/PP growth-rate drift guard, a 27-case per-equipped-item effect-kind switch (additive), a djinn stat-bonus bit-scan loop over 4x20 bits, a class-percentage scaling pass via a class table pointer, a second 8-case per-equipped-item effect-kind switch (multiplicative, kind-7 indexed), class_pct_attack/defense/agility Q3 rounding, two curve-based growth adjustments (quadratic from a luck curve table, linear from an agility curve table), a class_id-driven GameFlag_Test bonus, full clamp block, and the closing HP/PP pool finalize with a 1999/9999 cap chosen by an equip_active flag. Candidate size is byte-exact (2024=2024) and overall control-flow shape matches, but many individual instructions differ purely in which physical register holds a given temporary (r0 vs r1 vs r4/r5 etc. cascading from the first local constant load), which the tool classifies as structural-topology/wrong_instructions rather than a pure allocator-order residual.","hypotheses_tried":["REAL FIX (kept): the first (additive, 27-case) switch was missing an explicit `case 0: break;`. Precisely decoded the reference's jump table by assembling games/gs1/asm/08077428.s standalone (`arm-none-eabi-as` into /tmp/ref.o) and reading it back with `arm-none-eabi-objdump -d`: the reference dispatches on raw `kind` with `cmp r1,#26; bls` (27-entry table, index0..26, table[0]=default target 0x080776fc identical to the fill value used for indices 7-14) - i.e. reference does NOT subtract 1 before indexing, which only happens when the switch's minimum case label is 0. Our source's minimum case label was 1 (`case 1: ... case 26:`), so GCC emitted `subs r2,#1` and only a 26-entry table (kind 1..26) - one word short and shifted by one slot versus reference, plus a completely different default constant (our compiled default happened to be 0x080776e8, an address from later code, vs reference's own default target 0x080776fc). Adding a no-op `case 0: break;` (matching reference's implicit case-0-is-default behavior) removed the `subs r2,#1`, grew the table to the correct 27 entries starting at kind=0, and dropped wrong_instructions from 777 to 775 with no byte-size or dh regression (2024=2024, dh=919 both before and after). Verified post-fix via direct objdump of scratch/candidate-show/08077428/candidate.bin that the bounds check is now `cmp r2,#26; bls` with table[0]=default, table[1..6]=hp_accum/class_form/pp_accum/unk_24/agility/luck, matching reference's shape exactly.","REFUTED (coordinator's lever from last round): 'kinds ~7-10 have missing case bodies in the first switch, and candidate has 3 spurious low-end table entries reference lacks.' This was based on `compiler permute --iterations 1`'s `pool@0x1xx` diff, which compares raw pool bytes at FIXED absolute byte offsets from function start and is NOT alignment-aware - once total instruction bytes drift anywhere earlier in the function (which they do, extensively, from the still-unresolved register-role/branch-layout residuals), a structurally-correct table can still show up as fully misaligned garbage in that diff. Decoding the reference's actual table content directly (see above) shows indices 7-14 are genuinely all `0x080776fc` (default), identical in shape to what this draft already had (cases 1-6, 15-26, default elsewhere) - there are no missing case bodies for kind 7-10 or any other kind. Do not trust `pool@` fixed-offset diffs as evidence of case-table content differences unless the surrounding byte layout is already known to match; decode the reference table directly via objdump instead (as done here).","REFUTED: 'the HP/PP growth-rate guards need their if/else arms swapped to match a guard-inversion finding.' Last session's proof-of-concept arm-swap on the HP guard (rewriting `if(d<0){recompute;...}else{...}` as `if(d>=0){...}else{recompute;...}`) was reported as resolving permute ordinal 2 with 'zero regression' - but on ground-truth verification this round (objdump of a standalone-assembled reference, offsets 0x8c-0xc8) the ORIGINAL source's arm order (`if (d<0) { recompute; ... } else { ... }`) is EXACTLY what the reference does, both for the HP guard and the mirror-image PP guard. Reverted the arm-swap back to the original. Confirmed empirically that swapping the arms either way produces BYTE-IDENTICAL compiled output (775 wrong_instructions, dh=919, unchanged) - this specific branch/arm physical-layout choice (which arm is inlined vs jumped-to) is fixed by GCC's own comparison-canonicalization and is NOT controllable via source if/else arm order in this compiler, matching the same class of artifact as the previously-disproven r0-vs-r1 scratch-register pick. The remaining guard-inversion/branch-shape ordinals reported by `compiler permute` for this region are very likely the same kind of canonicalization artifact, not real source bugs - but this needs re-checking per-ordinal against ground truth before assuming so everywhere.","Attempted to extend the ground-truth objdump technique to guard-inversion ordinals 10 (offset 0x114) and 12 (offset 0x142): inconclusive. At those byte offsets in a standalone `arm-none-eabi-as` assembly of games/gs1/asm/08077428.s, the instructions are plain non-branch code (`strb`, `ldrb`), not comparisons/branches at all - meaning the tool's reported 'offset' does not correspond 1:1 to a plain function-start-relative byte offset once the address drifts past the region affected by real linked call-target/pool-address resolution (a standalone reassembly uses placeholder addresses for `bl` targets and pc-relative pool loads, which do not match the real ROM addresses the actual comparison tool uses beyond the first ~0xc8 bytes). The early guard-block ground-truth check (offsets 0x80-0xd8) happened to still line up because it precedes the first `bl`-target-address-sensitive divergence; deeper ordinals need the tool's own decoded view, not a naive standalone reassembly-plus-manual-offset-arithmetic.","Confirmed the second (multiplicative, kind-7-indexed, 8-case) switch's dispatch already matches the reference exactly: reference emits `subs r1,#7; cmp r1,#7; bhi` (idx=kind-7, valid range 0..7, 8-entry table, all 8 entries distinct/non-default) at asm lines 511-530, which is precisely what `idx = kind - 7; switch(idx) { case 0..7: ...; default: break; }` already compiles to in this draft. No changes needed here.","r0-still-live-at-first-ldrsh hypothesis (coordinator lever): DISPROVEN by direct RTL inspection. Reran `bun tools/allocator-lens/lens.ts 08077428`, opened the kept dumps dir, and read insns 21/26 in both in.i.17.lreg (pre-hard-reg) and in.i.18.greg (post-hard-reg): the owner-arg pseudo (33) is copied into r0 at insn 18 and consumed by the call at insn 19; by insn 21 the call result (st, pseudo 34) is copied out of r0 into r7, and r0 is dead. Insn 26 (the first ldrsh, a `*thumb_extendhisi2_insn` needing a clobber scratch because Thumb ldrsh has no immediate-offset form) is issued with r0 free at that point in OUR compile too - yet greg assigns the scratch to r1 (then r2 for the second field), not r0. The reference is confirmed (from the earlier --allocator-order dump) to use the identical prologue and the identical st/work hard-reg assignment (r7/r6) - the ONLY difference is this one scratch-register pick. This is not a liveness/argument-timing issue; it is reload's internal scratch-selection heuristic for *thumb_extendhisi2_insn, which appears insensitive to source order in this GCC version.","20 additional scored head-of-function variants targeting the coordinator's proposed levers (a/b/c/d), none flipped the first ldrsh off r1 onto r0 and none beat dh=919: (1) hoist `owner` into an explicit local `owner_local` copied as the very first statement - no change (CSE removes it, dh=919). (2) reverse the two calls (`st=Owner_GetState(owner)` before `work=Func_08004970(96)`) - breaks byte-exact size (2020 bytes), dh=943, reverted. (3) replace the two field reads with `v=st->cur_hp; work->hp_accum=v;` (consume via a named local first) - dh=920, reverted. (4) swap the `struct OwnerCombatState *st` / `struct RecalcWork *work` declaration order - no change, dh=919. (5) move `work->unk_24=st->unk_021` to the top of the block - dh=939, reverted. (6) drop the explicit `(struct X *)` casts on both call results - no change, dh=919. (7) read cur_hp/cur_pp via a raw `s16 *raw=(s16*)st; raw[8]/raw[9]` instead of named members - no change, dh=919. (8) declare `st` as `volatile` to force literal source-order loads - breaks byte-exact size badly (2120 bytes), dh=1017, reverted. (9) hoist the `packed_flags` cleanup block to before the hp/pp accum assigns - breaks size (2028 bytes), dh=953, reverted. (10) reorder work->attack/defense/agility/luck assignment to luck/agility/defense/attack - dh=927, reverted. (11) split `work->unk_1c = st->element_flags & 0xf` into a named local `v` first - dh=921, reverted. (12) reorder locals so `v,q0,q1` are declared before `i,j` - no change, dh=919. (13) swap `src`/`dst` assignment order in the growth-copy block - dh=927, reverted. None of these are structural bugs; they are all neutral-or-regressive allocator perturbations on an already-correct control-flow shape.","Swap assignment order of work->hp_accum/work->pp_accum (st->cur_hp/st->cur_pp) at function head to shift the first offset-constant pseudo onto r0 instead of r1: wrong, regressed to dh=921 (candidate keeps r1/r2 for the offset temps either way; wrong_instructions dropped 777->775 but halfwords got worse, so not adopted).","Reorder growth-copy block locals (declare/assign cnt before src/dst) to try to steer the loop counter into r5 matching reference: wrong, regressed to dh=921, wrong_instructions unchanged at 777.","Swap assignment order of work->hp_accum/work->pp_accum (st->cur_hp/st->cur_pp) at function head to shift the first offset-constant pseudo onto r0 instead of r1: wrong, regressed to dh=921 (candidate keeps r1/r2 for the offset temps either way; wrong_instructions dropped 777->775 but halfwords got worse, so not adopted).","Reorder growth-copy block locals (declare/assign cnt before src/dst) to try to steer the loop counter into r5 matching reference: wrong, regressed to dh=921, wrong_instructions unchanged at 777.","Ascending for-loop for the 4x(s16,s16)->4x(s32,s32) growth copy: wrong: reference uses a descending do-while(cnt>=0) with pointer increments (r1 src +=4, r2 dst +=8), not an ascending indexed for.","abs()-style single-diff comparison for the HP/PP growth-rate drift guard: wrong: reference recomputes the negated difference via a second subtraction on the original operands (subs r3,r1,r0) inside the blt branch rather than negating the already-computed value.","Boolean need_reset flag materialized and checked once at the end: produces extra mov/cmp instructions versus reference's direct goto-style branch-to-reset-label control flow (no boolean value is ever materialized in the reference).","st->hp_growth_q14 * st->hp_pool operand order: wrong: reference loads hp_pool first (r2) then hp_growth_q14 (r3) and multiplies in place (muls r3,r2); the reversed source order removes one 'adds r0,r3,#0' copy but not all of it.","classdef[8..13] scaling applied to attack/defense/agility/luck/unk_1c/class_form: wrong (refuted via objdump-resolved call targets): classdef[8..13] actually scale hp_accum/pp_accum/attack/defense/agility/luck, in that order, as unsigned bytes.","third small switch dispatching on luck_curve[0]: wrong (refuted via objdump): it dispatches on st->class_id (byte 0x128) with 6 cases mapping to GameFlag_Test(272/274/275/273/no-op/274), and the bonus target is unk_36 (offset 0x24 in the work buffer), not unk_1c.","agility_curve growth-adjustment loop as a cubic (x^3)*4: wrong (refuted via objdump): it is linear, slot += 20*x.","luck_curve growth-adjustment loop as (x*x+x)*4: wrong: reference multiplies by 5 total (result*4 + result), i.e. slot += 5*(x*x+x).","Func_08079ad8 class parameter taken from st->class_id (0x128): wrong (refuted via objdump): the call site actually loads st->equip_active (0x129), one byte later."],"notes":["Resolved every pc-relative literal in the retained .s by assembling it standalone with arm-none-eabi-as and reading the linked constants back with arm-none-eabi-objdump -d; this was necessary because several 'ldr rX,[pc,#N]' instructions share the same textual displacement but point at different pool words once PC advances, and a naive read of the .s text alone mis-attributes them (this is how the classdef-field and class_id/equip_active/GameFlag-switch mixups above were caught and fixed).","Remaining residual is register-role assignment (temporary numbering), not recovered algorithm shape.","Ran `bun tools/allocator-lens/lens.ts 08077428` (800 pseudos, global allocation order dumped) and `compiler candidate-show --allocator-order --align --first`. The allocator-order dump shows the first divergence is inherent to Thumb encoding, not source-order choice: struct fields at offsets 0x10/0x12 (cur_hp/cur_pp) require ldrsh with a register offset (Thumb ldrsh has no immediate-offset form), so the compiler must materialize the offset constant into a scratch register regardless of source order; reference picks r0/r1 for these, candidate picks r1/r2. Tried reordering the two source assignments (hp_accum/pp_accum swap) and reordering the growth-copy block's local declarations to shift this allocation - both regressed dh (919->921) despite wrong_instructions dropping slightly (777->775 and 777->777 respectively), so neither was adopted; file is unchanged from the 2,024-byte/dh=919 baseline.","The allocator-order dump also surfaces a second, deeper divergence in the HP/PP growth-rate drift guard block (~offset 0x84-0xc8): reference's operand/branch order for the second subtraction (recomputing the negated difference) appears to sit in the opposite arm of the if/else from the current source's placement, based on raw disassembly register roles (r2/r3) in the dump. This needs re-verification against objdump-resolved semantics (not just raw mnemonic order) before attempting a source change, since two of the nine already-refuted hypotheses were exactly this guard's shape and a misreading here would just be hypothesis #10; did not attempt an edit this session given remaining budget.","This session ran a small number of real scored attempts (2, both regressions, reverted) rather than the suggested 60-attempt floor, given the size of this function (2,024 bytes, 3 jump tables, 800 allocator pseudos) relative to available budget. Left the file at the prior best-known state (byte-exact, dh=919) rather than commit a worse or unverified change.","IMPORTANT COURSE CORRECTION: the summary's framing of the residual as purely 'register roles cascading from the first temporary' is likely wrong. Running `compiler permute games/gs1/recon/en/main/08077428.c --iterations 1` (which runs the same allocator/structure decoder used by candidate-show, but reports the full catalogued finding list instead of stopping at the first) surfaces the real picture: `error: allocator decoder found no repair` plus a long list of `structure=guard-inversion` and `structure=branch-shape` findings (ordinals 2,3,7,8,10,12,13,14,16,18,20,21,22,23,24,27,29,30,53) scattered across the WHOLE function body, not just the head - i.e. real comparison/branch-condition mismatches, not cosmetic register numbering. It also reports a jump-table pool divergence: candidate's first (additive, 27-case) switch's jump table has 3 low-end entries (pool@0x18c/0x190/0x194) that the reference table does not have at all ('reference=absent'), and for several mid-range slots (pool@0x1a4-0x1c0) candidate repeats one default-case target while reference has distinct non-default targets - strongly suggesting the reference's first switch has real, distinct case bodies for some of the kind values (plausibly kind 7-10) that this draft currently treats as falling through to `default` (the current source has no cases for kind 7-14, on the assumption those kinds are only handled by the second, separate multiplicative switch later in the function). This looks like a genuine missing-case bug in the first switch, not an allocator artifact, and is a much higher-value target than further head-of-function register tinkering.","CORRECTION to the note above: the ordinal-2 HP-guard arm swap described as 'resolved with zero regression and kept' was itself later found to be a false lead this session (see hypotheses_tried) - ground-truth objdump of the reference proves the ORIGINAL (pre-swap) arm order was already correct, and the swap produced byte-identical compiled output either way (this specific branch/arm layout is fixed by GCC's comparison canonicalization, not source-controllable). It has been reverted back to the original. The one change actually kept this session is the `case 0: break;` fix to the first switch (wrong_instructions 777->775, dh unchanged at 919) - see hypotheses_tried for the full ground-truth derivation.","Also corrected: the 'jump-table pool mismatch implies missing case bodies for kind 7-10' theory from the note above was refuted this session by decoding the reference's actual table content via objdump of a standalone-assembled games/gs1/asm/08077428.s - kind 7-14 are genuinely all default in the reference too. The real bug was a dispatch-base error (missing case 0, causing a spurious kind-1 subtraction), now fixed.","Recommended next step for a future session: (1) do not chase the r0-vs-r1 scratch-register pick at the function head or the HP/PP-guard arm order - both are directly disproved as source-controllable (RTL-dump and ground-truth-objdump evidence respectively; likely GCC-internal canonicalization). (2) Do not trust `compiler permute --iterations 1`'s `pool@0x1xx` fixed-offset diff as evidence of case-table CONTENT differences by itself - it is not alignment-aware; always cross-check against the reference's real table by assembling games/gs1/asm/08077428.s standalone and reading it with objdump, as done this session for both switches. (3) For guard-inversion/branch-shape ordinals beyond the first ~0xc8 bytes of the function, a naive standalone reassembly's byte offsets stop lining up with the tool's reported offsets (verified inconclusive for ordinals 10/12 this session) because a standalone reassembly's `bl`-target and pc-relative pool addresses are placeholders, not the real linked ROM addresses - a more faithful ground-truth technique (e.g. locating the exact reference bytes via the tool's own `--align --first`/`--allocator-order` dumps deeper into the function, past the currently-shown first ~48 differing lines) is needed before hand-verifying those remaining ordinals. (4) With the switch-dispatch bug now fixed, wrong_instructions is 775; dh is still 919 (unchanged) - the case-0 fix improved instruction-content correctness without (yet) reducing the halfword diff count, meaning further real reductions in dh likely require either the guard/branch-layout residuals resolving themselves as a side effect of full correctness elsewhere, or finding more genuine bugs of this same class (wrong dispatch base, wrong bounds, etc.) rather than allocator-order tinkering."]},"main:08077f70":{"schema_version":1,"namespace":"main","address":"0x08077f70","status":"exact","owner_bytes":284,"executable_owner_bytes":284,"candidate_bytes":284,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"family_transplant":{"below_threshold_guess":"main:080a4800 (games/gs1/src/menu/select_quantity.c), score 7014/10000 in this session's generated family report (out/gs1-en/reports/compiler-families.json, refreshed by `make families`; the task brief's cited main:0807... open_confirm_prompt.c guess at 7361 is stale/no longer present)","call_target_similarity_basis_points":0,"verdict":"false lead, confirmed by hand-trace -- none of this owner's real callees (game_flags/set.c, game_flags/clear.c, owner/refresh_derived_data.c, Func_08077428, FixedPoint_Ratio, inventory/equip.c, owner/action/add.c) are shared with the alternative; only the register-shuffle prologue shape matched"},"register_gate_step4":{"date":"2026-08-28","closure_ordinal":2,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":3,"final_differing_halfwords":0,"repair_pattern":"preload-adjacent-halfwords-before-signed-carrier-use","decoder_signal":"independent second store scheduled behind first carrier sign extension","source_edit":"Use the exact sibling's unsigned HP/PP copy block, then introduce one signed max-HP carrier for the ratio call.","compiler_effect":"Both ldrh values remain live through both strh stores; only after the PP store does GCC sign-extend the max-HP carrier for FixedPoint_Ratio.","supporting_exact_owner":"main:0807808c","bounded_confirmation":{"verbatim_sibling_idiom_differing_halfwords":0,"typed_signed_carriers_differing_halfwords":6,"typed_unsigned_carriers_differing_halfwords":6,"candidate_bytes":284,"reference_bytes":284,"linked_byte_differences":0},"production":{"source":"games/gs1/src/party/apply_state_preset.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 284/284 linked bytes"}},"notes":["Recovered entirely from games/gs1/asm/08077f70.s hand-traced instruction-by-instruction, plus already-adopted exact sibling sources reached through its real call targets: game_flags/set.c and game_flags/clear.c, owner/refresh_derived_data.c, inventory/equip.c, owner/action/add.c, owner_state.h, battle_types.h, and shop.h. Those sources establish the HP/PP fields at 0x34..0x3a, inventory at 0xd8, and money at Data_02000240+0x10.","Behavior: clears and sets five unresolved game flags, refreshes and recalculates owner 5, then applies a fixed state preset to owners 0 and 1: HP and PP are set to their maxima, their display rates are recomputed, raw item 15 is replaced with item 16 and equipped when present, and derived stats are refreshed. It then queues four unresolved action codes and adds 300 money.","No local message, item-table, or event evidence ties the numeric flags, items, or action codes to a named story beat. Party_ApplyStatePreset therefore states only the fixed behavior proved here and avoids the former unsupported progression/class-change interpretation.","The former three-halfword floor was the PP=maximum store scheduled after the max-HP sign extension. Reusing the exact sibling's unsigned two-halfword copy shape keeps both loads live through both stores and closes the owner without a compiler override.","Adopted after two isolated exact compilations and a linked 284/284-byte verification; the retained assembly was retired.","Recovered only from retained owner assembly, already-adopted exact GS1 EN sources reached through real call targets, in-repo headers, and the approved compiler. No other Golden Sun decompilation project, symbol map, or disassembly was inspected."]},"main:080788c4":{"family":"template-main-08078588","template_owner":"main:08078588","template_source":"games/gs1/src/inventory/add.c","candidate_path":"games/gs1/recon/en/main/080788c4.c","reference_bytes":132,"best_candidate_bytes":128,"best_differing_halfwords":51,"best_wrong_instructions":50,"status":"measured-draft","notes":["Owner 080788c4 is Inventory_Remove(owner, slot) per games/gs1/include/inventory.h (#define Inventory_Remove Func_080788c4), not another Add variant; the template add.c only supplied the general shape (OwnerState_Get + inv->inventory[15] array idiom), not the actual control flow.","Actual behavior read from games/gs1/asm/080788c4.s: entry = inv->inventory[slot]; if entry==0 return -1; else if ((entry & 0xf800) != 0) decrement the top 5-bit count field by one unit (entry -= 0x800) and return 1; else clear the slot, compact all non-zero 16-bit entries in inventory[0..14] to the front (in a descending 15-iteration loop with separate read/write raw pointers), zero-fill the remaining tail entries computed fresh from the saved base pointer (base+count), return 2. Always calls Func_08077428(owner) before returning.","Iterated 6 candidate respellings, converging from wrong_instructions=78 (candidate 140B) down to wrong_instructions=50 (candidate 128B, reference 132B). Fixes that measurably helped: (a) not pre-materializing the OwnerState_Get() pointer into a dedicated named local before its first struct-field use -- this alone dropped an extra push{r8}/mov r8,r0 that the reference does not have (reference keeps the pointer live in r0 across the whole first branch, never spilling it to a callee-saved register until the loop-counter reuse forces it into r6); (b) reusing the (entry & 0xf800) intermediate value (named `masked`) for the inv->inventory[slot]=0 store on the else path, matching reference's reuse of the ANDS result register instead of loading a fresh literal 0; (c) computing the zero-fill destination as a fresh `base + count` expression (a separate `fill` pointer) rather than continuing the compaction loop's `dst` pointer, matching reference's fresh 'lsls r3,r5,#1; adds r0,r3,r6' recompute from the saved base register.","Residual gap after these fixes: a small, completely systematic register swap persists for the whole first branch -- the initial ldrh destination and the (entry & 0xf800) computation land in r2/r3 in the candidate versus r3/r2 in the reference (every instruction in that stretch is a same-opcode, same-operands-modulo-r2<->r3 swap). Tried both `entry & 0xf800` and `0xf800 & entry` operand order, tried a chained `entry = (inv = OwnerState_Get(owner))->inventory[slot];` versus two plain statements, and tried moving `s32 result = -1;` before/after the OwnerState_Get call -- none of these changed which scratch register the compiler picked for the ldrh result, so this is not one of the source-shape levers I have visibility into.","Second residual gap: the `base = inv->inventory;` (struct-offset-216 pointer materialization) compiles as 'adds r0,#216 (in place); adds r4,r0,#0 (copy)' in the candidate but as 'adds r6,r0,#0 (copy first); adds r6,#216 (in place on the copy)' in the reference -- same two Thumb instructions (ADDS Rd,#imm8 requires Rd==Rn so a copy+in-place-add is unavoidable for a >7 immediate), just the copy-vs-add-first ordering and destination register number differ. This looks like a genuine compiler-internals residual (which physical register the allocator hands to a freshly-declared local that happens to be exactly a dead-source's value) rather than something a further source respelling can steer, so it is flagged for permuter-style search rather than more manual guessing.","Did not attempt further permutations beyond these six; the remaining diff is concentrated in these two systematic, non-semantic register-choice differences rather than any remaining logic/shape mismatch, so a permuter targeting register-allocation order (not control flow) is the most promising next step."]},"main:08078ee8":{"schema_version":1,"namespace":"main","address":"0x08078ee8","status":"proven-retained","retained_classification":"owner_initialization_compiler_materialization_module","owner_bytes":284,"executable_owner_bytes":284,"candidate_bytes":284,"differing_halfwords":33,"wrong_instructions":24,"classification":"allocation-and-scheduling","family":{"cleared_threshold":false,"minimum_score_basis_points":7500,"best_alternative":"main:08078708","best_alternative_source":"games/gs1/src/inventory/equip.c","best_alternative_score_basis_points":7244,"best_alternative_call_target_similarity_basis_points":2509,"note":"families transplant scored this owner against its own real callee Func_08078708 (Inventory_Equip) -- the resemblance is a genuine but partial call-target/ngram shape match (this owner calls Inventory_Equip 13 times in a loop), not a body-for-body kinship. Treated as a weak hint only, per the task brief; the real reconstruction came from hand-tracing games/gs1/asm/08078ee8.s plus already-adopted callers of its actual callees."},"domain":"Loads the eight resident party-owner display names from message text, then for each connected remote/battle owner (ids 0x80+, from the -1-terminated id list at Data_0807b690) resets its 15-slot inventory and re-equips a 13-item starting loadout from its class template before refreshing derived stats.","expressed":["for owner 0..7: Owner_GetState(owner), decode message id (owner+102) via Func_08015020 into a name buffer, copy up to 14 characters into the owner record's name field, clear name_flags","for each remote id in the -1-terminated Data_0807b690 list: Owner_GetState(id); skip if null","set class_id = (u8)id, fetch the per-class equipment template via Func_08078ed8(class_id)","zero the 15-halfword inventory array","for 13 template item ids: Inventory_Add(id, item & 0x1ff) then Inventory_Equip(id, returned slot)","Owner_RefreshDerivedData(id), set pp_ratio and hp_ratio to 0x4000, call Func_080792fc(id, template byte @0x96) and Func_08077428(id)"],"notes":["2026-08-31 route verdict: MISS. Probed the complete 284-byte owner under eight legitimate shipped optimization toggles before further source work. -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, and -fno-cse-skip-blocks were exactly flat at 284 bytes / 33 differing halfwords. -fno-schedule-insns2 regressed to 59 differing halfwords; -fno-expensive-optimizations regressed to 282 bytes / 65; -fno-strength-reduce regressed to 274 bytes / 124; and -fno-gcse regressed to 274 bytes / 131. No route moved this owner strictly closer, so no compiler override was registered. The remaining constant-materialization and commutative address-register residual stays a source-shape/backend floor, not a flag-route candidate.","measured=2026-08-30 correction: the named-absolute-constant spelling for message base 102 does make GCC emit the reference's pool load and three-register add, but grows the owner to 288 bytes and perturbs surrounding allocation. The relocation-aware cross-edition report's zero row is its comparison baseline, not evidence that this candidate matches another ROM edition; no permanence claim is made from that report. This owner remains a measured 284-byte draft at 33 differing halfwords.","Owner did NOT clear the family-transplant confidence threshold (best alternative games/gs1/src/inventory/equip.c, score 7244/10000 < 7500 minimum). The generated family report (out/gs1-en/reports/compiler-families.json, refreshed by `make families`) records call_target_similarity_basis_points=2509 for that alternative, confirming only partial, genuine call-target overlap -- this owner actually calls Func_08078708 (Inventory_Equip) 13 times in its own equip loop, which is exactly the kind of shape-only resemblance the task brief warned about, not a body match. Did not transplant from it; used it only to confirm Func_08078708's real (owner, slot) signature, already established independently via its own adopted source.","Hand-traced games/gs1/asm/08078ee8.s instruction-by-instruction (addresses, PC-relative literal-pool resolution, and all eight bl targets) with no automated family workspace. The m2c workbench (`compiler workbench`) could not run for this owner: its symbolize step reads the assembler's listing output as UTF-8 and the retained asm's two-line Japanese header comment (shared verbatim by 16 other 'call-graph gap' owners, e.g. games/gs1/asm/08094154.s) gets corrupted into invalid UTF-8 by the assembler's listing pass, which fails `__workbench-step symbolize` outright before m2c ever runs. Confirmed via a direct read of the generated out/workbench/08078ee8/target/target.lst: the multi-byte UTF-8 sequence is corrupted at byte 117, independent of any candidate content. This looks like a pre-existing tool limitation affecting every owner sharing that header comment, not something specific to this draft. Did not modify the retained assembly to work around it. Proceeded directly with candidate-show against the hand-derived draft instead, which is unaffected (it assembles/objdiffs without going through the listing-based symbolizer).","Callee identification, all from already-adopted or already-registered evidence in this repo: Func_08077394=Owner_GetState (games/gs1/include/owner_state.h; its own dossier: 'one of eight resident owner-state records, or one of six optional remote records for owner ids 0x80 through 0x85' -- matches this owner's two loops exactly, 0..7 then a remote-id list). Func_08078588=Inventory_Add and Func_08078708=Inventory_Equip, both prototyped s32(s32 owner, s32 item/slot) in games/gs1/include/inventory.h and used with an identical (owner, item&0x1ff)/(owner, returned slot) idiom in the already-adopted games/gs1/src/inventory/add.c. Func_08079ae8=Owner_RefreshDerivedData, already adopted at games/gs1/src/owner/refresh_derived_data.c, called with a bare owner id exactly as here. Func_08077428 declared void(s32 owner) in three already-adopted/near-adopted sibling call sites (games/gs1/src/inventory/equip.c, games/gs1/recon/en/main/0807a664.c, games/gs1/recon/en/main/08079460.c) -- reused verbatim. Func_08015020 declared void(s32, u16*) and used for exactly this 'decode text into a u16 buffer, copy low bytes into a <=14-char field, then clear a trailing flag byte' pattern in the already-adopted games/gs1/src/party/update_name_entries.c; reused verbatim.","Struct field evidence: inventory[15] at 0xd8 and class_id at 0x128 reuse the existing LAYOUT_OFFSET_GUARD-backed offsets from games/gs1/include/owner_state.h (struct OwnerInventoryState) -- both offsets and both field roles matched the retained assembly's own stores independently before this struct was consulted. name[14]/name_flags (0x00/0x0e) and hp_ratio/pp_ratio (0x14/0x16) are not yet guarded in that shared header, so -- following the same-project precedent already set by games/gs1/src/owner/refresh_derived_data.c and games/gs1/recon/en/main/08079460.c, both of which define their own private local struct over the same OWNER_STATE_SIZE record rather than editing the shared header -- this draft defines its own local struct OwnerRecordState with those fields plus unknown_ padding, rather than extending owner_state.h. The name/name_flags/hp_ratio/pp_ratio names and offsets are corroborated (not just guessed) by games/gs1/recon/en/main/08079460.c (BattleUnit_Assign, a measured-draft, not itself exact): it zero-inits the identical 332-byte (OWNER_STATE_SIZE) record through the same Owner_GetState allocator and sets two fields to the identical 0x4000 constant at these exact byte offsets (hp_ratio@20, pp_ratio@22), and its name[14]+name_flags@14 layout matches this owner's copy-loop bound (indices 0..13) and its always-zeroed byte at offset 14 exactly. Treated as corroborating evidence, not proof, since that sibling itself is not exact.","The Data_0807b690 literal-pool address (an s32, -1-terminated id array, walked by +4 each iteration) does not appear anywhere else in games/gs1/src, games/gs1/recon, or games/gs1/include -- first attestation of this address in the repo. Declared `extern s32 Data_0807b690[];`, matching this project's existing Data_[] convention for unresolved data (e.g. games/gs1/recon/en/main/0807a664.c's Data_02001078/Data_02000240).","Registered the name Owner_InitRecords in games/gs1/source-paths.json as a name-only override (retain-a-name-without-exact-C form, matching the existing precedent at main:08079460/BattleUnit_Assign) and added the matching '.global Owner_InitRecords' alias line to games/gs1/asm/08078ee8.s per CONTRIBUTING; `check owners` passes clean (1106 named main assembly owners, 0 provisional/sealed/drafts errors).","candidate-show --align --size 284: differing_halfwords=134 -> 70, wrong_instructions=74 -> 26, matched_prefix=6 -> 14 instructions over three real fixes: (1) moved `s32 *remote = Data_0807b690;` to the top-of-function declaration (matching the reference's literal-pool load of that address into r8 before the first loop even starts, rather than deferring it to where it's first used) so the compiler hoists the address load into the entry block exactly where the reference has it; (2) declared name_buf `volatile u16 name_buf[16]` -- the reference re-reads the same message-buffer halfword twice (once to store the truncated byte, once immediately after for the following zero-test) at both occurrences in the name-copy loop, which this compiler's default local redundant-load elimination collapses into a single cached load + a `lsls #16`+cmp zero-test idiom unless the location is volatile; volatile reproduces the reference's genuine double-load exactly at both sites. This mirrors owner_state.h's own already-adopted, evidence-backed `volatile u8 class_id` field, so it is not a novel forcing device for this codebase. (3) confirmed (not changed) that games/gs1/include/inventory.h's existing Inventory_Add/Inventory_Equip prototypes and games/gs1/include's Owner_GetState/Owner_RefreshDerivedData macros were the right calls to reuse verbatim.","Residual after those fixes (three distinct, already-catalogued backend floors, all confirmed non-reachable by source respelling with 2-3 independent tries each that produced byte-identical output): (a) the owner+102 message-id computation -- reference materializes 102 via a fresh literal-pool load then a 3-operand register add (`ldr r0,[pc,#N]; adds r0,r6,r0`), this compiler instead copies r6 into r0 then does an 8-bit-immediate `adds r0,#102` (cheaper encoding, no pool slot). Tried: operand order swap (`owner+102` vs `102+owner`, canonicalize identically), an explicit `(u16*)name_buf` cast on the call argument, and hoisting the sum into its own `s32 msg_id` local assigned in a separate statement -- all three byte-identical to each other and to the original. Costs exactly one missing 4-byte literal-pool word, which cascades a uniform +4 byte offset through every later branch target and pool slot for the rest of the function (visible in the diff as a long run of otherwise-matching `beq`/`bl` lines whose only difference is the target address) -- i.e. most of the 70 differing halfwords are this single 4-byte hole propagating forward, not independent defects. (b) the 13-iteration equip loop (`for(i=0;i<=12;i++)`) compiles here as a descending trip counter (r5: 12->0, `cmp r5,#0;bge`) once the array index is strength-reduced to the r6 pointer increment, whereas the reference keeps an ascending counter (r5: 0->12->13, `cmp r5,#12;bls`) matching the untouched first (name-copy) loop's style. Tried: rewriting as an explicit do-while with the increment at the loop's end, and with the increment moved mid-body (between the Add and Equip calls, matching the reference's own instruction order exactly) -- both byte-identical to the natural for-loop. Also tried giving the loop a dedicated counter variable distinct from the outer `i` (hypothesis: pseudo-register numbering) -- this made the whole function measurably worse (differing_halfwords 70->94, matched_prefix 14->7) by perturbing unrelated register allocation, so it was reverted rather than kept. (c) two `ldrh r3,[Rn,Rm]` register-indexed loads in the name-copy loop's inner body encode the base/offset register roles swapped from the reference (`[r1,r0]` here vs `[r0,r1]` there) -- identical effective address, different instruction bytes; not attempted further given (a) and (b) are the larger, already-well-characterized class this project's other dossiers (games/gs1/recon/en/dossiers.json#main:08077394, 080c0cec.json) document as GCC 2.95/2.96 backend constant-materialization and induction-variable role choices that ordinary C respelling does not reach without forcing register assignment or scheduling, which CONTRIBUTING prohibits.","Adoption gate not met: differing_halfwords=70, not 0. No exact bytes claimed; games/gs1/asm/08078ee8.s remains the retained/authoritative owner and is unchanged except for the added `.global Owner_InitRecords` export line plus the matching `Owner_InitRecords:` alias label immediately above `Func_08078ee8:` (both required for `build-full`'s linker to resolve the new export rather than treat it as an unresolved external symbol, matching the two-label pattern already used by main:08079460/main:080c0cec). This draft-only pass did not refresh the optional family, twin, correspondence, coverage, or progress reports, consistent with this repository's existing practice for other not-yet-exact draft-only commits (e.g. commit de6215206 on 080c0cec touched only its recon .c/.json).","measured=2026-08-29: further pass on top of the previously-adopted three-fix state (dh=70) found a new, previously-untried source lever distinct from the already-refuted equip-loop DIRECTION hypothesis (ascending vs descending counter, refuted above): the loop SENTINEL FORM. Rewriting the zero-inventory loop bound from `for(i=14;i>=0;i--)` to `for(i=14;i!=-1;i--)`, and the equip loop bound from `for(i=0;i<=12;i++)` to `for(i=0;i!=13;i++)` (semantically identical trip counts, `!=` sentinel instead of `>=`/`<=`), changed this compiler's backend induction-variable/branch-condition codegen to match the reference exactly at both sites, taking differing_halfwords 70->33 and wrong_instructions 26->24, with candidate_bytes now exactly 284 (matching reference size) and matched_prefix improving from 14 to 6-instruction-equivalent alignment further into the function body. Kept (not reverted): strict improvement with no regression elsewhere in the function body, confirmed by repeated `candidate-show --align --first`. Residual 33 halfwords are the same already-catalogued (a)/(c) floor from the prior pass -- owner+102 message-id materialization (reference uses a fresh literal-pool load + 3-operand add; this compiler always folds the immediate into an 8-bit `adds`) and the two `ldrh [rN,rM]` base/offset-swapped loads in the name-copy inner loop -- both re-confirmed non-reachable by source respelling in this pass with additional independent tries (volatile local, u8/u16/s32 casts on the sum, operand-order swap `102+owner`, an extra block-scoped `msg_id` local, a top-of-function `msg_id` local, `static const`/`static volatile const` `kOwnerMessageBase` globals, and a commutative `i[name_buf]` array-indexing rewrite of the two flagged `ldrh` sites) -- all either byte-identical to the pre-fix state or measurably worse; none reached the reference bytes. Sentinel-form changes to the OTHER two loops in the function (name-copy inner do-while bound `i>13` -> `i==14`, and the outer owner loop `owner<=7` -> `owner!=8`) were also tried, alone and combined with the two adopted fixes, and made results worse (dh 33->35/36/37) or neutral -- not adopted. Roughly 45 scored variants tried in this pass across msg_id computation, loop sentinel forms across all four loops, pointer-arithmetic rewrites of the name-copy accesses, statement reordering, and defensive casts. Adoption gate still not met (dh=33, not 0); games/gs1/asm/08078ee8.s remains retained/authoritative and unchanged by this pass.","Recovered only from retained owner assembly (games/gs1/asm/08078ee8.s), already-adopted in-repository source (games/gs1/src/inventory/add.c, games/gs1/src/inventory/equip.c, games/gs1/src/owner/refresh_derived_data.c, games/gs1/src/party/update_name_entries.c), already-registered project headers (games/gs1/include/owner_state.h, inventory.h, types.h), one measured-draft sibling for corroborating field evidence only (games/gs1/recon/en/main/08079460.c, itself not exact), the generated family report's recorded score, and the approved compiler (candidate-show). No GS2 evidence, external source, other decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-31 retained-assembly proof: cross-edition verification proves all 232 relocation-normalized core bytes identical across six editions. The complete 284-byte candidate accounts for both owner loops, every call, table, field, constant, and memory operation. Approximately 45 bounded source variants and the shipped scheduling, CSE, regmove, strength-reduction and optimization routes leave only equivalent message-base materialization, commutative indexed-load register roles, and loop-sentinel codegen. Structured assembly therefore remains authoritative under owner_initialization_compiler_materialization_module; the candidate does not claim exact C."]},"main:08079460":{"schema_version":1,"namespace":"main","address":"0x08079460","status":"measured-draft","owner_bytes":412,"executable_owner_bytes":410,"candidate_bytes":400,"differing_halfwords":192,"wrong_instructions":205,"structural_score":{"match_percent":69.71066,"instructions":218,"unchanged":75,"argument_mismatches":83,"opcode_mismatches":4,"replacements":9,"deletions":28,"insertions":21},"family":{"direct_recalculation_owner":"main:08077428","direct_recalculation_owner_bytes":2024,"aggregate_reusable_bytes":2436},"cross_edition":{"core_bytes":378,"derived_edition_core_diff_bytes":2,"core_identical":false,"starts":{"ja":"0x0806f460","en":"0x08079460","de":"0x0807d260","es":"0x0807e460","fr":"0x0807e460","it":"0x08079460"}},"notes":["Complete typed implementation behind the BattleUnit_Assign public veneer. It validates the unit and definition IDs, clears the unit record, copies the 84-byte definition's base stats and AI fields, builds the localized display name, expands four ability groups into fifteen slots, initializes equipment, and invokes the unit-stat recalculation owner.","The readable model compiles to 400 bytes against 410 executable reference bytes (412 including alignment). Its broad 69.71 percent structural score claims zero bytes; it is retained as reusable semantic evidence rather than forced through random source shaping.","Independent differential matching locates the same owner uniquely in all six GS1 editions. JA supplies a 378-byte normalized core; EN, DE, ES, FR, and IT each differ in only two core bytes, establishing a narrowly bounded regional compiler/source variant rather than falsely claiming six-ROM identity.","The direct 2,024-byte BattleUnit_Recalculate consumer makes this a coherent 2,436-byte assignment/recalculation family. Existing exact-C item-definition, localized-name, equipment, and ratio-update code supplied the local layout and source-shape analogues.","Recovered only from retained GS1 assembly, exact local GS1 analogues, the approved compiler, and all six local GS1 editions. No GS2 or external source was used."]},"main:08079b24":{"schema_version":1,"namespace":"main","address":"0x08079b24","status":"measured-draft","owner_bytes":160,"candidate_bytes":160,"differing_halfwords":71,"wrong_instructions":106,"classification":"lookup-descending-curve-value","domain":"Clamps an input to a five-point descending table, linearly interpolates the corresponding value, optionally halves it with signed rounding toward zero, and adds 0x100.","notes":["This complete ordinary-C reconstruction accounts for the two signed clamp bounds, five-point search, terminal-point case, signed linear interpolation through FixedPoint_Ratio, optional halving, and final 0x100 bias.","Keeping separate scan_offset and offset carriers is evidence-bearing rather than score decoration: the retained owner advances one carrier and copies it into the selected-knot carrier before testing the next point. Restoring that distinction recovers the reference's table/mode prologue and raises the candidate from the first 144-byte merged-carrier draft to 156 bytes.","Recovering the tail as a two-case switch restores the reference's distinct mode-zero and mode-one guards, exact 160-byte extent, literal-pool position, and six-instruction matching prefix. This strictly improves the candidate from 156 bytes / 74 differing halfwords to 160 bytes / 71 differing halfwords without changing its behavior.","The current router reports structural_topology with 71 differing halfwords and 106 wrong instructions. GCC's allocation dump shows the remaining leading cascade begins when clamped is coalesced with incoming r0 and the constant-five carrier takes r6, opposite the reference. Reusing the parameter as the count, a natural for/while loop, and an explicit one-backedge label layout all regress or preserve the residual and were removed. This candidate is not byte exact, claims zero DONE bytes, and leaves retained assembly authoritative.","The semantic name is limited to the locally proved descending-table interpolation behavior. The callers remain unidentified, so no battle, field, character, or story role is inferred.","Recovered only from games/gs1/asm/08079b24.s, its approved local ROM bytes, the approved GCC route, in-repository FixedPoint_Ratio declarations, local callers, and the repository-generated m2c workbench for this owner's own bytes. No external decompilation or target-specific source was used."]},"main:0807a664":{"family":"template-main-08078708","template_owner":"main:08078708","template_source":"games/gs1/src/inventory/equip.c","candidate_path":"games/gs1/recon/en/main/0807a664.c","reference_bytes":316,"best_candidate_bytes":308,"best_differing_halfwords":151,"best_wrong_instructions":159,"status":"measured-draft","notes":["Template (Inventory_Equip) does not match this owner at all -- weak cluster match. Read games/gs1/asm/0807a664.s directly: this is a party-wide inventory sanitation pass gated by a sentinel check on Data_02001078[0] (proceeds only if it already equals 0x6774, then re-stamps it), guarded by an unusual save/restore of two u16 values read from Data_02000240+0x220/+0x222 before the work and re-emitted (alongside two more reads from Data_02000240+0/+2) into a growing buffer at Data_02001078+2 that accumulates 2 bytes per inventory slot across ALL FOUR owners (0..3): for each owner, OwnerState_Get(owner)->inventory[0..13] is first copied out into that shared buffer, then each of the 14 slots is looked up via Func_08078414 and cleared to 0 unless its type byte (offset 2) equals 6, then the SAME 15-slot compact-non-zero-then-zero-fill algorithm documented in main:080788c4's dossier (Inventory_Remove) is run in place on inventory[0..14], and finally Func_08079ae8(owner)/Func_08077428(owner) are called before moving to the next owner. After all four owners, the two saved u16 values plus two more fields from Data_02000240 are appended to the same growing buffer, then Func_0807a628(0,16) and Func_08079358(0x02000438) are called. The whole function ends by unconditionally calling Func_0807808c(1) whether or not the sentinel check passed.","This is a large, multi-part owner (316 bytes, 7 saved registers, a nested owner-loop containing the same compaction algorithm as 080788c4 run per-owner, plus save/restore bookkeeping around it) worked as one best-effort direct-translation pass given the batch's per-owner budget, not iterated to convergence. The pass compiles and is roughly the right size (308B vs 316B) but wrong_instructions=159 out of roughly 154 total instructions -- i.e. more than half disagree, so this should be read as a structural sketch rather than a close candidate.","Specific known weaknesses in the current draft: (1) the exact semantics of the buffer being built at Data_02001078+2 (a 'growing pointer that survives the whole outer loop, incrementing by 2 per inventory slot across all four owners plus a few trailing fields') is inferred from the assembly's r8 register never resetting between owners, but the surrounding purpose (some kind of trade/transfer snapshot?) is not confirmed; (2) the two saved values (from Data_02000240+0x220/+0x222, read BEFORE the owner loop and written AFTER it) are modeled as plain locals, which is probably right but their meaning is unconfirmed; (3) whether Func_08078414's return value is genuinely dereferenced at byte offset +2 the same way as in 080788c4's sibling functions, or points to a different struct, is assumed rather than verified against a header.","Given the size of the gap, the most useful next step is treating this as a fresh, patient full pass (ideally re-deriving the r8-accumulator idiom and the sentinel-gated save/restore precisely) rather than incremental respelling from this draft."]},"main:0807a7a0":{"schema_version":1,"namespace":"main","address":"0x0807a7a0","status":"proven-retained","classification":"inventory_snapshot_compiler_entry_exit_scheduling_module","owner_bytes":136,"score":{"measured":"2026-08-31","candidate_bytes":136,"reference_bytes":136,"differing_halfwords":55,"wrong_instructions":14,"class":"structural-topology","command":"compiler candidate-show games/gs1/recon/en/main/0807a7a0.c --owner 0x0807a7a0 --size 136 --align","note":"The drafting-wave m2c source advanced both u16 pointers by two elements per copy. Restoring ordinary post-increment copies, the shared snapshot/party layouts, and the input parameter reused as the sentinel carrier recovers the complete algorithm and exact owner size. Initializing the owner induction value before the guard selects the reference's source=r5/owner=r6 allocation and reduces wrong instructions from 76 to 14."},"remaining":[{"op":"recover sentinel and induction scheduling","count":14,"where":"The reference loads the sentinel, moves it to ip, advances source, compares through ip, and only then materializes owner=0. The closest candidate schedules the literal and owner zero before the load and compares r3 directly. The loop body is otherwise instruction-for-instruction equal; the tail differs only in ordering the final active-owner-pair store and snapshot-sentinel clear."}],"rejected_experiments":[{"experiment":"Initialize owner only inside the sentinel branch, including do/while, for-loop, and comma-condition spellings.","result":"Preserved equal topology but swapped source and owner between r6/r5, regressing to 48 wrong instructions."},{"experiment":"Run the annotation-free allocator permuter for the decoded floor.","result":"The decoder reported no unique source repair for the remaining sentinel carrier and refused to open an unbounded search."},{"experiment":"Probe canonical scheduling/CSE/regmove/loop/peephole/force-address flags and the alternate compiler routes.","result":"No route closed the owner. -fno-schedule-insns2 reached 45 differing halfwords but kept the same 14 wrong instructions with worse scheduling elsewhere; canonical flags remain the honest route."},{"experiment":"Use the companion translation unit's raw Data_02000240 byte-array declaration instead of the established mode struct.","result":"GCC folded the four party offsets into independent absolute addresses, shrinking to 120 bytes and regressing to 46 wrong instructions."}],"notes":["Recovered from games/gs1/asm/0807a7a0.s, the approved local ROM, the drafting-wave candidate, the adjacent inventory snapshot builder at 0807a664, and established Owner/Psynergy/game-flag interfaces.","The function restores 15 inventory halfwords for each of four owners, refreshes derived owner state, restores two Psynergy shortcuts and two packed active-owner pairs, clears the snapshot sentinel, and clears game flag 0x952.","2026-08-31 retained-assembly proof: cross-edition verification proves all 106 relocation-normalized core bytes identical across six editions. The complete candidate has the exact 136-byte audited extent and exact pool, and accounts for the sentinel guard, four-owner 15-halfword restore loops, both derived-state refreshes, four global halfword restores, sentinel clear and game-flag clear. The restore body is instruction-exact. Only the sentinel/owner-zero entry schedule and ordering of the final active-owner-pair store versus sentinel clear differ. The decoder finds no unique repair; guarded do-while, for, comma-condition, translation-unit declaration, side-effect-order, scheduling, CSE, regmove, loop, peephole, force-address and alternate compiler routes preserve the 55/14 floor or regress. Structured assembly therefore remains authoritative under inventory_snapshot_compiler_entry_exit_scheduling_module; the candidate does not claim exact C."]},"main:0808b158":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0808b158","status":"proven-retained","classification":"battle_resource_lookup_compiler_allocation_module","owner_bytes":128,"score":{"measured":"2026-08-31","candidate_bytes":128,"reference_bytes":128,"differing_halfwords":21,"wrong_instructions":18,"class":"structural-topology","note":"The best ordinary-C draft has exact owner extent and models the complete table search. A bounded closure pass confirmed the 21-halfword residual is coupled: the reference creates the null return carrier before the helper call in r8 and assigns effect_id/condition/resource_group to r7/r6/ip, while the best legitimate source assigns those roles to r6/r8/r7 and keeps the null carrier in lr. Moving the null initialization before the call worsens the result to 132 bytes and 63 differing halfwords by introducing r10; introducing an explicit signed entry-id carrier worsens it to 116 bytes and 61 differing halfwords by selecting ldrsh; unsigned and 32-bit carrier variants score 128/51 and 124/54. The decoder reports no unique source-shape repair plus one guard inversion; spelling that inversion explicitly recompiles byte-identically. Six-edition verification proves the 118-byte relocation-normalized core identical. Structured assembly therefore remains authoritative under battle_resource_lookup_compiler_allocation_module; the candidate does not claim exact C."},"behavior":["calls Func_0808a8d0(effect_id) once to obtain the alternate resource-group key","walks the 8-byte entries at 0x0809ddd8 until the signed id field is -1","uses entry bit 15 to choose whether the id must match effect_id or the derived resource group","treats the signed 15-bit condition value -1 as a wildcard and otherwise requires it to equal the second argument","returns the first matching entry's pointer, or null when the terminator is reached"],"notes":["The adjacent measured 0808b090 dossier identifies this owner as its parameterized twin and the exact in-repository Func_0808b1d8 as the simpler terminated-table family member. Those sources corroborate the entry stepping, -1 terminator, first-match behavior, source-selector flag, signed 15-bit condition, and wildcard semantics independently of this draft.","One targeted correction was permitted after the initial score: the selector branch was rewritten with an explicit shared match label to follow candidate-show's guard-inversion advice. GCC emitted byte-identical output (128 bytes, 21 differing halfwords, 18 wrong instructions), so the rewrite was reverted and the clearer structured form retained. Do not retry that spelling without new compiler evidence.","The bounded closure pass also tested the decoder-implicated declaration/lifetime forms rather than an open-ended spelling search: null-result initialization before Func_0808a8d0 (including separate declaration/assignment and register storage-class forms), local aliases introduced condition-before-effect, an old-style declaration list ordered condition-before-effect, an integer result carrier, and explicit signed, unsigned, and 32-bit entry-id carriers. None improved on 128 bytes / 21 differing halfwords; the pre-call result forms expanded the saved-register set and the explicit entry-id forms changed the correct ldrh-plus-sign-extension idiom. The source therefore remains the best legitimate condition-table reconstruction, with no compiler-route, register, or scheduler forcing.","Recovered only from games/gs1/asm/0808b158.s, adjacent in-repository family sources and dossiers, and the approved compiler's candidate-show output. No external decompilation source, raw instruction-byte copying, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:0808b674":{"schema_version":1,"namespace":"main","address":"0x0808b674","status":"compiler-unemittable","map":{"head":"0x0808b674","head_symbol":"FunctionHead_0808b674","head_file":"games/gs1/asm/0808b674.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r10; mov r6,r8; push {r6,r7} -- two-high-register save (r8, r10 only), no `sub sp` (no local frame beyond the pushed registers).","true_epilogue":{"file":"games/gs1/asm/0808b7b8.s","note":"Ends `... pop {r3,r5} / mov r8,r3 / mov r10,r5 / pop {r5,r6,r7} / pop {r0} / bx r0`. Exact mirror of the head's two-high-register (r8,r10) save shape with no matching `add sp` (consistent with the head's no-`sub sp` prologue -- this function uses no stack-frame locals beyond its saved registers). This is the sole real epilogue, completing the map that this dossier's original 2026-08-29 session left partial (it had registered the split-function shape and the fall-through into Fragment_0808b7b8 as a hypothesis but had not yet confirmed the epilogue mirror or computed the whole-function span)."},"span":{"start":"0x0808b674","end_exclusive":"0x0808b868","size_bytes":500,"derivation":"end = start of next asm file games/gs1/asm/0808b868.s, immediately following 0808b7b8.s which owns the epilogue. size = 0x0808b868 - 0x0808b674 = 0x1f4 = 500."},"member_regions_in_order":[{"addr":"0x0808b674","symbol":"FunctionHead_0808b674","file":"games/gs1/asm/0808b674.s","role":"real prologue + object-table slot setup body, tail branches `b sub_0808b7c4` -- NOTE: this tail branch target (0808b7c4) is an internal label inside 0808b7b8.s, not a separate owner; it is not main:0808b7c4 as a registered file boundary"},{"addr":"0x0808b7b8","symbol":"Fragment_0808b7b8","file":"games/gs1/asm/0808b7b8.s","role":"shared terminal fragment (header: '親関数の共有終端断片'), reached by the head's tail branch at its internal .L_0808b7c4-equivalent entry point, ending in the real, shared epilogue"}],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/0808b674.c --owner 0808b674 --size 500"},"owner_bytes":324,"candidate_bytes":36,"differing_halfwords":162,"wrong_instructions":151,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Best-effort reading only (never adopted, see status): an object-table slot initializer. Reads the pointer stored at Data_03001ebc (a base pointer, per the sibling object/table/*.c family), takes state = base + 0x200 as an object slot, zero-fills state's leading 16 bytes (offsets 0/4/8/12, descending store loop matching the object/table/find_last_active_id.c convention of decrementing counters/pointers), copies two 24-byte template blocks from a literal-pool-addressed source into state+0x0 and state+0x218, calls ObjectTable_ClearBattleSlots (main:0808b9f8, already adopted as object/table/clear_battle_slots.c), stores two 16-bit fields into the new slot, looks up several values from an array at literal-pool address 0x02000240 indexed by small even offsets (476/484/488/492 => ids 238/242/244/246 doubled), stores them into the slot, calls sub_0808b3ec twice (once with the slot pointer, once with r10=arg0 and constant 8), reads a per-id table entry via the slot's field_10 to compute a byte flag, does a signed-shift coordinate computation (asrs #20 on two fields at slot+8/slot+16, matching a Q20 fixed-point convention seen elsewhere in this codebase) to index a 2D grid at a literal-pool base, gates on a byte-flag pair (== 253) and a global flag word before calling sub_080091a8 with a coordinate offset, updates slot fields 12/20 from its result, writes a byte constant into slot+85, calls sub_080091e0 and sub_08009080(slot, 12), then falls through into a tail branch `b sub_0808b7c4` into a *different* owner's already-emitted region.","evidence":["games/gs1/asm/0808b674.s carries the authored comment '複数領域に分割された呼出し可能関数の先頭部。後続するリテラルプールを同一ファイルに保持する。' (head portion of a callable function split across multiple regions; the following literal pool is kept in the same file) -- this is the project's own structural classification of the retained assembly, not an inference from this session.","The retained assembly's prologue pushes {r5, r6, r7, lr} and shuffles r8/r10 into r6/r7 to push them too (push{r6,r7}), but the function has no matching pop anywhere in its 324 owned bytes: it falls through its body and its final instruction is a plain unconditional `b sub_0808b7c4` (main:0808b7c4, an already-registered separate owner, 'Fragment_0808b7b8's neighbour) rather than a `bl`/`bx lr`. This is the classic GCC-emitted 'function head' shape for a routine whose tail was placed in a later, separately-addressed region by the linker/overlay layout -- an artifact of how this ROM's build process split large functions across sections, not of any C control-flow construct this compiler route can produce from a single translation unit.","candidate-show (out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/0808b674.c --owner 0808b674 --align --first) reports topology=uncovered:reference-multiple-owner-entries and class=compiler-unemittable for every body tried, with an identical differing_halfwords=162 against the 324-byte reference regardless of candidate content or size (2, 8, 36, and 76-byte candidates of varying shape and semantics all produced dh=162; only wrong_instructions moved slightly, 151/154/151/182, tracking incidental prologue-size differences in the small comparison window the tool is willing to score before giving up). This reproducibility across structurally unrelated bodies is the classification proof: the harness itself cannot align this owner's reference bytes to any single-function candidate because the true 324-byte reference span (0808b674 code + its retained literal pool at 0808b790, ending exactly at 0808b7b8) abuts a second, independently registered owner boundary (main:0808b7b8, 'Fragment_0808b7b8') that this owner's tail branch flows into -- a genuine multi-region function, which this project's per-owner C candidate model cannot represent.","The tool's own next-step guidance on this run is explicit: 'next=record a classification proof; do not search spellings for a shape the compiler cannot emit' / 'triage=compiler-unemittable playbook=classification-proof' -- confirming this is the documented terminal state for this shape, not an intermediate score to keep optimizing.","The neighboring object/table/*.c family (games/gs1/src/object/table/{get,get_slot_address,destroy_at_index,find_last_active_id,clear_battle_slots}.c) establishes 'extern u8 *Data_03001ebc' as the shared object-table base pointer and 'descending index/pointer store loop with >= sentinel' as this codebase's idiom for zero-fill loops, both used in the best-effort algorithm reading above; ObjectTable_ClearBattleSlots (main:0808b9f8) is confirmed as the callee at the `bl sub_0808b9f8` site by games/gs1/source-paths.json's existing 'object/table/clear_battle_slots.c' registration.","bun tools/allocator-lens/lens.ts 0808b674 was run for allocation residual context: it reports only 9 pseudos and a small 42/36/40 global order for the stub-sized candidate actually compiled (the topology block prevents any larger candidate from being meaningfully scored against the true reference), confirming the remaining work here is topological/structural, not a register-allocation residual."],"credible_shapes_tried":["Empty stub `void Func_0808b674(u32 arg0) {}` (candidate=2 bytes): dh=162, wrong_instructions=151, topology=uncovered:reference-multiple-owner-entries. Baseline.","Same stub plus a second empty `void Func_0808b7b8(void) {}` in the same file, hypothesizing the tool wants both halves of the multi-owner span declared together: candidate-show ignored the second function entirely (identical output to the single-stub baseline) -- refuted; the tool only ever scores the named --owner target function, so co-declaring the neighbor owner does not change the topology classification.","`void Func_0808b674(void) {}` with no arguments (candidate=2 bytes): identical dh=162/wrong_instructions=151 to the u32-argument stub -- refuted the hypothesis that the arg0/r0-using prologue shape (mov r10,r0) was the source of the topology mismatch.","`s32 Func_0808b674(u32 a, u32 b, u32 c, u32 d) { return a+b+c+d; }` (candidate=8 bytes, forces a 4-argument prologue): dh=162 (unchanged), wrong_instructions=154 -- refuted the hypothesis that matching argument count/calling convention shape would affect the topology block.","`volatile` 7-local arithmetic filler forcing heavier register pressure (candidate=76 bytes, closest in size to plausible real bodies): dh=162 (unchanged), wrong_instructions=182 -- confirms wrong_instructions tracks incidental candidate/reference-window overlap size while dh stays pinned at 162 regardless, i.e. the comparison never actually reaches an aligned score for the real function body.","Full best-effort semantic reconstruction (struct-based object-table slot zero-fill + ObjectTable_ClearBattleSlots call, the version now committed in this .c file, candidate=36 bytes): dh=162 (unchanged), wrong_instructions=151 -- confirms even a plausible, on-topic reconstruction of the real algorithm's opening lines cannot move past the topology gate, because the gate fires before content comparison is meaningful (the reference span crosses into a second owner's bytes that this file cannot also own)."],"compiler_backend_evidence":"Not applicable at this stage: the run never reaches instruction-selection/allocation comparison for the true reference window. topology=uncovered:reference-multiple-owner-entries fires first and is stable across every distinct candidate shape and size tried (2/8/36/76 candidate bytes, four unrelated bodies), which is the tool's mechanism for reporting that a --owner target's registered 324-byte reference extent cannot be matched one-to-one against a single compiled C function because it structurally overlaps a second, independently addressed owner boundary (main:0808b7b8) that this function's un-popped prologue and terminal `b sub_0808b7c4` tail branch flow into. This is consistent with the .s file's own authored comment identifying the owner as 'the head portion of a callable function split across multiple regions.'","remaining":"This owner is classified compiler-unemittable, not a stalled last-mile allocator/scheduling residual: no C source shape reconstructable by this session moved differing_halfwords off 162 or changed the topology=uncovered:reference-multiple-owner-entries / class=compiler-unemittable classification, because the defect is structural (a genuinely multi-region function whose registered reference bytes span two separately addressed owners) rather than an algorithm, type, or spelling defect. games/gs1/asm/0808b674.s remains the retained ground truth and should stay retained assembly; per CONTRIBUTING.md's 'genuinely structural assembly such as a veneer, alignment, or runtime primitive' carve-out, a split-region function head with no intra-owner pop is exactly this kind of case. No further spelling search is expected to change this outcome per the tool's own playbook guidance; future work on this owner should instead investigate whether the reconstruction harness can register a paired multi-region owner (linking main:0808b674 through main:0808b7b8 as one compiled unit) rather than continuing to vary candidate C source.","notes":["make verify was not run to completion/adoption: this owner is not DONE and dh != 0. This file and its .json record a measured, reproducible compiler-unemittable classification, not a finished reconstruction.","No inline assembly, fixed-register variable, compiler barrier, forced instruction scheduling, copied instruction bytes, or compiler modification was used anywhere in this session. games/gs1/asm/0808b674.s remains the retained ground truth and was not edited.","games/gs1/recon/translation-units.json and games/gs1/source-paths.json were read only, per task instructions; neither was edited.","Six materially distinct scored candidates were run through candidate-show (see credible_shapes_tried), each confirming the identical topology-level block; per the tool's own explicit guidance ('next=record a classification proof; do not search spellings for a shape the compiler cannot emit', 'triage=compiler-unemittable playbook=classification-proof') and per reconstruction-method.md's inversion guidance ('do not spend an open-ended search on a tiny residual' / large, structural mismatches 'challenge the overall source shape' rather than invite more spelling permutations), further mechanical spelling attempts were not pursued past this point -- the blocking condition is a fixed data-topology fact (a reference span crossing two registered owner boundaries) that no candidate C body can change.","measured=2026-08-29"]},"main:0808b868":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0808b868","status":"proven-retained","classification":"field_region_bounds_compiler_address_materialization_module","owner_bytes":128,"score":{"measured":"2026-08-31","candidate_bytes":128,"reference_bytes":128,"differing_halfwords":17,"wrong_instructions":10,"class":"missing-extra-code","note":"The complete ordinary-C reconstruction has exact extent and equal branch topology. A named coordinate-carrier correction reduced the residual from 23 differing halfwords / 14 wrong instructions to 17 / 10. The allocator decoder reports no unique source-shape repair, and a bounded sibling-guided search did not improve the result. The remaining difference is concentrated in when GCC materializes runtime+236/runtime+244 and their register roles; this draft claims zero DONE bytes."},"behavior":["reads the current runtime pointer from 0x03001e70 before calling Func_080770d0(356) and Func_080770c8(357)","walks 24-byte boundary records until the signed id field is -1","leaves records whose flag field is already nonzero unchanged","assigns flag 356 when x lies inclusively between runtime fields +236/+244 and z lies inclusively between +240/+248","assigns flag 357 when any of those four bounds checks fails"],"notes":["The address-adjacent exact BattleEffect_ClearOutOfBoundsObjects owner corroborates the same runtime family and the compiler-sensitive practice of loading coordinate carriers in their use order before a bounds chain.","The one permitted targeted correction introduced named x and z carriers before the four comparisons, matching the reference's early `entry+8` then `entry+16` loads. It preserved the 128-byte extent and equal topology while improving differing halfwords 23->17 and wrong instructions 14->10, so it was retained.","The allocator-order decoder identified conflicting pointer roles (pseudo 49 in r7 versus target r4, and pseudo 74 in r0 versus target r4) but returned `undecoded reason=no-unique-source-shape`; the annotation-free permuter therefore correctly refused to invent a repair.","A finite source-shape search tested the exact sibling's lifetime lesson as an explicit minimum-X carrier, both in the existing while loop and a guarded do-while spelling; both caused GCC to hoist three bounds pointers and regressed the residual. Raw byte-offset field access compiled identically to the retained typed aggregate. Direct global field access changed the frame and regressed substantially. An explicit outside-flag carrier compiled identically, while reversed comparison spelling changed branch directions. None improved on 17 differing halfwords / 10 wrong instructions, so all were reverted.","2026-08-31 retained-assembly proof: cross-edition verification proves all 114 relocation-normalized core bytes identical across six editions. The complete candidate has the exact 128-byte extent, equal topology and exact pool, and accounts for both flag calls, sentinel traversal, all four inclusive bounds tests, both assigned flags, and every field access. The residual is only GCC's equivalent early versus late materialization of runtime+0xec/runtime+0xf4 and their register roles. The decoder finds no unique repair; the recorded carrier, pointer, scalar, loop, global-access, comparison, sibling, scheduling, CSE, GCSE, regmove, strength-reduction, and optimization probes preserve the 17/10 floor or regress. Structured assembly therefore remains authoritative under field_region_bounds_compiler_address_materialization_module.","Recovered only from games/gs1/asm/0808b868.s, adjacent in-repository battle-runtime sources and dossiers, and the approved compiler's candidate-show output. No external decompilation source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used. The candidate does not claim exact C."]},"main:0808b8e8":{"schema_version":1,"namespace":"main","address":"0x0808b8e8","status":"exact","owner_bytes":164,"score":{"measured":"2026-08-30","candidate_bytes":164,"reference_bytes":164,"differing_halfwords":0,"wrong_instructions":0,"class":"exact","note":"The production source compiles to all 164 reference bytes with the shipped GCC 2.96 -fno-regmove route. Integration accepted the owner and retired its retained assembly."},"route_probe":{"measured":"2026-08-30","verdict":"exact adoption route","flags":"-fno-regmove","differing_halfwords":0,"wrong_instructions":0,"note":"RTL local-allocation evidence showed that the reference keeps the camera anchor live through construction of both X bounds before loading Z. Explicitly spelling that assignment order fixes the anchor/X allocation. Reusing the dead visual pointer for the final null store preserves the reference zero carrier. -fno-regmove then emits the complete reference schedule; canonical flags and other shipped toggles do not."},"notes":["The final source is ordinary C: it uses no inline assembly, fixed-register variable, compiler barrier, forbidden ABI attribute, copied instruction bytes, or compiler modification.","The lifetime repair was derived from GCC 2.96 RTL and allocator dumps rather than forced register assignment.","No other Golden Sun decompilation project, symbol map, or disassembly was consulted by this commit."]},"main:0808b98c":{"schema_version":1,"namespace":"main","address":"0x0808b98c","status":"measured-draft","owner_bytes":108,"retention":"c_candidate","domain":"Clear all battle-effect object slots and release the saved event object.","provenance":"Reconstructed from the retained owner assembly and the adjacent 0808b8e8 cleanup sibling; no external source was used.","score":{"measured":"2026-09-01","candidate_bytes":112,"reference_bytes":108,"differing_halfwords":50,"wrong_instructions":60,"branch_topology":"equal","class":"missing-extra-code"},"notes":["The retained assembly proves a complete 58-slot cleanup loop followed by three runtime-field clears and an optional event-object release.","A bounded source-shape pass tested named and implicit zero/mask carriers, declaration order, pointer-vs-integer zero, register hints, and the relevant optimization toggles. None reproduced the reference allocation; no fixed register or compiler barrier was used.","This candidate claims zero DONE bytes until a byte-exact build passes.","2026-09-01: 53 -> 50 differing halfwords. The loop-pass dump shows the constant 1 for the flag store is hoisted only because the loop body has exactly 15 real insns (threshold = 1 + n_non_fixed_regs = 15 with a call; the reference keeps movs r3, #1 inline). Writing the slot address as runtime + (i * 4 + 0x34) in a for loop raises the first pass to 17 and the second to 16 insns, which keeps the constant inline, but the giv then absorbs the runtime base into a pointer walk. Separating the offset (offset = i * 4 + 0x34; *(void **)(offset + work)) restores the reference's [r6, r5] addressing and, under -fno-rerun-loop-opt, scores 15 differing halfwords; on the canonical two-pass route the second pass drops to 15 insns and hoists the constant again. The reference therefore has one more loop insn than any spelling tried, or a different hoisting input; the mask/zero register roles (r8/sl) follow that decision."],"span_bytes":108},"main:0808d394":{"schema_version":1,"namespace":"main","address":"0x0808d394","status":"measured-draft","owner_bytes":148,"executable_owner_bytes":148,"candidate_bytes":128,"differing_halfwords":65,"wrong_instructions":88,"cross_edition":{"relocation_normalized_core_bytes":144,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08084394","en":"0x0808d394","de":"0x0809099c","es":"0x0809239c","fr":"0x0809239c","it":"0x0808d39c"}},"domain":"Searches the four runtime action-descriptor tables by direct identifier or by the ordinal assigned to identifiers above seven.","bounded_search":{"mode":"source-shape","attempted":3,"exact":false,"reason":"Rewrote both 'while (entry->id != -1) { ...; entry++; }' loops as guarded do-while ('if (entry->id != -1) { do { ...; entry++; } while (entry->id != -1); }') to force GCC's loop-rotation shape; also tried the gcc296 and old-agbcc compiler families on the resulting candidate. The rotation shape moved differing_halfwords from 70 to 65 (wrong_instructions 86 to 88, essentially a wash) but did not close the 20-byte/10-instruction size gap under any family: candidate stays 128 bytes against a 148-byte reference under routed and gcc296, and old-agbcc emits a still-shorter, unemittable-class 120-byte object."},"notes":["All 144 normalized core bytes are identical across the six approved GS1 editions.","The table count, 24-byte record stride, -1 terminator, and high-ID ordinal behavior come directly from the complete owner assembly. Zero DONE bytes are claimed.","Reference assembly shows each loop reads entry->id TWICE per new entry advanced to: once via ldrsh (sign-extended in one instruction) purely for the '!= -1' continuation test, and once via a separate ldrh+lsls+asrs sequence cached into a register for the NEXT iteration's value compare. The do-while respelling above matches reference's rotated control flow (guard, then post-tested body) but the compiler still CSEs the two reads of the same halfword into one instead of reproducing that double-read; this reads as a scheduler/CSE compiler-internals residual rather than a further source-shape gap, since the rotated C is already the natural idiom for the observed branch structure. Worth a permuter-style search over the loop body rather than further manual respelling."]},"main:0808df1c":{"schema_version":1,"namespace":"main","address":"0x0808df1c","status":"measured-draft","owner_bytes":348,"executable_owner_bytes":348,"candidate_bytes":344,"differing_halfwords":107,"wrong_instructions":82,"structural_score":{"match_percent":94.885544,"instructions":167,"unchanged":132,"argument_mismatches":26,"opcode_mismatches":0,"replacements":5,"deletions":3,"insertions":1},"family":{"exact_c_dispatcher":"main:08096810","exact_c_dispatcher_bytes":336,"aggregate_reusable_bytes":684},"cross_edition":{"core_bytes":316,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08084f1c","en":"0x0808df1c","de":"0x08091524","es":"0x08092f24","fr":"0x08092f24","it":"0x0808df24"}},"notes":["Complete typed nearby-target selector used by the exact-C battle-effect dispatcher for battle mode 9. It scans object IDs 0 through 66, rejects hidden or vertically distant objects, measures wrapped fixed-point X/Z distance, applies the flagged-object distance adjustment, and retains the closest object within the mode-dependent facing cone.","The readable model compiles to 344 bytes against the exact 348-byte owner. Relocation-aware structural comparison is 94.89 percent with no opcode mismatches; the remaining register-allocation and four-byte scheduling deficit is broad enough that this draft claims zero bytes.","Independent all-six matching proves a unique 316-byte normalized core in JA, EN, DE, ES, FR, and IT. Six call relocations and two literal fields account for the excluded fields; every edition has zero core differences.","Together with the exact 336-byte RunBattleEffect dispatcher, the recovered producer/consumer family covers 684 executable bytes and establishes reusable object layout, filtering, fixed-point distance, and angle-cone semantics.","Recovered only from retained GS1 assembly, local exact-C dispatcher and fixed-point motion analogues, the approved compiler, and the six local GS1 editions. No GS2 or external source was used."]},"main:0808e23c":{"schema_version":1,"namespace":"main","address":"0x0808e23c","status":"measured-draft","owner_bytes":632,"executable_owner_bytes":632,"candidate_bytes":644,"differing_halfwords":222,"wrong_instructions":172,"domain":"Battle-command item dispatcher: decodes a packed (item_id | actor<<10) argument, resolves which party member actually uses the item (actor==15 means auto-pick the member whose 15-slot ability list best matches the item), looks up a shared kind==4 battle-effect event for the item, and either runs that event's effect (inline or via a callback) or falls back to the ordinary use-item animation/consumption path shared with the actionId==0x95 special-confirm block in the exact-adjacent BattleCommand_ExecuteSelectedAction.","expressed":["decodes item_id = arg & 0x3ff, actor = (arg>>10) & 0xf from the packed argument, matching main:0808e680's identical decode for an ability id","unconditionally primes Func_08077148(actor) before branching on actor==15, discarding its count result on the non-auto-select path -- matches the same priming idiom in games/gs1/src/battle/party/*.c","actor==15: scans Data_02000240's target-id table (BattleWork, battle_effect_runtime.h) up to Func_08077148's count, and for each candidate counts how many of its 15 object+0xd8 ability slots (masked 0x1ff, same mask as shop/select_use_item.c's Ability_GetAvailability scan) equal item_id, keeping the best-matching actor","actor!=15: counts matches for that one actor directly into the same accumulator","no match anywhere -> UiText_DrawMessage(0x927,1); return -1","Func_0808e14c(item_id) walks the same runtime->events[] table as BattleEffect_FindMatchingEvent (main:0808e4b4, kind==5/ability), but filters kind==4 (item); a hit whose 12-byte record's trailing effect word is nonzero either runs it as a small effect id (Func_0808ddec/BattleRuntime_Reset/Func_08092b94/Func_08092f84/Func_08091750) when < 0x10000, or calls it as a function pointer via the __call_via_r3 veneer with (item_id, actor, slot) otherwise","no event hit: reproduces main:0808e680's actionId==0x95(=149) confirm-prompt block instruction-for-instruction (same Data_02000240+0x400/0x402 <- +0x480/0x482 u16 copy, same Data_03001ebc+0x170=999 sentinel, same Func_08091d84(1) prompt), then always plays the use-item message/animation (Func_08096fb0, a Data_03001ebc+0xcc6 busy-flag toggle around Func_08096810 matching BattleCommand_ExecuteSelectedAction's identical resolving_action toggle around the same RunBattleEffect call), and sets a consumed-item flag when the item's use_type bit 0 is set","tail: conditionally shows message 0x927 again and, when a separate flag is set, calls Func_08077058(actor, slot) -- the same (owner_id, slot) item-removal call item/use.c makes when item->kind==1"],"bounded_search":{"mode":"source-shape","attempted":6,"exact":false,"reason":"Iteratively fixed from an initial hand draft: (1) reordered the two 15-slot ability scans to increment the walking u16 pointer before the match check; (2) moved matches=0 after Runtime_GetObject, restoring the eight-byte frame; (3) made the record's effect signed so the threshold uses bge; (4) cached Data_03001ebc's dereferenced pointer across the action block; and (5) restored the auto-selection entry as `actor = 0; i = 0; if (actor < count)` rather than the superficially equivalent `if (count > 0)`. The decoder's mirrored-guard finding is now closed: candidate and reference have equal conditional-branch topology, and wrong instructions fall from 174 to 172.","not_attempted":"Full byte-exactness was not reached and further micro-ordering of the initial packed-argument decode (item_id/actor) was not chased past the point of diminishing returns for this session; see remaining."},"remaining":"222 differing halfwords / 172 wrong instructions, candidate 644 bytes vs reference 632, with equal conditional-branch topology. GCC currently rotates the scan carriers as best=r6, count=r7, index=r8 where the reference uses best=r7, count=r8, index=r6; this changes the packed-argument and both 15-slot scan register streams without changing their values. The candidate also emits three literal pools while the reference keeps the same constant set in one terminal pool, accounting for the larger candidate despite six fewer executable instructions. Function-scope versus narrow scan scope, declaration order, initializer versus assignment, split actor masking, actor/index zeroing order, routed/gcc296/old-agbcc families, and the approved scheduling/CSE/regmove axes preserve this cycle or regress. No fixed-register variable, artificial padding, barrier, inline assembly, or owner-only compiler route was introduced.","notes":["The family-matcher's best guess for this owner, games/gs1/src/shop/select_use_item.c (score 7481/10000, below the 7500 transplant threshold), is not this owner's kin: it is a different menu-loop function (item-selection UI) that shares only the object+216 15-slot/0x1ff-mask ability-availability idiom and the object+216 selector*2 addressing pattern with this owner's ability scan. This owner's actual family is the exact-adjacent battle-command cluster at main:0808e4b4/main:0808e680, confirmed by an identical packed-argument decode, an identical actionId==0x95/action_id==149 confirm-prompt sequence (same globals, same sentinel 999, same Func_08091d84(1) call), an identical Data_03001ebc+resolving-flag toggle around RunBattleEffect (Func_08096810, battle/effects/run_effect.c), and an identical Func_08096fb0(action_id,0)/Func_08077058(actor,slot) call shape shared with item/use.c's Item_Use.","Runtime_GetObject (Func_08077008), Item_GetData/Item_Get (Func_08077018), GameFlag_Clear/Set/IsSet (Func_080770d0/c8/c0), UiText_DrawQuantity/DrawMessage (Func_08015120/08015040), UiWork_FinalizePending (Func_08015140), BattleRuntime_Reset (Func_080916b0), and BattleEffect_CleanupSceneObjects (Func_08097194) are already-named symbols reused as-is (types.h / source-paths.json); Func_08092b94, Func_08092f84, and Func_08091750's single-argument (or no-argument) signatures were taken directly from their already-adopted sources (script_owner_9.c, run_action_and_wait.c, battle_owner_53.c), not guessed.","Func_0808ddec, Func_08077148, Func_0808e14c, and the __call_via_r3 target held in event->effect have no evidence-backed names yet and are kept as Func_ADDR.","Recovered only from retained owner assembly (games/gs1/asm/0808e23c.s and 0808e14c.s), the approved local GS1 ROM, already-adopted exact sources (games/gs1/src/battle/party/*.c, games/gs1/src/battle/presentation/run_action_and_wait.c, games/gs1/src/battle/effects/run_effect.c, games/gs1/src/item/use.c), the games/gs1/include shared headers, the two exact-adjacent measured-draft siblings' evidence trail (main:0808e4b4, main:0808e680), and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed."]},"main:0808e4b4":{"schema_version":1,"namespace":"main","address":"0x0808e4b4","status":"measured-draft","owner_bytes":292,"executable_owner_bytes":292,"candidate_bytes":284,"differing_halfwords":136,"wrong_instructions":147,"cross_edition":{"object_bytes":292,"relocation_bytes":20,"literal_bytes":28,"relocation_normalized_core_bytes":244,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080854b4","en":"0x0808e4b4","de":"0x08091abc","es":"0x080934bc","fr":"0x080934bc","it":"0x0808e4bc"}},"domain":"Finds the first runtime event record matching an effect flag set, actor group, action validity, range window, and selected value mode.","expressed":["derives the reference, selected, and alternate values from the current effect context","walks the terminated array of 12-byte event records","filters command kind, action validity, optional cyclic range window, and actor group","supports the special flag mode that bypasses the ordinary masked-flag comparison","applies unconditional, selected-value, or alternate-value matching and returns the first accepted record"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is eight bytes short with 136 differing halfwords and 147 wrong instructions, outside exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 292 executable bytes and proves all 244 relocation-normalized core bytes identical across the six approved GS1 editions.","Typed recovery uses the canonical assembly's 0x02000240 context word; the workbench symbolizer's 0x02000434 rendering was rejected as misleading local evidence.","The residual spans the full predicate-chain control shape and register allocation rather than a localized compiler hunk. No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect callers 080983a0 and 08098cd8, and the approved compiler. No GS2 evidence or external source was used."]},"main:0808e680":{"schema_version":1,"namespace":"main","address":"0x0808e680","status":"measured-draft","owner_bytes":748,"executable_owner_bytes":746,"candidate_bytes":724,"differing_halfwords":308,"wrong_instructions":199,"structural_score":{"match_percent":84.517685,"instructions":325,"unchanged":196,"argument_mismatches":82,"opcode_mismatches":1,"replacements":7,"deletions":26,"insertions":14},"family":{"exact_effect_dispatcher":"main:08096810","exact_effect_dispatcher_bytes":336,"typed_target_selector":"main:0808df1c","typed_target_selector_bytes":348,"aggregate_reusable_bytes":1432},"cross_edition":{"core_bytes":498,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08085680","en":"0x0808e680","de":"0x08091c88","es":"0x08093688","fr":"0x08093688","it":"0x0808e688"}},"notes":["Complete typed high-level battle-command executor. It decodes the action and actor, handles special story and summon gates, checks and spends PP, derives three target classes, selects the nearby object, drives the primary and secondary effect phases, and clears the temporary resolution state.","The readable candidate compiles to 724 bytes against 746 executable reference bytes (748 including alignment). Its 84.52 percent structural score is a useful convergence baseline but the 199 wrong instructions are broad, so this record claims zero bytes.","Independent all-six matching proves one unique 498-byte relocation-normalized core at the JA, EN, DE, ES, FR, and IT anchors with zero core differences. Forty-nine call relocations and thirteen literal fields account for the regional raw differences.","This owner directly joins the exact 336-byte RunBattleEffect dispatcher and the complete typed 348-byte nearby-target selector, forming a reusable 1,432-byte command/selection/effect family before counting the downstream exact battle-action resolver.","Recovered only from retained GS1 assembly, exact local battle-action/effect helpers, the approved compiler, and all six local GS1 editions. No GS2 or external source was used."]},"main:0808ef70":{"schema_version":1,"namespace":"main","address":"0x0808ef70","status":"exact","owner_bytes":344,"executable_owner_bytes":344,"candidate_bytes":344,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"family":{"assigned_template_owner":"main:0808f1c0","assigned_template_source":"games/gs1/src/battle/effects/objects/start_effect_22.c","template_note":"families transplant reported score=8299/10000 (main:0808f1c0, Func_0808f1c0/BattleEffect start_effect_22). The template is real, useful compiler-shape evidence but is NOT this owner's algorithm: template looks up its resource via a real `bl` to ObjectTable_Get(Data_02000240[125]) (a fixed global index) and unconditionally flag-gates its EmitRandomParticleEffect callback assignment and two trailing Object_SetMode/Object_Destroy calls on `object`/`resource`; this owner instead (1) inlines the table lookup with its own `value` parameter as the index -- no `bl` to Func_0808ba1c/ObjectTable_Get appears anywhere in the retained assembly, (2) runs an extra 64-iteration pool-cleanup loop over the Data_03001e64-based EffectObject array (same 112-byte stride established in games/gs1/src/object/dispatch/find_free_object.c and find_active_by_value.c's Work_08092be0.objects[]) gated on the *(s16*)(Data_03001ebc_value+0xCB8) 'active' flag already named in games/gs1/src/battle/effects/run_effect.c and scene_transition/reset.c, (3) transforms the spawn coordinates through an extra RotateVectorByMagnitude (Func_0800447c) call using an extra u16 resource field at offset 6 the template's EffectResource_0808f1c0 does not have, (4) calls Object_SetCallback(object, Data_0809e6c0) and writes object fields +0x28/+0x48 immediately after spawning -- the exact idiom from games/gs1/src/effect_runtime/run_rising_object_sequence.c's flags&1 branch, not present in the template at all, (5) sets object->callback = EmitRandomParticleEffect unconditionally at the end instead of the template's flags&1-gated assignment, and (6) is NOT void: it returns the spawned object pointer or NULL (both `movs r0,#0` early-exit sites and the final `adds r0,r7,#0` before return are present in the retained assembly), unlike the template's void Func_0808f1c0. Reused from the template only the byte-exact value_26/value_27=0, flags_a&=-33, and flags_b mask/clear/or shape, which alignment.json marks as a genuinely shared instruction block and which now compiles byte-identical here too."},"register_gate_step4":{"date":"2026-08-28","closure_ordinal":5,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":11,"final_differing_halfwords":0,"repair_pattern":"paired-phase-carrier-merge","decoder_signal":"The reference uses r6 for the state base and then the loop counter, while r7 carries the resource pointer and then the transformed spawn-Z coordinate; the baseline represented all four phases as separate quantities and left the short resource quantity in r2.","source_edit":"Represent the two non-overlapping r6 phases as work and the two non-overlapping r7 phases as src_z, with ordinary integer/pointer conversions at the actual semantic boundaries.","compiler_effect":"The paired carriers preserve the relative allocation priority: state/count occupies r6, resource/spawn-Z occupies r7 from the lookup onward, and r2 remains available for the global-cell address before GCC moves it into sl at the reference position.","bounded_confirmation":{"baseline_differing_halfwords":11,"one_sided_resource_spawn_z_merge_differing_halfwords":16,"paired_phase_merge_differing_halfwords":0,"candidate_bytes":344,"reference_bytes":344,"independent_reproductions":2,"linked_byte_differences":0},"production":{"source":"games/gs1/src/battle/effects/random_particle/start_emitter.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 344/344 linked bytes"}},"rejected_experiments":["Four declaration-order permutations for object/state/offset/resource/pos/spawn_x/spawn_z (object-first, resource-first, pos-first, and the final chosen order): all four produced byte-identical candidate output (same 11 differing halfwords, same r2-vs-r7 role). Consistent with games/gs1/recon/en/dossiers.json#main:080a8c2c's traced finding that GCC 2.96's local-alloc.c qty_compare tie-break is governed by RTL discovery order within a basic block, not C declaration/statement order.","Removing the `u32 offset = (value*4)+0x14;` intermediate (inlining the expression directly into the pointer cast): regressed candidate_bytes from 344 to 348 and differing_halfwords from 11 to 14 -- the intermediate variable is required to reproduce the reference's exact `lsls r0,r0,#2 / ldr r6,[r2,#0] / adds r0,#20 / ldr r7,[r6,r0]` instruction selection (get.c's own `offset = (arg0*4)+0x14; return *(void**)(base+offset);` shape). Kept.","Rewriting the table lookup as array indexing (`struct EffectResource_0808ef70 **table = (...)(state+0x14); resource = table[value];`) instead of pointer-plus-offset: regressed sharply to candidate=348/dh=168 -- the compiler chose a completely different (worse) address-computation shape. Reverted.","Introducing a `u8 **globalSlot = (u8**)&Data_03001ebc;` intermediate for the shared address (matching scene_transition/reset.c's own `globalSlot` idiom) vs referencing `&Data_03001ebc` directly at both use sites: byte-identical either way (CSE recognizes the reuse regardless of source spelling). Kept the simpler direct-reference form.","Routing the table-lookup result through an untyped `void *lookup` local before assigning to the typed `resource` pointer, to see if a generic-pointer pseudo changed RTL discovery order ahead of the typed one: no effect (identical 11-diff output). Reverted to the direct typed assignment.","Spelling the halfword merge's keep-mask as `~0x3FF` instead of `0xFFFFFC00`, and as a separately-declared `u32 keep_mask` local, and via an intermediate `u32 existing` read-then-write, and via a `s32 packed` intermediate for the Func_08003fa4 term: all either no-op'd or regressed (up to candidate=364/dh=122) versus the plain inline expression. None reproduced the reference's pool-loaded 0xFFFFFC00 constant -- GCC's optimizer recognized the AND was redundant on a zero-extended 16-bit load and narrowed it to the 8-bit-rotated immediate 0xFC00 (movs+lsls) regardless of spelling, matching this session's other documented finding that same-valued-constant folding is value-driven, not text-driven.","Swapping the OR operand order in the halfword merge (mask-term first vs call-term first): the call-term-first ordering matched the reference's `ands r0,r3` (0x3FF load) placement and dropped differing_halfwords from 45 to 43 before the bitfield fix below; kept.","A static inline lookup helper, splitting resource declaration from assignment, and introducing a post-guard typed alias were all optimized back to the 11-halfword baseline. Copying the position as an aggregate regressed to 133 differing halfwords.","Merging only resource with spawn_z, including a short typed-copy boundary intended to encourage coalescing, produced 16 differing halfwords: the longer merged quantity took r6 and displaced state into r7. That negative result exposed the missing paired lifetime rather than supporting a one-sided carrier repair."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/0808ef70.s), the family-transplant workspace's m2c output run against the target's own object (out/family-transplants/main-0808ef70/m2c/0808ef70.c and target.canonical.s), the byte-exact template games/gs1/src/battle/effects/objects/start_effect_22.c, the already-adopted sibling sources games/gs1/src/object/table/get.c, games/gs1/src/object/table/find_active_by_value.c, games/gs1/src/battle/effects/run_effect.c, games/gs1/src/battle/effects/scene_transition/reset.c, games/gs1/src/battle/effects/interpolate/prepare.c, games/gs1/src/effect_runtime/is_active.c, games/gs1/src/effect_runtime/run_rising_object_sequence.c, games/gs1/src/battle/effects/random_particle/emit.c and spawn_at_position.c, the lower-confidence in-repo candidate games/gs1/src/object/dispatch/find_free_object.c (for the Data_03001e64/112-byte-stride array naming precedent), games/gs1/include/types.h and global_cells.h, and the approved compiler. No GS2 evidence, external source, another decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","The single biggest structural discovery this pass: the u16 field at visual+8 (which straddles the template's `unknown_06[3]`/`flags_b` boundary) is written back with `field = (field & 0xFFFFFC00) | (Func_08003fa4(...) & 0x3FF)` in the reference, but writing that literally as manual masking let GCC's optimizer narrow the redundant upper bits of the AND-mask down to the smaller immediate 0xFC00 (movs+lsls instead of a pool load), which the reference never does. Declaring the field as a genuine C89 10-bit bitfield instead (`struct PackedField08_0808ef70 { u16 value : 10; };`, assigned directly with no manual mask) let GCC's own bitfield read-modify-write codegen materialize the full 32-bit complement mask exactly as the reference's literal pool does, and dropped differing_halfwords from 43 to 11 in one change -- this is genuine source-shape recovery, not forcing: bitfields are ordinary C, and the container width (u16) matches the reference's confirmed `ldrh`/`strh` access width.","A second structural discovery: this owner's `if (object != 0) { ... }` wrapping had to become two independent early returns (`if (resource == 0) return 0;` ... `if (object == 0) return 0;`) rather than nested ifs to reproduce the reference's two separate `movs r0,#0` default-return-value materializations and the `adds r0,r7,#0` reload immediately before the first Object_SetCallback call -- a single `object = 0;`-initialized-then-conditionally-overwritten variable let the compiler keep r0 alive across the whole function and never needed to reload it, which is legitimately correct code but not what the reference did. This also required scoping `visual`/`handle`/`mask`/`zero` into a nested block declared with `visual`'s declaration doubling as its initializer (`struct EffectVisual_0808ef70 *visual = object->visual;`) placed AFTER the Object_SetCallback call rather than at the top of a larger block -- putting all four locals together at the top of one big block raised register pressure enough to spill a 4th high register (fp) into the prologue (candidate grew to 354/364 bytes with an extra push{r7}/pop{r7} pair), which the reference's 3-high-register prologue never has.","Confirmed by direct assembly reading (not assumed) that the value-parameter is used directly as the object-table index with no `bl` to Func_0808ba1c/ObjectTable_Get anywhere in games/gs1/asm/0808ef70.s -- the lookup is fully inlined as `*(u8**)(*(u8**)Data_03001ebc + (value*4) + 0x14)`, matching object/table/get.c's own formula exactly but without the function call. Confirmed the pool-cleanup loop's base pointer at Data_03001ebc-88 (0x03001e64) via direct arithmetic on the retained `mov r3,sl; subs r3,#88` and cross-checked it against the identical Data_03001e64/112-byte-stride/64-entry array already named in runtime_owner_12.c. Confirmed 0x0808f28d/0x0808eee5 resolve (thumb-bit-set) to the already-adopted BattleEffect_SpawnRandomParticleAtPosition (games/gs1/src/battle/effects/random_particle/spawn_at_position.c, owner main:0808f28c) and EmitRandomParticleEffect (games/gs1/src/battle/effects/random_particle/emit.c, owner main:0808eee4) respectively via games/gs1/source-paths.json, and that 0x0809e87c/0x0809e6c0 are the already-named data markers Data_0809e87c and Data_0809e6c0 used exactly this way (as a stale-callback sentinel and an Object_SetCallback argument, respectively) in emit.c/spawn_at_position.c and run_rising_object_sequence.c.","The former 11-differing-halfword/12-wrong-instruction residual (class=allocation) was entirely register-role assignment for the resource pointer (r2 in the baseline candidate versus r7 in the reference), plus the resulting placement of `mov sl,r2`. Single-variable aliases and declaration changes did not move it because they did not alter the competing lifetime topology.","Reading the reference register phases exposed the complete repair: r6 carries the work base before becoming the pool count, and r7 carries the source pointer before becoming spawn Z. Expressing both disjoint pairs as the ordinary C carriers work and src_z closed the owner from 11 to zero differing halfwords; expressing only the r7 pair regressed to 16 because it stole r6. No register-qualified local, named-register variable, inline assembly, compiler flag override, scheduling control, compiler patch, or hand-authored instruction byte was used.","Adoption gate met on 2026-08-28: two isolated fresh compilations and the production-named source each measured 344/344 bytes with zero differing halfwords. tools/check integrate accepted the owner, installed games/gs1/src/battle/effects/random_particle/start_emitter.c, and retired games/gs1/asm/0808ef70.s."]},"main:0808fe38":{"schema_version":1,"namespace":"main","address":"0x0808fe38","status":"proven-retained","owner_bytes":120,"executable_owner_bytes":120,"candidate_bytes":126,"differing_halfwords":51,"wrong_instructions":47,"cross_edition":{"object_bytes":120,"relocation_bytes":12,"literal_bytes":28,"relocation_normalized_core_bytes":80,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08086e38","en":"0x0808fe38","de":"0x080934a4","es":"0x08094ea4","fr":"0x08094ea4","it":"0x0808fea4"}},"domain":"Allocates and clears the shared display-transition state, seeds established control fields, and schedules its two runtime callbacks.","expressed":["allocates the 0x540-byte display-transition state","clears the complete state with a fixed-source DMA transfer","stores the requested mode and initializes the trailing control fields","schedules the update and presentation callbacks at their original priorities"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is six bytes long with 51 differing halfwords and fails exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 120 executable bytes and proves all 80 relocation-normalized core bytes identical across the six approved GS1 editions.","The residual spans argument lifetime, pool pointer allocation, and volatile DMA/literal scheduling rather than an immediately resynchronizing compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect caller 080983a0, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:0808fecc":{"schema_version":1,"namespace":"main","address":"0x0808fecc","status":"proven-retained","owner_bytes":48,"executable_owner_bytes":48,"candidate_bytes":44,"differing_halfwords":21,"wrong_instructions":14,"classification":"thumb_multiple_transfer_module","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":36,"core_diff_bytes":0,"core_identical":true},"notes":["Allocates the shared 0x540-byte display-transition state and uses DMA3 to fill it from a zero word on the stack.","The retained owner is already covered by the proven thumb_multiple_transfer_module matcher because the three-register STMIA has no ordinary approved-C lowering. The semantic candidate remains broad and was not promoted.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:08090488":{"schema_version":1,"namespace":"gs1-en-main","address":"0x08090488","status":"proven-retained","classification":"compiler_literal_pool_placement_module","owner_bytes":250,"score":{"measured":"2026-08-26","candidate_bytes":248,"reference_bytes":250,"differing_halfwords":49,"wrong_instructions":32,"class":"layout","command":"compiler candidate-show games/gs1/recon/en/main/08090488.c","note":"Every emitted instruction matches the reference one-for-one in mnemonic, registers, operands, and branch structure. The entire residual is literal-pool placement: the reference dumps its ten-word pool mid-function (after the middle display arm's unconditional branch, with a two-byte alignment nop) and places the zero/159 arm plus the shared epilogue after it; the candidate emits the same pool at the function end. Every differing halfword is a pool-shifted pc-relative displacement, a branch over the moved pool, or the pool block itself."},"shape":{"derivation":"Family transfer from byte-exact games/gs1/src/display/transition/update.c (95.5% ngram match). Same state cell (0x03001ECC), display cell (0x03001E70, derived by the compiler as cell-92), and DisplayTransitionState field offsets. Differences from the template, all read from the reference: Scheduler_RemoveCallback(self) instead of ScheduleCallback (pool word 0x08090489), a third display arm gated on *(u32*)0x03001E40 & 1 writing value+80 and pool-forced 0x50 minus value (Data_00000050 extern, the battle-page pool-constant idiom), and a constant 0/159 final arm."},"remaining":[{"op":"literal pool placement","count":49,"where":"the reference's mid-function pool site after the middle arm; the 250-byte extent never approaches the Thumb literal range, so the early dump is not range-forced and no ordinary source lever for it is known -- prior owners with this residual class (080983a0, 080bae40, 080bad7c, 080bd898, 080d1350) were all parked on the same grounds"}],"rejected_experiments":[{"experiment":"nested-else restructure with an early return in the middle arm","result":"byte-identical output; GCC canonicalizes the chain"},{"experiment":"32 informed variants tried 2026-08-29 (measured against baseline dh=49): swap state/display pointer init order; lazy-init display pointer after the outer if (C89 mixed-decl compile error); hoist *step into the outer decl block; swap ScheduleCallback/Func_0800307c call order; hoist `delta` to function top with an out-of-block assignment; hoist `value` to function top; hoist both delta and value to function top; split `state->transition_value = start + value` into a `value += start` then assign; cache `display_value` across the outer if via a top-level default + duplicate branch assignment (twice, two shapes, one caused a C89 mixed-decl error); reorder duration-pointer vs display-pointer declarations three ways; use `if (*duration)` instead of `if (*duration != 0)`; defer the `(*step)++` past the Func_080072f0 call; invert the inner if/else (step 79` as `>= 80`; swap the `&&` operand order in the middle-arm condition; hoist the 0x03001E40 flag read into a local (top-of-func and mid-block, one caused a C89 error); cast the Data_00000050 subtraction result to u16; take `&UpdateMapTransition` explicitly in the ScheduleCallback call; split `s8 *step = ...` into a two-statement declaration+assignment; split delta declaration+assignment into two statements; rewrite `end - start` as `-(start - end)`; add redundant parens around `delta * *step`; cast the transition_value store to u16; cast `*duration` to s32 in the Func_080072f0 call.","result":"every variant either reproduced the baseline dh=49 exactly (same missing_extra_code residue, pool still emitted at function end) or made it worse (52-131); none moved the pool to the reference's mid-function site. Confirms this is the same unforced-early-pool-dump class already parked on 080983a0, 080bae40, 080bad7c, 080bd898, 080d1350 -- no ordinary C89 source lever changes GCC 2.96's pool-flush heuristic here. Baseline source restored unchanged."}],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template source, in-repository headers, and the approved compiler.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM because ordinary C cannot request the reference's mid-function pool dump."],"pool_class_membership_correction":{"measured":"2026-08-29","note":"The five owners once claimed as sharing this pool-placement class (080983a0, 080bae40, 080bad7c, 080bd898, 080d1350) are all REFUTED by strict verification — each has genuine instruction differences. This owner remains the class sole verified member (250 bytes)."}},"main:08090658":{"schema_version":1,"namespace":"main","address":"0x08090658","status":"proven-retained","owner_bytes":344,"executable_owner_bytes":344,"candidate_bytes":344,"differing_halfwords":48,"wrong_instructions":36,"classification":"display_transition_queue_compiler_allocation_module","resolved_asm_classification":{"kind":"display_transition_queue_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":272,"core_identical":true,"starts":{"ja":"0x08087658","en":"0x08090658","de":"0x08093cc4","es":"0x080956c4","fr":"0x080956c4","it":"0x080906c4"}},"score":{"measured":"2026-09-01","candidate_bytes":344,"reference_bytes":344,"differing_halfwords":48,"wrong_instructions":36,"class":"missing-extra-code","command":"compiler candidate-show games/gs1/recon/en/main/08090658.c --owner 0x08090658 --size 344","note":"Family-clustered against the exact display-transition template at main:080903bc and its sibling main:08090488. The shared typed transition state, linker-resolved display-transfer queue, address-valued IME disable, unsigned two-entry dither loop, and incrementing queue destination pointer now reproduce the reference's 344-byte extent, 16-word literal pool, branch topology, and paired STMIA writes. The candidate improved from 374/344 bytes with 132 differing halfwords and 111 wrong instructions to 344/344 with 48 differing halfwords and 36 wrong instructions. The remaining same-length residual is a reciprocal register-role and scheduling floor; the allocator decoder reports no unique source repair, so this remains a measured draft and claims no DONE bytes."},"shape":{"confirmed_fields":"offset 0x52a = transition_value (u16, matches template), 0x539 = a 1-byte toggle flag (previously undifferentiated template padding), 0x53a/0x53b/0x53c/0x53d = transition_start/end/duration/step (matches template exactly), 0x508 = an up-to-32-byte palette-index nibble buffer (written by the dither loop, read by the queued DMA as its source)","confirmed_globals":"0x040000b0 = DMA0SAD (accessed here at +10 = DMA0CNT_H), 0x04000208 = REG_IME, 0x02002090 = a u16 pending-DMA-queue count followed by up to 32 {u32 src,u32 dst,u32 ctrl} 12-byte entries, 0x0809e8ee = a 64-entry ROM byte table (dither phase -> {palette half-index, nibble selector})"},"verified_respellings":[{"change":"route the two DMA0CNT_H read-modify-writes through a `volatile u16 *dma0 = (volatile u16 *)0x040000b0;` pointer accessed as dma0[5] (array form), assigned AFTER the Func_08004278 call rather than as an initializer at block entry","result":"this exact section (three volatile ldrh, two masks, two strh, matching literal pool value 0x040000b0 with immediate #10 offsets throughout) became byte-for-byte identical to the reference -- a struct-typed volatile pointer with the SAME shape produced an extra spurious re-read per line (`x = x & mask` re-loading x twice), and a pre-baked `(volatile u16*)0x040000ba` constant folded the base+offset into one literal instead of two, both confirmed worse"},{"change":"declare `u16 *valuePtr` and `u8 *toggle` as adjacent locals computed up front (before reading *valuePtr), instead of nesting toggle's declaration in an inner block entered after the value read","result":"wrong_instructions 122 -> 118; matches the reference's own instruction order (both offset constants loaded before either address is used)"},{"change":"rewrite the two-entry dither loop as an explicit `i = 0; do { ... i++; idx++; } while (i <= 1);` instead of a `for (i = 0; i <= 1; i++, idx++)`","result":"byte-identical output to the for-loop version -- this compiler's loop rotation already produces the do-while shape for a statically-bounded for loop, so the explicit spelling made no difference here (unlike other owners in this family where the idiom was load-bearing)"},{"change":"split the DMA-queue-append address math into the exact three-step order the disassembly shows: compute `entry = (u8*)count + counter*12` (no +4 header offset yet), THEN store the incremented counter back, THEN take `entry+4` for the actual field writes -- rather than one combined `(u8*)count + 4 + counter*12` expression","result":"wrong_instructions 118 -> 111; the reference's counter-store timing (between the *12 multiply and the +4 add) only reproduces when the source expresses that same three-step sequence"},{"change":"introduce a named `s32 offset12 = counter * 12;` before using it in `entry = (u8*)count + offset12`, instead of inlining `counter * 12` directly in the pointer expression","result":"byte-identical to the un-named version -- no effect for this specific multiply"},{"change":"for the terminal-tick branch's transition_value store, express the write address as `(u8 *)endPtr - 17` (endPtr being the already-computed `state + 0x53b` pointer used for the delta subtraction), or as a mutated `s32 endOffset` variable (`endOffset = 0x53b; ...; endOffset -= 17;`), to try to reproduce the reference's `subs r7,#17` reuse of the already-loaded 0x53b constant register instead of a fresh 0x52a literal load","result":"the direct pointer-subtraction form constant-folds back to a fresh `state+0x52a` load (no different from not trying at all, since the compiler proves the two expressions equal at compile time); the named-variable mutation form compiles but triggers a much larger, unrelated register-allocation cascade (state's own base register swaps from r6 to r7 throughout the whole preceding block), regressing overall wrong_instructions from 122 to 150 -- reverted"}],"remaining":[{"op":"reciprocal register-role swap around the dither and queue tails","where":"The IME write is now explained and reproduced by the ordinary hardware idiom `*ime = (u16)(u32)ime;`; it was not a compiler quirk. After all pool words and instruction counts were aligned, the allocator decoder identified reciprocal r0/r1 and r4/r7 role swaps but could not name a unique guarded source repair."},{"op":"independent absolute toggle offset","where":"Using the linker-resolved absolute symbol Data_00000539 preserves the reference's independent 0x539 pool word. Expressing the same address only as a typed field lets GCC derive it from 0x52a and shortens the owner by four bytes, so the absolute symbol is source-shape evidence rather than an unexplained optimizer limitation."},{"op":"same-length scheduling residual","where":"Candidate and reference are both 344 bytes with identical normalized branch topology and identical literal values. The remaining 36 wrong instructions are directly alignable; no phase-shift or disassembled-pool artifact remains. The bounded annotation-free permuter stopped honestly because its decoder found no unique source repair."}],"notes":["2026-09-01 retained-assembly proof: the candidate reproduces the complete 344-byte owner with equal branch topology and all sixteen literal values exact. Every transition tick, callback removal, DMA0 disable, dither-table access, nibble update, queue insertion, interrupt save/restore, constant, field access, and observable memory operation is accounted for. The remaining 36 wrong instructions are equivalent pointer, counter, table, and saved-IME register roles plus independent scheduling. The allocator decoder finds no unique safe source repair. Canonical, no-schedule-insns, GCSE, both CSE toggles, rerun-CSE, strength-reduction, and O3 routes preserve the 48-halfword floor; regmove, sched2, and no-expensive-optimizations regress. Relocation-aware verification proves all 272 normalized core bytes identical across all six editions. Structured assembly is therefore authoritative under display_transition_queue_compiler_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/08090658.s), its own pc-relative literal-pool annotations (computed by hand: the pool begins at file offset 0x118 and its 16 words were matched to every `ldr rX,[pc,#N] @ (addr)` site by address), the approved local ROM, the assigned template games/gs1/src/display/transition/update.c, the already-drafted sibling games/gs1/recon/en/main/08090488.c and its dossier (confirming the Func_08004278=Scheduler_RemoveCallback naming and the shared transition-state field layout), in-repository headers (types.h), and the approved compiler via tools/compiler candidate-show.","The family clustering (86% ngram similarity) captured only the transition_duration/step opening; the palette-dither-and-DMA-queue tail (roughly 60% of this owner's bytes) has no counterpart in the template or in 08090488 and was reconstructed independently from the disassembly and literal pool alone -- this is a much larger reverse-engineering task than the 'quick win' framing anticipated for this family.","0x0809e8ee (the 64-entry dither table) and 0x02002090 (the DMA-queue ring buffer) are read-only in this owner; their contents/producers were not investigated beyond what this owner's own access pattern reveals.","This candidate claims zero DONE bytes."]},"main:080912b8":{"schema_version":1,"namespace":"main","address":"0x080912b8","status":"measured-draft","owner_bytes":474,"score":{"measured":"2026-08-31","candidate_bytes":442,"reference_bytes":474,"differing_halfwords":224,"wrong_instructions":202,"class":"missing-extra-code","command":"compiler candidate-show games/gs1/recon/en/main/080912b8.c --owner 0x080912b8 --size 474","note":"The corpus drafting wave classified the generated source as type_width_mismatch. The retained assembly proves that each 12-byte display record is first initialized with word stores at +4 and +8, then updated through byte fields at +4/+5/+9 and halfword fields at +6/+8. Encoding those widths removes all three width fingerprints and reduces wrong instructions from 210 to 202; the remaining 32-byte size deficit is now honestly routed as missing_extra_code."},"remaining":[{"op":"reconstruct missing or extra code","count":202,"where":"The branch topology is equal, but the candidate is 442 bytes versus the 474-byte owner. The leading divergence shows absent lifetime-preserving moves and an 8-byte stack-frame deficit; later literal-pool placement also differs. Reconstruct the missing source statements before allocator work."}],"rejected_experiments":[{"experiment":"Extract both display-record initializers into a typed helper and use a uniform semantic record abstraction.","result":"Regressed to 264 bytes with different topology because GCC 2.96 inlined and rescheduled the helper across the owner."},{"experiment":"Rewrite the whole function as clean direct-pointer C while preserving the recovered behavior.","result":"Produced 454 bytes but changed block topology; the generated control-flow skeleton is currently the stronger reconstruction basis."}],"notes":["Recovered only from games/gs1/asm/080912b8.s, the approved local ROM, the aggregate evidence header, the drafting-wave candidate, and the approved GCC 2.96 scoring route.","The semantic role is a scheduled display-record updater for two adjacent terrain-height samples. A public function name is intentionally deferred until callers or neighboring translation-unit evidence establish the original subsystem vocabulary.","This candidate claims zero DONE bytes."]},"main:08091890":{"schema_version":1,"namespace":"main","address":"0x08091890","status":"measured-draft","owner_bytes":328,"score":{"measured":"2026-08-27","candidate_bytes":324,"reference_bytes":328,"differing_halfwords":108,"wrong_instructions":60,"class":"wrong","command":"compiler candidate-show games/gs1/recon/en/main/08091890.c --owner 0x08091890 --size 328","note":"Family sibling of the just-adopted owner/refresh_ratios_on_flag.c (template main:08078144), but the retained assembly's field-offset identity (0x14/0x16/0x34/0x36/0x38/0x3A -- the exact OwnerRatioState layout) is closer to the already-adopted owner/refresh_active_ratios.c (main:0807808c, which does the same *(0x38)=*(0x34); *(0x3A)=*(0x36); double self-copy). The function is arg0 = character id: it calls Func_08077168(id) and Event_ClearInvalidPackedValues() (both void statements), fetches obj=OwnerState_GetFar(id), does the double self-copy + both ratio-pair recomputations (matching refresh_active_ratios.c's proven idiom exactly, including the *(s16*)(obj+0x3A)<<14 inline-read for the second ratio rather than a named variable), clears obj->0x131, then counts (via Func_08077148 -- the far-call veneer, NOT the Party_CountActiveOwners/Func_080795fc near route, per the precedent warning already recorded in 080b6a60.json) how many of the party's active_owners (Data_02000240.active_owners, offset 0x1F8) have a nonzero 0x38 field; if none do, it forces the party's current_owner (Data_02000240.current_owner, offset 0x1F4) object's 0x38 field to 1 and recomputes its ratio pair the same way, discovered by writing v38=1 as a named local (not a bare literal store) so the compiler forwards the register instead of re-deriving a shared 0x4000 constant -- this specific respelling took wrong_instructions from 149 (raw template copy) to 70 (struct layout + offsets fixed) to 60 (this v38-forwarding fix)."},"remaining":[{"op":"register color divergence","count":60,"where":"the double-copy ratio-pair block immediately after obj=OwnerState_GetFar(id) reuses r5 (dead after the id argument's last use) for the clamp temp/v14 instead of the reference's r3, and a symmetric ~4-byte gap around the flagCount=0 initializer (candidate emits movs r2,#0; mov r8,r2 where the reference reuses the already-zero r3 directly via mov r8,r3) -- both are pure GCC 2.96 register-allocator coloring differences, not content differences: the same idiom, byte-for-byte, already compiles to r3 in refresh_active_ratios.c's own adopted context (out/gs1-en/claimed/obj/0807808c.s), so the divergence is driven by this function's surrounding call/live-range shape, not the block's own source shape"}],"rejected_experiments":[{"experiment":"complete shipped-toggle route probe, followed by a field-cluster check across 08090658, 080912b8, 08091890, 08091a58, 08093874, 08093fa0, 08094154, and 080941e0","result":"-fno-regmove, both scheduling toggles, both CSE toggles, and -fno-gcse are flat at 324/108; -fno-strength-reduce regresses to 336/166. -fno-expensive-optimizations alone improves this owner to exact extent 328/328 and 104 differing halfwords, but every combination with the other flat toggles stays 328/104. Across the eight-owner field cluster, the flag improves only 08091890; all seven siblings are flat or regress. This is an owner-specific coincidence rather than a multi-owner translation-unit route, so no override was registered and canonical flags remain authoritative."},{"experiment":"split the reused obj pointer into a block-scoped member pointer at the active-owner loop, following the decoder's split-lifetime hint","result":"strong regression to 308 candidate bytes, 162 differing halfwords, and 96 wrong instructions; reverted. The annotation-free permuter cannot apply this repair automatically because obj has multiple assignments."},{"experiment":"obj->0x38 = 1; then v38 = *(s16*)(obj+0x38); (read-back through memory) for the current_owner block's forced-full ratio","result":"regresses to 70 wrong instructions -- the compiler proves the just-stored literal 1 is a compile-time constant and CSEs the resulting 1<<14 with the unrelated 0x4000 clamp-ceiling constant used elsewhere in the function, producing a 128<<7 encoding instead of the reference's 1<<14 register-forwarding encoding"},{"experiment":"*(s8*)(obj+0x131) = flagCount = 0; (chained assignment, to force flagCount and the byte-store literal to share one register)","result":"regresses sharply to 138 wrong instructions -- the chained-assignment form changes codegen well beyond the targeted store, not just a local register choice"},{"experiment":"flagCount = 0; *(s8*)(obj+0x131) = 0; (swap statement order, plain literal both sides)","result":"62 wrong instructions, slightly worse than the current 60"},{"experiment":"flagCount = 0; *(s8*)(obj+0x131) = flagCount; (read flagCount back for the store instead of a fresh literal)","result":"72 wrong instructions / 110 differing halfwords -- worse"},{"experiment":"reordering local variable declarations (moving count/index/left/flagCount to the end of the decl list, after t/v14/v16/v34/v36/v38/v3A/one)","result":"byte-identical output -- this GCC 2.96 build's pseudo-register numbering follows first-use order in the generated RTL, not textual declaration order, so decl reordering has no effect"},{"experiment":"wrapping *(s8*)(obj+0x131)=0; in a do{...}while(0) block (matching the do-while(0) idiom that was load-bearing for the double-copy block)","result":"byte-identical output -- no effect here"}],"notes":["2026-08-31: changed v34 from s32 to s16 to match the retained ldrsh access and the already-exact Owner_RefreshActiveRatios sibling. This is byte-neutral at 324/108/60 and therefore improves semantic typing without being presented as a score gain. v38=s16 was also tested and was byte-neutral, but reverted because it is a computed carrier rather than a stored-field declaration.","Recovered only from the retained owner assembly (games/gs1/asm/08091890.s), the approved local ROM, the assigned template games/gs1/src/owner/refresh_ratios_on_flag.c, the closer-matching already-adopted sibling games/gs1/src/owner/refresh_active_ratios.c and its compiled object out/gs1-en/claimed/obj/0807808c.s (used to confirm the double-copy idiom's proven register behavior in isolation), games/gs1/include/owner_state.h and party_state.h (OwnerState_GetFar=Func_08077008, Data_02000240.active_owners at 0x1F8, Data_02000240.current_owner at 0x1F4), games/gs1/include/types.h (FixedPoint_Ratio=Func_080022ec, Event_ClearInvalidPackedValues=Func_08091858), the sibling dossier games/gs1/recon/en/dossiers.json#main:080b6a60 (which documents the Func_08077148 far-call-veneer-vs-Party_CountActiveOwners distinction reused here), and the approved compiler via tools/compiler candidate-show.","Func_08077168's return value and Event_ClearInvalidPackedValues's argument are both unobserved in the retained assembly (no register setup between the two `bl`s, and r0 is explicitly reloaded with id before the next call), so both are called as bare statements with their real signatures left undetermined beyond the existing s32 Func_08077168(s32) declaration used elsewhere in the tree.","This looks like a source-shape gap only in the narrow sense that the *content* is fully understood and expressed; the residual is a compiler-internals register-coloring quirk (proven by the same idiom compiling differently in this function's context vs. refresh_active_ratios.c's), which needs permuter-style search across GCC scheduling/allocation flags rather than further manual respelling.","This candidate claims zero DONE bytes."]},"main:08091a58":{"schema_version":1,"namespace":"main","address":"0x08091a58","status":"measured-draft","owner_bytes":452,"executable_owner_bytes":452,"candidate_bytes":400,"differing_halfwords":214,"wrong_instructions":137,"classification":"party-inventory-give-item-with-discard-prompt","domain":"Gives item_id to whichever party member PartyInventory_Add (the Func_08077030 far-call veneer onto games/gs1/src/inventory/add_to_party.c's real body at 0x08078618) can hold it for. If every member's bag is full (-1 returned), opens a message/window sequence (UiText_DrawQuantity/UiText_DrawMessage veneers at Func_08015120/Func_08015040) telling the player the item was obtained but bags are full, then loops Shop_SelectPartyMemberItem (the Func_080b0058 veneer onto the still-unadopted, source-paths-named-only 0x080b3444) so the player can either pick a member+slot to discard or cancel: picking a key-flagged item (Item_GetData(item_id)->flags & 8, via the already-declared item.h prototype) re-prompts in place; cancelling asks a yes/no confirm through sibling owner Func_08091d84 (games/gs1/src/object/call_spawn_routine_at_origin.c) and, on a real cancel, restores the transient field and returns -1 with Item_AdjustCounter bumped by 1 (the Func_08077240 veneer onto games/gs1/src/item/adjust_counter.c's real body at 0x08078ad0). A confirmed discard target instead drains the chosen slot's full stack via Inventory_GetQuantity/Inventory_Discard-shaped veneers (Func_08077020, Func_080772b0, both far-call variants of the already-adopted games/gs1/src/inventory/get_quantity.c and games/gs1/src/inventory/discard.c bodies) after touching the owner's state once through the Func_08077008 veneer (games/gs1/include/owner_state.h's already-declared OwnerState_GetFar/struct OwnerInventoryState*), then retries PartyInventory_Add. Either success path plays the pickup cue (Audio_PlayCue/Func_080f9010, 83) and prints either the generic 'you got the item' message (0x96a) or, when the receiving owner differs from games/gs1/include/party_state.h's Data_02000240.current_owner, a named-recipient variant (0x96b). Throughout, a transient s16 field at offset 472 (236 halfwords) of the runtime block behind Data_03001ebc is saved on entry and restored on every exit.","notes":["Family-matcher gave games/gs1/src/shop/select_repair_item.c at 7342/10000 (below the 7500 adoption-transplant threshold). Read it in full: its actual call targets (UiWindow_CreateFar, Ability_GetAvailability, Shop_ComputeRepairPrice, Shop_DrawItemPrice/DrawMessage, an ADDR_03001C94/ADDR_03001B04 D-pad polling loop) share none of this owner's real callees. It is a shape-only match (same high-register-heavy prologue idiom used by dozens of unrelated main-image owners) and was not used beyond noting the general 'shop-ish item flow' theme, which the real tracing below independently confirmed through a different route.","Traced every bl target in games/gs1/asm/08091a58.s by hand: seven of them (Func_08077030, Func_08077018, Func_08077008, Func_08077020, Func_080772b0, Func_08077240, and the games/gs1/asm/08015040.s/08015120.s/08015140.s/080b0058.s group) are 'far-call inter-mode veneer' stubs (ldr r4,[pc]; bx r4) per this project's veneer_island convention, not callable symbols in their own right. Resolved each veneer's literal-pool target address (thumb bit stripped) and cross-checked it against games/gs1/source-paths.json and the project headers: 0x08078618=PartyInventory_Add (inventory.h), 0x08078414=Item_GetData/Item_Get (item.h, already declared as the veneer symbol Func_08077018 itself), 0x08077394=Owner_GetState (types.h; Func_08077008 is the separately-named far variant OwnerState_GetFar in owner_state.h), 0x080784b0=Inventory_GetQuantity (inventory.h; Func_08077020 is its far veneer, aliased Shop_GetSelectionState in types.h -- name not trusted, signature is), 0x08078948=Inventory_Discard (inventory.h; Func_080772b0 is its far veneer), 0x08078ad0=Item_AdjustCounter (item.h; Func_08077240 is its far veneer, aliased Ability_GetMaximum in types.h -- again signature trusted, alias name not), 0x08019908=a value/flag work-queue push (games/gs1/src/ui/runtime/push_value_slot.c, void(u32,u32); Func_08015120 is its far veneer, aliased UiText_DrawQuantity), 0x0801776c=an unadopted retained-assembly message/window-flags renderer (games/gs1/asm/0801776c.s; Func_08015040 is its far veneer, aliased UiText_DrawMessage; matches the void(s32,s32) signature already used identically in games/gs1/recon/en/main/0809b698.c and 0808e680.c), 0x08019a54=UiWork_FinalizePendingCore (types.h, void(void); Func_08015140 is its far veneer, aliased UiWork_FinalizePending), 0x080b3444=Shop_SelectPartyMemberItem (source-paths.json name-only registration, not yet adopted). This is the genuine evidence trail for the whole function, not a template guess.","0x03001ebc dereferences to a runtime-block pointer (games/gs1/include/battle_effect_runtime.h's struct BattleRuntime, whose unknown_1d0[0x0a] padding covers offset 0x1d8=472 -- not renamed here, header left untouched to avoid disturbing its many other callers) and 0x02000240+500(0x1f4) is exactly games/gs1/include/party_state.h's struct PartyState.current_owner -- both confirmed by matching field width/offset against already-committed headers, not guessed.","Sibling Func_08091d84 (games/gs1/src/object/call_spawn_routine_at_origin.c) is s32(s32), a thin wrapper over Func_08015390(value,0,0,0); used here as a yes/no confirm gate matching the surrounding message flow.","m2c workbench (cargo run --manifest-path tools/compiler/Cargo.toml -- workbench games/gs1/recon/en/main/08091a58.c) ran cleanly once main:08091a58 was given the {\"name\":\"PartyInventory_GiveItem\"} registration this session added to source-paths.json (workbench requires a registered owner symbol; the matching '.global PartyInventory_GiveItem' alias label was added to games/gs1/asm/08091a58.s immediately above the existing Func_08091a58 label, verified present in the retained assembly's own exports). m2c's --valid-syntax draft against the real agscc type context independently reproduced the same control-flow shape, message IDs (0x96a/0x96b/0x977/0x978/0x979/0x97a/0x97c), and both global accesses this hand trace already had, which is strong corroboration rather than a separate source of evidence.","Iterated three source-shape variants via workbench objdiff: (1) a first draft using early 'return' statements inside a for(;;) loop scored 56.5% (candidate 415, later variants smaller); (2) caching Data_03001ebc's dereferenced value in a named 'base' pointer (avoiding 2 of 3 restore sites re-dereferencing the global from scratch) raised it to 61.0%; (3) caching the full field address ('s16 *fld = (s16*)((u8*)Data_03001ebc+472)') instead of the base pointer alone raised it further to 61.7% (candidate=400, differing_halfwords=214, wrong_instructions=137) -- the version kept.","Residual is register-role/tail-merge allocation, not a remaining algorithm or control-flow gap: the reference caches the runtime-block pointer permanently in fp and spills the saved field value to the stack for two of its three restore sites while keeping it register-resident for the third (the path reachable without entering the retry loop), producing three textually-distinct-but-logically-identical restore sequences that GCC never merges. This candidate's allocator instead keeps the saved value uniformly in fp across all three call sites, so two of the three restore sequences become byte-identical and GCC 2.96 tail-merges them into one shared block, which in turn forces an extra unconditional branch (the immediate-success path can no longer fall straight through into its own inline restore). This is the same qty_compare/local-alloc tie-break-by-RTL-discovery-order residual class already traced to alchemy-gcc/agscc/gcc/local-alloc.c and documented as architecturally uncontrollable by plain source reordering in games/gs1/recon/en/dossiers.json#main:080a8c2c (confirmed there across four independent owners this session); this owner's declaration-order and statement-order variants (swapping saved/fld computation order, narrowing saved to s16) all measured zero effect on the split, consistent with that finding. No register hint, asm(), or PERM_GENERAL forcing was used.","Adoption gate not met: differing_halfwords=214, candidate_bytes=400 != owner_bytes=452. This candidate claims zero DONE bytes.","Recovered only from retained owner assembly (games/gs1/asm/08091a58.s), the approved local ROM, already-adopted exact sources under games/gs1/src/ (inventory/add_to_party.c, inventory/get_quantity.c, inventory/discard.c, item/get_definition.c, item/adjust_counter.c, ui/render/finalize_pending.c), in-repository headers (item.h, inventory.h, owner_state.h, party_state.h, types.h, battle_effect_runtime.h, global_cells.h), sibling recon draft games/gs1/src/object/call_spawn_routine_at_origin.c and games/gs1/src/ui/runtime/push_value_slot.c, and the approved compiler plus its m2c workbench. No other Golden Sun decompilation project, GS2 evidence, or external source was inspected."]},"main:08093874":{"schema_version":1,"namespace":"main","address":"0x08093874","status":"measured-draft","owner_bytes":240,"candidate_bytes":236,"differing_halfwords":110,"wrong_instructions":62,"classification":"effect-child-object-lifecycle","family":{"template":"main:080937b8","template_source":"games/gs1/src/battle/effects/objects/spawn_linked_resource_object.c"},"domain":"Looks up a BattleEffectLinkedObject by id and, depending on the low two bits of flags, releases its existing child link object (mode 0), always spawns a fresh child (mode 2), or reuses an existing child if present else spawns one (mode 1/3); the child is then mode-configured (SetMode/Func_08009098 per case), tagged with the parent's id, given the template's callback/visual-clear pair, linked back to the parent, and has its visual flags merged from either its own or the parent's visual flags depending on bit 0x100 of flags -- the same two-branch mask/OR merge as the family template, reusing the same 12/13 literal masks and the same struct layout (visual at +0x50, resource-link at +0x68, callback at +0x6c).","notes":["The raw candidate-show score is dominated by a single upstream length mismatch: the reference reserves two extra prologue instructions (`movs r5,#0` / `movs r6,#0`, initializing the child pointer and a resource-clear zero before the object==0 test) that no C spelling tried here retains -- every straightforward path (`child = 0;` as an initializer, as a separate first statement, before or after the null check, paired with or without a matching `s32 zero = 0;` for the `object->resource = 0;` write in the release branch) gets eliminated as a provably-dead store, since every reachable path already overwrites `child` before use. A `volatile` qualifier does force the store back but overcorrects (forces stores everywhere else too, regressing to 254 candidate bytes), so it was rejected as not a genuine source-shape fix.","With `--align`, the reference and candidate line up almost instruction-for-instruction for the entire rest of the function once this 4-byte prefix gap is discounted: identical branch structure for the mode==0/2/(1-or-3-with-existing-resource) three-way dispatch (including which sub-case is placed inline vs. out-of-line), identical switch-style case-1/case-2 tail using `beq` chains (not nested if/else with `bne` skips), identical literal masks (13/-13/4, 12) and register roles for the visual-flags merge, and the corrected `child->resource = object` back-reference store (the initial draft had this backwards as `object->resource = child`, which is a genuinely different field write and was the single largest structural bug found and fixed).","Getting the visible field layout right required two real corrections beyond the missing prologue: (1) the child object's mode/setup dispatch is a `switch` on `flags & 3`, not an if/else-if chain -- the two compile to different branch shapes even though semantically identical; (2) the trailing back-reference store is `child->resource = object`, not `object->resource = child` (which is only true inside the mode==1 case, separately).","This is a source-shape gap (the exact C idiom that keeps the two dead-looking prologue stores alive in GCC 2.96's weak liveness analysis), not a scheduling residual -- worth a second pass if a sibling owner in this family is found to need the same two-register early-zero prologue, since that would reveal the triggering idiom.","Recovered only from retained GS1 assembly, the exact-C family template (080937b8) and its already-registered struct/callee types, and the approved compiler. No GS2 evidence or external source was used."]},"main:08093e28":{"schema_version":1,"namespace":"main","address":"0x08093e28","status":"proven-retained","owner_bytes":376,"candidate_bytes":376,"differing_halfwords":11,"wrong_instructions":18,"classification":"field_effect_compiler_allocation","family":{"template":"main:08092708","template_source":"games/gs1/src/battle/effects/objects/run_rising_sequence.c"},"domain":"Looks up the active effect object (Data_02000240[125]) and derives its ground-grid X/Z tile from the integer half of its fixed-point x/z position. If a static one-shot flag is already set, resets the object (mode 10, teardown state) and clears the flag. Otherwise it computes the object's grid cell index into two parallel 128-wide tile-attribute tables (0x02010000 / 0x02010200) and aborts if their per-cell 'kind' bytes disagree or a placement probe (Func_08009220) rejects the position; on success it re-anchors the effect at the snapped tile, marks the flag active, and starts it moving toward the tile with an upward Y offset.","notes":["measured=2026-08-30 (retained): placing one shared `failure:` tail after the normal return reproduces the reference's two long branches and reduces the exact-length candidate from 53 to 11 differing halfwords with equal topology. The residual is one localized reciprocal low-register allocation family in the grid-index and parallel-table comparison. The allocator decoder identifies the reciprocal role swap but finds no unique safe source edit; its finite permuter honestly reports that this owner lacks the single reciprocal site required by the catalog operation.","cross-edition=2026-08-30 correction: the comparator's zero Japanese row is the edition-delta baseline, not a candidate-versus-ROM exactness score. Permanent retention rests instead on the directly measured English evidence: complete semantics, exact 376-byte extent, equal topology, one localized reciprocal register-role family, bounded source experiments, and the allocator decoder/permuter verdict.","The listed family template (08092708, run_rising_sequence.c) supplied only the general object/WaitFrames/mode shape; the actual control flow, tile-snap arithmetic, and dual-table comparison were reconstructed directly from the assembly with no close template match.","Candidate matches the reference length exactly (376/376 bytes). The largest fix was branch polarity: the static-flag check must be written `if (flag == 0) { } else { }` -- the reverse ordering (testing `flag != 0` first) makes GCC place the reset path inline and the success path out-of-line, which is not what the reference does. A second fix was the tile-index arithmetic: it must be written as two sequential `if (x < 0) x = ...; x >>= 4;` guard statements (matching the assembly's fallthrough-then-shift shape) rather than a `(cond ? a : b) >> 4` ternary, which GCC compiles into extra out-of-line branches. A third fix corrected the struct's byte-offset layout (field_20 at 0x14, field_28 at 0x28, value_55 at 0x55, value_5a at 0x5a) after an initial padding-array miscount had them all landing 12-16 bytes too far into the struct.","Remaining differences are register/slot allocation only: which physical register the compiler assigns to grid_x vs. grid_z intermediates, the order it evaluates the two parallel-table pointers before their byte loads, and where exactly (relative to `mov fp,r1`) it schedules the `sub sp,#24` frame-reservation instruction (found by trial to require a 6-word stack array here even though only 3 words are read/written, which fixed the stack size but not this scheduling position). No further respellings tried moved these register/scheduling choices to match.","Recovered only from retained GS1 assembly, the exact-C family template, and already-established local function signatures (Func_08092054, Func_080916b0, Func_080920e8, Func_080091e0, Func_08009080, Func_0809163c) from the wider source tree. No GS2 evidence or external source was used.","measured=2026-08-29: Declaring tile_z before tile_x (reversing the prior order) at the top of the function, combined with moving `result` into the inner `position[6]` block instead of declaring it at function scope, reduced differing_halfwords from 113 to 64 and wrong_instructions from 36 to 38->34 depending on exact ordering noise between runs; 64/38 is the reproducible figure kept in this file. This did not reach zero.","measured=2026-08-29: Reversing grid_x/grid_z declaration order (grid_z before grid_x) regressed the score (differing_halfwords rose to 66); reverted.","measured=2026-08-29: Restructuring the two early-return failure sites (`if (kind mismatch) {Func_08091750(); return -1;}` and `if (result != 0) {Func_08091750(); return -1;}`) to share one `goto fail; ... fail: Func_08091750(); return -1;` tail (C89 goto/label) did not reproduce the reference's shared/merged tail or its trailing dead-code block; instead it changed candidate size to 380 bytes (vs. reference's 376) and topology to equal-but-`missing-extra-code`, with differing_halfwords rising to ~172-174. GCC 2.96 did not tail-merge the two call sites from this goto shape the way hypothesized, so shared-tail-via-goto is refuted as a way to reproduce the reference's dead trailing `bl;movs r0,#1;negs r0,r0` block. Reverted.","Note on environment: while iterating on this owner, the working copy of 08093e28.c was observed changing on disk between tool calls in ways this session did not perform (declaration order and duplicate/removed local declarations toggling, at least one instance of an unrelated `goto fail;` restructuring appearing and disappearing) -- a second concurrent agent/session was independently editing this same file. This made some incremental A/B comparisons noisy; every figure recorded in this dossier was re-verified against the file content actually on disk immediately before recording it.","measured=2026-08-29: Rewriting `s32 tile_x = TILE_HI(object,8) & 0xfff0; s32 tile_z = TILE_HI(object,16) & 0xfff0; s32 grid_x = 8+tile_x; s32 grid_z = 8+tile_z;` as `s32 grid_x = 8 + (TILE_HI(object,8) & 0xfff0); s32 grid_z = 8 + (TILE_HI(object,16) & 0xfff0); s32 tile_x = grid_x - 8; s32 tile_z = grid_z - 8;` (computing grid_x/grid_z directly and deriving tile_x/tile_z from them, instead of the reverse) fixed the `sub sp,#24` vs `mov fp,r1` prologue-scheduling divergence noted above (they now match exactly) and dropped differing_halfwords from 60 to 53, wrong_instructions from 34 to 24. This is the single largest improvement found this session. Kept.","measured=2026-08-29: Prior to the fix above, restructuring the kind-mismatch early return from `if (kind != kind2) { fail } else { }` to `if (kind == kind2) { } else { fail }` (flipping the polarity so the failure path is the trailing `else` of the outer `if`, mirroring the already-required flag-check polarity) dropped differing_halfwords from 113 to 60 on its own, before the grid_x/tile_x change above was applied. This is a second, independent required-polarity fix (distinct from the flag-check one already on record) and is kept.","measured=2026-08-29: With both of the above fixes applied, nesting the inner `if (result != 0) { fail }` early return as `if (result == 0) { } else { fail }` (matching the same flip applied to the outer kind-check) is score-neutral (still differing_halfwords=53) but causes GCC to emit a second physical copy of the `Func_08091750(); return -1;` tail inline (visible as extra instructions right after the success path in the diff) rather than reference's single shared/merged copy reached by a long branch. The plain early-return form (`if (result != 0) { fail } `) produces byte-for-byte identical output at the same differing_halfwords=53 without this duplication risk, so it was kept in preference to the nested form.","measured=2026-08-29: Converting the OUTER kind-check from if/else form back to a leading guard clause (`if (kind mismatch) { fail } { }`, i.e. guard-clause style instead of if/else-with-fail-in-else) regressed sharply to differing_halfwords=106. This confirms the outer kind-check specifically requires the if/else-with-fail-in-else polarity (guard-clause style is wrong here), unlike the inner result-check where either form scores the same. Reverted.","measured=2026-08-29: None of the following score-neutral (still 53) or regressing register-allocator nudges closed the remaining gap, all reverted: swapping grid_z/grid_x declaration order back after the fix above (regressed to 63); swapping tile_z/tile_x declaration order alone (regressed to 62-64 depending on combination); reordering `position[0..2]` assignment statements from x,y,z to z,y,x (regressed to 57); swapping the `Data_02010000`/`Data_02010200` operand order in the kind comparison (regressed to 55); writing `index = (index_z<<7)+index_x` instead of `index_x+(index_z<<7)` (regressed to 54); replacing `tile_x+23`/`tile_z+23` with algebraically-equivalent `grid_x+15`/`grid_z+15` (neutral, kept the tile_x/tile_z form for readability); moving the `s32 result;` declaration to various positions relative to `tile_x`/`tile_z`/`position` (neutral); extracting `Data_02010000[index].kind`/`Data_02010200[index].kind` into separate `u8 kind_a`/`kind_b` locals before comparing (regressed to 55). The remaining 53 differing halfwords are concentrated in one spot: which physical register (r2 vs r3) the compiler assigns to the `index_x` bounds-check/shift temporary right before it is stored to `sl` -- reference reuses r3 for both `index_x` and the later `index_z` processing, candidate uses a fresh r2 for `index_x`. This appears to be a GCC 2.96 local-register-allocator liveness/pressure artifact rather than something controllable from this statement's own source form; no respelling tried moved it. A downstream `bne.n` branch-offset difference (0x110 vs 0x106 in the flag check, and correspondingly 0x106 vs 0x14a in the two failure-path compares) is very likely a pure byte-offset consequence of this one register/instruction-count difference rather than an independent structural issue -- it was not separately pursued.","Cumulative result this session: differing_halfwords 113 -> 53 (53% reduction), wrong_instructions 36 -> 24, via two required if/else polarity fixes (outer kind-check, matching the already-known flag-check pattern) and one data-flow reordering fix (computing grid_x/grid_z first and deriving tile_x/tile_z from them, which also fixed the sub-sp/mov-fp prologue scheduling). Did not reach differing_halfwords=0; `make verify` was not run since the owner is not yet byte-exact. Best-known state is committed to this file as-is."],"sr_route_evidence":{"verdict":"COINCIDENTAL","measured":"2026-08-29","note":"asm/08093e28.s loop bodies (.L0-.L5) contain no retained empty countdown loop; the two large loops (.L0 27 lines/7 mem ops, .L2 72 lines/21 mem ops) were not traced instruction-by-instruction for SR-sensitive addressing. No dual-compile performed. Provisional COINCIDENTAL pending compiler diff."}},"main:08093fa0":{"schema_version":1,"namespace":"main","address":"0x08093fa0","status":"measured-draft","owner_bytes":436,"candidate_bytes":432,"differing_halfwords":169,"wrong_instructions":60,"family":{"template_guess":"battle/effects/orbiting_particles/run.c","template_guess_score":7383,"template_guess_confidence":"low","template_guess_verdict":"rejected -- shape-only prologue match, unrelated actual semantics; no shared callee, field offset, or constant with this owner","real_sibling":"main:08093e28 (games/gs1/recon/en/main/08093e28.c, itself an unregistered measured-draft, dossier classification 'grid-effect-placement')","real_sibling_basis":"same object accessor (Object_GetById(Data_02000240.object_id)), same Data_02000240.mode_1f2 one-shot flag idiom, same 8+ (x>>16 & 0xFFF0)/(z>>16 & 0xFFF0) tile-snap-with-negative-guard arithmetic, same 128-wide-row two-table kind-byte comparison (this owner compares Data_02010000 against Data_0200fe00, i.e. the table 0x200 BEFORE 0x02010000, where 08093e28 compares Data_02010000 against Data_02010200, the table 0x200 AFTER -- consistent with a small family of sibling owners each comparing an adjacent parallel tile layer), same Func_08009220(position*) placement probe, same ObjectMotion_SetPositionAndCommit/CommitCurrentPositionAndActivate reposition pair, and near-identical address (0x08093fa0 is 0x178 bytes after 0x08093e28)."},"domain":"Reads the active battle-effect object (Object_GetById(Data_02000240.object_id)), snaps its ground-plane x/z to an 8px-centered 16px grid cell, and toggles a one-shot state (Data_02000240.mode_1f2) between two behaviors: when inactive, it verifies the destination cell's kind byte agrees between two parallel 128-wide tile-attribute tables (0x02010000 vs 0x0200fe00) and that a placement probe (Func_08009220) accepts the object's exact current position, then re-anchors the object at the snapped grid cell, runs a short dispatch/wait animation sequence (commands 6, 7, 12) with an upward velocity_y ramp, and marks the flag active; when already active, it repositions the object via a direct 4-argument set-position call (Func_08009150) offset by +0x80000 on y and -0x100000 on z, commits/activates the position, snaps terrain_height to the current y, and clears the flag.","notes":["Every call target, struct field offset, and shared global was independently traced from games/gs1/asm/08093fa0.s by hand (PC-relative literal-pool arithmetic, effective_addr = align4(instr_offset+4)+imm) before any tooling was run, then cross-checked against games/gs1/include/object_runtime.h (x/y/z/terrain_height/velocity_y/speed_limit/animation/animation_kind/flags/action_flags all match struct ObjectRuntime's real offsets exactly) and games/gs1/include/battle_effect_runtime.h (mode_1f2 at 0x1f2, object_id at 0x1f4 of struct BattleWork Data_02000240 match exactly -- 0x02000434 in this owner's literal pool is simply &Data_02000240.object_id).","Object_GetById, BattleRuntime_Reset (Func_080916b0), ObjectMotion_SetPositionAndCommit (Func_08092158), ObjectMotion_CommitCurrentPositionAndActivate (Func_080923c4), and BattleRuntime_WaitIfModeZero (Func_0809163c) are already-adopted exact sources in games/gs1/src/; this owner is a genuine caller of all five. Func_08009080 is a long-call veneer (games/gs1/asm/08009080.s) to 0x0800c300 = already-adopted object/dispatch/apply_argument_to_children.c (ObjectDispatch_ApplyArgumentToChildren); Func_080091e0 is a veneer to 0x0800c528 = already-adopted-but-unnamed games/gs1/src/object/dispatch/set_single_child_field26.c, whose body (`if ((arg0[0x54]&0xf)==1) (*(u8**)(arg0+0x50))[0x26]=arg1;`) is the exact write-back counterpart of this owner's own read of the same object+0x50->+0x26 byte, confirming the read/modify/write relationship. Func_080030f8 and Func_08009150/Func_08009220 remain unadopted (their games/gs1/asm/*.s retained files still exist); WaitFrames(s32) is the project-wide established call convention for Func_080030f8 (used with an explicit frame-count argument in dozens of other adopted files, e.g. games/gs1/src/battle/run_simple_presentation.c, battle/motion/initialize_actor_records.c), even though one already-adopted zero-argument call site (battle/runtime/wait_if_mode_zero.c) declares it as WaitFrames(void) -- both are correct for their own call site's compiled bytes, which this project already tolerates.","Ran the m2c structural workbench (games/gs1/recon/en/main/08093fa0.c registered as source-paths.json main:08093fa0 -> unidentified/main/battle/battle_owner_69.c, with a matching '.global battle_owner_69' alias added to games/gs1/asm/08093fa0.s immediately above '.global Func_08093fa0'). m2c's independently-recovered control flow, field offsets, and call targets match this hand-trace exactly with zero discrepancies -- strong independent corroboration of the semantic reconstruction. objdiff reports 79.9% instruction match (207 instructions, 109 unchanged, 63 argument-only mismatches, 2 opcode mismatches, 1 replacement, 18 deletions, 16 insertions) against the pre-goto draft.","The 2026-09-01 family pass found and repaired two real source-shape errors. Loading both signed tile coordinates before applying one named 0xfff0 mask reproduces the reference's shared-mask schedule instead of interleaving the mask with the second load. Declaring the long-lived variant before those coordinate snapshots reproduces its early constant materialization and fp lifetime. Together these repairs reduce the scored residual from 181 differing halfwords / 93 wrong instructions to 169 / 60 without changing the 428-byte extent.","The same pass restored the late address-valued Value_00000001 constant separately from the early numeric variant initializer. The reference loads 0x00000001 from its literal pool after Func_080923c4, then reuses that carrier for both the variant OR and action_flags store; keeping this carrier in a narrow block reproduces that load and grows the candidate from 428 to 432 bytes. The four-byte remaining extent gap is the reference's mid-function pool and long tile-mismatch branch layout: the candidate still places the pool at the tail and reaches the shared failure block with one short conditional branch. Positive-body, negative-guard, explicit-else, and shared-goto spellings compile identically here, so no artificial padding or forced scheduling was added.","Bounded route probes on the repaired source leave routed GCC 2.96 at 432 bytes / 169 differing halfwords / 60 wrong instructions. The gcc296 family is identical; old-agbcc regresses to 408/215/265. `-fno-regmove`, `-fno-schedule-insns`, `-fno-gcse`, `-fno-cse-follow-jumps`, `-frerun-cse-after-loop`, `-fno-strength-reduce`, `-fno-expensive-optimizations`, and `-O3` do not close the owner; `-fno-cse-follow-jumps` reaches the 436-byte extent but regresses to 186 differing halfwords / 88 wrong instructions and remains structurally different. Did not force register assignment, use inline assembly, add barriers, or register an owner-specific route.","Recovered only from retained GS1 assembly (games/gs1/asm/08093fa0.s), the already-adopted exact sources named above, the closest measured-draft sibling 08093e28.c/.json in this repository, the project's own object_runtime.h/battle_effect_runtime.h headers, the approved compiler's own candidate-show/workbench output, and the m2c structural workbench run against this repository's own retained assembly and type context. No GS2 evidence, other decompilation project, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","Adoption gate not met: differing_halfwords=169, not 0, and candidate_bytes=432 != owner_bytes=436. Registered games/gs1/source-paths.json main:08093fa0 -> unidentified/main/battle/battle_owner_69.c (matching this project's established convention for a definitely-battle/object-subsystem owner whose exact semantic role -- most plausibly a submerge/emerge or grid-anchor toggle for a battle-effect object -- is not yet confidently nameable) and added the required '.global battle_owner_69' alias to games/gs1/asm/08093fa0.s; no games/gs1/src/ file was created since the draft is not exact."]},"main:08094154":{"schema_version":1,"namespace":"main","address":"0x08094154","status":"measured-draft","owner_bytes":136,"candidate_bytes":128,"differing_halfwords":65,"classification":"allocation-and-scheduling","notes":["This complete semantic draft resolves an object, calculates camera-relative integer X/Z distance, applies the type-one height adjustment, and returns the reference success/failure values.","The candidate is eight bytes short and the remaining residual includes object/distance register allocation, state-load scheduling, and compiler formation of the incremented output pointer.","Retained assembly remains authoritative and this draft claims zero bytes. No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:080941e0":{"schema_version":1,"namespace":"main","address":"0x080941e0","status":"measured-draft","owner_bytes":256,"candidate_bytes":272,"differing_halfwords":130,"wrong_instructions":125,"classification":"screen-transition-fade-effect","family":{"id":"template-main-080a7380","template_owner":"main:080a7380","template_source":"games/gs1/src/menu/open_character_selector.c","note":"Clustered by prologue similarity only. This owner is NOT a character-selector: it plays three sound cues (Func_080f9010), checks a mode field at Data_03001ebc-deref+414 against 3, and runs one of two nearly-identical 16-iteration branches that write an OR'd bit pattern to a hardware-style address each frame while ramping three packed sub-fields, first setting one palette-RAM halfword to white (0x7fff) via Func_080901c0. No allocation, no character-id table, no row_positions loop -- none of the template's shape applies; only the general Data_03001ebc-state-pointer and Data_02000240-array conventions used elsewhere in this project were reused."},"notes":["Read the raw assembly directly. High confidence: three Func_080f9010 sound-cue calls (args from Data_02000240+494 as s16, then literal 288, then literal 147); mode = *(s16*)(state+414) where state=Data_03001ebc dereferenced; branch on mode==3; each branch clears state+454 to 0, calls WaitFrames(16) [Func_080030f8], then runs a 16-iteration loop calling WaitFrames(1) each pass while three sub-values (starting 0x7800, 960, 30 in one branch counted up, mirrored counted down in the other) are OR'd together and stored to a fixed halfword address, ramping by +0x401 / -64 / -2 per iteration.","Low confidence, unverified: the exact hardware/VRAM addresses. I guessed 0x050001e6 and 0x05000000 for the two 'write 0x7fff then Func_080901c0(addr,16)' calls (plausible palette-RAM slots given the 0x05000000-range magnitude visible in one branch's `movs r5,#160; lsls r5,r5,#19` = 0x05000000 construction), and guessed 0x04000008/0x0400000a (BG2 affine register range) for the per-frame packed-value write purely by elimination -- I did not independently confirm either address against a memory map, so both are placeholders, not verified reconstructions.","Also re-hit the same extern-array constant-folding issue already documented on 08099838.json: writing `Data_02000240[247]` (u16-typed index) as an s16 read gets compile-time-folded by this toolchain into a single pooled absolute address, whereas the reference computes the 247*2=494 byte offset via runtime `movs+lsls+adds` arithmetic. This is the same unresolved compiler-internals gap noted there, not something I re-solved here.","Given the address uncertainty and the size of the gap (125 of roughly 115 total instructions differ, i.e. most of the function), this is a genuine source-shape-plus-unverified-target-address gap, not a near-miss. Next step should be identifying the real target addresses (likely from other confirmed owners in this codebase that already reference the same palette/register locations) before attempting another respelling pass.","Adoption requires 0 differing_halfwords."]},"main:0809537c":{"schema_version":1,"namespace":"main","address":"0x0809537c","status":"measured-draft","owner_bytes":564,"candidate_bytes":560,"differing_halfwords":181,"wrong_instructions":118,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/0809537c.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 8129bp) seeded an m2c control-flow recovery over the complete symbolized owner, cross-checked callee signatures against already-exact siblings (battle/effects/objects/spawn_linked_resource_object.c, battle/effects/burst_particles/run_main_object.c, battle/effects/object_control/resume_object.c, battle/effects/heavy_impact/finish.c, and three Func_08092054 sites)","family_template":"main:080b1a14","pc_relative_references":2,"jump_tables":0},"notes":["This is a battle-effect spawn routine: it looks up the caller's object (Func_08092054(arg0)) and a fixed shared object (Func_08092054(Data_02000240[125])) to derive a palette/style word, plays three sound-and-window beats (Func_08096bec/Func_08092560/Func_08009158 x3), classifies a kind value read through the object's field+0x50/+0x28 into one of three timing constants, then spawns and links a fixed 8-entry chain of child objects via Func_080090c8 before a closing beat and Func_08091750() return. No loop over player input at all -- the family match is purely on instruction-shape/register-pressure cosine similarity, not semantics. Every non-trivial callee signature here (Func_08092054(s32), Func_080090c8 4-arg, Func_08009080/Func_080091e0/Func_08009240 2-arg, Func_080925cc(id,1)) is independently confirmed by five already-adopted exact siblings, so the call shape and argument counts are solid, including catching that the raw m2c draft's two 'unset register' Func_08092054 reads are actually genuine calls with the function's own r0 argument (a single s32 parameter) reused verbatim rather than zero-arg calls.","The raw m2c draft (0 params, garbage self-referential `sp0 = &sp0 + 0x10` for the 8-entry object array, narrow types) scored badly on a first read; declaring the real `s32 Func_0809537c(s32 arg0)` signature, replacing the array-address garbage with an explicit `void *list[8]; void **list_ptr = list;` (matching the field's own persisted-pointer idiom seen on 08029554 and 08021488), and fixing the two Func_08092054 call sites to pass `arg0` and `Data_02000240[125]` respectively brought the candidate to 560 vs 564 bytes, 118 wrong instructions on the first scored attempt -- within 4 bytes of exact.","Remaining disagreement is narrow: (1) the shared 'style' value that survives from the two Func_08092054 lookups through all three beat calls sits in `fp` in the reference but `r9` in every candidate tried (a register-allocation swap of the same kind seen on every other owner in this batch); (2) a small negative bitmask (`field &= -0xD`) compiles to a single `movs r3,#0xF3` immediate load in the candidate but to a two-instruction `movs r3,#13; negs r3,r3` materialization in the reference -- tried both an outer-cast and an inner-cast spelling of the same expression with no change, so this is a genuine instruction-selection choice tied to some other part of the expression context, not the cast placement.","This reads as a last-mile compiler-scheduling/selection residual on an otherwise fully confirmed call sequence and field layout, not a remaining source-shape gap -- the closest of the four measured-drafts in this batch (4 bytes short) and a good candidate for permuter-style bounded search.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."],"sr_route_evidence":{"verdict":"COINCIDENTAL","measured":"2026-08-29","note":"asm/0809537c.s loop bodies (.L0-.L4) all contain memory ops; no register-only empty countdown loop found. The two large loops (.L3 53 lines/11 mem ops, .L4 55 lines/23 mem ops) were not traced for SR-sensitive addressing under a dual compile. Provisional COINCIDENTAL pending compiler diff."}},"main:08095680":{"schema_version":1,"namespace":"main","address":"0x08095680","status":"measured-draft","owner_bytes":248,"executable_owner_bytes":248,"candidate_bytes":248,"differing_halfwords":90,"wrong_instructions":84,"domain":"For each id 8..65, looks up a matching battle-action descriptor and its object-table slot, and, when a packed field of the global battle work state clears a game flag and range-check, repositions the matched object and sets its mode.","bounded_search":{"mode":"hand-traced","attempted":6,"exact":false,"reason":"The 7223/10000 family-transplant guess (battle/presentation/set_actor_modes.c) is a confirmed false positive: shape-only register-shuffle prologue match, unrelated Data_03001e74 global, zero shared call targets. The genuine subsystem, found by hand-tracing the retained assembly's own call targets and constants, is the BattleAction_FindDescriptor/BattleEffect_FindDescriptor/BattleEffect_RunDescriptorAction cluster (0x0808d394/0x0808d48c/0x0808d5dc): this owner calls Func_0808d394 (registered name BattleAction_FindDescriptor) by the same loop id it also feeds to ObjectTable_Get (Func_0808ba1c), against the same Data_02000240 global those three siblings use. The struct field at Data_02000240+0x1f4 matches battle_effect_runtime.h's already-declared BattleWork.object_id exactly, and games/gs1/src/battle/effects/objects/start_effect_22.c's exact, adopted `Data_02000240[125]` confirms that same offset/array-style access is the project's real idiom for it. The matched object's writes at +0x14 and +0x55 line up exactly with object_runtime.h's ObjectRuntime.terrain_height and .flags. Both position-setter and mode-setter calls (0x080090f0, 0x08009080) are far-call veneers per the project-wide _call_via_rN-adjacent idiom; 0x08009080's real target (0x0800c300) is already named Object_SetMode in types.h, and 0x080090f0's real target (0x0800d130, retained in games/gs1/src/object/motion/set_position_and_reset_motion.c) sets object->x/y/z and clears target_x/y/z/velocity, matching the (obj,x,y,z) call shape traced here exactly.","notes":["Structure now matches closely: call order, branch targets (several byte-identical), the 141<<2 offset-564 synthesis, and the object_id-pointer hoist ahead of the loop all reproduce the reference. The residual is address-computation register choice (reference keeps the Data_02000240 base in r5 for the whole prologue; this candidate's allocator puts it in r6/sl and the difference cascades through nearly every register letter downstream) plus one load-pattern mismatch: marking the packed flag word's two same-address reads (unsigned low-12-bits, signed high-nibble) as volatile is required to stop this compiler's CSE from merging them into one load the way the reference visibly does not, but it also changes the signed half's codegen from a single ldrsh to a 3-instruction ldrh+lsls+asrs, which the reference does not show either. Tried and rejected: several -fno-{gcse,strength-reduce,expensive-optimizations,cse-follow-jumps,rerun-cse-after-loop,regmove,thread-jumps,cse-skip-blocks} flag combinations, both --family alternatives (gcc296, old-agbcc), and non-volatile M2C_FIELD/array-index/local-pointer phrasings of the Data_02000240 accesses -- none changed the base-register or double-load residuals.","Verification was cut short mid-session by shared-worktree infrastructure damage: roms/gs1-en.gba (and gs1-ja.gba) became self-referential symlinks partway through this session, breaking every fresh (non-cached) candidate-show run. The 248/100/78 figure recorded at that time turned out to be unreliable -- a fresh, forced (non-cached) recompile in a clean worktree against the confirmed-restored ROM, done independently after the session recovered, measured 248/90/84 instead. The cache apparently held a result computed during the corruption window rather than a genuinely stale-but-valid entry. 90/84 is the authoritative, re-verified score; the source and analysis above are otherwise unchanged."]},"notes":["Recovered only from retained owner assembly (games/gs1/asm/08095680.s), the approved GS1-EN ROM, already-adopted exact C under games/gs1/src/ (object/table/get.c, battle/effects/objects/start_effect_22.c, object/motion/set_position_and_reset_motion.c), in-repo headers (battle_effect_runtime.h, object_runtime.h, types.h, game_flags.h), and the approved compiler. No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","The residual exceeds the adoption gate (differing_halfwords must be 0). Retained assembly remains authoritative and this draft claims zero DONE bytes.","No descriptive name was registered: the subsystem (battle-action/effect descriptor dispatch) is well evidenced, but the specific gameplay action this owner performs is not confident enough for a semantic function name yet."]},"main:08095c08":{"schema_version":1,"namespace":"main","address":"0x08095c08","status":"proven-retained","owner_bytes":456,"executable_owner_bytes":456,"candidate_bytes":456,"differing_halfwords":7,"wrong_instructions":0,"classification":"battle_effect_compiler_scheduling_mismatch","resolved_asm_classification":{"kind":"battle_effect_compiler_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":396,"core_identical":true,"starts":{"ja":"0x0808cbf0","en":"0x08095c08","de":"0x080992a4","es":"0x0809ac94","fr":"0x0809ac94","it":"0x08095c94"}},"domain":"Updates one of the 24 caller-created effect slots through radial movement, a hidden delay, a second radial target, and final cleanup.","expressed":["initial radial target selection from the slot origin","copying the linked source object's two mode bits to the particle object","target-arrival state transitions and the 40-frame callback delay","hiding and restoring the particle before targeting the source position","the state-five cleanup path and both locally evidenced audio cues"],"bounded_search":{"safe_heat_walks":{"runs":4,"requested_candidates_per_run":5000,"attempted_candidates":20000,"compile_failures":0,"exact_candidates":0,"best_differing_halfwords":11},"classic_exact_only_heat_walk":{"requested_candidates":10000,"attempted_candidates":10000,"compile_failures":142,"exact_candidates":0,"best_differing_halfwords":7,"best_wrong_instructions":0,"best_shape":"a do-while-zero spelling around the origin-X assignment"},"current_approved_compiler_classic_heat_walks":{"runs":2,"seeds":[101,907],"requested_candidates_per_run":20000,"attempted_candidates":40000,"compile_failures":587,"exact_candidates":0,"best_differing_halfwords":7,"verdict":"generic AST mutation axis closed after two independent runs without improvement"}},"compiler_axes":{"tied_at_readable_baseline":["routed","gcc296","-fno-schedule-insns","-fno-gcse","-fno-rerun-cse-after-loop","-fno-cse-follow-jumps","-fno-cse-skip-blocks","-fno-sched-interblock","-fno-sched-spec","-fno-sched-spec-load","-fno-sched-spec-load-dangerous","-fno-strength-reduce","-O3"],"regressed":["-fno-schedule-insns2","-fno-regmove","-fno-expensive-optimizations","old-agbcc"]},"residual":[{"scope":"state-zero transition into linked-object mode-bit copying","candidate":"increments and stores the state byte before copying the source pointer from r9 to r1","reference":"copies the source pointer first, then increments and stores the independent state byte","equivalence":"the register move neither reads nor writes the state pointer or state byte","resynchronization":"both streams have identical registers and memory before loading source->linked_object"},{"scope":"state-two origin capture and object mode-bit clearing","candidate":"loads the object flag before materializing -13 and stores the masked flag before adding 71 to the independent effect pointer","reference":"materializes -13 before the independent object-flag load and forms effect+71 before storing the masked object flag","equivalence":"the swaps exchange only independent register work and an object-byte store with an address-only add; all values and memory writes are identical","resynchronization":"both streams match again before storing 4 to effect->flags"}],"rejected_experiments":[{"experiment":"spell the state-two object-flag clear through the already-live object_flags carrier used by the exact state-zero and state-one blocks","result":"GCC emits the same 456-byte candidate and the same seven differing halfwords; the explicit temporary is coalesced before scheduling and does not change either residual hunk"},{"experiment":"sweep GCC 2.96's shipped post-reload scheduler sub-options across both retained family members","result":"enabling and disabling interblock scheduling, speculative scheduling, speculative loads, and dangerous speculative loads is byte-neutral for both owners (7 and 5 differing halfwords); the family mismatch is not controlled by those route flags"},{"experiment":"name an alias of source before incrementing the state byte","result":"the alias is eliminated and the seven-halfword schedule is unchanged"},{"experiment":"preload source->linked_object through a named carrier before incrementing the state byte","result":"moves both the high-register copy and dependent load ahead of the increment, disturbs the low-register roles, and regresses to 11 differing halfwords / 12 wrong instructions"}],"notes":["The retained ordinary-C reconstruction emits the complete 456-byte owner extent, all calls, branches, registers, memory operations, constants, and literal words. A do-while-zero lifetime around the state-two origin-X capture reproduces the best known seven-halfword schedule; only the two localized scheduling hunks differ.","The seven-halfword shape was independently rediscovered from the recorded classic-search verdict and is now the canonical candidate. No searched ordinary-C source emits the retained order exactly.","Relocation-aware comparison of the independently assembled retained owner proves all 396 unmasked core bytes identical across the six GS1 editions.","The caller at 0x08095dd0 installs this callback on 24 effect slots and later advances those slots to states two and five; the name and domain do not infer an effect identity beyond that local behavior.","Recovered only from retained owner assembly, approved local GS1 ROMs, local callers and effect-slot types, and the approved compiler. No GS2 evidence or external game source was used."]},"main:08095dd0":{"schema_version":1,"namespace":"main","address":"0x08095dd0","status":"proven-retained","owner_bytes":460,"executable_owner_bytes":460,"candidate_bytes":460,"differing_halfwords":2,"wrong_instructions":0,"classification":"battle_effect_compiler_scheduling_mismatch","resolved_asm_classification":{"kind":"battle_effect_compiler_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":284,"core_identical":true,"starts":{"ja":"0x0808cdb8","en":"0x08095dd0","de":"0x0809946c","es":"0x0809ae5c","fr":"0x0809ae5c","it":"0x08095e5c"}},"domain":"Runs the locally linked phased-radial-particle callback across 24 effect slots, advances the active slots through states two and five, and restores the target object before cleanup.","expressed":["the source and target object lookup and early return","the observed audio and motion sequence on the source object","normalizing the source position and configuring all 24 effect slots","installing BattleEffect_UpdatePhasedRadialParticle as each slot callback","the delayed state-two and state-five transitions for active slots","restoring the target object's callback and scale before effect cleanup"],"bounded_search":{"safe_heat_walk":{"requested_candidates":20000,"attempted_candidates":20000,"compile_failures":896,"exact_candidates":0,"best_differing_halfwords":11,"best_wrong_instructions":0},"classic_exact_only_heat_walk":{"requested_candidates":10000,"attempted_candidates":10000,"compile_failures":270,"exact_candidates":0,"best_differing_halfwords":9,"best_wrong_instructions":0,"best_shape":"a do-while-zero spelling around EffectSlot_SetObjectMode"},"current_approved_compiler_classic_heat_walks":{"runs":2,"seeds":[211,811],"requested_candidates_per_run":20000,"attempted_candidates":40000,"compile_failures":908,"exact_candidates":0,"best_differing_halfwords":8,"verdict":"generic AST mutation axis closed; lower structural-row variants regressed to nine differing halfwords and were rejected"}},"compiler_axes":{"tied_at_readable_baseline":["routed","-fno-schedule-insns","-fno-sched-interblock","-fno-sched-spec","-fno-sched-spec-load","-fno-sched-spec-load-dangerous","-fno-strength-reduce","-fno-expensive-optimizations","-fregmove","-O3"],"regressed":["-fno-schedule-insns2","-fno-gcse","-fno-rerun-cse-after-loop"]},"residual":[{"scope":"arming the source-object callback","candidate":"shifts the already materialized 0x80 argument into 0x4000 before materializing the zero argument","reference":"materializes the independent zero argument between the 0x80 materialization and its shift","equivalence":"the shift writes r1 and the zero materialization writes r2; neither reads the other register","resynchronization":"both streams have identical r0, r1, and r2 at the following call"}],"notes":["The retained ordinary-C reconstruction emits the complete 460-byte owner extent with identical calls, branches, registers, memory operations, constants, literal words, and control flow outside one two-halfword instruction-ordering tie.","Removing synthetic do-while-zero wrappers around the callback call and the two state-loop scopes preserves ordinary C89 block lifetimes, makes the entire state-five loop exact, and reduces the candidate from five to two differing halfwords. Using the function parameter directly also removes an unnecessary alias without changing the emitted register roles.","Relocation-aware comparison of the independently assembled retained owner proves all 284 unmasked core bytes identical across the six GS1 editions.","The exact caller at 0x080955b0 selects this runner for page two, and this owner installs the locally named callback at 0x08095c08 on each of 24 slots before later advancing those slots to states two and five.","Recovered only from retained owner assembly, approved local GS1 ROMs, local callers and exact battle-effect sources, and the approved compiler. No GS2 evidence or external game source was used."],"rejected_experiments":[{"experiment":"compile the owner under its era-appropriate semantic identifier instead of the Func_08095dd0 ABI identifier","result":"GCC emits the same callback-argument order and the same two-halfword residual; compiler symbol hashing does not control this scheduling tie"},{"experiment":"materialize the callback zero argument in a fresh narrow block local","result":"unlike reusing the long-lived value carrier, the fresh local is byte-neutral: GCC folds it to the same late r2 materialization and the candidate remains at five differing halfwords"},{"experiment":"give the state-five loop a fresh narrow active-slot pointer instead of reusing the function-scope slot_state carrier","result":"the pointer receives the same r2 allocation and GCC still schedules the independent constant-five materialization first; the complete candidate remains byte-for-byte unchanged"},{"experiment":"regenerate the owner with aggregate-plus-exact-family m2c context from the seven exact siblings in unit-08095a44","result":"m2c independently reconstructs the same direct callback call and separate state-loop carriers; after applying the known shared types, these are the same source dimensions already tested and expose no missing structural or type repair"},{"experiment":"sequence the state-five slot-base assignment before producing constant five in one comma expression","result":"GCC correctly proves the assignments independent and emits the same five-halfword schedule; the expression adds no real data dependency"},{"experiment":"sweep GCC 2.96's shipped post-reload scheduler sub-options across both retained family members","result":"enabling and disabling interblock scheduling, speculative scheduling, speculative loads, and dangerous speculative loads is byte-neutral for both owners (7 and 5 differing halfwords); the family mismatch is not controlled by those route flags"},{"experiment":"extract the two active-slot loops into a static inline helper taking the state value","result":"changes the surrounding allocation and regresses to 48 differing halfwords / 52 wrong instructions"},{"experiment":"add the independently corroborated three-s32 prototype for ObjectMotion_ArmCallback","result":"no change from the eight-halfword candidate"},{"experiment":"explicit s32 mark = N local (2, 5) replacing the inline constant in each block","result":"a shared or function-scope carrier regresses to 13 differing halfwords / 4 wrong instructions; separate narrow block locals instead close the state-two hunk and preserve the reference r1 allocation"},{"experiment":"hoisting remaining=23 above WaitFrames(100) before the second block instead of inside it","result":"no change from the in-block reorder; the scheduler window does not extend past the WaitFrames call"},{"experiment":"source-order, do-while-zero, nested-scope, and comma-expression barriers around the state-five slot-base copy","result":"all compile identically at five differing halfwords; GCC schedules the independent r1 constant before the sl-to-r2 copy in this later allocation context"},{"experiment":"materialize the callback's zero argument through the existing value carrier","result":"extends the carrier lifetime across the function and regresses to 232 differing halfwords / 72 wrong instructions"}],"score":{"differing_halfwords":2,"note":"Ordinary block scopes make both state loops exact. One independent callback-argument scheduling tie remains and wrong_instructions stays zero."}},"main:080965a8":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080965a8","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":572,"score":{"measured":"2026-08-26","candidate_bytes":580,"reference_bytes":572,"differing_halfwords":194,"wrong_instructions":54,"class":"missing-extra-code","current_note":"The candidate now expresses every reference call, including the previously omitted Object_SetMode(child,0) between Func_08009240 and Func_080091e0. That correctness repair exposes the real remaining allocator/frame mismatch: candidate 580 bytes versus the 572-byte reference, with a 48-byte rather than 52-byte frame and different long-lived homes for the child-array and context carriers. The larger raw residual is retained because omitting observable behavior to improve a similarity score is not acceptable.","note":"Page-1 sibling of BattleEffect_FinishHeavyImpact (battle_owner_21.c's Func_080955b0 dispatch table): same source object lookup, WaitFrames/Audio_PlayCue/Func_080925cc opening beats, and the same base+0x58/count=23 EffectSlot spawn tail and NormalizeVector call, all byte-identical in the candidate. The reference additionally spawns 8 child objects in a do-while(count=7) loop via Func_080090c8 (a type read through a two-level pointer chase at ctx+80/+40), links them through Func_08096c48 into an accumulator, then advances ctx's y by 0x80000 for 15 frames, destroys ctx and all 8 children, and conditionally calls Func_08003f3c before the tail. Most of that shape is expressed and byte-matches; the residual concentrates in two spots: (1) the compiler spills the ctx/child pointer walk to sp+20 and keeps a second live copy in fp for reuse by the final destroy loop, where the candidate instead recomputes the array address each time (costs ~20 halfwords across two hunks and the resulting frame-size/offset cascade, sp+48 vs sp+52); (2) a call the reference makes between Func_08009240(child,9) and Func_080091e0(child,0) -- almost certainly Object_SetMode(child,0) given the shared bl target address with the later Object_SetMode(Object_GetById(...),28) call -- could not be reproduced without a much larger regression (adding the call as a plain statement pushed differing_halfwords from 89 to ~190 by disturbing the loop's r8/sl register scheduling); it is left out and recorded as a rejected experiment. All literal pool addresses (0x03001f30, 0x00204084, 0x08096575, 0x02000240, 0x0809641d) and every constant (240, 0xF000, offsets 6/24/28/35/85/90/104/108) are confirmed exact against the disassembly."},"rejected_experiments":[{"experiment":"Insert Object_SetMode(child, 0) between Func_08009240(child,9) and Func_080091e0(child,0), matching the reference's extra adds/movs/bl fff72ad8 sequence","result":"regresses from 89 to 190 differing halfwords (54 wrong instructions) -- the added statement shifts register pressure and the compiler rescheduled the whole r8/sl linked-list-accumulator tail of the loop body differently; the missing call is left unexpressed rather than accepted at a worse global score"},{"experiment":"Introduce a persistent children_ptr = children; local reused by both the write loop and the final 8-item destroy loop (mirroring the reference's fp-resident array base)","result":"identical 89 halfwords -- the compiler recomputes the array address at each use point regardless (does not promote the alias into fp), so the source-level reuse has no codegen effect here"},{"experiment":"Wrap Func_080958a8()/base=.../Func_080b0048() in a do-while(0) block matching finish.c's exact template idiom, to force base's stack spill (str r3,[sp,#4]) instead of fp residency","result":"identical 89 halfwords -- no effect on register allocation for base"},{"experiment":"Swap WaitFrames(1); count--; order in the y+=0x80000 tail loop","result":"identical 89 halfwords -- pure scheduler artifact, independent instructions reordered by the compiler regardless of source order"},{"experiment":"--family old-agbcc","result":"284 differing halfwords, 279 wrong instructions -- far worse, wrong compiler family for this owner"},{"experiment":"-fno-schedule-insns2 flag","result":"114 differing halfwords -- worse than the routed/gcc296 baseline of 89"},{"experiment":"-fno-expensive-optimizations flag","result":"89 differing halfwords but wrong_instructions rises to 41 -- no net improvement"},{"measured":"2026-08-29","experiment":"Replace slot/children_ptr split with a single children_ptr pointer reused (post-increment) in both the spawn loop and the destroy loop, removing the separate slot variable","result":"regresses to 203 differing halfwords / 113 wrong instructions -- disturbs the array-address recomputation shape entirely; rejected"},{"measured":"2026-08-29","experiment":"Convert the base+0x58/base+152 pointer-chase read at the top of the function into an alternate but semantically identical parenthesization/spacing (single combined cast chain)","result":"regresses to 197 differing halfwords -- sed-applied reformat altered operator grouping enough to change codegen; rejected"},{"measured":"2026-08-29","experiment":"Convert the spawn do-while(count=7) loop into an equivalent for(count=7; count>=0; count--) loop","result":"identical 89 halfwords -- do-while and for produce identical codegen here, no effect on the base/children_ptr register-vs-stack allocation","kept":false},{"measured":"2026-08-29","experiment":"Type-width/style sweep on base, ctx, prev, acc, type, child, work, state (s32 vs void* vs s8*, cast placement variants, hex vs decimal literal spellings, arithmetic-equivalent expression rewrites for count/last/state/work stepping, hoisting Data_02000240[125] into a temp, wrapping counters in identity arithmetic like count=24-1) -- roughly 30 distinct variants","result":"all identical 89 halfwords (a few malformed sed rewrites regressed and were discarded, not counted as real hypotheses) -- confirms the residual is the compiler's own register allocator/scheduler decision (base kept in fp vs reference's stack spill at sp+4/sp+8, and a second live copy of the children array base pointer in fp for the destroy loop) and is not reachable through any C89 source-level restructuring tried; consistent with and reinforces rejected experiments #1-4 above"}],"notes":["2026-08-30 temper correction: Object_SetMode(child,0) is present in the reference and is now expressed. The older score note and rejected-experiment prose describing its omission are historical and superseded by score.current_note; correctness takes precedence over the smaller incomplete score.","2026-08-31 retained-assembly proof: with Object_SetMode(child,0) restored, the complete candidate has equal branch topology and accounts for every reference call, argument, literal, constant, field access, loop, and observable store. The residual is confined to the compiler's 48-byte frame and fp-resident context/children carriers versus the reference's 52-byte frame and equivalent sp+4 spill/array-base homes, plus the resulting pool displacement. The allocator decoder names the interlocked acc/count/carrier roles but finds no unique source edit; the bounded pointer, loop, type, statement-order, lifetime, compiler-family, and pass probes recorded above preserve the residual or regress. Relocation-normalized cross-edition verification proves all 384 core bytes identical across all six GS1 editions (42 relocations and five literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/080965a8.s, a hand-written .syntax unified Thumb listing with its own provenance comment citing build_asm.ts/control-flow-scan byte verification), the approved local ROM, the byte-exact template/sibling sources games/gs1/src/battle/effects/heavy_impact/finish.c and games/gs1/recon/en/main/08095dd0.c (BattleEffect_RunPhasedRadialParticleSequence), games/gs1/src/object/spawn.c and games/gs1/src/object/replace_resource_entry.c for callee signatures/semantics, games/gs1/src/battle/effects/run_page_effect_for_slot.c for the caller's dispatch context (page 1 of Func_080955b0's four-way branch), in-repository headers (types.h, fixed_math.h, effect_0809b11c.h, battle_calc.h), and the approved compiler via tools/compiler candidate-show.","Every callee address in the retained listing was cross-checked against types.h's #define table (Object_GetById=Func_08092054, WaitFrames=Func_080030f8, Audio_PlayCue=Func_080f9010, Object_SetMode=Func_08009080, NormalizeVector=Func_080974d8, ObjectMotion_ArmCallback=Func_08092adc, EffectSlot_SetObjectMode=Func_0809ba70, EffectSlot_SetCallback=Func_0809ba7c, BattleEffect_ClearActiveSlotsAndScheduleUpdates=Func_080958e4) and against the candidate-show tool's own bl-target diff, so every named call in the draft is address-verified, not guessed.","Function name kept as Func_080965a8 (undetermined semantic name): battle_owner_21.c declares it only as void Func_080965a8(s32) alongside its three named siblings, and no header or recon record in the tree assigns it a name.","This candidate claims zero DONE bytes."]},"main:08097194":{"schema_version":1,"namespace":"main","address":"0x08097194","status":"proven-retained","owner_bytes":248,"candidate_bytes":248,"differing_halfwords":7,"wrong_instructions":8,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"domain":"Removes active scene-effect objects, waits briefly for two effect callbacks to drain, restores the saved scene position, and releases the effect asset.","bounded_checks":["Recovered the battle global cells as one registry walk rooted at 0x03001f30: the runtime and position pointers are loaded from root-116 and root-192, exactly matching the reference's single literal and two base-relative loads. Reusing the exhausted 24-object loop counter for the later 64-slot scan recovers the reference's r5 lifetime, full four-high-register save set, and exact 248-byte extent. Naming both active update callbacks and ordering the waited/active/scan initializers from their reference lifetimes closes the remaining independent scheduling rows. Fresh score: 7 differing halfwords and 8 wrong instructions, all confined to the reciprocal r6/r7 scene-object/active-field cursors in the first loop.","The old 109-halfword whole-function register permutation was not an irreducible allocator floor: it was caused by two missing source identities—the shared pointer-registry base and the reused loop counter. After those repairs, only one localized reciprocal r6/r7 cursor choice remains. Explicit duplicate object cursors, byte/signed-byte cursors, declaration order, and assignment order preserve that swap or regress the signed-byte load, so no register forcing was retained."],"notes":["Recovered from retained owner assembly, all local callers, adjacent battle-effect state, and the approved compiler through the exact-family workbench.","Every caller invokes this owner without arguments; the generated two-argument signature was inherited from the unrelated exact template and has been corrected.","Generated register, stack-slot, and control-flow labels were replaced with role-based names before retaining the candidate.","Typed global-state layouts, the shared pointer-registry walk, and a signed activity byte produce the exact owner extent and improve the raw m2c draft from 119 to 7 differing halfwords.","The earlier 5,000-candidate safe family-template walk produced no improvement because it did not cover registry-base recovery or counter-identity reuse; those two evidence-named repairs account for the subsequent reduction.","2026-09-01 permanent classification audit: canonical GCC 2.96, gcc296-family routing, no-regmove, no-schedule-insns, no-GCSE, no-CSE-follow-jumps, rerun-CSE-after-loop, and no-expensive-optimizations all preserve the exact 248-byte candidate and seven-halfword/eight-instruction reciprocal r6/r7 cursor floor. No-schedule-insns2 regresses to 27 differing halfwords, no-strength-reduce to 74, and old-agbcc to 119. The annotation-free permuter rejects the residual because it cannot identify one unique safe source repair for the paired cursor/waited roles; prior explicit duplicate cursor, byte-pointer, signed-byte-pointer, declaration-order, and assignment-order probes preserve or regress it.","Cross-edition verification using the exact retained object locates the owner in JA 0x0808e17c, EN 0x08097194, DE 0x0809a830, ES/FR 0x0809c220, and IT 0x08097220. All 196 bytes outside six call relocations and seven literal fields are identical across all editions.","The complete ordinary-C semantics, exact extent, branch topology, calls, literals, accesses, and all behavior outside the reciprocal first-loop cursor allocation are proved. Forced registers, compiler barriers, inline assembly, and forced scheduling are prohibited, so the byte-exact structured assembly is retained under the existing battle-effect allocation-module class."],"compiler_probe":{"baseline_differing_halfwords":7,"neutral":["gcc296-family","-fno-regmove","-fno-schedule-insns","-fno-gcse","-fno-cse-follow-jumps","-frerun-cse-after-loop","-fno-expensive-optimizations"],"regressed":{"-fno-schedule-insns2":27,"-fno-strength-reduce":74,"old-agbcc":119}},"cross_edition":{"size":248,"relocation_bytes":24,"literal_bytes":28,"core_bytes":196,"core_identical":true,"starts":{"ja":"0x0808e17c","en":"0x08097194","de":"0x0809a830","es":"0x0809c220","fr":"0x0809c220","it":"0x08097220"}},"decision":"Retain the byte-exact structured assembly as a proven battle-effect compiler-allocation module. The complete ordinary-C reconstruction remains the semantic source artifact; all 248 owner bytes count as DONE."},"main:08097384":{"schema_version":1,"namespace":"main","address":"0x08097384","status":"proven-retained","owner_bytes":264,"executable_owner_bytes":264,"candidate_bytes":264,"differing_halfwords":68,"wrong_instructions":86,"cross_edition":{"object_bytes":264,"relocation_bytes":40,"literal_bytes":52,"relocation_normalized_core_bytes":172,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x0808e36c","en":"0x08097384","de":"0x0809aa20","es":"0x0809c410","fr":"0x0809c410","it":"0x08097410"}},"domain":"Initializes shared graphics and selects the resource variant used by a broad family of battle effects.","expressed":["DMA-copies the primary scene resource block","conditionally copies the alternate scene block when its runtime flag is clear","copies the shared workspace block used by the effect family","selects one of eight resource variants from the active state and available resources","loads the selected shared resource and finalizes effect setup"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate has exact 264-byte extent but remains 68 differing halfwords and 86 wrong instructions away, outside the <=20-halfword admission gate."},"notes":["Independent object analysis proves all 172 relocation-normalized core bytes identical across the six approved GS1 editions.","The helper is shared by at least six recovered battle-effect owners. The residual spans DMA operand allocation and eight unrolled resource checks rather than a localized compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect callers, and the approved compiler. No GS2 evidence or external source was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080974d8":{"schema_version":1,"namespace":"main","address":"0x080974d8","status":"complete-structured-asm","owner_bytes":104,"candidate_bytes":104,"differing_halfwords":2,"cross_edition":{"core_bytes":92,"core_identical":true,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"0808e4c0","en":"080974d8","de":"0809ab74","es":"0809c564","fr":"0809c564","it":"08097564"}},"classification":"ordering","retention":"keep_structured_asm","notes":["The complete owner has two locally evidenced branches: mode 3 converts the helper result to 16.16 coordinates; the other mode subtracts the masked scene origin from an existing position.","Reusing the address of Data_03001ebc to reach the related pointer at address minus 76 repairs every literal, register allocation, and instruction outside one store/load pair.","The only residual is `str r3,[r6]` before `ldr r2,[r6,#4]`; the reference emits those two independent instructions in the opposite order.","Two bounded classic searches evaluated 50,000 ordinary-C candidates without improving the two-halfword residual; scheduling, GCSE, regmove, and expensive-optimization diagnostics also produced no exact candidate.","Cross-edition analysis proves all 92 normalized core bytes identical in JA, EN, DE, ES, FR, and IT. Retained assembly is permanent under the repository's structured-assembly contract.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:080983a0":{"schema_version":1,"namespace":"main","address":"0x080983a0","status":"proven-retained","owner_bytes":288,"candidate_bytes":312,"differing_halfwords":124,"classification":"hidden_register_context_caller_module","notes":["The caller constructs the scene-coordinate field address in r8 and preserves it through the call to 0808f32c; that callee reads incoming r8 before defining it while taking no ordinary argument for the value. Ordinary C cannot express that caller/callee contract without a fixed register or inline assembly, both disallowed, so the byte-exact retained assembly is Proven ASM.","This complete semantic draft reconstructs the battle-effect setup, scene-coordinate transfer, display setup, optional helper dispatch, state publication, nineteen-frame update loop, and delayed callback.","The candidate is 24 bytes long and diverges in long-lived register allocation and literal-pool placement; retained assembly remains authoritative and this draft claims zero bytes.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"line 12: mov r6,r9 vs mov r6,r8 plus differing push set and dozens of real operand mismatches; class missing-extra-code, wrong_instructions=120","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."}},"main:08098698":{"schema_version":1,"namespace":"main","address":"0x08098698","status":"measured-draft","owner_bytes":432,"candidate_bytes":438,"differing_halfwords":207,"wrong_instructions":229,"family":{"exact_c_callers":["main:080985a8","main:080985fc"],"exact_c_caller_bytes":240,"aggregate_reusable_bytes":672},"cross_edition":{"core_bytes":356,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x0808f68c","en":"0x08098698","de":"0x0809bd40","es":"0x0809d730","fr":"0x0809d730","it":"0x08098730"}},"notes":["The exact ObjectVisual_CopyAttributes operation at games/gs1/src/object/visual/copy_attributes.c proves the 10-bit visual-attribute merge uses an explicit 0xfffffc00 carrier and left/right extraction, not independent 16-bit 0xfc00/0x03ff masks. Transplanting that already-exact operation and correcting the following high-nibble copy to byte offset 9 (the high attribute byte, as the retained owner shows) removes six surplus candidate bytes and the two false mask literals. The remaining broad register cascade precedes this now-exact semantic block; fresh candidate is 438/432 bytes with equal conditional-branch structure under the allocator decoder.","Complete typed producer shared by both exact-C burst-particle entry paths. It spawns twenty-four objects around the current battle target, copies the embedded visual child traits, configures scale, velocity, animation and mode, then randomizes each object around the battle origin with variant-specific positioning.","The exact 84-byte main-object path and exact 156-byte full-effect path establish the family entry conditions, random-vector convention, waits, sounds, and sole call contract; the family covers 672 executable bytes.","The first readable model compiled to 444 bytes against the 432-byte owner. Exact-corpus stamping has reduced it to 438 bytes; the broad candidate still claims zero bytes and is not eligible for permanent classification.","Independent relocation-aware matching proves all 356 normalized core bytes identical at unique JA, EN, DE, ES, FR, and IT anchors. Fifteen call relocations and four literal fields explain the regional raw differences.","Recovered only from retained GS1 assembly, the local exact-C callers and particle/object analogues, the approved compiler, and the six local GS1 editions. No GS2 or external source was used."]},"main:08098848":{"schema_version":1,"namespace":"main","address":"0x08098848","status":"proven-retained","owner_bytes":268,"candidate_bytes":268,"differing_halfwords":2,"wrong_instructions":0,"classification":"compiler_local_scheduling_mismatch","resolved_asm_classification":{"kind":"compiler_local_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"objdiff_class":"ordering","family":{"family_matcher_top_guess":"main:08092708 (battle/effects/objects/run_rising_sequence.c), score 7485/10000, LOW confidence","family_matcher_verdict":"false positive, confirmed by reading the source","real_siblings":["main:08098954 (RunBattleEffect07, measured-draft, 108 differing halfwords)","main:08099da4 (unnamed mode-11 handler, measured-draft/m2c output)"],"real_callees_in_src":["main:08098a84 SpawnItemBreakEffectMode3 (games/gs1/src/battle/effects/item_break/spawn_mode_3.c, exact)","main:080981b0 UpdateRisingParticleBurst (games/gs1/src/battle/effects/rising_particle_burst/update.c, exact)","main:0809748c BattleEffect_PrepareBufferInterpolation (games/gs1/src/battle/effects/interpolate/prepare.c, exact)"]},"notes":["The family-transplant matcher's top guess (main:08092708, battle/effects/objects/run_rising_sequence.c, 7485/10000, below the 7500 threshold anyway) is a false positive: same register-shuffle prologue shape, zero shared callees with this owner. Object_GetById/Object_SetPosition/ObjectMotion_ArmCallback/BattleEffect_SpawnBurstParticle/Object_CommitPosition/BattleEffect_PlayQueuedSound (run_rising_sequence.c's callees) do not appear anywhere in 08098848.s. This confirms the session-wide pattern described in the task: shape-only matches in this cluster are unreliable even near/above threshold.","The real identity was found by hand-tracing 08098848.s and cross-referencing its literal pool constant 0x03001f30 (Data_03001f30, the shared battle-effect scene pointer) and callee addresses against already-registered names in games/gs1/source-paths.json and types.h. This owner is the case-7 handler of the second ('targeted') battle-effect dispatcher Func_08096960 -- 'case 7: Func_08098848(target_id); break;' -- the sibling of RunBattleEffect07 (0x08098954, case 7 of the *first* dispatcher RunBattleEffect/0x08096810). The incoming target_id argument (r0) is loaded by every case in Func_08096960's switch but is never read anywhere in 08098848.s (r0 is only ever written before its first use), matching the same already-adopted pattern in RunBurstParticleMainObject (0x080985a8) and StartOrbitingParticleEffect (0x08099128), both of which are declared void(void) in their exact C despite being called with an argument.","Strongest corroborating evidence is main:08099da4 (the mode-11 sibling in the same dispatcher, an unresolved m2c-workbench draft): its opening ~15 instructions are almost line-for-line identical to this owner -- same guard (scene->0x14 'child' != 0), same Func_08097384() call, same main_object->0x68 = child link, same Object_SetCallback(main_object, 0x0809f0bc) call, same +0x200000/-0x200000/+0x100000 position construction from scene->{4,8,12}. The only structural difference at that point is which spawn helper is used (SpawnItemBreakEffectMode1 there vs SpawnItemBreakEffectMode3 here) -- and this owner's choice of SpawnItemBreakEffectMode3 matches RunBattleEffect07's own choice for the same mode-7 spawn. child->0x6c is confirmed as a callback-function-pointer field by three independent already-adopted or drafted sources (item_break/start.c's parent+0x6c, item_break/update_fragment.c's Object_SetCallback callers, and 08099da4's identical 'M2C_FIELD(child, ..., 0x6C) = 0x08096B89' assignment -- the exact same constant this owner writes).","Behavior: guard on scene->child; link main_object->0x68 = child; retarget main_object's callback to Data_0809f0bc; spawn two SpawnItemBreakEffectMode3 anchors mirrored +/-0x200000 in x around the scene origin (angles 0x8000 and 0, matching RunBattleEffect07's own anchor pair exactly); WaitFrames(15); launch each live anchor via ObjectMotion_SetTargetPositionFromMagnitudeAngle(anchor, 0xe0000, anchor->angle); Object_CommitPosition(anchors[0]); point child->0x6c at ObjectGroup_ApplyRandomChildValues; Audio_PlayCue(130); set child->0x55 = 4; then, guarded on both anchors being live, raise anchors[0]->y, anchors[1]->y, and child->y together by 0x4000 per WaitFrames(1) tick until child->y exceeds its starting value by 0x200000; finally hand both anchors to the already-exact UpdateRisingParticleBurst (which itself plays a cue, keeps rising, spawns its own particle spray, and destroys the object it was given), and call BattleEffect_PrepareBufferInterpolation unconditionally.","Recovered from a from-scratch hand-trace of the retained assembly (no m2c workbench run was needed once the field/constant cross-references above locked the structure), verified instruction-by-instruction against games/gs1/asm/08098848.s and iterated with candidate-show --align down from an initial 54 differing halfwords to 2. The two fixes that mattered: (1) computing x/y/z into named scalars used directly by the first SpawnItemBreakEffectMode3 call, while re-reading the same values from the on-stack position[] array for the second call -- mirroring exactly what 08099da4's independent m2c draft already does for its own twin call pair; (2) writing the post-loop overflow guard as the literal inline comparison 'start_y <= start_y + 0x200000' (evaluated twice, once in the guard and once in the loop condition) instead of hoisting it into a named target_y local, so GCC-2.96 -O2 resynthesizes the 128<<14 immediate at each use site the way the reference does instead of caching it.","Remaining 2-halfword / 0-wrong-instruction residual is a pure GCC-2.96 -O2 scheduler ordering swap: the reference issues the reload of anchors[0] (needed two instructions later for the null-check guard) ahead of the unconditional store to child->0x55, while every source statement ordering tried here (store-before-load, load-before-store, an explicit named temporary for anchors[0], hoisting the byte-flag address into its own pointer variable) either reproduces the same swap in the other direction or regresses the surrounding codegen by 8 bytes. objdiff reports class=ordering with wrong_instructions=0, i.e. the same instructions, adjacent, swapped -- the same flavor of irreducible local-scheduler residual already documented on the sibling RunBattleEffect07 (0x08098954, 08098954.json), which never got fully to zero either. Not adopted: CONTRIBUTING's gate is differing_halfwords == 0.","Recovered only from retained GS1 assembly, already-registered names in games/gs1/source-paths.json and games/gs1/include/types.h, already-adopted exact sibling C (item_break/{start,spawn_mode_3,update_fragment}.c, rising_particle_burst/update.c, run_item_break_sequence.c, burst_particles/run_main_object.c, orbiting_particles/start.c), the two in-repo unresolved drafts referenced above, and the approved compiler. No other decompilation project or external disassembly was consulted."],"bounded_source_probe":{"tool":"tools/shape-search/search.ts","depth":6,"legal_variants":10,"best_differing_halfwords":2,"verdict":"miss"},"compiler_decision":{"dump":"GCC -da pass 23 sched2","source":"alchemy-gcc/agbcc/gcc_arm/sched.c:rank_for_schedule","finding":"The unconditional byte store and independent stack reload are both ready before the following guards. The scheduler's equal-priority tie falls through to original INSN_LUID order; ordinary statement, temporary, and address-hoisting variants preserve that order or change surrounding code generation."},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":202,"core_identical":true,"starts":{"ja":"0x0808f83c","en":"0x08098848","de":"0x0809bef0","es":"0x0809d8e0","fr":"0x0809d8e0","it":"0x080988e0"}},"decision":"Retain the byte-exact structured assembly as a proven local compiler-scheduling mismatch. The complete ordinary-C reconstruction remains the semantic source artifact and all 268 owner bytes count as DONE."},"main:08098954":{"schema_version":1,"namespace":"main","address":"0x08098954","status":"proven-retained","owner_bytes":304,"candidate_bytes":304,"differing_halfwords":108,"wrong_instructions":80,"classification":"battle_effect_twin_compiler_allocation_module","family":{"structural_twin":"main:0809a294","shared_tail":"main:08099da4","aggregate_reusable_bytes":1872},"notes":["This complete typed reconstruction creates two effect-specific anchor objects around the battle origin, configures both, then creates and randomizes twenty-four secondary objects before releasing the anchors.","RunBattleEffect07 and RunBattleEffect11 are 304-byte instruction/control-flow twins. Their call skeletons differ only at the two effect-specific constructor calls, and the same create/configure/release tail recurs inside the 1,264-byte RunBattleEffect05/11 owner.","Using the exact Random16 return type from the local exact-C corpus removes three spurious zero extensions and gives the readable model 296 bytes, 132 differing halfwords, and 94 wrong instructions. This is a broad source-shape baseline, not an exact-C or narrow-residual candidate, and it claims zero bytes.","Instantiating the same typed template for 0809a294 reproduces this score and residual map exactly. A joint explicit-cursor/countdown rewrite regresses both siblings identically, so the readable baseline is retained.","A bounded earliest-divergence matrix found that moving the origin declaration is byte-neutral, while block-scoped pointer/countdown loops preserve the eight-byte deficit and regress the Effect07 residual to 139 differing halfwords / 96 wrong instructions. The deficit is therefore not a simple stack-array declaration or loop-syntax artifact.","Relocation-aware six-ROM matching is ambiguous because the two sibling runners have zero-difference normalized cores. The ambiguity independently confirms the family identity but does not establish a unique per-edition owner correspondence, so no regional claim is made.","Recovered only from retained GS1 assembly, local exact-C object-update analogues, the approved compiler, and the six local GS1 editions. No GS2 evidence was used.","Closed the eight-byte length gap (296 -> 304, matching the reference exactly) by (1) aliasing the second loop's position[] writes through an explicit local pointer (`s32 *pos = position;`) instead of the bare array, and (2) reordering the three origin-field assignment statements in both position-fill sites (top-level: z,y,x; loop body: y,x,z). An exhaustive PERM_GENERAL search over all 6x6x2 = 72 combinations of {top field order} x {loop field order} x {velocity/phase statement order}, on top of the pointer-alias change, confirms 108 differing halfwords / 80 wrong instructions is the floor of this axis space (out/permute/08098954/report.json). The pointer alias is the load-bearing change: without it the candidate stays 8 bytes short regardless of statement order, because gcc only splits the stack array's address into two live ranges (r5 at the top, a fresh r7 copy for the second loop, freeing r5 as loop-body scratch) when a named pointer variable gives it a second, loop-scoped reference point; a bare `position[i]` array access lets gcc keep one dedicated low register for the whole function instead, which is byte-cheaper but not what the reference does.","Remaining 108-halfword residual is concentrated in exactly the register-class swap this pointer alias does not reach: in both loops the reference keeps the walked pointer/position-array-copy in a low register (r7) and pushes the trip counter into a high register (r8, needing the expensive movs/negs/add/mov/cmp five-instruction decrement-and-test idiom), while the candidate's allocator keeps the loop-1 counter in the cheap low register (r7) and the loop-1 anchor pointer in r6/r0 directly, and needs no r8 spill there at all. Tried and empirically ruled out (all re-measured with candidate-show, none beat 108): renaming/duplicating the loop counter (dedicated variable per loop, both directions), an explicit pointer-cursor rewrite of loop 1 mirroring the exact `ObjectDispatch_ApplyValueToChildren` (games/gs1/src/object/dispatch/apply_value_to_children.c) countdown-pointer-walk idiom, a matching named-pointer alias for `anchors` (mirroring the `pos` fix), a temp for `anchor->parameter` before the call, and reassociating the y-field addend operand order. None of these change gcc's choice of which of the two live values gets the low register in loop 1, or fully separate the top-of-function position address from the loop-2 alias's live range (top-level still lands in r7 rather than the reference's r5).","Family proof, 2026-09-01: transferring this exact source shape to the ROM-identical RunBattleEffect11 twin produces the same 304-byte candidate, the same 108 differing halfwords, the same 80 wrong instructions, equal branch topology, and the same allocator-order constraints. The approved GCC 2.96 routes -fno-regmove, -fno-schedule-insns2, -fno-rerun-cse-after-loop, -fno-expensive-optimizations, -fno-gcse, and -fno-strength-reduce preserve the floor or regress it. Together with the exhaustive 72-shape source matrix, this proves a family-invariant allocator floor under ordinary C; retained structured assembly remains the byte-exact implementation."]},"main:08098cd8":{"schema_version":1,"namespace":"main","address":"0x08098cd8","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":832,"candidate_bytes":824,"differing_halfwords":318,"wrong_instructions":108,"classification":"battle_effect_compiler_materialization_module","resolved_asm_classification":{"kind":"battle_effect_compiler_materialization_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":652,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"kind":"classic_heat_guided_walk","seed":98,"candidates":20000,"compile_failures":214,"exact_candidates":0,"best_differing_halfwords":400,"best_candidate_bytes":812},"notes":["Complete first-pass semantic reconstruction of RunBattleEffect04, a direct sibling in the exact battle-effect dispatcher.","All six GS1 editions have an identical relocation-normalized 652-byte core.","The earlier bounded search improved structural alignment but not the byte residual; the later family reconstruction supersedes that broad draft.","2026-09-01 battle-effect family pass: replaced m2c's false pointer arithmetic across unrelated sp0/sp4/sp24 pseudo-locals with the evidenced four-slot spawned-object array, shared three-component position vector, saved child pointer, event context, and persistent array-start cursor. The runner writes three entries from sp+36 down through sp+28 and reads them upward; the unused fourth slot at sp+40 is what naturally restores the exact 44-byte frame without artificial padding. Reversing the two aggregate declarations restores the exact position/object-array slot order.","The reference reuses one source-level loop index across all four phases; m2c had invented four independent counters. Merging those artificial lifetimes makes GCC retain the index in r8 throughout, simultaneously restoring the reference's r9 scene carrier and sl position carrier. Typed signed scene flags recover the three explicit byte sign extensions, and a real Data_02000240 aggregate recovers the base-plus-0x1f4 access instead of a folded absolute address.","The exact item-break, RunBattleEffect07, and RunBattleEffect11 siblings all narrow a named s32 zero into object mode byte 0x55. Applying that evidenced family idiom improves the candidate to 824/832 bytes, 318 differing halfwords, and 108 wrong instructions. The complete ordinary-C reconstruction has the exact 44-byte frame and stack slots, equal conditional branch structure, and every reference call, literal, constant, loop, field width, and memory effect. The residual is equivalent low-register roles, zero rematerialization, and the resulting eight-byte mid-function literal-pool placement; the canonical route and all approved GCSE, regmove, scheduling, rerun-CSE, expensive-optimization, strength-reduction, and CSE probes preserve it or regress. Forced registers, literal loads, barriers, and inline assembly are disallowed.","Retained-assembly decision: the structured assembly remains the byte-exact implementation under battle_effect_compiler_materialization_module; the complete ordinary-C source is the semantic reconstruction and all 832 owner bytes count as DONE."]},"main:080994d0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080994d0","status":"proven-retained","owner_bytes":424,"executable_owner_bytes":422,"score":{"measured":"2026-08-26","candidate_bytes":424,"reference_bytes":424,"differing_halfwords":37,"wrong_instructions":62,"class":"allocation-uncovered","note":"Improved from a prior draft (400/207/140) by three idiom-matched respellings, each verified against the reference disassembly before adoption: (1) writing scale_y before scale_x in both spawn sites, matching the reference's str-offset-28-then-24 order exactly at both sites; (2) spelling the repeat-loop's `(index & 3) ? 9 : 10` call argument as an explicit if/else with the Func_08009240 call duplicated in each branch (matching the reference's two separate bl sites and .L4/.L5 labels) rather than as a single branchless ternary, which the compiler had compiled into a NEG/ORR/LSR boolean-normalize sequence not present in the reference; (3) introducing a second local (`particle`) aliased from the second spawned object's pointer, used specifically for the repeat-loop calls, the post-loop unconditional call, and the long_delay null check, while `object` continues to cover the field-write blocks and the remaining null checks -- this reduced wrong_instructions from 132 to 123 despite not fully reproducing the reference's register split (below). The remaining 207-halfword residual is concentrated in one region: the reference promotes three cross-call scalars into high registers (sl=state, r8/r9 shared across the link accumulator/link_marker/loop-invariant AND-mask) and keeps two live registers (r5 and r6) simultaneously bound to the identical second-spawned-object pointer at different call/check sites, while this compiler's value-numbering coalesces any two locals proven equal (confirmed: the `particle = object` copy itself is eliminated, and swapping which named local is read at which site produces byte-identical output), so it always keeps that pointer in a single register (r5) and only ever needs two high registers (r8, sl) rather than three. This is a genuine register-allocator sensitivity, not a semantic gap -- the field/call/branch structure, offsets, constants, and control flow all match the reference exactly wherever the diff aligns; every remaining `!` line is a register-name or literal-pool-offset consequence of this one allocation difference."},"classification":"battle_effect_compiler_allocation_module","family":{"exact_c_dispatcher":"main:08096810","exact_c_dispatcher_bytes":336,"aggregate_reusable_bytes":760,"template_owner":"main:08099160","template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Read in full. Confirms this owner's BattleEffect03Object struct is the same physical layout as the template's OrbitingParticle (angle/phase at the same offsets 100/102 as the template's lifetime/orbit_angle, callback/update pointer at the same offset 108), but this owner's control flow (eight phased objects linked via Func_08096c48, then one central object driven through a fixed mode-alternation loop) does not match the template's own loop shape (fifteen randomly-orbiting particles), so only field offsets/naming transferred, not loop structure."},"cross_edition":{"core_bytes":310,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080904c4","en":"0x080994d0","de":"0x0809cb78","es":"0x0809e568","fr":"0x0809e568","it":"0x08099568"}},"rejected_experiments":["Swapping index++/Func_080030f8(1) statement order in the first loop (call before increment instead of after): regressed 207->209 differing_halfwords; reverted.","Swapping which of object/particle is assigned first from the spawn call (object=call();particle=object; vs particle=call();object=particle;) with usage sites held fixed: byte-identical output in both directions, confirming the compiler coalesces by proven value equality, not by source-level variable identity.","Collapsing back to a single `object` local for the whole function (dropping the particle alias) after the if/else ternary fix: regressed wrong_instructions 123->131; the two-local split is a net win even though it does not reproduce the reference's r5/r6 register split."],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template/sibling sources, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Complete typed effect-3 runner reached directly from the exact-C battle-effect dispatcher. It creates and links eight phased objects above the target, runs the central object's timed mode alternation, then launches and releases it before invoking the optional battle-state completion callback.","Local exact-C object-spawn, mode, motion, random and delay functions establish the object fields and callback contract. Together with the exact dispatcher, this family covers 760 executable bytes.","Independent relocation-aware matching proves all 310 normalized core bytes identical at unique JA, EN, DE, ES, FR, and IT anchors. Twenty-three call relocations and five literal fields explain regional raw differences.","No GS2 or external source was used.","2026-09-01 route verdict: -fno-gcse is an evidenced shipped per-file route. It restores the exact 424-byte extent, equal branch topology, and all six literal-pool words at their exact offsets, improving 207 to 37 differing halfwords. The same route independently improves sibling fallback runner 0809abb4 from 165 to 124 differing halfwords, while regressing the other dispatcher runners, so it is registered only for these two source owners rather than as a subsystem-wide override.","The final apparent direct Func_080072f0 call was corrected to the typed state->finish_callback indirect call through the established r3 trampoline. This is byte-neutral because it describes what the reference already does, but it removes a false function model and satisfies the corpus call-via guard.","The shared index was split into spawn_index and flash_index, matching their disjoint lifetimes. GCC coalesces them back to the same carrier and emits byte-identical code, while the allocator decoder now identifies the remaining reciprocal role class rather than one artificially long source lifetime.","Retained-assembly proof: the complete ordinary-C reconstruction has the exact owner extent, exact branch topology, exact literal pool, every call and argument, every field width, both object loops, cleanup, optional indirect callback, and six-edition-normalized semantics. The only residual is the reciprocal target/index r6/r7 allocation and its downstream equivalent object carrier choices. Canonical flags are structurally worse; -fno-regmove, scheduler2, rerun-CSE, expensive-optimization, strength-reduction, and CSE probes preserve the routed floor or regress. The decoder finds no unique safe source repair, and fixed-register forcing is disallowed. Structured assembly therefore remains authoritative under battle_effect_compiler_allocation_module."]},"main:08099838":{"schema_version":1,"namespace":"main","address":"0x08099838","status":"proven-retained","owner_bytes":232,"candidate_bytes":232,"differing_halfwords":36,"wrong_instructions":12,"classification":"compiler_local_materialization_mismatch","exact_search":{"status":"not_run","candidate_cap":20000,"reason":"candidate is length-exact (232/232 bytes) with 36 differing halfwords and a matched 66-halfword prefix; residual is a single scheduler-driven register/instruction-count choice around the Func_08099678 callback setup, not yet closed"},"cross_edition":{"core_bytes":186,"core_identical":true,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0}},"notes":["Direct RunBattleEffect10 sibling in the battle-effect dispatcher.","Fresh cross-edition analysis measures 230 executable bytes plus final owner alignment and proves the 186-byte normalized core is identical in all six GS1 editions.","Ranked ahead of the other unresolved sub-432-byte RunBattleEffect siblings by exact-length proximity and current wrong-instruction count.","The complete initial candidate is two bytes short and remains broad in allocation and loop-carrier formation; it is preserved as evidence but is not adoptable.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM because the approved compiler's GREG pass cannot reproduce the reference callback-address materialization without forbidden register forcing.","Follow-up investigation (no candidate change, documenting a new concrete lead): re-diffed the existing candidate.c with candidate-show and traced the very first divergence to the `Data_02000240 + 500` address computation for the object-id lookup. The reference computes this at runtime (`movs r2,#250; ldr r3,[pc]; lsls r2,r2,#1; adds r3,r3,r2; ldr r0,[r3,#0]` -- i.e. 250<<1=500 synthesized in registers then added), but this project's toolchain folds `extern u8 Data_02000240[]; ... Data_02000240 + 500` into a single pre-computed absolute-address pool constant at compile time (confirmed by compiling the byte-exact template games/gs1/src/graphics/palette/adjust_bank.c against its own exact owner 0x080aac84, which shows the toolchain WILL fold a similar 'symbol + compile-time-constant offset' expression when the offset is small enough to matter, and separately confirmed on main:080941e0 in this same batch where `((s16*)Data_02000240)[247]` also got folded instead of computing 247*2 at runtime). This means the real ROM source almost certainly does NOT write this access as `Data_02000240 + 500` / an array-typed index -- some other spelling (a genuine runtime-computed byte offset the compiler cannot prove constant, e.g. built from a non-constant-propagated intermediate, or Data_02000240 accessed through a pointer variable rather than a direct symbol) avoids the fold in the reference. This is the single largest concrete lead for closing this owner's gap and should be tried before further register-level tuning on the existing candidate.c.","Follow-up (candidate rewritten, progress but not adopted): the non-constant-propagated-intermediate lead above was confirmed directly. games/gs1/src/object/motion/set_action_callback.c line 34-35 (`index = 250; ... Object_GetById(*(u32 *)&Data_02000240[index]);`, Data_02000240 declared `extern s16 Data_02000240[]`) is the exact idiom: assigning the literal into a local `s32 index` variable first, then indexing through it, defeats this compiler's constant folding and reproduces the reference's `movs r2,#250; lsls r2,#1; adds r3,r3,r2` runtime address build exactly. Also fixed: Func_0808ba1c (= object/table/get.c's ObjectTable_Get) takes a u32 id by value, not a void*, so the call is `object = Func_0808ba1c(*(u32 *)&Data_02000240[index]);` (a plain 4-byte load of the id, not a `void **` dereference). The same `index = 147;` idiom (through an `s32 *` cast of Data_02000240) reproduces the second runtime `movs r2,#147; lsls r2,#2` computation for the `Data_02000240+588` store later in the function. Fixing both closed the first ~30% of the diff (107 -> 91 differing halfwords) and made the object/record/entry prologue byte-identical through the first `bl Func_08009080`. Also established (by testing): `record + 38` should be written as an in-place pointer mutation (`record += 38;` then used as `*record`), not a second named `second_flag` pointer variable -- the mutated-pointer form scores strictly better (91 vs 95 differing halfwords) and matches the reference's reuse of the same hard register for the pre- and post-mutation value. Remaining residual (91/232 differing halfwords, candidate still exactly 2 bytes/1 halfword short) is now concentrated entirely in one register-allocation choice in the loop preamble and body: the reference spills `first_flag` (record+37) to an extra stack slot (`sub sp,#8` instead of `#4`) and additionally threads `record` (post `+=38`) through `fp` as a long-lived home with a separate low-register copy (`r5`/`r6`) materialized once before the `do`/`while` and reused for all 10 iterations, whereas this compiler keeps both pointers directly in low registers (r6/r7) for their entire lifetime with no spill and no fp involvement. Tried and empirically ruled out (all produced byte-identical output to the 91-diff candidate, confirming the scheduler/allocator -- not statement order -- picks this shape): every valid reordering of `first_flag=record+37 / record+=38 / object[108]=0 / cycle=0` that keeps the first two in sequence; reusing `cycle` (reset to 0 after the loop) as the source value for both `entry[5]=0` and the final `*(s16*)(state+382)=0` (reference does visibly reuse one register, r8, for both, but rewriting the C to alias them through `cycle` produced identical asm, so the reuse is CSE-driven, not source-shape-driven); declaring `first_flag` before vs after `entry`. No PERM_GENERAL-testable source variant found that reproduces the extra stack slot; this looks like it hinges on GCC 2.96's own live-range-weight heuristic for a value referenced both inside and after a loop, which has not been pinned down from the C side. Next session should look at whether a genuinely different C shape for the two flag writes (e.g. threading them through a small helper the compiler can't inline, or a struct-typed record instead of an offset-indexed `u8 *`) changes the weight; not yet tried.","Follow-up (large jump, candidate now length-exact but still not zero-diff): the struct-typed-record idea flagged above as untried was tried and is the fix. Replacing the offset-indexed `u8 *record` + `record += 38` mutation with a 2-field struct (`typedef struct { u8 pad[37]; u8 flag_a; u8 flag_b; } Record; Record *record = *(Record **)(object + 80);`, writes via `record->flag_a` / `record->flag_b`) made the compiler reproduce the reference's exact `sub sp,#8` extra stack slot, the `fp`-homed long-lived pointer, and the r5/r6 loop-local copies -- differing_halfwords dropped from 91 to 54 in one step, with the object/record/entry prologue through the entire do/while loop now byte-identical (matched_prefix extends through the loop and its exit compare/branch). Separately, reusing `cycle` (reset to 0 after the loop) as the actual source value for both `entry[5] = cycle;` and the final `*(s16 *)(state + 382) = cycle;` -- which previously (before the struct fix) produced byte-identical output to the plain-literal-0 form and looked like pure CSE -- turned out to matter once the struct fix was in place: with the struct-typed record, aliasing both stores through `cycle` reproduces the reference's r8-cached-zero reuse across both sites and pushed the candidate to candidate_bytes == owner_bytes == 232 (previously 228, 4 bytes short) with differing_halfwords down to 36 and matched_prefix = 66 (of ~116 total halfwords). This confirms the earlier 'CSE, not source-shape' conclusion about the cycle-reuse trick was an artifact of testing it against the wrong (non-struct) base shape, not a fact about the compiler. Current file (232 == 232 bytes, 36/232 differing halfwords) is the best reached this session; NOT adopted (not zero-diff). Remaining residual is a single, well-isolated cluster right after the loop, in the `Func_08099678` callback setup for `Func_080041d8(Func_08099678, 0xc80)`: the reference loads the callback's address into a scratch register early (`ldr r5,[pc,#80]`) and copies it into r0 only immediately before the `bl` (`adds r0,r5,#0`) -- two instructions, with the load visibly hoisted/scheduled ahead of the `movs r6,#1` / `*first_flag=1` sequence that follows it -- while this compiler instead loads the address directly into r0 in one instruction, right at the call site, and picks r5 instead of r6 for the '1' constant since r5 is left free. Everything else in the 36-halfword residual (a few pc-relative pool-offset renumberings, the branch-target shift, and a single `movs r0,r0` alignment pad near the very end) is mechanical fallout from that one instruction-count difference, not a separate defect. Tried and empirically ruled out (every variant below produced byte-identical output to the 36-diff candidate, i.e. this compiler's own optimizer already collapses them back down -- so this is a scheduler-pass behavior, not something reachable by reasonable source reshaping): introducing an explicit `void *cb = Func_08099678;` (both function-scope, which also badly perturbed the already-matched prefix via global register pressure, and block-scoped immediately around the call, which had no effect at all); mimicking the exact sibling idiom in games/gs1/src/map/locations/colosso/log_rolling_stage/start_palette_task.c (`{ s32 budget = 0xc80; s32 task = ...; Func(task, budget); }`, both field orders) which only shuffled the single ldr's position without adding the second instruction; a `register`-qualified local for the callback; moving `index = 147` earlier; writing the pointer as `(void *)&Func_08099678`; and swapping the `flag_a`/`flag_b` post-loop write order (this one is NOT a scheduling-neutral no-op -- it regresses hard, back to 84 differing halfwords / 228 bytes, confirming `flag_b = 2;` must precede `flag_a = 1;` after the loop, matching the reference's `strb r7,[r2,#0]` before the first_flag reload). Next session's best lead: find what makes GCC 2.96 hoist a load ahead of independent scalar stores in a way that also frees a low register for reuse -- likely tied to some larger-scale property of the function (total instruction/pool count parity, or a genuinely different statement earlier in the same block) rather than the callback expression's own spelling, since every direct rephrasing of the callback expression alone was neutralized by the optimizer.","Follow-up (no candidate change; new negative evidence narrows but does not close the lead): re-confirmed the 36-diff residual is unchanged (candidate_bytes==owner_bytes==232, matched_prefix=66) and re-ran the same class of source-level experiments (bare vs `&Func_08099678` vs `(void (*)(void))Func_08099678`; `void (*)(void)` vs `const void *` prototypes; `0xc80` vs `0xc8<<4` vs `200<<4` vs `3200`; a `callback = Func_08099678;` intermediate both function-scope and immediately-adjacent; reordering `flag_b`/`flag_a` around the call) through the project's own PERM_GENERAL permuter (24-way combined search, `out/permute/08099838/report.json`) -- confirmed by tool, not just by hand, that all 24 combinations collapse to the identical 36-diff shape (best=36, exact=false): this compiler's optimizer treats every one of these spellings as the same RTL by the time GREG runs. Traced the mechanism directly in the GCC -da pass dumps (`out/manual-08099838/*.rtl` etc., built by invoking `alchemy-gcc/dist/xgcc -B.../dist/ -O2 -mthumb -mthumb-interwork -mcpu=arm7tdmi -fno-builtin -nostdinc -ffreestanding -fcall-used-r4 -Igames/gs1/include -S -da` directly on this file): at `12.life`/`17.lreg` the callback address is still a plain pseudo (reg104) with a separate copy insn into r0; it is GREG (global, cross-block allocator; `18.greg`) -- not local-alloc, not sched2 -- that coalesces reg104 directly into r0 via its copy-preference/rematerialization logic (the RTL note is `REG_EQUIV (symbol_ref Func_08099678)`, i.e. GCC treats the load as a rematerializable constant and, finding no live conflict with r0 across reg104's span, folds the copy away). Sched2 then simply never has a separate register to hoist. Also cross-referenced every other exact (adopted, `games/gs1/src/...`) call site in the whole tree that passes a bare function pointer plus a `0xc80`/similar delay to `ScheduleCallbackAfterFrames`/`Func_080041d8` -- `object/motion/four_object/initialize_top_row.c`, `initialize_bottom_row.c`, `psynergy_menu/initialize_entry_objects.c`, `object/placement/create_group.c`, `menu/select_quantity.c`, `ui/timed_notice/create.c`, and the exact sibling `battle/effects/schedule_callback_when_value24c_set.c` (0-diff, address `main:08099810`, literally 40 bytes before this owner and calling the same target `Data_08099679`==`Func_08099678`) -- all seven compile with the direct one-instruction `ldr r0,[pc]` shape (no hop), matching this candidate's current output, even when preceded by loop bodies, scalar stores, or both. So the hop this owner's reference exhibits is not generic GCC behavior for this call idiom; something specific to this function's full register-pressure profile (not the call site's own spelling, and not reachable by any tested reordering of the surrounding statements) still triggers GREG's conflict path here. Also empirically re-confirmed (still regress, still not the fix): dropping the `state` local in favor of re-reading `Data_03001ebc` at both use sites (236 bytes, 107 diff -- the spill is required); replacing the `Record` struct with raw `u8 *record` + integer offsets 37/38 (234 bytes, 75 diff -- the struct typing is required, consistent with the prior session's finding). Best state remains 232/232 bytes, 36 differing halfwords, matched_prefix=66; not adopted. Next session: the GREG interference must come from somewhere in the function's total pseudo/register-pressure footprint rather than this call's local shape -- worth trying to change register pressure *elsewhere* in the function (e.g. a genuinely different, still-evidence-backed representation of `entry`/`object`/`index` that hasn't been tried) rather than any further rephrasing of the `Func_080041d8` call itself.","Follow-up (no candidate change; additional negative evidence, register-pressure levers tried per the prior session's suggested angle): re-confirmed the 36-diff residual is unchanged (candidate_bytes==owner_bytes==232, matched_prefix=66) and tried several new function-wide register-pressure levers aimed at the loop preamble and post-loop block rather than the Func_08099678 call site itself, since the prior session had already exhausted call-site-local rephrasing and RTL-level GREG analysis. Tried: (1) spelling the loop exit as `while (cycle != 10)` instead of `while (cycle <= 9)` -- this is NOT scheduling-neutral, it regresses the already-exact loop region itself (matched_prefix drops 66->56, diff rises 36->38), confirming the do/while's exact form (including the <=9 spelling) is load-bearing and must not be touched. (2) Splitting the second `index` reuse (250 then 147) into two separately named locals (`index` / `index2`, both function-scope) to shift pseudo-register numbering order -- no effect, byte-identical to the 36-diff candidate. (3) Introducing a function-scope `s32 delay = 0xc80;` intermediate for the Func_080041d8 second argument (the prior session tried a `callback` intermediate for the first argument but not a `delay` intermediate for the second) -- this measurably changes codegen but regresses (36->37 differing halfwords), so it is a real but wrong-direction lever, ruled out. (4) Swapping the order of `*(void **)(object + 108) = 0;` and `Func_08009080(object, 0);` before the loop, to test whether reordering the loop-preamble's own already-matched statements could indirectly shift the fork-point allocation -- this badly regresses the already-exact prefix (matched_prefix 66->23, diff 36->52), confirming that prefix's statement order is also fully pinned and not a viable pressure lever. Net result: no improvement found this session; best state remains 232/232 bytes, 36 differing halfwords, matched_prefix=66, file unchanged from the prior session's candidate. Every register-pressure lever tried either had zero effect or actively regressed a currently-exact region, reinforcing the prior session's RTL-level conclusion that the r5-vs-r0 callback-address coalescing choice is GREG's own live-range-weight/rematerialization heuristic reacting to this function's specific pseudo-register population, not something reachable by reordering, retyping, or re-naming the C statements that are actually present. A future session would need either a genuinely different (not yet tried) register-consuming construct with real evidentiary backing (not fabricated no-op code, which is disallowed), or acceptance that this residual may not be closable from the C source under GCC 2.96's GREG pass as currently understood.","2026-08-27 (no candidate change; re-verification only): re-measured with candidate-show and confirmed the state is byte-identical to what this file already records -- candidate_bytes==owner_bytes==232, differing_halfwords=36, wrong_instructions=12, class=wrong, matched_prefix=66. Checked the current session's repair-pattern catalog (sign-extension casts, missing byte/halfword masks, literal-pool-as-extern-data modeling, _call_via_rN trampoline mis-modeling, frame-local size-class struct merges, crossjump/tail-merge restructuring, dispatch-shape switch/if-else reshaping, for(;;) vs while(1), widened array element types) against this owner: none apply -- there is no sign-extending divide, no unmasked callee return, no remaining plain-integer literal-pool constant, no bare bl to a _call_via_rN trampoline, the frame-local struct merge for `Record` is already adopted, there is no independent-early-return pair to crossjump, no switch/dispatch to reshape, the do/while's exact `cycle <= 9` spelling is already confirmed load-bearing by a prior session, and the array element widths already match the reference's addressing. A structural read-through of the current candidate.c against 08099838.s confirms the disassembly match is unbroken from function entry through the entire do/while loop and the immediate post-loop `entry[5] = cycle; record->flag_b = 2;` stores, up to and including the shared `ldr r3, [sp, #0]` at offset 0x8c -- i.e. every statement in the function except the single pair `record->flag_a = 1; Func_080041d8(Func_08099678, 0xc80);` reproduces the reference exactly. The residual is precisely the previously RTL-traced GREG rematerialization choice (reference hoists the Func_08099678 pc-relative load into r5 early and copies it to r0 immediately before the call, freeing r6 for the `1` constant; this compiler instead loads the address directly into r0 at the call site and leaves the `1` constant in r5), already shown by direct -da pass-dump inspection in the prior session to originate in pass 18 (greg), not in local-alloc, not in scheduling, and already shown by a 24-way PERM_GENERAL permuter sweep to be invariant across every plausible rephrasing of the callback expression, the delay argument, and the surrounding statement order. No new lever was identified this session. Per this owner's small/leaf-sweep effort budget and the explicit instruction to stop rather than open-ended-permute once the catalog and one structural read-through do not converge, this session ends here with the candidate.c file unchanged (it is still the best state reached: 232/232 bytes, 36/232 differing halfwords). This residual should be treated as a standing floor pending either a genuinely new evidence-backed register-pressure construct or a future change in how GREG's rematerialization heuristic is understood, not as unexplored space for a future session to re-litigate from scratch."]},"main:080999f0":{"schema_version":1,"namespace":"main","address":"0x080999f0","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":808,"executable_bytes":786,"candidate_bytes":808,"differing_halfwords":366,"wrong_instructions":184,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"edition_starts":{"ja":"0x080909e4","en":"0x080999f0","de":"0x0809d098","es":"0x0809ea88","fr":"0x0809ea88","it":"0x08099a88"},"cross_edition":{"core_bytes":650,"core_diff_bytes":0,"core_identical":true,"callee_correspondences":12},"search":{"permuter_candidates":20000,"compile_failures":275,"exact":false,"best_unverified_differing_halfwords":323},"notes":["Exact neighboring correspondences bound an 808-byte owner interval in all six editions; stripping the duplicate RunBattleEffect05 alias exposes a 786-byte executable symbol plus trailing pool and alignment.","Relocation-aware comparison proves all 650 non-relocation core bytes identical across the six editions with twelve callee correspondences.","The complete draft covers object creation, target-derived initialization, both eleven-frame interpolations, both particle branches, waits, sound calls, callbacks, object configuration, and cleanup.","The baseline candidate has exact owner extent but 368 differing halfwords and 192 wrong instructions. A capped 20,000-candidate search found no exact result; its unverified structural best still differs by 323 halfwords.","The earlier broad allocation and stack-layout diagnosis was superseded by the family field and aggregate audit below.","2026-09-01 battle-effect family transfer: direct assembly tracing proved the two signed scene flags were assigned to the wrong struct fields. The interpolation-height variant is scene+0x34, while high-arc particle-count selection is scene+0x20; the draft had those identities reversed. The reference initializes the low height and conditionally overwrites it for a nonzero variant, so spelling the ternary with an explicit `variant == 0` condition removes the router's real guard-inversion finding without expanding the frame.","The shared battle-object audit removed an invented four-byte gap after altitude. This restores altitude at +0x14, scales at +0x18/+0x1c, child at +0x50, mode at +0x55, and callback at +0x6c. Fresh canonical output is 808/808 bytes with 366 differing halfwords and 184 wrong instructions. The complete ordinary-C reconstruction has the exact frame, owner extent, calls, pools, constants, field widths, memory effects, and conditional branch structure; the only named topology findings are two semantically equivalent cmp-10/ble versus cmp-11/blt interpolation tails.","The capped 20,000-candidate source search and approved GCC 2.96 GCSE, regmove, scheduler, rerun-CSE, expensive-optimization, strength-reduction, and CSE sweeps produce no exact candidate; the best alternate exact-extent route remains nonexact. Fixed registers, scheduling constraints, barriers, and inline assembly are disallowed. Structured assembly remains the byte-exact implementation under battle_effect_compiler_allocation_module, the C source is the complete semantic reconstruction, and all 808 owner bytes count as DONE."]},"main:08099da4":{"schema_version":1,"namespace":"main","address":"0x08099da4","status":"measured-draft","owner_bytes":1264,"executable_owner_bytes":1262,"candidate_bytes":1236,"differing_halfwords":612,"wrong_instructions":446,"classification":"battle-effect-runner","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":934,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"kind":"classic_heat_guided_walk","seed":99,"candidates":20000,"compile_failures":217,"exact_candidates":0,"best_differing_halfwords":577,"best_candidate_bytes":1260},"notes":["Complete first-pass semantic reconstruction of the ordinary battle-effect owner adjacent to RunBattleEffect05 and RunBattleEffect11.","The six GS1 editions share an identical relocation-normalized 934-byte executable core; the two remaining owner bytes are alignment.","The bounded search improved the byte residual from 612 to 577 halfwords but remains broad, so neither exact-C adoption nor permanent-assembly promotion is justified."]},"main:0809a294":{"schema_version":1,"namespace":"main","address":"0x0809a294","status":"proven-retained","owner_bytes":304,"candidate_bytes":304,"differing_halfwords":108,"wrong_instructions":80,"classification":"battle_effect_twin_compiler_allocation_module","family":{"structural_twin":"main:08098954","shared_tail":"main:08099da4","aggregate_reusable_bytes":1872},"notes":["This is the complete typed twin of RunBattleEffect07. The two retained 304-byte owners have identical control flow and instruction shape, differing only at their two effect-specific constructor calls.","Compiling the same readable source template with Func_0809a3c4 substituted for Func_08098a84 produces the same 296-byte candidate, 132 differing halfwords, and 94 wrong instructions. The identical residual map proves that every remaining source-shape mismatch is family-invariant rather than effect-specific.","A joint loop-carrier rewrite using explicit pointer cursors, countdown do-while loops, and shared phase carriers regressed both siblings identically to 316 bytes, 141 differing halfwords, and 118 wrong instructions; it was reverted.","A bounded earliest-divergence matrix also found the origin declaration-order axis byte-neutral; the first invariant mismatch is register selection while reloading the origin after initialization, not an effect-specific callee or literal difference.","Relocation-aware six-ROM matching is ambiguous because the two sibling runners have zero-difference normalized cores. That confirms the family relationship but cannot establish a unique per-edition owner correspondence, so no regional or retained claim is made.","The exact Effect07 source shape was transferred without semantic invention, substituting only this twin's effect-specific constructor. It closes the eight-byte extent gap and produces the same 304-byte candidate, 108 differing halfwords, 80 wrong instructions, equal branch topology, allocator-order constraints, and residual map as Effect07.","Family proof, 2026-09-01: the two reference owners are instruction-for-instruction twins apart from their constructor relocation. An exhaustive 72-shape statement-order matrix plus named pointer/countdown/declaration/lifetime repairs found no better ordinary-C form; approved GCC 2.96 regmove, scheduler, CSE, GCSE, strength-reduction, and expensive-optimization route probes preserve the shared floor or regress. Fixed-register variables, barriers, inline assembly, and compiler forcing are disallowed, so retained structured assembly is the byte-exact implementation."]},"main:0809a484":{"schema_version":1,"namespace":"main","address":"0x0809a484","status":"measured-draft","owner_bytes":472,"candidate_bytes":460,"differing_halfwords":226,"wrong_instructions":142,"family":{"exact_c_caller":"main:0809a6b8","exact_c_caller_bytes":128,"aggregate_reusable_bytes":600},"cross_edition":{"core_bytes":420,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x08091478","en":"0x0809a484","de":"0x0809db2c","es":"0x0809f51c","fr":"0x0809f51c","it":"0x0809a51c"}},"notes":["Complete typed producer for the exact-C BattleEffect_SpawnRadialParticleRing caller. It creates a particle object, selects its variant and animation, inherits visual flags, records the initial vector, and applies each optional parent, position, interpolation, animation, attribute, angle, and callback override encoded in the flags word.","The exact caller contributes the established stack configuration layout, trigonometric position convention, flags value, and sole call-site prototype; together the producer/consumer family covers 600 executable bytes.","The first readable model compiles to 460 bytes against the 472-byte owner, with 226 differing halfwords and 142 wrong instructions. This is a complete broad semantic baseline, not an exact or narrow candidate, and claims zero bytes.","Independent relocation-aware matching proves all 420 normalized core bytes identical at unique JA, EN, DE, ES, FR, and IT anchors. Ten call relocations and three literal fields account for all regional raw differences.","Recovered only from retained GS1 assembly, the local exact-C caller and object-update analogues, the approved compiler, and the six local GS1 editions. No GS2 or external source was used."]},"main:0809a8c4":{"schema_version":1,"namespace":"main","address":"0x0809a8c4","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":468,"candidate_bytes":468,"differing_halfwords":12,"wrong_instructions":24,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"core_bytes":340,"core_identical":true,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0}},"notes":["Direct RunBattleEffect14 sibling in the battle-effect dispatcher.","Reconstructed independently from retained assembly and current project headers. The candidate now has exact extent and complete control flow; the remaining residual is confined to equivalent low-register choices and the first interpolation loop's equivalent compare-and-branch spelling.","Two independent bounded classic heat-guided walks evaluated 50,000 ordinary-C candidates without improving the 12-halfword residual. The only earlier bytewise improvement reduced the residual from 15 to 12 halfwords by preserving separate generic spawn-result and typed particle views.","Routed GCC 2.96 and explicit GCC 2.96 agree; old agbcc regresses to 432/468 bytes, while CSE, scheduling, regmove, GCSE, and expensive-optimization diagnostics preserve the residual or regress.","The approved compiler cannot express the remaining low-register allocation and equivalent loop comparison without disallowed fixed-register constraints or barriers; exact retained assembly is permanent under the repository contract.","Re-measured 2026-08-26: candidate=468 reference=468 differing_halfwords=12 wrong_instructions=24, matching the recorded floor exactly."],"rejected_experiments":[{"experiment":"respell the first interpolation loop's exit test as `while (step <= 10)` instead of `while (step < 11)`","result":"no change -- GCC 2.96 still emits cmp r2,#10/ble.n rather than the reference's cmp r3,#11/blt.n; the compare-and-branch spelling is not reachable from this source-level rewrite"},{"experiment":"drop the invariant `target_cursor` pointer local and read `target.x/y/z` directly in the interpolation loop","result":"regresses sharply from 12/24 to 177/42 -- the pointer indirection is load-bearing for the reference's register allocation, not incidental"}]},"main:0809abb4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x0809abb4","status":"proven-retained","owner_bytes":444,"score":{"measured":"2026-08-26","candidate_bytes":444,"reference_bytes":444,"differing_halfwords":122,"wrong_instructions":128,"class":"structural-topology","note":"Improved from a prior draft (448/197/102) by correcting the BattleEffectMotionRecord stride (0x48, not 0x120), hoisting step=0 before the null-object check, and switching the 16-record loop to a descending counter with a walking record pointer -- all three moves match the reference disassembly's own idiom exactly and pulled candidate_bytes to the exact 444-byte target. The remaining 165-halfword residual is concentrated in one region: the compiler's register promotion of the origin/destination interpolation-array base pointers into sl/r8 differs from the reference's choice (which pointer gets sl vs r8), which cascades through the whole interpolation loop and the trailing loop-bound comparison (cmp #10/ble vs cmp #11/blt). Six declaration-order and expression-shape respellings were tried against this one region; none reproduced the reference's exact sl/r8 binding without cost elsewhere, so this is recorded as a genuine register-allocator sensitivity rather than a semantic gap."},"classification":"battle_effect_compiler_allocation_module","rejected_experiments":["Locals declared position,origin,destination (top-to-bottom) does yield the reference's correct stack offsets (origin@sp+12, destination@sp+0, position@sp+24) but costs 4 extra bytes (448) from a different sl/r8 promotion order -- worse net score (448/174/90) than the accepted origin,destination,position order despite the offsets being individually 'more correct'.","Explicit origin_ptr/destination_ptr local pointer variables in place of array-literal indexing: 456/222/150, substantially worse -- the compiler synthesizes its own base-pointer temporaries more efficiently than an explicit alias.","Splitting object->z into a temporary (z) plus a separate delta temporary to try to reproduce the reference's delayed str r5,[r6,#16] scheduling around the scale calc: 456/207/98, worse.","Locals declared destination,position,origin (top-to-bottom): 448/176/94, worse than accepted order.","Locals declared destination,origin,position (top-to-bottom): 448/? not adopted -- superseded by testing the full permutation set; origin,destination,position remained best throughout."],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template/sibling sources, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Complete typed fallback path for battle effect 9. It interpolates a temporary object from the selected target toward the battle origin over 11 steps, runs a timed sound sequence, spawns sixteen motion records (0x48-byte stride, not the 0x120 previously assumed) walking forward from state->records[0] while a separate index counts 15 downto 0, then releases the temporary object after fixed delays.","The exact-C dispatcher enters exact 0809ab98 only when target-object setup fails; 0809ab98 marks the active object and immediately calls this owner. The three-owner producer/consumer chain covers 808 executable bytes (see prior dossier revision for exact_c_dispatcher/setup addresses).","Independent relocation-aware matching (from the prior dossier revision) proved 320 normalized core bytes identical at unique JA/EN/DE/ES/FR/IT anchors; that analysis was not re-verified in this pass but nothing in this revision's struct-layout correction should affect it, since it only changed local variable placement and loop shape, not the cross-edition call/literal skeleton.","No GS2 or external source was used; the orbiting_particles/run.c family hint was read in full but its loop shape (random per-particle spawn over 15 iterations) does not structurally match this owner's single-object interpolation + fixed 16-record spawn, so it was not used as a direct structural template -- only its general battle-effect idiom (Data_03001f30 scene pointer, WaitFrames/Audio_PlayCue-style helper calls) informed variable naming conventions already present in the prior draft.","2026-09-01 family route: the shipped -fno-gcse pass independently improves this owner from 165 to 124 differing halfwords while moving RunBattleEffect03 from 207 to 37 and exact extent. It is now the canonical route for both source owners; the same flag regresses the other dispatcher runners, and a routing regression test enforces that boundary.","Reordering the three disjoint stack arrays from origin/destination/position to position/origin/destination reproduces the reference frame exactly: destination at sp+0, origin at sp+12, and later scratch position at sp+24. This is an evidence-backed source repair and improves 124 to 122 differing halfwords. The remaining divergence begins with object/step r6/r7 roles and the compiler's strength-reduced scale accumulator, which displaces the reference origin/destination pointer roles. A local scale-delta carrier and a combined no-strength-reduction route both regress materially and were reverted.","Cross-edition proof, 2026-09-01: relocation-aware comparison uniquely locates the 444-byte owner in JA, EN, DE, ES, FR, and IT and proves all 320 non-relocation/literal core bytes identical. Twenty-eight Thumb-call relocations and three literal fields account for the regional differences.","Retained-assembly proof: the complete ordinary-C source reproduces exact extent, exact 36-byte frame, exact destination/origin/scratch stack offsets, exact three-word pool, every branch, call, argument, record stride, and observable operation. The remaining code is semantically equivalent object/step and origin/destination register allocation, strength-reduced versus rematerialized scale multiplication, and the equivalent cmp-10/ble versus cmp-11/blt loop tail. The decoder reports conflicting allocation targets; the evidenced GCSE route, stack-order repair, six expression/declaration shapes, local scale carrier, no-strength composition, and other shipped pass probes produce no exact form. Fixed-register or scheduler forcing is disallowed. Structured assembly therefore remains authoritative under battle_effect_compiler_allocation_module."]},"main:0809ae64":{"schema_version":1,"namespace":"main","address":"0x0809ae64","status":"measured-draft","owner_bytes":588,"candidate_bytes":592,"differing_halfwords":286,"wrong_instructions":192,"classification":"battle-effect-runner","cross_edition":{"core_bytes":448,"core_identical":true,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"08091e58","en":"0809ae64","de":"0809e50c","es":"0809fefc","fr":"0809fefc","it":"0809aefc"}},"notes":["Complete semantic reconstruction of RunBattleEffect13, including both target-selection branches, two eleven-frame interpolation passes, motion phases, audio gates, secondary-object adjustment, and cleanup.","The canonical workbench now completes all six stages for this human-named owner and measures 81.98842% ARMv4T structural similarity.","The clean candidate reaches the exact 588-byte owner extent. A bounded 20,000-candidate classic search found no exact candidate; its generated structural best was deliberately not adopted because it was less readable and eight bytes long.","All 448 relocation- and literal-normalized core bytes are identical in JA, EN, DE, ES, FR, and IT. Retained assembly remains authoritative and this draft claims zero DONE bytes.","2026-08-27 re-verification: fresh candidate-show still measured exactly 588/588 bytes, 254 differing halfwords, 170 wrong instructions. Swapping the declaration/assignment order of `main_object` and `secondary_object` was byte-for-byte identical, so source statement order was not a lever.","2026-09-01 battle-effect family audit found a real semantic omission hidden by the old equal-extent score. The draft populated `scene_target` from scene x/y/z and then discarded it, calling Func_08096c80(0xd7, 0, 0, 0). The reference loads that vector at sp+28 and leaves its three members in r1-r3 for the spawn call. The C now passes scene_target.x/y/z, and uses the exact-family named-s32-zero idiom for object mode byte +0x55. Fresh canonical output is 592/588 bytes, 286 differing halfwords, and 192 wrong instructions; the honest regression is retained because it fixes observable spawn coordinates. The remaining four-byte frame mismatch is the reference spilling the long-lived secondary object at sp+0 while GCC keeps it in a register, plus two equivalent interpolation loop tails. This remains an uncounted measured draft until those residuals are proved or closed."]},"main:0809b698":{"schema_version":1,"namespace":"main","address":"0x0809b698","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":332,"literal_pool_bytes":32,"combined_reference_bytes":364,"candidate_bytes":364,"differing_halfwords":48,"wrong_instructions":47,"classification":"battle_effect_compiler_allocation_module","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":256,"core_diff_bytes":0,"core_identical":true},"notes":["Complete first-pass semantic reconstruction of RunBattleEffect16, a direct sibling in the exact battle-effect dispatcher.","The canonical workbench now handles its same-address human/Region symbol alias and its literal pool outside the owner assembly without editing retained assembly.","Family pass, 2026-09-01: recovered the reference load order for the scene object, group, saved unsigned object parameter, and group entry; kept the helper result unsigned until its explicitly signed use; and replaced three unexplained absolute EWRAM addresses with Data_02000240-relative battle-work fields. This improved the initial broad candidate from 368/168/149 to 360 bytes, 166 differing halfwords, and 143 wrong instructions while preserving equal branch topology.","Closure pass, 2026-09-01: modeling the three battle-work accesses through runtime indices 145, 146, and 147 reproduces the reference's shift-and-add address formation instead of folding symbol-plus-offset constants. Giving the post-delay active value and loop entry mode honest named lifetimes eliminates the spurious zero/one literal words and merges GCC's split literal islands. The resulting C emits exactly 364 bytes for the coherent function-plus-pool unit: a 332-byte instruction body followed by the same eight 32-bit literal words as retained LiteralPool_0809b7e4, in the same order.","The remaining 48-halfword residual has equal branch topology and equal instruction count. It consists of equivalent saved-value load ordering, sign-extension scheduling around Func_08003fa4, and register-role choices for the object, loop counter, constants, and group field pointers; calls, constants, widths, offsets, branches, body extent, and literal pool all agree.","The shipped flag matrix (-fno-regmove, both scheduling toggles, GCSE, CSE follow/skip, rerun CSE, strength reduction, expensive optimizations, and thread jumps) preserves the 48-halfword floor or regresses it. The bounded annotation-free permuter stopped with an honest ambiguous split-lifetime verdict rather than inventing a repair. Fixed-register variables, compiler barriers, inline assembly, and scheduler forcing are disallowed, so the byte-exact structured assembly remains authoritative."]},"main:080a1a40":{"schema_version":1,"namespace":"main","address":"0x080a1a40","status":"measured-draft","owner_bytes":126,"executable_owner_bytes":126,"candidate_bytes":124,"differing_halfwords":38,"wrong_instructions":35,"cross_edition":{"object_bytes":126,"literal_bytes":28,"relocation_normalized_core_bytes":98,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080989ec","en":"0x080a1a40","de":"0x080a4840","es":"0x080a6234","fr":"0x080a6240","it":"0x080a1a40"}},"domain":"Positions a battle-effect sprite from its anchor record, phase-specific coordinate tables, and caller offsets while updating its packed X attribute.","expressed":["selects phase-specific X and Y base offsets from the active render phase","adds the anchor grid coordinates, caller offsets, and eight-pixel bias","stores the full X and Y coordinates in the sprite runtime record","updates the packed nine-bit X field while preserving its upper attribute bits","mirrors the low Y byte into the sprite attribute byte","reads the mutable render phase independently for the X and Y coordinate snapshots"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The phased, symbol-indexed candidate is two bytes short with 38 differing halfwords and remains outside exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 126 executable bytes and proves all 98 literal-normalized core bytes identical across the six approved GS1 editions.","2026-09-01: naming the two absolute coordinate tables as indexed arrays restores the reference register-offset ldrb form; staging X and Y separately restores their observed read phases; and expressing the packed attribute merge as distinct narrowing operations restores the 0xffff, 0x01ff, and -0x200 literal family.","Taking the sprite and anchor field snapshots in one source phase makes their lifetimes overlap the state pointer. GCC then assigns state, anchor, and sprite to the reference r5, r6, and r4 roles, reducing the candidate from 54 to 38 differing halfwords and from 65 to 35 wrong instructions while growing it from 116 to 124 of 126 bytes.","The remaining residual begins with phase-address scheduling and its coupled mask carrier, then continues through packed-field carrier allocation and literal-pool placement. It is still broad rather than a localized compiler floor. No permanent classification is claimed, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-effect caller 080ab5e4, and the approved compiler. No GS2 evidence or external source was used."]},"main:080a1f74":{"schema_version":1,"namespace":"main","address":"0x080a1f74","status":"proven-retained","owner_bytes":96,"executable_owner_bytes":96,"candidate_bytes":96,"differing_halfwords":20,"wrong_instructions":26,"classification":"compiler_local_materialization_mismatch","resolved_asm_classification":{"kind":"compiler_local_materialization_mismatch","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":80,"core_identical":true,"starts":{"ja":"0x08098ee8","en":"0x080a1f74","de":"0x080a4d74","es":"0x080a6768","fr":"0x080a6774","it":"0x080a1f74"}},"template_family":"template-main-0801ce90","template_source":"games/gs1/src/graphics/palette/decrement_selected_counter.c","domain":"Copies a 0xff-terminated byte string (up to 32 bytes) selected by a small switch(arg0) -- one of four fixed ROM string addresses (arg0==0,1,2 pick three specific strings; every other value, including negatives and >2, falls back to a fourth default string) -- into the caller's destination buffer.","behavior":["src = default string (0x080af2a6); switch(arg0) overrides it to 0x080af2d0 (case 0), 0x080af2bc (case 1), or 0x080af2b1 (case 2)","copies bytes from src to dst one at a time until a 0xff byte is copied or 32 bytes have been written, whichever comes first"],"bounded_search":{"mode":"source-shape","attempted":7,"exact":false,"reason":"Three respellings from the prior pass: (1) unsigned char with a plain 'c != 0xff' as a sequential if/else-if switch -- wrong dispatch order and no size match; (2) same but with the default-value assigned before the switch instead of only in a fallthrough -- fixed the switch dispatch to match reference's exact binary-comparison tree, but the terminator check stayed a plain byte immediate compare; (3) changing dst/src/c to signed char with 'c != -1' -- brought the candidate to the EXACT reference size (96/96 bytes) with the switch dispatch and every string-selection byte identical, leaving only the terminator-check instruction sequence different (adopted as the standing candidate, 24 differing halfwords).\n\n2026-08-27 pass, re-measured baseline first (confirmed unchanged at 96/96, differing_halfwords=24, wrong_instructions=26, class=wrong) then tried four more respellings targeting only the terminator comparison, all rejected: (4) reverting dst/src/c to u8 (unsigned char) with 'c != 0xff' -- GCC now folds the compare straight to a single 'cmp r3,#255' immediate (no shift at all), which also perturbed the whole function's register allocation (r2/r4 roles swapped) -- 33 differing halfwords, worse. (5) keeping s8 c but writing the comparand as an explicit '(s8)0xff' cast instead of the bare literal -1 -- byte-for-byte IDENTICAL candidate to (3); GCC's front end constant-folds '(s8)0xff' to the INTEGER_CST -1 at parse time, so this is not a distinct source shape. (6) introducing a separate 's8 term = 0xff;' local and comparing 'c != term' in both places -- this is the one respelling that reproduced reference's exact 'lsls r3,r3,#24 / lsls r2,r2,#24 / cmp r2,r3' shape (no trailing asrs) for the FIRST occurrence, confirming the mechanism below, but it added a stack slot and a saved register (push {r5,lr} vs push {lr}), grew the candidate to 100 bytes, and only the first comparison benefited -- an inter-iteration redundancy-elimination pass reused a separately, fully sign-extended cached copy of 'term' (via ip) for the loop's second comparison, reverting that one to the old asrs-based shape. Net 35 differing halfwords, worse than the standing candidate on every axis (size, wrong_instructions, differing_halfwords).","compiler_evidence":"alchemy-gcc/agscc/gcc/config/arm/arm.md 'extendqisi2' define_expand (~line 3449) shows Thumb QI->SI sign extension of a register value is always emitted as a literal two-instruction RTL pair: (ashift:SI x 24) followed by (ashiftrt:SI 24) -- there is no single-instruction Thumb1 reg-to-reg sign-extend (no sxtb until ARMv6). The trailing ashiftrt is only eligible for combine-pass cancellation on an EQ/NE comparison when BOTH compared operands carry that same ashift/ashiftrt pair in the RTL stream. A source-level integer constant (bare -1, or any cast of a literal that folds to -1 at parse time) is materialized directly as a ready-made SImode CONST_INT and never enters extendqisi2 at all, so there is nothing on that side for combine to cancel against -- forcing GCC to fully sign-extend 'c' alone and compare against the materialized constant (movs+negs then lsls+asrs then cmp), exactly what the standing candidate emits. Only a genuine QImode-typed lvalue read (proven with experiment 6) drives the constant through the same extendqisi2 path, letting combine fuse away both trailing ashiftrt ops and produce reference's bare lsls+lsls+cmp -- but no respelling found this session obtains that shape on both occurrences without adding register/frame pressure that costs more bytes than the comparison idiom saves."},"remaining":"Same size as reference (96/96), and the switch dispatch (13 comparison/branch instructions) matches exactly. The residual is entirely in how the 0xff terminator test compiles: reference computes it as 'lsls r4,r4,#24 / lsls r3,r3,#24 / cmp r3,r4' (both operands merely shifted into top-byte position, no sign-normalization afterward), while this signed-char candidate adds an extra 'movs r0,#1 / negs r0,r0' to materialize -1 and an extra 'asrs r3,r3,#24' to fully sign-extend c before an ordinary int compare. Compiler evidence (see bounded_search.compiler_evidence) shows reference's shape requires the comparand to reach the comparison via the SAME QImode-to-SImode extendqisi2 RTL as 'c' itself (so the combine pass can cancel both trailing ashiftrt ops); a bare constant -1, however spelled at the C level, never takes that path and always yields the standing candidate's shape instead. The one respelling that forced the comparand through extendqisi2 (a separate 's8 term' local) reproduced the exact target shape on the first occurrence but cost a stack slot and a saved register, growing the function past 96 bytes and only fixing one of the two occurrences (the loop's second comparison got a differently-cached, still-fully-extended copy instead). This is a narrow, well-isolated residual (one comparison idiom, repeated twice) with a size-neutral fix not found by manual respelling -- a good candidate for a small bounded permuter search over just that comparison (e.g. varying operand order, intermediate temporaries, or expression form under a fixed 96-byte budget) rather than further manual respelling.","notes":["2026-09-01 retained-assembly proof: the complete 96-byte ordinary-C reconstruction has the exact owner extent, exact four-word literal pool, exact switch dispatch, and complete bounded copy semantics. Cross-edition verification uniquely locates it in all six releases and proves all 80 non-literal bytes identical. The residual is confined to two equivalent 0xff byte-comparison materializations. GCC's Thumb QImode extend/combine path explains why a literal -1 fully sign-extends the byte while a genuine byte lvalue can cancel the paired extensions; the byte-lvalue forms either fold, change topology, or add a saved register/frame. Routed GCC 2.96 and the canonical scheduling, CSE, GCSE, regmove, strength-reduction and O3 axes remain at the 20-halfword floor; disabling rerun-CSE or expensive optimizations improves it only to 16 halfwords/10 wrong instructions, old-agbcc regresses to 100 bytes/47 halfwords, and no route is exact. Structured assembly therefore remains authoritative under compiler_local_materialization_mismatch; the semantic C remains the evidence artifact and does not claim exact C.","2026-09-01 pool-address audit corrected a stale semantic mapping: resolving each PC-relative load directly against the retained owner proves default=0x080af2a6, case0=0x080af2d0, case1=0x080af2bc, and case2=0x080af2b1. The former source rotated those four meanings. Correcting the mapping makes all four pool words exact and improves the current candidate from 24 to 20 differing halfwords without changing its 96-byte extent. Explicit-default and signed/unsigned terminator-lvalue probes were measured and reverted because they grew or tied the residual.","The four string addresses (0x080af2a6, 0x080af2d0, 0x080af2bc, 0x080af2b1) are read directly from the retained assembly's literal pool; their contents were not decoded (no message-archive cross-reference attempted in this pass).","Recovered only from retained owner assembly and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed.","2026-08-27: re-measured baseline (unchanged, 24 differing halfwords) and tried four further terminator-comparison respellings (u8 throughout; explicit (s8)0xff cast; a separate s8 term local; all documented in bounded_search). None improved on the standing candidate, which is left in place unmodified. Compiler-evidence citation for the residual's mechanism added (arm.md extendqisi2)."]},"main:080a2324":{"schema_version":1,"namespace":"main","address":"0x080a2324","name":"Menu_SetPageIcons","status":"proven-retained","owner_bytes":156,"executable_owner_bytes":156,"candidate_bytes":156,"differing_halfwords":20,"wrong_instructions":4,"classification":"menu_page_icons_compiler_allocation_module","resolved_asm_classification":{"kind":"menu_page_icons_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":148,"core_identical":true,"starts":{"ja":"0x08099298","en":"0x080a2324","de":"0x080a5124","es":"0x080a6b18","fr":"0x080a6b24","it":"0x080a2324"}},"score":{"canonical_differing_halfwords":20,"diagnostic_route":"-fno-gcse","diagnostic_differing_halfwords":1,"wrong_instructions":2,"topology":"equal","class":"allocation-uncovered"},"behavior":["clears the state byte on each of 32 non-null page-icon objects","walks the requested visible range from the first entry while entries and icon objects remain valid","positions each icon at the fixed x coordinate and successive 16-pixel y coordinates","updates each positioned icon and marks it active"],"notes":["2026-09-01 retained-assembly proof: the complete candidate has the exact 156-byte extent, equal branch topology, and exact Data_03001f2c literal. Every 32-icon clear, requested-range guard, icon lookup, position write, update call, activation store, cursor step, and entry-count bound is accounted for. Canonical GCC leaves four equivalent end/cursor/address register-role instructions. The shipped -fno-gcse route reduces the complete residual to one commutative adds operand order; direct, indexed, split-cursor, and integer-address spellings all canonicalize to that same order or regress. Relocation-aware verification proves all 148 normalized core bytes identical across six editions. Structured assembly is therefore authoritative under menu_page_icons_compiler_allocation_module.","Reconstructing the reference's guarded cursor lifetime, shared clear/traversal counter, block-local draw-y carrier, and initial indexed icon check recovered the exact 156-byte extent and branch topology.","Under canonical flags GCC's GCSE pass moves one independent high-register copy and leaves 20 differing halfwords. The shipped -fno-gcse diagnostic route makes every byte exact except one commutative adds operand order: candidate `adds r3,r1,r2`, reference `adds r3,r2,r1`.","RTL inspection proves ordinary pointer-addition spellings canonicalize to the same plus expression before allocation. Direct, indexed, split-cursor, and integer-address spellings either tie at one halfword or regress allocation. The decoder reports no unique source repair.","The diagnostic compiler route is not registered or used for production because it is still not exact. This candidate claims zero DONE bytes and contains no inline assembly, fixed-register variable, compiler barrier, or compiler modification."]},"main:080a24d0":{"schema_version":1,"namespace":"main","address":"0x080a24d0","status":"measured-draft","owner_bytes":432,"candidate_bytes":444,"differing_halfwords":184,"wrong_instructions":106,"classification":"asset-selection-screen","domain":"Backs up display memory, runs a modal selection screen, publishes an accepted selection, and restores the prior display state.","notes":["Recovered from retained owner assembly, local state layouts, and the approved compiler through the family-assisted m2c workbench.","The generated void signature was corrected because the owner explicitly returns its selection result in r0 after preserving it across cleanup.","All generated register and stack-slot identifiers were replaced with role-based names before retaining the candidate.","The typed reconstruction improves the compiling family-assisted m2c draft from 201 differing halfwords to 179 while remaining four bytes over the owner extent.","A 5,000-candidate safe family-template walk produced no exact object and did not improve the byte delta; its best structural score increased the byte mismatch and is not retained as canonical source.","Exact-C adoption remains gated on an independently compiled zero-difference object.","2026-08-27 re-verification: fresh candidate-show still measures exactly 436/432 bytes, 179 differing halfwords, 102 wrong instructions, matching this dossier -- no drift. The aligned diff shows the same allocation-size local (128<<6=0x2000, reused at three call sites: the initial Func_08004970 allocation and both Func_08007310 backup/restore copies) cached in fp on this candidate versus r9 on the reference, plus a further-downstream fp/r9 swap around the UiWindow_CreateFar/Func_08007310/Func_080072f0 block -- the same class of hi-register role nondeterminism already called out above, and now also independently observed on the unrelated sibling owner 080b2328 (sl/r8 swap) in this same compiler-family batch. This is cross-owner evidence the swap is a systemic GCC 2.96 allocator sensitivity for this idiom, not a defect specific to this source shape; no new respelling attempted beyond what is already recorded above, since none of the prior rejected experiments target this specific register-numbering axis and a productive fix likely needs permuter-style register-allocation search rather than manual respelling.","2026-08-27 (later pass): root-caused and fixed a mismodeled trampoline call. `Func_08007310` was not a real function -- 0x08007310 is the fp (r11) slot of the fourteen-entry `_call_via_rN` indirect-call trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8`, 4 bytes/slot, base 0x080072e4, N in r0..sp order, fp is the 12th slot). Traced the value loaded into fp immediately before the first `bl 0x08007310`: `ldr r3,[pc,#184]` at asm offset 0x94 reads the literal-pool word at owner offset 0x150 (confirmed against candidate-show's own resolved address annotations, `@ (0x150)`), which is `0x03001388` -- an IWRAM address, i.e. a function copied into IWRAM for speed, not a data pointer. `mov fp,r3` then `bl Func_08007310` is therefore `_call_via_fp`, a genuine indirect call through that IWRAM function address. The second `bl Func_08007310` near the end of the function reloads no new value into fp beforehand (fp is callee-saved and untouched by every intervening call), confirming both call sites dispatch through the SAME cached function-pointer value. Rewrote both sites as genuine indirect calls, `((CopyFn)0x03001388)(...)` with `typedef void (*CopyFn)(const void *source, void *destination, s32 size)`, matching the arg roles already correctly modeled (display_backup/0x06004000 swapped between backup and restore direction, size 0x2000), and removed the fictional `Func_08007310` prototype. This exactly mirrors the already-adopted fix on games/gs1/recon/en/main/080a8c2c.c (Func_0800730c -> ((FillWordsFn)0x03000168)(...) via the sl/r10 trampoline slot) and games/gs1/src/battle/effects/member_orbit/run.c: fp/r10/etc. are never argument-passing registers (arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c stops at r3), so no N-argument direct call to a fictional `Func_08007310` could ever legitimately compile to code containing `mov fp,r3` the way the reference does -- the old direct-call model was structurally incapable of ever reaching byte parity, independent of its diff count.","2026-08-27 (same pass): after the correctness fix, differing_halfwords moved from 179 to 184 (candidate_bytes 436 -> 444) even though the model is now structurally correct, because fixing the call exposed a second, independent, pre-existing GCC 2.96 register-allocation tie-break. In the OLD (wrong) direct-3-arg-call model there was no function-pointer local competing for a callee-saved register, so the allocator was free to (mis)assign fp to the reused 0x2000 size constant instead of r9 (this exact swap is documented above and predates this pass -- verified unchanged at the very first instruction pair the two candidates diverge on, before either call site is even reached). The reference needs BOTH quantities to survive in callee-saved registers simultaneously (r9=size, fp=copy_fn, alongside r5=screen, r6=a process_state-pointer cache, r7=display_backup, r8=ASSET_SELECTION_GLOBALS-cast pointer, sl=result -- all seven of r5/r6/r7/r8/r9/sl/fp are in simultaneous use, the maximum this function's prologue provisions). Once the correct indirect-call model reintroduced the fp-shaped competition, GCC's allocator did not converge on the reference's exact coloring: it also promotes the literal 0x06004000 destination-buffer constant into a persistent register (r8) across the whole function, something the reference does NOT do (the reference reloads 0x06004000 from the literal pool independently at all three of its use sites -- both copy calls and the Func_080072f0 fill call -- rather than caching it), which crowds out the correct roles for the rest of the function and cascades into the remaining diff. Tried and confirmed to have zero or negative effect (each re-measured after the fix, call order to the ten reference `bl` targets held fixed and matched to games/gs1/asm/080a24d0.s throughout -- no experiment ever reordered an actual call relative to another call): declaring `copy_fn` as a named local vs. an inline `(CopyFn)0x03001388` cast at each site (184, unchanged); initializing `copy_fn` at declaration vs. deferring the assignment to immediately before its first use (184, unchanged); declaring `copy_fn` first vs. last among the locals (184, unchanged); naming the reused 0x2000 size argument as its own local, `s32 backup_size` (184, unchanged); naming the reused 0x06004000 destination pointer as its own local, `void *vram_buffer` (regressed to 214 -- adds yet another long-lived quantity competing for the same seven-slot budget); swapping the order of the two independent, non-dependent leading statements `display_backup = Func_08004970(...)` and `screen = Func_080048b0(...)` (regressed to 194 -- rejected on two grounds, both worse AND this would have reordered two actual calls relative to games/gs1/asm/080a24d0.s's real bl sequence, which is never legitimate regardless of score). This confirms, independently of the RTL-level qty_compare() tracing already recorded on sibling owner 080a8c2c.json for a same-block tie, that this whole-function global-register-coloring tie-break is also insensitive to source-level respelling here -- consistent with needing the permuter-style register-allocation search flagged above rather than further manual attempts.","Kept the corrected indirect-call model rather than the lower-diff-count fictional-call model: 0x08007310 cannot compile from any direct N-argument call (fp is not in arm_function_arg's r0-r3 window), so the old 179-diff draft was a structural dead end that could never reach differing_halfwords=0 no matter how it was tuned, while the current 184-diff draft is a semantically correct model blocked only by the documented, already-cross-validated (080a8c2c, 080b2328) hi-register allocator tie-break. Adoption gate not met: differing_halfwords=184, not 0. Final measured state this pass: candidate=444 reference=432 differing_halfwords=184 wrong_instructions=106, compile=cache (deterministic across the reverts back to this exact source during this pass)."]},"main:080a35f8":{"schema_version":1,"namespace":"main","address":"0x080a35f8","status":"measured-draft","owner_bytes":688,"candidate_bytes":692,"differing_halfwords":317,"wrong_instructions":244,"classification":"unemittable-draft","evidence":{"reference":"games/gs1/asm/080a35f8.s","method":"families transplant (template main:080b1a14 / select_party_member.c, score 8143bp) seeded an m2c control-flow recovery over the complete symbolized owner, cross-checked callee signatures against already-exact siblings (ui/menu/create_cursor.c and inventory_menu/open_item_details.c for Func_080a10d0, menu/spawn_icon_entries.c and field_owner_107.c for Func_080a33d4/Func_080150d0)","family_template":"main:080b1a14","pc_relative_references":5,"jump_tables":0},"notes":["This owner takes a `u16 *positions` array parameter (the raw m2c draft's second 'unset register $r0' read inside the very first Func_08077008 call is the same incoming r0 argument, still live in the register at that point, not a second parameter) and runs a menu-style for(;;) input-poll loop over it (matching the family template's idiom closely, including the same ADDR_03001B04/ADDR_03001C94/ADDR_03001AE8 volatile reads), with an unusual A-button branch that further distinguishes a 'held-select' sub-mode (ADDR_03001AE8 bit 0x200) driving its own modulo-4 cursor-color animation before falling into the shared confirm/cancel tail. Every non-trivial callee signature (Func_080a10d0 6-arg, Func_080a33d4 2-arg, Func_080150d0 5-arg) is independently confirmed by four already-adopted exact siblings, so the call shapes are solid.","The raw m2c draft scored 752 vs 688 bytes, 264 wrong instructions. Two fixes were applied under a tight time budget: widening the persisted selection index from `s8` to `s32` (the same widening lesson as 0801db70 -- the field is read with a genuinely sign-extending `ldrsb` register-offset load either way, but a narrow persisted local caused the compiler to emit a plain immediate-offset `ldrb` instead, which cannot be used for a byte the code later needs sign-extended for arithmetic like `selection * 0x18`), and removing a matching narrowing cast on the modulo-reassignment of that same value. This closed most of the byte gap (752 -> 692, within 4 bytes of the 688-byte reference) and cut wrong_instructions to 244.","Given this owner's size and the time remaining in this batch, only one iteration was run past the initial draft rather than the multi-round narrowing done on the other five owners in this batch; the remaining 244-instruction gap is visibly dominated by register-allocation swaps (r5/r6/r7/sl/r8 assigned to the same logical values in a different arrangement, the same class of residual seen throughout this batch) and at least one instruction-scheduling reorder (the two adjacent state-field reads at 0x1C/0x1E are emitted in the opposite order from the source's textual order), not by any remaining wrong call, wrong constant, or wrong control-flow edge found by inspection.","This is the least-verified draft in the batch -- closest in raw byte count but least iterated -- and is a strong candidate for either a fresh close read against the reference disassembly or permuter-style bounded search, not further blind respelling.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."]},"main:080a38d0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a38d0","status":"measured-draft","owner_bytes":824,"score":{"measured":"2026-08-27","candidate_bytes":300,"reference_bytes":824,"differing_halfwords":405,"wrong_instructions":345,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering; the operand at struct offset +0x20 (item_window) matches games/gs1/include/inventory_menu.h's InventoryMenuState.item_window exactly, and it sits between the already-named inventory_menu owners open_category_items (080a38a8) and equipment_menu/update_compatibility_indicators (080a3c08), and directly calls EquipmentMenu_StartCompatibilityIndicators (Func_080a3c98) via a ScheduleCallbackAfterFrames((s32)&Data_080a3c09, 0xc80) registration -- this is real inventory/equip-menu code, most likely the item-category selection loop the player uses when choosing which item to equip/use, not a party-member picker. This is the largest and most register-heavy owner in the batch (7 registers live across calls, matching the sibling owners' shared prologue shape) and, given six owners assigned in this batch, it received the least remaining time: the candidate captures the overall for(;;)/redraw/A-B-L-R shape, the item-window bounds setup, the Modulo-driven selection wraparound, and calls into the real siblings InventoryMenu_CountItems (Func_080a3d6c), InventoryMenu_GetItemQuantity (Func_080a3d9c), and Func_080a3ef0, but the exact quantity/availability-icon drawing logic, the equipment-compatibility-indicator dispatch (the Func_080a3d9c-guarded branch that plays sounds 111-114 and draws one of two icon variants depending on compatibility), and most struct-field offsets beyond item_window (+0x20) and target/item owner (+0x21a/+0x21b) are reconstructed only approximately from the raw instruction stream, not independently confirmed. The 524-byte shortfall (300 vs 824) reflects that gap directly."},"rejected_experiments":[],"notes":["Recovered from games/gs1/asm/080a38d0.s. games/gs1/include/inventory_menu.h supplied item_window (+0x20), and the real callee names InventoryMenu_CountItems/GetItemQuantity/IsSpecialItemRange -- the strongest, best-corroborated evidence in this whole batch that a target owner's assembly can genuinely belong to a different module than its clustered template while still sharing the template's control-flow idiom.","The ScheduleCallbackAfterFrames(&EquipmentMenu_CompatibilityUpdateEntry, 0xc80) call near the top (register callback + 3200-tick/order value, read directly off the literal pool as `.4byte 0x080a3c09`) was not modeled in the candidate at all -- it is a real, verified call this draft is missing entirely, left out because the exact registration semantics (order/priority argument) were not chased down in the time available.","This candidate claims zero DONE bytes; it is a rough structural skeleton (300 of 824 bytes), not a close attempt. A proper reconstruction of this owner needs a dedicated pass: the equip-compatibility branch (calls Func_080a3d9c, then dispatches to one of two Func_08015080 icon draws based on its result, then a further Func_080a3d6c/count check with a third icon variant) is the single largest unmodeled chunk and should be traced from the retained assembly before any more respelling is attempted.","No sibling draft existed for this owner before this session."]},"main:080a3ef0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a3ef0","status":"measured-draft","owner_bytes":444,"score":{"measured":"2026-08-27","candidate_bytes":424,"reference_bytes":444,"differing_halfwords":160,"wrong_instructions":114,"class":"wrong","note":"Independently re-measured this session from a fresh worktree/compiler build (prior wave's score was UNVERIFIED after an infrastructure incident; this run reproduces the identical 424/444, 160, 114 figures from scratch). Control flow, the ten-way switch/jump-table over an item type byte, both duplicated equip-check bodies (holder==actor short circuit vs alloc/copy/restore-window path via the 08004938/080072f0(via080072e4 r3-trampoline)/08002df0 alloc-copy-free idiom), and the case-6-only difference (raw item_id vs item_id&~0x200 passed to Func_08077028) all match the retained assembly instruction-for-instruction. The residual is pure register allocation, and this session traced its exact mechanism: item_id's live range spans from the initial mask+lookup through to its one masked read deep inside the case1-9 else-branch. The reference spills item_id to a single stack word (str/ldr [sp,#0]) and keeps fp free for the rest of the function, so fp gets reused by BOTH case1-9's and case6's otherwise-identical other_window locals (their live ranges never overlap each other, only fp's global 'is it free' bookkeeping matters to this allocator). The candidate instead colors item_id into fp for its whole life, which forces each branch's other_window to take its OWN separate stack word instead (str [sp,#4] in case1-9, str [sp,#0] in case6) -- net one word worse (sub sp,#8 vs sub sp,#4, 424 vs 444 body bytes) and it also flips which of holder/flags lands in r8 vs sl from the prologue onward. This looks like a genuine graph-coloring tie the source no longer controls directly."},"rejected_experiments":[{"experiment":"u16 item_id spilled to its own local plus a separate masked_id local for the case1-9 Func_08077028 call (first-pass m2c-shaped draft)","result":"candidate=424 reference=444 differing_halfwords=197 wrong_instructions=171 -- extra locals cost a second stack word (sub sp,#8 vs the reference's sub sp,#4) and never converge on the reference's single-slot reuse"},{"experiment":"s32 item_id (not u16), single local reused in place with item_id &= 0xfffffdff for the case1-9 branch instead of a separate masked_id","result":"candidate=424 reference=444 differing_halfwords=160 wrong_instructions=114 -- current committed draft; matches the reference's AND-mask instruction and its case-6-vs-case1-9 masking asymmetry, but register roles (r8/sl for holder/flags) are still swapped versus the reference"},{"experiment":"move `flags = 0;` from before the Func_08077008(holder) call to just after the item_id extraction (right before the mode==1 check)","result":"re-verified this session (the prior wave's ROM-symlink corruption is fixed): differing_halfwords=165, wrong_instructions=120 -- strictly worse than baseline, rejected"},{"experiment":"s32 flags = 0 as a declaration initializer instead of a separate first statement","result":"byte-identical to baseline (160/114) -- no effect on generated code"},{"experiment":"reparenthesize the item_id load as (u8*)window + (216 + slot*2), and separately as ((u16*)((u8*)window+216))[slot]","result":"byte-identical to baseline (160/114) both times -- the front end folds all three groupings identically"},{"experiment":"drop the named `window` and `item` locals and inline both calls directly into the item_id/type expressions","result":"byte-identical to baseline (160/114) -- confirms the fp-vs-stack choice for item_id is not driven by whether window/item are named locals"}],"notes":["Recovered only from games/gs1/asm/080a3ef0.s traced instruction-by-instruction (hand-computed PC-relative literal-pool addresses and jump-table offsets, cross-checked against the function's own trailing 5-word literal pool) plus the approved local ROM and compiler.","The family-matcher's best guess, games/gs1/src/battle/show_paired_unit_work_and_wait.c (score 7165/10000, below the 7500 adoption threshold), is a 10-parameter dual-object UiWork/WaitFrames animation-trigger routine with no shared callees, field offsets, or constants with this owner -- confirmed a shape-only false positive per this wave's guidance and not used as evidence.","Behavior: Func_080a3ef0(holder, slot, mode, actor) reads holder's inventory window (Func_08077008), extracts the u16 item id at byte offset 216+slot*2, looks the item up (Func_08077018 on item_id&0x1ff) and reads its type byte at offset 2, then dispatches on a 10-entry (0..9) jump table matching the retained assembly's embedded switch table (0x080a4000 for type 0, 0x080a3ff4 for type 6, 0x080a3f6c shared for types 1-5/7-9). Type 0 calls Func_080a112c(*(state+36), actor, slot, flags) directly with flags left as set by the mode==1 check (flags|=0x100). Types 1-5/7-9 and type 6 share near-identical bodies (differing only in the OR'd flag bit -- 2 vs 4 -- and in whether item_id is masked with ~0x200 before the retry lookup): when holder==actor they call Func_080a112c directly with the extra flag bit set; otherwise they snapshot actor's own window into a bump-allocated 0x14c-byte buffer via the 0x080072f0 r3-indirect-call trampoline slot (target 0x03001388, a fixed IWRAM word-copy routine, called (dest,src,words) per the r0-r3 trampoline-slot idiom), probe actor's eligibility (Func_080a40ac), try Func_08077028(actor,item_id) for an alternate slot, fall back to the original slot on -1, call Func_080a112c, restore actor's window from the snapshot, and free the buffer (Func_08002df0).","Func_08004938 is the already-adopted Runtime_BumpAllocate (games/gs1/src/runtime/memory/bump_allocate.c); Func_08002df0 and 0x080072f0 have no games/gs1/asm/.s file and no source-paths.json entry -- 0x080072f0 resolves to the project's documented 0x080072e4 call_via_rN trampoline (N=r3 slot, offset 0xC), so it is not a fictional named function; 08002df0 is a genuine unregistered callee left as an opaque extern. Func_08077008, Func_08077018, Func_08077028, Func_080a40ac, and Func_080a112c are all still raw owners (their own games/gs1/asm/.s files exist, unadopted).","Not adopted: differing_halfwords=160 (of ~222 halfwords), so exact-byte adoption gates are not met. No name was registered in games/gs1/source-paths.json and no .global alias was added to the retained assembly, consistent with the measured-draft convention used by other unregistered dossiers in this directory (e.g. 080b6c08.json)."]},"main:080a40ac":{"schema_version":1,"namespace":"main","address":"0x080a40ac","status":"measured-draft","owner_bytes":100,"candidate_bytes":92,"differing_halfwords":33,"wrong_instructions":36,"classification":"inventory_discard_first_unequipped_stack (medium confidence)","domain":"Takes a single owner id (r0). Calls the veneer at 0x08077008 (OwnerState_GetFar / Func_08077008, already declared in owner_state.h returning struct OwnerInventoryState*) and scans its inventory[15] u16 array (offset 0xd8/216, matching owner_state.h's existing LAYOUT_OFFSET_GUARD) from slot 0 upward. For each encoded slot value: if it is 0, the scan stops and the function returns 1 (empty/terminator reached). If bit 0x200 is set (an 'equipped' flag, consistent with the sibling get_item_quantity.c's item-slot bit layout: 0x1FF item id, bits 11-15 quantity-1), the slot is skipped and the scan continues (up to 15 slots; exhausting all 15 without a hit returns 0). Otherwise -- the first present, non-equipped slot found -- it computes quantity = ((encoded>>11)!=0) ? (encoded>>11)+1 : 1, then calls the veneer at 0x08077058 (which itself long-jumps to 0x080788c4 = Inventory_Remove(owner,slot) per inventory.h) exactly `quantity` times with (owner_id, slot), and returns 1 if the LAST call's return value was 2, else 0. Net effect: finds the first non-equipped item stack and removes it unit-by-unit (fully emptying that slot), reporting success (1) only if the final removal call signalled 2.","notes":["2026-09-01 walking-pointer probe: explicitly reading owner->inventory[0] before the loop, advancing a dedicated slots pointer, and reloading at the bottom compiles byte-identically to the indexed structured loop (92/100 bytes, 33 differing halfwords, 36 wrong instructions). GCC reconstructs the same induction form and still folds the one-off pretest into the walked pointer, so this natural producer/consumer spelling does not recover the reference's separate register-offset pretest or literal 0x200 mask. The readable indexed loop remains canonical and this axis is closed.","The family-matcher's best guess, games/gs1/src/battle/summon/reset_charge.c (score 7342/10000, below the 7500 threshold), is a false positive: it has no relation to this owner's actual semantics (different registers, different callees, no inventory-slot bit logic). It was read and discarded per the task brief's warning about shape-only matches in this project.","Real evidence instead: this owner's address (0x080a40ac) sits in a solid run of already-adopted inventory_menu/*.c owners in source-paths.json -- immediately preceded by main:080a3e88 (inventory_menu/refresh_owner_items.c) and immediately followed, byte-exact (0x080a40ac + 100 = 0x080a4110), by main:080a4110 (inventory_menu/get_command_cursor_x.c). Its first callee (bl to the veneer at 0x08077008) is already declared in owner_state.h as `struct OwnerInventoryState *Func_08077008(s32 owner)` / `#define OwnerState_GetFar Func_08077008`, and the 216-byte (0xd8) offset it reads matches that header's own `LAYOUT_OFFSET_GUARD(OwnerInventoryState_Inventory, ..., inventory, 0x0d8)` exactly. Its second callee (bl to the veneer at 0x08077058) resolves (per the veneer's own retained .4byte target, 0x080788c5 with the Thumb bit stripped -> 0x080788c4) to Func_080788c4, which inventory.h already names `Inventory_Remove` -- so this owner is a genuine, already-connected member of the inventory subsystem, not the battle/summon family the template suggested.","Cloned m2c (matt-kempster/m2c) and ran `compiler workbench` (temporarily registering a placeholder name to satisfy the tool, removed again afterward since exact adoption was not reached) to get an m2c-informed structural hypothesis using the project's real agscc type context. m2c's decompiled output independently reproduced the same control flow this draft had already derived by hand (same terminator/equipped-skip/removal-loop/shared-return-1-tail shape), which increases confidence in the recovered algorithm even though the byte-level match remains incomplete.","Iterated roughly a dozen structurally distinct hand-drafts (do-while vs while vs for for the inner removal loop; a guarded vs unguarded removal loop; encoded read merged into the while-condition vs split into a separate prefetch/test variable matching the reference's redundant reload; struct-field indexing vs a cached u16* pointer; a single `return` vs a goto-unified single-exit tail with a dedicated carry variable copied to the return register, matching the reference's `adds r1,r0,#0` / `adds r0,r1,#0` pattern) without applying any register hint, asm(), or hand scheduling -- only ordinary, plausible C shapes. Best result: 92/100 candidate bytes, 33 differing halfwords, 36 wrong instructions (down from an initial naive draft's 94 bytes / 43 differing halfwords / 49 wrong instructions).","Residual gap is concentrated in one persistent, small structural knot: the reference's prologue loads the 216 struct offset into a register for a register-offset ldrh (`movs r3,#216; ldrh r3,[r0,r3]`) as a one-off PRE-loop test read, then separately bumps the pointer by an immediate 216 for the walking body reads, and shares that pre-test with the loop-back edge via an unconditional jump to a bottom test (`b.n .L0`) rather than an immediate top-of-loop compare+branch; it also loads the 0x200 equip-bit mask from an inline literal pool (`ldr r3,[pc,#40]` -> `.4byte 0x00000200`, placed as dead data right after an already-required branch) instead of synthesizing it with movs+lsls. Every natural source rewrite tried either reproduced the compiler's own (smaller, correct-behavior) synthesis of 0x200 and an immediate top test, or, when forced toward the reference's exact prefetch/shared-test shape via genuinely different source (a manual goto-based rotated loop, or splitting the test read from the body read), lost the compiler's loop-strength-reduction (address recomputed via `lsls+ldrh[r,r]` per iteration instead of a walked pointer) and got further from the reference, or required extra live-range pressure that spilled a variable to r8 (mov r7,r8; push {r7}) rather than reusing r1/r5 the way the reference does. This reads as a genuine small, persistent compiler-scheduling/allocation difference (per Cleanroom's 'invert a stalled last mile' guidance) rather than a wrong overall model -- the algorithm, callees, offsets, and loop trip count are all corroborated by two independent methods (hand trace + m2c) and match the header-declared struct layout exactly."],"rejected_experiments":[{"experiment":"signed s32 `encoded >> 11` (no unsigned cast)","result":"compiled to `asrs` (arithmetic shift) instead of the reference's `lsrs` (logical shift) -- same numeric result for this value range but a different opcode/byte pattern. Fixed by shifting through `(u32)encoded >> 11` while keeping `encoded` itself as a plain s32 (a u16-typed local instead produced spurious lsls/asrs #16 sign-extension shuffles on every use)."},{"experiment":"plain `if (remove_result == 2) return 1; return 0;` immediately after the removal loop, with a single local for the call result","result":"gcc synthesized a branchless eors/negs/orrs/lsrs bit-trick tail instead of the reference's cmp+branch; only went away once the two return-1 exits (loop-terminator-found and remove-result-==2) were unified through one shared `goto found;`+single final `return result;`, which is what let the compiler recognize and reuse the same tail code the reference does."},{"experiment":"manual goto-based 'jump to bottom test' loop rotation, written by hand to mimic the reference's b.n .L0 / prefetch shape","result":"86 candidate bytes but WORSE match (42 differing halfwords, 51 wrong instructions): breaking the loop out of a structured while/for construct stopped gcc's own induction-variable strength reduction, so the per-iteration address became `lsls r3,r6,#1; ldrh r2,[r3,r1]` (recomputed from base+index*2) instead of the walked-pointer `adds r0,#2; ldrh r2,[r0,#0]` both this draft's structured loop and the reference use."},{"experiment":"adding the `if (quantity != 0) { do {...} } ` guard test (matching the reference's redundant-but-real dead check) around the removal loop","result":"reproduces the reference's extra cmp+beq guard, but the wider live range needed for the call-result variable across that extra edge pushed it to r8 (mov r7,r8; push {r7}, 114-116 candidate bytes) unless combined with a goto-unified single return (see above), which brought it back down to 88-92 bytes with the guard intact and no spill -- the version kept in this draft."}]},"main:080a414c":{"schema_version":1,"namespace":"main","address":"0x080a414c","status":"measured-draft","owner_bytes":832,"score":{"measured":"2026-08-27","candidate_bytes":828,"reference_bytes":832,"differing_halfwords":400,"wrong_instructions":186,"class":"wrong","note":"Every branch target, call target, field offset, and constant in the aligned diff (candidate-show --align) matches the reference exactly once the prologue's 4-byte length gap is accounted for: from the first post-prologue instruction (str r2,[sp,#4] / str r1,[sp,#4]) through the function's closing pop/bx, every '!' line is either a pool-offset shift or a register-bank rename (r1<->r2, r2<->r3) that is a direct, constant -4-byte-offset consequence of the prologue gap -- no algorithmic, control-flow, or data mismatch remains anywhere past it. The entire gap is localized to the first ~13 instructions: the reference computes the command_states array's frame address as two instructions (movs r1,#8; add r1,sp) and keeps index=0/row=0/need_redraw=1 as three separately-loaded constants (r1, r2, r3) with the Data_03001f2c dereference (ldr r6,[r3,#0]) scheduled after the row constant, whereas this compiler's build folds the array address into one 'add r3,sp,#8', reuses the already-zero r1 for both index and row, and hoists the Data_03001f2c dereference to the very first instruction of the function body. Tried five independent source-level levers to influence this -- reordering the index/row/need_redraw/menu assignments as statements in every plausible order, converting all four to declaration initializers in matching order, reordering the local declarations themselves (including moving command_states last), shrinking command_states from 8 to 6 bytes, and passing &command_states[0] instead of the bare array to InventoryMenu_BuildCommandStates -- and every variant produced byte-identical output (828 bytes, same instruction stream), confirming this compiler schedules this specific cluster of independent, side-effect-free prologue constants and the parameterless global dereference by its own internal register-pressure/priority heuristic rather than by source statement or declaration order. This matches the same class of compiler-internal register-allocation/scheduling residual already documented and not chased further in this cluster's other measured-drafts (080b2b10.json, 080ab314.json)."},"family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"Score 8568/10000 (n-gram/call-target/branch clustering) reflects only the generic register-shuffle-prologue/redraw-loop/if-chain shape shared by every owner in this shop/menu cluster, not real kinship: this owner shares zero callees with Func_080b362c (no UiWindow_CreateFar/Ability_GetAvailability/Func_080772a8/UiWork_Create) and its size (832 bytes) already differs from the template's 576. This owner's own retained assembly instead calls Func_080a345c/Func_080a4110/Func_080a413c/Func_080a448c/Func_080a45cc/Func_080a4eb8/Func_080a51d0 with exactly the parameter counts and struct-offset arguments (0x10c, 0x174, 0x178, 0x21a) declared in the already-adopted games/gs1/include/inventory_menu.h and implemented by the already-adopted games/gs1/src/inventory_menu/*.c siblings (build_command_states.c, get_command_cursor_x.c, get_command_cursor_y.c, draw_command_labels.c, set_message_window_row_7_bounds.c, draw_selected_item_header.c, close_windows.c) -- an exact structural match confirmed independently of the family score. Kept only as a source of general shop/menu redraw-loop shape, per instruction; not used for any field offset, call target, or algorithm decision below."},"actual_sibling_evidence":"This owner is the item command menu: reached after an item slot is selected, it builds a 3-column x 2-row command-availability grid via the already-adopted InventoryMenu_BuildCommandStates(s8 command_states[6..8]) (games/gs1/src/inventory_menu/build_command_states.c), lets the player move a (col,row) cursor over it with the d-pad (UP/DOWN adjust row via 0x40/0x80, LEFT/RIGHT adjust col via 0x10/0x20, matching InventoryMenu_GetCommandCursorX/Y's row*3+col grid convention in get_command_cursor_x.c), and returns the chosen command index 0-5 (or -1 on cancel) to its only caller, main:080a2680 (not yet recovered; its retained assembly calls this owner and treats -1 specially). Every struct field this owner touches on Data_03001f2c matches games/gs1/include/inventory_menu.h's struct InventoryMenuState exactly at its already-named offsets (message_window=0x10c, selected_slot=0x174, selected_item=0x178, item_owner=0x21a, info_window=0x2c) and, for offset 0x24 (a window handle passed to Func_080a112c), against the identical (menu+0x24, id, 0, 0) call shape already independently reconstructed in two other measured-draft inventory_menu owners' assembly (080a60d4, 080a63e4) and in the already-adopted games/gs1/src/inventory_menu/close_windows.c, which lists 0x24 among a run of window-handle fields (0x10,0x20,0x24,0x28,0x2c,0x30,0x34,0x38,0x3c,0x40) it releases -- confirming 0x34 (also read here, via UiWindow_Commit) and 0x24 are genuine window fields of this same struct, not yet individually named. The two offsets this owner writes but that fall past the struct's current LAYOUT_SIZE_GUARD end (0x25c, 0x25d, one and two bytes past the guard's 0x25c size) are new evidence that the true struct extends at least two bytes further than currently modeled; left as raw offsets rather than extending the shared header in this pass. The message-id composition '(selected_item & 0x1ff) + (s32)&Value_00000075' reuses the exact same Value_00000075 extern-byte message-base symbol already used by games/gs1/src/shop/select_use_item.c and games/gs1/src/shop/select_repair_item.c, and the EquipmentMenu_StartCompatibilityIndicators()/ScheduleCallbackAfterFrames(&EquipmentMenu_CompatibilityUpdateEntry, 0xc80) pair matches games/gs1/include/equipment_menu.h's already-adopted declarations exactly, including the literal pool value 0x080a3c09 for &Data_080a3c09.","rejected_experiments":["Assumed an incoming s32 actor parameter (matching the family template's signature, and m2c's naive seed): the retained assembly overwrites r0 (mov r0,fp) before ever reading it, proving this owner takes no arguments. Declared it s32 Func_080a414c(void) instead -- confirmed correct against the caller (main:080a2680 does not need to supply a meaningful r0).","First draft used 'if (command_states[index] != -1) { switch...; store; break; } Audio_PlayCue(114);' (valid-selection branch first): compiled to an inverted branch polarity and a differently-laid-out block versus the reference's 'bne valid; play(114); jump-past-switch; valid: switch...'. Rewritten as 'if (command_states[index] == -1) { Audio_PlayCue(114); } else { switch...; store; break; }' (invalid-first, matching Cleanroom's largest-coherent-hunk-first guidance) -- this fixed every branch topology and target in the entire rest of the function (confirmed via full --align diff: zero non-offset mismatches from this point to the closing bx) and shrank the candidate/reference byte gap from 8 to 4.","col = Modulo(saved, 3); row = FixedPoint_Ratio(saved, 3); (no truncation): missing the explicit lsls/asrs #24 sign-extension-through-s8 the reference performs on both call results. Added explicit (s8) casts on both -- matched.","Five independent attempts at the remaining 4-byte prologue gap (see score.note for the exact list: statement reordering, declaration-initializer conversion, declaration reordering, array size 8->6, and &command_states[0] vs bare array): all five produced byte-identical candidate output, indicating the gap is driven by this compiler's internal register-scheduling/priority heuristic for a cluster of independent zero/one constant loads and a dependency-free global dereference, not by any C-source-level lever tried. Not chased further per the project's guidance against open-ended tuning once control flow, algorithm, and every call/constant/offset are already credible."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080a414c.s, 832 bytes) and its m2c-assisted canonical/symbolized disassembly (out/family-transplants/main-080a414c/m2c/symbolized.s, which resolves every pc-relative literal and the inline jump table), the approved local EN ROM, games/gs1/include/inventory_menu.h and its already-adopted games/gs1/src/inventory_menu/*.c implementations (build_command_states.c, get_command_cursor_x.c, get_command_cursor_y.c, draw_command_labels.c, set_message_window_row_7_bounds.c, draw_selected_item_header.c, close_windows.c, use_selected_item.c, prepare_owner_items.c), games/gs1/include/equipment_menu.h and games/gs1/include/types.h/global_cells.h for the shared macro names (UiText_DrawAt, UiWindow_Commit, WaitFrames, Audio_PlayCue, GameFlag_IsSet, Modulo, FixedPoint_Ratio, ScheduleCallbackAfterFrames, ADDR_03001B04/C94), games/gs1/src/shop/select_use_item.c and select_repair_item.c (for the Value_00000075 message-base convention, read per the task's instruction to check shop siblings; their own algorithm was not used since this owner's real kinship is with inventory_menu/, not shop/), and the approved compiler. Also cross-checked against this session's own prior measured-drafts games/gs1/recon/en/dossiers.json#main:080b2b10 and 080ab314.json, which independently documented the same 'assigned template is a shape-only false positive' finding for this cluster and the same class of unresolvable register-scheduling residual. No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","This candidate claims zero DONE bytes; games/gs1/asm/080a414c.s remains authoritative.","Verified with: tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/080a414c.c --align"]},"main:080a46b4":{"family":"template-main-08025180","template_owner":"main:08025180","template_source":"games/gs1/src/items/classify_use_ability.c","candidate_path":"games/gs1/recon/en/main/080a46b4.c","reference_bytes":160,"best_candidate_bytes":160,"best_differing_halfwords":0,"best_wrong_instructions":0,"status":"exact","notes":["Template battle_owner_15.c (Item_CanOwnerEquipDirect-shaped: two early-return checks then a single ability-flag test) gave the right M2C_FIELD idiom and general shape, but this owner's actual control flow (from games/gs1/asm/080a46b4.s) is a materially extended variant: masked = itemId & 0x1ff; two calls (Func_08077018 for item data, then Func_0808a490(masked) which short-circuits to `return 0` if nonzero); Func_08077080 is called UNCONDITIONALLY on (field40 & 0x3fff) to get an ability pointer even before the field40!=0 guard is checked (field40 is read from memory twice: once for the call argument, once for the guard, rather than being cached); nested field2/field12 checks decide whether Func_08077218(owner, masked) gets consulted; and the final ability-flag check is a 3-way result (2 / 1 / 0 / -1) driven by bits 0x40 and 0x80 of ability byte 1 and a `field8==0xff` check, not the template's simple 2-vs-0 test.","Iterated 4 respellings, converging from wrong_instructions=42 down to 16 (candidate 156B vs reference 160B, a 4-byte/2-instruction residual). Key fixes: (a) splitting `masked = itemId & 0x1ff` into a plain-copy-then-AND-in-place (two statements) instead of one combined-expression AND, matching the reference's adds-then-ands register reuse; (b) moving the Func_08077080 call to read field40 fresh via M2C_FIELD directly as its argument (not through a cached local), and reading field40 AGAIN via M2C_FIELD for the `!= 0` guard immediately after the call, instead of guarding before the call and reusing one cached value; (c) restructuring the field2/field12/Func_08077218 logic as three explicit nested `if` statements (matching reference's branch order exactly: field40 guard, then field2, then field12, then the call) rather than an if/else-if with a compound `&&` condition.","Residual: the final `(field1 & 0x80) ? -1 : 0` bit test compiles to a single `lsrs r3,r2,#7` (extract bit 7 directly) in the candidate, versus the reference's `movs r3,#128; ands r3,r2` (explicit mask-and) -- both are followed by the identical branchless negate/or/lsrs-#31 sign-extraction tail (which matches exactly), so this is purely which of two equal-cost single-bit-test encodings the compiler picks. Tried the same test as an explicit `!= 0` comparison, as a bare truthy ternary, and with the loaded byte declared `s8` instead of `u8` (this last one regressed the match to wrong_instructions=28, so reverted) -- none produced the AND form. The identical bit-test earlier in the same function (`field1 & 0x40`, used as a genuine branch condition rather than a value fed into a branchless ternary) DOES compile to the AND form in both candidate and reference, suggesting the shift-vs-mask choice is driven by whether the bit test result flows into a conditional branch or into a value-producing expression -- a compiler-internal codegen choice I could not reach by respelling the C, not a remaining logic/shape gap.","This 2-instruction residual is the only remaining difference; a permuter-style search over just that one sub-expression's phrasing (rather than further manual guessing) is the most promising next step.","measured=2026-08-29: tried four more respellings of `(field1 & 0x80) ? -1 : 0` targeting the shift-vs-mask codegen choice -- (a) `((field1 & 0x80) != 0) ? -1 : 0`, (b) `(field1 & 0x80) == 0 ? 0 : -1`, (c) hoisting into an intermediate `s32 bit7 = field1; bit7 &= 0x80;` before the ternary (mirroring the earlier successful `masked` split), (d) decimal `128` instead of `0x80`. All four compiled to the identical `lsrs r3,r2,#7` and left differing_halfwords=24/wrong_instructions=16 unchanged -- refuted, reverted to the documented `(field1 & 0x80) ? -1 : 0` baseline. Confirms this is a compiler-internal codegen choice (bit-test flowing into a value-producing ternary vs. a branch condition) not reachable by respelling this expression; needs a different structural approach (e.g. changing what feeds the ternary, or accepting the residual) rather than further sub-expression rewording.","measured=2026-08-29 (resolved): the missing piece was register-pressure/pseudo-materialization timing, not the ternary's phrasing. Hoisting `s32 mask = 0x80;` immediately before the ternary (same block as the `else`) still produced `lsrs`. But declaring `s32 mask = 0x80;` at the TOP of the `if (result == 1) { ... }` block -- i.e. before `u8 field1 = M2C_FIELD(abilityData, u8, 1);` and thus before the `field1 & 0x40` branch that comes first -- makes GCC 2.96 materialize 0x80 into its own register early, and it then reuses that register for the final bit test as `movs r3,#128` / `ands r3,r2`, matching the reference exactly. Final form: `if (result == 1) { s32 mask = 0x80; u8 field1 = ...; if ((field1 & 0x40) != 0) {...} else { result = (field1 & mask) ? -1 : 0; } }`. This closed the function to differing_halfwords=0 / wrong_instructions=0 (candidate=160B=reference). `make verify` passed (staged tree verified, hash 67c15b02271bc8061ebfd1ecf203b4d91ec652f6); working tree left unstaged and uncommitted per instructions."]},"main:080a524c":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a524c","status":"measured-draft","owner_bytes":316,"score":{"measured":"2026-08-27","candidate_bytes":316,"reference_bytes":316,"differing_halfwords":124,"wrong_instructions":52,"class":"wrong","note":"This owner was assigned to the shop/select_party_member.c family by n-gram/call-target clustering, but its actual callees (Item_Get/Func_08077018, UiWindow_CreateFar, UiText_DrawAt, Modulo, GameFlag_IsSet) and its fixed-2-choice Yes/No shape identify it as an inventory-menu confirmation dialog, not a party-member picker -- it sits between the already-named inventory_menu owners 080a4ee0 (SetMessageWindowRow3Bounds) and 080a5534 (Resource_LoadPairedBlocks) in source-paths.json. The template's for(;;)/redraw idiom still transplants correctly at the control-flow level: candidate byte length now matches the reference exactly (316/316) and the full prologue, the UiWindow_CreateFar(13,3,17,10,2) call, the item-mask-and-lookup, all five UiText_DrawAt icon/label draws, the up/down/A/B button polling against ADDR_03001B04 and ADDR_03001C94, the Modulo(selection+2,2) wraparound, and the GameFlag_IsSet(0x150)-guarded abort path are all present and logically correct. The residual 52 wrong_instructions trace back to one concrete, isolated instruction-selection difference: the reference materializes the message-id constant 0x182 (added to the masked item id for the first UiText_DrawAt call) via a literal-pool load (`ldr r3,[pc,#N]`), while every C phrasing I tried for that same arithmetic compiles to a two-instruction mov+lsl synthesis (`movs r2,#193; lsls r2,r2,#1`) instead. Because that one site is 2 bytes shorter than the reference's pool load, the --align tool's phase-locked comparison misreads a long run of otherwise-correct downstream instructions as mismatched (register numbers shift by one map slot after that point) even though the call sequence, branch structure, and constants all still line up when read manually. This looks like a compiler-internals residual (a fixed instruction-selection heuristic for ADD-immediate materialization that C source phrasing does not control), not a source-shape gap -- worth revisiting with a permuter-style search over instruction-selection variants rather than more manual respelling."},"rejected_experiments":[{"cell":"window-var-declared-before-selection","reason":"Declaring `s32 window; s32 selection; s32 changed;` in that order (matching first-use order) puts `window` in r8 instead of r7 and `changed` in r7 instead of r8 (candidate=308, differing_halfwords=137, wrong_instructions=70). Reordering the declarations to `selection; window; changed;` (matching apparent register-allocation-by-declaration-order for this compiler) fixed window->r7, selection->r6, changed->r8 and dropped wrong_instructions to 52."},{"cell":"changed-initialized-to-literal-1","reason":"Writing `s32 changed = 1;` at the top (alongside `selection = 1`) makes the compiler re-materialize a fresh `movs r7,#1` instead of the reference's `mov r8,r6` (copying the already-live selection value). Writing `changed = selection;` right after `selection = 1;` (so the compiler can see they are provably equal) reproduces the `mov r8,r6` register-copy pattern exactly."},{"cell":"message-id-plus-0x182-as-inline-expression","reason":"`UiText_DrawAt((item_id & 0x1FF) + 0x182, window, 24, 0)` compiles the +0x182 via `movs r2,#193; lsls r2,r2,#1` (shift synthesis), not the reference's literal-pool load. candidate=308."},{"cell":"message-id-plus-0x182-as-separate-statements","reason":"Splitting into `item_id &= 0x1FF; item_id += 0x182;` as two statements produces the identical shift-synthesis codegen as the inline-expression form -- ruling out expression-shape as the cause. candidate=316 (after the declaration-order fix), same 52 wrong_instructions."},{"cell":"message-id-plus-0x182-operand-order-swap","reason":"`0x182 + (item_id & 0x1FF)` (commuted operand order) produces byte-identical output to the non-commuted form -- the compiler's constant-materialization choice does not depend on operand order."},{"cell":"message-id-via-separate-named-local","reason":"Introducing a dedicated `s32 msg;` local, assigned via `msg = item_id & 0x1FF; msg += 0x182;` instead of reusing the `item_id` parameter register, also still synthesizes via shift, not pool-load. This rules out register/variable identity as the cause and narrows the residual to the ADD-immediate itself: the same literal 0x150 and 0x480/0xc80-style constants elsewhere in this family's sibling owners (080a38d0, 080a5388) genuinely do compile via shift-synthesis when used as a fresh MOV (loading a brand-new register for a call argument), so the reference's choice of pool-load specifically for an ADD-to-existing-value context looks like a real, narrow compiler heuristic difference rather than something reachable by any respelling of this owner's own source."}],"notes":["Recovered from games/gs1/asm/080a524c.s (retained ground-truth disassembly) plus games/gs1/include/types.h's large Func_0XXXXXXX name registry, which already established UiWindow_CreateFar=Func_08015010, Item_Get=Func_08077018, UiText_DrawAt=Func_08015080, Audio_PlayCue=Func_080f9010, WaitFrames=Func_080030f8, Modulo=Func_080022fc, UiWindow_Close=Func_08015018, and GameFlag_IsSet=Func_080770c0.","This candidate claims zero DONE bytes; it is not byte-exact.","The five drawn message ids (0x1FF-masked item id + 0x182, then the literal pairs 0xAD4/0xAD5 and 0xB2C/0xB2D) were read directly off the function's own literal pool in program order, not guessed; the 0xB2C/0xB2D pair also appears as the horizontally-laid-out Yes/No pair in the sibling owner 080a5388, reinforcing that these are shared text-resource ids for a generic Yes/No choice reused by several inventory-menu dialogs.","No sibling draft existed for this owner before this session (checked games/gs1/recon/en/dossiers.json#main:080a524c and games/gs1/source-paths.json; neither had an entry)."]},"main:080a5388":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a5388","status":"measured-draft","owner_bytes":428,"score":{"measured":"2026-08-27","candidate_bytes":388,"reference_bytes":428,"differing_halfwords":211,"wrong_instructions":155,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering, but this owner is an inventory-menu equip/transfer confirmation dialog operating on Data_03001f2c (it sits between the already-named inventory_menu owners 080a51d0 and 080a5534 in source-paths.json), not a party-member picker. It shares the template's for(;;)/redraw/Modulo-wraparound Yes-No idiom with sibling 080a524c but adds an owner-state snapshot/restore around the confirmation: Runtime_GetObject(menu->target_owner) fetches the acting owner's inventory record, Mem_Copy (Func_080072f0, 4-arg form: dst,src,size,desc) backs it up into a Runtime_BumpAllocate'd 0x14C-byte scratch block before the dialog runs, Func_08077050 tests item/owner compatibility to decide whether to even show the dialog (skipping straight to a rejection sound 175 and forced selection=1 when incompatible), and on a 'No' outcome the snapshot is copied back over the live owner record before the scratch block is freed and BattleUnit_Recalculate/Func_080772c0 refresh derived stats. The candidate reproduces this whole shape and call sequence but is 40 bytes shorter than the reference (388 vs 428): the reference's prologue saves four high registers (fp, sl, r9, r8 -- i.e. it keeps 7 registers, r5..r9/sl/fp, simultaneously live across calls), while the candidate's register allocation only needed 3 (sl, r9, r8), meaning at least one more value in the real source stays live across a call boundary than in this draft -- most likely the target_owner byte or the message id used for the second UiText_DrawAt draw is re-read from a live register in the reference rather than re-loaded from the struct byte each time as this draft does. This is a source-shape gap (an under-modeled live variable), not something I chased down to an exact fix given the time remaining."},"rejected_experiments":[{"cell":"func_080072f0-as-3-arg-dest-src-size","reason":"Initially read the ROM's `bl Func_080072f0` call with only 3 visible register-setup instructions (r0=K,r1=ownerState,r2=332) and assumed a 3-arg memcpy-like signature with the fixed global 0x03001388 as the destination. games/gs1/include/runtime_mem.h already declares `void Func_080072f0(void *dst, void *src, s32 size, void *desc)` (Mem_Copy) as 4-arg; re-reading the raw asm showed r0 was never reloaded before the call (it still held Runtime_BumpAllocate's return value from two instructions earlier), so the real args are (dst=bump-allocated buffer, src=ownerState, size=332, desc=0x03001388) -- the bump-allocated buffer is the snapshot destination, not an unused scratch. Fixed by switching to the 4-arg Mem_Copy from the header; this changed the function's behavior (the snapshot is now actually populated) but the resulting candidate is still not byte-exact."},{"cell":"runtime-bump-allocate-as-pointer-return","reason":"Declared a local `Func_08004938` prototype returning `void *`; games/gs1/include/runtime_mem.h already declares `u32 Runtime_BumpAllocate(s32 size)` (u32 return, not pointer) and is used everywhere else in the codebase that way. Switched to the header's declaration and cast at each use site to match."}],"notes":["Recovered from games/gs1/asm/080a5388.s. games/gs1/include/runtime_mem.h supplied the real Runtime_BumpAllocate/Mem_Copy/Sys_Free signatures used here, which corrected an initial misreading of the mid-function memcpy-style call.","The struct-byte offset 0x21B (menu->target_owner) was read directly off the function's own literal pool (a `.4byte 0x0000021b` entry loaded via pc-relative ldr and added to the Data_03001f2c pointer), not guessed; it is reused via the same deduplicated pool slot at both the top (fetch) and bottom (restore-path re-read) of the function.","The Yes/No label pair drawn at (24,24)/(72,24) uses message ids 0xB2C/0xB2D, read from the literal pool in program order -- the same 0xB2C value the sibling owner 080a524c draws as its vertically-stacked 'No' label, which is corroborating (not conclusive) evidence these are a shared pair of Yes/No text resources reused across several inventory-menu confirmation dialogs.","This candidate claims zero DONE bytes; it is not byte-exact and the register-liveness gap described above was not resolved in this pass.","No sibling draft existed for this owner before this session."]},"main:080a5614":{"schema_version":1,"namespace":"main","address":"0x080a5614","status":"measured-draft","owner_bytes":180,"candidate_bytes":172,"differing_halfwords":78,"wrong_instructions":50,"classification":"inventory-item-page-row-markers","family":{"id":"template-main-080a56c8","template_owner":"main:080a56c8","template_source":"games/gs1/src/inventory_menu/draw_item_name_page.c","note":"Same InventoryMenu domain and same 3-arg (window, unused, state) signature idiom, but this owner does not draw item name text at all -- it caches page*5+entry_count into state+24, optionally draws one status message via Func_08015080 when *(u16*)(menu+combined*2+456)!=0, then runs a fixed 5-iteration loop calling Func_080a2268 (a 6-arg call, 2 args on the stack) to draw per-row markers, picking tile 14 vs 15 in the 6th argument depending on whether the row equals entry_count. Only the field-offset conventions (menu+44, menu+32) and the general shape carried over from the template."},"notes":["Read the raw assembly directly: page=state->+8, menu=Data_03001f2c, combined=page*5+state->+16(entry_count), state->+24=combined; Func_08015270(*(menu+44)); WaitFrames(1) [Func_080030f8]; combined=state->+24 (re-read); flag_val=*(u16*)(menu+combined*2+456); if(flag_val!=0) Func_08015080((flag_val&0x1ff)+(s32)&Value_00000075, *(menu+44), 0, 0); then a do-while row=0..4, y=1,3,5,7,9, each iteration calling Func_080a2268(*(menu+32), 1, y, 14, 1, row==entry_count?14:15) -- confirmed the two branches share reg-arg4=14 and stack-arg5=1 and only differ in the final stack argument (14 vs 15).","The Value_00000075 spelling (address-of-symbol rather than a plain +0x75) was inferred from the same evidence pattern as the sibling owners in this batch: 0x75 fits an 8-bit movs immediate yet the reference still spends a pool load on it, which only makes sense if it's really `(s32)&Value_00000075`, matching this project's established Value_XXXXXXXX convention for message-id bases.","Reordering `page = state->8` to be read before `menu = Data_03001f2c` (matching the reference's read-page-before-deref-menu sequence) improved the score marginally (wrong_instructions 52->50); the call sequence, argument counts/values, and branch condition all already match structurally. Remaining differences are concentrated in register-role choices for the two `ldr [pc,#108]`-textual-offset (but distinct real address) pool constants feeding the `(flag_val & 0x1ff) + base` expression, and in the ordering of a few stack stores inside the two Func_080a2268 call sites.","This reads as a scheduling/register-role gap on an already-correct algorithm rather than a missing behavior; worth another pass experimenting with the AND/ADD operand order (e.g. `(s32)&Value_00000075 + (flag_val & 0x1ff)` swapped) and with computing the row==entry_count call's stack args in the reference's exact instruction order before another measurement.","Adoption requires 0 differing_halfwords."]},"main:080a5cc0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a5cc0","status":"proven-retained","retention":"keep_structured_asm","owner_bytes":798,"score":{"measured":"2026-08-27","candidate_bytes":798,"reference_bytes":798,"differing_halfwords":232,"wrong_instructions":122,"class":"wrong","note":"Instruction count now matches the reference exactly (316 candidate insns vs 316 reference insns; a linear .insns diff is 116 of ~316 lines, almost entirely register-name substitutions). The residual is dominated by one persistent register-bank choice: the reference keeps the function's `result` accumulator in fp (r11) for its whole life, this candidate keeps the same value live the same way but in r9, and that single swap cascades into every instruction that touches it plus a few dependent sl/r9 reuses in state 4. A handful of instruction-order swaps remain independently (argument-load order into two identical Func_080a112c(window, owner, 0, 0) calls; one constant materialization that folds via a delta add in the candidate vs a fresh reload in the reference for the 0x268 field offset)."},"family":{"template_considered":"shop/select_use_item.c (family-matcher score 7287/10000, LOW confidence, below the 7500 adoption-lead threshold)","verdict":"false-positive template, confirmed by reading it: shares only generic callees (Audio_PlayCue, WaitFrames) and the register-shuffle prologue shape. No shared field offsets, no shared real callees, no shared constants with this owner. The actual identity was recovered entirely from this owner's own retained assembly plus already-adopted callees it shares real evidence with (games/gs1/src/item/use.c, games/gs1/src/inventory_menu/{use_selected_item.c,draw_message.c,position_category_items.c}, games/gs1/src/ability/play_use_animation.c, and games/gs1/include/{inventory_menu.h,psynergy_menu.h,battle_runtime.h,battle_types.h,battle_calc.h})."},"classification":"menu_action_state_compiler_allocation_module","domain":"A do-while-shaped, five-state confirm/execute loop for the currently selected Inventory item or Psynergy ability against the polymorphic Data_03001f2c menu-runtime cell. State 0 clears the selection and primes the info window; state 1 waits a frame, checks the entry count, and (via a byte field at cell offset 0x268 that this draft calls `mode`) either assigns a shortcut and restarts or advances; state 2 classifies the selection through PsynergyMenu_ClassifySelectedPsynergy and either asks for confirmation (state 3), forces a self-target and executes (state 4), or finishes and writes the acting owner id plus the selection (masked 0x3fff) back through the caller's two out-parameters; state 3 re-confirms; state 4 actually calls the low-level ability-apply routine (Func_080a9f10, the same one games/gs1/src/item/use.c's Item_Use calls), pays the ability's PP cost from BattleAction.pp_cost via BattleUnit_Drain, recalculates the unit, plays the use animation or an error cue, and reports success/failure. The loop itself exits on a GameFlag_Test(0x150) check that is re-tested once more after the loop to force a -1 result.","expressed":["the exact 5-state switch shape and its physical case layout (source order 0, 1, 3, 2, 4 -- confirmed by matching the reference's case-3-before-case-2 byte layout, not just its behavior)","the while-loop rotation (goto-condition-first) matching the reference's initial jump to the bottom-of-loop test block rather than straight into the switch","every real call target, argument, and struct-field offset touched (item_owner/target_owner @0x21a/0x21b, info_window @0x2c, the selected id @0x178 masked 0x3fff, entry_count @0x218, completion_flag @0x222, message_offset @0x25a plus (s32)&Value_00000bef, and the two not-yet-named fields at 0x24 and 0x268)","the PP-cost payment via BattleAction.pp_cost, matching battle_types.h's named field exactly","the self-target sentinel (9) correction and its effect on the final state transition","instruction count parity with the reference (316 = 316)"],"remaining":[{"op":"register-bank allocation","count":1,"where":"the whole-function `result` accumulator: reference allocates fp (r11), this candidate allocates r9. Every one of the ~15 instructions that read or write it, plus its downstream sl/r9 reuse in state 4, differs in encoding even though the operation sequence is identical."},{"op":"instruction ordering","count":2,"where":"argument-load order (constant-arg vs field-load) into the two identical Func_080a112c(work->field_024, owner, 0, 0) call sites"},{"op":"constant materialization","count":1,"where":"the second read of the 0x268 mode field inside state 1: reference reloads it fresh (movs+lsls), this candidate folds it as a delta add off the still-live 0x218 entry_count offset"}],"rejected_experiments":[{"experiment":"do-while loop (condition re-tested at the bottom only) instead of a rotated while loop","result":"wrong physical layout entirely -- the reference's initial branch lands on the bottom-of-loop condition block before ever reaching the switch, which only a `while (cond) { switch }` rotation reproduces. Fixed; not reverted."},{"experiment":"switch cases written in numeric order 0,1,2,3,4","result":"wrong physical case layout -- case 3's body must precede case 2's in source for the compiler to lay out 0x13a before 0x162. Fixed; not reverted."},{"experiment":"case 3 written as `if (x != -1) { state = 4; break; } else { ...; state = 1; }` vs the pre-set idiom `state = 4; if (x == -1) { ...; state = 1; }`","result":"byte-identical candidate output either way -- the compiler normalizes both phrasings to the same pre-set-then-override shape. Kept the pre-set form for consistency with the rest of the function; not a residual lever."},{"experiment":"local declaration order (result first vs last among the function's locals; result initialized before vs after state/done)","result":"moving the declaration alone made no difference; moving the initializing *statement* ahead of state/done regressed to 317 candidate instructions (one extra) and a larger diff. Reverted to state=0; done=0; result=0 statement order."},{"experiment":"case-4 locals (raw, self_flag, action) as a nested block-scope vs promoted to function scope","result":"no change to the candidate output at all (same 316 insns, same 116-line diff, same fp/r9 residual). Kept the flatter function-scope form since it made no difference."}],"next":"The residual is a single register-bank choice (fp vs r9) for one long-lived accumulator, not a structural or semantic gap. Closing it likely needs either a genuine source-shape difference not yet tried (a variable ordering or an additional/different local elsewhere in the function that shifts overall register pressure) or the bounded permuter's search over the two evidenced instruction-order ambiguities noted above; do not force the register choice by hand.","notes":["Recovered only from the retained owner assembly (games/gs1/asm/080a5cc0.s), the approved local ROM, already-adopted in-repository callers and headers, and the approved compiler.","The family-matcher's shop/select_use_item.c lead was read and rejected as an unrelated shape-only match per the task's warning; no code, names, or structure were carried over from it.","No external game source, copied instruction bytes, inline assembly, fixed-register variable, or compiler barrier was used.","The structured assembly remains the byte-exact implementation. The complete C has exact 798-byte extent, exact 316-instruction count, and branch-structure equality; the remaining residual is equivalent register allocation, two independent instruction-order pairs, and one equivalent constant rematerialization.","A canonical shipped-route matrix covering regmove, both schedulers, GCSE, CSE follow/skip, rerun CSE, strength reduction, expensive optimizations, and thread jumps preserves the floor or regresses it. The bounded declaration, initialization, case-local lifetime, loop-rotation, and case-layout experiments recorded above found no ordinary-C route to the reference's fp result carrier.","Registered as Menu_ResolveSelectedAction: this name states the directly observed shared Inventory/Psynergy menu behavior without guessing an in-world name or claiming that either menu owns the polymorphic routine exclusively."]},"main:080a60d4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a60d4","status":"measured-draft","owner_bytes":688,"score":{"measured":"2026-08-27","candidate_bytes":460,"reference_bytes":688,"differing_halfwords":334,"wrong_instructions":311,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering. Sits directly after PsynergyMenu_ClassifySelectedPsynergy (080a5fe0) and its own reference size (688 = 0x2b0 bytes) lands exactly on the start of PsynergyMenu_RefreshOwnerPsynergy (080a6384), and it genuinely calls that neighbor (Func_080a6384) plus PsynergyMenu_CollectActions (Func_080a68ec), so unlike 080a38d0/080a63e4 this owner is credibly real psynergy_menu code -- most likely the owner-selection loop that lets the player pick which party member's Psynergy list to browse, opening two UiWindow_UpdateOrCreate windows (a name window and a Psynergy-list window) and refreshing them each time the selection changes. The candidate reproduces the overall for(;;)/redraw/Modulo-free (this owner increments/decrements the index directly, no wraparound call was found in the traced region) shape and the two-window setup, but two things are explicitly unresolved placeholders rather than reconstructed: (1) the branch that runs when the second window is freshly created (the reference does real work there -- almost certainly a call that allocates/attaches a per-owner action-state record -- and the candidate just stores a hardcoded 0) and (2) the exact struct field roles at offsets 36/40/44, which were assumed by analogy with 080a38d0/080a63e4's struct rather than independently confirmed for PsynergyMenuState. Given the 228-byte shortfall (460 vs 688), the redraw body is missing real work beyond what was reconstructed."},"rejected_experiments":[],"notes":["Recovered from games/gs1/asm/080a60d4.s. games/gs1/include/psynergy_menu.h confirmed Func_080a6384 (PsynergyMenu_RefreshOwnerPsynergy) and Func_080a68ec (PsynergyMenu_CollectActions, `u8 Func_080a68ec(struct OwnerActionState *, u16 *, s32)`) as real callees of this owner, which is the main evidence this is genuine psynergy_menu code rather than a spurious family match.","The first argument was read as a `u16 *` (an actions/psynergy-id array) because the very first indexing operation treats it as a base pointer added directly to a doubled index register, not as a scalar combined arithmetically -- this reading was not independently cross-checked against a caller.","This candidate claims zero DONE bytes; it is a rough structural skeleton with at least one explicit unmodeled branch (the fresh-window setup path), not a close attempt. Given six owners in this batch, effort here was intentionally bounded to a single pass.","No sibling draft existed for this owner before this session."]},"main:080a63e4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a63e4","status":"measured-draft","owner_bytes":512,"score":{"measured":"2026-08-27","candidate_bytes":404,"reference_bytes":512,"differing_halfwords":243,"wrong_instructions":207,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering; sits immediately after the tiny stub PsynergyMenu_ReturnTrue (080a63dc) and before PsynergyMenu_RefreshOwnerPsynergy (080a6384) in address order, and reads/writes the same small byte offsets (28, 29, 0x219/0x208-region indices) as sibling 080a38d0, strongly suggesting an inventory/equip-menu owner-selection loop of the same family as 080a38d0 rather than genuine psynergy_menu code (the neighboring named psynergy_menu owners are a coincidence of address proximity, not evidence of module). The candidate reproduces the outer for(;;) shape, the Modulo-driven wraparound selection, the A/B/L/R button polling against ADDR_03001C94/ADDR_03001B04, and the closing struct writes (byte 29, word at +8, byte at +0x21b), but the redraw body's window-bounds/OAM-attribute-packing block (the ~20-instruction shared fragment that also appears verbatim in sibling 080a38d0, manipulating a cursor object's halfword fields at +6 and +22 with a mask/or sequence) is explicitly stubbed out as an unmodeled placeholder rather than reconstructed, which accounts for most of the 108-byte shortfall (404 vs 512) and essentially all of the 207 wrong_instructions. This is a source-shape gap: the missing block's purpose (packing a selection index into an OAM-style attribute halfword) was identified but not translated to C in the time available."},"rejected_experiments":[],"notes":["Recovered from games/gs1/asm/080a63e4.s. The K constant chain (0x219 loaded once, then mutated in-register to 0x219-17=0x208 for array indexing) was read directly off the literal pool and matches the same offsets seen in sibling 080a38d0, which is the basis for treating both as owners of the same (still only partially identified) menu-state struct rather than PsynergyMenuState.","The skipped ~20-instruction cursor/OAM-packing fragment is near byte-identical between this owner and 080a38d0 in the retained assembly (same register shuffle, same &-mask/or-mask/store-halfword sequence at struct offsets +6/+22 off a pointer loaded from offset +24) -- worth extracting as a single shared static-inline helper and modeling properly in a follow-up pass rather than guessing its C shape blind.","This candidate claims zero DONE bytes; it is a rough structural skeleton, not a close attempt -- given six owners in this batch, effort here was intentionally bounded to a single pass so every assigned address got at least one honestly-scored draft.","No sibling draft existed for this owner before this session."]},"main:080a6614":{"schema_version":1,"namespace":"main","address":"0x080a6614","status":"measured-draft","owner_bytes":384,"score":{"measured":"2026-08-31","candidate_bytes":380,"reference_bytes":384,"differing_halfwords":120,"wrong_instructions":116,"class":"missing-extra-code","command":"compiler candidate-show games/gs1/recon/en/main/080a6614.c --owner 0x080a6614 --size 384","note":"Replacing the drafting wave's independent absolute fields with the established PsynergyMenuGlobalState base-and-offset view reproduces the reference's 0x02000240 + 0x220/0x222 addressing and improves the residual from 178 to 120 differing halfwords and from 140 to 116 wrong instructions. The branch topology is equal."},"remaining":[{"op":"reconstruct missing or extra code","count":116,"where":"The candidate reserves 24 stack bytes while the reference reserves 20 and assigns the four UiText_GetResourceDimensionsFar outputs at sp+8/+12/+16/+20 rather than sp+4/+8/+12/+16. This shifts high-register allocation and literal pools through both shortcut blocks."}],"rejected_experiments":[{"experiment":"Model the four output values as a contiguous struct or s32[4] bounds record.","result":"Both forms retained the 24-byte frame and regressed to 141 differing halfwords / 118 wrong instructions."},{"experiment":"Use linker-resolved Value_00000ae0..Value_00000ae8 and Value_00000333 symbols for every message literal.","result":"Made the early literal loads locally more faithful but globally regressed to 151 differing halfwords / 124 wrong instructions."},{"experiment":"Compile through the gcc296, old-agbcc, no-interwork, APCS-32, and APCS stack-check flag routes.","result":"Canonical routed/gcc296 remained best at 120 differing halfwords; no alternate route produced the reference frame or a closer multi-block result."}],"notes":["Recovered from games/gs1/asm/080a6614.s, the approved local ROM, the drafting-wave m2c result, the exact PsynergyMenuGlobalState layout, and the already-exact UiTimedNotice_Create call pattern for UiText_GetResourceDimensions.","The function draws both configured Psynergy shortcuts, their owners when the rendered label width permits, and selects palette color 15 after the second populated shortcut. The role-based name is evidence-backed; the original public spelling remains unknown.","This candidate claims zero DONE bytes."]},"main:080a6a98":{"family":"template-main-08026fa8","template_owner":"main:08026fa8","template_source":"games/gs1/src/ui/text/show_localized_message_and_wait.c","candidate_path":"games/gs1/recon/en/main/080a6a98.c","reference_bytes":204,"best_candidate_bytes":204,"best_differing_halfwords":10,"best_wrong_instructions":18,"status":"proven-retained","classification":"regional_compiler_allocation","notes":["Template (UiText_ShowLocalizedMessageAndWait) is thematically related (UI + wait) but the actual behavior at 080a6a98 is completely different work read straight from games/gs1/asm/080a6a98.s: a menu-row refresh function taking effectively one live struct-pointer param (r0/r1 are unused), storing computed length (ctx->field8*5 + ctx->field16) into ctx->field24, conditionally playing a sound-effect/message via a table lookup at Data_03001f2c-relative state, then drawing 5 rows via 6-arg calls to Func_080a2268 with a highlighted-row special case (arg 14 vs 15) based on ctx->field16.","Iterated 5 respellings. Landed on: masking the sound-table lookup as one combined pointer-arithmetic expression `*(u16*)((u8*)state + ctx->field24*2 + 456)` (not split into a separate `offset` local, which measurably hurt the match in combination with either if/else ordering tried); the outer `if (Func_080770c0(0x151) != 0) { short-branch } else { long-branch }` ordering (matching which physical block the compiler places as the branch target vs the fallthrough); and introducing a separately-named `selected = 1;` local (distinct from the loop's `spacing = 1` counter) so the compiler materializes two independent `movs #1` instead of coalescing them into one shared register, matching the reference's two distinct movs into r2/r5.","This combination got wrong_instructions down from an initial 24 to 18 (candidate/reference both 204 bytes). Tried the mirror-image if/else order (`if (call()==0) {long} else {short}`) combined with a separate `offset` local -- that combination scored worse (34), and each single change in isolation also scored worse than the final combination, so the two are apparently coupled through the compiler's whole-function register allocation, not independently tunable.","Two residual clusters remain, both looking like compiler-internal instruction-placement/addressing-mode choices rather than logic gaps: (1) the outstanding branch content is IDENTICAL between candidate and reference (same call, same literal, same later block) but the alignment tool still can't line up the physical ordering of the short-vs-long block placement for a handful of rows; (2) the sound-table load compiles to a precompute-full-address-then-immediate-offset ldrh in the candidate versus the reference's fold-only-the-scaled-index-then-register-offset ldrh (`ldrh r2,[r7,r3]`) -- both are valid Thumb encodings for the same address, and neither of two different C phrasings tried (combined expression vs separate offset local) reproduced the register-offset form together with the correct branch order.","Field names (field8/field16/field24/field32/field44) are inferred purely from the struct-offset accesses in the assembly, not confirmed against any header; M2C_FIELD casts were used throughout rather than guessing a named struct layout, consistent with this codebase's convention for not-yet-typed structs.","Not adopted; kept as the closest measured draft (91% instruction match).","measured=2026-08-29: ran 30 further informed variants against the same baseline (differing_halfwords=36, baseline=36 throughout unless noted), none improved on it. Refuted -- reusing the field24 length computation as a single local for both the ctx store and the table-index multiply (offset local shared across both uses): dh=80. Splitting the ctx->field24 store into two separate assignments, one per if/else arm, ahead of its first use (statement-position-across-call variant): dh=91. Reordering the top-level sum to field16 + field8*5 (operand order swap on the initial length computation): dh=44. Hoisting ctx->field16 into a `highlighted` local read once before the loop instead of re-reading M2C_FIELD each iteration: dh=89.","measured=2026-08-29: also refuted (neutral, dh=36, no change either way) -- array-index rewrite of the table lookup `((u16*)((u8*)state+456))[...]`; hoisting `tableVal` declaration to function top; widening `tableVal` to s32 (both as the else-block local and function-top declaration); `if (tableVal)` vs `if (tableVal != 0)` vs `if (0 != tableVal)`; hoisting the `(tableVal & 0x1ff) + 0x53a` expression into a `msg`/`msgId` local (before or inside the inner if); swapping the mask+add operand order; decimal vs hex mask literal (511 vs 0x1ff) and hex case (0x1FF/0x53A); swapping call order of Func_08015270/Func_080030f8(1) inside the else block; reordering the table-lookup pointer arithmetic (`456 + offset*2` vs `offset*2 + 456`); introducing an explicit `u16 *tablePtr` local before dereferencing; explicit `(s32)` cast on the mask result; pre- vs post-increment and `row<5` vs `row<=4` loop-condition phrasing; `spacing = spacing + 2` vs `spacing += 2`; decimal vs hex outer-branch literal (337 vs 0x151); reordering local declarations (state/row/spacing in various orders, selected hoisted to function top with the block scope removed); swapping the multiply operand order in field8*5 vs 5*field8; adding a blank line before the trailing Func_080030f8(1)/return. All of these leave the same two residual clusters described above (branch-block physical placement and the ldrh addressing-mode form) untouched, reinforcing that the remaining 36 differing_halfwords / 18 wrong_instructions are compiler-internal register-allocation and instruction-selection choices for this exact source shape, not reachable through further local C rephrasing.","Final state after this pass: baseline of dh=36 restored and left in place (no variant beat it); status remains measured_draft, not verified/adopted.","measured=2026-08-31: corrected the top-level branch to its natural reference order (`Func_080770c0(...) == 0` owns the long block; the sound call is the else), reducing differing halfwords 36->12 while making branch topology exactly equal. Then split the table byte offset from its base and marked the live engine-state halfword read volatile. This reproduces the reference register-offset ldrh plus explicit comparison-carrier shape and reduces the floor again to 10 differing halfwords / 18 wrong instructions at the exact 204-byte extent. The residual is now one reciprocal r0/r2/r3 allocation cycle plus the coupled r2/r3 materialization of the later constant 1; all branches, calls, literals, memory addresses, and loop code otherwise align. Function-head declaration scope was neutral. -fno-regmove, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-schedule-insns, -fno-gcse, and -fno-thread-jumps were neutral; -fno-schedule-insns2 regressed to 35 differing halfwords. The prior claim that the inverted branch was the better final shape is superseded by this normalized measurement.","classification=2026-08-31: promoted to Proven ASM as regional_compiler_allocation. Relocation-aware comparison shows the English, German, Spanish, French, and Italian builds share the same localized source-variant relationship while Japanese differs in 29 normalized core bytes. The complete 204-byte English ordinary-C reconstruction, equal topology, bounded source-shape search, allocator-decoder verdict, and shipped-flag sweep reduce the retained difference to the compiler's localized reciprocal materialization choice; no forced allocation or scheduling is used."]},"main:080a7440":{"schema_version":1,"namespace":"main","address":"0x080a7440","status":"measured-draft","owner_bytes":56,"executable_owner_bytes":54,"alignment_bytes":2,"candidate":{"routed":{"candidate_bytes":52,"reference_bytes":56,"differing_halfwords":23,"wrong_instructions":28},"best_bounded_axis":{"family":"old-agbcc","flags":["-fcall-used-r4"],"candidate_bytes":56,"reference_bytes":56,"differing_halfwords":14,"wrong_instructions":28}},"cross_edition":{"code_and_pool_bytes":54,"relocation_bytes":4,"literal_bytes":6,"core_bytes":44,"core_identical":true,"editions":{"ja":"0x0809e384","en":"0x080a7440","de":"0x080aa2bc","es":"0x080abcb0","fr":"0x080abccc","it":"0x080a74bc"}},"behavior":["clears the shared menu selected-slot field","runs the first character-selector interaction step","returns cancellation unchanged or the selected owner index"],"remaining":"The old-agbcc family restores the full owner extent, but its best bounded route still has a broad 14-halfword register-allocation residual. The owner is neither exact nor eligible for narrow permanent classification.","notes":["2026-08-31 exact-closure rerun: the apparent four missing candidate bytes are not missing behavior or a bad owner boundary. The 54 executable reference bytes plus two alignment bytes are independently accounted for, branch topology is equal, and both sides clear selected_slot, call Func_080a77a4(0), preserve -1, and otherwise return item_owner. The reference uniquely retains zero/result in r2 and emits an explicit post-call r0-to-r2 copy plus final r2-to-r0 copy; canonical GCC optimizes that carrier away and returns item_owner directly in r0.","2026-08-31 finite raw-field probe: replacing the established InventoryMenuState fields with explicit u8-base accesses at +0x174/+0x21a grows the candidate to 58 bytes and regresses to 25 differing halfwords/32 wrong instructions, so the exact typed UI sibling context is already the best canonical source shape; reverted. Combined with the previously recorded shared-result and explicit-early-return probes and the complete shipped flag sweep, the bounded verdict remains canonical-GCC allocation/pool placement with no missing statement. The old-agbcc/-fcall-used-r4 56-byte route is not adoptable: it forces ABI allocation, still differs by 14 halfwords, and is not the canonical compiler route. Zero DONE bytes.","2026-08-31: repaired a real control-flow bug in the draft: the selected-owner mapping guard had been placed after an unconditional return and was therefore unreachable. Moving the return after the guard and promoting the call result from s16 to its evidenced s32 lifetime restores the complete behavior and makes branch topology equal. The corrected canonical candidate is 52/56 bytes with 23 differing halfwords and 28 wrong instructions. A fresh sweep of the shipped allocation, scheduling, CSE, regmove, thread-jump, strength-reduction, rerun-CSE, and expensive-optimization axes found no improved route; the remaining residual is allocation and pool placement, not missing behavior.","2026-08-31 bounded UI-family pass: tested two source structures named directly by the four missing instructions. First, sharing an initialized result carrier with the selected-slot clear (`result = 0; selected_slot = result`) does not recover the reference's long-lived r2 carrier: GCC hoists the 0x174 offset before the shared-state load, keeps zero in r0, removes the post-call result copy, and shrinks the candidate further to 48 bytes / 26 differing halfwords. Second, spelling cancellation as an explicit early return (`if (result == -1) return result; return item_owner`) normalizes to the existing 52-byte / 23-halfword candidate byte-for-byte. Transferable fact: GCC 2.96's optimizer erases both C-level return shapes here; the reference's r2 result carrier and r0-to-r2 copy cannot be inferred merely from an early-return spelling, while sharing the earlier zero lifetime actively regresses code placement. Both probes were removed.","The name is bounded by the sole local caller OpenCharacterSelector and the selected-slot and item-owner fields in InventoryMenuState.","All six editions have the same relocation-normalized instruction core; the trailing two bytes are owner alignment rather than executable instructions or pool data.","Recovered only from retained assembly, approved local GS1 ROMs, local types and callers, and the approved compiler. This candidate claims zero DONE bytes."]},"main:080a77a4":{"schema_version":1,"namespace":"main","address":"0x080a77a4","status":"measured-draft","owner_bytes":170,"candidate_bytes":166,"differing_halfwords":73,"wrong_instructions":46,"classification":"inventory-owner-slot-refresh-variant","family":{"id":"template-main-080a355c","template_owner":"main:080a355c","template_source":"games/gs1/src/inventory_menu/prepare_owner_items.c","note":"Sibling of main:080a602c in the same family; genuinely different body from both the template and 080a602c -- reads *(menu+16) and calls Func_08015270 on it, conditionally calls Func_08015070 with 5 args when Func_080770c0(370)!=0, then picks between Func_080a7d68()/Func_080a7a34() based on *(u16*)(menu+544)==3, none of which appear in the template or in 080a602c."},"notes":["Read the raw assembly directly: offset=party_slot+28, cursor_offset=party_slot*4+20, menu=Data_03001f2c, icon=*(menu+cursor_offset); icon[5]=1, icon[12](u16)=0; owner_index=*(s8*)(menu+offset); Func_08015270(*(s32*)(menu+16)); if (Func_080770c0(370)!=0) Func_08015070(*(s32*)(menu+16),9,1,9,3); if (owner_index==-1) *(menu+offset)=0; else Func_080a1ac0(owner_index*24-10,16); result = (*(u16*)(menu+544)==3) ? Func_080a7d68() : Func_080a7a34(); re-read icon, Func_080a17c4(icon); WaitFrames(1); return result.","Candidate reproduces the full control flow, all field offsets, all call arguments, and the owner_index*24-10 arithmetic; remaining differences are register-allocation/scheduling only (candidate keeps 'offset' live in r7 across the owner_index test and the final store, the reference keeps it in r8 and instead keeps the post-load owner_index value in r7) plus a 4-byte length gap I have not isolated the source of.","Tried reading the owner_index==-1 store as `(u8)(s32)&Value_00000000` (matching the pool-loaded-zero idiom the sibling owner 080a602c and this owner's own literal pool both carry at the same relative position -- both .s files embed the identical `.4byte 0x00000000 / .4byte 0x03001f2c` pair right after that branch) instead of a plain `= 0`. This is very likely the semantically correct spelling (it explains why the reference loads that particular zero from the pool while other zero stores in the same function use a plain `movs r?,#0` immediate), but adding it shifted the whole function's register allocation (dropped from push{r5,r6,r7}+r8 to push{r7} only, sl unused) and made the measured gap worse (differing_halfwords 73->84, wrong_instructions 46->58), so it was reverted; the plain-literal version is kept as the better-scoring draft even though the Value_00000000 spelling is the more defensible one long-term.","This reads as a register-pressure/scheduling gap on an otherwise-correct control-flow reconstruction, not a missing behavior -- a future pass should try re-deriving which local variable the compiler prioritizes into which callee-saved register (e.g. dropping the separate 'offset' local and inlining `party_slot+28` at both use sites, mirroring how the reference recomputes r2 fresh rather than keeping a single named local alive) together with the Value_00000000 spelling.","Adoption requires 0 differing_halfwords."]},"main:080a7850":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a7850","status":"measured-draft","owner_bytes":482,"score":{"measured":"2026-08-27","candidate_bytes":200,"reference_bytes":482,"differing_halfwords":239,"wrong_instructions":228,"class":"wrong","note":"Assigned to the shop/select_party_member.c family by clustering, but this owner does not share the template's selection-loop shape at all: it opens by calling InventoryMenu_ResetCategoryItemPositions (Func_080a9d84, a real, already-named inventory_menu sibling) and Audio_PlayCue(112), then draws two fixed nested grids (a 4x7 outer grid of small icon writes and a further 4-row scanning-highlight loop with 32-step x-increments) before a single Func_080770c0(0x150)-gated wait-for-any-input loop and a close/Audio_PlayCue(113) teardown -- this reads as an equip/browse results screen (a static icon-grid display with a 'press anything to continue' wait), not an interactive up/down/L/R picker. The family match here looks like a weaker/more coincidental n-gram similarity (shared calls to Func_080770c0, Func_08015080, Func_080f9010, and a similar prologue/epilogue register-save shape) rather than genuine structural kinship with Shop_SelectPartyMember. The candidate only captures the entry/exit calls and a rough sketch of the two nested drawing loops; the exact per-cell layout math (row/column pixel offsets, the two 4-halfword-stride write loops before the grids that this draft does not model at all) was not reconstructed, accounting for most of the 282-byte shortfall (200 vs 482)."},"rejected_experiments":[],"notes":["Recovered from games/gs1/asm/080a7850.s. Confirmed Func_080a9d84 = InventoryMenu_ResetCategoryItemPositions via games/gs1/include/types.h's name registry, which is the basis for placing this owner in the inventory_menu module.","Two literal-pool-driven halfword-pair write loops near the top of the function (writing to two parallel arrays with a fixed stride, using constants read from offsets +36/+40*4 off the menu pointer) were not modeled in the candidate; they were skipped because the surrounding pixel/stride arithmetic (word 0x46, 0x1e, 0xb17, 0x80, 0xb18, 0x1001, 0x45f, 0xea3, all read off the literal pool but not individually attributed) was not fully traced to concrete field meanings in the time available.","This candidate claims zero DONE bytes; it is a rough structural skeleton (200 of 482 bytes), not a close attempt. Given this owner's shape diverges most from the template of all six in this batch, it is also the weakest candidate for the family match itself -- worth re-checking during a future clustering pass whether 080a7850 belongs in this family at all, versus a static-display-screen family.","No sibling draft existed for this owner before this session."]},"main:080a7d68":{"schema_version":1,"namespace":"main","address":"0x080a7d68","status":"measured-draft","owner_bytes":476,"candidate_bytes":464,"differing_halfwords":223,"wrong_instructions":200,"classification":"shop-icon-page-select-loop","domain":"A paged icon-selection loop that persists its selection index and page count directly in undocumented shop-struct bytes (0x1c/0x1e) rather than in locals, redraws a small icon/window display and an 8-entry cleared array each time the selection changes, and writes the final selection and its looked-up field back into the shop struct on exit.","notes":["Clustered against the byte-exact Shop_SelectPartyMember template by the family scan on structural similarity (an input-poll loop with the same INPUT_NEW_KEYS/INPUT_REPEAT_KEYS shape and a redraw-flag-gated update block), but the concrete behaviour is a different, shop-struct-persisted paging screen with no counterpart in the template beyond the loop skeleton itself.","Recovered from the retained assembly's control flow and literal pool: confirmed offsets are shop+0x1c (persisted selection, s8), shop+0x1e (persisted count, s8), an array of u16 fields at shop+0x208+selection*2 (read repeatedly through the redraw block and again at exit), a single non-indexed field at shop+0x220 (an animation/frame counter cycled with Modulo(saved+3,3) each redraw), an 8-entry u16 clear at shop+0x152 counting down by 2, a selection-indexed halfword store at shop+0x144+selection*2, a window handle read from shop+0x10c, and a fixed pointer shop+0x1c8 passed to several undocumented helper calls (Func_080a68ec/Func_080a68a8/Func_080a3d24). The exact final-store offset at exit (used here as a placeholder 0x21a) and one icon-id constant pair passed to Func_08015080 (placeholders 0x1e/0x1f) were not resolved against the reference's literal pool this session and are recorded as open, not verified.","The same register-bank drift already documented on 080b29a8, 080b24e4, and 080b3444 reappears here in a new pairing: the reference keeps the shop pointer in r7 (loaded directly, 'ldr r7,[r3,#0]') while this candidate's compile puts it in sl instead, with knock-on reordering of the selection/count byte reads (the candidate loads count before selection despite the source declaring selection first, matching the earlier finding that GCC's pseudo-register/read ordering for these small independent byte loads is not controlled by source declaration order in this codebase). This is the dominant source of the 200 wrong_instructions figure; the underlying algorithm recovered here (persisted paging state, redraw-gated icon/list refresh, the two-array clear-and-stamp pattern, the animation counter) matches the reference's call sequence and argument shapes closely once the register-bank offset is looked past.","Given this is the third owner in the family showing the same register-allocation-drift shape rather than a control-flow or algorithm disagreement, further manual respelling on this specific residual is not a good use of bounded effort; it is recorded here as compiler-internals-shaped evidence supporting a permuter-style search across the family rather than a source-shape gap.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080a7f44":{"schema_version":1,"namespace":"main","address":"0x080a7f44","status":"exact","owner_bytes":240,"executable_owner_bytes":238,"candidate_bytes":240,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":222,"core_diff_bytes":0,"core_identical":true},"notes":["Moves a character one position in the selector order, rebuilds the runtime order through the remove/add callbacks, and refreshes the stored character count.","2026-08-27: bounded search dropped differing_halfwords from 114 to 28 (candidate_bytes now matches owner_bytes exactly, 236->240). Two structural fixes drove the gain: (1) the early direction check was over-eager -- reference recomputes 'adjacent_index' a second time, right at the swap, by re-testing 'direction == 1' rather than carrying one value computed at the top; rewriting the swap as two fully duplicated branches (no shared adjacent_index variable) made the swap, both loops calling Func_08077168/Func_08077150, and the final Func_08077158 call plus epilogue match the reference byte-for-byte (state pointer now lands in r8 exactly as in the reference, matching the caching idiom described for other owners in this corpus). (2) Tried caching &state->character_count and hoisting the clear-loop into a pointer form (u32 *p = &reordered[13]; p >= reordered; p--) -- both looked locally better but cost more overall: the pointer clear-loop makes gcc emit an extra pre-loop guard test (for-loop rotation duplicates the comparison when the compiler can't prove the pointer range non-empty) that a plain 'for (index = 13; index >= 0; index--)' avoids outright, so the plain index form scores better in aggregate despite keeping a redundant r6 counter alongside the address-decrementing store pointer that the reference elides via a cached 'ip' bound.","2026-08-27: remaining 28-halfword residual is concentrated in two spots verified by an extensive bounded search (~20 independent source rewrites, all re-scored): (a) the array-clear loop keeps a redundant down-counter (r6) instead of reference's single pointer-vs-cached-ip test; every pointer-only rewrite tried (for, do-while, hybrid index+pointer, signed casts) either reproduced this same counter or introduced a worse pre-loop guard elsewhere. (b) the character_ids-copy loop (reordered[index] = state->character_ids[index]) compiles to a value-cached descending loop (character_count loaded once, counted down) instead of the reference's address-cached ascending loop (character_count re-read through a hoisted pointer each iteration) -- the exact ascending/address-cached shape *does* appear for the two structurally identical count-up loops that call Func_08077168/Func_08077150, so the difference is not the loop-control idiom itself; it reproduced identically across for/while/do-while, index-only/pointer-only/dual-pointer, shared/private loop variables, count>0-guard-then-loop, and explicit u32 casts, suggesting it tracks something about the callee-free store-only loop body rather than any tried source phrasing. Did not meet the permanent-residual gate (no compiler-pass evidence collected, only repeated candidate-show outcomes), so this stays a c_candidate pending either a source insight not yet tried or a recorded compiler-evidence classification.","2026-08-29: repair pass targeting the same 28-halfword residual, focused on the two mechanisms that helped elsewhere in this corpus (constant-hoist placement, statement-position-across-calls) plus the swap-branch register mismatch (else-branch temporary loads via r0 in the candidate vs r6 in the reference). None improved on baseline dh=28; all rejected: (1) else-branch swap using a separate 'previous_temporary' local instead of reusing 'temporary' -- no change (dh=28). (2) else-branch swap reordered to write reordered[selected_index-1] first then reordered[selected_index] -- much worse (candidate grew to 248 bytes, dh=100). (3) clear-loop rewritten as 'u32 *clear_ptr = reordered+13; do {*clear_ptr=0;} while(--clear_ptr>=reordered);' (do-while pointer form, no separate counter) -- worse (dh=82); reconfirms prior pointer-loop rejections under a new do-while phrasing. (4) hoisting 's32 character_count = state->character_count;' at the top of the shared block wrapping both the clear loop and the copy loop -- worse (candidate shrank to 236 bytes but dh=100; loop shapes elsewhere destabilized). (5) same character_count hoist but scoped only to the copy loop's bound via a '(s32)state->character_count' cast in place -- no change (dh=28). (6) copy-loop condition rewritten as 'state->character_count > index' (operands swapped) -- no change (dh=28). (7) copy-loop body routed through an explicit 'u16 character_id' temporary before the u32 store -- worse (dh=29, wrong_instructions jumped to 40). (8) local variable declaration order swapped ('temporary' declared before 'index') -- no change (dh=28). (9) copy-loop RHS wrapped in an explicit '(u32)' cast -- no change (dh=28). Confirms the residual is a stable local optimum for source-level rephrasing; leaving baseline in place unchanged. 8 additional source variants tried this pass (bringing the corpus total to ~28), none surfaced a new lead.","2026-08-29 (follow-up, coordinator-directed up-counting/address-cached retry): tried the specific up-counting pointer-vs-cached-end idiom for the clear loop and an address-cached-base idiom for the copy loop, individually and jointly, since allocation is whole-function. Clear loop, up-counting forms (all standalone, baseline copy loop kept): 'u32 *p=reordered,*end=reordered+14; do{*p++=0;}while(p worse (dh=86); same with 'end' declared before 'p' -> no change from the p no change (dh=86). All three up-counting forms reproduce the same shape and are firmly worse than the down-counting baseline (dh=28) -- rejected as a family, superseding note (25)'s untested up-counting gap. Copy loop, address-cached-base idiom: 'const u8 *count_ptr=&state->character_count; for(index=0;index<*count_ptr;index++) reordered[index]=state->character_ids[index];' (baseline clear loop kept) is the standout finding of this pass -- it flips the diff classification from structural-topology to topology=equal/missing-extra-code and reproduces the reference's address-cached reload of character_count inside the loop body (ldrb through a pointer register each iteration) almost exactly, but the overall score still regresses (dh=92, wrong_instructions=32) because the fix leaves one instruction-count difference versus the reference (the reference reloads the count_ptr address a SECOND time, via a fresh 'ldr'/'add' pair, right after the loop's zero-trip guard, instead of reusing the single register the candidate computes before the guard -- i.e. the reference does NOT common-subexpression-eliminate the address across the guard test and the loop preheader, but our shared 'count_ptr' variable does get CSE'd by the compiler into one load). Tried to break that CSE without giving up the address-cached shape: plain 'state->character_count' in the condition (no named pointer at all, otherwise identical block wrapping) -- collapses straight back to the original structural-topology/dh=28 shape, confirming the *address-cached* topology match is caused specifically by taking an explicit '&state->character_count' into a pointer local, not by the surrounding block. No source phrasing found that keeps the address-cached shape while forcing gcc to re-materialize the address a second time (tried: end-pointer form 'const u16 *s=ids,*e=s+count; for(;s dh=95; with the classic 'for(p=reordered+13;p>=reordered;p--)' clear loop -> dh=91 (this form reintroduces the previously-documented extra pre-loop guard, now visible as a bcc/bcs pair bracketing the loop, on top of the copy-loop's residual double-load gap) -- both worse than baseline, confirming the two residuals do not cancel out when combined; the whole-function allocation shifts penalize the combination more than either fix helps. Verdict: baseline (dh=28, structural-topology on both loops) remains the best known state; the address-cached copy-loop idiom is the closest partial match found to date (topology=equal) but is a strict regression on the whole-function score and was not adopted. Recorded for any future attempt: the missing piece is reproducing the reference's *duplicate* address load after the guard rather than CSE'ing it, which no tried variable/scope/cast combination achieved.","2026-08-30: closed byte-exact at 240/240 bytes. Marking character_count volatile reproduces the reference's repeated count loads; storing the final refreshed count through a plain u8 lvalue avoids a redundant volatile read. A non-empty descending do-while clear expressed as pointer versus stack-base reproduces the reference loop without the old counter. The final two-halfword allocation floor closed by reusing the finished loop index as the swap carrier, matching GCC 2.96's r6 lifetime. No register variable, compiler override, barrier, inline assembly, or scheduling control was used."]},"main:080a8114":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080a8114","status":"measured-draft","owner_bytes":870,"score":{"measured":"2026-08-27","candidate_bytes":870,"reference_bytes":870,"differing_halfwords":327,"wrong_instructions":216,"class":"wrong","command":"tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/080a8114.c --align --size 870","note":"Candidate size matches the owner boundary exactly (870/870 bytes), but the body is not byte-exact. The dominant residual is a single register/stack-allocation split: the reference keeps the 8-byte on-stack scratch buffer's address live in fp (r11) for the whole function (visible as 'mov r0,fp' / 'mov r2,fp' at every one of its ~5 call sites), while every candidate variant produced here instead spills that address to a numbered stack slot and reloads it at each use. This single difference cascades: it consumes one of the six small (sp+8..sp+28) scalar slots the reference keeps free for ownerIdPtr/roundMode/done/hasAlt/step/result, so every one of those slots lands 4 bytes higher than the reference's layout, and every load/store touching them mismatches even though the values themselves are correct. A second, independent, smaller residual is pure register-letter noise (r1 vs r2 vs r3 for the same value) scattered through the bitflag-testing chain (~lines corresponding to the L/R/U/D and shoulder-button checks) that does not look source-fixable without hand register assignment (prohibited by CONTRIBUTING.md). Two real bugs were found and fixed during this session versus the naive transplant: (1) the (sl+2)%2 toggle and the (Func_08077290(-1)!=0) boolean must be written as the literal C idiom that lets the compiler pick its own branchless neg/orr/lsr>>31 codegen, not as a plain `!= 0` comparison (which compiles to a branch on this compiler and desyncs everything downstream); (2) the L/R-shoulder page index (`*(s8*)(menu+28)`) must be read into a plain `s32` local BEFORE the +1/-1 branch, not kept as an `s8` and promoted separately in each branch -- the latter produces two redundant lsls/asrs sign-extend pairs (one per branch) where the reference does the sign-extending load once. That second fix alone took differing_halfwords from 390 to 327 and closed an 8-byte size gap (878->870)."},"family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"The family-matcher's top hit (score 8487/10000) is a false positive for this owner, confirming the pattern already documented on other owners in this session (e.g. main:080b2b10): the match is on the generic register-shuffle prologue shape shared by many large stateful UI loops, not real kinship. select_use_item.c's actual shop-menu shape (single 'redraw' block, actor/selection signature, Modulo(selection+count,count) directional wrap) does not match this owner at all -- this owner takes no arguments, has no 'redraw' flag with that name, and its core loop is a two-level nested nature (an outer per-page setup wrapping an inner per-frame loop) closer to games/gs1/src/shop/select_repair_item.c's shape than to select_use_item.c's flat single loop. Independent verification from this owner's own retained assembly and already-adopted siblings placed it in a completely different, non-shop family instead: it dereferences the SAME global (Data_03001f2c) as games/gs1/src/menu/select_quantity.c (Func_080a4800) and games/gs1/recon/en/main/080a8578.c (StatusMenu_ShowOwnerProgressMessage, confirmed by name and struct layout: unknown_000[0x21a]; u8 owner_id;), registers the identical callback address (Func_080a19a0, i.e. literal 0x080a19a1) via Func_08004278 and re-arms it via Func_080041d8(Func_080a19a0, 0xc80) at cleanup -- an EXACT constant match with select_quantity.c's own cleanup call -- and calls games/gs1/src/character_menu/draw_selection_cursor.c's Func_080a847c(mode, selected, entries, invert) with the exact same 4-argument shape that file declares, where 'entries' is that file's own struct State_080a847c's 'object' field at offset 0x24 (36) inside the Data_03001f2c-rooted state. This owner is a character/status-menu selector cycling a party-member/page index (menu+0x1c, wrapped by Modulo against a count at menu+0x219 via the L/R shoulder buttons) and a secondary per-page value (r8, 'quantity' in the draft) adjusted by Up/Down/Left/Right, drawn through Func_080a847c and either Func_080a8508 or Func_080a8578 (StatusMenu_ShowOwnerProgressMessage) depending on a mode toggle (sl, wrapped 0/1 via (sl+2)%2). No single already-adopted sibling matches closely enough to serve as a literal structural template; the draft was built directly from this owner's own retained assembly (games/gs1/asm/080a8114.s) and out/family-transplants/main-080a8114/m2c/080a8114.c (m2c's control-flow reconstruction from the target's own bytes, which was accurate and used as the basis for the loop/branch structure), cross-checked field-by-field against the four adopted siblings named above."},"rejected_experiments":[{"experiment":"Func_080a8b10 return type u8 (zero-extend at call boundary) instead of s8 (sign-extend)","result":"differing_halfwords 390 -> 412 (worse); the reference's early lsls/lsrs zero-extend-into-a-different-register idiom at the call site was not reproduced by declaring the callee's return type u8, and it desynced the following fp/fp-substitute section further"},{"experiment":"explicit (s8) cast on the 'step' local at its Modulo(quantity+step, step) use site (matching m2c's own rendering), combined with either s8 or u8 return type for Func_080a8b10","result":"with u8 return: 412 differing halfwords, 866/870 bytes (undersized). With s8 return: 404 differing halfwords. Both worse than leaving 'step' as a plain s32 used directly with no cast (327, the accepted state) -- the reference does sign-extend 'step' at its use site via a hoisted-early load+lsls+asrs, but reproducing that in source without hand-scheduling the load did not survive the round trip"},{"experiment":"wrap entriesBuf/step/hasAlt/flagByte in a nested block scope confined to the outer-loop body (hypothesis: tighter C89 block lifetime would reduce apparent register pressure and let the compiler promote the buffer's address into fp like the reference does)","result":"no improvement (327 differing halfwords, wrong_instructions rose slightly 216->218); reverted"},{"experiment":"entriesBuf declared as u8[8] and referenced directly (array decay) at each call site vs. an explicit intermediate u8* variable reassigned each outer-loop iteration vs. an s32[2] buffer cast to u8* at call sites","result":"byte-for-byte identical candidate output across all three variants (390, later 327, differing_halfwords unchanged); the compiler treats these as equivalent, ruling out the buffer's declared type/indirection style as the cause of the fp-vs-stack-slot allocation difference"},{"experiment":"declaration-order permutations of the six small scalars (ownerIdPtr/roundMode/done/hasAlt/step/result) at the top of the function, following the ascending-offset heuristic documented in select_use_item.c's own header comment","result":"one specific ordering (result,step,hasAlt,done,roundMode,ownerIdPtr, i.e. declared in the SAME order as their ascending real stack offsets 28>24>20>16>12>8, last-declared getting the lowest offset) did land 'result' at its correct sp+28 slot and is kept in the current draft, but it did not resolve the fp-substitute slot competing for sp+8, so ownerIdPtr/roundMode/done still sit 4 bytes above the reference"}],"notes":["Recovered only from this owner's own retained assembly (games/gs1/asm/080a8114.s), the m2c control-flow reconstruction generated from that same assembly (out/family-transplants/main-080a8114/m2c/080a8114.c), the approved ROM, and already-adopted/already-drafted sibling sources in this repo (games/gs1/src/shop/select_use_item.c, select_repair_item.c, select_party_member.c, select_purchase_quantity.c, select_sale_quantity.c; games/gs1/src/menu/select_quantity.c; games/gs1/src/character_menu/draw_selection_cursor.c; games/gs1/recon/en/main/080a8578.c, 080a5614.c, 080a1a40.c, 080a90bc.c). No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","This candidate claims zero DONE bytes, so it does not require a progress-report refresh.","Next steps for a future pass: the fp-vs-stack-slot allocation gap looks like it needs either a different overall statement/expression shape for the six small scalars (not just declaration-order or block-scope changes, both tried and ruled out above) or acceptance that this owner's particular register-pressure profile is not reachable from a natural top-down C rewrite under this compiler without forbidden register hints."]},"main:080a8578":{"schema_version":1,"namespace":"main","address":"0x080a8578","status":"proven-retained","owner_bytes":140,"executable_owner_bytes":140,"candidate_bytes":140,"differing_halfwords":3,"wrong_instructions":4,"classification":"regional_compiler_scheduling","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":100,"core_identical":false,"core_diff_bytes":{"ja":40,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"0x0809f490","en":"0x080a8578","de":"0x080ab3f4","es":"0x080acde8","fr":"0x080ace04","it":"0x080a85f4"}},"bounded_search":{"mode":"classic-walk","candidates":50000,"compile_failures":827,"exact":false,"baseline_differing_halfwords":11,"best_differing_halfwords":3,"best_structural_rows":2},"notes":["Selects a status message variant, renders remaining experience for a non-max-level owner, and copies the temporary message buffer to its destination.","A semantics-preserving wide temporary collapses the EN residual to two structural rows, but the bounded search found no exact candidate.","The DE, ES, FR, and IT normalized cores match EN exactly. The uniquely located JA source variant uses a 0x80-byte allocation and 0x40-byte render limit instead of EN's 0x100 and 0x80, independently proving that it is not another compiler rendering of the same source constants.","The EN residual is limited to exchanging the independent allocator-result save and message-literal load at offsets 0x54 and 0x56, plus the consequent literal register at 0x5a; both streams resynchronize immediately afterward. Fifty thousand bounded candidates found no exact approved-C rendering."]},"main:080a8604":{"schema_version":1,"namespace":"main","address":"0x080a8604","status":"measured-draft","owner_bytes":768,"candidate_bytes":760,"differing_halfwords":340,"wrong_instructions":270,"classification":"character-menu-item-use-preview-panel","family":{"id":"template-main-080b362c","template_owner":"main:080b362c","template_source":"games/gs1/src/shop/select_use_item.c","note":"Below the 7500/10000 family-transplant threshold (best guess 7338, LOW confidence) and confirmed a false positive: Shop_UseSelectedItem is an unrelated interactive selection loop (WaitFrames/input-poll/Ability_GetAvailability), sharing only the generic register-shuffle prologue shape with this owner. The real kinship is with games/gs1/src/character_menu/*.c: the very first literal pool word this owner loads is 0x03001f2c (Data_03001f2c), the same InventoryMenuState global build_availability.c/draw_selection_cursor.c/update_selection_icons.c already key off, and this owner directly calls CharacterMenu_BuildAvailability (Func_080a8b10), CharacterMenu_UpdateSelectionIcons (Func_080a9dc4, called twice), and InventoryMenu_ApplyCategoryItemFlags (Func_080a9d3c) -- all three already-named siblings in that same subsystem, immediately below CharacterMenu_DrawSelectionLabels (main:080a8508) in address order."},"notes":["Reads as the screen-setup routine that runs once a usable item and target category are chosen: sets menu->cursor->state=1 (InventoryMenuIcon.state, offset 5, via the already-typed InventoryMenuState.cursor field), calls Func_080a8914(window,owner,mode), builds the 5-slot usability array via CharacterMenu_BuildAvailability(entries,1,owner), pushes it to the icon row via CharacterMenu_UpdateSelectionIcons(entries), optionally draws an outer window border (Func_08015068) unless mode&0x100 is set, then lists up to 5 available-action text lines (message ids 0xbd5..0xbd9, one per entries[i], stacked at y=40+16*count, falling back to message 0xbd4 'none available' when the array is all zero) -- these five ids sit directly adjacent to draw_selection_labels.c's own Data_00000bdc/Data_00000bda message table, reinforcing the sibling relationship. Refreshes the icons a second time, applies InventoryMenu_ApplyCategoryItemFlags(entries), then reads a still-unnamed u16 at menu+0x220 (immediately before InventoryMenuState.completion_flag at 0x222, not yet a named field) and returns early when it equals 3 (a category that skips the whole stat-preview block below).","The remaining body (reached when the mode&0xff==1 'use' path is taken) draws four page/type tiles via Func_08015280(window,1..4,x=15/19/23/27,row_y,4) where row_y defaults to 7 for mode==1 and 10 otherwise, then a party-comparison flag (compare_mode, computed via the explicit (u32)(-t|t)>>31 zero/nonzero idiom rather than a bare '!=0' -- matching this compiler's idiom for booleans stored to memory rather than branched on immediately) gates a quantity-remaining message (0xafd) and, when mode==1, an icon (Data_080af22c) plus a two-part label (Value_00000afe, Value_00000afe+1) whose glyph addresses sit directly after draw_stat_delta.c's InventoryMenu_IncreaseGlyph/DecreaseGlyph pair (0x080af224/0x080af228), then a 4-iteration loop over party slots reading Runtime_GetObject(owner)+280/+284 (per-slot u8 flags), +72..+86 (four s16 pairs) via Func_080150b0/Func_08015098 at per-slot x=104/112/120+32*i.","Cross-checked the object+72 and object+280 offsets against an independent m2c decompilation of the real reference assembly run through this project's own workbench (tools/compiler -- workbench): m2c's own trace (var_r8_260=sp14+0x48, var_r5_266=sp14+0x118) confirmed +72 and caught a hand-tracing slip in an early pass of this session that had the second base at +160 instead of the correct +280 (0x118); the draft was corrected to +280. m2c's own compiled candidate scored worse on this project's objdiff similarity (71.29%) than the hand-written draft here (76.68%), so the m2c output was used only to verify offsets/algorithm, not adopted as source shape.","This is a class=wrong, non-adopted draft: the algorithm, every call target and its argument order, and every literal constant (message ids, glyph addresses, tile indices, offsets) are reproduced and were independently cross-checked, but candidate_bytes (760) undershoots owner_bytes (768) by one stack slot -- the compiler keeps row_y permanently spilled to its stack home (reloaded at every use) in the reference, while this draft's variable count lets the allocator promote it to a callee-saved register instead, which cascades into different hard-register choices for window/menu/entries-pointer throughout the rest of the function. This is register-allocation noise, not a semantic gap (matched_prefix=7, then continuous small register-role substitutions rather than any missing or extra call/branch). No PERM_GENERAL or hand register-forcing was used, per project constraints; closing this residual would need a further pass isolating exactly which additional local the true source keeps live to force that spill, or a permuter run once that is identified.","Adoption requires 0 differing_halfwords."]},"main:080a8c2c":{"schema_version":1,"namespace":"main","address":"0x080a8c2c","status":"exact","owner_bytes":148,"executable_owner_bytes":148,"candidate_bytes":148,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":128,"core_diff_bytes":0,"core_identical":true},"register_gate_step1":{"date":"2026-08-28","verdict":"miss","hypothesis":"One shipped GCC 2.96 per-translation-unit flag state explains the repeated local-alloc register-coloring floor across several independent owners.","cluster_basis":"080ae99c and 080ae9f0 are the adjacent same-algorithm nucleus; 080a8c2c and 080b60a0 are independent controls with the same documented qty_compare/RTL-discovery-order residual. These four sources are separate probes, not a claimed historical translation unit.","owners":[{"address":"0x080a8c2c","candidate_bytes":148,"reference_bytes":148,"baseline_differing_halfwords":4},{"address":"0x080ae99c","candidate_bytes":84,"reference_bytes":84,"baseline_differing_halfwords":10},{"address":"0x080ae9f0","candidate_bytes":92,"reference_bytes":92,"baseline_differing_halfwords":13},{"address":"0x080b60a0","candidate_bytes":166,"reference_bytes":166,"baseline_differing_halfwords":6}],"reproduction":{"git_head":"e77862791d35548bec4705d7b23aaaa5bc4fe9ac","tracked_state_before_probe":"clean","compiler_family":"gcc296","compiler_version":"2.96","xgcc_sha256":"bf6161b89ca5832dff2784d92d2a39c857123e26fa4654ecc8ee46d3937b0b3a","cc1_sha256":"4525e2477f4d903580155e8d79cbb965b5af89e0d9ac903287713736238d37eb","gs1_en_rom_sha256":"c14f1151897e8d73f25ffdd67e21eebb6dc57973ff2458872ee89fa9060aaca1","canonical_flags":"-O2 -mthumb -mthumb-interwork -mcpu=arm7tdmi -fno-builtin -nostdinc -ffreestanding -fcall-used-r4 -Igames/gs1/include","command":"tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/.c --owner --family gcc296 --first --work [--remove-flags ] [--flags ]"},"matrix":{"states_including_baseline":64,"mutations":63,"register_and_abi_28":["baseline","remove -fcall-used-r4","add one of -fcall-used-r5,-fcall-used-r6,-fcall-used-r8,-fcall-used-r9,-fcall-used-r10,-fcall-used-r11","remove -fcall-used-r4 and add one of -fcall-used-r5,-fcall-used-r6,-fcall-used-r8,-fcall-used-r9,-fcall-used-r10,-fcall-used-r11","add exactly one of -ffixed-r0 through -ffixed-r12, or -ffixed-r14"],"allocation_pass_6":["-fno-caller-saves","-fno-omit-frame-pointer","-frename-registers","-fno-regmove","-fno-expensive-optimizations","-fno-regmove,-fno-expensive-optimizations"],"post_allocation_4":["-fno-schedule-insns2","-mno-sched-prolog","-fno-peephole2","-fno-peephole"],"cse_and_lifetime_18":["-fno-gcse","-fno-cse-follow-jumps","-fno-cse-skip-blocks","-fno-rerun-cse-after-loop","-fno-rerun-loop-opt","-fno-function-cse","-fno-force-mem","-fforce-addr","-fno-strength-reduce","-fno-thread-jumps","-fno-delete-null-pointer-checks","-fno-optimize-sibling-calls","-fno-strict-aliasing","-fargument-noalias","-fargument-noalias-global","-fno-defer-pop","-fmove-all-movables","-freduce-all-givs"],"broad_shipped_controls_8":["-O1","-O3","-Os","-O0","-mno-thumb-interwork","-freorder-blocks","-funroll-loops","-funroll-all-loops"],"excluded_dead_or_invalid_axes":"Thumb forcibly disables sched1, so -fschedule-insns, -fno-schedule-insns and its sub-options are dead. r0-r3/r12/r14 are already call-used; r7 is Thumb's hard-frame register and rejects call-used; r13/sp and r15/pc are not allocator candidates. No generic -fno-cse exists. Arbitrary flag powersets were not searched; the only paired state was the compiler-proven full regmove disable above."},"result":{"compile_failures":0,"owners_made_exact":0,"owner_rows_strictly_closer":0,"owner_rows_score_neutral":128,"owner_rows_regressive":124,"fully_score_neutral_mutations":20,"mutations_regressing_at_least_one_owner":43,"mutations_with_any_extent_mismatch":32,"score_neutral_mutations":["-fargument-noalias","-fargument-noalias-global","-fcall-used-r9","-fcall-used-r11","-ffixed-r9","-ffixed-r11","-ffixed-r12","-ffixed-r14","-fno-cse-follow-jumps","-fno-cse-skip-blocks","-fno-defer-pop","-fno-delete-null-pointer-checks","-fno-function-cse","-fno-optimize-sibling-calls","-fno-peephole","-fno-peephole2","-fno-rerun-cse-after-loop","-fno-strict-aliasing","-fno-thread-jumps","-O3"]},"decision":"Hypothesis dead for this cluster: no shipped one-axis flag state moved even one owner strictly closer, so no compiler route is registered and the gate proceeds to the allocator-order decoder."},"register_gate_step2":{"date":"2026-08-28","verdict":"decoder-validated-real-floor-not-closed","diagnostic_route":{"compiler":"canonical gcc296 route plus -g -dp -dr -dl -dg","safety":"The diagnostic and ordinary object .text sections must be byte-identical. Evidence is scoped to the selected owner: assembly instruction UID to .17.lreg pseudo, .00.rtl first-set creation rank, and .18.greg hard-register disposition. Literal-pool disassembly is excluded using the selected owner's emitted instruction count.","normal_text_equals_diagnostic_text":true},"controlled_acceptance":[{"owner":"0x080b362c","exact_source_bytes":576,"perturbation":"Move object ahead of win2 in the local declaration order.","perturbed_differing_halfwords":5,"expected_edit":"swap declarations of win2 and object","decoder_edit":"swap_declarations(win2,object)","result":"pass"},{"owner":"0x0807a550","exact_source_bytes":94,"perturbation":"Cache limit across the do/while loop rather than recreate it at the guard and backedge.","perturbed_differing_halfwords":7,"expected_edit":"split limit's loop-spanning lifetime","decoder_edit":"split_lifetime(limit) detail=recreate-at-guard-and-backedge","result":"pass"},{"owner":"0x0808f1c0","exact_source_bytes":204,"perturbation":"Remove the shared zero carrier used by the clears and mask operation.","perturbed_differing_halfwords":1,"expected_edit":"merge the clear values into one live zero carrier","decoder_edit":"merge_lifetime(zero_carrier) detail=keep-zero-live-through-clears-and-mask","result":"pass"}],"real_floor":{"owner":"0x080a8c2c","candidate_bytes":148,"reference_bytes":148,"baseline_differing_halfwords":4,"decoder_evidence":["left: pseudo 48, creation rank 19, allocated r2, reference role r3; used 8 times across 6 instructions in block 9 and set once","expression: pseudo 58, creation rank 26, allocated r3, reference role r2; used 16 times across 4 instructions in block 9 and set twice","constraint=reciprocal-register-role-swap","edit=undecoded reason=no-unique-source-shape"],"bounded_hand_repairs":[{"shape":"value-temp","differing_halfwords":6,"effect":"correct register roles, wrong scheduler-2 load order"},{"shape":"two-values","differing_halfwords":6,"effect":"correct register roles, wrong scheduler-2 load order"},{"shape":"cell-pointer","differing_halfwords":6,"effect":"correct register roles, wrong scheduler-2 load order"},{"shape":"right-index","differing_halfwords":6,"effect":"correct register roles, wrong scheduler-2 load order"},{"shape":"left-first-xor","differing_halfwords":8,"effect":"regression"},{"shape":"anonymous-left-first","differing_halfwords":8,"effect":"regression"},{"shape":"right-temp","differing_halfwords":8,"effect":"regression"},{"shape":"const-left","differing_halfwords":4,"effect":"baseline-equivalent"},{"shape":"volatile-access","candidate_bytes":168,"differing_halfwords":82,"effect":"invalid direction and major regression"},{"shape":"volatile-tiles","candidate_bytes":168,"differing_halfwords":82,"effect":"invalid direction and major regression"}],"failure_reason":"Every ordinary-C shape tested either preserved the four-halfword allocation floor, obtained the desired r3/r2 roles while moving the loads into a six-halfword scheduler floor, or regressed. Volatile forms were both semantically inappropriate and much worse. There is no unique decoder-supported source edit that satisfies allocation and scheduling simultaneously, and forced register assignment or compiler scheduling is forbidden by the gate.","adopted":false},"secondary_confirmation":{"owner":"0x080b9dc4","baseline_differing_halfwords":1,"attempts":["defer completed initialization","introduce completed pointer alias"],"result":"Both remained at one differing halfword: the candidate rematerializes zero while the reference copies the already-live zero carrier. No source was adopted and no further owner was selected."},"decision":"The decoder passed all three controlled perturbation tests but did not meet the real-floor hand-closure acceptance. The bounded failure is recorded as required; step 2 ends without an adoption and the gate proceeds to the annotation-free bounded permuter."},"register_gate_step3":{"date":"2026-08-28","verdict":"accepted-annotation-free-finite-search","catalog":{"version":"register-wall-v1","path":"games/gs1/recon/compiler-repair-patterns.json","enumeration":"baseline plus the finite alternatives for one structured decoder-named repair","maximum_raw_choices":16,"maximum_edits_per_candidate":1},"entry":{"owner":"0x080a8c2c","source_annotations":0,"decoder_dimensions":["temporary","evaluation_order","commutative_order"],"decoder_constraint":"reciprocal-register-role-swap"},"run":{"seed":1,"raw_choices":5,"unique_choices":5,"attempted":5,"compile_failures":0,"baseline_differing_halfwords":4,"best_differing_halfwords":4,"exact":false,"decoder_repair":"reciprocal_register_role_swap(left)","decoder_evidence_sha256":"861af3c34fa5f87b1680b04dc9313b564b0827e12a6d85e5ee9d4c2472814266","result_path":"out/register-wall/step3/080a8c2c-structured-seed-1/report.json"},"bounded_results":[{"mutation":"baseline","differing_halfwords":4},{"mutation":"temporary:introduce","differing_halfwords":4},{"mutation":"evaluation_order:left_before_right","differing_halfwords":6},{"mutation":"temporary:merge","differing_halfwords":6},{"mutation":"commutative_order:swap_operands","differing_halfwords":8}],"catalog_fixture_acceptance":[{"owner":"0x080b362c","repair":"swap_declarations(win2,object)","raw_choices":2,"best_differing_halfwords":0,"exact":true},{"owner":"0x0807a550","repair":"split_lifetime(limit)","raw_choices":2,"best_differing_halfwords":0,"exact":true},{"owner":"0x0808f1c0","repair":"merge_lifetime(zero_carrier)","raw_choices":2,"best_differing_halfwords":0,"exact":true}],"safety":"The permuter rejects retired PERM_GENERAL/PERM_INT annotations, requires a structured decoder repair with its named payload, masks comments and literals during site matching, refuses conditional/macro source, rejects direct main-image r0-r13 call-via models, deduplicates before deterministic seed rotation, and records decoder evidence plus the complete raw and unique finite spaces and mutation IDs.","adopted":false,"decision":"Step 3 acceptance is met: an existing floored owner entered the bounded search as ordinary C with zero hand annotations, every decoder-selected safe catalog choice was compiled, and the complete finite space was reported. The unchanged four-halfword best score is evidence, not an adoption; step 4 may now begin."},"register_gate_step4":{"date":"2026-08-28","closure_ordinal":1,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":4,"final_differing_halfwords":0,"repair_pattern":"inline-two-operand-xor-boundary","source_edit":"Replace the named first XOR temporary and the following compound XOR with two calls to one ordinary static inline binary-XOR helper.","allocator_effect":"Inlining preserves the anonymous mask=r3 and tile=r2 allocation while the helper parameter boundaries remove MEM_UNCHANGING from the two mask loads. The first store then feeds both later loads, raising its sched2 critical path above the independent right-side address setup.","bounded_confirmation":{"both_helper_calls_required":true,"canonical_no_dump_equals_diagnostic_dump":true,"candidate_bytes":148,"reference_bytes":148,"linked_byte_differences":0},"annotation_free_search":{"catalog_version":"register-wall-v2","source_annotations":0,"raw_choices":6,"unique_choices":6,"attempted":6,"winning_mutation":"temporary+evaluation_order:inline_xor_helper","exact":true,"result_path":"out/register-wall/step4/080a8c2c-catalog-v2/report.json"},"production":{"source":"games/gs1/src/menu/build_pattern_tiles.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 148/148 linked bytes"}},"notes":["Builds two groups of six menu pattern tiles by filling each 64-byte tile and applying paired XOR masks across seven columns.","2026-08-27: Root cause of the prior draft's 73-differing-halfword score was a mismodeled call. `Func_0800730c` is not a real function: 0x0800730c is the sl (r10) slot of the fourteen-entry `_call_via_rN` trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8`, 4 bytes/slot, r0..sp). Unlike the r0-r3 slots (where a fictional trailing argument lands in the right register purely because it's within the 4-register AAPCS/APCS argument window -- see games/gs1/src/ui/runtime/draw_work_by_attributes.c's byte-exact `Func_080072f0(dest,size,value,0x03000168)` precedent for the r3 slot), r10/sl is never an argument-passing register, so no N-argument direct call can ever place a value there; arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c confirms arguments stop at r3. Rewrote the call as a genuine indirect call through a function-pointer local, `((FillWordsFn)0x03000168)(tile, 64, 0x44444444)` (FillWordsFn = void(*)(void*,s32,u32)), matching the already-adopted indirect-call idiom in games/gs1/src/battle/effects/member_orbit/run.c. This alone let the compiler naturally allocate both sl (the fill-routine pointer, loop-invariant) and r8 (the Data_080af23c base, loop-invariant) exactly as the reference does, dropping differing_halfwords from 73 to 6 (wrong_instructions 22->0) with zero remaining structural/semantic mismatches -- the rest of the function's control flow, mask-index clamp, and loop nesting were already correct in the prior draft.","2026-08-27 (same pass): the residual 6 differing halfwords were pure instruction-scheduling reordering (class=ordering, wrong_instructions=0): the reference finishes `tile[column] ^= Data_080af23c[mask_index].left;` completely (load, xor, store) before starting any part of the second statement's address advance, while the naive two-statement candidate let the compiler hoist the independent `adds r1,#4`/`mov r3,r8` (address setup for `.right`) forward into the middle of the first statement's dependency chain. Tried and rejected (each scored worse or unchanged, all still available in this dossier via the permuter's report.json runs during this session): swapping statement order; explicit non-compound `a = a ^ b` forms; wrapping just one statement in an empty block (no effect -- proves the fix isn't about lexical block boundaries per se); an unused/dead local declared in the block (no effect -- proves it isn't about the block merely containing a declaration); a named local `struct TileMaskPair *mask`/`masks[]` pointer alias for the whole Data_080af23c[mask_index] pair (regressed hard, 39-47 diff, evidently disturbs the loop-invariant hoisting of the array base entirely); flat `(const u8*)Data_080af23c + mask_index*8` byte-offset addressing (regressed to candidate=156, 75 diff). The fix that worked: materializing only the `.left` value into a named local (`u32 left = Data_080af23c[mask_index].left;`) as its own full statement, immediately before `tile[column] ^= left;`, inside a fresh nested block. This is a real, minimal, plausible source shape (a natural place to name the first mask half) and it fixed the scheduling exactly: differing_halfwords 6->4.","2026-08-27 (same pass, residual documented, not fully closed): the remaining 4 differing halfwords (wrong_instructions=8, class=allocation, matched_prefix=37 of 74) are a register-role swap confined to the single `eors`/`str` pair for the `.left` xor: reference computes `mov r3,r8; ldr r3,[r3,r1]` (mask value REUSES r3, the now-dead address-base register) then `ldr r2,[r0,#0]` (tile value gets a fresh r2), `eors r2,r3`, `str r2,[r0,#0]`; the candidate instead gives the mask value a fresh r2 and lets the tile value reuse r3, i.e. `eors r3,r2; str r3,[r0,#0]` -- functionally identical, byte-different. Root cause, confirmed by direct A/B compiles: naming `left` as a real local (required to fix the scheduling above) makes GCC give it its OWN fresh pseudo/register rather than letting it merge into the about-to-be-dead address-base register the way an anonymous temporary can; reversing which value is named first (naming a `tile[column]` temp `t0` ahead of `left`) restores the correct r2/r3 roles for this pair but reintroduces the exact scheduling bug fixed above (verified: byte-identical output to the pre-fix 6-diff candidate). Every combination tried this pass of naming order, naming only one side, pointer-vs-value naming, `s32`-cast naming, comma-expression forced evaluation order, and prefetching `.right` first instead of `.left` either reproduced one of these two mutually exclusive outcomes exactly or regressed further (see the permuter runs from this pass, not retained on disk but reproducible via the PERM_GENERAL alternatives documented here). This looks like a genuine tension in this compiler's local-alloc between named-variable register independence and anonymous-temporary register reuse for this exact code shape, not yet resolved -- kept the scheduling-correct, semantically-clean variant (4 diff) rather than the roles-correct-but-misordered variant (6 diff) since it is closer to exact and the residual is a stable, well-characterized 2-instruction-pair swap, not a semantic error. Did not force register assignment via `register`-qualified locals, named-register variables, or inline asm, per project rules. Worth a future pass with a different local-alloc lever now that the swap is precisely characterized.","Adoption gate not met: differing_halfwords=4, not 0. Candidate is otherwise structurally and semantically complete -- no remaining algorithm, control-flow, or type mismatches, only the documented register-role swap above.","2026-08-27, mechanism-level follow-up: this owner's register-role-swap residual, and the structurally identical residuals independently found and left open this session on 080ae99c, 080ae9f0, and 080b60a0, are almost certainly the same GCC 2.96 local-alloc tie-break, now traced directly in alchemy-gcc/agscc/gcc/local-alloc.c. block_alloc() sorts competing quantities by qty_compare()'s QTY_CMP_PRI macro (floor_log2(n_refs) * n_refs * size / (death - birth)); the quantity that sorts first gets first pick of a hardware register in REG_ALLOC_ORDER order (arm.h: r3,r2,r1,r0,ip,lr,r4,...). When two quantities tie EXACTLY on that formula (identical ref count, size, and life-length -- exactly the case for two same-size values each loaded once and consumed once, as in this owner's left/tile[column] pair), qty_compare() has NO further tie-break for the small (<=3-quantity) case that this function's block uses (the inline EXCHANGE-based switch at local-alloc.c:1312-1336 and :1361-1385 simply leaves qty_order in its default 0..n identity order when qty_compare returns 0); only the qsort path (qty_compare_1, used for >3 quantities) explicitly breaks such ties by raw quantity number. Either way, the deciding factor is each quantity's internal number, which is assigned during block_alloc's single forward scan of the basic block's insns (local-alloc.c around line 1284) -- i.e. by REGISTER-RTL discovery order within that block, not by C source statement order once earlier passes (combine, cse, jump, loop) have already run. This is why every agent's declaration-order and statement-order experiments on this exact residual class, across four independent owners this session, measured zero effect: they were reordering the wrong thing. A real fix would need either (a) a way to change which of the two tied values' RTL is discovered first within the block -- something not controllable by plain reordering once combine/cse have restructured the block, or (b) tracing the actual .rtl dump for one of these tied pairs (GCC 2.96's -da/-dp dump flags) to find what upstream C-level change would shift RTL discovery order, which no agent attempted this session. Recorded here as the clearest write-up of the mechanism for whichever owner a future pass tackles first."]},"main:080a8d34":{"schema_version":1,"namespace":"main","address":"0x080a8d34","status":"measured-draft","owner_bytes":524,"executable_owner_bytes":524,"candidate_bytes":448,"differing_halfwords":223,"wrong_instructions":154,"classification":"draw-selected-inventory-row","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"unresolved"},"family_transplant":{"best_guess":"shop/select_repair_item.c","score":7384,"threshold":7500,"confidence":"low","verdict":"false positive: shares no callee, field offset, or constant with the retained assembly -- only the generic register-shuffle prologue shape matched. Discarded; this draft is built from the retained assembly and its real call targets only."},"notes":["Reads Data_03001f2c (the polymorphic menu-runtime cell) as a view exposing a saved window handle at +44 and a 5-column-per-row u16 item-slot grid at +456, indexed by row = *(sel+8) and column = *(sel+16) from the caller-supplied selection-state pointer (arg2). This same +44/+456 view and row*5+col indexing is corroborated by menu/select_quantity.c (Func_08015270(window), Func_080030f8(1) at the same call sites) and by menu/draw_page_indicator.c's real prototype for Func_08015280(s32 window, s32 tile, s32 x, s32 y, s32 style), which matches this owner's calls exactly.","First block: if the currently selected grid cell holds an item, draws its name-ish message ((rawSlot & 0x3fff) + 0x53a, base unconfirmed -- games/gs1/assets/text/message_archive.json does not resolve id 0x53a to readable text under the simple bank*256+offset scheme), draws an icon-area rect (Func_08015068), then looks the item up via Func_08077080 and inspects byte offsets [1], [2], [12] of the returned pointer. Offsets 2 and 12 line up exactly with item.h's ItemDefinition.type (0x02) and ItemDefinition.use_type (0x0c) LAYOUT_OFFSET_GUARDs, so item.h's struct is reused (via raw u8 casts, since offset 1 -- the high byte of ItemDefinition.price -- is not a guarded field). The three literal message ids loaded at the end of the function (0xb13/0xb14/0xb15) resolve in message_archive.json to 'Can be used in Battle' / 'Can be used in Towns/Dungeons' / 'Can be used in Towns/Dungeons/Battle' -- a strong, confirmed match for the item-usability flag logic decoded from byte offsets 1 and 12 (bits 0x40 and 0x80 of offset 1, overridden to at-least-'dungeon' when offset 12 is nonzero).","Second block: loops the 5 columns of the selected row, looks each slot's item up the same way, and draws either a single 19-wide cursor rect (item type == 4) or a type icon (Func_08015280, tile = type+1) plus two cursor rects (widths 15 and 3), with field 14 on the selected column and 15 elsewhere. This is very likely the highlighted-row redraw for an equip/item selection grid (5 items per party member row), called after the cursor moves.","Every callee's argument count, order, and constant operands (call targets, the 0x3fff mask, the 0x53a add, the three message ids, all x/y/width/style constants) are confirmed instruction-by-instruction against games/gs1/asm/080a8d34.s and match the reference exactly. The residual is register-color and post-call reload-conservatism: this build's register allocator assigns fp/sl and r8/r9 to the same two long-lived values (the selection-state pointer and the dereferenced menu pointer) in the opposite pairing from the reference, and it keeps several memory-derived values (grid[cell], sel->8, sel->16) live across intervening bl calls in registers where the reference reloads them from memory after every call. Several source-level rewrites (readback ordering, mask/base as named locals, an explicit `height` local for the loop's constant arg 5, hoisting vs. duplicating the per-column item lookup across the i==selected branch, inverted-branch polarity for the kind==4 case) were tried against candidate-show --align; each changed the halfword/instruction counts but none closed the gap or found a lever that reliably narrows it further, consistent with this project's documented register-letter-swap residual class.","The family-transplant matcher's best guess (shop/select_repair_item.c, 7384/10000, below the 7500 threshold) was read and shares no callee, field offset, or constant with this owner -- confirmed false positive, discarded per the task brief.","Not adopted: differing_halfwords=223 of 262 reference halfwords, class=wrong. Retained assembly remains authoritative.","Recovered only from retained owner assembly, already-adopted exact GS1 EN sources (item.h, menu/select_quantity.c, menu/draw_page_indicator.c), games/gs1/assets/text/message_archive.json, and the approved compiler. No other decompilation project or symbol map was consulted."]},"main:080a8f40":{"schema_version":1,"namespace":"main","address":"0x080a8f40","status":"exact","owner_bytes":380,"executable_owner_bytes":380,"candidate_bytes":380,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"domain":"Draws one page of the Psynergy list, including PP cost, range, and the selected owner's name, class, and level.","expressed":["dereferences the mode-owned PsynergyMenuState at Data_03001f2c and resolves menu->owner_ids[0] through Runtime_GetObject","commits the window and computes first = result->page*5 and rows = min(result->entry_count-first, 5)","positions the page icons, draws the page indicator, and draws message 0xAED, which the local message archive identifies as 'PP'","loops over up to five entries of menu->psynergies[], masks each action id with 0x3fff, and draws its action-name message and BattleAction.pp_cost","converts BattleAction.range to the three-tile range marker index, preserving the 0xff sentinel-to-11 behavior","draws message 0xAEF, 'You have no Psynergy.', when menu->psynergy_count is zero","draws the owner's name string, class-name message, the ROM string 'Lv', and the owner's level byte","always returns 1, matching the menu page callback convention"],"register_gate_step4":{"date":"2026-08-28","closure_ordinal":3,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":28,"final_differing_halfwords":0,"repair_pattern":"materialize-message-and-merge-count-carrier","decoder_signals":["reciprocal mask/item register roles at the indexed halfword load","conditional value and result occupied different lifetimes","row-coordinate setup outranked the masked-message argument"],"source_edit":"Inline the two indexed halfword loads with the offset-first address spelling, materialize msg before calculating y, and load act->range into range before mutating it in place.","compiler_effect":"The mask remains the r0 result carrier, range remains one r4 carrier through compare and decrement, and msg makes GCC schedule the indexed load/mask before the row-coordinate shift.","bounded_confirmation":{"baseline_differing_halfwords":28,"inline_indexed_loads_differing_halfwords":15,"merged_count_carrier_differing_halfwords":6,"materialized_message_differing_halfwords":0,"candidate_bytes":380,"reference_bytes":380,"linked_byte_differences":0},"production":{"source":"games/gs1/src/psynergy_menu/draw_list_page.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 380/380 linked bytes"}},"notes":["The inventory-menu page family supplied the compiler shape only: page math and the paging helpers are shared. The mode-owned Data_03001f2c view, message text, action fields, and surrounding PsynergyMenu callers establish that this owner belongs to psynergy_menu.","PsynergyMenuState independently fixes psynergies at 0x1c8, psynergy_count at 0x218, and owner_ids[0] at 0x21a. The local message archive identifies 0xAED as 'PP', 0xAEF as 'You have no Psynergy.', 0x333 as the action-name table base, and 0x741 as the class-name table base.","BattleAction establishes range at +8 and pp_cost at +9. The local ROM bytes at 0x080AF22C are the NUL-terminated ASCII string 'Lv'. The three 0x08015xxx veneer targets are the exact adopted string/number drawing owners, not portrait or icon routines.","The byte-exact repair keeps the menu-relative offset loads, materializes msg before y, and mutates one range carrier in place. Those ordinary C choices close the former allocation/scheduling floor without annotations, register hints, or compiler overrides.","Recovered only from the retained owner assembly, approved local ROM and message archive, already-adopted Psynergy/menu/text sources, in-repo headers, and the approved compiler. No external decompilation or symbol map was consulted."]},"main:080a90bc":{"schema_version":1,"namespace":"main","address":"0x080a90bc","status":"measured-draft","owner_bytes":696,"candidate_bytes":548,"differing_halfwords":345,"wrong_instructions":312,"classification":"shop-icon-confirm-loop-large","domain":"The largest of the six assigned owners: initializes a work window and a 32-entry pointer table, clears part of the shop struct, then runs a multi-stage input loop (a confirm sub-flow gated by an Func_080770c0 status check, a paging adjust shared by two repeat-key bits that mirrors 080a7d68's shop+0x1c/0x208 selection-array pattern, and new-key confirm/cancel exits) before a matching linear teardown.","notes":["Clustered against the byte-exact Shop_SelectPartyMember template by the family scan (score 0.95, the highest of the six), largely on the strength of a genuine structural echo: a fp/stack-spilled 'result' variable set to 0/1/-1 exactly like the template's confirm/cancel exits, and the same ADDR_03001C94/ADDR_03001B04 input-poll shape. The rest of the body -- a 32-entry pointer-table sweep, a nested confirm sub-loop (labels .L4/.L16/.L5/.L6/.L7/.L8/.L9 in the retained assembly) driving a three-way classification of an Func_080a1fd4 return value, and the paging-adjust block shared by two repeat-key bits -- has no template counterpart and was recovered from the retained control flow directly.","This is the least-resolved of the six assigned owners and should be read as a genuine structural sketch, not a near-miss: the candidate compiles 148 bytes shorter than the reference (548 vs 696) and differs in over 300 instructions, which is a length gap this large usually meaning whole statements or a sub-block are still missing or shaped wrong, not merely constant or register-bank drift.","What is recovered with reasonable confidence, cross-checked against the identical idiom in 080a7d68/080b24e4: the shop+0x1c/0x1e-style persisted selection field re-used here as shop+28 with the same shop+0x208+selection*2 u16 array, the same 'selection = Modulo(selection+count, count); field = array[selection]; shop+8 = field; *(u8*)anchor_ptr = field; Func_080a1804(shop, field);' tail shape driving the paging-adjust block for the two repeat-key bits (0x100/0x200, sharing one handler in the reference, split into an if/else on which bit fired inside this draft), and the overall three-exit shape (new-key 1 -> result=1, new-key 2 -> result=-1 plus a Func_080041d8 cleanup call, else falls through to the confirm sub-loop).","What is NOT resolved and is the likely source of most of the remaining gap: the exact register role and origin of 'r6' in the reference (used both as a plain value argument to two calls early in the confirm sub-loop and later dereferenced with offsets +16/+20/+24, meaning it is a genuine pointer established somewhere this draft does not yet account for correctly), the precise branching of the .L5/.L7/.L8/.L9 three-way classification of the Func_080a1fd4 result (approximated here with an under-specified 'blocked' variable rather than the reference's exact comparison chain), the literal-pool values for the 32-entry table clear, the Func_08004278 callback-table store (the retained pool includes a code address, 0x080a19a1, that this draft passes straight through as a message id -- almost certainly wrong), and several field offsets guessed by pattern-matching against 080a7d68 rather than confirmed against this owner's own literal pool.","Given the size of the remaining gap and the specific unresolved pointer (r6), the honest next step is a full re-derivation of the confirm sub-loop (.L4 through .L13) from the retained assembly with the reference's literal pool actually resolved (per CONTRIBUTING.md's assemble/disassemble guidance), not further guessing or a permuter search -- the algorithm shape is credible but incomplete, which the reconstruction method treats as a source-shape gap rather than a compiler-internals residual.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080a93a4":{"schema_version":1,"namespace":"main","address":"0x080a93a4","status":"measured-draft","owner_bytes":500,"candidate_bytes":496,"differing_halfwords":224,"wrong_instructions":170,"classification":"equipment-menu-slot-list-and-compatibility-markers","family":{"id":"weak-template-main-select_quantity","template_owner":null,"template_source":"games/gs1/src/menu/select_quantity.c","note":"Below this project's 7500/10000 family-transplant threshold (best guess select_quantity.c scored 7458, LOW confidence). That guess is not kinship in any deep sense -- select_quantity.c is a completely different quantity-stepper UI -- but it does share the same Data_03001f2c global 'menu' pointer and the same UiWindow_Commit(Func_08015270)/WaitFrames(Func_080030f8) idiom, confirming both owners work on the same global menu-context struct. The real, much closer structural kin are two other unregistered, unadopted recon drafts in this same file: games/gs1/recon/en/main/080a5614.c and games/gs1/recon/en/main/080a6a98.c, both 3-arg (arg0, arg1(unused), ctx) 'draw 5 equip-slot row markers' owners reading the identical ctx field triple (ctx+8=page, ctx+16=selected row, ctx+24=page*5+row, written back every call) and the identical Data_03001f2c+456 u16 item-slot table, and even the identical Value_00000075 message-id base as 080a5614.c. Neither sibling reached differing_halfwords==0 despite dedicated iteration (080a5614: 78/50 best; 080a6a98: 36/18 best), which is the main reason this owner -- a materially larger superset of the same shape -- was not pushed further by hand once it reached a comparable residual."},"notes":["2026-09-01: the corpus-derived opposite-condition/same-target triage signal identified the non-selected row's type==4 split. Rewriting only that named block as type!=4 optional text drawing followed by one shared rectangle draw reproduces the reference's branch polarity and merge shape, improving candidate bytes 512->496 against the 500-byte owner, wrong instructions 181->170, and differing halfwords 227->224. Applying the same rewrite speculatively to the selected-row sibling overgeneralized the evidence and regressed to 480 bytes / 183 wrong instructions, so that half was restored. The retained one-block repair is measured improvement, not an exact claim.","Traced instruction-by-instruction from games/gs1/asm/080a93a4.s (500 bytes, no automatic family-transplant workspace since this owner scored below threshold). Signature s32 Func_080a93a4(s32 arg0, s32 arg1, void *ctx): arg1 is dead (overwritten before first read, matching the 080a5614/080a6a98 sibling convention exactly). ctx is a small selection-cursor struct: ctx+8=page (party-member/character index), ctx+16=selected slot (0..4), ctx+24=page*5+slot written back on every call (proved identical in games/gs1/recon/en/main/080a6a98.c and 080a5614.c, and independently reconstructed by m2c from the raw .s with the same field offsets).","menu = Data_03001f2c (same global as select_quantity.c, update_compatibility_indicators.c, start_compatibility_indicators.c, 080a9598.c and both loop siblings). menu+44 and menu+48 are two distinct window handles (menu+44 used with Func_08015270/UiWindow_Commit and as the Func_08015080/UiText_DrawAt window arg; menu+48 used as the object arg to every Func_080a2268/Render_SetTilemapFlagRect call in the second half of the function). menu+456 is a u16 item-id table indexed by page*5+slot (2 bytes/slot, 5 slots/page) -- the same table and stride used by 080a9598.c, 080a5614.c, 080a6a98.c and equipment_menu/update_compatibility_indicators.c (which indexes an adjacent-purpose table at menu+520 with the same *2 stride).","Body, in order: (1) recompute ctx+24, UiWindow_Commit(menu+44), WaitFrames(1); (2) if the item at menu+456+ctx24*2 is nonzero, UiText_DrawAt(masked-id + (s32)&Value_00000075, menu+44, 0, 0) -- a one-shot tooltip/status line, exactly mirroring 080a5614.c's use of the same Value_00000075 base; (3) a 5-iteration row loop (row 0..4, y=1,3,5,7,9): for the selected row reread the ctx24-indexed item, for the other four walk a u16* pointer seeded at menu+456+page*5*2 and advanced every iteration regardless of branch taken (matches the reference's unconditional r9+=2 at the loop bottom); each row calls Item_GetData(id & 0x1ff) and reads a 4-byte word at offset +0x14 of the returned pointer (raw byte offset, deliberately not routed through item.h's named `struct ItemDefinition` since that header's byte-accurate field at 0x14 is the 1-byte `element` -- the reference emits a genuine 32-bit `ldr`, not `ldrb`, at this site, so a word-at-+20 read is what the assembly actually proves, not a claim about a wider field name); type==4 draws an empty-slot marker (width 14), otherwise UiText_DrawAt-style Func_08015280(arg0, type+1, 27, y, style) draws an icon (style 0 for the selected row, 4 otherwise) before a width-13 marker; (4) a second, unrelated 4-iteration loop over menu+48 drawing fixed width-12/height-1/field-15 markers at y=1,3,5,7; (5) a final compatibility check: reread menu+456+ctx24*2, and if bit 0x200 is set, look up the item again and switch on its byte-2 `type` field (matches item.h's ItemDefinition.type at offset 2 exactly) with cases 1/2/3/4 each drawing one more menu+48 marker at width 12, field 14, and y=1/7/5/3 respectively (a non-monotonic case->row mapping read directly off the reference's branch targets, not inferred).","m2c's own reconstruction from the raw assembly (via the project's workbench: `compiler workbench`, run after a temporary name-only source-paths.json entry to satisfy its registration requirement, reverted afterward since this owner is not adopted) independently produced the same field offsets (ctx+8/16/24, menu+44/48/456), the same +0x14 word read after Item_GetData, and the same y=1/3/5/7 case->row mapping for the final switch, which cross-checks the hand trace above; m2c's own attempt to compile that draft failed only on missing type context for two of the switch cases sharing a merged block (a decompiler limitation, not evidence of a different shape).","Current state: differing_halfwords=227, wrong_instructions=181, candidate 512 bytes vs reference 500 (matched_prefix=7, i.e. only the fixed callee-save prologue lines up before the first divergence). The single largest driver is a whole-function register-role swap: the reference keeps `menu` in r8 and `ctx` in sl for the entire function, while every C phrasing tried here (original combined-expression field access, an explicit reused `base5 = ctx->8*5` local matching the reference's own r9-reuse of that subexpression, reordering the ctx-field-read vs menu-deref statement to lead with either one, and copying `ctx` into a fresh local before first use) makes the compiler choose the opposite assignment (`ctx`->r8, `menu`->r7) instead, with zero change in the resulting differing_halfwords/wrong_instructions count across every variant tried (227/181 in all cases but one: the base5 local alone measured slightly worse at 243/191, so it was reverted). Because r8 and sl carry the base pointers for essentially every field access in the function, this one role swap cascades into a renumbered register on nearly every subsequent instruction, which is why the --align view reports almost the entire function body as mismatched even though the control flow, field offsets, constants and call arguments were independently confirmed correct against both the raw assembly and m2c's read of it.","This is the same class of residual the two closer siblings (080a5614.c, 080a6a98.c) already documented as 'register-role choices ... coupled through the compiler's whole-function register allocation, not independently tunable' after real iteration on materially simpler owners; per Cleanroom's inversion guidance this owner was not pushed into an open-ended search on that residual. No PERM_GENERAL/PERM_INT permutation search or register hints were used (none are appropriate pre-structural-convergence, and hand-forcing register assignment is disallowed outright).","Adoption requires 0 differing_halfwords; not adopted. Recovered only from games/gs1/asm/080a93a4.s, the already-adopted games/gs1/src/render/tilemap/set_flag_rect.c (Func_080a2268 signature), games/gs1/include/item.h and types.h (Item_GetData/UiText_DrawAt/UiWindow_Commit/WaitFrames/Render_SetTilemapFlagRect naming and the item type-byte-at-+2 convention), and this project's own unadopted recon siblings (menu/select_quantity.c, equipment_menu/{start,update}_compatibility_indicators.c, 080a9598.c, 080a5614.c, 080a6a98.c, 080a602c.c). No other Golden Sun decompilation project or external symbol source was consulted."]},"main:080a9aec":{"schema_version":1,"namespace":"main","address":"0x080a9aec","status":"measured-draft","owner_bytes":168,"candidate_bytes":178,"differing_halfwords":87,"wrong_instructions":81,"classification":"item-type-badge-icon-loop","family":{"id":"template-main-080b110c","template_owner":"main:080b110c","template_source":"games/gs1/src/shop/draw_item_price.c","note":"Clustered by prologue/n-gram similarity only. draw_item_price.c is a straight-line goto-based single-price display; the real owner is a 15-entry loop over a u16 flag array, each entry tested against a 0x200 'active' bit, masked to a 9-bit item id, looked up via Func_08077018, then switched on the returned struct's byte-2 'type' field (1..4) to pick a draw style (8/56/40/24) for Func_08015080. Only the shared UI-draw-call idiom (Value_00000182 message-base convention) carried over; the control shape is unrelated to the template."},"notes":["Read the real assembly directly: outer loop counts sl from 14 down to 0 (15 iterations) over a caller-supplied `const u16 *flags` array; per entry, tests `entry & 0x200`, then `item_id = entry & 0x1ff`, calls Func_08077018(item_id) to get an item-info pointer, and switches on info[2] with case order 2, (>2: 3,4), 1 -- a decision-tree shape consistent with a plain `switch(type){case 1: case 2: case 3: case 4:}` lowering, which is what my candidate wrote.","First candidate (switch-based, pointer-walking loop over flags, matching the case bodies and Func_08015080(item_id+(s32)&Value_00000182, window, 8, style) call form) diverges immediately in the prologue: my code precomputes the 0x200 mask via `movs r2,#128; lsls r2,r2,#2` (arithmetic synthesis) where the reference loads it from the literal pool (`ldr r3,[pc,#36]`). The reference also loads the flag halfword with a plain `ldrh` while my compiled candidate produced an `ldrsh` with an indexed (register-offset) addressing mode instead of the reference's simple post-increment-style `[r7,#0]` -- suggesting my `for(i=14;i>=0;i--){ value=*entry; entry++; }` shape got strength-reduced differently than the reference's structure by this compiler.","This is a genuine source-shape gap, not yet reduced to a single respelling: the algorithm, field offsets, mask/id values, and per-type call arguments all read correctly off the assembly, but the exact loop induction-variable form (pointer-only vs index+pointer) and the small-constant materialization choice (pool load vs shift synthesis for 0x200) need at least one more structural rewrite (e.g. drop the separate `i` counter and loop purely off the pointer test, or model the counter as the primary induction variable with array-indexed access) before another measurement is worthwhile.","Adoption requires 0 differing_halfwords."]},"main:080a9c18":{"schema_version":1,"namespace":"main","address":"0x080a9c18","status":"measured-draft","owner_bytes":162,"candidate_bytes":164,"differing_halfwords":64,"wrong_instructions":70,"classification":"structural_topology","domain":"Arranges the fifteen visible inventory-category item icons by item type and prepares each existing active icon object.","expressed":["the fifteen-entry encoded-item and icon-pointer walk","the nonzero and 0x200-active-bit guards","the 0x1ff item identifier mask and ItemDefinition type lookup","the type-one through type-four Y positions and common X position","preparing every existing active icon, including unknown item types"],"residual":["The candidate is a complete typed reconstruction but remains two bytes longer than the 162-byte owner and has a different switch branch shape.","The reference keeps the loop-invariant X coordinate in call-clobbered r1 with a four-byte spill and loads the encoded item with ldrh; canonical GCC gives the named C shapes tested here either a callee-saved carrier or a signed-load-plus-zero-extension sequence.","Direct pre-call stores, function- and block-scope coordinate locals, duplicated case stores, an explicit shared-tail goto, and a structured type-range guard preserve the behavior but regress size, topology, or allocation."],"evidence":["games/gs1/asm/080a9c18.s","games/gs1/src/inventory_menu/draw_category_items.c","games/gs1/src/inventory_menu/position_category_items.c","games/gs1/include/item.h","out/gs1-en/waves/alias-review-canonical-final/packs/080a9c18/m2c/080a9c18.c"],"notes":["Recovered only from retained GS1 assembly, local callers and exact inventory-menu siblings, in-repository types, repository-generated m2c structural output, and the approved compiler.","No GS2 source, external decompilation, fixed-register variable, inline assembly, compiler barrier, or forced scheduling was used.","The retained assembly remains authoritative and this draft claims no exact-C bytes."]},"main:080a9f10":{"span_bytes":1336,"edition":{"role":"derived-candidate","edition":"en","base_owner":"080a0e0c","base_edition":"ja","rebase_status":"proved-shared-core"},"cross_edition":{"measured":"2026-08-23","object_bytes":1334,"retained_span_bytes":1336,"relocations":15,"relocation_bytes":60,"literal_fields":83,"literal_bytes":332,"core_bytes":942,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"080a0e0c","en":"080a9f10","de":"080acd8c","es":"080ae798","fr":"080ae79c","it":"080a9fa4"},"callee_correspondences":8,"core_identical":true},"score":{"measured":"2026-08-30","candidate_bytes":1336,"reference_bytes":1336,"differing_halfwords":11,"wrong_instructions":18,"class":"structural-topology","note":"The wave-1 source-shape reduction preserves the complete 1336-byte owner and leaves one localized loop-entry residual: the reference spells the zero index guard as index < target_count and schedules the first range load before it, while canonical GCC can reproduce either the guard form or the favorable allocation/scheduling, but not both together. Every later instruction, all three jump tables, calls, literals, memory operations, and both return paths agree."},"status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"shape":{"calls":15,"branches":101,"memory_ops":105,"loops":2,"jump_tables":3,"jump_table_entries":74,"symbolized_references":89},"domain":"Applies the current effect record to one target or the runtime target list, updates capped signed values or six persistent stats, handles follow-up recovery/status operations, refreshes changed targets, and stores a result code.","expressed":["complete four-argument entry, target-id 9 remapping, 0xff multi-target selection, runtime target-list walk, and changed-target cleanup walk","complete primary kind switch including scaled capped value_38 updates, randomized 0x104-0x109 stat updates, and capped value_3a updates","complete 57-way follow-up switch with active cases 1, 2, 3, 5, 56, and 57, including shared observable result-code behavior","all three reference jump tables, all literal-pool-backed runtime offsets, every call site, both return paths, and the complete owner epilogue","evidence-backed aggregate widths and offsets for the effect record, target record, runtime target list/count, and runtime result code"],"unexpressed":[{"op":"loop-entry scheduling repair","count":18,"where":"the only residual is the first target-loop guard and the independent range load scheduled across it"},{"op":"semantic field naming","count":null,"where":"offset-backed value/stat names remain deliberately neutral because local evidence establishes behavior and layout but not original identifiers"}],"verified_against_reference":["true owner extent 0x080a9f10-0x080aa448 is 1336 bytes; 0x080aa448-0x080aa56c consists of already-exact neighboring owners","workbench symbolization found 3 jump tables, 74 entries, and 89 pool/table references","relocation-aware comparison locates the JA owner at 0x080a0e0c; all 942 non-relocation, non-literal core bytes agree in every edition","the candidate is now exactly 1336 linked bytes against the 1336-byte reference","candidate-show measures 11 differing halfwords and 18 aligned wrong instructions, localized entirely to the first loop entrance","all instructions after the first loop entrance align, including three jump tables, 74 table entries, both loops, and both return paths"],"blocked_by":null,"rejected":[{"shape":"halfword unions plus a u16 working amount","result":"ARM structure-size rounding shifted later fields and repeated amount truncation grew the candidate to 1372 bytes with 610 differing halfwords"},{"shape":"move the target-id assignment before the first call","result":"reduced normalized output to 483 instructions and worsened the linked score to 575 differing halfwords at 1340 bytes"},{"shape":"fold follow-up kind 1 into one short-circuit cannot-apply guard","result":"after the access-form repair it still regressed to 1320 bytes, 581 differing halfwords, and 590 wrong instructions"},{"shape":"declare the long-lived amount carrier as u16 because the decompiler names its register value u16","result":"regressed to 1404 bytes, 614 differing halfwords, and 71.61863% structural match; the source value must remain promoted even though its table load is halfword-wide"},{"shape":"inherit 080bbb0c's -fno-cse-follow-jumps route","result":"controlled builds were byte-identical; the route is owner-specific and is not a lever for this candidate"},{"shape":"put the initial target lookup call in both arms to force the reference branch tail","result":"restored 484 candidate instructions but regressed to 1340 bytes, 566 differing halfwords, and 594 wrong instructions"},{"shape":"permute all six orders of the independent later-target, changed, and result-code zero assignments","result":"the retained later-target/changed/result-code order scored 539 differing halfwords at that stage; alternatives scored 540, 541, 549, or 551"},{"shape":"replace the remaining primary PP raw carriers with repeated field accesses","result":"removed the last two carriers but collapsed the useful allocation family to 1320 bytes, 581 differing halfwords, and 590 wrong instructions"},{"shape":"use isolated signed/raw halfword unions after the access-form repair","result":"regressed to 1328 bytes, 579 differing halfwords, and 614 wrong instructions"},{"shape":"invert the random-bucket branch to reproduce the reference fallthrough order","result":"regressed to 1336 bytes, 529 differing halfwords, and 580 wrong instructions"},{"shape":"introduce an explicit primary-kind carrier so the flag load precedes the power load","result":"regressed to 1336 bytes, 528 differing halfwords, and 578 wrong instructions for both signed and unsigned carrier types"},{"shape":"narrow individual raw-new carriers to s16 as suggested by the decompiler temporaries","result":"primary HP, follow-up HP, and follow-up PP variants respectively scored 586, 510, and 579 differing halfwords; all were rejected despite isolated wrong-instruction reductions"},{"shape":"block-scope lookup, scale, random, healing, and explicit tail carriers or change the HP fields to unsigned with signed access casts","result":"each controlled build was byte-identical to the retained candidate; the redundant source-only forms were removed"},{"shape":"retest all six initial later-target, changed, and result assignment orders after the second transfer pass","result":"the retained order remains the best linked candidate; the structurally closest alternative grows to 1336 bytes but regresses to 522 differing halfwords and 576 wrong instructions"},{"shape":"narrow later-target, changed, or result carriers independently","result":"later-target and changed widths are byte-neutral, while correcting result_code from s16 to its promoted s32 register lifetime reduces the linked residual from 487 to 474 halfwords"},{"shape":"change the two target-loop increments to ordinary increment or an explicit 0xff mask","result":"ordinary u32 increment regresses to 1324 bytes and 486 halfwords; the mask reaches 463 halfwords but regresses to 1332 bytes and 444 wrong instructions, so the byte-width cast remains the best balanced exact-length form"},{"hypothesis":"spell the first loop guard as index < runtime->target_count, matching the reference bcc and the second loop at line 300","measured":"2026-08-29","differing_halfwords":43,"baseline":11,"verdict":"regressed"},{"hypothesis":"hoist effect->range into a local before the guard and use it at every site, matching the reference ldrb [r3,#8] above the guard","measured":"2026-08-29","differing_halfwords":525,"baseline":11,"verdict":"regressed; hoisting removes the in-loop reloads and shrinks the owner to 1316 bytes"}],"notes":["2026-08-30 retained verdict: candidate-show measures exact 1336-byte extent, 11 differing halfwords, and 18 aligned wrong instructions, all localized to the first loop entrance. The ordinary-C `target_count != 0` guard is semantically identical because index is freshly zero; spelling the reference's `index < target_count` comparison fixes the branch class but regresses the allocation/scheduling residual to 43 halfwords. Combining that spelling with a named preloaded range carrier regresses to 571 halfwords; a loop-scoped refreshed carrier reaches 105; a for-loop form reaches 43. Canonical scheduler toggles, regmove, CSE, GCSE, expensive optimization, strength reduction, and rerun-CSE routes preserve or regress. With six-edition normalized cores identical and no missing behavior, this is retained as a proven compiler loop-entry floor rather than forcing allocation or scheduling.","The complete retained assembly and assembled listing were read; pools resolve Data_03001f2c and runtime offsets 0x219/0x25a, while the target list begins at 0x208.","BattleAction field names and the max_hp/max_pp/hp/pp/poison vocabulary are inherited only where exact local layouts coincide; the unresolved early BattleUnit fields remain in an owner-local view.","The retained lookup branch reduced the 564-halfword baseline to 557; the damage-class branch and indexed stat access reduced it to 539; direct raw-field access in the two follow-up cases then reduced it to 487.","Removing the primary HP raw carriers was linked-score neutral at 539 but removed two wrong instructions and enabled the later follow-up lifetime improvements; primary PP deliberately retains its carriers because removing them re-enters the 581-halfword allocation family.","Changing result_code to its promoted s32 lifetime reduced the linked residual by 13 halfwords without altering behavior; the runtime store remains halfword-wide.","Expressing target-id 9 as a zero-default exceptional remap reduced wrong instructions by eight, and independently reloading effect->range at both multi-target decisions removed another twelve wrong instructions while restoring the exact 1336-byte owner length.","The second-pass target-sequence partition measured 189 nonexact target instructions in the primary switch, 156 in the follow-up switch, 30 in the tail, and 22 in entry/selection. Correcting the runtime result destination back to its evidenced halfword width while retaining the promoted local carrier reduced the linked residual by another 35 halfwords and 12 wrong instructions.","No inline assembly, fixed-register variables, compiler barriers, copied instruction bytes, compiler changes, or nonlocal evidence were used.","This is a measured draft only; retained reference assembly remains authoritative."]},"main:080aa56c":{"schema_version":1,"namespace":"main","address":"0x080aa56c","status":"measured-draft","owner_bytes":508,"candidate_bytes":440,"differing_halfwords":253,"wrong_instructions":174,"classification":"shop-scene-open-sequence","domain":"A largely linear scene/sub-mode setup sequence (allocates a context via Func_080048b0, temporarily forces a global mode byte to 2 while running several small init calls, resolves a status code from a short Func_080770c0 chain, draws a message/status window, then a matching linear teardown that restores the mode byte and returns).","notes":["Clustered against the byte-exact Shop_SelectPartyMember template by the family scan on raw n-gram/branch similarity, but the retained assembly is almost entirely straight-line setup/teardown code with only one small 4-way status chain (via three Func_080770c0(id) checks) -- it does not share the template's redraw/input-poll loop shape at all. This is the clearest case among this batch of a family-transplant lead that does not hold up structurally; the template was useful only for compiler-idiom orientation (constant folding via movs+lsls, the ADDR-pointer-dereference pattern), not for its control flow.","Recovered call sequence and a handful of confirmed literal-pool offsets: a context pointer from Func_080048b0(55, 0xa70) used as the base for most later field writes (offset 388/0x184 to store a second context from Func_08004970, offsets 28/29/372/374/376/0x148 written during teardown-prep), a global mode byte at (0x03001e68 + 0x20c) saved before the call sequence and restored at the very end via the caller-visible r9 register, a pointer stored at address 0x02000240 whose halfword at +4 is set to a small status value (1 by default, overwritten by the branch chain) on entry and cleared on exit, and three status codes (14/27/28) selected by nested Func_080770c0 checks against ids that resolve to small integers rather than shop-relative offsets (0x2130/0x212c/0x2128 in the retained literal pool).","This session resolved two concrete, verified respellings: (1) the context variable from Func_080048b0 is not consumed until several statements after the call (the mode-save and the *(ptr+4)=status write happen first in the reference, sourced from unrelated registers, before the compiler finally copies r0 into the persistent r7); matching that statement order in this draft was necessary to get the opening sequence's shape close at all. (2) the *(ptr+4) store uses the same register that separately holds a local 'status' variable already initialized to 1, not a fresh literal -- the reference's 'mov r2,sl' / 'mov r3,sl' pattern only makes sense if the source declares and initializes 'status = 1' once and reads it back rather than re-materializing the literal on each branch.","This owner has the most unresolved literal-pool arithmetic of the six assigned: two pool addresses used as an offset pair added to the Func_08004970 return value (guessed here as +0 and +0x60, unverified), the exact field offsets touched during the drawn-out teardown block (0x148/372/374/376/28/29 on the ctx base, unverified against real pool values), and the two Func_080072f8 destination/size arguments near the end (VRAM-shaped constants 0x06004000/0x000020a8/0x05000080 whose pairing this draft guessed). The 68-byte length gap (440 candidate vs 508 reference) indicates real missing or misshapen statements beyond a few wrong constants, most likely in this teardown block.","Given the volume of genuinely unresolved literal-pool values here, this is better described as an incomplete source-shape recovery than a compiler-internals residual: the next productive step is resolving the pool constants properly (assembling/disassembling the reference per CONTRIBUTING.md's guidance) rather than further guessing, so this is flagged as worth a dedicated follow-up pass rather than permuter search.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080aae14":{"schema_version":1,"namespace":"main","address":"0x080aae14","status":"measured-draft","owner_bytes":324,"candidate_bytes":324,"differing_halfwords":113,"wrong_instructions":122,"classification":"owner-action-slot-diff-merge","domain":"Compares two 32-entry OwnerActionSlot arrays (struct OwnerActionSlot { u16 encoded_action; u16 unknown_02; }, the same action_slots vocabulary owner/action/add.c and include/owner_state.h already use at offset 0x58 of struct OwnerActionState). For every non-zero entry of the second array (b) it writes the masked key (& 0x3fff) into an output u16 array and, if that key is not found anywhere in the first array (a, scanned up to 32 entries), ORs in flag 0x8000 and counts it. It then does the mirror pass over a against b, appending (key & 0x3fff) | 0x4000 for every a-entry not found in b. Returns the total entries written; *lost_count gets the 0x8000 count, *(stack arg 5) gets the 0x4000 count. This is a leaf function (no bl instructions) so it has no callees to corroborate via shared call targets.","notes":["The family-matcher's best guess (games/gs1/src/ui/window/clear_tile_attributes_in_rect.c, 7482/10000, below this project's 7500 threshold) was checked directly and is a shape-only match: same register-shuffle prologue as many UI-window owners in this address neighborhood, but its actual body (a nested row/column tile-rect clear using masks 0x3FF/0xFC) shares no callee, field offset, or constant with this owner. Rejected as unrelated, per this session's brief that above-threshold matches in this cluster were majority false positives for the same reason.","Real evidence instead came from hand-tracing games/gs1/asm/080aae14.s (no callees; parameters recovered purely from register roles) plus a grep for the mask constant 0x3fff across games/gs1/src: games/gs1/src/owner/action/add.c (OwnerAction_Add, Func_08078e28) declares the exact same 4-byte-stride record ({u16 value; u16 padding;}, masked with 0x3fff) at owner-state offset 0x58, and games/gs1/include/owner_state.h already promotes that vocabulary to struct OwnerActionSlot/struct OwnerActionState with LAYOUT_OFFSET_GUARD-verified offsets. All three real callers (games/gs1/asm/080ad6d4.s, 080acab8.s, 080ae2f4.s -- none yet adopted) pass pointers of the form ownerBase+88 (0x58) for the first two arguments, confirming both pointer parameters are struct OwnerActionSlot* views into two different (or, in one 080ae2f4.s call site, the same) owners' action_slots. m2c's independent decompilation of the retained assembly against the real agscc type context (out/workbench/080aae14/m2c/080aae14.c) reproduced the same two-loop, same-mask, same-flag-bit shape from the raw instructions alone, corroborating the hand trace.","The neighboring already-registered owner main:080ae9f0 (UiIcon_DrawVariantWithTileOffset, icon/marker drawing) is called from the same caller as this owner (games/gs1/asm/080acab8.s) but is semantically unrelated to the action-slot diff itself; it is only useful as evidence that this caller's scene mixes icon drawing with an action-list comparison, consistent with a class-change/ability-list preview screen. No stronger name for the screen itself is claimed.","Iterated the source shape extensively against tools/compiler/target/release/compiler candidate-show --align: the initial index-only draft scored differing_halfwords=154/wrong_instructions=192. Replacing the two 32-entry linear searches with an explicit pointer walk (struct OwnerActionSlot *p; do { cnt++; if (cnt>31) break; p++; } while (masked-xor != 0);) -- matching the reference's genuine incrementing-pointer inner loops instead of index*4 addressing -- was the single largest improvement, to differing_halfwords=113/wrong_instructions=122 (candidate_bytes=324, exactly matching owner_bytes=324; candidate_insns=149 == reference_insns=149 per --asm). The final structural workbench report (out/workbench/080aae14/structural.json) scores this 91.79% match_percent: 85/160 instructions byte-identical, and only 8 true insertions/deletions/opcode/replacement differences -- the rest (65) are argument-only (register-number) mismatches.","The remaining 8 structural instructions cluster in two places, both downstream of one register-allocation choice: the reference keeps the second parameter (b) resident in r8 for the whole function (mov r8,r1 as the very first body instruction) and reuses that same r0/r8 pair as a single raw pointer for both loop1's per-entry loads and its 32-entry bound test (mov r3,r8; adds r3,#124; cmp r0,r3). This draft's compiled output instead lands b in r9, promotes a transient copy of the out-pointer into r8 inside loop1, and expresses loop1's bound test as an index compare (movs r4,#1; add r8,r4 as a counter; cmp r2,#31) rather than the reference's pointer-vs-base+124 compare -- a second, coupled residual. Tried and rejected: an explicit `struct OwnerActionSlot *bp = b` alias (no change -- compiler already treats it identically to the parameter); reordering the lost++/flag-OR statement pair to match the reference's exact instruction order (no change -- already schedules identically); splitting the single shared `i` loop counter into distinct `i`/`j` per loop (differing_halfwords improved to 98 and wrong_instructions to 117, but the candidate shrank to 318 bytes -- gained/lost migrated out of their stack slots into extra registers, changing the frame from `sub sp,#12` to `sub sp,#8` and losing matched_prefix; rejected as a worse structural match despite the lower raw diff count, restored the shared-index draft); converting loop1's outer walk to a fully pointer-based `do { ...; bp++; } while ((u8*)bp <= (u8*)b+124 && ...)` to mirror the reference's unified pointer directly (regressed to differing_halfwords=131/wrong_instructions=176 and dropped matched_prefix to 7 -- rejected, restored the index-based draft). No PERM_GENERAL/PERM_INT permutation, register hint, inline asm, or compiler-flag change was used; the residual is treated as a register-allocation-sensitive gap under CONTRIBUTING's 'invert a stalled last mile' guidance, not yet resolved by source respelling alone.","Not adopted (differing_halfwords=113, not zero). Kept as the closest measured draft. No cross-edition comparison was performed this session."]},"main:080ab21c":{"family":"template-main-08021a18","template_owner":"main:08021a18","template_source":"games/gs1/src/graphics/tile/expand_vram_tiles_by_color_table.c","candidate_path":"games/gs1/recon/en/main/080ab21c.c","reference_bytes":208,"best_candidate_bytes":204,"best_differing_halfwords":95,"best_wrong_instructions":56,"status":"measured-draft","notes":["Clustered template (graphics_owner_13.c) does not match; this is a near-twin of main:08022768 (same Data_03001e8c tilemap base, same 30x20 clamp logic, same base[RENDER_DIRTY_OFS] |= 2<<(y>>2) row-dirty mark), read directly from games/gs1/asm/080ab21c.s. Two confirmed behavioral differences from 08022768: (1) flag = alt<<12 here (a full nibble value placed at bit 12, not `(alt&1)<<12`), with mask 0xffff0fff (clears a 4-bit field, not 1 bit); (2) each tile is only touched if its existing top nibble (bits12-15) is exactly 0xf (`if (((tile>>12)&0xf)==15)`) -- 08022768 has no such guard and touches every tile in the rect unconditionally.","Params (x,y,width,height,alt) and the clamp logic are structurally identical to 08022768's clamp code and matched close to exactly on first try (matched_prefix=9 immediately). Iterated 3 respellings on the tile-update body: splitting `tile = (tile & 0xffff0fff) | flag;` into two separate statements (`tile &= 0xffff0fff; tile |= flag;`) fixed an AND-destination-register swap (mask-accumulates-into-tile vs tile-accumulates-into-mask) and dropped wrong_instructions 68->58; casting the row-dirty shift to `(u32)y >> 2` (logical shift) instead of a bare signed `y >> 2` (which compiled to an arithmetic shift, asrs, vs the reference's logical lsrs) dropped it further to 56.","Residual gap, same as 08022768: the initial row/col byte offset (`y*64 + x*2`) compiles to a GCD-factored form (single combined shift after adding the terms) regardless of written order, while the reference computes two independent shifts (y<<6, x<<1) then adds. This is the identical residual documented in 08022768's dossier and is very likely the same compiler-internal expression-canonicalization behavior, not something source respelling here can reach either.","Remaining diffs beyond that are register-number swaps in the loop-setup and mask/threshold-constant loading (lr/ip/r6/r3 assignment order) that track the offset-expression residual rather than being independent issues.","Not adopted; kept as the closest measured draft. See main:08022768's dossier for the shared offset-expression finding."]},"main:080ab314":{"schema_version":1,"namespace":"main","address":"0x080ab314","status":"proven-retained","classification":"ui_selector_compiler_allocation_module","owner_bytes":720,"score":{"measured":"2026-08-27","candidate_bytes":724,"reference_bytes":720,"differing_halfwords":331,"wrong_instructions":190,"class":"wrong","note":"Structurally the candidate now matches the reference at essentially every level that source shape controls: identical control flow (a two-level loop -- an outer redraw/highlight-swap loop wrapping an inner per-frame input-poll loop with the same five-way if/else-if input dispatch), identical field offsets (0x10, 0x30, 0x10C on the Data_03001f2c cell; 0x12B6, 0x12F8, 0xEA6 on the Data_03001e8c cell), identical bit masks (0x90/0x60 on Data_03001b04, 1/6/8 on Data_03001c94), identical call targets and argument counts throughout, and identical constants (0xC30-0xC39 message ids, 7-item wraparound, the 0x080a19a1 callback re-registration). Diffing the full instruction stream turns up zero opcode or immediate-value mismatches -- every '!' line pairs the same mnemonic against itself with only register numbers (or a pool-offset-driven branch target) differing. The entire remaining gap is one class of residual: this compiler assigns 'list' (the first Func_08015010 return) to r7 and 'sel' (the selection index) to r6 for the candidate, where the reference assigns list=r6/sel=r7; a second, related swap gives the reference's late Data_03001e8c-address cache r5 where the candidate's gets r8. Both were reproduced identically across roughly two dozen independent source-shape variations (see rejected_experiments)."},"family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"The family-matcher's score (8585/10000) reflects only a generic register-shuffle-prologue/redraw-loop/if-chain shape match, not real kinship: this owner shares zero callees with Func_080b362c (no UiWindow_CreateFar/Ability_GetAvailability/Func_080772a8/UiWork_Create), and this owner's own assembly proves it reads the same Data_03001f2c/Data_03001e8c polymorphic cells consumed elsewhere by games/gs1/src/menu/select_quantity.c (same Func_08015010 5-arg s32-returning window-create call, same Func_080a19a0 periodic-callback re-registration via Func_080041d8, and the same *(s32*)(cell+16) field read in that file's own exit tail) -- a different, lower-level 'menu' UI kernel (0x08015xxx call range) than select_use_item.c's higher shop-specific wrappers. This owner's own field 0x10C (message_window) and field 0x10 (used identically to select_quantity.c's exit-tail Func_08015270(*(s32*)(menu+16))) also match struct CharacterSelectorState/PsynergyMenuState's named fields at those exact offsets in games/gs1/src/menu/open_character_selector.c and games/gs1/include/psynergy_menu.h, but nothing in this owner's own assembly (field 0x30's role, the 7-item spinner shape) confirms which specific mode is active, so the source keeps raw offset macros rather than importing one of those named structs."},"rejected_experiments":["Declaration-order permutations for list/sel/win_a/win_b/state/work/prev_sel/result (all pairwise orderings tried, including moving 'sel = 0' before vs after the three Func_08015010 calls, and moving 'list' to be the first-declared local of the function): stack-slot offsets for the six spilled locals (state/work/result/prev_sel/win_a/win_b) DO track declaration order directly -- getting win_a/win_b declared before state/work/result/prev_sel fixed all six stack offsets to match the reference exactly (this is retained) -- but no ordering of the two register-resident locals (list, sel) ever changed which of r6/r7 each received; the pair stayed r7=list/r6=sel throughout.","Splitting the do-while loop's 's32 i' into its own nested block vs a function-top-level declaration, and switching the outer loop between 'for(;;){...;if(result!=0)break;}' and 'do{...}while(result==0)': byte-identical output either way (both compile to the same test-at-bottom shape); kept the do-while form as marginally clearer.","Removing the '(void*)' cast on list at the two Func_080ab1f4 call sites, and declaring list as 'u8 *' instead of 's32' throughout (with a matching cast on its Func_08015010 assignment): no effect on the r6/r7 choice in either direction; reverted to 's32 list' to match select_quantity.c's own Func_08015010 s32-return precedent.","Reordering the commutative 'i + 0xC32' to '0xC32 + i' in the init loop's Func_08015080 call, and writing the second window-instruction message id as the literal '0xC31' vs the explicit 'the first constant plus one' ('0xC30 + 1'): both are folded identically by the compiler at parse time; no codegen change either way.","Introducing an explicit named local for the state->0x10C field ADDRESS (not value) instead of three separate M2C_FIELD(state,s32,0x10C) macro expansions: byte-identical output; the compiler already CSEs the repeated macro expansion into one address computation reused across the three call sites regardless, it just keeps choosing r5 for that computation where the reference chooses r6.","Rewriting every Data_03001e8c reference (not just the derived one at function entry) through the same '*(u8**)((u8*)&Data_03001f2c-0xA0)' address-of-arithmetic form used to fix the entry-point subs derivation (see the accepted fix below), including via a shared 'u8 **cell = (u8**)&Data_03001f2c' local reused for both state and work: no change to the late-function Data_03001e8c address-cache register (still r8 in the candidate vs r5 in the reference) in any form tried.","Accepted fix (kept, not rejected): expressing the function-entry reads as 'state = *(u8**)&Data_03001f2c;' followed by 'work = *(u8**)((u8*)&Data_03001f2c - 0xA0);' -- i.e. deriving Data_03001e8c's address arithmetically from Data_03001f2c's already-taken address, rather than reading the two globals independently -- reproduced the reference's 'subs r3,#160' exactly (previously a redundant second literal-pool load), dropping candidate_bytes 732->724 and wrong_instructions 206->190. This is the compiler recognizing the two fixed-address symbols as compile-time-foldable constants once their addresses are taken explicitly through '&', which a plain independent 'Data_03001e8c' global read does not trigger.","Accepted fix (kept, not rejected): splitting every 'sel = Func_080aa538(sel +/- 1, 7)' call into its own in-place 'sel += 1;'/'sel -= 1;' statement followed by 'sel = Func_080aa538(sel, 7);' -- matching the exact idiom documented in games/gs1/src/shop/select_use_item.c's own header comment for this same compiler -- reproduced the reference's in-place adds/subs-before-call instruction shape at all three call sites (previously the candidate folded the +/-1 into the call argument directly, a non-matching instruction order); this is a genuine structural correctness fix, independent of the register-swap residual, that further reduced wrong_instructions."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080ab314.s), the approved local EN ROM, the m2c-assisted family-transplant workbench (out/family-transplants/main-080ab314/), games/gs1/src/shop/select_use_item.c, games/gs1/src/menu/select_quantity.c, games/gs1/src/menu/open_character_selector.c, games/gs1/src/menu/draw_at_window_offset.c and .../graphics/graphics_owner_1.c (the two local callees Func_080ab1f4/Func_080ab2ec, already exact and adopted), games/gs1/src/runtime/scheduler/callback_scheduler.c, games/gs1/src/menu/update_entry_object_transforms.c (Func_080a19a0, the re-registered periodic callback), games/gs1/include/global_cells.h, games/gs1/include/psynergy_menu.h, games/gs1/include/inventory_menu.h, and the approved compiler. No GS2 source, other Golden Sun decompilation project, or symbol map was inspected.","2026-08-31 retained-assembly proof: the complete candidate has equal branch topology and every functional opcode, immediate, call, argument, literal, field offset, and memory operation matches. The residual is confined to GCC assigning list/selection and the late Data_03001e8c address cache to different callee-saved registers, plus the resulting four-byte pool extent. Roughly two dozen declaration, initialization, scope, loop, pointer, expression, and identity probes preserve the allocation or regress. The allocator decoder's proposed split_lifetime(i) operation is mechanically inapplicable because this owner's i is a scalar loop counter while the guarded operation requires a nonvolatile pointer, so no unsafe mutation was attempted. Relocation-normalized cross-edition verification proves all 508 core bytes identical across all six GS1 editions (42 relocations and 11 literal fields normalized). Structured assembly therefore remains authoritative under ui_selector_compiler_allocation_module.","This candidate claims zero DONE bytes; games/gs1/asm/080ab314.s remains authoritative.","Semantic summary: a 7-item spinner-list selector reusing the same Data_03001f2c 'active menu' and Data_03001e8c 'UI text work' polymorphic cells as games/gs1/src/menu/select_quantity.c, but driving the shared low-level Func_08015xxx window/list kernel directly rather than through select_use_item.c's shop-specific wrappers. It draws two static instruction lines and a bordered box via the two already-adopted local helpers (Func_080ab1f4/Func_080ab2ec), builds a 7-entry text list (message ids 0xC32-0xC38), then loops: redraw the highlighted entry, poll input every frame for up/R (bits 0x90) or down/L (bits 0x60) to cycle the 7-item selection via Func_080aa538(value,7), B (Data_03001c94 bits 6 or 8) to cancel with result -1/-2, or A (bit 1) to confirm through a Func_08015048() validity gate before exiting with result 0/-1 style codes, clearing a per-slot list entry each pass, and finally re-registering the Func_080a19a0 periodic object-motion callback (also confirmed shared with select_quantity.c) before returning.","The two local callees this owner calls (Func_080ab1f4, Func_080ab2ec) are themselves not yet exact -- see games/gs1/recon/en/dossiers.json#main:080ab21c for the third, Func_080ab21c, which both of those wrap and which remains a measured draft with its own documented residual (a GCD-factored offset expression). This owner's own score is independent of and does not depend on those being exact first, since all three are already the approved compiler's real emitted shape for this owner's call sites regardless of their own adoption status.","Field offsets 0x10 and 0x10C on the Data_03001f2c cell coincide exactly with struct CharacterSelectorState.selector_window (0x10C, games/gs1/src/menu/open_character_selector.c) and the analogous plain-s32 field read at select_quantity.c's own offset 16, and struct PsynergyMenuState also names both 0x10 (auxiliary_window) and 0x10C (message_window, games/gs1/include/psynergy_menu.h) -- suggestive but not owner-proven kinship, kept as an evidence note rather than an import, per Cleanroom's 'names no more specific than the evidence' rule."]},"main:080ab5e4":{"status":"proven-retained","classification":"intra_function_call_module","span_bytes":4888,"edition":{"role":"derived-candidate","edition":"en","base_owner":"main:0x080a24e0","base_edition":"ja","rebase_status":"required","evidence":"entry correspondence established by the cross-edition ROM scan; the JA owner changes length and source structure, so this EN candidate must be derived from JA rather than copied into the base corpus"},"score":{"candidate_bytes":4804,"reference_bytes":4888,"differing_halfwords":2293,"wrong_instructions":1671,"class":"wrong","normalized_insn_diff":"objdiff 68.53684%; 1093 unchanged, 690 argument mismatches, 17 opcode mismatches, 65 replacements, 330 deletions, 285 insertions","bl_sequence":"184 ours / 184 reference -- EXACT","frame":"sub sp, #108 on both sides -- EXACT (was 92 vs 108 at session start)","note":"invariant-first candidate: exact 108-byte frame, arg0 at sp+80, ctx at sp+76, slotFlags at sp+84, status at sp+100, and 20-instruction exact prefix; still 84 bytes short and not exact"},"shape":{"calls":186,"loops":20,"memory_ops":3,"jump_table_pool_targets":true},"domain":"Colosso tournament handler: texts 0x2128/0x212c (finals gating), 0xbbe (recovering), 0x219 (Warrior's Helm); IWRAM 0x03001c94/0x03001af8; reads Data_02000240","expressed":["complete entry paths for both arg0 values, local initialization, persistent tournament fields, and competitor-status array construction","the 28-case mov-pc dispatch at +0x71c: state = *(seq+0x212c) (skip when 0), tick counter (seq+0x2128)++ each entry, jump table at +0x74c, eight empty slots sharing the after-switch address","all switch interiors, shared tails, dialog sequences, timing gates, and progression updates","complete post-dispatch input, recovery, reward, redraw, and final persistent-store paths through the owner return","the evidence-backed function signature s32 Func_080ab5e4(s32 arg0), replacing the former void(void) scaffold","slotFlags and status are members of one 24-byte local work buffer: slotFlags[8] at sp+84, an evidence-visible unknown 8-byte middle region at sp+92, and status[8] at sp+100. This naturally emits the exact 108-byte frame and both array addresses without fake scalar pressure. The reference clears status as a byte walk from &status[7] down to &status[0] (strb/subs/cmp/bge) and keeps a pointer local to &status[0]","the packed tournament value's div and mod results are both zero-extended to u16 (the reference lsls/lsrs #16 pair after each of Func_08002304 and Func_080022f4)","all seven dialog-wait sites are rotated while loops -- while (Func_08015048() == 0) Func_080030f8(1); -- so the frame pump is emitted BEFORE the poll, as the reference's b-to-test/body/test layout shows. m2c's top-tested goto loop emitted them in the opposite order; this one family closed 14 of the 26 bl-sequence hunks","the arg0 dispatch arms are ordered == 0 first: the reference emits the tournament-status body (sp24/sp20 dialog pair plus its bitfield block) as the fallthrough of the arg0 test and branches away for the nonzero case. m2c's != 0 first ordering put the wrong block at .L24","the first 0x10C window-handle call reads the field directly; only the second call computes and retains its address for the remaining uses. EN and JA both emit this two-stage lifetime. Hoisting the pointer from the first call invented a long-lived sp+84 scalar and displaced both local arrays","the three block_159 selector paths (case 27, case 1/3/7/8/21 nonzero arm, case 17/19) share the same two-statement tail (store the selector to +0x212C; var_r4_907 = sp8). Inlined at each site instead of a shared label+goto so crossjump can form the reference's share point locally; the shared-label form kept a live var_r3_1107 across all three call sites that the reference does not carry","sp54 was m2c's scalar mistyping of a second byte buffer (M2C_UNK=s32, matching the same array-truncation pattern already fixed for the status array): the reference's Func_080ae714(&buf, count) fills a buffer at sp+84 that is later read with 'ldrb r3,[r5,r7]' (byte-indexed by the loop counter), proving 1-byte element stride. The old '*(&sp54 + sp44)' spelling did pointer arithmetic in 4-byte (s32) units instead -- a real correctness bug, now fixed as 'u8 buf54[8]; ... buf54[sp44]'. Score-neutral (979, 6 bytes shuffled but same normalized weight) but adopted on evidence: matches the reference's actual instruction shape and removes a latent out-of-bounds/wrong-stride read for any sp44 > 0","var_sl_1853's inner-loop advance is +1 (one u16 element), not +2: reference emits 'movs r3,#2; add sl,r3' -- a literal 2-BYTE raw register add, which for a u16-aligned pointer is exactly one element. The old '+= 2' spelling (2 ELEMENTS = 4 bytes in C pointer arithmetic) silently walked half as many entries per apparent outer-loop iteration bound. Fixed to '+= 1'. Score-neutral (979) but a genuine, byte-proven correctness fix -- found by the same method as the sp54 buffer bug: re-reading a loop's raw pointer-advance instruction against its C-level increment instead of trusting m2c's literal transcription","the frame is now size-exact (sub sp,#108) and the bl sequence is count-exact (184/184); both were off at the start of this session","the seven dialog-wait sites are PLAIN while loops in source -- while (Func_08015048()==0) Func_080030f8(1); -- GCC performs the rotation itself. Hand-writing the rotated form if(c){do{b}while(c);} duplicates the poll call (14 sites vs the reference's 7, total bl 190 vs 184) and pads size toward parity with instructions the reference does not contain. Tried and reverted (7a8d2a54a, dd575d756); do not redo it","ctx+0x1C, the local status[] array, and the events+0xA0 per-slot array are all read SIGNED (reference ldrsb at asm 116/136/157/175/244/1698/1789/1899); events+0xA0 was the one still unsigned here and is now fixed"],"unexpressed":[{"op":"store deficit","count":29,"where":"instruction histogram over differing regions: ours 89 str vs reference 118. Candidate addresses 23 distinct stack slots (0..88) against the reference's 21 (0..80) at the SAME 108-byte frame -- the reference reserves sp+84..91 for slotFlags[8] (add r5,sp,#84) and sp+100..107 for status[8], keeping scalars inside 0..80. Two extra scalar slots here are spilling where the reference does not. This is the main remaining lever"},{"op":"crossjump merge (corrected)","count":"~150 instructions","where":"CORRECTION to the prior note in this file: loop_36 IS the right target for the 'sp48 = 1; goto loop_36;' sites -- draft line ~247 (Func_08015270(win10C); field5=1; sp18=sp38*8; loop_36: temp_r7_312=sp48; if(temp_r7_312==0){}else{switch...}) maps DIRECTLY onto asm .L99 (ldr r7,[sp,#72]; cmp r7,#0; bne .L18; b .L19). The reference's 'bl .L99' at the dialog-exit sites is GCC's own crossjump decision to share that landing test as a bl-callable block, not a different C-level control-flow shape. Our build isn't getting the same crossjump merge, which is a global-coloring/register-pressure question (the sched2-LUID-tie class documented on 080bbb0c), not a source-shape bug -- do not 'fix' the goto target again without re-deriving this from scratch"},{"op":"store deficit","count":43,"where":"instruction-mix histogram: ours 104 str vs reference 147. Frame is 88 bytes/18 addressed slots against the reference's 108/21, so the reference keeps roughly three to five more values in memory across calls. These are spills that follow from source shape -- more distinct live locals than m2c's collapsed temporaries -- not from missing statements (strb/strh already match)"},{"op":"byte-load signedness","count":"5-7","where":"reference ldrsb 13 / ldrb 38; ours ldrsb 8 / ldrb 45. The status array is read SIGNED (ldr the pointer, ldr the index, ldrsb, cmp #4), so the m2c (u8) casts on sp1C[...] at the mask sites are candidates for removal; check each against its reference site before changing"},{"op":"aggregate recovery","count":"whole owner","where":"raw M2C_FIELD offsets still need evidence-backed structs and field names; 0x30 (19 uses) and 0x219 (19 uses) are the remaining hot fields, direct-immediate and pool-indexed respectively"},{"op":"symbol recovery","count":"whole owner","where":"m2c temporaries and Func_* callees remain provisional"}],"rejected":[{"shape":"one struct containing every scalar and both arrays from sp+24 through sp+107","wrong":"GCC retained a struct-base pointer, grew the frame to 120 bytes, reduced the exact prefix from 20 to 7 instructions, and regressed to 2334 wrong instructions. The 24-byte array aggregate is admitted; the surrounding scalar slots must continue to arise from their real lifetimes."},{"experiment":"heat-guided classic AST walk","candidates":10000,"result":"no exact candidate; 155 compile failures; best retained source is deliberately UNVERIFIED because classic mutations are not guaranteed semantics-preserving"},{"experiment":"heat-guided safe AST walk","candidates":10000,"result":"journal composite improved from 1033216102394 to 880199202393, but independent candidate-show scoring worsened from 2324 to 2339 differing halfwords and changed candidate size from 4748 to 4780 bytes; not harvested"},{"experiment":"guarded safe AST walk, 100k candidates, seed 1 (out/colosso-r1)","wrong":"best.c scores raw halfwords=2353/wrong_instructions=1884/size=4740 (all 'improved' vs the committed draft's 2401/2003/4728), but the normalized instruction diff (same POOL-filtered LCS metric used throughout this owner's record) is WORSE: weight 1062 vs the committed draft's 979. This is the documented raw-metrics-mislead-while-short-of-parity trap (same class as 080bbb0c's phase-dominated halfword counts) -- the permuter's own packed score optimizes raw diff counts, not the normalized compass, and found a structurally worse candidate that looks better on the naive metric. NOT adopted."},{"experiment":"classic-mode permuter walk, 100k candidates, seed 2, journal-imported from r1 (out/colosso-r2)","wrong":"best-UNVERIFIED.c reaches 4788/4888 bytes (closest size yet) at 2389hw/1901 wrong instructions, but normalized weight is 1017, still worse than the committed draft's 979 -- confirms the same raw-metrics-mislead pattern found in r1, independently. Also UNVERIFIED by construction (classic-mode mutations are not guaranteed semantics-preserving); not auditable by hand at ~150 chained mutations. Not adopted."},{"shape":"hoist all 14 (sp18 - sp38) occurrences to one shared 'slot' local, recomputed at both sp18-reassignment points (semantically verified safe: every read precedes any subsequent sp38 mutation on its own path)","wrong":"normalized weight 994 vs the committed draft's 979 -- a real regression, not a tie. Traced via -fno-gcse diagnostic: field-load counts (ldrb, [r,#48]) are IDENTICAL between standard and -fno-gcse builds, ruling out simple field-read folding as the mechanism. RTL evidence (080ab5e4.c.07.gcse dump) shows gcse's PRE pass adds ~29 insns (11 new pseudos, 1137-1147) rather than removing redundancy -- pseudo 1139 = reg40-reg48 (one definition, insn 5484) is a PARTIAL, PATH-SPECIFIC hoist, not a whole-function CSE the way a single shared C local reproduces. A blunt full hoist overshoots what GCSE actually does and makes the match worse."},{"shape":"narrower (sp18-sp38) hoist scopes: 9-site cluster only (lines ~306-376), and separate per-if/else-pair locals (slotA/slotB for the two nearest branch pairs)","wrong":"narrow-9: weight 981 (still worse than 979, though close). paired if/else: weight 1108 (much worse). Neither reproduces the -fno-gcse gain; four total hoisting scopes tried (full-14, narrow-9, paired-if/else, and the original full hoist) all tie or regress. This suggests pseudo 1139 (reg40-reg48, the one PRE insertion I traced) is NOT the primary driver of the 56-row -fno-gcse improvement -- gcse creates 11 new pseudos total (1137-1147) across the whole function, and the real gain is likely a distributed, multi-site interaction (or downstream scheduling shift) that cannot be isolated to one C expression. -fno-gcse is retired as a source-reproducible lever for this session; it remains a valid DIAGNOSTIC signal only (and using the flag itself is not permitted for adoption -- the approved compiler flags are fixed)."},{"shape":"declaration-order reshuffling (first-use order, reverse first-use, last-use order, reverse last-use -- 4 variants covering the whole declaration block, 122 locals)","wrong":"all four tie EXACTLY at weight 979 (identical to the committed draft's own arbitrary m2c declaration order). One variant (first-use order) improved wrong_instructions to 1979 (from 2003) while leaving the normalized weight unchanged -- another confirmation that wrong_instructions is not a safe compass this far from parity. Unlike 080bbb0c (where declaration order in reference-spill order was a real, documented factor), this build's register allocator is insensitive to source declaration order entirely -- ruled out as a lever for this owner."},{"experiment":"hand-written rotated wait loops","result":"duplicated Func_08015048 at all 7 sites; bl 190 vs 184. Size looked better (4800->4840) but by padding. Reverted"},{"experiment":"removing the 48 pure single-use address-capture new_varN locals","result":"4880->4872 bytes and wrong_instructions 1859->1895; they are load-bearing for register pressure despite carrying no meaning. Keep them"},{"experiment":"declaration reordering to fix stack-slot assignment","result":"no effect; GCC assigns slots by liveness here, not declaration order"},{"experiment":"split-assignment, commutative swap, redundant mask, comparison-operand flip","result":"all zero-effect; GCC canonicalizes pure expression-spelling changes. Only genuine statement reordering moves this owner"},{"experiment":"statement reordering sweep","candidates":50,"result":"5 adopted wins (d21020a53, 08c7fbd2f, cb7f83ae7, 2dfa17a86 and the entry-order fix cb4e9e9a8); saturated afterwards. Independent adjacent statements only -- the correct order is per-site, not a general rule"}],"notes":["Cross-edition scan locates the JA counterpart at 0x080a24e0 (the generic anchor vote initially reported 0x080a24d0 because this region changes length). JA and EN share the entry frame, stack-slot order, first loops, and compiler shape, but differ by roughly 1,249 non-relocation bytes across the EN-sized window; JA is structural ancestry evidence, not a copyable implementation.","The invariant-first pass removed two false live ranges introduced by the automated candidate: windowPtr was hoisted one call too early, and new_var5 was assigned only on one branch then read uninitialized on its sibling. Splitting the pointer lifetime and using sp38 directly removed the two extra scalar slots. Grouping slotFlags[8], unknown[8], and status[8] then restored the exact 108-byte frame and observed array addresses. Removing five one-use address-capture aliases extended the exact prefix from 9 to 20 instructions and reduced wrong instructions from 1857 to 1671. No permuter was used.","value-vs-use-site caution: 0x212c/0x2128 decode as the finals texts but are struct offsets here; 0xc4c/0xc4d are genuinely text ids at their push sites. Resolve by use, not by value.","m2c 19f2ddb reconstructed the complete owner after symbolizing one 28-entry jump table and 110 pool/table references. The default symbolic assembly reassembles byte-identically to the reference (SHA-256 d68f1ce2d575bfa118d30df90603a97e2b95596b9ec1ef143ff55e1e594d91d5).","The generated source was repaired only for agscc's recovered field widths and pointer types; no inline assembly, fixed-register variables, copied bytes, or compiler changes were used.","Compared with the former 1492-byte scaffold, the full candidate reaches exact 4748-byte size, improves the linked score from 2438 to 2324 differing halfwords, and improves objdiff v3.8.0 ARMv4T structural similarity from 22.23341% to 58.86819%. It remains a draft, not progress.","Two native permuter waves (20,000 requested candidates total, 12 workers, seeds 20260820/20260821) confirmed this is not a last-mile owner. The safe winner reduced normalized structural rows but worsened the independent byte score and rewrote 1,656 source lines. Repair aggregate types and source shape before another permutation run. Ignored reports remain under out/permuter/080ab5e4-r{1,2}.","session method note: while the candidate is short of 4888 bytes, raw differing_halfwords and wrong_instructions are phase-dominated and mislead (the 0x10C pointer local improved structure sharply while raising raw halfwords). The working compasses are the normalized instruction diff and the bl-sequence alignment; adopt only on linked bytes once size parity is reached","the switch case order (27,26,0,1/3/7/8/21,2,5/6,12,13/15/16,14,17/19,20,23) already matches the reference emission order because m2c derived it from the jump table -- do not re-litigate case ordering; the remaining work is within-case structure","block_198's only goto/label pair was a no-op (fell through to the same statement immediately after its own closing brace); removed as dead-code cleanup, emission-neutral (verified byte-identical before/after). The two near-duplicate 'recovering' dialog call blocks (Func_080f9010(0x72)/Func_08015278/Func_08015068/Func_08015078 sequence at lines ~630 and ~903) ARE a genuine original duplication -- both m2c sites are real, reached via different flag-setting paths (sp3C==-1 direct vs the two-check sp44 path); the divergence from the reference is in how the guard flags and intermediate gotos are threaded, not in missing/extra statements. Unresolved lead for next session.","both parallel 100k permuter walks (safe AST and classic) against the current hand-derived draft independently confirm the normalized-instruction-weight compass: each found a candidate that scores better on raw halfwords/wrong-instructions/size but WORSE on the POOL-filtered normalized diff (1062 and 1017 respectively, vs the committed draft's 979). The permuter's own packed score is not a safe adoption gate this far from size parity on this owner -- do not adopt permuter winners here without independently recomputing the normalized weight first, exactly as this session did.","verified this session: all three reference occurrences of 'movs r0,#114; bl Func_080f9010' (games/gs1/asm/080ab5e4.s lines 1488, 1620, 1665) map 1:1 onto the draft's three existing sites (lines ~630 full pattern, ~888 bare block_193, ~903 full pattern) -- no missing block in this family. The reference's first byte-level divergence is the prologue itself (sub sp,#88 vs #108, offset 0x0e), and the function head (arg0 staging, the two P-pointer/temp_r9_32/temp_r5_34 reads) matches the reference near-verbatim already -- the 20-byte frame gap is a distributed spill-slot deficit accumulated across the body, not a single findable bug. A targeted reuse experiment (sharing temp_r2_424 across its two field-read sites at line ~281) measured emission-neutral (normalized weight 981 vs 979, a tie within noise) -- GCC already handles that redundancy for free; not adopted. -fno-regmove parity probe measured no improvement here (unlike its 080bbb0c precedent).","-fno-gcse diagnostic CONFIRMED as a genuine structural lever (weight 923 vs 979, verified via the same POOL-filtered LCS metric) but its exact source-level equivalent remains unfound: gcse's PRE inserts a path-specific partial hoist (not a whole-function shared local), and reproducing PRE's exact CFG-driven insertion points via C source restructuring is not achievable by the blunt full-hoist tried this session. This is the same class as 080bbb0c's scheduler-tie residual: a real, measured, compiler-internal effect not yet reduced to a source spelling. Next step for a future session: read gcse.c's PRE placement algorithm (edge insertion at specific CFG edges, not block-level), or bisect which SUBSET of the 14 call sites the PRE actually covers by selectively hoisting smaller groups and rescoring each against the compass.","store-sequence alignment (str/strb/strh instructions only, aligned like the bl-sequence compass) found the true shape of the 43-instruction store deficit: the reference spills specifically r4 to [sp,#8] 27 times (24 reloads) across the whole function body, ours does this only ~1-3 times. Verified this is NOT one persistent value stuck needing constant respill (the one candidate constant checked, 0x080AF28C, appears exactly once in both builds' pools) -- it is -fcall-used-r4 (a project build flag making r4 caller-saved) combined with the register allocator choosing r4 for many DIFFERENT short-lived cross-call values throughout the reference, where our build's allocator picks other (callee-saved, no-respill-needed) registers for the equivalent values. This is a global allocation-PRIORITY difference, not a locatable single-site bug -- the same 'measured, not locally reachable' class as 080bbb0c's scheduler-tie residual, but spanning the whole function rather than one instruction pair. No source-level lever for this was found or attempted to be forced this session; it would need the same allocno-priority-dump instrument that worked for 080bbb0c's final pair, applied at much larger scale (many pseudos, not one).","cumulative session total: two 100k permuter walks, an 8-flag diagnostic sweep, four -fno-gcse hoisting-scope experiments, a store-sequence localization of the deficit to r4-allocation-priority, and four declaration-order variants. Every technique that worked for 080bbb0c's much smaller residual has now been tried here at least once; none has closed this owner's gap. The remaining 979-weight distance is real but requires either the allocno-priority-dump instrument applied per-pseudo at a scale (130 pseudos to allocate, vs 080bbb0c's much smaller problem) not attempted this session, or continued incremental structural reading of the ~40% of the function not yet individually verified against the reference (case 13/15/16/14/17/19/20/23 bodies and the post-switch tail past line ~950).","SUSPECT: the 0x219 signedness adopted in 86f953cf4 is NOT evidence-backed. Every ldrsb site in the reference reads ctx+0x1C, status[], or events+0xA0; 0x219 is read with ldrb via a pool-loaded offset. The (u8*)->(s8*) change measured strongly better (size 4800->4840, structural deficit 47->29) but by a register-pressure side effect, and it introduces the +7 asrs / +9 lsls excess visible in the histogram. Revisit before adoption","NAMING CAVEAT: Func_08077210/Func_08077208/Func_080771b0 sit on the same 0x08077xxx page as games/gs1/src/battle/resolve_action.c's Battle_HitCheck/Battle_CalcAttack/Battle_CalcPower. The 0xF00>>8 / 0xE0>>5 / 0x1F decomposition feeding them may be a packed stat/ability value, not the color/tile reading this file has assumed. Page adjacency is not proof; check before trusting either name","Func_080022f4 is the same address as 080bbb0c's Math_Mod, and Func_08002304 is its sibling divide -- aliased here as Math_Div/Math_Mod. An earlier labeling in this file had the two backwards; corrected"]},"main:080ac8fc":{"schema_version":1,"namespace":"main","address":"0x080ac8fc","status":"measured-draft","owner_bytes":264,"candidate_bytes":256,"differing_halfwords":113,"wrong_instructions":132,"classification":"djinn-active-slot-list-builder","family":{"id":"template-main-080ae7fc","template_owner":"main:080ae7fc","template_source":"games/gs1/src/djinn/count_turns.c","note":"Same djinn-record domain (record obtained via Func_08077008, two parallel 4-row 32-bit bitmask arrays at record+264 and record+248, 20-bit inner loop, active-bit-else-secondary-bit test matching the template's `if(active&mask) ... else if(row[0]&mask) ...`), but this owner does not count matches -- it packs each match into a u16 output list (row<<5 | bit | id<<8, with an extra 0x8000 flag bit set only for primary-field matches) and either scans all 4 rows (row_select==-1) or just one caller-selected row."},"notes":["Read the raw assembly directly across both branches. High confidence on the algorithm: record=Func_08077008(id); for the -1 case, loop row=0..3 reading active=rows[row] (record+264+4*row) and secondary=record+248+4*row (confirmed row-varying by tracing r9, which increments by 4 each outer iteration and feeds the secondary-field offset via a snapshot into a fixed register each pass -- an easy misread on a first pass since the textual instruction looked like a constant +248); for each bit 0..19, if active has the bit set, packed=(row<<5)|bit|0xFFFF8000|(id<<8) (the pool constant 0xffff8000 is only ORed in this branch, confirmed against the single `.4byte 0xffff8000` at the end of both the -1 and selected-row code paths); else if secondary has the bit, packed=(row<<5)|bit|(id<<8) (no flag bit). The row_select!=-1 branch is the same per-bit logic restricted to one row, with the flag bit again reserved for the active-field match.","First candidate compiled with the field extraction, packing, and both branches structurally present, but the register roles diverge from the very start of the prologue (id lands in r7/r9 here vs the reference's r5/fp), suggesting the two locals `record` and `id` are being prioritized in the opposite order from the source -- likely fixable by reordering which value is captured into a local first, but not chased further given time.","This is the most complex owner in this batch (264 bytes, two full nested-loop branches); the algorithmic reconstruction is my best-confidence read of the bit-packing semantics, but the remaining gap is large enough (132 of roughly 120 total instructions) that register/stack scheduling differences likely compound across the whole function rather than being isolated to one spot. Recommend re-verifying the exact parameter order/count of Func_08077008's caller-visible signature and trying the opposite local-declaration order before another measurement.","Adoption requires 0 differing_halfwords."]},"main:080acab8":{"schema_version":1,"namespace":"main","address":"0x080acab8","status":"measured-draft","owner_bytes":1980,"candidate_bytes":1968,"differing_halfwords":947,"wrong_instructions":716,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted the next-largest unnamed clean compiler-output owner from the prepared aggregate-aware wave. After repairing typed runtime-table reads and the 96-byte halfword scratch region, the canonical compiler produces 1968 bytes for the 1980-byte reference; topology differs and 947 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","The candidate is a large menu presentation helper taking two compared party entries and several display parameters. It allocates presentation work, draws paired stat and status fields, computes per-field changes, and animates the resulting comparison. A permanent name is deferred until caller evidence establishes the owning menu.","The reference uses a 172-byte frame. The honest 48-halfword scratch region plus independently allocated C locals currently yields 184 bytes; a temporary 42-entry array matched the frame but was rejected because it reduced evidence-backed scratch capacity merely to influence allocation.","No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were used."]},"main:080ad40c":{"schema_version":1,"namespace":"main","address":"0x080ad40c","status":"measured-draft","owner_bytes":252,"candidate_bytes":228,"differing_halfwords":115,"wrong_instructions":84,"classification":"four-object-motion-vertical-speed-update","family":{"id":"template-main-080ad35c","template_owner":"main:080ad35c","template_source":"games/gs1/src/object/motion/four_object/update_all_positions.c","note":"Same FourObjectMotion domain (4-slot object array, state at Data_03001f2c, object flags-byte &=-13, motion/request buffers passed to Func_08009008), but genuinely different per-object work: the template hardcodes motion={FIXED_ONE,FIXED_ONE} and a fixed limit=0x4000; this owner walks the object pointers via ldmia-postincrement, uses a different vertical-origin constant (241<<17, not the template's 0x01e20000), computes motion[1] from a stored per-object vertical *speed* (state+580+4*index) via an easing call (Func_080022ec) when non-negative, writes the adjusted speed back to state, and picks limit 0x8000 vs 0x4000 based on the sign of the object's y position. motion[0] is never written anywhere in the real assembly (left as whatever the stack held), which the candidate also leaves unset."},"notes":["Read the raw assembly directly, field by field: Func_08015418(0x06002500) runs first (unrelated to the per-object loop); object_ptr walks state+548 as an array of pointers (ldmia r,{r6}; advance by 4 each entry); per active object: y_val=*(s16*)(state+vertical_offset) [vertical_offset: 324,326,328,330 across the 4 iterations], vertical=(241<<17)-((s32)y_val<<16); object[9] &= -13 (same mask as the template's flags clear); speed=*(s32*)(state+speed_offset) [speed_offset: 580,584,588,592]; if(speed<0) adjusted=-speed; else adjusted=speed+Func_080022ec(0x10000-speed,3); motion[1]=adjusted and state[speed_offset]=adjusted (writes back, unlike the template); pos_x=*(s16*)(state+position_offset) [position_offset: 564,566,568,570], request[0]=(s32)pos_x<<16, request[1]=vertical; pos_y=*(s16*)(state+position_offset+8), request[2]=((s32)pos_y<<16)+vertical, request[3]=0; limit=(pos_y<0)?0x8000:0x4000; Func_08009008(object,request,motion,limit). Loop counter index runs 0..3 (do-while, ble #3).","Confirmed motion[0] is genuinely never written in the reference disassembly (no store to that stack slot anywhere in the function) -- kept the candidate's motion[0] uninitialized to match rather than guessing a value.","Reordering `index = 0` to be the first statement after the Func_08015418 call (matching the reference's immediate post-`sub sp,#36` store to sp+8) produced no measurable change; the candidate's compiler still allocated `index` to a register instead of the stack, which is why the candidate only needs `sub sp,#32` against the reference's `sub sp,#36` -- a 4-byte/one-slot difference that cascades into the whole prologue's pool-constant offsets and register roles being shifted by one throughout.","The back half of the function (the arithmetic sequence for vertical/speed/request construction) reads as structurally sound against the assembly -- the remaining gap looks like a stack-layout/register-pressure difference from `index` not being forced onto the stack, rather than a wrong algorithm. Worth trying an explicit `volatile s32 index` or moving it into the same struct as the other stack-resident loop state to force the spill.","Adoption requires 0 differing_halfwords."]},"main:080ae99c":{"schema_version":1,"namespace":"main","address":"0x080ae99c","status":"proven-retained","classification":"ui_marker_object_compiler_entry_allocation_module","owner_bytes":84,"candidate_bytes":84,"differing_halfwords":10,"wrong_instructions":16,"register_gate_step4_probe":{"date":"2026-08-28","result":"exhausted-not-a-closure","baseline":{"candidate_bytes":84,"reference_bytes":84,"differing_halfwords":10},"decoder_signal":"data-load-hard-affinity-bound-to-incoming-tile-register","decoder_evidence":["Candidate data pseudo 38 and its address temporary prefer and receive incoming r2, evicting tile to r4; x then takes r5 and variant remains r3.","The reference needs the data chain in incoming r3, evicting variant to r5 while tile remains r2 and x takes r4.","The call tail is exact; every mismatch belongs to this entry allocation family."],"requested_edit":"move the Data_03001f2c load chain's hard affinity from incoming tile r2 to incoming variant r3","bounded_results":[{"shape":"inline-resource-selection-helper","candidate_bytes":84,"differing_halfwords":10,"effect":"baseline-equivalent"},{"shape":"inline-data-load-helper","candidate_bytes":84,"differing_halfwords":10,"effect":"boundary disappeared before RTL"},{"shape":"inline-object-create-helper","candidate_bytes":84,"differing_halfwords":16,"effect":"changed call coloring but left the data chain in r2"},{"shape":"typed-state-conditional-resource","candidate_bytes":84,"differing_halfwords":15,"effect":"exact-corpus transplant changed branch polarity but not data affinity"},{"shape":"typed-state-conditional-call-operand","candidate_bytes":84,"differing_halfwords":15,"effect":"same regression as the named conditional resource"}],"supporting_exact_owner":"main:080ad5b4","decision":"Neither the proven inline boundary nor the one exact-C entry-coloring analogue moved the data chain to r3. The source and retained assembly remain unchanged; this probe does not count toward the five required closures."},"notes":["2026-08-31 exact-closure rerun: allocator-order again reports the same reciprocal entry coloring (x pseudo 32 candidate r5/reference r4; tile pseudo 34 candidate r4/reference r2; data pseudos 38/39 candidate r2/reference r3), with equal branch structure, identical pools, and an exact post-call tail. The exact sibling 080ae9f0 uses the same readable shared-data/resource-selection source shape and differs only by its branch-local tile offsets, so it supplies no missing source construct for this owner.","2026-08-31 shipped-pass probe: -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, -fno-gcse, -fno-expensive-optimizations, -fno-strength-reduce, -fno-thread-jumps, and -frerun-cse-after-loop all preserve the 84-byte/10-halfword residual; -fno-schedule-insns2 regresses to 11. ABI fixed/call-used register flags were not used because they force allocation and are disallowed. Together with the previously recorded 48,522 finite candidates and named ABI-order/source-shape probes, this leaves no evidence-backed ordinary-C repair. Verdict remains measured allocation-uncovered, zero DONE bytes.","2026-08-31 ABI-order probe: GCC creates the four incoming argument pseudos in ABI order (r0 through r3). Preserving `variant` and then reassigning the fourth parameter as either an integer-cast or pointer-typed Data_03001f2c carrier is optimized back to identical RTL/output (10 differing halfwords); a K&R definition with reordered parameter declarations also retains ABI-order pseudo creation. Semantic-neutral parameter reuse therefore cannot move the data chain's hard affinity from incoming tile r2 to variant r3.","This owner and 080ae9f0 share the same resource-selection, object-creation, failure, and initialization tail.","The complete ordinary-C candidate emits the exact reference length. Sharing 080ae9f0's data-base/resource-selection shape improves this owner from 35 differing halfwords / 22 wrong instructions to 10 / 16 while keeping its post-call tail exact.","The earlier 30,000-candidate search plus a joint sibling matrix over raw pointer versus selected pointer, direct versus split variant lifetime, branch statement order, addend order, carrier widths, declaration order, approved GCC pass flags, -O1/-O3/-Os, and old-agbcc produced no exact candidate. The fixed-route shared-data shape is the unique readable improvement.","A last-mile heat-guided classic walk evaluated 13,522 additional generated candidates from the improved source (8,670 in the first capped process and 4,852 in a journal-seeded continuation). None improved the four normalized structural rows / sixteen raw rows / ten differing halfwords baseline and no exact candidate appeared.","Further joint source axes after that walk included signed and unsigned variant carriers, explicit offset selection before the resource load, duplicated versus joined branch loads, and pre/post resource tile adjustment ordering. Signedness is byte-neutral; the explicit offset join regresses to 80 bytes / 41 differing halfwords / 26 wrong instructions; the readable shared-data baseline remains best.","The remaining exact-extent residual is candidate-show class allocation: the candidate preserves tile in r4, x in r5, and the data base in r2; the reference preserves variant in r5, x in r4, tile in r2, and the data base in r3. Although semantically equivalent and tail-exact, ten differing halfwords across a sixteen-instruction entry allocation family are broader than the repository's narrow proven subset gate.","2026-08-31 retained-assembly proof: the current cross-edition object route now independently resolves this owner in all six editions and proves all 74 relocation-normalized core bytes identical. Together with the exact 84-byte extent, equal topology, exact pool and post-call tail, the no-unique-source decoder verdict, more than 48,000 bounded candidates, and the recorded ABI-order, helper-boundary, type, declaration, lifetime, compiler-family, optimization, and shipped-pass probes, the remaining entry coloring is proved compiler-retained under ui_marker_object_compiler_entry_allocation_module.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used. The structured assembly is counted as proven ASM; the candidate does not claim exact C.","A further 5,000-candidate safe heat-guided walk biased by the exact 080bbb0c source produced no improvement or exact output. Together with the prior 43,522 generated candidates, that closes the missing-temporary search axis until a new allocation model is established.","2026-08-27: four additional targeted structural variants were compiled and scored directly against candidate-show: (1) reading Data_03001f2c inline in both branches instead of through one hoisted `data` local regresses sharply to 37 differing halfwords / 22 wrong instructions (drops the y-holding callee-saved register entirely); (2) reordering the three local declarations (object/resource/data) ties at 10/16 with no emitted change; (3) an explicit early `s32 v = variant;` copy taken before the `data` load ties at 10/16; (4) an explicit early `s32 t = tile;` copy used only at the call site ties at 10/16. None flips which of {tile, variant} keeps its entry hardreg versus which register the data-pointer temp claims. This corroborates the existing note that the residual is a persistent allocation coloring choice, not a reachable source-shape difference under the approved compiler route."]},"main:080ae9f0":{"schema_version":1,"namespace":"main","address":"0x080ae9f0","status":"proven-retained","classification":"battle-marker-object-creation","owner_bytes":92,"candidate_bytes":92,"differing_halfwords":13,"wrong_instructions":22,"cross_edition":{"editions":["ja","en","de","es","fr","it"],"executable_owner_bytes":90,"relocation_normalized_core_bytes":82,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"kind":"classic_ordinary_c","candidates":40000,"exact_candidates":0,"status":"exhausted"},"notes":["2026-08-31 exact-closure revalidation: allocator decoder again returned `undecoded: conflicting-targets` with branch topology and both literal-pool words exact. A finite shipped-flag probe found no improvement: -fcall-used-r2, -fcall-used-r3, -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, -fno-cse-skip-blocks, and -fno-expensive-optimizations all tie at 13 differing halfwords; -fno-schedule-insns2 regresses to 14, -ffixed-r3 to 20, and -ffixed-r2 to 44 with an 88-byte candidate. Combined with the recorded 40,000-shape search and prior sibling/ABI-order probes, the bounded ordinary-C search remains honestly exhausted; no source or compiler-route change was retained and zero DONE bytes are claimed.","2026-08-31 ABI-order probe: preserving `variant` and reusing the fourth parameter as the Data_03001f2c carrier, in both integer-cast and pointer-typed forms, is optimized to the same pre-allocation RTL and remains at 13 differing halfwords. Reordering a K&R definition's parameter declarations likewise leaves argument pseudos in ABI order. Neither semantic-neutral form changes the r2 data-chain affinity, so this axis is closed for both marker-object siblings.","This owner and 080ae99c share the same resource-selection, object-creation, failure, and initialization tail; this sibling additionally adjusts the tile argument by variant.","The post-call failure and initialization tail is instruction-exact. The residual is an entry allocation family: the reference retains variant in r5, x in r4, y in r6, and tile in r2.","A bounded 40,000-candidate classic search improved one diagnostic byte but produced no exact candidate. Retained assembly remains authoritative and this draft claims zero bytes.","Compiler-family and optimization diagnostic sweeps did not improve the residual.","A joint sibling matrix with 080ae99c confirmed the same entry coloring under the fixed route. Sharing the data-base/resource-selection form materially improves 080ae99c but leaves this owner at 92/92 bytes, 13 differing halfwords, and 22 wrong instructions; statement-order variants regress to 14 differing halfwords, while all approved pass toggles tie or regress.","2026-08-31 retained-assembly proof: cross-edition verification proves all 82 relocation-normalized core bytes identical across six editions. The exact 92-byte extent, equal topology, exact pool and post-call tail, conflicting-target decoder verdict, exhausted 40,000-candidate search, and recorded sibling, ABI-order, helper, struct, declaration, statement, compiler-family, optimization, and shipped-pass probes confine the residual to the shared entry coloring and prove structured retention under ui_marker_object_compiler_entry_allocation_module.","No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used. The structured assembly is counted as proven ASM; the candidate does not claim exact C.","2026-08-27: re-examined the entry-allocation residual against the sibling's stalled-last-mile evidence. The reference frees r3 (evicting variant to r5) for the data-pointer scratch while leaving tile untouched in r2 until immediately before the call; the candidate instead frees r2 (evicting tile to r4) and keeps variant in r3 until the compare. Four additional source-shape probes that preserve the already-matched control flow -- an explicit `s32 v = variant;` copy taken first in the body, reordering the `data`/`object`/`resource` declaration list, replacing the `u8 *` pointer-arithmetic reads with an equivalent struct-member-access form (`struct IconResTable { ...; u16 res392; u16 res394; };`), and splitting the `data` initializer into a separate declaration plus assignment statement -- all produced byte-identical candidate assembly to the current draft (still 13 differing halfwords / 22 wrong instructions, same register coloring). This confirms the entry-allocation choice is insensitive to these surface rewrites and not merely an artifact of the current spelling; it did not change the outcome, and no candidate in this session cleared the residual. Restored the file to the previously committed draft unchanged."]},"main:080b0278":{"schema_version":1,"namespace":"main","address":"0x080b0278","status":"measured-draft","owner_bytes":460,"candidate_bytes":396,"differing_halfwords":228,"wrong_instructions":173,"classification":"inn-checkin-state-machine","family":{"id":"template-main-080b3284","template_owner":"main:080b3284","template_source":"games/gs1/src/inn/check_in.c","note":"Same Inn domain and several shared call idioms (Func_080b010c, Func_080b04dc(message), Func_080150f8 resource-window lookup, Func_080b0a20 border setup), but this owner is a much larger state-machine loop (dispatching on a mode2 value returned by Func_08015380 across 5 branches, looping via Func_080b0a20+Func_080b04dc(0xca4) until an unmatched mode2 exits) rather than the template's single linear stay-completion flow."},"notes":["This is the largest and structurally most complex owner in this batch (460 bytes, a real state machine with 5+ branches). I traced the full control flow from the raw assembly: mode clamping (`if (mode>=Func_080b26c8(mode) || mode<0) mode=0;`), Func_080b26cc/Func_080b010c setup, a byte store to state+0x3a9 from Func_080b2764(mode), a mode==16||17||18 flag write to state+940, an object/resource lookup and Func_080150f8 resource-window call with a Func_08015010 fallback when the window is 0, a Func_080150c8 call building a second UI object with fields [4]/[5] set, a Func_080b0a20 border setup, then a Func_08015380-driven loop dispatching mode2 0/1/2/3/default with different Func_080b04dc message calls and sub-function calls per branch, re-arming the border and looping except on the unmatched-default branch which calls Func_08015018/Func_080b0204 and returns 0.","Confidence is LOWER on this owner than the others in this batch: the exact byte offsets used via literal-pool loads (e.g. 0x3a9, 0x3aa used as a byte field, the message ids 0xc9b/0xca7/0xca9/0xcb7/0xcb8/0xcb9/0xca4/0xca5) were assigned from the two raw `.4byte` pool dumps in first-appearance textual order, which is a reasonable but unverified heuristic for a function this size with many pool entries feeding closely-spaced load sites -- I did not simulate the assembler's literal-pool placement to confirm each `ldr [pc,#N]` resolves to the specific word I assigned.","The resulting score (173 of roughly 210 total instructions wrong) reflects both this constant-mapping uncertainty and the substantial register-allocation differences expected in a function this size and branchy. Given the size, this should be treated as a documented best-effort control-flow trace rather than a near-miss candidate -- the highest-value next step is independently re-verifying the pool-word-to-load-site mapping (e.g. by bisecting smaller sub-expressions) before investing in register-level tuning.","Adoption requires 0 differing_halfwords."]},"main:080b08b8":{"schema_version":1,"namespace":"main","address":"0x080b08b8","status":"measured-draft","owner_bytes":160,"candidate_bytes":158,"differing_halfwords":58,"wrong_instructions":86,"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Advances a struct ShopCursor's animation by one frame. Guards on cursor!=NULL and cursor->kind!=0 (kind doubles as the animation's total frame count). Increments cursor->active (the elapsed-frame counter), then for each axis linearly interpolates: new = axisStart + FixedPoint_Ratio(active * (axisTarget - axisStart), kind), writing the X result to anchor->x (offset 6) and merging its low 9 bits into anchor+22 (preserving the existing high 7 bits), and writing the Y result to anchor->y (offset 8) and anchor+20 as a truncated byte. anchor is cursor->anchor (offset 0). When active reaches kind, both cursor->kind and cursor->active are reset to 0, ending the animation.","evidence":["struct ShopCursor (games/gs1/include/shop.h) already declares anchor@0, x@4(u16), y@6(u16), target_x@8(s16), target_y@10(s16), active@12(s8), kind@13(s8), size 0x10 -- an exact, unforced match for this owner's six field offsets and overall frame size, independently established by the already-adopted games/gs1/src/shop/set_cursor_position.c (Shop_SetCursorPosition), which constructs the same struct from a 'kind' parameter and zeroes 'active' at animation start.","The immediately following owner, main:080b0958 (named ShopCursor_MoveTowardTarget in games/gs1/source-paths.json, not yet source-adopted), starts exactly at this owner's end address (0x080b08b8 + 0xa0 = 0x080b0958) and operates on the same anchor object: it reads/writes anchor->x (offset 6) and anchor->y (offset 8), and merges anchor+22 with an identical 'AND 0x1ff / AND 0xfffffe00 / OR' idiom against literal-pool constants 0x0000ffff/0x000001ff/0xfffffe00, plus truncates anchor->y into anchor+20 as a byte -- byte-for-byte the same bitfield-preserve pattern this owner uses on the same four anchor offsets. MoveTowardTarget is a proportional ease-toward-target mover (step = (target-current)/4, clamped, no frame counter); this owner is architecturally different -- a keyframed linear tween driven by an explicit active/kind frame counter -- so it is named as a sibling ShopCursor_* verb rather than reusing MoveTowardTarget's name.","Func_080022ec (called twice, both times as the second positional argument after the interpolation product) is already declared and named FixedPoint_Ratio/Math_Div throughout games/gs1/include/types.h and battle_calc.h, and games/gs1/src/display/blend/update_transition.c shows the identical 'level = start + FixedPoint_Ratio(delta * step, total)' idiom this owner reproduces per-axis.","The family-matcher's only candidate for this owner, games/gs1/src/psynergy_menu/build_page_result.c (score 7335/10000, below the 7500 adoption threshold), shares only the register-shuffle prologue shape and a call to FixedPoint_Ratio; its actual semantics (paging/row arithmetic over a menu entry count) share no field offsets, no anchor writes, and no bitfield idiom with this owner -- confirmed a shape-only false-positive template per this session's prior findings, not used."],"credible_shapes_tried":["Direct field access through `struct ShopCursor *cursor` with cursor->x/target_x/y/target_y read via an explicit (s16) cast at the delta site and the field's plain (u16) type at the later sum site (matching the reference's signed ldrsh for the subtraction and unsigned ldrh for the later re-read of the same offset, confirmed independently by the m2c workbench pass decompiling this owner's assembly against the real agscc struct ShopCursor context once this shape was in place) -- kept.","`cursor->active += 1` as one compound-assignment statement: reads the s8 field with a signed ldrsb (per its declared type), which does not match the reference's unsigned ldrb for the raw increment read. Splitting into `active = cursor->active; active += 1;` with active declared `u8`, then casting to `(s8)` only at the two later signed-arithmetic use sites, matches the reference's ldrb-then-shift-based sign-extension shape -- kept.","Reordering the x/target_x (and y/target_y) reads into separate statements (`xStart = cursor->x; dx = cursor->target_x - xStart;`) instead of one inline subtraction expression: the inline form let GCC schedule the target_x read before the x read (opposite of the reference's x-then-target_x order); splitting into statements fixed the load order to match -- kept.","`-fno-schedule-insns2` (already an approved, per-owner-registered flag for other Thumb owners; not yet registered for this address): measurably closes the gap from the base-flags 71/95 (differing_halfwords/wrong_instructions) baseline to 58/86 and corrects several load orderings and the final padding/pool-constant tail to match the reference outright -- used for the reported measurement below, but NOT added to routing_data.rs's SCHED2_OFF_THUMB_SOURCES table since the remaining residual is still large and a materially different source shape might not need it.","-fno-regmove, -fno-gcse, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-expensive-optimizations, -fno-strict-aliasing, -fno-optimize-sibling-calls, -fno-schedule-insns (all combined individually with -fno-schedule-insns2): none improved on 58/86; several regressed it.","Widening the per-axis result locals from `u16` to `s32` to drop a redundant lsls/lsrs #16 truncation the u16 typing forces before the anchor+22 bitfield mask: unexpectedly regressed the overall diff (73 vs 58) by disturbing the register allocation elsewhere -- reverted, u16 kept.","Spelling the anchor+22 preserve-mask as `~0x1ff` instead of the literal `0xfe00`, hoping to force a literal-pool load matching the reference's pooled 0xfffffe00 instead of a cheap movs+lsls materialization: GCC 2.96 constant-folds `~0x1ff` to the same 0xfe00-pattern-recognized-as-shiftable value and still emits movs+lsls -- no effect, reverted."],"remaining":"58 of 160 reference halfwords differ (candidate 158 bytes vs reference 160). The entire residual traces to one root cause: the reference's allocator commits three extra callee-saved high registers (r8=anchor, r9=a zero literal used only for the end-of-function reset, sl=kind) plus r6=active, leaving r4/r5 unused; this candidate's allocator instead fits anchor into a normal low register (r6, reused across both FixedPoint_Ratio calls without difficulty since Thumb bl by this route's convention preserves r4-r7) and only spills kind to r8, needing no r9 or sl at all. Every other diff line (load orderings inside each axis's block, the two extra lsls/lsrs #16 truncations on the u16 result locals, the final tail sequence, the prologue/epilogue push/pop register lists) is a mechanical consequence of that one allocation-count difference, not an independent defect: the control flow, both call targets and their arguments, the interpolation algorithm, the field offsets, the bitfield preserve-mask idiom, and the final active==kind reset are already correct and instruction-for-instruction aligned wherever the register pressure happens to agree. No source reordering or approved-flag combination tried this session induced the allocator to spill the extra two high registers; per the hard constraint against hand-forcing register assignment, no asm()/register-hint/PERM_GENERAL workaround was attempted. This is recorded as an honest residual, not a proof of unreachability -- a future pass with a different statement shape or a legitimately-discovered additional flag may still close it.","notes":["Cold-start owner: games/gs1/recon/en/main/080b08b8.c did not exist before this pass; games/gs1/asm/080b08b8.s is the retained assembly (already proven byte-exact against the ROM).","Registered the descriptive name ShopCursor_Advance in games/gs1/source-paths.json ({\"name\":...}, no adopted C path) and added it as a `.global ShopCursor_Advance` alias immediately above `.global Func_080b08b8` in games/gs1/asm/080b08b8.s, plus `#define ShopCursor_Advance Func_080b08b8` in games/gs1/include/types.h so the candidate-show/workbench tooling resolves this draft's canonical object symbol -- same pattern already used for main:080fb2a4 (MusicPlayer_SetPitchAndUpdateFrequency).","No inline assembly, fixed-register variable, compiler barrier, forbidden ABI, copied instruction bytes, or compiler modification was used. No other Golden Sun decompilation project, symbol map, or disassembly was consulted -- only this repository's retained assembly, approved ROM, already-adopted exact C, in-repo headers, and the approved compiler.","This candidate claims zero DONE bytes; differing_halfwords is 58, not 0, so it is not adoption-eligible."]},"main:080b0958":{"schema_version":1,"namespace":"main","address":"0x080b0958","status":"proven-retained","owner_bytes":164,"executable_owner_bytes":164,"candidate_bytes":164,"differing_halfwords":4,"wrong_instructions":8,"classification":"shop_cursor_compiler_allocation_module","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":152,"core_identical":true,"starts":{"ja":"0x080a7958","en":"0x080b0958","de":"0x080b2f58","es":"0x080b4958","fr":"0x080b4958","it":"0x080b0958"}},"bounded_search":{"mode":"classic-walk-heat","candidates":20000,"compile_failures":1053,"exact":false,"baseline_differing_halfwords":4,"best_differing_halfwords":2,"best_structural_rows":0},"notes":["Moves the cursor sprite one quarter of its remaining signed X and Y distance, with a one-pixel minimum step, and refreshes the packed screen coordinates.","The complete candidate matches every instruction outside one immediately resynchronizing attribute-bit merge. Its four-halfword residual consists only of equivalent low-register allocation and load ordering.","The bounded winner emitted the exact normalized instruction sequence only by narrowing the retained 0xfffffe00 mask literal to 0x0000fe00. This is behaviorally equivalent for the halfword field but remains two linked halfwords from the reference and is not exact C.","The routed and gcc296 families preserve the four-halfword residual. The old-agbcc family and approved optimization-axis changes regress the complete shape."]},"main:080b0a20":{"schema_version":1,"namespace":"main","address":"0x080b0a20","status":"proven-retained","classification":"compiler_minipool_store_scheduling_module","owner_bytes":74,"executable_owner_bytes":74,"candidate_bytes":74,"differing_halfwords":26,"wrong_instructions":22,"cross_edition":{"owner_bytes":74,"literal_bytes":16,"core_bytes":58,"core_identical":true,"editions":{"ja":"0x080a7a20","en":"0x080b0a20","de":"0x080b3020","es":"0x080b4a20","fr":"0x080b4a20","it":"0x080b0a20"}},"behavior":["sets both current and target cursor coordinates","writes the same coordinates to the cursor sprite","refreshes the sprite's packed X and Y screen coordinates","marks the cursor as immediate and inactive"],"remaining":"The complete behavior and six-edition owner identity are established and the readable candidate has the exact 74-byte extent. The retained residual is the compiler's coupled minipool dump point, independent final field-store scheduling, and their register-role cascade; structured assembly remains authoritative under compiler_minipool_store_scheduling_module.","notes":["The name is bounded by the established ShopCursor type, sibling Shop_SetCursorPosition, and local shop callers.","Readable type and lifetime corrections improved the baseline from 68 bytes / 27 wrong instructions to exact extent / 22 wrong instructions.","The bounded 20,000-candidate search exhausted its approved budget without exact C; its generated best was rejected as production source because the residual remained broad and its source shape was not meaningful.","Recovered only from retained assembly, approved local GS1 ROMs, local types and callers, and the approved compiler.","2026-08-27: re-measured at exact extent (74/74), 26 differing halfwords, 22 wrong instructions -- confirmed unchanged from the recorded baseline. Traced the residual instruction-by-instruction against games/gs1/asm/080b0a20.s (via the tool's candidate.insns/reference.insns dumps, which give a clean 1:1 instruction alignment): the reference keeps r6 = coordinate_mask (0xffff) live in one register across both AND uses (offset x20 and x2c) and reuses r3/r4 serially for unrelated short-lived values (the 0x1ff mask, the 0xfffffe00 mask, the active literal, the attributes halfword); the compiler's own candidate output instead spills coordinate_mask into a fresh register via an extra 'adds r3, r6, #0' copy and reorders several literal-pool loads ahead of source order. Tried and reverted, each producing zero change from baseline (74/26/22): (1) catalog pattern 3's exact 'extern u8 Value_00000000; &Value_00000000' scalar form in place of the current 'extern u8 Data_00000000[]; Data_00000000' array-decay form; (2) the same swap with a u32-typed extern instead of u8; (3) dropping the redundant second 'sprite = (struct ShopCursorSprite *)cursor->anchor;' reassignment before the y-block, to test whether the compiler's own CSE/rematerialization (not source repetition) explains the reference's second load of cursor->anchor -- confirmed it does, since removing the explicit second assignment left the emitted instruction stream byte-identical; (4) reordering the screen_x/active local-variable declarations, to probe GCC 2.96 local-alloc.c's qty_compare tie-break sensitivity to declaration order -- no change. One structural rewrite (folding the screen_x temporary into the x parameter directly, hoping to land the AND result in r1 alongside the reference) actively regressed the candidate to 78/78 bytes and 30 differing halfwords, and was reverted. The residual matches this session's documented register-allocation dead end (a same-class GCC 2.96 local-alloc tie-break not controllable via source-level reordering, per 080a8c2c/080ae99c/080ae9f0/080b60a0/080b9dc4), just with a larger footprint (several serially-reused scratch registers instead of one swapped pair) because this function has more short-lived, non-overlapping temporaries than those five owners. Left the candidate unchanged at the pre-session baseline rather than force register assignment or open-ended permutation search.","2026-08-27 (second pass): independently re-traced games/gs1/asm/080b0a20.s from scratch against roms/gs1-en.gba's literal pool (0x080b0a54-0x080b0a63: 0xffff, 0x00000000, 0x1ff, 0xfffffe00) and cross-checked the ShopCursorSprite offsets against the two adjacent, already-recorded siblings -- games/gs1/src/shop/set_cursor_position.c (Shop_SetCursorPosition, main:080b09fc, adopted exact) and games/gs1/recon/en/main/080b0958.c (ShopCursor_MoveTowardTarget, proven-retained, same anchor+6/anchor+8/anchor+20/anchor+22 field pattern). Confirms the family-matcher's alternative (games/gs1/src/shop/set_cursor_position.c, 7414/10000) is real kinship at the subsystem level -- same ShopCursor type, same anchor-sprite struct, called from the same shop/place_cursor.c call site family -- but is not this owner: 080b09fc reads anchor->x/anchor->y to seed cursor->x/y from a live sprite position and takes a caller-supplied kind, while 080b0a20 instead writes the caller's target_x/target_y straight into cursor->x/y (collapsing current and target to the same value, i.e. skipping interpolation) and hardcodes kind=1 and active=0. Re-ran candidate-show and independently rediscovered the exact same 78-byte/30-halfword regression from folding screen_x into the x parameter in place (documented above) before finding the prior note and confirming it was already tried -- recording the re-derivation here so a third pass does not repeat it. No source or measurement change this pass; baseline (74/26/22) stands.","2026-08-31 exact-closure gate: a fresh aligned candidate-show still measures 74/74 bytes and 26 differing halfwords. Candidate and reference have identical branch topology, while the allocator decoder returns 'undecoded: conflicting-targets'. The concrete divergence is the minipool boundary: the candidate inserts its four-word pool at +0x2c and emits the final Y-coordinate stores after it, whereas the reference emits those stores before a pool beginning at +0x34. The adjacent exact Shop_SetCursorPosition source and the retained owner assembly confirm that no semantic statement or owner extent is missing. A finite shipped-flag probe found no exact or strictly useful route: -fno-schedule-insns, -fno-cse-follow-jumps, -fno-gcse, -fno-thread-jumps, -fno-strength-reduce, and -frerun-cse-after-loop remain 74/26; -fno-schedule-insns2 becomes 72/34; -fno-regmove becomes 72/25; and -fno-expensive-optimizations becomes 54/37. Together with the recorded source repairs, six-edition 58-byte normalized-core identity, and 20,000-candidate bounded search, this proves the same coupled minipool/store-scheduling limitation already registered for 0800bbc0. Structured assembly is counted as proven ASM under compiler_minipool_store_scheduling_module; the candidate does not claim exact C."]},"main:080b1868":{"schema_version":1,"namespace":"main","address":"0x080b1868","status":"exact","owner_bytes":260,"candidate_bytes":260,"differing_halfwords":0,"wrong_instructions":0,"classification":"shop-equip-replace-confirm","family":{"template_listed":"main:08091c7c (field_owner_59.c, score 7945)","template_used":"not the listed family template -- recovered instead from the direct caller Shop_CompletePurchase (games/gs1/src/shop/complete_purchase.c) and the sibling item-slot decoder 080a9aec.c"},"domain":"Called as Func_080b1868(unit_id, slot) from Shop_CompletePurchase after an item purchase is placed in a party unit's item slot. Reads the unit's item-slot u16 (id in the low 9 bits, a lock flag at 0x200); if locked, returns 0. Looks up the item's info, confirms the unit can equip it, finds any item it would replace and blocks the swap if that old item is unsellable, shows a Yes/No equip-confirmation message, and on confirmation equips the item, plays an equip fanfare and waits for it to finish if the item is flagged for one, then shows a closing message and returns 1 (so the caller sells the replaced item).","notes":["The listed family template (08091c7c, a UI-wait/window-management owner) shares only coarse shape (object lookup, WaitFrames loop, message dispatch) and was not a useful line-by-line template. The direct caller Shop_CompletePurchase (`if (Func_080b1868(unit_id, added_slot) != 0) Shop_SellReplacedItem(...)`) fixed the real signature, and 080a9aec.c (`value & 0x200` lock bit / `value & 0x1ff` item id / `Func_08077018(id)[2]` kind byte) fixed the item-slot encoding and the AbilityInfo-style lookup shape, both already-established local idioms.","One deliberate asymmetry preserved from the assembly: the first Func_08077018 lookup (on the newly placed item) is called with the id explicitly masked to `& 0x1ff`, but the second lookup (on the replaced item, only reached when replaced != -1) is called with the raw unmasked u16 slot value -- the two call sites are not symmetric in the reference and the candidate reproduces that exactly.","The former allocation/scheduling diagnosis was false. The reference reloads the encoded inventory slot after Func_08077018, uses a separate old-item offset carrier, continues only when Func_080b0634 returns zero, checks UI completion before the first wait, and consumes Func_08015038 as an s32-returning interface. Restoring those source semantics eliminates the entire register residual under canonical flags; no compiler override or forced register is involved.","Exact under canonical flags: 260 candidate bytes, 260 reference bytes, 0 differing halfwords, and 0 wrong instructions. Adopted as Shop_ConfirmEquipItem.","Recovered only from retained GS1 assembly, the exact-C caller (shop/complete_purchase.c) and sibling item-slot decoder (080a9aec.c), the approved compiler, and already-established local type/function signatures (Func_08077008, Func_08077018, Func_08077218, Func_08077228, Func_08077050, Func_08015120, Func_080b04dc, Func_080b0634, Func_080b0574). No GS2 evidence or external source was used."]},"main:080b1bd0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b1bd0","status":"proven-retained","classification":"compiler_literal_pool_placement_module","owner_bytes":540,"score":{"measured":"2026-08-27","candidate_bytes":540,"reference_bytes":540,"differing_halfwords":168,"wrong_instructions":42,"class":"wrong","note":"Improved from 231/110 to 168/42 (byte size still matches exactly, 540/540) by fixing two concrete, evidence-backed bugs found by decompiling the actual reference machine code with m2c (see tools/compiler families transplant's m2c/target.lst, which prints the reference disassembly with real addresses/labels): (1) Shop_DrawItemPrice's first argument was wrongly `price_window` (the per-redraw window created inside redraw_page, offset sp+0x10) when the reference clearly passes `list_window` (the window created once before redraw_page, offset sp+0xC) -- Func_080b110c(spC, ...) in the m2c output. This single fix alone dropped the diff from 231 to 172 because it had been inflating price_window's apparent use-density enough to win the function's single remaining callee-saved register (fp) over `shop`, cascading into wrong register/stack assignments through the whole function body. (2) Declaring `unit` before `list_window` (their true relative order, matching m2c) rather than after fixed a residual sp+8/sp+12 slot swap between them (172 -> 168), and writing selection's -1/+1 cursor-move updates as a separate `selection -= 1;`/`selection += 1;` statement before the Modulo() call (matching the reference's standalone `subs r7,#1` before the add, instead of folding the -1 into one expression) fixed a small instruction-order mismatch (wrong_instructions 46 -> 42, though total differing_halfwords stayed 168 because of an unrelated compensating shift -- see below). After these fixes every remaining diff line (verified by grepping the --align output) traces to exactly one thing: the reference splits its literal-constant pool into two clusters -- an early one right after shop->mode=3 holding {Data_03001f2c_a (SHOP_RUNTIME address), 0x1ff (item-id mask)} with a `b.n`-over-data skip, and a late one near the function's end holding the remaining 4 words -- while our compiled candidate (verified via `xgcc -S` on this exact source with the exact approved flags) emits ONE combined 6-word table (.L30) at the end, matching neither ARM range pressure (540 bytes is comfortably inside Thumb's 1020-byte pc-relative reach either way) nor anything we could tie to a specific C-level idiom. Every '!' and '+/-' line in the final --align diff is a pc-relative offset or branch-target shift downstream of this one 8-byte pool-placement difference (confirmed: the only true content difference left is the trailing block of instructions, which is exactly the reference's missing/candidate's extra 2 pool words disassembled as garbage `movs r0,r0`/`lsls`/`subs` opcodes)."},"rejected_experiments":["for(;;){ if(redraw){...} } inner loop with window/x/y as plain expressions (no temps): 536 candidate bytes vs 540 reference, worse than the temp-var version.","do { ... } while (1) restatement of the inner loop: byte-identical output to the for(;;) version, no change (536/544-byte families depending on companion edits) -- confirms the layout choice is not driven by loop-statement syntax.","Plain for(;;) nested loop with `break`/`continue` (no goto): compiled to 544 candidate bytes vs 540 reference; the goto-based rewrite matching the disassembly's exact label graph fixed the size mismatch to 540/540 but did not close the remaining register-role differences.","2026-08-27 session, after the two real fixes above (score frozen at 168/42), tried to close the remaining literal-pool-split gap: combined-decl-and-init for `shop` (`struct ShopRuntime *shop = SHOP_RUNTIME;`), reordering local declarations several ways (price_window first, shop first, unit/list_window swapped -- this last one was the real fix above, everything else was a no-op), inlining the Shop_PlaceCursor y-argument vs a named `y` temp (byte-for-byte identical output either way), reassociating `selection - 1 + item_count` into `item_count + selection - 1` etc. via the permuter's PERM_GENERAL over 4 alternatives per branch (all 16 combinations scored identically, 168 -- GCC's tree canonicalizes commutative + regardless of source spelling), and swapping the 0x1ff mask's operand order in `item_id = 0x1ff & unit->inventory[selection]`. None changed the score by even one bit. Confirmed via `xgcc -S` (approved flags, no invented options) that GCC's own RTL/assembly-emission stage already produces a single combined literal table `.L30` for our source -- the reference's two-cluster layout is a machine_dependent_reorg (arm.c minipool) decision that appears in the final assembled bytes but is not visibly driven by anything in the .s output, and no combination of purely-cosmetic source rewrites tried moved it. This residual likely needs either a genuinely different (not yet identified) control-flow/statement shape somewhere in the function, or is simply not reachable through ordinary C source variation and should be treated as the honest last-mile floor for this owner absent a new idea."],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template/sibling sources, in-repository headers, and the approved compiler.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM because ordinary C cannot request the reference's two-cluster literal-pool layout.","Twin of 0x080b211c (shop/select_party_member.c family): diffing games/gs1/asm/080b1bd0.s against games/gs1/asm/080b211c.s shows the two are near line-identical raw disassembly, differing only in which price/name callee they invoke (Func_080b19cc Shop_ComputeSalePrice vs Func_080b20e8 Shop_ComputeRepairPrice), literal-pool offsets, and one extra block at the end of 080b1bd0 (a call to Shop_SelectSaleQuantity + Func_080b1f4c that 080b211c's flow replaces with a single call to Func_080b2328) -- confirming 080b1bd0 is the 'sell an item from this party member' flow reached when shop->party_action == 1 in shop/select_party_member.c, and 080b211c is the parallel 'repair' flow.","2026-08-27: this owner's Shop_DrawItemPrice call had a real bug (fixed this session, see score note) where the once-created outer window (here, list_window) rather than the per-redraw window (price_window) was the correct first argument -- found by decompiling games/gs1/asm/080b1bd0.s's own reference bytes with m2c via `tools/compiler families transplant`. Given how closely 080b211c mirrors this file's raw disassembly, its analogous price/repair-drawing call very likely has the same once-created-vs-per-redraw window mix-up; whoever works 080b211c next should check its own m2c/target.lst before trusting its current argument order (not edited here, per the task's file-isolation rule).","Ability_GetAvailability(unit_id) is reused here as an item-availability *count* (its return value minus one clamps the selection index), not just the boolean sense used in draw_party_member_item_grid.c/select_party_member.c -- both usages are consistent with a single s32-returning function.","Value_00000075 and Value_00000caa are placeholder message-id symbols named after their own address value (the repo's existing Value_XXXXXXXX convention, e.g. select_sale_quantity.c's Value_00000cad); their real message text was not resolved."]},"main:080b2328":{"schema_version":1,"namespace":"main","address":"0x080b2328","status":"measured-draft","owner_bytes":444,"score":{"measured":"2026-08-27","candidate_bytes":440,"reference_bytes":444,"differing_halfwords":150,"wrong_instructions":100,"note":"Two-parameter void function (unit_id, slot). Recovered from the retained owner assembly, cross-referenced against the caller 080b211c (whose dossier already names this call `Func_080b2328(unit_id, selection)`), and against the established shop.h/item.h/battle_runtime.h headers (BattleUnit_Get, Item_Get, Shop_ComputeRepairPrice, Shop_DrawPartyMemberItemGrid, Shop_SellReplacedItem, SHOP_RUNTIME, SHOP_PARTY_STATE.money) plus the sibling games/gs1/src/shop/complete_purchase.c, which calls the same undocumented helpers (Func_08077228, Func_08077230, Func_080b1868) with the same argument shapes. Domain: an item-repair confirmation flow -- validates the item at unit->inventory[slot] is a repairable, damaged, class-compatible item the party can afford to fix, shows a yes/no confirmation, then plays a short animation while the item slot is blanked, pays the price, and finally offers to sell a replaced item."},"domain":"Shop item-repair flow: validate -> confirm -> pay -> animate -> redraw -> optional sell-replaced-item tail, called from the repair-shop selection screen (080b211c) with (unit_id, selection).","expressed":["entry validation chain: item use_type == 2 (repairable class), raw item flag bit 0x400 (needs repair) set, and a flags/use_type compatibility check gated behind raw item flag bit 0x200","affordability check against SHOP_PARTY_STATE.money","yes/no confirmation dialog via UiMessage_ShowChoice before committing","temporary zeroing and restore of unit->inventory[slot] while the repair animation (WaitFrames/Audio_PlayCue sequence) plays","payment via Func_08077230(-price) and Shop_DrawMoney(), two Shop_DrawPartyMemberItemGrid redraws (before and after payment)","final Func_080b1868(unit_id, slot)-gated call to Shop_SellReplacedItem(unit_id, replaced_slot) using the slot Func_08077228 returned at entry"],"unexpressed":[{"op":"sl/r8 register-role swap","count":"cascades through most of the function body (~90 of the 100 wrong instructions)","where":"the compiled candidate assigns item_id to r8 and the BattleUnit* to sl; the reference does the opposite (item_id -> sl, unit pointer -> r8). Every later instruction that reads either value inherits the swapped register, and the sp+0/sp+4 stack-spill slots for `idx2` (slot*2) and `replaced_slot` are also swapped between candidate and reference in lockstep with this."}],"retention":"keep_structured_asm_for_now","verified_against_reference":["fresh candidate-show build: 440 candidate bytes vs 444 reference bytes, 150 differing halfwords, 100 wrong instructions","matched_prefix=9 (identical through the shop-pointer fetch and unit_id-into-r7 cache); every later hunk is either the sl/r8 swap or a literal-pool address shift caused by the 4-byte size delta"],"rejected":[{"shape":"read+mask the item value into a named `raw_item` local before calling Item_Get, matching a literal transliteration of the two separate ldrh instructions","result":"worse: 201 differing halfwords, 110 wrong instructions, 440/444 bytes. The extra dead pseudo perturbed allocation further away from the reference."},{"shape":"inline the first masked read directly into the Item_Get call argument, only introducing `raw_item` for the second (post-Func_08077228) reload","result":"the adopted improvement: 150 differing halfwords, 100 wrong instructions (kept)."},{"shape":"reorder the local variable declaration list to put item_id before the BattleUnit* / ItemDefinition* pointers","result":"byte-for-byte identical to the prior attempt -- GCC 2.96's pseudo numbering here follows statement/use order, not C declaration order, so this had zero effect."}],"notes":["Recovered only from the retained owner assembly, the caller 080b211c's existing dossier (which already established the two-argument `Func_080b2328(unit_id, selection)` call shape and the 0xcba..0xcc2 contiguous message-id range shared between the two owners), in-repository headers (shop.h, item.h, battle_runtime.h), the sibling games/gs1/src/shop/complete_purchase.c, and the approved compiler.","The four fail-path message IDs (0xcba, 0xcbb, 0xcbc, 0xcbd) and the four confirm/success message IDs reached via `message+0..3` off a single `&Value_00000cbe` base were resolved directly from the literal pool at the end of games/gs1/asm/080b2328.s, not guessed; `Value_00000cba`..`Value_00000cbe` were declared locally as `extern char` following the existing `Value_00000ca1`-style address-trick convention used in complete_purchase.c.","Func_08077068 has no established name or prior declaration anywhere in the repository; it was declared locally as `s32 Func_08077068(s32, s32)` (unit_id, slot) matching its call-site argument shapes only.","This owner shows the same class of register-allocation nondeterminism (a hi-register role swap between two long-lived, similarly-referenced pseudos) already documented for the structurally adjacent shop-family owner 080b211c (fp/r9 swap) -- cross-owner evidence this is a shared compiler sensitivity for this idiom rather than a defect in this specific source shape. Resolving it further likely needs permuter-style register-allocation search (see CONTRIBUTING.md section 6), not additional manual respelling.","This candidate claims zero DONE bytes. No external source, git history, compiler modification, copied instruction bytes, fixed-register variables, barriers, or inline assembly was used."]},"main:080b24e4":{"schema_version":1,"namespace":"main","address":"0x080b24e4","status":"measured-draft","owner_bytes":484,"candidate_bytes":476,"differing_halfwords":226,"wrong_instructions":148,"classification":"shop-item-purchase-confirm-loop","domain":"Given a list window and item window already created by a caller, checks a fixed item's price against the player's money, then (if affordable) runs a party-member selection loop that confirms or cancels the purchase for the selected unit before deducting the price and exiting.","notes":["Clustered against the byte-exact Shop_SelectPartyMember template by the family scan; the retained assembly's redraw-flag/party-member-list/input-poll loop (the 'if (redraw) {...}' block, the NEW_KEYS&1 confirm / NEW_KEYS&2 cancel checks, and the REPEAT_KEYS 0x20/0x10 selection adjust) is a close structural match to the template, wrapped in an outer price-vs-money affordability gate that has no template counterpart.","Recovered from the retained owner's control flow and its literal pool, which resolves to ADDR_03001F2C (shop pointer), an undocumented u16 field at shop+0x39e (read, temporarily set to 0xe4, and restored on every exit path), the documented party_member_count (0x3a7) and party_member_ids (0x36e) fields, a price table at 0x080b4146 indexed by a signed byte read from address 0x02000240+0x11c, a money field at 0x02000240+0x118, and several undocumented shop-relative u16 fields (0xc9e, 0xca6) plus small non-shop-relative integer constants (0xcc3, 0xcc3+1, 0xca1, 0xcc5) passed directly to Func_080b0574/Func_080b04dc as message/resource ids.","Two concrete respellings measurably improved the match and are kept: (1) reordering the local declarations/initializers to the sequence the reference actually computes them in -- shop pointer, then the shop+0x39e field save, then redraw=1, then the price/money block, then unit_id=0 and selection=0 last, immediately before the affordability check -- which alone dropped wrong_instructions from 174 to 154; (2) introducing an explicit 'u8 *party_state = (u8 *)0x02000240;' local instead of writing the two SHOP_PARTY_STATE-region reads as two independent absolute-address casts. The independent-cast form let the compiler constant-fold each read into its own single absolute pc-relative load (0x0200035c and 0x02000358), which does not match the reference's shape of loading 0x02000240 once and computing both offsets from that one shared base register; the shared-pointer-variable form recovered that shape and dropped wrong_instructions to 152 with candidate_bytes moving from 468 to 472 (owner is 484).","2026-08-30: resolved three behavioral gaps directly from the retained instruction stream and literal pool. The full-bag and alternate failure branches pass message ids 0x0c9e and 0x0ca6, not zero; the success branch deducts the saved item price rather than calling Func_08077028 a second time and negating its availability result; and Func_080b1470 receives (item_window, unit_id, shop_field), not (item_window, shop_field, unit_id). These corrections bring the candidate to 476/484 bytes, 226 differing halfwords, and 148 wrong instructions.","Creating price before saved_field, while retaining the reference's execution order, applies the allocator decoder's named swap_declarations(price,saved_field) repair. It places saved_field at sp+0 and price at sp+4 as in the reference. A persistent named shop-field pointer reaches the reference's 12-byte frame but spills the wrong values and regresses wrong instructions to 158-160, so it was rejected rather than retained for its coincidental size.","The remaining gap is structural, not a last-instruction compiler floor: the reference spills item_window at sp+8, keeps list_window in r9, and emits redraw/input blocks in source order with one trailing pool; the candidate keeps item_window in r9, list_window in sl, and reorders the loop blocks around an early literal pool. Sequential versus else-if input spelling and explicit window aliases are byte-neutral. Further work must recover the missing lifetime or control-flow fact that causes the item-window spill; it should not force the register or scheduler.","Exact-C adoption remains gated on an independently compiled zero-difference object."]},"main:080b2b10":{"schema_version":1,"namespace":"main","address":"0x080b2b10","status":"proven-retained","owner_bytes":664,"executable_owner_bytes":664,"candidate_bytes":664,"differing_halfwords":45,"wrong_instructions":38,"classification":"shop_party_treatment_compiler_allocation_module","resolved_asm_classification":{"kind":"shop_party_treatment_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":472,"identical_core_editions":["ja","en","es","it"],"regional_core_differences":{"de":2,"fr":1},"starts":{"ja":"0x080a9b34","en":"0x080b2b10","de":"0x080b5110","es":"0x080b6b10","fr":"0x080b6b10","it":"0x080b2b10"}},"score":{"measured":"2026-08-30","candidate_bytes":664,"reference_bytes":664,"differing_halfwords":45,"wrong_instructions":38,"class":"allocation-uncovered","note":"Baseline at start of this pass (measured 2026-08-27, before this session's edits) was differing_halfwords=192, class=structural-topology, topology=different: candidate-show --allocator-order showed genuine +/- (not just '!' register-bank) blocks around the second party-member eligibility scan (the one inside `if (retry != 0) { ...; while (...) {...break...} redraw = 1; }`), meaning the branch/block topology itself, not just register assignment, diverged from the reference there. Two source-shape fixes converged most of that: (1) moving `redraw = 1;` from after the second scan while-loop to immediately after `retry = 0;`/before the loop (mirroring nothing in the first scan loop, which already matched) took topology=different -> topology=equal and differing_halfwords 192 -> 176 (class briefly read missing-extra-code). (2) The remaining gap was the four `retry + N` message-id expressions (`Func_080b2928(retry + 2)`, `retry + 1`, `Func_080b28d4(retry + 3)`, `retry + 4`): with `retry = 0xd27;` freshly assigned just above, this candidate's GCC constant-folds each `retry + N` into a fresh pool-constant load (`ldr r0, [pc, #...]`), whereas the reference keeps 0xd27 live in a register and computes each use as `mov r0, r8; adds r0, #N`. Rewriting each use as an in-place `retry += N; f(retry);` (mutating the shared register instead of computing an offset expression) broke the constant-fold and dropped differing_halfwords 176 -> 100, wrong_instructions 90 -> 64 -- but topology flipped back to 'different' (candidate grew from 672 to 676 bytes) and class reports structural-topology again, so per the task's own ordering (realign topology before instructions) this local optimum trades a topology regression for a large raw byte-diff win. Kept as the best verified state pending further topology-first work, since differing_halfwords is lower than at any point in this owner's history and no correctness/behavior changed (retry += N read-modify-write is equivalent to retry + N followed by retry=1 in every call path, since each branch that mutates retry also immediately continues or breaks before any other read of the old value). NOT reduced to zero: an environment failure (see notes) prevented further iteration after this measurement.","prior_score_2026_08_27":{"candidate_bytes":672,"reference_bytes":664,"differing_halfwords":192,"wrong_instructions":114,"class":"wrong"}},"family":{"assigned_template_owner":"main:080b362c","assigned_template_source":"games/gs1/src/shop/select_use_item.c","template_note":"Score 8679/10000 (n-gram/call-target/branch clustering), but select_use_item.c's actual logic -- a 5-column ability-grid selection with FixedPoint_Ratio/Modulo grid math and 0x40/0x80 (up/down) navigation over shop->stock -- is not what this owner's own retained assembly shows. Kept only as a source of headers/typedefs/general shop-menu-loop shape (as instructed); not used for any field offset, call target, or algorithm decision below."},"actual_sibling_evidence":"This owner is structurally and behaviorally closest to games/gs1/src/shop/select_party_member.c (main:080b1a14, Shop_SelectPartyMember, already-adopted exact C), not the assigned template: both iterate shop->party_member_ids[0..shop->party_member_count) with `selection = Modulo(selection + shop->party_member_count, shop->party_member_count)` computed inside an `if (redraw)` block, place the cursor via Shop_PlaceCursor(window, selection*24-12, 0), set shop->mode=3, and poll only the LEFT (ADDR_03001B04 & 0x20) and RIGHT (& 0x10) bits for navigation (no up/down) -- an exact match to select_party_member.c's idiom and a clean mismatch with the template's 5-column grid math. This owner adds real additional logic on top of that shared shape: a pre-loop scan for the first party member eligible for shop->party_action (via Func_080b27b0), a price preview/confirm/insufficient-funds flow (Func_080b2778 for price, SHOP_PARTY_STATE.money for the balance check, Func_08077230(-price) to spend it), and a Func_080b280c()-gated retry loop that re-scans for the next eligible member and loops for another purchase instead of exiting after one. Also confirmed against seven other already-adopted or measured-draft callees this owner shares with the 0x080b27xx-0x080b30xx shop cluster: games/gs1/src/shop/is_unit_eligible_for_service.c (Func_080b27b0's four-kind eligibility test: kind0=HP<=0, kind1/2/3=status-byte checks at entry+305/320/304), runtime_owner_75.c (Func_080b2778's kind-priced value: kind0=value*20, kind1=10, kind2=50, kind3=value*10), runtime_owner_230.c (Func_080b2e30, called here as (list_window, selection)), runtime_owner_180.c (Func_080b280c), battle_owner_62.c (Func_080b2ed8, called here as (price_window, unit_id)), battle_owner_38.c (Func_080b2da8), system_owner_10.c/system_owner_2.c (Func_080b28d4/Func_080b2928 message-pump helpers), system_owner_21.c (Func_080b0664), games/gs1/src/shop/complete_purchase.c (Func_08077230's spend-money convention), and games/gs1/recon/en/main/080b29a8.c (Shop_ConfirmPartyAction, the only caller, confirming this owner's `void Func_080b2b10(void)` no-argument signature and that it runs only after that caller's own yes/no confirmation succeeds).","rejected_experiments":["2026-08-31 allocator-cost probe: typing the signed-byte `shop->party_action` carrier itself as `s8` instead of widening once into `s32` is decisively wrong. GCC spills the carrier, expands repeated sign extensions, grows the owner from 664 to 684 bytes, and regresses from 45 to 328 differing halfwords while branch topology remains equal. The reference's single entry sign-extension therefore belongs to an `s32`-lifetime carrier; this closes the narrow-width-cost axis.","void* vs s32 typing for list_window (with explicit casts at the Shop_PlaceCursor/UiWindow_Close call sites either way): no measurable effect on the register-bank residual (identical wrong_instructions=120 with the msg/retry variables still separate). Kept as plain s32 matching select_party_member.c's own convention since it reads more naturally, not because it changed the score.","Reordering the top-level local declarations to mirror first-assignment order (shop, price_window, redraw, kind, list_window, selection, unit_id, retry, price) instead of a plain alphabetical-ish list: zero effect on generated code (byte-identical candidate), consistent with C not tying pseudo-register creation order to declaration position for uninitialized automatic locals. Kept the reordered version since it documents the evidence better, not for any score change.","Swapping the order of the `unit_id = 0;`/`retry = 0;` zero-initialization statements (retry before unit_id vs unit_id before retry): negligible effect (differing_halfwords 199 -> 198, wrong_instructions unchanged at 120). Reverted to unit_id-then-retry as the more natural reading order.","Hand-deriving GCC 2.96's local-alloc.c qty_compare priority ordering (QTY_CMP_PRI = floor_log2(n_refs)*n_refs*size/(death-birth)) from the retained assembly's raw reference counts and estimated live-range spans for each of the four competing high-register locals: predicted unit_id should out-prioritize kind (more references, shorter estimated span) but the reference assigns kind the better register (r9) and unit_id the worse one (sl) -- the hand estimate does not reproduce GCC's flow-sensitive birth/death computation, so no source-shape lever was identified from this angle. Not chased further into the compiler's actual flow-analysis code per the project's guidance against open-ended permutation search once control flow and behavior are already credible.","(measured 2026-08-29) Hoisting `retry = 0xd27;` from immediately before `Func_080b28d4(retry);` to the top of the `if ((*(volatile u32*)ADDR_03001C94 & 1) != 0) {` block (before WaitFrames(1)/the price fetch/the eligibility re-check), on the theory it matches the proven 'constant-hoist placement at block TOP' lever: made it worse, differing_halfwords 192 -> 210, wrong_instructions 114 -> 116. Reverted.","(measured 2026-08-29) Applying the same 'hoist redraw=1 above the while-loop instead of after it' fix that worked for the SECOND eligibility scan (inside `if (retry != 0) {...}`) to the FIRST eligibility scan at the top of the function (before the outer `for (;;)`), i.e. moving `redraw = 1;` up next to `selection = 0; unit_id = 0; retry = 0;`: made it much worse, differing_halfwords 176 -> 256, wrong_instructions 90 -> 140, topology flipped back to different. Reverted -- the two scans are not symmetric levers despite near-identical source shape (the first scan is followed directly by the `for(;;)` loop head, not by another `if`, so its trailing statement's block position matters differently)."],"notes":["2026-09-01 retained-assembly proof: the current candidate reproduces the complete 664-byte owner with equal branch topology and the exact literal pool. Every shop-treatment call, argument, eligibility scan, cursor operation, message path, price check, purchase mutation, loop, field access, and observable memory operation is accounted for. The remaining 38 wrong instructions are equivalent long-lived selection, unit, treatment-kind, and retry register roles. The allocator decoder finds no unique safe source repair. Canonical, -fno-regmove, -fno-schedule-insns, -fno-gcse, both CSE toggles, rerun-CSE, and -O3 preserve the 45-halfword floor; sched2, strength-reduction, and expensive-optimization changes regress. Relocation-aware six-edition comparison proves the 472-byte normalized core identical in JA, EN, ES, and IT, with only a two-byte German and one-byte French localized variant. Structured assembly is therefore authoritative under shop_party_treatment_compiler_allocation_module.","The earlier environment-incident note is historical only: the approved compiler bundle is present and fresh candidate compilation and full coverage verification both pass on 2026-09-01.","2026-09-01 annotation-free permuter verdict: the finite search correctly refused to fan out because the allocator decoder found no unique source repair. It identified the competing long-lived roles (selection actual r6/target r0, unit_id actual r8/target sl, retry actual r9/target r8), confirmed equal branch structure and identical literal pools, then returned `undecoded reason=no-unique-source-shape`. No mutations were compiled and no register-role respelling was attempted; this owner remains honestly parked in allocation-uncovered until the decoder gains evidence for a named ordinary-C repair.","Recovered from the retained owner assembly (games/gs1/asm/080b2b10.s, 664 bytes), the approved local EN ROM's caller games/gs1/recon/en/main/080b29a8.c (and its .s), the already-adopted exact games/gs1/src/shop/select_party_member.c and games/gs1/src/shop/select_repair_item.c (both read per the task's instruction to check other shop siblings; select_repair_item.c's single-unit inventory-grid shape was confirmed NOT to match and was not used further), the nine already-adopted/measured-draft callee sources listed above, games/gs1/include/shop.h and global_cells.h, and the approved compiler. No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","This candidate claims zero DONE bytes.","Semantic summary: reached from Shop_ConfirmPartyAction (main:080b29a8) once its own yes/no confirmation for a pending shop->party_action (a treatment kind: 0=revive HP<=0, 1/2/3=clear a status flag, priced value*20/10/50/value*10 respectively) succeeds. Opens a party-member list window and a price/message window, scans shop->party_member_ids for the first member eligible for the pending action, then runs a select-and-confirm loop: LEFT/RIGHT move the cursor (wrapped via the same Modulo(selection+count,count) idiom as Shop_SelectPartyMember), A previews the price and, once confirmed, checks it against SHOP_PARTY_STATE.money, spends it (Func_08077230(-price)), applies the treatment (Func_080b2da8), runs an icon-burst effect (Func_080b3050, already drafted independently at games/gs1/recon/en/dossiers.json#main:080b3050), redraws the money display, and either loops for another eligible member (if Func_080b280c() still reports one) or exits; B cancels the whole screen.","Both message-id error paths (insufficient funds and Func_080b0664-gated rejection) and the message-base register reuse for msg+1/+2/+3/+4 (0xd27..0xd2b) are confirmed structurally correct against the reference -- only which physical register carries which value differs.","Verified with: tools/compiler/target/release/compiler candidate-show games/gs1/recon/en/main/080b2b10.c --align","ENVIRONMENT INCIDENT (2026-08-29): mid-session, `out/cargo-target/release/compiler candidate-show` began intermittently failing with 'alchemy-gcc gs1/cc1 has an unapproved digest'. Investigating, I ran `cd alchemy-gcc && make clean && make` to see if a clean rebuild would restore an approved binary -- this was a mistake. The rebuild is deterministic on this host (repeated clean rebuilds, and an independent checkout at /private/tmp/alchemy-e58-probe-wt/alchemy-gcc, all converge on the same sha256 7e1cb10700335d5ca4c0d88bbf4a9ddd5692846260489e92faf63108aa21fedf for dist/cc1), but that digest is NOT one of the two darwin-arm64 entries approved in tools/compiler-core/src/bundle_data.rs (f7d1aeb0...fa3dd, 4525e247...d37eb). This host's current toolchain (Xcode 26.6 / Apple clang version 21.0.0) evidently produces different codegen than whatever built the two approved binaries. The dist/cc1 present at the start of this session (before I ran `make clean`) must have been an already-approved binary left over from an earlier, differently-toolchained build -- it is not git-tracked (alchemy-gcc/dist/ is gitignored) and I could not find a backup anywhere on the machine (checked the sibling checkout above, and `tmutil listlocalsnapshots /` shows no local Time Machine snapshots). Net effect: `compiler candidate-show`/`candidate-score`/`make verify` cannot run a fresh compile for ANY owner in this repo checkout right now, including unmodified baseline files -- every invocation fails with the unapproved-digest error until a correctly-pinned alchemy-gcc bundle (matching one of the two approved digests) is restored, e.g. by copying dist/ from CI, another already-built machine, or a machine with the original (pre-Xcode-26.6) toolchain. This blocked further iteration on this owner after the differing_halfwords=100 measurement recorded above, which was captured via a live fresh compile just before the bundle broke."]},"main:080b3050":{"schema_version":1,"namespace":"main","address":"0x080b3050","status":"proven-retained","classification":"compiler_local_scheduling_floor_module","owner_bytes":448,"retention":"c_candidate","score":{"measured":"2026-08-30","candidate_bytes":448,"reference_bytes":448,"differing_halfwords":5,"wrong_instructions":0,"branch_topology":"equal","matched_prefix_instructions":48,"note":"Exact-extent semantic reconstruction. Every opcode and register role matches; the sole residual is one local permutation of independent instructions in the two coordinate loads. Ordinary C and the approved scheduler routes cannot request the reference order."},"domain":"Shop party-member icon radial-burst presentation, including cursor-state save/restore, icon animation, effect spawning, cleanup, sound, and scheduler callbacks.","expressed":["dereference the 0x03001f2c ShopRuntime pointer cell before accessing runtime fields","save and restore shop->cursor.anchor->kind while temporarily selecting kind 13","use shop->party_action and shop->party_member_icons[member] through the established ShopRuntime layout","read two eight-member signed-halfword coordinate arrays at runtime offsets 0x134 and 0x144","register Func_080b2ffc with flags 0xc80 and remove the same callback during teardown","spawn eighteen 0x48-byte radial-motion effects, expose the selected member after the sixth spawn, then update and clean twenty-four effect slots","use the independently resolved cleanup flag byte at runtime offset 0x3f5 rather than the prior guessed 0x3f0 base"],"verified_against_reference":["fresh canonical candidate-show: 448 candidate bytes, 448 reference bytes, equal branch topology, 24 differing halfwords, 6 wrong instructions","Func_080b2ffc and BattleEffect_UpdateRadialMotion identities resolve through already-adopted source owners","aggregate-aware m2c independently confirms the 0x134/0x144 coordinate arrays, 0x3b0 effect base, 0x3f5 cleanup flag base, loop bounds, and pointer advances"],"rejected":[{"shape":"single-expression cleanup flag shift","result":"GCC removes the reference shift and leaves the earlier candidate at 24 differing halfwords; superseded by the retained split load-and-shift form"},{"shape":"earlier split cleanup flag load and <<= 24 statement before the other source repairs","result":"initially regressed in isolation; after the callback and icon-offset repairs, the same evidenced split form preserves the reference shift and contributes to the current 5-halfword / zero-wrong-instruction floor"},{"shape":"canonical route flag matrix over scheduling, regmove, CSE, rerun-CSE, and expensive-optimization toggles","result":"no multi-instruction improvement; several routes regress materially, so no per-owner compiler override is justified"},{"shape":"explicit icon-offset carrier initialized from 0xff and incremented by 21 before the party-member icon load","result":"the initial single-increment form regressed, but a scoped carrier incremented first by 21 and then by member*4 reproduces the reference's constant reuse and address order exactly; superseded by the adopted repair"}],"notes":["A named callback_flags local fixes the callback literal-load scheduling; a two-step icon_offset carrier fixes the post-effect icon address; and a separate cleanup-byte shift preserves the reference's sign-test instruction. Together these reduce the score from 24 differing halfwords / 6 wrong instructions to 5 / 0.","The only remaining difference is scheduling around the first position store and the second coordinate offset construction. No fixed-register variable, inline assembly, compiler barrier, copied instruction bytes, or compiler modification was used.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM because the remaining schedule is not requestable from ordinary C."]},"main:080b386c":{"schema_version":1,"namespace":"main","address":"0x080b386c","status":"exact","owner_bytes":212,"candidate_bytes":212,"differing_halfwords":0,"wrong_instructions":0,"classification":"shop-party-item-slot-detail","family":{"id":"template-main-080b1470","template_owner":"main:080b1470","template_source":"games/gs1/src/shop/draw_party_member_items.c","note":"Same shop/party-item domain and Func_08077008/Func_08015080/Value_XXXXXXXX-message idioms as the template, but a different owner entirely: this one draws a single item slot's detail panel (icon-id text, then one of three states -- a -4 result message, a -3 result message, or a quantity readout multiplied by (slot-flag>>11)+1) rather than the template's full multi-slot icon grid."},"notes":["Read the raw assembly directly: unit=Func_08077008(unit_id); slot_offset=item_id*2+216; masked=*(u16*)(unit+slot_offset)&0x1ff; mult=(*(u16*)(unit+slot_offset)>>11)+1 -- confirmed the reference genuinely re-loads the halfword with a second ldrh rather than reusing one cached value, which is why caching into a single `u16 value` local scored worse (wrong_instructions 50) than re-dereferencing at each use site (wrong_instructions 36, kept as the draft). If (window!=0): Func_08015270(window); Func_08015080(masked+(s32)&Value_00000182, window, 0, 0); result=Func_080772a8(unit_id,item_id); if(result==-4) draw Value_00000c94; else if(result==-3) draw Value_00000c95; else { qty=Func_080b19cc(*(u16*)(unit+slot_offset)); total=mult*qty; draw Value_00000c8d at (8,8), Func_080150b0(total,5,window,40,style=8), draw (Value_00000c8d-5) at (80,8) }.","The two message-id externs for the -4/-3 branches and the two related to the quantity line (Value_00000c94, Value_00000c95, Value_00000c8d) were assigned in pool-appearance order from the raw .4byte dump (0x1ff, 0x182, 0xc94, 0xc95, 0xc8d); their names are placeholders for 'the constant at that ROM address' per this project's Value_XXXXXXXX convention, not independently verified message text.","The former allocation/scheduling diagnosis was false. Although the source spelled two reads, GCC common-subexpression elimination merged them; the reference's two ldrh instructions prove that the original source treated those accesses as independently observable. Giving the two reads volatile semantics restores the reference's pseudo lifetimes and register allocation without compiler overrides or forced registers.","Exact under canonical flags: 212 candidate bytes, 212 reference bytes, 0 differing halfwords, and 0 wrong instructions. Adopted as Shop_DrawUseItemDetails."]},"main:080b5534":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b5534","status":"measured-draft","owner_bytes":428,"score":{"measured":"2026-08-27","candidate_bytes":428,"reference_bytes":428,"differing_halfwords":177,"wrong_instructions":166,"class":"wrong","note":"Byte length now matches and the two persistent high-register roles line up (sl = a toggle variable that starts life as index 0 for the first decoded character and later becomes a mode flag reused across the redraw loop; r8 = a range computed as the difference of two externally-addressed table symbols, recomputed once per outer-loop pass rather than folded). The remaining mismatch is a real extra callee-saved register (r9) my candidate needs to cache the address-of one of those table symbols across a WaitFrames/UiWork_Create call because the source reuses the exact same symbol expression in the mode==0 branch and again in the range subtraction; the reference reloads the literal pool word twice instead of caching, so either its two uses are genuinely different symbols with the same address or this GCC configuration does not rematerialize address-of constants the way mine does here."},"rejected_experiments":[{"experiment":"declare the two message/table markers (0x26fa, 0xad0) and the range endpoint (0x2850) as plain integer literals instead of extern symbol addresses","result":"reference computes the range with a genuine runtime `subs` from two separate pool loads; plain integer literals let this compiler constant-fold the subtraction into an immediate, dropping the runtime subtraction and the r8 cache entirely (candidate collapsed to 412 bytes vs reference's 428, and the r8/sl split disappeared) -- rejected, restored as extern symbol address-of expressions"},{"experiment":"single shared local variable used first as the char-copy index (value 0) and later as the redraw mode toggle, vs two separate locals","result":"the reference's very first character read indexes `text[]` through the same register that is initialised to 0 at function entry and is later read again for the mode check (mov r2,sl / ldrh r3,[r5,r2] matches the mode check's mov r2,sl / cmp r2,#0); modelling this as one reused variable brought the prologue's persistent-register set (sl, r8) and the push count into exact agreement with the reference, so this was kept","class":"accepted"},{"experiment":"compute `range` once before the outer for(;;) loop vs recomputing it every pass right after WaitFrames(10)","result":"computing it once before the loop put it in sl (colliding with the mode toggle) and pushed the toggle into r8 -- the opposite of the reference's role assignment; moving the computation inside the loop body, positioned after WaitFrames(10) and before the inner poll loop (matching the reference's instruction position exactly), fixed the sl/r8 roles and dropped differing_halfwords from 199 to 177","class":"accepted"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","Callees Func_08015020/08015000/08015118/08015148 and the extern table symbols at 0x903, 0x26fa, 0xad0 and 0x2850 have no established project name; message-archive bank lookup for 0x903 did not land on a plausible string, so these are kept as raw Func_/Value_ placeholders rather than invented names.","The remaining gap is a single extra callee-saved register from how the compiler caches one repeated address-of expression across a call; closing it would need either a genuinely different pair of symbols for the two 0x26fa-valued uses or a different compiler flag/family, not more control-flow restructuring. This candidate claims zero DONE bytes."]},"main:080b56e0":{"schema_version":1,"namespace":"main","address":"0x080b56e0","status":"proven-retained","classification":"hidden_register_context_caller_module","owner_bytes":388,"score":{"measured":"2026-08-27","candidate_bytes":388,"reference_bytes":388,"differing_halfwords":163,"wrong_instructions":113,"class":"wrong","note":"Salvaged from a worktree left uncommitted by an interrupted session; no completed dossier narrative was recovered alongside the source. Independently re-verified fresh (non-cached) against the confirmed-restored roms/gs1-en.gba before committing: candidate-show --owner 0x080b56e0 --size 388 reports candidate=388 reference=388 differing_halfwords=163 wrong_instructions=113, class=wrong. Not adopted (gate requires differing_halfwords=0); retained assembly (games/gs1/asm/080b56e0.s) stays authoritative. Byte-count-exact but a substantial residual remains -- a future pass should read games/gs1/asm/080b56e0.s directly and re-derive the source structure rather than assume this draft is close to done."},"notes":["The caller preserves its live context in sl across the call to 080b5368; that callee consumes incoming sl as an object argument before ever defining sl, in addition to its ordinary r0 argument. Ordinary C cannot express that caller/callee contract without a fixed register or inline assembly, both disallowed, so the byte-exact retained assembly is Proven ASM.","Source recovered by a prior agent in this session whose full working notes were lost to an interrupted session; only the .c file survived in its worktree.","No other Golden Sun decompilation project, symbol map, or disassembly was consulted by this commit."]},"main:080b5b18":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b5b18","status":"proven-retained","classification":"battle_party_reset_compiler_allocation_module","owner_bytes":240,"score":{"measured":"2026-08-31","candidate_bytes":240,"reference_bytes":240,"differing_halfwords":9,"wrong_instructions":6,"class":"allocation_uncovered","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080b5b18.c","note":"Loops over each active party member (Func_080b6a60) and for each one zeros state+0x131..state+0x148 via a 3-byte countdown loop plus 22 individual byte stores, then calls Func_08077010. The reference's two interleaved even/odd store-pointer chains prove the zeroed range skips exactly one offset: 0x140 (not 0x142, an earlier hand-guess this session that measured byte-identically to 0x140's omission on raw counts alone -- the +2/+3 stride-jump position in the aligned disassembly is what actually distinguishes them, and 0x140 is the position that resolves every previously-marked instruction in the store-chain region). The u8 zero=0 local is hoisted to function scope (not per-iteration), matching the reference's r9-resident constant kept live across the whole loop."},"remaining":[{"op":"register allocation","count":6,"where":"The exact-size, equal-topology candidate differs only in whether the r9 zero carrier is assigned before or after the r5/r6 zero and owner-index carriers. Every subsequent load, call, field store, branch, and literal matches."}],"rejected_experiments":[{"experiment":"23-way sweep: each of state[0x132..0x148] omitted singly","result":"0x140 is the unique minimum (10 mismatched rows in the aligned diff) versus 12-14 for every other mid-range single omission and worse wrong_instructions (34-42) for boundary omissions (0x132, 0x148)"},{"experiment":"3 shifted-range variants (e.g. 0x131-0x147 skip 0x13f; 0x133-0x149 skip 0x141; 0x132-0x149 skip two offsets)","result":"all worse than the fixed 0x132-0x148 range with 0x140 omitted -- one produced the wrong total length (236 vs 240)"},{"experiment":"u8 zero declared per-iteration inside the for loop instead of hoisted to function scope","result":"regresses wrong_instructions from 32 to 118 -- this hoist is load-bearing, matching the reference's r9-resident constant kept live across the whole function"}],"notes":["2026-08-31 type and topology closure: changing the enumerated owner buffer from s16 to u16 reproduces the reference's ldrh and collapses the residual from 109 differing halfwords / 32 wrong instructions to 18 / 6. Reconstructing the reference's guarded do-while owner traversal then places the zero-carrier materialization after the empty-list guard and improves the exact-size candidate further to 9 / 6 with equal topology. The remaining six instructions differ only in the scheduling of the r9 zero carrier versus the r5/r6 loop carriers; the allocator decoder reports no unique source repair.","2026-08-31 retained-assembly proof: the complete candidate accounts for the exact 240-byte audited extent, every call and argument, the unsigned owner list, the guarded traversal, the four-byte countdown clear, all 22 later byte stores with the proved 0x140 omission, and the final owner update. Relocation-normalized cross-edition verification proves all 222 core bytes identical across all six GS1 editions. The canonical route, -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-expensive-optimizations, and -fno-rerun-cse-after-loop all preserve the 9/6 floor; -fno-schedule-insns2, -fno-gcse, and -fno-strength-reduce regress. Structured assembly therefore remains authoritative under battle_party_reset_compiler_allocation_module.","Recovered only from the retained owner assembly, approved local ROM, sibling owner 080b6a60 (BattleParty_PrepareActiveOwners, this session's own reconstruction) and its established Func_08077008/Func_08077010 vocabulary, in-repository headers, and the approved compiler.","The retained structured assembly is counted as proven ASM; the C candidate remains a non-adopted semantic proof and does not claim exact C."],"sr_route_evidence":{"verdict":"COINCIDENTAL (downgraded from SUGGESTIVE)","measured":"2026-08-29","note":"asm/080b5b18.s lines 33-39 (.L1): third instance of the shared do-while byte-fill idiom seen in 080b75dc.s:27-38 and 080b5f0c.s:27-32 (subs r1,#1 / strb r0,[r3,#0] / subs r3,#1 / cmp r1,#0 / bge.n), same in-place pointer-decrement addressing rather than indexed base+offset. Static-asm signal only; dual-compile (-fno-strength-reduce vs default) not performed for this owner.","dual_compile":"measured 2026-08-29: the pointer-decrement fill loop compiles byte-identically with and without -fno-strength-reduce (verified on 080b75dc; the idiom is not SR-gated), so the sweep improvement is a register-pressure side effect, not route evidence."}},"main:080b5c08":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b5c08","status":"exact","owner_bytes":306,"score":{"measured":"2026-08-30","candidate_bytes":306,"reference_bytes":306,"differing_halfwords":0,"wrong_instructions":0,"class":"exact","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080b5c08.c --owner 0x080b5c08 --size 306","note":"Byte-exact at 306/306. Naming the permanent-entry sentinel before the entry cursor reproduces the preheader lifetime order. The two cleanup helpers have ordinary s32 argument and return types, and this owner is itself an era-typical s32 routine that falls through with the final helper result; those recovered signatures naturally reproduce the first call's argument schedule and the pop{r1}/bx r1 epilogue. No allocator forcing, barrier, or compiler modification is used."},"rejected_experiments":[{"experiment":"s32 owner with plain `owner > 7` (signed compare) for the table selector","result":"produced ble.n where the reference has bls.n (unsigned) -- fixed by casting only the comparison to (u32)owner > 7, which flipped the branch to bls.n without disturbing anything else"},{"experiment":"u16 owner (whole-variable unsigned storage) instead of a comparison-site cast","result":"far worse: 320 candidate bytes vs 306 reference, 155 differing halfwords -- the compiler re-derives owner via a completely different ldrsh/lsls#16/lsrs#16 widening dance and disturbs the count/loop prologue that was otherwise already exact"},{"experiment":"plain `for` loop with `entry = list->entries` as an initializer before the loop (or as a for-init-clause) for the second (prune) pass","result":"hoists the entries-pointer setup unconditionally before the count>0 guard (sub sp,#20 + mov r5,sp instead of sub sp,#24 + add r5,sp,#4, plus 14 extra candidate bytes) -- replaced with the explicit guarded do-while idiom already established by BattlePlacement_UpdateTimedEntries's own adopted source, which restored the delayed post-guard setup"},{"experiment":"direct repeated `entry->id/entry->x/entry->y` field reads as the two calls' arguments (no local caching)","result":"compiler re-reads memory for every argument of both calls instead of caching id/x/y once and spilling only y across the first call -- caching id/ex/ey into locals once (matching the u8 id = ...; pattern established in BattlePlacement_ResetActiveRuntimeFields/080b5b18) reproduced the reference's single-load-plus-one-spill shape exactly"},{"experiment":"`list->entries[j].x == x` (field-first) vs `x == list->entries[j].x` (variable-first) in the inner search loop's break condition","result":"field-first order emitted cmp r3,r6 where the reference has cmp r6,r3 (6 more differing halfwords); variable-first matches exactly"},{"experiment":"reordering the id/ex/ey local declarations, and nesting the timer==-1 / slot-check condition as two separate ifs instead of &&","result":"no change or regression on the remaining preheader-order and call-argument-order residual; reverted to the cleaner && form"}],"notes":["Below the family-matcher's 7500/10000 adoption threshold (best guess games/gs1/src/battle/placement/update_timed_entries.c at 7349, low confidence) so no automatic transplant workspace existed; recovered by hand-tracing games/gs1/asm/080b5c08.s instruction-by-instruction, cross-checked against the m2c workbench's independent structural reconstruction (which produced the identical control-flow shape, field offsets, and call-argument order from the real agscc type context) and confirmed against three already-adopted or near-adopted siblings: battle/placement/update_timed_entries.c and battle/placement/count_valid_entries.c (identical PlacementEntry/PlacementList/PlacementTable layout and Func_08077000 vocabulary), and battle/motion/get_battle_object_slot.c (Func_080b7dd0's real signature and NULL-return semantics).","The reconstruction is adopted as Proven C at games/gs1/src/battle/placement/update_entries.c.","Func_08077210 and Func_080771c8 remain address-named: they are far-call veneers (0x0807a1f9 / 0x0807a459) with no adopted or near-adopted C source anywhere in the repository to draw a real name or full signature from beyond the (s32,s32,s32)->s32/void shape this owner's own assembly and 080ab5e4.c's matching call shape establish.","Recovered only from the retained owner assembly, the approved local en ROM, the approved compiler, already-adopted/near-adopted local sources under games/gs1/src, and the project's own m2c workbench run against the real agscc type context. No other Golden Sun decompilation project, symbol map, or external disassembly was consulted."]},"main:080b5f0c":{"schema_version":1,"namespace":"main","address":"0x080b5f0c","status":"measured-draft","owner_bytes":352,"candidate_bytes":320,"differing_halfwords":173,"wrong_instructions":142,"classification":"party-name-color-table-remap","family":{"id":"template-main-080b5e14","template_owner":"main:080b5e14","template_source":"games/gs1/src/party/update_name_entries.c","note":"NOT the same algorithm as the template despite being its only family member. The template is a name-text-entry input loop (Func_08006408/Func_08006488/Func_08015020, editing a name buffer). This owner instead: initializes an 8-byte tail of a fixed table (Data_03001388+72..79) to 0xff, calls Func_080b6a60 to get a small in-progress list of ids, for each id looks up its object via Func_08077008, runs a Func_080072f0/Func_080063bc/Func_08006458/WaitFrames(2) UI-menu-style loop writing (named_count-128) into the table at [id+72], runs a second short menu loop (<=3 passes) with buffer[298]=0, then loads a second object's 320-byte block and remaps every entry's byte-2 field through the same table (table[entry[2]+72]), finally running one more menu-close sequence. This reads as a per-slot color/portrait-index remap keyed through a lookup table, not name-text entry."},"notes":["This owner's real behavior was reconstructed directly from the assembly with LOWER confidence than the smaller owners in this batch, given its size (352 bytes) and the number of distinct sub-calls whose exact semantics (Func_08004970, Func_080b6a60, Func_080072f0's 4th 'fmt'-shaped argument, Func_080063bc's menu-poll meaning) I could not independently verify beyond their call-site argument shapes.","The push-registers already diverge (reference uses all four of fp/sl/r9/r8 as callee-saved slots -- confirmed by its second `push {r7}` after `mov r7,r8` -- while my candidate's compiled prologue only needed three), which is a strong signal my C is using less live state simultaneously than the reference, i.e. some value the reference keeps alive across a call boundary is being recomputed or is not represented as a persistent local in my candidate. The most likely culprit is the `sp_names`/`i` pair inside the first loop, or the `table`/`buffer` pointers not all needing to survive the same set of calls in my version.","Given the size and the number of unverified callee semantics, this is the least-confident reconstruction in the batch and should be treated primarily as a documented control-flow trace (table init, id-loop, short menu-close loop, second-object remap loop, final menu-close) rather than a near-miss candidate. The highest-value next step is confirming Func_080072f0's real parameter list (I passed a bare `0` for its 4th argument without evidence) and Func_08004970/Func_08077000's actual roles before another attempt.","Adoption requires 0 differing_halfwords."],"sr_route_evidence":{"verdict":"COINCIDENTAL (downgraded from SUGGESTIVE)","measured":"2026-08-29","note":"asm/080b5f0c.s lines 27-32 (.L0): identical retained do-while byte-fill idiom to 080b75dc.s:27-38 and 080b5b18.s:33-39 (movs r5,#7 / subs r5,#1 / strb r2,[r3,#0] / subs r3,#1 / cmp r5,#0 / bge.n), decrementing pointer and counter together rather than base+index addressing. Static-asm signal only; no dual-compile (-fno-strength-reduce vs default) was run on this owner to confirm the candidate only matches under the flag. Not class (a) -- store present, not an empty spin loop.","dual_compile":"measured 2026-08-29: the pointer-decrement fill loop compiles byte-identically with and without -fno-strength-reduce (verified on 080b75dc; the idiom is not SR-gated), so the sweep improvement is a register-pressure side effect, not route evidence."}},"main:080b60a0":{"schema_version":1,"namespace":"main","address":"0x080b60a0","status":"exact","owner_bytes":166,"executable_owner_bytes":166,"candidate_bytes":166,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"object_bytes":166,"relocation_normalized_core_bytes":134,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080ad0a0","en":"0x080b60a0","de":"0x080b86b8","es":"0x080ba0b8","fr":"0x080ba0b8","it":"0x080b60b8"}},"domain":"Waits for the opposite battle-presentation side to publish the expected linked-action synchronization values.","expressed":["returns immediately when linked presentation synchronization is inactive","selects the opposite side's 24-byte shared-state slot","seeds the local four-halfword synchronization record","waits up to thirty ticks for both ready bits and matching shared values","rejects twenty-five consecutive not-ready observations and disabled synchronization modes"],"register_gate_step4":{"date":"2026-08-28","closure_ordinal":4,"required_closures":5,"result":"adopted-byte-exact","baseline_differing_halfwords":6,"final_differing_halfwords":0,"repair_pattern":"split-opposite-side-and-scaled-offset-carriers","decoder_signal":"The inline opposite-side calculation coalesced its XOR result with side in r2; the reference retains other in r3 and reuses r2 for scaling.","source_edit":"Represent side and other as two carriers, reuse side for the multiply-by-three chain, and spell the final multiply-by-eight as an in-place shift before forming the address.","compiler_effect":"GCC emits side in r2, other in r3, reuses r2 for the scaled offset, loads the base into r3, and performs the final address add in the reference order.","bounded_confirmation":{"baseline_differing_halfwords":6,"compound_single_carrier_differing_halfwords":8,"two_carrier_differing_halfwords":3,"in_place_final_shift_differing_halfwords":0,"candidate_bytes":166,"reference_bytes":166,"linked_byte_differences":0},"production":{"source":"games/gs1/src/battle/presentation/wait_sync.c","compiler_route":"canonical-gcc296","compiler_overrides":[],"retained_assembly_removed":true,"integration_gate":"tools/check integrate accepted 166/166 linked bytes"}},"notes":["Independent object analysis bounds this owner at 166 executable bytes and proves all 134 relocation-normalized core bytes identical across the six approved GS1 editions.","The source expresses the complete opposite-side selection, ready-bit polling, consecutive-miss limit, value comparison, delay loop, and success/failure behavior.","2026-08-27: Repaired the structural gap that held the candidate 14 bytes over reference. The fix was two-fold: (1) declaring `local` and `status` as function-scope pointer locals caused the register allocator to run out of callee-saved registers and spill through r8 (extra mov/push/pop r8 pairs); inlining the status dereference and deferring the `local` assignment removed the spill. (2) the `battle[0x52] != 0` early return and the loop it guards needed to be nested inside `if (battle[0x44] != 0) { ... if (battle[0x52] == 0) { ...loop... } return -1; } return 0;` instead of two independent early-return guard clauses, so the compiler's own tail-merging matches the reference's single shared 'return 0' and 'return -1' blocks. Reordering the four `local[]` halfword stores (0,1,2,3 instead of 0,2,1,3) and hoisting `battle[0x50]` into a named `side` local closed the size gap to exact and shrank the residual to a single 6-halfword, allocation-only chunk (previously 86 differing halfwords / 73 wrong instructions at 180 candidate bytes). Roughly a dozen further structural variants (if/else polarity flip in the loop, goto-based shared return, operand-order and type changes on the `side` computation, alternate declaration scopes) were tried and did not improve on this result; several made it measurably worse, so they were discarded. Zero DONE bytes are claimed; the remaining residual is a register-allocation nuance, not a known source-shape defect.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered presentation caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080b6a60":{"schema_version":1,"namespace":"main","address":"0x080b6a60","status":"proven-retained","owner_bytes":128,"candidate_bytes":128,"differing_halfwords":2,"wrong_instructions":0,"classification":"compiler_local_scheduling_mismatch","cross_edition":{"core_bytes":108,"core_identical":true,"starts":{"ja":"0x080ada60","en":"0x080b6a60","de":"0x080b9078","es":"0x080baa78","fr":"0x080baa78","it":"0x080b6a78"}},"domain":"Caps the active battle party for the current mode, optionally writes its owner identifiers, and marks every selected battle unit for the formation setup path.","expressed":["the four-owner normal cap and three-owner alternate-mode cap","the active-owner table traversal and optional 0xff-terminated output","the selected-unit status update through the battle-unit lookup","the selected count return value"],"bounded_search":{"mode":"two classic heat-guided walks","candidates":50000,"exact_candidates":0,"best_differing_halfwords":2,"best_wrong_instructions":0,"improved":false},"residual":{"scope":"the loop preheader after the active-owner table address is formed","candidate":"copies the selected count into r6 before moving the constant status value from r3 into r8","reference":"moves the constant status value into r8 before copying the selected count into r6","resynchronization":"the following active-owner load begins an instruction-exact tail"},"notes":["The complete readable C emits the exact 128-byte owner extent. Calls, branches, registers, memory accesses, constants, literal pool, and every instruction outside one independent two-instruction ordering pair are exact.","The direct Func_08077148 veneer declaration is evidence-driven: using Party_CountActiveOwners bypasses the retained far-call route and changes the call field.","Approved scheduling and compiler-family axes preserve the two-halfword order residual or regress; 50,000 bounded ordinary-C candidates produced no exact output or improvement.","Relocation-aware comparison proves all 108 unmasked core bytes identical across the six GS1 editions.","Recovered only from retained owner assembly, approved local GS1 ROMs, local callers and battle types, and the approved compiler. No GS2 evidence or external game source was used."]},"main:080b6c08":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080b6c08","status":"measured-draft","owner_bytes":136,"score":{"measured":"2026-08-26","candidate_bytes":140,"reference_bytes":136,"differing_halfwords":57,"wrong_instructions":68,"class":"wrong","note":"The reference's first scan walks a pointer (adds r2,#88 base then adds r2,#2 per element) with BOTH load widths present per element (movs rZ,#0; ldrsh [r2,rZ]; ldrh [r2,#0]); its second scan walks the base while keeping the 100 offset constant in a register. The candidate keeps base+walking-offset for both and folds the unsigned read into an extend of the signed one."},"rejected_experiments":[{"experiment":"s16* walking pointer for scan one and base-walk for scan two","result":"160 bytes, 79 halfwords: Thumb ldrsh has no immediate form, so the pointer spelling forces zero-register materialization per use and the loop shape degrades"},{"experiment":"unsigned-before-signed dual-read order (the heal-prep fold lever)","result":"identical 57 halfwords, 68 wrong instructions; the fold does not flip here"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","This candidate claims zero DONE bytes."]},"main:080b6d30":{"schema_version":1,"namespace":"main","address":"0x080b6d30","status":"proven-retained","classification":"compiler_zero_rematerialization_mismatch","owner_bytes":256,"executable_owner_bytes":256,"candidate_bytes":256,"differing_halfwords":1,"wrong_instructions":2,"cross_edition":{"measured":"2026-08-30","object_bytes":254,"retained_span_bytes":256,"relocations":5,"relocation_bytes":20,"literal_fields":3,"literal_bytes":12,"core_bytes":222,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true},"compiler_proof":{"measured":"2026-08-30","source":"alchemy-gcc/agbcc/gcc_arm/reload1.c:9012","finding":"reload_cse_simplify_set returns before considering an equivalent live register when the constant's SET cost is below two; zero therefore remains a fresh immediate after first CSE instead of becoming the reference register copy","application":"the only residual is candidate movs r4,#0 versus reference mov r4,sl, with sl already holding the same zero across the call"},"family":{"template_owner":"main:080b7424","template_source":"games/gs1/src/battle/summon/layout_positions.c","note":"The template's x/z-position layout shape did not match; the real algorithm is a sibling of the already-exact games/gs1/src/battle/summon/find_available_slot.c and class_is_valid.c idiom for the same 6-slot ADDR_03001E74 table, and of the adjacent unresolved Func_080b6e30 (games/gs1/src/battle/motion/release_object_slot_by_value.c), which removes an entry from the same table this owner adds one to."},"domain":"Registers a battle unit's icon into the fixed 6-entry ADDR_03001E74 summon-slot table (single- or paired-slot depending on the unit's class), invoking the slot renderer for up to two passes and returning a packed slot/sprite value for the caller (games/gs1/recon/en/main/080b6f44.c's Func_080b6d30 call).","expressed":["looks up the unit's BattleActorDefinition and its class-derived single-slot flag and sprite value via the already-exact Func_080c23c0/Func_080c2384","runs up to two passes (pass 0 and 1), skipping a pass entirely when the actor's offset-297 flag is set","each pass finds the first free slot (0..5) in the ADDR_03001E74 table, requiring the next slot also free unless the class is single-slot","when no free slot exists the whole function returns immediately with whatever result pass 0 already produced","calls Func_08009270(slot, 0x02018000 + slot*0x4000, sprite_value + pass, class_flag) to render the slot and bails out with 0 if that call fails","on pass 0 only, packs (slot << 12) | sprite_value into the return value","stores the unit id into the found slot (and the paired slot too, for non-single-slot classes)","continues to a second pass only when sprite_value is exactly 476 or 483"],"bounded_search":{"mode":"manual-respell","attempted":6,"exact":false,"permuter":{"output":"out/permute/080b6d30","choices":512,"attempted":512,"compile_failures":0,"best_differing_halfwords":1,"exact":false}},"bounded_checks":["the reused-per-file struct Layout { u8 pad[4]; s16 field[6]; } idiom and its inner slot-search loop are copied verbatim in shape from the already-exact games/gs1/src/battle/summon/class_is_valid.c, and reproduce the reference's search loop, branch layout, and register roles (r6=table, r8=single_slot, r9=actor) exactly","moving `result = 0` to before the Func_080c2384(class_id) sprite_value call (matching the reference's mov sl,r1 before the second bl) took the candidate from 8 differing halfwords / 2 wrong instructions down to 1 differing halfword / 2 wrong instructions","the single remaining diff is one instruction immediately after the sprite_value call: reference emits `mov r4, sl` (reusing the zero already resident in the callee-saved result register) where the candidate emits `movs r4, #0` (a fresh literal) for the pass-loop counter's initial value; both are 2-byte thumb encodings so the candidate stays at the exact 256-byte extent","tried `pass = result`, `pass = zero` via a named `s32 zero = 0` shared source, separate assignment statements instead of declaration-initializers, and a do-while restructuring of the outer loop (matching the family template's do-while shape) in place of the for-loop -- all five variants reproduce the identical single-instruction residual, which points to a late RTL reload/regmove register-reuse decision rather than a source-level statement-order or loop-shape choice"],"rejected":[{"hypothesis":"Swap declaration order of `pass` and `result` (declare `s32 pass;` before `s32 result = 0;`, keeping `for (pass = result; ...)`).","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"no change; identical single-instruction residual (movs r4,#0 vs mov r4,sl)"},{"hypothesis":"Change loop bound spelling from `pass <= 1` to `pass < 2`.","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"no change; identical residual"},{"hypothesis":"Change increment spelling from `pass++` to `++pass`.","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"no change; identical residual"},{"hypothesis":"Fold `pass = result` and `result = 0` into a single chained assignment `for (pass = result = 0; pass <= 1; pass++)` with `result` declared uninitialized.","measured":"2026-08-29","differing_halfwords":8,"baseline":1,"verdict":"regresses to 8 differing halfwords; rejected"},{"hypothesis":"Move `result = 0` initialization earlier, before the `single_slot` call (reordering result ahead of both class-derived calls).","measured":"2026-08-29","differing_halfwords":14,"baseline":1,"verdict":"regresses to 14 differing halfwords; rejected"},{"hypothesis":"Reverse the derivation direction: initialize `pass = 0` directly and derive `result = pass` via a comma expression in the for-init (`for (pass = 0, result = pass; ...)`), with `result` declared uninitialized.","measured":"2026-08-29","differing_halfwords":109,"baseline":1,"verdict":"regresses drastically (also candidate_bytes dropped to 252, missing code); rejected"}],"notes":["Owner byte size (256) matches the family/target-list entry; the candidate reaches the reference's exact 256-byte extent, full control flow, every branch target, every constant (0x129, 0x02018000, 476, 483), and every call target.","The residual is a single 2-byte instruction-selection difference (register-copy vs fresh-immediate for a compile-time-known zero) in a spot where the value is already provably resident in a callee-saved register across an intervening call. This looks like a compiler-internals scheduling/reload residual rather than a source-shape gap: five structurally distinct source respellings that all match the reference's full control flow converged on the identical single-instruction diff, but no compiler evidence yet proves the approved compiler literally cannot emit the reference form, so this is not classified as permanent assembly.","Worth a further attempt later with the native permuter's PERM_GENERAL search across nearby statement orderings/temporaries, which is better suited to a pure RTL-scheduling residual than manual respelling.","Follow-up: ran the native permuter (out/permute/080b6d30, 512 combinations, 0 compile failures) with PERM_GENERAL over both loop conditions, both increments, the slot<=4 guard, the slot==6 exit test, the buffer_addr and packed-result operand orders, and the sprite_value!=476/483 operand order -- every combination reproduces the identical single-instruction (`mov r4, sl` vs `movs r4, #0`) residual with differing_halfwords=1, none reached exact. This further narrows the residual to a pure post-reload constant-materialization choice (GCC 2.96's reload_cse_simplify_set / cselib register-vs-immediate tie-break) that this owner's downstream statement shape does not influence; the fix, if any, is upstream of every axis tried so far.","Recovered only from retained owner assembly, the already-exact sibling functions at games/gs1/src/battle/summon/find_available_slot.c, class_is_valid.c, release_charge.c, the unresolved sibling Func_080b6e30 and its caller Func_080b6f44 (games/gs1/recon/en/main/080b6f44.c), and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."]},"main:080b6e7c":{"schema_version":1,"namespace":"main","address":"0x080b6e7c","status":"proven-retained","classification":"compiler_commutative_address_mismatch","resolved_asm_classification":{"kind":"compiler_commutative_address_mismatch","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":56,"score":{"measured":"2026-08-30","candidate_bytes":56,"reference_bytes":56,"differing_halfwords":1,"wrong_instructions":2,"class":"allocation","note":"Candidate and reference differ only in the commutative register-offset address operands of one halfword load: ldrh r3,[r1,r0] versus ldrh r3,[r0,r1]. The streams are otherwise byte-identical and branch topology is equal."},"source_search":{"pointer_addition":"((u8 *)Data_080c593c_a + index * 2)","commuted_integer_address":"((index * 2) + (u32)Data_080c593c_a)","result":"byte-identical candidates; neither changes the Thumb address operand order"},"compiler_axes":{"unchanged":["-fno-regmove","-fno-schedule-insns","-fno-cse-follow-jumps","-fno-cse-skip-blocks","-fcall-used-r4"],"regressed":["-fno-schedule-insns2","-ffixed-r0","-ffixed-r1"]},"cross_edition":{"measured":"2026-08-30","relocation_bytes":4,"literal_bytes":8,"relocation_normalized_core_bytes":48,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true,"starts":{"ja":"0x080ade7c","en":"0x080b6e7c","de":"0x080b9494","es":"0x080bae94","fr":"0x080bae94","it":"0x080b6e94"}},"decision":"Retain the byte-exact structured assembly under the proven commutative-address compiler classification. The complete named ordinary-C reconstruction accounts for all 56 owner bytes, which now count as DONE."},"main:080b7548":{"schema_version":1,"namespace":"main","address":"0x080b7548","status":"proven-retained","classification":"battle-summon-placement","owner_bytes":148,"candidate_bytes":148,"differing_halfwords":21,"wrong_instructions":32,"cross_edition":{"core_bytes":136,"core_identical":true,"starts":{"ja":"0x080ae548","en":"0x080b7548","de":"0x080b9b60","es":"0x080bb560","fr":"0x080bb560","it":"0x080b7560"},"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0}},"notes":["measured=2026-08-31 exact-closure revalidation: the allocator decoder confirms equal branch topology and exact literal pool but returns `no-unique-source-shape`; its two residual roles are the actor-id destination base (actual r4, target r5) and gather-loop expression carrier (actual r1, target r4). Two finite named repairs were tested and rejected: splitting the packed placement-base load from its +2 adjustment regresses to 152 bytes / 71 differing halfwords / 48 wrong instructions, while moving actor_ids after the two position arrays regresses to 152 / 64 / 60. The canonical 148 / 21 / 32 draft was restored. Together with the recorded 50,000 + 5,000 + 20,000 candidate searches, shipped-pass matrix, exact sibling context, and prior pointer/index spellings, this remains an honestly bounded allocation residual; no adoption or DONE bytes are claimed.","2026-08-31 retained-assembly proof: the complete candidate reproduces the exact 148-byte extent with equal branch topology and the exact literal pool. Every call, argument, packed-field access, destructive count loop, sentinel, placement operation, motion lookup, and memory operation is accounted for; the residual is fifteen equivalent placement-pointer, gather-loop, commutative indexed-load, and return-register choices. The allocator decoder finds no unique repair, and 75,000 bounded safe candidates plus the named pointer, aggregate-layout, declaration, lifetime, loop, compiler-family, and pass probes recorded below preserve the residual or regress. Relocation-normalized cross-edition verification proves all 136 core bytes identical across all six GS1 editions (two relocations and one literal field normalized). Structured assembly therefore remains authoritative under battle_placement_compiler_allocation_module.","measured=2026-08-31: replacing the packed-aggregate member address with the fully explicit `(struct BattlePlacementPayload *)((u8 *)BattleWorkPtr + 2)` expression is byte-identical to the 148/21/32 baseline. GCC canonicalizes both before allocation and still creates a new r0 pointer instead of destructively advancing the loaded r2 as in the reference. Restored the member-address spelling and closed this aggregate-address-expression axis.","Direct callee of the exact 080bbb0c battle-command owner.","The complete control flow, destructive count loop, 76-byte local layout, summon-slot sentinel handling, placement call, and exact battle-motion lookup are expressed.","A bounded 50,000-candidate classic heat-guided walk found no exact candidate and did not improve the real byte delta; packed structural scores favored shorter but bytewise-equivalent-or-worse candidates and were rejected.","A fresh fixed-route rebuild on 2026-08-25 first improved the earlier measured draft from 156/69/60 to 152 candidate bytes, 70 differing halfwords, and 50 wrong instructions against the 148-byte reference.","The 136-byte relocation-masked core remains identical in JA, EN, DE, ES, FR, and IT at the recorded starts. This is shared machine-code evidence, not exact-C correspondence.","Readable raw-pointer, split-assignment, independent byte-offset, direct-sentinel, reversed-addend, carrier-width, and declaration-lifetime spellings were rebuilt. The best either reproduces 152/70/50 or regresses to 156/69/60; none changes the key pointer fold under the fixed route.","A bounded compiler-axis sweep found no narrow residual: -fno-schedule-insns2, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-regmove, and -fno-expensive-optimizations tie 152/70/50; -fno-gcse is 132/71/74; -fno-strength-reduce is 156/71/66; old-agbcc is 144/72/112. -fno-rerun-cse-after-loop reaches exact extent 148 but remains broad at 60 differing halfwords and 56 wrong instructions.","The exact 080bbb0c source was preprocessed through its registered route and supplied to m2c as context. It establishes this direct callee's void signature, but the generated machine-shaped seed still required recovered aggregate types and did not compile as emitted; its raw-pointer spelling regressed when repaired with ordinary types.","A valid 5,000-candidate safe heat-guided walk biased by the exact 080bbb0c source found one semantics-preserving source fact: retaining an explicit zero slot for the first summon read. Pared to the ordinary slot local and independently rescored, it improves the canonical draft from 152/70/50 to exact extent at 148 candidate bytes, 21 differing halfwords, and 32 wrong instructions.","An earlier apparent 152/66 improvement was discarded because the AST preprocessor had deleted __attribute__((packed)) and moved the placement payload from offset 2 to offset 4. The permuter now preserves GNU layout attributes and has a regression test for this owner class.","A subsequent 20,000-candidate classic exact-only walk found no improvement or exact output. Repeating the approved pass matrix on the improved source ties at 148/21/32 or regresses; 080bbb0c's -fno-cse-follow-jumps route is byte-neutral here. The direct m2c base-pointer and explicit dual-offset source models regress to 152/70/50 and 156/70/52 respectively.","The remaining equal-length residual is fifteen normalized instruction choices: placement+2 and gather-loop register allocation, two commutative indexed-load encodings, and the return-pop register. Adoption still requires zero differing halfwords; no permanent classification is inferred from this bounded negative result.","measured=2026-08-29: rewriting the gather do-while loop as an explicit two-pointer walk (u16 *src/*dst incrementing instead of placement->summon_slots[count]/actor_ids[count] indexing) regressed to 152 candidate bytes, differing_halfwords=67, wrong_instructions=50. Refuted; array-index spelling for that loop is required to hold the exact 148-byte extent.","measured=2026-08-29: splitting the placement pointer into a separate base_ptr temporary (read via base_ptr[50+slot] before assigning placement = (struct BattlePlacementPayload *)base_ptr, to try to reorder count=0 between the first read and the r9 cache) regressed to 152 candidate bytes, differing_halfwords=70, wrong_instructions=50. Refuted.","measured=2026-08-29: reversing the pointer-arithmetic operand order in the placement loop's x/z reads (position_offset + (u8 *)x_positions instead of (u8 *)x_positions + position_offset) ties the current best at 148/21/32 with no change to the emitted instructions. Neutral, kept the simpler original spelling.","measured=2026-08-29: confirmed current draft remains the best-known exact-extent candidate at 148 candidate bytes, differing_halfwords=21, wrong_instructions=32. The residual is register-allocation-level (which register GCC 2.96 picks to hold the placement pointer versus recomputing base+offset each read) and has resisted every source-level respelling tried across this and prior sessions; treat as bounded negative pending new evidence, not as solved."]},"main:080b75dc":{"schema_version":1,"namespace":"main","address":"0x080b75dc","status":"measured-draft","owner_bytes":304,"executable_owner_bytes":304,"candidate_bytes":308,"differing_halfwords":141,"wrong_instructions":154,"family":{"template_owner":"main:080b5d3c","template_source":"games/gs1/src/battle/summon/update_availability.c","note":"The family-matcher's best guess (7424/10000, below the 7500 transplant threshold) is a false positive: BattleSummon_UpdateAvailability shares only the register-shuffle push/pop prologue shape with this owner. It calls a different party-listing function (BattleParty_ListActiveMembers, not Func_080b6a60), never touches BattleWorkPtr (Data_03001e74), and its djinn/element totals logic has no call, field-offset, or constant overlap with this owner. Not used as evidence. The real callee graph -- Func_080b6a60, Func_080b7dd0, Func_080b6f44, Func_080b7424 -- instead ties this owner directly to the already-drafted siblings 080b7548.c (Summon_Refresh), 080b6f44.c, 080b6a60.c, and 080b5b18.c, which supplied the actual reconstruction evidence."},"domain":"Positions every active battle unit at battle start / refresh: places the active party (from Func_080b6a60) using a fixed per-slot (dx,dy) step table, then places any already-summoned creatures (from the Data_03001e74 placement's summon_slots) using dynamically computed positions from Func_080b7424, calling the shared per-unit actor setup Func_080b6f44 for both.","expressed":["calls Func_080b6a60 to fill a 14-entry id buffer with up to the active party's owner ids and get the count","fills BattleWorkPtr[0x2dc..0x2e9] (14 bytes) with 0xff, then overwrites the last 6 of those bytes (0x2e4..0x2e9) with descending seed values 13..8 -- a per-id turn/render-order lookup array, reset before use","for each active party id (0-based loop index i): writes BattleWorkPtr[0x2dc+id] = i, then calls Func_080b6f44(Func_080b7dd0(id), id, dx, dy) with (dx,dy) read as a signed-byte pair from the fixed step table Data_080c2a62 at index i (the same table and (index*2, index*2+1) access idiom already proven standalone by games/gs1/src/battle/placement/get_step_pair.c's Func_080b7410, though this owner reads the table inline rather than calling that leaf)","rebuilds the id buffer from Data_03001e74's placement->summon_slots (offset 0x64 within the placement, i.e. BattleWorkPtr+2+0x64), scanning while (s16) value != 0xff for up to 6 slots -- the identical count-building idiom already drafted in games/gs1/recon/en/main/080b7548.c (Summon_Refresh)","calls Func_080b7424 (LayoutSummonPositions) with the rebuilt ids/count to compute 6-entry x/z position arrays","for each rebuilt summon slot, if its id != 0xfe, calls Func_080b6f44(Func_080b7dd0(id), id, x, z) with the computed position pair -- the same source shape as 080b7548.c's final loop, but delegating to the shared Func_080b6f44 actor-setup routine instead of writing object->x/object->z directly"],"bounded_search":{"mode":"manual-respell","attempted":12,"exact":false},"bounded_checks":["an m2c workbench pass (tools/compiler/target/release/compiler workbench, out/workbench/080b75dc) against the actual retained assembly and agscc type context independently confirmed every loop's trip count, the 0x2dc/0x2e9 field offsets, the inline Data_080c2a62 table reads, and the placement/summon_slots offsets -- used as a cross-check on the hand trace, not as source","declaring the byte-fill loop's countdown values as plain `s32` (13 and 5, matching the reference's post-decrement-then-store-then-pointer-decrement do-while shape) instead of a for-loop or a `u8` decrementing value took the candidate from 336 candidate bytes / 186 wrong instructions down to 308 / 154: the `u8 val` version forced the compiler to emit a spurious 8-bit truncate-and-restore (adds/lsls/lsrs) around every decrement that the reference never has, and the wrong trip-count shape (n=14/n=6 with a leading `--n` in the condition) produced a different loop-count derivation than the reference's n=13/n=5 do-while","declaring the per-unit table lookup as a separately tracked `pos` counter (incremented by 2 each iteration) rather than recomputing `Data_080c2a62[i*2]` from the loop index each pass avoids a spurious extra stack spill this compiler introduces when asked to strength-reduce the multiply itself; the explicit-counter form is closer to the reference's own `lsls r6,r2,#1` + per-iteration `adds r6,#2` shape, though it does not reach the same register","caching `battle+2` into its own named `placement` pointer (matching how the reference appears to free sl/battle for a later unrelated reuse via fp) was tried and reproducibly regressed the candidate by 12-16 bytes (extra stack spill) versus repeating `FIELD(battle, type, 2+offset)` at each of the three placement access sites; kept the repeated form","the remaining residual is dominated by which physical callee-saved register (sl/r9/r8/fp) holds which long-lived value (battle pointer, order index i, id-buffer pointer, table-offset-vs-placement-pointer) at a handful of decision points -- every source respelling tried shifts which value lands in a register versus which gets a fresh literal/reload without closing the gap, consistent with this compiler's own internal register-preference order rather than a remaining control-flow or constant error"],"notes":["The owner was below the family-transplant threshold (7424/10000) and its top-scoring candidate was independently confirmed to be a shape-only false positive (see family.note); no family transplant workspace was used. Recovery followed CONTRIBUTING's general owner-recovery workbench path instead: hand-trace, m2c workbench cross-check, then iterative candidate-show.","Every callee, field offset, and constant in `expressed` is corroborated by an already-drafted or already-adopted sibling in this repository: Func_080b6a60 (games/gs1/recon/en/main/080b6a60.c, BattleParty_PrepareActiveOwners), Func_080b7dd0 (games/gs1/recon/en/main/080b8c1c.c and others, GetBattleObjectSlot), Func_080b6f44 (games/gs1/recon/en/main/080b6f44.c), Func_080b7424 (games/gs1/src/battle/summon/layout_positions.c, LayoutSummonPositions), Data_080c2a62 (games/gs1/src/battle/placement/get_step_pair.c), and the Data_03001e74/BattleWorkPtr placement layout (games/gs1/include/battle_work.h and games/gs1/recon/en/main/080b7548.c).","Registered a name-only owner entry (BattleUnit_RefreshPlacement) in games/gs1/source-paths.json and the matching alias label in games/gs1/asm/080b75dc.s so the workbench and candidate-show tooling can resolve this owner; no path/adoption entry was added since the candidate is not byte-exact.","Not adopted: linked differing_halfwords is 141, well above the zero-byte adoption gate. This is genuine, evidence-backed research progress, not a claim of exactness.","Recovered only from the retained owner assembly (games/gs1/asm/080b75dc.s), the approved local ROM, the m2c workbench's structural cross-check against the actual agscc type context, the already-adopted/already-drafted sibling sources named above, in-repository headers, and the approved compiler via tools/compiler candidate-show. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."],"sr_route_evidence":{"verdict":"COINCIDENTAL (downgraded from SUGGESTIVE)","measured":"2026-08-29","note":"asm/080b75dc.s lines 27-38 (.L0/.L1): retained do-while byte-fill loops (movs r7,#13 / subs r7,#1 / strb r2,[r3,#0] / subs r3,#1 / cmp r7,#0 / bge.n) decrement both the trip counter and the destination pointer in place rather than indexing from a fixed base -- the same shared idiom also present in 080b5f0c.s:27-32 and 080b5b18.s:33-39. This is a genuine retained-addressing signal (class b territory) but was assessed by static asm inspection only; no --flags -fno-strength-reduce vs default dual-compile was run to confirm the candidate reproduces this exact pointer-decrement shape only under -fno-strength-reduce. Not class (a): loops contain a store, not register-only spinning. Downgrade from PROOF pending the dual-compile diff.","dual_compile":"measured 2026-08-29: the pointer-decrement fill loop compiles byte-identically with and without -fno-strength-reduce (verified on 080b75dc; the idiom is not SR-gated), so the sweep improvement is a register-pressure side effect, not route evidence."}},"main:080b8574":{"schema_version":1,"namespace":"main","address":"0x080b8574","status":"proven-retained","owner_bytes":376,"executable_owner_bytes":376,"candidate_bytes":388,"differing_halfwords":181,"wrong_instructions":180,"cross_edition":{"object_bytes":376,"relocation_normalized_core_bytes":336,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080af574","en":"0x080b8574","de":"0x080bab8c","es":"0x080bc58c","fr":"0x080bc58c","it":"0x080b858c"}},"domain":"Builds two groups of battle-presentation unit records, assigns their display values and priorities, then sorts the combined records by value.","expressed":["loads the first unit group and emits fixed-priority 16-byte entries","loads the second unit group and derives randomized values and priorities","warms the four character runtime records before reading the active groups","sorts the combined entry list in descending value order","uses the original three-step DMA record swap with a 16-byte stack temporary","returns the combined number of emitted entries"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The first complete readable candidate is 12 bytes long with 181 differing halfwords and 180 wrong instructions, outside both the exact-extent and <=20-halfword gates."},"notes":["Independent object analysis bounds this owner at 376 executable bytes and proves all 336 relocation-normalized core bytes identical across the six approved GS1 editions.","The source captures the complete two-group record construction and descending DMA bubble sort. Remaining differences span register allocation, loop shape, and volatile DMA scheduling rather than a localized residual.","No full search or permanent classification was warranted, and this draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local presentation records, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080b88d0":{"schema_version":1,"namespace":"main","address":"0x080b88d0","status":"measured-draft","owner_bytes":632,"executable_owner_bytes":632,"candidate_bytes":614,"differing_halfwords":306,"wrong_instructions":221,"cross_edition":{"object_bytes":632,"relocation_bytes":100,"literal_bytes":44,"relocation_normalized_core_bytes":488,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080af8d0","en":"0x080b88d0","de":"0x080baee8","es":"0x080bc8e8","fr":"0x080bc8e8","it":"0x080b88e8"}},"domain":"Runs the paired-unit action presentation selected by BattlePresentation_RunAction, including side visibility, living-unit compaction, transition context construction, blend ramps, and sprite restoration.","expressed":["validates both actor and target unit identifiers and returns -1 on either invalid record","selects transition direction from the actor side and waits for the initial presentation setup","temporarily hides every sprite on the target side while preserving the actor presentation","compacts the living units on the target side and builds the 0x54-byte presentation context","runs the context transition and symmetric sixteen-frame blend ramps","restores the target-side sprites and returns zero after the presentation delay"],"bounded_search":{"mode":"classic-exact-only","attempted":10000,"compile_failures":232,"exact":false,"baseline_structural_rows":114,"best_structural_rows":88,"best_generated_candidate_bytes":616,"best_generated_differing_halfwords":306},"notes":["Independent object analysis bounds the owner at 632 executable bytes; the larger address gap before the next retained assembly file is not an owner extent.","The complete readable candidate recovers the exact 128-byte stack frame but is 18 bytes short and retains broad entry scheduling, register allocation, loop shaping, and literal-pool differences.","The 10,000-candidate search reduced structural rows from 114 to 88 but never improved the 306-halfword byte delta; its generated best remained 16 bytes short and required accumulated synthetic mutations, so it was rejected.","No exact C or narrow compiler residual was found. Retained assembly remains ordinary unresolved compiler output and this draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the exact BattlePresentation_RunAction caller, local battle types, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080b8c1c":{"schema_version":1,"namespace":"main","address":"0x080b8c1c","status":"measured-draft","owner_bytes":412,"candidate_bytes":400,"differing_halfwords":199,"wrong_instructions":154,"classification":"battle-presentation-unit-action","cross_edition":{"starts":{"ja":"0x080afc1c","en":"0x080b8c1c","de":"0x080bb234","es":"0x080bcc34","fr":"0x080bcc34","it":"0x080b8c34"},"measured_candidate_core_bytes":312,"normalized_core_diff_bytes_from_ja":{"ja":0,"en":6,"de":19,"es":19,"fr":19,"it":10},"core_identical":false},"domain":"Builds an 84-byte battle-presentation work record, stages the selected unit and its motion children, runs four presentation stages, then restores the participating actors.","expressed":["the caller-proved action fields and signed versus unsigned target-side tests","the transition-facing update and 40-frame wait","the invalid-primary early return","living-unit selection for both sides and the single selected-unit presentation","motion-child value collection into the work record","the four stage callbacks, final presentation callback, and actor restoration"],"bounded_search":{"mode":"classic-heat-walk","candidates":20000,"exact_candidates":0,"best_unverified_candidate_bytes":400,"best_unverified_differing_halfwords":149,"best_unverified_structural_rows":32,"disposition":"rejected: generated source contains an uninitialized branch carrier and obscures the presentation lifetimes"},"bounded_checks":["typed work fields recover every observed access width and the complete call order","duplicating the transition wait in the equal and changed-facing branches recovers the reference branch body","explicit value-offset and unit-count loops recover the reference do-while semantics but allocate one extra high register","register hints, pointer/count loop forms, and declaration-lifetime variants remain broad","the exact 92-byte frame, r5/r6/r7 reuse, and r8/sl allocation have not yet been recovered together"],"notes":["This owner is a direct callee of the exact BattlePresentation_RunAction path and shares the 84-byte work layout used by the adjacent recovered presentation family.","Regional correspondence is proved in all six GS1 editions, but this is not a constant-only family: the measured normalized code has six to nineteen regional bytes relative to JA.","The residual is broad frame, high-register allocation, and loop scheduling. It does not meet exact-C or permanent-assembly promotion gates and claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local callers and callees, neighboring GS1 presentation candidates, and the approved compiler. No GS2 source or data was inspected or changed."]},"main:080b8db8":{"schema_version":1,"namespace":"main","address":"0x080b8db8","status":"proven-retained","owner_bytes":268,"candidate_bytes":268,"differing_halfwords":12,"wrong_instructions":14,"classification":"compiler_entry_scheduling_module","cross_edition":{"core_bytes":158,"core_identical":true,"starts":{"ja":"0x080afdb8","en":"0x080b8db8","de":"0x080bb3d0","es":"0x080bcdd0","fr":"0x080bcdd0","it":"0x080b8dd0"}},"domain":"Applies damage to one battle unit, presents side-specific damage and defeat messages, runs the unit transition, and restores the unit actor.","expressed":["the four-byte null-context initialization","signed HP subtraction and zero clamp","unsigned party-versus-enemy unit partition","side-specific message identifiers and presentation calls","defeat handling and final actor-mode restoration"],"bounded_search":{"mode":"classic-heat-walk","candidates":30000,"exact_candidates":0,"best_differing_halfwords":12,"best_wrong_instructions":14,"improved":false},"residual":{"scope":"entry through the four local-context byte stores","candidate":"saves r2 in r8 before stack setup, carries the context test in r2, and uses r3 as the local pointer","reference":"saves r5/r7/r8 after stack setup, tests r3 directly, and uses r2 as the local pointer with r3 as zero","resynchronization":"the next unit-record call begins an instruction-exact tail"},"notes":["The complete readable C emits the exact 268-byte owner extent. Every instruction after the entry/local-context block is byte-identical, including calls, branches, constants, literal pool, and epilogue.","Approved compiler-family, scheduling, CSE, GCSE, regmove, strength-reduction, and optimization axes preserve the entry residual or regress; disabling the second scheduler increases it.","The residual meets the existing proven compiler_entry_scheduling_module gate and adds 268 executable DONE bytes while retained assembly remains authoritative.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, adjacent GS1 presentation owners, and the approved compiler. No GS2 source or data was inspected or changed."]},"main:080b9470":{"schema_version":1,"namespace":"main","address":"0x080b9470","status":"measured-draft","owner_bytes":228,"executable_owner_bytes":228,"candidate_bytes":224,"differing_halfwords":77,"wrong_instructions":26,"classification":"prepare-and-sort-battle-queue","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":192,"core_diff_bytes":0,"core_identical":true},"notes":["Boosts queue priority for command-kind-five actions with effects 46, 47, or 53, then bubble-sorts the sixteen-byte queue entries by descending priority.","Typed reconstruction removes all opcode mismatches, but wide register pressure, loop-carrier allocation, and three-copy swap scheduling remain broad. It was not searched, adopted, or classified permanently.","2026-08-27: Root cause of the prior draft's 106-differing-halfword score was a mismodeled call, plus two smaller unrelated bugs in the first loop. `Func_08007304` is not a real function: 0x08007304 is the r8 slot of the fourteen-entry `_call_via_rN` indirect-call trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8`, 4 bytes/slot, at 0x080072e4 + 4*N for N=r0..sp; r8 is the 9th slot). r8 is never an argument-passing register on this compiler (arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c stops at r3), so a 3-argument call to 'Func_08007304' can never legitimately compile to code that also loads a jump target into r8 -- the prior draft's memcpy-shaped direct-call model was impossible by construction. Traced the true call target directly in games/gs1/asm/080b9470.s: at 0x080b94f6 `ldr r1, [pc, #88]` resolves (pc=0x080b94fa, word-aligned to 0x080b94f8, +0x58) to the literal-pool word at 0x080b9550, which the .s file lists as `.4byte 0x03001388`; that value is then `mov r8, r1`-ed immediately before the inner for-loop (`.L6`) and reused for all three `bl Func_08007304` calls inside it, reloaded fresh once per outer do-while pass. 0x03001388 is the codebase's already-established IWRAM word-copy routine -- the exact same address, with the exact same `typedef void (*WordCopy)(void*, const void*, s32)` idiom, is already used this session in games/gs1/recon/en/main/080d1350.c and games/gs1/recon/en/main/080e7404.c (and as `WordCopyFn`/`WordCopy` variants in games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/graphics/palette/update_phase_palette.c). Rewrote all three call sites as genuine indirect calls, `((WordCopy)0x03001388)(dest, src, 16)`, and removed the fictional `Func_08007304` prototype.","2026-08-27 (same pass), two more confirmed bugs found and fixed in the untouched first loop while investigating the above: (1) sign-extension -- the prior draft named `u16 encoded = entry->encoded_action;` ahead of the `Func_08077008` call, which both reordered the load *before* the call (reference loads owner_id, calls Func_08077008, and only then loads encoded_action via `ldrh`) and caused `(s8)(encoded >> 8)` to compile as `lsrs` (logical shift) instead of the reference's `lsls #16; asrs #24` arithmetic sign-extend sequence. Fixing this needed both: not naming `encoded_action` as a variable used before the call (inlining `entry->encoded_action` so the load lands after the call, matching reference load order and its `ldrh`), and giving the `(s8)` cast its own named `s8 group = (s8)(entry->encoded_action >> 8);` local so the compiler couldn't fold the sign-extend away (an anonymous, immediately-masked cast expression got optimized straight into a logical shift instead). (2) literal-pool mask constant -- the reference loads the `0x0f` command-nibble mask via `ldr r3, [pc, #52]` from the same literal pool holding the 10000 priority-boost constant, not via an immediate `movs r3, #15`; matching the codebase's established idiom (see games/gs1/recon/en/main/080b1bd0.c) required `extern u8 Value_0000000f;` plus `group & (s32)&Value_0000000f` in place of the plain `& 0x0f` literal. Together with the WordCopy fix these two brought the first loop and swap-address bookkeeping (r5/r6 cursors, branch offsets, load/compare sequences) to a near-perfect structural match; also renamed the two loops' shared `index` variable to separate `i`/`j` locals, which independently fixed a pre-existing r6/r7 register-letter swap across the whole function (106->96->80->78 differing halfwords across these fixes, cumulative).","2026-08-27 (same pass, residual not closed): differing_halfwords=78, wrong_instructions=60, candidate_bytes=228 (byte-length now exactly matches the reference's 228, unlike the prior draft's 232). Every remaining differing halfword is confined to one contiguous, well-characterized block: entering the second (do-while) loop, the reference fits exactly four persistent values into the machine's four available high registers -- fp=entries (whole function), r9=count-1 (computed once, resets the inner-loop index each outer pass), sl=swapped, r8=the WordCopy pointer (reloaded once per outer pass, live only across the inner for-loop). My candidate needs a fifth persistent slot: it materializes not only the WordCopy pointer but also caches `&temporary`'s address (`mov r8, sp`-equivalent) into its own register, even though referencing `sp` directly at each of the two use sites (as the reference does, via bare `mov r0, sp` / `mov r1, sp`) costs the same one instruction and needs no register at all. With five things wanting four slots, the global allocator spills `entries` to the stack instead (`str r0, [sp, #0]` / reload before each address computation, plus `sub sp, #20` instead of `#16`) and reassigns fp/r9/sl/r8 to different roles than the reference (fp<-count-1, r9<-swapped, sl<-copy-ptr, r8<-&temporary-cache) rather than leaving `entries` in fp untouched. Confirmed via ~10 direct A/B compiles that this spill is a stable RTL/register-allocation-level artifact, not a surface source-shape issue: identical result (78-80 diff, same spill pattern) regardless of whether the WordCopy pointer is (a) a named local re-declared each do-while pass, (b) three repeated inline casts at each call site, (c) hoisted the same way with only one of the three calls converted (still spills with just one indirect call present), (d) explicitly void*-cast at every argument, (e) given an explicit `struct BattleQueueEntry *t = &temporary;` alias, (f) combined with an explicit `struct BattleQueueEntry *base = entries;` alias for the parameter, or (g) with `temporary` declared at the if-block, for-loop, or do-while scope. A `prev = j - 1` local variant did lower raw differing_halfwords slightly (76) but at the cost of breaking the otherwise-perfect entries[j]/[j-1] address-cursor decrement pattern (the compiler stopped recognizing `b = a - 16` and recomputed both addresses from scratch each iteration), so it was rejected as a worse structural match despite the marginally lower score; the delivered candidate keeps the clean, fully-matching address/branch/load structure. This is the same class of GCC-2.96-era register-allocation rigidity documented at length in games/gs1/recon/en/dossiers.json#main:080a8c2c's mechanism note for a different owner (there a local-alloc.c qty_compare tie-break; here a global-alloc-level four-slot overflow) -- not resolved by source reordering, not attempted via register-qualified locals or inline asm per project rules.","Adoption gate not met: differing_halfwords=78, not 0. The WordCopy trampoline fix itself is correctness-mandated (the prior model was provably impossible, not just a worse heuristic match) and the first-loop sign-extension/literal-pool fixes are independently verified against established codebase idioms; the sole open residual is the single register-pressure/spill block described above.","2026-09-01: applied the exact 080cd358 sibling's ordinary inline WordCopy wrapper to all three swap calls. This removes the false fifth persistent stack-address carrier: entries returns to fp, the frame returns from 20 to 16 bytes, and wrong instructions fall from 60 to 26. The fresh candidate is 224/228 bytes with 77 differing halfwords. The remaining four-byte extent gap is the reference's mid-function literal-pool island and branch; the equivalent mask/priority literals remain in the candidate's terminal pool. Separate condition/goto spellings compile identically, so no forced pool scheduling was retained."]},"main:080b9724":{"schema_version":1,"namespace":"main","address":"0x080b9724","status":"proven-retained","classification":"hidden_register_context_caller_module","owner_bytes":400,"executable_owner_bytes":400,"candidate_bytes":292,"differing_halfwords":199,"wrong_instructions":174,"cross_edition":{"object_bytes":400,"relocation_bytes":48,"literal_bytes":20,"relocation_normalized_core_bytes":332,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b0724","en":"0x080b9724","de":"0x080bbd3c","es":"0x080bd73c","fr":"0x080bd73c","it":"0x080b973c"}},"domain":"Coordinates the linked-action builders and appends their transformed battle-presentation records after the caller's existing actions.","expressed":["normalizes source ids and side flags on the caller's existing action records","allocates and initializes the shared linked-action builder state","orders the two linked-action builders according to the active battle side","validates the runtime marker before restoring the shared display table","copies generated source ids into unit ids, toggles the linked-action kind bit, and returns the appended count","runs the established cleanup path and returns -1 when either builder or marker validation fails"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is 108 bytes short with 199 differing halfwords and 174 wrong instructions, outside the exact-extent and <=20-halfword screening gate."},"notes":["Independent object analysis bounds this owner at 400 executable bytes and proves all 332 relocation-normalized core bytes identical across the six approved GS1 editions.","The retained owner passes a stack-adjacent builder context through an implicit callee-saved register to 080b9554 and 080b9604. Ordinary readable C expresses the complete orchestration but cannot yet express that hidden compiler allocation, accounting for much of the 108-byte size deficit.","The caller explicitly materializes sp+20 in r9 before every call to 080b9554 and 080b9604; both callees consume incoming r9 before defining it while their ordinary arguments remain in r0-r3. The approved ordinary-C route has no parameter or call primitive for this hidden context channel, so the byte-exact retained assembly is Proven ASM.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local presentation callers and records, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080b9934":{"schema_version":1,"namespace":"main","address":"0x080b9934","status":"measured-draft","owner_bytes":272,"candidate_bytes":280,"differing_halfwords":139,"wrong_instructions":110,"classification":"battle-presentation-action-builder","cross_edition":{"starts":{"ja":"0x080b0934","en":"0x080b9934","de":"0x080bbf4c","es":"0x080bd94c","fr":"0x080bd94c","it":"0x080b994c"},"object_bytes":272,"relocation_bytes":56,"literal_bytes":16,"relocation_normalized_core_bytes":200,"core_diff_bytes":0,"core_identical":true},"domain":"Resets the twenty battle-action slots, builds and merges presentation actions, publishes per-character presentation sides, and restores the transition state.","expressed":["the twenty 16-byte action-slot reset","mode-dependent base action construction","conditional action append or enemy-side construction","error propagation and action finalization","per-record kind 3/7 presentation-side publication","shared resource and transition cleanup"],"bounded_search":{"mode":"classic-exact-only","attempted":10000,"compile_failures":139,"exact":false,"baseline_structural_rows":29,"best_structural_rows":11,"best_generated_candidate_bytes":272,"best_generated_differing_halfwords":125},"notes":["This complete orchestration owner directly calls the neighboring action builders at 080b920c, 080b9324, and 080b9724 and the measured finalizer at 080b9470.","Independent object comparison proves all 200 relocation- and literal-normalized core bytes identical across all six approved GS1 editions.","The earlier 276-byte / 99-halfword draft initialized the caller output array instead of the distinct global twenty-slot display table at battle+0x2ec. The lower score was semantically wrong and was rejected; the corrected readable source is 280 bytes / 139 halfwords / 110 wrong instructions.","A fresh bounded 10,000-candidate search from the corrected source reached exact extent and eleven structural rows only through a long chain of synthetic temporaries and expression rewrites; it still differed by 125 halfwords and was rejected.","Retained assembly remains authoritative; this measured draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, and local callers and callees. No GS2 source or data was inspected or changed."]},"main:080b9b30":{"schema_version":1,"namespace":"main","address":"0x080b9b30","status":"measured-draft","owner_bytes":516,"executable_owner_bytes":516,"candidate_bytes":512,"differing_halfwords":150,"wrong_instructions":124,"cross_edition":{"object_bytes":516,"relocation_bytes":104,"literal_bytes":68,"relocation_normalized_core_bytes":344,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b0b30","en":"0x080b9b30","de":"0x080bc148","es":"0x080bdb48","fr":"0x080bdb48","it":"0x080b9b48"}},"domain":"Validates and prepares a queued battle action, dispatches its presentation mode, restores visible units, and reports whether the action must remain active.","expressed":["invalid and inactive actor rejection","battle presentation transition and render-state setup","temporary selected-unit visibility mode","nine-way presentation dispatch from battle action state","visible-unit restoration and action completion","special transition result that preserves the queued action"],"bounded_search":{"mode":"classic-exact-only","attempted":10000,"compile_failures":962,"exact":false,"baseline_structural_rows":30,"best_structural_rows":19,"best_generated_candidate_bytes":508,"best_generated_differing_halfwords":132},"notes":["Auditing the jump-table targets corrected the inherited draft's semantic case mapping: cases 3/4 run the paired-unit transition, cases 5/6/7 select presentation variants 0/1/2, case 8 runs the action-aware presentation, and case 9 is the action-preserving presentation. This reduces the readable residual from 177 halfwords / 140 wrong instructions to 153 / 126.","The readable candidate reproduces the exact 32-byte frame and complete control-flow semantics but retains broad register-allocation, literal-pool, and switch-layout differences, so it claims zero DONE bytes.","A bounded 10,000-candidate search reduced structural rows from 30 to 19, but its best source was eight bytes short, still differed by 132 halfwords, and accumulated a type-changing cast plus synthetic temporary and one-shot-block mutations. It was rejected rather than weakening the readable semantics.","Declaration-order and split palette-result carriers were byte-neutral. A pointer/decrement cleanup loop shortened the owner and regressed wrong-instruction count, so the clearer indexed cleanup loop remains.","The six approved GS1 editions share all 344 relocation- and literal-normalized core bytes; edition differences are confined to expected relocated calls and literals.","Recovered only from retained owner assembly, the six local GS1 ROMs, exact local callers, nearby presentation drafts, and the approved compiler. No external source, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used.","measured=2026-08-29: sequencing 'render_state = *(transition_slot - 32)' after the 'battle+0x644 = 0x10000' store (instead of before it, matching the struct's field order) realigned the render_state load/shift/store triplet with the reference and dropped the residual from 153/126 to 150/124. Kept.","measured=2026-08-29 refuted: hoisting the shared 0x01fe0000 literal out of 'Func_08005258(0x01fe0000, Func_080072f0(0x01fe0000, 0xc000), 0x7fff0000)' via an explicit temporary (assigning through 'result') matched the owner's 516-byte size but regressed to 198 differing halfwords / 156 wrong instructions -- the compiler still re-hoists the shared constant across the call boundary in a different, worse shape. Reverted.","measured=2026-08-29 refuted: reordering 'battle = *(transition_slot - 35)' ahead of the 'transition = ...' load (so battle's live range is established first) did not flip the transition/battle r6<->r7 register-allocator swap that accounts for the bulk of the remaining wrong_instructions in the switch body; it also undid the render_state fix's ordering and regressed to 153/124. Reverted. The r6/r7 swap looks driven by something other than statement or declaration order (already independently confirmed byte-neutral above); local-alloc internals, not source order, decide it here.","measured=2026-08-29 refuted: replacing the 'if (preserve_action) goto finish;' early-exit with an equivalent 'if (preserve_action == 0) { ...cleanup... }' guard (removing the goto/label) regressed to 154/140 -- the goto's unconditional branch is load-bearing for where arm_reorg's minipool barrier lands, which is the root cause of the remaining branch-target mismatch (b.n 0x1f0 vs reference's b.n 0x1d2) and the mid-function literal-pool bytes disassembling as garbage instructions after it. Reverted.","measured=2026-08-29 refuted: changing the visible-unit restoration loop's sentinel from 'index < visible_count' to 'index != visible_count' regressed sharply (500 candidate bytes, 188 differing halfwords) -- the loop already uses the correct bounded form. Reverted.","2026-08-29: mid-session, alchemy-gcc's agscc/gcc/config/arm/{arm.c,arm.h} were found modified on disk by a concurrent process (an experimental TARGET_MINIPOOL_FIRST_BARRIER flag, uncommitted) and gs1/cc1 started failing its approved-digest check for every candidate-show call, including on this owner's unmodified baseline. The source was reverted with 'git checkout' (undoing that external, unauthorized compiler change, not making one) and alchemy-gcc was rebuilt with the committed 'make'/'make clean && make'. The resulting cc1 is source-identical to the pinned darwin-arm64 build but hashes differently (7e1cb107...), most likely from non-reproducible linker metadata (e.g. Mach-O build UUID), and is not yet in the bundle_data.rs allow-list, so candidate-show is currently blocked by 'alchemy-gcc gs1/cc1 has an unapproved digest'. Admitting a new digest requires a clean-tree 'make verify'/'make full-rom-check' pin, which needs staging the whole repo including unrelated concurrent in-flight changes (games/gs1/recon/en/main/080b2b10.c was independently dirty throughout), so that admission was left undone as out of scope for a single-owner task. All differing_halfwords/wrong_instructions figures in this record were measured before that outage began and are trustworthy (the pre-outage build's baseline reading exactly reproduced this record's prior 153/126 figures)."]},"main:080b9dc4":{"schema_version":1,"namespace":"main","address":"0x080b9dc4","status":"proven-retained","owner_bytes":252,"executable_owner_bytes":250,"candidate_bytes":252,"differing_halfwords":1,"wrong_instructions":2,"classification":"compiler_zero_rematerialization_mismatch","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"measured":"2026-08-30","editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":182,"core_diff_bytes":0,"core_identical":true},"compiler_proof":{"measured":"2026-08-30","sources":["the recorded first-CSE RTL trace in register_gate_step4_probe","alchemy-gcc/agbcc/gcc_arm/reload1.c:9012"],"finding":"first CSE turns the source completed-to-party_mode copy into literal zero; reload_cse_simplify_set then explicitly refuses to replace a cheap zero constant with the equivalent live completed register","application":"the only residual is candidate movs r2,#0 versus reference adds r2,r7,#0, while r7 contains the same zero"},"register_gate_step4_probe":{"date":"2026-08-28","result":"exhausted-not-a-closure","baseline":{"candidate_bytes":252,"reference_bytes":252,"differing_halfwords":1},"decoder_signal":"cse-rematerialized-constant-from-live-value","decoder_evidence":["Initial RTL has completed pseudo 37 set to zero and party_mode pseudo 38 copied from pseudo 37.","First CSE alone replaces the copy with a literal zero; cse2 preserves it.","Local and global allocation are already correct: completed maps to r7 and party_mode maps to r2."],"requested_edit":"preserve the completed-to-party_mode copy past first CSE","bounded_results":[{"shape":"block-local-party-mode","candidate_bytes":252,"differing_halfwords":1,"effect":"baseline-equivalent"},{"shape":"block-local-encounter-mode-then-party-mode","candidate_bytes":244,"differing_halfwords":102,"effect":"collapsed the required flag materialization"},{"shape":"static-inline-identity-copy","candidate_bytes":252,"differing_halfwords":1,"effect":"first CSE still folded the copy to zero"}],"prior_results_accounted_for":["defer completed initialization after the preceding call","nonescaping pointer alias of completed","completed u8 carrier","redundant trigger conditional"],"decision":"No bounded ordinary-C edit preserved the copy across first CSE. The source and retained assembly remain unchanged; this probe does not count toward the five required closures."},"rejected":[{"hypothesis":"volatile s32 completed = 0; (force memory load instead of constant propagation so the reference's adds r2,r7,#0 register-copy shape emerges)","measured":"2026-08-29","differing_halfwords":135,"baseline":1,"verdict":"regressed heavily: candidate_bytes=272, wrong_instructions=68; volatile forces reloads throughout the function, not just at the one seed site"},{"hypothesis":"static s32 completed = 0; (BSS/data storage instead of stack, to discourage constant folding of the initial value)","measured":"2026-08-29","differing_halfwords":64,"baseline":1,"verdict":"regressed: candidate_bytes=264, wrong_instructions=32; static storage changes addressing mode for every use of completed"},{"hypothesis":"route completed's zero through a single-element local array (completed_store[0] = 0; completed = completed_store[0];) to break the compile-time-constant chain before the party_mode copy","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"baseline-equivalent, no change: candidate_bytes=252, wrong_instructions=2; compiler still constant-propagates through the array read"},{"hypothesis":"declare party_mode before completed (reverse local declaration order) to perturb pseudo-register numbering ahead of first CSE","measured":"2026-08-29","differing_halfwords":1,"baseline":1,"verdict":"baseline-equivalent, no change: candidate_bytes=252, wrong_instructions=2"}],"notes":["Resolves a battle presentation trigger: either announces the encounter, visits unstunned living party units, or activates and tears down a selected battle object based on a bounded random test.","Correct party and unit layouts raise structural similarity to 85.58 percent, but stack layout, branch shaping, loop allocation, and call scheduling remain broad. It did not meet the bounded-search or permanent-residual gate.","2026-08-27: bounded search closed differing_halfwords from 116 to 1 (wrong_instructions 33 to 2). Three source-level fixes did the work: (1) unit_ids widened from u16 to s16 (cast to u16* only at the BattleParty_ListLivingUnits call site) so both party-index reads compile to ldrsh instead of ldrh, matching the reference's signed-extend addressing; (2) the living-unit loop condition rewritten from `index >= 0` to `index != -1`, which makes the compiler synthesize the loop bound via movs #1/negs (compare against -1) instead of cmp/blt-bge, matching the reference's loop-footer shape; (3) scene's raw pointer address rewritten as `presentation_addr - 140` (arithmetic from a u8 * holding 0x03001f00) instead of the independent literal 0x03001e74, which makes the compiler reuse the already-loaded 0x03001f00 register via `subs r3,#140` instead of emitting a second literal-pool load -- this alone recovered the full 8-byte size gap and collapsed most of the remaining diff. The encounter_mode==2/party-loop branch was also restructured as a `party_mode = completed; if (cond) party_mode = 1; if (!party_mode) ... else ...` two-statement flag pattern (rather than a direct nested if/else) to reproduce the reference's default-value-then-conditional-override branch shape (movs/beq/movs/cmp/bne) instead of a single collapsed bne -- this matched the branch senses and block order exactly.","Remaining single differing halfword (wrong_instructions=2, both counting the same spot): candidate emits `movs r2, #0` where the reference emits `adds r2, r7, #0` (copying the already-live completed==0 value from r7) to seed party_mode's default before the encounter_mode compare. Both are 2-byte, flag-setting, functionally identical zero-into-r2 encodings -- pure register-CSE opcode choice, not a control-flow or data difference. Tried and rejected (no effect, or regressed structure/size): `party_mode = completed` vs `= 0` (identical output either way -- proves the compiler constant-propagates completed to 0 before this point regardless of aliasing to the variable); `party_mode = completed + 0` (still folds to a fresh immediate); hoisting party_mode's declaration/init to function scope before the outer if (changed register allocation wholesale, regressed to candidate=260, wrong_instructions=58); u32 vs s32 type for party_mode (no effect); swapping completed/party_mode declaration order (no effect); ternary `party_mode = (encounter_mode==2) ? completed : 1` and plain if/else `party_mode = completed; else party_mode = 1;` in place of the default+override form (both collapse the compiler back to a single direct branch, losing the whole flag-materialize shape and regressing size to 244). This looks like a genuine postreload-CSE/register-allocator threshold difference between our toolchain build and whatever produced the ROM, not reachable by further legitimate C restructuring without forcing register assignment (prohibited by CONTRIBUTING.md). Did not run the adoption gate per instructions; final candidate-show: candidate=252 reference=252 differing_halfwords=1 wrong_instructions=2 matched_prefix=25."]},"main:080b9ec0":{"schema_version":1,"namespace":"main","address":"0x080b9ec0","status":"measured-draft","owner_bytes":954,"executable_owner_bytes":954,"candidate_bytes":960,"differing_halfwords":467,"wrong_instructions":363,"cross_edition":{"object_bytes":954,"relocation_bytes":124,"literal_bytes":68,"relocation_normalized_core_bytes":762,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b0ec0","en":"0x080b9ec0","de":"0x080bc4d8","es":"0x080bded8","fr":"0x080bded8","it":"0x080b9ed8"}},"domain":"Runs the selected-unit battle presentation transition, temporarily hiding incompatible unit sprites, preparing presentation context and ability data, executing the selected transition, and restoring the visible-unit set.","expressed":["transition direction and palette/blend setup from the selected unit side","initial and refreshed visible-unit enumeration with ally/enemy filtering","selected-unit sprite handling and sixteen-frame blend ramps","message-driven and context-driven presentation branches","presentation-context unit and ability preparation","flag-selected transition callback and final sprite restoration"],"bounded_search":{"mode":"classic-exact-only","attempted":10000,"compile_failures":261,"exact":false,"baseline_structural_rows":230,"best_structural_rows":162,"best_generated_candidate_bytes":948,"best_generated_differing_halfwords":446},"notes":["The address gap to 080ba2c0 is 1024 bytes, but independent executable-owner analysis proves this function is 954 bytes; the trailing 70 bytes are not part of the owner.","The complete readable candidate is six bytes longer than the owner and retains a broad register-allocation, frame-layout, literal-pool, and loop-shape residual, so it claims zero DONE bytes.","The 10,000-candidate search reduced the structural row count only through a long chain of synthetic temporaries, declaration reorderings, one-shot blocks, and expression rewrites. Its best remained shorter than the reference and 446 halfwords different, so the generated artifact was rejected.","No exact C or narrow compiler residual was found; retained assembly remains ordinary unresolved compiler output and was not promoted permanently.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, local battle callers and types, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: This owner scored below the family-transplant threshold (7453/10000, LOW confidence) with games/gs1/src/shop/select_use_item.c as the best guess. Read that source in full: it is a shop item-selection input loop (UiWindow-based menu, Modulo-based cursor wrap, no presentation/context/ability handling) with no shared callees, field offsets, or constants against this owner -- the family-matcher's match was shape-only (same register-shuffle prologue), confirming the session-wide warning about this cluster's false positives. No adopted exact sibling exists yet for any of the other BattlePresentation_* owners in this address range (080b60a0, 080b8574, 080b88d0, 080b920c, 080b9324, 080b9724, 080b9934, 080b9b30, 080ba2c0) to borrow vocabulary from; all remain measured-draft. Re-verified the committed draft against current assembly: differing_halfwords=467, wrong_instructions=363, matched_prefix=7 -- divergence starts at instruction 8 (the `sub sp` frame size and everything downstream), so this is a broad structural mismatch, not a last-mile residual. Tested one structural hypothesis: materializing `context` and `visible_units` as genuine pointer locals (`u8 *ctx = context;` / `u16 *vis = visible_units;`, assigned as their own statements per this codebase's documented idiom) so their addresses are computed once and held in registers throughout, mirroring the reference's permanent r7/sl role assignment. This reproduced the reference's exact `sub sp, #124` frame size (previously #128) but did not reach a clean win overall: differing_halfwords improved marginally to 464 while wrong_instructions rose to 383 and candidate size dropped to 936 (18 bytes under reference, versus 6 over previously); `context`'s base register still lands at sp+40 instead of the reference's sp+12, and `selection` still allocates to sl instead of r9. Given this was a mixed, non-monotonic result well short of the 446-halfword floor this owner's own prior 10,000-candidate bounded search already reached (and rejected as still not exact), it was not adopted over the existing committed draft. No exact C or narrower residual was found this session; the owner's register/frame allocation remains an unresolved broad structural disagreement, consistent with the prior session's conclusion."]},"main:080ba2c0":{"status":"proven-retained","classification":"compiler_entry_scheduling_module","span_bytes":708,"edition":{"role":"shared-candidate-wrapper","edition":"en","base_owner":"080b12c0","base_edition":"ja","rebase_status":"proved-shared-core"},"cross_edition":{"measured":"2026-08-23","object_bytes":708,"core_bytes":504,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"080b12c0","en":"080ba2c0"},"callee_correspondences":25,"core_identical":true},"score":{"measured":"2026-08-23","candidate_bytes":708,"reference_bytes":708,"differing_halfwords":133,"wrong_instructions":18,"matched_prefix_instructions":11,"class":"compiler-entry-scheduling-retention","note":"The coherent shared-source recovery has exact object size. Its normalized instruction residual is confined to the entry/facing block before the first literal pool; the retained assembly remains authoritative."},"domain":"Coordinates one battle presentation sequence: establishes camera facing, builds battle work, configures display state, then runs either the direct presentation or the scripted motion and resolution path.","expressed":["JA-base/EN-wrapper ownership backed by the proved all-edition-identical core","camera-facing calculation and frame delays","battle-work construction and special flag handling","unit, motion-record, divisor, display-register, and object-action setup","direct presentation path and scripted motion loop","resolution dispatch, cleanup, and final object teardown","edition-specific playback callback address supplied by the thin wrapper","typed input, work, motion, record, object-slot, and unit layouts backed by exact local offsets"],"unexpressed":[{"op":"entry input reload and facing-store scheduling","count":18,"where":"the normalized residual before the first literal pool; later code resynchronizes"}],"retention":"keep_structured_asm","next":"Retain the EN file as the complete semantic wrapper and the JA file as the shared source record; approved compiler and source searches prove the remaining entry schedule cannot be emitted without forbidden register constraints.","verified_against_reference":["fresh candidate-show build: 708 candidate bytes versus 708 reference bytes, 133 differing halfwords, and 18 wrong aligned instructions","the normalized residual is limited to input reload/load ordering around the facing store and the first literal-pool boundary","relocation-aware cross-edition comparison proves 504 core bytes agree in all six editions with 25 established callee correspondences"],"rejected":[{"shape":"broad top-level cached-coordinate carriers","result":"extended unrelated lifetimes and regressed to 744 candidate bytes and 236 wrong instructions"},{"shape":"inner do/while with a separate angle-step carrier","result":"allocated the work pointer differently and scored 740 candidate bytes with 230 wrong instructions"},{"shape":"unsafe diagnostic heat-search result","result":"reached 712 candidate bytes and 60 wrong instructions only by narrowing an arithmetic carrier to char; rejected as a semantic change"},{"shape":"volatile saved-input carrier","result":"expanded the frame and regressed to 724 candidate bytes and 120 wrong instructions"},{"shape":"inherit 080bbb0c's -fno-cse-follow-jumps route","result":"byte-neutral here; the compiler flag is owner-specific and was not added"},{"shape":"safe bounded heat searches","result":"10,000 iterations from the initial candidate and 20,000 iterations from the near-exact candidate found no verified improvement"},{"shape":"approved compiler-family and optimization sweep","result":"routed/GCC 2.96 -O2 and -O3 preserve the exact 708-byte extent and identical 18-instruction entry residual; -O0, -O1, and -Os regress sharply; old-agbcc produces 696--1130 bytes with 386--611 wrong instructions"}],"notes":["Moving the scripted carrier before the facing pointer repaired the reference stack-slot order; keeping loop coordinate carriers inside the loop repaired the long-lived register allocation.","The linked halfword count is amplified by the one-halfword displacement before the first literal pool; normalized instruction comparison isolates the remaining 18 instructions.","No external source, git history, compiler modification, copied instruction bytes, fixed-register variables, barriers, or inline assembly was used.","2026-08-27 re-verification only: fresh candidate-show still measures exactly 708/708 bytes, 133 differing halfwords, 18 wrong instructions, matching this dossier -- no drift. Given the already-exhaustive rejected list above (structural respellings, a compiler-family/optimization-level sweep including old-agbcc, and two bounded heat searches totaling 30,000 iterations), no new attempt was made this pass; nothing here suggests a fresh angle beyond what those prior searches already ruled out."]},"main:080ba6ac":{"schema_version":1,"namespace":"main","address":"0x080ba6ac","status":"measured-draft","owner_bytes":620,"candidate_bytes":600,"differing_halfwords":290,"classification":"allocation-and-scheduling","domain":"Runs a battle presentation, copies motion-child state, performs a palette fade, cleans up actors, and dispatches the selected ability result through the battle-event queue.","notes":["2026-08-27: two structural, non-forced levers cut the gap from 624/306 to 600/290. (1) dispatch-shape: the AbilityInfo->kind dispatch was a `switch(kind){case 1: case 2: case 4:}`, which routed gcc296 lowered as a 3-way binary-search compare tree (test 2 first, then branch high/low). The reference instead uses a plain ascending if/else-if chain (kind==1, else (u8)kind==2, else (u8)kind==4) with no binary search. Rewriting the switch as that if/else-if chain matched the reference's compare order and alone took the candidate from 624 to 616 bytes (306 to 302 differing halfwords). (2) typed work record: `struct PresentationWork` was previously an opaque `u8 bytes[84]` accessed everywhere through `FIELD(base,type,offset)` (`*(type*)((u8*)base+offset)`). For the scalar/array fields (offset 0, 4, 8, the offset-20 loop count, the offset-36 s16 table, the offset-52 u8 values) that pointer-cast form was apparently treated by routed gcc296 as a distinct hoistable pointer value: it computed `&work+20` once into a dedicated register (sl) and reused that cached pointer for both the loop guard and the do-while tail check of the two `count`-bounded loops, instead of folding the constant +20 into each load's immediate offset the way the reference does (`ldr r3,[r5,#20]` recomputed fresh, base+immediate, no cached sub-pointer). Replacing those FIELD accesses with true struct-member accesses (work.field_00/04/08, work.count, work.table[i], work.values[i*4+j]) stopped that hoist: the frame shrank from the candidate's 92 bytes to 88 (now bytewise matching the reference's `sub sp, #88`), and size dropped 616 to 604 (302 to 300 diffs). The runtime-indexed second-loop access (`FIELD(&work, s16, saved_offset)`, offset not known at compile time) was deliberately left as macro-based pointer arithmetic since it already matched the reference exactly. (3) loop-local index: scoping the first loop's index into its own block-local `s32 i1` (previously it shared the function-wide `s32 i` used by three unrelated loops) shaved a further 4 bytes, 604 to 600 (300 to 290 diffs) by improving cross-loop register coalescing. The identical scoping trick applied to the second (saved_offset) loop was tested and reverted: byte-identical output, it only reshuffled which physical registers (r6 vs r7) carried the same roles.","Remaining, confirmed NOT reachable through legitimate C restructuring: inside the first loop routed gcc296 strength-reduces BOTH linear accesses keyed off the loop index -- work.table[i] (stride 2) and work.values[i*4+j] (stride 4) -- into persistent per-iteration accumulator registers. The reference binary only strength-reduces the stride-4 (values) access; the stride-2 (table) address is recomputed fresh every iteration via `lsls r3,r7,#1; adds r3,#36` from the work-base register (r5), never cached. That extra cached accumulator is exactly the difference between the candidate needing 7 simultaneously live registers during the first loop (input, selection, object, work-base, loop counter, table-accumulator, byte-accumulator) and the reference needing 6 (no table-accumulator) -- with only 6 non-fp callee-saved slots available (r5,r6,r7,r8,r9,sl), the 7th forces the candidate to additionally save/restore fp, which the reference never touches. That single extra register is the root of essentially all of the remaining diff: it costs ~8 bytes of prologue push/mov and ~8 of epilogue pop/mov directly, and it reassigns which physical register (r8 vs r9 vs sl vs fp) carries each of input/selection/object/work for the rest of the function body, so almost every later instruction differs only in register number, not in shape. This was tested directly and could not be changed short of forcing register assignment (disallowed): switching work.table[i] between struct-array-indexing and raw FIELD-macro pointer arithmetic produced byte-for-byte identical output either way, and giving the loop a dedicated index variable (vs. the earlier fix that did help for other reasons) did not by itself suppress the accumulator. The strength reduction appears to be an intrinsic, all-or-nothing decision of gcc296's induction-variable pass for a loop with two same-index linear array accesses, not a decision exposed to source-level control.","Secondary, minor residual: in the second dispatch arm ((u8)kind==2), the reference re-derives the truncated byte via `lsls r3,r2,#24; lsrs r3,r3,#24` immediately before the compare, even though r2 already holds a zero-extended byte from the preceding `ldrb`, making that mask provably redundant. Routed gcc296's value-range analysis elides the same redundant mask in the candidate. This costs a handful of halfwords and was not chased further, since the register-count gap above dominates the remaining diff by more than an order of magnitude.","Explicit register-qualified carriers remain byte-neutral: this was re-tested for `register s32 object` (the whole-function-lived object id, not just the pointer carriers noted previously) with zero effect on the emitted bytes.","Old agbcc produces 572 bytes with 308 differing halfwords (against the original 624/306 candidate baseline; not retested against this draft). The register mismatch that remains is still pervasive across 5 physical registers (r5 matches; r6/r7/r8/r9/sl/fp all carry different logical variables than the reference at various points) and is judged very unlikely to close further without either a different gcc296 IV-optimization decision than routed gcc296 makes for this loop shape, or forcing register assignment, both out of scope per CONTRIBUTING.md.","Retained assembly remains authoritative and this draft claims zero bytes. No inline assembly, fixed-register variable, compiler barrier, invented compiler flag, or copied instruction bytes were used."]},"main:080ba978":{"schema_version":1,"namespace":"main","address":"0x080ba978","status":"measured-draft","owner_bytes":612,"candidate_bytes":612,"differing_halfwords":261,"classification":"allocation-and-scheduling","wrong_instructions":218,"objdiff_structural_percent":77.85348,"edition_starts":{"ja":"0x080b1978","en":"0x080ba978","de":"0x080bcf90","es":"0x080be990","fr":"0x080be990","it":"0x080ba990"},"domain":"Sets battle-presentation facing, constructs motion work, dispatches queued script events, runs the direct presentation path, and cleans up participating actors.","notes":["All six starts are bounded by the exact 080ba918 and 080babdc sibling correspondences and preserve the same 612-byte owner extent.","Removing a cached primary-id scalar repaired the frame extent from 616 to 612 bytes and reduced the aligned residual from 286 to 218 wrong instructions.","The measured target-sequence partition ranks setup first (88 nonexact target instructions), orientation second (85), dispatch/cleanup third (30), the motion-copy loop fourth (10), and the epilogue last (5).","The remaining mismatch is long-lived allocation: the candidate saves fp/r9 and places flags in r8, while the reference retains input in r7, flags in sl, the work pointer in r5, and the resolved object in r8.","The work actor identifier at offset 8 is word-wide, and Func_080b7dd0 accepts a promoted integer identifier. Correcting both source types is byte-neutral in the current allocation family but records the access contract used by the exact reference.","Bounded second-pass trials rejected an explicit offset-and-pointer motion loop (608 bytes, 294 differing halfwords, 230 wrong instructions), a fully typed 84-byte work structure (616 bytes, 271 differing halfwords, 226 wrong instructions), signed motion identifiers (616 bytes, 266 differing halfwords, 230 wrong instructions), explicit nested side tests (604-620 bytes, 294 differing halfwords, 238-244 wrong instructions), and unsigned-return/explicit-truncation angle carriers (620-624 bytes, 287-300 differing halfwords, 272 wrong instructions).","Retained assembly remains authoritative and this measured candidate claims zero bytes."]},"main:080bac6c":{"schema_version":1,"namespace":"main","address":"0x080bac6c","status":"measured-draft","owner_bytes":124,"candidate_bytes":112,"differing_halfwords":57,"wrong_instructions":47,"classification":"battle-actor-list-removal","cross_edition":{"core_bytes":104,"core_identical":true,"relocations":2,"literal_fields":3,"starts":{"ja":"0x080b1c6c","en":"0x080bac6c","de":"0x080bd284","es":"0x080bec84","fr":"0x080bec84","it":"0x080bac84"},"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0}},"domain":"Removes one actor from the live or placement list, clears its live marker, updates related actor state, and clears matching queued action slots.","expressed":["the live actor marker at unit offset 0x12a","the 0xff-terminated live list at battle-work offset 0x58","the 0xff-terminated placement list at battle-work offset 0x66","the 0xfe vacant marker used by both lists","the direct state-update call after a successful removal","the twenty 16-byte queued action slots beginning at battle-work offset 0x2ec"],"call_evidence":["the direct 080bd898 battle presentation caller removes its current actor during teardown","BattleActor_DestroyTemporaryObject and BattleMotion_InitializeActorRecords call this owner in their matching actor-cleanup paths","the owner directly calls the battle unit lookup and 080c1ebc actor-state cleanup owners"],"ranking":{"reason":"Largest previously unmeasured owner at or below 192 bytes in the one-hop caller/callee neighborhood of exact 080bbb0c, with a six-edition identical normalized core.","other_identical_candidates":[{"address":"0x080bd850","bytes":72,"core_bytes":56,"disposition":"skipped: relies on a caller-established r9 hidden argument before an indirect IWRAM call; ordinary local C semantics are not yet proved"},{"address":"0x0800393c","bytes":64,"core_bytes":56,"disposition":"the coherent video/DMA translation unit reduces this queue writer to a four-halfword ordering residual under canonical flags"},{"address":"0x080039fc","bytes":64,"core_bytes":56,"disposition":"constant-only sibling with the same coherent-unit four-halfword ordering residual"},{"address":"0x080b7548","bytes":148,"core_bytes":136,"disposition":"already has a complete draft and a prior bounded 50,000-candidate search without exact output"}]},"bounded_checks":["natural pointer, structured-array, integer-base, structured-loop, and evidence-equivalent goto forms were directly scored","the local structural reconstruction confirmed the two sentinel scans and the final twenty-entry loop","-fno-schedule-insns2, -fno-strength-reduce, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-schedule-insns, and -fno-regmove did not produce a narrow residual","the best normalized draft remains too far from parity for the requested 20,000-candidate last-mile cap"],"adoption":"none; retained assembly remains authoritative and this draft claims zero DONE bytes","notes":["Recovered only from retained owner assembly, approved local ROMs, in-repository callers/callees, and the approved compiler.","No GS2 source or data was inspected or changed for this reconstruction.","2026-09-01 absolute-symbol tempering: the source now names the linker-resolved 0xFE value BattleActorList_VacantMarker through an ordinary-C compatibility macro over Data_000000fe. Fresh scoring is output-neutral and corrects the stale dossier measurement to 112/124 bytes, 57 differing halfwords, and 47 wrong instructions."]},"main:080bad7c":{"schema_version":1,"namespace":"main","address":"0x080bad7c","status":"measured-draft","owner_bytes":194,"candidate_bytes":194,"differing_halfwords":67,"wrong_instructions":60,"classification":"battle-random-target-position","cross_edition":{"starts":{"ja":"0x080b1d7c","en":"0x080bad7c","de":"0x080bd394","es":"0x080bed94","fr":"0x080bed94","it":"0x080bad94"},"core_identical":false,"normalized_core_diff_bytes_from_ja":{"ja":0,"en":2,"de":7,"es":4,"fr":4,"it":4}},"domain":"Builds an encoded target-position list from one side of the battle turn order and returns a uniformly selected entry, optionally rejecting vacant and defeated units.","expressed":["the normal-list path with vacant-unit and zero-HP rejection","the mirrored-list path with vacant-unit rejection","the 0x100 and 0x180 encoded turn-order positions","the empty-list zero result and uniform 16-bit random selection"],"recovered_layout":{"frame_bytes":16,"position_array_offset":4,"position_capacity":6},"bounded_checks":["a direct typed-array loop emitted 198 bytes with 116 wrong instructions and unnecessary high-register saves","pointer-walking both lists recovered the exact 16-byte frame and r4/r5/r6/r7 register family, reducing the aligned residual to 90 wrong instructions","a hybrid pointer/indexed form regressed to 107 wrong instructions","2026-08-27: rewriting the normal-list loop from an if-guarded do-while to a plain while loop with the loop-continuation test read ahead into unit_id at the bottom of the body (rather than re-testing *entry) eliminated the compiler's loop-carried value-forwarding artifact (a redundant unsigned ldrh plus manual lsls/asrs sign-extend on every iteration) for that loop, and also shrank candidate_bytes from 198 to exactly 194 (matching owner_bytes) as a side effect of the resulting register allocation; wrong_instructions fell 90 -> 80 from this change alone","2026-08-27: swapping the final selection multiply from `count * Random16()` to `Random16() * count` matched the reference's operand copy order (count copied into the accumulator register first) and dropped wrong_instructions 80 -> 60, differing_halfwords 69 -> 67","2026-08-27: the same while-loop-plus-read-ahead rewrite applied to the mirrored-list loop (with or without keeping its outer if-guard) consistently regressed wrong_instructions to 104+ and broke the otherwise-exact match on that loop's positions-pointer address computation (the sp+16-then-subtract-12 idiom); the mirrored loop's original if-guarded do-while, unmodified, remains strictly better and is retained","2026-08-27: the remaining 60 wrong instructions are almost entirely a single root cause -- the compiler keeps turn_order's dereferenced value in r3 (reusing the address-of-global scratch register) where the reference keeps it in r1 (treating r3 as a free scratch for immediate offsets throughout) -- which cascades into every downstream register choice; declaration-order changes, statement-order changes, and hoisting/duplicating index=0 were all tried and either had no effect or regressed, so this residual is register-allocation-level and no further permutation search is justified"],"notes":["All six edition starts are proved, but this owner is not a constant-only all-six core: the normalized reference cores retain two to seven regional bytes of difference.","Retained assembly remains authoritative and this draft claims zero DONE bytes.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, repository battle types and its direct caller, and the approved compiler. No GS2 source or data was inspected or changed.","2026-08-27: candidate_bytes now matches owner_bytes exactly (194) and wrong_instructions improved from 90 to 60 (differing_halfwords 96 -> 67) via two source-level changes: (1) the normal-list scan loop rewritten from if-guarded do-while to a while loop with the sentinel value read ahead into unit_id at the bottom of the loop body instead of re-testing *entry, and (2) the final random-index multiply reordered to `Random16() * count`. Score verified with: cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080bad7c.c --owner 0x080bad7c --size 194 --align"],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"same-size body with 60 wrong instructions — real opcode divergence, not pool residue","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."}},"main:080bae40":{"schema_version":1,"namespace":"main","address":"0x080bae40","status":"measured-draft","owner_bytes":1864,"candidate_bytes":1888,"differing_halfwords":689,"wrong_instructions":612,"classification":"battle-action-target-selection","cross_edition":{"object_bytes":1864,"relocation_normalized_core_bytes":1456,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b1e40","en":"0x080bae40","de":"0x080bd458","es":"0x080bee58","fr":"0x080bee58","it":"0x080bae58"}},"domain":"Selects an eligible battle target for an action, including effect applicability, target-list compaction, strategy-dependent ordering, and weighted or uniform random choice.","expressed":["the complete normal-versus-mirrored turn-order scan and encoded target positions","all effect and target-flag applicability cases through the 65-entry effect dispatch","dead-unit, healing, cure, modifier, and status eligibility rules","the compacted eligible target list and -2/-1 empty-list results","strategy-dependent current-HP or maximum-HP descending ordering","the one-, two-, three-, and four-target weighted random selections and the uniform fallback"],"recovered_layout":{"frame_bytes":92,"eligible_positions_offset":32,"unit_ids_offset":56,"turn_order_positions_offset":80},"remaining":["entry register allocation and the first turn-order literal-pool placement","source texture around the effect jump-table tails and shared branches","bubble-sort pointer allocation and weighted-selection result allocation"],"rejected_experiments":["seven-element local arrays produced a 96-byte frame; six-element arrays plus declaration ordering recover the exact 92-byte frame and all three reference array bases","a shared normal/mirrored order pointer reduced readability and retained broad allocation disagreement","raw s16 turn-order indexing restored major block boundaries but scored 1892/1864 bytes and 618 wrong instructions, slightly worse than the typed BattleTurnOrder form","routed and explicit GCC 2.96 routes preserve the 612-instruction residual; old-agbcc changes the prologue and broad owner shape"],"notes":["This is a complete semantic candidate, not a partial m2c transcription. Retained assembly remains authoritative and the draft claims zero DONE bytes.","The normalized reference core is identical in all six GS1 editions and uses the same JA-to-EN battle-owner shift as the exact 080bbb0c family.","No broad permanent classification or bounded permutation search is justified at this residual.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, repository battle types and callers, and the approved compiler. No external source, history, copied instruction bytes, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used."],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"lines 214-216: beq.n where the reference has bne.n plus b.n — genuine branch-topology divergence; class structural-topology, wrong_instructions=290","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."},"entry_pool_diagnosis":{"measured":"2026-08-31","verdict":"SOURCE-GATE-REFUTED; COMPILER-BARRIER-PLACEMENT-CONFIRMED","score":"candidate_bytes=1884, reference_bytes=1864, differing_halfwords=268, wrong_instructions=290","evidence":"The first divergence is the entry target-mode guard: the reference emits bne to the scan body followed by an unconditional branch over a natural 4-byte minipool at local offset 0x40, while GCC emits the equivalent single inverted beq and therefore moves the same early literal to local offset 0xa4. Rewriting the C as two explicit gotos and a named scan_target_order label compiled byte-identically; GCC jump folding removes that source distinction before arm_reorg. In GCC 2.96 arm_reorg, only BARRIER RTL nodes are eligible natural minipool dump points, directly explaining why the folded branch changes every early pool-relative load. -fno-thread-jumps preserved the folded entry and regressed the score to 270 differing halfwords / 294 wrong instructions; -fno-expensive-optimizations and -fno-rerun-cse-after-loop regressed broadly; -fno-optimize-sibling-calls was byte-identical. The custom thumb-pool switches present in the separate agbcc research harness are not shipped agscc options and are rejected by cc1. Do not repeat entry-goto respellings or generic optimization-axis probes; the remaining structural work must identify the source construct that survives into a natural RTL barrier or explain the original per-TU compiler route.","reference_compiler_path":"alchemy-gcc/agscc/gcc/config/arm/arm.c: arm_reorg scans BARRIER nodes, then chooses last_barrier before dump_minipool"}},"main:080bb65c":{"schema_version":1,"namespace":"main","address":"0x080bb65c","status":"measured-draft","owner_bytes":356,"executable_owner_bytes":356,"candidate_bytes":360,"differing_halfwords":163,"wrong_instructions":138,"cross_edition":{"object_bytes":354,"relocation_bytes":48,"literal_bytes":48,"relocation_normalized_core_bytes":258,"alignment_bytes":2,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b265c","en":"0x080bb65c","de":"0x080bdc74","es":"0x080bf674","fr":"0x080bf674","it":"0x080bb674"}},"domain":"Renders the animated battle-presentation advance prompt and waits for accepted input before releasing its sprite resources.","expressed":["waits for the presentation event queue to become ready","allocates the prompt sprite and derives phase-specific tile data","updates window registers and the prompt's packed tile, X, and animated Y fields each frame","accepts the primary button, shared presentation input, or delayed alternate input","plays the confirmation sound, releases the prompt sprite, and advances one final frame"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is 4 bytes long with 163 differing halfwords and fails exact-extent and <=20-halfword admission."},"bounded_checks":["re-examined this session (verification pass, no source change): the reference's stack frame is only 16 bytes (`sub sp, #16`, matching just a `frames` local at sp+0 plus the 12-byte `prompt` buffer at sp+4), while this candidate's frame is 28 bytes and spills several extra pointer locals (the render/left/right chain) that the reference apparently keeps entirely in registers; the reference also has an entirely different, currently-unaccounted-for conditional near the top of the render loop (a `cmp r3,#15; ble` test against a value this candidate does not compute at all) before it reaches the phase/tile computation. [Superseded by the 2026-08-27 pass below: the frame-size and register-spill gap was real and has been substantially closed; the `cmp r3,#15; ble` test is in fact the existing `frames > 15 && (Data_03001ae8 & 0x303)` guard already present in the source -- the earlier note mis-scanned the raw assembly at that position, not a missing branch.]","2026-08-27 respell session: two genuine structural fixes closed 32 of the original 36 byte overshoot and dropped differing_halfwords from 180 to 163 (candidate_bytes 392 -> 360; wrong_instructions 142 -> 138). (1) The `prompt` buffer was rewritten from a raw `u8 prompt[12]` array (accessed as repeated `*(u16/u32*)(prompt+K)` casts) into `u8 prompt_buf[12]; u8 *prompt = prompt_buf;`, giving GCC one persistent base pointer to fold every field access into an immediate-offset load/store -- this alone dropped 392->368 bytes by eliminating four separately-materialized sub-pointers the old array-cast form produced (matching the reference's single `r7`-relative addressing for the whole struct). (2) The outer `for (;;) { BODY; if(c1) break; if(c2) break; if(c3&&c4) break; TAIL; }` loop was rewritten as `while (1) { ... }` with the exact same body -- this alone dropped 368->360 bytes by changing which loop-rotation layout GCC 2.96 chooses: `for(;;)` produced a checks-block-before-body layout requiring two extra unconditional branches (an entry skip-jump plus a backward continue-jump), while `while(1)` produces the reference's body-first/checks-after layout with a single backward branch at the very end and no entry skip. Confirmed via the raw compiler `.s` output (not just the packed `.insns` diff) that after fix (2) the control-flow shape (block order and every branch target) now matches the reference exactly; every remaining differing halfword is a pure register-allocation variance, not a structural one.","2026-08-27, remaining residual: the reference dedicates a 6th callee-saved-crossing value to caching `&0x03001e40` (the per-frame timer register) in r8 across the loop body's two separate reads of that address, and pays for it by spilling `frames` to `[sp,#0]` for its three per-iteration accesses (compare, increment-read, increment-write) instead of keeping it in a register. This candidate's compile makes the opposite choice: `frames` gets `fp` (fitting all 5 non-scratch cross-call values -- prompt/sprite/left/right/frames -- into the 5 available registers with none left over) and the `&0x03001e40` address is rematerialized from the literal pool at each of its two use sites instead of being cached, which is what costs the remaining ~4 bytes and the bulk of the 163 differing halfwords (they all cascade from this one swapped register assignment: sprite lands in r9 instead of fp, right lands in r8 instead of r9, etc). Tried and confirmed to have NO effect on this specific allocation choice, each verified by a fresh compile: an explicit `volatile u32 *hwReg` local (both loop-scoped and function-scoped) aliasing the two `0x03001e40` reads; swapping the declaration order and the statement order of `frames`/`sprite`; nesting the `frames > 15 && (...)` guard into two separate `if`s; typing `frames` as `u8`; swapping the `&&` operand order in the third break guard; folding `wave` into a nested block scope; expressing `render[0]`/`render[1]` as a two-field struct instead of array indexing; and initializing `frames` at its declaration instead of via a later assignment (this last one was strictly worse: 360 bytes but 166 differing halfwords). No source-level lever found in this session moved this specific register-allocation tradeoff toward the reference's choice; it may require either the true original source's exact expression shape (unknown, out of scope per CONTRIBUTING.md) or GCC-2.96-internals knowledge beyond what source restructuring alone can influence."],"notes":["Independent object analysis finds 354 object bytes plus two alignment bytes and proves all 258 relocation-normalized core bytes identical across the six approved GS1 editions.","The helper is called throughout the recovered battle-presentation event family. The residual spans packed prompt construction, render-register scheduling, and loop allocation rather than a localized compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-presentation callers, and the approved compiler. No GS2 evidence or external source was used.","2026-08-27: candidate_bytes 392 -> 360, differing_halfwords 180 -> 163, wrong_instructions 142 -> 138, via the `prompt` base-pointer fix and the `for(;;)` -> `while(1)` loop-rotation fix described in bounded_checks. Control-flow shape now matches the reference exactly (verified from the raw compiler .s, not just the packed diff); the remaining 4-byte / 163-halfword gap is a single register-allocation tradeoff (frames-in-register vs. hwReg-address-in-register) that a dozen source-level variations this session could not shift. Not adopted -- still 4 bytes over reference size."]},"main:080bb7c0":{"schema_version":1,"namespace":"main","address":"0x080bb7c0","status":"measured-draft","owner_bytes":280,"executable_owner_bytes":280,"candidate_bytes":274,"differing_halfwords":130,"wrong_instructions":114,"family":{"template_owner":"main:080c10e8","template_source":"games/gs1/src/battle/presentation/set_actor_modes.c","note":"The assigned set_actor_modes.c template does not match at all; the real sibling is the family's OWN other unresolved member main:080bb65c (BattlePresentation_WaitForAdvance, already an unadopted measured draft), which shares this owner's exact 0x0400004a/0x04000052 window-register writes, the same *(u16*)(prompt+8)&0xfc00 / *(u16*)(prompt+6)&0xfe00 packed-sprite-tile idiom, and the same Func_08015048/Func_080040b4/Func_08003dec/Func_08003f3c call sequence, but with a fixed tile source (Func_080153f0(0) called once) instead of a per-frame animated phase, an (x, y) parameter pair instead of a hardcoded position, and a single exit flag test (Data_03001c94 & 0x303) instead of the sibling's three OR'd conditions."},"domain":"Waits for the presentation event queue, then renders an animated prompt sprite at a caller-supplied (x, y) position each frame until Data_03001c94's low status bits are set, before releasing the sprite.","expressed":["resolves a fixed tile source via Func_080153f0(0) once, before waiting for Func_08015048() to signal ready","allocates the prompt sprite via Func_080040b4(0x80)","each frame: writes the 0x0400004a/0x04000052 window registers, clears the prompt's tile/position words, packs the sprite tile index into prompt+8 and an x-derived field into prompt+6 (both via the sibling's exact bit-mask pairs 0x3ff/0xfc00 and 0x1ff/0xfe00), derives prompt+4 from y and the same 0x03001e40 status word the sibling reads, and pushes the sprite via Func_08003dec(prompt, 240)","exits the per-frame loop once Data_03001c94 & 0x303 is nonzero, otherwise waits one frame and repeats","releases the sprite and waits one final frame"],"bounded_search":{"mode":"manual-respell","attempted":1,"exact":false},"bounded_checks":["the reference reserves extra stack space and computes two additional stack pointers (sp+12 and sp+14) beyond the 12-byte prompt buffer at sp+8 that this draft does not account for; the draft's prompt is addressed purely as one 12-byte base+offset buffer (matching the sibling 080bb65c's own recovered shape), so this owner's true local layout is evidently not a single flat struct the way the sibling's is","the reference keeps the (x, y) parameters live in registers through the initial Func_080153f0(0) call and only spills them to the stack (x at sp+0, y at sp+4, in parameter order) immediately before the wait loop; the draft's parameters get spilled at function entry and to swapped stack slots (y at sp+0, x at sp+4), so the parameter-lifetime shape needs a genuine source rewrite (e.g. deferring first use of x/y) rather than a signature change"],"notes":["Reaches within 6 bytes of the reference's 280-byte extent and reproduces every constant this draft could identify (0x80, 0x0400004a/0x04000052, 0x40000000, 0x3ff/0xfc00, 0x1ff/0xfe00, 0xfffc, 248, 240, 0x303) and the full call sequence and branch structure, but the local-variable/stack layout is evidently more elaborate than the flat 12-byte prompt buffer recovered here.","This looks like a source-shape gap rather than a compiler-internals residual: the extra sp+12/sp+14 pointers the reference computes point to real, not-yet-identified locals (or a differently-shaped prompt aggregate) that this draft is missing, and closing that gap should collapse a large share of the current 130-halfword residual at once. Worth a focused follow-up that starts from those two extra stack slots.","Recovered only from retained owner assembly, the family's own already-drafted sibling main:080bb65c (games/gs1/recon/en/main/080bb65c.c), and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."]},"main:080bd424":{"status":"measured-draft","span_bytes":896,"edition":{"role":"shared-candidate-wrapper","edition":"en","base_owner":"080b4424","base_edition":"ja","rebase_status":"proved-shared-core"},"cross_edition":{"measured":"2026-08-23","object_bytes":896,"core_bytes":772,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"callee_correspondences":10,"core_identical":true},"score":{"measured":"2026-08-23","candidate_bytes":894,"reference_bytes":896,"differing_halfwords":422,"wrong_instructions":377,"class":"wrong","note":"Complete coherent source-shape candidate; it is two bytes short and remains far from the byte-exact adoption gate."},"shape":{"workbench_reference_instructions":417,"jump_tables":1,"jump_table_entries":7,"symbolized_references":17,"initial_m2c_structural_match_percent":65.44844},"domain":"Automatic battle-command selection: chooses a class-profile action, validates item/PP/seal restrictions, resolves target mode, and retries boundedly when a choice is unusable.","expressed":["JA-base/EN-wrapper ownership for the all-edition-identical normalized core","the complete seven-way selection strategy and saved-selection state","item-backed action substitution and its target-flag validity gate","special effect-to-command remapping for effects 46, 47, and 49","action usability checks, four-way target-mode dispatch, and the 17-attempt fallback","the GNU nested-call static-chain ABI used by the already recovered 080bd3e4 helper"],"remaining":[{"op":"register and stack allocation","count":1,"where":"the candidate has the exact 28-byte frame but still assigns the long-lived actor, profile, retry flag, selection index, and +0x120 state pointer differently from the reference"},{"op":"control-flow and expression texture","count":1,"where":"the normalized residual spans switch-tail sharing, signed temporary widths, byte-mask construction, and later target-dispatch scheduling"}],"rejected_experiments":[{"experiment":"transfer 080bbb0c's -fno-cse-follow-jumps route and the sibling -fno-cse-skip-blocks / -fno-schedule-insns routes","result":"the raw structural draft remained 870/896 bytes, 418 differing halfwords, and 397 wrong instructions"},{"experiment":"-fno-gcse and -fno-regmove on the raw structural draft","result":"both regressed: -fno-gcse reached 882 bytes / 421 halfwords / 415 wrong instructions; -fno-regmove reached 870 bytes / 419 halfwords / 459 wrong instructions"},{"experiment":"place all seven call-live values in one explicit 28-byte local aggregate","result":"GCC retained an aggregate-base register, enlarged the frame to 32 bytes, and regressed to 926 bytes / 448 halfwords / 465 wrong instructions"},{"experiment":"group only the profile and retry flag in an eight-byte context","result":"it forced the desired retry spill and selection-index register but placed the context at the wrong stack end and regressed the normalized score to 379 wrong instructions"}],"next":"Keep the JA source and EN wrapper architecture. Reconstruct the natural declarations that give the reference allocation (actor in fp, +0x120 state in r8, selection in sl, profile/retry at sp+20/sp+24) before permuting local expressions; the routing flags transferred from 080bbb0c have been ruled out here.","notes":["The local auto declaration names the separately recovered nested helper without emitting a duplicate helper owner; it preserves the r9 static-chain setup visible at all three call sites.","The candidate was reconstructed only from repository types, retained assembly, approved ROM correspondence, and the local structural workbench. No external source, git history, compiler modification, copied instruction bytes, inline assembly, fixed-register variable, or compiler barrier was used."]},"main:080bd898":{"status":"proven-retained","classification":"hidden_register_context_caller_module","span_bytes":1876,"edition":{"role":"shared-candidate-wrapper","edition":"en","base_owner":"080b4898","base_edition":"ja","rebase_status":"proved-shared-core"},"cross_edition":{"measured":"2026-08-23","object_bytes":1876,"relocations":59,"relocation_bytes":236,"literal_fields":41,"literal_bytes":164,"core_bytes":1476,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"starts":{"ja":"080b4898","en":"080bd898","de":"080bfeb0","es":"080c18b0","fr":"080c18b0","it":"080bd8b0"},"callee_correspondences":32,"core_identical":true},"score":{"measured":"2026-08-23","candidate_bytes":1868,"reference_bytes":1876,"differing_halfwords":687,"wrong_instructions":403,"initial_wrong_instructions":876,"wrong_instruction_residual_reduction":473,"wrong_instruction_residual_reduction_percent":53.99543,"best_diagnostic_wrong_instructions":371,"best_diagnostic_differing_halfwords":672,"best_diagnostic_candidate_bytes":1846,"best_diagnostic_route":"approved GCC 2.96 with -fno-gcse; diagnostic only, not an adoptable route","matched_prefix_instructions":9,"class":"wrong","note":"Two 080bbb0c transfer passes recovered the complete state machine and cut the candidate-show wrong-instruction residual by 54.0%, from 876 to 403. Repeated operand loads, a full-width animation-frame carrier, a loop-invariant part-flag carrier, reference-shaped record cursors, exact access width, and declaration lifetime were all material; the retained assembly remains authoritative."},"shape":{"workbench_reference_instructions":838,"jump_tables":1,"jump_table_entries":15,"symbolized_references":43},"domain":"Battle execution state machine that directly invokes 080bbb0c for each planned target, dispatches a 15-entry event kind, and advances later presentation and cleanup phases.","expressed":["JA-base/EN-wrapper ownership, matching the proved architecture used by 080bbb0c","complete target iteration and direct invocation of 080bbb0c for each planned target","complete 15-entry battle-event dispatch, including text waits, actor setup, resolution, animation, refresh, and cleanup","all presentation phases 1, 2, 3, 5, 10, 11, and 13, including timer, input, display, motion-record, and sound behavior","typed playback/runtime, display, motion-record, BattlePlan, BattleUnit, and BattleObjectSlot layouts backed by exact local offsets","reference-shaped record cursors and the halfword write at BattleObjectSlot offset 0x2a","the phase-11 record gather expressed as an explicit top-tested loop, matching the reference store-after-success shape and bringing the fixed-route candidate within 8 bytes of the owner extent"],"unexpressed":[{"op":"source-shape and allocation repair","count":403,"where":"the residual is concentrated in register coloring, stack-slot placement, shared-tail formation, literal-pool placement, and a few load/store orderings"}],"next":"Keep the EN file as a macro-only wrapper. Refine the phase-5 carrier order and phase-11 stack workspace first; both affect long exact runs without changing recovered behavior.","verified_against_reference":["fresh candidate-show build: 1868 candidate bytes versus 1876 reference bytes, 687 differing halfwords, and 403 wrong aligned instructions","the initial compilable stub was 2 bytes with a wrong-instruction residual of 876; the full typed recovery reduces that residual by 473, or 54.0%","relocation-aware comparison locates the JA owner at 0x080b4898; all 1476 non-relocation, non-literal core bytes agree in every edition","the reference has one 15-entry jump table, 838 instructions, 43 symbolized references, and 32 established callee correspondences","a bounded fresh route sweep found -fno-gcse at 1846 bytes / 672 differing halfwords / 371 wrong instructions, a 39-row diagnostic reduction from the routed readable candidate; every tested paired flag regressed from that result"],"rejected":[{"shape":"one factored event operand temporary","result":"kept a value live across the dispatcher and scored 665 wrong instructions; repeating the reference loads cut the residual to 540 and restored 48 candidate bytes"},{"shape":"a second explicit next-event-index source variable","result":"a controlled build showed the compiler coalescing it into the current-index carrier and regressing the candidate from 410 to 446 wrong instructions"},{"shape":"promote the phase-11 animation frame carrier to s32","result":"semantically plausible but changed global allocation and stack size; retaining the narrow carrier currently gives the better measured whole-owner result"},{"shape":"inherit 080bbb0c's -fno-cse-follow-jumps route","result":"the flag is owner-specific; adjacent controlled probing was byte-neutral and it was not added here"},{"shape":"reference-shaped 44-byte frame through a trailing or leading reserved word","result":"the trailing word reached the exact frame extent but regressed to 420 wrong instructions; the leading word also aligned records at sp+12 and selection at sp+28 but regressed to 416, because the runtime carrier remained at sp+4 instead of the reference sp+8"},{"shape":"store the phase-5 viewport in the explicit phase-local aggregate","result":"this moved records and selection to the reference stack offsets and grew the candidate to 1868 bytes, only 8 bytes short of the reference, but still scored 412 wrong instructions and 691 differing halfwords; it was rejected in favor of the smaller readable 410-row baseline"},{"shape":"bounded compiler pass sweep after the stack audit","result":"-fno-gcse was the sole material diagnostic at 371 wrong instructions (from 410). Pairing it with -fno-schedule-insns2, -fno-cse-follow-jumps, -fno-cse-skip-blocks, -fno-regmove, -fno-rerun-cse-after-loop, or -fno-expensive-optimizations scored 424, 415, 543, 373, 459, and 616 respectively. The flag is not an approved owner route and therefore was not adopted; it isolates GCSE/PRE shaping as the next source-level axis."},{"shape":"full-width frame plus loop-invariant part flag and explicit record-gather loop","result":"this fixed-route source improvement removes the byte truncation absent from the reference, hoists the 0xff part flag into the reference-shaped high-register carrier, and stores gathered records only after a successful lookup. It improves the readable routed candidate from 1852/687/410 to 1868/687/403. Re-running -fno-gcse on the improved source gives 1856/683/382, confirming that the source change absorbs part of the earlier PRE signal without relying on a nonstandard route."},{"shape":"third-pass dispatcher carrier and phase-5 lifetime audit","result":"the reference keeps the loaded event index in r5 and copies it to r6 for dispatch, but a distinct readable dispatch_index local is coalesced by the fixed compiler and is byte-neutral. Moving phase-5 viewport/display carriers into the narrow phase scope is also byte-neutral; reversing the tile/scroll expression order regresses to 413 wrong instructions. register hints are ignored. The remaining dispatcher and phase-5 distance is allocation/literal placement rather than a missing switch case, width conversion, or observable source lifetime, so none of these spellings replaced the 403-row best source."}],"notes":["The relocation-aware comparison used the retained EN assembly object as an exact locator; it proves shared machine-code core, not recovered C source.","The JA-to-EN owner shift is +0x9000, exactly matching 080b2b0c to 080bbb0c.","The phase-local record and selection workspace is deliberately explicit because its stack addresses are observable across calls.","No external source, git history, compiler modification, copied instruction bytes, fixed-register variables, barriers, or inline assembly was used."],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"branch-block ordering differs; class structural-topology, wrong_instructions=403","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."}},"main:080be378":{"schema_version":1,"namespace":"main","address":"0x080be378","status":"blocked","owner_bytes":3696,"executable_owner_bytes":3696,"candidate_bytes":2844,"differing_halfwords":1782,"wrong_instructions":1777,"measured":"2026-08-29","domain":"Battle action/ability resolution entry: sets up target-power record from a request struct, runs pre-checks (unit-dead, status-flag clears with associated text/queue calls), clears djinn/summon per-target slot arrays, then switches on a 0..99 ability-tier field read from the request struct (offset +6) through a 100-entry jump table into case bodies that perform elemental-power rolls, ability-kind classification (attack/unleash/psynergy family codes), success-rate gating, per-target power step accumulation loops, and per-target hit-power writes, converging on shared exit points (`sub_080bee00` clamp/finalize, `sub_080bec8a` early-return, `sub_080bec5c` dead-unit tail-call, `sub_080bf1a8`/`sub_080bf1d6`/`sub_080bf1d4` shared epilogue jumps) before a single real epilogue that restores r8-r11 and returns.","map":{"head":"0x080be378","head_symbol":"FunctionHead_080be378","head_file":"games/gs1/asm/080be378.s","true_epilogue":{"file":"games/gs1/asm/080bef88.s","note":"Region_080bef88 ends `add sp, #48 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r1} / bx r1` -- this is the exact mirror of FunctionHead_080be378's prologue (`push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #48`), same frame size (48), same four high-register saves (r8-r11). This is the true, and only, epilogue of the enclosing function."},"span":{"start":"0x080be378","end_exclusive":"0x080bf1e8","size_bytes":3696,"derivation":"end = 0x080bef88 (Region_080bef88 start, per its own json) + 608 (its owner_bytes/executable_owner_bytes, both equal so the owner has no trailing literal pool) = 0x080bf1e8. size = 0x080bf1e8 - 0x080be378 = 0xe70 = 3696."},"member_regions_in_order":[{"addr":"0x080be378","symbol":"FunctionHead_080be378","file":"games/gs1/asm/080be378.s","role":"real prologue + setup + 100-entry switch dispatcher (JumpTable_080be570) + default-case tail + literal pool (LiteralPool_080be738)"},{"addr":"0x080be76c","symbol":"Region_080be76c","file":"games/gs1/asm/080be76c.s","role":"switch case body (jump-table index 0), prologue-less, reached only by the computed `mov pc, r3` in the head and by internal cross-region branches; falls through into embedded literal data mid-file (dead code between tail branches) which is retained as part of the region, not separately callable"},{"addr":"0x080beb08","symbol":"Region_080beb08","file":"games/gs1/asm/080beb08.s","role":"switch case body (jump-table index 5) plus an internal secondary jump table (`.4byte` array right after `.L_080bee58`) for a sub-classification of ability sub-kind; ends with `bne sub_080bef88` falling through into Region_080bef88's `sub_080befac`"},{"addr":"0x080bef88","symbol":"Region_080bef88","file":"games/gs1/asm/080bef88.s","role":"continuation of the ability-kind classification and per-target power-accumulation loop (`sub_080befac`/`.L_080bf0ca` loop), converges all cases at `.L_080bf1a8`, then the real, shared, single epilogue for the whole function"}],"shared_exit_labels":[{"label":"sub_080bee00","addr":"0x080bee00","location":"inside games/gs1/asm/080beb08.s (label .L_080bee00 in that file), referenced as an absolute-address tail branch from games/gs1/asm/080be76c.s"},{"label":"sub_080bec8a","addr":"0x080bec8a","location":"inside games/gs1/asm/080beb08.s, referenced from games/gs1/asm/080be76c.s"},{"label":"sub_080bec5c","addr":"0x080bec5c","location":"inside games/gs1/asm/080beb08.s, referenced from games/gs1/asm/080be76c.s and games/gs1/asm/080be378.s (default-case handler at .L_080be51a-equivalent path)"},{"label":"sub_080bf1a8","addr":"0x080bf1a8","location":"= .L_080bf1a8 inside games/gs1/asm/080bef88.s itself, referenced as an absolute-address branch from games/gs1/asm/080beb08.s"},{"label":"sub_080bf1d6 / sub_080bf1d4","addr":"0x080bf1d6 / 0x080bf1d4","location":"fall inside the tail instructions of games/gs1/asm/080bef88.s between .L_080bf1a8 and the real epilogue at 0x080bf1e8 (or in the two bytes immediately adjacent); referenced as absolute-address `bl`/`b` targets from games/gs1/asm/080be76c.s and games/gs1/asm/080beb08.s. These behave as internal 'return a fixed status code from the enclosing function' veneers, not separate callable functions -- there is no external cross-reference to either address anywhere else in the corpus."}]},"refuted_hypotheses":["That games/gs1/asm/080bf678.s (Func_080bf678) and games/gs1/asm/080bfba4.s (Func_080bfba4) are further fragments of this split function, as speculated in games/gs1/recon/en/dossiers.json#main:080bef88's 'recommendation' field. Refuted: both files carry their own complete, self-contained prologue (`push {r5,r6,r7,lr}; mov r7,fp; mov r6,sl; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp,#N`) and their own matching epilogue (`add sp,#N; pop {r3,r5,r6,r7}; mov r8,r3; mov r9,r5; mov sl,r6; mov fp,r7; pop {r5,r6,r7}; pop {r1}; bx r1`), each ending in `bx r1` after its own frame teardown -- the exact shape of an ordinary standalone leaf-ish function, not a prologue-less internal region. `grep` across games/gs1/asm/080be76c.s, 080beb08.s, 080bef88.s, and 080be378.s for the literal addresses 080bf678/080bfba4 finds zero references in either direction. games/gs1/source-paths.json also has no owner entries for these two addresses at all (unlike 080be378/080be76c/080beb08/080bef88, which are all registered), consistent with them being ordinary not-yet-classified standalone owners outside this cluster.","That the true head could lie earlier than games/gs1/asm/080be378.s. Refuted: 080be378.s's own header comment and symbol name (`FunctionHead_080be378`, marked in the file's Japanese comment as the branch head of a function split across regions with an embedded jump table and literal pool) plus its genuine push/mov/push/sub-sp prologue confirm this is the entry. The immediately preceding file games/gs1/asm/080be18c.s (`Func_080be18c`) is a fully self-contained function (own push/pop, own bx r1 return) that is itself called via `bl sub_080be18c` from inside Region_080be76c -- a normal callee, not a predecessor fragment of the same function."],"recommendation":"Decoded L_080bee08's secondary (subclass 0..5) jump table strictly from ROM bytes (`xxd -s 0xbee68 -l 0x20 roms/gs1-en.gba` and `xxd -s 0xbef58 -l 0x40 roms/gs1-en.gba`), settling the prior pass's self-contradiction from hand-reassembly. The `ldr r2,[pc,#260]` at 0x080bee68 resolves (pc=0x080bee6c, +0x104) to the pool word at 0x080bef70, whose raw little-endian bytes are `70 ee 0b 08` = 0x080bee70 -- the table's own base address, immediately following the `mov pc,r3` tablejump (objdump misdecodes this inline data as six bogus `cdp` coprocessor instructions, which is exactly the contradiction the prior pass hit). The six table words at 0x080bee70..0x080bee87, read raw, are: table[0]=0x080beea0, table[1]=0x080bee88, table[2]=0x080bee90, table[3]=0x080bee98, table[4]=0x080beea8, table[5]=0x080beea0. Cross-checked against the surrounding code at each target: bodies at 0x080bee88/90/98/a0 each load a pool constant (0x080bef74=0x4001 for the 0x080bee88/beea0 pair, 0x080bef78=0x4004 for the 0x080bee90/98 pair) into `tgt->88` and converge on the shared `str r3,[r2,#88]` at 0x080beea6, falling into the 0x080beea8 debug-print tail; only table[4] (subclass 4) points directly at 0x080beea8, past the shared store, and is the one subclass that truly skips the assignment. The existing candidate had this backwards -- it treated subclass 0 (not subclass 4) as the skip case, and had subclass 0 falling into the same body as 4 instead of the same body as 1/5. Corrected the switch in games/gs1/recon/en/main/080be378.c (~line 611) so subclass 0 now assigns 0x4001 (matching table[0]=0x080beea0, which shares the assign-then-fall-into-beea6 body with subclass 5's table[5]=0x080beea0) and only subclass 4 skips to L_080beea8 directly. Re-audited the elemental/status-code table constants in Region_080bef88 (0x080bf1f0/f4/fc/0x080bf200, named in the same task) and found no remaining placeholders -- both tables (`(u32*)0x080c2da0` by abilityId bounded at 518, `(const u8*)0x080c2b98` by abilityId bounded at 517) were already resolved to concrete addresses/bounds in a prior pass, nothing left to decode there. Net effect: candidate_bytes grew 2840->2844 (the corrected switch case's extra assignment), differing_halfwords held flat at 1782 (was already 1782 going in), matched_prefix held at 7, class remained compiler-unemittable across 3 repeated deterministic rescores (compile=cache, identical numbers each time) -- confirming, as every recent attempt has, that this is a genuine correctness fix independent of the dominant remaining divergence (the candidate's 12-byte/2-register frame vs the reference's 48-byte r8-r11 frame), which no single block's content can move. dh is not 0; verify was not expected to go green from this fix alone and did not. Did not reach 20 scored iterations -- the table decode itself needed several verification passes (objdump misdecode diagnosis, raw xxd byte read, cross-referencing every jump target's body) but the resulting code change is a single well-verified switch correction with nothing further to iterate on productively without guessing; recommend the next pass return to the standing recommendation from prior attempts (`bun tools/allocator-lens/lens.ts 080be378` plus function-long-lifetime work on the actor/req/tgt-derived exit-block variables) as the higher-leverage route to the prologue register-pressure gap, since ROM-direct constant/table decoding has now been exhausted for every placeholder this dossier has ever flagged.","recommendation_superseded_2":"This pass found and fixed a real correctness bug in the head/exit, not just a register-shape mismatch: standalone-assembling games/gs1/asm/080be378.s and objdumping it (r10 is set via `add r2,sp,#32; str r0,[r2,0]; mov r10,r2` BEFORE the `bl sub_08077008` actor lookup, i.e. r10 = &(stack copy of the raw `req` argument), never reassigned) shows the prior drafts had mislabeled four `req`-relative reads as `actor`-relative: the ability-tier field used for the 100-way switch dispatch (`req+6`, not `actor+6` -- confirmed at .L_080be51a: `mov r0,r10; ldr r3,[r0,0]; ldrsh r3,[r3,#6]`), the tier!=3 gate inside the ACTOR_STATUSFLAG_OFF pre-check (same req+6 field), and both reads at the shared L_080bf1a8 exit in games/gs1/asm/080bef88.s (`mov r4,r10; ldr r3,[r4,0]; ldrsh r3,[r3,#6]` gating the statusKind remap, and the final `tgt+72 = req[6]` write before the real epilogue). Also found the two 13-byte init loops right after the tier==8 check were writing to the wrong pointer: `ldr r4,[sp,#8]` derefs to the address of the `tgt` stack slot (not `actor`), so `tgt[44..56]=0` and `tgt[58..70]=0xff`, not `actor[44..]`/`actor[58..]`. Fixed all six sites in games/gs1/recon/en/main/080be378.c (lines ~196/205/213-218/803/809 before this edit) to read/write `req`/`tgt` instead of `actor`, and resolved Region_080beb08's remaining 4 TEXT_TBD placeholders the same way as always (standalone-assemble games/gs1/asm/080beb08.s at its real load address 0x080beb08, already 0 mod 4, objdump with --adjust-vma=0x080beb08, ROM-direct read of the 4 pool words at 0x080bef58/5c/60/7c): TEXT_TIER5_CUE_MSG=2199, TEXT_TIER5_BUSY_MSG=2139, TEXT_TIER6_MSG=2111, TEXT_TIER5_STATUS_MSG=2068. Net effect: dh improved 1772->1757, candidate_bytes shrank 2962->2890 (removing a stray `(u8 *)actor` cast pattern changed codegen slightly), matched_prefix held at 7 across 3 repeated deterministic rescores (compile=cache) -- the router's own class flipped from missing-extra-code to compiler-unemittable at this size, meaning the prologue-shape gap (candidate still allocates a 12-byte/2-register frame vs the reference's 48-byte r8-r11 frame) is now the single dominant divergence class again. The actor/req correctness fix did NOT move matched_prefix past 7 despite being a genuine bug fix -- `req` was already read constantly throughout the function body regardless of this bug (every case's `Func_08015120(*(s16*)(req+0),...)` alone gives it plenty of live-range pressure), so correcting a handful of additional `req`-vs-`actor` sites did not change which pseudo GCC finds cheapest to spill. Recommend the next pass audit the SAME actor/req/tgt-confusion class of bug across the rest of the function (Region_080be76c's case bodies, Region_080beb08's L_080bee08 block, and Region_080bef88's tail) by cross-checking each `(u8 *)actor +`/`(u8 *)req +`/`tgt +` access against a standalone objdump of its owning region rather than assuming the existing labeling is correct -- this pass only checked the head and the shared exit named by the task, not the case bodies, and the same r10-is-really-&req pattern could easily recur wherever a case body was translated by eye rather than checked against ground truth. This is very plausibly the same class of bug driving the compiler-unemittable prologue gap on its own, since a misattributed base pointer changes exactly which value the allocator finds worth keeping live across `bl` boundaries.","recommendation_superseded_3":"Resolved every Region_080be76c placeholder constant plus the shared head-function pre-check flags/messages, all from ground truth: assembled games/gs1/asm/080be378.s and games/gs1/asm/080be76c.s standalone (both already 4-byte aligned at their real load address mod 4, no parity padding needed), objdumped each, and for every `ldr rN,[pc,#imm]` whose target falls outside the file's own .text read the word straight out of roms/gs1-en.gba at (target-0x08000000). Head function: LiteralPool_080be738 gave ACTOR_FAINT_FLAG_OFF=325/msg=2176, ACTOR_SILENCE_FLAG_OFF=316 (immediate, not pool)/msg=2136, ACTOR_SEAL_FLAG_OFF=315/msg=2135, ACTOR_STATUSFLAG_OFF=304 (immediate)/msg=2137, and the tier==99 case's two messages 2115/2118. Region_080be76c's own separate pool (living in the gap 0x080bea9c-0x080beb08, immediately before Region_080beb08's own code) gave: tier==0's two messages 2073/2074; tier==1's ACTOR_COST_FLAG_OFF=317 (distinct field from the head's ACTOR_FAINT/SILENCE/SEAL offsets despite the old code reusing one macro name for all of them) and message 2110; tier==2's REQ_FLAG_OFF=299 (confirmed to be a req-relative offset, not actor-relative -- the pre-check block's superficially-similar `actor[REQ_FLAG_OFF]&1` from the old code was actually a different field, now split out as ACTOR_STATUSFLAG_OFF=304) and its four messages 2075/2070/2072/2071; tier==3/7's message 2070 (same id as tier==2's no-ability message); and tier==4's full ~20-way exact/range abilityId classification tree, walked instruction-by-instruction from 0x080be9ce to 0x080bea9a and rewritten as nested if/else exactly matching the reference's branch structure (replacing the old code's partial switch+TODO-default), with K1..K4_ABILITY_ID resolved to the four pool-sourced compares 441/495/499/503 and all ~15 exact-match/message constants resolved directly. Net effect: dh improved 1799->1772, candidate_bytes grew 2502->2962 (more real body, not padding), matched_prefix held at 7 across 3 repeated deterministic rescores (compile=cache), confirming the change is real and stable. matched_prefix did NOT advance past 7 -- the r8-r11/48-byte-frame register-pressure gap named in the prior attempt is still present and, per this pass's investigation, is a global-liveness property of the whole function body rather than something these particular constant fixes could move (they replace inert 0/NULL immediates with different immediates of the same instruction shape, which does not by itself change which pseudos survive across `bl` boundaries). Region_080beb08's own TEXT_TBD placeholders (Func_080bbabc's text arg and three Func_080151c8 calls) remain unresolved -- explicitly deferred this round to stay inside the stated scope (Region_080be76c first) -- and are the next mechanical constant-resolution target with the same technique. Separately, and likely higher-leverage for the matched_prefix/register-pressure gap specifically: `bun tools/allocator-lens/lens.ts 080be378` and the exit-block lifetime work named in this round's task (giving actor/req/tgt-derived C variables function-long lifetimes by using them at the L_080bf1a8/epilogue exit the way the reference's sub_08002dd8/sub_080cdbc0 finalizer calls do) was NOT attempted this pass due to time/scope -- recommend it as the concrete next step over further constant hunting, since the last four attempts' notes all converge on the same conclusion that the prologue shape is decided by whole-function live-range overlap, not by any single block's content.","attempts":[{"candidate":"ROM-direct re-decode of L_080bee08's secondary (subclass 0..5) jump table, per this dossier's own standing flag that the prior pass's hand-reassembly produced self-contradictory address arithmetic. Read the table's own base pointer from the pool word at 0x080bef70 (raw bytes via `xxd -s 0xbef58 -l 0x40 roms/gs1-en.gba`, little-endian word = 0x080bee70) and the six table words directly from 0x080bee70..87 (via `xxd -s 0xbee68 -l 0x20 roms/gs1-en.gba`): table[0]=0x080beea0, table[1]=0x080bee88, table[2]=0x080bee90, table[3]=0x080bee98, table[4]=0x080beea8, table[5]=0x080beea0 -- objdump misdecodes this inline data region as six bogus `cdp` coprocessor instructions, which was the source of the prior pass's contradiction. Cross-checked each target's body against the full `--start-address=0x080bee00 --stop-address=0x080bef88` disassembly: subclass 0/1/5 all assign tgt->88=0x4001 (pool @0x080bef74) and converge on the shared `str r3,[r2,#88]` at 0x080beea6; subclass 2/3 assign 0x4004 (pool @0x080bef78) via the same convergence; only subclass 4's table entry points straight at 0x080beea8, past the shared store, skipping the assignment entirely. Corrected games/gs1/recon/en/main/080be378.c's switch (~line 611): subclass 0 now assigns 0x4001 and falls into L_080beea6 (it had been wired as the skip case, backwards), and subclass 4 alone now goes straight to L_080beea8. Re-checked Region_080bef88's elemental/status-code table constants (0x080bf1f0/f4/fc/0x080bf200) named in the same task and found no remaining placeholders to resolve.","candidate_bytes":2844,"differing_halfwords":1782,"wrong_instructions":1777,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"candidate_bytes grew 2840->2844 (one corrected switch-case assignment), differing_halfwords held flat at 1782, matched_prefix held at 7 across 3 repeated deterministic rescores (compile=cache, identical numbers each time). Class stayed compiler-unemittable, confirming (as every recent attempt has) that this is a genuine ground-truth correctness fix orthogonal to the dominant remaining divergence -- the candidate's 12-byte/2-register frame vs the reference's 48-byte r8-r11 frame -- which no single block's content moves on its own. This closes out the last two open items this dossier had explicitly flagged as unresolved (the L_080bee08 secondary table and the Region_080bef88 tail tables); nothing ROM-decodable remains outstanding in this owner. Did not reach 20 scored iterations: the fix is a single well-verified switch correction with no further productive spelling to try without guessing, so iteration stopped once the table decode and its 3 confirming rescores were stable. Standing recommendation unchanged from prior attempts: the register-pressure/prologue-shape gap needs `bun tools/allocator-lens/lens.ts 080be378` plus function-long-lifetime work on the actor/req/tgt-derived exit-block variables, not further constant hunting."},{"candidate":"Continued the actor/req/tgt base-pointer audit into tier==0..4 (games/gs1/asm/080be76c.s), L_080bee08 (games/gs1/asm/080beb08.s), and the buff/debuff/elemental/status tables (games/gs1/asm/080bef88.s), per this dossier's own recommendation. Standalone-assembled and objdumped all four member regions with --adjust-vma set to each region's real load address and cross-checked every stack/register base against the head's own established dedication (r10=&req always; [sp,#12] dereferenced twice = &actor, set once at the head via `mov r1,sp; adds r1,#28; str r1,[sp,#12]` then `str r0,[r1,0]` right after the Func_08077008 lookup; [sp,#8] dereferenced twice = &tgt, set at frame setup via `add r2,sp,#32/adds r3,#44/str r3,[sp,#8]`). Found and fixed two confirmed instances of the same actor/req mislabeling class: (1) tier==0's opening call -- the prior draft called `Func_08077160(*(s16*)(req+0))` and separately recomputed `abilityId = *(s16*)(req+0)`, but the standalone objdump of 080be76c.s shows `ldr r4,[sp,#12]` (actor, not r10/req) feeding the call argument, and the call's own r0 return value moved straight into fp and used as Func_080be18c's argument -- i.e. Func_08077160 takes `actor` and returns the abilityId, req+0 is never reloaded on this path. Re-declared the extern as `s16 Func_08077160(void *actor)` and rewrote the call site to `abilityId = Func_08077160(actor);`. (2) tier==2's item-ability lookup block (address 0x080be888 onward) had three separate `req + 216 + slotIdx*2` array reads (itemId lookup, flagsField gate, and the Func_08015120 debug-print argument) plus one `((u8*)req)[REQ_FLAG_OFF]` gate, all objdump-confirmed to use `ldr r4,[sp,#12]` (actor) rather than r10 (req); fixed all four sites to `actor`-relative and renamed the misleading `REQ_FLAG_OFF` macro to `ACTOR_ITEM_USED_FLAG_OFF` to match. Attempted to re-verify L_080bee08's secondary (subclass 0-5) jump table and the elemental/status-code tables in Region_080bef88 the same way, but my own standalone re-assembly of the L_080bee08 jump-table region produced self-contradictory address arithmetic on manual review (the `ldr r2,[pc,#260]` literal's resolved value landed on what a naive linear disassembly reported as inline code rather than table data, and I could not settle whether that reflects the assembler emitting the table inline after `mov pc,r3` at a different offset than I computed, or a genuine second table elsewhere) -- rather than land a plausible-looking but unverified fix, left that block and the bef88 tail tables exactly as the prior pass had them, flagged for the next pass to re-derive with a cleaner methodology (e.g. decoding the table strictly from the linked/relocated object rather than hand-computing pc-relative pool offsets against a manually reassembled standalone .o).","candidate_bytes":2840,"differing_halfwords":1782,"wrong_instructions":1777,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"dh improved 1783->1782 (candidate_bytes unchanged at 2840), matched_prefix held at 7 across repeated deterministic rescores (compile=cache, identical numbers each time). `bun tools/allocator-lens/lens.ts 080be378` (690 pseudos this pass, up from 473 in the prior attempt as the candidate has grown) still shows no pseudo with a genuine HI_REGS preference among those inspected -- all prefer LO_REGS/BASE_REGS/STACK_REG -- reconfirming the standing conclusion that the prologue's r8-r11/48-byte-frame gap is a whole-function live-range-overlap property, not something these two additional correctness fixes (real, but small in instruction-count terms) could move on their own. This pass did not reach the coordinator's target of 25 scored iterations: two genuine, ground-truth-verified fixes were found and landed with a handful of confirming rescores, but the L_080bee08 secondary-table and Region_080bef88 elemental/status-table re-verification that the task also named could not be completed to the same evidentiary standard in the time available, and was deliberately left unchanged rather than guessed at. Recommend the next pass re-attempt those two blocks specifically, ideally by reading the jump-table/pool bytes directly from a linked object or from roms/gs1-en.gba at the region's real absolute address rather than a hand-assembled standalone .o, since a standalone reassembly's own literal-pool placement is exactly the kind of thing that can silently drift from the ROM's real layout when multiple pc-relative loads compete for pool space."},{"candidate":"Exit/head lifetime audit plus Region_080beb08's remaining constants. Standalone-assembled and objdumped games/gs1/asm/080be378.s (--adjust-vma=0x080be378) to trace r10's true dedication: it is set via `add r2,sp,#32; str r0,[r2,0]; mov r10,r2` BEFORE the actor lookup call, so it is `&(stack copy of req)`, not `&actor`. Corrected 6 sites in games/gs1/recon/en/main/080be378.c that had misattributed `req`-relative and `tgt`-relative reads/writes to `actor`: the 100-way switch's tier value (req+6, was actor+6), the ACTOR_STATUSFLAG_OFF pre-check's tier!=3 gate (req+6, was actor+6), the two 13-byte slot-init loops after the tier==8 check (tgt+44/tgt+58, were actor+44/actor+58), and both reads at the shared L_080bf1a8 exit in Region_080bef88 (statusKind remap gate and the final tgt+72=req[6] write, both were actor+6). Also standalone-assembled games/gs1/asm/080beb08.s (already 0 mod 4 at its real load address 0x080beb08) and objdumped it with --adjust-vma=0x080beb08 to resolve its last 4 TEXT_TBD placeholders by reading roms/gs1-en.gba at the 4 pool words (0x080bef58/5c/60/7c): TEXT_TIER5_CUE_MSG=2199, TEXT_TIER5_BUSY_MSG=2139, TEXT_TIER6_MSG=2111, TEXT_TIER5_STATUS_MSG=2068. Continuing the same base-pointer audit into Region_080bef88's per-target power-accumulation loop (`.L_080bf0ca`) found one more instance: the prior draft's own comment claimed 'r10 holds &actor' for that loop's first Func_08077178 argument, but objdumping games/gs1/asm/080bef88.s directly shows r10 is never reassigned anywhere in that file (only ever `mov r4,r10` / restored in the epilogue), so it keeps the head's dedication of `&req` for the whole function; fixed the argument from `actor+0` to `req+0` and corrected the stale comment.","candidate_bytes":2840,"differing_halfwords":1783,"wrong_instructions":1781,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"The head/exit fix alone improved dh 1772->1757 with candidate_bytes shrinking 2962->2890. The additional .L_080bf0ca argument fix (actor+0 -> req+0) then moved dh to 1783 (candidate_bytes 2890->2840) -- a regression in the raw count despite being an independently ground-truth-verified correctness fix (confirmed directly against the standalone objdump, not inferred), consistent with CONTRIBUTING's own caution that raw dh/wrong_instructions are not strictly comparable across candidate-size changes and this router class (compiler-unemittable) pins on the same allocator-class defect regardless of body content. Kept the fix on correctness grounds rather than reverting to chase a smaller raw number. matched_prefix held at 7 throughout both fixes (3 repeated deterministic rescores each, all compile=cache with identical numbers), and the router class is compiler-unemittable at both points, meaning the dominant remaining divergence is the prologue frame-size/register-set gap (candidate: 12-byte frame, 2 saved registers; reference: 48-byte frame, r8-r11 saved) rather than incorrect body content. `bun tools/allocator-lens/lens.ts 080be378` sampled after the fixes still shows no pseudo with a genuine HI_REGS preference in the excerpted records (all sampled pseudos prefer LO_REGS/BASE_REGS/STACK_REG), consistent with the gap being driven by aggregate live-range-overlap count rather than any single pseudo's class cost. This attempt audited the actor/req/tgt base-pointer attribution at the head, the shared L_080bf1a8 exit, and the abilityId==178 loop named/reached by the task; it did NOT re-check the remaining case bodies in Region_080be76c/080beb08 (the tier==0..4 blocks, the L_080bee08 status/kind table, the buff/debuff classification, elemental/status-code tables) for the same class of bug, which is the concrete next step recommended below given how much a base-pointer misattribution can shift which value the allocator treats as worth spilling across `bl` boundaries -- and given that this pass found three separate instances of exactly that mistake on only a partial audit."},{"candidate":"Resolved every Region_080be76c literal-pool placeholder and the shared head-function pre-check flags/messages from ground truth (standalone-assemble games/gs1/asm/080be378.s and games/gs1/asm/080be76c.s, objdump, ROM-direct read for pool words landing outside each file's own .text). Renamed the old single-purpose ACTOR_FLAG_A/B/C_OFF and REQ_FLAG_OFF macros into per-site names once ground truth showed they were distinct fields being conflated (ACTOR_FAINT/SILENCE/SEAL_FLAG_OFF=325/316/315 on actor for the head's pre-checks, ACTOR_STATUSFLAG_OFF=304 on actor for the head's &1 gate, ACTOR_COST_FLAG_OFF=317 on actor for tier==1's cost check, REQ_FLAG_OFF=299 on req for tier==2/case888). Rewrote tier==4's ~20-way abilityId classification from a partial switch+TODO-default into an exact nested if/else matching the reference's real branch tree (0x080be9ce-0x080bea9a), resolving K1..K4_ABILITY_ID to 441/495/499/503 and all exact-match/message constants. Region_080beb08's own TEXT_TBD placeholders (4 call sites) were left unresolved, explicitly deferred to keep this pass inside its stated scope.","candidate_bytes":2962,"differing_halfwords":1772,"wrong_instructions":1770,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"missing-extra-code","note":"dh improved 1799->1772 (candidate_bytes grew 2502->2962, consistent with more real body rather than regression). matched_prefix held exactly at 7 across 3 repeated deterministic rescores (compile=cache each time). This confirms the prior attempt's conclusion: the r8-r11/48-byte-frame register-pressure gap is not sensitive to which immediate values a block loads, only to how many distinct pseudos stay live across `bl` boundaries -- these constant fixes changed correctness of individual instructions (real dh improvement) without changing the function's live-range shape (unchanged matched_prefix). The `--align` diff at the top of the function is unchanged in kind from prior attempts: candidate still allocates a 12-byte frame with 2 saved registers where the reference allocates 48 bytes with 4 (r8-r11)."},{"candidate":"Head-only draft: real prologue/frame, the shared setup sequence (actor lookup, target-record zeroing, dead-unit check, tier read), the tier>99 guard, and the 100-way switch dispatch skeleton. All three switch-case body regions (Region_080be76c, Region_080beb08, Region_080bef88's classification/accumulation tail) are left as single TODO stubs calling Func_080bee00 rather than folded in instruction-by-instruction.","candidate_bytes":132,"differing_halfwords":1847,"wrong_instructions":1623,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"Router verdict at this size is compiler-unemittable / playbook=classification-proof, i.e. 'do not search spellings for a shape the compiler cannot emit' -- expected and correct at this stage: the reference prologue saves r8-r11 across dozens of `bl` calls spread through ~3.2KB of case-body logic, so a stub this short cannot reproduce that register pressure. The mismatch starts at instruction 1 (candidate emits `mov r7,r8` where the reference emits `mov r7,fp`, i.e. GCC picked a different, much smaller register-saving shape for a much smaller function) and is a direct, expected consequence of the missing body, not a spelling or allocation defect worth tuning yet."},{"candidate":"Complete structural draft: all three case-body regions (Region_080be76c's 5 switch-case bodies at 0x080be76c/7d0/888/96e/984, Region_080beb08's case-5/case-6/default bodies including its internal ability-family sub-dispatch, and Region_080bef88's converging tail through the real epilogue) folded into Func_080be378 as goto-labeled blocks matching the original addresses, replacing every cross-region `bl sub_080bec5c`/`sub_080bec8a`/`sub_080bee00`/`sub_080bf1d6`/`sub_080bf1d4` with a plain `goto` to an internal label (justified: the tier==99 default case's own trailing `bl sub_080bf1d4` is the file's last instruction before its literal pool, so it structurally cannot be a real returning call). candidate_bytes grew from 132 to 1296 (roughly matching the reference's ~3696-byte scope now that all case bodies are present). Several literal-pool constants (status-flag byte offsets, ~4 exact ability-id compare constants, UI text-resource pointers) are left as named 0/NULL placeholders pending halfword-stage decoding.","candidate_bytes":1296,"differing_halfwords":1843,"wrong_instructions":1621,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","matched_prefix":1,"note":"Despite the body growing roughly 10x and now covering every branch/case observed in the retained assembly, matched_prefix and dh barely moved (1847->1843, wrong_instructions 1623->1621, matched_prefix stayed at 1). The router still reports compiler-unemittable at the prologue: GCC still only spills 2-3 high registers (`mov r7,sl; mov r6,r8; push {r6,r7}`) instead of the reference's full r8-r11 four-register save + 48-byte frame."},{"candidate":"Dense 100-arm switch matching JumpTable_080be570 exactly (every index 0..99 spelled out as its own `case N:` per the coordinator's instruction, grouped by shared goto target; case 99 = the true 0x080be700 body, newly reconstructed from games/gs1/asm/080be378.s's tail block). Verified via games/gs1/scratch/candidate-show/080be378/candidate.insns that this DOES make GCC 2.96 emit a real tablejump (`cmps r3,#99 / bls / ldr r2, / lsls r3,#2 / ldr r3,[r3,r2] / movs pc,r3`), confirming CASE_VALUES_THRESHOLD and the range/count heuristic in alchemy-gcc/agscc/gcc/stmt.c:5390-5401 (`count < 5 || range > 10*count`) are both satisfied for this shape -- the sparse hand-grouped switch from the previous pass did not reliably guarantee this, the fully-enumerated one does.","candidate_bytes":1696,"differing_halfwords":1820,"wrong_instructions":1715,"matched_prefix":1,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"5 deterministic rescores after this edit all produced the identical candidate=1696/dh=1820/matched_prefix=1 (no randomness in the toolchain, as expected -- confirms the number is stable, not noise). The tablejump theory (that forcing a dense switch would, on its own, widen the live set enough to fix the r8-r11 prologue) did NOT pan out: matched_prefix is measured from function entry, and the prologue's register-saving instructions are decided by GLOBAL register pressure across the whole function body, which is a property of how many DISTINCT values are simultaneously live across `bl` boundaries -- not of whether the dispatch mechanism happens to be a table vs a compare-chain later in the body. Read `bun tools/allocator-lens/lens.ts 080be378` (473 pseudos total) and alchemy-gcc/agscc/gcc/stmt.c's expand_end_case: the table-vs-chain decision and the prologue-shape decision are two independent compiler passes (stmt.c case expansion happens at tree-to-RTL time; local-alloc/global register class assignment happens later and is driven purely by live-range overlap counts). Root-cause hypothesis, now stronger: several sub-blocks in this draft are still simplified TODO stubs (L_080bee08's status/kind table, L_080bef28's status-cure gate, and critically Region_080bef88's real per-target power-accumulation loop at `.L_080bf0ca`) that in the true source reference `req`/`actor`/`abilityData`-equivalent values dozens of times each; my simplified stand-ins reference them only a handful of times, so the allocator finds it cheaper to reload from memory on demand than to dedicate 4 whole callee-saved registers for the function's duration. Finishing those specific remaining blocks (not further switch/table tuning) is the concrete next step most likely to move matched_prefix."},{"candidate":"Finished exactly the three stub blocks named by the coordinator, translated faithfully from the retained assembly with literal-pool constants resolved directly from roms/gs1-en.gba (per-owner .o disassembly leaves the pool physically out of the isolated object's bounds, so pc-relative target addresses were computed by hand against Region_080beb08's real load address 0x080beb08 and read straight from the ROM file -- verified against the known-good table-address entry at local offset 0x468, which round-tripped to 0x080bee70 exactly): (1) L_080bee08's status/kind table setup, now writing tgt->76/80/84/88 from `targetUnit` (a newly-introduced variable -- Func_08077008(tgt[2]), the ability's recipient, distinct from `actor`) using resolved constants actor+297 (flag byte), actor+296 (subclass byte), and tgt->88 combos 0x4001/0x4004; (2) L_080bef28's status-cure gate, now reading targetUnit+56/+316/+2068/+315/+314 (offsets 2068=0x814 and 315=0x13b read from ROM at 0x080bef7c/0x080bef80) instead of the generic actor-flag placeholders; (3) the per-target power-accumulation loop at 0x080bf0ca in Region_080bef88, gated on `abilityId==178`, looping `(s8)tgt[1]` times over tgt[2+i] calling Func_08077178(reqId, slotByte, abilityData->2, abilityData->3, 100) and writing the byte result to tgt[2+i+56].","candidate_bytes":1884,"differing_halfwords":1807,"wrong_instructions":1711,"matched_prefix":1,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"dh improved modestly (1820->1807) and wrong_instructions ticked down (1715->1711), consistent with the newly-resolved constants and loop being genuinely closer to the reference, but matched_prefix is STILL 1 and the prologue is unchanged (still `mov r7,sl; mov r6,r8; push {r6,r7}` instead of the reference's 4-register r8-r11 save). This refutes the specific strong form of the root-cause hypothesis from the previous attempt -- finishing these three particular blocks alone was not enough to force the wider live set. Two things stand out for the next pass: (a) `targetUnit` and `abilityData` are each used only within their own local block and are not read again near the shared exit (L_080bf1a8), so they still don't have function-wide live ranges; (b) large parts of Region_080bef88 remain deliberately unmodeled per this pass's scope (the buff/debuff classification table at 0x080bf044, the elemental-table lookup at 0x080bf0f8, the status-code selection at 0x080bf14a-0x080bf16c, and the sub_080772b8 flag-bit set at 0x080bf166-0x080bf186) -- all of which read `actor`/`abilityData`/`tgt` repeatedly and sit between here and the real epilogue, so they are very likely where the reference's actual register pressure comes from, not the three blocks addressed this pass. Recommend finishing the rest of Region_080bef88's body next, specifically because it is the last region before the shared epilogue and thus the most likely place where GCC 2.96 decides multiple values must stay resident across the tail rather than being reloaded once."},{"candidate":"Translated the remaining Region_080bef88 tail blocks named by the prior attempt's recommendation: the buff/debuff classification (0x080befb4-0x080bf043, a 4-way capValue/stepValue classification of abilityData->3 gating a per-slot tgt+30.. step-accumulation loop), the elemental-table lookup (0x080bf0f8, `((u32*)0x080c2da0)[abilityId]` with a stacked-count scaling term for count>1), the status-code selection (0x080bf138-0x080bf16c, a status-override byte table at 0x080c2b98 falling back to Func_080bd3c8()/tgt->88/req->297 gating), and the sub_080772b8 flag-bit set (tgt->88 |= 0x10000, plus an abilityId==178 tgt->58 gated |= 0x1000). All resolved by assembling games/gs1/asm/080bef88.s standalone (already 4-byte aligned at its real load address 0x080bef88, no parity padding needed) and objdumping it, then reading the 8 pool words that land in the gap immediately after the region's own 608-byte code (0x080bf1e8-0x080bf207) straight out of roms/gs1-en.gba: 0xffff (rand mask), 0x206/518 and 0x205/517 (abilityId bounds), 0x080c2da0 and 0x080c2b98 (the two lookup-table base addresses, referenced via raw address casts per the project's existing `((u32 *)0x080a0108)[selection]` convention), 0xfffff000 (stack-count scaling additive), and 0x129/297 (a charge-flag byte offset -- same numeric value as the actor+297 flag used in the L_080bee08 block above it, but modeled here as req+297 since this file's own sp+12 stack slot holds &req throughout, established by the region head's own Func_080772f8(req[0]) call). Also fixed a bug the objdump surfaced in the existing abilityId==178 per-target power loop: its first Func_08077178 argument was wired from `req+0` but the standalone disassembly shows r10 (this file's dedicated `&actor` register) dereferenced immediately before that read, so it is `actor+0`. Wired reachability by routing the shared `sub_080bee00` convergence label (previously merged with sub_080bec5c/sub_080bec8a/sub_080bf1d6 into a single stub) into this new tail instead, since the domain notes explicitly describe sub_080bee00 as the 'clamp/finalize' point that converges before the per-target power write -- the other three veneers (dead-unit tail-call, early-return, and the two shared-epilogue jumps confirmed by objdump to land directly at the `movs r0,#0 / add sp,#48` epilogue entry, skipping the L_080bf1a8 status-remap check) still go straight to L_080bf1a8 as before.","candidate_bytes":2502,"differing_halfwords":1799,"wrong_instructions":1768,"matched_prefix":7,"topology":"uncovered:reference-multiple-owner-entries","class":"compiler-unemittable","note":"dh improved 1807->1799 and matched_prefix jumped 1->7 (the reference's frame-size instruction itself, `sub sp,#48` vs our `sub sp,#12`, is now only 3 instructions past the prior mismatch point instead of being instruction 1). wrong_instructions rose 1711->1768 alongside candidate_bytes growing 1884->2502, consistent with more real body being scored rather than a regression -- this router class pins on the same allocator-class defect regardless of body content, so raw counts are not comparable across very different candidate sizes per CONTRIBUTING.md's own caution about that. `bun tools/allocator-lens/lens.ts 080be378` now reports 637 pseudos (up from 473), confirming the new tail did add real live ranges, but the prologue still only spills 2 registers instead of the reference's four (r8-r11) + 48-byte frame -- the remaining gap is not local to Region_080bef88 anymore (that region's tail is now translated end to end, matched_prefix advancing past instruction 1 confirms it changed something real) but almost certainly comes from the OTHER still-placeholder blocks scattered earlier in the function: the TEXT_TBD UI text pointers, ACTOR_FLAG_A/B/C_OFF and REQ_FLAG_OFF placeholders, and the K1-K4 abilityId literal-pool compare constants in Region_080be76c's tier==4 case. Each of those is a real read of `actor`/`req`/`abilityId` that the placeholders currently model as inert (mostly 0/NULL), so they do not contribute to global live-range pressure the way a real dereference would. Recommend resolving those literal-pool constants next (same standalone-assemble-and-objdump or ROM-direct technique used here), one region at a time starting with Region_080be76c since it is reached earliest in the function and its case bodies are the shortest remaining stubs, rather than any further work inside Region_080bef88 itself, which is now fully translated instruction-for-instruction against its own standalone objdump."}],"notes":["Recovered only from retained owner assembly in games/gs1/asm/{080be18c,080be378,080be76c,080beb08,080bef88}.s and games/gs1/source-paths.json. No leaked source, other decompilation project, or GS2 evidence was used.","games/gs1/recon/en/dossiers.json#main:080bef88 (the prior task's dossier) remains accurate for its own local evidence but its 'recommendation' section's guess that 080bf678/080bfba4 belong to this cluster is superseded by this dossier's refutation above; that file is left unmodified since it correctly records what was known at the time."]},"main:080bef88":{"schema_version":1,"namespace":"main","address":"0x080bef88","status":"blocked","owner_bytes":608,"executable_owner_bytes":608,"candidate_bytes":170,"differing_halfwords":304,"wrong_instructions":308,"measured":"2026-08-29","domain":"Battle action/ability resolution tail: elemental-power roll, ability-kind classification (attack/unleash/psynergy family codes), success-rate gating, per-target power step accumulation, jump-table power-tier lookup, djinn-summon power table application, and per-target hit-power writing for one battle action.","blocking_finding":"Region_080bef88 is not a standalone function. Its retained assembly begins directly with `ldr r3, [sp, #12]` -- no push, no stack allocation -- yet its epilogue restores four callee-saved registers (r8-r11) plus lr via a pop/mov-shuffle sequence that was never pushed anywhere in this owner's 608 bytes. The matching prologue does not exist at this address. Tracing the call graph shows why: the immediately preceding owner, games/gs1/asm/080beb08.s, also begins with no push (`mov r2, r10` as its first instruction) and reaches this owner only via a plain conditional branch (`bne sub_080bef88`, the literal final instruction of 080beb08.s) -- not `bl`. 080beb08.s itself is reached the same way from games/gs1/asm/080be76c.s, which also opens with no push (`ldr r4, [sp, #12]`) and already treats r9, r10, r11 as live incoming state. All three owners (080be76c, 080beb08, 080bef88), plus their forward siblings 080bf678 and 080bfba4 (both referenced by absolute-address branches from this owner and from 080beb08), are internal branch targets of one very large enclosing function whose real entry (push of r4-r11 equivalent plus lr, and its stack-frame allocation) lies at an address earlier than 080be76c that was not in scope for this task. None of the five sibling owners in this call-graph-reachable region currently has any candidate C or json, and none is registered in games/gs1/recon/translation-units.json.","why_this_caps_the_score":"GCC 2.96 cannot emit a function whose body performs multiple `bl` calls and uses four callee-saved high registers (r8-r11) with zero prologue -- `bl` clobbers lr, so any non-leaf function must save it before the first call, and any use of r8-r11 across a call requires them to be pushed (via the low-register mov-shuffle idiom, which is exactly what this owner's own epilogue performs on the way out). Every ordinary top-level C function compiles to a real prologue at its entry point. The 608-byte reference has no prologue at 0x080bef88, so no top-level C function reconstruction of this owner in isolation can ever reach differing_halfwords=0; the mismatch is present in the very first emitted instruction regardless of body content.","attempts":[{"candidate":"empty stub `void Func_080bef88(void) {}`","candidate_bytes":2,"differing_halfwords":304,"wrong_instructions":291,"topology":"different","note":"Baseline: confirms reference content is 608 bytes of real logic starting immediately, with no room for any prologue."},{"candidate":"full best-effort translation of the observed logic (elemental roll, ability-kind switch/dispatch, per-target power accumulation loop) as a 3-argument standalone function","candidate_bytes":170,"differing_halfwords":304,"wrong_instructions":308,"topology":"different","note":"GCC emits the expected `push {r5,r6,r7,lr}; mov r7,r8; push {r7}` prologue as instruction 1-3, which the reference does not have at any point. Confirms the mismatch is structural (missing shared frame), not a body/logic/type problem -- register-allocator and body changes cannot remove a prologue the reference never had."}],"refuted_hypotheses":["That Region_080bef88 is a normal, independently callable function reached via `bl` -- refuted: every real cross-reference to this address and to its immediate predecessor/successor owners in games/gs1/asm/*.s uses a bare conditional or unconditional branch (`b`/`bne`), never `bl`, and the only owner in this cluster with a real prologue was not located within the searched call graph.","That a leaf-style or reduced-register-pressure rewrite of the body could remove the prologue -- refuted by the second attempt: the body genuinely calls into 7 external functions and needs 2+ values (an elemental-power actor id and a target-power sign/kind) live across those calls, which GCC 2.96 can only keep in callee-saved registers, forcing the same class of prologue regardless of phrasing.","That forcing a `naked`/prologue-less function via project-approved means could resolve this -- not attempted: CONTRIBUTING.md and Cleanroom's ordinary-C89 rule prohibit fixed-register variables, empty barriers, and other escape hatches used to fake a shape the compiler would not otherwise emit; a naked function is exactly such an escape hatch."],"recommendation":"This owner cannot be adopted independently. It must be reconstructed together with its full enclosing function, which spans at minimum games/gs1/asm/080be76c.s, games/gs1/asm/080beb08.s, games/gs1/asm/080bef88.s, and (via absolute-address branches observed in this owner and 080beb08) games/gs1/asm/080bf678.s and games/gs1/asm/080bfba4.s, plus whatever earlier owner holds the real prologue reached only by `bl` from outside this cluster (not identified in this session). The correct route per CONTRIBUTING.md's 'Translation units with holes' section is to scaffold a translation unit over that whole address range with `bun tools/unit-scaffold/scaffold.ts`, then reconstruct the enclosing function as one candidate and score every member owner from the same compiled object with `candidate-show --unit`. That scaffolding step was out of scope for this task (games/gs1/recon/translation-units.json is explicitly off-limits here) and is left for a follow-up with the correct scope.","notes":["Recovered only from retained owner assembly in games/gs1/asm/{080be76c,080beb08,080bef88,080bf678}.s, the approved compiler's candidate-show/allocator-lens tooling, and mined neighbor conventions (struct/BattleUnit field-offset naming style from games/gs1/recon/en/main/0808e23c.c, 0808e680.c, 08079460.c). No leaked source, other decompilation project, or GS2 evidence was used.","The candidate C left in games/gs1/recon/en/main/080bef88.c is the second (170-byte) attempt above: a readable, non-adopted draft reflecting the recovered algorithm shape for the benefit of whoever scaffolds the real translation unit. It is not claimed as any fraction of DONE bytes and must not be built into production output as-is."]},"main:080c00d8":{"schema_version":1,"namespace":"main","address":"0x080c00d8","status":"measured-draft","owner_bytes":88,"executable_owner_bytes":88,"candidate_bytes":84,"differing_halfwords":42,"wrong_instructions":32,"cross_edition":{"object_bytes":88,"relocation_bytes":12,"literal_bytes":16,"relocation_normalized_core_bytes":60,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b70d8","en":"0x080c00d8","de":"0x080c26f0","es":"0x080c40f0","fr":"0x080c40f0","it":"0x080c00f0"}},"domain":"Builds the battle-presentation tilemap and clears its surrounding map regions before upload.","expressed":["clears the first 256-byte region to the empty tile value","fills the following 128 bytes with the shared boundary tile pair","writes 240 sequential paired tile indices","clears the trailing 640-byte region using the shared fill source"],"bounded_search":{"mode":"080bbb0c-family-calibration","safe_attempted":5000,"classic_attempted":10000,"exact":false,"best_safe":"84 candidate bytes, 42 differing halfwords, and 32 wrong instructions; structural alignment improved without a linked-byte improvement","best_classic_unverified":"84 candidate bytes and 40 differing halfwords; a transient candidate reached 39, but no exact candidate appeared and classic nonzero output is not semantic evidence","reason":"Both bounded axes remained four bytes short and broad; more volume without a new source model is closed."},"notes":["Independent object analysis bounds this leaf at 88 executable bytes and proves all 60 relocation-normalized core bytes identical across the six approved GS1 editions.","An integer cursor and assembly-shaped do-while loop reduce structural mismatches while keeping the source readable, but the remaining allocation and literal schedule is not localized.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, the recovered palette caller, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","Supplying the exact preprocessed 080bbb0c source as m2c context produced the same 52.62162% structural draft as the candidate's own context; this owner has no declaration or type relationship that the large battle resolver can transfer.","A 5,000-candidate safe walk and a 10,000-candidate classic exact-only walk biased by 080bbb0c produced no exact or exact-extent candidate. No generated source replaced the readable draft.","2026-08-27: Both bl targets are veneer slots, not real functions -- 0x080072f8 is 0x080072e4 + 4*5, the __call_via_r5 entry, and 0x080072f0 is 0x080072e4 + 4*3, the __call_via_r3 entry (games/gs1/asm/080072e4.s). Address 0x03000168 is the established relocated-IWRAM-fill routine (destination, size, value), already named in the sibling owners at 0x080c00c4 (games/gs1/src/graphics/tile/build_sequential_table.c, 20 bytes before this one), 0x08016744, and 0x08016728, all of which pass it through the r3 slot as a bare trailing literal per the fixed_sqrt.c precedent -- exactly what the current draft's closing Func_080072f0(cursor, 0x280, 0x03ff03ff, 0x03000168) already does, and that part is not in question.","The reference's mystery early 'ldr r5, [pc, #64]' (0x03000168 loaded once, kept live across both Func_080072f8 calls with no visible r5 read afterward, per CONTRIBUTING's own catalog item 4) is that same IWRAM-fill address being called through r5 for both calls -- catalog item 4 requires this to be modeled as a genuine indirect call through a function-pointer local, since r5 is beyond r3 and this compiler never assigns an AAPCS argument past r3.","Tried three source shapes for that r5-slot call: a single named IwramFill local reused for both fill() calls; two bare inline ((IwramFill)0x03000168)(...) casts with no named local; and two independently-declared locals (fill1/fill2) each initialized to the same cast. All three produced byte-identical (worse) output: candidate grows to 96 bytes / 47 differing halfwords / 42 wrong instructions, because the compiler puts the fill-pointer pseudo in r8 rather than r5 or r6, forcing an extra mov r8,r3 / push / pop r8 relay through r3 that the reference never has -- despite only two callee-saved values (destination, fill) actually being live at once, well within r4-r7. Register choice was identical across all three phrasings, which rules out a phrasing-level fix and matches this session's already-documented local-alloc.c qty_compare tie-break dead end (catalog item 2) from a new angle: the register a live-across-a-call value lands in is not steerable by re-wording the C source. Not pursued further -- would require forcing register assignment, which CONTRIBUTING.md prohibits. Reverted to the committed 84-byte / 42-differing-halfword draft; the phantom-direct-call model for Func_080072f8 remains semantically imprecise (no source-level r5 load) but is the better-scoring and non-regressing option on hand.","This does narrow the search: a working fix, if one exists, needs to make GCC choose r5 (or r6) over r8 for a value that must survive two intervening `bl`s -- e.g. by changing what else is simultaneously live at that point in the function, not by changing how the fill pointer itself is spelled. Left unexplored given this owner's small-leaf effort budget."]},"main:080c0184":{"schema_version":1,"namespace":"main","address":"0x080c0184","status":"proven-retained","owner_bytes":56,"candidate_bytes":60,"differing_halfwords":25,"wrong_instructions":28,"classification":"thumb_multiple_transfer_module","notes":["The readable candidate decrements and bounds the selected tile variant, then writes a 32-byte source, VRAM destination, and fixed DMA control value.","The reference keeps that computed source in the first transfer register and emits one restored-writeback three-word DMA transfer. The current canonical source keeps the index in r3 and emits three scalar stores.","Bounded ordinary-C aggregate trials either retained the scalar-store result (60 bytes, 27 differing halfwords) or introduced a 12-byte stack aggregate and block copy (68 bytes, 31 differing halfwords). Two inline helper argument orderings remained 60 bytes and retained scalar stores.","No compiler-route change, inline assembly, fixed-register variable, barrier, ABI escape, copied instruction bytes, or external source was used. Retained assembly remains authoritative and this draft claims zero DONE bytes.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."]},"main:080c0228":{"schema_version":1,"namespace":"main","address":"0x080c0228","status":"measured-draft","owner_bytes":112,"executable_owner_bytes":112,"candidate_bytes":112,"differing_halfwords":38,"wrong_instructions":70,"template_family":"template-main-0801a910","template_source":"games/gs1/src/resource/transfer/find_free_entry.c","domain":"Not related to the m2c-pseudocode template beyond superficial n-gram shape: paints one 32-tile-wide VRAM tilemap row (0x06006000) with a computed tile id derived from a runtime counter, then paints a second, vertically mirrored row 13 tiles further down with the same tile id plus a 0x800 attribute bit set (a horizontal-flip or alternate-palette bit), guarded by a row-range check the first write doesn't need.","behavior":["reads a runtime counter via double indirection through the fixed cell Data_03001ef8 (a pointer-to-pointer style global); returns immediately if the value is above 79 (unsigned)","tile id = (value & 7) + 0xf081; row = 13 - (value / 8, rounded toward -inf via the classic '(v>=0?v:v+7)>>3' idiom); fills all 32 halfwords of that VRAM row with the tile id","second pass: same division recomputed (redundant re-evaluation, matching this corpus's established double-read idiom), row = (value/8) + 13; if that row exceeds 20 (unsigned) the function returns without the second write; otherwise fills that row with tile id | 0x800"],"bounded_search":{"mode":"source-shape","attempted":2,"exact":false,"reason":"First candidate used 'for (i=0;i<32;i++) dst[i]=tile;' fill loops, which compiled to a pointer-limit-compare loop (116 bytes, 78 wrong instructions) instead of reference's counter-compare loop. Rewriting both fills as an explicit 'i=0; do { i++; *dst=tile; dst++; } while (i != 32);' idiom (matching the counter-based loop shape used elsewhere in this corpus) brought candidate to the exact reference size (112/112 bytes) with the full control-flow shape now matching instruction-for-instruction."},"remaining":"Same size, same control flow, same field/offset math -- the residual 38 differing halfwords are essentially all register-number swaps. Creating the signed division carrier before the tile expression now retains the runtime value in the reference's r0 and removes two mismatches, while the candidate still keeps the tile id in r1 and uses only caller-saved registers. The reference keeps the tile id in r4 and the first VRAM base in r5, so it pushes {r5, lr}. This is an allocation-order gap rather than a source-shape or behavioral gap; further work needs evidence for the tile/base lifetimes, not broad structural mutation.","notes":["The Data_03001ef8 double-indirection and the 0x06006000 VRAM tilemap base are read directly from the retained assembly; no cross-owner corroboration was available for this specific cell within this pass's time budget.","Recovered only from retained owner assembly and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used. Zero DONE bytes are claimed.","2026-09-01: the allocator-order decoder identified the runtime value as candidate r1 versus reference r0. Initializing the division carrier from the value before expressing the independent tile calculation moves that value to r0 while GCC schedules the same arithmetic and preserves the exact 112-byte topology. The measured residual improves from 40 differing halfwords / 72 wrong instructions to 38 / 70. The tile and literal carriers remain r1/r4 instead of reference r4/r2; this edit is retained because it names and removes one allocation-role error without forcing a register.","2026-09-01 VRAM contract audit: the two tilemap fill destinations are now volatile u16 pointers, matching the GBA memory-mapped I/O contract. The correction is output-neutral under GCC 2.96 (112/112 bytes, 38 differing halfwords, 70 wrong instructions), so it hardens the source semantics without claiming a byte-match improvement or perturbing the measured residual."]},"main:080c0774":{"schema_version":1,"namespace":"main","address":"0x080c0774","status":"proven-retained","owner_bytes":308,"executable_owner_bytes":308,"candidate_bytes":364,"differing_halfwords":178,"wrong_instructions":178,"cross_edition":{"object_bytes":308,"relocation_bytes":12,"literal_bytes":80,"relocation_normalized_core_bytes":216,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b7774","en":"0x080c0774","de":"0x080c2d8c","es":"0x080c478c","fr":"0x080c478c","it":"0x080c078c"}},"domain":"Configures the battle-presentation palette phase, optionally schedules its display event, applies a palette fade, and uploads the two presentation tile regions.","expressed":["installs the presentation callback on first activation and stores the active palette mode","queues the mode-one display event while preserving the interrupt-enable register","copies the base palette block and its shared accent color","either DMA-copies the complete battle palette or subtracts the fade value from each RGB5 channel","uploads the two presentation tile regions after palette preparation"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The complete readable candidate is 56 bytes long with 178 differing halfwords and fails both exact-extent and <=20-halfword admission."},"notes":["Independent object analysis bounds this owner at 308 executable bytes and proves all 216 relocation-normalized core bytes identical across the six approved GS1 editions.","The source expresses the complete event, DMA, RGB5 darkening, and upload behavior. The residual spans literal scheduling, volatile DMA stores, and loop allocation rather than a localized hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-presentation callers, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: reclassified measured-draft -> proven-retained. This owner's retained assembly is already independently proven unreachable from ordinary C at the manifest/classification level: out/gs1-en/full/asm/manifest.json marks it kind=thumb_multiple_transfer_module, retention starting with keep_, confidence=proven, citing arm_md/arm_c line ranges showing GCC 2.96's Thumb backend can only emit a multi-register stmia paired immediately with a matching ldmia (movmem8b/movmem12b), and that ARM's standalone store_multiple/stmsi patterns are TARGET_ARM only -- a lone stmia from independently-computed register values (as this owner's reference has) is architecturally unreachable on this route, not an unexplored search space. This specific pattern was independently rediscovered by multiple dedicated passes this session (08004838, 0800bc48, 08003e10, 0808fecc, 080c0184, and partially 080e7404) before the shared manifest-level proof was found; recording the status correction here so future sessions don't repeat the rediscovery."],"sr_route_evidence":{"verdict":"COINCIDENTAL","measured":"2026-08-29","note":"asm/080c0774.s has 12 loop labels, several trivial (.L5/.L7/.L9, 1 line, likely fallthrough targets rather than real loops) and none showing the class-(a) empty-countdown shape. Larger loops (.L0, .L1, .L3) were not traced for SR-sensitive addressing under a dual compile. Provisional COINCIDENTAL pending compiler diff."}},"main:080c0cec":{"schema_version":1,"namespace":"main","address":"0x080c0cec","status":"measured-draft","owner_bytes":264,"executable_owner_bytes":264,"candidate_bytes":276,"differing_halfwords":103,"wrong_instructions":68,"cross_edition":{"object_bytes":264,"relocation_bytes":56,"literal_bytes":16,"relocation_normalized_core_bytes":192,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x080b7cec","en":"0x080c0cec","de":"0x080c3304","es":"0x080c4d04","fr":"0x080c4d04","it":"0x080c0d04"}},"domain":"Initializes the render and projection state used by paired and single-unit battle-presentation transitions.","expressed":["stores the requested scene position and derives its fixed-point scale","initializes the transform and render workspaces","applies scene camera offsets and computes source and rendered bounds","sets both transition timing fields to 120","derives the final centered projection rectangle and scaled render buffers"],"bounded_search":{"mode":"screen-only","attempted":0,"exact":false,"reason":"The candidate now has non-owner-matching 276-byte extent and is 103 differing halfwords / 68 wrong instructions away, outside the <=20-halfword admission gate."},"notes":["Independent object analysis bounds this owner at 264 executable bytes and proves all 192 relocation-normalized core bytes identical across the six approved GS1 editions.","Explicit local-array initialization avoids a non-canonical memset and gives exact candidate extent. The remaining mismatch spans register allocation and call scheduling rather than a localized compiler hunk.","No full search or permanent classification was warranted, and zero DONE bytes are claimed.","Recovered only from retained owner assembly, approved local GS1 ROM correspondence, recovered battle-presentation callers, and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","2026-08-27: Root cause of the prior draft's 77-differing-halfword score was a mismodeled call, exactly the class already found on sibling owners this session. `Func_08007310` is not a real function: 0x08007310 is the fp (r11) slot of the fourteen-entry `_call_via_rN` trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8`, 4 bytes/slot, r0..sp). fp is never a valid argument-passing register on this compiler (arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c stops argument passing at r3), so a 2-argument call to a symbol named 'Func_08007310' can never legitimately compile to code that also loads a call target into fp. Traced the true call target directly from games/gs1/asm/080c0cec.s using PC-relative literal-pool arithmetic (effective_addr = align4(instr_offset+4)+imm): the `ldr r2,[pc,#192]` at byte offset 58 resolves to pool slot 252, i.e. 0x0300013c, which is then moved into fp via `mov fp,r2` at offset 76 and never rewritten again before EITHER `bl Func_08007310` (offsets 84 and 212) -- both calls go through the exact same fp value, 0x0300013c, for the whole function.","0x0300013c is not a novel address: it is already an established, adopted helper in this exact codebase (grep confirms 4 independent recon/src files already call it this way), consistently modeled as a 2-argument function pointer cast/call with the literal address used directly as the callee, e.g. games/gs1/src/battle/effects/schedule_ratio_transition.c's `typedef s32 (*ArmRatio)(s32,s32); ArmRatio ratio=(ArmRatio)0x0300013c; result=ratio(arg0,0x10000);` (with an explicit comment: '0x0300013c is the relocated ARM ratio helper... TWO arguments'), and games/gs1/recon/en/main/080f4028.c / games/gs1/src/camera/scene/configure.c's `((u32(*)(u32,u32))0x0300013c)(N, 192<<8)` -- note the second argument in those two siblings is literally `192<<8` = 0xc000, the exact same second argument this owner's disassembly requires (0xc000) at both call sites, strongly corroborating this is the identical helper with the identical calling convention. Rewrote both call sites as genuine indirect calls through this traced literal, `((u32(*)(u32,u32))0x0300013c)(arg0, 0xc000)`, removing the fictional Func_08007310 prototype/call entirely and matching object dump confirms both now compile through `_call_via_rN` veneers rather than a direct symbolic `bl`.","2026-08-27, residual after the fix: differing_halfwords regressed from 77 to 103 and candidate size grew from the correct 264 to 276 (12 bytes over). This is a real, measured regression versus the (semantically impossible) prior draft, but the prior draft's call-target shape can never reach exact regardless of tuning, since no valid N-argument call to a real function can ever legitimately load its target into fp on this compiler -- so it was a dead end. Root-caused the regression precisely via the compiler's own retained .insns/.s output (candidate-show --asm and the scratch/candidate-show/080c0cec/080c0cec.s intermediate): the compiler places the traced pointer in r2 at each call site (`bl _call_via_r2`, reloaded fresh via `ldr r2,[pc,#N]` at both sites) rather than fp, unlike the reference. Simultaneously, the second argument constant 0xc000 (which the reference recomputes fresh with `movs r1,#192; lsls r1,r1,#8` at BOTH call sites, per the retained asm) gets hoisted by this compiler's CSE into a single register (r7) held live across the whole function, which is exactly what displaces `scale` out of r7 (where the reference keeps it, used directly in ALU ops with zero overhead) into fp instead -- and since fp is a Thumb high register, every later arithmetic use of `scale` now costs an extra `mov r_lo,fp` pair the reference never needs (visible directly in the aligned diff as a 7-instruction block computing `scale*0x1fe` from fp instead of the reference's 3-instruction block using r7 directly). This fp/r7/r2 role reassignment is the entire source of the 12 extra bytes.","2026-08-27, experiments tried on the residual (all produced byte-identical output, i.e. zero effect on the r2/fp/r7 role assignment): (1) inline anonymous cast at each call site vs a single function-wide named `ArmRatio`-style local vs a freshly-declared local in its own nested block at each call site (matching battle_owner_66.c's exact idiom) -- all three identical. (2) nesting the indirect call directly as Func_08005258's argument vs assigning to an intermediate `result` local first (matching 080f4028.c/configure.c's own pattern) -- identical. (3) spelling the second argument as `0xc000` vs `192 << 8` -- identical, confirming (as games/gs1/recon/en/dossiers.json#main:080f4028's own rejected-experiments log already found for the adjacent sibling call using this identical helper) that this compiler's CSE unifies by folded constant value, not source text, so no non-forcing respelling can prevent the same-valued-constant-reuse. This is the same GCC 2.96 register-allocation/CSE class already characterized exhaustively across four other owners this session (080a8c2c, 080ae99c, 080ae9f0, 080b60a0) and explicitly accepted as an architectural floor on the directly-comparable sibling 080f4028.c (same 0x0300013c helper, same 192<<8 second argument) -- there the reference recomputes-fresh pattern was also not reproducible by any legitimate source respelling. Did not force register assignment via `register`-qualified locals, named-register variables, inline asm, or a compiler flag change, per project rules.","2026-08-27: separately, the very first divergence in the aligned diff (matched_prefix=7, i.e. within the prologue) is a pre-existing, independent defect unrelated to this fix: the reference stores the `y` parameter in fp and `depth` in r9 across the Func_080022ec call, while this draft stores `y` in r9 and `depth` in r6 -- confirmed present, byte-identical, in the prior (pre-fix) 77-diff draft too via a clean rebuild from git stash, so this is not something the trampoline fix introduced. This is the same hi-register role-nondeterminism class documented at length in games/gs1/recon/en/dossiers.json#main:080a8c2c's notes (traced there directly into alchemy-gcc/agscc/gcc/local-alloc.c's qty_compare/qty_order tie-break, which depends on RTL discovery order within a basic block rather than C source statement order) -- left undisturbed and unexplored further this pass since that owner's note already records that declaration-order and statement-order experiments measured zero effect on this exact residual class.","Adoption gate not met: differing_halfwords=103, not 0, and candidate_bytes=276 != owner_bytes=264. The call-target modeling is now correct and evidence-complete; the residual is entirely register-allocation/CSE role assignment (class=allocation), not a remaining algorithm, control-flow, type, or call-argument mismatch. Recommend a future pass attack the shared root cause (the qty_compare/local-alloc tie-break behavior, or the CSE constant-caching interaction with it) across all affected owners at once rather than per-owner respelling, consistent with 080a8c2c.json's own recommendation.","Recovered/verified only from retained owner assembly (games/gs1/asm/080c0cec.s), the retained assembly and JSON of sibling owners 080a8c2c and 080f4028 in this same repository, the already-adopted in-repository source files games/gs1/src/battle/effects/schedule_ratio_transition.c, games/gs1/src/camera/scene/configure.c, and games/gs1/src/ui/window/update_interpolated_geometry.c, and the approved compiler's own intermediate output (candidate-show --asm and the scratch/candidate-show/080c0cec/080c0cec.s dump). No GS2 evidence, external source, other decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used."]},"main:080c0f98":{"schema_version":1,"namespace":"main","address":"0x080c0f98","status":"exact","owner_bytes":122,"candidate_bytes":122,"differing_halfwords":0,"wrong_instructions":0,"classification":"exact-c","cross_edition":{"core_bytes":118,"core_diff_bytes":0,"core_identical":true,"callee_correspondences":1},"notes":["Relocation-aware comparison proves all 118 core bytes identical across JA, EN, DE, ES, FR, and IT; only the Actor_GetObject call is relocated.","The complete bitfield-based candidate has exact 122-byte extent and zero differing halfwords.","Moving the record pointer, record-list cursor, and loop counter to function scope transfers the lifetime shape used by exact nearby bitfield and object-record code. agbcc then assigns the record to r4, list cursor to r1, shifted mode to r0, and loop counter to r6 exactly as the ROM does.","Relocation-aware comparison of the exact candidate independently confirms identical executable output at all six edition anchors."]},"main:080c1798":{"schema_version":1,"namespace":"main","address":"0x080c1798","status":"measured-draft","owner_bytes":636,"candidate_bytes":644,"differing_halfwords":306,"classification":"stack-layout-and-allocation","edition_starts":{"ja":"0x080b8798","en":"0x080c1798","de":"0x080c3db0","es":"0x080c57b0","fr":"0x080c57b0","it":"0x080c17b0"},"cross_edition":{"core_bytes":460,"core_diff_bytes":0,"core_identical":true,"callee_correspondences":12},"notes":["All six 636-byte intervals are bounded by the exact 080c16d0 and 080c1a14 sibling correspondences; relocation-aware comparison proves all 460 core bytes identical with twelve callee correspondences.","The complete draft covers display setup, palette transfer, both position-update loops, interrupt-safe DMA request publication, and task construction for modes two and three.","Its first score is 644 versus 636 bytes with 306 differing halfwords and 319 wrong instructions, exceeding the twenty-instruction pivot threshold.","Retained assembly remains authoritative and this draft claims zero bytes."]},"main:080c9048":{"schema_version":1,"namespace":"main","address":"0x080c9048","status":"proven-retained","owner_bytes":156,"executable_owner_bytes":154,"candidate_bytes":156,"differing_halfwords":13,"wrong_instructions":4,"classification":"battle_effect_display_queue_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_display_queue_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":106,"core_identical":true,"owner_alignment_bytes":2,"starts":{"ja":"0x080c0048","en":"0x080c9048","de":"0x080cae48","es":"0x080cc848","fr":"0x080cc848","it":"0x080c9048"}},"domain":"Configures the battle-effect display windows and blend registers, then publishes one display transfer request through the interrupt-guarded 32-entry request queue.","expressed":["the eight observed 16-bit display-register writes","saving, disabling, and restoring interrupt-master state","the signed queue-capacity guard for 32 entries","the 12-byte request stride and count update","the 0x7741, 0x04000000, and 0x00020000 request words","the one-frame completion wait"],"residual":["The linker-resolved Data_02002090 symbol is essential: a numeric pointer lets GCC fold the three request fields into separate absolute addresses, growing the candidate to 176 bytes. The symbol produces the exact 156-byte extent, exact literal set, and both reference single-register writeback stores.","The four wrong instructions are confined to the queue-base and interrupt-master pointer role order plus the independent saved-IME copy schedule. The queue body, control flow, constants, access widths, and final call are otherwise exact.","The allocator decoder reports no unique safe source repair; structured assembly remains authoritative for the four-instruction floor."],"rejected_experiments":[{"experiment":"make the queue count and entry cursors volatile","result":"regresses to 180 bytes and 48 differing halfwords by rematerializing three absolute request-field addresses"},{"experiment":"model the queue as a typed count-plus-request-array aggregate","result":"preserves the 176-byte constant-folded form and adds callee-saved register pressure"},{"experiment":"express interrupt master as a second absolute linker symbol","result":"preserves extent but regresses saved-state allocation and branch placement; the numeric hardware-register pointer remains the stronger four-wrong-instruction candidate"}],"notes":["2026-09-01 retained-assembly proof: the linker-resolved queue symbol produces the exact 156-byte owner extent (154 executable bytes plus two bytes alignment), exact literal set, exact display-register sequence, exact queue body including both single-register writeback stores, and exact final call. The remaining four wrong instructions are equivalent queue/IME/saved-state register roles and independent load/copy scheduling. Canonical, no-regmove, no-schedule-insns, no-GCSE, no-CSE-follow, rerun-CSE, strength, expensive, and O3 routes preserve the floor; sched2 and no-CSE-skip regress. Relocation-aware verification proves all 106 normalized core bytes identical across six editions. Structured assembly is therefore authoritative under battle_effect_display_queue_compiler_allocation_module.","Recovered only from the retained owner assembly, its local callers, the repository's established display-request queue idiom, linker-symbol infrastructure, and the approved compiler.","No GS2 or external source, fixed-register variable, inline assembly, compiler barrier, forced scheduling, or compiler modification was used."]},"main:080c91dc":{"status":"measured-draft","span_bytes":1360,"edition":{"role":"derived-candidate","edition":"en","base_owner":null,"base_edition":"ja","rebase_status":"correspondence-needed"},"boundary":{"start":"0x080c91dc","end":"0x080c972c","evidence":"games/gs1/asm/080c91dc.s contains one global owner and assembles to 0x550 bytes; the next assembly owner begins at 0x080c972c. The complete span lies inside the audited 0x080c91dc-0x080cdbbe Thumb interval; that larger generated target is a contiguous ranked scope containing later owners, not this function boundary."},"score":{"measured":"2026-08-20","candidate_bytes":1336,"reference_bytes":1360,"candidate_instructions":574,"reference_instructions":586,"wrong_instructions":302,"differing_halfwords":408,"matched_prefix_instructions":94,"class":"wrong","last_objdiff_structural_percent":87.82876,"note":"Current candidate-show --align measurement with approved routed flags. The last independent objdiff measurement was 87.82876% before the final interrupted edits; it is retained as historical evidence, not claimed for this source revision."},"shape":{"reference_calls":30,"expressed_loops":9,"reference_pool_words":31,"symbolized_pool_references":44,"jump_table":false,"falling_records":32,"burst_records":32,"record_bytes":28},"expressed":["complete entry, runtime-cell walk, argument binding, display setup, graphics loads, blend-register writes, and shared teardown","all 32 falling-record and 32 burst-record initialization, including the direction-dependent randomized positions and inactive frame sentinel","both direction-dependent 160-entry map-generation loops and all four resource-placement calls","both rectangle callbacks loaded from the local draw registry and invoked indirectly at all three reference call sites","the complete table-bounded outer frame loop, sound gate, falling-record render and movement, impact transition, and target-update loop","the complete impact animation, burst-record allocation, table-driven burst rendering, record countdown, frame submission, and termination paths","all 30 reference call sites, all literal pools, and every branch through the return; no jump table or omitted assembly region"],"unexpressed":[{"op":"source-shape repair","count":"302 instructions","where":"the complete behavior is represented, but normalized comparison still differs in register allocation, declaration lifetimes, expression boundaries, loop induction texture, and call-argument scheduling"},{"op":"size and pool parity","count":"24 bytes","where":"the candidate remains shorter than the 1360-byte reference, chiefly around map-loop literal placement and the main particle-loop aggregate access shape"}],"verified_against_reference":["owner boundary 0x080c91dc-0x080c972c","reference byte count 1360","all 30 static call sites","44 symbolized PC-relative references and no jump table","94-instruction exact normalized prefix"],"blocked_by":"The Luna pass was stopped below the 90% Terra handoff threshold; resume this same owner with Luna and remeasure structural similarity before any tier handoff.","rejected":[],"notes":["The complete reference assembly and every literal pool were read before reconstructing the source. The workbench assembly/symbolization path accounted for 44 references and found no jump table.","The runtime structures use only offsets and widths supported by this owner and related local games/gs1/src/draft evidence; unresolved fields and address-named callees remain deliberately generic.","Linked differing_halfwords remains the adoption measure. This draft is coherent, but it is neither exact nor adoptable."]},"main:080c972c":{"schema_version":1,"namespace":"main","address":"0x080c972c","status":"proven-retained","owner_bytes":1332,"candidate_bytes":1332,"differing_halfwords":340,"wrong_instructions":264,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"family":{"id":"template-main-080ce85c","template_owner":"main:080ce85c","template_source":"games/gs1/src/battle/effects/member_orbit/run.c","note":"Family-matcher's closest template (score 7767/10000) by n-gram/prologue similarity only. Not a structural match: this owner is 1332 bytes against the template's 724, shares only the 0x03001eec heap-cache cursor-advance idiom, the Efx field layout (kind/side/actor/.../cnt@0x14/layers@0x18/actors[8]@0x24) established by puff_arc/run.c and 080cb4ec.c, and the Func_080ed408(46/47,...)+r4-trampoline draw-callback idiom -- not the template's per-frame sine-sweep/orbit-sprite body. The real owner draws a 64-slot ring of randomly-placed 'wave' markers (Data_080ededc[layers*4+{0..3}] gives per-kind ring count, debris-spawn count, ring radius step, and total frame budget), animates each ring cell through a two-cell sprite (24x24 for tick 0-3, 42x42 for tick 4-7) as it expands outward, and once a cell's y-distance crosses 0x27F it pops into a batch of the kind's debris count -- written into a persistent 512-slot fixed-point particle pool at 0x02010140 that every frame ages, draws (through the kind-47 callback) and hands to Func_080e3908 for physics, independent of the ring loop and still running on frames where the kind's ring count is zero. Drafted directly from an m2c decompile of the target's own retained assembly rather than the template body, since only field offsets and callees are shared."},"rejected_experiments":["Hand-written idiomatic restructuring (named locals: heap_cache/work/canvas/draw_a/draw_b/ring/layers/frame, structured for/if instead of m2c's goto blocks): compiled to the same class=wrong with differing_halfwords=604, byte-for-byte the same register-allocation split as the m2c-shaped draft below. Abandoned in favor of the m2c-shaped draft, which is far closer to the reference's own variable/register structure and easier to keep correct.","Rewriting the tick<=3 / tick<=7 draw calls (24x24 vs 42x42) as a single shared call site reached by two `goto block_65` paths through a common `var_r1_wh` width/height variable, mirroring the reference's own control-flow merge point exactly: regressed candidate_bytes 1288->1292 and differing_halfwords 604->609 (wrong_instructions 530->556). Reverted to the two independent calls (one per branch), which the compiler happens to schedule closer to the reference's block order from this source shape.","Declaring `temp_r1_17` (work) as the very first local in the function (ahead of heap_cache/cursor and every other scalar), on the theory that RTL pseudo-register numbering follows declaration order: produced an identical compile (byte-for-byte, same 604 differing_halfwords), so this compiler's allocator is not simply seeded by textual declaration order for this function."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080c972c.s), the approved local EN ROM, the family-transplant workspace's m2c decompile of the target's own bytes (out/family-transplants/main-080c972c/m2c/080c972c.c and target.canonical.s), games/gs1/src/battle/effects/member_orbit/run.c, games/gs1/src/battle/effects/puff_arc/run.c, games/gs1/recon/en/main/080cb4ec.c and 080d82b0.c (both read via `git show main:...` since this worktree's branch predates their commits), and the approved compiler. No other Golden Sun decompilation project or symbol map was consulted.","Manually cross-checked every PC-relative literal-pool load against the disassembly's own byte offsets (address & ~3 + imm) for the function's first ~20 instructions to validate m2c's resolved constants (0x2001 mode arg to Func_080cd594, the 0xCC/0x76 Func_080e0524 resource ids, the (46,7,7,2,2) and (47,7,7,2,3) Func_080ed408 argument sets) before trusting m2c for the rest of the function; all cross-checks matched m2c exactly.","`Func_080072f4` in the raw disassembly is not a real symbol: 0x080072f4 - 0x080072e4 = 0x10 = 4*4, i.e. the r4 entry of the _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s. All three call sites are modeled as direct calls through a DrawRectangleFn loaded once from the kind-46/kind-47 heap-cache slots (heap_cache[7]/heap_cache[8], matching the reference's own sp+16/sp+20 spill-and-reload shape) rather than through a fictional Func_080072f4(...) prototype.","Found and fixed one real bug during iteration: an earlier draft reused the kind-47 draw-callback local as scratch storage for the age-loop's Data_080ede5c byte-offset pointer, clobbering it, and then called the kind-46 callback instead of kind-47 for the persistent-queue age/draw loop. Fixed by using a separate scratch local and casting the correct (still-live) kind-47 pointer for that call; wrong_instructions dropped 530->524 even though candidate_bytes and differing_halfwords ticked up slightly (1288->1292, 604->606) from the larger correct code shape -- kept as a genuine correctness fix, not reverted.","The dominant residual is a single early register-allocation choice: the reference keeps the 'work' pointer resident in sl (r10) for the whole function (`mov sl, r1` right after the prologue's `ldmia r3!, {r1}` cursor-advance load) and uses r8 purely as a reused, non-overlapping loop-counter register across the function's six independent do-while loops. Every draft tried here -- two structurally very different source shapes, converging to the identical 604/606 differing-halfword figure -- instead has this compiler's allocator put 'work' in r8, which then reassigns every one of the function's loop counters to a different low register (r6/r7 depending on the loop) than the reference's r8, cascading into a differing register-field encoding on the large majority of the function's ~660 halfwords even though the underlying instruction sequence, operand values, and control flow are otherwise a near-exact match (compare the fully-aligned Func_080e3908/kind-47-draw call sequence in the persistent-queue age loop). This reproduces, at unusually large scale for this owner's length, the family's documented open 'register allocator keeps a loop-invariant address in a different high register than the reference' residual (see games/gs1/recon/en/dossiers.json#main:080d82b0 and 080f6148.json for the same class on smaller owners) -- no source-shape lever tried here (declaration order, call-site merging, the bug-fix above) moved it. Not source-shape-controllable within this session's evidence; no register hints or asm() were used to force it, per project constraints.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 1,078 non-relocation core bytes identical. The object symbol covers 1,330 bytes; the classified 1,332-byte retained extent includes its two-byte trailing alignment.","A shipped compiler-route and pass sweep tested routed GCC 2.96, explicit GCC 2.96, old-agbcc, regmove, both schedulers, CSE follow/skip blocks, GCSE, expensive optimizations, thread jumps, strength reduction, and rerun-CSE-after-loop. Canonical, no-schedule-insns, no-thread-jumps, strength-reduction, and rerun-CSE routes tie at 340 differing halfwords; all other routes regress or change extent.","The allocator decoder confirms equal branch structure and identifies only register-role constraints with no unique source edit. Combined with the two independent complete source shapes already tested, this closes the ordinary-C axis without forcing the compiler. The retained owner is Proven ASM under battle_effect_compiler_allocation_module; the C remains the evidence-bearing reconstruction."]},"main:080ca1fc":{"schema_version":1,"namespace":"main","address":"0x080ca1fc","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":896,"score":{"measured":"2026-08-27","candidate_bytes":892,"reference_bytes":896,"differing_halfwords":300,"wrong_instructions":204,"class":"wrong","note":"First pass, recovered directly from games/gs1/asm/080ca1fc.s (429-line retained disassembly, fully hand-traced instruction by instruction) plus the m2c-assisted context at out/family-transplants/main-080ca1fc/m2c/ (target.canonical.s, symbolized.s with resolved literal-pool values, and an m2c --valid-syntax seed used only for a first read of control-flow shape, not copied). The naive family-transplant seed (top-level 080ca1fc.c in that same directory, a symbol-renamed copy of member_orbit/run.c) was read for the field-offset/typedef conventions it documents but not adapted -- this owner's real control flow (two explicit parameters, a 256-slot particle-pool seed loop, a 128-iteration per-frame particle redraw loop with a staggered reveal gate, and a member-portrait loop that differs in shape per mode) bears no resemblance to member_orbit's fixed-member-count orbit-sprite loop, confirming the task's warning that the naive transplant differs substantially. Went from an untested skeleton to candidate=892/dh=300/wrong=204 through iterative --align passes: (1) `Func_080e0524`'s effect-id argument 0x73 needed the established Value_ literal-pool trick (`(s32)&Value_00000073`, already declared for this exact id in 080e01e4.c) instead of a plain integer literal -- an ordinary `115` compiles to a one-halfword `movs`, not the reference's literal-pool `ldr`; (2) the second `Func_08004458()&0xFFFF` angle read needed to stay an explicit mask rather than a `(u16)` truncating cast -- the cast compiles to a shift-left-16/shift-right-16 pair instead of the reference's `ands` against a pooled 0xFFFF constant; (3) discovered a new instance of the family's known 'load-bearing dead value' pattern distinct from the already-documented 'status =' idiom: the reference reads `Data_03001e50[47]` (the kind-47 blit routine registered by the second `Func_080ed408` call) into a stack slot that is genuinely never read again in this owner, and this compiler DOES eliminate a plain unused local holding a pure array read (unlike an unused local holding a function-call result, which the established 'status' idiom already documents as retained) -- marking the local `void * volatile` forced the load and store to survive, matching this codebase's own precedent for exactly this purpose in games/gs1/src/runtime/idle_forever.c's `(void)Data_03001c94;` (there qualifying the source instead of the local, but the same volatile-to-defeat-DCE technique). This fix alone dropped dh from 406 to 300 and wrong_instructions from 246 to 204, confirming most of the remaining diff before it was a pure frame-offset cascade from the missing store, not independent bugs. Every other block of the function -- the heap_cache cursor-advance prologue, both Value_-gated Func_08002f40/Func_080cd594 mode branches, the Func_080072f0 word-copy call (r3 trampoline slot, callee passed as trailing argument per the established convention), the 256-iteration particle-pool seed loop (rand/sin/cos field writes, the mode==0 conditional halving fixed straight to `/2` per the family's known sign-extension-bug idiom rather than the bit-trick), the 128-iteration per-frame draw loop (staggered-reveal `(j/32)*8` threshold, phase-gated Func_080e3944 projection, the screen[2] two-sided clamp reproduced in the exact both-branches-write-memory-and-register shape m2c's own decompilation of this owner already showed, the idx/half/doubled index-table draw call through the r4 trampoline slot as a genuinely traced DrawRectangleFn value, the mode==1 y-bias +-8192 branch keyed on member_object's own offset-8 field, and the phase decrement) and both mode-keyed member-portrait tail loops -- was hand-verified instruction-for-instruction against target.canonical.s and matches the reference's real control flow, call targets, and constants one-for-one; confirmed via candidate.insns that the only remaining divergences downstream of the volatile fix are: a residual 4-byte frame-size gap (72 bytes vs the reference's 68, the unavoidable cost of giving the dead Data_03001e50[47] read a persistent volatile stack slot rather than the transient one the reference's own allocator apparently found -- tried both a function-top declaration and a block-scoped declaration immediately around its one use, block-scoping was strictly worse (dh 301/wrong 208) and was reverted), a two-instruction register-choice quirk in both 256-loop multiplies (`sin_val * radius` / `cos_val * radius` compile with the just-returned call result in the accumulator register and the pre-computed radius as the multiplier regardless of which order the source multiplication is written in -- tried both orders, textual order made no difference to this specific site, so left in the more natural `sin_val * radius` phrasing), and one extra stack spill/reload pair (4 bytes) in the mode==1 member-portrait loop where this compiler's allocator does not keep `stagger` in a call-surviving register the way it keeps `member` there in the reference, despite the mode==0 sibling branch (textually symmetric, one more call, otherwise-identical shape) needing no such spill. All three are register-allocation/scheduling choices with no discovered source-shape lever, matching this family's already-documented class of open, non-source-controllable residual (see 080d82b0.json, 080e7404.c's header comment); not chased further per the project's ban on forcing register assignment or scheduling."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family-matcher's highest-scoring template (8511/10000) but a real structural mismatch, exactly as the task predicted from the size difference (896 vs the template's 724 owner bytes): this owner takes two parameters (object and an explicit mode flag) where member_orbit takes one, front-loads a 256-slot particle-pool seed loop member_orbit has no equivalent of, and runs a 128-iteration frame loop with a staggered per-slot reveal gate and a two-sided screen[2] clamp/index-table draw, none of which appear in member_orbit's fixed member-count orbit-sprite loop. Only the field-offset conventions (work+0x7780/0x7784/0x7824/0x7828), the M2C_FIELD macro, the DrawRectangleFn/WordCopyFn typedefs, and several shared callees (Func_080cd594, Func_08002f40 via the Value_ literal-pool trick, Func_080ed408, Func_080041d8/Func_08004278, Func_08002dd8, Func_080cdbc0) transferred directly.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d82b0.json and games/gs1/src/battle/effects/member_orbit/run.c: same heap_cache=(void**)0x03001EEC cursor-advance idiom for work/draw_destination plus heap_cache-108/heap_cache[2] for facing/extra_target (matching 080d82b0's documented 'heap_cache stays live for four distinct derived reads' note), the same Data_03001e50[kind] heap-allocation-cache array from 080e7404.c indexed by the same kind ids (46, 47) passed to Func_080ed408, the same Func_080072f0(dest,src,size,copier) r3-trampoline-slot modeling with the 0x03001388 word-copy routine as a trailing argument, and a newly-confirmed second _call_via_rN indirect call through the r4 slot (0x080072f4) for the per-frame DrawRectangleFn blit, matching the already-documented r4-callee-in-a-register convention from 080d82b0/080dc1ec's dossiers."},"rejected_experiments":["Block-scoping the volatile `second_blit_kind` local immediately around its single use (instead of declaring it at function top alongside the other pointer locals): regressed from candidate=892/dh=300/wrong=204 to dh=301/wrong=208. Reverted to the function-top declaration.","Swapping the multiplication operand order in the 256-loop's `sin_val * radius` and `cos_val * radius` expressions (tried both `radius * sin_val`/`cos_val` and the reverse): the emitted `muls` instruction's accumulator-register choice (the just-returned call result, not the pre-computed radius) did not change with source order at these two specific call sites, though the swap measurably improved wrong_instructions elsewhere in the same rebuild (212->204) so the `sin_val * radius` phrasing was kept as the more natural reading, not reverted.","A plain (non-volatile) local or a bare `(void)Data_03001e50[47];` discard statement for the same dead read: both let this compiler's dead-store elimination remove the load and store entirely (confirmed via candidate.insns -- no `adds r5,#188; ldr r5,[r5,#0]` sequence at all), unlike the reference and unlike a `status = Func_080ed408(...)` binding of an actual call result. Only a `volatile`-qualified local reproduced the reference's genuine load+store."],"notes":["Recovered from games/gs1/asm/080ca1fc.s (the retained owner assembly, read in full), out/family-transplants/main-080ca1fc/m2c/target.canonical.s and symbolized.s (m2c's clean disassembly and literal-pool-resolved listing of the same bytes, used only to cross-check literal values and control-flow shape, never as a source of C text), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c and 080d82b0.c and their dossiers, games/gs1/src/battle/effects/member_orbit/run.c, in-repository headers, and the approved compiler. The m2c --valid-syntax seed at out/family-transplants/main-080ca1fc/m2c/080ca1fc.c and the naive symbol-renamed transplant at out/family-transplants/main-080ca1fc/080ca1fc.c were both read but not copied from; every statement in the final draft was derived by hand-tracing the retained disassembly's register and stack-offset flow instruction by instruction and cross-checked against the m2c output only for corroboration.","2026-08-31 retained-assembly proof: after restoring the reference's load-bearing kind-47 cache read with its evidence-required volatile lifetime, the complete candidate has equal branch topology and accounts for every call, argument, trampoline, callback, particle update, loop, literal, table lookup, field access, and memory operation. The residual is confined to GCC's 72-byte frame versus the reference's 68-byte frame, an equivalent persistent volatile slot versus transient allocator home, one mode-1 stagger spill/reload pair, multiply accumulator choice, and resulting register/pool displacement. The allocator decoder reports conflicting interlocked targets rather than a unique source repair; block-scope, multiplication-order, declaration, lifetime, family-transfer, compiler-family, and pass probes preserve the residual or regress. Relocation-normalized cross-edition verification proves all 698 core bytes identical across all six GS1 editions (32 relocations and 17 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","This candidate claims zero DONE bytes (class=wrong, not exact).","Semantic summary: a 0x03001eec battle-work sub-effect taking (object, mode). Registers the object pointer at work+0x7828, opens two draw-rectangle blit kinds (46 and 47) via Func_080ed408, copies a mode-selected palette (Value_0000007c for mode 0, Value_0000007b for mode 1) through the generic word-copy trampoline, then seeds a 256-slot particle pool at 0x02010000 from one party member's position (offsets 8/12/16 of the member struct already established by member_orbit/080d82b0) with randomized polar-coordinate offsets, halved when mode==0. Runs 128 frames: each frame redraws whichever of the first 128 particles has both cleared its staggered `(j/32)*8` reveal threshold and has a non-negative phase field (itself reused as the per-particle rotation-angle seed), projecting through Func_080e3944, computing a distance-banded sprite index via a two-sided screen[2] clamp and a Data_080ede48[] table lookup, blitting through the kind-46 routine (an indirectly-called, genuinely traced function pointer, not a fictional 'Func_080072f4'), and -- in mode 1 only -- nudging the particle's stored y-bias field by +-8192 depending on the sign of the seed member's own offset-8 field. Each frame also drives one staggered Func_080d6888 portrait callout per party member, with mode 0 additionally cueing a sound (Func_080f9010(126)) and using a persistent -1 argument where mode 1 uses a literal 5.","The r3-slot and r4-slot _call_via_rN indirect calls (games/gs1/asm/080072e4.s) were both confirmed by literal address arithmetic before modeling: 0x080072f0 - 0x080072e4 = 0xC = 4*3 (the r3 slot, hence Func_080072f0's real callee is the 0x03001388 word-copy routine passed as its trailing 4th argument, matching the established 080d82b0/080e7404 convention exactly), and 0x080072f4 - 0x080072e4 = 0x10 = 4*4 (the r4 slot, hence the per-frame draw call is a real indirect call through the traced `draw_rectangle_fn` variable, not a call to a fictional 'Func_080072f4' symbol).","No GS2 or external source was used; no other Golden Sun decompilation project was consulted; no other in-progress worktree's output was read."]},"main:080cb1a4":{"schema_version":1,"namespace":"main","address":"0x080cb1a4","status":"proven-retained","owner_bytes":840,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"score":{"measured":"2026-08-30","candidate_bytes":840,"reference_bytes":840,"differing_halfwords":108,"wrong_instructions":134,"class":"wrong","note":"Byte-exact size (840=840) with matched_prefix=7 and a fully balanced instruction count. Compiler RTL inspection on 2026-08-30 showed GCC allocating target pseudo 42 before frame pseudo 49. Spelling the frame initialization as a separate statement immediately after the 20-frame delay, before the record/screen pointer initializations, reduced the residual from 112 to 108 differing halfwords and from 138 to 134 wrong instructions without changing size or topology. Earlier placement crossed additional calls and regressed; placement after the pointer initializations was byte-identical to the former for-initializer baseline. The remaining mismatch is the family's documented allocation residual: the reference keeps target in r9 and frame in sl, uses an 84-byte frame instead of 72 bytes, and spills values this candidate retains in registers."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher's closest structural template (score 8385/10000), and its heap_cache=(void**)0x03001EEC / M2C_FIELD / DrawRectangleFn idiom and Func_080cd594/Func_08002f40/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 calling shapes carried over directly, but the 840 vs 724-byte size gap is real: this owner has only one Func_080ed408 heap allocation (kind 46, not the template's two kinds 46+47), no second Func_080041d8 registration, no BG affine writes, and a single fixed target member (field 0x24, not a member-count-driven loop over field 0x14's array) -- it is not a resize of the template's own control flow.","actual_sibling_evidence":"The real match is games/gs1/src/battle/effects/puff_arc/run.c (already-adopted exact source): same Func_080cd594(0) / Func_080e0524((s32)&Value_XXXXXXXX, work, 1, 1) / Func_080ed408(46,7,7,3,d) / draw=heap_cache[46-39] opening, and the identical work+0x7780=2 paired with a conditional work+0x7784=75-or-50 (puff_arc's WORK_EFX->layers==2 branch; this owner always takes the 75 side). games/gs1/recon/en/main/080e01e4.c supplied the exact 96-pass outer loop bound and the work+0x77A8 trigger field. games/gs1/src/battle/motion/set_approach_motion.c (also already-adopted exact) supplied the struct MotionObject / Object_ResetMotion+Object_SetPosition+Object_SetMode(2) / snap_to_target=1 / auto_face_motion=1 shape used to move the effect's source actor toward its target member on approach -- this owner inlines that same low-level pattern with its own scale (90, not 80) and re-derives vertical_motion_strength/velocity_y/acceleration/speed_limit itself on specific frames instead of calling through a shared helper."},"rejected_experiments":["Tried restructuring `x = object->x + FixedPoint_Ratio(...)` into explicit `startX`/`differenceX`/`deltaX` locals matching set_approach_motion.c's own literal source shape (that file really does declare those as separate named locals): this regressed sharply both before and after the frame==0 order fix (184->196 wrong_instructions, size shrank 836->832), so the reference's compiler is not simply reproducing that file's variable-naming shape here -- reverted.","Tried inlining the ring-loop's `offset = (cel_phase / 2) << 11;` directly into the draw() call's src argument (dropping the named `offset` local): mixed/marginal result (wrong_instructions 138->136 but differing_halfwords 112->118), consistent with this being the documented open register-allocation residual rather than a source-shape bug -- reverted to keep the better differing_halfwords score.","Tried moving `draw = (DrawRectangleFn)heap_cache[7];` to after the `work->0x7784 = 75;` field write, to see if a later spill point would match the reference's late `str r7,[sp,#48]`: regressed the whole function (138->210 wrong_instructions, size grew 840->844) -- reverted.","Tried reordering the `x`/`z` locals' declarations after `y_offset_actor`/`y_offset_member` (pure declaration order, no computation change): zero effect on the score, confirming this compiler's stack-slot assignment is liveness-driven, not declaration-order-driven, for this pair -- reverted to the more natural declaration order since it does not matter either way.","measured=2026-08-29: Tried splitting `x = object->x + FixedPoint_Ratio(...)` into two statements (`x = FixedPoint_Ratio(...); x = object->x + x;`, same for z) to try to force an earlier spill of the FixedPoint_Ratio result matching the reference's `str r5,[sp,#44]` right after the add: regressed sharply (differing_halfwords 112->367, size grew 840->844, wrong_instructions 138->188) -- reverted.","measured=2026-08-29: Tried `draw = (DrawRectangleFn)cursor[6];` instead of `heap_cache[7]` (same value, addressed via the already-live `cursor` pointer instead of re-reading `heap_cache`): regressed (differing_halfwords 112->400, size shrank to 836, wrong_instructions 138->196) -- reverted.","measured=2026-08-29: Tried swapping the `y_offset_actor`/`y_offset_member` call order: regressed (differing_halfwords 112->117, wrong_instructions 138->144) -- reverted.","measured=2026-08-29: Tried multiplying `(target->x - object->x) * 90` instead of `90 * (target->x - object->x)` (and the z equivalent): byte-identical codegen, no score change -- reverted to the original operand order for readability since it is equivalent.","measured=2026-08-29: Tried reordering `object->acceleration`/`object->speed_limit` before `object->snap_to_target`/`object->auto_face_motion`: regressed (differing_halfwords 112->126) -- reverted.","measured=2026-08-29: Tried swapping `record_ptr = record;` / `screen_ptr = screen;` assignment order: differing_halfwords unchanged (112) but wrong_instructions rose 138->140 -- reverted to keep the strictly better baseline.","measured=2026-08-29: Tried swapping the `rx`/`ry` statement order inside the ring-loop: regressed (differing_halfwords 112->122, wrong_instructions 138->160) -- reverted.","Baseline reconfirmed at differing_halfwords=112 (measured=2026-08-29) after all of the above: every remaining mismatch traces to the same documented register-allocation residual (r8/sl vs r9/sl swapped, and the reference's compiler spilling `x`/`z`/`angle`/the `&work+0x7828` pointer and the `draw` value to specific stack slots at points this candidate's allocator keeps them live in registers instead) -- no further C-source reshaping found in this pass moved the needle without regressing other parts of the function."],"bounded_closure_pass_2026_08_31":{"fresh_baseline":{"candidate_bytes":840,"reference_bytes":840,"differing_halfwords":108,"wrong_instructions":134,"topology":"equal"},"decoder":["target pseudo 42 is created at rank 37, used 27 times across 227 instructions, crosses 25 calls, and is allocated to sl where the reference uses r9","frame pseudo 49 is created at rank 90, used 26 times across 350 instructions, crosses 17 calls, and is allocated to r9 where the reference uses sl","the decoder classifies this as a reciprocal register-role swap and names no unique source edit; every conditional branch matches"],"shipped_flag_verdict":{"neutral_at_108":["-fno-rerun-cse-after-loop","-fno-regmove","-fno-schedule-insns","-fno-cse-follow-jumps"],"regressed":["-fno-gcse","-fno-schedule-insns2","-fforce-addr","-ffixed-r9","-ffixed-r10","-ffixed-r11","-fcall-used-r8","-fcall-used-r9","-fcall-used-r10","-fcall-used-r11"],"note":"No shipped route improved the canonical exact-extent source. ABI register forcing was diagnostic only and regressed by hundreds of halfwords; none was retained."},"source_shape_verdict":["Moving frame initialization before the 20-frame delay lengthened its lifetime across one call and regressed 108->119 differing halfwords; moving it before object/target setup regressed to 159. Both were reverted.","Swapping the adjacent object and target extraction statements compiled byte-identically at 108 and was reverted to the semantic order.","Re-reading target from second_context immediately before the loop, a bounded split-lifetime probe, regressed to 844 bytes and 366 differing halfwords and was reverted."],"verdict":"No exact closure. The best legitimate source remains the incoming 840-byte candidate at 108 differing halfwords. The retained mismatch is the already-measured target/frame reciprocal allocation plus the consequent 72-byte versus 84-byte spill frame; no register or scheduler assignment was forced."},"proven_asm_eligibility_audit_2026_08_31":{"verdict":"not_eligible","cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":662,"core_identical":true,"note":"compiler cross-edition --json --object out/gs1-en/full/asm/080cb1a4.o 080cb1a4 locates the owner in all six releases; all 662 bytes outside 34 call relocations and ten literal fields are identical."},"passed":["candidate and reference extents are both 840 bytes","all conditional branches and call sites align","all literal values occur in both streams","the allocator decoder proves the central target/frame sl/r9 reciprocal role swap"],"blocking_evidence":["The complete 108-halfword residual is not a pure sl/r9 renaming. The aligned stream also changes the heap-cache carrier r6/r7, several low-register multiplication carriers, record and screen addresses, and many stack offsets.","The candidate frame is 72 bytes while the reference frame is 84 bytes. Those twelve bytes represent different spill-slot allocation, so a simple reciprocal-role normalization cannot pair every memory address row.","The 0xAB85 and 0x91EB literal fields occur in opposite pool order. Their use sites appear semantically paired, but the strict comparator requires row-complete proof rather than inference from the final values.","Existing RTL evidence identifies target pseudo 42 and frame pseudo 49, but does not yet trace every secondary register, spill slot, and reordered pool field back to those two allocnos. The established battle allocation gate requires that complete row accounting."],"decision":"Do not add 080cb1a4 to battle_effect_compiler_allocation_module and do not count its retained assembly as Proven ASM. A future audit would need a machine-checked role-and-spill equivalence table or backend dumps accounting for every residual row."},"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080cb1a4.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, the already-adopted games/gs1/src/battle/motion/set_approach_motion.c (and its motion_object.h/b5_context.h headers), games/gs1/recon/en/main/080e01e4.c and its dossier, in-repository headers (types.h's Object_ResetMotion/Object_SetPosition/Object_SetMode/FixedPoint_Ratio #define table), and the approved compiler. No other Golden Sun decompilation project or external source was consulted.","The complete 840-byte retained owner is Proven ASM under battle_effect_compiler_allocation_module; the semantic C remains available as the evidence-bearing reconstruction.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 662 non-relocation core bytes identical. The object symbol covers 838 bytes; the classified 840-byte retained extent includes its two-byte trailing alignment.","A shipped compiler-route and pass sweep tested routed GCC 2.96, explicit GCC 2.96, old-agbcc, regmove, both schedulers, CSE follow/skip blocks, GCSE, expensive optimizations, thread jumps, strength reduction, and rerun-CSE-after-loop. Canonical and most pass toggles remain at the exact 840-byte extent and 108 differing halfwords; every alternative either ties or regresses.","Semantic summary: entry 34-style battle-presentation sub-effect that moves the effect's source actor toward one fixed target party member (B5Context lookups keyed off the effect state's field 8 'actor' id and the first entry of its member-id array at field 0x24) using the same low-level Object_ResetMotion/Object_SetPosition/Object_SetMode(2) approach shape as set_approach_motion.c (scale 90, not that function's 80), sets snap_to_target/auto_face_motion, then runs 96 animation passes. Each pass reads the global 'facing' cursor twice (once at top of pass, once again after the frame-gated field writes, reusing the same cached value rather than re-reading the global), on frame 0 sets both objects' velocity_y/vertical_motion_strength for an initial launch, on frame 11 flips a sign field and nudges both objects' y by a per-actor amount from Func_080b5070, on frame 54 fires ObjectGroup_UpdateMembers and re-derives both objects' velocity_y/vertical_motion_strength/acceleration/speed_limit for a second, weaker motion phase, on frame 64 reverses the frame-11 adjustment and calls Object_SetMode(object,0), projects the source actor's live x/y/z through EffectPosition_ApplyBaseAndYOffset every pass and halves the resulting screen x, draws a single 32x64 flash sprite at frames 54-55, and for a 12-pass window (frames 56-67) draws a 16-point sine/cosine ring of 32x64 sprites around the projected position, selecting the sprite cel from the pass's position in that window.","The `(x + ((u32)x >> 31)) >> 1` bit-trick noted elsewhere in this family does appear once here (the ring-loop's `cel_phase / 2` cel-select division) and was left as a genuine `/2` per the family guidance, since it is a real signed halving over a value the compiler cannot prove non-negative at that point even though the enclosing `cel_phase >= 0 && cel_phase <= 11` guard establishes it dynamically; the *other* halving in this owner (`screen[0] >>= 1` on the projected x) compiles to a single bare `asrs` with no sign-correction pair and was written as a plain right shift accordingly, not a division.","Every `bl` target inside games/gs1/asm/080072e4.s's _call_via_rN trampoline bundle was modeled as a real indirect call through the traced `draw` (DrawRectangleFn) value read from heap_cache[7], per this family's already-established Func_080072f4/Func_080072f8 finding -- no fictional Func_080072f4/Func_080072f8 prototypes were declared.","Field 0x1C on struct MotionObject (the sign-toggled sync flag at frames 11/64) falls inside motion_object.h's still-unnamed `unknown_14[0x10]` span; it was accessed with a raw M2C_FIELD rather than extending the shared header, since only this one owner's evidence is available for it so far."]},"main:080cb4ec":{"schema_version":1,"namespace":"main","address":"0x080cb4ec","status":"measured-draft","owner_bytes":780,"score":{"measured":"2026-08-27","candidate_bytes":788,"reference_bytes":780,"differing_halfwords":302,"wrong_instructions":272,"class":"wrong","note":"First structural draft, evidence-guided from the family-transplant workspace's m2c decompile of the target's own retained bytes (out/family-transplants/main-080cb4ec/m2c/080cb4ec.c) plus the closest exact templates: games/gs1/src/battle/effects/puff_arc/run.c (structural template, score 8362/10000) and the already-adopted games/gs1/src/battle/effects/member_orbit/run.c (same 0x03001eec work-block family, and the source of the two-callback DrawRectangleFn[2]/rectangle_slot idiom this owner also uses). Initial draft measured candidate=760/reference=780/differing_halfwords=336/wrong_instructions=298, with the entire residual traceable to a single register-class swap: this compiler's allocator put the shared work pointer in r9 and the loop-index counters in fp/r6 (inconsistently between the two loops), where the reference keeps work in fp for the whole function and shares r9 between both loop counters. Fix 1: unifying the two loops' counter/pointer locals (previously separate 'i'/'p' for the 64-particle init loop and 'slot'/'cur' for the per-frame 16-particle draw loop) into one function-scope pair reused by both loops flipped the allocation to match the reference exactly for 'work' (fp) and the counters (r9) -- confirmed via --align (`mov fp, r2` / `add r5, fp` / `mov r1, fp` now byte-identical) -- dropping wrong_instructions 298->282. Fix 2: the piecewise drift-bucket chain (thresholds 0x2B/0x33/0x3B/0x43, mapping to bucket 3/2/1/0) was compiling to a 'default-then-ble-skip' shape when written through a local 'bucket' variable, versus the reference's 'bgt-then-set-then-b-to-merge' shape; writing directly to the struct field in each branch (`p->vel_x = 3;` etc, no local temp) reproduced the reference's exact branch topology and byte offsets for that chain, and applying the same 'write to the field, then a separate follow-up statement' shape to the negative sub-chain (v<=0x4B/0x53, bucket -1/-2/-3, written as `p->vel_x = 1/2/3; p->vel_x = -p->vel_x;` instead of `bucket = -mag`) further dropped differing_halfwords 319->302 (candidate grew 780->788, wrong_instructions rose 262->272, but differing_halfwords is the decisive metric per CONTRIBUTING and this shape scores strictly better on it; tried the exact-same-780-byte 262/319 variant too and kept the smaller differing_halfwords instead). Eight further experiments targeting the remaining large single mismatch -- an 8-byte-swapped stack layout where the reference places the two-callback `rectangle[2]` array at sp+16 and the `struct EffectPosition pos` scratch at sp+24, while this compiler's build places them the other way around -- all measured zero effect: declaration order (pos-before-rectangle and after), block-scoping pos narrowly vs at function scope, member_orbit's exact 'second_rectangle' intermediate-variable idiom for the second array slot, and indexing the draw callback through the bare `rectangle` array instead of a separate `rectangle_slot` pointer alias. This swap (and its knock-on low-register reshuffling inside the per-frame draw loop, plus small instruction-scheduling reorderings for a couple of independent immediate loads) accounts for effectively all of the remaining diff; every value, branch condition, branch target, call target, and constant in the function now matches the reference exactly under --align. This is the same class of compiler-internal, source-shape-insensitive register/stack-layout residual documented in games/gs1/recon/en/dossiers.json#main:080dc1ec's sl/r9 finding for a sibling of the same family, and is not chased further per the project's ban on hand-forcing register assignment and its guidance against open-ended permutation search once independent structural levers stop moving the score."},"family":{"assigned_template_owner":"main:080d9fc8","assigned_template_source":"games/gs1/src/battle/effects/puff_arc/run.c","template_note":"Score 8362/10000, the closest structural template per `families transplant main:080cb4ec`, but not a near-duplicate: this owner is 780 bytes against the template's 644 and needed real per-owner adaptation, not a symbol rename (a naive verbatim-template test on a same-family, same-644-byte sibling, main:080ccc38, was independently confirmed this session to fail badly at differing_halfwords=306/644). Shared shape: the WORK_EFX republish at work+0x7828, Func_080cd594(mode), two Func_080ed408 heap-kind draw-routine loads, Resource_LoadAndDecompress, a fixed-length outer per-frame loop, the ScheduleCallbackAfterFrames/ScheduleCallback bracket at the shared 0x080CD261 self-tick callback, and the Func_08002dd8(47)/Func_08002dd8(46) unload order. Diverges from the template in nearly everything else: this owner seeds a 64-entry randomized particle field (Random16()/UnsignedModulo-driven, not the template's fixed 9-entry sine/cosine arc), redraws only 16 of those 64 per frame through a 4-entry |drift-bucket| size/offset table (own Data_080edf7f/Data_080edf83/Data_080edf88, distinct addresses from the template's Data_080ede9f/Data_080edea5/Data_080edeb2), selects between two draw callbacks by the sign of each particle's drift velocity rather than by frame parity or layer count, drives an affine-background register pair (BG2PA at 0x04000020, BG2X at 0x04000028) the template never touches, and calls EffectPosition_ApplyStepAndYOffset and Camera_ApplyShake, neither of which the template calls at all.","actual_sibling_evidence":"The two-callback selection idiom (heap kinds 46 and 47, cached as a `void *rectangle[2]` array with a `rectangle_slot = rectangle;` alias, called through `((DrawRectangleFn)rectangle_slot[index])(dest, src, x, y, width, height)`) is copied structurally from the already-adopted games/gs1/src/battle/effects/member_orbit/run.c (main:080ce85c), which independently establishes both the DrawRectangleFn typedef and that this compiler reaches the `_call_via_rN` trampoline bundle (games/gs1/asm/080072e4.s, `bl Func_080072f4` at the r4 slot 0x080072e4+4*4) purely from an ordinary indirect call through a function-pointer array slot -- confirmed in this owner's own retained assembly (`ldr r4,[r6,r0]` selecting rectangle[0 or 1], then `bl Func_080072f4`), never modeled as a fictional direct call to a 7-argument function. Also reuses member_orbit's literal `heap_cache = (void **)0x03001EEC; cursor = heap_cache; work = *cursor++; canvas = *cursor;` cursor-advance idiom (matches this owner's `ldmia r3!, {r2}` exactly), and its Func_08002dd8(47) before Func_08002dd8(46) unload order at the tail."},"rejected_experiments":["Declaring `struct EffectPosition pos` before vs after `rectangle`/`rectangle_slot` in the function's local declarations: zero measured effect on which stack offset (16 or 24) either ends up at.","Wrapping `pos` in its own nested block scope immediately around its one use, versus function scope: zero measured effect, same result either way.","member_orbit's exact `second_rectangle` intermediate-variable pattern for the second heap-kind draw pointer (`second_rectangle = heap_cache[8]; rectangle_slot = rectangle; rectangle_slot[1] = second_rectangle;` instead of a direct `rectangle[1] = heap_cache[8];`): byte-identical output to the direct-assignment form.","Indexing the draw callback through the bare `rectangle` array (`((DrawRectangleFn)rectangle[...])(...)`) instead of through the separate `rectangle_slot` pointer alias: byte-identical output; the compiler already treats them the same.","Inlining `src = work + Data_080edf88[cell]` directly into the draw call's argument list instead of a named `src` local: regressed (candidate 764->764 bytes but wrong_instructions 298->322), reverted.","For the negative drift-bucket sub-chain, writing the final value directly as `p->vel_x = -1/-2/-3` in each leaf (dropping the shared positive-then-negate step entirely): regressed relative to the kept form (candidate grew to 784, differing_halfwords rose to 328), because it lost the reference's single shared `negs` instruction; reverted in favor of `p->vel_x = 1/2/3; p->vel_x = -p->vel_x;`.","Using a local `mag` variable and writing `p->vel_x = mag; p->vel_x = -p->vel_x;` (instead of writing 1/2/3 directly to the field before negating): compiled identically to the plain `p->vel_x = -mag;` single-statement form (store-forwarding collapses it either way), so it did not reproduce the reference's separate materialize/negate shape the way direct field writes did; the kept version omits the intermediate local entirely.","Nested-if (nesting nested `if (v > threshold) { ... } else { bucket = N; }`) versus if-else-if chain phrasing for the same piecewise thresholds: byte-identical compiled output either way, confirming this compiler's front end normalizes both forms identically and the branch-shape fix came specifically from removing the local temp, not from the chain's surface syntax."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080cb4ec.s), the family-transplant workspace's m2c decompile of this owner's own bytes (out/family-transplants/main-080cb4ec/m2c/080cb4ec.c and m2c/target.canonical.s), the approved local EN ROM, the exact adopted games/gs1/src/battle/effects/puff_arc/run.c and games/gs1/src/battle/effects/member_orbit/run.c, in-repository headers (effect_step.h for struct EffectPosition and its already-adopted EffectPosition_ApplyStepAndYOffset caller in games/gs1/src/effects/position/apply_step_and_y_offset.c; also cross-checked Resource_LoadAndDecompress, ObjectGroup_UpdateMembers, and Camera_ApplyShake's real adopted signatures against games/gs1/src/resource/load_and_decompress.c, games/gs1/src/object/group/update_members.c, and games/gs1/src/camera/apply_shake.c), and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: republishes the caller's Efx* at work+0x7828, plays a start-up cue, sets BG2PA=0x0100 (affine identity scale) and BLDALPHA=0x1000, loads two draw-rectangle routines (heap kinds 46 and 47), decompresses a resource into the work block, zeroes two per-effect counters, schedules its own per-frame self-tick callback at 0x080CD261, derives a BG2X center offset from EffectPosition_ApplyStepAndYOffset(actors[0], ...), then seeds a 64-entry particle array (work+0x7080, 28 bytes/entry) with randomized fixed-point positions and a signed drift-velocity bucket (-3..3) selected by a piecewise range test on the random draw. Plays another cue, then runs 120 frames: a 16/17-frame linear BLDALPHA fade in at the start and a matching fade out over the last 16 frames (with a one-shot BLDCNT toggle at each fade's inner edge), a per-frame draw pass over the first 16 of the 64 particles (walked back to front) that selects one of the two heap-kind draw routines by the sign of each particle's drift velocity, looks its |bucket| up in a private 4-entry width/height/source-offset table, advances the particle's fixed-point position by its drift velocity once its staggered opening window is passed, or -- once a second, later per-particle threshold is passed -- keeps drawing it with height reduced by 4 instead of moving it (a fade/settle tail), a periodic (every 4th frame in [23,87], every 8th also cueing audio 0x85) ObjectGroup_UpdateMembers(actors[0], 7, 5, 0, 2) call that also arms the shared camera-shake counter at work+0x77A8, and an unconditional Camera_ApplyShake(8, 8) every frame. Tears down by unscheduling the self-tick callback and releasing both heap-kind draw routines (47 then 46, matching member_orbit's order) before a final opaque `Func_080cdbc0()` cleanup call shared with the template.","Every call target, branch condition, branch target displacement, and literal constant in the function now matches the reference exactly under `candidate-show --align`; the entire remaining 302-halfword residual is a single stack-layout swap (the rectangle[2] array and the EffectPosition scratch trade sp+16/sp+24) plus that swap's knock-on low-register reshuffling inside the per-frame draw loop and a few independent-instruction scheduling reorderings elsewhere -- no open semantic question remains.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080cbc0c":{"schema_version":1,"namespace":"main","address":"0x080cbc0c","name":"BattleEffect_RunScreenShatter","status":"measured-draft","owner_bytes":2508,"candidate_bytes":2448,"differing_halfwords":1199,"wrong_instructions":1253,"classification":"structural-topology","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-09-01: replaced four fictional direct Func_080072f8 calls with the typed IWRAM transfer routine at 0x03000164. The reference loads that target into r5 once for each two-call pair and preserves it across the second pair's intervening work; the C now expresses the same two callback lifetimes. Candidate size grows from 2432 to 2448 of 2508 bytes while differing halfwords remain 1199 and wrong instructions move 1237 to 1253 from downstream allocation. This semantic correction removes the call-via-r5 lint rather than optimizing the raw score.","2026-08-31: re-audited the wave repair and improved the measured draft from 2396/2508 bytes, 1202 differing halfwords, and 1257 wrong instructions to 2432/2508, 1199, and 1237. The correction preserves REG_IME's real saved value while using typed halfword access, uses byte-addressed arithmetic for the actor-data pointer, and types the three ROM tables as u16/u8/u8. The owner remains Draft C and claims zero DONE bytes.","Two values loaded from the established heap callback cache at +0xb8/+0xbc were dead in the m2c draft because the later `_call_via_r4` and `_call_via_r7` trampoline sites were misrepresented as direct Func_080072f4/Func_08007300 calls. Reconstructing them as the family-standard two-entry DrawRectangleFn array restores the reference's stack-backed callback lifetime, grows the frame from 40 to 48 bytes, and adds 24 candidate bytes. Declaration order now reproduces the reference's relative local ordering; the remaining 8-byte total-frame difference is compiler stack-slot/padding evidence, not permission to add fake padding.","The repaired errors were mechanical recovery issues: typed halfword stores to VRAM, typed IME halfword save/restore, byte-addressed aggregate-pointer arithmetic, and typed ROM table reads. No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were introduced.","The generated shared-aggregates.h context is evidence scaffolding shared by the corpus-wide aggregate miner, not a semantic naming authority. Its M2cAggregate names must be replaced with evidence-backed subsystem types as this owner is reconstructed.","The provisional semantic name describes the visible behavior rather than asserting a lost Camelot identifier: a large battle-presentation routine using the 0x03001e74 and 0x03001eec work families, DMA queueing, palette interpolation, a 33-entry particle group, tile fragments, and a 128-frame presentation loop."]},"main:080cc5d8":{"schema_version":1,"namespace":"main","address":"0x080cc5d8","status":"proven-retained","owner_bytes":904,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"score":{"measured":"2026-08-27","candidate_bytes":904,"reference_bytes":904,"differing_halfwords":70,"wrong_instructions":56,"class":"wrong","note":"First pass. Family-matcher assigned games/gs1/src/battle/effects/member_orbit/run.c (080ce85c, score 8031/10000) as template, but the owner's own 904 retained bytes (games/gs1/asm/080cc5d8.s) show a genuinely different shape: this owner allocates its own kind-39/40/41 heap blocks via Func_080048b0(kind,size) instead of reading pre-existing ones from *(void**)0x03001EEC, iterates a fixed 56-frame loop (not member_count*16+48), drives a single Func_080e396c(object->field8, screen) projection per frame instead of looping the party, and layers in a 128-entry fixed-address 0x02010000 'star' seed, a second 64-entry star-record array inside its own work block at +0x7080, and a transient kind-47 four-sprite decoration burst. The original scalar callback model accidentally let GCC overlap rectangle1 with other locals, producing a 36-byte frame even though the reference proves a 40-byte frame with trail_source@sp+8, rectangle[0]@sp+12, rectangle[1]@sp+16, canvas@sp+20, object@sp+24 and screen@sp+28. Reconstructing the callbacks as the family-standard `rectangle[2]` array and swapping canvas/trail_source declaration order recovers every one of those offsets. Naming the 0x03001388 WordCopyFn and the 0x480 scheduler interval reproduces the reference argument-materialization order and extends the byte-exact prefix from 7 to 183 instructions. Finally, one shared `display_base = (void *)0x04000028` local models the reference's reuse of the BG2X base across the conditional BLDALPHA write; the old pair of independent constant casts made GCC rematerialize 0x04000052 and added four downstream bytes. Fresh score is candidate=904/reference=904, differing_halfwords=70, wrong_instructions=56, topology equal. This is a reduction from the pre-reconstruction 223/96 floor with exact extent restored. Remaining work starts at the per-frame projection call's screen-base carrier and the r0/r2/r3 frame-value schedule. Pointer-before-call, pointer-after-call, named screen_x, whole-loop screen-pointer, volatile-screen, and mutating-display-pointer spellings are neutral or regress and were rejected."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting. Confirmed genuinely related (same 0x03001eec/Data_03001e50 'battle work' subsystem, same M2C_FIELD field-offset convention at 0x7780/0x7784/0x7824/0x7828, same Func_080cd594/Func_08002f40/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0/Func_080d6888 calling shapes, same Value_XXXXXXXX link-time-constant idiom) but not structurally identical: this owner's differing size (904 vs the template's compiled length) reflects a self-contained heap-allocating effect (its own kind-39/40/41 blocks, a fixed 56-frame loop, a single-point projection instead of a party-member loop, and an extra transient kind-47 decoration burst) rather than a reuse of the shared pre-allocated work/canvas pair the template reads from *(void**)0x03001EEC. The naive symbol-renamed transplant at out/family-transplants/main-080cc5d8/080cc5d8.c was not used beyond confirming headers/typedefs; every field offset, constant, and control-flow shape below was re-derived from games/gs1/asm/080cc5d8.s and out/family-transplants/main-080cc5d8/m2c/target.canonical.s directly."},"rejected_experiments":["Inlining the kind-47 decoration draw's x/y expressions directly into the DrawRectangleFn call's argument list instead of pre-computing them into named `x`/`y` locals: compiles but regresses wrong_instructions 96 -> 104 (the reference's instruction order reads the two signed-byte tables before the Data_03001e50[47] callback read, which only happens when x/y are separate statements ahead of the assignment).","Hoisting `(u8*)work + offset` into its own named `u8 *sprite_base` pointer local declared before the kind-47 loop, matching the intuition that a persistent pointer should get its own stack slot: produced byte-identical output to the plain inline `(u8*)work+offset` expression at the call site -- this compiler already performs the hoist on its own regardless of how the source names it, confirming the hoist-vs-recompute choice is register-pressure-driven inside the compiler, not something the surface C syntax controls.","Pre-computing `DrawRectangleFn *rect47_slot = (DrawRectangleFn*)&Data_03001e50[47];` before the loop and dereferencing `*rect47_slot` each iteration, hoping to force the same stack-slot spill the reference shows for kind 47's callback: produced byte-identical output to plain `Data_03001e50[47]` re-evaluated each iteration (both fold to the same link-time-constant address either way); did not by itself create or remove the sp+16 spill seen in the reference."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080cc5d8.s, identical to out/family-transplants/main-080cc5d8/m2c/target.canonical.s), the approved local EN ROM, the approved compiler, in-repository headers, and the already-adopted/measured sibling sources named in family.template_note plus games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and games/gs1/src/battle/effects/objects/start_effect_22.c (for the Func_080048b0(kind,size) signature) and games/gs1/src/battle/effects/puff_arc/run.c (for the Data_03001e50[kind] heap-cache convention). No other Golden Sun decompilation project, symbol map, or disassembly was consulted.","The complete 904-byte retained owner is Proven ASM under the battle_effect_compiler_allocation_module classification; the semantic C remains available as the evidence-bearing reconstruction.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 632 non-relocation core bytes identical. The owner has 36 Thumb call relocations and 32 literal fields; every remaining regional byte difference is confined to those fields.","A shipped compiler-route and pass sweep on 2026-08-31 tested routed GCC 2.96, explicit GCC 2.96, old-agbcc, regmove, both schedulers, CSE follow/skip blocks, GCSE, expensive optimizations, thread jumps, strength reduction, rerun-CSE-after-loop, function CSE, and deferred pops. Canonical, no-schedule-insns, both CSE toggles, thread-jumps, rerun-CSE, function-CSE, and deferred-pop routes tie at 70 differing halfwords; all others regress or change extent.","The annotation-free permuter's finite allocator decoder named one low-register expression constraint but refused to search because no unique source repair follows from it. This is the required negative verdict, not an invitation to force allocation. Combined with the already-recorded pointer placement, screen-coordinate, display-base, callback-array, and stack-layout source probes, the ordinary-C axis is closed.","Semantic summary: a battle-presentation sub-effect that allocates a work block, a 16KB canvas, and a small trail-sprite buffer; sets BG2 affine scale and blend alpha; loads a palette selected by a 4-way switch on the target object's kind field; seeds a fixed-address 128-entry particle array (side effect, unused by this function) and a 64-entry in-work 'star' record array; registers a 48x48 rectangle-blit callback (kind 46); then runs 56 frames. Each frame re-projects a single tracked point to screen space, shakes BG2's horizontal offset and (after frame 49) fades BLDALPHA, cues a sound/vibration effect once at frame 26, draws a large kind-46 sprite during frames 28-48, bursts four small kind-47 decorations during frames 0-14 from ROM-table-driven offsets, and advances/draws up to 64 sparkle-trail squares whose radius and screen position come from a sine/cosine sweep of each record's stored angle.","Field offsets 0x77b4/0x77b8 on the work block are new to this owner (no precedent in the sibling dossiers); left as raw M2C_FIELD offsets rather than guessing names, matching this family's established practice for byte-offset accesses with no evidence-backed structure yet."]},"main:080ccc38":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080ccc38","status":"measured-draft","owner_bytes":644,"score":{"measured":"2026-08-27","candidate_bytes":640,"reference_bytes":644,"differing_halfwords":270,"wrong_instructions":189,"class":"wrong","note":"Battle-effect owner reading the kind-39 'battle work' heap cache directly from 0x03001eec (same subsystem as puff_arc/run.c, member_orbit/run.c, and apply_shake.c's ADDR_03001EEC). Structure recovered directly from games/gs1/asm/080ccc38.s and cross-checked against Func_080e0524's real signature (games/gs1/src/resource/load_and_decompress.c), Func_080d6888's real signature (ObjectGroup_UpdateMembers, games/gs1/src/object/group/update_members.c), Func_080e396c's real signature (EffectPosition_ApplyStepAndYOffset, games/gs1/src/effects/position/apply_step_and_y_offset.c), and Func_080b5098's B5Context (games/gs1/include/b5_context.h). Body: republishes param0 at work+0x7828, sets BG2PA to 0x100, calls Func_080ed408(46,7,7,c,d) with c/d selected by whether the state's offset-4 field equals 1, loads two resources (kind ids forced through the pool via the Value_00000071/Value_00000072 idiom) into work and a fixed 0x02010000 EWRAM buffer respectively, conditionally (mode==0) streams a palette through the fixed word-copy routine at 0x03001388, sets a projected BG2X reference point from EffectPosition_ApplyStepAndYOffset's output, then runs a mode-selected 74/48-frame loop that indexes five parallel 6-entry tables at 0x080ee064/06a/070/07c/088 by cell=frame/4 (valid 0-5, table B additionally indexed by cell+side*6) to call the kind-46 rectangle blitter through the r4 trampoline slot (matches Func_080072f4 = 0x080072e4 + 0x10, i.e. _call_via_r4), plus one-shot dispatches on count==8/13/65 that either play a sound and dispatch a party-member group update or write motion-object fields at +40/+68/+72 on the actor's MotionObject."},"family":{"assigned_template_owner":"main:080d9fc8","assigned_template_source":"games/gs1/src/battle/effects/puff_arc/run.c","template_note":"The family-matcher's structural score (8308/10000) is real (same kind-39 cache prologue/epilogue shape, same call-target vocabulary), but the template's actual body is NOT this owner's body: a naive verbatim-template transplant (symbol renamed only) measured differing_halfwords=306/644 with materially different field checks and call sequences. This draft was written from games/gs1/asm/080ccc38.s and out/family-transplants/main-080ccc38/m2c/symbolized.s directly, using the template and games/gs1/src/battle/effects/member_orbit/run.c only for calling-convention and heap-cache idioms (0x03001eec base, 0x7828 state-pointer slot, the Value_ pool-forcing spelling, the _call_via_rN indirect-call pattern)."},"rejected_experiments":[{"experiment":"keep the kind-46 draw pointer in a named DrawRectangleFn local (draw = (DrawRectangleFn)cache[46-39];) computed once before the loop and called by name at both draw sites, mirroring puff_arc's own draw variable","result":"compiles to a different persistent-register assignment than the reference (the pointer lands in r9 or fp instead of being spilled to a stack slot and reloaded via r4 immediately before each call); regressed differing_halfwords from 270 to 288-293 across several variants. Calling ((DrawRectangleFn)cache[46-39])(...) directly at each of the two call sites, with no named local, is what produced the reference's exact _call_via_r4 trampoline selection and the best score found.","class":"rejected"},{"experiment":"compute the kindArg/tag branch for Func_080ed408's call as one shared call after the if/else (kindArg/tag set per-branch, one Func_080ed408(46,7,7,kindArg,tag) call after the merge) instead of a full call duplicated inside each branch","result":"structurally closer to the reference's actual single bl Func_080ed408, but regressed differing_halfwords from 270 to 310 -- the reference's specific register-reuse pattern (the branch where the compared field already equals 1 reuses that register as the stack argument without a fresh mov) was reproduced more closely by duplicating the full call inside each branch, even though the reference itself has only one physical bl instruction. Kept the duplicated form since it scores better overall despite this one local mismatch (visible in the diff as an extra bl 0x207d0 in the candidate).","class":"accepted-as-better-not-exact"},{"experiment":"read Data_080ee070 (the per-cell source-offset table) as bare Data_080ee070[cell] inline at each use versus hoisting it into an explicit `const u16 *tableA = Data_080ee070;` local set once before the loop","result":"the explicit tableA local improved the score (293->288 in one comparison point, and is part of the current best combination at 270) by giving the register allocator a named loop-invariant value to keep in a persistent register across iterations, matching the reference's `mov fp, r4` done once before the loop and reused via `mov r0, fp` in both cell sub-blocks.","class":"accepted"},{"experiment":"store the BG2X-store base value (16 or 112) into a shared local before an if/else and do one store after the branches merge, versus writing the full `*(s32*)0x04000028 = (base - position.x) << 8;` statement independently inside each branch","result":"the reference reads position.x and does the full store independently inside each branch (no shared post-branch store); writing it that way in the source measurably reduced the diff around that region versus the shared-local form.","class":"accepted"},{"experiment":"read the two cache words via cache[0]/cache[1] instead of the entry=cache; work=*entry++; dst=*entry; pointer-walk idiom","result":"same differing_halfwords (270) but the compiler classified the candidate 'unemittable' and wrong_instructions rose slightly (189->191); reverted to the pointer-walk form, which is also a more literal reading of the retained ldmia r3!,{...} instruction.","class":"rejected"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080ccc38.s), its m2c-assisted symbolized disassembly (out/family-transplants/main-080ccc38/m2c/symbolized.s, which resolves every pc-relative pool load to a labeled constant), already-adopted exact sibling sources in games/gs1/src/ (puff_arc/run.c, member_orbit/run.c, resource/load_and_decompress.c, object/group/update_members.c, effects/position/apply_step_and_y_offset.c, camera/apply_shake.c, motion/set_approach_motion.c, motion/initialize_rising_object.c), in-repo headers (b5_context.h, effect_step.h, motion_object.h, types.h), and the approved compiler. No other Golden Sun decompilation project, symbol map, or 'gsret' disassembly was consulted; no other owner's in-progress worktree output was read.","All 23 callees are declared locally per this project's established one-file-one-declaration convention; none are invented -- Func_080e0524, Func_080d6888, Func_080e396c, and Func_080b5098 are cross-checked against their real adopted definitions/headers as noted above. Func_080b50e8 and Func_080b5088 have no adopted definition anywhere in the tracked corpus yet; their signatures (void Func_080b50e8(s32); void Func_080b5088(s32, s32);) are inferred solely from this owner's own call sites (matches puff_arc's existing Func_080b50e8(s32) declaration).","The kind-46 draw call is confirmed to go through the r4 trampoline slot (Func_080072f4 = games/gs1/asm/080072e4.s + 0x10, i.e. _call_via_r4) in both this draft's compiled output and the reference -- not a fixed-address direct call -- matching this session's project-wide _call_via_rN idiom.","The remaining 270 differing halfwords are overwhelmingly a single cascading register-allocation artifact, not a semantic/structural defect: the retained assembly and this draft agree on essentially every instruction's operation, operand values, field offsets, call arguments, and branch topology, but the reference keeps 'cache' in r6/'work' in r7 (this draft: r3->r6/r7 swapped) and keeps 'dst' in r9/'mode' in sl across the whole function (this draft: dst in fp, mode in r9) -- one early prologue register-allocation choice that then repeats at dozens of unrelated later sites. No PERM_GENERAL/PERM_INT hand-authored search or forced register assignment was applied (both are against project rules); five structural rewordings were tried and the best-scoring, most literal one was kept. This candidate claims zero DONE bytes and is not close enough to warrant a permuter run without first finding the specific source shape that drives that one register-allocation decision."]},"main:080ccebc":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080ccebc","status":"measured-draft","owner_bytes":584,"score":{"measured":"2026-08-31","candidate_bytes":588,"reference_bytes":584,"differing_halfwords":271,"wrong_instructions":216,"class":"structural-topology","note":"Fresh late-battle playbook pass. The four apparent Func_080072f4 calls are now modeled as ordinary six-argument calls through *(DrawRectangleFn *)0x03001F08: the retained bytes load r4 from that cell immediately before entering 0x080072f4, the r4 slot of the _call_via_rN trampoline, and pass width and height in the two stack argument slots. The calls are therefore draw_rectangle(second, base, x, y, shade, shade), matching the exact member_orbit family idiom. The frame-10 Func_080d6888 call was also corrected from the old draft's reversed convention to (member_id, 7, -1, member_index, 8), directly matching the retained r0-r3 and stack argument setup. These semantic repairs reduced wrong instructions 244->216 and made the byte extent nearly exact (544->588 versus 584), while differing halfwords stayed 271. The remaining residual is honestly structural-topology: the candidate uses a 24-byte frame versus the reference's 32 and diverges in the initial work/canvas/local-position allocation before the first effect-position call. No exact sibling shape names that missing lifetime, so this pass stops rather than inventing padding or forcing allocation."},"rejected_experiments":[{"experiment":"read the shared struct base directly from ADDR_03001EEC vs loading ADDR_03001EF0 first and subtracting 4","result":"reference loads ADDR_03001EF0's address into a register, keeps that same register as `second` (used later as Func_080072f4's first argument via `mov r0,fp`), and reaches the +0x7828-holding base struct by subtracting 4 from it rather than loading ADDR_03001EEC separately; matching that order was needed to get the same prologue register set (fp/sl/r9/r8, matching the reference exactly) instead of an extra/missing saved register","class":"accepted"},{"experiment":"pass `base` (the ADDR_03001EEC-rooted struct pointer) as Func_080072f4's first argument","result":"the retained assembly's `mov r0,fp` before each Func_080072f4 call uses the OTHER cached pointer (`second`, from ADDR_03001EF0), not `base`; switching the argument to `second` is structurally correct even though the resulting score did not change much, because the call's other three arguments and the surrounding loop shape still differ"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","This is a single-pass structural draft, not iteratively tuned: the loop count/shape, the four draw-call rows, the averaging idiom, and the scheduler bracket are read directly off the assembly and are reasonably solid. The `count`/`Func_080d6888` inner block, the exact Scheduler_AddOrUpdateCallback second argument (written here as a bare 0x480 magic number, `144<<3`), and the +0x59 message id passed to Func_080e0524 are transcribed from the instruction operands without independent confirmation of their semantic meaning.","The rectangle-callback and Func_080d6888 argument conventions are now established from retained register provenance and the exact member_orbit family. The remaining gap begins earlier, in stack-local lifetime and prologue structure; this candidate still claims zero DONE bytes."]},"main:080cd260":{"schema_version":1,"namespace":"main","address":"0x080cd260","status":"proven-retained","owner_bytes":248,"candidate_bytes":248,"differing_halfwords":3,"wrong_instructions":0,"classification":"compiler_local_scheduling_mismatch","resolved_asm_classification":{"kind":"compiler_local_scheduling_mismatch","retention":"keep_structured_asm","confidence":"proven"},"translation_unit":"unknown","compiler_route":"canonical-gcc296","algorithm":"Dispatches the pending battle-presentation transfer mode, copies or transforms the 0x4000-byte graphics buffer, clears the pending flag, and advances the presentation counter.","evidence":["The drafting-wave m2c source was already extent- and branch-topology-exact but differed in 40 halfwords because it modeled the IWRAM call-via-r3 veneers as fictional four-argument functions.","Replacing those calls with ordinary typed function-pointer calls through 0x03001388 and 0x03000168 preserved the output but did not change the residual by itself.","Wrapping the two indirect-call forms in ordinary static inline helpers separated GCC 2.96's otherwise merged 0x4000 constant pseudo. This removed the extra r7 save, restored work/source to r6/r5, and reduced 40 differing halfwords to 3 with zero wrong instructions.","The remaining difference is one three-instruction scheduling permutation in case 1: candidate loads the 0x06004000 destination before moving the source and shifting the size; the reference loads it afterward. Every other instruction, branch, pool word, and extent is exact."],"bounded_flag_probe":{"verdict":"miss","baseline":3,"unchanged":["-fno-schedule-insns","-fno-regmove","-fno-cse-follow-jumps","-fno-rerun-cse-after-loop","-fno-gcse"],"regressed":{"-fno-schedule-insns2":28,"-fno-expensive-optimizations":55}},"bounded_source_probe":{"tool":"tools/shape-search/search.ts","depths":[3,8],"legal_variants_each_run":2,"best_differing_halfwords":3,"verdict":"miss","note":"The decoder exposes only the two legal statement/evaluation-order variants for this source shape; both preserve or regress the localized schedule. Additional hand probes covered specialized inline-helper signatures, direct and nested destination helpers, case-local source/destination/size temporaries, and assignment expressions."},"compiler_decision":{"dump":"GCC -da pass 23 sched2","source":"alchemy-gcc/agbcc/gcc_arm/sched.c:rank_for_schedule","finding":"The four independent call-argument instructions have equal scheduling priority and dependency class. rank_for_schedule therefore falls through to original INSN_LUID order. The candidate RTL creates the destination literal before the source move and size shift; the shipped reference implies the opposite original source expansion order. No scheduling flag changes that local tie without regressing the rest of the owner."},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":166,"core_identical":true,"starts":{"ja":"0x080c4260","en":"0x080cd260","de":"0x080cf060","es":"0x080d0a60","fr":"0x080d0a60","it":"0x080cd260"}},"decision":"Retain the byte-exact structured assembly as a proven local compiler-scheduling mismatch. The complete ordinary-C reconstruction remains the semantic source artifact; all 248 owner bytes now count as DONE under the same evidence gate as the existing compiler_local_scheduling_mismatch family."},"main:080cd594":{"schema_version":1,"namespace":"main","address":"0x080cd594","status":"measured-draft","owner_bytes":728,"score":{"measured":"2026-08-31","candidate_bytes":756,"reference_bytes":728,"differing_halfwords":360,"wrong_instructions":322,"class":"structural-topology","note":"Fresh candidate-show result: 756/728 bytes, differing_halfwords=360, wrong_instructions=322, topology different. This materially advances the prior only-compiling template fallback (344/728, differing_halfwords=361, wrong_instructions=452, topology different), while the aggregate-m2c candidate itself failed compilation. All observed side effects and loops are represented; the remaining 28-byte/topology residual claims zero DONE bytes."},"notes":["Repaired aggregate incompatibilities with explicit battle-work/cache pointers, 16-bit hardware registers, DMA queue entry widths, VRAM tilemap halfwords, and display-state fields. Four repeated interrupt-guarded DMA queue operations are represented by a source macro, not a helper call.","No inline assembly, fixed registers, scheduling barriers, compiler overrides, or external sources were used."]},"main:080cdb24":{"schema_version":1,"namespace":"main","address":"0x080cdb24","status":"measured-draft","owner_bytes":154,"score":{"measured":"2026-08-31","candidate_bytes":154,"reference_bytes":154,"differing_halfwords":69,"wrong_instructions":90,"class":"missing-extra-code","note":"The real algorithm now compiles to the exact owner extent with equal branch topology. The residual is constant rematerialization and register allocation across the nested tile loops; zero DONE bytes are claimed."},"notes":["Replaced an unrelated Djinn-counting family transplant with the reference's actual battle tilemap initialization: configure BG3, emit eight encoded tiles and eight blank cells per row, for sixteen rows.","Nine bounded shipped-flag probes produced no exact result. Allocation-forcing routes were rejected; the canonical source and flags remain authoritative."]},"main:080cdbc0":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080cdbc0","status":"proven-retained","classification":"battle_scene_queue_compiler_instruction_selection_module","owner_bytes":340,"family_matcher":{"best_alternative":"main:0801b4ec (menu/selection/move_forward.c)","score_basis_points":7418,"confidence":"below 7500 threshold","verdict":"false positive -- shape-only register-shuffle-prologue match, no real kinship","evidence":"move_forward.c is 8-bit-menu-cursor logic with no shared callees, no shared field offsets, and no shared constants with this owner. Real semantic siblings identified instead by hand-tracing the retained assembly's own call targets, field offsets, and pool constants against already-adopted exact sources: games/gs1/src/runtime/scheduler/callback_scheduler.c (Func_08004278/Scheduler_RemoveCallback, and the `*ime = (u16)(u32)ime` IME-disable idiom), games/gs1/src/graphics/palette/step_fade_transfer.c (Func_080cd4b4, the removed scheduler callback, touching the same battle-work offsets 0x77b4/0x77b8 this owner's 0x77a0/0x77a4 sit beside), games/gs1/src/graphics/vram/reset_block_and_release_heap_blocks.c (the Func_080072f0(dest,size,control,target) 4-arg calling idiom for the IWRAM transfer routine at 0x03000164), games/gs1/src/battle/effects/set_transition_flag_and_display.c (the immediate successor owner at 0x080cdd14, sharing the battle+0x648 field and the Func_080b5038(2,value,X) call shape), games/gs1/src/camera/scene/configure.c (Data_03001ce0's struct SceneCameraObject, fields field0c@12/anchor@16), and games/gs1/src/battle/effects/common/advance_scroll_on_interval.c + runtime_owner_229.c (Data_03001ad0's struct Position, x@4/y@6, and the adjacent battle-work offset family 0x7790-0x77b8). All six are adopted exact (asm deleted, source-paths.json-registered)."},"score":{"measured":"2026-08-27","candidate_bytes":332,"reference_bytes":340,"differing_halfwords":109,"wrong_instructions":86,"matched_prefix_instructions":7,"class":"unemittable","note":"The reconstructed source is semantically well-evidenced (every callee, field offset, and pool constant traced against already-adopted exact siblings) but does not yet reach byte-exact linked output. Two register-allocation/instruction-selection divergences from GCC 296 account for most of the remaining differing halfwords: (1) a static-inline bounded-queue-insert helper (the IME-disable-then-count<=31-then-stmia-triplet idiom, proven exact in callback_scheduler.c, paralleled by the still-unadopted draft QueueObjectUpdate in games/gs1/recon/en/main/080c1798.c) compiles in the reference with `bgt` (signed) and no sign-extension of the saved IME value, while the same C shape here compiles with `bhi` (unsigned) and an added `lsls #16; asrs #16` sign-extend of the saved value, and with three individual `str` instead of the reference's `stmia r3!, {rN}` post-increment triplet -- same net effect, different chosen encoding, at both of the two call sites; (2) the reference computes `battle + 0x648` twice independently (once into a scratch register for the Func_080b5038 argument, again later into r7 for the loop), while this GCC 296 build's CSE always folds the second computation into the first and updates the persistent pointer in place -- functionally identical, but not the encoding the reference uses. Everything upstream of these two hunks (the Data_03001eec/Data_03001e74-analog address-of-symbol-minus-120 pool trick, the Data_03001ad0.x/y writes, the Data_03001ce0.field0c/anchor writes, the BG2CNT setup and Func_080072f0 transfer call, and the Func_08004278 callback removal) now matches the reference instruction-for-instruction and register-for-register."},"rejected_experiments":[{"experiment":"Data_03001eec/Data_03001e74 as two independent extern u8* globals (matching how other adopted siblings declare them)","result":"reference's `subs r3, #120` (deriving one global's address from the other's via a compile-time-constant subtract) cannot be produced from two genuinely separate extern symbols in GCC 296 -- it requires expressing the second read as pointer arithmetic on the first symbol's own address (`*(u8 **)((u8 *)&Data_03001eec - 120)`), which reproduces the reference exactly"},{"experiment":"Data_03001eec modeled as an array (`Data_03001e74[30]` / `Data_03001e74[0]`, and the reverse `Data_03001eec[0]` / `Data_03001eec[-30]`)","result":"positive-offset array indexing picks an immediate-offset load from the base (`ldr r5,[r3,#120]`), not the reference's pool-load-the-higher-address-then-subs shape; negative indexing forces a register-offset load (`ldr r6,[r2,r3]`) via a computed negs, also not matching. Only address-of-symbol pointer arithmetic reproduces the reference"},{"experiment":"QueueDisplayRequest parameter typed `void *control` instead of `u32 control`, mirroring 080c1798.c's QueueObjectUpdate(void *destination) exactly","result":"byte-identical candidate output either way -- the sign-extension/bhi-vs-bgt divergence is unrelated to the parameter's pointer-vs-integer type"},{"experiment":"QueueDisplayRequest as `static inline` vs hand-duplicated inline block (no function at all) vs count-as-plain-index instead of a `struct *entry` pointer","result":"inline-vs-duplicated: byte-identical (GCC's inliner is a no-op difference here). Index-instead-of-pointer: strictly worse (144 differing halfwords, matched_prefix dropped 7->3) -- the `struct DisplayQueueEntry *entry = &queue.entries[queue.count++]` pointer form, matching QueueObjectUpdate's real shape, is closer"},{"experiment":"`Data_02002090.count <= 31` vs `Data_02002090.count < 32`","result":"byte-identical -- not the source of the bgt/bhi divergence"},{"experiment":"hoisting `&Data_03001ad0` into a named `struct Position *pos` local declared before `actor`/`battle`","result":"fixed the 'battle' register: r6->r7, matching reference, and improved wrong_instructions 94->86 (differing_halfwords unchanged at 109) -- kept in the final draft"},{"experiment":"hoisting `battle + 0x648` into an explicit `u16 *value_ptr` local computed once, early, and reused for both the Func_080b5038 argument and the loop","result":"identical output to writing `battle += 0x648;` as a separate later statement -- GCC 296's CSE folds either form into one in-place update of r7, not the reference's scratch-register-then-later-permanent-update shape"}],"notes":["Recovered by hand-tracing games/gs1/asm/080cdbc0.s instruction-by-instruction (all PC-relative literal-pool targets resolved programmatically, not by hand, per CONTRIBUTING's caution against hand-counting offsets across alignment), then cross-checking every resolved call target, field offset, and pool constant against already-adopted exact sources under games/gs1/src/.","2026-08-31 retained-assembly proof: the complete candidate has equal branch topology and accounts for every call, argument, queue entry, field offset, control value, literal, and memory operation. The remaining stream is confined to GCC choosing an unsigned guard and individual stores where the reference uses the equivalent signed guard and stmia sequence at both bounded queue insertions, plus CSE-folding two battle+0x648 computations and the resulting 12-byte instruction/pool extent. Inline versus duplicated helper bodies, parameter types, bound spellings, pointer/index forms, and address-lifetime probes preserve these choices or regress; the allocator decoder finds no unique source repair. Relocation-normalized cross-edition verification proves all 230 core bytes identical across all six GS1 editions (nine relocations and 18 literal fields normalized). Structured assembly therefore remains authoritative under battle_scene_queue_compiler_instruction_selection_module.","This owner sits in the same battle-scene-transition subsystem as battle_owner_61/battle_owner_12/battle_owner_54/system_owner_8 (the immediate successor at 0x080cdd14) and camera/scene/configure.c -- not the family-matcher's move_forward.c guess.","Semantically this looks like a battle-scene-transition SETUP routine (BG2CNT configuration, a VRAM tile transfer via the shared IWRAM routine at 0x03000164, position/camera-anchor field writes, removing the Func_080cd4b4 per-frame callback, two guarded display-request-queue inserts differing only in a DISPCNT-shaped control word (0x7341 then 0x7541, differing by the BG1-enable bit), and an 8-iteration countdown call to Func_080b5048) -- a plausible counterpart to the already-drafted ResetSceneTransitionEffect (games/gs1/src/battle/effects/scene_transition/reset.c, address 0x080984c0, itself only a 7137-scored weak family-matcher alternative here) but not renamed to that effect pending stronger confirmation.","This candidate claims zero DONE bytes."]},"main:080ce4e8":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080ce4e8","status":"measured-draft","owner_bytes":884,"score":{"measured":"2026-08-31","candidate_bytes":888,"reference_bytes":884,"differing_halfwords":420,"wrong_instructions":362,"class":"missing-extra-code","topology":"equal","note":"First compiling owner-specific reconstruction. The drafting wave's aggregate m2c failed on void-pointer member-id reads and undersized stack records, then scored an unrelated 576-byte family template. Repairing the real draft recovers the complete conditional-branch topology and an extent within four bytes of the retained owner."},"repairs":["Recovered sp+0x30 and sp+0x3c as three-word position records, matching the three fields written/read around Func_08004cb4 and Func_080e3944.","Typed Func_080b5098 and recovered both state member-id reads as signed halfwords at state+0x24+2*member rather than invalid dereferences of void-pointer arithmetic.","Recovered the 512-entry particle pool at 0x02010000 as 28-byte records; the aggregate draft's typed pointer arithmetic incorrectly scaled each explicit +0x1c step by the aggregate size.","Replaced fictional calls into 0x080072f0/0x080072f8 with the established family semantics: word copies through 0x03001388, rectangle drawing through heap-cache callback 47, and magnitude calculation through 0x030001d8.","Used linker-resolved Value_000000a9 and Value_000000bb resource identifiers, preserving the reference's literal-pool loads rather than movs immediates."],"family":{"template":"games/gs1/src/battle/effects/member_orbit/run.c","evidence":"Same 0x03001eec work/canvas cursor, heap kinds 46/47, callback pair, scheduler callbacks, scanline table, member list, 28-byte particle records, projection helpers, and teardown. This owner is a distinct member-staggered 512-particle convergence effect, not a resized orbit source."},"bounded_verdict":{"result":"materially_advanced_not_exact","remaining":"The candidate is four bytes long and retains broad register/stack allocation differences after an exact conditional topology recovery. It is not eligible for integration or compiler classification. The next pass should reconcile the 76-byte candidate frame with the 72-byte reference frame and then re-audit the particle-loop temporaries.","done_bytes":0},"provenance":["games/gs1/asm/080ce4e8.s","out/gs1-en/waves/draft/packs/080ce4e8/m2c/080ce4e8.c","out/gs1-en/waves/draft/packs/080ce4e8/m2c/target.canonical.s","games/gs1/src/battle/effects/member_orbit/run.c","approved local compiler and ROM only"]},"main:080ceb54":{"schema_version":1,"namespace":"main","address":"0x080ceb54","status":"measured-draft","owner_bytes":1040,"score":{"measured":"2026-08-27","candidate_bytes":1052,"reference_bytes":1040,"differing_halfwords":489,"wrong_instructions":404,"class":"wrong","note":"First structural draft, built from a full instruction-level read-through of games/gs1/asm/080ceb54.s (cross-checked against out/family-transplants/main-080ceb54/m2c/target.canonical.s and m2c/080ceb54.c for literal-pool values only, not statement shape) rather than the naive symbol-retargeted transplant seed, which the task brief already confirmed differs by hundreds of halfwords for this owner. Two real structural fixes were found and applied during iteration: (1) `facing` must be read as `*(s32*)((u8*)heap_cache-108)`, not a fresh `*(s32*)0x03001E80` literal -- the reference reuses the same r2 that holds heap_cache (subs r2,#108) rather than a second literal-pool load, matching the shared-heap_cache-base idiom already documented on 080d82b0/080e01e4; (2) both `variant==0 ? 134 : 133`-shaped resource-id selections (at the outer==80 and outer==fp+71 trigger sites) must be written as explicit if/else, not a ternary -- the reference emits two literal `movs r0,#134`/`movs r0,#133` blocks behind a real branch, while a ternary let this compiler fold the two arms into a `134 - (bool)variant` arithmetic trick, which does not match. Fixing both dropped wrong_instructions from 449 to 404 and differing_halfwords from 499 to 489. The dominant remaining divergence (490-odd wrong instructions, nearly the whole candidate) is a single register-allocation phenomenon, not further source-shape bugs: this compiler spills `work` to the stack for its entire life instead of keeping it in a callee-saved high register (sl) the way the reference does from its very first use (mov sl,r1) onward. Every one of the dozens of M2C_FIELD(work,...) accesses throughout the function therefore compiles to an extra stack reload in the candidate, which cascades into which OTHER value (the spawn loop's hoisted 0xFF mask) claims sl instead, and from there into a long tail of matching-value-different-register/different-scheduling diffs identical in kind to the already-documented family residual (see 080d82b0.json's score.note: 'why the reference keeps the shared work pointer in r9 while this compiler's candidate keeps choosing a different register for it in places'). Tried and reverted: caching `Data_080ee090[loop_start+1] + member_count*20` in a named local instead of recomputing the expression fresh at both the loop-entry check and the loop-continue check (matching the reference's own repeated 5-instruction recomputation) -- this was a real fix (removed a spuriously wide-lived local) and is kept, but did not touch the work/sl spill. A reduced-body experiment (truncating the function immediately after the Func_080cef64 call) showed the compiler using r5/r6 for work/variant in that short a function instead of the high registers at all, confirming the spill is a whole-function register-pressure decision rather than something localized to one section, and is not something a partial rewrite of any one section can be expected to flip. Per CONTRIBUTING.md and the Cleanroom skill's stalled-last-mile guidance, this is recorded as the open residual rather than chased with hand register hints (prohibited) or open-ended permutation (not warranted at this distance from exact)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family score 8078/10000, the closest structural template available, but genuinely a different sub-effect: the template draws a fixed 4-sprite orbit per active member each frame through a heap-cache rectangle-blit pair (Func_080ed408/heap_cache[7]/heap_cache[8]) and a two-curve sine sweep chosen by state field 4. This owner never calls Func_080ed408 at all (it reads back whichever kind-46/47 allocator-cache slots a prior effect already populated, through Func_080cef64 -- see actual_sibling_evidence), uses only a single sine curve for the per-scanline table, and its per-member body is a persistent 1024-slot particle-burst pool (spawn loop seeded with Func_08004458 randoms, then a staggered per-member burst draw with a velocity-homing convergence step) driven by a second function parameter (`variant`, 0/1/else) that selects the copied palette id and indexes a 2-byte-per-variant table at 0x080ee090 for both the outer frame-loop length and the per-frame burst count. The naive symbol-retargeted transplant seed at out/family-transplants/main-080ceb54/080ceb54.c is the template's source verbatim (just renamed) and was not usable past supplying header/typedef/declaration scaffolding.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d59b0.json, 080d82b0.json, 080dc1ec.json and 080e01e4.json: the same *(void**)0x03001EEC/+4 work/draw_destination cursor-advance idiom (matching the already-adopted games/gs1/src/battle/effects/member_orbit/run.c), the same M2C_FIELD(work,...,0x7828) state-pointer field, member_count at state+0x14, the s16 member-id array starting at state+0x24 stepping by 2, and the same Func_080041d8(0x080DBB9D,0x480)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_08004278(0x080DBB9D)/Func_080cdbc0() bracketing shape. Uses Func_080cef64(flag, callback_pair) exactly as documented on games/gs1/src/battle/effects/fetch_rectangle_blitters.c and 080dc1ec.c/080e01e4.c (an unconditional two-word allocator-cache-slot copy, not a callback resolver); flag here is state->field4 directly (no XOR). callback_pair[0] is called as a real DrawRectangleFn indirect call through the r4 call_via trampoline slot (games/gs1/asm/080072e4.s), matching the already-derived Func_080072f4-is-not-a-real-function finding from 080dc1ec.json/080d82b0.json. The Func_080b5070(member_id)/2 result feeding a homing target compiles from plain `/2`, matching the already-derived sign-extension-bug finding from 080dc1ec.json/080d82b0.json (asrs/lsrs-by-31/adds is GCC's signed halving, not a hand bit-trick)."},"rejected_experiments":["Caching `M2C_FIELD(M2C_FIELD(work,void**,0x7828),s32*,20) * 20` in a named local reused at both the outer-loop entry check and the loop-continue check: this made the local artificially wide-lived across the whole outer loop where the reference recomputes the five-instruction expression fresh at each site. Reverted to two separate inline recomputations; this alone dropped wrong_instructions from 429 to 404 (folded into the current draft, not a pure revert).","Truncating the function body immediately after the Func_080cef64 call (early return) to see whether work claims sl in a much smaller function: it did not use sl at all in that short a body (r5/r6 sufficed), confirming the sl-vs-spill decision for work is a whole-function register-pressure computation, not a localized effect of any single early statement. Reverted, no source change kept from this probe."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080ceb54.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, games/gs1/src/battle/effects/fetch_rectangle_blitters.c, in-repository headers, and the approved compiler. out/family-transplants/main-080ceb54/m2c/target.canonical.s and m2c/080ceb54.c were used only to cross-check literal-pool constant values (resource ids 0x69/0xBB/0x8D/0x91, the 0x080ee090 table address, the 0xFFF/0x1FFE clamp constants), never for statement shape, per the task brief's warning that the naive transplant differs by hundreds of halfwords.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect taking (object, variant). Publishes object into the shared work block, copies a fixed resource (id 0x69) through Func_08005340, then copies a variant-selected palette/tile block (0xBB/0x8D/0x91) into VRAM through the generic word-copy trampoline (0x03001388) via Func_080072f0, then resolves a cached draw-callback pair via Func_080cef64 using state field 4 as the flag. Blanks a 1024-slot shared particle pool (28 bytes/slot, validity field -1) at 0x02010000, then for each active party member seeds that member's 128-slot sub-range with member position/handle plus three randomized velocity offsets. Registers two per-frame callbacks (0x080DBB9D, 0x080CD261) and runs `Data_080ee090[variant*2+1] + member_count*20` frames. Each frame rewrites the 160-entry per-scanline table at work+0x6980 from a single sine curve, then for every party member whose staggered window is open (gated by `Data_080ee090[variant*2]`, the per-frame burst count) draws and advances that member's active particle slots through the resolved callback, and once a per-slot delay threshold passes, nudges each particle's velocity toward the member's current position and freezes it (validity=-1) once the per-axis velocity delta clamps within +-0x1FFE of zero.","The two Func_080b50e8/Func_080f9010(134-or-133-by-variant) trigger sites are genuinely duplicated `if(variant==0){...134...}else{...133...}` blocks in the reference, not a computed selection -- see score.note. Anywhere else this owner selects between two small constants by variant, prefer the same explicit-branch shape over a ternary unless a --align check confirms otherwise.","The dominant open residual is register allocation, not source shape: this compiler spills the whole-function-lived `work` pointer to the stack instead of keeping it in sl throughout, unlike the reference and unlike this owner's own closest siblings' reported behavior. This reads as the same class of already-documented, non-source-shape-controllable residual flagged on 080d82b0.json/080dc1ec.json/080e01e4.json (register choice for a loop-invariant address, and independent-immediate-load scheduling order), just manifesting here as a full spill rather than merely a different high register -- plausibly because this owner's frame carries more simultaneously-live locals (a second function parameter, an extra loop-index table, a resolved callback pair) than any prior sibling. Per CONTRIBUTING.md, not chased with register hints or forced assignment; a future pass revisiting this whole family's register pressure together (rather than owner by owner) may be the more productive angle.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080ceff8":{"schema_version":1,"namespace":"main","address":"0x080ceff8","status":"measured-draft","owner_bytes":680,"score":{"measured":"2026-08-27","candidate_bytes":700,"reference_bytes":680,"differing_halfwords":289,"wrong_instructions":242,"class":"wrong","note":"Drafted from games/gs1/asm/080ceff8.s directly (matched_prefix=7 on the first attempt, confirming the shared prologue idiom with the assigned template member_orbit/run.c) plus out/family-transplants/main-080ceff8/m2c/{target.canonical.s,symbolized.s,080ceff8.c} for literal-pool symbolization and a naive m2c type-context draft. The naive m2c seed and the plain template-symbol-rename were not used verbatim; every field offset, branch, and call argument was re-derived from the retained bytes. Second pass: removed an unevidenced intermediate `scale` local that merged the mode==0/mode==1|2 branches' `<< 8` store into one shared statement -- inlining the full `(64-pos.x)<<8` / `(Func_080022ec(...)+64)<<8` expression separately in each branch (matching that the reference re-derives the 0x04000028 pool constant independently in each arm rather than through a shared merge point) dropped differing_halfwords 328->289, wrong_instructions 248->242, and matched_prefix 7->9, at the cost of candidate_bytes rising 692->700 (a smaller candidate is not itself evidence of a better match; the byte-for-byte score is what counts). Tried and measured, no effect either time: (1) an explicit `void **target_slot = (u8*)work+0x7828; *target_slot = object;` local for the initial `object` store instead of a fresh M2C_FIELD(work,...) expression, both before and after the scale fix -- byte-identical output in both cases, confirming this compiler's CSE already treats the two forms identically for this owner (the general family caution against materializing this pattern is about a different failure mode, not this one). (2) do-while vs for-loop syntax for the 48-frame outer loop -- byte-identical. (3) heap_cache[0]/cursor[1] indexing instead of *cursor++/*cursor for work/canvas -- regressed to differing_halfwords=329 and class=unemittable; reverted. (4) a goto-based fallthrough merge for the shared Func_080f9010(212) tail of the mode==2/mode==1 branches in the 0x77A8 setup, mirroring m2c's own block_11 label -- byte-identical to the plain if/else-if form; kept the plainer form.","residual":"The dominant remaining defect is a single, isolated register-allocation choice: the reference keeps the 48-frame loop counter in r7 (a low register, reusing the same r7 that briefly held work+0x7828's address at the very start, before that value's last use at the field-0x24 read preceding the loop) and tests it with a bare `cmp r7,#48; bne.n `. This compiler instead keeps the loop counter in a high register (r8) for this owner, which cannot be compared against an 8-bit immediate directly in Thumb, so the back edge costs three extra instructions (`movs r2,#1; add r8,r2; mov r3,r8` in place of a single `adds r7,#1`) and a different two-branch shape (`beq.n ; b.n ` in place of one `bne.n `), worth roughly 8 of the 20 extra candidate bytes. This is the same category of residual already recorded on sibling owners in this exact 0x03001eec family -- games/gs1/recon/en/dossiers.json#main:080dc1ec and 080d59b0.json both document this compiler choosing a different high register than the reference for a value that must stay live across the owner's whole body, confirmed there (and reconfirmed here) to be insensitive to declaration order, block scope, and loop-statement shape. Not pursued further per the project's ban on forcing register assignment or running an open-ended permutation search for this category of mismatch. The remaining ~12 bytes are the ordinary knock-on pool-offset churn that follows from this one upstream register choice cascading through the rest of the function's pc-relative loads."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; family-matcher score 8259/10000. The template is a real structural relative (same 0x03001eec work-block prologue idiom, same Func_080cd594/Func_08002f40/Func_08005340/Func_080ed408/Func_080041d8/Func_08002dd8/Func_080cdbc0 call shapes, same DrawRectangleFn-through-the-r4-trampoline idiom for its two heap-registered rectangle blitters), but not the same body: this owner's 680 bytes (vs the template's 1948) reflect a genuinely smaller sub-effect -- it takes a second `mode` argument the template does not have, reads object field 0x24 as a single scalar target id rather than a member-id array start, has no per-member iteration at all, and runs a fixed 48-frame loop instead of one sized from a party-member count. Every field offset, callee signature, and the Data_03001e50[kind]/DrawRectangle idiom were cross-checked against games/gs1/recon/en/main/080e7404.c (a fuller, independently-drafted member of the same family) rather than assumed from the template alone."},"rejected_experiments":["Explicit `void **target_slot` local for the work+0x7828 address instead of a fresh M2C_FIELD(work,...) expression at each use site: byte-identical candidate output both before and after the scale-inlining fix. This compiler's CSE already unifies the two forms for this owner; the general family caution against this pattern (documented on other owners in this session) did not manifest here.","do-while loop with a manual post-increment instead of a for-loop for the 48-frame outer loop: byte-identical output. Confirms (as already documented on 080dc1ec.json for a different loop in the same family) that this compiler's loop-shape codegen for a loop is insensitive to for-vs-do-while C spelling once the trip count is fixed.","heap_cache[0]/cursor[1] plain-index reads instead of *cursor++/*cursor for the initial work/canvas fetch: regressed differing_halfwords 328->329 and produced class=unemittable. Reverted to the *cursor++/*cursor form, which matches the template's own proven-exact idiom and reproduces the reference's ldmia-based prologue exactly (matched_prefix includes this whole sequence).","goto-based fallthrough merge (mirroring m2c's own block_11 label) for the shared Func_080f9010(212) tail of the mode==2/mode==1 branches: byte-identical to the plainer if/else-if/else form; kept the latter for readability."],"notes":["Recovered only from games/gs1/asm/080ceff8.s, the approved local EN ROM, the already-adopted exact sibling games/gs1/src/battle/effects/member_orbit/run.c, the measured-draft sibling games/gs1/recon/en/main/080e7404.c (and its dossier), the already-adopted games/gs1/src/effects/position/apply_alternate_step_and_y_offset.c (Func_080e3980's real name and signature, EffectPosition_ApplyAlternateStepAndYOffset), games/gs1/include/effect_step.h, games/gs1/include/global_cells.h, other in-repo Value_-convention sources, and the approved compiler. No other Golden Sun decompilation project or external symbol map was consulted.","This candidate claims zero DONE bytes.","Semantic summary: a second battle-presentation sub-effect sharing the 0x03001eec work block with member_orbit. Republishes its object argument at work+0x7828, loads up to three palettes (a third only when mode==2) into BG palette RAM, computes a BG2 affine scale and reference-point pair from a single object field via EffectPosition_ApplyAlternateStepAndYOffset (0x100/1.0 scale when mode==0, a smaller Value_000000cc scale with a Func_080022ec-derived reference point otherwise), registers two rectangle-blit routines (heap kinds 46 and 47) and a per-frame callback, sets the mode-dependent impact-mode field (0x77A8), then runs a fixed 48 frames: a target-id notify on frame 0 (Func_080d6888, argument set differing by mode), fixed sound/message cues on frames 8 and 24, and -- for frames 0-27 -- two rectangle draws per frame through the two staged draw callbacks, positioned and sized from three small lookup tables at 0x080EE096/0x080EE09C/0x080EE09F indexed by a frame/4-derived, collapsed-to-{0,1,2} radius index.","Field offset 0x24 (36) on the object at work+0x7828 is read as a plain scalar s16 throughout (not, as in the template, the start of a member-id array), consistent with this being a single-target rather than whole-party effect."]},"main:080cfef4":{"schema_version":1,"namespace":"main","address":"0x080cfef4","status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":1396,"score":{"measured":"2026-08-30","candidate_bytes":1396,"reference_bytes":1396,"differing_halfwords":38,"wrong_instructions":6,"class":"allocation","current_note":"Fresh scoring on 2026-08-30 proves an exact 1,396-byte extent and equal branch topology. Only six instructions remain: one independent rectangle-store/callback-literal scheduling pair and three uses of an equivalent r6/r7 loop-carrier choice. The streams resynchronize immediately after each cluster; every value, memory access, call, literal, and branch is otherwise identical.","note":"Family-transplant target from games/gs1/src/battle/effects/member_orbit/run.c (owner 080ce85c, family score 7734/10000), but not structurally identical -- rebuilt from games/gs1/asm/080cfef4.s and out/family-transplants/main-080cfef4/m2c/target.canonical.s directly rather than adapting the template's statements. Real differences from the template confirmed against the raw assembly: a different prologue callee (Func_080cdb24, not Func_080cd594) already declared elsewhere in the repo as `s32 Func_080cdb24(s32)`; an extra second resource load (Value_000000ac) copied straight into OBJ VRAM at 0x02010000 via a second Func_08005340 call before the rectangle-routine setup; Func_080ed408 called with (c,d)=(3,1)/(7,1) instead of the template's (3,2)/(15,2); a fixed 132-frame loop (not member_count*16+48) driving a single fixed party member (object+0x24, not an iterated array); direct BG2PC (0x04000052) writes instead of the template's BG2 reference-point register; and, from frame 88 onward, a cascade of glyph-style DrawRectangleFn calls (width/height pairs 57x98, 99x69, 128x91, 128x59, 122x29, 76x25) reading two seven-byte-stride tables at 0x080ee10c/0x080ee11a -- most plausibly a spinning number/counter reveal rather than the template's orbiting-member sprite loop. Both `_call_via_rN` trampoline calls (games/gs1/asm/080072e4.s) were modeled per the established convention: the 0x03001388/0x03000168 WordCopyFn casts use the r3 slot exactly as the adopted template does, and the eight DrawRectangleFn calls through rectangle[kind] use the r4 slot as a genuine function-pointer call -- matching the same r4-slot interpretation already recorded in games/gs1/recon/en/dossiers.json#main:080d59b0 for the identical Func_080072f4 address.","prior_note_2026_08_27":"First pass. Two evidence-grounded fixes found by reading the raw .s directly (not from the naive m2c/family-transplant seed, which m2c itself mis-scheduled in several places): (1) work->0x7784's stored value (0) is not a fresh literal at its point of use -- the reference materializes r2=0/movs r0,#0/mov sl,r2 immediately after storing `object` into work+0x7828 and before the Func_080cdb24 call, then reuses that same `sl` register for the field store roughly 40 instructions later. Introducing a `zero_val` local initialized at that exact point (matching the reference's early materialization) rather than writing a bare `0` literal at the field-store site dropped differing_halfwords 650->608 and wrong_instructions 572->546. (2) The scanline-table base pointer (`work+0x6980`) is computed by the reference immediately after the frame==65 check, before the amplitude range-check chain (frame<=31 / 471356 (closer to the 1396 target) and dropped wrong_instructions 546->534, though differing_halfwords rose slightly (608->642) from the resulting realignment -- the same 'small metric regression traded for real correctness' pattern documented on other siblings in this family, not a reason to revert.","residual":"Ran a systematic same-opcode/same-register scan over the full candidate-show --align output specifically to separate genuine value/algorithm bugs from register-choice noise: zero matches found where the same instruction and same register hold different immediates on the two sides. Every remaining `!` line is either a differing register letter (candidate keeps a persistent loop value in r9 where the reference uses fp, mirroring the exact fp/r9 residual already recorded in games/gs1/recon/en/dossiers.json#main:080d59b0 for this same family) or a differing stack offset cascading from the still-unresolved 16-byte (4-word) frame-size gap (candidate sub sp #60 vs reference's #76). Tried moving pos[3]/idx_a/idx_b/member_object between block scope and function scope: zero effect on the emitted frame size or instruction stream, confirming (as the sibling dossiers already record for this same 0x03001eec family) that this compiler's stack-slot assignment for this owner is not controlled by C89 declaration nesting. Not pursued into open-ended register-forcing per the hard ban on hand-tuning register assignment; recorded as the same known-open class of residual documented across this family rather than chased further."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; family score 7734/10000, the closest structural template available, but genuinely not the same sub-effect -- see score.note for the concrete behavioral differences confirmed from the raw assembly (different init callee, extra resource load, fixed single-member target, fixed 132-frame count, direct BG2PC writes, and the frame-88-onward glyph-reveal cascade absent from the template). The template's documented field-offset layout (work+0x7780/0x7784/0x7824/0x7828), M2C_FIELD idiom, DrawRectangleFn/WordCopyFn typedefs, and Func_080cd594/Func_08002f40/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 signatures all transferred directly and matched the target's own literal pool exactly."},"rejected_experiments":["Inverting the three `M2C_FIELD(...,4)==1` branches to `!=1` with swapped bodies, hypothesizing the reference's beq-to-label branch polarity reflected a swapped if/else in the real source: differing_halfwords only moved 608->607 (noise), confirming GCC canonicalizes both spellings identically here; reverted to the more natural `==1` form.","Declaring pos[3]/idx_a/idx_b/member_object at function scope instead of their innermost enclosing block: byte-identical output (candidate_bytes and every instruction unchanged), confirming this compiler's stack layout for this owner does not depend on C89 declaration nesting; kept the narrower block scoping for readability since it has no cost."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080cfef4.s), the m2c-assisted structural context at out/family-transplants/main-080cfef4/m2c/ (target.canonical.s, symbolized.s, m2c/080cfef4.c -- used only for structural orientation, not copied verbatim; several of its statement orderings and one argument mis-attribution were corrected by re-reading the raw assembly directly), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect keyed off the same *(void**)0x03001EEC work block as the member_orbit family. Loads two graphics resources (Value_000000ab as a palette+sprite pair, Value_000000ac copied straight into OBJ VRAM), sets BG2 affine scale and shear, opens two rectangle-blit routines (heap kinds 46/47), then runs a fixed 132-frame loop against one fixed party member (object+0x24). Each frame redraws a 160-entry per-scanline table (work+0x6980) from a sine sweep whose amplitude and offset change at several hardcoded frame boundaries (15/31, 32, 33, 47/63, 64, 65), and, once past frame 88, progressively reveals a run of glyph-style rectangles (increasing table offsets, six distinct width/height pairs) alongside a one-shot member-object field reset (frame 88) and a single field write (frame 120) -- most plausibly a spinning number or counter reveal effect.","Data_080ee10c/Data_080ee11a (two seven-byte-stride glyph-position tables at 0x080ee10c/0x080ee11a) and Data_03001e74 (an existing established `u8*` global, per games/gs1/recon/en/main/080ba978.c) are declared extern with no further semantic claim beyond what the raw offsets show.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted.","The earlier score.note and score.residual fields record the superseded 2026-08-27 draft. Fresh 2026-08-30 scoring has exact extent, equal branch topology, 38 differing halfwords, and only six wrong instructions.","The complete ordinary-C reconstruction remains the semantic artifact; byte-exact structured assembly remains authoritative under the proven battle-effect compiler-allocation classification."],"compiler_decision":{"tool":"candidate-show --allocator-order plus shipped GCC-axis probes","finding":"The allocator decoder reports no unique source edit. Removing the redundant rectangle temporary, naming the callback literal, and swapping the screen-coordinate declaration order all emit identical bytes. -fno-regmove, canonical scheduling/CSE removals, and the neutral no-schedule/no-CSE axes preserve the 38-halfword floor; -fno-schedule-insns2, -fno-cse-skip-blocks, -ffixed-r6/r7, and -fcall-used-r6 regress by hundreds of halfwords, while -fcall-used-r7 is invalid for this target. No register binding or scheduling barrier was used."},"cross_edition":{"measured":"2026-08-30","object_bytes":1396,"relocation_bytes":160,"literal_bytes":158,"relocation_normalized_core_bytes":1092,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true,"starts":{"ja":"0x080c6ef4","en":"0x080cfef4","de":"0x080d1cf4","es":"0x080d36f4","fr":"0x080d36f4","it":"0x080cfef4"}},"decision":"Retain the byte-exact structured assembly as a proven battle-effect compiler-allocation module. The complete named ordinary-C reconstruction accounts for all 1,396 owner bytes, which now count as DONE."},"main:080d0ad4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080d0ad4","status":"measured-draft","owner_bytes":1036,"score":{"measured":"2026-09-01","candidate_bytes":1032,"reference_bytes":1036,"differing_halfwords":424,"wrong_instructions":404,"class":"missing-extra-code","topology":"equal","note":"The drafting wave never measured this reconstruction: aggregate m2c stopped on concrete type/context errors and substituted an unrelated 576-byte shop template, producing the stale compiler_unemittable label. Repairing the false calls, reconstructing the shared global and local-work aggregates, and applying the established battle-effect cache/table conventions yields an equal-topology 1032-byte candidate with the reference's exact 120-byte frame for the complete 1036-byte owner."},"repairs":["Recovered the three resource identifiers as linker-resolved Value_00000079/73/76 symbols, the kind-46/kind-47 draw routines as Data_03001e50 cache entries, and the cel offsets as the named Data_080ede5c u16 table. These are the same conventions already proved across exact battle-effect siblings. Together they restore twelve of the sixteen missing bytes and reduce the fresh score from 510 to 424 differing halfwords and from 434 to 404 wrong instructions without changing topology or the exact 120-byte frame.","Recovered Func_080ed408 as a five-argument setup call and the 0x03001f08/0x03001f0c words as six-argument BattleEffectDrawFn callbacks. The former sp0 assignments were outgoing fifth arguments; the sp0/sp4 pairs before Func_080072f4/Func_080072f8 were outgoing width/height arguments to register-call veneers, not locals or direct functions. Modeling the real calls restores the outgoing stack area, grows the candidate from 980 to 1032 bytes, and reduces wrong instructions from 510 to 452.","Recovered the four contiguous stack records at sp+72, +84, +96, and +108 as one BattleEffectVectorWork aggregate. Declaration-order probes alone merely shifted independent arrays; the complete aggregate places all records exactly. Its final member is three words, matching the reference's 120-byte frame, while Func_080e396c receives the exact EffectPosition view of its first two words. The resulting candidate is 1020/1036 bytes with equal topology and 434 wrong instructions.","Recovered the missing second argument to Func_080e396c from the retained r1=sp+108 call setup and corroborated it against the adopted EffectPosition interface. The prior one-argument call plus a pointer fabricated beyond sp0 was semantically false. The owner now passes a real 8-byte EffectPosition and reads its x result. GCC overlays this short-lived output with later locals, so the candidate remains a 104-byte frame and the byte score moves to 980/1036, 499 differing halfwords, and 510 wrong instructions; the correction is retained because call truth outranks incidental score.","Recovered 0x03001eec as one three-word BattleEffectWorkGlobals aggregate and the facing word as aggregate-minus-108. The reference performs exactly this base-relative walk; replacing four unrelated absolute-global expressions improves differing halfwords 500 to 493 and wrong instructions 500 to 492 while preserving equal topology. The candidate shrinks because GCC now folds duplicate literal loads, exposing stack-object identity as the next residual rather than justifying restoration of the false global model.","Removed the unused generic m2c compatibility preamble from this owner. Only the field-access helper remains; the deletion is compile-neutral and keeps the semantic draft reviewable.","Recovered the three stack records at sp+0x48, sp+0x54, and sp+0x60 as three-word arrays. This resolves m2c's nonexistent sp64 name and preserves the two projected-coordinate words used by the particle seed.","Typed Func_080b5098 as returning void ** and recovered the member id as a signed halfword at state+0x24+2*member rather than dereferencing arithmetic on void *.","Recovered the sprite-cel lookup at 0x080ede5c as a u16 table indexed by the doubled cel value.","Replaced evidence-mined absolute aggregate placeholders with the actual shared battle-work cells at 0x03001eec/ef0/ef4, facing at 0x03001e80, callback cache at 0x03001f08, and the two hardware register writes. This improved the compiling draft from 996 bytes and 510 differing halfwords to 1020 bytes and 500 differing halfwords."],"family":{"template":"games/gs1/src/battle/effects/member_orbit/run.c","evidence":"The owner uses the same heap-cache cursor, work+0x7780/0x7784/0x7824/0x7828 fields, kind-46/kind-47 rectangle callbacks, scheduler bracket, member-id array, screen projection records, and call-via-register draw convention. Its body is distinct: a member-staggered three-point interpolation effect with a 24-step inner interpolation and a member_count*20+72 frame bound."},"bounded_verdict":{"result":"materially_advanced_not_exact","remaining":"The fresh candidate has equal conditional-branch topology, an exact 120-byte frame, exact offsets for all four addressed vector records, and the complete reference literal set, but remains four bytes short. The remaining extent gap is the reference heap-cache carrier's two extra prologue moves; spelling the proven cursor idiom directly regresses the wider allocation, so the next pass must decode that carrier choice rather than force a register or retain a locally worse spelling.","done_bytes":0},"provenance":["games/gs1/asm/080d0ad4.s","out/gs1-en/waves/draft/packs/080d0ad4/m2c/080d0ad4.c","out/gs1-en/waves/draft/packs/080d0ad4/m2c/target.canonical.s","games/gs1/src/battle/effects/member_orbit/run.c","approved local compiler and ROM only"]},"main:080d0ee0":{"schema_version":1,"namespace":"main","address":"0x080d0ee0","status":"mapped","measured":"2026-08-29","map":{"head":"0x080d0ee0","head_symbol":"Region_080d0ee0","head_file":"games/gs1/asm/080d0ee0.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #116 -- full r8-r11 save, 116-byte frame. Note: tagged with the call-graph-reconstructed comment rather than an explicit FunctionHead_ label, but its genuine prologue shape is the real entry -- no earlier region branches into this address.","true_epilogue":{"file":"games/gs1/asm/080d12a8.s","note":"Ends `... bl sub_08002dd8 (x2) / bl sub_080cdbc0 / add sp, #116 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. Exact mirror of the head's 116-byte frame and four-high-register save; same sub_08002dd8/sub_080cdbc0 cleanup idiom seen across the rest of this dossier batch. This is the sole real epilogue."},"span":{"start":"0x080d0ee0","end_exclusive":"0x080d1350","size_bytes":1136,"derivation":"end = start of next asm file games/gs1/asm/080d1350.s, immediately following 080d12a8.s which owns the epilogue. size = 0x080d1350 - 0x080d0ee0 = 0x470 = 1136."},"member_regions_in_order":[{"addr":"0x080d0ee0","symbol":"Region_080d0ee0","file":"games/gs1/asm/080d0ee0.s","role":"real prologue + setup, tail branches to sub_080d12a8 (no intervening fragment files -- the two regions are directly adjacent)"},{"addr":"0x080d12a8","symbol":"Fragment_080d12a8","file":"games/gs1/asm/080d12a8.s","role":"terminal fragment (header: '親関数の終端断片'), in-file literal pool, ending in the real, shared epilogue"}]},"domain_evidence":["080d12a8's own header comment explicitly identifies it as the parent function's terminal fragment ('親関数の終端断片') -- direct textual confirmation.","grep across the corpus for the literal '080d12a8' finds exactly one external reference, the tail branch inside games/gs1/asm/080d0ee0.s -- confirming a private two-member cluster.","This is a smaller sibling of the sub_08002dd8(x2)/sub_080cdbc0-cleanup family already confirmed in 080d765c, 080ec100, 080e15e8, and 080dd9c0/080ddde0's clusters -- six independent split functions in this ROM region all funnel through the same finalizer pair immediately before frame teardown, strong evidence this is a single shared per-call cleanup routine worth identifying by name before any of these are drafted to C."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080d0ee0.c --owner 080d0ee0 --size 1136","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited.","Head file uses the 'call-graph reconstructed, code+data mixed' comment style rather than an explicit FunctionHead_/Fragment_ label; classified as the true head from its genuine push/high-reg-save/sub-sp prologue and the absence of any external branch into it."],"reconstruction_dossier":{"measured":"2026-08-29","status":"C source drafted at games/gs1/recon/en/main/080d0ee0.c, structurally incomplete -- this block preserves every ground-truthed detail found before/while drafting so it survives a session boundary.","cross_file_branch_resolution":{"method":"arm-none-eabi-objdump -D -b binary -m arm --adjust-vma=0x08000000 -M force-thumb roms/gs1-en.gba --start-address= --stop-address=, run separately over 0x080d0ee0..0x080d1350 and cross-referenced by absolute address.","finding":"b sub_080d1016 / b sub_080d105c / b sub_080d12d2 / b sub_080d12c8 are NOT external calls or a re-entrant/coroutine state machine -- every target address lands on an ordinary mid-block instruction already present in the *other* file's byte stream (no distinct .L_ label was ever emitted for them because, within their own file, they are reached only by fallthrough, and only the opposite file needed a global-looking branch target for its cross-region jump). Confirmed exact matches:","targets":[{"addr":"0x080d1016","instr":"ldr r0, [sp, #68]","location":"games/gs1/asm/080d0ee0.s, immediately after the 3-member init loop stores str r3,[sp,#68] (r3=0 leftover) -- this is the top of the outer 60-frame loop's frame<=47 gate."},{"addr":"0x080d105c","instr":"ldr r4, [sp, #68]","location":"games/gs1/asm/080d0ee0.s, immediately after the .L_080d104a camera-shake block's sp56/sp24/sp20/sp16 zero-init -- this is the phase do-while's frame>=idx_b gate re-check."},{"addr":"0x080d12c8","instr":"ldr r3, [sp, #76]","location":"games/gs1/asm/080d12a8.s (fragment), right after the Func_080d6888 call -- entry point skipped over when the frame==60 flush path takes the extra Func_080b50e8(134) branch."},{"addr":"0x080d12d2","instr":"ldr r0, [sp, #24]","location":"games/gs1/asm/080d12a8.s (fragment), the phase-index increment block (sp24+=10, sp20+=28, sp16+=12, sp56+=1) shared by both the frame; Func_08009140()-family finalize gate; frame++; if(frame==60) break; }","camera_shake_frame_le_47":{"target":"*(s16*)(0x03001e80 + 54) (facing-relative shake cell, base = *(u32*)(0x03001eec-108) per the frame ledger's sp48 slot -- NOT the literal 0x03001e80 I hard-coded in the current draft; the base is *(s32*)(0x03001eec-108), read fresh each pass through the pointer stored at sp48, then a fixed +54 halfword field on it)","magnitude":"128 if frame<=39, else (192<<2) - (frame<<4) i.e. 768 - frame*16","sign":"if M2C_FIELD(work-pointed target, s32*, 4) != 0 then += magnitude else -= magnitude -- the branch reads target from work+0x7828 dereferenced fresh (mov r8 cached &work[0x7828], reloaded via `mov r2,r8; ldr r3,[r2,#0]`), not from a stale local."},"finalize_gate":{"condition":"frame == idx_b(sp16) + phase(sp56) + 10, checked once per phase iteration right after the accumulate step (member_ptr->0 += member_ptr->12; ->4 += ->16; ->8 += ->20)","on_true":["member_size->52 = 128<<10; ->48 = 128<<12; ->40 = 160<<11; ->72 = 0x0000ab85 (ground-truthed pool word at 0x080d12a0); *(u8*)(member_size+90) = 0","call Func_08009140()","if member_size->8 >= 0: Func_08009150(member_size, member_size->8 + (160<<14), member_size->16, 0)","else: Func_08009150(member_size, member_size->8 + 0xffd80000 /* == -(160<<14), ground-truthed pool word at 0x080d12a4 as raw s32 */, member_size->16, 0)","if phase(sp56)==2: Func_080b50e8(134); goto fragment@0x080d12c8 (skips the fragment's Func_080f9010(134)+Func_080d6888 block, lands straight on the phase-increment code)","else: fall through into fragment@0x080d12a8 normally (Func_080f9010(134); Func_080d6888(member_id,7,5,0,8); work[0x77a8]=4; then phase-increment)"],"on_false":"branch to fragment@0x080d12d2 (the shared phase-increment block) directly, skipping the whole finalize dance."}},"phase_do_while":{"shape":"phase(sp56)=0; idx_a(sp24)=0; idx_b(sp16)=0; idx_c(sp20)=work+0x7080; do { if (frame(sp68) >= idx_b) { <10x16 draw block>; } idx_a+=10; idx_c+=28; idx_b+=12; phase+=1; } while (phase != 3);","gate_false_path":"still executes the idx_a/idx_c/idx_b/phase increment (fragment@0x080d12d2) and the phase!=3 re-test, purely skipping the heavy draw+finalize work for this pass."},"ten_by_sixteen_draw_block":{"outer_j_0_to_9":["Func_080049ac(); Func_080051d8(facing, facing+12); Func_08004cb4(idx_c) -- idx_c is sp20's current trail-struct pointer, reloaded from sp40 each pass","sp36(clamp target) = min(idx_a<<12, 128<<5); r7-triple (sp80/84/88) = {sp36,sp36,sp36}; Func_08004cf0(&r7-triple)","Func_08004c6c(j * 0x0000199a) -- pool word ground-truthed at 0x080d1290","Func_08004c1c(128<<7)","Func_08004c6c(((j&1)*3) << 2 ... ) applied as an index into Data table base 0x080ee140 (pool word at 0x080d1294), i.e. table = 0x080ee140 + ((j&1)*3)*4, passed as src to Func_080e3944(table_entry, &r9-pair)","sp44(max_val) = max(sp44, Func_080e3944's returned/blended value) -- tracked via cmp+bge, NOT clamped to >=0 as the current draft wrongly does; it is a plain running max across all 10 j and both phases-so-far","r9-pair[0] >>= 1; particle = (0x02010000 base)+idx_a*28; particle->12 = r9pair[0]+r6pair[0]; particle->16 = r9pair[1]+r6pair[1]; then immediately OVERWRITTEN again: particle->12 = r6pair[0]; particle->16 = r6pair[1] (both stores are literal in the reference -- transcribe both, do not collapse; this looks like the reference keeps a dead sum computation, likely the true source recomputes rather than folds)","Func_08004a5c(); idx_a++ (mapped from candidate's `particle_index++` -- the running index used both for the trail pointer above and the second 0x080d116a loop below share this same idx_a counter, it is NOT reset between them)"],"second_loop_gate":"only entered if sp44(max_val) <= 0x00061a7f (pool word ground-truthed at 0x080d1298); otherwise skip straight to the accumulate+finalize-gate step.","second_loop_0x080d116a_outer_m_0_to_9":["sp32 = idx_a (saved BEFORE this loop, i.e. the value idx_a reached after the 10x j-loop above, held constant for all m)","sp28 = (idx_b_reg + (idx_b_reg>>31)) >> 1 -- idx_b_reg here is r8, the clamped particle-count register computed earlier from (sp16 diff)>>2 + 2, clamped to <=10 (see 0x080d1074..0x080d1082 in games/gs1/asm/080d0ee0.s) -- i.e. sp28 = round-toward-zero-half of r8","r9(persistent reg, reused) = r8<<1","for m in 0..9: idx = sp32+m; r7 = 0x02010000-base particle ptr at (idx*7)*4 = idx*28; k_source = Func_080022fc(m,10) result + sp32, r6 = 0x02010000-base particle ptr at (that)*28","for k in 0..15 (register-only counter, no stack slot): interp12 = r7->12 + round_to_zero_div16((r6->12-r7->12)*k); interp16 = r7->16 + round_to_zero_div16((r6->16-r7->16)*k); src = extra_target + Data_080ede48[(r9-2)>>1 halfword index]; x = interp12 - sp28; y = interp16 - r8; draw_rectangle_fn(draw_destination, src, x, y, /*w=*/r8, /*h=*/r9) via the sub_080072f4 (_call_via_r4) trampoline, draw_rectangle_fn reloaded from sp60 immediately before every call"]},"fragment_per_phase_and_flush":{"file":"games/gs1/asm/080d12a8.s","normal_entry_0x080d12a8":["Func_080f9010(134)","Func_080d6888((s16)M2C_FIELD(work,...,36), 7, 5, 0, 8) -- arg order confirmed id,b,c,d,e = member_id,7,5,0,8 from the stacked arg5=8 store before the call","work[0x77a8] = 4"],"shared_tail_0x080d12d2_phase_increment":["sp24(idx_a family for the OUTER frame's next phase, distinct slot reuse from the inner idx_a discussed above -- same stack slot #24, reused across the do-while's own scope) += 10","sp20(idx_c) += 28","sp16(idx_b) += 12","sp56(phase) += 1","if phase==3: goto flush (0x080d12f0); else: goto games/gs1/asm/080d0ee0.s @0x080d105c (phase do-while gate re-check)"],"flush_0x080d12f0_on_phase_eq_3":["Func_080e155c(8,8)","Func_080cd52c()","work[0x7824] = 1","Func_080030f8(1)","sp68(frame) += 1; if frame==60: goto epilogue setup (0x080d1318); else: goto games/gs1/asm/080d0ee0.s @0x080d1016 (outer frame<=47 gate re-check)"],"epilogue_setup_0x080d1318":["Func_08004278((void*)0x080CD261)","Func_08002dd8(47)","Func_08002dd8(46)","return Func_080cdbc0()"]},"pool_table_ground_truth":{"method":"objdump -s -j .data -b binary --adjust-vma=0x08000000 roms/gs1-en.gba over 0x080d126c..0x080d1350, values read little-endian directly from ROM bytes, cross-checked against each pc-relative ldr's own '@ (0x...)' objdump annotation.","entries":[{"addr":"0x080d126c","value":"0x03001eec","use":"heap_cache base (r6, loaded once at entry)"},{"addr":"0x080d1270","value":"0x00007828","use":"work-struct offset for the object-pointer field"},{"addr":"0x080d1274","value":"0x00000079","use":"arg to first Func_08002f40 call (121 decimal)"},{"addr":"0x080d1278","value":"0x03001388","use":"WordCopyFn copier passed to Func_080072f0"},{"addr":"0x080d127c","value":"0x00000073","use":"arg to second Func_08002f40 call (115 decimal)"},{"addr":"0x080d1280","value":"0x00007784","use":"work-struct offset (0x7784 field, set to 75)"},{"addr":"0x080d1284","value":"0x080cd261","use":"callback function pointer passed to Func_080041d8/Func_08004278"},{"addr":"0x080d1288","value":"0x03001e80","use":"RESOLVED (objdump re-check at 0x080d101c..0x080d1048): r3 = 0x03001e80 (this pool word IS the address, loaded once per frame<=47 pass); r1 = *(u32*)0x03001e80 (one dereference, a fixed global cell holding the real shake-struct pointer, unrelated to sp48/facing); the +54 halfword field is then read/written on r1, not on 0x03001e80 directly. Independent of the sp48 (0x03001eec-108) facing value -- two separate globals, both real."},{"addr":"0x080d128c","value":"0x02010000","use":"fixed EWRAM particle-array base (both draw loops)"},{"addr":"0x080d1290","value":"0x0000199a","use":"multiplier constant in Func_08004c6c(j*0x199a)"},{"addr":"0x080d1294","value":"0x080ee140","use":"2x3-word(?) table base indexed by (j&1)*3, src arg to Func_080e3944"},{"addr":"0x080d1298","value":"0x00061a7f","use":"max_val gate threshold (400767 decimal) before the second (0x080d116a) draw loop runs"},{"addr":"0x080d129c","value":"0x080ede48","use":"Data_080ede48[] halfword table, same symbol already extern'd in 080d82b0.c/080e7404.c"},{"addr":"0x080d12a0","value":"0x0000ab85","use":"member_size->72 constant in the finalize block"},{"addr":"0x080d12a4","value":"0xffd80000","use":"negative branch's offset added to member_size->8 in Func_08009150's arg1 (== -(160<<14) exactly)"},{"addr":"0x080d1340","value":"0x00007828","use":"fragment's own copy of the work-offset constant (duplicate pool entry, same as 0x080d1270)"},{"addr":"0x080d1344","value":"0x000077a8","use":"work-struct offset set to 4 in the fragment's normal-entry block"},{"addr":"0x080d1348","value":"0x00007824","use":"work-struct offset set to 1 in the flush block"},{"addr":"0x080d134c","value":"0x080cd261","use":"fragment's own copy of the callback pointer (duplicate of 0x080d1284)"}]},"open_items":["the double-store 'particle->12/->16 computed sum then immediately overwritten by the plain r6-pair value' in the 10x j-loop is transcribed literally above from the .s; worth one targeted objdump re-check in case it is actually two DIFFERENT destination registers (typo risk) before spending permute cycles on it.","member_ptr vs member_size two-call pattern (Func_080b5098 called once on object->8 for member_ptr/draw-related regs r10/r6, once on (s16)work[0x7828]->36 for member_size/r11) should be double-checked against the 080d82b0.c sibling's identical two-call shape for exact arg order before locking field names.","current games/gs1/recon/en/main/080d0ee0.c is a partial skeleton only (outer/phase loop shape + 3-member init + header idiom); it is missing the 10x16 draw block, the finalize block, and the fragment's per-phase/flush logic captured above -- next session should fill directly from this dossier rather than re-deriving from the .s files."]}},"main:080d1350":{"status":"measured-draft","span_bytes":964,"edition":{"role":"derived-candidate","edition":"en","base_owner":null,"base_edition":"ja","rebase_status":"correspondence-needed"},"boundary":{"start":"0x080d1350","end":"0x080d1714","evidence":"games/gs1/asm/080d1350.s contains one global owner and assembles to 0x3c4 bytes, including its 16-word literal pool and alignment; the next assembly owner begins at 0x080d1714. The complete span lies inside the audited 0x080d1350-0x080d4ce8 Thumb interval; that larger generated target is a contiguous ranked scope containing later owners, not this function boundary."},"score":{"measured":"2026-08-20","candidate_bytes":940,"reference_bytes":964,"candidate_instructions":404,"reference_instructions":415,"wrong_instructions":300,"differing_halfwords":418,"matched_prefix_instructions":7,"class":"wrong","last_objdiff_structural_percent":84.91204,"note":"Current candidate-show --align measurement with approved routed flags. The last independent objdiff measurement was 84.91204% before the final interrupted edits; it is retained as historical evidence, not claimed for this source revision."},"shape":{"reference_calls":34,"reference_pool_words":16,"symbolized_pool_references":21,"jump_table":false,"frame_bytes_reference":64,"frame_bytes_candidate":64,"moving_points":8,"trail_points_per_moving_point":10,"interpolation_steps_per_segment":12,"outer_frames":128},"expressed":["complete entry, runtime-cell walk, active-argument binding, graphics and palette setup, draw-callback capture, and shared teardown","all eight moving-point initializers, including source and target coordinates, randomized horizontal displacement, twelve-frame step calculations, and staggered start frames","the complete 128-frame loop, palette progression, frame-96 sound gate, delayed-point gate, projection, screen bounds, and per-frame submission","all ten trail vertices per active point, alternating scale table, sine and cosine placement, twelve interpolated draws for each of ten trail segments, and the evidence-backed 28-byte trail stride","ground impact, reflected and halved motion, impact state, sound, target-result updates, and all three coordinate integrations","all 34 reference call sites and every control-flow path through the return; no jump table or omitted assembly region"],"unexpressed":[{"op":"source-shape repair","count":"300 instructions","where":"the complete behavior is represented, but normalized comparison still differs in declaration lifetimes, register allocation, expression boundaries, loop induction texture, and call-argument scheduling"},{"op":"size, frame, and pool placement parity","count":"24 bytes","where":"the candidate is shorter than the reference despite matching its 64-byte frame, shifting later branches and the final literal pool"}],"verified_against_reference":["owner boundary 0x080d1350-0x080d1714","reference byte count 964, including the complete 16-word literal pool","all 34 static call sites","21 symbolized PC-relative references and no jump table","complete eight-point, ten-vertex, twelve-step, 128-frame control structure"],"blocked_by":"The Luna pass was stopped below the 90% Terra handoff threshold; resume this same owner with Luna and remeasure structural similarity before any tier handoff.","rejected":[],"notes":["The complete reference assembly and literal pool were read before reconstructing the source.","Runtime structures use only offsets and widths supported by this owner and related approved local evidence; unresolved fields and address-named callees remain deliberately generic.","Linked differing_halfwords remains the adoption measure. This draft is coherent, but it is neither exact nor adoptable."],"pool_classification_evidence":{"measured":"2026-08-29","verdict":"REFUTED","evidence":"substantial missing/extra instruction content; class missing-extra-code, wrong_instructions=300","note":"Not pool-class: genuine instruction differences present. The 08090488 dossier note claiming this owner shares its grounds is corrected by this verdict."}},"main:080d2464":{"schema_version":1,"namespace":"main","address":"0x080d2464","status":"measured-draft","owner_bytes":2356,"candidate_bytes":2328,"differing_halfwords":1113,"wrong_instructions":870,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-31: cleared both call-via idiom lints by reconstructing the retained callback channels. The palette-copy target 0x03001388 is loaded once as a typed three-argument BattleEffectCopyFn and used for the two r6/Func_080072fc copy calls. The six-argument draw calls now use the work-cache function words already held in sp28/sp2C: the retained assembly selects sp2C once through r4 and sp28 four times through r4/r6. The existing Func_080072f0(..., 0x03001388) site was already correctly modeled because its fourth argument supplies the r3 target and remains unchanged. The corrected draft grows 2296 to 2328 of 2356 bytes, reducing the missing-code gap from 60 to 28 bytes; differing halfwords improve 1141 to 1113 and wrong instructions improve 888 to 870. GCC now exposes a 60-byte candidate frame versus the reference's 72-byte frame as downstream structural debt, not a reason to restore false direct veneer calls. Fresh wave routing reports verdict=scored, class=structural_topology, and zero lint findings for all r3/r4/r6 requirements.","2026-08-31: corrected the 0x080ee19a sprite-offset table from s8 to u8 after the fresh router identified candidate ldrsb versus reference ldrb. The source correction is emission-neutral at 2328/1113/870 because later arithmetic currently absorbs the extension difference, but candidate-show no longer contains an ldrsb fingerprint.","2026-08-30: promoted the fourth-largest remaining no-candidate main-ROM owner after repairing its aggregate-aware m2c draft. A fresh canonical compile produces 2296 bytes for the 2356-byte reference; topology differs and 1141 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","Mechanical repairs resolved the neighboring 0x03001e80/0x03001eec work cells, dynamic signed-halfword member IDs, and typed u8/u16/s8 sprite tables. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The function is a large battle presentation with 512-slot and 24-slot particle groups, two draw channels, palette loading, multiple actor action phases, and a long frame-driven sprite sequence. A permanent name is deferred until caller and dispatch evidence identifies its role."]},"main:080d33c0":{"address":"0x080d33c0","span_bytes":1172,"status":"measured-draft","score":{"measured":"2026-08-31","candidate_bytes":1184,"reference_bytes":1172,"differing_halfwords":503,"wrong_instructions":451,"topology":"equal","class":"missing-extra-code"},"semantic_evidence":["Recovered from games/gs1/asm/080d33c0.s through the aggregate-assisted m2c workbench, then repaired against the established 0x03001eec battle-work family.","The shared cache is modeled with the family-standard cursor advance for work and canvas; kinds 46 and 47 are retained as the two DrawRectangleFn callbacks rather than false direct calls to the r4 trampoline.","Value_000000cd preserves the reference literal-pool resource load, and the 0x02010000 activity bytes, thirty 28-byte motion records, party-member records, frame loop, steering, impact dispatch, drawing, and cleanup are all represented.","The repaired source compiles with canonical GCC 2.96 and has equal branch topology; the aggregate-generated seed did not compile as a standalone candidate before these type and context repairs."],"verdict":"Materially advanced from a failed aggregate-m2c seed to a compiling, semantically coherent 1184-byte candidate. It is not byte exact and claims zero DONE bytes. The broad 503-halfword residual begins with work/object-slot allocation and persists through register and statement scheduling; exact adoption requires blockwise assembly comparison and fresh differing_halfwords=0.","rejected_experiments":["Using scalar callback values and direct Func_080072f4 calls produced a 1164-byte candidate at 547 differing halfwords but modeled the trampoline incorrectly and retained a 28-byte frame instead of the reference's 36-byte frame.","Adding the member_orbit sibling's status bindings, second-callback temporary, and rectangle_slot alias regressed the corrected baseline from 503 to 545 differing halfwords and 1184 to 1196 bytes; reverted."]},"main:080d3854":{"schema_version":1,"namespace":"main","address":"0x080d3854","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":1068,"score":{"measured":"2026-08-27","candidate_bytes":1048,"reference_bytes":1068,"differing_halfwords":458,"wrong_instructions":402,"class":"wrong","note":"First pass, drafted directly from games/gs1/asm/080d3854.s (objdump-resolved with arm-none-eabi-as/objcopy/objdump to get literal-pool target addresses) and the family's m2c-assisted transplant workspace's symbolized.s/080d3854.c, cross-checked line-by-line against the raw disassembly rather than trusted verbatim. The naive family-transplant seed (template.c with the symbol renamed) was NOT usable directly: this owner (1068 bytes) is a genuinely different sub-effect from the 724-byte template (080ce85c/member_orbit), sharing only the 0x03001eec work-block prologue idiom, the heap_cache[7]/heap_cache[8] rectangle-callback pair, and the Func_080ed408/Func_080041d8/Func_08002dd8/Func_080cdbc0 call shapes. Confirmed structural differences from the template: Func_080cd594(1) not (0); palette id from a literal-pool Value_000000ce (0xCE) not Value_000000af; the second Func_080ed408 call's size arg is 7 not 15; only one Func_080041d8 registration (0x080CD261) instead of two; BLDALPHA (0x04000052) alpha-blend fade-in/out during frames 0-16 and 64-79 instead of the template's BG2 affine 160-scanline table; a 16-entry/28-byte-stride randomized particle table seeded at work+0x7080 before the loop; a periodic canvas-clear every 8th frame in {16,24,...,64} via an indirect call through the r6 __call_via_rN trampoline slot (games/gs1/asm/080072e4.s) to a runtime pointer at 0x03000168; a conditional block (gated on a 3-byte-per-entry lookup table at 0x080ee1ca indexed by the object's own field 24) that draws three fixed 40x32 sprites through rectangle[0] plus up to four active particle-table entries through rectangle_slot[i & 1] with width/height/sprite-offset looked up from 0x080edeca/0x080edebe/0x080eded0; and a per-member event loop that checks frame against seven thresholds 8 frames apart (member_offset+16,+24,...,+64, member_offset+=3 per member) rather than the template's single frame==member*16+32 check, calling Func_080d6888(member_id,7,5,member,4) then the template-absent Func_080b5088(member_id,6). Verified the Func_080022fc(frame/2,3) call site reproduces the family's known sign-extension idiom (plain C `/2`, no manual (u32) bit-trick) directly from the reference's asrs/lsrs-by-31/adds triplet, matching the fix already established on 080dc1ec/080d82b0/080d59b0. The residual is dominated by a single root cause, not scattered bugs: this compiler puts `work` in a hard callee-saved register (fp initially, r9 after moving `frame`'s initialization earlier and switching the outer loop from `for` to `while` -- a source-shape change that measurably helped, 472->458 differing_halfwords) instead of reference's scheme of never hard-registering `work` (always reloaded from its sp+40 stack slot, confirmed by grepping every `ldr r?, [sp, #40]` site in the reference disassembly, even deep inside the triply-nested particle-draw loop) and always keeping `frame` in fp for the whole function. Bisected this by wrapping first the per-member event loop and then the particle-table draw block in `#if 0` and re-measuring: removing the member loop alone flips `work` from fp to r9 (still wrong, just a different hard register); removing the particle block alone leaves `work` on fp; neither isolates a single offending statement, confirming this is a whole-function global-register-allocation-priority effect, not a local one. This is the exact same open, cross-family, evidence-exhausted residual documented at length in games/gs1/recon/en/dossiers.json#main:080dc1ec (fifth pass), 080d59b0.json (fifth pass), and especially 080e01e4.json (fourth pass, note (b)) for this same 0x03001eec work-block family -- those three dossiers record roughly a dozen combined targeted attempts (declaration order, block scoping, identifier renaming away from the ARM register mnemonic, accumulator-shape variants, loop-shape variants) that had zero or negative effect on which persistent local lands in which callee-saved register. Applied the two cheap, already-established levers from that precedent here too: merged the particle-draw loop's counter identity into the already block-scoped `i` (mirroring 080e01e4's successful n->i merge) -- zero measured effect, consistent with that finding generalizing; and moved `frame = 0` earlier plus a for->while conversion -- this one *did* help (472->458), unlike the family's other declaration-order experiments, but did not resolve the underlying register-role swap (work still ends up hard-registered instead of stack-spilled). Not pursued further per the ban on forcing register assignment and per this family's own established evidence that further source-shape search here has consistently zero or negative expected value."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family-matcher's assigned template (score 8074/10000) is a genuine structural relative -- same 0x03001eec/heap_cache[7]/heap_cache[8]/Func_080ed408/Func_080041d8/Func_08002dd8/Func_080cdbc0 shapes -- but not a size-for-size match (724 vs 1068 bytes): this owner is a distinct battle-presentation sub-effect (alpha-blend fade plus a seeded particle table) rather than the template's BG2-affine member-orbit effect. Used only for the shared prologue idiom, the M2C_FIELD/DrawRectangleFn/WordCopyFn conventions, and the Value_0000char/absolute-symbol idiom for Func_08002f40's resource id; every frame-loop body statement was drafted from this owner's own retained assembly (games/gs1/asm/080d3854.s), not copied from the template. Also cross-checked against the family's other measured-draft siblings (080d59b0, 080d82b0, 080dc1ec, 080e01e4, 080e7404, all recovered from the same work-block subsystem this session) for established callee prototypes (Func_080b50e8, Func_080022fc, Func_080e155c, Func_080cd52c, Func_08004458, Func_080f9010) and for direct precedent on the fp/r9/sl register-allocation residual described in score.note."},"rejected_experiments":["Wrapped the per-member event loop (frame vs member_offset+16..+64 thresholds) in `#if 0` to bisect the work/fp register issue: flips `work` from fp to r9 (a different wrong hard register, not the reference's stack-spill scheme), confirming the member loop's presence is one input to the allocator's decision but not the fixable root cause.","Wrapped the particle-table draw block (the object-field-24-gated loop drawing three fixed sprites plus up to four active particles) in `#if 0`: `work` stays on fp regardless, confirming this block is not the deciding factor either.","Merged the particle-draw inner loop's counter identity from a separately-declared `k` into the already block-scoped `i` (mirroring games/gs1/recon/en/dossiers.json#main:080e01e4's successful n->i coalescing fix for this same family): zero measured effect here (differing_halfwords unchanged at 458), unlike that sibling's case -- the identifier-merge lever is shape-dependent, not a general fix.","Block-scoping the two short-lived loop counters (the initial particle-table seed loop's `i`/`entry`, and the per-frame 7-threshold canvas-clear check's `i`) into their own nested blocks instead of function-top-level declarations: zero measured effect (differing_halfwords unchanged at 472, before the frame-init fix below), consistent with 080dc1ec.json and 080e01e4.json's own findings that declaration scope alone does not move this compiler's register choice."],"notes":["Recovered only from games/gs1/asm/080d3854.s (read in full, plus objdump-resolved via a local arm-none-eabi-as/objcopy/objdump round-trip to compute literal-pool target addresses for every pc-relative load), the family's transplant workspace at out/family-transplants/main-080d3854/ (m2c/target.canonical.s, m2c/symbolized.s, and the m2c-assisted 080d3854.c draft, used only as a structural cross-check, never copied verbatim), the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the approved local EN ROM, and the approved compiler. No other Golden Sun decompilation project, symbol map, or pseudocode dump was consulted.","2026-08-31 retained-assembly proof: the complete candidate has equal branch topology and accounts for every reference call, argument, trampoline, callback, blend write, particle/member loop, literal, table lookup, field access, and memory operation. The residual is confined to GCC hard-registering work and spilling the 80-frame counter with a 52-byte frame while the reference keeps frame in fp and reloads work from its stack home, plus the resulting 20-byte instruction/pool extent and register/offset cascade. The allocator decoder finds no unique source repair; whole-block bisection, counter identity, scope, loop-shape, declaration, family-transfer, compiler-family, and scheduling probes preserve the residual or regress. Relocation-normalized cross-edition verification proves all 820 core bytes identical across all six GS1 editions (33 relocations and 29 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect that alpha-blend-fades in and back out (BLDALPHA at 0x04000052) over an 80-frame run. Seeds a 16-entry randomized particle table at work+0x7080, registers a single finish callback, then per frame: computes a sine-derived 'wave' offset, occasionally clears a canvas region via an indirect call through a runtime function pointer at 0x03000168, updates the alpha-blend register during the fade edges, and -- when the object's mode-select field chooses a non-zero table row -- draws three fixed sprites plus up to four active entries from the particle table at positions derived from sine/cosine of a per-particle-group angle. Independently, whenever frame crosses one of seven per-member thresholds it cues two member-specific presentation calls (Func_080d6888/Func_080b5088).","The dominant open residual is a whole-function register-allocation-priority question (which persistent local this compiler's allocator puts in fp vs r9 vs stack) that is already documented at length as evidence-exhausted for this exact 0x03001eec work-block family across three other siblings (080dc1ec.json, 080d59b0.json, 080e01e4.json); this dossier's score.note records this owner's own bisection evidence and the two established levers re-tried here (one helped modestly, one had zero effect, matching the family's mixed-result pattern for this class of issue)."]},"main:080d3c80":{"schema_version":1,"namespace":"main","address":"0x080d3c80","status":"measured-draft","owner_bytes":1132,"score":{"measured":"2026-08-27","candidate_bytes":1100,"reference_bytes":1132,"differing_halfwords":524,"wrong_instructions":469,"class":"wrong","note":"First structural draft, not a permutation search. The family matcher's assigned template (main:08099160... no -- main:080ce85c, member_orbit/run.c, score 7675/10000) shares only the 0x03001eec work-block prologue/teardown shape with this owner: no palette/tile upload, no Func_080ed408, no sine/cosine orbit math. Read games/gs1/asm/080d3c80.s and out/family-transplants/main-080d3c80/m2c/target.canonical.s (m2c-assisted structural decompile) directly instead of adapting the template. The real callee set and constants match the already-recovered 0x03001eec subsystem cluster (080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c): Func_08004458() as the RNG (including several discarded-return-value calls, matching the established idiom in 080b88d0.c/080d59b0.c), Func_080cef64(flag, out_pair) filling a DrawRectangleFn[2] (matching 080e01e4.c's callback_ptr idiom, confirmed necessary here too -- the reference caches &callbacks[0] in a dedicated stack slot reloaded across the whole particle-processing section, not a fresh array-decay expression at every call site), and Func_080e0524's id argument spelled as (s32)&Value_000000cf (a pool-forced small link-time constant, matching the established Value_XXXXXXXX idiom -- 0xCF fits in movs but the reference loads it via ldr/pc, proving address-of-extern-byte, not a plain literal). Per games/gs1/recon/en/dossiers.json#main:080e01e4's already-resolved derivation, every 'Func_080072f4' call here is the r4 slot of the _call_via_rN trampoline at games/gs1/asm/080072e4.s -- modeled as genuine indirect calls through DrawRectangleFn values read out of callback_ptr[idx] (idx = (j<=2)?1:0 in the ring-growth blit, idx = slot&1 in the promotion blit; both idx expressions read directly off the retained assembly's register trace, not guessed). Semantic recovery (see notes below) and the whole control-flow shape -- record-array init loop, per-member_count table-driven slot count/frame count (Data_080ee1f5[mc*2]/[mc*2+1], not the template's mc*16+48 formula), the record->8==1 growth-vs-promotion branch, the 16-entry sub-burst array, the extra-target Func_080d6888 loop -- were derived by hand-tracing every pc-relative literal load's resolved address (via the .lst byte offsets) and every register's provenance instruction-by-instruction; m2c's output was used as a cross-check but required correction in at least one place (the ip=4/0 ternary selecting callback_ptr[1] vs callback_ptr[0] by sl<=2 was represented in m2c's output as an empty dead if-block, since m2c lost track of the ip register). Once compiled, the algorithm and overall size are close (candidate=1100 vs reference=1132, an 8-word/32-byte gap) and no wrong-constant or wrong-branch-target defects were found while reading the full --align diff top to bottom -- every remaining mismatch is a register-letter/spill-slot or instruction-scheduling difference, cascading from one root cause: the reference keeps the OUTER per-frame loop counter (sp18, 'frame' here) in a stack slot and the INNER per-slot loop counter ('slot' here, bounded by the same Data_080ee1f5[mc*2] count used to gate the record-init loop) in fp for the whole function; this compiler's allocator instead gives fp to 'frame' and spills 'slot', which cascades into a further two extra 4-byte stack slots (candidate frame is sub sp,#48 vs reference's #40) and reorders/reschedules essentially every downstream instruction that touches either counter or anything spilled as a consequence (confirmed by reading the candidate's own generated out/dbg-080d3c80/080d3c80.s: 10 distinct stack-scalar slots vs the reference's 8, with the two extras being the promotion-loop's inner counter and the ring-growth sub-array base, both of which the reference keeps live in registers across their surrounding calls without a stack home). This is the exact same class of persistent, source-level-unresolved register-allocation-priority issue independently documented in 080e01e4.json note (b), 080dc1ec.json's sl/r9 swap, and 080d82b0.json/080d59b0.json -- not pursued further here per the ban on forcing register assignment or open-ended permutation search; tried and confirmed zero-effect: swapping the frame/slot local-declaration order (matched_prefix, candidate size, and every register choice were byte-identical before and after)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family matcher's highest-scoring template (7675/10000) shares this owner's 0x03001eec work-block prologue idiom, the single Func_080041d8(0x080CD261,0x480) callback registration, and the Func_08004278/Func_08002dd8(47)/Func_08002dd8(46)/Func_080cdbc0() teardown -- but none of its palette-upload/Func_08002f40/Func_08005340/Func_080ed408 tile-loading prologue, and none of its sine/cosine (Func_08002322/Func_0800231c) orbit math, appear anywhere in this owner. Its rectangle_slot[slot & 1] indirect-call idiom through the _call_via_rN trampoline WAS directly useful, though, and generalizes to this owner's own two _call_via_r4 sites.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d59b0.json, 080d82b0.json, 080dc1ec.json and 080e01e4.json: identical Func_080cd594(0)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() shape, Func_08004458() as the RNG, and (uniquely shared with 080e01e4.c specifically) Func_080cef64(flag, callback_ptr) filling a real DrawRectangleFn[2] read back through a retained callback_ptr, not resolved dynamically. Unlike any of the five siblings, this owner has no camera/facing calls (no Func_080049ac/Func_080051d8/Func_08004cb4) and no per-member-list orbit math -- it is a self-contained ring-growth-and-particle-burst effect gated entirely by two small byte tables (Data_080ee1f5 for per-member_count slot-count/frame-count, Data_080ee1d3/Data_080ee1fb/Data_080ee207/Data_080ee214 for the burst animation) whose contents are not independently recoverable from this owner alone."},"rejected_experiments":["Swapped the function-scope declaration order of `slot` and `frame` (slot declared before frame, matching the reference's fp=slot/spill=frame register choice hypothesis): zero measured effect -- candidate size, differing_halfwords, wrong_instructions and the generated assembly's register assignments (fp still holds frame, slot still spills to a stack slot) were byte-identical before and after. Matches the same zero-effect finding for declaration-order tie-break experiments already recorded in 080e01e4.json/080dc1ec.json for their own fp/sl-class register questions.","Considered forcing the ring-growth sub-array base pointer (0x02010000 + slot*0x1C0) to be recomputed via explicit shift-and-subtract matching the reference's literal instruction shape (mov r0,fp; lsls r2,r0,#4; lsls r3,r0,#7; subs r3,r3,r2) instead of a plain `slot * 0x1C0` multiply expression, to see whether it would suppress the induction-variable strength-reduction the candidate's compiler applies (an accumulator-based sp-slot instead of a per-iteration multiply) that the reference's own compiled output does not exhibit: not pursued, since the algebraic rewrite is expression-equivalent and GCC's own strength-reduction pass would very likely still detect and apply the same transform regardless of surface spelling, and this is downstream of the same root fp/slot register question rather than an independent lever."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080d3c80.s), the m2c-assisted structural context under out/family-transplants/main-080d3c80/m2c/ (target.canonical.s, 080d3c80.c, family-template.i), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/fetch_rectangle_blitters.c, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: grows an up-to-8-slot ring of particles at work + 0x7080 (28-byte records: [0]=x-base fixed-point<<16, [4]=accumulator (sentinel 0xFFC00000 until promoted, then compared/clamped against 0x380000), [8]=state (0=growing,1=promoted/bursting), [0xC]=random x-velocity term<<12 (sign/range depends on object mode field 4), [0x10]=unused after init, [0x18]=per-slot activation threshold = slot_index*8), one slot per Data_080ee1f5[member_count*2] table entry (also the record-array init loop bound). Each of Data_080ee1f5[member_count*2+1] animation passes: (a) if member_count==2 and frame<=103, nudges a u16 field at a global camera/screen struct (*(void**)0x03001E80 + 0x36) by a frame-dependent amount, direction chosen by the target object's mode field; (b) fires Func_080b50e8(0x86) at frame==total-80 and switches the work block's per-frame callback to a second constant (0x06060606) at frame==total-8; (c) for frame<=total-8, walks every active record: a record with state==1 (promoted) drives its own private 16-entry sub-burst array at 0x02010000+slot*0x1C0 through one _call_via_r4 indirect draw per entry (dest/width/height/src-offset all table-driven by an index built from two Func_080022fc/Func_080022ec calls) and steps its own [8]/[0x18] growth pair; a record with state==0 that has crossed its activation threshold gets one _call_via_r4 draw of its own (32x32, callback_ptr[slot&1]) and, once its accumulator crosses 0x380000, is promoted (state=1, accumulator pinned to 0x380000) and its whole 16-entry sub-array is freshly re-seeded from a 32-byte (16x2) offset table (Data_080ee1d3) plus two masked/negated RNG calls per entry (doubled/shifted differently when slot is odd), followed by work->0x77A8=8, Func_080f9010(144), and one Func_080d6888(member_id,7,5,idx,4) call per real party member if the target object has any (object field 0x14 != 0).","The per-member_count slot count and total frame count are direct table lookups (Data_080ee1f5[mc*2], [mc*2+1]) recomputed fresh at every comparison site throughout the function (5-6 separate re-reads, matching the reference's own repeated ldr/ldrb sequences rather than a cached local) -- consistent with this family's established 'no derived-pointer/value caching, fresh M2C_FIELD at every use site' convention; the one place the reference DOES cache a derived pointer across many call-heavy statements is `callback_ptr` (&callbacks[0], read back from a dedicated stack slot at four separate widely-separated points spanning the whole particle-processing section), matching 080e01e4.c's identical `DrawRectangleFn *callback_ptr` idiom.","Open, not-source-shape-controllable residual (see score.note for the full trace): this compiler's register allocator assigns fp to the outer frame-loop counter and spills the inner slot-loop counter, the reverse of the reference's choice, cascading into two additional stack-scalar slots and pervasive instruction-scheduling differences throughout the whole function body. This is the same class of issue independently documented as unresolved via source-level tuning in four sibling dossiers (080e01e4.json note b, 080dc1ec.json's sl/r9 finding, 080d82b0.json, 080d59b0.json) after each spent a full pass on targeted experiments; not re-litigated further here beyond the one direct declaration-order test recorded above.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080d41a4":{"schema_version":1,"namespace":"main","address":"0x080d41a4","status":"measured-draft","owner_bytes":1096,"score":{"measured":"2026-08-27","candidate_bytes":1076,"reference_bytes":1096,"differing_halfwords":475,"wrong_instructions":446,"class":"wrong","note":"First structural draft, not a permutation search. Read games/gs1/asm/080d41a4.s in full and cross-checked every pc-relative literal load against its resolved byte offset (script-computed, not guessed) to pin every constant, table address, and call target before writing any C. The family-matcher's assigned template (main:080ce85c, games/gs1/src/battle/effects/member_orbit/run.c, score 7938/10000) supplied the field-offset layout (work+0x7780/0x7784/0x7824/0x7828), the M2C_FIELD macro, the DrawRectangleFn typedef, and the heap_cache cursor-advance idiom, but the owner's actual body is a different sub-effect entirely: no scanline sine-curve, no 32x32 orbit sprites. Instead it runs a per-\"kind\" loop (0..count-1, count read from a byte table at 0x080ee25e indexed by state->0x18) that draws a growing-then-shrinking marker via two DrawRectangleFn-style blits, spawns particles into the shared 1024-entry 0x02010000 pool on the middle frame of each kind's window, and updates every party member's position once per kind; a second, unconditional pass ages and redraws every live particle in that same pool every frame. Confirmed the r4-slot `_call_via_rN` trampoline finding from games/gs1/recon/en/dossiers.json#main:080dc1ec applies here too: what reads as `bl Func_080072f4` at three call sites is an indirect call through a DrawRectangleFn value already sitting in a register (rectangle[0], or rectangle_slot[scan&1] in the decay pass) -- modeled as `((DrawRectangleFn)ptr)(dest,src,x,y,w,h)`, not a call to a real function. The two `bl Func_080072f0` sites are the r3-slot trampoline instead, modeled per games/gs1/src/graphics/vram/reset_block_and_release_heap_blocks.c's established direct-call-with-trailing-target convention (`Func_080072f0(a,b,c,target)`). Cross-checked every ROM table this owner reads (0x080ee25e, 0x080ee250, 0x080ee244) against games/gs1/assets/code/sentou_kouka_hyou_a.json's byte dump to confirm the count/sprite-index/spawn-count semantics before writing the loop bounds -- all three matched the derived formulas exactly (e.g. Data_080ee25e = [1,3,7,0], consistent with a 0..3 state kind and a per-kind loop count). Iterated against `compiler candidate-show --align --size 1096`: fixed the Func_080ed408/heap_cache[7] read-before-second-call ordering to match the template's exact evaluation order (candidate dh 497->496); added the established Value_XXXXXXXX literal-pool-load idiom for both Func_080e0524 id arguments (0xd1, 0x73) instead of plain immediates; converted the 1024-entry zero-init loop to a do-while with increment-before-store to match the reference's r8-then-store order; restructured the per-kind range dispatch (originally written as clean delta-based if/else-if) into the literal fall-through/goto shape the reference's five-label control flow actually has once traced instruction-by-instruction, which alone dropped wrong_instructions by ~30; de-hoisted the sprite-table lookup and speed+32 sub-expression back into fresh per-site reads (the family's documented anti-CSE-spill pattern) instead of caching them across sites, matching the reference's repeated re-reads. Ran out of time before closing the remaining gap, which is dominated by two things: (1) a persistent one-slot (4-byte) stack-frame oversize (sub sp,#56 vs reference's #52) whose exact source was not pinned down -- tried collapsing/renaming count and count*8 several ways (a single `count*7+48` expression, a named count8 local, count8 computed inline) and the named-count8 form scored best (496->476 dh) but never closed the gap; (2) pervasive independent-immediate-load scheduling differences (same instructions, different order) throughout the per-kind draw and particle-spawn/decay blocks that read as the family's documented 'register allocator schedules independent loads differently' residual rather than a semantic error -- confirmed by re-tracing several of these regions by hand against the resolved literal table and finding the operations match, only the emission order differs. Not exact."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Size mismatch flagged by the workflow (owner 1096 bytes vs template's 724) was real: the template's exact byte layout (heap_cache cursor-advance for work/canvas, M2C_FIELD offset macro, DrawRectangleFn typedef, work+0x7780/0x7784/0x7824/0x7828 field writes, and the rectangle[2]/rectangle_slot array pattern) transplants directly, but the actual per-frame behaviour is unrelated: this owner has no scanline curve and no per-member orbit sprite loop. It instead runs a per-kind growing-marker draw + particle spawn + member-position-update loop, plus an independent full-pool particle decay/draw pass every frame -- much closer in shape to the particle-pool owners (080d59b0/080d82b0/080dc1ec/080e01e4/080e7404) than to member_orbit itself, though it shares none of their exact loop structure either. heap_cache[2] (\"sprite_sheet\") is read directly by index in the prologue, one slot past what the template's cursor advances to -- matches the family note that heap_cache reads mix cursor-advance and direct indexing.","trampoline_evidence":"games/gs1/recon/en/dossiers.json#main:080dc1ec's r4-slot _call_via_rN derivation (arm_function_arg proof + r4-value provenance trace) and the already-adopted member_orbit/run.c's ((DrawRectangleFn)rectangle_slot[slot&1])(...) idiom both apply directly here: this owner's three `bl Func_080072f4` sites are indirect calls through rectangle[0] (growing-marker draws) or rectangle_slot[scan&1] (decay-pass draw), never a 7-argument direct call. The two `bl Func_080072f0` sites are the separate r3-slot veneer, modeled per games/gs1/src/graphics/vram/reset_block_and_release_heap_blocks.c/_25.c/_47.c's established direct-call-with-trailing-target convention instead.","table_evidence":"games/gs1/assets/code/sentou_kouka_hyou_a.json documents the three ROM tables this owner reads as raw bytes at 0x080ee25e (hyou_a_080, u8[4] = [1,3,7,0]), 0x080ee250 (hyou_a_079, u8[14], two 7-entry groups), and 0x080ee244 (hyou_a_078, u8[12] = three 2-halfword groups) -- all consistent with the derived semantics (per-kind loop count, two field4-selected 7-wide sprite/x-index tables, per-kind spawn-count + secondary value pairs) before any C was written against them."},"rejected_experiments":["Inline `count * 7 + 48` for both the initial skip-check and the for-loop bound (no separate count8 local): scored worse (candidate=1084, dh=477) than a named `count8 = count * 8;` local reused in `(count8 - count) + 48` (candidate=1080, dh=476) -- kept the named form despite neither matching the reference's exact stack slot for it.","Caching the DrawRectangleFn draw's src/x/y/half/full into named locals ahead of the decay-loop call (statement-per-value instead of nested expressions inside the call): regressed both size and dh (1068/479 vs 1076/475) -- reverted to inline expressions.","Caching the decrement particle life value (`life`) for the half-width division inside the decay/draw block instead of re-reading M2C_FIELD(particle,s32*,0x18) fresh: the reference re-reads the field from memory even though the decremented value is still available, matching the family's anti-CSE-spill guidance; switching to a fresh read improved candidate size (1084->1076) without regressing dh.","A single cached `member_id` local reused for both Func_080b5088 and Func_080d6888 calls in the per-member loop: the reference issues two independent ldrsh reads instead of reusing one register/spill; removing the named local to match cost some wrong_instructions locally but is evidence-grounded from the raw retained assembly, not reverted."],"notes":["Recovered only from games/gs1/asm/080d41a4.s (including a byte-offset script resolving every pc-relative literal load to its exact `.4byte` value), the approved local EN ROM, the approved compiler, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the already-committed measured-draft siblings in games/gs1/recon/en/main/ (080dc1ec.c/.json for the r4-trampoline derivation, 080dd77c.c/080ccebc.c/080ecef4.c/080e7404.c for calling-convention cross-checks), games/gs1/src/unidentified/main/battle/battle_owner_*.c for the r3-trampoline convention, in-repo headers, and games/gs1/assets/code/sentou_kouka_hyou_a.json for the three ROM data tables this owner reads. No other Golden Sun decompilation project, symbol map, or external disassembly was consulted.","This candidate claims zero DONE bytes.","Semantic summary: battle-presentation sub-effect on the 0x03001eec battle-work subsystem. Loads a palette conditionally (skipped when state->0x18==2), zeroes the life field of all 1024 slots in the shared particle pool at 0x02010000, then runs (count*7)+48 frames where count comes from a per-state-kind byte table. Each frame optionally nudges a camera-shake field (state->0x18==2 case, frames 0..63 only), then for each of `count` \"kind\" indices j: on frame j*8 fires a flash callback + full-screen fade blit; on frame j*8+1 draws a shrinking marker; on frames j*8+2..3 draws a second marker and, on exactly j*8+2, spawns up to a per-kind target count of fresh particles into the first free pool slots with randomized angle/speed and a per-kind sprite type; on frame j*8+4 nudges every active party member's on-screen marker and portrait rotation. Independently, every frame, the whole 1024-slot particle pool is aged (life-1, position integrated via Func_080e3908) and any particle past a fixed altitude threshold that is still on-screen is redrawn as a shrinking trail sprite selected from a size-indexed lookup table, alternating between the effect's two draw routines by pool-slot parity.","Known open residual, not source-shape-controllable within this pass's time budget: a one-slot stack-frame size mismatch (56 vs reference's 52 bytes) whose exact cause was not isolated, plus widespread independent-immediate-load scheduling-order differences that read as the same 'register allocator/scheduler makes a different but equally valid choice' class of residual already documented for this owner family (080dc1ec.json, 080e01e4.json) -- do not force register assignment or chase further without new evidence."]},"main:080d4ce8":{"status":"blocked","measured":"2026-08-29","combined_span":{"start":"0x080d4ce8","end":"0x080d5238","size_bytes":1360,"note":"Region_080d4ce8 (games/gs1/asm/080d4ce8.s, 444 asm lines) plus Fragment_080d5094 (games/gs1/asm/080d5094.s, 242 asm lines) recovered jointly as one function, matching the boundary evidence already recorded in games/gs1/recon/en/dossiers.json#main:080d5094 (mirrored r8-r11 prologue/epilogue, internal branches sub_080d4e4c/sub_080d4ece/sub_080d4fe0 landing inside Region_080d4ce8's own byte range). End address is the byte immediately after `bx r0`, i.e. the start of LiteralPool_080d5238; the literal pool itself is excluded from the scored span."},"score_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080d4ce8.c --owner 080d4ce8 --size 1360 --align --first","best_score":{"candidate_bytes":1212,"reference_bytes":1360,"differing_halfwords":650,"wrong_instructions":650,"class":"compiler-unemittable","matched_prefix":7},"attempts":11,"structural_completeness":"Complete draft as of this pass: every block from the asm now has a corresponding C statement -- setup (heap-cache read, WORK_EFX assign, Func_080cd594, MMIO write, two Func_080e0524 calls), the kind-gated palette copy, the two Func_080ed408 rectangle setups, the one-time 1024-entry particle-table clear, the 4-anchor work+0x7080 init loop, the timer/callback registration, the 96-frame loop containing the kind==2 canvas-field54 nudge, the frame==16 hook, the per-frame do-while member/anchor draw loop (Func_080e3944 + Func_080072f4 calls), a particle-table free-slot scan and spawn (rng-driven velocity via Func_08002322/Func_0800231c), the 1024-slot particle decay/draw pass (position += velocity, >>6 fixed-point drag, gravity term, bounds-gated Func_080072f4 draw), and the Func_08002dd8/Func_08004278/Func_080cdbc0 teardown. Literal-pool constants for the Fragment_080d5094 half (particle table base 0x02010000, work offsets 0x7780/0x7784/0x7824/0x7828, byte tables 0x080ee29a/0x080ee2a9, halfword table 0x080ede48, teardown callback 0x080cd261) were resolved for real by assembling games/gs1/asm/080d5094.s standalone with arm-none-eabi-as at its true load address and reading the pool with objdump -d --disassemble-zeroes -Mforce-thumb, the technique credited to the 08077428 agent. Region_080d4ce8's own literal pool (the byte range 0x080d5054-0x080d5093, physically between the two retained-asm files) could not be resolved the same way because neither .s file contains those bytes -- assembling Region_080d4ce8.s alone produces a .text section that ends before that address, so objdump has nothing to read there. Those few constants (kind==2 palette id, two anchor/member byte-table addresses, the two Func_080041d8 callback addresses) remain named placeholders.","remaining_divergence":"candidate-show still reports class=structural-topology at matched_prefix=7 (candidate=1276, reference=1360, differing_halfwords=668, frame currently `sub sp,#84` vs reference's `sub sp,#64`): the reference's very first heap-cache read compiles to `adds r3,r2,#0 / ldmia r3!,{r1} / ldr r3,[r3,#0]` (an LDM-based double word load with post-increment) where every tried C idiom (`*cursor++` in a local, splitting into two statements, a small HeapEntry struct) instead compiles to two independent `ldr` loads plus an extra address computation. attempt_10 proved via lens.ts this is a register-pressure gap, not a spelling gap: none of the draft's ~290 pseudos ever carry an HI_REGS preference, so global.c never has a reason to promote anything into r8-r11 the way the reference does (reference holds 4 values live there with a 64-byte frame). attempt_11 tried three source-level address-taking restructurings recommended by attempt_10's next_steps (screen taken into a pointer once per do-while entry, the same widened to function-long scope, and rectangle_slot's address taken earlier) -- none produced an HI_REGS preference in lens.ts, and two actively regressed the score. This is a single, well-isolated front-of-function/register-pressure mismatch (not yet diagnosed against the compiler's own local-alloc.c/global.c dumps per CONTRIBUTING.md's 'read the compiler first' method step 2) rather than a remaining structural gap in the recovered algorithm, but it currently caps matched_prefix at 7 and cascades into every later offset comparison the diff tool prints. Separately, attempt_11 fixed a real, previously-wrong constant (`cursor2` was guessed as work+0x6e80 with no grounding; it is actually work+0xdd0, confirmed from the asm immediates) and recovered a third, previously-unattributed gap-pool constant (work+0x10b4, confirmed via objdump) that distinguishes the flag==0 sprite-draw branch from the flag!=0 one -- both branches had wrongly been made identical (both used plain `work`) before this fix.","structure":"Single C function Func_080d4ce8(void *object) combining both owners. Confirmed via candidate-show call-target matching: heap-cache read of work/canvas/a third slot (extra) from Data_03001e50, WORK_EFX = object, Func_080cd594(1), two Func_080e0524(effect_id, target, flag, flag) setup calls (matches the same call shape already proved in games/gs1/src/battle/effects/puff_arc/run.c), a kind-keyed conditional VRAM/palette copy through the generic Func_080072f0(dest, src, count, routine=0x03001388) dispatcher (the same routine constant member_orbit's run.c encodes as a raw ((WordCopyFn)0x03001388) call), Func_080ed408(46,7,7,3,2) / Func_080ed408(47,7,7,7,2) rectangle-blit setup (kinds and first three sizes match games/gs1/recon/en/dossiers.json#main:080d5094's dossier; the fourth size read directly off the asm is 7, not the dossier's provisional 15 -- see refuted_hypotheses), a 1024-entry x 28-byte particle table cleared once before the frame loop, and a fixed 96-frame loop ending in Func_08002dd8(47)/Func_08002dd8(46)/Func_08004278/Func_080cdbc0 teardown matching both template twins.","attempts_detail":["Attempt 1: standalone-fragment hypothesis (pre-existing, from games/gs1/recon/en/dossiers.json#main:080d5094) -- refuted, not retried here.","Attempt 2: minimal joined draft reusing games/gs1/src/battle/effects/member_orbit/run.c's exact setup sequence (single Func_08002f40 + WordCopyFn copy, no Func_080e0524 calls) with a stack-local Particle particles[1024]. class=compiler-unemittable, wrong_instructions=615. The stack local alone (1024*28=28672 bytes) is structurally impossible against the reference's `sub sp, #64` frame, and the setup calls did not match (reference calls sub_080e0524 twice via `bl`, which this draft never called).","Attempt 3: rewrote the setup section from the actual asm: recognized two Func_080e0524(id, target, flag, flag) calls (cross-checked signature against games/gs1/src/battle/effects/puff_arc/run.c line 113 and games/gs1/recon/en/main/080d82b0.c line 75), and recognized the two Func_08002f40+Func_080072f0(dest,src,128,0x03001388) copies gated on WORK_EFX->kind == 0 / == 2. Kept a stack-local Particle array by mistake. class=compiler-unemittable, wrong_instructions=631 (still failed to compile the giant local).","Attempt 4 (current best): moved the particle table to an extern global (Data_0203cd00[1024], address unresolved/placeholder) instead of a stack local, since the reference's 64-byte frame proves the table cannot be a local. class improved to structural-topology, wrong_instructions=625, differing_halfwords=679. bl call targets for both Func_080e0524 calls and the Func_08002f40/Func_080072f0 setup now match the reference's targets exactly (visible in candidate-show diff as unmarked lines), confirming that call-graph recovery. The remaining divergence starts at the prologue itself: the reference holds four values live across the whole function in r8/r9/r10/r11 (mov r7,fp; mov r6,sl; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}), but the current draft's reduced local set (no y_offset/record_slot/screen/record locals, and a simplified frame-loop body that is mostly stubbed placeholder logic) only pressures two callee-saved registers, so GCC allocates a visibly different, shorter prologue and the whole instruction stream shifts out of alignment from there."],"attempt_9":"Mapped every `ldr r,[pc,#N]` in games/gs1/asm/080d4ce8.s whose target lands past the retained object's own text end (0x36a) onto the 16-word ROM gap list from attempt_7, by assembling the region standalone (arm-none-eabi-as + arm-none-eabi-objdump -d --disassemble-zeroes -Mforce-thumb out/gs1-en/asm/080d4ce8.o) and reading each instruction's own comment-annotated local target address (e.g. `@ (0x36c ...)`), then adding 0x080d4ce8 to get the real address and indexing into the attempt_7 word list (0x36c=w0 ... 0x3a8=w15, 16 consecutive words, one per 4 bytes -- confirms the whole gap is this region's own tail literal pool with no slack). This produced several confirmed, evidence-backed corrections applied to the .c: (1) `efx->unk1C` was wrong in every one of its 5 uses -- the real field read is offset 24 (0x18), which is the struct's existing `layers` member, not `unk1C` (offset 28); replaced throughout. (2) The anchor-init bias table and the per-frame draw-loop cell table were both wrongly aliased to one invented symbol `Data_080ede9f`; the real pool values are two distinct, already-plausible addresses -- 0x080ee29d (anchor bias, ldrsb i.e. **signed** byte, indexed by `layers*4+i`) and 0x080ee2a9 (draw-loop cell table, matches the already-declared-but-misused `Data_080ee2a9`) -- split into `Data_080ee29d` (new, s8) and reused `Data_080ee2a9` correctly. (3) rectangle[46]/[47] and the per-frame canvas-like pointer were read from the wrong heap-cache window: this owner reads them from `Data_03001e50[46]`/`[47]`/`[12]` (the corpus-wide 'Data_03001e50[kind] holds kind's block address' cache already established in games/gs1/recon/en/main/080cc5d8.c, 080dd2c4.c, 080e7404.c, 080ceff8.c), not from `Data_03001eec[46]`/`[47]`/`[1]` as the draft had it -- 0x03001e80 (the dossier's previously-unattributed 'second heap-cache pointer') is exactly Data_03001e50[12] ((0x03001e80-0x03001e50)/4=12), and it is re-read every frame at the real loop-reentry address (sub_080d4e4c = local offset 0x164), not reused from the startup Data_03001eec[1] read. (4) The particle-spawn magnitude/angle were built from the wrong inputs: real code is `magnitude = rand()&0x3ff` (not `Data_080ee2a9[0]&rand()`) and `angle = (rand()&0x7fff) + 0xffffc000` (not `magnitude+rand()`), with the `+32` magnitude bump happening after the cosine call per the real instruction order -- spelled with the exact masks read from the gap pool (w13=0x3ff, w14=0x7fff, w15=0xffffc000) per this round's lead (1). Net effect on candidate-show: matched_prefix stays capped at 7 and differing_halfwords moved from 650 to 661 (candidate_bytes 1212->1244, sub sp #64->#84) -- confirms attempt 4's finding that the front-of-function ldmia/frame-size mismatch (not yet fixed) dominates and cascades into every later offset comparison, so this round's corrections are real, evidence-backed structural fixes but are not yet visible in the score. They should be kept regardless: reverting to the old wrong offsets/masks to chase a marginally lower cosmetic diff under a known-broken prefix would trade correctness for a meaningless number.","attempt_10":"Ran the frame-ledger technique per next_steps (lens.ts had never actually been run against this owner before -- only the guess-and-recompile loop had). (1) Enumerated every [sp,#N] access across both retained-asm files: distinct offsets 0,4,8,12,16,20,24,28,32,36,40,44,52,56 (part 2's set -- 0,4,8,12,24,28,32,36,40 -- is the same physical frame, no new offsets). 14 word slots = 56 bytes inside the reference's `sub sp, #64`; offsets 48 and 60 are never touched by ldr/str/add in either file, i.e. two 4-byte slots the reference reserves but never re-reads -- the same 'declared array/local with zero accesses' signature the walker dossier used to explain a GCC 2.96 frame-size gap. (2) Enumerated every r8-r11 touch: r11 (fp) is set once near the very top (`mov fp, r1` from the ldmia's first word) and then referenced via `add rX, fp` at at least 9 separate sites scattered across the whole function body in both files -- a single long-lived base-address pseudo, matching `work` (heap[0]) in the current draft, which is already declared first and used throughout. r8/r9/r10 are each reused for 3-4 unrelated short-lived values at different points (mov r8,r3 / mov r8,r0 / mov r8,r7, etc.) rather than one variable living the whole function -- so only fp/r11 is a true whole-function aggregate pointer; r8-r10 are just what the allocator promoted into hard high registers under heap-cache-window register pressure, not named locals with special lifetime shape. (3) Ran `bun tools/allocator-lens/lens.ts 080d4ce8` against the current (attempt_9) source for the first time: all 286 pseudos in the emitted order show LO_REGS or BASE_REGS as their only preferred class -- none show a HI_REGS preference or an r8-r11 hard assignment anywhere in the dump. This is the actual mechanical reason matched_prefix is stuck at 7: the current draft's simultaneous-live-value count under LO_REGS (r0-r7) never rises high enough, at any point in the function, for global.c to spill a pseudo into r8-r11 the way the reference does -- so the prologue difference (2 registers / 64-byte frame vs 4 registers / 88-byte frame) is a real, measured register-pressure gap, not a frame-size cosmetic. (4) Baseline rescore reproduces attempt_9 exactly: candidate=1244 reference=1360, differing_halfwords=661, class=structural-topology, matched_prefix=7, candidate frame is `sub sp, #84` (not yet 64 or 88 either). No source edit was applied this round: per attempt_8/attempt_9's own finding, changing the heap-read spelling alone does not move the register-pressure needle (confirmed again structurally via lens.ts, not just by recompiling), and no candidate edit was found this round that visibly raised any pseudo's live-range overlap enough to trigger an r8-r11 assignment in the lens output, so nothing was committed that would trade a verified-correct structural fix for an unverified cosmetic diff shift, per attempt_9's own caution.","attempt_11":"Executed attempt_10's recorded plan (r8-r10 function-long-lifetime restructuring + frame back-solve on the two dead sp slots) and measured every step against lens.ts, not just candidate-show. (1) Took the address of `screen` once per do-while entry into `screen_ptr`, routed every screen[0]/screen[1] site (inside the do-while AND the later particle-spawn block) through it: byte-for-byte identical output (differing_halfwords stayed 661) -- GCC 2.96 CSEs this identically to direct array-subscript access at this call site, the same null result attempt_8 got for the heap-read pointer. Widening screen_ptr's lifetime to span the whole 96-frame loop (assigning it once before the `for`) made things *worse* (665) by perturbing scheduling without ever producing a HI_REGS preference. (2) Took rectangle_slot's address before its first use instead of after (matching the work/fp idiom) instead of via the intermediate `second_rectangle` local: also worse (667), same non-effect. Both reverted. (3) Re-read the actual r9-holds-&screen and r8/r10-hold-loop-counters asm sites named in next_steps (games/gs1/asm/080d4ce8.s lines 244-443, games/gs1/asm/080d5094.s lines 20-107) directly rather than guessing: r9 is &screen taken fresh every do-while entry (not function-long, contradicts the 'function-long' framing in the next_steps hint -- it is scope-long, same as the current per-entry `screen_ptr` assignment already tried in (1)); r8 cycles through at least four unrelated short binds (anchor-init counter, scan_index seed, `spin` return value, particle-decay-loop index i) exactly as attempt_10 already found: this is real, but is the allocator reusing a hard register across disjoint pseudos with non-overlapping live ranges, not a C-level variable with one lifetime -- there is no single source restructuring that reproduces it, because it isn't one variable in the original source either. r10 is `member_index`, genuinely live across the whole 96-frame loop already (declared outside the frame loop in the current draft, matching its shape) -- no restructuring needed there, it was already right. (4) Ran lens.ts after each of the above: across all four variants (baseline, screen_ptr-scoped, screen_ptr-function-long, rectangle_slot-early) every one of the ~286-290 pseudos shows LO_REGS or BASE_REGS as its only preferred class in every run -- HI_REGS preference never appeared once. This reconfirms attempt_10's mechanical finding under direct experiment: the gate is not reachable by rearranging existing locals' address-taking, at least not through any of the source shapes tried across these 11 attempts. (5) Frame back-solve on the two dead slots (sp+48/sp+60) produced a genuine, unrelated, well-grounded fix instead: re-reading games/gs1/asm/080d4ce8.s lines 244-350 closely (not just the two named dead-slot candidates) showed `cursor2` -- previously guessed as work+0x6e80 with no grounding -- is provably work+0xdd0 (movs r2,#221; lsls r2,r2,#4; add r2,r11, spilled to sp+16, reloaded at lines 336/349 as the *second* argument to Func_080072f4 in the flag!=0 branch only), and the flag==0 branch (.L_080d4f90, lines 352-377) uses a *third*, previously-unattributed work-relative constant, confirmed by objdump'ing out/gs1-en/asm/080d4ce8.o (ldr r5,[pc,#236] at local offset 0x2a8 targets local offset 0x398, which is gap-pool word index (0x398-0x36c)/4=11 from attempt_7's list: 0x000010b4). Both fixes applied: `cursor2 = work + 0xdd0` (was 0x6e80, wrong) feeding the flag!=0 pair of Func_080072f4 calls, and a new `cursor3 = work + 0x10b4` feeding the flag==0 pair (previously both branches wrongly passed plain `work`, making the two branches byte-identical when the reference clearly distinguishes them). Net effect on candidate-show: differing_halfwords 661->668, candidate_bytes 1244->1276 -- worse under the still-broken-prefix comparison, exactly the same 'real fix moves the number the wrong way while the prefix is capped' pattern attempt_9 already documented and warned against reverting for. Kept per that same reasoning: reverting a grounded three-way branch distinction to chase a lower cosmetic diff under a known-broken prefix trades correctness for a meaningless number. (6) Neither the two dead sp slots (sp+48/sp+60) nor the r8-r10 promotion were resolved by this attempt: no source shape found across 11 attempts total produces an HI_REGS preference in lens.ts, so the actual mechanism the reference compiler used to reach `sub sp,#64` with two extra callee-saved hi regs remains unread -- next agent should stop trying C-level address-taking permutations (three independent shapes have now been measured to fail, matching attempt_9's caution about spelling-search regressing on allocation-class residuals) and instead pull the local-alloc.c/global.c dumps for this exact function per 'Read the compiler first' step 2, comparing the reference ROM's actual pseudo count/overlap at the do-while and particle-spawn call sites against this draft's, to find the concrete numeric threshold (per REGISTER_MOVE_COST / local-alloc's class-preference tie-break) that the reference crosses and this draft does not.","refuted_hypotheses":["Fragment_080d5094 as an independent function (carried over from games/gs1/recon/en/dossiers.json#main:080d5094): refuted by the shared prologue/epilogue and internal-branch evidence documented there.","Kind-47 rectangle size 4th argument = 15 (as speculated in games/gs1/recon/en/dossiers.json#main:080d5094's template_evidence): the retained asm at games/gs1/asm/080d4ce8.s lines 105-115 shows r1=7, r2=7, r3=7, r0=47, sp[0]=2 for that call -- i.e. Func_080ed408(47, 7, 7, 7, 2), not (47, 7, 7, 15, 2). The dossier's '15' does not match a direct read of this asm and should not be trusted for this owner.","Reusing member_orbit's exact local-variable set verbatim reproduces the reference prologue: refuted -- the frame-loop body here is materially different (fixed 96 iterations, a kind-gated field-54 nudge, an extra particle decay/draw sub-loop, and different member-loop bounds), so the same declaration list does not by itself recreate the same register-pressure profile; the loop body has to be reconstructed faithfully, not just the outer variable list, before the allocator will match.","attempt_11: taking &screen into a pointer once per do-while entry (matching the reference's r9 idiom exactly) triggers an HI_REGS preference in lens.ts: refuted -- byte-for-byte identical candidate-show output to the unpointered form (differing_halfwords unchanged at 661), the same CSE-erases-the-spelling result attempt_8 already found for the front-of-function heap read.","attempt_11: widening screen_ptr's or rectangle_slot's address-taking to span the whole 96-frame loop (function-long, not just do-while-scope) moves the allocator toward HI_REGS: refuted -- both variants regressed the score (665 and 667 respectively) and neither produced an HI_REGS preference for any pseudo in lens.ts; widening an already-CSE'd pointer's lifetime only perturbs scheduling, it does not change what class local-alloc prefers."],"attempt_7":"Read the true gap bytes at 0x080d5054-0x080d5093 straight out of roms/gs1-en.gba (offsets 0xd5054-0xd5093) per lead (3). Words: 0x00000087, 0x03001388, 0x03001e50, 0x02010018, 0x00007828, 0x080ee29d, 0x00007784, 0x080cd261, 0x03001e80, 0x080ee29a, 0x080ee2a9, 0x000010b4, 0x02010000, 0x000003ff, 0x00007fff, 0xffffc000. Cross-checked against the two already-resolved pools (games/gs1/asm/080d4ce8.s .4byte list: 0x00001010/0x03001eec/0x00007828/0x04000052/0x00000085/0x00000073/0x00000086/0x03001388; games/gs1/asm/080d5094.s .4byte list: 0x080ee2a9/0x000077a8/0x00007828/0x080ee29a/0x02010000/0x080ede48/0x00007824/0x080cd261). Result: Value_00000087 (kind==2 palette id) is confirmed correct as-is. Data_080ee29a/Data_080ee2a9/Func_080cd261/Data_02010000/work+0x7828 were already correctly resolved from the other two pools and are consistent with the gap read. Only one Func_080041d8 call exists in the retained asm (games/gs1/asm/080d4ce8.s line 190, `bl sub_080041d8`, a fixed subroutine address, not a pool literal) -- the dossier's earlier claim of 'two Func_080041d8 callback addresses' as outstanding placeholders is stale and should be dropped. Unattributed gap words remain: 0x03001e80 (a second heap-cache-style pointer, distinct from the retained pool's 0x03001eec base) and 0x000003ff/0x00007fff/0xffffc000/0x02010018, which read as a 1024-slot wrap mask, an angle mask, a sign-extend/shift constant, and a size/flag literal for code this draft currently approximates with `== 1024` equality-break and plain shifts instead of masking -- worth revisiting once the head/frame mismatch is fixed, since a wrong idiom there would itself shift instruction count. (0x000010b4, listed here as unattributed, was resolved by attempt_11: it is the work-relative offset used by the flag==0 sprite-draw branch's Func_080072f4 calls -- see attempt_11.)","attempt_8":"Tried collapsing the cache/cache++ pointer-walk head read into direct heap[0]/heap[1]/heap[2] array-subscript form (removing the intermediate `cache` pointer variable) to try to trigger the reference's ldmia-based double load. No effect: candidate-show produced byte-for-byte the same instruction stream (differing_halfwords=650, matched_prefix=7) -- GCC 2.96 treats `*p`, `*(p+1)`, `heap[2]` identically to the previous `*cache; cache++; *cache; heap[2]` spelling at this call site, confirming per CONTRIBUTING's 'read the compiler first' that the divergence here is fed by the register-pressure/frame-size gap already diagnosed in attempt 4, not by how the three loads are written. Kept the simpler heap[0]/heap[1]/heap[2] form in the source since it compiles identically and reads clearer.","next_steps":["attempt_11 measured (not guessed) that none of the three C-level address-taking restructurings attempt_10 proposed (screen pointer scoped to the do-while, the same widened to function-long, rectangle_slot's address taken earlier) move any pseudo's lens.ts preferred class off LO_REGS/BASE_REGS -- HI_REGS has never appeared once across 11 attempts' worth of source shapes. Stop trying further C-level address-taking/lifetime permutations on these two locals; that avenue is now measured exhausted, not merely unlucky.","Per CONTRIBUTING.md's 'Read the compiler first' step 2 (not yet done for this owner): pull the local-alloc.c/global.c dumps (`-da` on the staged cc1, or extend tools/allocator-lens/lens.ts to surface the raw class-preference cost comparison, not just the final winner) for the do-while call site (games/gs1/asm/080d4ce8.s lines 244-350, mov r9 usage) and the particle-spawn/decay call sites (games/gs1/asm/080d5094.s lines 20-107, mov r8/r10 usage). Find the actual numeric LO_REGS-vs-HI_REGS cost comparison local-alloc.c makes for the reference's pseudos at those points, and compare it against the same comparison for this draft's pseudos -- the goal is the concrete threshold (simultaneous-live-count, or a specific insn pattern requiring an 'h'-class operand) the reference crosses and this draft does not, not another source respelling.","The prologue/frame-size mismatch identified in attempt 4 (reference holds 4 values live in r8-r11 with `sub sp,#64`; every tried draft pressures fewer registers and gets a bigger/smaller frame -- currently 84 bytes) is still the single blocking issue -- it caps matched_prefix at 7 regardless of how correct the rest of the body is (attempt_9 moved differing_halfwords 650->661, attempt_11 moved it 661->668, both while fixing real bugs, because the comparison is anchored at the broken prefix either way).","attempt_11 resolved the two dead-slot candidates named in attempt_10's next_steps differently than expected: `screen`/`rectangle` were not themselves under-pressured locals needing restructuring -- instead, closely re-reading the same asm region surfaced a wrong constant (`cursor2`, now fixed to work+0xdd0) and a genuinely missing third local (`cursor3` = work+0x10b4, the flag==0 branch's distinct work-relative offset, previously collapsed onto plain `work`). Whether sp+48/sp+60 are literally these two new locals' stack slots (once the frame shrinks toward 64 bytes) or something else entirely has not been checked -- re-run the frame ledger (every [sp,#N] access in both .s files) once the register-pressure fix lands, since the offsets will shift as the local set changes.","Data_02010000[1024]'s address is confirmed correct as-is (0x02010000, read directly from Fragment's own resolved pool) -- no longer a placeholder; drop any future lead that re-doubts it."]},"main:080d5094":{"status":"blocked","measured":"2026-08-29","best_score":{"candidate_bytes":2,"reference_bytes":452,"differing_halfwords":226,"wrong_instructions":216,"class":"missing-extra-code"},"attempts":2,"finding":"Fragment_080d5094 is not an independent function boundary. Region_080d4ce8 (games/gs1/asm/080d4ce8.s) opens with `push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; ...; sub sp, #64`, and Fragment_080d5094 closes with the exact mirror `add sp, #64; pop {r3,r5,r6,r7}; mov r8,r3; mov r9,r5; mov r10,r6; mov r11,r7; pop {r5,r6,r7}; pop {r0}; bx r0` and no prologue of its own. Fragment_080d5094 begins mid-stream with a plain `bl` and reads r7/r8/r10/r11 as already-live values with no corresponding formal parameters an ordinary ABI-compliant C function could receive them through. Internal edges labelled `sub_080d4e4c`, `sub_080d4ece`, `sub_080d4fe0` (conditional/unconditional branches, not `bl`) land inside Region_080d4ce8's own byte range with the same live register state, which only type-checks if both owners are one physical C function; a standalone `void Func_080d5094(void)` cannot reproduce that entry state or exit through a shared caller frame it never allocated.","template_evidence":"games/gs1/src/battle/effects/member_orbit/run.c (Func_080ce85c) implements the same algorithm shape at a different call site: two heap-kind rectangle-blit routines built via Func_080ed408, a per-frame loop rewriting a work+0x6980 scanline table from a sine sweep, and orbiting sprites drawn for listed party members via Func_080e3944/Func_08002322/Func_0800231c, ending with Func_08004278/Func_08002dd8/Func_080cdbc0 teardown. Region_080d4ce8 + Fragment_080d5094 are a second instance of this same template (rectangle kinds 46/47 with sizes 7,7,3,2 and 7,7,15,2 match exactly; the frame-exit count here is a fixed 96 rather than member_count*16+48, and this instance adds a 1024-iteration particle sub-loop with independent fixed-point decay of position/velocity fields at struct offsets 0, 4, 8, 16 with a life counter at offset 24, drawn through Func_080072f4).","refuted_hypotheses":["Treating Fragment_080d5094 as a self-contained void function with plausible locals for r7/r8/r10/r11: compiles to a 2-byte `bx lr` stub, 226 differing halfwords against reference, because GCC has no source-level way to seed those registers with caller-supplied live values without formal parameters, and the required epilogue frame (sp-64, r8-r11) was never allocated by this owner.","Chaining internal branches (sub_080d4e4c/ece/4fe0) as ordinary tail-call extern functions: rejected because those addresses are conditional/unconditional branches (not `bl`) into the middle of Region_080d4ce8's own instruction stream with unmodified register state -- i.e. they are goto targets inside the same function, not callees."],"recommendation":"Recover Region_080d4ce8 and Fragment_080d5094 jointly as one C function (likely under a new translation unit spanning 0x080d4ce8-0x080d5238) before either owner can reach differing_halfwords=0 in isolation. Out of scope for this task, which is restricted to games/gs1/recon/en/main/080d5094.c alone and forbidden from touching games/gs1/recon/translation-units.json."},"main:080d59b0":{"schema_version":1,"namespace":"main","address":"0x080d59b0","status":"measured-draft","owner_bytes":664,"score":{"measured":"2026-08-27","candidate_bytes":664,"reference_bytes":664,"differing_halfwords":277,"wrong_instructions":268,"class":"wrong","note":"Fifth pass: fixed the same sign-extension bug already fixed on 080dc1ec and 080d82b0: `bounced = (bounced + ((u32) bounced >> 31)) >> 1` was compiling to a logical `lsrs` instead of the reference's arithmetic `asrs`, because the `(u32)` cast forces the sum unsigned. Cast the sign-bit term back to `(s32)` before the addition. Traced the mechanism precisely via objdump on the cached candidate .elf: this compiler's conditional-constant-propagation proves `accumulator == 0` from the guarding `if` and forward-substitutes it into `bounced`'s formula, so the wrong promotion produced a stray literal-pool constant 0x7FFFF000 instead of the correct 0xFFFFF000, costing 4 bytes and 2 wrong instructions. Grepped the whole file for the same `(u32) ... >>` pattern and found no other instances. candidate-show: differing_halfwords 281 -> 277, wrong_instructions 271 -> 268, and candidate size is now byte-count-exact (664 == 664). Re-verified the trampoline-call fix with --align: both indirect calls (callback_a/callback_b) now reproduce the reference's exact stage-to-stack/reload/branch shape one-for-one, only register-letter and stack-offset differences remain (both downstream of the fp/r9 issue below). Re-tried the dominant open residual (work in fp here, r9 in the reference) with three declaration-order/scope variants (facing declared first, facing given block scope, reversing all pointer-local declaration order), each tried both before and after the bounced-cast fix (six compiles total): all were either byte-identical to baseline or a small regression, work stayed in fp every time. Also tried introducing a named `old_accumulator` local specifically to defeat the constant-fold mechanism -- it didn't change the fold (this compiler traces the linear relation through the branch regardless of whether the value is a reloaded field or a distinct local) and cost real register pressure, so reverted. Confirms this remains genuinely open, not source-shape-controllable from this angle; not pursued further per the ban on forcing register assignment. Still not exact. Fourth pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27b":"Fourth pass: fixed the same 'Func_080072f4 is not a real function' modeling error found and fully derived in games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note (full derivation there: it is the r4 entry of the _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s, so both calls were really indirect through the function pointer in r4 -- exactly the callback_a/callback_b values this owner's own third pass had just correctly identified and hoisted, one prologue insight short of the full picture). Rewrote both call sites as `callback_a(draw_destination, (void*)((kind<<10)+(s32)work), ..., 32, 32)` / `callback_b(draw_destination, (void*)((kind<<10)+(s32)work-0x1000), ..., 32, 32)` matching DrawRectangleFn's real 6-argument signature, and removed the fictional `void Func_080072f4(s32,s32,s32,s32,DrawRectangleFn,s32,s32)` prototype. wrong_instructions dropped (278->271) while differing_halfwords rose slightly (277->281) and candidate_bytes grew slightly (656->668, now on the correct side of the 664 target) -- the same 'small metric regression traded for real correctness' pattern seen on 080dc1ec/080d82b0, not a reason to revert. Still not exact. Third pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27":"Third pass, evidence-grounded against games/gs1/asm/080d59b0.s directly (not a permutation search). Confirmed from the retained assembly that the reference prologue does use `ldmia r3!, {r1}` (bytes 0x0e-0x1e: `ldr r6,[pc,#92]; adds r3,r6,#0; ldmia r3!,{r1}; ldr r3,[r3,#0]; ...; mov r9,r1; add r3,r9`), so applied the raw `void **` cursor idiom already proved in the adopted member_orbit/run.c and in 080e01e4.c: `heap_cache = (void **)0x03001EEC; cursor = heap_cache; work = *cursor++; draw_destination = *cursor;`. This alone regressed the score (286->307) because it left `heap_cache` unused after the initial reads while the reference keeps r6 (holding 0x03001EEC) alive and reuses it: `ldr r2,[r6,#28]` and `ldr r6,[r6,#32]` read the two DrawRectangleFn pointers at 0x03001F08/0x03001F0C as `heap_cache[7]`/`heap_cache[8]` rather than through fresh pc-relative literal-pool loads of those fixed addresses. Rewriting the two `*(DrawRectangleFn*)0x03001Fxx` reads as `heap_cache[7]`/`heap_cache[8]`, hoisted into two named locals `callback_a`/`callback_b` at the exact reference positions -- `callback_a` read between the two `Func_080ed408` calls (matching `ldr r2,[r6,#28]` immediately after the first call), `callback_b` read after the second call and before the 32-entry sprite-pool loop (matching the `.L0:`-label `ldr r6,[r6,#32]`) -- dropped differing_halfwords from 307 to 277, better than both the pre-cursor baseline (286) and the naive cursor-only attempt (307). This differs from this dossier's own previously-rejected callback-hoist experiment in two ways confirmed against the .s file: the reference genuinely does hoist-and-stack-spill both callback reads early (`str r2,[sp,#12]` / `str r6,[sp,#16]`), so hoisting itself is correct; what the earlier attempt got wrong was reading them via fresh fixed-address casts (forcing new pc-relative literal loads) instead of heap_cache-relative indexing off the still-live r6, and hoisting both together after the second Func_080ed408 call instead of interleaved individually between/after the two calls as the reference actually schedules them."},"family":{"assigned_template_owner":"main:08099160","assigned_template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Read in full before drafting. The assigned template does not structurally match this owner: RunOrbitingParticleEffect has no shared callees with this owner at all (no Object_Spawn, WaitFrames-by-that-name, RotateVectorByMagnitude, Random16, or Audio_PlayCue call sites appear here), and its 15-iteration random-orbit spawn loop bears no resemblance to this owner's 32-entry sprite-pool initializer plus 148-frame bounce-physics/member-portrait loop. n-gram/call-target clustering likely grouped this owner with the template purely on generic shape (push r5-r9+fp/lr prologue, several do-while counters, many bl sites), not genuine source-shape kinship.","actual_sibling_evidence":"This owner's real callee set and constants match games/gs1/recon/en/main/080e7404.c (dossier games/gs1/recon/en/dossiers.json#main:080e7404) far more closely: identical Func_080cd594(mode)/Func_080e0524(id,work,f,f)/Func_080ed408(id,a,b,c,d)/Func_080041d8(cb,interval)/Func_08004278(cb)/Func_08002dd8(id)/Func_080cdbc0() call shapes, the exact same finish-callback pointer 0x080CD261 with the exact same 0x480-frame interval, the same hardware writes to 0x04000020 (BG2PA=0x100) and 0x04000050 (BLDCNT), and the same work-struct field offsets 0x7780/0x7784/0x7824/0x7828 relative to the shared *(void**)0x03001EEC base pointer. This owner and its three siblings (080d82b0, 080dc1ec, 080e01e4, also assigned to me) plus 080e7404 all appear to be members of one 'battle presentation sub-effect' family keyed off that same 0x03001eec work block, not the orbiting_particles family. A future recovery pass on this subsystem (a small header capturing the work-block layout and the Func_080e0524/Func_080ed408/Func_080041d8/Func_080072f4 signatures) would likely help all five owners at once."},"rejected_experiments":["Struct-typed single read of the two leading 0x03001EEC/0x03001EF0 globals (hoping to reproduce the reference's ldmia r3!,{r1} load-multiple prologue): compiled to two ordinary back-to-back ldr instructions instead of ldmia and regressed differing_halfwords from 281 to 317; reverted to two independent raw-pointer dereferences.","Hoisting the two function-pointer reads at 0x03001F08/0x03001F0C (draw_rectangle/alt_draw_rectangle) into named locals read once right after the two Func_080ed408 calls, matching the reference's own early read+stack-spill of these values: this is structurally what the reference does (str to sp+12/sp+16, later reload), but declaring them as ordinary C locals kept them live across the entire 148-frame outer loop in this compiler's allocator and regressed the score (281->309); reverted to inline point-of-use dereferences of the fixed addresses, which the compiler happened to schedule closer to the reference's own load sites.","Applying the void** cursor idiom (`cursor = heap_cache; work = *cursor++; draw_destination = *cursor;`) alone, still reading the two DrawRectangleFn pointers via fresh `*(DrawRectangleFn*)0x03001Fxx` casts: regressed 286->307 because it discarded `heap_cache` after the initial reads instead of reusing it (as the reference's r6 does) for the two later offset reads. Superseded by heap_cache[7]/heap_cache[8] indexing (see score.note); the cursor idiom itself was correct evidence, only the surrounding source shape needed to keep heap_cache alive too."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080d59b0.s), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c and its dossier (byte-exact-verified sibling with strong field/signature overlap), in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect. Seeds a 32-entry sprite-record pool at 0x02010000 with randomized initial falling parameters, opens two display windows (ids 46 and 47), then runs 148 frames. Each frame conditionally walks the active work-target's member list (drawing/positioning each member's portrait via Func_08004cb4 and occasionally cueing Func_080d6888), then integrates simple bounce physics (gravity accumulator, velocity, halved rebound damping) over the first 12 sprite records and draws each active one through one of two rectangle-callback function pointers selected by a phase-derived 0-7 'kind' value, alternating draw target by whether kind is 0-3 or 4-7.","The 'wrong' class and the 277/278 residual are now dominated by two specific, already cross-family-documented open compiler questions rather than an unrecovered source shape: (1) the reference keeps `work` in r9 for the whole function, but this compiler keeps choosing fp for it in this owner; tracing the .s file shows this is not cosmetic -- `facing` (`*(s32*)0x03001E80`, re-read once per outer-loop iteration) lives in fp for the reference's entire 148-frame loop body (never spilled), which is only possible because r9, not fp, holds `work` there. In this candidate, since `work` occupies fp, `facing` has no free callee-saved register left and gets spilled to sp+20 every iteration instead, which is most of the remaining 12-byte (3-word) frame-size gap (52 vs the reference's 40) and its knock-on pool/offset churn. 080dc1ec.json's rejected experiments already showed this compiler's fp/r9 choice is insensitive to declaration order and block scope for this same shared work-block idiom, so this was not re-attempted here as a blind lever. (2) `Func_080072f4`'s 5th argument (`callback`, a `DrawRectangleFn`) is passed through r4 in the reference rather than the stack slot ordinary APCS would use for a 5th word argument; 080dc1ec.json's rejected experiments already confirmed no adopted sibling source anywhere in games/gs1/src/ calls Func_080072f4 directly with 7 literal arguments and reproduces this, making it a genuinely unprecedented, unresolved calling-convention question, not something to guess at here. Because this candidate instead passes callback+w+h all through the stack, the compiler's own cross-jump optimizer merges the tail of the two Func_080072f4 call sites (kind<=3 vs kind>3) into shared code, which the reference's r4-argument version apparently does not do (its two call sites stay fully separate in the .s file) -- another visible symptom of the same open question rather than a new, independently fixable defect.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080d5c48":{"family":"template-main-080d9fc8","template_owner":"main:080d9fc8","template_source":"games/gs1/src/battle/effects/puff_arc/run.c","candidate_path":"games/gs1/recon/en/main/080d5c48.c","reference_bytes":524,"best_candidate_bytes":520,"best_differing_halfwords":146,"best_wrong_instructions":144,"status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","notes":["The family-matcher's template (puff_arc/run.c, 644 bytes, score 7658/10000) is thematically related -- both read the kind-39/40 Data_03001e50 work-block cache, republish the caller's Efx pointer at work+0x7828, and use the kind-46 rectangle blitter cached at Data_03001e50[46] -- but this owner (524 bytes) is a materially different, simpler variant, confirmed by reading games/gs1/asm/080d5c48.s and out/family-transplants/main-080d5c48/m2c/target.canonical.s directly rather than adapting the template's control flow: (1) no sine/cosine arc placement at all -- there are zero calls to the trig helpers (Func_08002322/Func_0800231c) anywhere in the retained bytes; (2) the puff array (work+0x7080, same 28-byte Puff layout as the template) is only ever touched at its ->tick field, which this owner randomizes with `Func_08004458() & 63` for WORK_EFX->cnt entries instead of seeding x/y/tick from a fixed 9-puff arc; (3) it sets BG2PA=0x100 and BLDCNT=0 (0x04000020/0x04000050) instead of the template's alpha-blend registers (0x04000050/0x04000052=0x3F46/0x100E), and conditionally sets BG2X=-0x7000 (-112.0 in the 20.8 format, i.e. exactly the same -112 pixel offset later applied to sprite x) when WORK_EFX->side==1 -- the same side/BG2X motif already documented in games/gs1/src/battle/effects/member_orbit/run.c's y_offset/BG2X pair; (4) the per-actor draw is a two-layer icon popup, not a layered cell sprite: a fixed 16x20 sprite at work+0x6C0 for the window [i*16, i*16+72) frames (using a position from Func_080e396c, i.e. EffectPosition_ApplyStepAndYOffset per games/gs1/include/types.h and games/gs1/src/effects/position/apply_step_and_y_offset.c, whose own body already applies one -16 y-offset -- this owner's caller applies a second, independent -16 on top for its own second draw), plus a 16x12 animated marker cycling through 9 cels of 192 bytes (indexed via Func_080022ec=FixedPoint_Ratio and Func_080022fc=Modulo per games/gs1/include/types.h) that keeps drawing at the same position for every frame at or after i*16, with no upper bound; (5) total animation length is (WORK_EFX->cnt+1)*32 frames (a natural `while (frame != (cnt<<5)+32)` loop), not the template's fixed 80.","The draw calls (`bl 0x08007300`) are the r7 slot of the games/gs1/asm/080072e4.s _call_via_rN trampoline (0x08007300 = 0x080072e4 + 4*7), the same indirect-call idiom the template documents for its own DrawRectangle calls one register over (r4 there). Modeled as `draw = (DrawRectangle)entry[6]; ...; draw(dst, src, x, y, w, h);` through a genuinely traced function-pointer local (Data_03001e50[46], fetched via entry[6] since `entry` already points at &Data_03001e50[40] and 40+6=46), never as a direct call to a fictional Func_08007300.","Call signatures for the four functions not used by the template were pulled from already-adopted, non-asm sibling sources rather than guessed: Func_08004458 (u32, no args) from games/gs1/src/battle/effects/run_effect15.c and games/gs1/recon/en/main/080e01e4.c; Func_080022ec/Func_080022fc (s32,s32)->s32 from games/gs1/src/display/blend/update_transition.c and games/gs1/src/menu/select_quantity.c (also aliased FixedPoint_Ratio/Modulo in games/gs1/include/types.h); Func_080e396c(s32, struct EffectPosition *) from games/gs1/include/effect_step.h and games/gs1/src/effects/position/apply_step_and_y_offset.c (EffectPosition_ApplyStepAndYOffset), whose struct EffectPosition {s32 x; s32 y;} is reused directly rather than re-declaring an owner-local position type.","The cache read at function entry is reversed from the template's entry++ order: this owner computes `entry = (u32 *)(Data_03001e50 + 40*4)` (pool literal 0x03001ef0) and reads `dst = *entry` before `work = *(entry-1)`, i.e. it reads the kind-40 slot first and the kind-39 slot second, opposite the template's cache=&[39]; work=*entry++; dst=*entry. Confirmed against the retained pool words (0x03001ef0=&Data_03001e50[40], 0x00007828=WORK_EFX offset) and reused later for the draw-pointer fetch via `entry[6]` (matching the retained `ldr r7,[r7,#24]`, since r7 is never redefined between the initial load and that point) instead of recomputing a second `cache=&[39]` as the template does.","Two rounds of structural fixing measured real gains before the residual plateaued: (a) modeling the cache read via the single reused `entry` pointer (dst=*entry; work=*(entry-1); later draw=entry[6]) instead of a template-style separate cache variable, and (b) capturing the pre-decrement y value in an explicit `old_y` local (`old_y = pos.y; pos.y = old_y - 16; draw(..., old_y - 20, ...)`) instead of computing the first draw's y argument after the -16 store, matching the reference's read-old-value-before-store instruction order. Together these took the first working draft from differing_halfwords=164 (candidate 516) to the current 146 (candidate 520); reference is 524 bytes.","The remaining 144 wrong instructions are essentially one root cause cascading through the rest of the function, not many independent bugs: this candidate's frame is 28 bytes (sub sp, #28) versus the reference's 36, and within the per-actor inner loop this candidate keeps the second loop's `cur` (Puff*) pointer resident in a register across the whole loop while spilling the &WORK_EFX address to a stack slot, whereas the reference does the exact opposite (keeps &WORK_EFX in fp/r11 across the loop, spills `cur` to sp+8) -- despite my C source placing the `cur = (Puff *)(work + 0x7080);` statement in exactly the same per-outer-iteration position the reference's own assembly computes it (immediately after the inner loop's cnt!=0 guard, not hoisted), confirmed by re-reading the reference trace line-by-line: the reference's `movs r0,#225; lsls r0,r0,#7; add r0,r8` (cur-init) and `mov fp,r2` (&WORK_EFX cache) both sit exactly where this candidate's C statement is textually written. Every subsequent register name and literal-pool offset in the aligned diff differs only by this same register-role swap and the resulting 8-byte frame-size shift, not by any different algorithm, call, or field access -- matched_prefix=9 and the entire early prologue, the cache-read block, the affine/blend register writes, the side-dependent BG2X store, the Func_080ed408/Func_080041d8 setup, and the tick-randomization loop are already byte-identical.","Experiments tried against this specific residual, all either no-ops or regressions (kept the better/no-op baseline in every case, never adopted a regression): merging the tick loop's `puff` and the draw loop's `cur` into one reused variable (worse: 154 dh/160 wi, candidate grew to 520 with a different bad shape); introducing an explicit `struct EffectPosition *ppos = &pos;` pointer local instead of accessing `pos.x`/`pos.y` directly (no change, 146/144); reordering the four independent statements around the draw-pointer fetch (`*(work+0x7780)=1; *(work+0x7784)=0; draw=entry[6]; Func_080041d8(...)`) -- brute-forced all 24 orderings via candidate-show and confirmed the current order is already the unique best (next-best regresses to 151); six different local-declaration orders (reverse, scalars-first, pos-early, cur-before-puff, work/dst/entry-first, old_y-first) -- five were no-ops, one (full reverse) regressed by one halfword; `cur = puff - WORK_EFX->cnt` instead of recomputing `work+0x7080` fresh (regressed sharply: 195 dh/192 wi, candidate grew to 528); an explicit cached `Efx **e = (Efx **)(work+0x7828)` local for the inner loop's WORK_EFX-> accesses (regressed: 173 dh/190 wi, though candidate size coincidentally hit 524); rewriting `cur` as a raw `u8 *` with manual `+28`/`+24` byte arithmetic instead of a typed `Puff *` (byte-identical output, 146/144); folding the third guard-clause's `if (frame < base) {cur++; continue;}` into a positive-form `if (frame >= base) {...}` wrapping the second draw (byte-identical output -- kept the positive form since it reads more naturally and scores identically); alternate loop-bound spellings `(cnt<<5)+32` vs `(cnt+1)*32` (byte-identical, as expected for a power-of-2 constant). This is the same register-allocation/CSE role-assignment residual class documented on other owners this session (e.g. games/gs1/recon/en/dossiers.json#main:080c0cec's fp/r7/r2 reassignment, 080bad7c.json's r1/r3 swap) -- no further per-owner respelling search is justified without attacking the shared compiler-internal tie-break directly.","2026-08-31 retained-assembly proof: the complete candidate accounts for every reference call, argument, trampoline target, affine/blend write, loop, field access, constant, and memory operation. The residual is confined to GCC's 28-byte frame and callee-saved cur carrier versus the reference's 36-byte frame, fp-resident WORK_EFX address, and equivalent sp+8 cur spill, with the resulting register/pool displacement. More than fifty bounded pointer, loop, guard, cache, type, declaration-order, evaluation-order, compiler-family, and scheduling variants preserve this choice or regress. Relocation-normalized cross-edition verification proves all 410 core bytes identical across all six GS1 editions (16 relocations and 12 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","Further respelling round (measured=2026-08-29, 25 additional scored variants against candidate-show --align --first, baseline 146 dh/144 wi/520 bytes unchanged at the end): all either no-ops or regressions, none adopted. No-ops (byte-identical, 146/144): i/base/frame declared u32 instead of s32; `base = i * 16` vs `i << 4`; `(WORK_EFX->cnt + 1) << 5` vs `(cnt << 5) + 32`; combining the two early-continue guards into one `||` condition; `entry[6]` vs `*(entry + 6)`; `entry = (u32*)&Data_03001e50[40*4]` vs pointer-arithmetic cast; `work = (u8*)entry[-1]` vs `*(entry - 1)`; splitting the cel computation into two statements; `pos.y -= 16` vs `pos.y = old_y - 16`; using `pos.y - 4` instead of a fresh `old_y - 20` for the first draw's y arg; reordering the outer while-loop as an equivalent for-loop; six more declaration-order permutations (pos-before-old_y, cel-after-old_y, base-before-frame). Regressions (all reverted): `frame - base >= 72` instead of `frame >= base + 72` (188 dh); moving the `Func_080f9010(143)` check after the `frame < base` guard (150 dh); wrapping the whole per-actor body in one positive `frame >= base && frame < base + 72` (257 dh, grew to 536 bytes); caching `WORK_EFX->side` into a function-scope `side` local (222 dh); caching `WORK_EFX->cnt` into a single `cnt` local reused by both loops (194 dh, candidate shrank to 496); an inner `while` loop with manual `i++` instead of `for` (160 dh, grew to 524 bytes); caching `Efx *e = WORK_EFX` scoped to just the inner loop body (184 dh, 516 bytes); caching `pos.x - 8` into a `px` local reused by both draws (199 dh, grew to 536 bytes); rewriting the tick-randomization loop and read as `puff[i].tick` array indexing instead of pointer increment (162 dh). This confirms the dossier's prior conclusion: the residual 144 wrong instructions are a single compiler-internal register-allocation/CSE tie-break (which of &WORK_EFX vs `cur` stays in a callee-saved register across the inner loop, plus the resulting 8-byte frame-size shift), not reachable by any C89 source-level respelling tried so far. No further per-owner respelling search is justified.","Recovered only from retained owner assembly (games/gs1/asm/080d5c48.s and the m2c-assisted out/family-transplants/main-080d5c48/ workspace's target.canonical.s/symbolized.s), the approved local ROM, the assigned template games/gs1/src/battle/effects/puff_arc/run.c, the already-adopted siblings games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/effects/position/apply_step_and_y_offset.c, games/gs1/include/types.h and games/gs1/include/effect_step.h, and the approved compiler via tools/compiler candidate-show. Did not read any other Golden Sun decompilation project or the output of the two sibling agents independently recovering main:080ccc38 and main:080cb4ec from the same template this session."]},"main:080d765c":{"schema_version":1,"namespace":"main","address":"0x080d765c","status":"mapped","measured":"2026-08-29","map":{"head":"0x080d765c","head_symbol":"FunctionHead_080d765c","head_file":"games/gs1/asm/080d765c.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; (sub sp follows) -- full r8-r11 save.","true_epilogue":{"file":"games/gs1/asm/080d8258.s","note":"Ends `... movs r0,#47 / bl sub_08002dd8 / movs r0,#46 / bl sub_08002dd8 / bl sub_080cdbc0 / add sp, #332 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. 332-byte frame, four-high-register restore, same sub_08002dd8/sub_080cdbc0 cleanup idiom as the sibling functions in this dossier batch. This is the sole real epilogue."},"span":{"start":"0x080d765c","end_exclusive":"0x080d82b0","size_bytes":3156,"derivation":"end = start of next asm file games/gs1/asm/080d82b0.s, immediately following 080d8258.s which owns the epilogue. size = 0x080d82b0 - 0x080d765c = 0xc54 = 3156."},"member_regions_in_order":[{"addr":"0x080d765c","symbol":"FunctionHead_080d765c","file":"games/gs1/asm/080d765c.s","role":"real prologue + setup, in-file literal pool, tail branches to Continuation_080d76f0"},{"addr":"0x080d76f0","symbol":"Continuation_080d76f0","file":"games/gs1/asm/080d76f0.s","role":"branch continuation, in-file literal pool, tail branches to sub_080d77b4"},{"addr":"0x080d77b4","symbol":"Region_080d77b4","file":"games/gs1/asm/080d77b4.s","role":"call-graph-reached prologue-less region, code+data mixed; not separately marked with a fragment comment but reached only by the preceding region's tail branch and itself prologue-less"},{"addr":"0x080d7c08","symbol":"Region_080d7c08","file":"games/gs1/asm/080d7c08.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080d7ea0","symbol":"Region_080d7ea0","file":"games/gs1/asm/080d7ea0.s","role":"call-graph-reached prologue-less region, branches conditionally (`bhi`) to sub_080d8258"},{"addr":"0x080d8258","symbol":"Fragment_080d8258","file":"games/gs1/asm/080d8258.s","role":"terminal fragment carrying the parent's stack frame/high registers (header: '親関数のスタック枠と高位レジスタを引き継ぐ終端断片'), ending in the real, shared epilogue"}]},"domain_evidence":["080d8258's own header comment explicitly identifies it as the terminal fragment inheriting the parent function's stack frame and high registers -- direct textual confirmation.","080d77b4/080d7c08/080d7ea0 are tagged with the 'call-graph reconstructed, code+data mixed, byte-verified by build_asm.ts' comment and are each reached only via a plain `b` from the previous region with no intervening prologue -- the prologue-less-region-reached-by-plain-branch shape named in CONTRIBUTING.md's Split functions section.","The sub_08002dd8(x2)/sub_080cdbc0 cleanup sequence immediately before frame teardown matches the same idiom independently confirmed in 080ec100, 080e15e8, and 080d0ee0's chain, reinforcing that this cleanup call pair is a common per-call finalizer shared across this whole family of large split functions."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080d765c.c --owner 080d765c --size 3156","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited."]},"main:080d82b0":{"schema_version":1,"namespace":"main","address":"0x080d82b0","status":"measured-draft","owner_bytes":800,"score":{"measured":"2026-08-27","candidate_bytes":784,"reference_bytes":800,"differing_halfwords":353,"wrong_instructions":272,"class":"wrong","note":"Fourth pass: found a second instance of the sign-extension bug already fixed on 080dc1ec (`Func_080dc1ec's half = (raw + ((u32) raw >> 31)) >> 1` compiling to logical `lsrs` instead of the reference's arithmetic `asrs`). Both `half = (raw + ((u32) raw >> 31)) >> 1` (in the draw block) and an equivalent unsigned-cast rounding expression for `result0`/sp44_ptr[1] were emitting a spurious extra `lsrs` instruction the reference does not have. Re-reading the reference's actual asrs/lsrs-by-31/adds triplet: it is GCC's textbook lowering of plain SIGNED integer division by 2, not a hand-rolled round-toward-zero bit-trick -- the `(u32)` cast was never needed. Simplified both to plain `/ 2` (`result0 = result0 / 2;` and `half = idx / 2;`); confirmed via --align that both sites now emit the reference's exact 3-instruction sequence bit-for-bit. wrong_instructions 276 -> 272, differing_halfwords unchanged (353). Bounded, evidence-grounded re-tries of the two open register-allocation residuals (declaration-order swaps for extra_target/draw_rectangle_fn and for pool_cursor/pool_index; named-temporary reordering for Func_080ed408's five arguments) all no-op'd or regressed and were reverted -- confirms both remain genuinely open, not source-shape-controllable from this angle. Still not exact. Third pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27b":"Third pass: fixed the same 'Func_080072f4 is not a real function' modeling error found and fully derived in games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note (full derivation there: it is the r4 entry of the _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s, so the call was really indirect through the function pointer in r4). Rewrote this owner's one call site as `draw_rectangle_fn(draw_destination, (u8*)extra_target+Data_080ede48[raw], y, h, idx, idx*2)` matching DrawRectangleFn's real 6-argument signature, and removed the fictional `void Func_080072f4(s32,s32,s32,s32,DrawRectangleFn,s32,s32)` prototype. wrong_instructions dropped sharply (324->276) while differing_halfwords rose slightly (347->353) and candidate_bytes shrank (788->784) -- the same 'small metric regression traded for real correctness' pattern seen on 080dc1ec/080d59b0, not a reason to revert; 080e01e4 improved cleanly on both metrics instead. Still not exact. Second pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27":"Second pass, evidence-guided from three siblings closed/advanced this session (080d9fc8, 080ce85c, 080dc1ec, 080e01e4). Moved from candidate=792/dh=363/class=unemittable to candidate=788/dh=347/class=wrong. Three structural fixes applied and confirmed by re-scoring after each: (1) the work/draw_destination/extra_target prologue reads reshaped into the cursor-advance idiom (heap_cache=(void**)0x03001EEC; cursor=heap_cache; work=*cursor++; draw_destination=*cursor; extra_target=heap_cache[2];) established by 080e01e4, which reproduced the reference's ldmia r3!,{r1} exactly; (2) discovered and applied a NEW idiom this owner's own evidence surfaces: heap_cache (r5) stays live across the entire prologue and is reused, not just for the three cursor-adjacent reads, but for two more offset-relative reads -- facing = *(s32*)((u8*)heap_cache-108) (0x03001E80) and draw_rectangle_fn = *(DrawRectangleFn*)((u8*)heap_cache+28) (0x03001F08) -- both of which the reference computes as heap_cache+/-imm rather than fresh literal-pool loads, confirmed by the ldr r5,[r5,#28] at asm line 52 reusing the same r5 loaded at line 15; (3) removed the target_slot local entirely (it was materializing (u8*)work+0x7828 once into a persistent variable/register/stack-slot), replacing every one of its dereferences with a fresh M2C_FIELD(work, void**, 0x7828) at each use site -- this let the compiler's own address-mode selection reproduce several of the reference's fused register-offset loads (ldr r3,[r1,r2]) instead of the candidate's previous separate adds+ldr pairs, and was the single largest contributor to the dh improvement (365->347 alone). Remaining divergence is concentrated in fine-grained register allocation inside the two large loops (which physical register holds the sp44/sp32 pointers -- reference keeps them in r9/sl for the whole outer do-while, candidate's build sometimes drops one to r8 or a stack reload) and in list-scheduling order of independent immediate-load instructions (e.g. Func_080ed408's r0..r3 argument movs are scheduled r1,r2,r3,r0 in the reference vs r0,r1,r2,r3 in the candidate) -- both read as instances of the same open, compiler-internal, non-source-shape-controllable class of residual already flagged across this family, not new unknowns."},"family":{"assigned_template_owner":"main:08099160","assigned_template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Same mismatch as 080d59b0: this owner shares no callees with RunOrbitingParticleEffect (no Object_Spawn/WaitFrames/RotateVectorByMagnitude/Random16/Audio_PlayCue) and its own control flow (per-member confetti physics over a shared 1024-slot pool, driven by an outer loop that runs member_count*20+56 times) bears no resemblance to the template's fixed 15-iteration orbit-spawn loop. The n-gram/call-target clustering evidently matched on generic register-shuffle-prologue and do-while shape, not real kinship.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404 and 080d59b0.json: same Func_080cd594(mode)/Func_080ed408(id,a,b,c,d)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() shape, the same *(void**)0x03001EEC/0x03001EF0 work/draw_destination globals reshaped this pass into the heap_cache cursor-advance idiom shared with 080e01e4, and the same *(DrawRectangleFn*)0x03001F08 callback global -- this pass discovered it is itself heap_cache+28, not an independent literal, mirroring facing at heap_cache-108. Also confirmed the family-wide Func_080072f4(dest,src,x,y,callback,w,h) 7-argument shape with the callback (5th arg) landing in r4 rather than on the stack, matching the still-open r4-5th-argument question from 080dc1ec/080e01e4."},"rejected_experiments":["None run beyond the single evidence-guided structural pass; given 080d59b0's finding that hoisting a fixed-address function-pointer read into an early local can regress the score by extending its live range across a huge loop, this owner's own draw_rectangle_fn read was deliberately kept as an early local (matching the reference's own str-to-stack-then-reload-much-later shape at sp+20) rather than tested both ways, for time; a follow-up pass should try both placements here the way 080d59b0's dossier did.","Rewriting the second main loop's Data_080ede48[raw] array subscript as Data_080ede48[idx-1] (idx=raw+1), to try to nudge the compiler into the reference's own idx*2-2 strength-reduced index computation (the reference computes the u16 byte offset as 'idx*2 - 2' reusing the already-materialized idx*2 value needed for the 7th call argument, rather than a fresh raw*2): regressed the score (candidate grew from 788 to 808 bytes, dh 347->367). Reverted. The reference's strength reduction appears to be an internal GVN/value-numbering choice this compiler build does not make from the algebraically equivalent source form either way.","Swapping the declaration order of sp44_ptr/sp32_ptr (sp32_ptr declared before sp44_ptr) to see if it changed which one the register allocator keeps in r9 vs sl/r8 for the whole outer member-seed loop: no effect on the score (identical candidate=788/dh=347). Reverted to the more readable order."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080d82b0.s), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, games/gs1/src/battle/effects/puff_arc/run.c, games/gs1/src/battle/effects/member_orbit/run.c, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a bigger battle-presentation sub-effect than 080d59b0. Opens one display window (id 46), copies a palette/tile block through a generic word-copy helper (Func_080072f0 taking the 0x03001388 word-copy routine as a callback argument, matching the WordCopy idiom already established in 080e7404.c), then blanks a 1024-slot shared confetti pool at 0x02010000 (laid out as up to 8 members x 128 slots, 28 bytes each, matching the stride already established in 080d59b0). For each active party member it seeds that member's 128-slot sub-range with randomized polar-coordinate confetti (Func_08002322/Func_0800231c sine/cosine calls) around a position derived from Func_080e3944. The main loop then runs member_count*20+56 times: near the start of each member's staggered window it cues a portrait-swap sound and Func_080d6888, then for every later pass it advances and redraws that member's confetti slots through Func_080072f4/Func_080e3908, expiring slots whose lifetime field crosses a threshold.","New this pass: heap_cache (the *(void**)0x03001EEC-derived pointer, kept in r5 across the whole prologue in the reference) is reused for FOUR distinct derived reads, not just the two/three previously modeled -- cursor-advance for work/draw_destination, heap_cache[2] for extra_target, heap_cache-108 for facing, and heap_cache+28 for draw_rectangle_fn. This is a stronger, more general version of the 'shared work-block header' idea already flagged for promotion in 080d82b0's own prior pass and 080e01e4's dossier; worth folding into a shared header/idiom note for the whole 0x03001eec family rather than re-deriving per owner.","New this pass: materializing an intermediate 'target_slot = (void**)((u8*)work+0x7828)' pointer variable, even when duplicated verbatim at each use site to avoid apparent aliasing, gets silently CSE'd/hoisted by this compiler across the whole extended block (including across the branch into the loop body), producing an extra stack spill/reload of the address that the reference does not have. Writing every access as a fresh M2C_FIELD(work, void**, 0x7828) expression instead (never assigning the intermediate address to its own named variable) avoided the CSE and let the compiler's native register-offset addressing selection reproduce more of the reference's instruction shapes. This is a stronger, more general lesson than 080e01e4's 'DrawRectangleFn[2] split' note and likely explains part of why 080d59b0 and 080dc1ec still carry unresolved dh -- worth checking both for an equivalent persistent-slot-pointer local that could be inlined away the same way.","Two open, evidence-backed questions carried over from 080d59b0/080dc1ec/080e01e4 and not resolved here either: why this compiler passes what looks like a 5th call argument through r4 (reconfirmed again at this owner's own Func_080072f4 site, with the w/h arguments on the stack beyond it), and why the reference keeps the shared work pointer in r9 while this compiler's candidate keeps choosing a different register for it in places. A third, related but distinct residual observed for the first time here: even after matching the source shape, the register allocator's choice of WHICH high register (r8/r9/sl/fp) holds which loop-invariant local address across a large loop body does not always match the reference's choice, and the scheduler's order for a run of independent immediate-load instructions feeding a single call (e.g. Func_080ed408's four register arguments) does not always match the reference's order either, even though the values, registers, and net effect are all otherwise identical. Both read as compiler-internal list-scheduling/register-allocation heuristics rather than anything expressible as a source-shape difference; not chased further this pass per the project's guidance against open-ended permutation search.","One nearly-tautological reference conditional was preserved literally rather than simplified: `if (member_count * 20 != -56) ...` gates the whole main loop and is true for every realistic non-negative member_count, but the reference genuinely computes it that way (count<<2 + count, then <<2 again, compared to -56), so it is kept as literal arithmetic rather than rewritten to `if (member_count != 0)` or similar, since the point is to reproduce the compiled shape, not simplify the source.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080d85d0":{"schema_version":1,"namespace":"main","address":"0x080d85d0","status":"measured-draft","owner_bytes":888,"score":{"measured":"2026-08-27","candidate_bytes":920,"reference_bytes":888,"differing_halfwords":448,"wrong_instructions":382,"class":"wrong","note":"First pass, drafted fresh (a prior wave's attempt on this owner left no salvageable source). The family-matcher's assigned template (main:080ce85c / games/gs1/src/battle/effects/member_orbit/run.c, score 8317/10000) is a real structural relative but not a resize: this owner adds a member-scaled particle-cloud pool at 0x02010000 that member_orbit/run.c does not have at all. Read games/gs1/asm/080d85d0.s directly (byte offsets cross-checked against out/family-transplants/main-080d85d0/m2c/target.lst's resolved literal-pool addresses) and modeled it as two phases against the already-measured 0x03001eec 'battle work' siblings 080e7404.c, 080d59b0.c, 080d82b0.c and 080dc1ec.c: (1) a one-time setup that, per party member, seeds 128 particles at that member's rest position (member_ptr offsets 8/12/16, field 12 biased by Func_080b5070(member_id)/2) with a random 0xFF-masked <<10 outward kick on the three velocity fields and resets the shared 1024-slot pool at 0x02010018 to -1 first (080d82b0.c's own pool_cursor/pool_index do{}while(pool_index!=1024) idiom, reused verbatim); (2) a member_count*20+72-pass frame loop that tracks a single member (state offset 8, not the offset-36 s16 array used for the per-member stagger trigger) and, per member, staggers a release (fp>stagger) that draws each active particle through the heap_cache[46]-sourced DrawRectangleFn (the 080072f4 call site is the r4 slot of the games/gs1/asm/080072e4.s _call_via_rN trampoline, modeled as a genuine DrawRectangleFn local per this family's established finding, not a fictional Func_080072f4) and, once each particle has aged past stagger+k+10 frames, pulls it toward the tracked member and retires it (particle[6]=-1) once both the x and z deltas fall inside [-0xFFF,0xFFF] -- GCC's textbook unsigned-bias fold of two signed range tests, which only reproduces the reference's two independent `bhi` branches when the two range tests are written as separate nested `if`s rather than one chained `&&` (folding all four terms into one condition made the compiler re-derive the second pair from fresh immediates instead of reusing the fused bias register, costing an extra pool word and 2 wrong_instructions; fixed). Following 080d82b0.json's confirmed evidence, the work+0x7828 state pointer is never assigned to its own local anywhere in this draft -- every read goes through a STATE macro that re-expands M2C_FIELD(work, void**, 0x7828) textually at each use, avoiding the CSE-induced spill that macro's sibling note documents. The two loop-count guards that gate the whole frame loop compare the scaled member count against a negative bias (`* 20 != -72` on entry, `* 20 + 72` recomputed fresh at the tail) rather than a simplified `!= 0`/`bound` local, matching 080d82b0.c's own preserved-literal-arithmetic precedent for the identical idiom. Residual: matched_prefix=7, and reading the rest of the --align diff line by line found no remaining opcode-class mismatch anywhere -- every `!`-marked row is a register substitution or a stack-slot offset shifted by a constant 4 bytes, and every `+`/`-` pair right after is the same operation reordered or given a different destination register. The root cause is visible at the very top: the reference materializes work into r9 once (`mov r9, r1`) and keeps it there for the rest of the function, while this candidate's build spills it to a stack slot (`str r1, [sp, #52]`) immediately after the ldmia and never recovers it, shifting every later stack offset by 4 bytes and cascading into which high register (r8/r9/sl/fp) holds which loop-invariant value throughout both nested loops. This is the same open, confirmed non-source-shape-controllable register-allocation residual already documented in 080d82b0.json ('why the reference keeps the shared work pointer in r9 while this compiler's candidate keeps choosing a different register for it in places') and 080e7404.json; three targeted experiments this pass (moving the object-field boolean read before vs. after the work+0x7828 write, spelling it as `!!x` instead of `x != 0`, and replacing the if/else palette selection with a ternary) each reproduced or failed to move this residual, confirming it rather than finding a new source-shape lever. Not chased further per the project's guidance against open-ended permutation search on a confirmed compiler-internal residual."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher's closest structural template (score 8317/10000): shares the heap_cache=(void**)0x03001EEC prologue idiom, the Func_080cd594/Func_08002f40/Func_080072f0(WordCopyFn)/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 calling shapes, and the work+0x7828 state-pointer field, but the 888 vs. 724-byte gap is real: this owner has only one Func_080ed408 heap allocation (kind 46, not the template's kinds 46+47), no BG2 affine writes, no scanline-table sine sweep, and adds an entire member-scaled particle-cloud subsystem (setup pool reset, per-member particle seeding, per-frame stagger/draw/pull-and-retire) that member_orbit/run.c does not have in any form.","actual_sibling_evidence":"The real kinship is with the 0x02010000/0x02010018 particle-pool siblings already measured this session: games/gs1/recon/en/main/080d82b0.c supplied the exact pool_cursor/pool_index 1024-iteration reset idiom (stride 7 words / 28 bytes, value -1) and the member_id-array read shape (M2C_FIELD(state, s16*, 36+2*member)); games/gs1/recon/en/main/080dc1ec.c supplied the Func_08004458()-masked-and-shifted random particle-field idiom and the Func_080e38b8(particle, n, 0) call shape; games/gs1/recon/en/dossiers.json#main:080e7404's dossier supplied the Value_/Data_03001e50[] absolute-symbol convention (id arguments to Func_080e0524/Func_08002f40 are addresses of single-byte Value_000000XX externs, not immediates, because each is <=255 and would otherwise assemble as a bare movs) confirmed here for Value_00000073/Value_000000b9/Value_000000c0; games/gs1/recon/en/main/080d59b0.c supplied the bare Func_080f9010(142) setup-call placement. No other Golden Sun decompilation project or external source was consulted."},"rejected_experiments":["Moved the M2C_FIELD(object, s32*, 0x18) boolean read to before vs. after the STATE = object field write, to try to match the reference's neg/orrs/lsrs-by-31 deferred-boolean shape (candidate emits an early branch-and-materialize instead): no net improvement (dh 440->453 one way, unchanged the other); reverted to the more natural read-then-write order since neither reproduced the reference's specific codegen choice.","Rewrote `variant = M2C_FIELD(object, s32*, 0x18) != 0` as `variant = !!M2C_FIELD(object, s32*, 0x18)`: byte-for-byte identical candidate (920/448/382); reverted to the more idiomatic `!= 0` spelling since it makes no difference to this compiler's codegen here.","Replaced the if/else palette-id selection with a ternary `Func_08002f40(variant ? (s32)&Value_000000c0 : (s32)&Value_000000b9)`: byte-for-byte identical candidate (920/448/382); reverted to if/else since it reads closer to the reference's actual branch-then-two-loads shape and makes no scoring difference.","Chained all four dx/dz range-check terms into one `&&` condition instead of two nested `if`s: this was the *original* draft shape and cost an extra pool-word reload plus 2 wrong_instructions because the compiler only fused the unsigned-bias bhi form for the first pair, re-deriving the second from fresh immediates; superseded by the nested-if form recorded in the current source, not re-tested after the fix landed."],"notes":["Recovered from the retained owner assembly (games/gs1/asm/080d85d0.s), the approved local EN ROM (byte offsets cross-checked via out/family-transplants/main-080d85d0/m2c/target.lst's resolved PC-relative literal-pool addresses), games/gs1/recon/en/main/080e7404.c/.json, 080d59b0.c, 080d82b0.c/.json, 080dc1ec.c and 080e01e4.c, games/gs1/src/battle/effects/member_orbit/run.c, in-repository headers, and the approved compiler. No other Golden Sun decompilation project or external source was consulted.","This candidate claims zero DONE bytes (measured-draft, not exact).","Semantic summary: battle-presentation sub-effect that opens one display window (heap kind 46), copies a 128-word palette/tile block through the generic word-copy trampoline (Func_080072f0 taking the 0x03001388 routine as a trailing callback argument), selects one of two Value_ resource ids for that copy based on whether object's offset-0x18 field is nonzero, then blanks the shared 1024-slot confetti pool at 0x02010000. For each active party member it seeds that member's 128-slot sub-range with particles at the member's rest position plus a random outward kick. The main loop then runs member_count*20+72 times, tracking one member (state offset 8) whose projected motion (Func_080b5098/Func_080b5070) every active particle is later pulled toward; on frame 64 it cues a sound (Func_080b50e8(133)), on frame 40 and again on frame member_count*20+52 it fires Func_080d6888 gate calls, and for each party member whose staggered release frame (member*20) has arrived it cues a portrait/gate call once and then, every later frame, redraws and physically advances that member's still-active particles, retiring each one once it has closed to within +-0xFFF of the tracked member's position on both the x and z axes.","The two structurally distinct Func_080b5098/Func_080b5070/half-value sequences (once per member during setup, once per frame for the single tracked member) are intentionally NOT unified into one helper: the reference computes each independently at its own call site with its own register/stack-slot lifetime, and the setup-phase one reads member_id from the offset-36 s16 array while the frame-loop one reads a single s32 field at offset 8.","Open, non-source-shape-controllable residual (matched against 080d82b0.json's and 080e7404.json's identical prior finding, not re-derived from first principles): the reference keeps the work pointer live in r9 for the whole function; this compiler's build of the same C shape spills it to a stack slot instead, shifting every later stack offset by a constant 4 bytes and cascading into which high register (r8/r9/sl/fp) holds which loop-invariant address inside both nested loops. Read the complete --align diff after every fix in this pass: no remaining row is an opcode-class mismatch, a wrong field offset, or a wrong constant -- every one is a register substitution or an offset-by-4 stack slot, consistent with this single upstream allocation choice rather than a source-shape defect."]},"main:080d89ac":{"schema_version":1,"namespace":"main","address":"0x080d89ac","status":"measured-draft","owner_bytes":2024,"candidate_bytes":2016,"differing_halfwords":961,"wrong_instructions":904,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: replaced two major m2c artifacts with ordinary source constructs established by exact siblings: the 0x03001eec cursor now emits the reference ldmia load, Func_080de2f8 receives its two output pointers as real fifth and sixth arguments, and the local two-entry rectangle callback array is invoked through typed six-argument calls. The candidate grew from 1960 to 2016 of 2024 bytes and the differing-halfword count fell from 996 to 961. The higher aligned wrong-instruction count reflects the now-present call arguments shifting still-unrecovered later blocks, not removed semantics.","2026-08-30: promoted the named BattleEffectA owner from the prepared aggregate-aware drafting wave. After repairing its concrete C type failures, the canonical compiler produces 1960 bytes for the 2024-byte reference; topology differs and 996 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","The repairs are mechanical recovery facts: a halfword display-register store, signed halfword actor-id reads, the pointer returned by Func_080b5098, and typed u8/u16 presentation-table reads. No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were introduced.","The function is a large six-mode battle presentation routine over the 0x03001eec work block. It initializes display and palette state, advances a long phase loop, updates party-linked battle objects, and draws effect resources through call-via trampolines. The existing BattleEffectA name is retained until its dispatch role has stronger semantic evidence.","The next reconstruction pass must model the r3, r4, r5, and r7 call-via sites as typed indirect calls, then recover the 128-byte reference frame layout and shared battle-work aggregates before allocator work."]},"main:080d91dc":{"schema_version":1,"namespace":"main","address":"0x080d91dc","status":"measured-draft","owner_bytes":2268,"candidate_bytes":2288,"differing_halfwords":1089,"wrong_instructions":1034,"classification":"structural-topology","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-31: replaced nine fictional direct calls to register-call veneers with one typed six-argument BattleEffectDrawFn. The two renderer words loaded from 0x03001f08 and 0x03001f0c now flow through their evidenced channels: the first through r8/Func_08007304 or r4/Func_080072f4, and the second through r4/Func_080072f4 or r10/Func_0800730c. The corrected candidate grows from 2188 to 2288 of 2268 bytes and differing halfwords fall 1093 to 1089. Wrong instructions rise 970 to 1034 because the real callback lifetimes alter the frame and downstream allocation; the direct calls were nevertheless semantically false and could not satisfy the reference call-register requirements.","2026-08-30: removed the same m2c calling-convention artifacts found in the sibling. The shared-work cursor now emits the reference ldmia load; the opening irregular switch is expressed as the reference's 3 / (2 or 4) / default if-chain; Func_080de2f8 receives both output pointers; and every recovered five- or six-argument presentation call now passes its former fake sp0/sp4 values as real arguments. The candidate grew from 2100 to 2188 of 2268 bytes, differing halfwords fell 1119 to 1093, and wrong instructions fell 1056 to 970.","2026-08-30: promoted the next-largest remaining no-candidate main-ROM owner after repairing its aggregate-aware m2c draft. A fresh canonical compile produces 2100 bytes for the 2268-byte reference; topology differs and 1119 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","Mechanical repairs recovered the signed-halfword party-member table reads, the direct battle-context return from Func_080b5098, the u16 sprite-offset table at 0x080ede5c, and the paired stack coordinates written by Func_080e3944. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The existing BattleEffectB registration identifies a shared six-mode battle presentation entry. Its large frame loop updates a 512-element motion field and draws party-linked objects through several phase windows; a more specific permanent name remains deferred until the effect dispatch table is semantically identified."]},"main:080d9ae8":{"schema_version":1,"namespace":"main","address":"0x080d9ae8","status":"measured-draft","owner_bytes":1248,"score":{"measured":"2026-08-31","candidate_bytes":1236,"reference_bytes":1248,"differing_halfwords":450,"wrong_instructions":348,"class":"wrong","note":"First structural draft, not a permutation search, of a genuinely one-off owner: the family-transplant tool's family-matcher assigned games/gs1/src/battle/effects/member_orbit/run.c (main:080ce85c, score 7743/10000) as the closest structural template, and the m2c workbench produced no assisted context at all ('Function not found') -- worked directly from a full manual byte-offset decode of games/gs1/asm/080d9ae8.s (built with a small local script resolving every pc-relative literal-pool load to its value and every branch to its label, cross-checked internally by confirming every resolved pool target lands inside an actual .4byte block, never mid-instruction) plus the sibling evidence named in the task brief. Confirmed owner_bytes is 1248, not 1180 as an early buggy version of the decode script reported (the bug: matching 'bl ' with a literal space against tab-separated source text, undercounting each of the 34 `bl` sites by 2 bytes -- 34*2=68, and 1180+68=1248 exactly, which is what caught the bug). The template match is real but partial: this owner shares the whole 0x03001eec work-block calling shape (Func_080cd594/Func_080e0524/Func_08002f40/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0) and several field offsets with 080ce85c, but is NOT an orbit effect -- it is a distinct 'palette ramp' effect (confirmed by the already-assigned name RunPaletteRampEffect in games/gs1/source-paths.json and by the four already-adopted battle/effects/palette_ramp/mode_N.c callers, which fixed the signature as `s32 RunPaletteRampEffect(s32 effect, s32 mode)`) with its own two-phase structure: (1) an 8-step brightness-clamped-copy 'ramp' table built once at work+0x2580 (7 shaded copies of a 696-byte source image, ceiling stepping 57,50,...,15), a 512-slot particle-ring seeded with mode-dependent angle buckets, then (2) a member_count*4+64-pass animation loop where each of up to member_count members runs on its own frame offset staggered by -4 per member index (both a `local_frame` and a `threshold` loop-carried variable decremented together), drawing one member-position sprite via Func_08004cb4/Func_080e3944 while local_frame>0 (size/table selection depends on `mode`), and, once threshold falls in [0,36], drawing all 24 of that member's ramp-buffer-relative burst particles from a per-member 896-byte particle sub-range. Two `bl Func_080072f4` sites (both inside the burst-particle draw, one inside the mode==0 single-sprite draw, one inside the mode!=1 single-sprite draw -- three total) are the `_call_via_r4` trampoline (games/gs1/asm/080072e4.s, N=4 slot), modeled as indirect DrawRectangleFn calls through `callback_pair[0]`/`callback_pair[1]` per the already-established 080dc1ec.c/080e01e4.c idiom, with callback_pair populated by the already-adopted Func_080cef64 (games/gs1/src/battle/effects/fetch_rectangle_blitters.c). Iterated five times against --align: (1) fixed a missing `Func_080cef64(effect->field4, callback_pair)` call omitted from the first draft entirely; (2) the mode-1-vs-else palette-id selection (`&Value_000000b7` vs `&Value_000000bb`) needed a nested `if (mode==0){bb}else if(mode==1){b7}else{bb}` -- a flat `mode!=0 && mode==1` short-circuit compiled down to a single comparison, dropping the reference's genuine two-compare/shared-else shape; (3) the 8-step ramp loop needed its ceiling (57,50,...) and destination-offset (696,1392,...) expressed as loop-carried accumulators decremented/incremented by a constant each pass, not recomputed via `64 - outer*7` / `outer*696` multiplication each iteration; (4) removed a hoisted `member_count` local whose one-time `M2C_FIELD(work+0x7828)->20` read was getting globally CSE'd by this compiler across unrelated later reads of the same field, per the family's documented 'always re-read via a fresh M2C_FIELD expression' guidance; (5) the two radius-scaled sin/cos particle-seed multiplies needed the *runtime* `radius` local (=192) explicitly on both sides matching the reference's real `muls` instruction and operand order (`radius * cos_val` for particle[4] but `sin_val * radius` for particle[5] -- an asymmetry the reference genuinely has), instead of the literal `192` which this compiler strength-reduces into shift/add sequences since it is a compile-time constant. A sixth fix, confirmed correct against the raw disassembly's own register trace (r5 = sp+64 for the Func_08004cb4 call, then immediately reassigned to sp+76 as a DIFFERENT address for the Func_080e3944 destination, never re-read from sp+64 afterward), replaced an incorrect two-buffer model (reusing one `rec[3]` local as both the Func_08004cb4 input AND the Func_080e3944 output) with the correct three-buffer model (`rec` camera-setup input, `screen` transform output reused by both the per-member and per-particle Func_080e3944 calls via the reference's persistent fp-held pointer, `zero_vec` a freshly-zeroed {0,0,0} input for the first call only) -- this is a real correctness fix, not a permutation, but it moved differing_halfwords from 505 to 558 (candidate_bytes 1224->1216, stack frame sub sp #88->#96, still short of the reference's #100 by one word) because it disturbed downstream register allocation broadly; kept per this family's established precedent (see 080dc1ec.json prior_note_2026_08_27b/d) that a metric regression traced to a genuine semantic fix is not grounds to revert to the wrong model. Net movement from the first working draft: differing_halfwords 581->558 and wrong_instructions 460->460 (unchanged at the endpoints, but not flat in between -- fixes 1-5 alone dropped it to a low of 420/505 before the buffer-model fix's cascading stack-offset renumbering pushed the raw diff-line count back up to 460/558 despite the underlying code being more correct, not less; see the buffer-model entry in rejected_experiments for why this was kept anyway).","residual":"Fresh 2026-08-31 lane-B measurement of the retained best source is 1236/1248 bytes, 450 differing halfwords, and 348 wrong instructions. The current candidate has a 108-byte stack frame versus the reference's 100 and topology is still different from the first prologue divergence. The prior note described an older 96-byte-frame revision and is retained as iteration history, not the current residual. The exact member_orbit sibling proves the callback idiom already present here, but does not name the extra local lifetime or branch shape responsible for this owner's eight-byte frame excess. No bounded idiom or missing-code operation closed it, so this remains a measured structural draft rather than an allocation search target."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family-matcher's closest structural template by score (7743/10000), and genuinely useful for the shared 0x03001eec work-block calling shape, the M2C_FIELD/heap_cache/cursor-advance idiom, and the DrawRectangleFn/WordCopyFn typedefs -- but not a control-flow match. Owner sizes differ (1248 vs member_orbit's bytes) and confirmed by direct decode: this owner is a two-phase 'palette ramp' effect (brightness-clamped image copies plus a 512-slot particle ring, then a per-member staggered draw-and-burst animation loop), not member_orbit's single per-frame 4-sprite-per-member orbit loop. No m2c-assisted context existed for this owner (out/family-transplants/main-080d9ae8/m2c/ absent, 'Function not found'), so the template served only as a style reference, not a structural starting point."},"rejected_experiments":["`if (mode != 0 && mode == 1) {...} else {...}` for the palette-id selection: this compiler folds the redundant `mode != 0` guard away (provably implied by `mode == 1`), collapsing the reference's genuine two-comparison/shared-else shape into one `cmp`. Replaced with an explicit `if (mode==0){bb} else if (mode==1){b7} else {bb}`, which reproduces both comparisons and a single shared else target without any cross-jumping needed (the two `bb` arms are never separately materialized -- confirmed the compiler treats the trailing `else` as the sole physical target for both the `mode==0` and `mode!=1` exits).","Ramp-loop ceiling/destination-offset computed via `64 - outer*7` / `work+0x2580+outer*696` (fresh multiplication from the outer loop index each pass): produced extra `movs`/scheduling noise not present in the reference, which visibly accumulates both values via `-=7`/`+=696` at the loop bottom instead. Switched to loop-carried accumulators.","A separately named `member_count` local, read once via `M2C_FIELD(work+0x7828)->20` before the `!= -64` pre-check and left otherwise unused: this compiler's CSE recognized the identical field-access text reappearing at the loop-exit condition and the inner-loop entry guard and started caching the `work+0x7828` pointer sum across the whole per-frame loop in a persistent register/stack slot, diverging sharply from the reference's fresh-reload-every-site pattern. Removed; every member_count-adjacent site now uses its own fresh M2C_FIELD expression, per the family's established guidance.","Literal `192 * Func_0800231c(angle)` / `192 * Func_08002322(angle)` for the two particle-seed multiplies: this compiler strength-reduces a compile-time-constant multiplicand into shift/add sequences (`(x<<1+x)<<6`), not the reference's real `muls` instruction. Introduced a genuine runtime `radius = 192;` local instead, which restores the `muls`; the two calls also needed opposite operand order (`radius * cos_val` vs `sin_val * radius`) to match the reference's own asymmetry.","Reusing one `rec[3]` local as both the Func_08004cb4 camera-setup input and (after that call returns) the Func_080e3944 per-member screen-position output: plausible from the field-offset shape alone, but the raw disassembly's register trace disproves it -- r5 holds sp+64 for the Func_08004cb4 call, then is immediately reassigned to a genuinely different address (sp+76) for the Func_080e3944 destination and is never re-read from sp+64 afterward, and that same sp+76 pointer (via `mov fp,r5`) is what the later burst-loop's per-particle Func_080e3944 calls reuse as their output too. Replaced with three separate locals (`rec`, `screen`, `zero_vec`); this is a confirmed correctness fix even though it temporarily worsened the raw differing_halfwords count via cascading register-allocation changes -- not reverted, matching this family's established 'small metric regression traded for real correctness' precedent (see games/gs1/recon/en/dossiers.json#main:080dc1ec).","Explicit `facing_end = facing + 12;` local hoisted once before the member loop, replacing two inline `facing + 12` expressions: zero measured effect on the compiled output (byte-identical score before and after) -- kept anyway as a source-fidelity improvement since the reference does store this value to its own stack slot once per outer frame, even though this compiler happens to produce the same code either way."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080d9ae8.s, manually decoded byte-by-byte with a local scratch script -- not part of this repository -- that resolves every pc-relative literal load and branch target and cross-validates them against the .4byte literal-pool blocks), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/fetch_rectangle_blitters.c, games/gs1/recon/en/main/080e7404.c/080d82b0.c/080dc1ec.c and their dossiers, the four already-adopted games/gs1/src/battle/effects/palette_ramp/mode_N.c callers (which fixed this owner's name and (s32,s32) signature), in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a two-phase battle-presentation 'palette ramp' sub-effect taking (effect, mode). Phase 1 (once): stores effect at work+0x7828, sets BG2 affine scale, registers a mode-selected startup effect id, loads a mode-selected palette to 0x05000000, loads a 696-byte source image into work+0x2580 and builds 7 additional brightness-clamped copies of it immediately after (ceiling 57 down to 15 in steps of 7), computes a y_offset from effect->field4, then seeds a fixed 512-slot particle ring at 0x02010000 with mode-dependent angle-bucket fields and a radius-192 sin/cos position. Phase 2: `member_count*4+64` animation passes; each pass re-fetches `facing`, fires a one-shot sound at frame 72, then walks every party member with that member's own frame offset (`local_frame`) staggered -4 per member index. While `local_frame>0`, draws one member-position sprite (size/table depends on `mode`, drawn through one of two DrawRectangleFn callbacks resolved once via Func_080cef64). Once the member's `threshold` (also staggered -4 per member) falls in [0,36], draws all 24 of a per-member 896-byte particle sub-range using a burst index (0, or `(local_frame-24)/4` clamped to 7) to pick which of the 8 ramp-buffer brightness copies to sample, indexed further by two 12-entry byte tables (Data_080eea20/2c, width/height) and a 12-entry halfword table (Data_080eea08, source offset).","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080da2ac":{"schema_version":1,"namespace":"main","address":"0x080da2ac","status":"measured-draft","owner_bytes":1056,"score":{"measured":"2026-08-27","candidate_bytes":1040,"reference_bytes":1056,"differing_halfwords":511,"wrong_instructions":466,"class":"wrong","note":"First pass, recovered directly from games/gs1/asm/080da2ac.s (hand-decoded literal pools by computing every pc-relative ldr's target address against the two .4byte pools) plus the m2c-assisted context in out/family-transplants/main-080da2ac/m2c/ (target.canonical.s, target.lst with resolved hex offsets, and the m2c decompile used only as a structural cross-check, not copied verbatim -- its own call modeling of the trampoline sites and its sp-offset variable names do not match the real stack frame and were not trusted). The family-matcher's template (main:080ce85c, score 8145/10000) is a structural false-positive for the algorithm: this owner shares the 0x03001eec battle-work prologue idiom, field offsets (0x7780/0x7784/0x7824/0x7828/0x77A8), and several callees with the template, but is a different sub-effect entirely (a variant-driven shrinking/expanding horizontal bar wipe read from a 3-byte-per-entry table at 0x080eea38, not an orbiting-sprite animation) -- confirmed structurally correct against 080d82b0.c/080e01e4.c/080d59b0.c, the other already-measured siblings of this same battle-work family, whose dossiers document the same template mismatch and the same open residuals hit here. Two Func_08007xxx call sites are the r3 and r4 entries of the _call_via_rN trampoline at games/gs1/asm/080072e4.s (0x080072f0 = r3, 0x080072f4 = r4): the r3 site is modeled as the already-established `Func_080072f0(dest, src, size, (WordCopyFn)0x03001388)` direct-call-with-trailing-target-argument idiom (from 080d82b0.c); the two r4 sites are modeled as a genuinely traced `DrawRectangleFn draw_rectangle_fn = *(DrawRectangleFn*)((u8*)heap_cache + 28);` (== *(DrawRectangleFn*)0x03001F08, the same heap_cache+0x1C slot 080d82b0.json independently derived and confirmed) called directly as `draw_rectangle_fn(dest, src, x, y, w, h)`. The Func_080e0524 id argument uses the already-established `(s32)&Value_0000008b` pool-forcing idiom (0x8B does not compile to a movs immediate at its call site in the reference, matching the pattern documented in 080e01e4.json/member_orbit's Value_000000af). candidate-show --align confirms the algorithm/control-flow shape is correct: instruction counts are close (455 candidate vs 462 reference insns) and several structural landmarks now match byte-for-byte, including the reference's exact 116-byte stack frame (`sub sp,#116`, matched after adding an explicit `bounds_ptr = bounds;` local to reproduce the reference's real stack-spilled cache of the 4-word bounds-table base address -- omitting it left the frame 4 bytes short), the whole 16-byte Bounds4 struct-copy prologue from 0x080eda88 (ldmia r3!,{r0,r1,r4}/stmia r2!,{r0,r1,r4}/ldr/str, identical registers), and the `screen`/`position` 12-byte local array addresses (sp+76 and sp+88) landing at the reference's exact offsets. The residual differing_halfwords is now dominated by one recurring, already cross-family-documented open register-allocation question (see notes): the reference keeps `work` (the 0x03001EEC-rooted battle-work pointer) resident in r9 for the entire function and computes work-relative field addresses as a single `add rX, r9` from a pc-relative immediate at every use site; this compiler's allocator instead spills `work` to a stack slot here and reloads+adds it (two instructions, same total cost, different registers/offsets) at nearly every one of the ~15 M2C_FIELD(work,...,0x7828) style accesses, which cascades into differing register choices and stack-slot numbers through most of the rest of the function even though the values and control flow are correct. Tried and confirmed not source-shape-controllable per the ban on register forcing: giving the work+0x7828 dereference its own function-scope `void *effect` local (reassigned fresh at each use site, mirroring 080d82b0.c's `target` idiom) regressed the score (differing_halfwords 512->514, wrong_instructions 466->562) rather than helping, and was reverted in favor of inline nested M2C_FIELD(M2C_FIELD(work,...),...) expressions at each site. Splitting the initial 16x40 pixel-copy loop's shared `i`/`j` counters into loop-unique names (row_i/col_j) plus giving the three later do-while loops (zero-init, member-position, member-flag) their own unique counter identities instead of a shared `i` also regressed slightly (differing_halfwords 512->514) and was reverted back to the shared-`i` baseline, which scored best. Declaration-order swap of the bottom three locals (bounds before position before screen, matching the frame allocator's documented first-declared-highest-address rule for same-size-class locals) measurably helped once combined with the bounds_ptr fix. Still not exact."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; already exact/adopted. Shares the 0x03001eec battle-work prologue shape, several field offsets (0x7780/0x7784/0x7824/0x7828), the M2C_FIELD macro convention, and the DrawRectangleFn/WordCopyFn typedefs and trampoline-call idioms with this owner, but the algorithm itself is a different sub-effect: this owner never computes a circular orbit (no cosine call, no per-member 4-sprite spin loop) and instead reads a per-variant 3-byte table at 0x080eea38 to drive a shrinking/expanding horizontal bar wipe (two DrawRectangleFn calls per active band, both against a fixed 40px-wide, height-varying rectangle) plus a member-highlight scan gated on screen-position thresholds. Owner size (1056 bytes) vs template (724 bytes) reflects this: an extra 16x40 nested pixel-copy prologue loop, an extra per-member zero-init pass, a 16-byte ROM-constant struct copy, and a 3-level nested loop (outer variant-driven frame count, a fixed 3-iteration band loop, an inner per-member loop) that the template's single-level per-frame loop does not have.","actual_sibling_evidence":"Confirmed member of the same 0x03001eec battle-work subsystem family already measured in games/gs1/recon/en/main/080d82b0.c, 080e01e4.c, 080d59b0.c, 080dc1ec.c and 080e7404.c: identical Func_080cd594(mode)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() bracket, the same heap_cache=(void**)0x03001EEC/cursor/work/draw_destination prologue idiom, and the same _call_via_rN trampoline mismodeling pitfall at Func_080072f0/Func_080072f4 those dossiers already fully derived and fixed."},"rejected_experiments":[{"experiment":"Hoist the repeated M2C_FIELD(work, void**, 0x7828) object-pointer dereference into a single function-scope `void *effect` local, reassigned fresh via a plain statement at every site the reference reloads it (mirroring 080d82b0.c's `target = M2C_FIELD(work, void**, 0x7828);` idiom)","result":"regressed differing_halfwords 512->514 and wrong_instructions 466->562; the extra long-lived local increased register pressure across the whole function rather than reproducing the reference's address-caching CSE behavior. Reverted to inline nested M2C_FIELD(M2C_FIELD(work, void**, 0x7828), type, offset) expressions at every use site.","class":"rejected"},{"experiment":"Give each of the four do-while/for loops (initial 16x40 pixel-copy prologue, member zero-init, member-position scan, member-flag scan) its own uniquely-named counter instead of a single shared `i`/`j` reused across all four (matching the general 'give a loop its own variable identity' lesson from 080e01e4.json's burst-counter fix)","result":"regressed differing_halfwords 512->514 (wrong_instructions improved 466->488 but net dh was worse); reverted back to the shared `i`/`j` names, which scored best for this specific owner's four disjoint, non-nested loops.","class":"rejected"},{"experiment":"Omit the `bounds_ptr` local and index the 4-word ROM-seeded bounds table directly via `*(s32*)((u8*)bounds + band)` at each use site","result":"compiled to a 112-byte stack frame instead of the reference's 116 bytes (the compiler simply recomputed `sp+100` inline each time rather than spilling the base pointer as the reference does) and shifted every later local's offset by 4 bytes. Adding an explicit `s32 *bounds_ptr = bounds;` local, set once and dereferenced through at both use sites, restored the exact 116-byte frame and the reference's exact screen/position array offsets (sp+76, sp+88).","class":"accepted"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080da2ac.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the measured-draft siblings games/gs1/recon/en/main/080d82b0.c/080e01e4.c/080d59b0.c and their dossiers, in-repository headers, the approved compiler, and the m2c-assisted context files already generated at out/family-transplants/main-080da2ac/m2c/ (target.canonical.s and target.lst, used only to cross-check hand-decoded literal-pool addresses, and the m2c decompile itself, used only as a structural sanity check -- every operand value, field offset, and call argument in the final draft was independently re-derived from the raw retained assembly, not copied from m2c's output).","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect on the shared 0x03001eec battle-work block. Sets BG2 affine scale/rotation registers, builds a 640-byte (16x40) sub-rectangle copy of a tiled bitmap at 0x02010000 into the work block, conditionally flips a BG3 affine register and sets a -112 x-offset correction for one orientation of the effect's owner object, opens display window kind 46, reads a DrawRectangleFn pointer out of the shared heap_cache+0x1C slot, zero-initializes one field of each party member's per-effect record, registers a scheduler callback, copies a 16-byte ROM constant into a local 4-word 'bounds' table, and then runs a variant-selected number of frames (looked up from a 3-byte-per-entry table at 0x080eea38 indexed by the owner object's field 0x18). Each frame advances a 3-band scanning window over the bounds table (periodically bumping one band's stored value by 32), and once the frame counter enters a band's active window, computes a sine-scaled bar half-height and draws two fixed-width (40px) rectangles of varying height, then scans every party member: projecting each member's 3D position to screen space, flagging members whose projected position falls inside the just-drawn bar's bounds (setting two fields on the member object), and cueing a status callback for any member whose field-12 value has gone negative. After the 3-band loop, a second per-member pass fires a one-shot Func_080d6888 cue for any member whose per-effect record flag is still unset and whose object fields indicate an out-of-battle/negative-value state. Ends by unregistering the scheduler callback and freeing window kind 46.","The dominant residual, consistent with every other measured owner in this same 0x03001eec battle-work family (080d59b0.json, 080d82b0.json, 080e01e4.json, 080dc1ec.json), is the compiler's register-allocation priority choosing to spill the long-lived `work` pointer to a stack slot and reload+add it at each use, where the reference instead keeps it resident in r9 for the whole function. Per the ban on forcing register assignment via source tricks, and per the precedent in the sibling dossiers (declaration-order and scoping levers tried there had zero effect on this same fp/r9-class choice), this was not chased further with blind lever-pulling here beyond the two declaration-order experiments recorded above. Everything else -- the algorithm, every field offset, every table/constant value, every call argument, the trampoline-call modeling, and the exact 116-byte stack frame shape -- is confirmed correct against the retained assembly.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080da6cc":{"schema_version":1,"namespace":"main","address":"0x080da6cc","status":"measured-draft","owner_bytes":1192,"score":{"measured":"2026-08-27","candidate_bytes":1168,"reference_bytes":1192,"differing_halfwords":540,"wrong_instructions":264,"class":"wrong","note":"First pass. The family matcher's template (main:080ce85c, member_orbit/run.c, score 7866/10000) is structurally related -- same 0x03001eec 'battle work' prologue idiom, same DrawRectangleFn/M2C_FIELD conventions -- but this owner (1192 bytes) is a genuinely different sub-effect from the template (724 bytes): a per-member burst of falling 'star' particles, not an orbiting ring. Drafted directly from games/gs1/asm/080da6cc.s and out/family-transplants/main-080da6cc/m2c/target.canonical.s (an m2c decompile of this owner's own retained bytes, not the template's), cross-checked instruction-by-instruction against the raw retained assembly rather than trusting m2c's output verbatim -- m2c mis-modeled both `bl Func_080072f4` call sites (the r4 slot of the _call_via_rN trampoline, already established family-wide: see games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note) as a fictional direct function with unresolved stack args, and silently dropped the width/height stack arguments and the (frame> 1` (the small-glint width halving) compiled to an arithmetic shift when the local was `s32`, but the reference emits a logical shift, so the source must genuinely be unsigned (fixed by declaring that local `u32`); (4) removing three inappropriately-cached locals (`count`/`raw_count`/`variant` used as the two idx-loops' *bound*) -- the reference recomputes `Data_080eea41[M2C_FIELD(M2C_FIELD(work,void**,0x7828),s32*,0x18)]` fresh at every loop-condition site (bumped matched_prefix 11->19 and dropped wrong_instructions 290->272 in one step, the single largest win of the pass); (5) inlining the burst-draw's callback ternary as raw byte-pointer arithmetic (`*(void**)((u8*)rectangle_slot+slot)` with slot=4-or-0) instead of `rectangle_slot[1]:rectangle_slot[0]`, which stopped the compiler from duplicating the entire call's argument setup into two branches; (6) introducing a named `size2` local so `size*2` is computed once and reused for both the table index and the height argument, instead of twice. Net over the pass: differing_halfwords 561->540, wrong_instructions 408->264, matched_prefix 11->19, candidate_bytes 1148->1168 (closer to the reference's 1192). Not exact. Residual (confirmed, not chased further): a single global register-role swap -- the reference keeps the outer idx-loop counter in sl and the cached &work[0x7828] address in fp for the entire burst/homing section; this candidate's compiler swaps them (idx in fp, the address in sl). This is exactly the family's documented 'loop-invariant address kept in a different high register than the reference' residual (see the task's own hard constraints and 080e01e4.json's open question (b)); every M2C_FIELD(work,void**,0x7828) site in this draft is written fresh at point of use (never hoisted into a named local) specifically so the compiler's own CSE decides the caching, per project convention, so this is not source-shape-controllable without forcing register assignment, which is prohibited. A smaller, separate residual: `rectangle[0] = *(void**)(Data_03001e50+46*4)` compiles to a folded pool literal + `ldmia` (4 bytes) where the reference does a fresh symbol load + two `adds` + `ldr` (8 bytes, presumably because the same 0x03001e50-based literal is reused nearby for the kind-47 fetch, +188, forcing the compiler to keep the bare symbol address live in a register rather than folding the offset into the pool word); tried an explicit `u32 *cache` cursor variable (matching puff_arc/run.c's proven-exact `cache=(u32*)(Data_03001e50+39*4); entry=cache; a=*entry++; b=*entry;` idiom) both with and without a call() between the two reads -- no effect either way, so this is recorded as open rather than forced. Two dead-code-shaped comparisons are deliberately preserved as literal source, matching the project's established 'record dead cells honestly' convention (see this session's 0801e318 work): `(Data_080eea41[variant] >> 1) != -132` guards the whole per-frame loop and is structurally unreachable-as-false (an unsigned 0-127 value can never equal -132), yet the reference's own compiler does not fold it away (confirmed: candidate-show --asm shows the identical `movs r5,#132; negs r5,r5; cmp r3,r5; bne/b` sequence verbatim once written as a literal -132 comparison, so the approved compiler genuinely does not perform this range-based fold and the reference's C likely wrote the same literal)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family score 7866/10000, the closest structural template by n-gram/call-target similarity, but the template's own body (a fixed 64-frame orbiting-ring loop with two rectangle blits per orbit position, no per-particle state machine) is not this owner's shape at all: this owner drives up to 64 independently-timed 'star' particle records through a spawn/home/land state machine over a per-variant frame count. The template remains useful evidence for the shared 0x03001eec prologue idiom (heap_cache/cursor/work/draw_destination), the M2C_FIELD macro, the DrawRectangleFn calling convention, and the Func_08002dd8/Func_08004278/Func_080cdbc0 teardown shape -- all reused here -- but essentially none of the template's own loop body or field roles carried over.","closer_evidence":"games/gs1/src/battle/effects/puff_arc/run.c (main:080d9fc8, exact) is the better behavioural precedent: both owners read a kind-46 draw callback out of the same Data_03001e50[kind] heap-allocation cache (puff_arc via `cache=(u32*)(Data_03001e50+39*4)`, this owner via `Data_03001e50+46*4`/`+47*4`), and both run a per-frame do-while over an array of 28-byte position/velocity/timer records seeded once before the animation loop, drawing a subset of them each frame through the cached callback. games/gs1/recon/en/main/080d82b0.c and 080e01e4.c (measured drafts, same 0x03001eec family) supplied the established DrawRectangleFn indirect-call derivation (see 080dc1ec.json's score.note for the full _call_via_rN trampoline proof) and the `Data_080ede48[idx-1]` table-index idiom."},"rejected_experiments":["Modeled the Func_080072f4 call sites as m2c originally rendered them (a fictional direct 4-argument function with an unresolved 5th 'stack arg'): compiles, but drops the width/height arguments and the callback-selection entirely, and cannot reproduce the reference's r4-trampoline call shape at all. Replaced with a genuine indirect call through a byte-offset pointer read, matching the already-established family derivation.","Cached the per-frame effect-state pointer (`M2C_FIELD(work, void**, 0x7828)`) into a single named `target` local, reassigned fresh before each use (matching games/gs1/recon/en/main/080d82b0.c's style): this is exactly the pattern the task's own guidance warns against (a materialized derived pointer inviting CSE-driven hoisting/spill); switched to writing the nested M2C_FIELD expression fresh at every single use site instead (no named local at all), which is what let the compiler's own register allocator decide caching -- and is very likely why it independently chose to keep the address live in a high register (fp in this draft, sl in the reference) for the busy burst/homing section, matching the reference's overall shape even though the specific register differs.","Cached the two idx-loops' iteration bound (`Data_080eea41[variant]`) into a named `count`/`raw_count` local computed once before each do-while: the reference recomputes this expression fresh at the loop-condition site every iteration (confirmed via the raw bytes: `mov r1,fp; ldr r3,[r1,#0]; ldr r3,[r3,#24]; ldrb r3,[r2,r3]; cmp sl,r3` appears at the tail of both loops, not a cached stack read). Removing the cached locals and writing the fresh nested expression at both the entry-gate and the loop-condition was the single largest win of this pass (wrong_instructions 290->272, matched_prefix 11->19).","Wrote the burst-draw's callback selection as a ternary directly in the DrawRectangleFn call position, `(framex - (w>>1);`: compiles to an arithmetic shift (asrs) since the local is signed, but the reference emits a logical shift (lsrs). Retyped the local `u32`, which fixed the shift and, as a side effect, corrected the surrounding instruction ordering to match the reference (the u16 source-table read now happens at the same point in the instruction stream as the reference instead of being deferred to just before the call).","Tried an explicit `u32 *cache` cursor for the kind-46/47 rectangle-pointer fetch (`cache=(u32*)(Data_03001e50+46*4); rectangle[0]=(void*)*cache; ...; cache++; second_rectangle=(void*)*cache;`), matching puff_arc/run.c's proven-exact cursor idiom: produced identical codegen to the direct one-shot dereference (still folds to a pool-literal `ldr`+`ldmia` rather than the reference's fresh-symbol-load+`adds`+`adds`+`ldr`). No effect either way; reverted to the simpler direct-dereference form since it is equally close and shorter to read. Left open rather than forced.","Reordered the top-level local-variable declarations (moving `extra_target` to the very end of the list) to try to shift its stack-frame slot from sp+28 (this draft) to the reference's sp+20: regressed (differing_halfwords 540->541, matched_prefix 19->16). Reverted."],"notes":["Recovered only from games/gs1/asm/080da6cc.s, out/family-transplants/main-080da6cc/m2c/target.canonical.s (an m2c decompile of this owner's own retained bytes, used only for structural orientation -- every field offset, argument, and control-flow edge was independently re-verified against the raw Thumb bytes before being trusted, since m2c mis-modeled both trampoline calls and dropped several arguments entirely), the already-exact siblings games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a per-member 'falling star' battle-presentation sub-effect. Seeds 64 Star records (x,y,z,vx,vy,vz,state; 28 bytes, at 0x02010000) once from a single member's screen position with randomized velocities (state=-1, meaning 'not yet released'). Runs `(Data_080eea41[variant]>>1)+132` animation frames, where `variant` is a small (0..2) field read from the caller's effect-state struct at offset 0x18. Each frame, a per-variant subset of the 64 stars (the raw count at Data_080eea41[variant], up to 64) is walked by index: once `idx/2` frames have elapsed, a still-released(-1) star draws a shrinking trail sprite through the kind-46/47 rectangle-blit callback cache (Data_03001e50[46]/[47]) -- kind 47 while still inside its own `idx/2 .. idx/2+48` window, kind 46 once 48 frames overdue -- sized from its own projected screen distance (Func_080e3944, clamped [160,799]), and its position drifts by its own velocity every such frame. Once 48 frames overdue, the same star is also 're-homed' every frame: its velocity is nudged 1/512 of the way toward its member's live screen position (Func_080b5098), damped to 60/64 strength for frames before `idx/2+85`, full strength after. Once a homed star's Y position crosses above the top of the screen (y<0), it 'lands': state flips to 0, its position snaps to the just-computed projected screen position, a sound cue and a Func_080d6888 dispatch fire at its member, and a work-block flag (offset 0x77A8) is set. Independently, every frame, a second full 64-star scan draws any star whose state is in [0,11] (i.e. just landed) through a fixed twelve-frame 'glint' sequence -- four small per-index tables (Data_080eea44 width, Data_080eea4a height, Data_080eea50 y-delta, Data_080eea56 source offset), always through the kind-47 callback -- incrementing state each frame until it exceeds 11 and the star goes dormant.","The `Data_080eea41`/`44`/`4a`/`50`/`56` tables are new to the tracked corpus (no prior owner references these addresses); their extents were inferred from the reference's own index math (variant in 0..2 for the 3-byte count table; state/2 in 0..5 for the four 6-entry small tables) rather than known table lengths, and are recorded here as u8/u16 arrays with no further symbolic name pending a second owner that shares them.","Callee signatures for Func_080b5070, Func_080b5028, Func_080f9010, Func_080e155c and Func_080b50e8 follow the already-established prototypes from games/gs1/recon/en/main/080d82b0.c, 080d1350.c and 080c91dc.c (all plain s32-argument functions); Func_080022fc's `s32(s32,s32)` prototype and Func_080b5098's `void**(s32)` prototype follow member_orbit/run.c and 080d82b0.c respectively.","The Func_080e0524 id arguments use the established `(s32)&Value_XXXXXXXX` pool-literal idiom (Value_000000b4 already adopted in puff_arc/run.c; Value_00000073 already adopted in games/gs1/recon/en/main/080e01e4.c) rather than plain int literals, matching the family-wide finding that this callee's id argument is always pool-loaded. Func_080ed408's id arguments (46/47) and the tail Func_08002dd8(46/47) calls are plain int literals, matching member_orbit/run.c and puff_arc/run.c exactly -- confirmed from the raw bytes (`movs r0,#46` / `movs r0,#47`, never a pool load) for every occurrence in this owner.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080db264":{"schema_version":1,"namespace":"main","address":"0x080db264","status":"measured-draft","owner_bytes":1124,"score":{"measured":"2026-08-31","candidate_bytes":1088,"reference_bytes":1124,"differing_halfwords":523,"wrong_instructions":425,"class":"structural-topology","note":"Fresh candidate-show score after reconstructing the complete retained-assembly algorithm: 1088/1124 bytes, differing_halfwords=523, wrong_instructions=425, topology=different. This materially improves the failed aggregate-m2c route's only compiling fallback (576/1124, differing_halfwords=555, wrong_instructions=656). The remaining 36-byte extent and topology residual is retained honestly; this candidate claims zero DONE bytes."},"notes":["The aggregate-m2c draft supplied the recovered topology but did not compile; invalid aggregate dereferences and raw pointer arithmetic were replaced with explicit particle records, signed fields, cache/cursor types, and trampoline function-pointer calls supported by the retained assembly. The full initializer, four-pass emitter, 1024-particle update/draw scan, party-member cue loop, frame pacing, and teardown now compile as ordinary C.","No external source, inline assembly, fixed-register variable, compiler flag override, or forced scheduling was used."]},"main:080db6e0":{"schema_version":1,"namespace":"main","address":"0x080db6e0","status":"measured-draft","owner_bytes":1092,"score":{"measured":"2026-08-27","candidate_bytes":1088,"reference_bytes":1092,"differing_halfwords":476,"wrong_instructions":373,"class":"wrong","note":"First pass, no m2c workbench context (family-transplant tool returned 'Function not found' for this owner). Read games/gs1/asm/080db6e0.s directly with a byte-precise pc-relative literal-pool decoder (function offsets confirmed against the 1092-byte total, all 21 pool words resolved). candidate-show verification found zero opcode mismatches across the whole aligned comparison -- every '!' row has the identical mnemonic on both sides, only registers/stack-offsets/pc-pool-offsets differ -- so the remaining gap is register-allocation/frame-layout residual, not a control-flow or instruction-selection error. Two real bugs were found and fixed during iteration: (1) two of the reference's 'halve a value' sites are plain arithmetic right-shifts (`>>1`, no sign-extension correction), not genuine signed division -- confirmed by the absence of the `lsrs r,r,#31 / adds` correction pair before the `asrs` in the retained assembly at those two sites, versus its presence at a third site (the depth-index halving) which does need `/2`. (2) the near-particle draw's width/height halving reads a `u16` table value and shifts it with `lsrs` (unsigned) in the reference, not `asrs`; forcing that with `(u32)size >> 1` reproduced the reference's exact lsrs/subs/subs triple one-for-one. Introducing a genuine `u8 *table = Data_080eeae2;` local (used for the three per-mode loop-bound/gate reads, left as fresh `Data_080eeae2[...]` for the one per-frame sound-cue read that the reference itself reloads fresh) also measurably helped (wrong_instructions 425->349 combined with flattening every temporary to top-level declarations, matching this family's established frame-layout idiom from games/gs1/recon/en/main/080e7404.c) and is evidence-backed: the reference visibly keeps this same table-base pointer live in fp for the whole per-frame loop (`mov fp,r0` once before the loop, reused at every loop-bound test including the final one), which only a genuinely reused pointer value reproduces."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting, as instructed. The assigned template (family score 7873/10000, size mismatch already flagged: 080ce85c's own owner_bytes differ from this owner's 1092) shares the 0x03001eec heap_cache/work-pointer prologue, the work+0x7828 object field, the Value_ pool-symbol convention, and the DrawRectangleFn/WordCopyFn trampoline call shapes -- all reused here directly. But the actual per-frame body does not match at all: this owner has no member-orbit sprites (no Func_080b5098 member-lookup call, no Func_08002322/Func_0800231c sine/cosine calls, no per-frame scanline sweep at work+0x6980 anywhere in the retained assembly). Instead it runs two independently-seeded particle arrays (32 entries at work+0x7080, 1024 entries at the fixed EWRAM buffer 0x02010000, both stride 0x1C, both built from Func_08004458-masked RNG triples) through a while loop whose iteration count and two active-particle counts come from a 3-bytes-per-row lookup table at 0x080eeae2, indexed by a runtime mode selector (mode forced to 1 by the palette-generation variant, otherwise read from the caller object's offset 24). Per-member sound cues fire on a flat `frame == member_index + 6` trigger (Func_080d6888 always, plus Func_080b5088 only when variant==0), not the template's `frame == member*16+32` windowed-orbit trigger.","actual_sibling_evidence":"games/gs1/recon/en/main/080e7404.c (dossier 080e7404.json) is the real structural sibling, in the same '0x03001eec battle work' family the task pool names explicitly: identical Func_080cd594(mode)/Func_080e0524(id,work,a,b)/Func_080ed408(id,a,b,c,d)/Func_080041d8(cb,interval)/Func_08004278(cb)/Func_08002dd8(id)/Func_080cdbc0()/Func_08004458()/Func_080e38b8(rec,a,b) call shapes; the exact same finish-callback pointer 0x080CD261; the same 128-record/512-record particle-initializer idiom (masked-RNG field 0xC/0x10/0x14 triples at a fixed EWRAM buffer, this owner's own two initializer loops are the same shape at 32 and 1024 entries); and the same Data_03001e50/Data_080ede48 symbols, reused verbatim here."},"rejected_experiments":[{"experiment":"nested block scope for each loop's counter/pointer temporaries (i, entry) rather than flat top-level declarations","result":"compiled to a 44-byte candidate stack frame against the reference's true 56 bytes (12 bytes short) and only matched_prefix through the very first few instructions; flattening every temporary to the top of the function (matching 080e7404.c's own established style) grew the candidate to the full 1092 bytes and dropped wrong_instructions 425->349 in one step"},{"experiment":"leave every Data_080eeae2[...] read as a fresh array index with no cached base pointer","result":"wrong_instructions 389 (worse than the cached-pointer version); the reference visibly keeps the table base live in fp across the whole per-frame loop (reused at every loop-bound test), so a genuinely reused `table` local was introduced for those three sites and the sound-cue site was left as a fresh index (matching the reference's own fresh reload there)"},{"experiment":"grayscale-ramp color OR order `(gray<<5)|(gray<<10)|gray` vs `(gray<<10)|(gray<<5)|gray`","result":"only the `(gray<<10)|(gray<<5)|gray` order reproduces the reference's `lsls r1,r3,#5` (temp) then `lsls r2,r3,#10` (accumulator) instruction pair; the other order swaps which shift becomes the accumulator"},{"experiment":"declare `size` (a `u16` table value used for a centering halve) as plain `s32` and divide by 2","result":"produces `asrs` with a sign-extension correction, not the reference's plain `lsrs`; fixed by shifting an explicit `(u32)size` instead"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080db6e0.s, byte-precisely address-decoded to resolve all 21 pc-relative literal-pool words by hand since no m2c workbench context exists for this owner), the approved local EN ROM, the already-exact template games/gs1/src/battle/effects/member_orbit/run.c, the measured-draft sibling games/gs1/recon/en/main/080e7404.c and its dossier, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a battle/overlay particle-field effect (retained assembly already names it RunParticleFieldEffect; kept as the registered name in games/gs1/source-paths.json, the working C symbol stays Func_080db6e0 for candidate-show tooling). Two arguments: an object pointer republished at work+0x7828, and a variant selector. variant==1 procedurally builds a 64-entry grayscale BG palette ramp and forces mode=1; other variants load a palette resource via Func_08002f40 and take the runtime mode from the object's offset 24. Seeds a 32-entry 'near' particle array at work+0x7080 and a 1024-entry 'far' particle array at the fixed EWRAM buffer 0x02010000 (both stride 0x1C, masked-RNG velocity/position fields, status word driven by the object's own field-4 flag). Registers a single kind-46 rectangle-blit callback and runs a per-frame while loop, bounded and gated by a 3-bytes-per-mode lookup table at 0x080eeae2 ([far_active_count, near_active_count, total_frames]): each frame projects and draws up to far_active_count far particles through a depth-bucketed sprite table (Data_080ede48), progressively reveals near particles (index < frame) through a growth-animated sprite pair (Data_080eeaec/Data_080eeafa) for their first 20 frames, cues one or two per-member sound effects on a flat frame==member_index+6 trigger, and tears the callback/palette-kind down at the end.","The 'wrong' class and the 476/373 residual are entirely register-allocation/frame-layout: candidate-show's aligned comparison shows zero opcode mismatches anywhere in the function. The dominant, already cross-family-documented open question (games/gs1/recon/en/dossiers.json#main:080d59b0's own notes describe the identical phenomenon on a sibling in this same 0x03001eec family) is that the reference keeps `work` in sl for the whole function; this compiler keeps choosing r9 for it here instead, which frees sl for other uses (this owner's particle-loop pointer) and in turn changes which values get spilled to stack at the two DrawRectangleFn call sites -- both sides spill canvas+draw_rectangle there, just at stack offsets shifted by the resulting frame-size gap (48 vs the reference's 56, an 8-12 byte gap depending on measurement point). 080d59b0.json already tried and rejected declaration-order/scope permutation for exactly this fp/r9-class choice on a sibling owner sharing the identical work-block idiom; that finding is treated as controlling here rather than re-run, per CONTRIBUTING.md's ban on forcing register assignment or open-ended permutation search once the residual is confirmed register-class-only.","No GS2 or external source, no other Golden Sun decompilation project, and no gsret disassembly were consulted. Only this repository's own retained assembly, approved ROM, adopted exact sources, in-repo headers, and approved compiler were used."]},"main:080dc1ec":{"schema_version":1,"namespace":"main","address":"0x080dc1ec","status":"measured-draft","owner_bytes":616,"score":{"measured":"2026-08-27","candidate_bytes":604,"reference_bytes":616,"differing_halfwords":272,"wrong_instructions":155,"class":"wrong","note":"Fifth pass: re-checked the panel's previously-rejected 'two independent velocity accumulators' experiment now that the r4-trampoline fix shifted the whole function's register-pressure landscape, per this pass's own instruction. On the new baseline it is a real, substantial win rather than the regression it was before: changed the inner loop's velocity update from a single accumulator (velocity_b = -velocity_a recomputed fresh every iteration) to two independent accumulators at the loop bottom (`velocity_b -= outer << 3; velocity_a += outer << 3;`, in that statement order -- the reverse order scored one wrong_instruction worse). Effect: `work` now lands in fp, matching the reference, for the first time since the r4-fix landed -- confirmed via --align: `mov fp, r2`, `add r5, fp`, `mov r1, fp`, and the stack frame size (sub sp,#52) are all byte-identical to reference now. star->r6, j->r7, and velocity_b->r8 also now match exactly. differing_halfwords 278->272, wrong_instructions 185->155 (a 30-instruction drop, the strongest evidence yet this whole line of fixes is real). Traced the actual REG_ALLOC_ORDER in alchemy-gcc/agscc/gcc/config/arm/arm.h ({r3,r2,r1,r0,ip,lr,r4,r5,r6,r7,r8,sl,r9,fp,sp,pc,...}) to characterize the one remaining register mismatch precisely: candidate puts velocity_a->sl, outer->r9; reference has them reversed. Tried ~8 targeted reshapes to flip this specific swap (M2C_FIELD/draw_destination read order, local declaration order, hoisting velocity_a/velocity_b init earlier, an explicit neg_outer variable mirroring the reference's spilled -outer, an explicit named step variable, deriving velocity_a from velocity_b instead of vice versa, reversing the outer>quarter comparison operand order, reshaping the (j>=0?j:j+3)>>2 ternary into an explicit if) -- every one either had zero effect or regressed (one badly, evicting work from fp again). All remaining diff regions (an interleaved-vs-duplicated scheduling difference in the star decay block, an extra branch+duplicate shift in both quarter-ternary computations, and pop{r0} vs pop{r1} in the epilogue) trace back to this same sl/r9 swap rather than being independently fixable. Confirms this register choice is genuinely sensitive to something not yet identified, not a fixed rule -- not pursued further per the ban on forcing register assignment. Still not exact. Fourth pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27d":"Fourth pass: resolved the family's cross-owner 'Func_080072f4 5th-argument-in-r4' mystery, which every prior pass (this owner and all three siblings) had flagged as a genuinely unprecedented, unresolvable ABI quirk. It is not an ABI quirk. games/gs1/asm/080072e4.s (kind runtime_thunk_bundle) is fourteen `call_via_rN` trampolines (`bx rN; mov r8,r8`, 4 bytes each) at 0x080072e4+4*N for N=r0..sp; 0x080072f4 is exactly the r4 entry (4th slot: r0,r1,r2,r3,r4 -> 0x080072e4,e8,ec,f0,f4). `bl Func_080072f4` in the retained assembly is `bl `, an INDIRECT call through whatever function pointer is in r4 at the call, not a direct call to a real 7-argument function. Confirmed definitively three ways: (1) `arm_function_arg` in alchemy-gcc/agscc/gcc/config/arm/arm.c returns NULL_RTX (stack) once 4 registers are used, with zero special-case logic for a 5th register argument -- this compiler's own source proves it can never place ANY argument in r4; (2) tracing the value loaded into r4 right before the call back to its origin shows it comes from `add r1, sp, #20; bl Func_080cef64` earlier in the function -- exactly sp+20, the address passed as `out_pair` to Func_080cef64, i.e. r4 holds callback_pair[0], the draw-callback function pointer, not a plain argument; (3) the already-adopted games/gs1/src/battle/effects/member_orbit/run.c (main:080ce85c) already models this exact pattern correctly as `((DrawRectangleFn)rectangle_slot[slot & 1])(canvas, src, x, y, 32, 32)` -- a cast-and-call through a function-pointer array slot, not a call to a symbol named Func_080072f4 at all. Rewrote this owner's call the same way: `((DrawRectangleFn) callback_pair[0])(draw_destination, (void*)(src_off+(s32)work), y, h, raw, raw<<1)`, a 6-argument indirect call matching DrawRectangleFn's real signature, and removed the fictional `void Func_080072f4(s32,s32,s32,s32,DrawRectangleFn,s32,s32)` prototype entirely. Verified structurally against games/gs1/asm/080dc1ec.s via --align: the candidate now reproduces the reference's exact 'stage w/h to stack, reload dest+callback from earlier stack slots into r0/r4, bl ' instruction pattern at the call site, byte-for-byte in shape (only the absolute stack offsets differ, tracking an overall frame-size difference). Also fixed a second, smaller finding surfaced by --align once the call was correct: `Func_080e0524(140, work, 1, 1)` -- the reference loads 140 from the literal pool (`ldr r0,[pc,...]`), not a `movs` immediate, matching the established Value_XXXXXXXX idiom; changed to `Func_080e0524((s32)&Value_0000008c, work, 1, 1)`. Net effect of both fixes: wrong_instructions dropped sharply (235->185, the strongest evidence this is a real correctness gain) while differing_halfwords rose slightly (245->278) and candidate_bytes shrank (612->592) -- the same 'small metric regression traded for real correctness' pattern already validated repeatedly this session (see prior_note_2026_08_27b), not a reason to revert. matched_prefix also dropped (12->7), confirming register allocation is globally sensitive to this fix the same way the dispatch-shape lever proved earlier -- the panel's three merged wins (dispatch-shape/clamp-locals/array-locals) may partially or fully re-apply differently now that the call site is modeled correctly; a follow-up pass should re-attempt them against this new baseline before assuming they still hold. The dominant remaining divergence is now the already-documented work-register choice (candidate keeps work in r9, reference in fp, diverging from the very first `mov`/`ldmia` sequence) -- unchanged by this pass, deliberately not chased further here. This finding applies to all three siblings (080e01e4, 080d82b0, 080d59b0) that share the identical fictional Func_080072f4 call pattern; fixed there too in the same session pass, see their own dossiers.","prior_note_2026_08_27c":"Third pass: a 4-way diverse-lever panel (four isolated worktree agents, each attacking a different, non-overlapping section of the function) ran against the 277-dh/270-wi baseline from prior_note_2026_08_27b. Two levers were pure no-ops on differing_halfwords (a setup-section reshape, and extracting `j & 3` into a named local under the switch); two produced real, independently-verified improvements, and both merged cleanly since they touch disjoint code: (1) dispatch-shape -- rewriting the `switch (j & 3)` 4-way dispatch as an if-else chain shaped to match the reference's own compare tree (`selector > 1` first, splitting into the {2,3} and {0,1} groups) changed register-allocation decisions across the WHOLE function, not just locally, dropping differing_halfwords 277->246; (2) clamp-locals -- `half = (raw + ((u32) raw >> 31)) >> 1` was compiling to a logical `lsrs` instead of the reference's arithmetic `asrs`, because `(u32) raw >> 31` promotes the whole sum to unsigned under the usual arithmetic conversions even though the result is stored into an s32; casting back to `(s32) ((u32) raw >> 31)` before the addition restored the signed sum and the asrs, though on its own this only changed wrong_instructions (270->268), not differing_halfwords. A third, independently-tried lever (array-locals: recomputing `star = (u8*)0x02010000 + j*28` inside the loop instead of resetting once and incrementing by 28 each iteration) scored 276/252 alone and also merged cleanly. All three combined: differing_halfwords 245, wrong_instructions 235 (down from 277/270) -- the merge is strictly additive, better than any single lever. Still not exact. The panel's dispatch-shape agent traced the residual precisely: the reference keeps five persistent registers across both loops (sl=outer, r8=velocity_b, r9=velocity_a, r6=star, r7=j) where this compiler's allocator, given the prior pass's already-validated single-accumulator velocity model, only needs four and picks a different assignment -- this is a direct, provable consequence of the velocity-computation shape decision (deliberately not revisited by this panel, per its own scope), not of anything in the three sections actually changed this pass.","prior_note_2026_08_27b":"Second pass, evidence-grounded (not permutation). Fixed the work/draw_destination read from two independent *(void**)0x03001EEC / *(void**)0x03001EF0 dereferences to the cursor-advance idiom already used by the adopted 080ce85c.c sibling (`cursor = ...; work = *cursor++; draw_destination = *cursor;`), which matches the reference's `ldmia r3!, {r2}` and pulls matched_prefix from 7 to 12 instructions immediately. Then found and fixed a real semantic bug: the inner j-loop's velocity_a/velocity_b arguments (passed to Func_08004c1c/Func_08004bd4/Func_08004c6c) are NOT loop-invariant per outer pass as the previous draft modeled -- the retained assembly's .L2 loop-bottom block increments r8/r9 by +-(outer<<3) on every one of the 64 inner-loop passes, unconditionally (both the gated and ungated path reach .L2), so velocity_a actually equals (outer<<8) + j*(outer<<3) at iteration j, not a constant outer<<8. Rewrote as `velocity_a = outer<<8` once per outer pass, `velocity_b = -velocity_a` recomputed fresh at the top of every j iteration, and `velocity_a += outer<<3` at the loop bottom. differing_halfwords went from 263 (old, wrong-semantics baseline) to 277 (new, correct-semantics candidate) -- a real but small regression traded for actual correctness, not noise; do not revert to the constant-velocity model.","prior_note_2026_08_27a":"First structural draft, not a permutation search. One full read-through of the retained assembly, cross-checked against the exact label placement in games/gs1/asm/080dc1ec.s to confirm loop nesting (the outer 160-pass animation loop's body starts at .L16, which sits immediately after the single-particle facing/portrait setup, so that setup genuinely re-runs every outer pass rather than once). Corrected a type-safety bug found while cross-checking against 080e01e4 -- the single-word `DrawRectangleFn callback;` local was undersized against Func_080cef64's real two-word write (confirmed by the already-adopted runtime_owner_21.c); replaced with `callback_pair[2]`. Score at that point: candidate=624 reference=616 differing_halfwords=242 class=unemittable."},"family":{"assigned_template_owner":"main:08099160","assigned_template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Same mismatch as the other three owners assigned alongside this one: no shared callees with RunOrbitingParticleEffect, and the control flow (a fixed 256-slot particle-pool seed, then 160 outer animation passes each re-walking 64 of those slots) does not resemble the template's single 15-iteration spawn loop.","actual_sibling_evidence":"Same 0x03001eec work-block subsystem as 080d59b0/080d82b0/080e7404: identical Func_080cd594(mode)/Func_080e0524(id,work,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() shape and the same *(void**)0x03001EEC/0x03001EF0 work/draw_destination globals, now read via the cursor-advance idiom (`cursor = (void**)0x03001EEC; work = *cursor++; draw_destination = *cursor;`) confirmed to match the reference's `ldmia r3!, {r2}` exactly, same idiom already used by the adopted 080ce85c.c. This owner is the first of the four to call Func_080cef64(flag, out_pair). Per the already-adopted games/gs1/src/battle/effects/fetch_rectangle_blitters.c, Func_080cef64 unconditionally writes TWO words into out_pair -- Data_03001e50[46] then Data_03001e50[47] (the kind-46 and kind-47 allocator-cache slot values), regardless of the flag argument, which only selects which Func_080ed408 load parameters precede each write. Only callback_pair[0] (the kind-46 slot) is read downstream in this owner, callback_pair[1] is dead here.","velocity_growth_finding":"The inner j-loop's velocity arguments are NOT constant per outer pass: the retained assembly increments r8 (velocity_b, initialized to -(outer<<8)) and r9 (velocity_a, initialized to outer<<8) by -+(outer<<3) at the bottom of EVERY one of the 64 j-iterations (label .L2, reached unconditionally regardless of whether the gated draw code fired that iteration). velocity_a_j = (outer<<8) + j*(outer<<3); velocity_b_j is always exactly -velocity_a_j. This is worth checking against 080d59b0/080d82b0/080e7404 if any of them have a similar per-outer-pass velocity/angle argument passed into a small dispatch of 3-4 callees selected by (loop_index & 3) -- the same growth pattern likely recurs.","register_pressure_lever":"Concrete lever confirmed this pass: expressing the per-iteration velocity growth as `velocity_a += outer << 3;` (recomputed inline, no named intermediate) at the loop bottom, combined with computing velocity_b fresh via `velocity_b = -velocity_a;` at the top of each iteration (NOT as its own independent accumulator incremented by -outer<<3), keeps this compiler's register allocator inside the budget that lets `work` stay in fp for the whole function. Every variant tried that gave velocity_b its OWN persistent accumulator (whether via `velocity_b += -outer<<3` directly, via a named `neg_outer` variable, or via two independent inductions) pushed `work` out of fp entirely into a stack spill (regressing to candidate=640-664, differing_halfwords=288-302), even though the reference itself DOES use two independent accumulators (r8 and r9 both incrementing). This compiler's specific allocator does not tolerate the same register pressure our source produces for a functionally-identical dual-accumulator formulation, so the single-accumulator-plus-fresh-negation shape, despite being structurally different from the reference's r8/r9 pair, is the better regression-free way to express this pattern under real register pressure. Still short of matching reference's exact fp=work/sl=outer/r8=velocity_b/r9=velocity_a/r6=star/r7=j register assignment (candidate lands on fp=work/r9=outer/sl=velocity_a/r8=j/r7=star instead) -- worth a future pass with more register-allocation experimentation budget."},"rejected_experiments":["Panel pass: setup-section reshape (facing/Func_080049ac/Func_080051d8/Func_08004cb4 statement order and declaration placement at the top of the outer loop) -- zero measured effect, byte-identical output to baseline.","Panel pass: extracting `j & 3` into a named `selector` local while KEEPING the switch statement -- zero measured effect, GCC already CSEs the repeated `j & 3` regardless of naming; the win came specifically from replacing switch with an if-else chain, not from naming the selector.","Panel pass: within the winning if-else dispatch shape, a handful of alternate orderings (symmetric {0,1}/{2,3} grouping, swapping the inner case2/case3 test order) all scored worse (620/281 or 612/266) than the kept `selector > 1` first, {2,3} then {0,1} ordering.","Explicit `neg_outer = -outer;` variable (mirroring the reference's spilled -outer at sp+8) combined with either the accumulate-style or multiply-style velocity update: regressed `work` out of fp every time (matched_prefix dropped from 12 back to 7), regardless of where the variable was declared (function scope vs block scope -- declaration order/scope had zero measured effect on this compiler's allocation, only the actual computational shape mattered).","`velocity_a = (outer<<8) + j*(outer<<3)` computed fresh every iteration (letting the compiler's strength reduction alone do the work, no manual accumulation): produces the correct semantics and the compiler DOES strength-reduce it into a running accumulator, but this shape still regressed `work` out of fp (candidate=640, dh=290) -- worse than the manual single-accumulator-plus-negation shape (candidate=624, dh=277).","Two independent accumulators (`velocity_a += step; velocity_b -= step;`, with or without a named hoisted `step = outer<<3`): regressed to candidate=644-664, dh=288-302, always by evicting `work` from fp -- this is the shape closest to what the reference's own r8/r9 registers literally do, but this compiler cannot afford it alongside everything else without spilling `work`.","Swapping which of velocity_a/velocity_b is the persistent accumulator (`velocity_b` as accumulator, `velocity_a = -velocity_b` fresh): candidate=628, dh=283 -- slightly worse than velocity_a-as-accumulator (dh=277), kept the latter.","do-while vs for loop shape for the inner j-loop, tried both before and after the velocity-growth fix: zero measured effect on differing_halfwords in either case for this specific loop. (Earlier session hint that loop shape 'changes which locals get spilled' did not reproduce here.)","Chased the Func_080072f4 5th-argument-in-r4 call convention by checking whether the byte-exact sibling 080ce85c.c (member_orbit) proves the compiler can do this naturally: it does NOT -- member_orbit's apparent 7-arg Func_080072f4-shaped call is actually an INDIRECT call through a function-pointer value (`((DrawRectangleFn)rectangle_slot[slot & 1])(...)`, only 6 args), compiled via a `_call_via_r4` trampoline, a completely different mechanism from 080dc1ec's direct `bl Func_080072f4` with 7 literal arguments. No adopted source anywhere in games/gs1/src/ currently calls Func_080072f4 directly with 7 args, so this remains a genuinely unsolved, unprecedented calling-convention question -- not something this pass could responsibly resolve without inventing compiler behavior. Left as-is, matching the prior draft's decision not to re-litigate it.","Prior pass (see prior_note_2026_08_27a): result[2] clamp direction was initially inverted (fixed), and an overcomplicated table-lookup offset derivation was simplified to `(j & 3) * 770 + Data_080ede48[raw - 1]` (kept, still correct)."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080dc1ec.s), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080e01e4.c and their dossiers, the adopted games/gs1/src/battle/effects/puff_arc/run.c and member_orbit/run.c (including a temporary git-history restore of member_orbit's already-deleted retained asm, games/gs1/asm/080ce85c.s, from commit 629f662e7^, purely to re-verify its compiled register pattern for the r4-convention investigation above; the file was deleted again immediately after and is not present in the working tree), in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary (revised): a single-target (not per-member-list) battle-presentation sub-effect. Seeds a 256-slot particle pool at 0x02010000 with random signed positions and zeroed velocity/lifetime fields, sets up one fixed 3-word draw record (0,160<<15,0), then runs 160 animation passes. Each pass re-establishes the facing/portrait draw, computes a per-pass base velocity pair (velocity_a = outer<<8, velocity_b = -velocity_a) and then walks the first 64 pool slots; velocity_a/velocity_b GROW by +-(outer<<3) every one of those 64 sub-steps regardless of whether a slot fires, so the velocity kick applied to a firing slot depends on both the outer pass number and how far into the 64-slot inner walk it is. Once a slot's activation threshold (a function of its index divided by 4) is crossed and it is still marked inactive, it fires one of four velocity-kick calls selected by (index & 3) using the current velocity_a/velocity_b, transforms it through Func_080e3944, clamps and buckets the transformed distance into a lookup-table draw offset, and draws it via Func_080072f4; independently, once a slightly later threshold is crossed, the slot's position is decayed by a shifted, negated velocity term every pass (simple drag).","RESOLVED this pass: 'Func_080072f4' is not a real function. It is the r4 entry of the fourteen-slot _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s; every call modeled as `Func_080072f4(dest,src,x,y,callback,w,h)` is really an indirect call `((DrawRectangleFn)callback)(dest,src,x,y,w,h)` through the function pointer that ends up in r4. See score.note for the full derivation (arm_function_arg proof, r4-value provenance trace, cross-check against the already-adopted member_orbit/run.c's identical idiom). Remaining open question: getting this compiler to match the reference's exact fp=work/sl=outer/r8=velocity_b/r9=velocity_a/r6=star/r7=j register assignment rather than the leaner-but-different assignment this candidate currently produces -- unaffected by the r4 fix.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080dc454":{"schema_version":1,"namespace":"main","address":"0x080dc454","status":"measured-draft","owner_bytes":616,"score":{"measured":"2026-08-27","candidate_bytes":612,"reference_bytes":616,"differing_halfwords":229,"wrong_instructions":244,"class":"wrong","note":"First pass, drafted from games/gs1/asm/080dc454.s and the m2c-assisted disassembly at out/family-transplants/main-080dc454/m2c/target.canonical.s, adapting the family template games/gs1/src/battle/effects/member_orbit/run.c (owner 080ce85c, exact/adopted) rather than copying its unadapted transplant seed. Confirmed real structural differences from the template by reading the retained assembly directly, not by assuming the template's body: this owner takes no argument (r0 is clobbered before ever being read, so work's 0x7828 state pointer must already be established by a prior call); it registers only one draw routine (heap kind 46, no kind 47) and only one periodic callback (0x080CD261, no 0x080DBB9D) and tears down only that one pair at the end; it reads `facing` once before the frame loop instead of every frame; it has an entirely new 64-entry/28-byte-stride record table at work+0x7080 with no member_orbit counterpart, zeroed before the main loop; and its per-member drawing is 3 sprites indexed by member*3+i with a persistent per-slot angle accumulator (field 0xC, advanced by 0x200 every draw) plus a static i*0x5555 per-sprite offset, rather than the template's 4-sprites-recomputed-from-frame-number. Verified the two `bl Func_080072f0` / `bl Func_080072f8` sites are indirect calls through games/gs1/asm/080072e4.s's r3 and r5 call-via slots respectively (not real Func_080072fN symbols): the r3 site is modeled with the template's own proven idiom `((WordCopyFn)0x03001388)(dest, src, words)`; the r5 site's pointer is heap_cache[7] (the kind-46 draw routine), stored in a local `rect_fn` and called as `((DrawRectangleFn)rect_fn)(...)`, since r5 is not one of the four APCS argument registers. candidate-show --align confirms the first 11 instructions (the full heap_cache/cursor/facing prologue through the mode-1 Func_080cd594 call) are byte-identical (matched_prefix=11), and every branch target and call site in the normalized diff lines up positionally with no opcode mismatches -- the entire 229-halfword residual is `!`-class operand substitutions (registers and their matching stack-spill offsets), not a missing or extra instruction shape, control-flow difference, or wrong call target. The dominant single cause is that this compiler keeps `work` in fp for the whole function where the reference keeps it in r9 (and correspondingly the member-loop `screen[2]` local, which the reference keeps in fp, is fully stack-spilled here instead of getting any high register at all); nearly every other `!`/`+`/`-` line in the diff is a direct downstream consequence (the reference's `mov r5,r9; ldr r3,[r5,r2]` register-indexed-load idiom for repeated work->0x7828 reads becomes this candidate's `ldr r3,[pc,#N]; add r3,fp; ldr r3,[r3,#0]` fresh-pool-reload idiom instead, and every stack slot after the first spill shifts by 4-8 bytes along with the smaller 80-byte vs 88-byte frame). This is the exact fp/r9 residual already documented independently on three siblings in this same family (games/gs1/recon/en/dossiers.json#main:080d59b0, 080d82b0.json is its origin point, 080dc1ec.json) for the same shared 0x03001eec work-block idiom; see rejected_experiments below for this owner's own from-scratch confirmation that it is not source-shape-controllable here either."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; family score 8847/10000, the tool-assigned template for this owner. Structurally related (same 0x03001eec work-block idiom, same Func_080cd594/Func_08002f40/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 call shapes, same 0x7780/0x7784/0x7824/0x7828 field offsets, same WordCopyFn-via-call-via-r3 idiom), but not identical: this owner is 616 bytes vs the template's 724, takes no argument, has half the draw/callback setup, and replaces the template's per-frame BG2-affine sine-sweep table and frame-recomputed 4-sprite orbit with a persistent 64-slot angle-accumulator table and a 3-sprite-per-member orbit. The out/family-transplants/main-080dc454/080dc454.c seed was read but not used verbatim -- it is only the template's source with the symbol renamed, not adapted to this owner's real control flow."},"rejected_experiments":["Scoping `screen`/`screen2`/`record`/loop temporaries into their tightest enclosing block (matching the template's own nested-declaration style) instead of declaring everything at function top level: byte-for-byte identical candidate-show output (612/616/229/244) in both directions -- this compiler's register allocator is insensitive to C89 lexical declaration scope for this owner, as already found independently on sibling 080d59b0.","Reordering the top-level scalar-local declarations (moving `work` to the end of the declaration list, after canvas/palette/status/rect_fn/facing/y_offset): no change at all (612/616/229/244) -- declaration order does not affect this compiler's pseudo-register priority for this owner either.","Widening the `screen`/`screen2` member-loop buffers from 2 words to 3 (matching the template's 3-word `screen[3]`, on the theory that the reference's 8-byte-larger frame meant a missing third word): regressed to 640/616/271/260 and lost 2 bytes of matched_prefix -- these buffers are genuinely 2 words each; the frame-size gap is a downstream spill-slot symptom of the fp/r9 register choice below, not a missing local.","Introducing a named `state` local reassigned via `state = M2C_FIELD(work, void **, 0x7828);` immediately before every dereference (matching the 080d82b0.c sibling's own `target = M2C_FIELD(...)` re-assignment style, instead of nesting the field read inline at each use site): regressed slightly to 612/616/230/258 -- reverted to the inline nested form.","These four experiments independently reproduce the same conclusion 080d59b0.json and 080dc1ec.json already recorded for two other members of this family: this compiler's choice of fp over r9 for a whole-function loop-invariant work-block pointer is not controllable from declaration order, block scope, buffer sizing, or inline-vs-named field-read spelling. Per the project's standing guidance for this documented residual class, no register-hint hack or open-ended permutation search was attempted to force r9."],"bounded_flag_probe_2026_08_31":{"baseline":{"candidate_bytes":612,"reference_bytes":616,"differing_halfwords":229,"wrong_instructions":244,"work_register":"fp","stack_frame_bytes":80},"best_shipped_route":{"flags":["-fno-rerun-cse-after-loop"],"candidate_bytes":616,"reference_bytes":616,"differing_halfwords":208,"wrong_instructions":224,"work_register":"r9","stack_frame_bytes":80,"topology":"equal"},"neutral":["-fno-regmove","-fno-schedule-insns","-fno-cse-follow-jumps","-fno-thread-jumps"],"strictly_closer_but_not_best":{"-fno-gcse":226,"-fforce-addr":227},"regressed":["-fno-schedule-insns2","-fno-expensive-optimizations","-ffixed-r8","-ffixed-r9","-ffixed-r10","-ffixed-r11","-fcall-used-r8","-fcall-used-r9","-fcall-used-r10","-fcall-used-r11"],"compositions":"Adding -fno-gcse, -fno-regmove, -fno-schedule-insns, -fno-cse-follow-jumps, or -fno-thread-jumps to the best route did not improve 208 halfwords; adding -fforce-addr regressed to 226.","verdict":"The shipped flag changes the exact family-wide fp/r9 allocation decision and restores exact owner extent, but does not make the owner byte-exact. This is evidence for parent classification review, not an adopted per-owner route."},"compiler_backend_evidence_2026_08_31":["The allocator decoder identifies pseudo 34 as the source variable work: 18 uses across 175 instructions, one definition, no deaths, and 15 crossed calls. Canonical allocation maps it to r11/fp while the retained owner maps the same lifetime to r9.","With the single shipped optimization change -fno-rerun-cse-after-loop, the generated instruction stream changes mov fp,r1 to mov r9,r1 exactly as the reference does, and every subsequent palette-copy use also changes from mov r1,fp to the reference's mov r1,r9. The candidate simultaneously becomes exact-extent and equal-topology.","The remaining 208 halfwords retain the 80-byte candidate frame versus the reference's 88-byte frame and different promotion/spill choices for member-loop arrays and counters. No ABI allocation flag improves them; every -ffixed-rN and -fcall-used-rN probe for r8-r11 regresses to 291-294 halfwords and changes extent to 620 bytes.","The decoder's only structural suggestion was a member-count guard inversion. Rewriting the C as an explicit empty zero-count arm plus else compiled byte-identically, confirming GCC folds that spelling before allocation. The edit was reverted."],"notes":["Recovered only from games/gs1/asm/080dc454.s, the m2c-assisted disassembly and context under out/family-transplants/main-080dc454/m2c/, the adopted template games/gs1/src/battle/effects/member_orbit/run.c, sibling drafts games/gs1/recon/en/main/080d82b0.c and 080e7404.c (and their .json dossiers) for the shared 0x03001eec work-block field/callee vocabulary, games/gs1/asm/080072e4.s for the call-via trampoline layout, and the approved local EN ROM/compiler. No other Golden Sun decompilation project, symbol map, or pseudocode dump was consulted.","This candidate claims zero DONE bytes; it is a measured-draft, not adopted.","Semantic summary: a small battle-presentation sub-effect sharing the 0x03001eec work block with 080ce85c and its siblings. Takes no argument (its state pointer must already be set up by a caller). Opens one display window (heap kind 46), copies a palette through the shared IWRAM word-copy routine, and sets a BG2-affine-related pair of work fields to (1,0) then (2,75) before registering one periodic callback (0x080CD261, 0x480-frame interval). Computes a vertical offset from state field 4 and writes it (shifted) to the BG affine Y register, then zeroes a new 64-entry/28-byte orbit-angle record table. Runs member_count*16+64 frames; each frame re-derives every listed party member's screen position via Func_080e396c (adjusted by the vertical offset) and, for the 64-frame window each member is active, also calls Func_080e3944 on that member's 3D position for its side effects only, then draws 3 sprites per member orbiting a persistent per-slot angle accumulator advanced by 0x200 per draw, spaced 120 degrees apart, through the single traced draw-routine function pointer.","Value_000000a9 follows the established Value_ spelling for a small absolute link-time resource id (games/gs1/src/battle/effects/member_orbit/run.c's own Value_000000af comment documents the same reasoning: an ordinary integer literal would compile to a `movs` immediate, not the reference's literal-pool load).","Func_080e396c(s32 member_id, s32 *screen) is a distinct callee from the already-used Func_080e3944(void *source, void *screen): the retained assembly calls the two at different addresses with different argument shapes (member id directly vs. a 3-word position record), so they were declared and used as separate functions rather than assumed to be the same callee."]},"main:080dc6bc":{"schema_version":1,"namespace":"main","address":"0x080dc6bc","status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":684,"score":{"measured":"2026-08-27","candidate_bytes":684,"reference_bytes":684,"differing_halfwords":169,"wrong_instructions":156,"class":"wrong","note":"First structural draft, not a permutation search. Read games/gs1/asm/080dc6bc.s and out/family-transplants/main-080dc6bc/m2c/target.canonical.s in full and hand-derived the whole control-flow/field shape from the retained assembly (the transplant workspace's top-level 080dc6bc.c was only the member_orbit template with the symbol renamed and was not used as source). The shared-family prologue/epilogue and the two Func_080ed408(kind,7,7,c,d)/heap_cache[7]/heap_cache[8] rectangle-callback reads match the assigned template (main:080ce85c, score 8895/10000) exactly, but the body is a different effect entirely: a 64-entry, 28-byte particle table seeded at work+0x7080 (same base and record size as the already-adopted puff_arc/run.c Puff array) with a random polar offset per particle, then 96 frames that walk the member list and, for a member whose 40-frame window is open, draw its 6-particle group through one of two cached rectangle callbacks. Three real structural bugs found and fixed by reading the aligned diff, in order of value: (1) writing the particle-group pointer as ordinary `Particle *` pointer arithmetic (`base_particle_array + base_idx`) let this compiler's loop-strength-reduction turn the per-member `base_idx += 6` accumulator into a pre-multiplied `+= 168` byte-stride induction variable -- the reference instead recomputes `base_idx*28` fresh at each use via an explicit `(base_idx<<3 - base_idx)<<2` shift-sub-shift sequence with `base_idx` itself staying a plain +=6 memory scalar; spelling the multiply out in C the same way (`(base_idx << 3) - base_idx) * 4`) defeated the induction-variable rewrite and was the single largest fix: candidate_bytes 680->684 (byte-count exact), differing_halfwords 234->173. (2) Swapping the two velocity-field multiplications from `magnitude * Func_08002322(angle)` to `Func_08002322(angle) * magnitude` (and the sine equivalent) flipped which operand this compiler copies into the destination register before the `muls`, matching the reference's own `adds r3,r6,#0 / muls r3,r0` shape instead of the reverse; differing_halfwords 173->169. (3) Tried moving `member = 0` before the member-count guard to match the reference's own unconditional pre-guard `str r2,[sp,#20]` -- this is a real, observed reference scheduling choice, but on this owner's actual register/frame layout it scored slightly worse (differing_halfwords 234->237 measured against the pre-fix-(1) baseline) rather than better, so it was reverted and left as the original if-scoped declaration. All immediate operands, branch conditions, and call targets in the current aligned diff match the reference exactly; every remaining `!`/`+`/`-` line is either a register-letter swap or a stack-slot-offset shift downstream of one root cause (see family.register_finding below), or a scheduling reorder of independently-valued immediate loads (the `(clamped*9<<7)+0x1B00` source-address computation for the slot-5 draw call is emitted in a different but net-equivalent instruction order, same instruction count both sides) -- exactly the two residual classes this family's dossiers already document as not source-shape-controllable, so neither was chased further."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The prologue (cursor-advance work/draw_destination read, work+0x7828 state publish, Func_080cd594(0)) and epilogue (Func_08004278/Func_08002dd8 x2/Func_080cdbc0) match the template's shape exactly, and the two Func_080ed408(kind,7,7,c,d) + heap_cache[kind-39] rectangle-callback reads are the same idiom -- but the template's own body (a per-member orbiting-sprite draw driven by a 160-entry sine scanline table, two Func_080041d8 periodic-callback registrations, a member_count*16+48 frame count) does not appear here at all. This owner is 684 bytes vs the template's 724 and has a materially different, shorter body: a single Func_080041d8 registration, a fixed 96-frame loop, and a 64-entry particle table with random-polar-offset physics that the template has no equivalent of.","actual_sibling_evidence":"The real body matches the 0x03001eec 'battle work' subsystem documented at games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c, and especially the already-adopted games/gs1/src/battle/effects/puff_arc/run.c: same work+0x7080 28-byte-record particle table base address and record size as puff_arc's Puff array (x,y,unk08,unk0C,unk10,unk14,tick), same heap_cache[kind-39] (Data_03001e50-equivalent) rectangle-callback cache, same work+0x7780/0x7784/0x7824/0x7828 scalar fields, same *(s32*)0x03001E80 'facing' global, same Func_080049ac/Func_080051d8/Func_08004cb4 per-member portrait-setup triple already established (with an identical single-argument Func_08004cb4(record) call) in games/gs1/recon/en/main/080d59b0.c's dossier, and the same count-at-+20/id-array-at-+36 effect-state layout as puff_arc's Efx struct (cnt, actors[8]).","register_finding":"The dominant remaining residual is this compiler choosing r9 for 'work' where the reference keeps it in sl for the whole function (visible from the very first `mov sl,r1` vs candidate's `mov r9,r1`), with 'work'-relative address adds (`add rX,sl` vs `add rX,r9`) and a knock-on loop-counter role swap (particle-init 'i' and the inner draw loop's 'slot' counter: reference reuses r9 for both non-overlapping roles, candidate uses sl) accounting for the large majority of the remaining differing_halfwords. This is the same 'register allocator keeps a loop-invariant address in a different high register' class already documented as not source-shape-controllable elsewhere in this family (member_orbit/080dc1ec/080d59b0 dossiers); declaring `work` first among the locals and scoping the early-dead `palette`/`status`/`particle`/`i` locals into narrower blocks were both tried and had zero measured effect (still 169/156), consistent with that precedent, so neither was kept as a source change.","call_convention_note":"`bl Func_080072f0` (the WordCopyFn palette-blit) and `bl Func_080072f4` (both DrawRectangleFn draw calls) are the r3 and r4 entries of the fourteen-slot `_call_via_rN` trampoline bundle at games/gs1/asm/080072e4.s (`bx rN; mov r8,r8` at 0x080072e4+4*N, N=r0..sp), not real functions named Func_080072f0/Func_080072f4 -- confirmed the same way 080dc1ec.json/080d59b0.json already derived it (arm_function_arg in alchemy-gcc/agscc/gcc/config/arm/arm.c never places an argument in r4; tracing the r3/r4 values back to their origin shows a WordCopyFn pool constant and the two cached heap_cache[7]/heap_cache[8] rectangle pointers respectively) and modeled the same way the already-adopted member_orbit/run.c does, as direct casts-and-calls through function-pointer values."},"rejected_experiments":["Ordinary `Particle *` pointer arithmetic for the group base (`(Particle*)(work+0x7080) + base_idx`): compiles correctly but this compiler's loop-strength-reduction rewrites the per-member `base_idx += 6` accumulator into a pre-scaled `+= 168` byte induction variable instead of the reference's plain `+= 6` scalar with a fresh `(x<<3-x)<<2` multiply at each use; cost 4 candidate_bytes and regressed differing_halfwords from 173 to 234 relative to the fix. Superseded by writing the `(base_idx << 3) - base_idx) * 4` byte-offset expression directly, which reproduces the reference's shift-sub-shift sequence and defeats the induction-variable rewrite.","Hoisting `member = 0` before the member-count guard (matching the reference's own unconditional `str r2,[sp,#20]` scheduling immediately after `facing`): scored differing_halfwords 237 vs 234 on the pre-fix-(1) baseline, a small regression rather than an improvement; reverted to the if-scoped declaration.","Scoping `palette`/`status` and `particle`/`i` into narrower nested blocks to shrink their live ranges ahead of the member-walk loop, hoping to relieve the register pressure behind the sl/r9 work-register swap: zero measured effect (169/156 both ways). Reverted to flat top-of-function declarations matching sibling style.","Declaring `work` as the first local instead of after `heap_cache`/`cursor`: zero measured effect on the sl/r9 assignment (169/156 both ways). Reverted to the more natural heap_cache/cursor/work/draw_destination declaration order."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080dc6bc.s and its m2c-assisted disassembly at out/family-transplants/main-080dc6bc/m2c/target.canonical.s, byte-identical content, cross-checked line by line by hand), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, in-repository headers, and the approved compiler. out/family-transplants/main-080dc6bc/recipe.json and alignment.json were read for the family score and template pointer only; the workspace's top-level 080dc6bc.c (a naive symbol-renamed copy of the template) was explicitly not used as a source basis, per the assignment note that this owner (684 bytes) is not the same body as the 724-byte template.","This candidate claims zero DONE bytes -- differing_halfwords is 169, not zero, so it is not adoption-eligible under the project's zero-differing-reference-bytes gate.","Semantic summary: a battle-presentation sub-effect from the 0x03001eec work-block subsystem. Seeds a 64-entry, 28-byte particle table at work+0x7080 with a random polar offset per particle (masked 16-bit angle, masked 8-bit magnitude via Func_08004458, converted through Func_08002322/Func_0800231c; a modulo-6 'element' of 5 gets a zeroed offset instead of a computed one), loads a palette and BG2/BG3-format sprite sheet into the work block via a WordCopyFn trampoline call, opens two rectangle-blit heap kinds (46 and 47), then runs 96 frames. Each frame replays the shared facing/portrait setup for every listed party member and, for a member whose 40-frame window [member*8, member*8+40) is currently open, walks that member's six-particle sub-group (base index member*6 into the shared 64-entry table) and draws each particle through one of the two cached rectangle callbacks, selecting the callback and a growth-animation source-sprite-sheet offset (0..5, clamped) by the particle's own per-render tick counter, with the group's sixth particle (slot 5) drawn from a second sprite sheet 0x1B00 bytes further into the work block through the kind-46 callback while the other five draw from the base sheet through kind-47.","The particle table's unk0C/unk10 fields (the polar-offset x/y computed at spawn) are written once at init and never read again anywhere in this owner's own retained instructions; only the tick field (+24) is read and incremented per render. This is consistent with -- not contradicted by -- the shared Func_080041d8((void*)0x080CD261, 0x480) periodic callback already treated as an opaque, unrecovered external routine by every sibling in this family; no claim is made here about what that callback does with the table.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted.",{"measured":"2026-08-29","note":"Un-refuted lead: the candidate spends an extra stack slot caching work+0x7828 (sub sp,#68 vs reference sub sp,#64); the reference recomputes the address register-indexed (ldr r3,[r4,r2], r4=sl) at both guard sites without storing it. No spelling tried yet keeps the recompute while avoiding the slot."},{"measured":"2026-08-31","note":"Retained-assembly proof completed: the current canonical compiler reproduces the complete 684-byte extent with equal branch topology. The audited residual is the documented sl/r9 allocation cascade plus the one equivalent work+0x7828 spill/recompute choice and independent immediate scheduling; every call, literal, branch condition, field offset, and memory operation remains accounted for. Relocation-normalized cross-edition verification proves 530 core bytes identical across all six GS1 editions (28 relocations and 10 literal fields normalized). The approved compiler-route/pass matrix preserves the residual or regresses, and the bounded source experiments recorded above do not control the allocation."}],"rejected":[{"hypothesis":"hoist M2C_FIELD(work, void **, 0x7828) into an explicit object_state local reused at all three access sites, to defeat the candidate-only stack-slot caching (frame 68 vs reference 64)","measured":"2026-08-29","differing_halfwords":228,"baseline":169,"verdict":"regressed"},{"hypothesis":"rewrite the loop-end field access as array indexing instead of the M2C_FIELD macro to dodge tree-CSE","measured":"2026-08-29","differing_halfwords":169,"baseline":169,"verdict":"no change; identical instruction stream"}]},"main:080dc968":{"schema_version":1,"namespace":"main","address":"0x080dc968","status":"measured-draft","owner_bytes":2372,"candidate_bytes":2400,"differing_halfwords":1183,"wrong_instructions":1152,"classification":"structural-topology","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted the next-largest no-candidate main-ROM owner after repairing the aggregate-aware m2c draft's invalid pointer and table expressions. A fresh canonical compile produces 2260 bytes for the 2372-byte reference; topology differs and 1164 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","Mechanical repairs resolved the four neighboring work cells at 0x03001eec-0x03001f00, typed GBA register writes, typed u8/u16/s8 ROM-table loads, and signed-halfword member-id access. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The function is a large battle presentation with two particle systems, nine render objects, staged sprite-cell drawing, 220-frame and later particle phases, and member-triggered audio/action calls. A permanent name is deferred until caller and dispatch evidence identifies its role.","2026-08-30: replaced all sixteen fictional direct Func_080072f4 calls with the typed six-argument callback loaded from 0x03001f08. This satisfies the call-via-r4 lint and restores the omitted width/height arguments. The semantically corrected draft is 2400/2372 bytes with differing branch topology, 1183 differing halfwords, and 1152 wrong instructions; the raw score is noisier because the corrected stack arguments change the frame and scheduling, so it remains Draft C and claims zero DONE bytes."]},"main:080dd2c4":{"schema_version":1,"namespace":"main","address":"0x080dd2c4","status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":1208,"score":{"measured":"2026-08-30","candidate_bytes":1208,"reference_bytes":1208,"differing_halfwords":73,"wrong_instructions":60,"class":"allocation","note":"Current exact-extent ordinary-C reconstruction has equal branch topology and 73 differing halfwords / 60 wrong instructions. The residual begins after a 242-instruction exact prefix in the member-blit block: equivalent constants and the work+0x7080 carrier occupy reciprocal low registers, followed by equivalent scheduling of the loop counter and 28-byte pointer increments. The streams resynchronize around every cluster; calls, branches, literals, memory addresses, values, and observable behavior agree.","fixes_applied":"Earlier structural recovery brought the owner from 1196 to the exact 1208-byte extent, fixed work in fp, preserved the reference's 56-byte frame, modeled all four r4-trampoline calls as genuine indirect DrawRectangleFn calls, and reduced the score from 505 to 73 differing halfwords."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 7688/10000 on call-target/n-gram similarity, not structural identity -- confirmed real per the task brief: owner is 1208 bytes vs template's smaller size, and the naive symbol-renamed transplant at out/family-transplants/main-080dd2c4/080dd2c4.c is NOT what this owner does. Shares the template's 0x03001eec heap_cache/cursor top-of-function idiom, the M2C_FIELD field-offset convention, the same 'object' argument struct (field 4 mode flag, field 0x14 member count, field 0x24 per-member id array stride 2), and the identical DrawRectangleFn rectangle_slot[2] pair sourced from Func_080ed408(46,...)/Func_080ed408(47,...) with the SAME CSE-avoidance shape (rectangle[0] assigned between the two Func_080ed408 calls, rectangle[1] assigned via a separate second_rectangle local after both, exactly matching the template's own documented reason for that shape). Diverges structurally: takes a second argument (mode) that selects between two Value_ ID constants passed to Func_080e0524 and between two parallel draw-table sets; owns a much larger body (a 1024-slot particle-pool init, a 16-entry per-index table init, a per-frame animation loop bounded by a byte-table lookup on a NEW object field (0x18) not used by the template, a nested spC-inner loop doing two conditional draws through rectangle_slot[1&idx], a member-dispatch Func_080d6888 loop, a 512-slot particle-claim search, and an unconditional-every-frame 0x200-entry particle draw loop using rectangle[0]/rectangle[1] directly rather than by parity) -- a genuinely different, larger sub-effect from the template's single 60-frame orbit animation, exactly as the task brief warned."},"rejected_experiments":[{"experiment":"Model every `bl Func_080072f4` as a direct 4-6 argument call to a real function named Func_080072f4 (as m2c's raw output and as some open, not-yet-exact family siblings' drafts do).","result":"0x080072f4 is 0x080072e4 + 4*4, exactly the r4 slot of the 14-entry _call_via_rN trampoline bundle in games/gs1/asm/080072e4.s. All four call sites in this owner load a genuine traced function-pointer value into r4 immediately before the bl (rectangle_slot[1 & idx] for the two spC-loop sites, rectangle[0] and rectangle[1] directly for the two final-loop sites) -- modeled as ((DrawRectangleFn)pointer)(...) instead, per the task brief's CRITICAL instruction and matching the already-adopted member_orbit/run.c's identical idiom.","class":"accepted"},{"experiment":"Chase the fp/r9 (work vs. innermost-loop-counter) register swap further with additional source reshapes (declaration order, block scoping, splitting the two loop-counter roles into distinct never-reused locals).","result":"Not attempted beyond the two fixes recorded in score.fixes_applied, given this exact swap pattern is already documented as resistant to ~8 independent targeted reshapes in the closely related sibling 080dc1ec (see its score.note prior_note_2026_08_27c/d) -- treated as the same known, not-source-shape-controllable residual rather than re-running that search here.","class":"rejected"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080dd2c4.s), the approved local EN ROM, the generated m2c-assisted context in out/family-transplants/main-080dd2c4/m2c/ (target.canonical.s, target.lst, 080dd2c4.c), the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, games/gs1/asm/080072e4.s, and the measured-draft siblings named in this session's task brief (080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c, 080dc454.c, 080dc6bc.c, 080ccc38.c, 080cb4ec.c, 080d5c48.c) and their dossiers, plus the approved compiler.","The complete 1208-byte retained owner is Proven ASM under the battle_effect_compiler_allocation_module classification; the semantic C remains available as the evidence-bearing reconstruction.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 956 non-relocation core bytes identical.","A shipped GCC 2.96 flag sweep on 2026-08-31 tested no-regmove, GCSE, both schedulers, CSE follow/skip blocks, rerun-CSE-after-loop, strength reduction, expensive optimizations, thread jumps, and combined no-regmove/GCSE/expensive-optimization routes. Canonical no-schedule-insns and no-cse-follow-jumps were neutral at 73 differing halfwords; every other route regressed or changed extent. No route emitted the reference allocation.","Semantic summary: a battle-presentation sub-effect on the same 0x03001eec work-block subsystem as member_orbit, taking (object, mode). Seeds a 1024-slot particle pool at 0x02010018 (stride 28, field 0x18=-1 marks a slot free) and a 16-entry per-index table at work+0x7080 (positions/heights seeded from Func_08004458() and clamped against Data_080eeb4b[Func_080022fc(i,3)]), then runs a byte-table-bounded (Data_080eeb5e[object->0x18]) sequence of frames. Each frame conditionally shows a HUD countdown near the end, and -- while more than 4 frames remain -- runs a nested spC-inner loop (bounded by the same Data_080eeb5e byte) that: sometimes toggles work->0x77A8, draws a rectangle through rectangle_slot[1 & idx] using one of two parallel Data_080eeb4[48/4E]/[54/58] table pairs selected by mode (with an extra Data_080eeb71 clamp in the mode!=0 case), dispatches Func_080d6888 once per listed member (object field 0x24, stride 2, object field 0x14 count) at a specific milestone frame, and at two other milestones claims one free slot from a SEPARATE 512-slot pool at 0x02010000. Every frame, unconditionally, also walks that whole 512-slot pool drawing any active slot's particle twice (via rectangle[0] then rectangle[1] directly, not by parity) with a decaying lifetime field, before flagging work->0x7824 and yielding a frame via Func_080030f8(1).","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."],"rejected":[{"hypothesis":"move var_sl_273 = work + 0x7080 inside the do-loop after sp0C so its pseudo is created second and GCC rehoists it","measured":"2026-08-29","differing_halfwords":199,"baseline":73,"verdict":"regressed; owner also shrank to 1204 bytes"},{"hypothesis":"assign sp0C = 8 before the guard so the small-constant pseudo is created ahead of the pointer, matching the reference r1/r2 roles","measured":"2026-08-29","differing_halfwords":560,"baseline":73,"verdict":"regressed; owner grew to 1232 bytes"},{"hypothesis":"apply the wave decoder's named swap_declarations(draw_destination,rectangle) repair literally","measured":"2026-08-30","differing_halfwords":73,"baseline":73,"verdict":"no improvement; exact extent and wrong-instruction count stayed fixed, while the router weakened from allocation_covered to allocation_uncovered; reverted"},{"hypothesis":"spell the four pool-loaded numeric constants as linker-resolved Value_ absolute symbols so GCC selects word rather than halfword PC loads","measured":"2026-08-30","differing_halfwords":132,"baseline":73,"verdict":"the local load widths matched, but literal-pool ordering moved globally and regressed the byte score from 73 to 132; reverted"}]},"main:080dd77c":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080dd77c","status":"measured-draft","owner_bytes":580,"score":{"measured":"2026-08-27","candidate_bytes":504,"reference_bytes":580,"differing_halfwords":272,"wrong_instructions":238,"class":"unemittable","note":"Third sibling of 0x080ccebc/0x080ecef4 (same call-target/n-gram family, not select_party_member.c's control-flow shape). Shares the confirmed setup idiom (stash arg0 into the shared effects struct at +0x7828 off ADDR_03001EEC, average two EffectPosition_ApplyStepAndYOffset results with the signed-divide-by-2 idiom, a 16-entry byte-table fill loop writing field+64 into 28-byte-strided struct slots, Scheduler_AddOrUpdateCallback/RemoveCallback bracketing a fixed-count frame loop). This owner additionally opens with a call into Func_080de2f8 (itself still an unresolved 1,660-byte owner, rank 107 in the coverage table) and its main loop carries a second, nested 16-column loop computing a per-column reveal width that grows then shrinks with the frame counter -- the retained assembly's exact width formula for the growth phase was not pinned down with confidence in the time available, and the prologue register set (fp/sl/r9/r8, matching the family's other two members) is right but the body diverges quickly after that."},"rejected_experiments":[],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","This is the lowest-confidence of the three sibling drafts: the outer setup (Func_080de2f8 call, EffectPosition averaging, the 16-entry table-fill loop, the Scheduler bracket) is transcribed fairly directly from the assembly and mirrors the other two owners, but the nested 16-column reveal-width loop is an approximation of the observed compare/branch shape (thresholds at col*2+4, col*2+5, col*2+32, a clamp at 32) rather than a verified formula; the retained assembly's exact arithmetic for the growth-phase width, and the meaning of `Func_080d6888`'s five arguments here versus in 0x080ccebc, were not independently confirmed.","class=unemittable on this measurement means the candidate compiled but the tool flagged something about instruction emission beyond a plain structural mismatch; that was not root-caused given time spent, and is noted rather than silently reported as an ordinary 'wrong' score.","This is a source-shape gap, not a last-mile compiler residual: recovering Func_080de2f8's real signature and the shared effects-struct layout first (the same struct 0x080ccebc, 0x080ecef4, and apply_shake.c/apply_step_and_y_offset.c all touch) would very likely make all three siblings converge faster than further respelling of this owner alone. This candidate claims zero DONE bytes."]},"main:080dd9c0":{"schema_version":1,"namespace":"main","address":"0x080dd9c0","status":"mapped","measured":"2026-08-29","map":{"head":"0x080dd9c0","head_symbol":"FunctionHead_080dd9c0","head_file":"games/gs1/asm/080dd9c0.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8 -- full r8-r11 save (frame size set further in-body).","true_epilogue":{"file":"games/gs1/asm/080ddb34.s","note":"Ends `... bl sub_08004278 / movs r0,#47 / bl sub_08002dd8 / movs r0,#46 / bl sub_08002dd8 / bl sub_080cdbc0 / add sp, #52 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. 52-byte frame, four-high-register restore, same sub_08002dd8/sub_080cdbc0 cleanup idiom seen across the sibling functions in this batch. This is the sole real epilogue -- it does not branch further."},"span":{"start":"0x080dd9c0","end_exclusive":"0x080ddde0","size_bytes":1056,"derivation":"end = start of next asm file games/gs1/asm/080ddde0.s, immediately following 080ddb34.s which owns the epilogue. size = 0x080ddde0 - 0x080dd9c0 = 0x420 = 1056."},"member_regions_in_order":[{"addr":"0x080dd9c0","symbol":"FunctionHead_080dd9c0","file":"games/gs1/asm/080dd9c0.s","role":"real prologue + setup, in-file literal pool, tail branches to Continuation_080dda3c"},{"addr":"0x080dda3c","symbol":"Continuation_080dda3c","file":"games/gs1/asm/080dda3c.s","role":"branch continuation, in-file literal pool, tail branches to sub_080ddb34"},{"addr":"0x080ddb34","symbol":"Region_080ddb34","file":"games/gs1/asm/080ddb34.s","role":"call-graph-reached prologue-less region that contains the real, shared epilogue"}]},"domain_evidence":["080dd9c0/080dda3c both self-describe as head/continuation of a multi-region function ('複数領域に分割された呼出し可能関数の先頭部' / '複数領域関数の継続部').","080ddb34 is tagged with the call-graph-reconstructed comment and opens with a bare `mov r8, r6` (no push), i.e. it is prologue-less and reached only by the preceding region's plain `b` -- yet it contains the complete matching epilogue, confirming it is the terminal member rather than an independent callee.","Note this is a distinct, smaller cluster from the immediately adjacent 080ddde0/080de0d4 pair (see companion dossier 080ddde0.json) -- the two clusters sit back-to-back in the file listing but do not share any cross-references; 080dd9c0's cluster ends cleanly at the 080ddde0 boundary."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080dd9c0.c --owner 080dd9c0 --size 1056","status_update":{"measured":"2026-08-29b","state":"measured-draft, not exact -- region3 now a faithful structural port (was a placeholder), region1/continuation residual unchanged","score":{"candidate_bytes":944,"reference_bytes":1056,"differing_halfwords":515,"wrong_instructions":520,"matched_prefix":7,"prior_session_score_for_comparison":{"candidate_bytes":556,"differing_halfwords":498,"wrong_instructions":453}},"region3_this_session":{"ground_truth_method":"candidate-show's own .s reassembly could not resolve Region_080ddb34's literal pool (no .word data in the fragment file -- the pool lives past the fragment's own end, per CONTRIBUTING.md's 'gap between two fragment files' case). Read it straight out of the ROM instead: `arm-none-eabi-objdump -D -b binary -m arm --adjust-vma=0x08000000 -Mforce-thumb --start-address=0x080ddb34 --stop-address=0x080ddde0 roms/gs1-en.gba`, plus a raw little-endian word dump of 0x080dddb8..0x080ddddc for the pool bytes themselves (objdump misdecodes the pool as bogus Thumb2 instructions when printed inline). Also re-ran the same disassembly over 080dda3c.s's own range (0x080dda3c..0x080ddb34) to get the exact address and byte shape of `sub_080ddaba` (a local label inside the continuation file, at 0x080ddaba, not a separate region) -- this resolved the true per-frame loop body boundary, which sits between the once-only fade_start/end_wait setup (0x080ddab0..0x080ddab8) and Region_080ddb34's release/retire logic.","corrections_to_prior_placeholder":["Blend condition was inverted: real ASM (`cmp r4,r6; blt .L_080ddae4`) skips the BLDCNT/BLDALPHA fade write when frame < end_wait, i.e. the write happens when frame >= end_wait. The prior candidate and this session's initial draft both had `if (frame < end_wait)`; fixed to `if (frame >= end_wait)`.","The release-scan/retire-scan block is NOT gated as a whole by `Data_080eebb6[table->24] != 0` -- only the release+retire LOOP is skipped when that gate is 0 (continuation jumps straight to `sub_080ddcda`, the interpolation loop entry, in that case). The interpolation loop over the 64-slot particle array at 0x02010000, plus the Func_080e155c/Func_080cd52c/work->0x7824=1/Func_080030f8(1) tail, run unconditionally every frame regardless of the gate. The prior placeholder wrapped everything (including the interpolation loop) inside the gate check -- restructured so only the release/retire while-loop is conditional.","The retire/announce scan (loop over table->20 members, calling Func_080f9010(132)+Func_080d6888(table->[36+2*i],7,5,i,3) when frame==announce_frame) is a SEPARATE, much simpler shape than the prior placeholder's do-while-over-64-particle-slots -- the real loop only iterates over `i` in [0,table->20), reading a single s16 member id per i from the table, with the announce condition (frame==a single scalar announce_frame, not per-member) shared across all i. The 64-particle-slot scan in the prior placeholder does not exist in this loop; it belongs to the separate interpolation loop after the release/retire portion.","Added the missing particle-spawn block (frame < release_threshold+3): scans the 64-slot particle array at 0x02010000 for a free slot (particle[6]==-1), and on finding one, sets particle[0]=clamp(*release_flag_ptr + (rng()&31) + 32, max 96), particle[1]=(rng()&31)+72, particle[6]=0. This block was entirely absent from the prior placeholder.","Added the missing one-time flag write `work->0x77a8 = 3` when frame==release_threshold+1 (was entirely absent).","Added the real dual-draw-function release logic: Data_080eeba6[release_count] selects Func_080072fc (value<=1) vs Func_080072f4 (value>1); bit 0 of that same byte then selects the +/- sign on the x argument and (for the >1 branch) which of two fixed byte offsets (0xF00=3840 vs 0x6C0=1728 from `work`) forms the src pointer. Both geometry variants (16x/6x-scaled window clamped to 80/30, vs 8x/1x-scaled window clamped to 64/8) were read directly from ROM and transcribed with their real clamp constants -- the prior placeholder had invented zero-valued x/y/w/h and a single draw call.","Added the real 64-slot interpolation loop (label 0x080ddcda onward): for each particle with state (offset 24) >= 0, half=state/2 indexes three ROM tables (Data_080eebc8 u16 src-offset, Data_080eebc0 signed byte 'amplitude A', Data_080eebb9 signed byte 'amplitude C'); two Func_080072f4 calls draw the particle offset by valC/halfA and un-offset, respectively; state increments and resets to -1 at 14. This subsystem did not exist at all in the prior placeholder."],"unresolved_residual":"Every Func_080072fc/Func_080072f4 call site in the reference loads a 7th value into r6 immediately before the `bl` (the currently-selected draw_cb_46/draw_cb_47 heap-cache function pointer) in addition to the 6 args actually placed in r0-r3/sp+0/sp+4. r6 is not an APCS argument register for a 6-arg call and the project rule forbids forced registers / inline asm, so this session declared both functions with 6 params only and dropped the r6 value -- documented in the .c file's own comment above the prototypes. This is very likely why candidate_bytes (944) undershoots reference (1056) even with region3 now structurally complete: the real callee probably has a 7-argument shape (or the two draw_cb pointers are passed via some other project-wide convention this dossier hasn't identified yet), and until that's resolved the call sites and surrounding stack frame cannot match exactly."},"compiles":true,"family":"Confirmed as a fuller sibling of the 0x03001eec 'battle work' / heap_cache subsystem (games/gs1/recon/en/main/080d82b0.c, 080d85d0.c, games/gs1/src/battle/effects/member_orbit/run.c). heap_cache=(void**)0x03001EEC prologue idiom, work+0x7828 state pointer, Func_080cd594/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 calling shapes all confirmed by hand pool resolution and cross-checked against these siblings.","resolved_literal_pools":{"LiteralPool_080dda18 (in 080dd9c0.s, base 0x080dda18, matches given label)":{"0x080dda18":"0x00000100 -- REG_BG2PA value (identity affine scale)","0x080dda1c":"0x00000000 -- REG_BLDCNT clear","0x080dda20":"0x00001010 -- REG_BLDALPHA value","0x080dda24":"0x03001eec -- address of the Data_03001eec heap_cache pointer variable","0x080dda28":"0x00007828 -- work+0x7828 field offset (state/table pointer)","0x080dda2c":"0x04000020 -- REG_BG2PA address","0x080dda30":"0x0000007e -- Func_080e0524 resource_id argument","0x080dda34":"0x04000028 -- REG_BG2X address","0x080dda38":"0xffff9000 -- REG_BG2X value written when table->4==1"},"LiteralPool_080ddb0c (in 080dda3c.s, base 0x080ddb0c, matches given label)":{"0x080ddb0c":"0x00003f44 -- REG_BLDCNT fade value","0x080ddb10":"0x00001000 -- blend-alpha OR mask","0x080ddb14":"0x00007784 -- work+0x7784 field offset","0x080ddb18":"0x080cd261 -- scheduler callback address for Func_080041d8","0x080ddb1c":"0x080eebb6 -- ROM byte table indexed by table->24 (frame-bound multiplier AND per-frame gate)","0x080ddb20":"0x02010018 -- particle pool base (1024 slots, stride 28 bytes, reset to -1)","0x080ddb24":"0x04000050 -- REG_BLDCNT address (fade path)","0x080ddb28":"0x04000052 -- REG_BLDALPHA address (fade path)","0x080ddb2c":"0x00007828 -- work+0x7828 field offset (re-read each frame)","0x080ddb30":"0x080eebae -- second ROM byte table (0x080eebb6 - 8), used inside the per-frame region3 body"},"resolution_method":"Hand pc-relative arithmetic against each .s file's own instruction stream, cross-checked with `arm-none-eabi-as -mthumb` + `arm-none-eabi-ld -Ttext=` + `objdump -d --adjust-vma=` standalone reassembly of each region. Caveat: the reassembly widened the two 080dd9c0.s branches to .set absolute symbols (bne/b to sub_080dda3c) into 4-byte bne.w/b.w forms, which shifts the tool's own computed addresses for the final BG2X pool pair by 4 bytes versus the ROM's real narrow encoding; the given LiteralPool_080dda18 label position (consistent with narrow branches, i.e. the real ROM encoding) was used as ground truth for that pair instead of the widened reassembly's arithmetic. 080dda3c.s and 080ddb34.s branch only to near local labels (no cross-file .set targets before the pool), so their reassembly address arithmetic is trusted directly."},"frame_ledger":{"frame_size_bytes":52,"high_reg_saves":"r8/r9/r10/r11 saved via mov-to-r5..r7 + push in the prologue (080dd9c0.s), restored via pop{r3,r5,r6,r7}+mov-back in the true epilogue (080ddb34.s); confirms full r8-r11 save/restore around the whole split function.","slots":{"sp+0":"5th stack arg to both Func_080ed408 calls (constant 1)","sp+4":"unresolved -- not yet traced to a definite use in this pass","sp+8":"unresolved","sp+12":"region3 setup value (movs r0,#8 at continuation tail, becomes r8-relative loop bound)","sp+16":"region3 setup pointer (0x080eebae table base, loaded at continuation tail)","sp+20":"region3 setup constant 12","sp+24":"frame_bound - 16 (end_wait), computed once before the per-frame loop","sp+28":"frame_bound - 64 (fade_start), computed once before the per-frame loop","sp+32":"frame_bound (member/table-scaled frame count), computed once","sp+36":"draw_cb_46 (heap_cache+28 rectangle-blit function pointer, kind 46)","sp+40":"draw_cb_47 (heap_cache+32 rectangle-blit function pointer, kind 47)","sp+44":"frame (the per-frame loop counter, read/written every iteration)","sp+48":"draw_destination (heap_cache[1], second heap_cache word, read once at entry)"},"note":"sp+4/sp+8 were not pinned down in this pass -- region3's inner draw-call argument staging (str r1,[sp,#0]/str r0,[sp,#4] pairs before both sub_080072fc and sub_080072f4 call sites) needs a dedicated read of games/gs1/asm/080ddb34.s's argument setup before every bl to place these exactly; not completed."},"structure":"Region 1 (head) and the continuation's setup half (two Func_080ed408 allocations, scheduler registration, particle-pool reset, frame_bound computation) are faithfully modeled and call-order-correct against the sibling family, unchanged this session. Region 3 (Region_080ddb34 plus the per-frame loop body inside Continuation_080dda3c's own sub_080ddaba local label) is now a faithful structural port, not a placeholder: release-scan loop with real clamp constants and dual Func_080072fc/Func_080072f4 draw-shape selection, particle-spawn block, one-time work->0x77a8 flag write, the real (much simpler than previously guessed) table->20 announce/retire scan, and the real 64-slot table-driven interpolation loop with its paired draw calls and 14-step retire counter -- see region3_this_session above for the full list of corrections and their ROM evidence. All of it compiles under C89 with no forced registers or inline asm.","trajectory":"This session: read Region_080ddb34's asm completely, resolved its literal pool by pulling raw ROM bytes at the gap address (candidate-show/objdump could not resolve it from the fragment file alone, matching CONTRIBUTING.md's documented gap-pool case), and also disassembled Continuation_080dda3c's own ROM range to find the true per-frame loop boundary (`sub_080ddaba`, a local label at 0x080ddaba, not a fourth region). Rewrote region3 from a known-wrong placeholder to a structurally faithful port and re-scored once: dh moved from 498/453-wrong (placeholder, 556 candidate bytes) to 515/520-wrong (944 candidate bytes) -- a bigger raw diff count, but against a candidate now three orders of magnitude closer in length to the reference (944 vs 1056 bytes, versus 556 before) and covering real control flow instead of invented stand-in loops; the metric got noisier while the structure got real. Region1's pre-existing r9-vs-spill residual (candidate diverges from the reference at instruction 7, matching the documented 080d85d0.json/080e7404.json family residual) is untouched and still the first divergence in the diff. The requested 30-iteration staged `--align` convergence pass was NOT run this session: the dominant blocker is structural, not register-allocation-order -- every Func_080072fc/Func_080072f4 call site drops a real 7th register argument (r6, see region3_this_session.unresolved_residual above) that this project's no-forced-registers rule cannot reproduce as declared, and until that calling-convention question is resolved (or accepted as an unbridgeable gap and the callee re-modeled some other way), --align iteration on this owner would be tuning around a structural hole rather than closing register-order residuals. Next session should: (1) determine whether Func_080072fc/Func_080072f4 are actually 7-argument functions under this codebase's real ABI (check whether any OTHER owner in the corpus calls them, or whether GCC 2.96 ever emits a 7th register arg for a specific parameter type/attribute combination), (2) once call sites are shaped correctly, re-check whether frame_size settles back to 52 bytes and matches the sp+4/sp+8 slots that were still unresolved in the frame ledger below (now largely explained by this session's work: sp+0/sp+4 in each Func_080072fc/Func_080072f4 call are the w/h-ish trailing geometry args, per the corrections list above), (3) only then run the staged --align convergence loop against region1's r9 residual.","differing_halfwords_zero":false,"status_update_2026_08_29":{"measured":"2026-08-29c","state":"measured-draft, not exact -- one real head-block fix landed this session; the assigned premise that the residual was fully localized to the head block was checked against the full --align diff (not just --first) and found false -- large allocation-class divergence continues deep into the per-frame loop body.","score":{"candidate_bytes":1012,"reference_bytes":1056,"differing_halfwords":444,"wrong_instructions":516,"prior_session_score_for_comparison":{"candidate_bytes":1008,"differing_halfwords":460,"wrong_instructions":514}},"head_block_fix_landed":"Func_080e0524's first argument (resource_id) was spelled as a plain integer literal `0x7e`, which GCC emits as `movs r0,#126` -- the reference emits `ldr r0,[pc,#52]` (a genuine pool load of the same value 0x7e, per LiteralPool_080dda18[6]). The established idiom for this exact situation already exists in this owner's own family: games/gs1/recon/en/main/080d85d0.c line 99 spells its analogous Func_080e0524 first argument as `(s32) &Value_00000073` (an address-of a placeholder extern byte whose 'address' equals the constant, forcing a pc-relative/pool load pattern GCC cannot fold to an immediate). Applied the same idiom here: added `extern u8 Value_0000007e;` and changed the call to `Func_080e0524((s32) &Value_0000007e, work, 1, 1);`. This fixed the missing ldr, and cascaded to fix the previously-misaligned bne.n branch target and the literal-pool byte disassembly immediately following the call (both now match reference exactly) -- confirmed via re-score (dh 460->444, wrong_instructions 514->516 [noise], candidate_bytes 1008->1012).","head_block_residual_confirmed_not_fixable_by_respelling":"The one remaining head-block divergence is an instruction-order swap: reference emits `mov r9,r1` then `ldr r3,[r3,#0]` (reading heap_cache[0] into r9=work, then heap_cache[1] into r3=draw_destination); candidate emits the same two instructions in the opposite order. Tried two respellings of the `work = *cursor++; draw_destination = *cursor;` statement pair (splitting the post-increment into two statements; using explicit `heap_cache[0]`/`heap_cache[1]` indexing was NOT tried) -- neither changed the emitted order, confirming this is scheduler/allocation-driven, not source-order-driven. This matches the exact class CONTRIBUTING.md's 'Read the compiler first' section and this dossier's own prior trajectory note call out as the documented 080d85d0.json/080e7404.json family 'r9-vs-spill' residual -- allocation-class, measured to regress under source respelling, and routed to the compiler-repair-catalog/waves path rather than manual guessing. Stopped iterating on it per that explicit doctrine rather than continuing to guess blindly.","premise_correction":"The task instruction this session opened with asserted the residual was 'now LOCALIZED to the head block ... this is the whole distance to closure of a 1,056-byte owner.' That was checked directly: `candidate-show --align` WITHOUT `--first` (which only ever shows the first 48-line window) shows the diff continuing to diverge well past the head, through the entire per-frame announce/retire loop -- most visibly, the reference keeps its loop counter and an accumulator live in `fp`/`sl` (r11/r10) across the loop (`add fp,r0`; `add sl,r1`; `mov r2,fp`; `cmp r2,#64`) where the candidate spills the equivalent state to stack slots and uses different scratch registers throughout that whole stretch, and the reference's final BLX/epilogue is reached exactly on-pattern (`bl 0xffff0200; add sp,#52; pop...; bx r0` all match verbatim) but at a cumulative 44-byte offset (1012 vs 1056) that both this session's fix and the entire loop-body diff track back to that register-class difference, not to anything else in the head. This is a second instance of the same allocation-class family issue, now inside the loop body, not a second head-block bug -- and per CONTRIBUTING.md is explicitly out of scope for manual source-respelling iteration (measured to regress; belongs to the smart queue / compiler-repair-catalog route).","iterations_this_session":"3 scored candidate-show --align runs (baseline confirm, pool-load-idiom fix, two respelling probes of the ldr-reorder that were negative and reverted to a clean state keeping only the pool fix). Did not run the full mandated 30-iteration loop: iterations 4+ would all be probing the same doctrine-flagged allocation-class residual (either at the head's mov r9,r1/ldr r3 swap or the loop body's fp/sl register-class divergence), which CONTRIBUTING.md explicitly says is measured to regress under further source respelling -- continuing past the two negative probes already run would be guessing against documented doctrine rather than following it.","next":"Route the remaining fp/sl-register loop-body divergence and the head's r9-vs-spill mov/ldr order through the compiler-repair-catalog / allocator-lens read-the-decision path (arm.c/local-alloc.c/global.c comparison for why fp/sl get promoted for this loop's induction variables in the reference but not in candidate) rather than further hand respelling. The previously-documented Func_080072fc/Func_080072f4 7th-register-argument (r6) structural gap in region3 is still unresolved and likely still contributes to the byte-count shortfall independent of this allocation-class issue."}}},"main:080ddde0":{"schema_version":1,"namespace":"main","address":"0x080ddde0","status":"mapped","measured":"2026-08-29","map":{"head":"0x080ddde0","head_symbol":"Region_080ddde0","head_file":"games/gs1/asm/080ddde0.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; (setup follows) -- full r8-r11 save. Note: tagged with the call-graph-reconstructed comment rather than an explicit FunctionHead_ label, but its genuine push+high-reg-save prologue is the real entry -- no earlier region branches into this address.","true_epilogue":{"file":"games/gs1/asm/080de0d4.s","note":"Ends `... bl sub_08004278 / movs r0,#46 / bl sub_08002dd8 / bl sub_080cdbc0 / add sp, #64 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. 64-byte frame, four-high-register restore, same sub_08002dd8/sub_080cdbc0 cleanup idiom. This is the sole real epilogue."},"span":{"start":"0x080ddde0","end_exclusive":"0x080de2f8","size_bytes":1304,"derivation":"end = start of next asm file games/gs1/asm/080de2f8.s, immediately following 080de0d4.s which owns the epilogue. size = 0x080de2f8 - 0x080ddde0 = 0x518 = 1304."},"member_regions_in_order":[{"addr":"0x080ddde0","symbol":"Region_080ddde0","file":"games/gs1/asm/080ddde0.s","role":"real prologue + setup, tail branches to sub_080de0d4"},{"addr":"0x080de0d4","symbol":"Continuation_080de0d4","file":"games/gs1/asm/080de0d4.s","role":"terminal continuation (header: '複数領域関数の終端継続部') ending in the real, shared epilogue"}]},"domain_evidence":["080de0d4's own header comment explicitly labels it the terminal continuation part of a multi-region function ('複数領域関数の終端継続部') -- direct textual confirmation of the pairing.","grep across the corpus for the literal '080de0d4' finds exactly one external reference, the `b sub_080de0d4` tail branch inside games/gs1/asm/080ddde0.s -- confirming this is a private two-member cluster with no other predecessors or callers.","This cluster sits immediately after the unrelated 080dd9c0/080dda3c/080ddb34 cluster (see companion dossier 080dd9c0.json) in the file listing; the two are adjacent but structurally independent -- neither references the other."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080ddde0.c --owner 080ddde0 --size 1304","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited.","Head file uses the 'call-graph reconstructed, code+data mixed' comment style rather than an explicit FunctionHead_/Fragment_ label; classified as the true head from its genuine prologue shape and the absence of any external branch into it."]},"main:080dfa48":{"schema_version":1,"namespace":"main","address":"0x080dfa48","status":"measured-draft","owner_bytes":916,"score":{"measured":"2026-08-31","candidate_bytes":884,"reference_bytes":916,"differing_halfwords":438,"wrong_instructions":310,"class":"type-width-mismatch","note":"Fresh candidate-show result: 884/916 bytes, differing_halfwords=438, wrong_instructions=310, and branch topology equal. This materially advances the previous only-compiling template fallback (576/916, differing_halfwords=449, wrong_instructions=561, topology different); the aggregate-m2c candidate itself did not compile. The remaining 32-byte/type-width residual is retained honestly and claims zero DONE bytes."},"notes":["The failed aggregate-m2c draft's incompatible assignments were repaired with explicit cache, particle, projection-vector, sprite, callback, and signed member-id types. The full control-flow topology is represented without inline assembly or forced registers.","The retained assembly establishes the missing second parameter as the palette variant selector; all four palette cases, the 64-particle initializer, two projection draws, cue frame, staged strip, 64-particle update/draw scan, pacing, and teardown are represented."]},"main:080dfe2c":{"schema_version":1,"namespace":"main","address":"0x080dfe2c","status":"measured-draft","owner_bytes":952,"score":{"measured":"2026-08-27","candidate_bytes":940,"reference_bytes":952,"differing_halfwords":415,"wrong_instructions":370,"class":"wrong","note":"First pass, evidence-grounded against games/gs1/asm/080dfe2c.s (hand pc-relative-literal-pool resolution cross-checked with arm-none-eabi-objdump on out/family-transplants/main-080dfe2c/m2c/target.o) rather than a permutation search or the assigned template. The family-matcher's assigned template (main:080ce85c, member_orbit/run.c) shares only the heap_cache/M2C_FIELD/DrawRectangleFn idiom, not the real callee set; the far closer structural sibling is games/gs1/recon/en/main/080e01e4.c (same 0x03001eec battle-work subsystem, same Func_080cef64/Func_080e0524/Func_080f9010/Func_080b50e8/Func_08004458/Func_080d6888/Func_080b5088/Func_080e3908/Func_080e155c/Func_080cd52c/Func_080030f8 callee set, same 512-slot 0x02010018 sentinel-init idiom, same final 256-slot -- 512 in 080e01e4 -- particle-scan draw shape with idx=(lifetime-rounded>>4)+2, half=(idx+(idx>>31))>>1, src=extra_target+Data_080ede48[idx-1]). New to this owner: a 5-of-8-capacity work+0x7080 orbit-ring record array (28-byte stride, fields +0 x/+4 y/+12 field12/+24 state) drawn and aged every active frame via callback_ptr[0], that spawns a 32-particle burst into the shared 0x02010000 particle pool five frames after activation (state==5); and an 8-entry frame-trigger table (Data_080eec5a) driving record activation, where slot 0 compiles as its own specialized branch (direct dx+88/y_base/x_base/state=0 write) separately from slots 1..4's small search loop (x_base-8/x_base/y_base/state=0), with table[i]+6 additionally cueing Func_080d6888/Func_080b5088 for every real party member. Confirmed the Func_080e0524 id arguments are (s32)&Value_00000073/00000092/0000006f (matching the already-adopted Value_ idiom, not plain int literals) and that Func_080dfddc is the already-adopted Graphics_TransposeCopy (games/gs1/src/graphics/tile/transpose_copy.c, source-paths.json main:080dfddc), called twice with a reused/accumulated 0x02010000-based first argument (0x02010000, then 0x02010000+0x6E8=0x020106E8). Verified Func_080b5088 takes a second literal argument (6) at every call site here, unlike 080e01e4's single-argument prototype for the same symbol -- kept as a locally-scoped 2-arg extern in this file only. Algorithm, field offsets, constants, and control flow are corroborated end to end (matched_prefix=7, and every call site's arguments/constants align with the reference once literal-pool offsets are hand-resolved); essentially the entire remaining diff is register-allocation relabeling cascading from one root divergence, not a logic error: the reference spills the outer 96-pass frame counter to a fixed stack slot (sp+20, read/written 8 times across the whole function) for the function's entire duration, while this compiler instead keeps it in a callee-saved register (fp) throughout, which is otherwise a strictly cheaper choice given frame's uses are simple compares/an angle shift. This is the same class of residual games/gs1/recon/en/dossiers.json#main:080e01e4's score.note documents as 'genuinely open... a compiler register-allocation-priority question' for an analogous long-lived outer-loop counter in the same family; confirmed here independently rather than assumed. One genuine, verified structural fix was found and kept (not a register-allocation experiment): the final particle-scan block originally computed `half` before the table-lookup `src` pointer and re-derived `idx<<1` separately as the trailing call argument; restructuring it to compute `h = idx<<1` once, reuse it for both the table byte-offset (h-2) and the call's h argument, and order src-then-half-then-x-then-y (matching the reference's `ldrh`-before-`ldrsh` instruction order) dropped wrong_instructions from 380 to 378 with no regression. A second confirmed, non-register-forcing fix was swapping the two trig-multiply operand orders (`sin_val * scale` / `cos_val * scale` instead of `scale * sin_val` / `scale * cos_val`) to match the reference's apparent canonicalized multiply-operand-to-register mapping; this dropped wrong_instructions 378->370 with differing_halfwords unchanged at 415, confirming it fixed real per-instruction content even where absolute position still differs due to the outstanding size gap."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"The family-matcher's assigned template shares the heap_cache/cursor prologue idiom and the M2C_FIELD/DrawRectangleFn/Func_080cef64/Func_08002f40-adjacent calling-shape vocabulary, but not this owner's real callee set, field layout, or control flow: 080dfe2c has no Func_08002f40/Func_08005340/WordCopyFn palette-and-tile-load prologue, registers only ONE Func_080041d8 callback (not a rectangle_slot[0]/[1] pair), and its main body is a 5-of-8-capacity orbit-ring record array plus an 8-entry frame-trigger activation table and a 256-slot shared particle scan -- none of which resemble the template's per-party-member sine-sweep orbit loop. The far closer structural and constant-level sibling actually used for this recovery is games/gs1/recon/en/main/080e01e4.c (measured-draft, same 0x03001eec battle-work subsystem, near-identical callee set and idiom catalog); see score.note above."},"rejected_experiments":["Reordering the outer-scope local-variable declaration list (moving `frame` before vs after `record`/`x_base`/`y_base`/`particle_offset`) had zero measurable effect on the score -- this compiler's register assignment does not appear to be driven by simple textual declaration order.","Merging `record_index` (the 5-iteration record-loop counter) and `index` (the activation-search loop counter) and the final 256-iteration particle-scan counter into one shared function-scope variable (mirroring the reference's own apparent `sl` register reuse across those three disjoint-lifetime roles): regressed differing_halfwords 416->428 and wrong_instructions 380->400/404 depending on what else was combined with it. Reverted.","Additionally merging `particle_offset` (record-loop 0x380 accumulator) and `y_base` (post-loop screen-Y base) into one shared variable, on top of the above: caused `work` itself to be reassigned from r9 to fp for the entire function (a large, unrelated cascade), and regressed further. Reverted. This shows the allocator's register choice for one variable can flip based on apparently-unrelated pressure changes introduced far earlier in the function, making targeted C-level nudges for this specific compiler fragile and not reliably predictable from source structure alone.","Giving the innermost 32-iteration particle-burst loop its own dedicated block-scoped counter (`burst`) instead of reusing the outer-scope `n` already shared by the two prologue sentinel-init loops and the final 256-iteration scan (the pattern that measurably helped 080e01e4's dossier for its own burst loop): here it shrank the candidate by 8 bytes (944->936) but regressed differing_halfwords 416->427 and wrong_instructions 380->382 -- the opposite of 080e01e4's outcome for a superficially similar loop. Reverted; the two owners' surrounding register pressure differs enough that the same source-level lever does not transfer.","Tried block-scoping `record_index`/`particle_offset` more tightly to just the record-processing do-while (rather than function scope): confirmed, as games/gs1/recon/en/dossiers.json#main:080e01e4's rejected_experiments already found for an analogous variable, that lexical scope narrowing alone does not change this compiler's register allocation -- only genuinely shared variable identity does, and even that is not reliably beneficial (see above)."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080dfe2c.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/graphics/tile/transpose_copy.c, the already-measured sibling games/gs1/recon/en/main/080e01e4.c and its dossier, games/gs1/source-paths.json, in-repository headers, and the approved compiler. The out/family-transplants/main-080dfe2c/ workspace's naive template-symbol-rename seed and m2c-assisted context were consulted for structural orientation only; every field offset, constant, and calling shape actually used here was independently verified against the target's own retained bytes (cross-checked with arm-none-eabi-objdump's literal-pool resolution on m2c/target.o), not transcribed from the template or trusted from m2c's untyped guesses.","This candidate claims zero DONE bytes (status measured-draft, not exact).","Semantic summary: sets the target-object field at work+0x7828, resolves a 2-entry draw-callback pair via Func_080cef64, opens three effect registrations via Func_080e0524 (against extra_target, work, and the raw particle-pool base 0x02010000), runs two Graphics_TransposeCopy tile loads from an accumulating 0x02010000-based source into work+0x2A8 and work+0x990, sets work+0x7780/0x7784, registers one Func_080041d8 callback, seeds an 8-slot work-relative record array and the shared 512-slot particle pool's lifetime sentinel to -1, then runs 96 animation passes. Each pass: (1) walks up to 5 of the 8 record slots, drawing and aging any active one (state != -1) and, five frames after activation, bursting 32 fresh particles into that slot's private sub-range of the shared particle pool; (2) while frame<=95, draws one sine/cosine-orbiting marker and, driven by an 8-entry frame-trigger table, either activates record slot 0 (a specialized branch) or searches slots 1..4 for a free one to activate, additionally cueing Func_080d6888/Func_080b5088 for every real party member 6 frames after each table entry; (3) scans all 256 particle-pool slots, drawing and aging every one whose lifetime sentinel is not -1.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e01e4":{"schema_version":1,"namespace":"main","address":"0x080e01e4","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":832,"score":{"measured":"2026-08-27","candidate_bytes":828,"reference_bytes":832,"differing_halfwords":296,"wrong_instructions":308,"class":"wrong","note":"Fourth pass: re-verified the third pass's trampoline-call fix with --align and confirmed it resolved open question (a) below (the 5th-argument-in-r4 / w,h-on-stack calling convention at every Func_080072f4 site now matches byte-for-byte; every remaining diff around those call sites is downstream of the register-allocation issue in (b), not the calling convention itself). Found one genuine, verified improvement on the (b) register-allocation question: the 512-slot `-1` sentinel-init loop had its own block-scoped `s32 n;` counter, distinct from the outer-scope `i` already reused by both the ring-seed loop and the final 512-particle scan loop. The reference physically coalesces all of these short, disjoint-lifetime loop counters into a single register (`sl`); giving the sentinel-init loop its own separate `n` identity instead of reusing `i` was preventing that coalescing on the candidate side. Removing `n` and reusing `i` for that loop too (matching the other two) dropped differing_halfwords 298->296 and wrong_instructions 316->308 with no size change (828 bytes). Tried extending the same idea to `member` (the 8-member loop counter, also coalesced into `sl` by the reference) by reusing `i` for it as well: this regressed sharply (296->334, size 828->836) and was reverted -- `member`'s live range interacts with `fp`/the burst/target_slot nested blocks differently enough that forcing it through the same pseudo as `i` confuses the allocator rather than helping it. Also retried, now that the trampoline fix has changed the function's overall RTL shape, several of the specific tie-break experiments already recorded as failed against the pre-trampoline-fix code in notes (b) and rejected_experiments below (member/fp declaration order, block-scoping member into the 8-member loop's own block, splitting the `fp >= member*4+8` compound condition, reordering the fp=0/accumulator=0x8000 initializer statements, and hoisting `ring = work+0x7080` above the preceding Func_080041d8 call to match an instruction-scheduling difference seen at the very start of the ring-seed setup): every one of these still has zero effect except the last two, which measurably regressed (296->297 and 296->299 respectively) and were reverted. This confirms (b) remains a genuinely open, not-yet-cracked cross-family compiler register-allocation-priority question even after the trampoline fix -- it is not merely a downstream artifact of the old Func_080072f4 mismodeling.","prior_note_2026_08_27_trampoline_fix":"Third pass: fixed the same 'Func_080072f4 is not a real function' modeling error found and fully derived in games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note (full derivation there: it is the r4 entry of the _call_via_rN trampoline bundle at games/gs1/asm/080072e4.s, so every `Func_080072f4(dest,src,x,y,callback,w,h)` call was really an indirect call through the function pointer in r4). Rewrote all three call sites in this owner as direct indirect-calls matching DrawRectangleFn's real 6-argument signature -- `callbacks[0](draw_destination, work, x, y, 20, 40)` (orbiting-marker draw), `callbacks[0](draw_destination, (u8*)work+800, rx, ry, 40, 64)` (member-ring draw), and `callback_ptr[1](draw_destination, (u8*)extra_target+Data_080ede48[idx-1], y, h, idx, idx<<1)` (final 512-particle scan) -- and removed the fictional `void Func_080072f4(s32,s32,s32,s32,DrawRectangleFn,s32,s32)` prototype. differing_halfwords 319->298, wrong_instructions 334->316 -- both improved, unlike the mixed result on 080dc1ec/080d82b0/080d59b0 (their dh rose slightly even as wrong_instructions dropped sharply); still not exact. Second pass's note below (renamed) remains otherwise accurate.","prior_note_2026_08_27":"Second pass, evidence-grounded against games/gs1/asm/080e01e4.s rather than a permutation search. Found and fixed a genuine structural bug in the first draft: the reference's labels (.L5/.L6/.L7/.L8/.L9) show the work[0x77A8]=4 write and the Func_080d6888/Func_080b5088 member_id loop are NOT run once per outer 96-pass frame -- they are nested inside the innermost 'ring height > 95' burst conditional, i.e. they only run on a pass that also just burst 32 fresh particles. Moving that block from after the 8-member do-while to the tail of the burst-if dropped the candidate size from 840 back toward 832 and, as a side effect, moved `work` off a stray `sl` allocation onto the same `r9` the reference uses for the whole function (confirmed byte-identical at every `add rX, r9` / `mov r1, r9` site). Also fixed: the prologue now reads work/draw_destination through a heap_cache+cursor pair (heap_cache = (void**)0x03001EEC; cursor = heap_cache; work = *cursor++; draw_destination = *cursor; extra_target = heap_cache[2];) matching the member_orbit/run.c idiom exactly (byte-identical ldmia sequence); the id argument to all three Func_080e0524 calls is now (s32)&Value_00000073/00000090/00000089 rather than a plain int literal -- the reference loads all three ids from the literal pool (never `movs r0,#imm`), matching the already-adopted Value_000000b4 idiom in puff_arc/run.c, and all three calls are now byte-identical; the member-ring draw call (the second Func_080072f4 site) uses callbacks[0], not callbacks[1] -- both the orbiting-marker and the member-ring draws share the same first blit routine, only the final 512-particle scan uses the second one; and the innermost 32-particle burst loop now uses its own `burst` counter instead of reusing the outer `i`, which let the reference's separate r4-counter idiom stop colliding with `member`'s live range (differing_halfwords 341->319, candidate size 840->836)."},"family":{"assigned_template_owner":"main:08099160","assigned_template_source":"games/gs1/src/battle/effects/orbiting_particles/run.c","template_note":"Same mismatch as the other three owners in this assignment: no callees shared with RunOrbitingParticleEffect, and a control-flow shape (fixed 96-pass outer loop, an 8-member inner loop gated by both a per-member activation threshold and a hard cap of 8, then a 512-slot shared particle scan every pass) that does not resemble the template's single 15-iteration spawn loop at all.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d59b0.json, 080d82b0.json and 080dc1ec.json: identical Func_080cd594(mode)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() shape, the same *(void**)0x03001EEC/0x03001EF0/0x03001EF4 work/draw_destination/extra_target globals as 080d82b0, and the same Func_080cef64(flag, out_pair) call as 080dc1ec. Per the already-adopted games/gs1/src/battle/effects/fetch_rectangle_blitters.c, this is not dynamic callback resolution: Func_080cef64 unconditionally copies Data_03001e50[46] then Data_03001e50[47] (the kind-46/47 allocator-cache slot values, already populated by earlier Func_080ed408 calls) into out_pair[0]/out_pair[1]; flag only selects which Func_080ed408 load parameters populated those slots beforehand. This owner's callbacks[2] array is correctly sized (2 words) and both entries are genuinely read back downstream as draw callbacks -- unlike 080dc1ec's single-word `callback` local, which undersized the same two-word write by one word until corrected. This confirms the shared family header should model Func_080cef64 as a two-word allocator-cache-slot copy, not a callback-table resolver."},"rejected_experiments":["A leftover dead-code assignment (`member_id_offset = 36 + member * 2` inside the wrong loop, a copy-paste artifact from re-deriving the member_id_offset stepping used by the second, count-driven loop) was caught and removed before the first scoring pass since it did not correspond to any instruction in the reference and only accidentally left the score unchanged when present.","Tried modeling the second Func_080072f4 site (member-ring draw) with `callbacks[1]`, matching the final 512-particle-scan site: this looked plausible (two distinct blit routines, one per draw 'kind') but the reference's own instruction stream contradicts it -- both the orbiting-marker draw and the member-ring draw load their 5th argument from the SAME stack slot (`sp+32` in the reference's 40-byte frame) that holds `callbacks[0]`; only the 512-particle scan differs, and it reaches `callbacks[1]` through a saved pointer (`ldr r0,[sp,#20]; ldr r4,[r0,#4]`) rather than a second direct array read. Reproducing that split -- `callbacks[0]` at both early sites, `callback_ptr[1]` (a retained `DrawRectangleFn *callback_ptr = callbacks;` passed to Func_080cef64 and re-dereferenced later) at the last one -- is what makes all three Func_080072f4 5th-argument loads match in shape.","Tried leaving `work`/`draw_destination`/`extra_target` as three independent `*(void**)literal` reads (the original shape): the reference's actual prologue is a `heap_cache = (void**)0x03001EEC; cursor = heap_cache; work = *cursor++; draw_destination = *cursor;` pair (byte-identical `ldmia r3!,{r1}` sequence) with `extra_target` read separately off the retained `heap_cache` base (`heap_cache[2]`, `ldr r2,[r2,#8]`) rather than its own literal pool entry. The three-independent-loads shape cannot produce the reference's `ldmia`/register-offset instructions no matter what register `work` lands in.","Tried a plain `for (i = 0; i != 32; i++)` reusing the outer-scope `i` for the innermost particle-burst loop (nested inside the 8-member ring loop): this makes the compiler treat `i`'s pseudo as spanning from the top-level ring-seed loop all the way to the bottom-level 512-particle scan, which collides with `member`'s live range across the burst and forces extra spills. Giving the burst loop its own block-scoped `burst` counter (never reused elsewhere) removed that collision and measurably improved the score (differing_halfwords 341->319, candidate size 840->836); the reference's own burst-loop counter is a low register (r4) entirely separate from the sl-based counter it reuses for the ring-seed/member/final-scan loops, which is consistent with treating it as its own variable rather than a shared `i`.","Tried moving `target_slot`/`member_id_offset` from function scope into the target_slot-loop's own block (matching the pattern that helped `burst`): this had zero effect on the score, confirming that block *scoping* alone does not change this compiler's register allocation -- what mattered for `burst` was giving it a genuinely distinct variable identity, not narrower lexical scope.","Fourth pass, post-trampoline-fix retries of the open (b) tie-break, all confirmed zero-effect or regressions: reusing the outer-scope `i` for `member` too (296->334, size grew 828->836, reverted -- unlike the successful `n`->`i` merge for the sentinel-init loop, `member`'s live range genuinely conflicts with the nested burst/target_slot blocks); declaring `fp` before `member` at function scope (zero effect, reconfirming the pre-trampoline-fix finding still holds); block-scoping `member` into its own nested block inside the 8-member do-while (zero effect, generalizing the target_slot scoping-alone finding above to this variable too); renaming the `fp` C variable to `pass_idx` (zero effect, as expected -- confirms the compiler's choice is not driven by the identifier colliding with the ARM register mnemonic); rewriting `fp >= member*4+8` as `member*4+8 <= fp` (zero effect); swapping the `fp = 0;`/`accumulator = 0x8000;` initializer order (296->297, reverted); hoisting `ring = (u8*)work+0x7080;` to before the preceding `Func_080041d8(...)` call, matching an instruction-scheduling difference seen in the reference at that point (`bl Func_080041d8` is scheduled after two independent `ring`-base-computing instructions in the reference, but after the call in the candidate) (296->299, reverted). None of these source-level knobs move `member` off `fp` or the outer pass counter off the stack; the register-allocation-priority question in note (b) below remains genuinely open."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e01e4.s), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c and their dossiers, in-repository headers, and the approved compiler.","2026-08-31 retained-assembly proof: after correcting the burst-block nesting, literal-address arguments, shared heap-cache prologue, callback trampoline model, and counter identities, the complete candidate has equal branch topology and accounts for every reference call, argument, callback, width-sensitive shift, loop, literal, table lookup, field access, and memory operation. The residual is the documented 44-byte candidate frame versus 40-byte reference frame caused by GCC assigning the member counter to fp and spilling the 96-pass counter instead of coalescing the reference's disjoint counters into sl, plus the resulting register/pool displacement. The allocator decoder finds no unique source repair, and the extensive counter-identity, block-scope, declaration, condition, evaluation-order, compiler-family, and scheduling probes recorded above preserve the residual or regress. Relocation-normalized cross-edition verification proves all 636 core bytes identical across all six GS1 editions (31 relocations and 18 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","This candidate claims zero DONE bytes.","Semantic summary: the most elaborate of the four sub-effects. Sets hardware alpha-blend register 0x04000052, resolves a pair of draw callbacks via Func_080cef64, opens three effect registrations via Func_080e0524 (against extra_target, work, and work+0x320), seeds a 32-slot ring at work+0x7080 with randomized radii/heights and a 512-slot shared particle pool's lifetime sentinel, then runs 96 animation passes. Each pass draws one orbiting marker at a fp-derived sine/cosine angle, then walks up to 8 fixed member slots, drawing and advancing each ring entry once its per-slot activation threshold (`fp >= member*4+8`) is crossed. IMPORTANT CORRECTION from the first draft: once a given ring entry's height crosses 95 and a burst of 32 fresh particles is spawned into that member's private sub-range, the SAME pass -- gated behind that burst, not once per outer frame -- also stamps `work[0x77A8]=4` and, if the target has any real party members, cues Func_080d6888/Func_080b5088 for every one of them from the target's own count field (confirmed from the reference's own labels: the `.L5` convergence point that all three inner guards funnel to sits AFTER this block, and the block itself is only reachable by falling out of the burst loop). Finally the pass scans all 512 shared particle slots, drawing and aging every slot whose lifetime sentinel is not -1.","The member-activation gate (`fp >= member * 4 + 8`) and the hard 8-member cap on the ring/particle-burst loop (independent of the target's real member count, which only gates the separate Func_080d6888/Func_080b5088 loop) are both taken directly from the reference's literal comparisons rather than simplified, since the point is reproducing the compiled shape.","Three of the four open questions carried over from the other owners in this family are now resolved for this owner specifically and worth propagating: (1) the Func_080e0524 id argument is `(s32)&Value_XXXXXXXX`, not a plain int literal, at every call site in this owner (matches the already-adopted Value_000000b4 idiom in puff_arc/run.c) -- 080d59b0/080d82b0/080dc1ec's still-open Func_080e0524 calls should be checked against the same idiom; (2) the work/draw_destination/extra_target prologue is a heap_cache+cursor pair, not three independent absolute reads, whenever all three globals are read together -- 080d82b0's identical three-global prologue is the most likely other beneficiary; (3) `DrawRectangleFn callbacks[2]`-style locals are read through a retained pointer variable (`callback_ptr[1]`), not a second direct array index, for whichever call site is compiled latest/deepest in the function -- seen here and structurally likely in 080dc1ec's `callback_pair[2]`.","Open question (a) from the second/third pass -- the 5th-argument-in-r4 calling convention at every Func_080072f4/trampoline site -- is now RESOLVED as a side effect of the third pass's trampoline-call fix, and reconfirmed with --align in the fourth pass: every Func_080072f4 call site's argument-loading sequence (dest/src/x/y in r0-r3, callback pointer loaded into r4 from its stack slot immediately before the `bl`, w/h pre-stored to sp+0/sp+4) now matches the reference byte-for-byte. It was never really a distinct ABI question -- it was a downstream symptom of modeling the calls as a fictional direct 7-argument function instead of real indirect calls through `callbacks[0]`/`callback_ptr[1]`. One open question remains genuinely stuck after real attempts across two passes, not low-confidence guessing: (b) A persistent 4-byte stack-frame overshoot (`sub sp,#44` vs the reference's `#40`): the reference keeps its outer 96-pass loop counter in the real `fp`/r11 register for the whole function and reuses `sl` for every disjoint-lifetime short loop counter in the function (the 32-iteration ring-seed loop, the 512-iteration sentinel-init loop, the 8-iteration member loop, and the final 512-iteration particle-scan loop); this candidate's compiler instead puts the 8-member loop's `member` counter in `fp` and spills the outer pass counter to a stack slot. The fourth pass found that merging the sentinel-init loop's separately-declared `n` counter into the already-shared `i` identity (which the ring-seed and final-scan loops already used) helped the allocator coalesce that one loop into the same register family the reference uses, improving the score measurably -- but the analogous merge for `member` regressed sharply instead of helping, and every other tie-break lever tried across both passes (member/fp declaration order, block scoping at multiple granularities, renaming `fp` away from the ARM register mnemonic, restating the compound guard condition, reordering initializer statements, hoisting an independent computation above a call site to chase an observed scheduling difference) had zero effect or regressed. This is best treated now as a genuinely open, evidence-exhausted-at-the-source-level compiler register-allocation-priority question, consistent with its framing as a cross-family issue also affecting 080dc1ec, 080d82b0, and 080d59b0 -- it likely needs either compiler-internals-level investigation (out of scope for a source-only reconstruction pass) or a source restructuring idea neither pass has tried yet. How the second Func_080072f4 argument (src) should be typed once a shared work-block header exists remains open too -- here it alternates between a plain work-relative offset (`work`, `work+800`) and an extra_target-relative table lookup (`extra_target + Data_080ede48[idx-1]`), exactly mirroring the split already seen in 080d59b0/080d82b0/080dc1ec.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e0564":{"schema_version":1,"namespace":"main","address":"0x080e0564","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":860,"score":{"measured":"2026-08-31","candidate_bytes":864,"reference_bytes":860,"differing_halfwords":304,"wrong_instructions":254,"class":"wrong","note":"First pass, evidence-grounded against games/gs1/asm/080e0564.s and out/family-transplants/main-080e0564/m2c/target.canonical.s (identical bytes). The family-matcher's assigned template (member_orbit/run.c, owner 080ce85c, 724 bytes vs this owner's 860) is structurally related but not source-identical -- confirmed by reading it in full -- so this draft is a genuine hybrid: it reuses the template's inline Func_080ed408(46,...)/Func_080ed408(47,...) + heap_cache[7]/heap_cache[8] 'rectangle' readback (rather than 080e01e4's Func_080cef64 helper call), combined with 080e01e4's 96-pass outer loop / 512-slot shared particle pool shape and its now-resolved 'Func_080072f4 is a trampoline slot, not a real callee' finding (reused directly from 080e01e4.json rather than rediscovered: 0x080072f4 and 0x08007300 are the r4 and r7 slots of the _call_via_rN trampoline at games/gs1/asm/080072e4.s, so every 'bl' to either address is really an indirect call through whichever of the two heap_cache[7]/heap_cache[8] DrawRectangleFn pointers was most recently loaded into that register -- confirmed structurally from this owner's own retained bytes: zero blx/indirect-bx instructions exist anywhere in the function except the final epilogue return, so no call site can be a genuine direct callee at those two addresses). The full algorithm (ring seed, particle-reset sentinel loop, per-pass sine/cosine draw, 10-slot staggered-activation ring-and-burst loop with a 16-particle burst spawn and member announcement gated behind it, and the final 512-slot particle-lifetime scan/draw/decay) was derived directly from the retained assembly and cross-checked against the m2c-assisted decompile in out/family-transplants/main-080e0564/m2c/080e0564.c, which independently confirms every arithmetic formula used here (kind/scale random-mask constants, the half=(idx+(u32)idx>>31)>>1 idiom reused verbatim from 080e01e4.c, the Data_080ede48[idx-1] table lookup) and, importantly, that heap_cache[7]/heap_cache[8] ('rectangle_a'/'rectangle_b') are write-only in m2c's own data-flow analysis everywhere except the two Func_080072f4/Func_08007300 trampoline sites -- corroborating the trampoline-argument reading rather than contradicting it. Iterated with tools/compiler candidate-show --align through several rounds of evidence-backed source restructuring (documented in rejected_experiments/notes below), improving differing_halfwords from an initial 328 (naive direct-translation draft) to 305. The remaining gap is concentrated in one connected, unresolved register/stack-frame-layout choice, not a logic or algorithm error: every remaining '!' line in the aligned diff is the same value in a different register or stack slot, never a different value. Not exact; recorded honestly as a measured-draft."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 8301/10000, read in full per task instructions. Real but partial match: this owner shares the template's inline Func_080ed408(46,7,7,c,d)/Func_080ed408(47,7,7,c,d) + heap_cache[7]/heap_cache[8] 'rectangle' function-pointer readback idiom (both write the two pointers to fixed stack slots immediately after the two Func_080ed408 calls, matching the template's rectangle[2]/rectangle_slot/second_rectangle pattern almost verbatim), and the template's per-frame 'work+0x7780=2' BG-related setup. It does NOT share the template's single Func_080041d8 callback registration count, palette/Func_08002f40 load, or per-member orbiting-sprite draw loop -- those are absent here. Instead the outer-loop shape (96 passes, a 512-slot shared particle pool with a lifetime sentinel scan every pass, Data_080ede48 table-driven particle draw) matches games/gs1/recon/en/main/080e01e4.c far more closely than the assigned template; 080e01e4 was used as the primary structural/idiom reference for those parts, consistent with this owner's 860-byte size sitting between the template's 724 and 080e01e4's 832.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404, 080d59b0.json, 080d82b0.json, 080dc1ec.json and 080e01e4.json: identical Func_080cd594(mode)/heap_cache=(void**)0x03001EEC cursor-pair prologue/M2C_FIELD(work,...,0x7828)=object/BLDALPHA(0x04000052)=0x1010/Func_080041d8(0x080CD261,0x480)+Func_08004278(0x080CD261) callback pairing/work+0x7780/0x7784/0x7824/0x77A8 field offsets/Func_080030f8(1) per-pass yield shape. Per games/gs1/recon/en/dossiers.json#main:080e01e4's fully-derived evidence (reused here, not rediscovered), 'Func_080072f4' and 'Func_08007300' as printed in the retained assembly are not real function symbols: they are the r4 and r7 register slots of the _call_via_rN trampoline at games/gs1/asm/080072e4.s (base 0x080072e4 + 4*N for N=r0..sp; r4 is N=4 -> 0x080072f4, r7 is N=7 -> 0x08007300), so every 'bl' to either address is an indirect call through whatever DrawRectangleFn pointer was most recently loaded into that register from the stack -- here always rectangle_a (heap_cache[7]) for the r7/Func_08007300 site and rectangle_b (heap_cache[8]) for both r4/Func_080072f4 sites, matching the immediate 'ldr r4,[sp,#28]' / 'ldr r7,[sp,#24]' loads that precede each such 'bl' in games/gs1/asm/080e0564.s."},"rejected_experiments":["Swapping the assignment order of extra_target and draw_destination (extra_target = heap_cache[2]; draw_destination = *cursor; instead of the reverse) to chase the reference's extra_target=sp+20/rectangle_a=sp+24/rectangle_b=sp+28/draw_destination=sp+36 stack layout: regressed sharply (differing_halfwords 321->330, matched_prefix 17->8) and was reverted. The reference clearly reads draw_destination before extra_target (matching this owner's own retained ldmia/ldr sequence), so this was source-order-invalid as well as measurably worse.","Reordering the top-of-function local *declarations* only (not the assignment statements) to place accumulator/extra_target/rectangle_a/rectangle_b/frame/draw_destination in the exact increasing-slot-address order the reference uses (16/20/24/28/32/36): regressed (differing_halfwords 321->323, matched_prefix 17->12) and was reverted. Confirms (consistent with games/gs1/recon/en/dossiers.json#main:080e01e4's own finding on a related question) that this compiler's stack-slot assignment for spilled locals is not driven by simple declaration-list order.","Swapping the rectangle_a/rectangle_b assignment statement order (rectangle_b = heap_cache[8]; rectangle_a = heap_cache[7]; instead of the reverse) to chase the same stack-slot-order question: zero effect (differing_halfwords unchanged at 307 at the point this was tried) -- the two independent loads have no data dependency forcing a particular schedule, so the compiler reorders them regardless of source order. Reverted for readability (a, then b, is the more natural reading order matching the template's own rectangle[0]/second_rectangle phrasing).","Giving the member_id_offset/Func_080d6888/Func_080b5088 loop the same 'target = *target_slot;' re-read-before-every-use idiom that games/gs1/recon/en/main/080e01e4.c uses (a named target_slot/target pair, target reassigned three times per iteration) instead of a bare nested M2C_FIELD(M2C_FIELD(work,...,0x7828),...) expression at each use site: regressed (differing_halfwords 321->325, candidate size shrank further to 852, moving away from the reference's 860) and was reverted. The nested-M2C_FIELD-every-use-site form (already the family's documented default per this owner's and other siblings' hard constraints) scores better here.","Reusing the outer-scope loop counter 'i' (already shared between the initial 32-entry ring-seed loop and the final 512-slot particle-lifetime scan) for the 10-iteration staggered-activation slot loop as well, keeping the inner 16-iteration particle-burst loop on its own 'burst' counter: this genuinely helped (differing_halfwords 321->313, wrong_instructions 312->280) but as a side effect moved 'work' off r9 onto fp for the rest of the function (a new, different register-choice regression), since freeing the sl-register slot this reuse enabled let the allocator's next choice cascade elsewhere. Superseded, not reverted, by the next experiment.","Swapping which of the two nested loops reuses 'i': giving the OUTER 10-iteration slot loop its own dedicated 'slot' counter and reusing 'i' for the INNER 16-iteration particle-burst loop instead (the burst loop is the one whose reference-side counter is visibly spilled to sp+8 around the two Func_080004458()-heavy calls it wraps, closer in spirit to how 'i' is already reused for the final 512-iteration scan). This fixed the r9/fp regression from the previous experiment (work returned to r9, matching the reference exactly) and further improved the score (differing_halfwords 313->307, wrong_instructions 280->262, matched_prefix restored to 17). Kept.","Swapping the frame=0/accumulator=0x8000 initializer statement order (frame = 0; accumulator = 0x8000; instead of the reverse): small genuine improvement (differing_halfwords 307->305) with no downstream regression observed. Kept.","Reusing 'i' for the member_id_offset loop's own 'idx' counter too (on top of the two kept experiments above), hypothesizing the sequential non-overlapping do-while blocks could share one pseudo the way the burst-loop reuse did: this regressed (differing_halfwords 307->318, candidate size grew to 868) despite a further wrong_instructions improvement (262->258), and was reverted. wrong_instructions and differing_halfwords disagreed here; differing_halfwords is the byte-exactness ground truth per CONTRIBUTING.md, so the regression stands as rejected."],"notes":["2026-08-31 bounded family-stamp pass: the allocator-order decoder named swap_declarations(rectangle_b,rectangle_a). Applying that literal declaration-order repair improved differing_halfwords 305->304 and wrong_instructions 260->254 without changing the 864-byte extent or topology; a fresh decoder pass then reported no unique source shape. Retained as the best measured draft, but not adopted.","2026-08-31 retained-assembly proof: after applying the decoder's one valid rectangle declaration-order repair, the complete candidate has equal branch topology and accounts for every reference call, argument, trampoline, callback, blend write, ring/burst/member loop, width-sensitive shift, literal, table lookup, field access, and memory operation. The residual is confined to GCC's 40-byte frame and its extra_target/rectangle stack homes versus the reference's equivalent homes and 36-byte frame, with the resulting four-byte instruction/pool extent and register/offset cascade. A fresh decoder finds no unique repair; declaration, statement, counter-identity, scope, reread/cache, family-transfer, compiler-family, and scheduling probes preserve the residual or regress. Relocation-normalized cross-edition verification proves all 664 core bytes identical across all six GS1 editions (31 relocations and 18 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/080e0564.s), the approved local EN ROM, the family-transplant workspace's m2c-assisted context (out/family-transplants/main-080e0564/{template.c,m2c/080e0564.c,m2c/target.canonical.s,m2c/symbolized.s} -- target.canonical.s and symbolized.s are byte-identical disassemblies of the same retained bytes, cross-checked line-for-line against games/gs1/asm/080e0564.s directly), the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/fetch_rectangle_blitters.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c and 080e01e4.c (and their .json dossiers), in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: sets hardware alpha-blend register 0x04000052 (BLDALPHA=0x1010, not the template's BG2 affine-scale register), allocates two rectangle-blit heap routines via direct Func_080ed408(46,7,7,11,2)/Func_080ed408(47,7,7,3,3) calls and reads their function pointers back from heap_cache[7]/heap_cache[8] (matching the template's idiom, with this owner's own distinct id/flash-count constants), opens three effect registrations via Func_080e0524 (against extra_target=heap_cache[2], work, and work+0x2F8), seeds a 32-slot ring at work+0x7080 with a random low byte and a constant high field, resets a 512-slot shared particle pool's lifetime sentinel to -1, then runs 96 animation passes. Each pass conditionally draws one sine/cosine-orbiting rectangle for its first 80 passes (fixed x amplitude, frame-shrinking y amplitude -- unlike 080e01e4's shared-amplitude marker), walks 10 fixed ring slots with a staggered per-slot activation threshold (frame >= 16 + slot*4), drawing and decaying each active slot every pass it stays active and, exactly once per slot (the pass its threshold is first crossed), spawning a 16-particle burst into that slot's private sub-range of the shared 512-particle pool and, if the target has any real party members, cueing Func_080d6888/Func_080b5088 for each one. Finally every pass scans all 512 shared particle slots, drawing and aging every slot whose lifetime sentinel is not -1, using the same half=(idx+(u32)idx>>31)>>1 / Data_080ede48[idx-1] table-lookup idiom already established in 080e01e4.c.","Per CONTRIBUTING.md's ban on hand-forced register assignment/scheduling, the remaining differing_halfwords were investigated only through genuine source-level restructuring (declaration order, statement order, loop-counter variable identity/scope, re-read-vs-cache idiom choice) with each candidate independently measured via tools/compiler candidate-show --align, never through asm()/register hints/PERM_GENERAL forcing. The residual left open (extra_target/rectangle_a/rectangle_b landing at stack offsets 32/28/24 in the candidate vs the reference's 20/24/28, with a knock-on 4-byte candidate/reference size difference) is the same class of 'genuinely open, evidence-exhausted-at-the-source-level compiler register/stack-allocation-priority question' already documented after multiple dedicated passes on the closely related sibling 080e01e4 (see that owner's score.note 'open question (b)'); every remaining aligned-diff line in this owner's output is the identical value in a different register or stack slot, never a different computed value, so this is not believed to be a logic error.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e08c0":{"schema_version":1,"namespace":"main","address":"0x080e08c0","status":"proven-retained","classification":"battle_effect_compiler_materialization_module","owner_bytes":964,"score":{"measured":"2026-08-27","candidate_bytes":968,"reference_bytes":964,"differing_halfwords":307,"wrong_instructions":207,"class":"wrong","note":"First pass, built from the owner's own retained assembly (games/gs1/asm/080e08c0.s) plus an m2c-assisted transplant workspace (out/family-transplants/main-080e08c0/), not from the family matcher's naive template (main:080ce85c / member_orbit/run.c), whose naive symbol-renamed seed differed from the real target by hundreds of differing halfwords. The family matcher's structural score was against member_orbit/run.c's shape, but this owner's real callee set, field layout and constants match the already-recovered 0x03001eec 'battle work' sibling cluster instead (games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c), exactly as those five owners' own dossiers describe for their assigned (also mismatched) templates. Two real bugs found and fixed against reference evidence: (1) the CELL_W-table half-width shift in the frame>0x1F sprite-cell draw loop needs an unsigned (u32) operand to compile to lsrs -- an s32 local produced asrs, a genuine wrong-instruction, confirmed by cross-checking the already-adopted games/gs1/src/battle/effects/puff_arc/run.c, which declares the identical 'wide = CELL_W[cell]' idiom as u32 for the same reason; (2) the particle-scan draw's 'half = size >> 1' subtraction needed the same unsigned treatment (u32 cast), independently confirmed the same way. The larger single improvement (differing_halfwords 431->307, wrong_instructions 305->207, and candidate_bytes 984->968) came from restructuring the particle-scan draw call to assign 'size' inline inside the second call argument's array-index expression (Data_080ede48[(size = (member & 1) + 3) - 1]) rather than as a preceding standalone statement -- matching the established assignment-expression-as-argument idiom already proven in puff_arc/run.c's CELL_W read, and confirmed here from the reference's own instruction order (the mask/+3 sequence is interleaved with the position-read/wobble-shift sequence in the reference, not fully sequenced before it). This same change had a second, unexpected effect: it also fixed the function's very first register-allocation decision (the persistent 'work' base pointer now lands in sl for the whole function, matching the reference, instead of landing in r9) -- apparently a side effect of reduced register pressure from removing the extra 'dbl' local this change also let become an inline 'size * 2'. A fully-inlined variant that also removed the separate 'x' (position+wobble) local was tried and rejected: it lowered wrong_instructions to 209 but raised differing_halfwords 307->318, because 'size' then had to be spilled to the stack to survive the sin()-call argument evaluation; kept the version with 'x' as its own local instead, which needs no spill and scores strictly better on the primary differing_halfwords metric.","residual":"After both fixes and the argument-order restructuring, every remaining difference is one of the three cross-family register/scheduling residuals already confirmed and explicitly flagged as not source-shape-controllable in 080dc1ec.json, 080d82b0.json, 080d59b0.json and 080e01e4.json's dossiers: (a) the ring-seed loop's inner-loop prologue loads the 0x02010000 EWRAM base constant once and reuses it via register copies for both the particle-pointer construction and the two field-8/0x14 masks, where the reference loads it twice into two separate registers (r1 and r3) -- tried giving the mask its own separate 's32 mask = 0x02010000;' local, distinct from the pointer-construction literal, which shifted which physical register (fp vs r9) holds which role but did not produce the reference's two-load shape and left differing_halfwords unchanged; (b) short-lived scratch-register choice for the outer 'frame' counter's many repeated comparisons throughout the 112-pass loop body (frame==0x38, frame<=0x17, frame==0x14, the 0x14..0x1F range fold, frame==0x20, frame>0x1F, frame==0x26) differs per comparison (r0/r1/r2/r3/r4/r6 in various orders) even though every comparison's actual VALUE, immediate and branch target are correct; (c) a handful of independent-immediate-load scheduling swaps (e.g. 'movs r3,#40' before vs after an unrelated shift-and-add sequence) that reorder two independent instructions with no value difference. None of these were resolved by variable identity consolidation (reusing one 'member' variable across all four per-pass sub-loop counters, matching 080e01e4.json's confirmed successful technique for its own sentinel-init loop, had zero measurable effect here) or declaration-order changes (moving 'work' to the first-declared local had zero effect), consistent with those dossiers' own findings that this is a genuinely open compiler-internals-level question, not a source-restructuring one."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 7947/10000 (the closest structural template available), but the owner's real size (964 bytes) and shape differ substantially from the template's (724 bytes, 306 instructions): no Func_08002f40/Func_080ed408 heap-block allocation calls at all (this owner's two draw callbacks come entirely from Func_080cef64, like 080dc1ec/080e01e4, not from the template's Func_080ed408(46,...)/Func_080ed408(47,...) pair), a single Func_080041d8/Func_08004278 registration (not the template's two), a 9-entry orbit-ring array combined with a 144-slot burst-particle pool seeded 16-at-a-time per ring entry (neither of which the template has at all), and a fixed 112-pass outer loop (vs the template's member_count*16+48). Structurally this owner is a much closer match to the already-recovered 0x03001eec 'battle work' cluster (080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c) than to its assigned template, exactly as those five owners' own dossiers already document for their own (likewise mismatched) template assignments.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family: identical heap_cache=(void**)0x03001EEC / cursor=heap_cache / work=*cursor++ / draw_destination=*cursor / extra_target=heap_cache[2] prologue (byte-identical ldmia sequence, matches 080e01e4/080d82b0), the same Func_080cd594(0)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() call shape, the same (s32)&Value_XXXXXXXX effect-id idiom (Value_00000073/0000008e/000000b7/000000b4, all already-established symbols reused verbatim from 080e01e4.c and games/gs1/src/battle/effects/puff_arc/run.c), the same Func_080cef64(flag, out_pair) draw-callback-pair resolution as 080dc1ec/080e01e4, and the same Func_080072f4/Func_080072f0 trampoline calls (the r4 and r3 entries of the _call_via_rN bundle at games/gs1/asm/080072e4.s, confirmed and derived in 080dc1ec.json) modeled as callbacks[0]/callback_ptr[1] indirect calls and a direct Func_080072f0(dest,src,size,copier) call respectively. This owner is also the first in the cluster confirmed to share the exact Data_080ede9f/080edea5/080edeab/080edeb2 sprite-cell tables and CELL_W/CELL_H/CELL_DY/CELL_SRC-style table-driven draw idiom already adopted byte-exact in games/gs1/src/battle/effects/puff_arc/run.c (same table base addresses, same width-read-once-reused-for-shift-and-argument pattern, same six-cell/48-frame-divided-by-8 animation-cell indexing), confirming puff_arc's tables and idiom generalize to this cluster rather than being puff_arc-specific."},"rejected_experiments":["Naive symbol-renamed transplant of the member_orbit/run.c template (out/family-transplants/main-080e08c0/080e08c0.c): differing_halfwords in the hundreds before any adaptation: wrong callee set (Func_08002f40/Func_080ed408 calls that don't exist in the real target), wrong field layout, wrong loop trip counts. Rejected as a starting point in favor of reading games/gs1/asm/080e08c0.s directly plus the m2c-assisted out/family-transplants/main-080e08c0/m2c/080e08c0.c raw decompile of the target's own bytes.","s32 (signed) type for the CELL_W-table half-width local in the frame>0x1F ring-animate draw and for the particle-scan draw's size>>1 half: both produced asrs (arithmetic shift) where the reference emits lsrs (logical shift). Fixed with u32 for the ring-animate width (matching puff_arc/run.c's identical 'u32 wide' declaration) and a (u32) cast at the particle-scan shift site; changing the particle-scan 'size' local itself to u32 (rather than casting only at the shift) regressed differing_halfwords 431->453 and wrong_instructions 305->366, apparently by changing codegen at the array-index and multiply sites too; the narrower (u32) cast at just the shift site captured the fix without the regression.","Fully inlining the particle-scan draw's x-position computation into the call's third argument (removing the separate 'x' local entirely, so 'size' is assigned inside argument 2 and read by argument 3 in the same call): dropped wrong_instructions 213->209 but raised differing_halfwords 307->318 and forced 'size' to spill to a stack slot to survive the sin()-call argument evaluation. Reverted in favor of keeping 'x' as its own local (assigned before the call) with only 'size' assigned inline inside argument 2 -- strictly better on the primary differing_halfwords metric.","Reordering 'work' to the first-declared local (ahead of heap_cache/cursor): zero effect on the compiled output, confirming this compiler's register allocation is not driven by simple declaration-order/first-come allocation for this family, consistent with 080e01e4.json's own declaration-order experiments.","Merging the particle-scan loop's counter into the same 'member' variable already reused for the ring-seed outer loop, the ring-animate loop, and the final Func_080d6888/Func_080b5088 notify loop (matching 080e01e4.json's confirmed technique for its sentinel-init loop): correct and consistent with the reference's own register reuse (r7 is genuinely reused across all four of these sub-loops in the reference), but on its own, before the argument-restructuring fix below, produced no measurable score change -- the benefit only showed up combined with the inline-assignment restructuring of the particle-scan draw call.","Giving the ring-seed inner loop's 0x02010000 EWRAM mask its own separate 's32 mask = 0x02010000;' local, distinct from the particle-pointer-construction literal, to try to reproduce the reference's two-separate-literal-pool-load shape (r1 and r3 both loaded from the pool, rather than one load reused via register copy): shifted which physical register (fp vs r9) ends up holding the mask role but did not produce a second load and left differing_halfwords unchanged; kept anyway since it has a small, non-negative effect on wrong_instructions (213->207) with no downside."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e08c0.s), the out/family-transplants/main-080e08c0/ workspace's m2c-assisted raw decompile of the target's own bytes (m2c/080e08c0.c, m2c/target.canonical.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, the measured-draft siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c and 080e01e4.c and their dossiers, in-repository headers, and the approved compiler. No other Golden Sun decompilation project or external symbol map was consulted.","2026-08-31 retained-assembly proof: the complete 112-pass battle-effect candidate has equal branch topology and accounts for every call, argument, callback, constant, table lookup, loop bound, field access, and memory operation. The residual is confined to the documented register-role cascade, reused versus duplicate 0x02010000 literal materialization, independent immediate scheduling, and the resulting four-byte pool/return-alignment extent. The allocator decoder identifies only the interlocked carrier/width roles and finds no unique source repair; the family-transfer, declaration, variable-identity, type-width, argument-evaluation, constant-carrier, compiler-family, and pass probes recorded above preserve the residual or regress. Relocation-normalized cross-edition verification proves all 742 core bytes identical across all six GS1 editions (36 relocations and 19 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_materialization_module.","This candidate claims zero DONE bytes (status measured-draft, not exact).","Semantic summary: republishes the caller's effect-state pointer at work+0x7828, resolves a two-entry draw-callback pair via Func_080cef64, registers three effects (Func_080e0524 against extra_target, work, and work+0x320), seeds a 9-entry orbit ring at work+0x7080 (sine/cosine-derived x/y, alternating +/-32 stagger, and a negative staggered 'age' start at -(ring_index*2)) together with a 144-slot burst-particle pool (9 rings x 16 particles each, randomized position/velocity/angle fields), then runs 112 animation passes. Each pass conditionally draws a fixed curtain rectangle through frame-indexed sub-ranges (frames 0-23 via callback[0], frames 20-31 via callback_ptr[1] with two different position formulas split at frame 24, a one-shot palette/graphics load at frame 20 via Func_080072f0, a one-shot Func_080e0524 registration at frame 32), animates all 9 ring entries once their staggered age enters [0,47] (table-driven 6-cell sprite draw via callback[0], shared Data_080ede9f/080edea5/080edeab/080edeb2 tables already adopted in puff_arc/run.c), scans and ages all 144 burst particles once each pass's frame index crosses each particle's own activation threshold ((idx/16)*2+40), redrawing and advancing an angle-like field with a documented off-by-one wraparound (adds 0x800 per pass, resets by subtracting 0xFFFF rather than 0x10000 when it exceeds 0xFFFF), and at frame 38 cues Func_080d6888/Func_080b5088 for every real party member from the target's own count field.","The Func_080b5088 call in this owner passes two arguments (member_id, 6), not the single-argument shape used in 080e01e4.c's own local prototype for the same callee -- since every recon .c file declares its own local extern prototype rather than sharing one through a header, this does not conflict; this owner's own retained assembly unambiguously sets r1=6 before the call (movs r1,#6 immediately before bl), so the two-argument shape here is taken directly from this owner's own evidence rather than copied from a sibling.","The two real bugs found (unsigned-shift requirements for the CELL_W half-width and the particle-scan half computation) and the inline-assignment-expression-as-call-argument idiom that produced the largest single improvement are both worth checking against 080d59b0.c, 080d82b0.c and 080dc1ec.c, whose own dossiers describe similar table-driven draw calls and may carry the same unfixed asrs/lsrs mismatch or the same un-tried argument-restructuring opportunity.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e0c84":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080e0c84","status":"proven-retained","owner_bytes":956,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"score":{"measured":"2026-08-27","candidate_bytes":956,"reference_bytes":956,"differing_halfwords":4,"wrong_instructions":8,"class":"allocation","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080e0c84.c --align --size 956","note":"Drafted from the retained owner assembly (games/gs1/asm/080e0c84.s) and the family-transplant workspace's m2c-assisted context (out/family-transplants/main-080e0c84/), not the naive symbol-renamed seed. Length and structure match the reference exactly (956/956 bytes). Explicit narrow callback and interval locals reproduce the reference's argument-materialization order and reduce the residual from six to four differing halfwords. The only remaining cluster is the reciprocal r8/r9 choice for the particle base and 0xF mask carriers. Earlier structural fixes established the indirect draw callbacks, assignment-expression table-read order, and three-word spawn output required by the reference frame."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 8059/10000 against member_orbit/run.c, but this owner's size (956 bytes) and body differ substantially from the template's (724 bytes): where member_orbit runs a single 64-frame loop that draws 4 orbiting sprites per active party member, this owner instead seeds a 64-slot randomly-initialized particle pool (fixed-point x/y position plus a sin/cos velocity pair per particle) ahead of the frame loop, then every frame both re-draws every eligible particle (reading its position back through the upper halfword of the s32 fixed-point field, per 080e01e4.c's established M2C_FIELD(ptr,s16*,2/6) idiom) and redraws a 5-column background reveal band whose x-offset depends on `frame/4`. The two owners do share the family's field-offset layout (work+0x7780/0x7784/0x7824/0x7828), the M2C_FIELD macro convention, the heap_cache=(void**)0x03001EEC/cursor/work/canvas prologue, and the Func_080cd594/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 setup/teardown bracket -- confirming the family assignment at the subsystem level even though the template's own body was not otherwise reusable."},"rejected_experiments":[{"experiment":"pre-compute the particle-draw call's w/h/x_int/y_int into named locals ahead of the call (routine[i&1](canvas, ..., x_int - w/2, y_int - h/2, w, h);)","result":"compiled to the right values but a different instruction order (table16 -> byte-table1 -> byte-table2 -> both ldrsh reads, instead of the reference's table16 -> x_int -> byte-table1 -> byte-table2 -> y_int -> byte-table2 interleaving); replaced with puff_arc/run.c's established `(w = Data_X[i]) / 2` assignment-expression idiom, inlined directly in the call, which reproduced the reference's exact read order and dropped differing_halfwords from 270 to 147 in one step"},{"experiment":"spawn as a 2-word local (s32 spawn[2];), matching the caller's own two direct reads (spawn[0], spawn[1])","result":"left the compiled frame 4 bytes short (sub sp,#44 vs reference's #48) and shifted every later local's stack offset by 8, cascading into ~100 register-choice diffs across the whole function even though every value was individually correct; widening to `s32 spawn[3];` (an unread 3rd word Func_080e3980 evidently still writes, matching the template's own 3-int screen-position convention) fixed the frame size exactly and collapsed nearly all of those cascaded diffs at once (270 -> 81 differing_halfwords)"},{"experiment":"col precomputed into a named local before each routine[0](...) call in the final two 5-iteration reveal-band loops (col = (i<<5) - (frame/4&31); routine[0](canvas, work, col, ...);)","result":"reference computes the subtraction interleaved with the sp+20/r8 setup rather than immediately after the mask; inlining the expression directly into the call argument (dropping the named `col` local) matched that interleaving and dropped differing_halfwords from 81 to 11"},{"experiment":"amp * Func_08002322(angle) / amp * Func_0800231c(angle) for the particle velocity fields (amp written first, syntactically)","result":"reference preloads the sin/cos call result into the muls accumulator register first, then multiplies by amp already resident from the mask computation; swapping the C multiplication operand order to `Func_08002322(angle) * amp` matched (11 -> 7 differing halfwords)"},{"experiment":"hoist `p = (Particle *)0x02010000;` above the particle-init for-loop as a separate statement, with `p++` as the loop body's last statement (matching the particle-draw loop's own for(...;...;i++,p++) form only in the second loop)","result":"folding the init loop to the same `for (i = 0, p = ...; i != 64; i++, p++)` shape used by the particle-draw loop dropped one more differing halfword (7 -> 6) with no size change"},{"experiment":"declaration-order swaps (spawn/screen/routine locals; amp/angle locals) to influence the two remaining independent-immediate-load residuals (the Func_080041d8 callback/interval pool-load-vs-lsls ordering, and the r8/r9 particle-loop mask/base-pointer preload ordering)","result":"zero effect in every case, consistent with 080e01e4.json's finding that declaration-order and block-scoping levers do not move this compiler's register/scheduling choices on their own -- these two are left as the family's already-documented register-allocation-priority residual, class=allocation"}],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e0c84.s), the approved local EN ROM, the already-adopted games/gs1/src/battle/effects/member_orbit/run.c and games/gs1/src/battle/effects/puff_arc/run.c, games/gs1/recon/en/main/080e01e4.c and its dossier, in-repository headers, and the approved compiler. The out/family-transplants/main-080e0c84/ workspace's m2c-assisted context (m2c/080e0c84.c, m2c/target.canonical.s) was used as a starting structural scaffold, not copied verbatim -- the naive symbol-renamed 080e0c84.c seed in that directory was confirmed unusable directly (its body is the template's own, not this owner's).","The complete candidate is retained as semantic reconstruction evidence; the byte-exact structured assembly remains production source under the proven battle-effect compiler-allocation classification.","Semantic summary: sets BG2 scale, republishes the effect-state pointer at work+0x7828, resolves two draw routines via Func_080cef64 into routine[2] (indirect calls through the r4/ip _call_via_rN trampoline slots, never direct function calls), seeds a 64-slot particle pool at the fixed EWRAM scratch address 0x02010000 with randomized fixed-point positions and a sin/cos velocity pair, then runs 64 animation frames. Each frame conditionally draws one orbiting marker (state->0x1C==1, gated further by a double-draw on the first 4 frames), redraws every eligible particle (frame >= particle_index/4 + 4) at a table-selected sprite cell, on frame 8 fires a one-shot Func_080d6888/Func_080b5088 dispatch pair, and redraws a 5-column background reveal band whose formula (subtract vs add-then-subtract-32) is chosen by state->field_4.","The remaining 4 differing halfwords / 8 wrong instructions are one reciprocal r8/r9 role choice between the particle base and 0xF mask carriers. Explicit narrow callback and interval locals closed the former literal-load/shift scheduling hunk without forcing allocation or scheduling. Explicit mask locals and reversed loop-initializer order regress the surrounding allocation and were rejected.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."],"compiler_decision":{"tool":"candidate-show --allocator-order plus GCC -da allocation dumps","finding":"The remaining broad-looking rows reduce to one reciprocal r8/r9 role choice between the persistent particle pointer and mask carrier, plus one independent literal-load/shift ordering. The allocator assigns both long-lived pseudos from the same low-register preference class; declaration, scope, operand-order, family-template, and compiler-axis probes preserve the choice or regress surrounding exact code."},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":728,"core_identical":true,"starts":{"ja":"0x080d7c84","en":"0x080e0c84","de":"0x080e2a84","es":"0x080e4484","fr":"0x080e4484","it":"0x080e0c84"}},"decision":"Retain the byte-exact structured assembly as a proven battle-effect compiler-allocation module. The complete ordinary-C reconstruction remains the semantic source artifact and all 956 owner bytes count as DONE."},"main:080e15e8":{"schema_version":1,"namespace":"main","address":"0x080e15e8","status":"mapped","measured":"2026-08-29","map":{"head":"0x080e15e8","head_symbol":"FunctionHead_080e15e8","head_file":"games/gs1/asm/080e15e8.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; (sub sp, then setup) -- full r8-r11 save.","true_epilogue":{"file":"games/gs1/asm/080e21e8.s","note":"Ends `... bl sub_08009038 (loop) / bl sub_080cdbc0 / add sp, #336 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. 336-byte frame, four-high-register restore, sub_080cdbc0 cleanup call matching the shared idiom seen in 080be378/080d765c/080ec100/080e47b8/080f4168. This is the sole real epilogue."},"span":{"start":"0x080e15e8","end_exclusive":"0x080e2538","size_bytes":3920,"derivation":"end = start of next asm file games/gs1/asm/080e2538.s, immediately following 080e21e8.s which owns the epilogue. size = 0x080e2538 - 0x080e15e8 = 0xf50 = 3920."},"member_regions_in_order":[{"addr":"0x080e15e8","symbol":"FunctionHead_080e15e8","file":"games/gs1/asm/080e15e8.s","role":"real prologue + setup, in-file literal pool"},{"addr":"0x080e1724","symbol":"Fragment_080e1724","file":"games/gs1/asm/080e1724.s","role":"middle fragment, header comment: '親関数の中間断片'"},{"addr":"0x080e17c4","symbol":"Continuation_080e17c4","file":"games/gs1/asm/080e17c4.s","role":"continuation through an indirect-call loop tail (header: '間接演算呼出し後のループ末尾までを同一ファイルに保持'); contains an internal `mov r12, pc / bx r7` long-branch veneer mid-body; ends on an internal `bne` that falls straight through into 080e1a48 with no explicit branch"},{"addr":"0x080e1a48","symbol":"Fragment_080e1a48","file":"games/gs1/asm/080e1a48.s","role":"internal fragment carrying the parent's frame/high registers forward, header: '親関数のスタック枠と高位レジスタを引き継ぐ内部断片'"},{"addr":"0x080e1acc","symbol":"Region_080e1acc","file":"games/gs1/asm/080e1acc.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e1df8","symbol":"Region_080e1df8","file":"games/gs1/asm/080e1df8.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e21e8","symbol":"Region_080e21e8","file":"games/gs1/asm/080e21e8.s","role":"converging tail ending in the real, shared epilogue"}]},"domain_evidence":["080e17c4's mid-body `mov r12, pc / bx r7` is the exact 'inter-region veneer' pattern named by CONTRIBUTING.md's Split functions section as the compiler's own long-branch mechanism -- direct structural confirmation of a single split function rather than several call sites.","080e1a48's header comment explicitly states the following region shares the parent's stack frame and high registers ('親関数のスタック枠と高位レジスタを引き継ぐ'), and its own body never pushes/pops -- consistent with being mid-function, not a callee.","sub_080cdbc0 in the epilogue matches the shared per-call finalizer idiom already noted across 080be378/080d765c/080ec100/080e47b8/080f4168, reinforcing that all of these large split dispatch functions in the 080d7xxx-080f6xxx range belong to one subsystem (likely battle/menu related given the earlier-adopted 080be378's confirmed battle-ability-resolution domain)."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080e15e8.c --owner 080e15e8 --size 3920","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited.","080e17c4 -> 080e1a48 is a physical fall-through (no branch instruction crosses the boundary); verified by the preceding file's last instruction being a conditional `bne` to an internal label rather than any address touching 080e1a48."]},"main:080e2538":{"schema_version":1,"namespace":"main","address":"0x080e2538","status":"measured-draft","owner_bytes":956,"score":{"measured":"2026-08-27","candidate_bytes":884,"reference_bytes":956,"differing_halfwords":452,"wrong_instructions":420,"class":"wrong","note":"First pass, recovered directly from games/gs1/asm/080e2538.s (every field width/sign checked instruction-by-instruction: ldr vs ldrb vs ldrsb vs ldrh vs ldrsh) plus the out/family-transplants/main-080e2538/m2c/080e2538.c real-assembly m2c decompile (used only for control-flow shape, not statement spelling). The assigned family template (main:080ce85c, member_orbit/run.c) shares no callees and a materially different control-flow shape -- only its heap_cache-cursor prologue idiom transfers; the rest was recovered fresh from this owner's own bytes and cross-checked against 080e01e4.c/080e7404.c for established callee signatures and field offsets ({work,object}+0x14 member_count, +0x7780/+0x7784/+0x7824/+0x77A8 status fields, +0x24+2*i member-id array). Two family fixes applied on first read rather than discovered by trial: the BG2X pan blend's lsrs+adds+asrs is plain `/2` (not the sign-extension-bug shift trick -- the ASR here already matches a genuine signed halving); and every `bl Func_080072f4` is the r4 slot of the _call_via_rN trampoline (0x080072f4 = 0x080072e4 + 4*4), modeled as an indirect call through the single DrawRectangleFn blit routine kept in heap_cache[7] (established by 080e01e4.c/member_orbit run.c), not a fictional 6-argument direct call. Structure, constants, field offsets, table widths/signs (Data_080eecf2/080eecb2/080eecfc/080eecff/080eed0e are ldrb-read u8 except 080eecf2 which is ldrsb-read s8; 080eed1e is ldrh-read u16) and every branch/loop bound were confirmed to match the reference one instruction at a time via --align. The entire residual is a single upstream register-allocation choice: the reference spills `work` (and to a lesser extent the heap_cache[1] draw-target) to a 56-byte stack frame and reloads it repeatedly (many `ldr rX,[sp,#N]` sites), while this candidate's compiler keeps both live in callee-saved high registers for the whole function (`sub sp,#32`, no `work` reload anywhere) -- a 72-byte/36-instruction gap entirely explained by that one spill-vs-register decision cascading through every site that touches `work`/`draw_target`/the row-vs-frame-pass counters (candidate keeps frame-pass in r9 and row in sl; reference keeps frame-pass in fp and row in r9 -- registers/values/net effect all match, only the physical assignment differs). Tried and confirmed zero-effect: reordering the `fp`/`row` top-level declarations; giving the two ring/burst seed loops (before the main per-frame loop) their own counter identity separate from the main loop's `row` (876 bytes, same 452 differing_halfwords -- moved size further from the 956-byte target, reverted). This matches the family's documented, not-source-shape-controllable register-allocation residual (games/gs1/recon/en/dossiers.json#main:080e01e4 note (b): reference coalesces short-lifetime loop counters into `sl`/keeps the outer pass counter in `fp`; compilers this size differ on which high register gets which role) -- here the same class of issue, more severe because this owner has more live loop variables competing for the same four high registers. Not chased further per that precedent."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 8085/10000 (n-gram similarity high, length similarity only 7500 -- template is 724 bytes against this owner's 956). Shares zero callees with Func_080ce85c beyond the generic prologue/epilogue pattern and heap_cache(0x03001EEC)/work+0x7828 idiom; the real control-flow (22 branch labels, a two-phase seed-then-animate shape driven by two small lookup tables Data_080eecfc/Data_080eecf7 rather than a single member_count*16+48 frame loop) was recovered fresh from this owner's own retained assembly, not transplanted.","actual_sibling_evidence":"Confirmed member of the 0x03001eec 'battle work' subsystem family documented in games/gs1/recon/en/dossiers.json#main:080e7404 and 080e01e4.json: identical work+0x7828 state-pointer idiom, the same Func_080cd594(mode)/Func_080e0524(id,target,f,f)/Func_080041d8(0x080CD261,0x480)/Func_08004278(0x080CD261)/Func_08002dd8(id)/Func_080cdbc0() open/close shape, the same {state}+0x14 member_count / +0x24+2*i member-id array fields already established by member_orbit/run.c and 080e01e4.c, and the same Func_080072f4-is-the-r4-trampoline-slot resolution first derived in 080dc1ec.json and reused verbatim here (heap_cache[7] blit routine from the same Func_080ed408(46,...) call already established as a DrawRectangleFn-populating call in member_orbit/run.c and 080e01e4.c)."},"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e2538.s), the disassembly-driven out/family-transplants/main-080e2538/m2c/080e2538.c control-flow reference (m2c run against this owner's own real bytes, used for control-flow shape only), the approved local EN ROM, games/gs1/recon/en/main/080e7404.c, 080e01e4.c, games/gs1/src/battle/effects/member_orbit/run.c and their dossiers, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes -- not adopted, differing_halfwords=452.","Semantic summary: a battle-presentation sub-effect that pans BG2's X reference point halfway between the effect state's first and last party member, seeds a small per-row 'vine' ring and a much larger 21-item-per-row burst table sized by a per-variant row count (Data_080eecfc[state->0x18]), then runs one pass per animation frame. Each row activates once the running frame counter crosses its own Data_080eecf7[row]+0x12 threshold: from then on every pass draws and steps all 21 of that row's burst items (position/speed/shape driven by Func_08004458 and the Data_080eecff/080eed0e/080eed1e width/height/sprite-offset tables); before that threshold every pass instead draws and grows the row's own vine entry once the row's plain Data_080eecf7[row] threshold is passed. Exactly on the frame a row's activation threshold is first crossed, the owner also cues Func_080d6888 for every real party member on the state.","Every field access width and signedness (u8 vs s8, u16, s16, s32) was verified against the individual ldr/ldrb/ldrsb/ldrh/ldrsh/str/strh mnemonics in games/gs1/asm/080e2538.s rather than trusted from the m2c placeholder types, since m2c's default type inference does not reliably distinguish signed byte loads from unsigned ones.","Data_080eecb2/080eecf2/080eecf7/080eecfc/080eecff/080eed0e/080eed1e are small tables placed near this owner's own object code (~0x080eecb2-0x080eed2e); named by address only, per the established Data_ convention (e.g. games/gs1/recon/en/main/080e01e4.c's Data_080ede48), since no cross-owner evidence yet ties them to a more specific shared vocabulary.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080e302c":{"schema_version":1,"namespace":"main","address":"0x080e302c","status":"measured-draft","owner_bytes":2188,"candidate_bytes":2004,"differing_halfwords":1086,"wrong_instructions":1044,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted a 2188-byte no-candidate main-ROM owner after repairing its aggregate-aware m2c draft. A fresh canonical compile produces 2004 bytes; topology differs and 1086 halfwords differ, so the draft claims zero DONE bytes.","Mechanical repairs recovered the packed u8/u16 presentation tables at 0x080eed7e-0x080eeda6, the eleven object handles at work offset 0x77d8, and signed-halfword party-member IDs. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The owner builds a battle presentation from palette darkening, tile strips, eleven sprite objects, two particle fields, phase-controlled drawing, and party-member actions. A permanent source name is deferred until dispatch and resource-table evidence identifies the effect."]},"main:080e47b8":{"schema_version":1,"namespace":"main","address":"0x080e47b8","status":"mapped","measured":"2026-08-29","map":{"head":"0x080e47b8","head_symbol":"FunctionHead_080e47b8","head_file":"games/gs1/asm/080e47b8.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #184 -- full r8-r11 high-register save, 184-byte frame.","true_epilogue":{"file":"games/gs1/asm/080e6288.s","note":"Ends `... bl sub_080cdbc0 / .L_080e65f8: add sp, #184 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0` -- exact mirror of the head's prologue, same 184-byte frame, same four high-register saves. This is the sole real epilogue of the enclosing function."},"span":{"start":"0x080e47b8","end_exclusive":"0x080e6638","size_bytes":7808,"derivation":"end = start of next asm file games/gs1/asm/080e6638.s (immediately following 080e6288.s, which owns the epilogue and has no trailing pool beyond it). size = 0x080e6638 - 0x080e47b8 = 0x1e80 = 7808."},"member_regions_in_order":[{"addr":"0x080e47b8","symbol":"FunctionHead_080e47b8","file":"games/gs1/asm/080e47b8.s","role":"real prologue + setup + branch head of a 101-entry jump table (per its own header comment '後続する百一項目の分岐表'), literal pool in-file"},{"addr":"0x080e4ab8","symbol":"Fragment_080e4ab8","file":"games/gs1/asm/080e4ab8.s","role":"jump-table case body reached only via computed branch, shares the head's frame; header comment: '親関数の分岐表から到達し、同じスタック枠を使う内部断片'"},{"addr":"0x080e4b4c","symbol":"Region_080e4b4c","file":"games/gs1/asm/080e4b4c.s","role":"call-graph-reached prologue-less region, code+data mixed"},{"addr":"0x080e4e0c","symbol":"Region_080e4e0c","file":"games/gs1/asm/080e4e0c.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e547c","symbol":"Fragment_080e547c","file":"games/gs1/asm/080e547c.s","role":"ten jump-table case bodies sharing the parent literal table, header comment: '親関数の分岐表から到達する十個の処理断片'"},{"addr":"0x080e5504","symbol":"Region_080e5504","file":"games/gs1/asm/080e5504.s","role":"call-graph-reached prologue-less region, contains .L_080e551a landing label targeted by 080e547c's fragments"},{"addr":"0x080e57b4","symbol":"Region_080e57b4","file":"games/gs1/asm/080e57b4.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e5afc","symbol":"Region_080e5afc","file":"games/gs1/asm/080e5afc.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e5e28","symbol":"Region_080e5e28","file":"games/gs1/asm/080e5e28.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080e6288","symbol":"Region_080e6288","file":"games/gs1/asm/080e6288.s","role":"converging tail ending in the real, shared, single epilogue"}]},"domain_evidence":["080e47b8's own header comment identifies it as 'FunctionHead' for a split function whose branch head carries a 101-entry jump table plus literal pool -- structurally identical in shape to the already-adopted 080be378 split (100-entry table, same four-high-register frame convention).","Case-body fragments 080e4ab8 and 080e547c both explicitly self-describe (in their headers) as reached from the parent's jump table and sharing its stack frame -- direct textual confirmation this is one function, not several.","The intervening 080e4b4c/080e4e0c/080e5504/080e57b4/080e5afc/080e5e28 regions are all tagged with the 'call-graph reconstructed, code+data mixed, byte-verified by build_asm.ts' comment and each open with a bare label (no push), consistent with case-body continuations rather than independent callable functions.","sub_080cdbc0 (invoked in the epilogue's tail cleanup, matching the same call seen in the already-adopted 080be378/080ec100/080d765c epilogues) appears to be a shared per-call finalizer used across several of these large dispatch functions in this address neighborhood -- likely a common battle/menu subsystem helper worth checking against existing owners before scoring."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080e47b8.c --owner 080e47b8 --size 7808","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edit, no games/gs1/recon/translation-units.json touched.","Recovered only from retained assembly headers/prologue/epilogue text in the listed .s files; no leaked source or other decompilation project consulted."]},"main:080e698c":{"schema_version":1,"namespace":"main","address":"0x080e698c","status":"proven-retained","owner_bytes":944,"classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"score":{"measured":"2026-08-27","candidate_bytes":944,"reference_bytes":944,"differing_halfwords":294,"wrong_instructions":136,"class":"wrong","note":"First pass, evidence-grounded against games/gs1/asm/080e698c.s (never against the family-matcher's naive symbol-retargeted seed, which differs from this owner's real control flow entirely -- no per-member per-frame sprite loop at all). Started from 390 differing_halfwords / 230 wrong_instructions / 940 candidate bytes (owner is 944) and converged to the numbers above through four confirmed fixes: (1) the sine/cos-derived particle-velocity fields at frame==18 (`M2C_FIELD(particle,s32*,12)`/`+16`) need a SIGNED `s32 magnitude`, not `u32` -- the reference's `asrs r3,r3,#7`/`asrs r3,r3,#6` are arithmetic shifts and an unsigned multiplicand compiled to `lsrs`, a real value-changing bug for negative products; (2) the final particle-draw call's `(x>>16)-8`/`(y>>16)-8` arguments must be computed into named locals (`rx`/`ry`) BEFORE the `Func_080022fc` cell-index call, not inlined at the call site -- the reference computes both shifts immediately after the range guard, before touching `frame+i`; (3) the prologue statement order matters: `draw_destination = *cursor; extra_target = heap_cache[2];` must come BEFORE `M2C_FIELD(work,...,0x7828) = object;`, matching the reference's literal-pool/`ldmia` scheduling -- reversing this (moving the field store first) measurably regressed the score (263->446 dh) by knocking `work` off r9 onto fp entirely; (4) `new_x` (`member_a`'s field+8, later added to `dx_scaled`) must be pre-read into the `new_x` local itself and reused for the `dx` subtraction, rather than re-read fresh from `member_a` after the Func_080022ec call -- the reference caches this specific value into `sl` before the call (`mov sl,r2`) so it survives across it. Tried the identical treatment for the z-component (`new_z`/member_a field+16, dz computation): unlike x, caching z the same way made the allocator swap `work` from r9 onto fp function-wide (score regressed to 940 bytes/263 dh but 204 wrong_instructions, i.e. a differently-shaped, not simply worse, mismatch) -- reverted, leaving the z-component read fresh at point of use as before.","residual":"The remaining diff is entirely register-allocation/scheduling noise, not a remaining algorithm, type, or call-argument mismatch: (a) the 1024-slot particle-lifetime-reset loop's counter lands in r3 here vs the reference's r8 (r8 needs the awkward `movs r4,#1; add r8,r4` two-instruction increment since Thumb high registers cannot take an immediate add, so the reference's choice is clearly a global allocation-pressure artifact, not a source hint); this single choice renumbers several downstream pseudo-registers for the rest of the function (member_b's z-field read order, several `mov rX,sl`/`mov rX,r8` register-name-only diffs at the Func_08009140/150/080 call trio, the final `pop {r0}; bx r0` vs `pop {r1}; bx r1`). (b) A handful of independent-immediate-load reorderings (e.g. `movs r1,#7; movs r2,#5` vs the reference's `r2` first then `r1`) that carry no value difference. Tried renaming/re-scoping the reset loop's counter (`i` vs a fresh `count`, block-scoped either way) and nesting `leftover` in its own block right at the sqrt call site: both zero effect, confirming these are compiler-internal tie-breaks rather than source-shape gaps reachable from this level. Did not chase further, per this family's already-documented pattern of this same residual class (games/gs1/recon/en/dossiers.json#main:080e01e4 note (b), 080d82b0.json, 080dc1ec.json)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Family-matcher score 8067/10000, the closest available template, but this owner is a materially different sub-effect: it runs a fixed 70-frame loop (`frame != 70`), never reads a member count (`M2C_FIELD(target,s32*,20)` does not appear anywhere in the retained assembly), and has no per-member per-frame sprite-orbit loop at all. In place of the template's per-member loop, this owner's prologue computes a one-time distance/velocity setup between exactly two tracked members (ids at target+8 and (s16)target+36) and feeds the result into the generic Object_ResetMotion/Object_SetPosition/Object_SetMode trio (Func_08009140/Func_08009150/Func_08009080, named via games/gs1/include/types.h's Object_ResetMotion define and the matching call shapes in games/gs1/recon/en/main/08098698.c). Every call the template and this owner DO share (Func_080cd594, Func_080e0524, Func_080041d8/Func_08004278, Func_08002dd8x2, Func_080cdbc0, Func_080b5098, Func_08002322/Func_0800231c) uses the identical 0x03001eec battle-work field layout (work+0x7780/0x7784/0x7824/0x7828) documented there and in the other measured siblings in this family (080d59b0/080d82b0/080dc1ec/080e01e4/080e7404)."},"rejected_experiments":["Naively renaming the family-matcher's symbol-retargeted seed (out/family-transplants/main-080e698c/080e698c.c, the template's own body under this owner's name) was not attempted as a starting point beyond reading it for header/typedef/declaration scaffolding -- its body has no relationship to this owner's real control flow (no fixed 70-frame loop, no distance/velocity prologue, no wipe-in table-driven draw, no frame==18 particle spawn), confirmed directly against games/gs1/asm/080e698c.s from the start.","u32 magnitude for the frame==18 particle-spawn velocity fields (field+12/+16): compiled the sin/cos-scaled shift as logical (`lsrs`) instead of the reference's arithmetic (`asrs`) -- a genuine value bug for negative sin/cos products, not merely a byte-count regression. Fixed by declaring `s32 magnitude`.","Inlining `(x>>16)-8`/`(y>>16)-8` directly as Func_080072f4 (the r4-slot `_call_via_rN` veneer, modeled as the real DrawRectangleFn indirect call) draw-call arguments: this delays the two `asrs #16` shifts until right before the call, after the `Func_080022fc` cell-index call, which does not match the reference's placement (both shifts happen immediately after the `x<=0x7EFFFF && y>=0` guard). Fixed by hoisting `rx = x>>16; ry = y>>16;` into named locals before the cell computation.","Reordering the prologue so `M2C_FIELD(work,void**,0x7828) = object;` runs before `draw_destination = *cursor;` (matching a naive reading of where the reference loads the work+0x7828 constant relative to `sub sp,#36`): this knocked `work` off r9 entirely (onto fp) for the whole rest of the function and regressed differing_halfwords from 263 to 446. Reverted to the original heap_cache/cursor/draw_destination/extra_target/field-store/Func_080cd594 order shared with the other measured siblings in this family.","Caching member_a's field+16 (z-component) into `new_z` before the dz Func_080022ec call, mirroring the x-component fix that did help: this is a real reference-visible pattern (`mov r8,r0` right after the field+16 load) but adding it as a second new named local pushed the compiler's overall register count high enough to reassign `work` from r9 to fp, producing a differently-shaped 940-byte/263-dh/204-wrong_instructions candidate rather than a strict improvement. Reverted; only the x-component (`new_x`) is pre-cached.","Block-scoping `leftover` (the Func_080072ec r2-slot veneer's genuinely-unassigned second argument, matching the FixedSqrt `unused1`/`unused2` idiom from games/gs1/src/math/fixed_sqrt.c) into its own nested block immediately before the sqrt call, and separately renaming the particle-reset loop's counter from `i` to a fresh `count`: both changes were measured with zero effect on the score, confirming the residual register choices are not sensitive to declaration scope or identifier naming at this level."],"notes":["Recovered only from the retained owner assembly (games/gs1/asm/080e698c.s), the approved local EN ROM, the family-transplant workspace's m2c-assisted structural context (out/family-transplants/main-080e698c/m2c/080e698c.c and family-template.i, used only for recovered-type/declaration hints, never for statement spelling), the already-exact template games/gs1/src/battle/effects/member_orbit/run.c, the already-committed measured siblings in this same 0x03001eec battle-work family (080d59b0.c/080d82b0.c/080dc1ec.c/080e01e4.c/080e7404.c and their dossiers), the already-adopted games/gs1/src/math/fixed_sqrt.c, games/gs1/src/runtime/dispatch/call_work_entry_with_args.c and battle_owner_24.c (Func_080072ec/Func_080072f0 veneer-call precedent), games/gs1/src/unidentified/overlays/state_update/... (unrelated), games/gs1/recon/en/main/08098698.c (Object_ResetMotion/SetPosition/SetMode call-shape precedent), games/gs1/include/types.h, and the approved compiler via tools/compiler candidate-show. No GS2 evidence, external source, other Golden Sun decompilation project, copied instruction bytes, fixed-register variable, inline assembly, compiler barrier, or compiler modification was used.","Func_080072ec is the r2-slot `_call_via_rN` veneer at games/gs1/asm/080072e4.s (0x080072e4 + 4*2, i.e. `bx r2`). The retained assembly loads 0x030001D8 -- the same relocated IWRAM square-root routine used throughout the tree, per fixed_sqrt.c's veneer-audit comment -- into r2 immediately before the `bl`, so it is modeled as a direct call to the veneer's own symbol with the real jump target as a trailing argument, exactly as fixed_sqrt.c and battle_owner_52.c model their own r3-slot and r2-slot veneer calls respectively. The middle argument is never assigned between the preceding Func_080022ec call and this call in the retained assembly (no instruction touches r1 in between, i.e. it is genuinely whatever Func_080022ec's implementation leaves in r1), so it is passed as a deliberately-uninitialized local (`leftover`), matching FixedSqrt's own unused1/unused2 idiom for the identical situation.","Func_080e3980 is EffectPosition_ApplyAlternateStepAndYOffset per games/gs1/include/types.h (sibling of Func_080e3944 EffectPosition_ApplyBaseAndYOffset, used by the template and by 080dc1ec.c). Its first argument here is read from target+8 as a plain s32 -- the exact same field used directly as Func_080b5098's member-id argument earlier in this same owner -- so it is modeled as taking a member id, not a position-record pointer, unlike Func_080e3944's (src,dest) shape.","Field offsets on `member_a` (0x28/0x2C-unused/0x30/0x34/0x44/0x48/0x58/0x5A) are read directly from the retained assembly and are not otherwise documented in this family; they are consumed exclusively by the generic Object_ResetMotion/SetPosition/SetMode trio immediately afterward, so no more specific struct/field names are claimed than the raw offsets.","Semantic summary: a camera-tracking / wipe-in battle intro effect. Loads a palette and sets BG2 scale, registers three effect callbacks (0x73 against extra_target, 0x61 against work, 0x6D against work+0x3E80), resolves one draw-callback pair via Func_080cef64, clears a 1024-slot particle pool, then computes the on-screen distance between two specific tracked party members (ids at target+8 and (s16)target+36) and uses it to set the first member's velocity/position via the generic object-motion API. Runs a fixed 70-frame loop: every frame re-projects the tracked member (Func_080e3980) to drive a BG affine register and, during frames 8-23, draws a wipe-in decorative rectangle from a small 7-entry table family (selected by a facing/variant flag at target+4); at frame 18 exactly it spawns 16 fresh randomized-velocity particles into the pool; every frame it also ages and draws all 128 active particles in that pool's first slice.","Cross-edition relocation-aware verification on 2026-08-31 locates this owner in all six releases and proves all 706 non-relocation core bytes identical. The object symbol covers 942 bytes; the classified 944-byte retained extent includes its two-byte trailing alignment.","A shipped compiler-route and pass sweep tested routed GCC 2.96, explicit GCC 2.96, old-agbcc, regmove, both schedulers, CSE follow/skip blocks, GCSE, expensive optimizations, thread jumps, strength reduction, and rerun-CSE-after-loop. Canonical and most pass toggles remain at the exact 944-byte extent and 294 differing halfwords; all alternatives either tie or regress.","The complete semantic audit, exact retained extent, equal branch topology, six-edition core identity, and bounded source/route probes satisfy the battle_effect_compiler_allocation_module gate. The remaining differences are the already-recorded reciprocal register roles and independent scheduling choices; the retained assembly is Proven ASM while this C remains its evidence-bearing reconstruction."]},"main:080e6eac":{"schema_version":1,"namespace":"main","address":"0x080e6eac","status":"proven-retained","classification":"battle_effect_compiler_frame_allocation_module","owner_bytes":976,"score":{"measured":"2026-08-31","candidate_bytes":952,"reference_bytes":976,"differing_halfwords":471,"wrong_instructions":317,"class":"wrong","note":"Drafted directly from games/gs1/asm/080e6eac.s and the m2c-assisted dump at out/family-transplants/main-080e6eac/m2c/080e6eac.c (a clean mechanical decompilation of this owner's own retained bytes, cross-checked field-by-field against the raw .s), not the family-matcher's assigned template (member_orbit/run.c, owner 080ce85c, score 7889/10000) beyond reusing its established M2C_FIELD/DrawRectangleFn idioms and heap_cache[7]/heap_cache[8] rectangle-pointer convention -- this owner's real size (976 vs the template's 724) and 3-argument signature (vs the template's 1) confirmed it is a structurally different function, not a near-identical transplant. Confirmed the owner takes (object, x_fixed16, y_fixed16) in r0/r1/r2 (not the template's single work-dispatch pointer): r1 feeds a signed-halved 'field 0' coordinate shared by all three particle-record arrays and by the frame<=47 draw call, r2 is used unmodified as 'field 4' everywhere including the final Func_080e6d3c(object, raw_x, y_arg) call, confirmed via the prologue's str r2,[sp,#28]/str r0,[sp,#32] spills and the mov fp,r1/asrs r3,r3,#1 halving sequence. Confirmed via out/family-transplants/main-080e6eac/m2c and manual disassembly that this owner never republishes its argument into work+0x7828 and registers only Func_080041d8((void*)0x080CD261,0x480) (not the template's extra 0x080DBB9D pair), matching m2c's single Func_080041d8 call and single matching Func_08004278 teardown. Confirmed both Func_080072f4 call sites are NOT a real 5-argument function: 0x080072f4 is the r4 slot of the 14-entry _call_via_rN trampoline at games/gs1/asm/080072e4.s (0x080072e4 + 4*4), so all four sites are indirect calls through a genuinely-traced DrawRectangleFn value -- two through heap_cache[7] (read right after Func_080ed408(46,...), reused at the frame<=47 draw and the 3-entry work+0x772C loop) and two through heap_cache[8] (read right after Func_080ed408(47,...), reused by the 30-entry and 60-entry work+0x7080/0x02010000 countdown loops), verified by tracing which of sp+16/sp+20 feeds r4 immediately before each bl. The tail call (also through _call_via_r3, 0x080072f0) is modelled as a raw 2-argument ClearFn cast per the 'reached with two arguments' case the veneer-audit note on games/gs1/src/graphics/reset_frame_state.c already records for the same 0x03000164 callee -- r2 is dead/stale at that call site in the retained bytes (its last write, work+0x7824's address, cannot survive the intervening bl Func_080030f8 and 72-iteration back-edge under normal ABI rules), so no third argument was modelled. candidate_bytes is now within 24 bytes of exact (952 vs 976) and every sign-halving in the file uses plain `/2` (not the `(x+((u32)x>>31))>>1` bit-trick) per the family's established fix for that pattern. Remaining residual is concentrated in one structural cause, detailed in score.note below and the file's own header comment: `canvas` (heap_cache[1]) is promoted to r9 here and kept for the whole function, while the reference spills it to a stack slot (reloaded at each of the four draw-call sites) and instead uses r9 only inside the 60-iteration array-C loop to hold a hoisted Table_080ede48 base. This is the exact 24 missing candidate bytes (one stack word) and, because ARM Thumb sp-relative offsets are absolute, cascades into an apparent offset mismatch on nearly every subsequent stack access even though the underlying arithmetic/call sequence matches -- matched_prefix is only 7 instructions but the great majority of the 325 'wrong' instructions past that point are the same operation at a shifted stack offset, not a different operation. Checked this against gcc-2.96's actual global-allocation priority formula (allocno_compare in gcc/global.c, priority ~ log2(n_refs)*n_refs/live_length*size): a short/dense live range (one loop body) legitimately outscores canvas's long/sparse one (whole-function, 4 uses), consistent with the reference preferring the table-base hoist over canvas for the one spare high register once sl(work)/fp(the halved x argument) are taken; this build's Table_080ede48 access is a compile-time-constant address gcc rematerializes via a fresh pc-relative literal each iteration instead of ever generating a competing allocno (confirmed: hoisting it into a `table` local scoped to the loop changed zero candidate bytes), so nothing in this source forces canvas out of r9. This is the same category of residual already documented as insensitive to source-level respelling on games/gs1/recon/en/dossiers.json#main:080a24d0 and (for the identical work-block idiom, fp-vs-r9 for a different variable) on games/gs1/recon/en/dossiers.json#main:080d59b0; not pursued further via an artificial competing local per the repo's hard constraint against hand-tuning register assignment."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting; family-matcher score 7889/10000, the closest structural template available, and already adopted/exact. Reused for its M2C_FIELD(expr,type_ptr,offset) macro, DrawRectangleFn typedef, and the heap_cache[7]/heap_cache[8] rectangle-pointer-pair convention, which do transfer cleanly. Everything else differs: this owner takes three arguments instead of one, never republishes its argument into work+0x7828 (no per-member dispatch target at all), registers a single periodic callback instead of the template's pair, and drives three independently-populated 28-byte particle-record arrays (one at a fixed EWRAM address, not per-party-member) instead of a per-member orbiting-sprite ring with camera projection via Func_080e3944 -- this owner has no camera projection step at all, using its two fixed-point arguments directly as particle-system center coordinates."},"rejected_experiments":["Explicit early `raw_x = x_arg;` copy assigned as its own statement between `work = *cursor++;` and `canvas = *cursor;`, matching the m2c-inferred sp8/temp_fp_21 split: byte-identical output to the baseline without it (gcc's copy propagation folds the redundant copy back to the parameter regardless of where it is textually introduced).","Reordering the struct-of-locals declaration order to place raw_x/aux/rect0/rect1/canvas in the same ascending order as their inferred reference stack offsets (8/12/16/20/24): byte-identical output; this compiler's stack-slot assignment for this function is not driven by C declaration order.","Moving `canvas = *cursor;` to after `aux = heap_cache[2];` instead of interleaved with the half_x computation (its actual position in the retained assembly): regressed to 470 differing halfwords and 333 wrong instructions, and broke the otherwise-exact match on the `ldmia r3!,{r0}` / early-canvas-read prologue shape; reverted.","Removing `canvas` as a named local entirely and reading M2C_FIELD((void*)0x03001EEC, void**, 4) fresh at each of the four DrawRectangleFn call sites (attempting to force a stack reload the way the reference does it): regressed to class=unemittable, 456 differing halfwords, 416 wrong instructions. With no later use of the *cursor dereference's result, gcc drops it (and the ldmia/mov sl,r0 sequence) entirely, producing a structurally different (and worse-matching) prologue rather than the hoped-for stack-resident-but-still-read canvas.","Hoisting Table_080ede48's base address into a `const u16 *table` local scoped to just the 60-iteration array-C loop (matching the reference's apparent r9-cached table base for that loop only, not the 30-iteration array-A loop which reference reloads fresh each iteration): zero effect on candidate bytes. The address is a compile-time constant; gcc rematerializes it via a fresh pc-relative literal at each use regardless of whether a named local wraps it, so this could not by itself create the competing allocno needed to displace canvas from r9. Left in the source anyway since it is a legitimate, harmless structural guess consistent with the reference's own asymmetry between the two otherwise-similar loops, and does not regress anything."],"notes":["2026-08-31 bounded family-stamp pass: the allocator-order decoder named swap_declarations(rect1,aux). Applying that declaration-order repair preserved differing_halfwords=471 and topology while improving wrong_instructions 325->317; a fresh decoder pass then reported no unique source shape. Retained as the best measured draft, but not adopted.","2026-08-31 retained-assembly proof: the complete candidate accounts for every reference call, argument, trampoline, callback, loop, sign-halving operation, literal, table lookup, field access, and memory operation. The residual is confined to GCC keeping the sparse whole-function canvas carrier in r9 with a 32-byte frame while the reference spills canvas in a 36-byte frame and reserves r9 for the dense Table_080ede48 loop carrier; the exact 24-byte extent difference and shifted stack/pool rows follow from that one allocator choice. The allocator decoder's one declaration-order repair improved wrong-instruction alignment without changing this floor, then found no further unique source shape. Pointer, declaration, lifetime, constant-address, compiler-family, and scheduling probes preserve the residual or regress, and GCC 2.96's own allocno priority formula explains the reference choice when the table address becomes a competing allocno. Relocation-normalized cross-edition verification proves all 752 core bytes identical across all six GS1 editions (35 relocations and 21 literal fields normalized). Structured assembly therefore remains authoritative under battle_effect_compiler_frame_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/080e6eac.s), the approved local EN ROM, the already-adopted exact sibling games/gs1/src/battle/effects/member_orbit/run.c, the m2c-assisted context pre-generated at out/family-transplants/main-080e6eac/ (target.canonical.s is a clean disassembly of this owner's own bytes, confirmed byte-identical to games/gs1/asm/080e6eac.s; m2c/080e6eac.c is a mechanical decompilation of that same disassembly used only to cross-check field offsets and arithmetic, not copied verbatim), in-repository headers, and the approved compiler. Also consulted gcc-2.96's own source (gcc/global.c's allocno_compare) to understand the specific register-allocation heuristic behind the one open residual below; this is the compiler toolchain itself, not another decompilation project's output.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect in the same 0x03001eec 'battle work' subsystem as member_orbit/run.c, taking a target pointer and a fixed-point (x, y) center directly as arguments rather than reading a per-member work-dispatch slot. Sets BG2PA=0x80, clears BG2X, and sets BLDCNT=0x3F46 (alpha blending, which the template does not touch), then seeds three 28-byte particle-record arrays with randomized polar-coordinate velocities around the given center: 64 records at work+0x7080, 3 evenly-spaced-by-angle records at work+0x772C, and 64 more at the fixed EWRAM address 0x02010000. Runs 72 frames; each frame optionally draws a frame-indexed sprite near the center (frames 0-47), then independently walks the three arrays with a countdown/expiry mechanic, drawing whichever entries are still alive through one of the two generated rectangle-blit callbacks, and calls a member-related helper (Func_080e6d3c) for frames 0-35.","No GS2 or other Golden Sun decompilation project's source, symbol map, or disassembly was consulted."]},"main:080e727c":{"schema_version":1,"namespace":"main","address":"0x080e727c","status":"measured-draft","owner_bytes":98,"executable_owner_bytes":98,"candidate_bytes":84,"differing_halfwords":47,"wrong_instructions":63,"classification":"palette-channel-shift-in-place","family":{"template_owner":"main:080b98b4","template_source":"games/gs1/src/graphics/palette/copy_banks_with_brightness_offset.c","note":"Template shape (three-argument color-channel clamp-add over a palette range) only loosely matches; this owner takes three independent per-channel deltas, walks a single flat 63-entry run in place, and has no lower-bound (negative) clamp, unlike the template's shared single delta / dual clamp over two separate 16-entry banks."},"domain":"Adds independent blue/green/red deltas to 63 consecutive BGR555 palette entries starting at 0x05000002, clamping each channel to 31 with no negative-side clamp, writing back in place.","expressed":["walks entries 1..63 of BG palette RAM as one flat do-while loop (0x05000002, +2 per entry)","extracts blue/green/red 5-bit fields from each color and adds a separate caller-supplied delta per channel","clamps each channel to a maximum of 31 only (no minimum clamp)","repacks and stores the color back to the same address before advancing"],"bounded_search":{"mode":"manual-respell","attempted":3,"exact":false},"bounded_checks":["first candidate used a for(i=0;i<64;...) ascending loop; the reference's cmp/bne back-edge into the load is a do-while with a `!= 63` exit test and 63 iterations (0x05000002..0x05000080), not 64 -- switching to `do { ... } while (i != 63)` fixed the loop shape (bne back-edge, counter compared for equality) but not the byte count.","reference dedicates r5/r6/r7/r8/lr/ip entirely to the six persistent values (pointer, counter, mask, three deltas) and uses r0-r3 purely as scratch inside the loop body, which is why it needs the extra push{r7}/pop{r3}+mov r8,r3 prologue/epilogue pair; both earlier candidates instead let the register allocator park two of the six persistent values in r0/r1 (no push needed), producing a shorter 84-byte function that never touches r8. This is a register-pressure/scratch-demand difference, not a semantic one, and was not resolved by loop-shape or statement-order changes alone.","reading the actual retained assembly directly (games/gs1/asm/080e727c.s) rather than the paraphrase above shows the reference computes `(u32)c << 16` once and derives blue via `>>26` and green via `>>21` from that single shifted value (matching a real CSE across two field reads sharing a subexpression), and computes red via a fresh `c & 31` immediate rather than reusing the shared blue/green mask register; rewriting the candidate to match both of those exactly (shift-once-then-extract for blue/green, a separate literal 31 for red instead of the shared `mask` variable) improved the candidate from 48/73 to 47/63 differing-halfwords/wrong-instructions while staying at the same 84-byte extent -- genuine progress, but the six-persistent-value register-pressure gap (this owner still keeps one delta in a plain low register r7 instead of promoting all three deltas to r8/lr/ip like the reference) remains unresolved."],"notes":["Owner byte size (98) matches the family entry's target_bytes; owner takes 3 explicit s32 arguments (blue_delta, green_delta, red_delta) rather than the template's single shared delta.","The residual is a register-allocation/scratch-pressure difference (candidate 84 bytes vs reference 98 bytes, missing the r8-preserving prologue/epilogue pair) rather than a control-flow or value-semantics gap; the loop shape, field-extraction subexpression sharing, clamp order, and store-in-place structure now match the reference's actual retained assembly exactly, and only the delta-parameter register promotion differs.","This looks like a source-shape gap worth another attempt (e.g. a source structure that forces all three deltas to be read after enough other low-register values are already live, deliberately exhausting r0-r7 before the deltas are first used) rather than a compiler-internals residual, since no compiler pass or option was found that could not emit the reference shape.","Recovered only from retained owner assembly and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."]},"main:080e7404":{"status":"proven-retained","classification":"thumb_multiple_transfer_module","span_bytes":3640,"edition":{"role":"derived-candidate","edition":"en","base_owner":null,"base_edition":"ja","rebase_status":"correspondence-needed"},"boundary":{"start":"0x080e7404","end":"0x080e823c","evidence":"games/gs1/asm/080e7404.s contains one global owner; its assembled .text is 0xe38 bytes and the next owner begins at 0x080e823c. The generated 0x080e7404-0x080ec100 target is a contiguous ranked scope containing later owners, not this function boundary."},"score":{"measured":"2026-08-27","candidate_bytes":3632,"reference_bytes":3640,"candidate_instructions":1520,"reference_instructions":1537,"wrong_instructions":1090,"differing_halfwords":1714,"class":"unemittable","alignment":{"source":"compiler candidate-show --align, tallied by mnemonic; the workbench objdiff report was not re-run this pass, so the previous objdiff block was dropped rather than carried forward stale","aligned_rows":1434,"unchanged":886,"argument_mismatches":548,"opcode_mismatches":0,"insertions":280,"deletions":284,"caveat":"rows include literal-pool words disassembled as instructions, so insertions/deletions overstate the code-level gap"},"note":"Sixth pass. Two decisive findings first, because they change what this owner can ever be. (1) Both DMA descriptor writes to 0x040000d4 are a standalone three-register Thumb store multiple: at reference offsets 0x19e and 0x258 (0x080e75a2 and 0x080e765c), `stmia r3!, {r0, r1, r2}` followed by a dead `subs r3, #12`, with r0/r1/r2 loaded individually immediately before (0xc307 0x3b0c verified against roms/gs1-en.gba, not a disassembly artifact). agscc cannot emit this. arm.md's movmem8b/movmem12b are the only Thumb multi-register transfer patterns and arm.c thumb_output_move_mem_multiple always prints `ldmia %1!` immediately before `stmia %0!`; the generic ldmsi/stmsi/store_multiple patterns at arm.md 4977-5058 are TARGET_ARM only. A local 12-byte struct assigned to *(Dma *)0x040000D4 was tried and does produce movmem12b, but with the paired `ldmia` the reference does not have. This is the same evidence basis classification.json already records for owner 080f4f04's mixed_thumb_multiple_transfer_module group. (2) Immediately before each `bl Func_080e7338` the reference does `add r2, sp, #284; mov r9, r2` and never reads r9 again in this owner (r9's next definition is `mov r9, r0` with r0=255 much later, at reference offset 0xc1e). Reading games/gs1/asm/080e7338.s shows why: it opens `mov r4, r9 / adds r3, r4, #0 / adds r1, r3, #0 / subs r1, #136 / ldr r3, [r1, #0]`, i.e. it dereferences r9-136. sp+284 is this frame's top and sp+284-136 = sp+148 = the work-pointer slot. So r9 is an implicit register argument carrying this frame's address into the callee, and Func_080e7338 is already classified hidden_register_context_module ('callee_saved_registers_carry_implicit_context', 'register_pins_disallowed'). The caller side of that contract is equally inexpressible. Conclusion: 080e7404 cannot reach byte identity from ordinary C with the approved compiler and belongs in a keep_structured_asm classification group rather than in the exact-match queue. Everything else this pass was ordinary reconstruction, and it moved a long way. Baseline was candidate=3620 dh=1736 wrong_instructions=1352; final is candidate=3632 dh=1714 wrong_instructions=1090, with opcode_mismatches now zero across the whole aligned comparison. What was fixed, in descending value. (a) Frame layout. m2c's sp50 and sp58 are two-word locals, not scalars: the reference writes sp+80/sp+84 and sp+88/sp+92, the second word always through the retained &sp50 / &sp58 pointer (reference offsets 0x5d6 and 0x624, `str r6, [sp, #88]` beside `str r6, [r3, #4]`). Declaring them s32[2] made the candidate byte-count-exact for the first time. (b) The three-word and four-word scratch records are indexed, not offset: replacing every `M2C_FIELD(&sp60, s32 *, 4)` with `sp60[1]` collapsed a pile of redundant frame-address materializations (wrong_instructions 1360 -> 1206 in one step) and made the reference's `add r5, sp, #96` / `str r3, [r5, #4]` shape appear. (c) m2c's sp94 (work-pointer slot at 148), sp98 (128-byte random table at 152) and sp118 (DMA source word at 280) are one contiguous 136-byte region; the compiler's frame allocator sorts declared locals into size classes (4-byte and 8-byte objects below, >= 12-byte objects above, first-declared highest within a class), so as separate small scalars sp94 and sp118 sank to the bottom of the frame. Merging them as `u8 sp98[132]` plus `s32 sp84[5]` (sp94 = sp84[4]) puts the whole declared block in one class and reproduces the reference's contiguous 80..283 layout up to a 12-byte spill-count difference. This also restored the reference's two-instruction `*sp3C` dereference: the fold of `*p` back to `[sp,#N]` is a CSE address-cost decision that only happens while the local's frame offset is <= 124, which is exactly why the reference (offset 140) keeps the pointer and the old draft (offset 84) did not. (d) Three real pointer-stride bugs: `var_sl_235`, `var_r5_615` (both s16 *) and `var_r3_572` (s32 *) were advanced by the reference's byte stride on a typed pointer, so each step moved two or seven times too far. (e) Eight missing `& 0xFF` masks: the reference hoists 255 into a register (r7, later r9) and ands every raw Func_08004458 result that is not already masked, in the 128-record, 512-record and 64-record initialisers. (f) The `(x >= 0 && x <= 0x7F)` guard in the progressive-reveal walk folds to one unsigned compare; the reference has two ordered signed compares, so it must be nested ifs, not `&&`. (g) Symbolisation with real evidence: Data_03001e50 is a `void *[]` and the owner reads [39], [40], [44] and [46] -- `&Data_03001e50[40]` reproduces the 0x03001ef0 pool word with `subs r3, #4` for [39], `&Data_03001e50[44]` reproduces 0x03001f00 with `[r5,#0]`/`[r5,#8]`, and plain `Data_03001e50[46]` reproduces the reference's `ldr r3, =0x03001e50 / adds r3, #184`. Data_03001ad0 and Data_03001ce0 must be aggregates, not folded absolute addresses, because the reference keeps the base in a register and uses `[r2,#4]`, `[r2,#6]`, `[r2,#16]`; a toy confirmed pointer arithmetic on an extern array folds to symbol+offset in the pool while a struct field does not. Data_080ede48 is indexed. Func_080e0524's and Func_08002f40's id arguments are Value_ pool symbols (0xc0, 0xc1, 0xc4 are all <= 255 and would otherwise be `movs`). (h) The u16/u8 temporaries around the projected-rectangle table forced truncation the reference does not have; widening temp_r6_269, temp_r5_271 and temp_r1_319 to s32 and spelling the halving of temp_r3_916/temp_r3_926 on the shifted word (`(t >> 16) + (s32)((u32) t >> 31)) >> 1`) restored the reference's `ldrh` + `lsls/asrs/lsrs` quartet instead of a folded `ldrsh`. Callee prototypes were added; they compile warning-clean and do not move the score. Residual: the candidate is 8 bytes and 17 instructions short, and every remaining aligned mismatch is a register or spill-slot choice, not a shape. The reference is under enough pressure to keep loop counters in r8 and the phase-two frame counter in fp with 18 spill slots; the candidate keeps counters in low registers and the sp3C pointer in r9 with 16 spill slots. 4 of the 8 missing bytes are the two 0x040000dc pool words the separated DMA writes need and the stmia does not."},"shape":{"reference_calls":95,"expressed_loops":19,"reference_pool_words":94,"candidate_pool_words":98,"symbolized_pool_references":107,"jump_table":false,"frame_bytes_reference":284,"frame_bytes_candidate":276},"unmatchable":[{"shape":"standalone thumb three-register store multiple","sites":2,"where":"reference 0x080e75a2 and 0x080e765c: `stmia r3!, {r0, r1, r2}` then a dead `subs r3, #12`, writing the DMA3 descriptor at 0x040000d4","evidence":["roms/gs1-en.gba bytes 0xc307 0x3b0c at both sites","alchemy-gcc/agscc/gcc/config/arm/arm.c thumb_output_move_mem_multiple emits ldmia immediately before stmia for both the 2- and 3-register cases","alchemy-gcc/agscc/gcc/config/arm/arm.md movmem12b and movmem8b are the only Thumb multi-register transfer insns","alchemy-gcc/agscc/gcc/config/arm/arm.md ldmsi, store_multiple, stmsi_postinc and stmsi are TARGET_ARM only","a local 12-byte struct assignment to *(Dma *)0x040000D4 was compiled and produces the paired ldmia/stmia, not the reference's bare stmia"]},{"shape":"implicit r9 register argument","sites":1,"where":"reference 0x080e7c00: `add r2, sp, #284` / `mov r9, r2` immediately before `bl Func_080e7338`, with r9 dead in this owner afterwards","evidence":["games/gs1/asm/080e7338.s reads r9 on entry and dereferences r9 - 136","sp + 284 is this frame's top and sp + 284 - 136 = sp + 148, this owner's work-pointer slot","games/gs1/asm/classification.json already lists 080e7338 in hidden_register_context_module with 'register_pins_disallowed' and 'approved_compiler_cannot_express_hidden_register_abi'"]}],"expressed":["complete two-argument entry paths, runtime argument binding, display setup, mode-specific object creation, and shared teardown","all palette, DMA, VRAM, random-tile, and progressive reveal initialization, including the 128-byte random offset table and nested 256-cell clearing walk","the complete first effect phase through its 192-frame bound: palette ramp, 64 moving records, projection, table-driven rectangles, per-frame updates, and early termination gate","the complete second effect phase: 32 runtime records, 128 and 512 particle-record initializers, sound and object gates, three 64-record render/update walks, mode-specific transforms, and 54-frame bound","all six rectangle callback sites and all three word-copy sites as evidence-backed indirect calls through the local callback and IWRAM copy entry rather than phantom direct callees","all reference branches and tails through Func_080cdbc0, with no jump table or omitted assembly region","the reference's declared-local frame region 80..283 in the reference's own order and sizes, including the two two-word records and the merged 136-byte work-slot/random-table/DMA-source block","the kind-39/40/44/46 heap-cache reads as one Data_03001e50 array, and 0x03001ad0 / 0x03001ce0 as based aggregates rather than folded absolute addresses"],"unexpressed":[{"op":"compiler-inexpressible instruction shape","count":3,"where":"two standalone thumb store-multiples and one implicit r9 hand-off; see the unmatchable block"},{"op":"aggregate recovery","count":"whole owner","where":"runtime offsets 0x7080-0x7828 and the 28-byte moving records remain M2C_FIELD accesses pending one evidence-backed shared structure"},{"op":"source-shape repair","count":1090,"where":"normalized comparison still differs in register allocation and spill placement only; the aligned comparison has zero opcode mismatches, so no remaining difference is a control-flow or instruction-selection error"},{"op":"symbol recovery","count":"whole owner","where":"address-named callees, provisional stack names, and hyou_a/hyou_b table roles stay generic where current local evidence does not justify narrower English names"}],"rejected":[{"experiment":"retain m2c's direct Func_080072f0/Func_080072f4 calls","result":"3592 candidate bytes and 1772 differing halfwords; rejected because the reference loads 0x03001388 or Data_03001eec+0x1c before call-via-register veneers, proving indirect word-copy and rectangle callbacks"},{"experiment":"declare sp94 and sp118 as one-element arrays so they join the aggregate allocation stream","result":"no layout change at all; the frame allocator sorts by size class, not by aggregate-ness, so 4-byte objects stay in the low class either way"},{"experiment":"reverse the declaration order of the nine frame locals, and separately move the whole block to the end of the declaration list","result":"the block moved as a unit but the size-class split remained; only merging sp94/sp98/sp118 into one >= 12-byte object reproduced the reference's contiguous layout"},{"experiment":"index Data_080eeebc and Data_080eeeca as named u16 arrays instead of M2C_FIELD on the folded absolute address","result":"wrong_instructions 1090 -> 1104; the symbol-based form makes the compiler choose ldrsh plus a re-zero-extend where the folded form keeps the reference's single ldrh, so the folded form was kept despite being the less faithful spelling"},{"experiment":"compose the 0x05000100 palette word through an s32 temporary before the halfword store, to stop the 0xF mask being materialised as a pooled halfword constant instead of the reference's `movs r7, #15`","result":"wrong_instructions 1090 -> 1118; the narrowing is what keeps the rest of that loop in the reference's shape, so the one extra pool word was accepted"},{"experiment":"spell the s16 halving as `((s16) x) / 2` rather than on the pre-shifted word","result":"wrong_instructions 1110 -> 1116 either way in aggregate, but the `/2` form emits ldrsh where the reference emits ldrh; the shifted-word form was kept as the faithful one"},{"experiment":"declare var_fp_1329 (the phase-two frame counter) as s32 instead of u32","result":"wrong_instructions 1090 -> 1094; it does not move the counter from its spill slot into fp, which is where the reference keeps it"}],"notes":["The complete 0x080e7404-0x080e823c reference assembly and all literal pools were read; workbench symbolization found 107 PC-relative references and no jump table.","The earlier note claiming this owner is listed in games/gs1/asm/classification.json's thumb-multiple-transfer group was wrong: 080e7404 does not appear anywhere in classification.json, and the mixed_thumb_multiple_transfer_module group holds only 080f4f04. The evidence recorded for that group is nonetheless exactly what rules this owner out, so 080e7404 should be added to a keep_structured_asm group of its own or to that one.","Linked differing_halfwords is the completion measure. The draft is 8 bytes short and is neither exact nor adoptable, and by the unmatchable block above it cannot become exact from C."]},"main:080e823c":{"schema_version":1,"namespace":"main","address":"0x080e823c","status":"measured-draft","owner_bytes":1968,"candidate_bytes":1728,"differing_halfwords":954,"wrong_instructions":823,"classification":"structural-reconstruction","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-30: promoted this battle-presentation owner from the aggregate-aware drafting wave. Mechanical type recovery makes the candidate compile to 1728 bytes for the 1968-byte reference; topology differs and 954 halfwords differ, so it remains a measured draft and claims zero DONE bytes.","The repairs type the battle work pointer, actor pointer slots, display-register halfword store, presentation lookup tables, signed actor identifiers, and the frame-control word at 0x03001b04. No instruction bytes, inline assembly, fixed-register variables, compiler barriers, or external decompilation sources were introduced.","The function initializes six battle objects and display state, advances a 320-frame presentation, updates particle banks, dispatches party-linked effects, and tears the scene down. Its permanent name remains unresolved until its battle-effect dispatch entry is proven.","The next reconstruction pass must recover the reference 84-byte frame and shared battle-work aggregate before source-order or allocator work; the current 36-byte frame shows that this is not a register-floor candidate."]},"main:080e89ec":{"schema_version":1,"namespace":"main","address":"0x080e89ec","status":"measured-draft","owner_bytes":1724,"span_bytes":1724,"score":{"measured":"2026-08-31","candidate_bytes":1804,"reference_bytes":1724,"differing_halfwords":857,"wrong_instructions":843,"class":"structural-topology","note":"The first compiling m2c draft was 1628 bytes with 846 differing halfwords, but omitted both outputs of Func_080cef64 and represented the 20-step coordinate history as out-of-bounds scalar arithmetic. Reconstructing DrawRectangleFn callbacks[2], the retained callback pointer, position[3], and history[40] restores the reference's exact 228-byte stack frame and models every call_via_r4 site as an ordinary six-argument indirect draw. The larger 1804-byte candidate is retained because it fixes real call semantics and memory safety; aggregate score is diagnostic, not the acceptance contract. The remaining mismatch spans the owner and is honestly classified structural-topology, not an allocation floor."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"This is another 0x03001eec battle-work presentation owner, but its behavior is distinct: it precomputes two opposing particle streams, draws a table-driven centre animation, shifts a 20-position trail, and advances two particle groups over 150 frames. The shared family contributes the heap-cache cursor, Func_080cef64 callback pair, work offsets, and teardown contract; it does not justify copying member_orbit's source shape."},"rejected_experiments":["Keeping m2c's four-argument Func_080072f4 calls compiled, but treated the r4 call-via veneer as a real function and discarded the width and height stored immediately before every retained call. Rejected in favor of typed DrawRectangleFn calls.","Keeping scalar sp38/sp44 locals reproduced m2c's unsafe out-of-bounds pointer arithmetic and a 44-byte frame instead of the retained 228-byte frame. Rejected in favor of explicit position and history arrays."],"notes":["Recovered from games/gs1/asm/080e89ec.s, the approved local ROM-derived tables at 0x080ede48/9f/a5/ab/b2, the m2c structural draft generated by the repository compiler, and already-recorded 0x03001eec family evidence in 080e01e4.c/json and 080ed104.c. No external decompilation source, inline assembly, fixed-register variable, compiler barrier, or compiler modification was used.","The temporary source name BattleEffect_RunDualParticleStream describes only behavior visible in the retained owner. Callback-table entry 49 and resources_d1_d3_idou_d3.json establish battle-effect ownership, but do not establish an English move name, so none is invented.","Func_080cef64 writes two DrawRectangleFn values at stack offsets 48 and 52. Retained Func_080072f4 branches load r4 from one of those slots and are the r4 member of the call_via_rN veneer bundle, so the C calls callbacks[0] or callbacks[1] directly with destination, source, x, y, width, and height.","This measured draft claims zero DONE bytes and leaves the canonical assembly owner in place."]},"main:080eb754":{"schema_version":1,"namespace":"main","address":"0x080eb754","status":"measured-draft","owner_bytes":2444,"candidate_bytes":2312,"differing_halfwords":1195,"wrong_instructions":1135,"classification":"structural-topology","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"notes":["2026-08-31: cleared the pre-score call-via idiom lint. The cached function word loaded from absolute_03001e50.field_00b8 into the established sp+0x48 slot is now modeled as one typed four-argument BattleEffectDrawFn and used at all five retained indirect-call sites: four branch through r4/Func_080072f4 and one through r7/Func_08007300. This grows the draft from 2292 to 2312 bytes, shrinking the missing-code gap from 152 to 132 bytes. Differing halfwords/wrong instructions move to 1195/1135 and GCC expands the candidate frame from the previously matching 176 bytes to 180 because the now-real callback lifetime increases pressure. The callbacks are retained despite that downstream allocation regression: direct calls to the register-call veneers were semantically false and could never satisfy the lint or reference register requirements.","2026-08-31: corrected the two nine-entry ROM displacement tables at 0x080eef56 and 0x080eef5f from u8 to s8, matching their use as signed screen-coordinate offsets in both projection loops. Also made the existing stack-array end comparison type-explicit; that cast is emission-neutral.","The m2c draft had collapsed three stack aggregates at sp+0x64/sp+0x94/sp+0xa0 into four-byte scalars and split the eight-byte position pair at sp+0x5c into two independent assignments, allowing GCC to delete the unused second word. Restoring their evidenced 0x30/0x0c/0x10 and 8-byte extents, reversing the mechanically generated local declarations to match GCC 2.96's stack-slot order, and expressing the pair as one aggregate copy recovers the reference's exact 176-byte frame and exact key slots (work@sp+0x50, object@sp+0x4c, canvas@sp+0x44). Candidate grows from 2264 to 2292 of 2444 bytes; differing halfwords improve 1194 to 1193. Raw wrong instructions rise 1067 to 1101 because the newly restored frame changes downstream register allocation, but this is a structural correction backed directly by stack offsets, not a raw-score guess.","2026-08-30: promoted the second-largest no-candidate main-ROM owner after repairing the aggregate-aware m2c draft's concrete invalid type expressions. A fresh canonical compile produces 2264 bytes for the 2444-byte reference; topology differs and 1194 halfwords differ, so this remains a measured draft and claims zero DONE bytes.","Repairs were mechanical: resolve the work pointer at 0x03001eec, use typed GBA register halfword stores, add typed u8/u16 ROM-table loads, and model member-id reads as signed halfwords at dynamic offsets. No instruction bytes, inline assembly, fixed-register variables, barriers, or external decompilation sources were used.","The function is a large battle-presentation routine with a 0x03001eec work block, 64-entry and 320-entry particle pools, palette and window effects, member-triggered emissions, and a 96-frame main loop. A permanent name is deferred until caller and dispatch evidence identifies the presentation."]},"main:080ec100":{"schema_version":1,"namespace":"main","address":"0x080ec100","status":"mapped","measured":"2026-08-29","map":{"head":"0x080ec100","head_symbol":"FunctionHead_080ec100","head_file":"games/gs1/asm/080ec100.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; sub sp, #116 -- full r8-r11 save, 116-byte frame.","true_epilogue":{"file":"games/gs1/asm/080ecae8.s","note":"Ends `... bl sub_08002dd8 (x2) / bl sub_080cdbc0 / add sp, #116 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. Exact mirror of the head's 116-byte frame and four-high-register save, same sub_08002dd8/sub_080cdbc0 cleanup idiom seen across the other mapped functions in this dossier batch. This is the sole real epilogue."},"span":{"start":"0x080ec100","end_exclusive":"0x080ecef4","size_bytes":3572,"derivation":"end = start of next asm file games/gs1/asm/080ecef4.s, immediately following 080ecae8.s which owns the epilogue. size = 0x080ecef4 - 0x080ec100 = 0xdf4 = 3572."},"member_regions_in_order":[{"addr":"0x080ec100","symbol":"FunctionHead_080ec100","file":"games/gs1/asm/080ec100.s","role":"real prologue + setup, in-file literal pool"},{"addr":"0x080ec190","symbol":"Continuation_080ec190","file":"games/gs1/asm/080ec190.s","role":"branch continuation, in-file literal pool"},{"addr":"0x080ec264","symbol":"Continuation_080ec264","file":"games/gs1/asm/080ec264.s","role":"continuation ending on two branches, one to a shared exit (sub_080ec596, internal to the next file) and one tail branch to sub_080ec474 (the immediately following region)"},{"addr":"0x080ec474","symbol":"Region_080ec474","file":"games/gs1/asm/080ec474.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080ec728","symbol":"Region_080ec728","file":"games/gs1/asm/080ec728.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080ecae8","symbol":"Region_080ecae8","file":"games/gs1/asm/080ecae8.s","role":"converging tail ending in the real, shared epilogue"}]},"domain_evidence":["080ec100's own header comment marks it 'FunctionHead' with 'following literal pool retained in the same file' -- same authored classification as the other confirmed heads in this batch.","080ec264 ends with two branches: one to `sub_080ec596` (a label inside 080ec474.s reached only by this internal jump, i.e. a shared exit rather than a call) and one direct tail branch `b sub_080ec474` into the physically-next file -- the classic prologue-less fall-through/branch chain named in CONTRIBUTING.md.","The sub_08002dd8 (x2, small constant args) + sub_080cdbc0 cleanup sequence immediately preceding frame teardown is now confirmed identical across 080d765c, 080d0ee0(via 080d12a8), 080e15e8, 080e21e8, and this function -- a strong signal these are all instances of one shared per-battle-action or per-menu-frame finalizer routine, useful context for whoever reconstructs the C bodies."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080ec100.c --owner 080ec100 --size 3572","notes":["Map only, per task scope -- no C source drafted, no translation-units.json edited."]},"main:080ecef4":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080ecef4","status":"measured-draft","owner_bytes":528,"score":{"measured":"2026-08-27","candidate_bytes":456,"reference_bytes":528,"differing_halfwords":258,"wrong_instructions":235,"class":"wrong","note":"This owner is NOT a menu-poll loop like select_party_member.c; the family clustering here is a call-target/n-gram match, not a structural one. It is a straight-line setup routine (two pointer/void* arguments, a 3-way mode dispatch into Func_080e0524 with message ids 0x4f/0x50, 0x4b/0x4c, or 0x4d/0x4e, then a fixed 21-iteration frame counter loop drawing a decorative border via Func_080ed408/Func_080072f4/Func_080072f0 with row ranges 0-3/4-7/8-11/12-15/16-19 and single-shot triggers at i==18 and i==20) that reads and writes a large struct reached through the adjacent globals at ADDR_03001EEC and ADDR_03001EEC+4 (fields observed at +0x7784, +0x77a4, +0x77a8, +0x7824, +0x7828), matching the same struct apply_shake.c already reaches through ADDR_03001EEC at neighbouring offsets 0x77a0/0x77a4/0x77a8."},"rejected_experiments":[{"experiment":"two separate extern-global loads for the ADDR_03001EEC value and the word at ADDR_03001EEC+4","result":"reference loads the base pointer once and does an auto-incrementing `ldmia r3!, {r7}` to fetch the first word, then a second `ldr [r3]` off the incremented pointer for the second word -- rewriting the two loads as `u32 *cell = (u32*)ADDR_03001EEC; base = *cell++; second = *cell;` was closer in shape (candidate dropped from 468 to 456 bytes, moving toward the reference's use of a shared pointer instead of two independent pool constants) but did not reach the reference's exact instruction selection"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, and the approved compiler.","This is a lower-confidence, single-pass structural draft, not an iteratively tuned one: the branch-by-mode dispatch, the loop bound (21 iterations) and its four row-range buckets, and the Scheduler_RemoveCallback(0x080cd261) tail call are read directly off the retained assembly and are solid; the exact struct-field semantics at offsets 0x7824/0x77a4/0x77a8/0x7784/0x7828, and specifically the guessed condition `M2C_FIELD(base,s32*,0x7824+4) == 1` gating the two Func_080ed408 border-tile calls, are inferred from instruction shape rather than confirmed against a known struct layout and are the weakest part of this draft.","The call `Func_080072f4(base, counter, counter, 0, arg5)` passes its fifth argument through r4 immediately before the `bl`, which is not how this codebase's other recovered callers pass a 5th integer argument (stack, not r4); that calling-convention detail was not resolved here and is a likely source of some of the remaining mismatch, not just field-offset guessing.","Given the scale of open questions, this looks like a source-shape gap worth a dedicated pass (working out the shared 'effects struct' layout from apply_shake.c and this owner's siblings together) rather than a compiler-internals residual reachable by respelling. This candidate claims zero DONE bytes."]},"main:080ed104":{"schema_version":1,"namespace":"main","address":"0x080ed104","status":"proven-retained","classification":"battle_effect_compiler_allocation_module","resolved_asm_classification":{"kind":"battle_effect_compiler_allocation_module","retention":"keep_structured_asm","confidence":"proven"},"owner_bytes":772,"score":{"measured":"2026-08-31","candidate_bytes":772,"reference_bytes":772,"differing_halfwords":197,"wrong_instructions":168,"class":"wrong","note":"First structural draft, built directly from games/gs1/asm/080ed104.s (not the family matcher's naive symbol-renamed seed, which was confirmed to differ substantially). The family matcher assigned main:080ce85c (member_orbit/run.c, already adopted) at score 8310/10000, but this owner's real callee set instead matches the already-drafted 0x03001eec 'battle work' subsystem (080e7404.c/080d59b0.c/080d82b0.c/080dc1ec.c/080e01e4.c): identical Func_080cd594/Func_080e0524/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0 shapes and the same 0x7780/0x7784/0x77A8/0x7824/0x7828 work-struct offsets. Unlike every sibling, this owner never reads the member-count field (object+0x14) and has no per-member loop at all; it runs a fixed 54-iteration frame loop that fills a horizontal progress bar, touching only the fixed first member slot (object+0x24) twice. Two retained `bl` sites required trampoline modeling per the established family finding (games/gs1/recon/en/dossiers.json#main:080dc1ec): 0x08007314 is the games/gs1/asm/080072e4.s ip (r12) slot (N=12) and 0x080072f4 is its r4 slot (N=4), so both are indirect calls through a traced function-pointer value, not real 'Func_08007314'/'Func_080072f4' functions. Traced the ip-slot's source precisely from the retained assembly: it dereferences the fixed address 0x03001F08, which is exactly heap_cache[7] (0x03001EEC + 7*4) -- the same kind-46 draw-rectangle cache slot the adopted member_orbit/run.c and 080d59b0.c both read after calling Func_080ed408(46,...), and this owner does call Func_080ed408(46,7,7,[3|7],bar_style) immediately before each ip-slot call, refreshing that exact slot. The r4-slot call's target instead traces to the two-word out-array most recently filled by Func_080cef64(flag, rect_fns) -- matching 080dc1ec.c's callback_pair[0] idiom exactly, six DrawRectangleFn arguments (dest,src,x,y,w,h) and all. Two evidence-grounded passes after the initial structural draft: (1) moved the two s16 star fields (offset +2/+6, read into named locals sy/sh) to their exact reference position -- immediately after the Func_080022ec bucket call and before the `bucket>6` clamp, not inlined at the call site -- which matches the retained assembly's early ldrsh-then-hold-in-register shape; wrong_instructions dropped 222->212. (2) reordered the Data_080eef88 (src-address) and Data_080eef96 (raw/half) table reads to match the reference's true load order (address table first, raw/half table second) instead of the reverse; the trailing table-lookup/draw-call block now matches the reference one-for-one except for register-letter and stack-offset choices. class stayed 'wrong' throughout (no regression in either pass) and candidate_bytes is stable at 768, 4 bytes short of the 772 reference.","prior_note":"Initial pass, before the two evidence-grounded fixes above: candidate=768 reference=772 differing_halfwords=276 wrong_instructions=240, built straight from a full read of games/gs1/asm/080ed104.s and the m2c-assisted context at out/family-transplants/main-080ed104/m2c/080ed104.c (a clean m2c decompilation of this owner's own retained bytes, not the template's)."},"family":{"assigned_template_owner":"main:080ce85c","assigned_template_source":"games/gs1/src/battle/effects/member_orbit/run.c","template_note":"Read in full before drafting. The family matcher's structural score (8310/10000) reflects shared prologue shape (push r5-r9+fp/lr, ldmia-based heap_cache read, several do-while counters) and a handful of shared callees (Func_080cd594/Func_080ed408/Func_080041d8/Func_08004278/Func_08002dd8/Func_080cdbc0), but the owner sizes differ (772 vs the template's 724) and the actual control flow does not match: this owner has no per-member orbit-sprite loop at all (member count, field object+0x14, is never read), and instead runs a fixed 54-frame bar-filling loop with a 16-entry 'star' array processed by index-based lifetime buckets. The naive symbol-renamed seed at out/family-transplants/main-080ed104/080ed104.c was confirmed unusable as anything but a header/typedef skeleton.","actual_sibling_evidence":"Real callee set, constants, and field offsets match the already-drafted 0x03001eec 'battle work' subsystem documented in games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, and 080e01e4.c far more closely than the assigned template: identical Func_080cd594(mode)/Func_080e0524(id,work,flag,flag)/Func_080041d8(cb,interval)/Func_08004278(cb)/Func_08002dd8(id)/Func_080cdbc0() shapes, the same finish-callback pointer 0x080CD261, and the same *(void**)0x03001EEC-based heap_cache/work/draw_destination/extra_target triple. games/gs1/recon/en/dossiers.json#main:080dc1ec's score.note supplied the load-bearing cross-family finding used here: the 'Func_080072f4' symbol appearing in several older sibling drafts (080ccebc.c, 080dd77c.c, 080ecef4.c) as a fictional 5-argument direct function is actually always the r4 slot of the games/gs1/asm/080072e4.s trampoline bundle; this owner reproduces that exact indirect-call shape, plus a second, previously-undocumented instance of the same bundle's ip (r12) slot at 0x08007314, traced here to heap_cache[7]."},"rejected_experiments":["Modeled the 0x08007314 (ip-slot) and 0x080072f4 (r4-slot) bl targets as real functions with literal 5/7-argument signatures (matching the pattern of some older, now-superseded sibling drafts): produced a badly wrong-shaped candidate near the call sites (missing the trampoline's actual register-indirect bx) and was abandoned before measuring in favor of the DrawRectangleFn cast-and-call idiom already established and cross-verified in games/gs1/recon/en/dossiers.json#main:080dc1ec.","Read the two s16 star fields (M2C_FIELD(star,s16*,2)/M2C_FIELD(star,s16*,6)) inline at their point of use in the final DrawRectangleFn call's argument list, matching the m2c-assisted draft's natural expression shape: compiled to a late load right before the call instead of the reference's early load-and-hold, costing 10 wrong_instructions; superseded by hoisting them into named locals (sy/sh) immediately after the Func_080022ec call, matching the retained assembly's actual register-lifetime shape.","Read the Data_080eef96 (raw/half) table before Data_080eef88 (src-address) table, matching the natural order of use in the DrawRectangleFn call's argument list (half is needed for x/y, src is needed second): produced the two literal-pool loads and ldrh instructions in the wrong relative order versus the reference's own address-table-first load order; superseded by computing `src` as a named local before `raw`/`half`, matching the reference's true evaluation order.","Originally attributed the reference's larger stack frame to an unread compiler-kept slot. The 2026-08-31 missing-code pass disproved that hypothesis: Func_080e3980's output is a genuine three-word projection result, and declaring screen[3] naturally restores the 44-byte frame and exact owner extent. A subsequent declaration-order probe on heap_cache/cursor produced identical bytes and was reverted."],"notes":["2026-08-31 bounded missing-code pass found a concrete type/extent error: Func_080e3980 writes a three-word projection result at the reference's sp+32 output area, while the draft declared a one-word scalar. Reconstructing it as s32 screen[3], passing screen, and consuming screen[0] restores the exact 772-byte owner extent and improves differing_halfwords 263->197 and wrong_instructions 212->168 with topology unchanged. Moving unrelated heap_cache/cursor declarations had zero effect and was reverted; the remaining residual is allocation/order, so this best measured draft is retained but not adopted.","2026-08-31 retained-assembly proof: after correcting Func_080e3980's three-word projection output, the ordinary-C candidate reproduces the exact 772-byte extent with equal branch topology and identical functional literals. Every callback, argument, constant, loop bound, table lookup, field access, and memory operation is accounted for; the remaining rows are the documented battle-work register/stack role cascade, independent evaluation scheduling, and equivalent direct 0x03001F08 versus base-plus-offset address materialization. The allocator decoder finds no unique source repair. Relocation-normalized cross-edition verification proves all 574 core bytes identical across all six GS1 editions (31 relocations and 18 literal fields normalized), and the bounded declaration/evaluation probes plus established subsystem family transfers preserve the residual or regress. Structured assembly therefore remains authoritative under battle_effect_compiler_allocation_module.","Recovered only from the retained owner assembly (games/gs1/asm/080ed104.s), the approved local EN ROM, the m2c-assisted transplant context at out/family-transplants/main-080ed104/ (m2c/target.canonical.s and m2c/080ed104.c, both m2c decompilations of this owner's own retained bytes -- not the template's), the already-adopted games/gs1/src/battle/effects/member_orbit/run.c, the already-drafted siblings games/gs1/recon/en/main/080e7404.c, 080d59b0.c, 080d82b0.c, 080dc1ec.c, 080e01e4.c and their dossiers, in-repository headers, and the approved compiler.","This candidate claims zero DONE bytes.","Semantic summary: a battle-presentation sub-effect. Sets BG2 scale, registers two draw-order callbacks (0x080DBB9D and 0x080CD261) and the kind-46/47 draw-rectangle pair via Func_080cef64, computes a BG-offset MMIO write from the fixed first party member's stat (object+0x24), seeds a 16-entry 'star' array at work+0x7080 with randomized velocity/angle fields, then runs a fixed 54-frame loop. Frame 10 re-cues the first member's portrait/voice line. Frames 8-53 grow (then shrink) a horizontal progress-bar rectangle drawn in two 14px segments through the kind-46 callback cached at heap_cache[7]. Every frame also walks the 16-entry star array: once a star's index-derived readiness threshold is reached and its lifetime counter is still low, it looks up two 7-entry pixel tables by a Func_080022ec-clamped bucket and draws a shrinking icon through the Func_080cef64-supplied callback array's first entry.","After correcting Func_080e3980's three-word output, the candidate and reference have identical 772-byte extents. The remaining large-scale hunks begin with the prologue's heap_cache/cursor register choice and match the same open, cross-family-documented compiler-allocator sensitivity already recorded in games/gs1/recon/en/dossiers.json#main:080dc1ec and 080d59b0.json for this exact 0x03001eec subsystem -- not pursued further per the ban on forcing register or stack assignment.","No GS2 or external source was used; no other Golden Sun decompilation project was consulted."]},"main:080f03f0":{"schema_version":1,"namespace":"main","address":"0x080f03f0","status":"measured-draft","owner_bytes":328,"executable_owner_bytes":328,"candidate_bytes":348,"differing_halfwords":142,"wrong_instructions":119,"family":{"template_owner":"main:080c10e8","template_source":"games/gs1/src/battle/presentation/set_actor_modes.c","note":"The assigned set_actor_modes.c template does not match this owner's shape at all (no shared calls, no shared control flow); the real algorithm is a self-contained audio/screen setup + 33-pass fade sequence with its own hardware-register writes, recovered directly from the retained assembly and its own literal pool rather than from any family sibling."},"domain":"One-shot audio/PPU setup (clears four state flags, configures a channel via Func_080041d8, sets display control, resets two VRAM-ish banks via Func_080f037c, arms two Func_080f0254 phases, writes two sound-control registers, then runs a 33-pass outer loop that alternately calls Func_080f02b0 against a 33-entry table and drives a 17-step linear fade on register 0x04000050) before a final shutdown/cleanup and flag set.","expressed":["clears four byte flags at 0x03001d18/0x03001f58/0x03001ac4/0x03001d08, then calls Func_080040e8 and Func_080041d8(0x080f03c1, 1152)","sets display control (0x04000000=64), resets two banks via Func_080f037c(0x06007800)/(0x0600f800), and arms Func_080f0254(0) then Func_080f0254(1)","writes 0x1f8a to both halves of a register pair at 0x0400000c/0x0400000e, restores display control to 0x1c40, writes 0x0f83 to 0x00002844, calls Func_080f0678, and waits 300 frames","for outer = 0..32 (33 passes): computes an alternating toggle from outer&1, calls Func_080f02b0 against a 33-entry u32 table at 0x080f0a5c indexed by outer with the opposite toggle, then runs a 17-step (inner = 0..16) fade on register 0x04000050 -- an ascending (inner<<8)|(16-inner) ramp on odd toggles, a descending base-256-per-step ramp on even toggles -- waiting 4 frames per step and 0x10b frames between outer passes","after the 33 passes: clears 0x04000050, restores display control to 0x1040 (display-control-address - 0x50), calls Func_0800479c and Func_08004760, sets the first flag back to 1, and returns 0"],"bounded_search":{"mode":"manual-respell","attempted":2,"exact":false},"bounded_checks":["the candidate reproduces the reference's full 16-word literal-pool content and order (verified against the retained .s file's own trailing .4byte list) and the complete outer/inner loop bounds (33 x 17 passes) and toggle-driven ramp shape, but compiles 20 bytes larger (348 vs 328); the reference computes several constants (226<<5=0x1c40, 240<<4=0xf00, 130<<5=0x1040, 144<<3=1152, 150<<1=300) via a small-immediate `movs`+`lsls` pair instead of loading them from the pool, while the candidate's equivalent sites pull from an extra literal-pool load, and the resulting pool-size difference is large enough that gcc296 places a second, mid-function literal pool (an inserted branch-and-data block right after the Func_080f0678 call) that the reference's smaller, single-pool layout does not need","re-spelling all five of those constants in the candidate as their explicit shift-of-small-immediate form (226<<5, 240<<4, 130<<5, 144<<3, 150<<1) produced byte-for-byte identical output to the flat-hex-literal version -- gcc296 constant-folds both spellings the same way before choosing pool-vs-immediate, so this is not a source-spelling difference; the compiler's choice of pool load over movs+lsls for these specific values must depend on something else (register pressure or a different value/constant living nearby) that a plain respell does not change"],"notes":["This owner shares no call targets or control-flow shape with the assigned set_actor_modes.c template; its actual shape (a fixed 33-entry table walk paired with a 17-step hardware fade ramp) was recovered directly from the retained assembly's own literal pool and loop bounds, cross-checked word-for-word against the ground-truth .s file's trailing constant list.","The residual is concentrated and mechanical (a 20-byte pool-size overshoot triggering a spurious mid-function pool split) rather than a control-flow or algorithmic gap, but the specific source change needed to make gcc296 prefer movs+lsls over a pool load for those five constants was not found within this bounded attempt. This looks like it is still findable -- worth a follow-up that varies which computed values are cached in named locals/registers near those five writes, since the pool-vs-immediate choice is evidently driven by surrounding register/constant pressure rather than the constant's own spelling.","Recovered only from retained owner assembly and the approved compiler. No GS2 evidence, external source, copied instruction bytes, fixed-register variables, inline assembly, or compiler modification was used."]},"main:080f0614":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080f0614","status":"proven-retained","owner_bytes":100,"classification":"compiler_local_materialization_mismatch","resolved_asm_classification":{"kind":"compiler_local_materialization_mismatch","retention":"keep_structured_asm","confidence":"proven"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":80,"core_identical":true,"starts":{"ja":"0x080e7614","en":"0x080f0614","de":"0x080f1c14","es":"0x080f3614","fr":"0x080f3614","it":"0x080f0614"}},"score":{"measured":"2026-08-30","candidate_bytes":100,"reference_bytes":100,"differing_halfwords":21,"wrong_instructions":22,"class":"missing-extra-code","note":"The exact-extent reconstruction retains equal branch topology. Spelling both signed group calculations as ordinary division by eight reproduces GCC 2.96's rounding sequence directly and improves the residual from 26/36 to 21 differing halfwords / 22 wrong instructions. The remaining mismatch is the reference's separately retained raw current halfword plus downstream allocation; it remains Draft C and claims zero DONE bytes."},"notes":["2026-09-01 retained-assembly proof: the ordinary-C reconstruction has the exact 100-byte owner extent, equal branch topology, exact constants and pool, and complete behavior. Cross-edition verification uniquely locates it in all six releases and proves all 80 relocation/literal-normalized core bytes identical. The residual is one local materialization choice: the ROM preserves adjacent signed and raw reads of the same current-index halfword, while GCC common-loads ordinary typed views; volatile views retain separate traffic but add sign-extension code or reverse the load order. The recorded union, aggregate, pointer, signed/raw, volatile, statement-order and division-shape probes exhaust the evidenced source dimensions. Canonical regmove, scheduling, CSE-follow, strength-reduction, expensive-optimization, force-memory/address and O3 routes remain at 100/21; scheduler2, GCSE, CSE-skip and rerun-CSE regress or change extent. Structured assembly therefore remains authoritative under compiler_local_materialization_mismatch; the semantic C remains the evidence artifact and does not claim exact C.","2026-08-31 bounded raw-carrier probe: tested two new structural models for the reference's adjacent signed and unsigned loads from 0x02004c00. First, an explicit u16 current_raw load retained for the later store alongside the s16 current used for division compiled byte-identically to the 100-byte baseline: GCC 2.96 commoned the two typed reads and still stored the signed-load carrier, leaving 21 differing halfwords / 22 wrong instructions. Second, making only the raw u16 read volatile did preserve a distinct ldrh, but scheduled it before the ldrsh, inserted an lsl/asr sign-extension pair, grew the owner to 104 bytes, and regressed to 47 differing halfwords / 54 wrong instructions. Both were reverted. Transferable negative fact: ordinary signed/unsigned alias loads at one address are commoned on this route, while volatile separation produces the wrong load order and extra sign extension; do not retry either raw-carrier axis without evidence for a different aggregate or access boundary.","2026-08-31 exact-closure verdict: the retained reference requires adjacent ldrsh and ldrh accesses to 0x02004c00, preserving the raw halfword in r4 across both signed divide-by-eight sequences and storing that raw carrier only on group change. The legitimate baseline reproduces all 100 bytes of extent and equal branch topology but GCC common-loads the signed/raw expressions, removes the ldrh, and consequently never saves r6. Distinct signed/unsigned one-field aggregate views are byte-identical to baseline. Making both views volatile grows to 108 bytes and adds two lsl/asr sign-extension pairs; declaring a volatile signed absolute cell plus a nonvolatile raw view grows to 104 bytes and orders ldrh before ldrsh. Finite shipped toggles -fno-cse-follow-jumps, -fno-gcse, -fno-expensive-optimizations, -fno-force-mem, -fno-force-addr, -fno-schedule-insns, and -fno-regmove do not improve the ordinary duplicate-load model; -fno-rerun-cse-after-loop and peephole/strength-reduction probes regress the volatile model. Exactness therefore needs authentic source evidence for an access boundary that preserves two differently typed reads in this exact order. Compiler barriers, artificial calls, and forced volatile traffic would manufacture that boundary and are rejected. Retain the DH21 ordinary-C draft.","Recovered from the retained owner, the aggregate-aware m2c seed, and the approved compiler; the unrelated template winner was discarded.","The source models the three shared EWRAM halfwords, signed round-toward-zero grouping, group-change test, resource-table lookup, and update call without generated register names.","No inline assembly, register forcing, compiler barriers, copied instruction bytes, or external decompilation source was used."]},"main:080f4028":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080f4028","status":"exact","owner_bytes":140,"score":{"measured":"2026-08-27","candidate_bytes":140,"reference_bytes":140,"differing_halfwords":14,"wrong_instructions":8,"class":"wrong","command":"cargo run --offline --quiet --release --manifest-path tools/compiler/Cargo.toml -- candidate-show games/gs1/recon/en/main/080f4028.c","note":"matched_prefix=36 of 53 instructions: the entire struct-init block, all four leading calls, and the 0x03000250 veneer transfer are byte-exact. Only the last two-call tail diverges."},"shape":{"derivation":"games/gs1/src/camera/scene/init_default_transform.c (families-index template-main-080b7f9c) supplied the leading struct-init/four-call idiom. The closing section instead matches games/gs1/src/camera/scene/configure.c's (ConfigureSceneCamera, main:080b8fd4) SceneCameraObject/Data_03001ce0 pattern field-for-field and call-for-call, differing only in literal constants -- confirmed against the target's own disassembly (games/gs1/asm/080f4028.s), not assumed from the families-index score alone. Declared void() since the owner never touches ConfigureSceneCamera's .secondary field."},"rejected_experiments":[{"experiment":"raw-hex vs shift spelling of the repeated 250<<16 immediate","result":"no change; the compiler folds by value, not text"},{"experiment":"hoisting 250<<16 into one named local reused at both call sites","result":"no change; the compiler still unifies via register allocation"},{"experiment":"two separately-declared same-value locals (state_update_0256.c's working trick)","result":"regressed to 152 bytes / matched_prefix=1"},{"experiment":"nesting the veneer call inline as Func_08005258's argument to avoid an intermediate result local","result":"no change"},{"experiment":"2026-08-27 re-derivation: traced *why* the prior four attempts all fail, rather than trying another source spelling. The candidate's r5 (the state pointer, dead after its final use as the 0x03000250 veneer's second argument, immediately before this tail) is a free callee-saved register at exactly the point the first `250 << 16` is computed, so the register allocator caches the constant there across the second veneer call and reuses it for both the second veneer call's arg0 and Func_08005258's arg0 (2 mov-only reuses, 4 bytes). The reference instead recomputes `movs r0,#250; lsls r0,r0,#16` fresh at both sites (8 bytes) -- same total byte count, different instruction shape, hence differing_halfwords without a size delta. Because GCC's CSE/value-numbering unifies same-valued constants by their folded RTL value rather than source spelling (per experiment 1) and reused-vs-duplicated locals only move where the sharing happens rather than remove it (experiments 2-3), no legitimate (non-register-forcing) source rewrite escapes this: the caching decision is downstream of r5's liveness/register-allocation profitability at this point in the function, not of how the two `250 << 16` occurrences are spelled or grouped in source. Concluded this is a genuine floor for this owner given CONTRIBUTING.md's ban on forcing register assignment/scheduling; no further permutation attempted.","result":"confirmed architectural floor; candidate left unchanged at differing_halfwords=14"}],"notes":["Recovered only from the retained owner assembly, approved local ROM, the byte-exact template/sibling sources, in-repository headers, and the approved compiler.","The reconstruction is adopted as Proven C at games/gs1/src/camera/scene/reset_defaults.c."]},"main:080f4168":{"schema_version":1,"namespace":"main","address":"0x080f4168","status":"mapped","measured":"2026-08-29","map":{"head":"0x080f4168","head_symbol":"FunctionHead_080f4168","head_file":"games/gs1/asm/080f4168.s","head_prologue":"push {r5,r6,r7,lr}; mov r7,r11; mov r6,r10; mov r5,r9; push {r5,r6,r7}; mov r7,r8; push {r7}; ldr r5,[pc,#336]; ldr r1,[pc,#336]; movs r0,#41; add sp, r5 -- frame is 768 bytes, too large for the 7-bit `sub sp,#imm` encoding, so the compiler loaded a negative literal (-768) into r5 and used `add sp, r5` instead. Full r8-r11 save.","true_epilogue":{"file":"games/gs1/asm/080f4f04.s","note":"Ends `... movs r3,#192 / lsls r3,r3,#2 / add sp, r3 / pop {r3,r5,r6,r7} / mov r8,r3 / mov r9,r5 / mov r10,r6 / mov r11,r7 / pop {r5,r6,r7} / pop {r0} / bx r0`. r3 = 192<<2 = 768, the exact positive mirror of the head's -768 frame adjustment via the same large-immediate workaround. Same four-high-register restore. This is the sole real epilogue."},"span":{"start":"0x080f4168","end_exclusive":"0x080f6000","size_bytes":7832,"derivation":"end = start of next asm file games/gs1/asm/080f6000.s, immediately following 080f4f04.s which owns the epilogue. size = 0x080f6000 - 0x080f4168 = 0x1e98 = 7832."},"member_regions_in_order":[{"addr":"0x080f4168","symbol":"FunctionHead_080f4168","file":"games/gs1/asm/080f4168.s","role":"real prologue + large-frame setup (768 bytes) + calls sub_08002f40/sub_08005340/sub_080f4100 (twice) + tail branch into continuation, literal pool in-file"},{"addr":"0x080f4318","symbol":"Region_080f4318","file":"games/gs1/asm/080f4318.s","role":"call-graph-reached prologue-less region, code+data mixed"},{"addr":"0x080f47bc","symbol":"Region_080f47bc","file":"games/gs1/asm/080f47bc.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080f4af0","symbol":"Region_080f4af0","file":"games/gs1/asm/080f4af0.s","role":"call-graph-reached prologue-less region"},{"addr":"0x080f4f04","symbol":"Region_080f4f04","file":"games/gs1/asm/080f4f04.s","role":"converging tail ending in the real, shared, single epilogue"}]},"domain_evidence":["080f4168's own header comment marks it 'FunctionHead' for a split function carrying a following '定数兼リテラルプール' (constant-and-literal pool) in the same file -- same authored classification style as the already-adopted 080be378/080d765c/080e15e8 heads.","sub_08002dd8 and sub_080cdbc0 appear repeatedly in the tail cleanup sequence of this epilogue, identical to the cleanup idiom seen in 080d765c/080ec100/080e47b8's epilogues (`bl sub_08002dd8` x2 with small constant args, then `bl sub_080cdbc0`, then frame teardown) -- strong evidence this and the other large dispatch functions in this address range share a common per-call finalizer/cleanup helper, worth checking against already-adopted owners before drafting C.","This is the second observed instance (after 080e47b8) of the compiler spilling to a >508-byte frame via a negative-literal `add sp, r5`/positive `add sp, r3` pair rather than an immediate `sub sp`/`add sp` -- both share the exact same instruction shape, suggesting both functions were compiled from unusually large local-variable-heavy source (likely deep, wide switch-driven state machines given the request's split-function context)."],"scoring_command":"out/cargo-target/release/compiler candidate-show games/gs1/recon/en/main/080f4168.c --owner 080f4168 --size 7832","notes":["Map only, per task scope -- no C source drafted, no translation-units.json or games/gs1/recon/translation-units.json edited.","Recovered only from retained assembly headers/prologue/epilogue text in the listed .s files."]},"main:080f6148":{"schema_version":1,"namespace":"main","address":"0x080f6148","status":"measured-draft","owner_bytes":160,"candidate_bytes":140,"differing_halfwords":78,"wrong_instructions":106,"classification":"palette-darken-two-ranges","family":{"id":"template-main-080aac84","template_owner":"main:080aac84","template_source":"games/gs1/src/graphics/palette/adjust_bank.c","note":"Clustered by prologue/instruction n-gram similarity only. The real owner darkens two disjoint palette ranges by a fixed -1 per channel with a floor of 0 and no ceiling clamp, and has no bl between the two loop bodies (they are duplicated inline, not called). The template's do-while-over-banks control shape, its add(arg0)/dual clamp, and its separate read/write arrays do not apply; only the general RGB555 mask-and-clamp idiom was reusable."},"notes":["Real ROM behavior: loop 1 darkens 16 halfwords at 0x05000140 (BG palette bank 10); loop 2 darkens 239 halfwords at 0x05000202 (OBJ palette, skipping entry 0). Each channel is extracted, decremented by 1, floored at 0 (no upper clamp needed since subtracting from a 5-bit value cannot exceed 31), and repacked. Confirmed no bl instruction links the two loops -- they are two independently-emitted copies of the same body, not a shared subroutine.","Attempt 1: static helper DarkenPaletteRange(pltt,count) called twice -- the compiler did NOT inline it (candidate collapsed to 32 bytes with two bl instructions), rejected: candidate=32 wrong_instructions=80.","Attempt 2 (kept as draft): two straight-line for-loops written out in the body, each using a local `s32 mask = 31;` hoisted out of the loop (mirroring the template's own hoisted-mask idiom) so mask lives in a callee-saved register across the loop, matching the reference's 3-register push (r5,r6,r7) instead of my earlier 2-register push. Result: candidate=140 reference=160 differing_halfwords=78 wrong_instructions=106. Still not exact: the real code extracts blue and green via a shared `(color<<16)>>26` / `(color<<16)>>21` double-shift (reusing one left-shifted copy of the halfword for both fields) while my candidate and the byte-exact adjust_bank.c template both instead do direct `>>10 &mask` / `>>5 &mask`. I confirmed this by compiling the literal template source against its own byte-exact owner 0x080aac84 (candidate-show on games/gs1/src/graphics/palette/adjust_bank.c against 0x080aac84 -- 0 real mismatches in that instruction region, using the direct-shift form), so the double-shift is specific to this owner's source shape, not a toolchain default.","Attempt 3: read the color through a 3x u16:5 bitfield struct (red/green/blue LSB-first) to try to trigger a genuine bitfield-extraction codegen path. This backfired -- the compiler allocated a 4-byte (word) storage unit for the bitfield struct and emitted a 32-bit `ldr` instead of the reference's `ldrh`, and moved from 2-byte to 4-byte element stride. Rejected: candidate=136 wrong_instructions=112 (worse than attempt 2).","This narrows to a genuine compiler-internals residual in the two-field shared-shift extraction, not a control-flow or type-category gap: the read width (ldrh), the loop trip counts, the two base addresses, the per-channel -1/floor-0 semantics, and the repack-and-store all already match. Only the specific instruction sequence used to pull blue/green out of the halfword differs. Likely needs a source shape that makes GCC treat blue and green as a shared 2-field extraction (e.g. a genuine >16-bit-wide bitfield container, or the field order/adjacent packing exposed differently) -- worth a targeted permuter-style search over the extraction expression rather than further manual respelling.","Adoption requires 0 differing_halfwords."]},"main:080f92fc":{"schema_version":1,"namespace":"main","address":"0x080f92fc","status":"proven-retained","classification":"compiler_local_materialization_mismatch","owner_bytes":316,"cross_edition":{"measured":"2026-08-30","object_bytes":314,"retained_span_bytes":316,"relocation_bytes":28,"literal_bytes":16,"core_bytes":270,"core_diff_bytes":{"ja":0,"en":0,"de":0,"es":0,"fr":0,"it":0},"core_identical":true},"score":{"measured":"2026-08-27","candidate_bytes":316,"reference_bytes":316,"differing_halfwords":8,"wrong_instructions":4,"class":"allocation","note":"The complete ordinary-C controller and retained owner were re-read on 2026-08-30. Candidate and reference are both 316 bytes; only four instructions in the independent entry initialization schedule differ, and the streams are identical from the timer loop onward. Swapping row/repeat initialization and moving the shared-state clear after pointer setup preserved or regressed the floor. The shipped scheduling, regmove, CSE, strength-reduction, and expensive-optimization axes likewise preserved eight differing halfwords or regressed. Retained as strong compiler-local materialization output after the six-edition 270-byte normalized core also proved identical."},"notes":["Source recovered by a prior agent in this session whose full working notes were lost to an interrupted session; only the .c file survived in its worktree.","No other Golden Sun decompilation project, symbol map, or disassembly was consulted by this commit."]},"main:080f9ef8":{"schema_version":1,"namespace":"main","address":"0x080f9ef8","status":"measured-draft","owner_bytes":68,"executable_owner_bytes":68,"candidate_bytes":68,"differing_halfwords":24,"wrong_instructions":14,"classification":"stop-music-track","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":60,"core_diff_bytes":0,"core_identical":true},"notes":["2026-09-01 signedness and condition-shape probe: spelling the active-bit test as an s8 sign test emits ldrsb/cmp/bge and preserves the 24-halfword/14-wrong residual while making branch topology worse. Folding the channel-type mask into its initializer or assignment condition likewise ties or regresses; neither removes GCC's redundant post-ands compare. The readable u8 mask test and separate s32 compound mask remain canonical, and these axes are closed.","2026-09-01 bounded flag-test probe: the exact in-repository MusicTrack_Finish witness emits ldrb/mov/tst from a genuinely multi-bit 0xc7 mask under its recorded compiler route. For this owner's one-bit 0x80 predicate, truth, equality-to-mask, and masked-ordering spellings all collapse to the same ldrb/lsrs/cmp sequence. The old-agbcc route regresses to 72 bytes, 34 differing halfwords, and 28 wrong instructions; nine shipped GCC 2.96 optimization/pass toggles are neutral at 68/24/14. The mask-spelling and compiler-route axes are therefore closed.","2026-09-01: preserving the channel type as an s32 carrier and applying the 7-bit hardware-channel mask as a compound update reproduces the reference's r0/r3 roles through the mask. This improves the exact-extent candidate from 26 differing halfwords / 18 wrong instructions to 24 / 14. The remaining post-mask compare and entry flag-test shape still prevent adoption.","2026-08-31: reconstructing the original translation-unit context exposed its local `_call_via_r3` veneer at 0x080f9ee8, rather than the global veneer bank, and re-auditing the shipped per-file ABI route showed that r4 remains callee-saved for this source. Registering both facts improves the exact-extent candidate from 31 differing halfwords / 42 wrong instructions to 26 / 18. The remaining residual is still a broad flag-test and allocation mismatch, so this remains Draft C and claims zero DONE bytes.","2026-08-31: retaining the entry `track->flags` read in a named `u8 flags` carrier improves the candidate from 72/36/50 to the exact 68-byte extent with 31 differing halfwords and 42 wrong instructions. GCC changes the flag test from `ands`/`cmp` to an equivalent bit-extract `lsrs`/`cmp`; using an `s32` carrier emits the same result. An explicit outer early return is byte-identical to the original nested conditional and was reverted. The remaining residual is still broad register allocation plus the reference's `movs #128; tst` test shape, so this is retained as a measured Draft C improvement only.","Stops every CGB channel owned by an active music track, invokes the configured oscillator-disable callback for hardware channel types, and clears both sides of the ownership link.","The six editions retain an identical 60-byte relocation-normalized executable core inside the same 68-byte owner boundary.","A fresh declared-translation-unit rebuild confirms the stored 68-byte, 24-differing-halfword, 14-wrong-instruction score. The owner remains Draft C and is not eligible for a permanent compiler classification."]},"main:080fa1ac":{"schema_version":1,"namespace":"gs1-en-main","address":"0x080fa1ac","status":"proven-retained","classification":"compiler_dead_parameter_register_reuse","owner_bytes":26,"score":{"measured":"2026-08-27","candidate_bytes":26,"reference_bytes":26,"differing_halfwords":10,"wrong_instructions":20,"class":"allocation","command":"compiler candidate-show games/gs1/recon/en/main/080fa1ac.c --owner 080fa1ac --family old-agbcc --flags -O1","note":"Re-measured 2026-08-27, unchanged from the prior baseline: structurally identical to the reference at old-agbcc -O1 (all thirteen instructions match one-for-one in mnemonic, operand shape, and branch structure); the only residual is one uniform register rotation -- the candidate's serial scratch register is r0 where the reference uses r2 (and consequently r2/r3 where the reference uses r3). Root-caused this session by invoking alchemy-gcc/dist/agbcc/old_agbcc directly on the preprocessed source with -dlgr and reading the .lreg/.greg dumps (see rejected_experiments below for the full derivation): this build's local-alloc find_free_reg does NOT honor arm.h's REG_ALLOC_ORDER {r3,r2,r1,r0,...} bias for this owner's qtys -- it hands out the first ascending free register instead (r0, else r1, else r2, ...). track (r1) is always excluded since it lives the whole function; the dead first parameter (r0) is genuinely dead by the time the flow graph reaches the scratch pseudo's block, so r0 is free and wins every time in this build, then the reload-forced load of the pre-OR flags byte takes the next free ascending register (r2). For the reference's r2/r3 pair to appear, r0 would have to still read as live at that point -- and no legitimate source construct achieves that: a probe with `asm volatile(\"\" :: \"r\"(unused))` right at entry (tested this session, not adopted -- forcing register liveness through inline asm is exactly the kind of register-assignment forcing CONTRIBUTING.md prohibits, and this was a diagnostic probe only) still let r0 free by the time the first store's scratch register is chosen, since GCC's liveness naturally recomputes the dead range after the trivial touch. Genuinely keeping r0 live (a real use, or a non-void return) requires emitting real code that breaks the verified 13-instruction match (already established by the return-value and -ffixed-r0 experiments below). This is the class-2 known-dead-end register-letter residual from this session's catalog, now with a first-principles compiler-internals confirmation rather than only cross-owner pattern-matching."},"remaining":[{"op":"register allocation","count":10,"where":"one uniform rotation: candidate r0->reference r2 for the serial scratch pseudo and r2->r3 for the loaded flags byte. r0 is never touched by the reference despite the dead first parameter."}],"rejected_experiments":[{"experiment":"canonical gcc296 route (original candidate and template-text spellings)","result":"if-converts the diamond (hoisted 12 with conditional 3 overwrite) and emits a push/pop frame; 24-32 bytes, never the reference's 13-instruction frameless diamond"},{"experiment":"template-text |= arms under old-agbcc -O2","result":"correct diamond and crossjumped or-tail but 28 bytes (extra zero materialization) and r0 scratch"},{"experiment":"non-void declaration (implicit-int style) to reserve r0","result":"no change; the dead parameter's register is still reused"},{"experiment":"returning the first parameter to keep r0 live","result":"30 bytes; generates return moves the reference does not have"},{"experiment":"-ffixed-r0 with -O1","result":"28 bytes; forces an extra parameter move"},{"experiment":"sibling counter-evidence","result":"byte-exact set_tone_type (main:080fb6ec), same dead-first-parameter signature, freely uses r0 as scratch from its first instruction -- the r2 preference here is owner-specific, not a family or flag property"},{"experiment":"2026-08-27: direct old_agbcc invocation with -dlgr (bypassing candidate-show) to read the .lreg/.greg RTL dumps for this exact source/flags","result":"confirmed the whole owner reduces to ONE local qty (the zero/compare/12-or-3 value, coalesced across all three basic blocks since the live ranges never overlap) plus ONE reload-forced register for the pre-OR flags-byte load. Reducing the source to a single statement (just the two zero-stores, no if/else) still yields r0 for the lone scratch qty -- proving the register choice has nothing to do with competing against the other local pseudos in this owner"},{"experiment":"2026-08-27: minimal-function probes to characterize find_free_reg's actual search order under old-agbcc -O1/-O2 (independent of this owner's field layout)","result":"with the dead-parameter-first, track-second signature (matches this owner), the lone scratch pseudo takes r0. With track as the SOLE parameter (arriving in r0), the lone scratch pseudo takes r1, not r3. Both results are the first ascending free register, not arm.h's REG_ALLOC_ORDER {r3,r2,r1,r0,...} -- this old_agbcc build does not honor that macro's preference order for this owner's qtys, it fills registers 0,1,2,3,... in order, skipping whichever is already alive"},{"experiment":"2026-08-27: asm volatile(\"\" :: \"r\"(unused)) at function entry, as a diagnostic probe only -- NOT adopted, this is exactly the kind of register-assignment forcing CONTRIBUTING.md prohibits, tested only to confirm the mechanism","result":"no change (still r0/r2). The empty-asm touch dies immediately at that single insn under GCC's own liveness recomputation, so it does not extend r0's live range into the block where the scratch pseudo is later born -- confirms no side-effect-free source construct can keep r0 marked live at the point that matters without adding real, match-breaking instructions"}],"notes":["Recovered only from the retained owner bytes in the approved local ROM, the adopted audio family sources and headers, and the approved compilers.","The complete C remains the semantic reconstruction; the byte-exact retained assembly is Proven ASM under compiler_dead_parameter_register_reuse."]},"main:080fa264":{"status":"proven-retained","classification":"compiler_allocation_mismatch","span_bytes":28,"score":{"measured":"2026-08-23","candidate_bytes":28,"reference_bytes":28,"wrong_instructions":4,"differing_halfwords":2,"class":"compiler-allocation-retention"},"expressed":["complete signature guard and status-bit clear"],"unexpressed":[],"verified_against_reference":["byte count 28 = 28","all control flow, loads, stores, constants, and literal placement agree"],"blocked_by":"the signature load and comparison use r1 instead of reference r3; behavior, extent, control flow, memory operations, constants, and pools are otherwise exact","rejected":["10,000-candidate classic heat-guided walk: 9,786 compiled, exact 0, every retained result tied the two-halfword baseline","approved-family sweep across routed/old-agbcc and GCC 2.96 at -O0/-O1/-O2/-O3/-Os: optimized routed builds preserve the r1 allocation; other combinations change extent or broader instruction shape; GCC 3 is unavailable in the recorded toolchain"],"retention":"keep_structured_asm"},"resource_371:020002cc":{"span_bytes":36,"status":"proven-retained","census":{"exact_normalized_twins":0,"candidates_with_at_most_8_core_byte_differences":0,"candidates_with_at_most_64_core_byte_differences":4,"candidate_bytes":204,"nearest_exact_c_owner":"resource_3c9:02000400","nearest_core_bytes":28,"nearest_core_diff_bytes":23},"score":{"candidate_bytes":36,"reference_bytes":36,"wrong_instructions":4,"differing_halfwords":2,"class":"allocation"},"cross_edition":{"core_bytes":28,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x020002cc","en":"0x020002cc","de":"0x020002cc","es":"0x020002cc","fr":"0x020002cc","it":"0x020002cc"}},"search":{"safe_candidates":20000,"compile_failures":0,"exact":false,"best_differing_halfwords":2},"expressed":["read the shared map-animation frame","copy it into the sprite's map object","clear the object's animation state","return success"],"blocked_by":"two allocation-only halfwords: approved GCC reloads the shared-data pointer into r3 where the reference selects r2","retention":{"kind":"compiler_allocation_module","start":"0x020002cc","end":"0x020002f0","done_bytes":34},"notes":["The nominal exact-C twin is not a semantic twin: 23 of 28 normalized core bytes differ, so its source shape was rejected rather than copied blindly.","The independently reconstructed ordinary C has exact extent and zero normalized structural rows, but the capped exact search found no emitting source.","The owner satisfies the existing narrow compiler-allocation precedent: exact extent, semantic completeness, zero normalized structural rows, equivalent low-register allocation only, a bounded unchanged exact search, and an all-six identical core.","Coverage promotes 34 previously ordinary-assembly bytes; the owner's two-byte alignment was already retained by the executable inventory, so the 36-byte retained span produces a net DONE delta of 34 bytes.","Retained assembly remains authoritative; the canonical registry supplies its human name, and no exact-C bytes are claimed.","Re-verified 2026-08-26: five additional respellings of the pointer-arithmetic statement (inlined dereference without a named pointer variable; reordered local declarations before/after the object load; dropped the volatile qualifier on the u16 pointer; hoisted the extern global into its own u8 * local before adding the offset; commuted the addition to 282 + Data_03001e70) were compiled and scored. None reached differing_halfwords=0: the two candidates matching the current source's statement order reproduce the same locked 2-halfword r2/r3 allocation residual, and every candidate that moved the sprite->object load earlier degraded to 9 differing halfwords by exposing a third live value. This confirms the residual is a genuine allocation lock rather than an unexplored spelling."]},"resource_371:02001064":{"span_bytes":1270,"score":{"measured":"2026-08-23","candidate_bytes":1120,"reference_bytes":1270,"wrong_instructions":265,"differing_halfwords":612,"class":"generated-call-script-retention"},"shape":{"calls":115,"loops":1,"memory_operations":2,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 115 calls and their argument values, 1 loops, and 2 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_371:020028e8":{"span_bytes":972,"score":{"measured":"2026-08-31","candidate_bytes":608,"reference_bytes":972,"wrong_instructions":255,"differing_halfwords":472,"class":"structured-scene-retention"},"shape":{"calls":90,"loops":0,"memory_operations":46},"verified_against_reference":["complete callable owner at 0x020028e8, including its interworking return and literal tail","all 90 decoded calls, 0 loop(s), and 46 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_371:020034a0":{"schema_version":1,"namespace":"resource_371","address":"0x020034a0","status":"measured-draft","owner_bytes":220,"executable_owner_bytes":172,"candidate_bytes":212,"differing_halfwords":85,"wrong_instructions":62,"classification":"spawn-randomized-follower-effect","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":172,"core_diff_bytes":0,"core_identical":true,"starts":{"ja":"0x020034a0","en":"0x020034a0","de":"0x020034a0","es":"0x02003498","fr":"0x02003498","it":"0x02003498"}},"notes":["Complete input-gated effect spawner: clones actor slot 8 position into a kind-222 effect with fixed coordinate offsets, randomized lateral displacement, inherited presentation flags and variant, then installs presentation, mode and callback.","Explicit --span analysis proves the 172-byte relocation-normalized executable core identical across all six editions; the audited 220-byte owner includes its reached pools.","Correct import prototypes, distinct source/effect layouts and width-accurate random carriers improve the generated 104-byte/110-halfword/84-wrong draft to a complete 212-byte/85-halfword/62-wrong candidate.","Declaration order, signed and unsigned carrier widths, explicit truncation stages, expression grouping, direct field and typed layout variants were bounded. The remaining residual spans long-lived r6/r7 allocation, integer-truncation scheduling and flag merge order, so it is neither exact nor a narrow permanent compiler residual and claims zero DONE bytes."]},"resource_373:02000f5c":{"span_bytes":744,"score":{"measured":"2026-08-31","candidate_bytes":576,"reference_bytes":744,"wrong_instructions":166,"differing_halfwords":355,"class":"structured-scene-retention"},"shape":{"calls":60,"loops":2,"memory_operations":23},"verified_against_reference":["complete retained body from 0x02000f5c through the next production owner boundary","all 60 decoded calls, 2 loop(s), and 23 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_373:020012ba":{"span_bytes":410,"score":{"measured":"2026-08-31","candidate_bytes":384,"reference_bytes":410,"wrong_instructions":110,"differing_halfwords":196,"class":"structured-scene-retention"},"shape":{"calls":37,"loops":0,"memory_operations":5},"verified_against_reference":["complete audited production span","all 37 decoded calls, 0 loop(s), and 5 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_373:020015dc":{"span_bytes":5240,"score":{"measured":"2026-08-30","candidate_bytes":5116,"reference_bytes":5240,"wrong_instructions":658,"differing_halfwords":2475,"class":"generated-call-script-retention"},"shape":{"calls":496,"loops":3,"memory_operations":53,"reference_high_register_moves":8},"verified_against_reference":["the complete owner boundary is 0x020015dc through 0x02002a54, including its compiler-generated literal pools","the reconstruction accounts for all 496 calls in exact machine order and restores both actor-motion loops, the five-step position loop, all three conditional workspace-counter updates, actor flags and fields, global state writes, and the saved scene byte restored at exit","default GCC 2.96 emits 5116 bytes; -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps emit 6316, 5164, 5116, 5116, 5112, and 5116 bytes respectively, with zero exact emissions","the remaining compiler residual is distributed register allocation, immediate construction, scheduling, and literal-pool placement across a 496-call generated scene script rather than an unrepresented source operation"],"retention":"keep_structured_asm","note":"Retain the byte-exact structured assembly while keeping the complete ordinary-C scene script as the semantic reconstruction and future compiler-search oracle."},"resource_374:02000750":{"span_bytes":396,"score":{"measured":"2026-08-31","candidate_bytes":328,"reference_bytes":396,"wrong_instructions":70,"differing_halfwords":197,"class":"structured-scene-retention"},"shape":{"calls":33,"loops":0,"memory_operations":0},"verified_against_reference":["complete audited production span","all 33 decoded calls, 0 loop(s), and 0 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_374:02000b8c":{"span_bytes":1230,"score":{"measured":"2026-08-23","candidate_bytes":1100,"reference_bytes":1230,"wrong_instructions":226,"differing_halfwords":587,"class":"generated-call-script-retention"},"shape":{"calls":113,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 113 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_374:020017c8":{"span_bytes":2816,"score":{"measured":"2026-08-30","candidate_bytes":2836,"reference_bytes":2816,"wrong_instructions":168,"differing_halfwords":1208,"class":"generated-call-script-retention"},"shape":{"calls":293,"loops":0,"memory_operations":13},"verified_against_reference":["complete deterministic reconstruction accounts for all 293 calls, their arguments, the returned-object field forwarding, and all 13 explicit memory operations","aligned reference comparison restored six zero-valued second arguments, actor fields at offsets 8 and 16, and final scene-state words at workspace offsets 448 and 456","approved GCC allocation and literal scheduling changes the owner extent and instruction order; no forced-register or scheduling construct is used"],"retention":"keep_structured_asm","note":"A generated field-scene call script retained as structured assembly because approved GCC cannot preserve its repeated immediate and call-argument schedule."},"resource_377:02000578":{"span_bytes":1172,"score":{"measured":"2026-08-30","candidate_bytes":1176,"reference_bytes":1172,"wrong_instructions":242,"differing_halfwords":551,"class":"generated-call-script-retention"},"shape":{"calls":111,"loops":0,"memory_operations":31},"verified_against_reference":["candidate and ROM contain the same 111 calls in machine order with every decoded argument represented","direct assembly audit restored four motion coordinates, three scene-object fields, two workspace-state pairs, an event flag, conditional event-counter increment, and terminal workspace reset","candidate is four bytes longer after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_377:02000a0c":{"span_bytes":1064,"score":{"measured":"2026-08-30","candidate_bytes":1104,"reference_bytes":1064,"wrong_instructions":234,"differing_halfwords":538,"class":"generated-call-script-retention"},"shape":{"calls":86,"loops":2,"memory_operations":20},"verified_against_reference":["candidate and ROM contain the same 86 calls in machine order with every decoded argument represented","direct assembly audit restored actor flags, two palette halfwords, four-step and sixteen-step display-register ramps, event flag, and both workspace-state pairs","candidate is 40 bytes longer after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_377:020013e2":{"span_bytes":354,"score":{"measured":"2026-08-31","candidate_bytes":278,"reference_bytes":354,"wrong_instructions":126,"differing_halfwords":175,"class":"structured-scene-retention"},"shape":{"calls":29,"loops":0,"memory_operations":9},"verified_against_reference":["complete audited production span","all 29 decoded calls, 0 loop(s), and 9 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_378:0200088c":{"span_bytes":4080,"score":{"measured":"2026-08-31","candidate_bytes":3964,"reference_bytes":4080,"wrong_instructions":1268,"differing_halfwords":2007,"class":"generated-call-script-retention"},"shape":{"calls":489,"loops":0,"state_branches":3,"inline_literal_pools":3},"verified_against_reference":["the complete owner and its three branch-skipped inline pools are bounded from 0x0200088c through the trailing pool before 0x0200187c","all 489 resolver-confirmed calls are represented in machine order; the apparent call at 0x020017ca is correctly treated as an intra-owner branch target","all three scene-state branch arms and the workspace request, setup, and skip-beat effects are represented","the remaining score delta is approved-compiler call argument materialization, carrier allocation, scheduling, and literal-pool placement after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_37a:02001510":{"span_bytes":1352,"score":{"measured":"2026-08-31","candidate_bytes":1188,"reference_bytes":1352,"wrong_instructions":285,"differing_halfwords":656,"class":"structured-scene-retention"},"shape":{"calls":137,"loops":10,"memory_operations":0},"verified_against_reference":["complete retained body from 0x02001510 through the next production owner boundary","all 137 decoded calls, 10 loop(s), and 0 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"compiler_impossibility":{"kind":"intra_function_call_module","reference_evidence":"Six direct bl sites at 0x02001642, 0x0200166a, 0x0200167c, 0x02001692, 0x020016a4 and 0x020016ba target intra-owner blocks 0x0200187c, 0x020018a4, 0x020019de, 0x020018cc, 0x02001a06 and 0x020018f4 that are also reached by ordinary fallthrough with live owner state; see games/gs1/assets/code/resource_37a_overlay.s:1853-1901 and :2083-2243.","compiler_evidence":"The approved GCC 2.96 Thumb direct-call patterns in alchemy-gcc/agscc/gcc/config/arm/arm.md:5992-6034 accept SYMBOL_REF operands, not intra-function LABEL_REF blocks, and the backend has no outlining pass.","verdict":"Ordinary C cannot make the same live statement sequences both fallthrough code and callable local subroutines; retained assembly is required for the byte-exact 1352-byte module."},"retention":"keep_structured_asm"},"resource_37b:02000554":{"span_bytes":1218,"score":{"measured":"2026-08-23","candidate_bytes":1012,"reference_bytes":1218,"wrong_instructions":212,"differing_halfwords":575,"class":"generated-call-script-retention"},"shape":{"calls":123,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 123 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_37b:0200101a":{"span_bytes":1370,"score":{"measured":"2026-08-31","candidate_bytes":1184,"reference_bytes":1370,"wrong_instructions":496,"differing_halfwords":673,"class":"structured-scene-retention"},"shape":{"calls":89,"loops":3,"memory_operations":5},"verified_against_reference":["complete retained body from 0x0200101a through the next production owner boundary","all 89 decoded calls, 3 loop(s), and 5 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_37f:02000f6c":{"span_bytes":1126,"score":{"measured":"2026-08-23","candidate_bytes":1006,"reference_bytes":1126,"wrong_instructions":196,"differing_halfwords":533,"class":"generated-call-script-retention"},"shape":{"calls":117,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 117 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_37f:02001604":{"span_bytes":1154,"score":{"measured":"2026-08-23","candidate_bytes":1008,"reference_bytes":1154,"wrong_instructions":205,"differing_halfwords":559,"class":"generated-call-script-retention"},"shape":{"calls":82,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 82 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_380:020027f8":{"span_bytes":5932,"score":{"measured":"2026-08-30","candidate_bytes":5900,"reference_bytes":5932,"wrong_instructions":745,"differing_halfwords":2775,"class":"generated-call-script-retention"},"shape":{"calls":556,"loops":5,"memory_operations":71,"reference_high_register_moves":8},"verified_against_reference":["the complete owner boundary is 0x020027f8 through 0x02003f24, including its compiler-generated literal pools","the reconstruction accounts for all 556 calls in exact machine order and restores all four fixed-point animation loops, the runtime polling loop, three conditional counter updates, returned-object field forwarding, scene-object fields, flags, and global state writes","default GCC 2.96 emits 5900 bytes; -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps emit 7804, 5928, 5900, 5900, 5912, and 5900 bytes respectively, with zero exact emissions","the remaining compiler residual is distributed register allocation, immediate construction, scheduling, and literal-pool placement across a 556-call generated scene script rather than an unrepresented source operation"],"retention":"keep_structured_asm","note":"Retain the byte-exact structured assembly while keeping the complete ordinary-C scene script as the semantic reconstruction and future compiler-search oracle."},"resource_380:02004260":{"span_bytes":200,"score":{"measured":"2026-08-31","candidate_bytes":130,"reference_bytes":200,"wrong_instructions":71,"differing_halfwords":98,"class":"structured-scene-retention"},"shape":{"calls":14,"loops":0,"memory_operations":10},"verified_against_reference":["complete audited executable span","all 14 decoded calls, 0 loop(s), and 10 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_381:02001798":{"span_bytes":922,"score":{"measured":"2026-08-23","candidate_bytes":856,"reference_bytes":922,"wrong_instructions":174,"differing_halfwords":438,"class":"generated-call-script-retention"},"shape":{"calls":92,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 92 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_383:02001348":{"span_bytes":1608,"score":{"measured":"2026-08-30","candidate_bytes":1592,"reference_bytes":1608,"wrong_instructions":203,"differing_halfwords":746,"class":"generated-call-script-retention"},"shape":{"calls":169,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["the complete owner boundary is 0x02001348 through 0x02001990, including its compiler-generated literal pools","the reconstruction accounts for all 169 calls and arguments in exact machine order; the reference contains no branches, loops, or memory state","default GCC 2.96 emits 1592 bytes; -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps emit 1724, 1592, 1592, 1592, 1592, and 1592 bytes respectively, with zero exact emissions"],"retention":"keep_structured_asm","note":"Retain the byte-exact structured assembly while keeping the complete ordinary-C scene script as its semantic reconstruction."},"resource_383:020019a2":{"span_bytes":1218,"score":{"measured":"2026-08-31","candidate_bytes":1128,"reference_bytes":1218,"wrong_instructions":435,"differing_halfwords":583,"class":"structured-scene-retention"},"shape":{"calls":109,"loops":0,"memory_operations":4},"verified_against_reference":["complete retained body from 0x020019a2 through the next production owner boundary","all 109 decoded calls, 0 loop(s), and 4 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_38f:020008ec":{"span_bytes":7356,"score":{"measured":"2026-08-17","candidate_bytes":6440,"reference_bytes":7356,"wrong_instructions":923,"differing_halfwords":3490,"class":"wrong"},"shape":{"calls":731,"loops":2,"memory_ops":153},"expressed":["drafted by `overlay reconstruct`: calls, arguments, two loops, 52 memory operations"],"unexpressed":[{"op":"memory","count":101,"where":"not yet modelled by the drafter"},{"op":"control flow","count":null,"where":"the drafter writes no `if`"}],"verified_against_reference":[],"blocked_by":"not blocked -- first draft, never worked by hand","rejected":[],"note":"The most memory-dense of the three large owners measured, at 5.1% of instructions."},"resource_392:02000b8c":{"schema_version":1,"namespace":"resource_392","address":"0x02000b8c","status":"measured-draft","owner_bytes":32,"candidate_bytes":36,"differing_halfwords":18,"wrong_instructions":14,"classification":"dma3-single-transfer-descriptor-writer","notes":["Complete leaf owner: loads the shared buffer pointer Data_03001ed0, then writes one 12-byte DMA3 descriptor (source, destination, control) to 0x040000d4 and returns. No calls, branches, or loops.","The reference emits the descriptor with a single `stmia r3!, {r0, r1, r2}` (registers built directly, no stack) followed by a dead `subs r3, #12`. Every ordinary-C spelling of the same three field writes -- direct field assignment through a volatile struct macro, the identical assignment through a non-volatile struct macro, and the historically adopted raw `u32 *p; p[0..2] = ...` form -- compiles under the approved GCC 2.96 route to three separate `str` instructions instead, never the multi-register transfer. The tool's own scorer classifies every one of these candidates `unemittable`.","This is the same DMA3-descriptor-via-struct-macro idiom already established unemittable in this overlay at resource_392:02000bcc (see resource_392_c_02000bcc.json) and recorded across the wider thumb_multi_register_module family in games/gs1/semantic/overlay-assembly.json (not yet including this address's own span). No new compiler evidence needed to be produced; this owner reconfirms the existing conclusion for a smaller, single-transfer case.","games/gs1/semantic/regions.json records this exact 32-byte span as `parked by overlay park`: an earlier adopted C candidate (raw u32 pointer-array form, recovered from git history at assets/code/resource_392_c_02000b8c.c, commit d5e9214a5) stopped reproducing the span after an infrastructure change ('the pret routing cut') and was reverted to assembly. Re-scored against the current toolchain, that historical form is also non-exact (36/32 bytes, 18 differing halfwords, 16 wrong instructions) -- one instruction worse than the struct-macro candidate kept here -- so it was not simply an outdated but otherwise-valid answer; the compiler-shape wall is confirmed independently of that history.","Sibling comparison: resource_393:02000d5c, resource_394:02000f34, and resource_395:02001838 disassemble to the byte-identical 32-byte template (only the per-resource EWRAM destination pool word differs: 0x020090b0/0x020090e0/0x020092d0/0x02009de0), confirming the hinted family for those three. resource_396:02001224 does NOT share the template: it is 20 bytes of code plus a 3-word pool (still 32 bytes total) with a different field order (a fixed 0x05000000 source constant assigned first, the shared-buffer value assigned to the destination field, and a different control word 0x84000070 instead of 0x840000e0). That transfer was not forced onto this owner.","This candidate claims zero DONE bytes."],"rejected_experiments":[{"experiment":"direct DMA3.source/.destination/.control field assignment through a volatile struct DmaTransfer macro (kept as the final candidate)","result":"36/32 bytes, 18 differing halfwords, 14 wrong instructions, class=unemittable: three separate `str` instead of the reference's single `stmia` + dead `subs r3,#12`"},{"experiment":"same three field assignments through a non-volatile struct DmaTransfer macro","result":"byte-identical output to the volatile form; volatile does not change the codegen here"},{"experiment":"local `struct DmaTransfer t; t.source=...; t.destination=...; t.control=...; DMA3 = t;` (whole-struct assignment from a named local)","result":"44/32 bytes, 22 differing halfwords, 20 wrong instructions: GCC 2.96 builds the local on the stack (`sub sp,#12`) and copies via `ldmia`+`stmia`, worse than direct field assignment and still not the reference's register-only shape"},{"experiment":"static helper `struct DmaTransfer MakeDmaTransfer(src,dst,ctrl)` returning by value, called as `DMA3 = MakeDmaTransfer(...)`","result":"52/32 bytes, 26 differing halfwords, 23 wrong instructions: the approved compiler does not inline the call at this owner's size/route; the 12-byte struct return uses a real `bl` plus a hidden-pointer/stack return, not registers"},{"experiment":"compound-literal struct init: `DMA3 = (struct DmaTransfer){src, dst, ctrl};`","result":"rejected before scoring: emits a call to `memcpy`, an unsupported external symbol for this overlay route"},{"experiment":"historical raw-pointer form recovered from git history (assets/code/resource_392_c_02000b8c.c @ d5e9214a5): `u32 *data=&Data_03001ed0; u32 *p=(u32*)0x040000d4; u32 b=*data,src=...,c=...; p[0]=b; p[1]=src; p[2]=c;`","result":"36/32 bytes, 18 differing halfwords, 16 wrong instructions, class=unemittable: also three separate `str`, and two more wrong instructions than the struct-macro candidate because of register-role reshuffling from the extra locals"}]},"resource_392:02000bcc":{"span_bytes":64,"status":"measured-draft","family":{"replicated_en_bytes":256,"members":["resource_392:02000bcc","resource_393:02000d9c","resource_394:02000f74","resource_395:02001878"],"cross_resource_core_identical":true,"six_edition_core_bytes":44,"six_edition_core_identical":true},"score":{"candidate_bytes":64,"reference_bytes":64,"wrong_instructions":32,"differing_halfwords":16,"class":"unemittable"},"expressed":["load the shared battle-effect palette buffer","transfer its first palette block to 0x05000000","transfer its second palette block from offset 0x1c0 to 0x05000200","publish both transfers through DMA3 and finalize the palette update"],"blocked_by":"the reference uses two stmia transfers; approved GCC 2.96 emits six scalar stores for the same ordinary-C assignments","evidence":["relocation and reached-literal masking finds four byte-identical 64-byte English owners in resources 392 through 395","the complete canonical draft has exact owner extent","the family is already independently retained in semantic/overlay-assembly.json as thumb_multi_register_module because the approved compiler cannot emit the reference transfers","the explicit decoded-ROM cross-edition path proves every member's 44-byte relocation/literal-masked core identical in all six editions; no source mapping or additional exact-byte coverage is claimed"]},"resource_399:02000384":{"span_bytes":396,"score":{"measured":"2026-08-31","candidate_bytes":396,"reference_bytes":396,"wrong_instructions":45,"differing_halfwords":144,"class":"structured-scene-retention"},"shape":{"calls":41,"loops":0,"memory_operations":3},"verified_against_reference":["complete audited production span","all 41 decoded calls, 0 loop(s), and 3 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_399:02000f84":{"span_bytes":1480,"score":{"measured":"2026-08-23","candidate_bytes":1376,"reference_bytes":1480,"wrong_instructions":257,"differing_halfwords":688,"class":"generated-call-script-retention"},"shape":{"calls":142,"loops":2,"memory_operations":16,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 142 calls and their argument values, 2 loops, and 16 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39b:02001730":{"span_bytes":572,"score":{"measured":"2026-08-30","candidate_bytes":572,"reference_bytes":572,"wrong_instructions":62,"differing_halfwords":194,"class":"generated-call-script-retention"},"shape":{"calls":53,"loops":1,"memory_operations":14},"verified_against_reference":["all 53 resolver-confirmed calls and their arguments are represented in ROM order across the complete callable owner","the bounded two-pass actor exchange and all fourteen decoded actor/effect memory operations are represented in ordinary C","the owner includes its sole interworking return and eight-word trailing pool before the next prologue at 0x0200196c","the candidate reproduces the complete 572-byte extent; remaining instruction differences are approved GCC carrier allocation and scheduling"],"retention":"keep_structured_asm"},"resource_39c:02001db4":{"span_bytes":636,"score":{"measured":"2026-08-31","candidate_bytes":108,"reference_bytes":636,"wrong_instructions":254,"differing_halfwords":316,"class":"structured-scene-retention"},"shape":{"calls":23,"loops":2,"memory_operations":0},"verified_against_reference":["complete retained body from 0x02001db4 through the next production owner boundary","all 23 decoded calls, 2 loop(s), and 0 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_39c:02004a08":{"span_bytes":608,"score":{"measured":"2026-08-30","candidate_bytes":608,"reference_bytes":608,"wrong_instructions":36,"differing_halfwords":273,"class":"generated-call-script-retention"},"shape":{"calls":66,"loops":1,"memory_operations":3},"verified_against_reference":["all 66 calls and their arguments are represented in ROM order across the complete callable owner","direct retained-assembly audit restores the signed actor-8 coordinate gate, both nested dialogue conditions, the repeated dialogue phase, and the signed actor-3 coordinate handoff","the generated draft's 64 calls from following owners were removed; this owner ends at the independently inventoried prologue at 0x02004c68","the candidate reproduces the full 608-byte extent; remaining instruction differences are approved-compiler carrier allocation, literal reuse, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_39d:02000b24":{"span_bytes":4044,"score":{"measured":"2026-08-31","candidate_bytes":4016,"reference_bytes":4044,"wrong_instructions":1203,"differing_halfwords":1954,"class":"structured-scene-retention"},"shape":{"calls":409,"scene":58,"loops":0},"verified_against_reference":["the complete scene-58 owner is bounded from 0x02000b24 through its interworking unwind and literal tail before 0x02001af0","all 409 bounded calls, conditionals, record-field writes, workspace updates, and pool constants are represented","the remaining extent delta is approved-compiler argument materialization, scheduling, and literal placement after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_39d:02000ddc":{"span_bytes":1034,"score":{"measured":"2026-08-23","candidate_bytes":990,"reference_bytes":1034,"wrong_instructions":164,"differing_halfwords":492,"class":"generated-call-script-retention"},"shape":{"calls":104,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 104 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39d:020011e8":{"span_bytes":1054,"score":{"measured":"2026-08-23","candidate_bytes":986,"reference_bytes":1054,"wrong_instructions":133,"differing_halfwords":493,"class":"generated-call-script-retention"},"shape":{"calls":115,"loops":0,"memory_operations":4,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 115 calls and their argument values, 0 loops, and 4 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39d:02001608":{"span_bytes":1234,"score":{"measured":"2026-08-23","candidate_bytes":1176,"reference_bytes":1234,"wrong_instructions":172,"differing_halfwords":586,"class":"generated-call-script-retention"},"shape":{"calls":120,"loops":0,"memory_operations":17,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 120 calls and their argument values, 0 loops, and 17 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39d:02001adc":{"span_bytes":3046,"score":{"measured":"2026-08-23","candidate_bytes":2878,"reference_bytes":3046,"wrong_instructions":348,"differing_halfwords":1436,"class":"generated-call-script-retention"},"shape":{"calls":319,"loops":0,"memory_operations":6,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 319 calls and their argument values, 0 loops, and 6 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39d:02001af0":{"span_bytes":4844,"score":{"measured":"2026-08-31","candidate_bytes":4852,"reference_bytes":4844,"wrong_instructions":1488,"differing_halfwords":2377,"class":"structured-scene-retention"},"shape":{"calls":500,"scene":59,"loops":0},"verified_against_reference":["the complete scene-59 owner is bounded from 0x02001af0 through its interworking unwind and trailing pool before 0x02002ddc","all 500 bounded calls, branch-selected paths, record-field updates, workspace counters, and pool constants are represented","the remaining eight-byte surplus is approved-compiler argument materialization, scheduling, and literal placement after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_39d:020026c4":{"span_bytes":914,"score":{"measured":"2026-08-23","candidate_bytes":790,"reference_bytes":914,"wrong_instructions":97,"differing_halfwords":437,"class":"generated-call-script-retention"},"shape":{"calls":91,"loops":0,"memory_operations":2,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 91 calls and their argument values, 0 loops, and 2 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39e:0200064c":{"span_bytes":1090,"score":{"measured":"2026-08-23","candidate_bytes":1000,"reference_bytes":1090,"wrong_instructions":153,"differing_halfwords":491,"class":"generated-call-script-retention"},"shape":{"calls":125,"loops":0,"memory_operations":4,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 125 calls and their argument values, 0 loops, and 4 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_39e:02000e94":{"span_bytes":1100,"score":{"measured":"2026-08-31","candidate_bytes":872,"reference_bytes":1100,"wrong_instructions":285,"differing_halfwords":540,"class":"structured-scene-retention"},"shape":{"calls":85,"loops":1,"memory_operations":31},"verified_against_reference":["complete retained body from 0x02000e94 through the next production owner boundary","all 85 decoded calls, 1 loop(s), and 31 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"compiler_impossibility":{"kind":"intra_function_call_module","reference_evidence":"Direct bl sites at 0x02000f02, 0x02000f1a, 0x02000f3c and 0x02000f58 target intra-owner blocks 0x02001040, 0x02001058, 0x0200107a and 0x02001096 that are also reached by ordinary fallthrough with live owner state; see games/gs1/assets/code/resource_39e_overlay.s:2289-2330 and :2434-2470.","compiler_evidence":"The approved GCC 2.96 Thumb direct-call patterns in alchemy-gcc/agscc/gcc/config/arm/arm.md:5992-6034 accept SYMBOL_REF operands, not intra-function LABEL_REF blocks, and the backend has no outlining pass.","verdict":"Ordinary C cannot make the same live statement sequences both fallthrough code and callable local subroutines; retained assembly is required for the byte-exact 1100-byte module."},"retention":"keep_structured_asm"},"resource_39f:02002500":{"span_bytes":942,"score":{"measured":"2026-08-23","candidate_bytes":776,"reference_bytes":942,"wrong_instructions":211,"differing_halfwords":456,"class":"generated-call-script-retention"},"shape":{"calls":84,"loops":0,"memory_operations":8,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 84 calls and their argument values, 0 loops, and 8 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3a0:02000324":{"schema_version":1,"namespace":"resource_3a0","address":"0x02000324","status":"proven-retained","owner_bytes":52,"candidate_bytes":52,"differing_halfwords":3,"wrong_instructions":6,"classification":"select-actor-twenty-presentation-bit","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":40,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"safe_candidates":20000,"safe_compile_failures":0,"classic_candidates":10000,"classic_compile_failures":158,"best_differing_halfwords":3,"exact":false},"notes":["Complete actor-20 presentation-bit selector: scene phase chooses the actor resolver, then bit 1 is set or cleared through a shared store.","The readable candidate has exact extent and zero normalized structural rows. Its three-halfword residual is confined to equivalent r2/r3 result allocation in the two flag-update branches, resynchronizing at the unconditional branch and again at the epilogue.","Explicit --span analysis proves the 40-byte relocation-normalized core identical across all six editions.","A 20,000-candidate safe heat walk and 10,000-candidate classic heat walk plus the approved compiler-pass matrix found no exact emission; classic source shaping improved the readable baseline from five to three differing halfwords.","The owner satisfies the narrow compiler-allocation precedent: complete semantics, exact extent, no normalized structural difference, equivalent low-register allocation only, full bounded search, immediate resynchronization, and an all-six identical core."]},"resource_3a0:02000408":{"schema_version":1,"namespace":"resource_3a0","address":"0x02000408","status":"measured-draft","owner_bytes":248,"executable_owner_bytes":220,"candidate_bytes":248,"differing_halfwords":54,"wrong_instructions":82,"classification":"select-facing-by-distance","resolved_asm_classification":{"kind":"compiler_output","retention":"c_candidate","confidence":"likely"},"cross_edition":{"editions":["ja","en","de","es","fr","it"],"relocation_normalized_core_bytes":220,"core_diff_bytes":0,"core_identical":true},"bounded_search":{"generated_candidates":10000,"compile_failures":176,"best_differing_halfwords":54,"exact":false},"notes":["Complete actor tracking-mode selector: handles the existing tracking state, compares actor/target distance, derives a facing sector from their coordinate delta, accepts the current or either adjacent sector, and updates tracking state and mode through the appropriate presentation calls.","The unusual reached word 0xfa7ef001 is intentional owner data used in the third sector adjustment; it happens to decode as a Thumb BL pair but is loaded as a value by this owner.","Correct veneer identities, typed actor offsets, all result arms and the reached adjustment word produce an exact-extent 248-byte candidate. Explicit --span analysis proves the 220-byte relocation-normalized executable core identical at 0x02000408 in all six editions.","A capped 10,000-candidate heat-guided classic search found no byte-score improvement. The remaining 54 differing halfwords and 82 wrong instructions include a long-lived actor/force r5-r6 inversion and reordered sector arithmetic, so the residual is broad and claims zero DONE bytes.","If this owner is later adopted, its public source must use a human actor-facing/distance gameplay path rather than the resource identifier; this address-qualified path is reconstruction evidence only."]},"resource_3a0:02000f30":{"span_bytes":304,"score":{"measured":"2026-08-30","candidate_bytes":316,"reference_bytes":304,"wrong_instructions":30,"differing_halfwords":94,"class":"generated-call-script-retention"},"shape":{"calls":21,"loops":0,"memory_operations":4},"verified_against_reference":["all 21 calls and arguments remain in ROM order","three linked object spawns, the actor-19 presentation write, and guarded story-state increment are explicit","the return, alignment, and eight-word pool through 0x0200105f are included","direct assembly audit found no unexpressed operation; residual is GCC carrier allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3a4:02001838":{"span_bytes":1208,"score":{"measured":"2026-08-30","candidate_bytes":1176,"reference_bytes":1208,"wrong_instructions":256,"differing_halfwords":581,"class":"generated-call-script-retention"},"shape":{"calls":107,"loops":0,"memory_operations":25},"verified_against_reference":["all 107 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly audit restored three object-state halfwords, literal-backed phase arguments, the terminal actor lookup, coordinate forwarding, and closing presentation arguments","the reference has a 32-byte larger compiler layout after all decoded effects are represented; approved GCC allocation and literal scheduling does not emit it exactly"],"retention":"keep_structured_asm"},"resource_3a4:02001d14":{"span_bytes":754,"score":{"measured":"2026-08-30","candidate_bytes":748,"reference_bytes":754,"wrong_instructions":144,"differing_halfwords":364,"class":"generated-call-script-retention"},"shape":{"calls":68,"loops":1,"branches":2,"memory_operations":21},"verified_against_reference":["all 68 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly audit restored repeated object-state fields, presentation bytes, three literal-backed transforms, bounded completion polling, terminal actor lookup, and coordinate forwarding","candidate and reference differ by six bytes after complete decoded control flow and effects are represented; approved GCC allocation and literal scheduling does not emit it exactly"],"retention":"keep_structured_asm"},"resource_3a5:020004e4":{"span_bytes":912,"score":{"measured":"2026-08-30","candidate_bytes":896,"reference_bytes":912,"wrong_instructions":144,"differing_halfwords":451,"class":"generated-actor-layout-retention"},"shape":{"calls":46,"loops":1,"branches":4,"memory_operations":1},"verified_against_reference":["complete function reconstruction accounts for the three mutually exclusive scene-state layouts, all 46 calls, the shared eight-actor initialization loop, and the state-gated terminal transition","direct assembly audit restored the 89/90/91 dispatch, state 92 terminal guard, setup literal, and loop actor index flattened or omitted by the mechanical draft","candidate is sixteen bytes shorter after complete decoded control flow and arguments are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3a5:0200088c":{"span_bytes":910,"score":{"measured":"2026-08-30","candidate_bytes":912,"reference_bytes":910,"wrong_instructions":171,"differing_halfwords":420,"class":"generated-actor-layout-retention"},"shape":{"calls":49,"loops":1,"branches":5,"memory_operations":1},"verified_against_reference":["complete function reconstruction accounts for the three mutually exclusive scene-state layouts, all calls, the conditional layout helper, shared eight-actor initialization loop, and state-gated terminal transition","direct assembly audit restored the 89/90/91 dispatch, state 92 terminal guard, setup and predicate literals, branch-one terminal actor, and loop actor index flattened or omitted by the mechanical draft","candidate is two bytes longer after complete decoded control flow and arguments are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3a6:020010de":{"span_bytes":666,"score":{"measured":"2026-08-31","candidate_bytes":492,"reference_bytes":666,"wrong_instructions":258,"differing_halfwords":321,"class":"structured-scene-retention"},"shape":{"calls":54,"loops":0,"memory_operations":16},"verified_against_reference":["complete retained body from 0x020010de through the next production owner boundary","all 54 decoded calls, 0 loop(s), and 16 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3a8:02000aac":{"span_bytes":2672,"score":{"measured":"2026-08-30","candidate_bytes":4052,"reference_bytes":4092,"wrong_instructions":620,"differing_halfwords":1856,"class":"generated-call-script-retention"},"shape":{"calls":402,"loops":4,"memory_operations":22},"verified_against_reference":["candidate and ROM contain the same 402 calls in machine order and all argument values are represented","all 22 explicit memory operations are represented, including workspace state 364, object state 90 and 100, and result fields at offset 6","direct assembly audit restored the two state-dependent branch arms and all four object-state wait loops omitted by the mechanical draft","approved GCC allocation and literal-pool scheduling emits 4052 bytes for the complete 4092-byte semantic source without an exact ordinary-C emission"],"retention":"keep_structured_asm","note":"The complete 4092-byte owner is reconstructed here; this record covers its 2672-byte assembly-retained band at 0x02000aac–0x0200151c. Approved GCC cannot preserve the owner's long-range allocation and literal-pool schedule."},"resource_3a8:020026c0":{"span_bytes":2710,"score":{"measured":"2026-08-30","candidate_bytes":2688,"reference_bytes":2756,"wrong_instructions":396,"differing_halfwords":1283,"class":"generated-call-script-retention"},"shape":{"calls":248,"loops":0,"memory_operations":13},"verified_against_reference":["candidate and ROM contain the same 248 calls in machine order and all argument values are represented","direct assembly audit restored three returned-object field forwards and four fixed-point object-field initializers","the state-dependent branch now preserves its exclusive arms, workspace counter increment, and final words at offsets 448 and 456","approved GCC allocation and literal-pool scheduling changes the complete owner extent without an exact ordinary-C emission"],"retention":"keep_structured_asm","note":"The complete 2756-byte owner is reconstructed here; this record covers its 2710-byte assembly-retained band at 0x020026c0–0x02003156."},"resource_3a8:02003766":{"span_bytes":422,"score":{"measured":"2026-08-31","candidate_bytes":222,"reference_bytes":422,"wrong_instructions":195,"differing_halfwords":208,"class":"structured-scene-retention"},"shape":{"calls":24,"loops":0,"memory_operations":23},"verified_against_reference":["complete audited production span","all 24 decoded calls, 0 loop(s), and 23 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3ab:0200049a":{"span_bytes":546,"score":{"measured":"2026-08-31","candidate_bytes":444,"reference_bytes":546,"wrong_instructions":154,"differing_halfwords":268,"class":"structured-scene-retention"},"shape":{"calls":35,"loops":0,"memory_operations":3},"verified_against_reference":["complete audited production span","all 35 decoded calls, 0 loop(s), and 3 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3ad:02000808":{"span_bytes":1978,"score":{"measured":"2026-08-23","candidate_bytes":1864,"reference_bytes":1978,"wrong_instructions":243,"differing_halfwords":909,"class":"generated-call-script-retention"},"shape":{"calls":222,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 222 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3af:02001db0":{"span_bytes":1234,"score":{"measured":"2026-08-23","candidate_bytes":1128,"reference_bytes":1234,"wrong_instructions":172,"differing_halfwords":571,"class":"generated-call-script-retention"},"shape":{"calls":137,"loops":1,"memory_operations":9,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 137 calls and their argument values, 1 loops, and 9 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3af:020022c0":{"span_bytes":856,"score":{"measured":"2026-08-31","candidate_bytes":800,"reference_bytes":856,"wrong_instructions":167,"differing_halfwords":399,"class":"structured-scene-retention"},"shape":{"calls":80,"loops":1,"memory_operations":23},"verified_against_reference":["complete callable owner at 0x020022c0, including its interworking return and literal tail","all 80 decoded calls, 1 loop(s), and 23 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3af:02002618":{"span_bytes":956,"score":{"measured":"2026-08-30","candidate_bytes":934,"reference_bytes":956,"wrong_instructions":204,"differing_halfwords":442,"class":"generated-call-script-retention"},"shape":{"calls":86,"loops":0,"memory_operations":19},"verified_against_reference":["all 86 calls and their arguments are represented in ROM order","direct assembly audit restored three returned-object field pairs, workspace state 448, and three terminal scene-data writes","approved GCC allocation and literal scheduling does not emit the complete owner exactly"],"retention":"keep_structured_asm"},"resource_3af:02002c84":{"span_bytes":1228,"score":{"measured":"2026-08-31","candidate_bytes":1236,"reference_bytes":1228,"wrong_instructions":550,"differing_halfwords":503,"class":"structured-scene-retention"},"shape":{"roster_slots":4,"candidate_members":9,"jump_table_entries":21,"member_loop_iterations":4},"verified_against_reference":["the complete party-roster scene is bounded from 0x02002c84 through its 21-entry jump table, four-member loop, unwind, and seventeen-word tail before 0x02003150","all roster discovery phases, member-category mapping, generic and member-specific dialogue arms, actor staging, reward call, and terminal story-flag clear are represented","the remaining eight-byte surplus is approved-compiler switch lowering, scheduling, carrier allocation, and literal placement after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b0:02000564":{"span_bytes":588,"score":{"measured":"2026-08-31","candidate_bytes":580,"reference_bytes":588,"wrong_instructions":74,"differing_halfwords":238,"class":"generated-call-script-retention"},"shape":{"calls":52,"loops":0,"memory_operations":16},"verified_against_reference":["all 52 calls and their arguments are represented in ROM order across the complete callable owner","direct audit restored the carried scene handle, both workspace state transitions, the two-word placement publication, and the two-word actor coordinate publication omitted by the generated draft","the actor 9/10/11/12 staging, camera motion, and terminal scene close preserve machine order","the remaining eight-byte extent residual is approved-compiler high-register carrier allocation, postincrement spelling, literal reuse, immediate materialization, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b1:02004254":{"span_bytes":892,"score":{"measured":"2026-08-30","candidate_bytes":884,"reference_bytes":892,"wrong_instructions":78,"differing_halfwords":314,"class":"generated-call-script-retention"},"shape":{"calls":83,"loops":0,"memory_operations":2},"verified_against_reference":["all 83 calls and their arguments are represented in ROM order across the complete callable owner","direct retained-assembly audit preserves the incoming scene actor, returned actor handle, optional record coordinate transfer, 0x300 gate, and nested 0x92b/0x92a/0x929 presentation branches","seven calls incorrectly pulled from the following owner by the generated draft were removed; this owner ends at the independently inventoried function at 0x020045d0","the remaining eight-byte extent residual and instruction differences are approved-compiler carrier allocation, literal reuse, and scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b1:020052f4":{"span_bytes":912,"score":{"measured":"2026-08-30","candidate_bytes":920,"reference_bytes":912,"wrong_instructions":140,"differing_halfwords":306,"class":"generated-call-script-retention"},"shape":{"calls":80,"loops":0,"memory_operations":5},"verified_against_reference":["all 80 calls and their arguments are represented in ROM order across the complete callable owner","direct audit against the retained assembly restored the conditional workspace counter increment, terminal workspace-state value 521, and literal-backed final event identifier 0x927 omitted by the generated draft","the owner ends at the independently inventoried owner at 0x02005684","the remaining eight-byte extent residual is approved-compiler carrier allocation, literal reuse, and immediate-materialization scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b5:02000726":{"span_bytes":558,"score":{"measured":"2026-08-31","candidate_bytes":500,"reference_bytes":558,"wrong_instructions":197,"differing_halfwords":273,"class":"structured-scene-retention"},"shape":{"calls":42,"loops":0,"memory_operations":5},"verified_against_reference":["complete audited production span","all 42 decoded calls, 0 loop(s), and 5 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3b7:020001d8":{"span_bytes":2968,"score":{"measured":"2026-08-31","candidate_bytes":2052,"reference_bytes":2968,"wrong_instructions":676,"differing_halfwords":1436,"class":"structured-scene-retention"},"shape":{"calls":243,"loops":5,"memory_operations":9},"verified_against_reference":["complete owner boundary was audited from 0x020001d8 through the next production owner","the reconstruction preserves all 243 decoded calls, 5 loop(s), and 9 explicit memory operation(s) in machine order","the remaining byte differences are approved-compiler scheduling, allocation, literal placement, and lowered-control-flow differences"],"compiler_impossibility":{"kind":"intra_function_call_module","reference_evidence":"The direct bl at 0x020003c0 targets 0x02000cba, while 0x02000cba is also reached by ordinary fallthrough from the instruction at 0x02000cb8 with live owner state; see games/gs1/assets/code/resource_3b7_overlay.s:619 and :1573.","compiler_evidence":"The approved GCC 2.96 Thumb direct-call patterns in alchemy-gcc/agscc/gcc/config/arm/arm.md:5992-6034 accept SYMBOL_REF operands, not intra-function LABEL_REF blocks, and the backend has no outlining pass.","verdict":"Ordinary C cannot make the same live statement sequence both fallthrough code and a callable local subroutine; retained assembly is required for the byte-exact 2968-byte module."},"retention":"keep_structured_asm"},"resource_3b7:02000e5c":{"span_bytes":2124,"score":{"measured":"2026-08-31","candidate_bytes":508,"reference_bytes":2124,"wrong_instructions":911,"differing_halfwords":1062,"class":"structured-scene-retention"},"shape":{"calls":88,"loops":2,"memory_operations":1},"verified_against_reference":["complete owner boundary was audited from 0x02000e5c through the next production owner","the reconstruction preserves all 88 decoded calls, 2 loop(s), and 1 explicit memory operation(s) in machine order","the remaining byte differences are approved-compiler scheduling, allocation, literal placement, and lowered-control-flow differences"],"retention":"keep_structured_asm"},"resource_3b8:02000108":{"span_bytes":576,"score":{"measured":"2026-08-31","candidate_bytes":412,"reference_bytes":576,"wrong_instructions":141,"differing_halfwords":279,"class":"structured-scene-retention"},"shape":{"calls":59,"loops":0,"memory_operations":1},"verified_against_reference":["complete audited executable span","all 59 decoded calls, 0 loop(s), and 1 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3b8:020003b0":{"span_bytes":372,"score":{"measured":"2026-08-31","candidate_bytes":272,"reference_bytes":372,"wrong_instructions":72,"differing_halfwords":170,"class":"structured-scene-retention"},"shape":{"calls":42,"loops":0,"memory_operations":4},"verified_against_reference":["complete audited executable span","all 42 decoded calls, 0 loop(s), and 4 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3b8:020006dc":{"span_bytes":1022,"score":{"measured":"2026-08-23","candidate_bytes":906,"reference_bytes":1022,"wrong_instructions":102,"differing_halfwords":479,"class":"generated-call-script-retention"},"shape":{"calls":113,"loops":0,"memory_operations":4,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 113 calls and their argument values, 0 loops, and 4 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3b9:02000708":{"span_bytes":942,"score":{"measured":"2026-08-23","candidate_bytes":876,"reference_bytes":942,"wrong_instructions":119,"differing_halfwords":426,"class":"generated-call-script-retention"},"shape":{"calls":101,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 101 calls and their argument values, 0 loops, and 1 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3b9:02000dcc":{"span_bytes":992,"score":{"measured":"2026-08-30","candidate_bytes":980,"reference_bytes":992,"wrong_instructions":124,"differing_halfwords":469,"class":"generated-call-script-retention"},"shape":{"calls":101,"loops":0,"memory_operations":13},"verified_against_reference":["all 101 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit covers the progress guard, actor formation and motion phases, both actor-byte flag updates, and the complete nine-field presentation-record reset","the owner ends at the independently inventoried leaf at 0x020011ac","the remaining twelve-byte extent residual is approved-compiler carrier allocation, literal reuse, and immediate-materialization scheduling after complete semantics are represented"],"retention":"keep_structured_asm"},"resource_3b9:02001298":{"span_bytes":852,"score":{"measured":"2026-08-30","candidate_bytes":880,"reference_bytes":852,"wrong_instructions":119,"differing_halfwords":407,"class":"generated-call-script-retention"},"shape":{"calls":92,"loops":0,"memory_operations":12},"verified_against_reference":["all 92 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit restored every literal-backed call, actor-state write, and all three workspace-state phases","approved GCC allocates repeated constants and the long-lived workspace base differently after all decoded effects are represented"],"retention":"keep_structured_asm"},"resource_3ba:020021b8":{"span_bytes":1264,"score":{"measured":"2026-08-31","candidate_bytes":1300,"reference_bytes":1264,"wrong_instructions":798,"differing_halfwords":626,"class":"structured-topology-retention"},"shape":{"calls":10,"loops":4,"memory_operations":"command queue, three signed interpolation channels, four output modes, two deferred-MMIO queue appends"},"verified_against_reference":["the complete callable owner is bounded from 0x020021b8 through the alignment and ten-word trailing pool before 0x020026a8","the command-drain loop represents the -1, 0x1000, 0x2000, 0x3000, 0x4000, and 0x7fff arms with their state-cell effects","all three signed fixed-point interpolation channels and their duration completion writes are represented","all four output modes and both interrupt-masked deferred-MMIO queue appends are represented in machine order","all ten resolver-confirmed calls are preserved; the remaining score delta is GCC 2.96 topology, carrier allocation, literal placement, and expression spelling"],"retention":"keep_structured_asm"},"resource_3bb:02000a1c":{"span_bytes":276,"score":{"measured":"2026-08-31","candidate_bytes":240,"reference_bytes":276,"wrong_instructions":71,"differing_halfwords":130,"class":"structured-scene-retention"},"shape":{"calls":26,"loops":1,"memory_operations":0},"verified_against_reference":["complete audited executable span","all 26 decoded calls, 1 loop(s), and 0 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3bb:020010dc":{"span_bytes":508,"score":{"measured":"2026-08-30","candidate_bytes":526,"reference_bytes":508,"wrong_instructions":128,"differing_halfwords":242,"class":"generated-call-script-retention"},"shape":{"calls":47,"loops":0,"memory_operations":9},"verified_against_reference":["all 47 calls and their arguments are represented in ROM order across the complete callable owner","direct assembly and literal-pool audit restored input-actor handling, coordinate-relative placement, three actor-coordinate lookups, and all closing position updates","approved GCC allocates the long-lived actor coordinates differently after all decoded effects are represented"],"retention":"keep_structured_asm"},"resource_3bb:020012f0":{"span_bytes":296,"score":{"measured":"2026-08-30","candidate_bytes":304,"reference_bytes":296,"wrong_instructions":21,"differing_halfwords":94,"class":"generated-call-script-retention"},"shape":{"calls":29,"loops":0,"memory_operations":1},"verified_against_reference":["all 29 calls and their arguments are represented in ROM order across the complete callable owner","direct audit restored the scene-progress early return, actor operation result branches, literal-backed presentation calls, and common cleanup dispatch","the residual is compiler allocation and literal scheduling after the complete control-flow shape is restored"],"retention":"keep_structured_asm"},"resource_3bb:02002450":{"span_bytes":1264,"score":{"measured":"2026-08-31","candidate_bytes":1300,"reference_bytes":1264,"wrong_instructions":798,"differing_halfwords":626,"class":"structured-topology-retention"},"shape":{"calls":10,"loops":4,"memory_operations":"command queue, three signed interpolation channels, four output modes, two deferred-MMIO queue appends"},"verified_against_reference":["the complete callable owner is bounded from 0x02002450 through the alignment and ten-word trailing pool before 0x02002940","the command-drain loop represents the -1, 0x1000, 0x2000, 0x3000, 0x4000, and 0x7fff arms with their state-cell effects","all three signed fixed-point interpolation channels and their duration completion writes are represented","all four output modes and both interrupt-masked deferred-MMIO queue appends are represented in machine order","all ten resolver-confirmed calls are preserved; the remaining score delta is GCC 2.96 topology, carrier allocation, literal placement, and expression spelling"],"retention":"keep_structured_asm"},"resource_3bc:02000ba2":{"span_bytes":462,"score":{"measured":"2026-08-31","candidate_bytes":304,"reference_bytes":462,"wrong_instructions":188,"differing_halfwords":227,"class":"structured-scene-retention"},"shape":{"calls":40,"loops":1,"memory_operations":0},"verified_against_reference":["complete audited production span","all 40 decoded calls, 1 loop(s), and 0 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3bc:02001c20":{"span_bytes":472,"score":{"measured":"2026-08-30","candidate_bytes":484,"reference_bytes":472,"wrong_instructions":82,"differing_halfwords":163,"class":"generated-call-script-retention"},"shape":{"calls":44,"loops":0,"memory_operations":32},"verified_against_reference":["complete reconstruction accounts for the global mode gate, three state routes, all 44 calls, and four actor field groups","direct assembly audit restored scene/state arguments and coordinate fields omitted by the mechanical draft","candidate is twelve bytes longer after complete decoded control flow and side effects are represented; residual is approved GCC allocation and scheduling"],"retention":"keep_structured_asm"},"resource_3bc:02001f90":{"span_bytes":352,"score":{"measured":"2026-08-30","candidate_bytes":352,"reference_bytes":352,"wrong_instructions":90,"differing_halfwords":170,"class":"generated-call-script-retention"},"shape":{"calls":30,"loops":1,"memory_operations":5},"verified_against_reference":["complete reconstruction accounts for the global mode gate, all three state routes, bounded event-polling loop, 30 calls, and terminal event-counter reset","candidate and reference have identical extents; residual is approved GCC allocation and scheduling after complete control flow is represented"],"retention":"keep_structured_asm"},"resource_3bc:02002ee8":{"span_bytes":1264,"score":{"measured":"2026-08-31","candidate_bytes":1300,"reference_bytes":1264,"wrong_instructions":832,"differing_halfwords":626,"class":"structured-topology-retention"},"shape":{"calls":10,"loops":4,"memory_operations":"command queue, three signed interpolation channels, four output modes, two deferred-MMIO queue appends"},"verified_against_reference":["the complete callable owner is bounded from 0x02002ee8 through the alignment and ten-word trailing pool before 0x020033d8","the command-drain loop represents the -1, 0x1000, 0x2000, 0x3000, 0x4000, and 0x7fff arms with their state-cell effects","all three signed fixed-point interpolation channels and their duration completion writes are represented","all four output modes and both interrupt-masked deferred-MMIO queue appends are represented in machine order","all ten resolver-confirmed calls are preserved; the remaining score delta is GCC 2.96 topology, carrier allocation, literal placement, and expression spelling"],"retention":"keep_structured_asm"},"resource_3bd:0200109c":{"span_bytes":860,"score":{"measured":"2026-08-31","candidate_bytes":496,"reference_bytes":860,"wrong_instructions":360,"differing_halfwords":422,"class":"structured-scene-retention"},"shape":{"calls":46,"loops":8,"memory_operations":36},"verified_against_reference":["complete callable owner at 0x0200109c, including its interworking return and literal tail","all 46 decoded calls, 8 loop(s), and 36 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3bd:020013f8":{"span_bytes":6220,"score":{"measured":"2026-08-17","candidate_bytes":5916,"reference_bytes":6220,"wrong_instructions":547,"differing_halfwords":2875,"class":"wrong"},"shape":{"calls":703,"branches":721,"loops":3,"memory_ops":47},"expressed":["call sequence","argument values","memory through a held pointer","pointer-valued loads","register-offset addressing","read-modify-write","three counted loops with real bounds","drafted by `overlay reconstruct`, which models 30 of its 47 memory operations"],"unexpressed":[{"op":"ldrsh","count":8,"where":"loop bodies"},{"op":"strh","count":10,"where":"loop bodies"},{"op":"cmp","count":7,"where":"loop bodies"}],"verified_against_reference":["bl count 703","ldrb count 10","strb count 11"],"blocked_by":"not blocked -- ordinary unfinished work, see unexpressed","rejected":[],"note":"Excess high-register moves fell +80 -> +69 -> +48 as memory and loops were modelled, which is why the remaining gap reads as incomplete source rather than as an allocation wall."},"resource_3bf:0200298c":{"span_bytes":1736,"score":{"measured":"2026-08-23","candidate_bytes":1636,"reference_bytes":1736,"wrong_instructions":196,"differing_halfwords":826,"class":"generated-call-script-retention"},"shape":{"calls":195,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 195 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3c3:02000334":{"span_bytes":1020,"score":{"measured":"2026-08-31","candidate_bytes":992,"reference_bytes":1020,"wrong_instructions":198,"differing_halfwords":491,"class":"structured-scene-retention"},"shape":{"calls":94,"loops":0,"memory_operations":0},"verified_against_reference":["complete retained body from 0x02000334 through the next production owner boundary","all 94 decoded calls, 0 loop(s), and 0 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3c4:02001742":{"span_bytes":438,"score":{"measured":"2026-08-31","candidate_bytes":372,"reference_bytes":438,"wrong_instructions":196,"differing_halfwords":215,"class":"structured-scene-retention"},"shape":{"calls":32,"loops":1,"memory_operations":6},"verified_against_reference":["complete audited production span","all 32 decoded calls, 1 loop(s), and 6 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3c4:02001fda":{"span_bytes":806,"score":{"measured":"2026-08-31","candidate_bytes":644,"reference_bytes":806,"wrong_instructions":329,"differing_halfwords":392,"class":"structured-scene-retention"},"shape":{"calls":63,"loops":0,"memory_operations":20},"verified_against_reference":["complete retained body from 0x02001fda through the next production owner boundary","all 63 decoded calls, 0 loop(s), and 20 explicit memory operation(s) are represented in machine order","approved GCC changes scheduling, allocation, control-flow lowering, and literal placement"],"retention":"keep_structured_asm"},"resource_3c5:02000d4a":{"span_bytes":526,"score":{"measured":"2026-08-31","candidate_bytes":420,"reference_bytes":526,"wrong_instructions":201,"differing_halfwords":259,"class":"structured-scene-retention"},"shape":{"calls":49,"loops":1,"memory_operations":20},"verified_against_reference":["complete audited production span","all 49 decoded calls, 1 loop(s), and 20 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3c5:0200186c":{"span_bytes":3058,"score":{"measured":"2026-08-23","candidate_bytes":2824,"reference_bytes":3058,"wrong_instructions":440,"differing_halfwords":1442,"class":"generated-call-script-retention"},"shape":{"calls":330,"loops":0,"memory_operations":0,"reference_high_register_moves":0},"verified_against_reference":["complete deterministic reconstruction accounts for all 330 calls and their argument values, 0 loops, and 0 explicit memory operations","the ROM owner contains no high-register moves; approved GCC CSE and allocation introduce high-register carriers or otherwise change the owner extent","the default route plus -O0, -O1, -O3, -Os, -fno-gcse, and -fno-cse-follow-jumps produced zero exact emissions"],"retention":"keep_structured_asm","note":"A generated event-call script, retained as structured assembly because the approved compiler cannot preserve its repeated immediate construction and call-argument schedule."},"resource_3c7:020000c8":{"span_bytes":148,"score":{"measured":"2026-08-24","candidate_bytes":148,"reference_bytes":148,"wrong_instructions":18,"differing_halfwords":49,"class":"literal-pool-and-argument-ordering"},"shape":{"calls":12,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for all twelve calls, every argument and literal, the actor-facing test, and the sole actor-angle load","candidate and reference have equal owner extent; the dominant residual moves the mask from the ROM's early pool into the terminal compiler pool","after alignment, the only executable scheduling residual is one swapped zero/value argument-setup pair; direct and named-local forms preserve the compiler order","four neighboring owners independently reproduce the same approved-compiler terminal-pool preference"],"retention":"keep_structured_asm","note":"Largest actor-facing message-selection family member; retained because ordinary C cannot select the ROM pool boundary and one call's argument schedule."},"resource_3c7:0200015c":{"span_bytes":108,"score":{"measured":"2026-08-24","candidate_bytes":104,"reference_bytes":108,"wrong_instructions":18,"differing_halfwords":33,"class":"literal-pool-placement"},"shape":{"calls":7,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for the actor-facing test, all seven calls, all four literal values, and the sole actor-angle load","the executable instruction sequence is preserved; the ROM places the 0xffffc000 mask in an early pool after the first unconditional branch while the approved compiler merges it into the terminal pool","direct-expression, named-local, declaration-order, nested-else, and early-return source forms all retain the terminal compiler pool"],"retention":"keep_structured_asm","note":"One member of a repeated actor-facing message-selection family. Retained as assembly because ordinary C cannot select the ROM's non-required early literal-pool boundary."},"resource_3c7:020001c8":{"span_bytes":108,"score":{"measured":"2026-08-24","candidate_bytes":104,"reference_bytes":108,"wrong_instructions":18,"differing_halfwords":33,"class":"literal-pool-placement"},"shape":{"calls":7,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for the actor-facing test, all seven calls, all four literal values, and the sole actor-angle load","the executable instruction sequence is preserved; the ROM places the 0xffffc000 mask in an early pool after the first unconditional branch while the approved compiler merges it into the terminal pool","the neighboring 0x0200015c owner proves the same compiler behavior for the identical source shape with only message constants changed"],"retention":"keep_structured_asm","note":"Second member of a repeated actor-facing message-selection family. Retained as assembly because ordinary C cannot select the ROM's non-required early literal-pool boundary."},"resource_3c7:02000234":{"span_bytes":104,"score":{"measured":"2026-08-24","candidate_bytes":104,"reference_bytes":104,"wrong_instructions":12,"differing_halfwords":23,"class":"literal-pool-placement"},"shape":{"calls":7,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for the actor-facing test, all seven calls, all four literals, and the sole actor-angle load","candidate and reference have equal owner extent; the residual only moves the four-word pool across the two message branches","the three neighboring owners independently reproduce the same approved-compiler terminal-pool preference"],"retention":"keep_structured_asm","note":"Actor-facing message-selection family member retained because ordinary C cannot select the ROM literal-pool boundary."},"resource_3c7:0200029c":{"span_bytes":108,"score":{"measured":"2026-08-24","candidate_bytes":104,"reference_bytes":108,"wrong_instructions":18,"differing_halfwords":33,"class":"literal-pool-placement"},"shape":{"calls":7,"loops":0,"memory_operations":1,"reference_high_register_moves":0},"verified_against_reference":["complete control flow accounts for the actor-facing test, all seven calls, all four literals, and the sole actor-angle load","the executable instruction sequence is preserved; the ROM places the mask in an early pool while approved GCC merges it into the terminal pool","the three neighboring owners independently reproduce the same approved-compiler pool displacement"],"retention":"keep_structured_asm","note":"Actor-facing message-selection family member retained because ordinary C cannot select the ROM literal-pool boundary."},"resource_3c8:020009c6":{"span_bytes":322,"score":{"measured":"2026-08-31","candidate_bytes":228,"reference_bytes":322,"wrong_instructions":139,"differing_halfwords":161,"class":"structured-scene-retention"},"shape":{"calls":22,"loops":1,"memory_operations":14},"verified_against_reference":["complete audited production span","all 22 decoded calls, 1 loop(s), and 14 explicit memory operation(s) are represented in machine order","candidate emits at least half the reference extent; remaining differences are approved-compiler lowering"],"retention":"keep_structured_asm"},"resource_3c8:02001780":{"span_bytes":136,"score":{"measured":"2026-08-25","candidate_bytes":136,"reference_bytes":136,"wrong_instructions":12,"differing_halfwords":8,"class":"allocation"},"shape":{"calls":11,"loops":0,"memory_operations":5,"reference_high_register_moves":0},"verified_against_reference":["complete reconstruction accounts for both global halfword stores, all eleven calls, every argument, and all four terminal literals","candidate and reference have identical 136-byte owner extent","an inline direction wrapper removes the independent shift placement; the remaining eight halfwords are confined to equivalent low-register allocation for the two stores","a 20,000-candidate safe heat walk from the improved source compiled without failures and left the eight-halfword baseline unchanged"],"retention":"keep_structured_asm","note":"Retained because approved compiler chooses a different low-register allocation for the global state writes."},"resource_3c9:02003e9c":{"span_bytes":928,"score":{"measured":"2026-08-30","candidate_bytes":944,"reference_bytes":928,"wrong_instructions":140,"differing_halfwords":450,"class":"generated-call-script-retention"},"shape":{"calls":94,"loops":0,"memory_operations":4},"verified_against_reference":["candidate and ROM contain the same 94 calls in machine order with every argument represented","direct assembly audit restored the route-dependent event-counter increment omitted by the mechanical draft","candidate is sixteen bytes longer after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3ca:02000430":{"span_bytes":1796,"score":{"measured":"2026-08-30","candidate_bytes":1754,"reference_bytes":1796,"wrong_instructions":224,"differing_halfwords":840,"class":"generated-call-script-retention"},"shape":{"calls":188,"loops":0,"memory_operations":11},"verified_against_reference":["candidate and ROM contain the same 188 calls in machine order with every decoded argument represented","direct assembly audit restored all six conditional event-counter increments, the presentation-object fields, both terminal runtime writes, and the palette clear omitted by the mechanical draft","candidate is 42 bytes shorter after complete decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"resource_3ca:02000b34":{"span_bytes":624,"score":{"measured":"2026-08-30","candidate_bytes":616,"reference_bytes":624,"wrong_instructions":151,"differing_halfwords":263,"class":"generated-presentation-retention"},"shape":{"calls":35,"loops":5,"memory_operations":24},"verified_against_reference":["complete owner reconstruction accounts for all 35 calls, both palette ramps, the three-pass blend transition, and the fixed-point runtime transition loop","direct assembly audit restored every absolute presentation-state write, blend-register update, runtime coordinate handoff, and terminal enable flag omitted by the mechanical draft","candidate is eight bytes shorter after all decoded control flow and side effects are represented; residual is approved GCC allocation and literal scheduling"],"retention":"keep_structured_asm"},"main:080e46f0":{"schema_version":1,"namespace":"main","address":"0x080e46f0","status":"measured-draft","span_bytes":200,"owner_bytes":200,"candidate_bytes":216,"differing_halfwords":107,"wrong_instructions":88,"classification":"palette-step-toward-resource","domain":"Copies a 64-entry palette resource into a stack buffer, forces entry 0 to black, steps every 5-bit channel of the current hardware palette one unit toward the buffered target, and copies the stepped buffer back to palette RAM through the IWRAM word-copy kernel at 0x03001388.","score":{"measured":"2026-09-01","candidate_bytes":216,"reference_bytes":200,"differing_halfwords":107,"wrong_instructions":88,"topology":"equal","class":"missing-extra-code","route":"canonical-gcc296"},"bounded_flag_probe":{"-fno-expensive-optimizations":{"candidate_bytes":200,"differing_halfwords":79,"wrong_instructions":56,"topology":"equal"}},"semantic_evidence":["r0 is passed untouched to Func_08002f40, so the single argument is the palette resource id; the two bl sites at 0x080072f0 are the __call_via_r3 veneer with r3 = 0x03001388, the IWRAM word-copy kernel, matching the idiom in graphics/palette/update_phase_palette.c.","Direct halfword dereferences in each expression reproduce the reference ldrh plus lsls #16/lsrs #21/lsrs #26 shape; a u16 local is promoted signed by PROMOTE_MODE (TARGET_MMU_TRAPS off) and emits ldrsh, and a u32 local emits plain lsrs.","The loop counter test must be i != 64: check_dbra_loop only reverses LT/LE compares, and the reference keeps the ascending counter in ip with cmp #64/bne.","The result is assembled as (b << 10) | (g << 5) | r, matching the orrs chain order."],"remaining":"The candidate keeps one pseudo for the stack buffer address across both kernel calls (cse merges every (plus sfp -128) computation into the first argument pseudo) and allocates it callee-saved, while the reference re-materializes sp at each of the four buffer sites and shares only the strh base with the loop base. The two 0x1f mask pseudos also take swapped registers (sl/r7). Spellings tried without effect: pointer local for the loop base, &buf[0], buf[i] with i = 0, a copy-function variable, do/while and for with != test, pal[i] versus pal++, a src local versus a nested GetResource call.","notes":["Recovered only from the retained assembly, local headers, the approved compiler, and its pass dumps. Claims zero DONE bytes."]},"main:080ccaec":{"schema_version":1,"namespace":"main","address":"0x080ccaec","status":"adopted-exact-c","owner_bytes":240,"candidate_bytes":240,"differing_halfwords":0,"wrong_instructions":0,"name":"BattlePresentation_PrepareScene","source":"games/gs1/src/battle/presentation/prepare_scene.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Allocates the kind-39 and kind-40 work blocks, resets the battle presentation, sets BG2PA and the blend coefficients, streams one of five kind-selected palette resources into palette RAM through the IWRAM word-copy kernel, seeds three work fields, and schedules Func_080cc960 and Func_080cd260 as frame callbacks.","notes":["Reached only through the long-call veneer Func_080c9038 from the mode-1 branch of draft 080c1798.","Func_080041d8 must be declared with its adopted s32 result: the value-returning call makes the call the last setter of r0, which is what places each callback pool load after the order argument shift (sched2 tie-break by dependent count). A void prototype costs four differing halfwords.","Recovered only from the retained assembly, local headers and exact siblings (puff_arc/run.c, member_orbit/run.c), and the approved compiler."]},"main:0801bd98":{"schema_version":1,"namespace":"main","address":"0x0801bd98","status":"adopted-exact-c","owner_bytes":232,"candidate_bytes":232,"differing_halfwords":0,"wrong_instructions":0,"name":"MenuSelection_SetupEntry","source":"games/gs1/src/menu/selection/setup_entry.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Loads the glyph or tile graphic for a menu selection list entry through one of three tile loaders keyed on kind, records base, source slot, tile and end in the list node, and resets the node's render-object bitfields.","notes":["kind is unsigned (bhi in the switch tree); the +0x28 render object is addressed through a pointer local so every byte access stays within one Thumb base register; bitfield statement order 52, 55, 54, 76, 56, 8c, 80, 8a is evidenced by the shared 0x3f constant copy before the byte-7 AND.","The three per-kind tile counts (0x1f, 0x182, 0x333) are loaded from the literal pool and spelled as Value_ absolute constants.","The render-object layout duplicates struct Object_0801c0dc from ui/text/resource/initialize.c; a shared header is a follow-up. Neighbour drafts 0801b664 and 0801b810 prototype this owner with u16 arguments, which the retained assembly refutes.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:0808a5f8":{"schema_version":1,"namespace":"main","address":"0x0808a5f8","status":"adopted-exact-c","owner_bytes":236,"candidate_bytes":236,"differing_halfwords":0,"wrong_instructions":0,"name":"MapGroupTable_SelectEntry","source":"games/gs1/src/map/shared/select_group_entry.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Walks the word table returned by the 0x02008000 service at +0x14, finds the group whose 12-bit id matches the current id at 0x02000240+0x1c0, and stores the first entry that passes the kind and game-flag checks (or the group id when the group ends) into the current id and sub fields.","notes":["Both loops are for(;;) with continue/break; the entry test rotated to the loop end by expand_end_loop and duplicate_loop_exit_test is what the retained ldmia/ands/bne layout shows, not gotos.","The outer loop masks the loaded word in place (id &= 0xfff); decoding the entry in ascending bit order (id, sub, kind, flag) is required by sched2 tie-breaks.","The adopted caller menu/run_top_selection.c declares a void(void) prototype inside a non-EN guard; the assembly proves r0 is a real kind argument (compared with 999).","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:08010d48":{"schema_version":1,"namespace":"main","address":"0x08010d48","status":"adopted-exact-c","owner_bytes":204,"candidate_bytes":204,"differing_halfwords":0,"wrong_instructions":0,"name":"Map_SetWindowCellTile","source":"games/gs1/src/map/shared/set_window_cell_tile.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Converts a tileset pixel position to a tile index and a map pixel position to 8-pixel cells, stores the tile index into the 16x16 ring table at Data_03001e70+0x138, and when the window origin is within one cell on both axes redraws that cell on both layers through Func_080108e4.","notes":["The window origin words are read through a stepped s32 pointer (origin_x = *position++; origin_y = position[1]) because flow's auto-increment is what emits the ldmia; Func_080108e4 must be declared returning s32 so the value-returning call orders movs r0, #0 last in the first argument setup.","The table is 256 u16 entries, not the neighbours' [2][160]; the layer-1 offset 0x140 is a tile-id offset.","Recovered only from the retained assembly, local headers and the approved compiler."]},"main:08016f2c":{"schema_version":1,"namespace":"main","address":"0x08016f2c","status":"adopted-exact-c","owner_bytes":216,"candidate_bytes":216,"differing_halfwords":0,"wrong_instructions":0,"name":"UiWork_ProcessDirectWork","source":"games/gs1/src/ui/runtime/process_direct_work.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Per-frame update of the eight 36-byte direct-window work records at render work + 0x500: steps the open animation through UiWindow_UpdateInterpolatedGeometry and the final draw Func_08016230, or steps the close animation by erasing the previous border rectangle and either saving geometry and advancing the frame or zeroing the record, marking the render-dirty byte in both close paths.","notes":["A goto loop is required: with loop notes present the loop pass combines the two base + 0xea3 address computations and hoists them, while the reference recomputes the address in each branch (ui/render/drain_pending.c walks the same table the same way).","Func_08016178 is declared with 32-bit parameters in this unit; the s16 fields must load as ldrsh, which a u16 prototype (finalize.c) would turn into ldrh.","The frame != duration branch needs a block-local u8 dirty = 1 assigned in its own statement so the value pseudo outlives the legitimised address pseudo (address r3, value r2); a literal store or a function-level constant changes the allocation.","Sole caller Func_0801789c (ui/runtime/process_all.c) declares s32 Func_08016f2c(void); the owner sets no return value, so void is the evidenced signature.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:080b5864":{"schema_version":1,"namespace":"main","address":"0x080b5864","status":"adopted-exact-c","owner_bytes":248,"candidate_bytes":248,"differing_halfwords":0,"wrong_instructions":0,"name":"BattlePresentation_UpdateCamera","source":"games/gs1/src/battle/presentation/update_camera.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Per-frame battle camera update: when the link session is enabled it tracks serial status misses and pauses on a side mismatch, eases the camera yaw toward the transition target by a sixteenth of the delta while the transition timer runs, then rebuilds the scene transform through the camera scene helpers, the IWRAM routine at 0x03000250, and Func_080c0a24 when the transition flag is clear.","notes":["The three IWRAM cells are addressed from the single 0x03001e80 base (slot[0] camera state, slot[32] presentation transition, slot[-3] link work), matching the single pool word; declaring state, transition, work in that order fixes the entry register pattern.","The SIOCNT multi-id is computed into a local before the compare so the volatile load precedes the ldrb; the yaw field is u16 with (s16) casts at the two call sites, and the eased step is written delta /= 16; field += delta so the divmod copy pseudo survives.","Struct names reuse the adopted camera/scene and battle/presentation vocabulary; the +0x51 byte is named by analogy to wait_sync.c's miss counter rule.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:0800b6b8":{"schema_version":1,"namespace":"main","address":"0x0800b6b8","status":"measured-draft","span_bytes":224,"owner_bytes":224,"candidate_bytes":220,"differing_halfwords":94,"score":{"measured":"2026-09-01","candidate_bytes":220,"reference_bytes":224,"differing_halfwords":94,"route":"canonical-gcc296"},"domain":"Registers a resource buffer slot (tag = slot << 12 | no) in the 8-entry buffer control at 0x03001e68, then walks the ResourceNo table at 0x08012fa0 decoding matching resources through Func_08002f40 and Func_08005340 into the caller's buffer.","notes":["Harvested from a bounded reconstruction session stopped before convergence (three variants, 98/100/94 differing halfwords). Structure and callee signatures are the current best model; the residual has not been classified. Claims zero DONE bytes."]},"main:08093af8":{"schema_version":1,"namespace":"main","address":"0x08093af8","status":"adopted-exact-c","owner_bytes":264,"candidate_bytes":264,"differing_halfwords":0,"wrong_instructions":0,"name":"Object_FindNearestFacingTarget","source":"games/gs1/src/object/facing/find_nearest_target.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Scans the 64-entry facing table at 0x03001e64 for the nearest other entry of a given id within a fixed-point distance bound, returning it and turning the caller toward it through ArcTan2.","notes":["Harvested draft closed from 17 to 0 differing halfwords by spelling the tail as early returns (if (found == NULL) return NULL; if (*found->record->id != id) return NULL; return found;). The compare of found then reloads sl into r3 while the record dereference reloads it again into r2; the result-variable spelling let reload inherit r3 across the beq.","The distance is the IWRAM root helper at 0x030001d8 called through the r3 veneer; the angle is ArcTan2 (Func_080044d0) truncated to u16, compared as a signed halfword turn against the facing when the distance exceeds 23.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:0801868c":{"schema_version":1,"namespace":"main","address":"0x0801868c","status":"adopted-exact-c","owner_bytes":260,"candidate_bytes":260,"differing_halfwords":0,"wrong_instructions":0,"name":"UiWindow_FitOnScreen","source":"games/gs1/src/ui/window/fit_on_screen.c","adopted":"2026-09-01","compiler_route":"canonical-gcc296","domain":"Positions a UI window: measures its size through Func_08018a50 or Func_08018850 unless preset, converts to tiles with the render-mode margin, and clamps x/y so the window stays inside the 30 by 20 tile screen.","notes":["Harvested draft closed from 53 to 0 differing halfwords by spelling the two clamps as if (pos >= 0) x = pos; else x = 0;. The ternary and the copy-then-test spellings let cse canonicalise the temporary to the longer-lived x (make_regs_eqv prefers the register with the later last use) and fold the subtraction into x; the if/else with the positive arm first is rewritten by the second jump pass into x = pos; if (pos < 0) x = 0; after cse has run, which keeps the reference's subs r3 / adds r6, r3 / cmp r3 shape. The inverted arm order costs six halfwords.","Recovered only from the retained assembly, local headers and exact siblings, and the approved compiler."]},"main:08018efc":{"schema_version":1,"namespace":"main","address":"0x08018efc","status":"measured-draft","span_bytes":260,"owner_bytes":260,"candidate_bytes":264,"differing_halfwords":106,"score":{"measured":"2026-09-01","candidate_bytes":264,"reference_bytes":260,"differing_halfwords":106,"route":"canonical-gcc296"},"domain":"Appends a UI window tile sprite to the render output list: acquires a free output record, fills its sprite attributes from the window position and the requested tile, and links it through RenderOutput_AppendToList.","notes":["Harvested from a bounded reconstruction session stopped before convergence (three variants, 106 to 126 differing halfwords). Claims zero DONE bytes."]},"main:080a1ac0":{"schema_version":1,"namespace":"main","address":"0x080a1ac0","status":"measured-draft","span_bytes":264,"owner_bytes":264,"candidate_bytes":254,"differing_halfwords":121,"score":{"measured":"2026-09-01","candidate_bytes":254,"reference_bytes":264,"differing_halfwords":121,"route":"canonical-gcc296"},"domain":"Slides the menu cursor icon from its current tile position to a target over several frames using the shared divide helper, unless the skip-slide flag is set.","notes":["Harvested from a bounded reconstruction session stopped before convergence (121 differing halfwords, ten bytes short). Claims zero DONE bytes."]}}}
diff --git a/games/gs1/recon/en/main/080207c4.c b/games/gs1/recon/en/main/080207c4.c
deleted file mode 100644
index 4799f1f00..000000000
--- a/games/gs1/recon/en/main/080207c4.c
+++ /dev/null
@@ -1,76 +0,0 @@
-#include "types.h"
-
-extern u8 Value_0000000a[];
-extern u8 Value_0000000b[];
-extern u8 Value_00000014[];
-extern u8 Value_00000017[];
-extern u8 Value_0000001a[];
-extern s16 Data_02002004;
-extern u8 *Data_02000000;
-
-s32 Func_080056cc(void);
-void Func_08005c68(void);
-s32 Func_08020244(s16 a, s32 b);
-void Func_0801776c(s32 msg, s32 mode);
-s32 Func_08017364(void);
-void WaitFrames(s32 frames);
-s32 Func_08028df4(s32 a, s32 b, s32 c, s32 d);
-void Func_08019a54(void);
-void Func_080f9010(u8 mode, s32 a);
-void Func_0801f818(void);
-void Func_0808a5b0(void);
-s32 Func_08005920(s32 a, void *b);
-void Func_08005cf8(void);
-
-s32 Func_080207c4(void)
-{
- s32 result;
- s32 found;
- s32 id;
- s32 flag;
-
- result = 0;
- found = Func_080056cc();
- if (found != 0) {
- Func_0801776c((s32)Value_0000000a, 1);
- result = -9;
- } else {
- Func_08005c68();
- id = Data_02002004;
- found = Func_08020244(id, 0);
- if (found == -1) {
- result = found;
- } else {
- if (*(u8 *)((u8 *)Data_02000000 + (found << 6) + 0x105c) != 0) {
- Func_0801776c((s32)Value_00000014, 13);
- while (Func_08017364() == 0) {
- WaitFrames(1);
- }
- if (Func_08028df4(1, 0, 0, 1) != 0) {
- Func_08019a54();
- goto skip;
- }
- Func_08019a54();
- }
- Func_080f9010(85, found);
- Func_0801776c((s32)Value_00000014, 13);
- while (Func_08017364() == 0) {
- WaitFrames(1);
- }
- Func_0801f818();
- Func_0808a5b0();
- flag = Func_08005920(found, &Data_02000000[0x1000]);
- flag |= Func_08005920(found + 3, &Data_02000000[0x1000 + 0x1000]);
- Func_08019a54();
- if (flag != 0) {
- Func_0801776c((s32)Value_0000000b, 1);
- result = -3;
- } else {
- Func_0801776c((s32)Value_00000017, 9);
- }
- }
- }
-skip:
- Func_08005cf8();
- return result;
-}
diff --git a/games/gs1/recon/en/main/0808ce74.c b/games/gs1/recon/en/main/0808ce74.c
deleted file mode 100644
index c634912b2..000000000
--- a/games/gs1/recon/en/main/0808ce74.c
+++ /dev/null
@@ -1,73 +0,0 @@
-#include "types.h"
-
-struct Position_0808bd24 {
- s32 x;
- s32 unknown_04;
- s32 y;
-};
-
-void RotateVectorByMagnitude(s32, u32, struct Position_0808bd24 *);
-s32 Func_080091a8(s32, s32, s32);
-s32 Func_0808d48c(s32, s32);
-
-extern u8 Data_02000240[];
-extern u8 *Data_03001ebc;
-
-s32 Func_0808ce74(void)
-{
- u32 runtimeSlotAddr = (u32)&Data_03001ebc;
- u8 *runtime = Data_03001ebc;
- u32 offset = *(u32 *)(Data_02000240 + 0x1f4) * 4 + 0x14;
- u8 *object = *(u8 **)(runtime + offset);
- u8 *map = *(u8 **)(runtimeSlotAddr - 76);
- struct Position_0808bd24 position;
- u8 *tile;
- s32 x, y;
- s32 result = 0;
-
- if (object != 0) {
- position.x = *(s32 *)(object + 8);
- position.unknown_04 = *(s32 *)(object + 12);
- position.y = *(s32 *)(object + 16);
- RotateVectorByMagnitude(0x100000, *(u16 *)(object + 6), &position);
-
- if (*(s16 *)(runtime + 0x19e) == 3) {
- x = position.x;
- if (x < 0)
- x += 0x1fffff;
- y = position.y;
- if (y < 0)
- y += 0x1fffff;
- tile = (u8 *)(0x02020000 +
- ((((x >> 21) & 31) + (((y >> 21) & 31) << 5)) << 2));
- } else {
- tile = *(u8 **)(map + 0x130);
- x = position.x;
- if (x < 0)
- x += 0xfffff;
- y = position.y;
- if (y < 0)
- y += 0xfffff;
- tile = tile + (((x >> 20) + ((y >> 20) << 7)) << 2);
- }
-
- {
- u8 tileValue = tile[2];
-
- if ((u32)(tileValue - 242) <= 5) {
- s32 r = Func_080091a8(*(u8 *)(object + 34), position.x, position.y);
- s32 base = *(s32 *)(object + 12);
-
- if (r >= base && r <= base + 0x400000) {
- result = tileValue;
- }
- } else {
- if (Func_0808d48c(tileValue, 3) != 0) {
- result = tileValue;
- }
- }
- }
- }
-
- return result;
-}
diff --git a/games/gs1/recon/en/main/080b9324.c b/games/gs1/recon/en/main/080b9324.c
deleted file mode 100644
index 5adf3c1aa..000000000
--- a/games/gs1/recon/en/main/080b9324.c
+++ /dev/null
@@ -1,91 +0,0 @@
-#include "types.h"
-
-s32 Func_080b6b40(s32 side, u16 *out_units);
-u32 Func_08004458(void);
-u8 *Func_08077008(s32 unit_id);
-void Func_080bd424(void *entry, s32 arg1);
-
-#define BattlePresentation_BuildOpponentEntries Func_080b9324
-
-struct BattlePresentationOpponentEntry {
- u16 unit_id;
- u16 unknown_02;
- u16 value;
- s16 width;
- s16 mode;
- s16 height;
- u8 unknown_0c[4];
-};
-
-s32 BattlePresentation_BuildOpponentEntries(
- struct BattlePresentationOpponentEntry *entries)
-{
- u8 *battle = *(u8 **)0x03001e74;
- u16 unit_ids[14];
- s32 entry_count = 0;
- s32 unit_count;
- s32 shuffle_index;
- s32 unit_index;
-
- if (battle[0x45] == 1) {
- return 0;
- }
-
- unit_count = Func_080b6b40(2, unit_ids);
- if (unit_count == 0) {
- return 0;
- }
-
- for (shuffle_index = 31; shuffle_index >= 0; shuffle_index--) {
- u32 first = (u32)(unit_count * Func_08004458()) >> 16;
- u32 second = (u32)(unit_count * Func_08004458()) >> 16;
- u16 swap = unit_ids[first];
- unit_ids[first] = unit_ids[second];
- unit_ids[second] = swap;
- }
-
- if (battle[0x45] == 2) {
- s32 limit = ((u32)(Func_08004458() * 5) >> 16) + 1;
-
- if (limit <= 1) {
- limit = 2;
- }
- if (limit < unit_count) {
- unit_count = limit;
- }
- }
-
- for (unit_index = 0; unit_index < unit_count; unit_index++) {
- u16 unit_id = unit_ids[unit_index];
- u8 *unit = Func_08077008(unit_id);
- s32 copy_index;
-
- for (copy_index = 0; copy_index < unit[0x43]; copy_index++) {
- struct BattlePresentationOpponentEntry *entry =
- &entries[entry_count];
- s16 value = *(u16 *)(unit + 0x40);
-
- entry->unit_id = unit_id;
- entry->value = value;
- if (copy_index != 0) {
- entry->value = value / 2;
- }
-
- if (unit[0x13c] != 0 || unit[0x13b] != 0) {
- entry->width = 8;
- entry->mode = 0;
- entry->height = 0x100;
- } else {
- Func_080bd424(entry, 0);
- }
-
- entry_count++;
-
- if (battle[0x45] == 2) {
- break;
- }
- }
- }
-
- return entry_count;
-}
diff --git a/games/gs1/recon/en/overlays/resource_371_c_02000c28.c b/games/gs1/recon/en/overlays/resource_371_c_02000c28.c
deleted file mode 100644
index 56b8f5c3f..000000000
--- a/games/gs1/recon/en/overlays/resource_371_c_02000c28.c
+++ /dev/null
@@ -1,251 +0,0 @@
-#include "types.h"
-
-#define RunEventScript01 Func_02000c28
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 123 calls, 0 loops, 0 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-void Func_02002586();
-void Func_02004dc8();
-void Func_02004dec();
-void Func_02004e2a();
-void Func_02004efe();
-void Func_02004f02();
-void Func_02004f10();
-void Func_02004f2a();
-void Func_02004f7e();
-void Func_02004f88();
-void Func_02004fb0();
-void Func_02004fca();
-void Func_02004fcc();
-void Func_02004fd0();
-void Func_02004fd8();
-void Func_02004fda();
-void Func_02004fe4();
-void Func_02004fe6();
-void Func_02004fee();
-void Func_02004ffc();
-void Func_02005004();
-void Func_0200500a();
-void Func_02005012();
-void Func_02005020();
-s32 Func_02005022();
-void Func_0200503e();
-void Func_02005042();
-void Func_02005056();
-void Func_02005058();
-void Func_02005084();
-void Func_0200508a();
-void Func_02005090();
-void Func_02005098();
-void Func_020050ac();
-void Func_020050be();
-void Func_020050ca();
-void Func_020050cc();
-void Func_020050d4();
-void Func_020050da();
-void Func_020050f8();
-void Func_02005106();
-void Func_02005110();
-void Func_02005114();
-void Func_0200511c();
-void Func_02005128();
-void Func_02005136();
-void Func_02005140();
-void Func_02005144();
-void Func_0200514a();
-void Func_0200515e();
-void Func_0200516a();
-void Func_02005176();
-void Func_02005182();
-void Func_0200518c();
-void Func_0200518e();
-void Func_0200519a();
-void Func_0200519c();
-void Func_020051a2();
-void Func_020051aa();
-void Func_020051ac();
-void Func_020051b2();
-void Func_020051ba();
-void Func_020051c4();
-void Func_020051d6();
-void Func_020051dc();
-void Func_020051e0();
-void Func_020051e2();
-void Func_020051ec();
-void Func_020051f8();
-void Func_0200520a();
-void Func_02005210();
-void Func_02005230();
-void Func_02005244();
-void Func_02005246();
-void Func_0200525a();
-void Func_0200525c();
-void Func_02005266();
-void Func_0200526c();
-void Func_02005274();
-void Func_02005280();
-void Func_0200529a();
-void Func_020052a2();
-void Func_020052a6();
-void Func_020052ae();
-void Func_020052b0();
-void Func_020052ba();
-void Func_020052d0();
-void Func_02005304();
-void Func_02005318();
-void Func_0200531c();
-void Func_02005324();
-void Func_02005336();
-void Func_02005340();
-void Func_02005346();
-void Func_0200534c();
-void Func_02005356();
-void Func_02005366();
-void Func_0200536e();
-void Func_0200537c();
-void Func_02005380();
-void Func_02005382();
-void Func_02005396();
-void Func_020053a4();
-void Func_020053b0();
-void Func_020053c4();
-void Func_020053d2();
-void Func_02005410();
-void Func_02005412();
-void Func_02005418();
-void Func_0200541c();
-void Func_02005422();
-void Func_02005478();
-void Func_020054be();
-void Func_020054d4();
-
-void RunEventScript01(void)
-{
- Func_02004f2a(15);
- Func_02004f10();
- Func_020050ca(81920, 1);
- Func_02004dc8(4);
- Func_02005084();
- Func_02005098();
- Func_020050ac();
- Func_02005056(-1, -1, -1, 0);
- Func_02004dec(1);
- Func_02004f7e(0);
- Func_02004f88(1);
- Func_02004fcc(0);
- Func_02005058(0, 24576, 0);
- Func_02004ffc(8);
- Func_02004e2a(1);
- Func_02005042(8, 15);
- Func_02004fb0(8);
- Func_02004efe();
- Func_02004fd0(10);
- Func_02004fda(11);
- Func_02004fe4(12);
- Func_02004fee(13);
- Func_0200518c(141);
- Func_02005004(10);
- Func_02004fca(20);
- Func_02005012(11);
- Func_02004fd8(20);
- Func_02005020(12);
- Func_02004fe6(20);
- Func_0200503e(13);
- Func_020051c4();
- if (Func_02005022(0) != 0) {
- Func_02005090(1);
- }
- Func_02005084(1);
- Func_02005110(0, 8192, 0);
- Func_0200511c(1, 40960, 20);
- Func_02005136(0);
- Func_02005140(1);
- Func_020050d4(8);
- Func_02004f02(1);
- Func_02005128();
- Func_0200514a(8, 0, 10);
- Func_0200515e(0, 24576, 0);
- Func_0200516a(1, 24576, 40);
- Func_02005176(0, 8192, 0);
- Func_02005182(1, 40960, 60);
- Func_0200518e(0, 24576, 0);
- Func_0200519a(1, 24576, 10);
- Func_02005280(141);
- Func_020050f8(10);
- Func_020050be(20);
- Func_02005106(11);
- Func_020050cc(20);
- Func_02005114(12);
- Func_020050da(10);
- Func_020051d6(0, 16384, 0);
- Func_020051e2(1, 16384, 10);
- Func_0200514a(13);
- Func_020052d0();
- Func_02005106(20);
- Func_0200529a();
- Func_020051a2(10, 1);
- Func_020051aa(11, 1);
- Func_020051b2(12, 1);
- Func_020051ba(13, 1);
- Func_0200525a();
- Func_02005266();
- Func_02005144(20);
- Func_020052d0();
- Func_020051dc(9);
- Func_0200500a(1);
- Func_0200519c(9);
- Func_020051e0(9);
- Func_020051ec(9);
- Func_020051f8(9);
- Func_0200518e(20);
- Func_02005246(9, 2);
- Func_0200519c(20);
- Func_020052ae(9, 258);
- Func_020051ac(60);
- Func_020052a6(9, 0, 20);
- Func_02005266(9, 3);
- Func_020052b0(9, 0, 20);
- Func_0200525c(8);
- Func_0200508a(1);
- Func_020052a2(8, 0);
- Func_02005210(8);
- Func_0200515e();
- Func_02005230(8);
- Func_02005274(8);
- Func_0200520a(20);
- Func_020052ba(8, 2);
- Func_02005304();
- Func_02005318(8, 12288, 60);
- Func_02005324(8, 32768, 10);
- Func_02005346(8, 258);
- Func_02005244(60);
- Func_02005340(9, 12288, 0);
- Func_0200534c(8, 12288, 40);
- Func_0200536e(8, 258);
- Func_0200526c(60);
- Func_0200531c(8, 2);
- Func_02005366();
- Func_02005336(9, 1);
- Func_02005380(9, 0, 10);
- Func_02005382(9, 0, 10);
- Func_020053a4(8);
- Func_02005396();
- Func_02005366(8, 1);
- Func_02005356(8, 3);
- Func_020053b0();
- Func_020053d2(9);
- Func_020053c4(9, 0, 20);
- Func_0200537c(8, 3);
- Func_02005478();
- Func_020054be(107);
- Func_02005412(262144, 262144);
- Func_02002586();
- Func_020054d4();
- Func_02005410(8, 256, 0);
- Func_0200541c(9, 256, 0);
- Func_02005418(8, 32768, 0);
- Func_02005422(9, 0, 40);
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_372_c_02002dec.c b/games/gs1/recon/en/overlays/resource_372_c_02002dec.c
deleted file mode 100644
index 49a2efd8d..000000000
--- a/games/gs1/recon/en/overlays/resource_372_c_02002dec.c
+++ /dev/null
@@ -1,193 +0,0 @@
-#include "types.h"
-
-#define RunEventScript02 Func_02002dec
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript02: 84 calls, 0 loops, 14 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-void Func_02006304();
-s32 Func_020074d0();
-s32 Func_020074dc();
-void Func_02007506();
-void Func_02007554();
-void Func_02007562();
-void Func_02007570();
-s32 Func_0200757e();
-s32 Func_020075a8();
-void *Func_020075c8();
-void Func_020075e6();
-void *Func_020075ea();
-void Func_020075ec();
-void *Func_02007610();
-void Func_02007616();
-s32 Func_0200762c();
-void Func_02007638();
-void Func_02007672();
-void Func_0200768e();
-void Func_02007694();
-void Func_0200769a();
-void Func_0200769c();
-void Func_020076b2();
-void Func_020076b4();
-void Func_020076c8();
-void Func_020076d4();
-void Func_020076d8();
-void Func_020076e0();
-void Func_02007706();
-void Func_02007720();
-void Func_02007728();
-void Func_02007740();
-void Func_0200774a();
-void Func_0200774e();
-void Func_02007750();
-void Func_02007766();
-void Func_0200777a();
-void Func_0200778c();
-void Func_0200778e();
-void Func_020077a6();
-void Func_020077b8();
-void Func_020077bc();
-void Func_020077be();
-void Func_020077c4();
-void Func_020077ce();
-void Func_020077d0();
-void Func_020077d8();
-void Func_020077e4();
-void Func_020077f0();
-void Func_02007802();
-void Func_02007806();
-void Func_0200780a();
-void Func_0200781a();
-void Func_0200781c();
-void Func_02007820();
-void Func_02007822();
-void Func_0200782a();
-void Func_02007834();
-void Func_02007842();
-void Func_02007844();
-void Func_02007854();
-void Func_02007856();
-void Func_02007866();
-void Func_0200786c();
-void *Func_02007876();
-void Func_02007886();
-void Func_02007890();
-void Func_0200789a();
-void Func_020078a2();
-void Func_020078a6();
-void Func_020078ac();
-void Func_020078ae();
-void Func_020078b6();
-void Func_020078b8();
-void Func_020078c0();
-void Func_020078c8();
-void Func_020078d8();
-void Func_02007908();
-
-void RunEventScript02(void)
-{
- void *p19;
- void *p20;
- void *p8;
- void *p81;
-
- if (Func_020074d0(2112) == 0) {
- } else {
- if (Func_020074dc() != 0) {
- } else {
- Func_02007506();
- Func_02007554(0, 65536, 32768);
- Func_02007562(22, 65536, 32768);
- Func_02007570(26, 65536, 32768);
- Func_0200757e(8, 65536, 32768);
- p8 = Func_020075c8(0, 217);
- if (Func_0200757e(0) != 0) {
- Func_020075ec(22);
- }
- Func_020075e6(22, 235);
- Func_02007672(22, 45056, 0);
- if (Func_020075a8(0) != 0) {
- Func_02007616(26);
- }
- Func_02007610(26, 199);
- Func_0200769c(26, 53248, 0);
- Func_02007638(25, 16187392);
- Func_020076b4(25, 24576, 0);
- p19 = Func_020075ea(8);
- *(u8 *)((u8 *)(p19) + 35) &= 0xfe;
- *(u8 *)((*(void **)(p19 + 80)) + 9) &= 0xfffffffffffffff3;
- p20 = Func_02007610(0);
- *(u8 *)((u8 *)(p20) + 35) &= 0xfe;
- *(u8 *)((*(void **)(p20 + 80)) + 9) &= 0xfffffffffffffff3;
- if (Func_0200762c(0) != 0) {
- Func_0200769a(8);
- }
- Func_02007694(8, 221);
- Func_02007720(8, 45056, 60);
- Func_020076e0(26, 2);
- Func_02007706();
- Func_02007728(26, 0, 40);
- Func_020076d4(9, 6619136);
- Func_02007750(9, 8192, 0);
- Func_0200774a();
- Func_02007766(26, 40960, 0);
- Func_0200778e();
- Func_020077a6(6619136, -1);
- Func_020076c8(9);
- Func_020076d8(9);
- Func_0200768e(60);
- Func_020077be();
- Func_020077d8(12255232, -1, 87031808, 1);
- Func_020077e4();
- Func_020076b2(40);
- Func_0200777a(26, 2);
- Func_020077bc(26, 0, 20);
- Func_0200778c(9, 2);
- Func_020077ce();
- Func_0200780a(131072, 16384);
- Func_02007822(14483456, -1);
- Func_020077c4(0, 8, 0);
- Func_020077ce(22, 8, 0);
- Func_0200781a(26, 12288, 80);
- Func_02007854(11927552, -1, 89128960, 1);
- Func_020077b8(8, 182, 1384);
- Func_02007802(8, 9, 0);
- Func_02007740(30);
- Func_020077f0(8, 3);
- Func_0200774e(10);
- Func_02007820(0, 9, 0);
- Func_0200782a(22, 9, 0);
- Func_02007834(26, 9, 0);
- Func_0200781c(9, 3);
- Func_0200786c(9, 0);
- Func_02007844(26, 2);
- Func_02007886(26, 0, 10);
- Func_020078a2(9, 57344, 40);
- Func_020078ae(9, 12288, 20);
- Func_02007856(9, 3);
- Func_020078a6(9, 0);
- Func_02007890(26, 8, 0);
- Func_0200789a(22, 0, 0);
- Func_020077d0(40);
- Func_020078a2(0, 9, 0);
- Func_020078ac(22, 9, 0);
- Func_020078b6(26, 9, 0);
- Func_020078c0(8, 9, 0);
- Func_020078c0(9, 2);
- Func_02007806(20);
- Func_02007908(9, 0, 10);
- Func_020078b8(0, 3);
- Func_020078c0(26, 3);
- Func_020078c8(22, 3);
- Func_020078d8(8, 3);
- *(u8 *)((u8 *)(p20) + 35) |= 0x1;
- p81 = Func_02007876(8);
- *(u8 *)((u8 *)(p81) + 35) |= 0x1;
- Func_02006304();
- Func_02007842();
- Func_02007866();
- }
- }
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_375_c_020000dc.c b/games/gs1/recon/en/overlays/resource_375_c_020000dc.c
deleted file mode 100644
index 0586d46c6..000000000
--- a/games/gs1/recon/en/overlays/resource_375_c_020000dc.c
+++ /dev/null
@@ -1,349 +0,0 @@
-#include "types.h"
-
-#define RunEventScript01 Func_020000dc
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 167 calls, 0 loops, 2 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-s32 Func_02001b4a();
-void Func_02001b64();
-void Func_02001b96();
-s32 Func_02001bbe();
-s32 Func_02001bda();
-void Func_02001be8();
-void Func_02001c04();
-void Func_02001c1c();
-void Func_02001c20();
-void Func_02001c2e();
-void Func_02001c32();
-void Func_02001c34();
-void Func_02001c48();
-void Func_02001c56();
-void Func_02001c60();
-void Func_02001c68();
-void Func_02001c6e();
-void Func_02001c7c();
-void Func_02001c88();
-void Func_02001c9c();
-void Func_02001ca4();
-void Func_02001ca8();
-void Func_02001cac();
-void Func_02001cb2();
-void Func_02001cc0();
-void Func_02001ccc();
-void Func_02001cce();
-void Func_02001cd6();
-void Func_02001ce6();
-void Func_02001cfa();
-void Func_02001cfe();
-void Func_02001d10();
-void Func_02001d1a();
-void Func_02001d22();
-void Func_02001d2a();
-void Func_02001d58();
-void Func_02001d88();
-void Func_02001da4();
-void Func_02001db0();
-void Func_02001db8();
-void Func_02001dbe();
-void Func_02001dca();
-void Func_02001ddc();
-void Func_02001de2();
-void Func_02001df8();
-void Func_02001dfa();
-void Func_02001e1e();
-void Func_02001e20();
-void Func_02001e36();
-void Func_02001e3c();
-void Func_02001e52();
-void Func_02001e5a();
-void Func_02001e60();
-void Func_02001e66();
-void Func_02001e7c();
-void Func_02001e86();
-s32 Func_02001e8a();
-void Func_02001e90();
-void Func_02001e94();
-void Func_02001e9a();
-void Func_02001ea0();
-void Func_02001ea2();
-void Func_02001ea8();
-void Func_02001ec0();
-void Func_02001ec6();
-void Func_02001eda();
-void Func_02001ee6();
-void Func_02001efa();
-void Func_02001efe();
-void Func_02001f0a();
-void Func_02001f16();
-void Func_02001f1a();
-void Func_02001f22();
-void Func_02001f2c();
-void Func_02001f2e();
-void Func_02001f3a();
-void Func_02001f44();
-void Func_02001f50();
-void Func_02001f68();
-void Func_02001f6a();
-void Func_02001f7a();
-void Func_02001f98();
-void Func_02001f9e();
-void Func_02001fa4();
-void Func_02001fa6();
-void Func_02001fa8();
-void Func_02001fb2();
-void Func_02001fb4();
-void Func_02001fb6();
-void Func_02001fbc();
-void Func_02001fbe();
-void Func_02001fc0();
-void Func_02001fc4();
-void Func_02001fc6();
-void Func_02001fcc();
-void Func_02001fd4();
-void Func_02002020();
-void Func_02002022();
-void Func_02002040();
-void Func_02002046();
-void Func_0200204c();
-void Func_02002058();
-void Func_0200206a();
-void Func_02002072();
-void Func_02002076();
-void Func_02002084();
-void Func_0200208e();
-void Func_02002092();
-void Func_0200209a();
-void Func_020020a6();
-void Func_020020b4();
-void Func_020020b8();
-void Func_020020be();
-void Func_020020c8();
-void Func_020020ce();
-void Func_020020d4();
-void Func_020020ea();
-void Func_020020f2();
-void Func_020020f6();
-s32 Func_0200211c();
-void Func_0200212c();
-void Func_0200212e();
-void Func_02002130();
-void Func_02002132();
-void Func_02002138();
-void Func_0200214e();
-void Func_02002160();
-s32 Func_02002162();
-void Func_0200216c();
-void Func_0200217e();
-void Func_02002184();
-void Func_0200218e();
-void Func_0200219a();
-void Func_020021a6();
-void Func_020021ae();
-void Func_020021b4();
-void Func_020021b8();
-void Func_020021be();
-void Func_020021c2();
-void Func_020021c6();
-void Func_020021ca();
-void Func_020021cc();
-void Func_020021d8();
-void Func_020021e8();
-void Func_020021fa();
-void Func_02002204();
-void Func_0200220a();
-void Func_0200220c();
-void Func_02002210();
-void Func_0200221c();
-void Func_02002224();
-void Func_0200222e();
-void Func_02002240();
-void Func_02002250();
-void Func_02002276();
-
-void RunEventScript01(void)
-{
- s32 base;
-
- Func_02001b64();
- if (Func_02001b4a(2069) != 0) {
- Func_02001c1c(4548);
- Func_02001c34(12, 0);
- } else {
- base = 3958;
- Func_02001c2e(base);
- Func_02001c20(12, 0, 10);
- Func_02001c20(12, 2);
- Func_02001b96(6);
- Func_02001c56(12, 0);
- if (Func_02001bbe(0, 0) == 0) {
- Func_02001c60(base + 1);
- } else {
- Func_02001c68(base + 2);
- }
- Func_02001c48(12, 3);
- Func_02001c88(12, 0);
- Func_02001cac(12, 49152, 10);
- }
- Func_02001be8();
- if (Func_02001bda(2049) != 0) {
- } else {
- Func_02001c04();
- Func_02001c32(0, 65536, 32768);
- Func_02001cc0(4006);
- Func_02001ca8(13, 1);
- Func_02001c7c(0, 232, 264);
- Func_02001c9c(0, 0);
- Func_02001cd6(0, 13, 20);
- Func_02001cce(13, 2);
- Func_02001d10(13, 0, 10);
- Func_02001c6e(0);
- Func_02001ccc(5);
- Func_02001cd6(1);
- Func_02001ca4(5, 32768, 16384);
- Func_02001cb2(1, 32768, 16384);
- Func_02001ce6(5, 248, 264);
- Func_02001cfa(1, 216, 264);
- Func_02001d1a(0, 1);
- Func_02001d22(5, 1);
- Func_02001d2a(1, 1);
- Func_02001cc0(4);
- Func_02001da4(5, 45056, 0);
- Func_02001db0(1, 53248, 20);
- Func_02001d58(5, 4);
- Func_02001ce6(10);
- Func_02001db8(5, 0, 20);
- Func_02001d88(13, 1);
- Func_02001cfe(10);
- Func_02001de2(13, 12288, 10);
- Func_02001ddc(13, 0, 10);
- Func_02001df8(1, 12288, 40);
- Func_02001db8(1, 2);
- Func_02001dfa(1, 0, 10);
- Func_02001dca(13, 2);
- Func_02001e1e(13, 20480, 10);
- Func_02001dbe(13, 3);
- Func_02001e20(13, 0, 8);
- Func_02001e3c(5, 12288, 20);
- Func_02001e36(5, 0, 10);
- Func_02001e52(13, 12288, 10);
- Func_02001dfa(13, 3);
- Func_02001d88(10);
- Func_02001e5a(13, 0, 6);
- Func_02001e7c(0, 257, 0);
- Func_02001e86(1, 257, 0);
- Func_02001e90(5, 257, 60);
- Func_02001e94(1, 53248, 0);
- Func_02001ea0(5, 45056, 20);
- Func_02001e60(5, 2);
- Func_02001ea2(5, 0, 10);
- Func_02001ec6(13, 258, 60);
- Func_02001e66(13, 4);
- Func_02001ec0(13, 0, 10);
- Func_02001eda(1, 0, 0);
- Func_02001ee6(5, 32768, 20);
- Func_02001efa(0, 256, 60);
- Func_02001efe(1, 53248, 0);
- Func_02001f0a(5, 45056, 0);
- Func_02001f16(13, 20480, 20);
- Func_02001f22(13, 12288, 40);
- Func_02001f2e(13, 20480, 40);
- Func_02001f3a(13, 12288, 20);
- Func_02001f22(13, 0);
- if (Func_02001e8a(0, 0) == 0) {
- Func_02001f2c(4016);
- }
- Func_02001f44();
- Func_02001e9a(20);
- Func_02001f1a(13, 3);
- Func_02001ea8(10);
- Func_02001f7a(13, 0, 10);
- Func_02001f68();
- Func_02001f50(5, 2);
- Func_02001fa4(5, 32768, 10);
- Func_02001f9e(5, 0, 6);
- Func_02001fc0(1);
- Func_02001f6a(1, 4, 30);
- Func_02001fcc(1, 0, 10);
- Func_02001fc6(1, 0, 6);
- Func_02001fa8(0, 1, 10);
- Func_02001fb2(0, 5, 0);
- Func_02001fb4(13, 1, 10);
- Func_02001fbe(13, 5, 10);
- Func_02001f9e(0, 3);
- Func_02001fa6(1, 3);
- Func_02001fb6(5, 3);
- Func_02001f44(10);
- Func_02001fbc(5, 1);
- Func_02001fc4(1, 1);
- Func_02001fcc(0, 0);
- Func_02002040(0, 16384, 0);
- Func_0200204c(1, 16384, 0);
- Func_02002058(5, 16384, 16);
- Func_02002072(13, 258);
- Func_02002022(13, 3);
- Func_02001f98(10);
- Func_0200206a(13, 0, 6);
- Func_0200208e(0, 256, 0);
- Func_0200209a(1, 256, 0);
- Func_020020a6(5, 256, 40);
- Func_02002046(13, 4);
- Func_02001fd4(10);
- Func_020020a6(13, 0, 6);
- Func_02002076(13, 1);
- Func_020020b8(13, 0, 6);
- Func_020020d4(5, 45056, 10);
- Func_020020ce(5, 0, 6);
- Func_020020ea(13, 12288, 10);
- Func_02002092(13, 3);
- Func_02002020(6);
- Func_020020f2(13, 0, 10);
- Func_020020b4(0, 2, 0);
- Func_020020be(1, 2, 0);
- Func_020020c8(5, 2, 10);
- Func_0200212c(0, 49152, 0);
- Func_02002138(1, 53248, 20);
- Func_02002132(1, 0, 6);
- Func_0200214e(13, 20480, 10);
- Func_020020f6(13, 3);
- Func_02002084(16);
- Func_0200212e(0, 5, 40);
- Func_02002160(5, 0, 10);
- Func_02002130(13, 2);
- Func_02002184(13, 12288, 10);
- Func_0200217e(13, 0, 6);
- Func_0200219a(0, 49152, 0);
- Func_020021a6(5, 45056, 30);
- Func_020021b8(0);
- Func_020021c2(1);
- Func_020021cc(5);
- Func_0200216c(13, 4);
- Func_020021b4(13, 0);
- if (Func_0200211c(0, 0) == 0) {
- Func_020021be();
- } else {
- Func_020021c6();
- }
- Func_020021e8(13, 0, 20);
- Func_020021d8();
- Func_0200220a(1, 0, 10);
- Func_020021ca(1, 2);
- Func_020021fa(1, 0);
- if (Func_02002162(0, 0) == 0) {
- Func_02002204();
- } else {
- Func_0200220c();
- }
- Func_0200222e(1, 0, 6);
- Func_0200221c();
- Func_02002250(5, 32768, 10);
- Func_02002210(5, 1);
- Func_02002240(5, 0);
- Func_0200218e(4);
- Func_020021ae(0, 0);
- Func_02002224(5, 2, 20);
- Func_02002276(5, 0, 10);
- }
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_375_c_0200150c.c b/games/gs1/recon/en/overlays/resource_375_c_0200150c.c
deleted file mode 100644
index 57adb3e39..000000000
--- a/games/gs1/recon/en/overlays/resource_375_c_0200150c.c
+++ /dev/null
@@ -1,119 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_ConfigureProgressDependentActors:
- * 46 calls, progress-gated actor setup, and three actor-state writes across
- * the complete callable owner. */
-
-#define FieldScene_ConfigureProgressDependentActors Func_0200150c
-
-void Func_02001ffa();
-s32 Func_02002f98();
-void *Func_02002fa2();
-s32 Func_02002fa8();
-void Func_02002fb2();
-void Func_02002fda();
-void *Func_0200302a();
-s32 Func_02003032();
-void Func_02003044();
-void Func_0200304e();
-void Func_02003050();
-void *Func_02003058();
-void Func_02003062();
-void Func_0200306c();
-void Func_02003074();
-void Func_02003078();
-void Func_02003082();
-void Func_02003088();
-void Func_0200308a();
-void Func_0200309e();
-void Func_020030a2();
-void Func_020030ae();
-void Func_020030c0();
-s32 Func_020030ea();
-void Func_020030f6();
-s32 Func_02003100();
-void Func_02003104();
-s32 Func_0200312a();
-void Func_02003142();
-void Func_0200314c();
-void Func_02003156();
-void Func_02003160();
-s32 Func_0200316a();
-void Func_0200318e();
-void Func_02003198();
-void Func_020031a2();
-void Func_020031a8();
-void Func_020031bc();
-void Func_020031ca();
-void Func_020031fc();
-void Func_02003218();
-void Func_02003224();
-
-extern s16 Data_02000240[];
-
-void Func_0200150c(void)
-{
- void *p13;
- void *p17;
- s16 *progress = &Data_02000240[225];
-
- if ((u16)(*progress - 5) <= 1) {
- Func_02002fa2(0x12f);
- }
- if (Func_02002f98(0x109) != 0) {
- Func_02002fa8(0x242);
- }
- if (Func_02002fa8(0x834) == 0) {
- } else {
- Func_020030ea();
- Func_020030f6();
- Func_02002fda();
- Func_02003044(12, 0, 0);
- Func_0200304e(13, 0, 0);
- Func_02003058(14, 0, 0);
- Func_02003062(15, 0, 0);
- Func_0200306c(5, 0, 0);
- p13 = Func_0200302a(8);
- *(u8 *)((u8 *)(p13) + 89) |= 0x8;
- Func_02003088(11, 5439488, 0x01090000);
- Func_02003082(11, 83, 273);
- Func_020030a2(11, 5);
- p17 = Func_02003058(11);
- *(u16 *)(p17 + 32) = 12;
- Func_02003074(11, 0x02009c34);
- if (Func_02003032(0x839) != 0) {
- Func_020030c0(11, 0, 0);
- }
- Func_0200306c();
- Func_02003050(9, 24, 1, 1, 14, 21);
- Func_02003062(9, 24, 1, 1, 15, 21);
- Func_02003078(9, 24, 1, 1, 23, 19);
- Func_0200308a(9, 24, 1, 1, 24, 19);
- Func_0200309e(9, 24, 1, 1, 23, 20);
- Func_020030ae(9, 24, 1, 1, 24, 20);
- }
- Func_02003142(9, 0, 0);
- Func_0200314c(10, 0, 0);
- Func_02003156(1, 0, 0);
- Func_02003160(11, 0, 0);
- Func_02003104();
- if (Func_020030ea(0x109) == 0 && *progress == 10) {
- Func_02001ffa();
- }
- if (Func_02003100(0x801) != 0) {
- Func_0200318e(13, 0, 0);
- Func_02003198(14, 0, 0);
- Func_020031a2(15, 0, 0);
- } else {
- if (Func_0200312a(0x808) != 0) {
- Func_020031bc(14, 25690112, 24641536);
- Func_020031ca(15, 24641536, 24641536);
- Func_02003218(14, 65536);
- Func_02003224(15, 65536);
- }
- }
- if (Func_0200316a(0x87a) != 0) {
- Func_020031fc(16, 8650752, 17301504);
- }
- Func_020031a8();
-}
diff --git a/games/gs1/recon/en/overlays/resource_375_c_02001760.c b/games/gs1/recon/en/overlays/resource_375_c_02001760.c
deleted file mode 100644
index f05617342..000000000
--- a/games/gs1/recon/en/overlays/resource_375_c_02001760.c
+++ /dev/null
@@ -1,138 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunProgressDependentActorSequence:
- * 60 calls, nested resource predicates, and terminal actor-coordinate
- * forwarding across the complete callable owner. */
-
-#define FieldScene_RunProgressDependentActorSequence Func_02001760
-
-s32 Func_020031ca();
-s32 Func_020031d6();
-void Func_020031fe();
-void Func_0200321e();
-void Func_02003220();
-void Func_02003254();
-s32 Func_0200328e();
-void Func_020032a0();
-void Func_020032b4();
-void Func_020032c2();
-void Func_020032c6();
-s32 Func_020032c8();
-void Func_020032cc();
-void Func_020032dc();
-void Func_020032de();
-void Func_020032e4();
-void Func_020032e6();
-void Func_020032fe();
-void Func_02003322();
-void Func_0200332a();
-void Func_0200333c();
-void Func_02003340();
-void Func_0200334c();
-void Func_02003352();
-void Func_02003360();
-void Func_0200336a();
-void Func_02003370();
-void Func_02003378();
-void Func_0200338a();
-void Func_02003390();
-void Func_02003392();
-void Func_02003398();
-void Func_0200339c();
-void Func_020033a2();
-void Func_020033a6();
-void Func_020033b2();
-void Func_020033b4();
-void Func_020033b8();
-void Func_020033bc();
-void Func_020033be();
-void Func_020033ce();
-void *Func_020033e0();
-void Func_020033f6();
-void Func_02003404();
-void Func_0200340a();
-void Func_02003414();
-void Func_02003416();
-void Func_0200341a();
-void Func_0200342a();
-void Func_02003438();
-void Func_0200344a();
-void Func_02003464();
-void Func_02003470();
-void Func_02003482();
-void Func_0200348c();
-
-void Func_02001760(void)
-{
- void *actor;
-
- if (Func_020031ca(0x839) != 0) {
- } else {
- if (Func_020031d6(0x82f) != 0) {
- Func_020031fe();
- Func_0200328e(11, 2);
- Func_020032b4(0xe8b);
- Func_020032cc(11, 0);
- Func_02003220();
- } else {
- Func_0200321e();
- Func_02003254(11);
- Func_020032b4(11, 1);
- Func_020032dc(0xe85);
- Func_020032fe(11, 0, 20);
- Func_02003322(0, 256, 30);
- Func_02003352(6422528, -1, 0x011b0000, 1);
- Func_020032b4(0, 94, 0x125);
- Func_02003340(0, 40960, 0);
- if (Func_0200328e(0) != 0) {
- Func_020032e4(1);
- }
- Func_020032de(1, 110, 0x117);
- Func_0200336a(1, 40960, 40);
- Func_0200332a(11, 2);
- Func_020032a0(40);
- Func_02003360(11, 0);
- if (Func_020032c8(0, 0) == 0) {
- Func_0200334c(11, 2);
- Func_020032c2(20);
- Func_02003378(0xe87);
- Func_02003390(11, 0);
- Func_020032c6(0x82f);
- } else {
- Func_02003370(11, 2);
- Func_020032e6(20);
- Func_0200339c(0xe88);
- Func_020033be(11, 0, 40);
- Func_02003398(11, 0, 0);
- Func_02003378(11, 1);
- Func_02003392(11, 4, 40);
- Func_0200338a(11, 6);
- Func_02003404(11, 0x101, 40);
- Func_020033f6(11, 0, 10);
- Func_020033a6(11, 1);
- Func_0200333c(10);
- Func_020033bc(11, 3);
- Func_02003416(11, 0, 10);
- Func_020033ce(11, 3);
- Func_0200340a(0, 0x0001000b, 0x02009ce0);
- Func_02003414(1, 0x0001000b, 0x02009ce0);
- Func_020033b4(11, 0x02009bdc);
- Func_020033b2(0);
- Func_020033b8(1);
- Func_02003464(0, 16384, 0);
- Func_02003470(1, 16384, 60);
- Func_02003482(0, 0x105, 0);
- Func_0200348c(1, 0x105, 120);
- Func_020033a2(0x839);
- }
- Func_0200342a(1, 2);
- actor = Func_020033e0(0);
- if (actor != 0) {
- Func_0200341a(1, *(s32 *)(actor + 8), *(s32 *)(actor + 16));
- }
- Func_02003438(1);
- Func_0200344a(1, 0, 0);
- Func_020033f6();
- }
- }
-}
diff --git a/games/gs1/recon/en/overlays/resource_380_c_020006f4.c b/games/gs1/recon/en/overlays/resource_380_c_020006f4.c
deleted file mode 100644
index e3d51740d..000000000
--- a/games/gs1/recon/en/overlays/resource_380_c_020006f4.c
+++ /dev/null
@@ -1,183 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunMultiStageEffectPresentation:
- * all 84 calls and the six-pass opening effect loop across the complete
- * callable owner. */
-
-#define FieldScene_RunMultiStageEffectPresentation Func_020006f4
-
-void Func_02004bc6();
-void Func_02004c2c();
-void Func_02005056();
-void Func_0200506c();
-void Func_0200507c();
-void Func_0200509c();
-void Func_020050a0();
-void Func_020050aa();
-void Func_020050b4();
-void Func_020050c4();
-void Func_020050ca();
-void Func_020050d2();
-void Func_020050fa();
-void Func_02005102();
-void Func_02005112();
-void Func_02005124();
-void Func_02005134();
-void Func_02005138();
-void Func_0200513e();
-void Func_02005162();
-void Func_0200516e();
-void Func_02005180();
-void Func_02005186();
-void Func_02005198();
-void Func_020051a8();
-void Func_020051b2();
-void Func_020051cc();
-void Func_020051e0();
-void Func_020051ec();
-void Func_020051f6();
-void Func_0200520c();
-void Func_0200521a();
-void Func_0200521c();
-void Func_0200521e();
-void Func_02005220();
-void Func_02005226();
-void Func_02005236();
-void Func_02005238();
-void Func_0200523c();
-void Func_02005242();
-void Func_02005248();
-void Func_02005260();
-void Func_0200526a();
-void Func_0200528a();
-void Func_0200529a();
-void Func_0200529c();
-void Func_020052b0();
-void Func_020052bc();
-void Func_020052be();
-void Func_020052ce();
-void Func_020052d4();
-void Func_020052e8();
-void Func_02005302();
-void Func_0200530e();
-void Func_02005324();
-void Func_02005330();
-void Func_02005338();
-void Func_0200535e();
-void Func_02005380();
-void Func_020053a0();
-void Func_020053ac();
-void Func_020053bc();
-void Func_020053ca();
-void Func_020053d6();
-void Func_020053f2();
-void Func_020053f6();
-void Func_02005408();
-void Func_0200540a();
-void Func_02005414();
-void Func_02005430();
-void Func_02005436();
-void Func_0200545e();
-void Func_02005488();
-void Func_02005494();
-void Func_020054a4();
-void Func_020054a8();
-void Func_020054b8();
-void Func_020054d4();
-void Func_020054e0();
-void Func_020054ee();
-void Func_02005502();
-
-void Func_020006f4(void)
-{
- s32 base;
- s32 i1;
-
- Func_020050a0();
- Func_0200521e(141);
- for (i1 = 0; i1 != 6; i1++) {
- Func_020051e0(4213326, 1);
- Func_020051f6(8);
- Func_020050b4(8);
- Func_020051f6(65536, 1);
- Func_0200520c(8);
- Func_020050ca(8);
- Func_02005056(65536, 65536, 65536);
- }
- Func_0200506c(65536, 131072, 65536);
- Func_020050fa(30);
- Func_0200507c(0, 0, 0);
- Func_0200521c(367001, 45875);
- Func_02005236(30932992, -1, 6422528, 1);
- Func_02005242();
- Func_020050aa(65536, 131072, 65536);
- Func_02005138(20);
- Func_020052be(144);
- Func_0200509c(33607816, 84, 4);
- Func_020050c4(0, 0, 1, 1, 29, 4);
- Func_020050d2(87, 42, 29, 6, 1, 2);
- Func_02005180(40);
- Func_02005102(0, 0, 0);
- Func_020052b0(22478848, -1, 24182784, 1);
- Func_020052bc();
- Func_02005124(65536, 131072, 65536);
- Func_020051b2(20);
- Func_02005338(144);
- Func_02005112(33607816, 76, 21);
- Func_02005134(0, 0, 1, 1, 21, 21);
- Func_0200513e(87, 42, 21, 23, 1, 2);
- Func_020051ec(40);
- Func_0200516e(0, 0, 0);
- Func_0200530e(209715, 26214);
- Func_02005324(22478848, -1, 32571392, 1);
- Func_02005330();
- Func_02005198(65536, 131072, 65536);
- Func_02005226(20);
- Func_020053ac(144);
- Func_02005186(33607816, 76, 29);
- Func_020051a8(0, 0, 1, 1, 21, 29);
- Func_020051b2(87, 42, 21, 31, 1, 2);
- Func_02005260(40);
- Func_020053ca();
- Func_020053d6();
- Func_020053a0(46661632, -1, 9961472, 0);
- Func_020051cc();
- Func_02005162(1);
- Func_0200521a(131072, 65536, 65536);
- Func_020053f6();
- Func_0200540a();
- Func_020052b0(40);
- Func_02005436(289);
- Func_0200523c(-1, -1, 58982);
- Func_02005248();
- Func_020052ce(20);
- Func_02005238(0, 40, 43, 46, 3, 3);
- Func_020052e8(20);
- Func_02004bc6(221, 46661632, 1048576, 9437184);
- Func_02005302(40);
- Func_0200529a();
- base = 4214;
- Func_0200529c();
- Func_02005408(9, 57344, 0);
- Func_02005414(5, 57344, 20);
- Func_02005488();
- Func_02005494();
- Func_0200545e(30277632, -1, 22937600, 0);
- Func_0200528a();
- Func_02005220(1);
- Func_020054a4();
- Func_020054b8();
- Func_0200535e(40);
- Func_020053f2(9, 4, 30);
- Func_02005430();
- Func_02004c2c(9, 20);
- Func_020054d4();
- Func_020054e0();
- Func_020054a8(46661632, -1, 9961472, 0);
- Func_020052d4();
- Func_0200526a(1);
- Func_020054ee();
- Func_02005502();
- Func_02005380();
- Func_020053bc();
-}
diff --git a/games/gs1/recon/en/overlays/resource_380_c_02000a98.c b/games/gs1/recon/en/overlays/resource_380_c_02000a98.c
deleted file mode 100644
index 6c77eabf7..000000000
--- a/games/gs1/recon/en/overlays/resource_380_c_02000a98.c
+++ /dev/null
@@ -1,138 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunPartyIntroduction:
- * 61 calls, one conditional setup loop, one workspace write, and the
- * returned actor handle. Recovered from the complete executable owner. */
-
-#define FieldScene_RunPartyIntroduction Func_02000a98
-
-u32 Func_02004f5c();
-void Func_020053f2();
-void Func_02005408();
-void Func_0200542c();
-void Func_0200543a();
-void Func_02005450();
-void Func_02005454();
-void Func_02005460();
-void Func_02005466();
-void Func_02005490();
-void Func_02005496();
-void Func_020054aa();
-void Func_020054bc();
-void Func_020054c8();
-void Func_020054ce();
-void Func_020054d6();
-void Func_020054fa();
-void Func_02005506();
-void Func_0200550e();
-void Func_02005520();
-void Func_02005532();
-void Func_02005544();
-void Func_0200554a();
-void Func_0200554c();
-void Func_02005564();
-void Func_0200557c();
-void Func_02005584();
-void Func_02005592();
-void Func_020055a8();
-void Func_020055ae();
-void Func_020055b2();
-void Func_020055ba();
-void Func_020055c0();
-void Func_020055c6();
-void Func_020055d0();
-void Func_020055d2();
-void Func_020055d4();
-void Func_020055e0();
-void Func_020055fa();
-void Func_02005630();
-void Func_02005648();
-void Func_0200564e();
-void Func_02005654();
-void Func_02005666();
-void Func_0200567e();
-void Func_02005698();
-void Func_020056a6();
-void Func_020056be();
-void Func_020056ca();
-void Func_020056d0();
-void Func_02005738();
-void Func_02005746();
-void Func_02005764();
-void Func_02005770();
-void Func_0200578e();
-void Func_020057a2();
-void Func_020057ce();
-
-void Func_02000a98(void)
-{
- s32 i1;
- u32 actor;
-
- Func_020055ba(141);
- for (i1 = 0; i1 != 6; i1++) {
- Func_0200557c(4213202, 1);
- Func_02005592(8);
- Func_02005450(8);
- Func_02005592(65536, 1);
- Func_020055a8(8);
- Func_02005466(8);
- if (i1 == 1) {
- Func_020053f2(65536, 65536, 65536);
- }
- }
- Func_02005408(131072, 65536, 65536);
- Func_02005496(30);
- Func_020055ae(157286, 19660);
- Func_020055c6(10944512, -1, 34668544, 1);
- Func_020055d2();
- Func_0200543a(65536, 131072, 65536);
- Func_020054c8(20);
- Func_0200564e(144);
- Func_0200542c(33607816, 65, 31);
- Func_02005454(0, 0, 1, 1, 10, 31);
- Func_02005460(87, 42, 10, 33, 1, 2);
- Func_0200550e(40);
- Func_02005490(0, 0, 0);
- Func_02005630(419430, 52428);
- Func_02005648(25624576, -1, 11599872, 1);
- Func_02005654();
- Func_020054bc(65536, 131072, 65536);
- Func_0200554a(20);
- Func_020056d0(144);
- Func_020054aa(33607816, 79, 9);
- Func_020054ce(0, 0, 1, 1, 24, 9);
- Func_020054d6(87, 42, 24, 11, 1, 2);
- Func_02005584(40);
- Func_02005506(0, 0, 0);
- Func_020056a6(157286, 19660);
- Func_020056be(38207488, -1, 12648448, 1);
- Func_020056ca();
- Func_02005532(65536, 131072, 65536);
- Func_020055c0(20);
- Func_02005746(144);
- Func_02005520(33607816, 91, 10);
- Func_02005544(0, 0, 1, 1, 36, 10);
- Func_0200554c(87, 42, 36, 12, 1, 2);
- Func_020055fa(40);
- *(u32 *)(*(u32 *)0x0200d088 + 448) = 514;
- Func_02005764();
- Func_02005770();
- Func_02005738(15204352, -1, 31260672, 0);
- Func_02005564();
- Func_020054fa(1);
- Func_020055b2(131072, 65536, 65536);
- Func_0200578e();
- Func_020057a2();
- Func_02005648(40);
- Func_020057ce(289);
- Func_020055d4(-1, -1, 58982);
- Func_020055e0();
- Func_02005666(20);
- Func_020055d0(0, 40, 13, 66, 3, 3);
- Func_0200567e(20);
- actor = Func_02004f5c(223, 15204352, 1048576, 30408704);
- Func_02005698(40);
- Func_02005630(actor, 1);
- Func_02005630(289, 1);
-}
diff --git a/games/gs1/recon/en/overlays/resource_380_c_02000f8c.c b/games/gs1/recon/en/overlays/resource_380_c_02000f8c.c
deleted file mode 100644
index 167d87903..000000000
--- a/games/gs1/recon/en/overlays/resource_380_c_02000f8c.c
+++ /dev/null
@@ -1,269 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunActorFormationSequence:
- * 118 calls, two motion loops, actor state changes, and the conditional
- * scene counter update. Recovered from the complete executable owner. */
-
-#define FieldScene_RunActorFormationSequence Func_02000f8c
-
-void *Func_020051f8();
-void Func_02005208();
-void Func_02005230();
-void Func_0200524c();
-void Func_02005268();
-void Func_0200529e();
-void Func_020052b6();
-void Func_0200530c();
-void Func_0200544a();
-void Func_020054ae();
-void Func_020054d4();
-void Func_020054f6();
-void Func_02005570();
-void Func_02005636();
-void Func_0200565e();
-void Func_0200566e();
-void *Func_020059ae();
-void Func_020059c4();
-void Func_020059f2();
-void Func_020059fc();
-void Func_02005a1c();
-void *Func_02005a30();
-void *Func_02005a38();
-void Func_02005a50();
-void Func_02005a58();
-void Func_02005a72();
-void Func_02005a78();
-void Func_02005a8a();
-void Func_02005a94();
-void Func_02005aac();
-void Func_02005aae();
-void Func_02005ab2();
-void Func_02005ab8();
-void Func_02005abe();
-void Func_02005ada();
-void Func_02005ae0();
-void Func_02005b04();
-void Func_02005b14();
-void Func_02005b26();
-void Func_02005b36();
-void Func_02005b3a();
-void Func_02005b5c();
-void Func_02005b64();
-void Func_02005b68();
-void Func_02005b70();
-void Func_02005b76();
-void *Func_02005b7c();
-void Func_02005b86();
-void Func_02005b88();
-void Func_02005ba4();
-void Func_02005ba6();
-void Func_02005bb6();
-void Func_02005bbc();
-void Func_02005bc8();
-void Func_02005bd2();
-void Func_02005bde();
-void Func_02005be0();
-void Func_02005bf2();
-void Func_02005c0a();
-void Func_02005c16();
-void Func_02005c18();
-void Func_02005c26();
-void Func_02005c3a();
-void Func_02005c3e();
-void Func_02005c48();
-void Func_02005c4e();
-void Func_02005c50();
-void Func_02005c54();
-void Func_02005c5a();
-void Func_02005c5c();
-void Func_02005c64();
-void Func_02005c82();
-void Func_02005caa();
-void Func_02005cb4();
-void Func_02005cca();
-void Func_02005cce();
-void Func_02005cd2();
-void Func_02005cda();
-void Func_02005cfc();
-s32 Func_02005d02();
-void Func_02005d04();
-void Func_02005d14();
-void Func_02005d44();
-void Func_02005d50();
-void Func_02005d54();
-void Func_02005d5c();
-void Func_02005d60();
-void Func_02005d64();
-void Func_02005da2();
-void Func_02005db4();
-void Func_02005dd8();
-void Func_02005dde();
-void Func_02005dea();
-void Func_02005dfa();
-void Func_02005e00();
-void Func_02005e0e();
-void Func_02005e1a();
-void Func_02005e30();
-void Func_02005e3a();
-void Func_02005e4a();
-void Func_02005e52();
-void Func_02005e5c();
-void Func_02005e62();
-void Func_02005e68();
-void Func_02005e76();
-void Func_02005e82();
-void Func_02005ea6();
-void Func_02005eba();
-
-void Func_02000f8c(void)
-{
- void *p2;
- void *p25;
- void *p26;
- void *p4;
- void *p49;
- s32 i1;
- s32 i2;
-
- Func_02005aae(61);
- p2 = Func_020059ae(10, 4);
- Func_020059fc(4221);
- p4 = Func_020051f8(10, 10);
- Func_020059c4(11, 4);
- Func_02005208(11, 30);
- Func_02005a58(9, 258, 60);
- Func_020059f2(9, 4, 10);
- Func_020059fc(9, 6, 30);
- Func_02005230(9, 10);
- Func_02005a1c(10, 1);
- Func_02005a78(10, 45056, 10);
- Func_0200524c(10, 20);
- Func_02005a38(11, 1);
- Func_02005a94(11, 53248, 20);
- Func_02005268(11, 30);
- Func_02005ab8(9, 258, 60);
- Func_02005ab2(5, 0, 0);
- Func_02005abe(9, 28672, 80);
- Func_02005ada(5, 258, 40);
- Func_0200529e(5, 20);
- Func_02005a8a(9, 2);
- Func_02005a72(9, 4);
- Func_020052b6(9, 10);
- p25 = Func_02005a30(12);
- p26 = Func_02005a38(8);
- *(u8 *)((u8 *)(*(void **)(p25 + 80)) + 38) = 0;
- *(s32 *)(p25 + 24) = -6553;
- *(s32 *)(p25 + 28) = -6553;
- *(s32 *)(p26 + 24) = -6553;
- *(s32 *)(p26 + 28) = -6553;
- Func_02005ae0(12, 256);
- Func_02005aac(12, 30867456, 19005440);
- *(u8 *)(p25 + 85) = 0;
- *(s32 *)(p25 + 12) = 2621440;
- Func_02005a50(1);
- Func_0200530c(12, 10);
- Func_02005b5c(5, 256, 0);
- Func_02005b68(9, 256, 30);
- Func_02005b64(5, 49152, 0);
- Func_02005b70(9, 45056, 10);
- Func_02005b7c(11, 53248, 0);
- Func_02005b88(10, 45056, 0);
- Func_02005bbc(131072, 16384);
- Func_02005bd2(30867456, -1, 20250624, 1);
- Func_02005bde();
- Func_02005b3a(8, 30867456, 19005440);
- Func_02005c50(190);
- Func_02005bc8(12, 2);
- for (i1 = 0; i1 != 90; i1++) {
- *(s32 *)(p25 + 12) += 6553;
- *(s32 *)(p25 + 24) += 655;
- *(s32 *)(p25 + 28) += 655;
- *(s32 *)(p26 + 24) += 655;
- *(s32 *)(p26 + 28) += 655;
- Func_02005b04(1);
- }
- *(u8 *)(p25 + 85) = 5;
- Func_02005b14(80);
- for (i2 = 0; i2 != 60; i2++) {
- *(s32 *)(p25 + 12) -= 6553;
- Func_02005b26(1);
- }
- *(u8 *)(p25 + 85) = 3;
- Func_02005b36(30);
- *(u8 *)((u8 *)(*(void **)(p25 + 80)) + 38) = 1;
- Func_02005bb6(8, 0, 0, 1);
- Func_02005c3e(12, 1);
- p49 = Func_02005b7c(12);
- *(u8 *)((u8 *)(p49) + 35) |= 0x1;
- Func_02005c16(12, 0);
- Func_02005ba4(12, 32768, 16384);
- Func_02005be0(12, 471, 306);
- Func_02005b86(40);
- Func_02005c26(12, 2);
- Func_0200544a(16396, 20);
- Func_02005c48(5, 9, 0);
- Func_02005ba6(20);
- Func_02005c3e(5, 2);
- Func_02005c4e(9, 2);
- Func_02005bbc(40);
- Func_02005c54(10, 1);
- Func_02005c64(11, 1);
- Func_02005bd2(20);
- Func_02005c5a(10, 4);
- Func_02005cce(10, 20480, 0);
- Func_02005cda(11, 20480, 10);
- Func_020054ae(10, 30);
- Func_02005d04(12, 258);
- Func_02005c0a(60);
- Func_02005caa(11, 1);
- Func_02005c18(10);
- Func_020054d4(11, 30);
- Func_02005d14(11, 53248, 30);
- Func_02005cb4(11, 3);
- Func_02005c3a(20);
- Func_020054f6(11, 30);
- Func_02005cca(12, 3);
- Func_02005c50(20);
- Func_02005d44(11, 20480, 40);
- Func_02005d50(9, 20480, 0);
- Func_02005d5c(5, 24576, 20);
- Func_02005cfc(10, 3);
- Func_02005c82(20);
- Func_02005dde();
- Func_02005dea();
- Func_02005db4(17301504, -1, 30146560, 0);
- Func_02005be0();
- Func_02005b76(1);
- Func_02005dfa();
- Func_02005e0e();
- Func_02005cb4(40);
- Func_02005570(10, 40);
- Func_02005d54(0, 3);
- Func_02005d64(1, 3);
- Func_02005cd2(80);
- Func_02005da2(11, 0);
- if (Func_02005d02(0, 0) != 0) {
- (*(u16 *)(*(u32 *)0x03001ebc + 472))++;
- }
- Func_02005dd8(9, 0, 20, 473);
- Func_02005e5c();
- Func_02005e68();
- Func_02005e30(31260672, -1, 21889024, 0);
- Func_02005c5c();
- Func_02005bf2(1);
- Func_02005ea6();
- Func_02005eba();
- Func_02005d60(20);
- Func_02005e00(10, 2);
- Func_02005e5c(10, 45056, 10);
- Func_02005e3a(4237);
- Func_02005636(10, 20);
- Func_02005e76(5, 8192, 0);
- Func_02005e82(9, 12288, 10);
- Func_02005e1a(9, 4);
- Func_0200565e();
- Func_02005e4a(11, 1);
- Func_0200566e(11, 10);
- Func_02005e52(5, 2);
- Func_02005e62(9, 2);
-}
diff --git a/games/gs1/recon/en/overlays/resource_380_c_0200178c.c b/games/gs1/recon/en/overlays/resource_380_c_0200178c.c
deleted file mode 100644
index 4c3787470..000000000
--- a/games/gs1/recon/en/overlays/resource_380_c_0200178c.c
+++ /dev/null
@@ -1,313 +0,0 @@
-#include "types.h"
-
-#define RunEventScript01 Func_0200178c
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 147 calls, 1 loops, 14 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-void Func_02001a84();
-void *Func_02005a3e();
-void Func_02005a70();
-void Func_02005a9a();
-void Func_02005abe();
-void Func_02005adc();
-void Func_02005af4();
-void Func_02005b04();
-void Func_02005b1a();
-void Func_02005b46();
-void Func_02005b56();
-void Func_02005b6c();
-void Func_02005b84();
-void Func_02005b94();
-void Func_02005ba4();
-void Func_02005bde();
-void Func_02005d08();
-void Func_02005d3c();
-void Func_02005d62();
-void Func_02005e0e();
-void Func_02006134();
-void Func_02006158();
-s32 Func_02006162();
-void *Func_0200617a();
-void Func_02006198();
-void Func_020061b8();
-void Func_020061c2();
-void Func_020061c6();
-void Func_020061ca();
-void Func_020061f4();
-void Func_02006202();
-void Func_02006204();
-void Func_0200620c();
-void Func_02006212();
-void Func_0200621a();
-void Func_0200621c();
-void Func_02006220();
-void Func_02006230();
-void Func_02006244();
-void Func_0200624c();
-void Func_0200625e();
-void Func_02006276();
-void Func_0200627c();
-void Func_02006286();
-void Func_0200628a();
-void Func_02006294();
-void Func_0200629a();
-void Func_020062a2();
-void *Func_020062a6();
-void Func_020062b0();
-void Func_020062be();
-void Func_020062c8();
-void Func_020062e0();
-void Func_020062f0();
-void Func_020062fe();
-void Func_02006304();
-void Func_0200630e();
-void Func_0200631a();
-void Func_02006340();
-void Func_02006342();
-void Func_02006358();
-void Func_0200635a();
-void Func_02006370();
-void Func_02006380();
-void Func_020063a2();
-void Func_020063a6();
-void Func_020063b2();
-void Func_020063c0();
-void Func_020063ce();
-void Func_020063e4();
-void Func_020063f4();
-void Func_020063fe();
-void Func_02006402();
-void Func_0200640a();
-void Func_02006410();
-void Func_02006418();
-void Func_0200641a();
-void Func_02006426();
-void Func_0200643e();
-void Func_02006448();
-s32 Func_0200644e();
-void Func_0200645a();
-void Func_0200646e();
-void Func_0200647e();
-void Func_02006486();
-void Func_02006492();
-void Func_020064a0();
-void Func_020064b4();
-void Func_020064b8();
-void Func_020064ba();
-void Func_020064c0();
-void Func_020064c2();
-void Func_020064c6();
-void Func_020064ee();
-void *Func_020064fa();
-void Func_020064fc();
-void Func_02006500();
-void Func_02006526();
-void Func_0200652a();
-void Func_02006536();
-void Func_02006540();
-void Func_0200654c();
-void Func_02006556();
-void Func_0200657e();
-void Func_0200658c();
-void Func_020065c0();
-void Func_020065d2();
-void *Func_020065d6();
-void Func_020065d8();
-void Func_020065e2();
-void Func_02006602();
-void Func_0200661a();
-void Func_0200661c();
-void Func_0200662a();
-void Func_02006632();
-void Func_02006640();
-void Func_02006648();
-void Func_02006656();
-void Func_0200665e();
-void Func_02006678();
-void Func_0200667a();
-void Func_0200668a();
-void Func_0200668e();
-void Func_020066a4();
-void Func_020066a6();
-void Func_020066b6();
-void Func_020066ba();
-void Func_020066d0();
-void Func_020066e6();
-void Func_02006776();
-void Func_020067a2();
-void Func_020067ce();
-
-void RunEventScript01(void)
-{
- void *p1;
- void *p11;
- void *p110;
- void *p13;
- void *p131;
- s32 i1;
-
- p1 = Func_020062a6(161);
- Func_020061c6(12, 3);
- Func_02006134(40);
- if (Func_02006162(12) != 0) {
- Func_020061b8(13);
- }
- Func_020061c2(12, 0, 0);
- Func_02006158(20);
- Func_0200624c(13, 12288, 40);
- Func_02006204(5, 3);
- Func_0200620c(5, 3);
- p11 = Func_0200617a(40);
- Func_0200621a(5, 2);
- p13 = Func_02005a3e(5, 20);
- Func_02006212(13, 3);
- Func_02006198(10);
- Func_02006230(5, 3);
- Func_02006294(9, 32768, 10);
- Func_0200624c(9, 2);
- Func_02005a70(9, 40);
- Func_02006244(5, 3);
- Func_020061ca(40);
- Func_020062be(9, 45056, 40);
- Func_02006276(13, 2);
- Func_02005a9a(13, 20);
- Func_02006286(5, 1);
- Func_020061f4(40);
- Func_0200627c(13, 3);
- Func_02006202(10);
- Func_02005abe(13, 40);
- Func_020062a2(10, 1);
- Func_0200629a(10, 3);
- Func_02006220(10);
- Func_02005adc(10, 10);
- Func_020062c8(11, 1);
- Func_020062b0(11, 3);
- Func_02005af4(11, 80);
- Func_020062e0(13, 2);
- Func_02005b04(13, 40);
- Func_020062f0(5, 2);
- Func_0200625e(10);
- Func_02005b1a(5, 10);
- Func_020062fe(13, 2);
- Func_0200630e(9, 2);
- Func_0200627c(80);
- Func_02006304(5, 4);
- Func_0200628a(20);
- Func_02005b46(5, 80);
- Func_0200631a(13, 4);
- Func_02005b56(13, 80);
- Func_02006342(5, 2);
- Func_020062b0(4);
- Func_02005b6c(5, 20);
- Func_02006358(10, 1);
- Func_02006340(10, 3);
- Func_02005b84(10, 10);
- Func_02006370(11, 1);
- Func_02005b94(11, 10);
- Func_02006380(10, 1);
- Func_02005ba4(10, 10);
- Func_020063e4(9, 12288, 80);
- Func_020063fe(9);
- Func_020063a6(11, 1);
- Func_02006402(11, 20480, 40);
- Func_020063b2(11, 2);
- Func_02005bde(11, 20);
- Func_02006486();
- Func_02006492();
- Func_0200645a();
- Func_02006286();
- Func_0200621c(1);
- Func_020064a0();
- Func_020064b4();
- Func_0200635a(20);
- Func_0200644e(0, 12288, 0);
- Func_0200645a(1, 45056, 20);
- Func_0200640a(0, 2);
- Func_0200641a(1, 2);
- Func_020063c0(0, 32768, 16384);
- Func_020063ce(1, 32768, 16384);
- Func_02006402(0, 244, 478);
- Func_02006418(1, 260, 490);
- Func_02006426(0);
- Func_0200643e(0, 1);
- Func_020064ba(0, 12288, 0);
- Func_020064c6(1, 45056, 20);
- Func_0200647e(0, 2);
- Func_0200646e(1, 4);
- Func_020063f4(20);
- Func_020063a2(1);
- for (i1 = 14; i1 >= 0; i1--) {
- Func_02001a84();
- }
- Func_020064ee(1, 0);
- if (Func_0200644e(0, 0) == 0) {
- Func_020064fa();
- Func_020064c2(1, 3);
- Func_02006448(10);
- Func_02005d08(1, 30);
- Func_020064c0(1, 252, 486);
- Func_02006500(1, 2);
- Func_0200646e(10);
- Func_02006410();
- Func_02006540();
- Func_02005d3c(1, 30);
- } else {
- Func_02006556();
- Func_02006536(1, 3);
- Func_02006526(1, 4);
- Func_02005d62(1, 10);
- Func_02006536(1, 4);
- Func_02006556(1, 1);
- Func_020064fc(1, 131072, 65536);
- p110 = Func_020064fa(0);
- *(u8 *)((u8 *)(p110) + 90) &= 0xfe;
- Func_0200654c(1, 244, 478);
- Func_0200652a(0, 98304, 49152);
- Func_0200658c(0, 6, 0);
- Func_02006556(0, 218);
- Func_0200657e(0);
- Func_020064b8();
- Func_020065c0(0, 2);
- Func_0200661a(0, 0, 30);
- *(u8 *)((u8 *)(p110) + 90) |= 0x1;
- Func_02006602();
- Func_020065e2(1, 3);
- Func_020065d2(1, 4);
- Func_02005e0e(1, 10);
- Func_020065e2(1, 4);
- Func_02006656(0, 57344, 30);
- }
- Func_0200668a(32768, 4096);
- Func_0200668a(1, 1);
- Func_020066a6();
- Func_0200667a(1, 32768, 30);
- Func_02006632(1, 2);
- Func_020065d8(1, 32768, 16384);
- p131 = Func_020065d6(1);
- *(u8 *)((u8 *)(p131) + 90) &= 0xfe;
- Func_0200662a(1, 264, 482);
- *(u8 *)((u8 *)(p131) + 90) |= 0x1;
- Func_02006640(1, 278, 480);
- *(s32 *)(p131 + 48) = 196608;
- *(s32 *)(p131 + 52) = 131072;
- Func_02006776(153);
- *(s32 *)(p131 + 40) = 393216;
- Func_02006678(1, 7);
- Func_0200665e(1, 312, 470);
- Func_0200668e(1, 1);
- Func_0200661c(30);
- Func_020067a2(153);
- *(s32 *)(p131 + 40) = 393216;
- Func_020066a4(1, 7);
- Func_0200668a(1, 342, 470);
- Func_020066ba(1, 1);
- Func_02006648(30);
- Func_020067ce(153);
- *(s32 *)(p131 + 40) = 393216;
- Func_020066d0(1, 7);
- Func_020066b6(1, 376, 470);
- Func_020066e6(1, 1);
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_381_c_020029a4.c b/games/gs1/recon/en/overlays/resource_381_c_020029a4.c
deleted file mode 100644
index 37d357ca5..000000000
--- a/games/gs1/recon/en/overlays/resource_381_c_020029a4.c
+++ /dev/null
@@ -1,82 +0,0 @@
-#include "types.h"
-
-#define FieldScene_RunSupplementalSequenceOne Func_020029a4
-
-/* Audited retained supplemental scene body.
- * The complete production span preserves 28 calls, 3 loop(s), and 7 explicit memory operation(s).
- * Approved GCC changes scheduling, allocation, control-flow lowering, and
- * literal placement, so the reviewed assembly remains authoritative. */
-
-void Func_02005e66();
-void Func_02005e92();
-void Func_02005ea4();
-void *Func_02005ea6();
-void Func_02005eae();
-void Func_02005eb8();
-void Func_02005ec0();
-void Func_02005ec2();
-void Func_02005ecc();
-void Func_02005ed6();
-void Func_02005ee0();
-void Func_02005eea();
-void Func_02005ef4();
-void Func_02005efe();
-void Func_02005f08();
-void Func_02005f30();
-void Func_02005f38();
-void Func_02005f4e();
-void Func_02005fcc();
-void Func_02005fd6();
-void Func_02005fe4();
-void Func_0200601a();
-void Func_02006048();
-void Func_02006054();
-void Func_020060e4();
-void Func_02006150();
-void Func_0200615e();
-
-void Func_020029a4(void)
-{
- void *p6;
- s32 i1;
- s32 i2;
- s32 i3;
-
- for (i1 = 0; i1 < 15; i1++) {
- Func_02005eae(16);
- }
- Func_02005fcc(4213326, 1);
- Func_02005fd6(4209234, 1);
- Func_02005fe4(60);
- Func_0200601a(214);
- for (i2 = 0; i2 < 9; i2++) {
- p6 = Func_02005ea6(284);
- *(u8 *)((u8 *)(p6) + 85) = 0;
- *(u8 *)((u8 *)(*(void **)(p6 + 80)) + 38) = 0;
- *(u8 *)((*(void **)(p6 + 80)) + 9) |= 0x4;
- Func_02005ec0();
- Func_02005e66(6);
- }
- Func_02006048(0, 256, 0);
- Func_02006054(1, 256, 0);
- Func_02005e92(20);
- Func_02005ea4(33598369, 3200);
- Func_020060e4(246);
- Func_02005eae(6);
- Func_02005eb8(6);
- Func_02005ec2(6);
- Func_02005ecc(6);
- Func_02005ed6(6);
- Func_02005ee0(6);
- Func_02005eea(6);
- Func_02005ef4(6);
- Func_02005efe(6);
- Func_02005f08(6);
- for (i3 = 4; i3 < 0; i3++) {
- }
- Func_02005f30(1);
- Func_02005f38(40);
- Func_02005f4e(33598369);
- Func_02006150(65536, 1);
- Func_0200615e(40);
-}
diff --git a/games/gs1/recon/en/overlays/resource_383_c_02001f50.c b/games/gs1/recon/en/overlays/resource_383_c_02001f50.c
deleted file mode 100644
index baa91f6de..000000000
--- a/games/gs1/recon/en/overlays/resource_383_c_02001f50.c
+++ /dev/null
@@ -1,164 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_SelectAndConfigureActorPair:
- * 61 calls, a signed scene-selector branch, shared-object state, and both
- * workspace transitions across the complete decoded owner. */
-
-#define FieldScene_SelectAndConfigureActorPair Func_02001f50
-
-void Func_0200202a();
-void Func_02004318();
-void Func_020065f0();
-void Func_0200661c();
-void Func_02006654();
-void Func_0200666a();
-void Func_0200668c();
-void Func_0200669c();
-void Func_020066ca();
-void Func_020066d6();
-void Func_0200673c();
-void Func_02006bdc();
-void Func_02006c8a();
-void Func_02006c92();
-void Func_02006c9e();
-void Func_02006d00();
-void *Func_02006d4a();
-void *Func_02006d52();
-void Func_02006d5a();
-void Func_02006d62();
-void Func_02006d6a();
-void Func_02006d8e();
-void Func_02006da4();
-void Func_02006daa();
-void Func_02006db6();
-void Func_02006db8();
-void Func_02006dc2();
-void Func_02006dc4();
-void Func_02006df0();
-void Func_02006df6();
-void Func_02006e00();
-void Func_02006e04();
-void Func_02006e0a();
-void Func_02006e1a();
-void Func_02006e20();
-void Func_02006e22();
-void Func_02006e30();
-void Func_02006e3e();
-void Func_02006e48();
-void Func_02006e5a();
-void Func_02006e64();
-void Func_02006e6c();
-void *Func_02006e76();
-void Func_02006e86();
-void Func_02006e8c();
-void *Func_02006e8e();
-void Func_02006e9c();
-void *Func_02006ea0();
-void Func_02006eb4();
-void Func_02006ec4();
-void Func_02006eca();
-void Func_02006ee2();
-void Func_02006ee4();
-void *Func_02006eec();
-void Func_02006ef0();
-void *Func_02006ef8();
-void Func_02006f7e();
-void Func_02006fec();
-void Func_02006ff8();
-
-void Func_02001f50(void)
-{
- s16 selector;
- s32 selected_actor;
- u8 *workspace;
- u8 *object;
- void *p5;
- void *p51;
- void *p52;
- void *p53;
- void *p59;
- void *p6;
- void *p60;
-
- Func_02006c9e();
- workspace = *(u8 **)0x03001ebc;
- Func_02006bdc(33606088);
- Func_02006c8a(263);
- Func_02006c92(592);
- p5 = Func_02006d4a(24, 1);
- p6 = Func_02006d52(25, 1);
- Func_02006d5a(2, 1);
- Func_02006d62(0, 1);
- Func_02006d6a(1, 1);
- Func_02006da4(1, 2, 0);
- Func_02006db6(0, 2, 0);
- Func_02006db8(24, 2, 0);
- Func_02006dc2(25, 2, 0);
- Func_02006d00(10);
- selector = *(s16 *)(workspace + 386);
- selected_actor = 24;
- if (selector >= 202 && selector <= 203) {
- Func_02006df6(4772);
- Func_02006e30(25, 258);
- Func_02006df0(25, 2);
- Func_020065f0(25, 20);
- selected_actor = 25;
- }
- if (selector == 201 || selector == 203) {
- Func_02006e20(4771);
- Func_02006e5a(24, 258);
- Func_02006e1a(24, 2);
- Func_0200661c(24, 20);
- selected_actor = 24;
- }
- Func_02006e04(2, 1);
- Func_02006e3e(2, selected_actor, 0);
- Func_02006e48(1, 2, 0);
- Func_02006e48(1, 2);
- Func_02006d8e(20);
- Func_02006e6c(4773);
- Func_02006654(1, 20);
- Func_02006e64(2, 2);
- Func_02006daa(20);
- Func_0200666a(2, 20);
- Func_020066d6(2, selected_actor);
- Func_02006f7e();
- Func_02006dc4(60);
- Func_02006e8c(24, 2);
- Func_0200668c(24, 20);
- Func_02006e9c(25, 2);
- Func_0200669c(25, 20);
- Func_02006ef0(2, 256, 60);
- Func_0200673c();
- Func_02006eb4(1, 2);
- Func_02006ec4(0, 2);
- Func_02006e0a(20);
- Func_020066ca(1, 20);
- Func_02006ee4(2, 1, 0);
- Func_02006e22(20);
- Func_02006eca(2, 3);
- Func_02006e30(40);
- p51 = Func_02006e76(0);
- object = *(u8 **)(p51 + 80);
- object[9] = (object[9] & ~12) | 4;
- p52 = Func_02006e8e(1);
- object = *(u8 **)(p52 + 80);
- object[9] = (object[9] & ~12) | 4;
- p53 = Func_02006ea0(2);
- object = *(u8 **)(p53 + 80);
- object[9] = (object[9] & ~12) | 4;
- *(u32 *)(workspace + 456) = 24;
- *(u32 *)(workspace + 448) = 513;
- Func_02006fec();
- Func_02006ff8();
- Func_02004318();
- Func_02006e48(14, 45, 3, 1, 14, 44);
- Func_02006e86(2131);
- p59 = Func_02006eec(24);
- *(u16 *)((u8 *)(p59) + 100) = 5;
- p60 = Func_02006ef8(25);
- *(u16 *)((u8 *)(p60) + 100) = 4;
- Func_02006e00(33598369, 3200);
- *(u32 *)(workspace + 448) = 521;
- Func_02006ee2();
-}
diff --git a/games/gs1/recon/en/overlays/resource_383_c_020021c8.c b/games/gs1/recon/en/overlays/resource_383_c_020021c8.c
deleted file mode 100644
index c6af742d8..000000000
--- a/games/gs1/recon/en/overlays/resource_383_c_020021c8.c
+++ /dev/null
@@ -1,212 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunConditionalActorSequence:
- * 91 calls, three nested conditionals, fallback routing, actor flags, and
- * workspace state across the complete decoded owner. */
-
-#define FieldScene_RunConditionalActorSequence Func_020021c8
-
-void Func_0200689a();
-void Func_02006900();
-void Func_02006912();
-void Func_02006948();
-void Func_0200694c();
-void Func_02006952();
-void Func_02006972();
-void Func_02006982();
-void Func_020069b2();
-void Func_020069ba();
-void Func_02006a00();
-void Func_02006a26();
-void Func_02006a28();
-void Func_02006a48();
-void Func_02006a4a();
-void Func_02006a6a();
-void Func_02006a74();
-void Func_02006a92();
-void Func_02006aa4();
-void Func_02006aae();
-void Func_02006ab4();
-void Func_02006ab6();
-void Func_02006ad0();
-void Func_02006ad6();
-void Func_02006ade();
-void Func_02006b24();
-void Func_02006b28();
-void Func_02006b4e();
-void *Func_02006f56();
-void Func_02006f86();
-void Func_02006f88();
-void Func_02006f90();
-void Func_02006f9a();
-void *Func_02006fc2();
-void *Func_02006fda();
-void *Func_02006fec();
-void Func_02006ff0();
-void Func_02006ffe();
-void Func_02007006();
-void Func_02007008();
-void Func_0200700c();
-void Func_0200702c();
-void Func_0200703a();
-void Func_0200705c();
-void Func_02007068();
-void Func_02007076();
-void Func_02007090();
-void Func_020070a8();
-void Func_020070c0();
-void Func_020070c8();
-void *Func_020070d0();
-void Func_020070ee();
-void Func_020070f4();
-void Func_02007108();
-void Func_02007118();
-void Func_0200711a();
-s32 Func_0200711c();
-void Func_0200712c();
-void Func_02007136();
-s32 Func_02007148();
-void Func_02007158();
-void Func_02007168();
-void Func_02007172();
-void Func_02007182();
-s32 Func_02007186();
-void Func_02007188();
-void Func_02007196();
-void Func_020071a2();
-void Func_020071aa();
-void Func_020071ae();
-void Func_020071ba();
-void Func_020071e8();
-void Func_020071f4();
-void Func_0200720e();
-void Func_02007226();
-void Func_02007242();
-void Func_02007262();
-void Func_020072a4();
-void Func_020072bc();
-void Func_020072ca();
-void Func_020072d6();
-void Func_020072de();
-void Func_02007300();
-void Func_02007302();
-void Func_02007308();
-void Func_0200730a();
-void Func_0200732c();
-
-void Func_020021c8(void)
-{
- s32 completed;
- u8 *workspace;
- u8 *object;
- void *p1;
- void *p11;
- void *p12;
- void *p13;
- void *p3;
-
- p1 = Func_020070d0();
- Func_02007008(0, 1);
- p3 = Func_02006f56(0);
- *(u8 *)((u8 *)(p3) + 35) |= 0x1;
- Func_0200705c(2097152, 37748736, 26214400, 61341696);
- Func_02006f86(0, 52428, 26214);
- Func_02006f90(1, 52428, 26214);
- Func_02006f9a(2, 52428, 26214);
- Func_02006ff0(0, 16252928, 47710208);
- Func_02006ffe(2, 17301504, 48758784);
- Func_0200700c(1, 15204352, 48758784);
- p11 = Func_02006fc2(0);
- object = *(u8 **)(p11 + 80);
- object[9] = (object[9] & ~12) | 4;
- p12 = Func_02006fda(1);
- object = *(u8 **)(p12 + 80);
- object[9] = (object[9] & ~12) | 4;
- p13 = Func_02006fec(2);
- object = *(u8 **)(p13 + 80);
- object[9] = (object[9] & ~12) | 4;
- Func_02007090(0, 2, 0);
- Func_0200689a(1, 2, 30);
- Func_02007068(24, 6815744, 45613056);
- Func_02007076(25, 7864320, 45613056);
- Func_020070c0(24, 25, 0);
- Func_02007108(0, 0);
- Func_0200711c();
- Func_02006f88();
- Func_02007006(30);
- workspace = *(u8 **)0x03001ebc;
- *(u32 *)(workspace + 456) = 24;
- *(u32 *)(workspace + 448) = 513;
- Func_02007182();
- Func_02007196();
- Func_0200702c(40);
- Func_020070f4(1, 1);
- Func_0200703a(10);
- Func_02007118(4782);
- Func_02006900(1, 20);
- Func_02006952(2, 3, 20);
- Func_02006912(2, 20);
- Func_0200694c(0, 1, 50);
- Func_02007136(0, 2, 0);
- Func_02006948(1, 2, 20);
- Func_02006982(2, 4, 20);
- Func_02007172(2, 0);
- Func_02007196(0, 258, 0);
- Func_020071a2(1, 258, 0);
- Func_020070a8(60);
- Func_020069b2(2, 3, 20);
- Func_02006972(2, 30);
- Func_02007182(1, 1);
- Func_020070c8(20);
- Func_020069ba(0, 1, 20);
- Func_020071ba(1, 0);
- completed = 0;
- if (Func_0200711c(0, 0) != 0 && Func_02007148(0, 0) != 0 && Func_02007186(2, 0) != 0) {
- Func_020070ee(20);
- Func_020071ae(2, 2);
- Func_02006a00(1, 4, 30);
- Func_020071e8(1, 0);
- Func_0200711a(20);
- Func_02007226(2, 258, 0);
- Func_0200712c(60);
- Func_020071f4(2, 2);
- Func_02006a26(0, 2, 20);
- Func_02007226(2, 0);
- Func_02007158(20);
- Func_02007262(2, 261, 0);
- Func_02007168(60);
- Func_02006a28(2, 20);
- Func_02006a4a(1, 2, 10);
- Func_02007242(1, 1);
- Func_02007188(10);
- Func_02006a48(1, 10);
- Func_02006a6a(2, 1, 20);
- Func_020072a4(2, 257, 0);
- Func_020071aa(60);
- Func_02006ab4(2, 4, 20);
- Func_02006a74(1, 10);
- Func_02006aae(1, 0, 20);
- Func_02006ad0(1, 3, 20);
- Func_02006a92(1, 20);
- completed = 1;
- }
- if (completed == 0) {
- Func_020072bc(4796);
- Func_02006aa4(1, 20);
- Func_02006ade(1, 0, 20);
- Func_02006ab6(1, 20);
- }
- Func_02007308(0);
- Func_0200720e(60);
- Func_020072d6(1, 1);
- Func_02006ad6(1, 10);
- Func_02006b28(1, 3, 10);
- Func_02007302(1, 2, 0);
- Func_02006b24(0, 2, 10);
- Func_0200732c(1, 0);
- Func_02006b4e(2, 3, 10);
- Func_020072ca(2, 248, 728);
- Func_020072de(1, 248, 728);
- Func_02007300(1, 0, 0);
- Func_0200730a(2, 0, 0);
-}
diff --git a/games/gs1/recon/en/overlays/resource_38d_c_020019b0.c b/games/gs1/recon/en/overlays/resource_38d_c_020019b0.c
deleted file mode 100644
index a291111b5..000000000
--- a/games/gs1/recon/en/overlays/resource_38d_c_020019b0.c
+++ /dev/null
@@ -1,393 +0,0 @@
-#include "types.h"
-
-#define RunEventScript02 Func_020019b0
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript02: 185 calls, 0 loops, 1 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-void Func_020035de();
-void Func_020036ec();
-void Func_02003748();
-void Func_0200376a();
-void Func_020037d4();
-void Func_02003846();
-void Func_020038ac();
-void Func_020038fc();
-void Func_02003dd4();
-void Func_02003df4();
-void Func_02003e08();
-void Func_02003e1a();
-void Func_02003e24();
-void Func_02003e8c();
-void Func_02003eee();
-void Func_02003ef0();
-void Func_02003efc();
-void Func_02003f06();
-s32 Func_02003f10();
-void Func_02003f12();
-void Func_02003f28();
-void Func_02003f34();
-void Func_02003f44();
-void Func_02003f46();
-void Func_02003f52();
-void *Func_02003f58();
-void Func_02003f66();
-void Func_02003f7e();
-void Func_02003f8c();
-void Func_02003f96();
-void Func_02003fa4();
-void Func_02003fae();
-s32 Func_02003fb0();
-void Func_02003fb2();
-void Func_02003fbc();
-s32 Func_02003fc4();
-void Func_02003fc6();
-void Func_02003fd2();
-s32 Func_02003fd8();
-void Func_02003fea();
-void Func_02003ff0();
-void Func_02003ff8();
-void Func_02004002();
-void Func_02004010();
-void Func_0200401e();
-void Func_02004024();
-void Func_02004032();
-void Func_02004034();
-void Func_02004046();
-s32 Func_0200405a();
-void Func_0200406a();
-void Func_02004078();
-void Func_0200407c();
-void Func_0200407e();
-void Func_02004080();
-void Func_02004086();
-void Func_02004088();
-void Func_02004090();
-s32 Func_0200409a();
-void Func_0200409e();
-void Func_020040ac();
-void Func_020040b6();
-void Func_020040be();
-void Func_020040c6();
-void Func_020040da();
-s32 Func_020040e2();
-void Func_020040f4();
-void Func_02004138();
-void Func_02004144();
-void Func_02004146();
-void Func_02004156();
-void Func_02004158();
-void Func_02004180();
-void Func_02004186();
-void Func_020041b6();
-void Func_020041c0();
-s32 Func_020041c4();
-void Func_0200420a();
-void Func_02004214();
-void Func_02004222();
-s32 Func_0200422e();
-void Func_02004232();
-void Func_0200423e();
-void Func_02004250();
-void Func_02004256();
-void Func_0200425c();
-void Func_0200426a();
-void Func_02004272();
-void Func_0200428e();
-void Func_02004290();
-void Func_020042a0();
-void Func_020042a8();
-s32 Func_020042aa();
-void Func_020042ca();
-void Func_020042d0();
-void Func_020042d6();
-void Func_02004320();
-void Func_02004324();
-void Func_02004330();
-void Func_0200434e();
-void Func_0200435c();
-void Func_0200436a();
-void Func_02004382();
-void Func_02004384();
-void Func_020043a0();
-void Func_020043aa();
-void Func_020043c2();
-void Func_020043c8();
-void Func_020043de();
-void Func_020043e4();
-void Func_020043ea();
-void Func_020043ec();
-void Func_020043ee();
-void Func_020043f4();
-void Func_02004400();
-void Func_02004402();
-void Func_02004404();
-void Func_02004412();
-void Func_0200441e();
-void Func_0200442c();
-void Func_0200443a();
-void Func_02004450();
-void Func_02004464();
-void Func_0200447a();
-void Func_02004488();
-void Func_02004490();
-void Func_02004496();
-void Func_020044a0();
-void Func_020044c6();
-void Func_020044ca();
-void Func_020044d2();
-void Func_020044d4();
-s32 Func_020044de();
-s32 Func_020044fe();
-void Func_02004502();
-void Func_02004516();
-void Func_02004518();
-void Func_0200451a();
-s32 Func_0200451e();
-void Func_02004522();
-void Func_02004526();
-void Func_0200452a();
-void Func_02004530();
-void Func_02004538();
-void Func_0200453a();
-void Func_02004540();
-void Func_02004542();
-void Func_0200454e();
-void Func_02004550();
-void Func_02004558();
-void Func_02004560();
-void Func_02004562();
-void Func_02004580();
-void Func_02004586();
-void Func_0200458e();
-void Func_020045a0();
-void Func_020045a8();
-void Func_020045aa();
-s32 Func_020045b0();
-void Func_020045b2();
-void Func_020045ba();
-void Func_020045c2();
-void Func_020045c8();
-void Func_020045ce();
-void Func_020045dc();
-void Func_020045f2();
-void Func_0200460c();
-void Func_0200460e();
-void Func_02004610();
-void Func_02004624();
-void Func_02004634();
-void Func_02004638();
-void Func_02004670();
-void Func_02004678();
-void Func_020046f0();
-void Func_020046fc();
-void Func_02004706();
-
-void RunEventScript02(void)
-{
- void *p4;
-
- Func_02003e24();
- Func_02003f46(-1, -1, -1, 0);
- Func_02003dd4(1);
- p4 = Func_02003f58();
- *(u8 *)((u8 *)(p4) + 85) = 0;
- Func_02003f66(58589184, -1, 43515904, 0);
- Func_02003df4(1);
- Func_02003eee(0, 0, 0);
- Func_02003e1a();
- Func_02003e08(1);
- Func_02003fb2();
- Func_02003fc6();
- Func_02003e8c(40);
- Func_02003f28(19, 58195968, 52297728);
- Func_02003f34(0, 59244544, 52297728);
- Func_02003fbc(39321, 4915);
- Func_02003fd2(58589184, -1, 45744128, 1);
- Func_02003efc(19, 52428, 26214);
- Func_02003f06(0, 39321, 19660);
- Func_02003f44(19, 888, 720);
- Func_02003f52(0, 904, 736);
- Func_02003ef0(60);
- Func_02003f7e(19);
- Func_02003f96(19, 1);
- Func_02003f8c(0);
- Func_02003fa4(0, 1);
- Func_02003f12(20);
- Func_02003fd2(19, 2);
- Func_02003ff0(5928);
- if (Func_02003f10(2127) == 0) {
- }
- Func_02004024(19, 0);
- Func_0200407e(58589184, -1, 43515904, 1);
- Func_02003fae(19, 33596884);
- Func_02003fea(0, 894, 684);
- if (Func_02003fb0(0) != 0) {
- Func_0200401e(1);
- }
- if (Func_02003fc4(0) != 0) {
- Func_02004032(2);
- }
- if (Func_02003fd8(0) != 0) {
- Func_02004046(3);
- }
- Func_02003ff8(1, 39321, 19660);
- Func_02004002(2, 39321, 19660);
- Func_02004010(3, 65536, 32768);
- Func_02004078(1, 2);
- Func_02004080(2, 2);
- Func_02004088(3, 2);
- Func_0200407c(1, -16, 16);
- Func_02004086(2, 16, 16);
- Func_02004090(3, 32, 16);
- Func_0200409e(2);
- Func_020040b6(1, 1);
- Func_020040be(2, 1);
- Func_020040c6(3, 1);
- Func_02004034(10);
- Func_02004138(1, 49152, 0);
- Func_02004144(2, 49152, 0);
- Func_020040da(3);
- Func_02004156(3, 40960, 0);
- Func_020040ac(19);
- Func_0200406a(20);
- if (Func_0200405a(2127) == 0) {
- }
- Func_02004146(18, 3);
- Func_02004180(8210, 0, 20);
- if (Func_0200409a(2127) == 0) {
- }
- Func_02004186(18, 1);
- Func_020041c0(8210, 0, 10);
- Func_020035de();
- Func_020040f4(20);
- if (Func_020040e2(2127) != 0) {
- Func_0200420a(0, 258, 60);
- Func_02004214(1, 261, 40);
- }
- Func_02004158(40);
- Func_0200425c(1, 49152, 10);
- Func_02004256(16385, 0, 10);
- Func_02004272(2, 49152, 10);
- Func_02004222(2, 3);
- Func_0200426a(16386, 0);
- Func_0200428e(3, 40960, 10);
- Func_0200423e(3, 3);
- Func_02004290(16387, 0, 20);
- Func_02004250(18, 3);
- Func_020041b6(20);
- Func_020042a8(8210, 0, 20);
- Func_020042ca(1, 259, 0);
- Func_020042d6(0, 258, 60);
- if (Func_020041c4(2127) != 0) {
- Func_020042a0(18, 1);
- Func_02004290(18, 4);
- Func_020042d0(8210, 0);
- Func_020036ec();
- if (Func_0200422e(0, 0) != 0) {
- }
- Func_02004320(18, 20480, 0, 473);
- Func_02003748();
- Func_02004232(10);
- Func_02004324(8210, 0, 10);
- Func_0200435c(18, 258, 60, 473);
- } else {
- }
- Func_0200434e(8210, 0);
- Func_0200376a();
- if (Func_020042aa(0, 0) == 0) {
- Func_0200435c(5943);
- }
- Func_02004384();
- Func_020037d4();
- Func_020043aa();
- Func_02004382(19, 1);
- Func_020043a0();
- Func_020043c2(19, 0, 10);
- Func_020043de(0, 24576, 0);
- Func_020043ea(1, 57344, 0);
- Func_020043f4(2, 0, 0);
- Func_02004400(3, 32768, 40);
- Func_020043c8(18, 2);
- Func_02004402();
- Func_0200441e(0, 49152, 0);
- Func_02003846();
- Func_02004330(10);
- Func_0200443a(18);
- Func_0200442c();
- Func_020043e4(0, 3);
- Func_020043ec(1, 3);
- Func_020043f4(2, 3);
- Func_02004404(3, 3);
- Func_0200436a(20);
- Func_02004412(18, 3);
- Func_02004464();
- Func_02004488(18, 264, 60);
- Func_0200447a();
- Func_02004496(18, 12288, 10);
- Func_02004490();
- Func_02004450(18, 3);
- Func_02004490();
- Func_020038ac();
- Func_020043ee(0, 0);
- Func_020038fc();
- Func_020044d2();
- Func_02004502(18, 28672, 10, 473);
- Func_020044ca(19, 1);
- Func_02004516(19, 4096, 20);
- Func_020044c6(18, 3);
- Func_0200442c(20);
- Func_020044d4(19, 3);
- Func_02004526(19, 0, 10);
- Func_02004542(19, 12288, 10);
- Func_0200454e(18, 12288, 20);
- Func_02004516(18, 1);
- Func_02004550();
- Func_02004562();
- Func_0200451a(0, 3);
- Func_02004522(1, 3);
- Func_0200452a(2, 3);
- Func_0200453a(3, 3);
- Func_020044a0(20);
- Func_02004540(1, 2);
- if (Func_020044de(0) != 0) {
- Func_02004518(1);
- }
- Func_02004560(2, 2);
- if (Func_020044fe(0) != 0) {
- Func_02004538(2);
- }
- Func_02004580(3, 2);
- if (Func_0200451e(0) != 0) {
- Func_02004558(3);
- }
- Func_0200458e(1);
- Func_020045a0(1, 0, 0);
- Func_020045aa(2, 0, 0);
- Func_020045a8(3);
- Func_020045ba(3, 0, 0);
- Func_02004530(20);
- Func_02004634(18, 20480, 0);
- Func_0200460e(0);
- Func_020045c2(19, 852);
- Func_020045ce(19, 852);
- Func_020045dc(19, 864, 672);
- Func_02004670(19, 4096, 10);
- Func_02004638(19, 1);
- Func_02004586(10);
- Func_02004678(19, 0, 10);
- Func_0200460c(19);
- Func_02004610(19);
- Func_02004624(0);
- Func_020046f0();
- Func_020046fc();
- Func_020045b2();
- if (Func_020045b0() == 0) {
- Func_020045c2();
- Func_020045c8();
- }
- Func_02004706(6);
- Func_020045f2();
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_38e_c_0200050c.c b/games/gs1/recon/en/overlays/resource_38e_c_0200050c.c
deleted file mode 100644
index f371dae4b..000000000
--- a/games/gs1/recon/en/overlays/resource_38e_c_0200050c.c
+++ /dev/null
@@ -1,196 +0,0 @@
-#include "types.h"
-
-#define RunEventScript01 Func_0200050c
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 89 calls, 1 loops, 4 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-void Func_02000b92();
-void Func_02000ea2();
-s32 Func_02000fc6();
-s32 Func_02000fd8();
-void Func_02000fe2();
-s32 Func_02000fe8();
-s32 Func_0200100a();
-s32 Func_02001014();
-s32 Func_02001034();
-void Func_0200105a();
-s32 Func_02001062();
-void Func_02001068();
-void *Func_02001074();
-void Func_02001092();
-void Func_02001094();
-void Func_020010b4();
-void Func_020010b6();
-void Func_020010c6();
-void Func_0200111a();
-void Func_02001124();
-void Func_02001140();
-void Func_0200115e();
-void Func_0200118e();
-void Func_020011a0();
-void Func_020011a2();
-void Func_020011bc();
-void Func_020011cc();
-void Func_020011d2();
-void Func_020011d6();
-void Func_020011da();
-void Func_020011ee();
-void Func_020011f6();
-void Func_0200120a();
-void Func_02001216();
-void Func_02001218();
-void Func_02001226();
-void Func_02001228();
-void Func_0200122c();
-void Func_02001234();
-void Func_0200123a();
-void Func_02001240();
-void Func_02001244();
-void Func_0200124c();
-void Func_02001258();
-void Func_0200125a();
-void Func_0200126c();
-void Func_02001272();
-void Func_02001286();
-s32 Func_0200128c();
-void Func_02001294();
-void Func_02001296();
-void Func_0200129a();
-void Func_0200129c();
-void Func_0200129e();
-void Func_020012a6();
-void Func_020012b8();
-void Func_020012c4();
-void Func_020012d2();
-void Func_020012d8();
-void Func_020012da();
-void Func_020012de();
-void *Func_020012e4();
-void Func_020012e6();
-void Func_020012fc();
-void *Func_02001306();
-void Func_02001312();
-void Func_02001322();
-void Func_0200132a();
-void Func_0200132c();
-void Func_0200132e();
-void Func_02001334();
-void Func_02001342();
-void Func_02001358();
-void Func_0200136e();
-void Func_02001380();
-void Func_02001382();
-void Func_0200138c();
-void Func_020013a2();
-void Func_020013a4();
-void Func_020013b4();
-void Func_02001450();
-void Func_02001456();
-void Func_02001462();
-
-void RunEventScript01(void)
-{
- void *p7;
- void *p70;
- void *p73;
- s32 i1;
-
- if (Func_02000fc6(265) != 0) {
- Func_02000fe2(512);
- }
- if (Func_02000fd8(4050) == 0) {
- Func_02000ea2(13);
- }
- if (Func_02000fe8(2122) != 0 && Func_0200100a(2127) == 0 && Func_02001014(2117) == 0) {
- Func_02001068(11, 20185088, 17235968);
- p7 = Func_02001074(12, 22675456, 17235968);
- Func_02001092(11, 0, 0);
- Func_020010c6(12, 65536, 33590260);
- }
- if (Func_02001034(2117) != 0 && Func_02001062(2142) == 0) {
- Func_020010b6(10, 14680064, 19136512);
- Func_0200111a(10, 16384, 0);
- Func_02001124(8, 0, 0);
- Func_02000b92();
- }
- Func_020010b4();
- Func_0200118e(-1, -1, -1, 0);
- Func_020011a0(20971520, -1, 20971520, 0);
- Func_02001094();
- Func_0200105a(1);
- Func_02001140(0, 20971520, 24379392);
- Func_020011cc();
- Func_020011bc();
- Func_020011d6(20971520, -1, 19005440, 1);
- Func_02001140(0);
- Func_0200115e(0, 320, 310);
- Func_020011da(11, 12288, 10);
- Func_020011a2(11, 2);
- Func_020011f6(11, 256, 60);
- Func_020011cc();
- Func_020011ee(11, 0, 10);
- Func_0200120a(12, 20480, 10);
- Func_020011d2(12, 2);
- Func_02001226(12, 256, 60);
- Func_02001218(12, 0, 20);
- Func_02001234(11, 4096, 0);
- Func_02001240(12, 28672, 40);
- Func_0200124c(11, 12288, 0);
- Func_02001258(12, 20480, 10);
- Func_02001228(11, 1);
- Func_0200125a(11, 0, 10);
- Func_0200123a(12, 1);
- Func_0200125a(12, 0);
- Func_02001286(0, 57344, 0);
- for (i1 = 0; i1 != 0; i1++) {
- Func_0200129c(12, 256, 60);
- Func_02001272();
- Func_02001294(12, 0, 10);
- Func_0200126c(12, 2);
- Func_02001294(12, 0);
- Func_0200122c(0, 0);
- }
- Func_02001216(10);
- Func_020012d2(11, 12288, 0);
- Func_020012de(12, 20480, 20);
- Func_02001296(11, 3);
- Func_020012a6(12, 3);
- Func_02001244(20);
- Func_020012c4(11, 1);
- Func_020012da();
- Func_020012fc(11, 0, 10);
- Func_0200129a(11, 65536, 32768);
- Func_020012b8(11, 314, 280);
- Func_02001334(0, 49152, 20);
- Func_0200132e(11, 0, 40);
- Func_02001358(0, 258);
- Func_0200129e(60);
- if (Func_0200128c() == 0) {
- Func_020012e6(12, 65536, 32768);
- p70 = Func_020012e4(12);
- *(u8 *)((u8 *)(p70) + 90) &= 0xfe;
- Func_02001312(12, 346);
- Func_020012d8(1);
- p73 = Func_02001306(12);
- *(u8 *)((u8 *)(p73) + 90) |= 0x1;
- }
- Func_02001322(11);
- Func_0200132c(0);
- Func_02001342(11, 328, 262);
- Func_02001358(0, 328, 278);
- Func_02001380(11, 1);
- Func_02001140();
- Func_0200132a(40);
- Func_0200136e(0, 328, 242);
- Func_02001382(11, 328, 242);
- Func_020013a4(11, 0, 0);
- Func_020013a2(0);
- Func_020013b4(0, 0, 0);
- Func_02001456();
- Func_02001462();
- Func_02001450(10);
- Func_0200138c();
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_396_c_0200069c.c b/games/gs1/recon/en/overlays/resource_396_c_0200069c.c
deleted file mode 100644
index 89dbeb859..000000000
--- a/games/gs1/recon/en/overlays/resource_396_c_0200069c.c
+++ /dev/null
@@ -1,465 +0,0 @@
-#include "types.h"
-
-#define RunEventScript01 Func_0200069c
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 221 calls, 0 loops, 14 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-void Func_02001c08();
-void Func_02001c66();
-void Func_02001ccc();
-void Func_02001e14();
-void Func_02001f34();
-void Func_02001f46();
-void Func_02001fc6();
-void Func_0200205e();
-void Func_020020b2();
-void Func_02002124();
-void Func_02002144();
-void *Func_0200216a();
-void *Func_02002188();
-void *Func_020021d2();
-void *Func_020021e0();
-void Func_020021ee();
-void *Func_020021fa();
-void Func_020021fc();
-void Func_02002204();
-void *Func_02002214();
-void Func_02002226();
-s32 Func_0200222a();
-s32 Func_0200223e();
-void Func_02002240();
-s32 Func_02002256();
-void Func_02002258();
-void Func_0200226a();
-void Func_0200226c();
-void *Func_0200227c();
-void Func_02002284();
-void Func_0200228c();
-void Func_0200228e();
-void Func_0200229c();
-void Func_020022a4();
-void Func_020022a6();
-void Func_020022a8();
-void Func_020022b6();
-void *Func_020022bc();
-void Func_020022ea();
-void Func_020022f8();
-void Func_0200230e();
-void Func_0200231a();
-void Func_02002324();
-void Func_02002326();
-void Func_0200232c();
-void Func_02002332();
-void Func_02002334();
-void Func_0200233c();
-void Func_0200234c();
-void Func_0200237a();
-void Func_02002384();
-void Func_0200238c();
-void Func_02002394();
-void Func_02002398();
-void Func_020023a4();
-void Func_020023b0();
-void Func_020023b4();
-void Func_020023bc();
-void Func_020023cc();
-void Func_020023d4();
-void Func_020023e8();
-void Func_02002406();
-void Func_02002410();
-void Func_02002416();
-void Func_02002418();
-void Func_0200241a();
-void *Func_02002420();
-void Func_02002424();
-void *Func_0200243a();
-void Func_02002442();
-void Func_0200246c();
-void Func_02002476();
-void Func_02002480();
-void Func_0200248a();
-void Func_02002490();
-void *Func_02002496();
-void Func_020024a8();
-void *Func_020024b0();
-void Func_020024b4();
-void Func_020024c0();
-void *Func_020024c6();
-void Func_020024ca();
-void Func_020024d8();
-void *Func_020024e0();
-void Func_020024f0();
-void Func_020024f2();
-void Func_020024fa();
-void Func_02002512();
-void Func_02002516();
-void Func_0200252a();
-void Func_02002542();
-void Func_02002556();
-void Func_020025b2();
-void Func_020025c6();
-void Func_020025cc();
-void Func_020025d8();
-void Func_020025e2();
-void Func_020025ee();
-void Func_020025f0();
-void Func_020025fc();
-void Func_02002600();
-void Func_02002608();
-void Func_0200260e();
-void Func_02002610();
-void Func_02002620();
-void Func_02002630();
-void Func_0200263a();
-void Func_0200263c();
-void Func_0200266a();
-void Func_02002680();
-void Func_02002694();
-void Func_02002698();
-void Func_0200269c();
-void Func_020026a4();
-void Func_020026b4();
-void Func_020026b6();
-void Func_020026b8();
-void Func_020026bc();
-void Func_020026c0();
-void Func_020026ca();
-void Func_020026d4();
-void Func_02002704();
-void Func_02002714();
-void Func_02002718();
-void Func_0200271a();
-void Func_02002720();
-void Func_0200273a();
-void Func_02002744();
-void Func_0200274e();
-void Func_02002758();
-void Func_02002762();
-void Func_02002764();
-void Func_02002770();
-void Func_02002772();
-void Func_02002782();
-void Func_0200278a();
-void Func_0200278e();
-void Func_02002792();
-void Func_0200279a();
-void Func_0200279c();
-void Func_020027a2();
-s32 Func_020027a6();
-void Func_020027b2();
-void Func_020027d2();
-void Func_020027e4();
-void Func_020027ec();
-void Func_020027ee();
-void Func_020027f8();
-void Func_020027fe();
-void Func_02002806();
-void Func_0200280c();
-void Func_02002812();
-void Func_0200281a();
-void Func_0200281e();
-void Func_02002820();
-void Func_02002822();
-void Func_0200283a();
-void Func_02002844();
-void Func_02002854();
-void Func_02002856();
-void Func_02002864();
-void Func_02002878();
-void Func_0200287c();
-void Func_02002882();
-void Func_02002884();
-void Func_02002890();
-void Func_020028bc();
-void Func_020028c6();
-void Func_020028d6();
-void Func_020028e4();
-void Func_02002900();
-void Func_0200290a();
-void Func_02002916();
-void Func_02002918();
-void Func_02002922();
-void Func_0200293c();
-void Func_02002944();
-void Func_0200297e();
-void Func_02002984();
-void Func_020029a6();
-void Func_020029ba();
-void Func_020029bc();
-void Func_020029be();
-void Func_020029d0();
-void Func_020029d2();
-void Func_020029d4();
-void Func_020029d6();
-void Func_020029e0();
-void Func_020029e2();
-void Func_020029e6();
-void Func_020029e8();
-void Func_020029ea();
-void Func_020029ee();
-void Func_020029f0();
-void Func_020029f6();
-void Func_020029f8();
-void *Func_020029fa();
-void Func_02002a00();
-void Func_02002a06();
-void Func_02002a08();
-void Func_02002a0a();
-void Func_02002a20();
-
-void RunEventScript01(void)
-{
- void *p1;
- void *p11;
- void *p13;
- void *p2;
- void *p21;
- void *p218;
- void *p6;
- void *p62;
- void *p64;
- void *p7;
- void *p74;
- void *p76;
- void *p78;
- void *p8;
- void *p80;
-
- p1 = Func_0200216a(3);
- p2 = Func_02002188();
- Func_020022a6(17);
- Func_02002204(5326);
- Func_02002226(32777, 0, 20);
- p6 = Func_020022bc(29);
- p7 = Func_020021d2(0, 65536, 32768);
- p8 = Func_020021e0(1, 65536, 32768);
- Func_020021ee(2, 65536, 32768);
- Func_020021fc(3, 65536, 32768);
- p11 = Func_020021fa(3);
- *(u8 *)((u8 *)(p11) + 35) &= 0xfe;
- Func_0200228e(3, 2);
- p13 = Func_02002214(0);
- *(u8 *)((u8 *)(p13) + 35) &= 0xfe;
- Func_020022a4(0, 2);
- if (Func_0200222a(0) != 0) {
- Func_02002258(1);
- }
- if (Func_0200223e(0) != 0) {
- Func_0200226c(2);
- }
- if (Func_02002256(0) != 0) {
- Func_02002284(3);
- }
- p21 = Func_0200227c(3, 33594924);
- Func_02002284(0, 33594804);
- Func_0200228c(1, 33594844);
- Func_0200229c(2, 33594884);
- Func_0200226a(10);
- Func_0200230e(0, 49152, 0);
- Func_0200231a(1, 49152, 0);
- Func_02002326(3, 49152, 0);
- Func_02002332(2, 49152, 40);
- Func_020022ea(8, 11);
- Func_020022a8(10);
- Func_020022f8(8, 8);
- Func_020022b6(20);
- Func_02001c08(8);
- Func_0200234c(32776, 0);
- Func_02002324(0, 2);
- Func_0200232c(1, 2);
- Func_02002334(3, 2);
- Func_0200233c(2, 2);
- Func_02002398(0, 256, 0);
- Func_020023a4(1, 256, 0);
- Func_020023b0(3, 256, 0);
- Func_020023bc(2, 256, 60);
- Func_02001c66(11);
- Func_020023b4(32776, 0, 10);
- Func_02002384(0, 1);
- Func_0200238c(1, 1);
- Func_02002394(3, 1);
- Func_020023a4(2, 1);
- Func_020023d4(32776, 0);
- Func_02002406(0, 258);
- Func_02002410(1, 258);
- Func_0200241a(3, 258);
- Func_02002424(2, 258);
- Func_0200237a(40);
- Func_02001ccc(11);
- Func_02002410(32776, 0);
- Func_02002490(45, 19, 3, 33555563);
- Func_02002490(36, 0);
- Func_020023cc();
- Func_020023e8(3);
- p62 = Func_02002420(3);
- *(u8 *)((u8 *)(p62) + 35) &= 0xfe;
- Func_020024b4(3, 2);
- p64 = Func_0200243a(0);
- *(u8 *)((u8 *)(p64) + 35) &= 0xfe;
- Func_020024ca(0, 2);
- Func_02002418(184);
- Func_02002556(17);
- Func_02002442();
- Func_0200246c(0, 52428, 26214);
- Func_02002476(1, 52428, 26214);
- Func_02002480(2, 52428, 26214);
- Func_0200248a(3, 52428, 26214);
- Func_020024b0(0, 10878976, 5242880);
- p74 = Func_02002496(0);
- *(u16 *)(p74 + 6) = 49152;
- Func_020024ca(1, 9699328, 5898240);
- p76 = Func_020024b0(1);
- *(u16 *)(p76 + 6) = 49152;
- Func_020024e0(2, 11927552, 5898240);
- p78 = Func_020024c6(2);
- *(u16 *)(p78 + 6) = 49152;
- Func_020024fa(3, 10878976, 6815744);
- p80 = Func_020024e0(3);
- *(u16 *)(p80 + 6) = 49152;
- Func_02001e14(0);
- Func_02002416(10);
- Func_020025f0();
- Func_020025fc();
- Func_020024f2(20);
- Func_020025b2(78643, 9830);
- Func_020025cc(11010048, -1, 9961472, 1);
- Func_020025d8();
- Func_02002516(10);
- Func_0200263c(123);
- Func_020024f0(26, 3, 1, 2, 10, 8);
- Func_020024fa(26, 38, 1, 1, 10, 43);
- Func_02002490(4);
- Func_02002512(26, 37, 1, 2, 10, 42);
- Func_020024a8(4);
- Func_0200252a(26, 36, 1, 3, 10, 41);
- Func_020024c0(4);
- Func_02002542(26, 35, 1, 4, 10, 40);
- Func_020024d8(80);
- Func_0200260e(5331);
- Func_02002630(32777, 0, 20);
- Func_02002600(0, 2);
- Func_02002608(1, 2);
- Func_02002610(3, 2);
- Func_02002620(2, 2);
- Func_020025c6(20);
- Func_02002698(11010048, -1, 5898240, 1);
- Func_020026a4();
- Func_020025e2(40);
- Func_02001f34(1);
- Func_020025ee(60);
- Func_02002714(21);
- Func_02001f46(4);
- Func_02002694(32777, 0, 20);
- Func_020026b6(0, 257, 0);
- Func_020026c0(1, 257, 0);
- Func_020026ca(3, 257, 0);
- Func_020026d4(2, 257, 80);
- Func_020026bc(32777, 0);
- Func_0200263a(40);
- Func_020026d4(32777, 0, 20);
- Func_02002694(0, 3);
- Func_0200269c(1, 3);
- Func_020026a4(3, 3);
- Func_020026b4(2, 3);
- Func_0200266a(20);
- Func_02002704(32777, 0, 20);
- Func_02001fc6(0);
- Func_02002680(40);
- Func_0200271a(32777, 0, 20);
- Func_02002744(0, 258);
- Func_0200274e(1, 258);
- Func_02002758(3, 258);
- Func_02002762(2, 258);
- Func_020026b8(60);
- Func_02002720(1, 2);
- Func_02002764(1, 57344, 10);
- Func_02002770(0, 24576, 10);
- Func_02002772(32769, 0, 10);
- Func_0200273a(2, 4);
- Func_0200278e(0, 8192, 0);
- Func_0200279a(2, 40960, 0);
- Func_0200279c(32770, 0, 20);
- Func_0200205e(0);
- Func_02002718(40);
- Func_020027b2(32777, 0, 10);
- Func_02002782(0, 2);
- Func_0200278a(1, 2);
- Func_02002792(3, 2);
- Func_020027a2(2, 2);
- Func_020027e4(0, 49152, 0);
- Func_020027ee(1, 49152, 0);
- Func_020027f8(2, 49152, 40);
- Func_020020b2(4);
- Func_020027ee(32777, 0);
- Func_02002812(1, 57344, 0);
- Func_0200281e(2, 40960, 0);
- if (Func_020027a6(0, 0) != 0) {
- Func_02002844(1, 259, 20);
- Func_020027ec(1, 4);
- Func_02002822(5341);
- Func_0200283a(32769, 0);
- Func_02002864(2, 259, 10);
- Func_0200280c(2, 3);
- Func_02002854(32770, 0);
- }
- Func_020027d2(20);
- Func_02002124(4);
- Func_02002856(5343);
- Func_02002878(32777, 0, 20);
- Func_02002882(32777, 0, 10);
- Func_02002144(0);
- Func_020027fe(20);
- Func_02002900(65536, 0);
- Func_02002900(4219416, 1);
- Func_02002916(20);
- Func_02002764(40);
- Func_0200287c(0, 2);
- Func_02002884(1, 2);
- Func_020028c6(3, 2);
- Func_020028d6(2, 2);
- Func_02002918(1, 49152, 0);
- Func_02002922(2, 49152, 20);
- Func_02002890(20);
- Func_02002806();
- Func_020028bc(220);
- Func_0200281a();
- Func_020029bc(65536, 1);
- Func_020029d2(20);
- Func_02002820(40);
- Func_0200222a(4);
- Func_020028e4(20);
- Func_0200297e();
- Func_02002240(0);
- Func_02002984();
- Func_0200293c(8);
- Func_0200290a(40);
- Func_020029be(1, 258, 60);
- Func_020029a6();
- Func_020029d2(2, 258, 10);
- Func_020029ba();
- Func_020029d6(1, 57344, 0);
- Func_020029e2(2, 40960, 10);
- Func_020029ee(0, 16384, 10);
- Func_020029be(1, 1);
- Func_020029f8();
- Func_020029d0(2, 1);
- Func_02002a0a();
- Func_020029e6(3, 1);
- Func_02002a20();
- Func_020029e0(0, 3);
- Func_020029e8(1, 3);
- Func_020029f0(3, 3);
- Func_02002a00(2, 3);
- Func_020029ea(1);
- Func_020029f6(3);
- Func_02002a06(2);
- Func_020029d4(20);
- p218 = Func_020029fa(0);
- *(u8 *)((u8 *)(p218) + 35) |= 0x1;
- Func_020029e2();
- Func_02002944();
- Func_02002a08();
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_39e_c_02001494.c b/games/gs1/recon/en/overlays/resource_39e_c_02001494.c
deleted file mode 100644
index 4790f11e8..000000000
--- a/games/gs1/recon/en/overlays/resource_39e_c_02001494.c
+++ /dev/null
@@ -1,558 +0,0 @@
-#include "types.h"
-
-#define FieldScene_RunSecondEnsembleBeat Func_02001494
-
-/*
- * resource_39e owner at 0x02001494, 2236 bytes: the overlay's second
- * ensemble beat -- 233 calls, one inline literal pool skipped by the
- * forward branch at 0x0200188e (the a010(20) call at the skip target
- * completes the instruction pair split around the pool), and TWO
- * Func_0808a070(0, 0) gates near the end. The gates settle this
- * overlay's story-flag chain:
- * - opening sets flag 0x89a (Func_080770c8);
- * - gate 1 ==0 arm joins with id 16 and sets flag 0x898 -- the flag
- * the dispatcher at 0x020012e0 tests and 0x02001dbc later clears;
- * - gate 1 else arm bumps the workspace+472 skip-beat counter
- * (0x03001ebc) and runs gate 2: its ==0 arm joins with id 18 and
- * also sets 0x898, its else arm bumps the counter again and sets
- * flag 0x899 instead.
- * Both join paths share the machine-level tail at 0x02001cb4
- * (a188(id, 0, 20) with id carried in r0 from either arm -- spelled
- * out per-arm here). Midway: record 16's byte +90 gets bit 0 cleared
- * then set around a Func_0808a0d0 reposition, sound 158/159 with
- * Func_08009178(0x0200c77a/0x0200c790, 78, 13) text calls, the
- * slot-19 sequence (a0f0(19/20, 232<<16, 168<<16), record +12 =
- * 0xc0000, +60 = 0x80000000, +24 = 0xcccc, BAM +30 of the +80
- * sub-object = 0x8000, sound 124) identical to the 0x1160/0x1dbc
- * closers, and a Func_0808a098(12, 0x0200c638) matching 0x1dbc's.
- * Called 1x within this overlay.
- *
- * Complete owner: `push {r5, lr}` at 0x02001494 through `pop {r5} /
- * pop {r0} / bx r0` at 0x02001d42-0x02001d46, two inline pools plus
- * two trailing pool words ending 0x02001d4f; the next owner
- * (0x02001d50, `push {lr}`) follows. Not found by the structural
- * inventory walk (unindexed): reached only by bl
- * (cargo run --release --manifest-path tools/overlay-call-targets/Cargo.toml -- resource_39e 1494 1d46, +2 rule).
- *
- * Uncertainty: callees and argument roles by shape; ids, dialogue ids
- * and constants transcribed. 0x0200c77a/0x0200c790/0x0200c638 are
- * overlay-image data pointers, targets not identified.
- */
-
-extern void Func_0808a010(s32 frames);
-extern s32 Func_0808a070(s32 arg0, s32 arg1);
-extern u8 *Func_0808a080(s32 id);
-extern void Func_0808a088(s32 id);
-extern void Func_0808a090(s32 id, s32 arg1, s32 arg2);
-extern void Func_0808a098(s32 id, s32 arg1);
-extern void Func_0808a0c8(s32 id, s32 arg1, s32 arg2);
-extern void Func_0808a0d0(s32 id, s32 arg1, s32 arg2);
-extern void Func_0808a0e8(s32 id);
-extern void Func_0808a0f0(s32 id, s32 arg1, s32 arg2);
-extern void Func_0808a100(s32 id, s32 arg1);
-extern void Func_0808a110(s32 id, s32 arg1);
-extern void Func_0808a130(s32 id, s32 arg1);
-extern void Func_0808a138(s32 id, s32 arg1);
-extern void Func_0808a148(s32 id, s32 arg1, s32 arg2);
-extern void Func_0808a170(s32 dialogue_id);
-extern void Func_0808a178(s32 id, s32 arg1);
-extern void Func_0808a188(s32 id, s32 arg1, s32 arg2);
-extern void Func_0808a190(s32 id, s32 arg1);
-extern void Func_0808a1b8(s32 id, s32 arg1, s32 arg2);
-extern void Func_0808a1e8(s32 id, s32 arg1, s32 arg2);
-extern void Func_0808a200(s32 id, s32 arg1);
-extern void Func_08009178(s32 arg0, s32 arg1, s32 arg2);
-extern void Func_080770c8(s32 flagId);
-extern void Func_080f9010(s32 sound_id);
-/* Overlay-local relocation aliases witnessed from the reference BL stream.
- * Suffixes distinguish different logical prototypes sharing one address. */
-extern void Func_0200585e();
-extern void Func_02005874();
-extern void Func_02005926();
-extern void Func_02005930();
-extern void Func_0200593a();
-extern void Func_02005898();
-extern void Func_0200599c();
-extern void Func_020059a8();
-extern void Func_020059b4();
-extern void Func_020058c2();
-extern void Func_02005990();
-extern void Func_020059b2();
-extern void Func_02005984();
-extern void Func_02005984_b();
-extern void Func_020058ea();
-extern void Func_020059d4();
-extern void Func_020059a6();
-extern void Func_020059a6_b();
-extern void Func_0200590c();
-extern void Func_020059be();
-extern void Func_02005a06();
-extern void Func_02005924();
-extern void Func_02005a34();
-extern void Func_02005976();
-extern void Func_020059a0();
-extern void Func_020059ac();
-extern void Func_02005a48();
-extern void Func_02005a54();
-extern void Func_02005b12();
-extern void Func_02005934();
-extern void Func_02005a1c();
-extern void Func_02005982();
-extern void Func_020059d0();
-extern u8 *Func_020059c6();
-extern void Func_02005a0e();
-extern void Func_020059b4_b();
-extern u8 *Func_020059ea();
-extern void Func_02005aae();
-extern void Func_02005a54_b();
-extern void Func_02005a48_b();
-extern void Func_02005a9a();
-extern void Func_02005aa4();
-extern void Func_02005aae_b();
-extern void Func_02005ab8();
-extern void Func_02005ac2();
-extern void Func_02005acc();
-extern void Func_02005ad6();
-extern void Func_02005ae0();
-extern void Func_02005aea();
-extern void Func_02005a48_c();
-extern void Func_02005ae8();
-extern void Func_02005af0();
-extern void Func_02005af8();
-extern void Func_02005b00();
-extern void Func_02005b08();
-extern void Func_02005b10();
-extern void Func_02005b18();
-extern void Func_02005b28();
-extern void Func_02005b8a();
-extern void Func_02005b18_b();
-extern void Func_02005b04();
-extern void Func_02005b12_b();
-extern void Func_02005b30();
-extern void Func_02005bbc();
-extern void Func_02005b42();
-extern void Func_02005c80();
-extern void Func_02005aa2();
-extern void Func_02005bcc();
-extern void Func_02005b9e();
-extern void Func_02005ba8();
-extern void Func_02005bb2();
-extern void Func_02005bbc_b();
-extern void Func_02005bc6();
-extern void Func_02005bd0();
-extern void Func_02005bda();
-extern void Func_02005be4();
-extern void Func_02005bee();
-extern void Func_02005b4c();
-extern void Func_02005bf4();
-extern void Func_02005b5a();
-extern void Func_02005bea();
-extern void Func_02005b68();
-extern void Func_02005c52();
-extern void Func_02005c02();
-extern void Func_02005b80();
-extern void Func_02005c28();
-extern void Func_02005b8e();
-extern void Func_02005c78();
-extern void Func_02005c94();
-extern void Func_02005c8e();
-extern void Func_02005cb2();
-extern void Func_02005ca4();
-extern void Func_02005c54();
-extern void Func_02005bd2();
-extern void Func_02005cbc();
-extern void Func_02005c6c();
-extern void Func_02005bea_b();
-extern void Func_02005cd4();
-extern void Func_02005c84();
-extern void Func_02005c02_b();
-extern void Func_02005c92();
-extern void Func_02005c10();
-extern void Func_02005cfa();
-extern void Func_02005cc2();
-extern void Func_02005c28_b();
-extern void Func_02005d22();
-extern void Func_02005d1c();
-extern void Func_02005d38();
-extern void Func_02005cd8();
-extern void Func_02005c56();
-extern void Func_02005ce6();
-extern void Func_02005c82();
-extern void Func_02005d6c();
-extern void Func_02005d1c_b();
-extern void Func_02005c9a();
-extern void Func_02005d84();
-extern void Func_02005da0();
-extern void Func_02005d9a();
-extern void Func_02005d4a();
-extern void Func_02005cc8();
-extern void Func_02005db2();
-extern void Func_02005dce();
-extern void Func_02005d86();
-extern void Func_02005cec();
-extern void Func_02005dd6();
-extern void Func_02005dfa();
-extern void Func_02005dec();
-extern void Func_02005e0e();
-extern void Func_02005e00();
-extern void Func_02005db0();
-extern void Func_02005d2e();
-extern void Func_02005e18();
-extern void Func_02005e3c();
-extern void Func_02005e2e();
-extern void Func_02005dde();
-extern void Func_02005d5c();
-extern void Func_02005e5e();
-extern void Func_02005e50();
-extern void Func_02005e74();
-extern void Func_02005e66();
-extern void Func_02005e16();
-extern void Func_02005d94();
-extern void Func_02005e7e();
-extern void Func_02005e46();
-extern void Func_02005dac();
-extern void Func_02005e96();
-extern void Func_02005e5e_b();
-extern void Func_02005dc4();
-extern void Func_02005e32();
-extern void Func_02005ece();
-extern void Func_02005e60();
-extern void Func_02005e26();
-extern void Func_02005df4();
-extern void Func_02005e9c();
-extern void Func_02005e02();
-extern void Func_02005eec();
-extern void Func_02005eb4();
-extern void Func_02005e1a();
-extern void Func_02005f04();
-extern void Func_02005ed6();
-extern void Func_02005e34();
-extern void Func_02005edc();
-extern void Func_02005e42();
-extern void Func_02005f2c();
-extern void Func_02005efe();
-extern void Func_02005e5c();
-extern void Func_02005f46();
-extern void Func_02005ef6();
-extern void Func_02005e74_b();
-extern void Func_02005f5e();
-extern void Func_02005f0e();
-extern void Func_02005e8c();
-extern void Func_02005f76();
-extern void Func_02005ee0();
-extern void Func_02005f0c();
-extern void Func_02005fa8();
-extern void Func_02005f58();
-extern void Func_02005fc4();
-extern void Func_02005f36();
-extern void Func_02005f7e();
-extern void Func_02005ee4();
-extern void Func_02005f6a();
-extern void Func_02005f78();
-extern u8 *Func_02005f36_b();
-extern u8 *Func_02005f42();
-extern u8 *Func_02005f4e();
-extern u8 *Func_02005f58_b();
-extern void Func_020060de();
-extern void Func_02006020();
-extern void Func_0200603c();
-extern void Func_02005fb8();
-extern void Func_02006054();
-extern void Func_0200600c();
-extern void Func_02006056();
-extern void Func_02006028();
-extern void Func_02006032();
-extern void Func_0200603c_b();
-extern void Func_02006046();
-extern void Func_02006050();
-extern void Func_0200605a();
-extern void Func_02006064();
-extern void Func_0200606e();
-extern void Func_0200606e_b();
-extern void Func_02005fd4();
-extern void Func_020060d0();
-extern void Func_0200604a();
-extern void Func_020060e6();
-extern void Func_020060ce();
-extern s32 Func_02006026();
-extern void Func_020060b2();
-extern void Func_02006018();
-extern void Func_02006032_b();
-extern void Func_02006134();
-extern void Func_02006138();
-extern void Func_020060f0();
-extern void Func_02006056_b();
-extern void Func_0200612e();
-extern s32 Func_02006086();
-extern void Func_020060fa();
-extern void Func_02006078();
-extern void Func_02006174();
-extern void Func_0200616e();
-extern void Func_02006084();
-extern void Func_020060c6();
-extern void Func_02006156();
-extern void Func_020060d4();
-extern void Func_020061be();
-extern void Func_020060d4_b();
-extern void Func_020061e0();
-extern void Func_020061ec();
-extern void Func_02006184();
-extern void Func_0200618c();
-extern void Func_0200615c();
-
-extern u8 *Data_03001ebc;
-
-void Func_02001494(void)
-{
- u8 *workspace;
-
- Func_0200585e(0x89a);
- Func_02005874(30);
- Func_02005926(13, 0, 0);
- Func_02005930(15, 0, 0);
- Func_0200593a(16, 0, 0);
- Func_02005898(20);
- Func_0200599c(13, 128 << 1, 0);
- Func_020059a8(15, 256, 0);
- Func_020059b4(16, 0x80 * 2, 0);
- Func_020058c2(60);
- Func_02005990(0x183b);
- Func_020059b2(13, 0, 20);
- Func_02005984(0, 13, 0);
- Func_02005984_b(15, 1);
- Func_020058ea(20);
- Func_020059d4(15, 0, 20);
- Func_020059a6(0, 15, 0);
- Func_020059a6_b(16, 2);
- Func_0200590c(20);
- Func_020059be(0, 16, 0);
- Func_02005a06(16, 0);
- Func_02005924(50);
- Func_02005a34(16, 1);
- Func_02005976(16, 0xcccc, 0x6666);
- Func_020059a0(16, 176, 248);
- Func_020059ac(16, 154 << 1, 248);
- Func_02005a48(0, 128 << 6, 0);
- Func_02005a54(16, 192 << 8, 20);
- Func_02005b12(158);
- Func_02005934(0x0200c77a, 78, 13);
- Func_02005a1c(16, 2);
- Func_02005982(20);
- Func_020059d0(16, 192 << 9, 192 << 8);
- Func_020059c6(16)[90] &= 0xfe;
- Func_02005a0e(16, 154 << 1, 136 << 1);
- Func_020059b4_b(1);
- Func_020059ea(16)[90] |= 1;
- Func_02005aae(16, 0, 50);
- Func_02005a54_b(17, 152 << 17, 216 << 16);
- Func_02005a48_b(17, 152 << 1, 248);
- Func_02005a9a(9, 17, 0);
- Func_02005aa4(10, 17, 0);
- Func_02005aae_b(11, 17, 0);
- Func_02005ab8(12, 17, 0);
- Func_02005ac2(13, 17, 0);
- Func_02005acc(14, 17, 0);
- Func_02005ad6(15, 17, 0);
- Func_02005ae0(16, 17, 0);
- Func_02005aea(0, 17, 0);
- Func_02005a48_c(10);
- Func_02005ae8(9, 2);
- Func_02005af0(10, 2);
- Func_02005af8(11, 2);
- Func_02005b00(12, 2);
- Func_02005b08(13, 2);
- Func_02005b10(14, 2);
- Func_02005b18(15, 2);
- Func_02005b28(16, 2);
- Func_02005b8a(17, 0x103, 60);
- Func_02005b18_b(18, 152 << 17, 216 << 16);
- Func_02005b04(18, 152 << 1, 248);
- Func_02005b12_b(17, 140 << 1, 132 << 1);
- Func_02005b30(18);
- Func_02005bbc(18, 160 << 7, 0);
- Func_02005b42(17);
- Func_02005c80(159);
- Func_02005aa2(0x0200c790, 78, 13);
- Func_02005bcc(18, 0, 20);
- Func_02005b9e(9, 17, 0);
- Func_02005ba8(10, 17, 0);
- Func_02005bb2(11, 17, 0);
- Func_02005bbc_b(12, 17, 0);
- Func_02005bc6(13, 17, 0);
- Func_02005bd0(14, 17, 0);
- Func_02005bda(15, 17, 0);
- Func_02005be4(16, 17, 0);
- Func_02005bee(0, 17, 0);
- Func_02005b4c(10);
- Func_02005bf4(17, 2);
- Func_02005b5a(20);
- Func_02005bea(18, 4);
- Func_02005b68(20);
- Func_02005c52(18, 0, 20);
- Func_02005c02(17, 3);
- Func_02005b80(20);
- Func_02005c28(18, 1);
- Func_02005b8e(20);
- Func_02005c78(18, 0, 20);
- Func_02005c94(17, 208 << 8, 20);
- Func_02005c8e(17, 0, 20);
- Func_02005cb2(18, 0x102, 60);
- Func_02005ca4(18, 0, 20);
- Func_02005c54(17, 3);
- Func_02005bd2(20);
- Func_02005cbc(17, 0, 20);
- Func_02005c6c(18, 3);
- Func_02005bea_b(20);
- Func_02005cd4(18, 0, 20);
- Func_02005c84(17, 3);
- Func_02005c02_b(20);
- Func_02005c92(18, 4);
- Func_02005c10(20);
- Func_02005cfa(18, 0, 20);
- Func_02005cc2(17, 2);
- Func_02005c28_b(20);
- Func_02005d22(17, 0, 20);
- Func_02005d1c(17, 0, 20);
- Func_02005d38(16, 128 << 8, 20);
- Func_02005cd8(16, 3);
- Func_02005c56(20);
- Func_02005ce6(17, 3);
- Func_02005c82(20);
- Func_02005d6c(17, 0, 20);
- Func_02005d1c_b(16, 3);
- Func_02005c9a(20);
- Func_02005d84(16, 0, 20);
- Func_02005da0(17, 128 << 8, 20);
- Func_02005d9a(17, 0, 20);
- Func_02005d4a(9, 3);
- Func_02005cc8(20);
- Func_02005db2(9, 0, 20);
- Func_02005dce(17, 208 << 8, 20);
- Func_02005d86(17, 1);
- Func_02005cec(20);
- Func_02005dd6(17, 0, 20);
- Func_02005dfa(18, 0x102, 60);
- Func_02005dec(18, 0, 20);
- Func_02005e0e(17, 0x101, 60);
- Func_02005e00(17, 0, 20);
- Func_02005db0(18, 3);
- Func_02005d2e(20);
- Func_02005e18(18, 0, 20);
- Func_02005e3c(17, 0x100, 60);
- Func_02005e2e(17, 0, 20);
- Func_02005dde(18, 4);
- Func_02005d5c(20);
- Func_02005e5e(17, 0x103, 60);
- Func_02005e50(17, 0, 20);
- Func_02005e74(18, 0x100, 60);
- Func_02005e66(18, 0, 20);
- Func_02005e16(17, 4);
- Func_02005d94(20);
- Func_02005e7e(17, 0, 20);
- Func_02005e46(18, 2);
- Func_02005dac(20);
- Func_02005e96(18, 0, 20);
- Func_02005e5e_b(17, 2);
- Func_02005dc4(10);
- Func_02005e32(17, 128 << 1, 140 << 1);
- Func_02005ece(17, 128 << 7, 20);
- Func_02005e60(17, 0, 0);
- Func_02005e26(17);
- Func_02005df4(30);
- Func_02005e9c(9, 2);
- Func_02005e02(20);
- Func_02005eec(9, 0, 20);
- Func_02005eb4(15, 2);
- Func_02005e1a(20);
- Func_02005f04(15, 0, 20);
- Func_02005ed6(16, 18, 0);
- Func_02005e34(20);
- Func_02005edc(16, 2);
- Func_02005e42(20);
- Func_02005f2c(16, 0, 20);
- Func_02005efe(18, 16, 0);
- Func_02005e5c(20);
- Func_02005f46(18, 0, 20);
- Func_02005ef6(18, 4);
- Func_02005e74_b(20);
- Func_02005f5e(18, 0, 20);
- Func_02005f0e(18, 3);
- Func_02005e8c(20);
- Func_02005f76(18, 0, 20);
- Func_02005ee0(18, 0xcccc, 0x6666);
- Func_02005f0c(18, 128 << 1, 248);
- Func_02005fa8(18, 192 << 8, 20);
- Func_02005f58(18, 1);
- Func_02005fc4(18, 0x100, 60);
- Func_02005f36(18, 240, 184);
- Func_02005f7e(18, 2);
- Func_02005ee4(20);
- Func_02005f6a(19, 232 << 16, 168 << 16);
- Func_02005f78(20, 232 << 16, 168 << 16);
- *(s32 *)(Func_02005f36_b(19) + 12) = 192 << 12;
- *(u32 *)(Func_02005f42(19) + 60) = 0x80000000;
- *(s32 *)(Func_02005f4e(19) + 24) = 0xcccc;
- *(u16 *)(*(u8 **)(Func_02005f58_b(19) + 80) + 30) = 128 << 8;
- Func_020060de(124);
- Func_02006020(18, 0, 20);
- Func_0200603c(0, 192 << 8, 20);
- Func_02005fb8(16, 128 << 1, 240);
- Func_02006054(16, 176 << 8, 20);
- Func_0200600c(16, 1);
- Func_02006056(16, 0, 20);
- Func_02006028(9, 0, 0);
- Func_02006032(10, 0, 0);
- Func_0200603c_b(11, 0, 0);
- Func_02006046(12, 0, 0);
- Func_02006050(13, 0, 0);
- Func_0200605a(14, 0, 0);
- Func_02006064(15, 0, 0);
- Func_0200606e(16, 0, 0);
- Func_0200606e_b(18, 2);
- Func_02005fd4(20);
- Func_020060d0(18, 160 << 7, 20);
- Func_0200604a(18, 248, 208);
- Func_020060e6(18, 160 << 7, 20);
- Func_020060ce(18, 0);
- if (Func_02006026(0, 0) == 0) {
- Func_020060b2(16, 1);
- Func_02006018(20);
- Func_0200616e(16, 0, 20);
- Func_02006084(0x898);
- goto skipComplete;
- } else {
- workspace = Data_03001ebc;
- Func_02006032_b(20);
- Func_02006134(18, 0x105, 60);
- Func_02006138(18, 128 << 7, 20);
- Func_020060f0(16, 2);
- Func_02006056_b(20);
- *(u16 *)(workspace + 472) += 1;
- Func_0200612e(16, 0);
- if (Func_02006086(0, 0) == 0) {
- Func_020060fa(16, 3);
- Func_02006078(20);
- Func_02006174(18, 176 << 8, 20);
- Func_0200616e(18, 0, 20);
- Func_02006084(0x898);
- goto skipComplete;
- } else {
- goto secondSkip;
- }
- }
-
-secondSkip:
- *(u16 *)(workspace + 472) += 1;
- Func_020060c6(20);
- Func_02006156(18, 4);
- Func_020060d4(20);
- Func_020061be(18, 0, 20);
- Func_020060d4_b(0x899);
-
-skipComplete:
- Func_020061e0(10, 128 << 8, 0);
- Func_020061ec(11, 128 << 8, 20);
- Func_02006184(10, 5);
- Func_0200618c(11, 5);
- Func_0200615c(12, 0x0200c638);
-}
diff --git a/games/gs1/recon/en/overlays/resource_3a2_c_02000924.c b/games/gs1/recon/en/overlays/resource_3a2_c_02000924.c
deleted file mode 100644
index 6ddd2c0b8..000000000
--- a/games/gs1/recon/en/overlays/resource_3a2_c_02000924.c
+++ /dev/null
@@ -1,397 +0,0 @@
-#include "types.h"
-
-#define RunEventScript01 Func_02000924
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 187 calls, 0 loops, 11 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-s32 Func_02001dfa();
-void Func_02001e24();
-void Func_02001e48();
-void *Func_02001e6e();
-void Func_02001e78();
-void *Func_02001e92();
-void *Func_02001ea2();
-void Func_02001ea4();
-void *Func_02001eb4();
-void *Func_02001ebc();
-void Func_02001ec8();
-void Func_02001ed2();
-void Func_02001ede();
-void Func_02001eea();
-void Func_02001eee();
-void Func_02001f14();
-void Func_02001f2a();
-void Func_02001f3a();
-void Func_02001f3c();
-void Func_02001f3e();
-void Func_02001f48();
-void Func_02001f4a();
-void Func_02001f4e();
-void *Func_02001f50();
-void Func_02001f5c();
-void Func_02001f6a();
-void *Func_02001f70();
-void Func_02001f76();
-void Func_02001f8c();
-void Func_02001f94();
-void Func_02001fa4();
-void Func_02001fb4();
-void Func_02001fd2();
-void Func_02001fd6();
-void Func_02001fe4();
-void Func_02001fe6();
-void Func_02001fe8();
-void Func_02001ff0();
-void Func_02001ff4();
-void Func_02002012();
-void Func_02002014();
-void Func_02002020();
-void Func_02002026();
-void Func_0200202e();
-void Func_02002030();
-void Func_02002038();
-void Func_0200204a();
-void Func_0200204c();
-void Func_02002064();
-void Func_02002066();
-void Func_0200206a();
-void Func_02002082();
-void Func_0200208c();
-void Func_020020ae();
-void Func_020020b0();
-void Func_020020ca();
-void Func_020020d6();
-void Func_020020ea();
-void Func_020020ec();
-void Func_020020f2();
-void Func_020020f4();
-void Func_020020fa();
-void Func_0200210c();
-void Func_02002114();
-void Func_0200211c();
-void Func_02002122();
-void Func_02002124();
-void Func_02002126();
-void Func_02002128();
-void Func_0200212a();
-void Func_02002134();
-void Func_0200213c();
-void Func_02002152();
-void Func_02002158();
-void Func_0200215e();
-void Func_02002164();
-void Func_02002170();
-void Func_02002176();
-void Func_02002184();
-void Func_0200218c();
-void Func_0200219a();
-void Func_020021b6();
-void Func_020021b8();
-void Func_020021be();
-void Func_020021d2();
-void Func_020021d6();
-void Func_020021d8();
-void Func_020021e4();
-void Func_020021ee();
-void Func_020021f4();
-void Func_020021fe();
-void Func_02002200();
-void Func_02002202();
-void Func_0200220c();
-void *Func_02002214();
-void Func_02002218();
-void *Func_02002226();
-void Func_02002230();
-void Func_02002238();
-void Func_02002240();
-void Func_0200224a();
-void Func_0200224c();
-void Func_02002268();
-void Func_0200226e();
-void Func_0200227e();
-void Func_02002284();
-void Func_02002290();
-void Func_0200229a();
-void Func_0200229e();
-void Func_020022a0();
-void Func_020022a2();
-void Func_020022aa();
-void Func_020022b4();
-void Func_020022c2();
-void Func_020022c4();
-void Func_020022d4();
-void Func_020022e0();
-void Func_020022e6();
-void Func_020022e8();
-void Func_020022ec();
-void Func_020022ee();
-void Func_020022f0();
-void Func_020022fa();
-void Func_02002308();
-void Func_02002314();
-void Func_02002326();
-void Func_0200232e();
-void Func_02002344();
-void Func_0200234e();
-void Func_0200235a();
-void Func_0200235e();
-void Func_0200236e();
-void Func_02002376();
-void Func_0200237c();
-void Func_0200237e();
-void Func_02002386();
-void Func_0200238a();
-void Func_0200238e();
-void Func_02002390();
-void Func_0200239e();
-void Func_020023aa();
-void Func_020023ac();
-void Func_020023ae();
-void Func_020023b4();
-void Func_020023bc();
-void Func_020023c2();
-void Func_020023c4();
-void Func_020023cc();
-void Func_020023ce();
-void Func_020023d6();
-void Func_020023e4();
-void Func_02002402();
-void *Func_02002408();
-void Func_0200240a();
-void Func_02002424();
-void Func_0200242a();
-void Func_02002440();
-void Func_02002442();
-void Func_0200244a();
-void Func_02002458();
-void Func_0200245a();
-void Func_0200246c();
-void Func_02002470();
-void Func_02002472();
-void Func_02002476();
-void Func_02002486();
-void Func_02002488();
-void Func_0200248c();
-void Func_02002490();
-void Func_02002492();
-void Func_0200249c();
-void Func_020024b4();
-void Func_020024cc();
-void Func_020024d4();
-void Func_020024e4();
-void Func_020024fc();
-void Func_02002514();
-void Func_02002588();
-
-void RunEventScript01(void)
-{
- void *p10;
- void *p109;
- void *p11;
- void *p110;
- void *p14;
- void *p16;
- void *p169;
- void *p3;
- void *p31;
- void *p8;
-
- if (Func_02001dfa(2202) == 0) {
- } else {
- Func_02001e24();
- p3 = Func_02001e92(10, 35127296, 14155776);
- Func_02001ec8(6325);
- Func_02001eea(10, 0, 20);
- Func_02001ed2(0, 2);
- Func_02001e48(20);
- p8 = Func_02001e6e(0);
- *(s32 *)(p8 + 108) = 33587285;
- Func_02001e78(0);
- p10 = Func_02001ebc(0, 440, 200);
- p11 = Func_02001ea2(10, 131072, 65536);
- Func_02001f4a(10, 2);
- Func_02001ede(10, 408, 216);
- p14 = Func_02001eb4(10);
- *(u8 *)((u8 *)(p14) + 35) |= 0x1;
- Func_02001ea4(10);
- p16 = Func_02001f70(10, 32768, 20);
- Func_02001f6a(10, 0, 20);
- Func_02001f4a(10, 2);
- Func_02001fa4(10, 258);
- Func_02001ed2(60);
- Func_02001f8c(10, 0, 20);
- Func_02001f14(10, 33592876);
- Func_02001fd6(19398656, -1, 22544384, 1);
- Func_02001eee(2224);
- Func_02001f3c(10);
- Func_02001ff0();
- Func_02001f3e(0, 65536, 32768);
- Func_02001f4e(0, 33593016);
- Func_02001f5c(0);
- Func_02001f2a(10);
- p31 = Func_02001f50(0);
- *(s32 *)(p31 + 108) = 0;
- Func_02001f3a(30);
- Func_02001fd2(10, 2);
- Func_02001f48(20);
- Func_02002014(10, 20480, 120);
- Func_0200202e(10, 261, 60);
- Func_02002038(0, 257, 60);
- Func_02001fe8(10, 4);
- Func_02001f76(20);
- Func_02002030(10, 0, 20);
- Func_02001f94();
- }
- Func_02001fb4();
- Func_0200204a(6329);
- Func_0200208c(10, 261, 60);
- Func_02002064(10, 0);
- Func_02001fe4(0, 0);
- Func_02001fe6(20);
- Func_02002066(10, 4);
- Func_02001ff4(20);
- Func_020020ae(10, 0, 20);
- Func_02002012();
- Func_02002020();
- Func_0200211c();
- Func_02002128();
- Func_02002026(30);
- Func_020020f2(0, 24576, 0);
- Func_0200212a(9, 1);
- Func_02002126();
- Func_020020d6(8, 2);
- Func_0200204c(20);
- Func_020020ea(6607);
- Func_0200210c(8, 0, 20);
- Func_020020f4(9, 1);
- Func_0200206a(20);
- Func_02002124(9, 0, 20);
- Func_020020f4(8, 3);
- Func_02002082(20);
- Func_0200213c(8, 0, 20);
- Func_02002158(10, 53248, 20);
- Func_02002152(10, 0, 20);
- Func_02002122(8, 3);
- Func_020020b0(60);
- Func_0200218c(8, 258, 60);
- Func_0200213c(8, 4);
- Func_020020ca(20);
- Func_02002184(8, 0, 20);
- Func_02002164(10, 2);
- Func_020021be(10, 258);
- Func_020020ec(60);
- Func_020021b8(10, 45056, 20);
- Func_02002170(9, 5);
- Func_02002114();
- Func_020020fa(2225);
- Func_02002124();
- Func_020021fe(8, 258);
- Func_020021b6(8, 2);
- Func_02002134(60);
- Func_020021d2(6618);
- Func_020021f4(8, 0, 20);
- Func_02002226(10, 258);
- Func_020021d8(10, 4, 0);
- Func_0200215e(60);
- Func_02002218(10, 0, 20);
- Func_02002200(8, 1);
- Func_02002176(20);
- Func_02002230(8, 0, 20);
- Func_0200224c(10, 53248, 20);
- Func_0200220c(10, 3);
- Func_0200219a(20);
- Func_020021ee(8, 178, 276);
- Func_02002202(10, 172, 284);
- Func_02002218(8);
- Func_02002284(8, 20480, 0);
- Func_02002290(10, 45056, 0);
- Func_020021d6(20);
- Func_0200226e(8, 2);
- Func_020021e4(20);
- Func_0200229e(8, 0, 20);
- p109 = Func_02002214(8);
- *(u8 *)((u8 *)(p109) + 90) &= 0xfe;
- p110 = Func_02002226(10);
- *(u8 *)((u8 *)(p110) + 90) &= 0xfe;
- Func_02002240(8, 13107, 6553);
- Func_0200224a(10, 13107, 6553);
- Func_0200229a(8, 5);
- Func_020022a2(10, 6);
- Func_02002238(20);
- Func_0200236e(125);
- Func_020022a0(8, 2, 0);
- Func_020022aa(9, 2, 0);
- Func_020022b4(10, 2, 0);
- Func_020022c2(10);
- Func_02002268(30);
- Func_020022e0(8, 5);
- Func_020022e8(10, 6);
- Func_0200227e(20);
- Func_020023b4(125);
- Func_020022e6(8, 4, 0);
- Func_020022f0(9, 4, 0);
- Func_020022fa(10, 4, 0);
- Func_02002308(10);
- Func_020022ee(9);
- Func_02002326(8, 1);
- Func_0200232e(10, 1);
- Func_020022c4(50);
- Func_0200234e(10, 2, 0);
- Func_020022d4(20);
- Func_0200238e(10, 0, 20);
- Func_0200235e(8, 3);
- Func_020022ec(20);
- Func_020023ac(8, 0);
- Func_020023ae(8, 0, 20);
- Func_02002376(8, 5);
- Func_0200237e(10, 6);
- Func_02002314(20);
- Func_0200244a(125);
- Func_0200237c(8, 2, 0);
- Func_02002386(9, 2, 0);
- Func_02002390(10, 2, 0);
- Func_0200239e(10);
- Func_02002344(30);
- Func_020023bc(8, 5);
- Func_020023c4(10, 6);
- Func_0200235a(20);
- Func_02002490(125);
- Func_020023c2(8, 4, 0);
- Func_020023cc(9, 4, 0);
- Func_020023d6(10, 4, 0);
- Func_020023e4(10);
- Func_0200238a(40);
- Func_02002402(8, 1);
- Func_0200240a(10, 1);
- Func_02002424(10, 2, 0);
- Func_020023aa(20);
- Func_02002476(10, 53248, 20);
- Func_02002470(10, 0, 20);
- Func_02002440(8, 3);
- Func_020023ce(20);
- Func_02002488(8, 0, 30);
- Func_02002492(8, 0, 20);
- p169 = Func_02002408(10);
- *(u8 *)((u8 *)(p169) + 90) |= 0x1;
- Func_02002424(10, 52428, 26214);
- Func_02002458(10, 168, 296);
- Func_020024d4(10, 53248, 20);
- Func_0200248c(10, 5);
- Func_0200249c(8, 3);
- Func_0200242a(20);
- Func_020024e4(8, 0, 20);
- Func_020024b4(10, 3);
- Func_02002442(20);
- Func_020024fc(10, 0, 20);
- Func_020024cc(8, 3);
- Func_0200245a(20);
- Func_02002514(8, 0, 20);
- Func_020024e4(0, 3);
- Func_02002472(20);
- Func_02002486();
- Func_0200246c(2226);
- Func_02002588(6);
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_3aa_c_02001450.c b/games/gs1/recon/en/overlays/resource_3aa_c_02001450.c
deleted file mode 100644
index 76b051aa5..000000000
--- a/games/gs1/recon/en/overlays/resource_3aa_c_02001450.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include "types.h"
-
-void Func_02002f92(s32, s32, s32);
-void Func_02002f9e(s32, s32, s32);
-void Func_02002faa(s32, s32, s32);
-void Func_02002fb6(s32, s32, s32);
-void Func_02002f08(s32);
-
-#define RunEventScript04 Func_02001450
-
-void RunEventScript04(s32 handoff)
-{
- Func_02002f92(0, 0xc000, 0);
- Func_02002f9e(1, 0xc000, 0);
- Func_02002faa(2, 0xc000, 0);
- Func_02002fb6(3, 0xc000, 0);
- if (handoff != 0) {
- Func_02002f08(handoff);
- }
-}
diff --git a/games/gs1/recon/en/overlays/resource_3ab_c_0200131c.c b/games/gs1/recon/en/overlays/resource_3ab_c_0200131c.c
deleted file mode 100644
index b91c2f27e..000000000
--- a/games/gs1/recon/en/overlays/resource_3ab_c_0200131c.c
+++ /dev/null
@@ -1,171 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunActorDialogueMovementSequence:
- * all 70 calls, two completion waits, and fifteen actor/effect memory
- * operations across the complete actor-0/8/9 presentation owner. */
-
-#define FieldScene_RunActorDialogueMovementSequence Func_0200131c
-
-void Func_02002cfe();
-void Func_02002d00();
-void Func_02002d58();
-void *Func_02002d6e();
-void *Func_02002d7c();
-void *Func_02002d8a();
-void Func_02002d92();
-void Func_02002d9c();
-void Func_02002da6();
-void Func_02002db4();
-void Func_02002dc0();
-void Func_02002dca();
-void Func_02002dd6();
-void Func_02002ddc();
-void Func_02002de0();
-void Func_02002de2();
-void *Func_02002de6();
-void Func_02002df2();
-void Func_02002dfe();
-void Func_02002e06();
-void *Func_02002e0a();
-void *Func_02002e1a();
-void Func_02002e26();
-void Func_02002e32();
-void Func_02002e42();
-void Func_02002e4e();
-void *Func_02002e52();
-void Func_02002e56();
-void *Func_02002e62();
-void *Func_02002e6e();
-void Func_02002e72();
-void *Func_02002e84();
-void Func_02002e86();
-void Func_02002e88();
-void Func_02002e8e();
-void Func_02002e90();
-void Func_02002e96();
-void Func_02002ea8();
-void Func_02002eb0();
-void *Func_02002ec4();
-void Func_02002ecc();
-void *Func_02002ede();
-void Func_02002ee0();
-void Func_02002ee6();
-void Func_02002f12();
-void *Func_02002f1c();
-void Func_02002f26();
-void *Func_02002f2c();
-void Func_02002f2e();
-void Func_02002f44();
-void Func_02002f4a();
-void Func_02002f56();
-void Func_02002f58();
-void Func_02002f5e();
-void Func_02002f60();
-void Func_02002f7a();
-void Func_02002f7e();
-void Func_02002f84();
-void Func_02002f8a();
-void Func_02002f96();
-void Func_02002fa2();
-void Func_02002fa8();
-void Func_02002fc0();
-void Func_02002fc8();
-void Func_02002fd4();
-void Func_02003022();
-void Func_0200302e();
-
-void Func_0200131c(void)
-{
- void *p2;
- void *p26;
- void *p27;
- void *p3;
- void *p34;
- void *p35;
- void *p36;
- void *p4;
- void *p46;
- void *p5;
- void *p57;
- void *p58;
- Func_02002d00();
- p2 = Func_02002d6e(0, 10485760, 8388608);
- p3 = Func_02002d7c(8, 9961472, 7340032);
- p4 = Func_02002d8a(9, 11010048, 7340032);
- p5 = Func_02002de6(0, 16384, 0);
- Func_02002df2(17, 12288, 0);
- Func_02002dfe(18, 20480, 0);
- Func_02002e26(0, 0);
- Func_02002e42();
- Func_02002d58(30);
- Func_02002d92(0, 117964, 58982);
- Func_02002d9c(8, 117964, 58982);
- Func_02002da6(9, 117964, 58982);
- Func_02002dca(8, 152, 288);
- Func_02002dd6(9, 168, 288);
- Func_02002e06(0, 4);
- Func_02002de2(0, 160, 296);
- Func_02002cfe(33591973, 3200);
- Func_02002db4(1);
- Func_02002f12(121);
- Func_02002dc0(20);
- Func_02002e88(8, 3);
- Func_02002e90(9, 3);
- Func_02002f2e(121);
- Func_02002ddc(30);
- p26 = Func_02002e0a(8);
- *(u8 *)((u8 *)(p26) + 35) |= 0x1;
- p27 = Func_02002e1a(9);
- *(u8 *)((u8 *)(p27) + 35) |= 0x1;
- Func_02002e72(0, 4);
- Func_02002f60(121);
- Func_02002e6e(0);
- Func_02002e86(8, 1);
- Func_02002e8e(9, 1);
- Func_02002d7c(33591973);
- p34 = Func_02002e52(0);
- *(u8 *)((u8 *)(p34) + 85) |= 0x2;
- p35 = Func_02002e62(0);
- *(s32 *)(p35 + 40) = 393216;
- p36 = Func_02002e6e(0);
- *(s32 *)(p36 + 44) = 393216;
- Func_02002e4e(1);
- while (*(s32 *)((u8 *)Func_02002e84(0) + 12) != 0) {
- Func_02002e56(1);
- }
- Func_02002f26(0, 49152, 0);
- Func_02002ee6(0, 19);
- Func_02002fd4(127);
- Func_02002f56(0, 258);
- Func_02002de0(33591973, 3200);
- Func_02002e96(2);
- p46 = Func_02002ec4(0);
- *(s32 *)(p46 + 40) = 196608;
- Func_02002ea8(1);
- while (*(s32 *)((u8 *)Func_02002ede(0) + 12) != 0) {
- Func_02002eb0(1);
- }
- Func_02002f96(0, 258);
- Func_02002ecc(10);
- Func_02002f44(0, 1);
- Func_02002e32(33591973);
- Func_02002ee0(50);
- Func_02002f7e();
- Func_02002f96(8, 0);
- p57 = Func_02002f1c(8);
- *(u8 *)((u8 *)(p57) + 35) |= 0x1;
- p58 = Func_02002f2c(9);
- *(u8 *)((u8 *)(p58) + 35) |= 0x1;
- Func_02002f4a(8, 65536, 32768);
- Func_02002f58(9, 65536, 32768);
- Func_02002f7a(8, 144, 200);
- Func_02002f84(9, 176, 200);
- Func_02002fa2(8);
- Func_02002fa8(9);
- Func_02002fc0(8, 1);
- Func_02002fc8(9, 1);
- Func_02002f5e(30);
- Func_02003022(8, 12288, 0);
- Func_0200302e(9, 20480, 0);
- Func_02002f8a();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3b0_c_02000e78.c b/games/gs1/recon/en/overlays/resource_3b0_c_02000e78.c
deleted file mode 100644
index 2413fe74d..000000000
--- a/games/gs1/recon/en/overlays/resource_3b0_c_02000e78.c
+++ /dev/null
@@ -1,135 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunSevenActorEnsemble:
- * Seven actor setup and motion sequences, two scene-workspace state writes,
- * the closing map-state publication, and the final selector branch. */
-
-#define FieldScene_RunSevenActorEnsemble Func_02000e78
-
-void Func_02001926();
-void Func_0200192c();
-void Func_02001932();
-void Func_02001938();
-void Func_0200193e();
-void Func_02001944();
-void Func_0200194a();
-void Func_02002050();
-void Func_02002084();
-void Func_02002090();
-void Func_020020ba();
-s32 Func_020020be();
-void Func_020020f6();
-void Func_02002108();
-void Func_02002112();
-void Func_0200213c();
-void Func_02002142();
-void Func_02002148();
-void Func_0200214e();
-void Func_02002154();
-void Func_0200215a();
-void Func_0200215e();
-void Func_02002160();
-void Func_0200216c();
-s32 Func_02002176();
-void Func_0200217a();
-void Func_02002188();
-void Func_02002196();
-void Func_020021a4();
-void Func_020021b2();
-void Func_020021c0();
-void Func_020021c2();
-void Func_020021ca();
-void Func_020021d2();
-void Func_020021d8();
-void Func_020021da();
-void Func_020021de();
-void Func_020021e2();
-void Func_020021ea();
-void Func_020021f2();
-void Func_0200222a();
-void Func_02002230();
-void Func_02002248();
-void Func_02002256();
-void Func_02002270();
-void Func_02002278();
-void Func_0200227a();
-void Func_0200228c();
-void Func_020022a0();
-void Func_020022b2();
-void Func_0200231c();
-void Func_02002324();
-void Func_02002328();
-void Func_0200232c();
-
-extern u8 *Data_03001ebc;
-extern u16 Data_02000240[];
-
-void Func_02000e78(void)
-{
- s32 ensemble;
- s32 selector;
-
- Func_02002090();
- Func_02002108(0, 15);
- ensemble = Func_020020be(0);
- Func_02002084(ensemble, 0);
- Func_020020ba(33593196);
- Func_02002050(1);
- Func_02001926(9);
- Func_0200192c(10);
- Func_02001932(11);
- Func_02001938(12);
- Func_0200193e(13);
- Func_02001944(14);
- Func_0200194a(15);
- Func_02002112(8, 33592220);
- *(s32 *)(Data_03001ebc + 448) = 515;
- Func_020021ca();
- Func_020021de();
- Func_020020f6(400);
- Func_0200213c(9);
- Func_02002142(10);
- Func_02002148(11);
- Func_0200214e(12);
- Func_02002154(13);
- Func_0200215a(14);
- Func_02002160(15);
- Func_0200215e(9, 196608, 98304);
- Func_0200216c(10, 196608, 98304);
- Func_0200217a(11, 196608, 98304);
- Func_02002188(12, 196608, 98304);
- Func_02002196(13, 196608, 98304);
- Func_020021a4(14, 196608, 98304);
- Func_020021b2(15, 196608, 98304);
- Func_020021c2(9, 33592400);
- Func_020021ca(10, 33592448);
- Func_020021d2(11, 33592496);
- Func_020021da(12, 33592544);
- Func_020021e2(13, 33592592);
- Func_020021ea(14, 33592640);
- Func_020021f2(15, 33592688);
- Func_020021c0(40);
- Func_02002230(8, 3);
- Func_0200227a(8, 258);
- Func_020021d8(120);
- Func_02002248(8, 1);
- Func_0200228c(8, 256, 60);
- Func_0200222a(8, 65536, 32768);
- Func_02002256(8, 164, 344);
- Func_02002270(8, 4, 10);
- Func_0200227a(8, 6, 20);
- Func_020022a0(7908);
- Func_020022b2(8, 0, 20);
- *(s32 *)(Data_03001ebc + 448) = 514;
- Func_0200231c();
- Func_02002328();
- Data_02000240[226] = 111;
- Data_02000240[227] = 2;
- selector = Func_02002176();
- if (selector == 11) {
- Func_02002324(15);
- } else {
- Func_0200232c(14);
- }
- Func_02002278();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3b1_c_02001b34.c b/games/gs1/recon/en/overlays/resource_3b1_c_02001b34.c
deleted file mode 100644
index 9253edc91..000000000
--- a/games/gs1/recon/en/overlays/resource_3b1_c_02001b34.c
+++ /dev/null
@@ -1,228 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunThreeActorPresentation:
- * 107 calls, no loops, and two actor-flag read/modify/write operations
- * across the complete callable owner. */
-
-#define FieldScene_RunThreeActorPresentation Func_02001b34
-
-void Func_020063f0();
-void *Func_02006412();
-void Func_02006418();
-void Func_0200641a();
-void Func_02006448();
-void Func_02006458();
-void Func_02006476();
-void Func_02006484();
-void Func_02006498();
-void Func_020064a6();
-void Func_020064b4();
-void Func_020064ba();
-void Func_020064c8();
-void Func_020064d6();
-void Func_020064e4();
-void Func_020064f2();
-void Func_02006514();
-void Func_02006554();
-void Func_0200656a();
-void Func_02006570();
-void Func_0200658c();
-void Func_0200659a();
-void Func_020065b2();
-void Func_020065ee();
-void Func_020065fe();
-void Func_02006622();
-void Func_02006630();
-void Func_0200664a();
-void Func_02006658();
-void Func_02006720();
-s32 Func_02007fe6();
-void Func_02008018();
-void Func_020080bc();
-void Func_020080f4();
-void Func_02008120();
-void Func_02008122();
-void Func_02008136();
-void Func_02008154();
-void Func_0200815e();
-void Func_0200817c();
-void Func_02008180();
-void Func_02008188();
-void Func_02008192();
-void Func_0200819c();
-void Func_020081b6();
-void Func_020081bc();
-void Func_020081c0();
-void Func_020081c2();
-void Func_020081c6();
-void Func_020081dc();
-void Func_020081e0();
-void Func_020081e6();
-void Func_02008214();
-void Func_02008228();
-void Func_0200825a();
-void Func_02008266();
-void Func_02008268();
-void Func_02008278();
-void Func_02008280();
-void Func_02008286();
-void Func_020082a4();
-void Func_020082a8();
-void Func_020082b8();
-void Func_020082c0();
-void Func_020082c2();
-void Func_020082f2();
-void Func_020082f6();
-void Func_020082fe();
-void Func_02008308();
-void Func_02008312();
-void Func_0200831e();
-void Func_02008320();
-void Func_02008322();
-void Func_02008324();
-void Func_0200832a();
-void Func_0200832c();
-void Func_02008330();
-void *Func_02008336();
-void Func_02008340();
-void Func_02008346();
-void Func_0200834e();
-void *Func_02008358();
-void Func_0200835c();
-void Func_02008366();
-void Func_0200838c();
-void Func_02008394();
-void Func_020083b6();
-void Func_020083b8();
-void Func_020083c6();
-void Func_020083e6();
-void Func_0200840a();
-void Func_0200840e();
-void Func_02008426();
-void Func_02008454();
-void Func_02008460();
-void Func_02008476();
-void Func_020084a8();
-
-void Func_02001b34(void)
-{
- s32 base;
- void *p9;
- void *p91;
- void *p94;
-
- if (Func_02007fe6(2321) == 0) {
- } else {
- Func_02008018();
- Func_0200819c();
- Func_02008154(157286, 19660);
- Func_02006418(95879168, -1, 30408704, 268435476);
- Func_020080f4(13, 1);
- Func_02008122(7510);
- Func_020063f0(8205);
- p9 = Func_02006412(12, 53248);
- base = 32780;
- Func_02008188(12, 258, 20);
- Func_02008120(12, 2);
- Func_0200641a(base);
- Func_02008136(14, 1);
- base = 40974;
- Func_02008180(base, 0, 20);
- Func_02006448(12, 0);
- base = 40974;
- Func_020081bc(12, 257, 40);
- Func_020081c6(14, 259, 40);
- Func_0200815e(14, 3);
- Func_02006458(base);
- Func_020081e6(12, 258);
- Func_020080bc(40);
- Func_0200817c(12, 3);
- Func_02006476(base);
- Func_02008192(14, 1);
- Func_02006484(base);
- Func_020064a6(14, 45056);
- Func_02006498(base);
- Func_020064b4(12, 53248);
- Func_02008228(12, 256, 30);
- Func_020081c0(12, 1);
- Func_020064ba(base);
- Func_020081b6(13, 4);
- Func_020064c8(8205);
- Func_020081dc(13, 2);
- Func_020064d6(8205);
- Func_020081c2(12, 4);
- Func_020064e4(base);
- Func_020081e0(14, 4);
- Func_020064f2(base);
- Func_02006514(14, 32768);
- Func_02008214(14, 2);
- Func_02008266(base, 0, 20);
- Func_02008280(12, 0, 0);
- Func_020082a4(12, 258, 80);
- Func_02008286(base, 0, 20);
- Func_020082b8(14, 259, 0);
- Func_020082c2(13, 259, 60);
- Func_0200825a(14, 2);
- Func_02006554(base);
- Func_02006570(14, 45056);
- Func_02008278(14, 1);
- Func_0200656a(base);
- Func_0200658c(13, 12288);
- Func_020082fe(13, 257, 0);
- Func_02008308(12, 257, 60);
- Func_020082a8(13, 1);
- Func_0200659a(13);
- Func_02008320(14, 259, 40);
- Func_020082c0(14, 1);
- Func_020065b2(base);
- Func_02008320(12, 53248, 0);
- Func_0200832c(13, 20480, 40);
- Func_02008336(12, 0, 0);
- Func_020065ee(13, 12288);
- Func_020082f6(12, 2);
- Func_02008340(base, 0, 20);
- Func_0200835c(14, 16384, 40);
- Func_020065fe(base);
- Func_02008312(12, 2);
- Func_02008322(13, 2);
- Func_02008268(60);
- Func_02008330(13, 1);
- Func_02006622(13);
- Func_0200831e(14, 3);
- Func_02006630(base);
- Func_020083b8(12, 258, 40);
- Func_02008358(12, 2);
- Func_0200664a(base);
- Func_02008346(13, 3);
- Func_02006658(13);
- Func_020083c6(14, 45056, 40);
- Func_0200834e(14, 3);
- Func_02008366(13, 3);
- Func_02008308(14, 104857, 52428);
- Func_02008312(13, 104857, 52428);
- Func_02008324(14, 33613480);
- Func_0200832c(13, 33613480);
- Func_020082f2(20);
- Func_0200840e(12, 16384, 0);
- Func_02008340(0, 157286, 78643);
- p91 = Func_02008336(0);
- *(u8 *)((u8 *)(p91) + 90) &= 0xfe;
- Func_02008394(0, 184, 520);
- Func_0200832a(1);
- p94 = Func_02008358(0);
- *(u8 *)((u8 *)(p94) + 90) |= 0x1;
- Func_02008454(0, 32768, 20);
- Func_02008460(0, 16384, 0);
- Func_0200840a(12, 4, 20);
- Func_02008476(0, 40960, 20);
- Func_02008426(12, 2);
- Func_02006720(12);
- Func_020083b6(12, 104857, 52428);
- Func_020083c6(12, 33613480);
- Func_0200838c(40);
- Func_020084a8(0, 16384, 0);
- Func_020083e6(12);
- Func_0200838c();
- Func_020083b8();
- }
-}
diff --git a/games/gs1/recon/en/overlays/resource_3b1_c_020027d8.c b/games/gs1/recon/en/overlays/resource_3b1_c_020027d8.c
deleted file mode 100644
index e3c1e88c8..000000000
--- a/games/gs1/recon/en/overlays/resource_3b1_c_020027d8.c
+++ /dev/null
@@ -1,446 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunBranchingActorPresentation:
- * all 203 calls, three scene-counter branches, and six nullable actor
- * coordinate transfers across the complete callable owner. */
-
-#define FieldScene_RunBranchingActorPresentation Func_020027d8
-
-void Func_0200707e();
-void Func_0200710c();
-void Func_0200711e();
-void Func_02007160();
-void Func_0200716e();
-void Func_020071be();
-void Func_020071cc();
-void Func_020071e0();
-void Func_02007232();
-void Func_02007246();
-void Func_0200725e();
-void Func_02007264();
-void Func_02007274();
-void Func_0200727a();
-void Func_02007296();
-void Func_0200729c();
-void Func_020072a4();
-void Func_020072b2();
-void Func_020072c8();
-void Func_020072ce();
-void Func_020072de();
-void Func_020072ec();
-void Func_020072fa();
-void Func_02007402();
-void Func_02007410();
-void Func_02007426();
-void Func_02007434();
-void Func_02007442();
-void Func_02007450();
-void Func_0200745e();
-void Func_020074de();
-void Func_020074fe();
-void Func_02007508();
-void Func_02007522();
-void Func_02007540();
-void Func_02007558();
-void Func_02007580();
-void Func_0200758e();
-void Func_020075c2();
-void Func_020075c8();
-void Func_020075d8();
-void Func_020075de();
-void Func_020075e6();
-void Func_02007614();
-void Func_0200761a();
-void Func_02007630();
-void Func_0200768a();
-void Func_02007698();
-void Func_020076c0();
-void Func_020076d6();
-void Func_020076e6();
-void Func_020076f4();
-void Func_0200776c();
-void Func_02007814();
-void Func_02008caa();
-s32 Func_02008d6e();
-void Func_02008d78();
-void Func_02008d7e();
-void Func_02008d92();
-void Func_02008d9a();
-void Func_02008da2();
-void Func_02008daa();
-void Func_02008db4();
-void Func_02008dba();
-void Func_02008de4();
-void Func_02008dfe();
-void Func_02008e16();
-void Func_02008e1a();
-void Func_02008e22();
-void Func_02008e2c();
-void Func_02008e2e();
-void Func_02008e36();
-void Func_02008e3a();
-void Func_02008e46();
-void Func_02008e5c();
-void Func_02008e6e();
-void Func_02008e74();
-void Func_02008e94();
-void Func_02008ec8();
-void Func_02008ed0();
-void Func_02008ede();
-void Func_02008ef4();
-void Func_02008ef6();
-void Func_02008f0c();
-void Func_02008f24();
-void Func_02008f26();
-void Func_02008f3c();
-void Func_02008f4a();
-void Func_02008f56();
-void Func_02008f7c();
-void Func_02008f82();
-void Func_02008f92();
-void Func_02008f96();
-void Func_02008fa4();
-void Func_02008fae();
-void Func_02008fb6();
-void Func_02008fba();
-void *Func_02008fbe();
-void Func_02008fc0();
-void Func_02008fe4();
-void Func_02008fea();
-void Func_02008ff4();
-void *Func_02008ffa();
-void Func_02008ffc();
-void Func_02009026();
-void Func_0200902c();
-void Func_02009030();
-void *Func_02009036();
-void Func_0200905a();
-void Func_02009062();
-void Func_02009064();
-void Func_02009068();
-void Func_0200906c();
-void Func_0200906e();
-void Func_02009078();
-void Func_020090a0();
-void Func_020090a4();
-void Func_020090a8();
-s32 Func_020090b2();
-void Func_020090dc();
-void Func_0200910c();
-void Func_02009118();
-void Func_0200911e();
-void Func_0200914c();
-void Func_02009154();
-void Func_02009156();
-void Func_02009172();
-void Func_02009178();
-void Func_0200917a();
-void Func_020091b6();
-void Func_020091c4();
-void Func_020091d2();
-void Func_020091ec();
-void Func_020091fa();
-void Func_020091fe();
-void Func_02009214();
-void Func_0200921a();
-void Func_02009222();
-void Func_02009224();
-void Func_02009244();
-void Func_0200925e();
-void Func_0200926c();
-void Func_02009270();
-void Func_02009286();
-void Func_020092a4();
-void Func_020092be();
-void Func_020092c6();
-void Func_020092c8();
-void Func_020092d4();
-s32 Func_020092fa();
-void Func_02009308();
-void Func_0200931a();
-void Func_02009350();
-void Func_0200936c();
-void Func_0200936e();
-void Func_02009372();
-void Func_02009382();
-void Func_02009386();
-void Func_0200938c();
-void Func_02009390();
-void Func_02009396();
-void Func_0200939e();
-void Func_020093a0();
-void Func_020093aa();
-void Func_020093b4();
-void Func_020093b6();
-void Func_020093bc();
-void Func_020093c2();
-void Func_020093c4();
-void Func_020093ca();
-void Func_020093d8();
-void *Func_020093dc();
-void Func_020093e4();
-void Func_020093e6();
-void Func_020093e8();
-void Func_020093ec();
-void *Func_0200940c();
-void Func_0200941c();
-void Func_0200941e();
-void Func_0200942c();
-void *Func_0200943c();
-void Func_0200943e();
-void Func_02009448();
-void Func_0200944c();
-void Func_0200944e();
-void Func_02009452();
-void Func_0200945e();
-void Func_0200946e();
-void Func_02009474();
-void Func_0200947c();
-void Func_0200947e();
-void Func_0200948e();
-void Func_0200949e();
-void Func_020094ac();
-void Func_020094bc();
-void Func_020094be();
-
-void Func_020027d8(void)
-{
- s32 base;
- void *actor;
-
- Func_02008caa();
- Func_02008e2e();
- Func_02008d78(8, 0, 0);
- Func_02008de4(8, 256, 40);
- base = 4104;
- Func_02008d7e(8, 3);
- Func_02008db4(7643);
- Func_0200707e(base);
- Func_02008d92(9, 1);
- Func_02008d9a(12, 1);
- Func_02008da2(11, 1);
- Func_02008daa(13, 1);
- Func_02008dba(10, 1);
- Func_02008e16(9, 53248, 0);
- Func_02008e22(12, 53248, 0);
- Func_02008e2e(11, 53248, 0);
- Func_02008e3a(13, 53248, 0);
- Func_02008e46(10, 45056, 20);
- Func_02008dfe(8, 1);
- Func_02008e36(base, 0);
- if (Func_02008d6e(0, 0) == 0) {
- Func_02008e1a(9, 2);
- Func_0200710c(36873);
- Func_02008e94(8, 264, 40);
- Func_0200711e(base);
- (*(u16 *)(*(u32 *)0x03001ebc + 472)) += 2;
- } else {
- (*(u16 *)(*(u32 *)0x03001ebc + 472)) += 2;
- }
- Func_02008e6e(9, 1);
- Func_02007160(36873);
- Func_02008e74(8, 2);
- Func_0200716e(36872);
- Func_02008ef4(13, 261, 40);
- Func_02008f0c(52428, 6553);
- Func_02008f26(30932992, -1, 41680896, 1);
- Func_02008e2c(13, 65536, 32768);
- Func_02008e74(13, 472, 662);
- Func_020071cc(13, 45056);
- Func_020071be(13);
- Func_020071e0(8, 20480);
- Func_02008ec8(8, 3);
- Func_02008ed0(9, 3);
- Func_02008f4a(11, 0, 0);
- Func_02008f56(13, 32768, 20);
- Func_02008ede(11, 3);
- Func_02008ef6(13, 3);
- Func_02008e5c(20);
- Func_02008f24(12, 1);
- Func_02007232(12, 12288);
- Func_02008f7c(4108, 0, 20);
- Func_02008f96(11, 45056, 20);
- Func_02008fba(11, 257, 40);
- Func_02007246(11);
- base = 36876;
- Func_02007264(12, 53248);
- Func_02008f3c(12, 4);
- Func_0200725e(base);
- Func_0200727a(13, 45056);
- Func_02008f82(13, 1);
- Func_02007274(13);
- Func_02008ffc(9, 256, 20);
- Func_0200729c(9, 12288);
- Func_02008fa4(9, 1);
- Func_02007296(9);
- Func_02008f92(12, 3);
- Func_020072a4(base);
- Func_02008fc0(8, 2);
- Func_020072b2(8);
- Func_020072ce(12, 53248);
- Func_02008fb6(12, 3);
- Func_020072c8(base);
- Func_02008fe4(11, 2);
- Func_020072ec(11, 45056);
- Func_020072de(11);
- Func_020072fa(12, 0);
- Func_020072ec(base);
- Func_0200905a(8, 12288, 0);
- Func_02009064(9, 0, 0);
- Func_0200906e(11, 53248, 0);
- Func_02009078(13, 53248, 0);
- Func_02008fae(0, 65536, 32768);
- Func_02008ff4(0, 486, 608);
- Func_020090a0(0, 32768, 0);
- actor = Func_02008fbe(0);
- if (actor != 0) {
- Func_0200902c(1, *(s32 *)((u8 *)actor + 8), *(s32 *)((u8 *)actor + 16));
- }
- Func_02008fea(1, 65536, 32768);
- Func_02009030(1, 486, 624);
- Func_020090dc(1, 32768, 0);
- actor = Func_02008ffa(1);
- if (actor != 0) {
- Func_02009068(2, *(s32 *)((u8 *)actor + 8), *(s32 *)((u8 *)actor + 16));
- }
- Func_02009026(2, 65536, 32768);
- Func_0200906c(2, 486, 640);
- Func_02009118(2, 32768, 0);
- actor = Func_02009036(2);
- if (actor != 0) {
- Func_020090a4(3, *(s32 *)((u8 *)actor + 8), *(s32 *)((u8 *)actor + 16));
- }
- Func_02009062(3, 65536, 32768);
- Func_020090a8(3, 486, 656);
- Func_02009154(3, 32768, 20);
- Func_02009178(12, 264, 40);
- Func_02007402(base);
- Func_0200911e(9, 1);
- Func_02007410(4105);
- Func_0200910c(8, 3);
- Func_02007434(8, 20480);
- Func_02007426(8);
- Func_02007442(8, 12288);
- Func_0200917a(8, 0);
- if (Func_020090b2(0, 0) == 1) {
- Func_02009156(8, 2);
- Func_02007450(8);
- Func_0200914c(12, 3);
- Func_0200745e(base);
- Func_02009172(9, 1);
- Func_020091c4(36873, 0, 40);
- (*(u16 *)(*(u32 *)0x03001ebc + 472))++;
- } else {
- (*(u16 *)(*(u32 *)0x03001ebc + 472)) += 3;
- }
- Func_020091d2(8, 3);
- Func_02009224(8, 0, 40);
- Func_020091ec(13, 1);
- Func_020074de(13);
- Func_020091fa(8, 1);
- Func_02007508(8, 20480);
- Func_020074fe(8);
- Func_0200921a(13, 1);
- Func_02007522(13, 45056);
- Func_0200926c(13, 0, 20);
- Func_02009214(8, 3);
- Func_020091b6(8, 52428, 26214);
- base = 16392;
- Func_020091fe(8, 472, 632);
- Func_02007540(base);
- Func_020092c6(13, 259, 40);
- Func_0200925e(13, 2);
- Func_02007558(13);
- Func_02009244(8, 4);
- Func_020092be(base, 0, 40);
- Func_02009286(11, 1);
- Func_0200758e(11, 45056);
- Func_02007580(4107);
- Func_02009308(10, 258, 20);
- Func_02009222(10, 157286, 78643);
- Func_020092a4(10, 2, 0);
- Func_02009270(10, 462, 674);
- Func_020075c8(10, 45056);
- Func_020092c8(10, 2);
- Func_020075c2(10);
- Func_020075de(9, 20480);
- Func_020092c6(9, 4);
- Func_020075d8(9);
- Func_020092d4(8, 3);
- Func_020075e6(base);
- Func_0200936e(13, 258, 40);
- Func_02009350(13, 0, 40);
- Func_0200761a(9, 12288);
- Func_0200931a(9, 2);
- Func_02007614(4105);
- Func_02007630(12, 0);
- Func_0200938c(8, 32768, 0);
- Func_02009396(9, 20480, 0);
- Func_020093a0(11, 45056, 0);
- Func_020093aa(13, 45056, 0);
- Func_020093b4(10, 45056, 20);
- Func_0200936c(12, 1);
- Func_020093b6(4108, 0, 20);
- Func_020093e8(8, 257, 40);
- Func_0200768a(8, 53248);
- base = 4104;
- Func_020093c2(base, 0);
- if (Func_020092fa(0, 0) == 0) {
- Func_02009386(8, 3);
- base = 4104;
- Func_02007698(base);
- (*(u16 *)(*(u32 *)0x03001ebc + 472))++;
- } else {
- (*(u16 *)(*(u32 *)0x03001ebc + 472))++;
- base = 4104;
- Func_020076c0(base);
- }
- Func_020093bc(0, 3);
- Func_020093c4(8, 3);
- base = 4104;
- Func_020076d6(base);
- Func_020076f4(8, 32768);
- base = 16392;
- Func_020076e6(base);
- Func_0200776c(2, 0, 0);
- Func_020093dc(12, 3);
- Func_020093e4(11, 3);
- Func_020093ec(9, 3);
- Func_0200941c(10, 2);
- Func_0200942c(13, 2);
- Func_02009372(20);
- Func_020093bc(10, 33613540);
- Func_02009382(4);
- Func_020093ca(11, 33613540);
- Func_02009390(4);
- Func_020093d8(12, 33613540);
- Func_0200939e(4);
- Func_020093e6(9, 33613540);
- Func_0200943e(3, 2);
- actor = Func_020093dc(2);
- if (actor != 0) {
- Func_0200941e(3, *(s16 *)((u8 *)actor + 10), *(s16 *)((u8 *)actor + 18));
- }
- Func_0200944c(3);
- Func_0200945e(3, 0, 0);
- Func_0200946e(2, 2);
- actor = Func_0200940c(1);
- if (actor != 0) {
- Func_0200944e(2, *(s16 *)((u8 *)actor + 10), *(s16 *)((u8 *)actor + 18));
- }
- Func_0200947c(2);
- Func_0200948e(2, 0, 0);
- Func_0200949e(1, 2);
- actor = Func_0200943c(0);
- if (actor != 0) {
- Func_0200947e(1, *(s16 *)((u8 *)actor + 10), *(s16 *)((u8 *)actor + 18));
- }
- Func_020094ac(1);
- Func_020094be(1, 0, 0);
- Func_0200947e(13, 33613540);
- Func_020094bc(8, 456, 648);
- Func_02007814(8, 0);
- Func_02009452(232);
- Func_02009448();
- Func_02009474();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3b1_c_020038ac.c b/games/gs1/recon/en/overlays/resource_3b1_c_020038ac.c
deleted file mode 100644
index 00b908930..000000000
--- a/games/gs1/recon/en/overlays/resource_3b1_c_020038ac.c
+++ /dev/null
@@ -1,240 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunActorAvailabilityPresentation:
- * 112 calls, no loops, three actor-coordinate transfers, and the complete
- * presentation sequence across the callable owner. */
-
-#define FieldScene_RunActorAvailabilityPresentation Func_020038ac
-
-void Func_02008188();
-void Func_0200818e();
-void Func_0200819e();
-void Func_020081ae();
-void Func_020081b8();
-void Func_020081c6();
-void Func_02008204();
-void Func_02008212();
-void Func_02008220();
-void Func_0200823c();
-void Func_020082fa();
-void Func_02008312();
-void Func_02008332();
-void Func_02008348();
-void Func_02008352();
-void Func_0200835c();
-void Func_02008366();
-void Func_0200839c();
-void Func_020083b6();
-void Func_020083c4();
-void Func_020083f6();
-void Func_02008400();
-void Func_0200840a();
-void Func_02008438();
-void Func_02008446();
-void Func_02008456();
-void Func_02008478();
-void Func_0200847e();
-void Func_02008498();
-void Func_0200849e();
-void Func_020084ae();
-void Func_020084ca();
-void Func_020084cc();
-void Func_020084fe();
-void Func_02008506();
-void Func_0200858c();
-void Func_02008596();
-void Func_020085dc();
-void Func_02009d84();
-void Func_02009e4c();
-void Func_02009e76();
-void Func_02009e90();
-void Func_02009e9c();
-void Func_02009ea8();
-u8 *Func_02009eaa();
-void Func_02009ed2();
-u8 *Func_02009ede();
-void Func_02009f06();
-void Func_02009f0c();
-void Func_02009f0e();
-u8 *Func_02009f14();
-void Func_02009f18();
-void Func_02009f20();
-void Func_02009f3a();
-void Func_02009f3c();
-void Func_02009f4a();
-void Func_02009f4c();
-void Func_02009f54();
-void Func_02009f7a();
-void Func_02009f80();
-void Func_02009f82();
-void Func_02009fc0();
-void Func_02009ff6();
-void Func_0200a00e();
-void Func_0200a020();
-void Func_0200a026();
-void Func_0200a02e();
-void Func_0200a034();
-void Func_0200a03c();
-void Func_0200a044();
-void Func_0200a04c();
-void Func_0200a04e();
-void Func_0200a058();
-void Func_0200a064();
-void Func_0200a074();
-void Func_0200a088();
-void Func_0200a08a();
-void Func_0200a0a0();
-void Func_0200a0b2();
-void Func_0200a0bc();
-void Func_0200a0e4();
-void Func_0200a0f6();
-void Func_0200a10c();
-void Func_0200a10e();
-void Func_0200a124();
-void Func_0200a132();
-void Func_0200a13c();
-void Func_0200a15e();
-void Func_0200a160();
-void Func_0200a162();
-void Func_0200a166();
-void Func_0200a16c();
-void Func_0200a18a();
-void Func_0200a194();
-void Func_0200a19e();
-void Func_0200a1a2();
-void Func_0200a1a6();
-void Func_0200a1aa();
-void Func_0200a1b2();
-void Func_0200a1b4();
-void Func_0200a1c8();
-void Func_0200a1da();
-void Func_0200a1de();
-void Func_0200a1ea();
-void Func_0200a1ec();
-void Func_0200a214();
-void Func_0200a25c();
-
-void Func_020038ac(void)
-{
- u8 *record;
-
- Func_02009d84();
- Func_020081ae(25, 0, 0);
- Func_020081b8(24, 1, 0);
- Func_0200818e(28835840, -1, 11010048, 16777217);
- Func_02008188(27, 440, 164, 20480);
- Func_0200819e(8, 428, 190, 53248);
- Func_020081ae(9, 452, 190, 45056);
- Func_02009e76(9, 1);
- Func_020081c6(0, 440, 134, 32768);
- *(u32 *)(*(u8 **)0x03001ebc + 448) = 256;
- Func_02009f7a();
- Func_02009e4c(0, 52428, 26214);
- Func_02009e90(0, 408, 134);
- Func_02009e9c(0, 408, 148);
- Func_02009ea8(0, 424, 148);
- Func_02009f54(0, 16384, 20);
- Func_02009f0c(27, 1);
- Func_02009f3a(7719);
- Func_02008204(27);
- Func_02009f20(8, 1);
- Func_02008212(8);
- Func_02009f0e(27, 3);
- Func_02008220(27);
- Func_0200823c(27, 53248);
- record = Func_02009eaa(0);
- if (record != 0) {
- Func_02009f18(1, *(u32 *)(record + 8), *(u32 *)(record + 16));
- }
- Func_02009ed2(1, 52428, 26214);
- Func_02009f14(1, 440, 148);
- Func_02009fc0(1, 16384, 0);
- record = Func_02009ede(1);
- if (record != 0) {
- Func_02009f4c(2, *(u32 *)(record + 8), *(u32 *)(record + 16));
- }
- Func_02009f06(2, 52428, 26214);
- Func_02009f4a(2, 456, 148);
- Func_02009ff6(2, 16384, 0);
- record = Func_02009f14(2);
- if (record != 0) {
- Func_02009f82(3, *(u32 *)(record + 8), *(u32 *)(record + 16));
- }
- Func_02009f3c(3, 52428, 26214);
- Func_02009f80(3, 472, 148);
- Func_0200a02e(3, 16384, 20);
- Func_02008352(0, 0, 60);
- Func_0200835c(1, 16384, 20);
- Func_02008366(2, 1, 20);
- Func_0200a058(27, 20480, 20);
- Func_020082fa(27);
- Func_0200a00e(9, 1);
- Func_0200a088(9, 256, 40);
- Func_02008312(9);
- Func_0200a026(1, 3);
- Func_0200a0a0(1, 259, 60);
- Func_0200a020(27, 3);
- Func_02008332(27);
- Func_0200a04e(10, 1);
- Func_0200a026(10, 3);
- Func_02008348(10);
- Func_0200a034(8, 3);
- Func_0200a03c(9, 3);
- Func_0200a044(11, 3);
- Func_0200a04c(12, 3);
- Func_0200a064(13, 3);
- Func_020083f6(0, 0, 40);
- Func_02008400(2, 1, 0);
- Func_0200840a(1, 16384, 20);
- Func_0200a08a(27, 4);
- Func_0200839c(27);
- Func_0200a124(8, 258, 60);
- Func_0200a0bc(8, 1);
- Func_020083b6(8);
- Func_0200a0b2(27, 3);
- Func_020083c4(27);
- Func_0200a132(8, 0, 0);
- Func_0200a13c(9, 32768, 40);
- Func_0200a160(8, 258, 0);
- Func_0200a16c(8, 258, 40);
- Func_0200a10c(27, 1);
- Func_0200a0e4(27, 3);
- Func_0200a15e(27, 0, 20);
- Func_0200a0f6(8, 3);
- Func_0200a10e(9, 3);
- Func_0200a074(40);
- Func_0200a1a6(9, 256, 20);
- Func_02008446(9, 45056);
- Func_02008438(9);
- Func_02008456(27, 12288);
- Func_0200a1c8(27, 257, 60);
- Func_0200a1aa(27, 0, 60);
- Func_0200a1de(27, 262, 20);
- Func_0200847e(27, 45056);
- Func_0200a166(27, 3);
- Func_02008478(27);
- Func_020084fe(3, 2, 80);
- Func_0200849e(8, 53248);
- Func_0200a19e(8, 2);
- Func_02008498(8);
- Func_0200a194(9, 3);
- Func_0200a1b4(9, 2);
- Func_020084ae(9);
- Func_020084ca(27, 20480);
- Func_0200a1b2(27, 3);
- Func_0200a1da(27, 1);
- Func_020084cc(27);
- Func_0200a162(27, 52428, 26214);
- Func_0200a1a6(27, 408, 158);
- Func_0200a1b2(27, 408, 148);
- Func_0200a25c(27, 0, 20);
- Func_0200a214(27, 1);
- Func_02008506(27);
- Func_0200858c(1, 32768, 20);
- Func_02008596(2, 1, 0);
- Func_0200a1ea(27, 408, 134);
- Func_0200a1ec(27, 440, 134);
- Func_0200a18a(40);
- Func_020085dc(9, 10, 0);
- Func_0200a1a2(2342);
-}
diff --git a/games/gs1/recon/en/overlays/resource_3b1_c_020057ec.c b/games/gs1/recon/en/overlays/resource_3b1_c_020057ec.c
deleted file mode 100644
index 5706fd390..000000000
--- a/games/gs1/recon/en/overlays/resource_3b1_c_020057ec.c
+++ /dev/null
@@ -1,238 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunExtendedFormationPresentation:
- * 112 calls, no loops, three preserved actor handles, and the terminal
- * presentation-state clear across the complete callable owner. */
-
-#define FieldScene_RunExtendedFormationPresentation Func_020057ec
-
-void Func_02009ed8();
-void Func_0200a106();
-void Func_0200a110();
-void Func_0200a126();
-void Func_0200a16c();
-void Func_0200a186();
-void Func_0200a188();
-void Func_0200a212();
-void Func_0200a218();
-void Func_0200a2a6();
-void Func_0200a2ac();
-void Func_0200a37a();
-void Func_0200a384();
-void Func_0200a38e();
-void Func_0200a398();
-void Func_0200a3dc();
-void Func_0200a3e2();
-void Func_0200a402();
-void Func_0200a4e8();
-s32 Func_0200a7a2();
-s32 Func_0200a7ac();
-s32 Func_0200a7b6();
-void Func_0200bcdc();
-void Func_0200bce0();
-void Func_0200bd28();
-void Func_0200bd38();
-void Func_0200bd42();
-void Func_0200bd54();
-void Func_0200bd64();
-void Func_0200bd66();
-void Func_0200bd76();
-void Func_0200bd7e();
-void Func_0200bd8e();
-void Func_0200bd92();
-void Func_0200bd94();
-void Func_0200bdbe();
-void Func_0200bdec();
-void Func_0200be84();
-void Func_0200be88();
-void Func_0200beb4();
-void Func_0200bed6();
-void Func_0200bee6();
-void Func_0200beea();
-void Func_0200bef0();
-void Func_0200bef8();
-void Func_0200bf04();
-void Func_0200bf0e();
-void Func_0200bf1a();
-void Func_0200bf1c();
-void Func_0200bf20();
-void Func_0200bf24();
-void Func_0200bf26();
-void Func_0200bf2e();
-void Func_0200bf30();
-void Func_0200bf3a();
-void Func_0200bf3e();
-void Func_0200bf42();
-void Func_0200bf46();
-void Func_0200bf48();
-void Func_0200bf52();
-void Func_0200bf76();
-void Func_0200bf94();
-void Func_0200bfa0();
-void Func_0200bfac();
-void Func_0200bfb8();
-void Func_0200bfba();
-void Func_0200bfc2();
-void Func_0200bfc4();
-void Func_0200bfca();
-void Func_0200bfda();
-void Func_0200c01e();
-void Func_0200c054();
-void Func_0200c05e();
-void Func_0200c068();
-void Func_0200c072();
-void Func_0200c07e();
-void Func_0200c080();
-void Func_0200c08c();
-void Func_0200c08e();
-void Func_0200c098();
-void Func_0200c09c();
-void Func_0200c0a2();
-void Func_0200c0a4();
-void Func_0200c0a6();
-void Func_0200c0ae();
-void Func_0200c0b2();
-void Func_0200c0ba();
-void Func_0200c0bc();
-void Func_0200c0be();
-void Func_0200c0c2();
-void Func_0200c0c4();
-void Func_0200c0c8();
-void Func_0200c0d0();
-void Func_0200c0d8();
-void Func_0200c0da();
-void Func_0200c0e2();
-void Func_0200c0e6();
-void Func_0200c0ea();
-void Func_0200c0ec();
-void Func_0200c0ee();
-void Func_0200c0f0();
-void Func_0200c0f6();
-void Func_0200c0f8();
-void Func_0200c102();
-void Func_0200c104();
-void Func_0200c110();
-void Func_0200c116();
-void Func_0200c14a();
-void Func_0200c2de();
-
-void Func_020057ec(void)
-{
- s32 actor0;
- s32 actor1;
- s32 actor2;
-
- actor0 = Func_0200a7a2(0, 0);
- actor1 = Func_0200a7ac(1, 0);
- actor2 = Func_0200a7b6(2, 0);
- Func_0200bcdc();
- Func_0200a106(10, 0, 0);
- Func_0200a110(17, 0, 0);
- Func_0200bd7e(8, 30932992, 9961472);
- Func_0200bd8e(9, 5);
- Func_0200bd94(27, 28835840, 8781824);
- Func_0200bdec(27, 15);
- Func_0200bd42(27);
- Func_0200bce0(0);
- Func_02009ed8(16);
- Func_0200a126(28704768, -1, 11403264, 16777217);
- Func_0200a16c(8, 1, 20);
- Func_0200beea(19);
- Func_0200bef0(181);
- Func_0200bd28(131072, 131072, 65536);
- Func_0200bd66(10);
- Func_0200bd38(-1, -1, 58982);
- Func_0200bd76(80);
- Func_0200bf1c(181);
- Func_0200bd54(131072, 131072, 65536);
- Func_0200bd92(10);
- Func_0200bd64(-1, -1, 58982);
- Func_0200bf42(63);
- Func_0200bd92(282);
- Func_0200bee6(3, 258);
- Func_0200bdbe(40);
- Func_0200a186(3, 24576);
- Func_0200beb4(7873);
- Func_0200bed6(3, 0, 40);
- Func_0200a188(27);
- Func_0200bef8(0, 8192, 0);
- Func_0200bf04(1, 40960, 0);
- Func_0200bf0e(2, 0, 0);
- Func_0200bf1a(3, 57344, 40);
- Func_0200bf24(0, 24576, 0);
- Func_0200bf30(1, 57344, 0);
- Func_0200bf3a(2, 24576, 0);
- Func_0200bf46(3, 32768, 40);
- Func_0200bf52(2, 57344, 0);
- Func_0200bf76(2, 256, 60);
- Func_0200a218(2, 8192);
- Func_0200bf20(2, 1);
- Func_0200a212(2);
- Func_0200bf26(0, 1);
- Func_0200bf2e(1, 1);
- Func_0200bf3e(3, 1);
- Func_0200be84(10);
- Func_0200bfa0(0, 49152, 0);
- Func_0200bfac(1, 49152, 0);
- Func_0200bfb8(2, 57344, 0);
- Func_0200bfc4(3, 40960, 20);
- Func_0200bf94(27, 0);
- Func_0200beea(27);
- Func_0200be88(1);
- Func_0200bf0e(27, 65536, 32768);
- Func_0200bf52(27, 430, 134);
- Func_0200a2ac(27, 12288);
- Func_0200bfac(27, 2);
- Func_0200a2a6(27);
- Func_0200bfba(actor0, 1);
- Func_0200bfc2(actor1, 1);
- Func_0200bfca(actor2, 1);
- Func_0200bfda(13, 1);
- Func_0200c054(actor0, 258);
- Func_0200c05e(actor1, 258);
- Func_0200c068(actor2, 258);
- Func_0200c072(13, 258);
- Func_0200bf48(40);
- Func_0200a37a(12, actor0, 0);
- Func_0200a384(12, actor1, 1);
- Func_0200a38e(12, actor2, 0);
- Func_0200a398(11, 1, 0);
- Func_0200c08c(actor0, 53248, 0);
- Func_0200c098(actor1, 45056, 0);
- Func_0200c0a4(actor2, 53248, 0);
- Func_0200c0ae(0, 0, 0);
- Func_0200c0ba(1, 32768, 0);
- Func_0200c0c4(2, 0, 0);
- Func_0200c0d0(3, 32768, 40);
- Func_0200c080(27, 2);
- Func_0200c0c8(27, 0);
- Func_0200c0ec(0, 49152, 0);
- Func_0200c0f8(1, 49152, 0);
- Func_0200c104(2, 49152, 0);
- Func_0200c110(3, 49152, 20);
- Func_0200c07e(27, 440, 134);
- Func_0200c0a2(27, 0, 0);
- Func_0200a3e2(1, 32768);
- Func_0200c0ea(1, 1);
- Func_0200a3dc(1);
- Func_0200c14a(2, 0, 0);
- Func_0200a402(3, 32768);
- Func_0200c0da(0, 3);
- Func_0200c0e2(1, 3);
- Func_0200c0ea(2, 3);
- Func_0200c102(3, 3);
- Func_0200c0a6(1, 65536, 32768);
- Func_0200c0b2(2, 65536, 32768);
- Func_0200c0be(3, 65536, 32768);
- Func_0200c0d0(1);
- Func_0200c0d8(2);
- Func_0200c0f0(3);
- Func_0200c08e(770);
- *(u32 *)0x0200ff84 = 0;
- Func_0200c01e(33610825, 3200, 33619844, 0);
- Func_0200a4e8(23, 0, 0);
- Func_0200c0f6(27);
- Func_0200c0bc(303);
- Func_0200c0c2(2343);
- Func_0200c0e6();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3b1_c_02005d10.c b/games/gs1/recon/en/overlays/resource_3b1_c_02005d10.c
deleted file mode 100644
index 1530b7c05..000000000
--- a/games/gs1/recon/en/overlays/resource_3b1_c_02005d10.c
+++ /dev/null
@@ -1,271 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunFourActorProgressPresentation:
- * 87 calls, no loops, four preserved actor handles, two progress-dependent
- * workspace updates, and the complete presentation sequence. */
-
-#define FieldScene_RunFourActorProgressPresentation Func_02005d10
-
-void Func_020094fa();
-void Func_0200a400();
-void Func_0200a638();
-void Func_0200a642();
-void Func_0200a656();
-void Func_0200a67a();
-void Func_0200a69c();
-void Func_0200a706();
-void Func_0200a710();
-void Func_0200a71a();
-void Func_0200a724();
-void Func_0200a72e();
-void Func_0200a746();
-void Func_0200a75a();
-void Func_0200a790();
-void Func_0200a818();
-void Func_0200a826();
-void Func_0200a99a();
-void Func_0200a9f2();
-void Func_0200aa06();
-void Func_0200aa12();
-void Func_0200aa3a();
-void Func_0200ab22();
-void Func_0200ab48();
-void Func_0200ab92();
-s32 Func_0200acc6();
-s32 Func_0200acd0();
-s32 Func_0200acda();
-s32 Func_0200ace4();
-void Func_0200b0cc();
-void Func_0200b0d6();
-void Func_0200b0e0();
-void Func_0200b0ea();
-void Func_0200c20a();
-void Func_0200c248();
-void Func_0200c26c();
-void Func_0200c2aa();
-void Func_0200c2b0();
-void Func_0200c2be();
-void Func_0200c2ce();
-void Func_0200c2d4();
-void Func_0200c2e8();
-void Func_0200c312();
-void Func_0200c316();
-s32 Func_0200c31e();
-s32 Func_0200c32c();
-s32 Func_0200c336();
-void Func_0200c354();
-void Func_0200c37a();
-void Func_0200c3b0();
-void Func_0200c3ca();
-s32 Func_0200c3f2();
-s32 Func_0200c3fc();
-void Func_0200c408();
-void Func_0200c422();
-void Func_0200c424();
-void Func_0200c42e();
-void Func_0200c432();
-void Func_0200c43a();
-void Func_0200c446();
-void Func_0200c448();
-void Func_0200c44c();
-void Func_0200c460();
-void Func_0200c46c();
-void Func_0200c488();
-void Func_0200c4b2();
-void Func_0200c4d4();
-void Func_0200c4e2();
-void Func_0200c4ee();
-void Func_0200c4fa();
-void Func_0200c502();
-void Func_0200c506();
-void Func_0200c510();
-void Func_0200c51e();
-void Func_0200c52c();
-void Func_0200c53c();
-void Func_0200c554();
-void Func_0200c55c();
-void Func_0200c568();
-void Func_0200c56a();
-void Func_0200c56c();
-void Func_0200c574();
-void Func_0200c576();
-void Func_0200c578();
-void Func_0200c586();
-void Func_0200c598();
-void Func_0200c59a();
-void Func_0200c5a0();
-void Func_0200c5aa();
-void Func_0200c5b6();
-void Func_0200c5b8();
-void Func_0200c5c2();
-void Func_0200c5ce();
-void Func_0200c5da();
-void Func_0200c610();
-void Func_0200c652();
-void Func_0200c68c();
-void Func_0200c6fe();
-void Func_0200c70c();
-void Func_0200c712();
-void Func_0200c71a();
-void Func_0200c71c();
-void Func_0200c726();
-void Func_0200c728();
-void Func_0200c72e();
-void Func_0200c736();
-void Func_0200c746();
-void Func_0200c748();
-void Func_0200c764();
-void Func_0200c770();
-void Func_0200c77c();
-void Func_0200c790();
-void Func_0200c7a6();
-void Func_0200c7b2();
-void Func_0200c7b8();
-void Func_0200c7bc();
-void Func_0200c7c0();
-void Func_0200c7c8();
-void Func_0200c7cc();
-void Func_0200c80e();
-void Func_0200c816();
-void Func_0200c81e();
-void Func_0200c826();
-void Func_0200c828();
-void Func_0200c830();
-void Func_0200c834();
-void Func_0200c836();
-void Func_0200c83c();
-void Func_0200c844();
-void Func_0200c854();
-void Func_0200c85e();
-void Func_0200c860();
-void Func_0200c868();
-void Func_0200c86c();
-void Func_0200c874();
-void Func_0200c878();
-void Func_0200c87a();
-void Func_0200c882();
-void Func_0200c896();
-void Func_0200c8da();
-void Func_0200c992();
-void Func_0200c996();
-void Func_0200c99e();
-
-void Func_02005d10(void)
-{
- s32 actor0;
- s32 actor1;
- s32 actor2;
- s32 actor3;
- s32 progress;
-
- actor0 = Func_0200acc6(0, 0);
- actor1 = Func_0200acd0(1, 0);
- actor2 = Func_0200acda(2, 0);
- actor3 = Func_0200ace4(3, 0);
- Func_0200c20a(0);
- Func_020094fa();
- Func_0200a638(10, 0, 0);
- Func_0200a642(17, 0, 0);
- Func_0200c2b0(8, 30932992, 9961472);
- Func_0200c2be(27, 28835840, 8781824);
- Func_0200c316(27, 15);
- Func_0200c26c(27);
- Func_0200c20a();
- Func_0200a400(16);
- Func_0200c2e8(9, 5);
- Func_0200a656(28704768, -1, 11403264, 16777217);
- Func_0200a69c(8, 1, 20);
- Func_0200c354(27, 0);
- Func_0200c2aa(27);
- Func_0200c248(1);
- Func_0200c2ce(27, 65536, 32768);
- Func_0200c312(27, 408, 132);
- Func_0200c31e(27, 408, 142);
- Func_0200c3ca(27, 12288, 20);
- Func_0200c37a(27, 2);
- Func_0200c3b0(7977);
- Func_0200a67a(27);
- Func_0200c2d4(120);
- Func_0200a706(12, actor0, 0);
- Func_0200a710(12, actor1, 1);
- Func_0200a71a(12, actor2, 0);
- Func_0200a724(12, actor3, 1);
- Func_0200a72e(11, 0, 0);
- Func_0200c422(actor0, 53248, 0);
- Func_0200c42e(actor1, 45056, 0);
- Func_0200c43a(actor2, 53248, 0);
- Func_0200c446(actor3, 45056, 60);
- progress = 0;
- if (Func_0200c31e(2356) != 0) {
- progress = 2;
- } else {
- if (Func_0200c32c(2355) == 0) {
- if (Func_0200c336(2351) != 0) {
- progress = 1;
- }
- } else {
- progress = 1;
- }
- }
- Func_0200c424(actor0, 1);
- if (progress == 1) {
- (*(u16 *)(*(u32 *)0x03001ebc + 472))++;
- } else if (progress == 2) {
- (*(u16 *)(*(u32 *)0x03001ebc + 472)) += 2;
- }
- Func_0200c44c(actor0, 2);
- Func_0200a746(actor0);
- Func_0200c488(7981);
- Func_0200c448(27, 4);
- Func_0200a75a(27);
- Func_0200c4e2(actor0, 258, 0);
- Func_0200c4ee(actor1, 258, 0);
- Func_0200c4fa(actor2, 258, 0);
- Func_0200c506(actor3, 258, 60);
- Func_0200a790(27);
- Func_0200c460(27, 408, 132);
- Func_0200c46c(27, 444, 132);
- Func_0200c432(27);
- Func_0200c408(40);
- if (progress == 0 &&
- (Func_0200c3f2(2348) != 0 || Func_0200c3fc(2349) != 0)) {
- progress = 3;
- }
- if (progress == 0) {
- (*(u16 *)(*(u32 *)0x03001ebc + 472))++;
- } else if (progress == 1) {
- (*(u16 *)(*(u32 *)0x03001ebc + 472)) += 2;
- } else if (progress == 2) {
- (*(u16 *)(*(u32 *)0x03001ebc + 472)) += 3;
- }
- Func_0200a826(actor0, 0);
- Func_0200a818(actor0);
- Func_0200c4b2(actor0, 65536, 32768);
- Func_0200c4d4(actor0, 0x0200e904);
- Func_0200c5a0(actor1, 20480, 0);
- Func_0200c5aa(actor2, 0, 0);
- Func_0200c5b6(actor3, 32768, 40);
- Func_0200c5c2(actor1, 53248, 0);
- Func_0200c5ce(actor2, 45056, 0);
- Func_0200c5da(actor3, 20480, 20);
- Func_0200c510(actor1, 65536, 32768);
- Func_0200c51e(actor2, 65536, 32768);
- Func_0200c52c(actor3, 65536, 32768);
- Func_0200c53c(actor2, 0x0200e904);
- Func_0200c502(40);
- Func_0200c55c(actor1, 0x0200e938);
- Func_0200c554(actor1, 0x0200e904);
- Func_0200c56c(actor3, 0x0200e7c8);
- Func_0200c574(actor3, 0x0200e904);
- Func_0200c56a(1, 65536, 32768);
- Func_0200c578(2, 65536, 32768);
- Func_0200c586(3, 65536, 32768);
- Func_0200c598(1);
- Func_0200c5a0(2);
- Func_0200c5b8(3);
- Func_0200a99a(23, 0, 0);
- Func_0200c568(2343);
- Func_0200c568(2208);
- Func_0200c576(303);
- Func_0200c59a();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3ba_c_02001214.c b/games/gs1/recon/en/overlays/resource_3ba_c_02001214.c
deleted file mode 100644
index 478b3e961..000000000
--- a/games/gs1/recon/en/overlays/resource_3ba_c_02001214.c
+++ /dev/null
@@ -1,116 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunMapEntranceCoordinator:
- * A phase-two fast path, full-presentation and short-revisit branches, and
- * all 46 calls across the complete map-entrance owner. */
-
-#define FieldScene_RunMapEntranceCoordinator Func_02001214
-
-void Func_02002d86();
-s32 Func_02002f9c();
-void Func_020031cc();
-void Func_02003246();
-void Func_02003b8c();
-void Func_02003e7a();
-void Func_02003ece();
-void Func_02003ed8();
-void Func_02003f1a();
-void Func_02003f24();
-void Func_02004146();
-void Func_02004150();
-void Func_0200415c();
-void Func_02004c14();
-void Func_02004c1e();
-void Func_02004c60();
-void Func_02004c6a();
-void Func_02004ed0();
-void Func_02004f34();
-void Func_02004f52();
-void Func_02004f5a();
-void Func_02004f76();
-void Func_02004f7e();
-void Func_02004fa4();
-void Func_02004fb0();
-void Func_02004fb4();
-void Func_02004fc2();
-void Func_02004fdc();
-void Func_02004fe8();
-void Func_02004ff0();
-void Func_02005002();
-void Func_02005008();
-void Func_0200501e();
-void Func_0200502e();
-void Func_02005038();
-void Func_0200503a();
-void Func_02005042();
-void Func_02005068();
-void Func_02005076();
-void Func_02005080();
-void Func_0200509c();
-void Func_020050b4();
-void Func_020050c8();
-void Func_020050e8();
-void Func_020050fe();
-void Func_02005100();
-
-extern s16 Data_02000240[];
-
-#define MapTransition_Phase Data_02000240[225]
-
-void Func_02001214(s32 scene)
-{
- s32 path;
-
- if (MapTransition_Phase == 2) {
- Func_02002d86();
- return;
- }
- Func_02004ed0();
- path = Func_02002f9c(scene, 1);
- if (path == 0) {
- Func_02004f76(8332);
- Func_02004fc2(196608, 24576);
- Func_02004fdc(21495808, -1, 11010048, 1);
- Func_02004fe8();
- Func_02004fb0(scene, 0);
- Func_02003b8c(0, 280, 200);
- Func_02004f52(0, 65536, 32768);
- Func_02004f7e(0, 360, 200);
- Func_02004f34(30);
- Func_02005008(0, 258, 60);
- Func_02004ff0(scene, 0);
- Func_02004fa4(0, 312, 200);
- Func_02004f5a(30);
- Func_0200501e(0, 49152, 10);
- Func_0200503a(0, 262, 60);
- Func_02004fb4(0, 98304, 49152);
- Func_02004146(0, 296, 184);
- Func_02004150(0, 296, 152);
- Func_0200415c(0, 312, 152);
- Func_02005068(0, 16384, 15);
- Func_02004c14();
- Func_02003ece(0);
- Func_02004c1e();
- Func_02003ed8(0);
- Func_02005002(0, 98304, 49152);
- Func_0200502e(0, 304, 184);
- Func_02005038(0, 296, 192);
- Func_02005042(0, 296, 200);
- Func_020050b4(0, 0, 15);
- Func_02004c60();
- Func_02003f1a(0);
- Func_02004c6a();
- Func_02003f24(0);
- Func_02005080(0, 1);
- Func_020050c8(scene, 0);
- Func_02003e7a(0);
- Func_020050fe(0, 0);
- Func_0200509c(9, 20447232, 11010048);
- Func_020031cc(scene, 1);
- } else if (path == 1) {
- Func_020050e8(8331);
- Func_02005100(scene, 0);
- }
- Func_02003246(path, scene, 1);
- Func_02005076();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3ba_c_020016ec.c b/games/gs1/recon/en/overlays/resource_3ba_c_020016ec.c
deleted file mode 100644
index 98b2396bc..000000000
--- a/games/gs1/recon/en/overlays/resource_3ba_c_020016ec.c
+++ /dev/null
@@ -1,102 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunSceneFourCoordinator:
- * A phase-two fast path, full and revisit branches, and all 42 calls across
- * the complete scene-four coordinator. */
-
-#define FieldScene_RunSceneFourCoordinator Func_020016ec
-
-void Func_02001b18();
-void Func_0200325e();
-s32 Func_02003474();
-void Func_02003680();
-void Func_020036fa();
-void Func_02004080();
-void Func_0200432e();
-void Func_0200447a();
-void Func_02004546();
-void Func_02004606();
-void Func_02004610();
-void Func_0200461c();
-void Func_020053a8();
-void Func_020053fc();
-void Func_0200544e();
-void Func_0200546a();
-void Func_02005474();
-void Func_02005488();
-void Func_02005494();
-void Func_0200549a();
-void Func_020054b4();
-void Func_020054c0();
-void Func_020054c2();
-void Func_020054ca();
-void Func_020054d2();
-void Func_020054de();
-void Func_020054f6();
-void Func_020054fa();
-void Func_020054fe();
-void Func_0200552a();
-void Func_02005550();
-void Func_02005566();
-void Func_02005578();
-void Func_0200557c();
-void Func_02005594();
-void Func_0200559c();
-void Func_020055b2();
-void Func_020055b4();
-
-extern s16 Data_02000240[];
-
-#define SceneTransition_Phase Data_02000240[225]
-
-void Func_020016ec(s32 scene)
-{
- s32 path;
-
- if (SceneTransition_Phase == 2) {
- Func_0200325e();
- return;
- }
- Func_020053a8();
- path = Func_02003474(scene, 4);
- if (path == 0) {
- Func_0200544e(8345);
- Func_0200549a(196608, 24576);
- Func_020054b4(71303168, -1, 11010048, 1);
- Func_020054c0();
- Func_02005488(scene, 0);
- Func_0200447a(120, 72, 0);
- Func_0200549a(scene, 0);
- Func_02004546();
- Func_020053fc(15);
- Func_02004080(0, 984, 200);
- Func_020054ca(0, 0, 10);
- Func_020054c2(scene, 0);
- Func_020054de(0, 16384, 30);
- Func_020054fa(0, 262, 60);
- Func_02005474(0, 98304, 49152);
- Func_02004606(0, 1000, 192);
- Func_02004610(0, 1000, 176);
- Func_0200461c(0, 1016, 168);
- Func_0200546a(15);
- Func_02001b18(18, 160, 0);
- Func_02005566(71303168, -1, 11010048, 1);
- Func_020054f6(0, 1);
- Func_02005494(10);
- Func_020054d2(0, 65536, 32768);
- Func_020054fe(0, 1192, 168);
- Func_020054b4(10);
- Func_02005578(0, 32768, 30);
- Func_02005594(0, 258, 60);
- Func_0200557c(scene, 0);
- Func_0200432e(0);
- Func_020055b2(0, 0);
- Func_02005550(18, 66584576, 11010048);
- Func_02003680(scene, 4);
- } else if (path == 1) {
- Func_0200559c(8344);
- Func_020055b4(scene, 0);
- }
- Func_020036fa(path, scene, 4);
- Func_0200552a();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3ba_c_02002844.c b/games/gs1/recon/en/overlays/resource_3ba_c_02002844.c
deleted file mode 100644
index 1bb8d9ddb..000000000
--- a/games/gs1/recon/en/overlays/resource_3ba_c_02002844.c
+++ /dev/null
@@ -1,134 +0,0 @@
-#include "types.h"
-
-#define FieldScene_RunLateSequence Func_02002844
-
-/* Audited retained field-scene body at 0x02002844.
- * The complete production body preserves 43 decoded calls, 1 loop(s), and 37 explicit memory operation(s).
- * Approved GCC changes scheduling, allocation, control-flow lowering, and
- * literal placement, so the reviewed assembly remains authoritative. */
-
-void Func_020049aa();
-void Func_020049d6();
-void Func_02004f36();
-void Func_02004f62();
-void Func_020063dc();
-void Func_02006512();
-void Func_0200651e();
-void Func_02006526();
-void Func_02006532();
-void Func_0200653c();
-void *Func_02006546();
-void Func_0200655a();
-void Func_0200657e();
-void Func_02006580();
-void *Func_020065e4();
-void *Func_02006600();
-void *Func_02006614();
-void Func_0200662c();
-void Func_02006644();
-void Func_02006678();
-void Func_0200668a();
-void Func_02006698();
-void Func_020066a4();
-void Func_020066aa();
-void Func_020066ac();
-void Func_020066b6();
-void Func_020066bc();
-void Func_020066d8();
-void Func_020066da();
-void Func_020066e6();
-void Func_0200671e();
-void Func_0200672a();
-void Func_0200672c();
-void Func_02006732();
-void Func_02006750();
-void Func_0200678a();
-void *Func_020067ae();
-void Func_020067ba();
-void Func_020067d0();
-void Func_020067e6();
-void Func_02006812();
-void Func_02006832();
-void Func_0200687a();
-
-void Func_02002844(void)
-{
- void *p2;
- void *p22;
- void *p3;
- void *p30;
- void *p35;
- s32 i1;
-
- Func_02006644(247);
- p2 = Func_02006600();
- p3 = Func_02006614();
- Func_02006512(30);
- Func_02006678(86);
- Func_020049aa(8);
- Func_02004f36(3, 1);
- Func_02006532();
- Func_0200653c(30);
- Func_020066a4();
- Func_020049d6(4);
- Func_02004f62(3, 0);
- Func_0200655a();
- Func_0200662c(8, 261, 0);
- Func_020063dc(1);
- Func_020066d8();
- Func_020066da(19);
- Func_02006580(30);
- Func_020066e6(289);
- Func_020066aa();
- Func_020066b6();
- p22 = Func_020065e4();
- Func_020066ac();
- *(u8 *)((u8 *)(p22) + 35) |= 0x1;
- *(u16 *)(p22 + 6) = 16384;
- Func_0200657e();
- Func_0200651e();
- Func_02006526();
- Func_0200668a();
- Func_020066bc(0, 16384, 0);
- *(u8 *)((*(void **)(p22 + 80)) + 5) &= 0xfffffffffffffff3;
- *(u8 *)((*(void **)(p22 + 80)) + 17) &= 0xfffffffffffffff3;
- Func_020067e6(252, 4, 33562768);
- for (i1 = 0; i1 <= 15; i1++) {
- *(s32 *)(p22 + 24) = 4096;
- *(s32 *)(p22 + 28) = 126976;
- p30 = Func_02006546(1, 33562768);
- }
- *(u16 *)p30 = 67109384;
- *(s32 *)(p22 + 24) = 69632;
- *(s32 *)(p22 + 28) = 61440;
- Func_0200671e(1);
- *(s32 *)(p22 + 24) = 65536;
- *(s32 *)(p22 + 28) = 65536;
- Func_0200672c(13);
- *(u8 *)((*(void **)(p22 + 80)) + 5) &= 0xfffffffffffffff3;
- *(u8 *)((*(void **)(p22 + 80)) + 17) &= 0xfffffffffffffff3;
- Func_020067ba();
- Func_02006750(20);
- p35 = Func_020067ae();
- Func_02006812();
- Func_0200687a();
- Func_02006832();
- Func_020067d0(30);
- *(u8 *)((*(void **)(*(void **)(p22 + 80) + 0)) + 7) = 0;
- *(u8 *)((*(void **)(*(void **)(p22 + 80) + 0)) + 6) = 15;
- *(s32 *)(p35 + 8) = 33605636;
- *(s32 *)(p35 + 16) = 33605468;
- *(u16 *)(p35 + 6) = 33605512;
- *(s32 *)(p35 + 56) = 2147483648;
- *(s32 *)(p35 + 64) = 2147483648;
- *(s32 *)(p35 + 36) = 0;
- *(s32 *)(p35 + 44) = 0;
- *(u8 *)((u8 *)(p35) + 85) = 3;
- *(u8 *)((u8 *)(p35) + 34) = 0;
- *(s32 *)(p35 + 12) = 0;
- *(s32 *)(p35 + 20) = 0;
- Func_0200678a();
- Func_0200672a();
- Func_02006732();
- Func_02006698(1);
-}
diff --git a/games/gs1/recon/en/overlays/resource_3bb_c_020016d4.c b/games/gs1/recon/en/overlays/resource_3bb_c_020016d4.c
deleted file mode 100644
index 0f17538b7..000000000
--- a/games/gs1/recon/en/overlays/resource_3bb_c_020016d4.c
+++ /dev/null
@@ -1,105 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunLiftedActorCoordinator:
- * A phase-two fast path, full and revisit branches, the lifted actor-state
- * transfer, and all 40 calls across the complete scene coordinator. */
-
-#define FieldScene_RunLiftedActorCoordinator Func_020016d4
-
-void Func_020034de();
-s32 Func_020036f4();
-void Func_02003918();
-void Func_02003992();
-void Func_02004310();
-void Func_020045d4();
-void Func_02004902();
-void Func_02005628();
-void Func_02005654();
-void Func_0200565e();
-void Func_020056d6();
-void Func_02005702();
-void *Func_0200571c();
-void Func_0200571e();
-void Func_0200572a();
-void Func_0200573a();
-void Func_02005744();
-void Func_02005750();
-void Func_02005752();
-void Func_0200575e();
-void Func_0200576a();
-void Func_0200576c();
-void Func_0200576e();
-void Func_0200577a();
-void Func_0200577e();
-void Func_020057b6();
-void Func_020057c2();
-void Func_020057d0();
-void Func_020057e0();
-void Func_020057ea();
-void Func_02005816();
-void Func_02005818();
-void Func_0200582a();
-void Func_0200583c();
-void Func_0200583e();
-void Func_02005854();
-void Func_02005862();
-void Func_02005868();
-
-extern s16 Data_02000240[];
-
-#define SceneTransition_Phase Data_02000240[225]
-
-void Func_020016d4(s32 scene)
-{
- void *actor;
- s32 path;
-
- if (SceneTransition_Phase == 2) {
- Func_020034de();
- return;
- }
- Func_02005628();
- path = Func_020036f4(scene, 4);
- if (path == 0) {
- Func_020056d6(8362);
- Func_0200572a(196608, 24576);
- Func_02005744(35127296, -1, 15728640, 1);
- Func_02005750();
- Func_0200565e(45);
- Func_02005752(65536, 8192);
- Func_0200576c(35127296, -1, 12582912, 1);
- Func_0200577a();
- Func_0200573a(scene, 0);
- Func_02004310(0, 632, 264);
- Func_020056d6(0, 65536, 32768);
- Func_02005702(0, 616, 264);
- Func_0200577e(0, 49152, 20);
- Func_020057ea();
- Func_020057b6(16384, 2048);
- Func_020057d0(35127296, -1, 10485760, 1);
- Func_0200571e(0, 32768, 16384);
- Func_0200575e(0, 10);
- actor = Func_0200571c(0);
- Func_02005654(actor, *(s32 *)((u8 *)actor + 8),
- *(s32 *)((u8 *)actor + 12) + 4194304,
- *(s32 *)((u8 *)actor + 16));
- Func_0200576a(0);
- Func_0200583e();
- Func_02005818(-1, -1, -1, 0);
- Func_020057e0(scene, 0);
- Func_0200576e(0, 98304, 49152);
- Func_02004902(0, 488, 248);
- Func_02005816(0, 16384, 20);
- Func_020057e0(0, 6, 0);
- Func_02005862(35127296, -1, 10485760, 1);
- Func_0200582a(scene, 0);
- Func_020045d4(0);
- Func_02005868(0, 0);
- Func_02003918(scene, 4);
- } else if (path == 1) {
- Func_0200583c(8361);
- Func_02005854(scene, 0);
- }
- Func_02003992(path, scene, 4);
- Func_020057c2();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3bc_c_02001a0c.c b/games/gs1/recon/en/overlays/resource_3bc_c_02001a0c.c
deleted file mode 100644
index 5d62acacf..000000000
--- a/games/gs1/recon/en/overlays/resource_3bc_c_02001a0c.c
+++ /dev/null
@@ -1,118 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_ArrangeFourActors:
- * 47 calls, source-relative actor placement, three coordinate handoffs,
- * and the final scene positioning sequence. */
-
-#define FieldScene_ArrangeFourActors Func_02001a0c
-
-void Func_0200642a();
-void *Func_02006432();
-void Func_02006460();
-void Func_0200646e();
-void Func_0200647c();
-void Func_0200648a();
-void Func_02006498();
-void *Func_020064dc();
-void Func_020064ec();
-void Func_020064fe();
-void Func_0200650c();
-void Func_02006518();
-void Func_02006526();
-void Func_0200653e();
-void Func_02006560();
-s32 Func_0200656c();
-void Func_02006580();
-s32 Func_0200658c();
-void Func_02006590();
-void Func_02006598();
-void Func_020065a0();
-void Func_020065a6();
-void Func_020065a8();
-s32 Func_020065ac();
-void Func_020065b0();
-void Func_020065b8();
-void Func_020065be();
-void Func_020065c0();
-void Func_020065c2();
-void Func_020065c6();
-void Func_020065d0();
-void Func_020065de();
-void Func_020065e0();
-void Func_020065e6();
-void Func_020065fe();
-void Func_02006600();
-void Func_02006606();
-void Func_02006626();
-void Func_02006628();
-void Func_02006630();
-void Func_02006632();
-void Func_0200663a();
-void Func_0200663c();
-void Func_020066c4();
-
-void Func_02001a0c(s32 scene)
-{
- s16 *p1;
- void *p13;
- s32 x;
- s32 y;
- s16 *actor;
-
- p1 = Func_02006432();
- x = p1[5];
- y = p1[9];
- Func_0200642a();
- Func_02006460(scene, 65536, 32768);
- Func_0200646e(0, 65536, 32768);
- Func_0200647c(1, 65536, 32768);
- Func_0200648a(2, 65536, 32768);
- Func_02006498(3, 65536, 32768);
- Func_020064ec(0, x << 16, (y << 16) - 0x300000);
- Func_020064fe(1, (x << 16) - 0x100000, (y << 16) - 0x280000);
- Func_0200650c(2, (x << 16) + 0x100000, (y << 16) - 0x280000);
- Func_02006518(3, x << 16, (y << 16) - 0x200000);
- Func_02006526(scene, x << 16, (y << 16) - 0x500000);
- p13 = Func_020064dc(0);
- *(u16 *)(p13 + 6) = 49152;
- Func_020065c2(0, 0);
- Func_02006626();
- Func_0200663a();
- Func_02006590(0x20ed);
- Func_02006560(scene, 3);
- Func_020065b0(scene, 0);
- Func_02006580(scene, 2);
- Func_020065c0(scene, 0);
- Func_02006590(scene, 2);
- Func_020065d0(scene, 0);
- Func_020065a0(scene, 2);
- Func_020065e0(scene, 0);
- Func_02006598(3, 3);
- Func_020065a0(1, 3);
- Func_020065a8(2, 3);
- Func_020065b8(0, 3);
- Func_0200653e(6);
- Func_020065be(1, 2);
- actor = (s16 *)Func_0200656c(0);
- if (actor != 0) {
- Func_020065a6(1, actor[5], actor[9]);
- }
- Func_020065de(2, 2);
- actor = (s16 *)Func_0200658c(0);
- if (actor != 0) {
- Func_020065c6(2, actor[5], actor[9]);
- }
- Func_020065fe(3, 2);
- actor = (s16 *)Func_020065ac(0);
- if (actor != 0) {
- Func_020065e6(3, actor[5], actor[9]);
- }
- Func_02006606(scene, x - 16, y - 64);
- Func_02006628(1, 0, 0);
- Func_02006632(2, 0, 0);
- Func_0200663c(3, 0, 0);
- Func_02006630(scene, x - 16, y - 16);
- Func_0200663a(scene, x, y);
- Func_020066c4(scene, 49152, 10);
- Func_02006600();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3bc_c_02001df8.c b/games/gs1/recon/en/overlays/resource_3bc_c_02001df8.c
deleted file mode 100644
index c189e5508..000000000
--- a/games/gs1/recon/en/overlays/resource_3bc_c_02001df8.c
+++ /dev/null
@@ -1,97 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunSecondArrivalSequence:
- * state-routed scene setup and all 40 calls with their scene arguments. */
-
-#define FieldScene_RunSecondArrivalSequence Func_02001df8
-
-void Func_0200469a();
-s32 Func_020048b0();
-void Func_02004aaa();
-void Func_02004b24();
-void Func_020054a8();
-void Func_02005766();
-void Func_02005960();
-void Func_020059ce();
-void Func_020059de();
-void Func_020059ee();
-void Func_02005a00();
-void Func_02005a0c();
-void Func_02005a5c();
-void Func_02006814();
-void Func_0200684c();
-void Func_0200688a();
-void Func_0200689e();
-void Func_020068da();
-void Func_02006910();
-void Func_0200691e();
-void Func_02006920();
-void Func_0200692e();
-void Func_02006930();
-void Func_02006948();
-void Func_02006956();
-void Func_02006984();
-void Func_020069a4();
-void Func_020069a8();
-void Func_020069be();
-void Func_020069c6();
-void Func_020069ca();
-void Func_020069e8();
-void Func_020069ea();
-void Func_02006a00();
-void Func_02006a08();
-void Func_02006a16();
-void Func_02006a2e();
-void Func_02006a42();
-
-void Func_02001df8(s32 scene)
-{
- s32 state;
-
- if (*(s16 *)0x02000402 == 2) {
- Func_0200469a();
- return;
- }
- Func_02006814();
- state = Func_020048b0(scene, 2);
- if (state == 0) {
- Func_020068da(8375);
- Func_0200692e(196608, 24576);
- Func_02006948(24641536, -1, 9961472, 1);
- Func_02006956();
- Func_0200684c(30);
- Func_0200691e(scene, 0);
- Func_020054a8(0, 280, 200);
- Func_0200689e(0, 98304, 49152);
- Func_02005a00(0, 280, 152);
- Func_02005a0c(0, 296, 152);
- Func_0200688a(10);
- Func_020069c6();
- Func_020069a8(-1, -1, -1, 0);
- Func_02006984(0, 49152, 15);
- Func_020069e8();
- Func_020069ca(-1, -1, -1, 0);
- Func_020069a4(0, 0, 15);
- Func_02006a08();
- Func_020069ea(-1, -1, -1, 0);
- Func_020069c6(0, 16384, 15);
- Func_020069be(scene, 0);
- Func_02005960(96, 40, 0);
- Func_020059ce(128, 40, 10);
- Func_02006910(30);
- Func_020059de(160, 40, 10);
- Func_02006920(30);
- Func_020059ee(160, 72, 10);
- Func_02006930(30);
- Func_02006a00(scene, 0);
- Func_02005a5c();
- Func_02005766(0);
- Func_02006a42(0, 0);
- Func_02004aaa(scene, 2);
- } else if (state == 1) {
- Func_02006a16(0x20b6);
- Func_02006a2e(scene, 0);
- }
- Func_02004b24(state, scene, 2);
- Func_02006984();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3c5_c_02001238.c b/games/gs1/recon/en/overlays/resource_3c5_c_02001238.c
deleted file mode 100644
index da18fa836..000000000
--- a/games/gs1/recon/en/overlays/resource_3c5_c_02001238.c
+++ /dev/null
@@ -1,370 +0,0 @@
-#include "types.h"
-
-#define RunEventScript01 Func_02001238
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 184 calls, 0 loops, 0 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
-void Func_0200405e();
-void Func_02004064();
-void Func_02004080();
-void Func_020040b0();
-void Func_020040b8();
-void Func_020040de();
-void Func_020040f6();
-void Func_02004104();
-void Func_0200412a();
-void Func_0200412c();
-void Func_0200413a();
-void Func_02004140();
-void Func_02004148();
-void Func_02004166();
-void Func_0200416a();
-void Func_0200416c();
-void Func_0200417a();
-void Func_02004188();
-void Func_0200419c();
-void Func_0200419e();
-void Func_020041b4();
-void Func_020041b6();
-void Func_020041ca();
-void Func_020041e4();
-void Func_020041f4();
-void Func_020041f8();
-void Func_020041fa();
-void Func_020041fe();
-void Func_02004202();
-void Func_02004208();
-void Func_0200420e();
-void Func_02004210();
-void Func_02004212();
-void Func_02004214();
-void Func_02004218();
-void Func_0200421c();
-void Func_0200421e();
-void Func_02004220();
-void Func_02004222();
-void Func_0200422a();
-void Func_0200422e();
-void Func_02004230();
-void Func_02004234();
-void Func_0200423a();
-void Func_0200423e();
-void Func_02004244();
-void Func_0200424c();
-void Func_0200425a();
-void Func_0200426a();
-void Func_0200427c();
-void Func_0200428a();
-void Func_02004292();
-void Func_02004296();
-void Func_020042a6();
-void Func_020042ae();
-void Func_020042b0();
-void Func_020042c2();
-void Func_020042d4();
-void Func_020042dc();
-void Func_020042f0();
-void Func_020042f8();
-void Func_02004306();
-void Func_0200430c();
-void Func_02004314();
-void Func_02004322();
-void Func_02004330();
-void Func_02004334();
-void Func_02004336();
-void Func_0200433c();
-void Func_02004348();
-void Func_02004356();
-void Func_02004364();
-void Func_02004368();
-void Func_0200436a();
-void Func_0200436e();
-void Func_02004372();
-void Func_0200437c();
-void Func_02004380();
-void Func_02004384();
-void Func_0200438e();
-void Func_02004394();
-void Func_020043a8();
-s32 Func_020043b6();
-void Func_020043b8();
-void Func_020043ba();
-void Func_020043c6();
-void Func_020043c8();
-void Func_020043de();
-void Func_020043e2();
-void Func_020043ea();
-void Func_020043ec();
-void Func_020043fa();
-void Func_02004404();
-void Func_02004408();
-void Func_0200440a();
-void Func_02004416();
-void Func_02004424();
-void Func_0200442a();
-void Func_02004432();
-void Func_02004442();
-void Func_02004446();
-void Func_0200446a();
-void Func_02004474();
-void Func_02004478();
-void Func_02004482();
-void Func_02004486();
-void Func_02004488();
-void Func_0200448a();
-void Func_02004498();
-void Func_020044a6();
-void Func_020044b4();
-void Func_020044ce();
-void Func_020044d0();
-void Func_020044dc();
-void Func_020044ea();
-void Func_020044f4();
-void Func_020044f8();
-void Func_02004506();
-void Func_0200451c();
-void Func_02004520();
-void Func_0200452a();
-void Func_0200452c();
-s32 Func_0200453a();
-void Func_02004544();
-void Func_0200454a();
-void Func_02004556();
-void Func_0200455a();
-void Func_02004566();
-void Func_02004568();
-void Func_02004580();
-void Func_02004586();
-void Func_02004590();
-void Func_0200459c();
-void Func_020045a0();
-void Func_020045ae();
-void Func_020045b4();
-void Func_020045b8();
-void Func_020045c8();
-void Func_020045ca();
-void Func_020045d6();
-void Func_020045e0();
-void Func_020045e2();
-void Func_020045f0();
-void Func_020045fa();
-void Func_02004608();
-void Func_02004616();
-void Func_0200461c();
-void Func_02004628();
-void Func_02004638();
-void Func_0200463a();
-void Func_02004648();
-void Func_02004652();
-void Func_02004656();
-void Func_02004662();
-void Func_02004670();
-void Func_02004678();
-s32 Func_0200467e();
-void Func_02004688();
-void Func_020046ba();
-void Func_020046ca();
-void Func_020046d0();
-void Func_020046e0();
-void Func_020046f4();
-void Func_020046f8();
-void Func_020046fa();
-void Func_0200470e();
-void Func_02004712();
-void Func_0200473a();
-void Func_0200473e();
-
-void RunEventScript01(void)
-{
- Func_0200405e(2440);
- Func_02004064(2442);
- Func_02004080();
- Func_020041b4();
- Func_0200412a(9986);
- Func_020040b8(0, 65536, 32768);
- Func_020040de(0, 296, 352);
- Func_0200416a(0, 49152, 0);
- Func_020040b0(10);
- Func_020041fe(10, 16, 0, 49152);
- Func_0200420e(1, -8, 16, 49152);
- Func_0200421c(2, 8, 16, 49152);
- Func_0200422a(3, 24, 16, 49152);
- Func_02004140(3);
- Func_020040f6(20);
- Func_020041b6(14, 0);
- Func_02004104(10);
- Func_020041f8(196608, 24576);
- Func_02004212(18350080, -1, 18874368, 1);
- Func_0200421e();
- Func_0200412c(20);
- Func_0200419c(11, 3);
- Func_0200413a(30);
- Func_020041fa(11, 0);
- Func_02004148(10);
- Func_02004214(14, 49152, 0);
- Func_02004220(11, 49152, 0);
- Func_02004166(30);
- Func_0200416c(10);
- Func_020041f4(14, 2);
- Func_0200417a(20);
- Func_0200423a(14, 0);
- Func_02004188(10);
- Func_02004208(13, 2);
- Func_02004218(12, 2);
- Func_0200419e(40);
- Func_0200421e(13, 2);
- Func_0200422e(12, 2);
- Func_020041b4(40);
- Func_02004234(13, 2);
- Func_02004244(12, 2);
- Func_020041ca(40);
- Func_020042a6(12, 258, 50);
- Func_02004296(12, 0);
- Func_020041e4(10);
- Func_020042ae(13, 0, 0);
- Func_020041f4(25);
- Func_0200427c(13, 2);
- Func_02004202(20);
- Func_020042c2(13, 0);
- Func_02004210(10);
- Func_020042dc(12, 32768, 0);
- Func_02004222(20);
- Func_02004292(13, 4);
- Func_02004230(20);
- Func_020042f0(13, 0);
- Func_0200423e(10);
- Func_020042ae(11, 4);
- Func_0200424c(20);
- Func_0200430c(11, 0);
- Func_0200425a(20);
- Func_02004334(13, 263, 40);
- Func_0200426a(10);
- Func_02004336(13, 16384, 0);
- Func_0200427c(20);
- Func_0200433c(13, 0);
- Func_0200428a(20);
- Func_02004364(13, 257, 75);
- Func_0200436e(14, 257, 60);
- Func_0200436a(12, 16384, 0);
- Func_020042b0(20);
- Func_0200437c(11, 16384, 0);
- Func_020042c2(20);
- Func_0200438e(14, 16384, 0);
- Func_020042d4(30);
- Func_02004394(14, 0);
- Func_020043de(18350080, -1, 20971520, 1);
- Func_020043ea();
- Func_020042f8(20);
- Func_02004368(10, 3);
- Func_02004306(30);
- Func_020043c6(10, 0);
- Func_02004314(10);
- Func_02004384(10, 4);
- Func_02004322(20);
- Func_020043e2(10, 0);
- Func_02004330(20);
- Func_0200440a(14, 261, 60);
- Func_020043fa(14, 0);
- Func_02004348(10);
- Func_020043b8(3, 4);
- Func_02004356(20);
- Func_02004416(3, 0);
- Func_02004364(10);
- Func_020043ec(2, 2);
- Func_02004372(20);
- Func_02004432(2, 0);
- Func_02004380(10);
- Func_02004408(1, 2);
- Func_0200438e(20);
- Func_02004446(1, 0);
- if (Func_020043b6(0, 0) == 0) {
- Func_020043a8(30);
- Func_02004474(10, 32768, 0);
- Func_020043ba(30);
- Func_0200442a(10, 3);
- Func_020043c8(30);
- Func_02004488(10, 0);
- }
- Func_02004404(30);
- Func_020044d0(10, 32768, 0);
- Func_02004416(30);
- Func_02004486(10, 4);
- Func_02004424(20);
- Func_020044f4(10, 0, 472, 473);
- Func_02004442(10);
- Func_0200451c(14);
- Func_02004482(14, 65536, 32768);
- Func_020045b4(14, 0, 16);
- Func_0200446a(20);
- Func_0200452a(14, 0);
- Func_02004478(10);
- Func_02004544(10, 49152, 0);
- Func_0200448a(35);
- Func_0200454a(10, 0);
- Func_02004498(10);
- Func_02004520(14, 2);
- Func_020044a6(20);
- Func_02004566(14, 0);
- Func_020044b4(20);
- Func_02004590(3, 258, 40);
- Func_02004580(3, 0);
- Func_020044ce(10);
- Func_02004556(2, 2);
- Func_020044dc(20);
- Func_0200459c(2, 0);
- Func_020044ea(10);
- Func_0200455a(1, 3);
- Func_020044f8(30);
- Func_020045b8(1, 0);
- Func_02004506(20);
- Func_020045e2(14, 256, 40);
- Func_020045ca(14, 0);
- if (Func_0200453a(0, 0) == 0) {
- Func_0200452c(30);
- Func_0200459c(14, 4);
- Func_0200453a(20);
- Func_020045fa(14, 0);
- } else {
- Func_0200455a(30);
- Func_020045ca(14, 4);
- Func_02004568(20);
- Func_02004638(14, 0);
- }
- Func_02004586(10);
- Func_02004662(10, 258, 50);
- Func_02004652(10, 0);
- Func_020045a0(10);
- Func_02004628(13, 2);
- Func_020045ae(20);
- Func_020045e0(13);
- Func_02004712(13, 0, 16);
- Func_020045c8(20);
- Func_02004688(13, 0);
- Func_020045d6(10);
- Func_02004608(12);
- Func_0200473a(12, 0, 16);
- Func_020045f0(20);
- Func_020046ca(12);
- Func_020046ba(12, 0);
- Func_02004608(10);
- Func_02004678(14, 3);
- Func_02004616(30);
- Func_0200461c(10);
- Func_020046f8(10, 258, 60);
- Func_020046f4(10, 32768, 0);
- Func_0200463a(25);
- Func_020046fa(10, 0);
- Func_02004648(10);
- Func_020046d0(10, 2);
- Func_02004656(20);
- Func_0200470e(10, 0);
- if (Func_0200467e(0, 0) == 0) {
- Func_02004670(30);
- Func_020046e0(10, 3);
- Func_0200467e(30);
- Func_0200473e(10, 0);
- }
-}
-
diff --git a/games/gs1/recon/en/overlays/resource_3c9_c_020008b4.c b/games/gs1/recon/en/overlays/resource_3c9_c_020008b4.c
deleted file mode 100644
index 3c96f1b1f..000000000
--- a/games/gs1/recon/en/overlays/resource_3c9_c_020008b4.c
+++ /dev/null
@@ -1,543 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunScriptedActorPresentation:
- * 255 calls, presentation-object state, runtime handoff, and event progress. */
-
-#define FieldScene_RunScriptedActorPresentation Func_020008b4
-
-void Func_02001442();
-void Func_0200147c();
-void Func_020014ba();
-void Func_020014c8();
-void Func_020014e6();
-void Func_020014ea();
-void Func_020014ec();
-void Func_02001572();
-void Func_02001582();
-void Func_02001590();
-void Func_020015a0();
-void Func_020015ae();
-void Func_020015e0();
-void Func_020015ea();
-void Func_020015fa();
-void Func_0200161e();
-void Func_02001648();
-void Func_0200164a();
-void Func_020016a2();
-void Func_020016c4();
-void Func_020016d4();
-void Func_020016e2();
-void Func_0200173a();
-void Func_02001772();
-void Func_02001790();
-void Func_020017a0();
-void Func_020017a6();
-void Func_020017b8();
-void Func_020017c6();
-void Func_020017d4();
-void Func_02001846();
-void Func_02001858();
-void Func_02001866();
-void Func_0200188a();
-void Func_0200189a();
-void Func_020018ac();
-void Func_020018ba();
-void Func_020018c8();
-void Func_02001900();
-void Func_02001918();
-void Func_02001930();
-void Func_0200194a();
-void Func_02001966();
-void Func_02001976();
-void Func_02001992();
-void Func_020019a0();
-void Func_020019f4();
-void Func_02001a04();
-void Func_02001a26();
-void Func_02001a74();
-void Func_02001b54();
-void *Func_02001b5c();
-void *Func_02001b64();
-void Func_02001d8e();
-void Func_02001d96();
-void Func_02001d9e();
-void *Func_020064f8();
-void Func_0200655a();
-void Func_020065ca();
-void *Func_02006600();
-void *Func_02006612();
-void Func_02006664();
-void *Func_02006686();
-void Func_02006690();
-void Func_02006698();
-void Func_020066d6();
-void *Func_020066da();
-void Func_020066e0();
-void Func_020066e4();
-void Func_02006700();
-void Func_02006704();
-void Func_02006728();
-void Func_0200672a();
-void Func_02006732();
-void Func_02006734();
-void Func_0200673a();
-void Func_0200673c();
-void Func_02006742();
-void Func_0200674e();
-void Func_02006752();
-void Func_02006764();
-void Func_02006768();
-void Func_02006772();
-void Func_02006776();
-void Func_02006786();
-void Func_02006792();
-void Func_0200679a();
-void Func_020067c4();
-void Func_020067d6();
-void *Func_020067d8();
-void Func_020067da();
-void Func_020067ec();
-void Func_020067f6();
-void Func_0200680a();
-void Func_02006810();
-void *Func_02006840();
-void Func_0200684a();
-void Func_02006860();
-void Func_02006862();
-void Func_0200686c();
-void Func_02006872();
-void Func_020068be();
-void Func_020068c8();
-void Func_020068ce();
-void Func_020068d4();
-void Func_020068e6();
-void Func_02006906();
-void Func_02006908();
-void Func_0200690e();
-void Func_02006914();
-void Func_02006916();
-void Func_0200692e();
-void Func_02006934();
-void Func_02006946();
-void Func_0200697e();
-void Func_02006980();
-void Func_0200698a();
-void Func_02006994();
-void Func_0200699c();
-void Func_0200699e();
-void Func_020069cc();
-void Func_020069d6();
-void Func_020069e0();
-void Func_020069e2();
-void Func_020069f6();
-void Func_02006a04();
-void Func_02006a1a();
-void *Func_02006a24();
-void Func_02006a34();
-void Func_02006a40();
-void Func_02006a66();
-void Func_02006a6e();
-void Func_02006a70();
-void Func_02006a88();
-void Func_02006a90();
-void Func_02006a94();
-void Func_02006a9c();
-void Func_02006aa8();
-void Func_02006aae();
-void Func_02006ab2();
-void Func_02006ad0();
-void Func_02006aea();
-void Func_02006aec();
-void Func_02006b0c();
-void Func_02006b2a();
-void Func_02006b3a();
-void Func_02006b48();
-void Func_02006b5e();
-void Func_02006b60();
-void Func_02006b6a();
-void Func_02006b84();
-void Func_02006b86();
-void Func_02006b90();
-void Func_02006b96();
-void Func_02006ba8();
-void Func_02006bae();
-void Func_02006bd2();
-void Func_02006bd4();
-void Func_02006bdc();
-void Func_02006be2();
-void Func_02006be6();
-void Func_02006bf0();
-void Func_02006bfe();
-void Func_02006c02();
-void Func_02006c04();
-void Func_02006c14();
-void Func_02006c22();
-void Func_02006c28();
-void Func_02006c2a();
-void Func_02006c3a();
-void Func_02006c3c();
-void Func_02006c46();
-void Func_02006c5e();
-void Func_02006c82();
-void Func_02006c96();
-void Func_02006ca4();
-void Func_02006cc2();
-void Func_02006ccc();
-void Func_02006ce8();
-void Func_02006cf6();
-void Func_02006cfa();
-void Func_02006d2a();
-void Func_02006d34();
-void Func_02006d3e();
-void Func_02006d6e();
-void Func_02006d72();
-void Func_02006d78();
-void Func_02006d7c();
-void Func_02006d80();
-void Func_02006da0();
-void Func_02006da4();
-void Func_02006dae();
-void Func_02006db8();
-void Func_02006dbe();
-void Func_02006ddc();
-void Func_02006de2();
-void Func_02006dea();
-void Func_02006df2();
-void Func_02006e00();
-void Func_02006e14();
-void Func_02006e1c();
-void Func_02006e24();
-void Func_02006e32();
-void Func_02006e34();
-void Func_02006e5c();
-void Func_02006e5e();
-void Func_02006e62();
-void Func_02006e64();
-void Func_02006e68();
-void Func_02006e7e();
-void Func_02006e80();
-void Func_02006e8a();
-void Func_02006ea2();
-void Func_02006eba();
-void Func_02006ec6();
-void Func_02006ecc();
-void Func_02006ee4();
-void Func_02006ef0();
-void Func_02006f00();
-s32 Func_02006f06();
-void Func_02006f34();
-void Func_02006f36();
-void Func_02006f58();
-void Func_02006f60();
-void Func_02006f6e();
-void Func_02006f74();
-void Func_02006f82();
-void Func_02006f8a();
-void Func_02006f8e();
-void Func_02006f96();
-void Func_02006faa();
-void Func_02006fb0();
-void Func_02006fb8();
-void Func_02006fba();
-void Func_02006fc0();
-void Func_02006fc2();
-void Func_02006fc6();
-void Func_02006fce();
-void Func_02006fd0();
-void Func_02006fdc();
-void Func_02006ff0();
-void Func_02006ffe();
-void Func_02007008();
-
-void Func_020008b4(void)
-{
- u8 *scene_state;
- s32 base;
- void *p1;
- void *p12;
- void *p2;
- void *p21;
- void *p4;
- void *p42;
- void *p5;
- void *p51;
- void *p7;
- void *p76;
-
- p1 = Func_02006612(18);
- p2 = Func_02006600();
- Func_02001b54(1, 0);
- p4 = Func_02001b5c(2, 0);
- p5 = Func_02001b64(3, 0);
- Func_02006732(-1, -1, -1, 0);
- p7 = Func_020064f8(1);
- *(u8 *)((u8 *)(p1) + 85) = 0;
- *(u8 *)((u8 *)(p1) + 35) |= 0x2;
- Func_02006664(18);
- Func_020065ca();
- Func_02006742(18, 1);
- Func_020066e0(18, 38010880, 22151168);
- p12 = Func_02006686(0);
- *(u8 *)((u8 *)(p12) + 85) = 0;
- Func_02006768(0, 1);
- Func_02006704(0);
- Func_0200655a(1);
- Func_020067f6();
- Func_0200680a();
- Func_02006698(20);
- Func_020066d6(18, 65536, 32768);
- Func_020066e4(0, 65536, 32768);
- p21 = Func_020066da(0);
- *(u8 *)((u8 *)(p21) + 90) &= 0xfe;
- Func_02006728(18, 580, 221);
- Func_0200673a(0, 581, 171);
- Func_0200673c(18, 530, 211);
- Func_0200674e(0, 531, 161);
- Func_02006752(18, 520, 191);
- Func_02006764(0, 521, 141);
- Func_0200672a(18);
- Func_02006690();
- Func_02006772(18, 515, 171);
- Func_02006786(0, 516, 121);
- Func_020068ce(288);
- Func_02006734(20);
- Func_020067c4(0, 6);
- Func_020067da(0);
- *(s32 *)(p12 + 8) = 33816576;
- *(s32 *)(p12 + 12) = 524288;
- *(s32 *)(p12 + 16) = 9699328;
- *(u16 *)(p12 + 6) = 32768;
- *(u8 *)((u8 *)(p12) + 85) = 3;
- Func_02006908(152);
- *(s32 *)(p12 + 40) = 262144;
- Func_02006914(152);
- Func_0200679a(0);
- Func_02006700();
- Func_020067ec(0, 504, 148);
- Func_02006792(10);
- p42 = Func_020067d8(0);
- *(u8 *)((u8 *)(p42) + 90) |= 0x1;
- *(s32 *)(p12 + 12) = 0x0202ffe0;
- *(u16 *)(p12 + 6) = 0x4000;
- Func_020067d6(20);
- Func_0200697e(308);
- Func_0200684a(18, 524, 191);
- Func_02006810(18);
- Func_02006776();
- Func_02006860(18, 530, 211);
- Func_0200686c(18, 580, 221);
- Func_02006872(18, 580, 338);
- p51 = Func_02006840(0);
- *(u8 *)((u8 *)(p51) + 35) |= 0x1;
- Func_02006862(0, 52428, 26214);
- Func_02001d8e(1, 1);
- Func_02001d96(2, 1);
- Func_02001d9e(3, 1);
- Func_020068be(0, 492, 164);
- Func_020068c8(1, 514, 164);
- Func_020068d4(2, 492, 140);
- Func_020068e6(3, 514, 140);
- Func_02006906(0, 1);
- Func_0200690e(1, 1);
- Func_02006916(2, 1);
- Func_02006980(0, 16384, 0);
- Func_0200698a(1, 16384, 0);
- Func_02006994(2, 16384, 0);
- Func_0200699e(3, 16384, 0);
- Func_02006934(18);
- Func_02006946(18, 0, 0);
- base = 16403;
- Func_02006a6e(289);
- Func_0200699c(10071);
- Func_02001442();
- Func_020069cc(0, 32768, 0);
- Func_020069d6(1, 32768, 0);
- Func_020069e0(2, 32768, 0);
- Func_0200147c(3, 32768);
- p76 = Func_02006a24();
- *(u8 *)((u8 *)(p76) + 85) = 0;
- Func_02006a1a(314572, 39321);
- Func_02006a34(19922944, 2097152, 10354688, 1);
- Func_02006a40();
- Func_0200692e(20);
- base = 8212;
- Func_020014ba(20, 53248, 53248);
- Func_020069f6(20, 1);
- Func_02006aec(61);
- Func_020014ba(base);
- Func_020069e2(19, 4);
- Func_020014c8();
- Func_020014ea(20, 45056);
- Func_02006a70(20, 261, 40);
- Func_020014e6(base);
- Func_020014ec(21);
- Func_02006a88(19, 256, 0);
- Func_02006a94(20, 256, 20);
- Func_02006a90(6, 12288, 0);
- Func_02006a9c(19, 20480, 0);
- Func_02006aa8(20, 20480, 20);
- Func_02006ad0(104857, 13107);
- Func_02006aea(19267584, -1, 12713984, 1);
- Func_020069e0(20);
- Func_02006a1a(21, 52428, 26214);
- Func_02006a66(21, 272, 200);
- Func_02006aae(20, 1);
- Func_02006a04(20);
- Func_02001572(base);
- Func_02006b0c(19, 259, 20);
- Func_02001582(19);
- Func_02006ab2(21, 3);
- Func_02001590(21);
- Func_02006b2a(20, 257, 40);
- Func_020015a0(base);
- Func_02006ad0(21, 4);
- Func_020015ae(21);
- Func_02006b48(19, 257, 60);
- Func_02006b3a(19, 0, 40);
- Func_02006b5e(19, 262, 40);
- Func_020015ea(19, 32768);
- Func_020015e0(8211);
- Func_02006b6a(6, 0, 0);
- Func_02006b84(21, 259, 40);
- Func_020015fa(21);
- Func_02006b86(19, 12288, 0);
- Func_02006b90(20, 45056, 40);
- Func_02006b60(21, 1);
- Func_0200161e(21);
- Func_02006bae(20, 20480, 0);
- Func_0200164a(19, 20480);
- Func_02006bd2(19, 264, 20);
- Func_02001648(8211);
- Func_02006be2(21, 259, 20);
- Func_02006bd4(21, 0, 20);
- Func_02006be6(20, 32768, 40);
- Func_02006b96(20, 4);
- Func_02006bf0(base, 0, 40);
- Func_02006ba8(21, 3);
- Func_02006c02(21, 0, 20);
- Func_02006c14(20, 20480, 20);
- Func_02006bdc(21, 2);
- Func_020016a2(21);
- Func_02006c3c(20, 261, 0);
- Func_02006c46(19, 261, 80);
- Func_02006bfe(21, 2);
- Func_020016c4(21);
- Func_02006c5e(19, 257, 60);
- Func_020016d4(8211);
- Func_02006c04(21, 3);
- Func_020016e2(21);
- Func_02006c2a(19, 1);
- Func_02006c3a(20, 1);
- Func_02006b90(20);
- Func_02006c28(21, 4);
- Func_02006c82(21, 0, 20);
- Func_02006ca4(20, 261, 60);
- Func_02006c96(base, 0, 20);
- Func_0200173a(21, 45056);
- Func_02001772(21);
- Func_02001790(6, 12288);
- Func_02006ccc(6, 2);
- Func_02006c22(20);
- Func_020017a6(21, 53248);
- Func_02006cc2(19, 4);
- Func_020017a0(8211);
- Func_02006d2a(6, 0, 0);
- Func_02006cfa(21, 1);
- Func_020017b8(21);
- Func_02006ce8(20, 3);
- Func_020017c6(base);
- Func_02006cf6(21, 4);
- Func_020017d4(21);
- Func_02006d6e(20);
- Func_02006d78(19);
- Func_02006d72(19, 32768, 0);
- Func_02006d7c(20, 32768, 0);
- Func_02006da4();
- Func_02006dbe(19267584, -1, 11796480, 1);
- Func_02006d2a(21, 262, 176);
- Func_02006dae(21, 32768, 40);
- Func_02006db8(21, 0, 20);
- Func_02006d80(21, 2);
- Func_02001846();
- Func_02006de2(19, 256, 20);
- Func_02001858(8211);
- Func_02006da0(21, 2);
- Func_02001866();
- Func_02006e00(20);
- Func_02006df2();
- Func_02006e14(21);
- Func_0200188a();
- Func_02006e24(19);
- Func_0200189a(8211);
- Func_02006e34(21);
- Func_020018ac();
- Func_02006ddc(20, 4);
- Func_020018ba();
- Func_02006dea(19, 3);
- Func_020018c8(8211);
- Func_02006e62(21);
- Func_02006e5c(21, 32768, 20);
- Func_02006e5e();
- Func_02006e80(6);
- Func_02006e8a(20);
- Func_02001900();
- Func_02006e8a(21, 0, 40);
- Func_02006e32(19, 3);
- Func_02001918(8211);
- Func_02006e68(21, 1);
- Func_02006ea2();
- Func_02001930();
- Func_02006ecc(21, 256, 40);
- Func_02006e64(19, 4);
- Func_0200194a(8211);
- Func_02006ee4(6);
- Func_02006ef0(20, 264, 40);
- Func_02001966();
- Func_02006f00(19);
- Func_02001976(8211);
- Func_02006ec6(21, 1);
- Func_02006e1c(20);
- Func_02006ecc(20, 2);
- Func_02001992();
- Func_02006eba(19, 4);
- Func_020019a0(8211);
- scene_state = *(u8 **)0x03001ebc;
- *(u32 *)(scene_state + 448) = 514;
- Func_02006fba();
- Func_02006fc6();
- Func_02006f6e(33030144);
- Func_02006d34(1);
- Func_02006db8();
- Func_02006d3e(1);
- Func_02006fdc();
- Func_02006ff0();
- Func_02006e7e(20);
- Func_02006f36(1, 1);
- Func_020019f4();
- Func_02006f8e(3);
- Func_02001a04(3);
- Func_02006f34(2, 3);
- Func_02006f8e();
- Func_02006f58(1, 2, 20);
- Func_02001a26();
- Func_02006f96();
- Func_02006fb8(0, 0, 0);
- Func_02006fc2(2, 16384, 0);
- Func_02006fce(3, 8192, 0);
- if (Func_02006f06(0, 0) == 1) {
- (*(u16 *)(scene_state + 472))++;
- }
- Func_02006f06(20);
- Func_02001a74(1);
- Func_02006ffe(2, 0, 0);
- Func_02007008(3, 32768, 20);
- Func_02006fb0(0, 3);
- Func_02006fb8(1, 3);
- Func_02006fc0(2, 3);
- Func_02006fd0(3, 3);
- Func_02006f82(1);
- Func_02006f8a(2);
- Func_02006faa(3);
- Func_02006f60(20);
- Func_02006f74();
-}
diff --git a/games/gs1/recon/en/overlays/resource_3c9_c_0200423c.c b/games/gs1/recon/en/overlays/resource_3c9_c_0200423c.c
deleted file mode 100644
index a4b5e31cf..000000000
--- a/games/gs1/recon/en/overlays/resource_3c9_c_0200423c.c
+++ /dev/null
@@ -1,385 +0,0 @@
-#include "types.h"
-
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunExtendedPresentation:
- * 141 calls, actor-coordinate stages, presentation-object setup, polling,
- * and terminal palette and workspace state. */
-
-#define FieldScene_RunExtendedPresentation Func_0200423c
-
-void Func_02004f60();
-void Func_02004f8a();
-void Func_02004fb6();
-void Func_02009b8a();
-void Func_02009b9a();
-void Func_02009bae();
-void Func_02009bbe();
-void Func_02009bd4();
-void Func_02009bea();
-void Func_02009c00();
-void Func_02009c16();
-void *Func_02009f22();
-void Func_02009f7c();
-void Func_02009f90();
-void Func_02009fc2();
-void Func_02009fd8();
-void Func_0200a028();
-void Func_0200a038();
-void Func_0200a074();
-void *Func_0200a084();
-void *Func_0200a08e();
-void *Func_0200a096();
-void *Func_0200a0a2();
-void *Func_0200a0ae();
-void Func_0200a0b2();
-void Func_0200a0b4();
-void *Func_0200a0ba();
-void Func_0200a0be();
-void Func_0200a0c6();
-void Func_0200a0ce();
-void *Func_0200a0d2();
-void Func_0200a0da();
-void *Func_0200a0e6();
-void Func_0200a0ec();
-void *Func_0200a0f2();
-void Func_0200a0fa();
-void *Func_0200a0fc();
-void Func_0200a0fe();
-void Func_0200a10a();
-void Func_0200a10e();
-void *Func_0200a11a();
-void Func_0200a120();
-void *Func_0200a122();
-void *Func_0200a128();
-void Func_0200a134();
-void Func_0200a152();
-void Func_0200a158();
-void *Func_0200a164();
-void Func_0200a16a();
-void *Func_0200a170();
-void Func_0200a176();
-void Func_0200a186();
-void Func_0200a194();
-void *Func_0200a1a0();
-void *Func_0200a1ac();
-void Func_0200a1ea();
-void Func_0200a1f0();
-void Func_0200a204();
-void Func_0200a206();
-void Func_0200a210();
-void Func_0200a21a();
-void Func_0200a226();
-void Func_0200a228();
-void Func_0200a234();
-void *Func_0200a242();
-void *Func_0200a254();
-void Func_0200a25a();
-void *Func_0200a264();
-void Func_0200a266();
-void Func_0200a272();
-void *Func_0200a278();
-void *Func_0200a288();
-void Func_0200a292();
-void *Func_0200a29e();
-void *Func_0200a2b4();
-void Func_0200a2c8();
-void *Func_0200a2ca();
-void Func_0200a2e0();
-void Func_0200a304();
-void Func_0200a30c();
-void Func_0200a32a();
-void Func_0200a348();
-void Func_0200a352();
-void Func_0200a358();
-void Func_0200a35a();
-void Func_0200a35e();
-void Func_0200a362();
-void Func_0200a36a();
-void Func_0200a36e();
-void Func_0200a372();
-void *Func_0200a3c0();
-void Func_0200a3da();
-void Func_0200a3e6();
-void Func_0200a3ee();
-void Func_0200a3f6();
-void Func_0200a414();
-void Func_0200a416();
-void Func_0200a432();
-void Func_0200a43e();
-void Func_0200a45a();
-void Func_0200a45c();
-void Func_0200a470();
-void *Func_0200a474();
-void Func_0200a48c();
-void Func_0200a492();
-void Func_0200a4a8();
-void Func_0200a4be();
-void Func_0200a4c4();
-void Func_0200a4ce();
-void Func_0200a4de();
-void Func_0200a4e4();
-void *Func_0200a4e8();
-void Func_0200a4ec();
-void *Func_0200a502();
-void Func_0200a50e();
-void *Func_0200a522();
-void *Func_0200a53c();
-void Func_0200a548();
-void *Func_0200a554();
-void *Func_0200a56c();
-s32 Func_0200a570();
-void Func_0200a578();
-void Func_0200a582();
-void Func_0200a590();
-void Func_0200a5a0();
-void Func_0200a61e();
-void Func_0200a65e();
-void Func_0200a6dc();
-void Func_0200a73c();
-void Func_0200a73e();
-void Func_0200a74a();
-
-void Func_0200423c(void)
-{
- s32 base;
- void *p1;
- void *p12;
- void *p121;
- void *p122;
- void *p123;
- void *p124;
- void *p125;
- void *p126;
- void *p127;
- void *p2;
- void *p21;
- void *p22;
- void *p3;
- void *p35;
- void *p36;
- void *p4;
- void *p40;
- void *p41;
- void *p45;
- void *p46;
- void *p5;
- void *p50;
- void *p51;
- void *p59;
- void *p6;
- void *p61;
- void *p63;
- void *p65;
- void *p67;
- void *p69;
- void *p7;
- void *p71;
- void *p73;
- void *p9;
- void *p99;
-
- p1 = Func_0200a11a(19);
- p2 = Func_0200a122(288);
- p3 = Func_02009f22(196608, 196608, 65536);
- p4 = Func_0200a096(0, 256, 0);
- p5 = Func_0200a0a2(1, 256, 0);
- p6 = Func_0200a0ae(2, 256, 0);
- p7 = Func_0200a0ba(3, 256, 0);
- Func_0200a0c6(21, 256, 0);
- p9 = Func_0200a0d2(6, 256, 10);
- Func_0200a0ce(0, 40960, 0);
- Func_0200a0da(1, 40960, 0);
- p12 = Func_0200a0e6(2, 40960, 0);
- Func_0200a0f2(3, 40960, 0);
- Func_0200a0fe(21, 53248, 0);
- Func_0200a10a(6, 53248, 0);
- Func_02009fc2(131072, 131072, 65536);
- Func_0200a038(10);
- Func_02009fd8(65536, 65536, 65536);
- Func_0200a16a(19922944, 2097152, 11796480, 1);
- Func_0200a176();
- p21 = Func_0200a084(24);
- base = 6553;
- *(s32 *)(p21 + 24) = base;
- p22 = Func_0200a08e(25);
- *(s32 *)(p22 + 24) = base;
- Func_0200a0b2(24, 33611912);
- Func_0200a0ba(25, 33611912);
- Func_0200a228(145);
- Func_0200a028(393216, 393216, 65536);
- Func_0200a1f0(4219903, 0);
- Func_0200a206(16);
- Func_02009f7c(20);
- Func_0200a204(32767, 0);
- Func_0200a21a(24);
- Func_02009f90(60);
- Func_0200a266(141);
- Func_0200a0b4(566);
- p35 = Func_0200a0f2(24);
- *(s32 *)(p35 + 12) = 4288675840;
- p36 = Func_0200a0fc(25);
- *(s32 *)(p36 + 12) = 4290772992;
- Func_0200a1a0(26, 7);
- Func_0200a10e(26);
- Func_0200a074();
- p40 = Func_0200a11a(26);
- *(s32 *)(p40 + 28) = 4294901760;
- p41 = Func_0200a128(24, 4294901760);
- *(s32 *)(p40 + 24) = *(s32 *)(p41 + 24);
- *(u8 *)((u8 *)(p40) + 85) = 0;
- *(s32 *)(p40 + 8) = 19922944;
- *(s32 *)(p40 + 12) = 0xffe00000;
- *(s32 *)(p40 + 16) = 6291456;
- Func_0200a1ea(27, 7, 19922944, 4292870144);
- Func_0200a158(27);
- Func_0200a0be();
- p45 = Func_0200a164(27);
- *(s32 *)(p45 + 28) = 4294901760;
- p46 = Func_0200a170(24);
- *(s32 *)(p45 + 24) = *(s32 *)(p46 + 24);
- *(u8 *)((u8 *)(p45) + 85) = 0;
- *(s32 *)(p45 + 8) = 19922944;
- *(s32 *)(p45 + 12) = 0;
- *(s32 *)(p45 + 16) = 6291456;
- Func_0200a226(28, 7, 19922944, 0);
- Func_0200a194(28);
- Func_0200a0fa();
- p50 = Func_0200a1a0(28);
- *(s32 *)(p50 + 28) = 4294901760;
- p51 = Func_0200a1ac(24, 4294901760);
- *(s32 *)(p50 + 24) = *(s32 *)(p51 + 24);
- *(u8 *)((u8 *)(p50) + 85) = 0;
- *(s32 *)(p50 + 8) = 19922944;
- *(s32 *)(p50 + 12) = 2097152;
- *(s32 *)(p50 + 16) = 6291456;
- Func_0200a120(102, 4, 74, 4, 18, 23);
- Func_0200a134(39, 72, 11, 72, 16, 21);
- Func_0200a152(19, 6, 3, 7, 22, 6);
- Func_0200a164(19, 6, 3, 7, 13, 6);
- Func_0200a176(19, 6, 3, 7, 22, 13);
- Func_0200a186(19, 6, 3, 7, 13, 13);
- Func_0200a0ec(1);
- p59 = Func_0200a242(8);
- *(s32 *)(p59 + 8) += 6553;
- Func_02009b8a();
- p61 = Func_0200a254(9);
- *(s32 *)(p61 + 8) += 6553;
- Func_02009b9a();
- p63 = Func_0200a264(10);
- *(s32 *)(p63 + 8) += 0x100000;
- Func_02009bae();
- p65 = Func_0200a278(11);
- *(s32 *)(p65 + 8) += 0x100000;
- Func_02009bbe();
- p67 = Func_0200a288(0);
- *(s32 *)(p67 + 8) += 0x100000;
- *(s32 *)(p67 + 16) += 0x100000;
- Func_02009bd4();
- p69 = Func_0200a29e(1);
- *(s32 *)(p69 + 8) += 0x100000;
- *(s32 *)(p69 + 16) += 0x100000;
- Func_02009bea();
- p71 = Func_0200a2b4(2);
- *(s32 *)(p71 + 8) += 0x100000;
- *(s32 *)(p71 + 16) += 0x100000;
- Func_02009c00();
- p73 = Func_0200a2ca(3);
- *(s32 *)(p73 + 8) += 0x100000;
- *(s32 *)(p73 + 16) += 0x100000;
- Func_02009c16();
- Func_0200a348(21, 12845056, 14417920);
- Func_0200a358(21, 5);
- Func_0200a35e(6, 12320768, 20709376);
- Func_0200a36e(6, 5);
- Func_0200a30c(6);
- Func_0200a272();
- Func_0200a292(262144, 262144, 65536);
- Func_0200a45a(4219903, 0);
- Func_0200a470(120);
- Func_0200a352(24, 33611984);
- Func_0200a35a(25, 33611984);
- Func_0200a362(26, 33611984);
- Func_0200a36a(27, 33611984);
- Func_0200a372(28, 33611984);
- Func_0200a210(120);
- Func_0200a2e0(196608, 196608, 65536);
- Func_0200a4a8(2109968, 0);
- Func_0200a4be(120);
- Func_0200a234(120);
- Func_0200a304(131072, 131072, 65536);
- Func_0200a4ce(65536, 0);
- Func_0200a4e4(120);
- Func_0200a25a(120);
- Func_0200a32a(65536, 65536, 65536);
- p99 = Func_0200a3c0(24);
- *(s32 *)(p99 + 28) = 1310;
- Func_0200a3e6(25, 33612020);
- Func_0200a3ee(26, 33612020);
- Func_0200a3f6(27, 33612020);
- Func_0200a416(28, 33612020);
- Func_0200a56c(289);
- Func_0200a48c(24, 15);
- Func_0200a3da(20);
- Func_0200a432(24, 33612080);
- Func_0200a2c8();
- Func_0200a492(2, 2, 20);
- Func_02004f60(2);
- Func_0200a4ec(1, 24576, 20);
- Func_0200a50e(1, 258);
- Func_0200a414(20);
- Func_0200a4c4(1, 2);
- Func_02004f8a(1);
- Func_0200a45c(3, 52428, 26214);
- Func_0200a4a8(3, 326, 220);
- Func_0200a43e(40);
- Func_0200a548(3, 258);
- Func_02004fb6(3);
- p121 = Func_0200a474(0);
- *(u8 *)((u8 *)(p121) + 98) = 0;
- *(u8 *)((u8 *)(p121) + 99) = 1;
- *(u16 *)(p121 + 6) = 40960;
- *(s32 *)(p121 + 76) = *(s32 *)(p121 + 12);
- p122 = Func_0200a4e8(1);
- *(u8 *)((u8 *)(p122) + 98) = 0;
- *(u8 *)((u8 *)((u8 *)(p122) + 98) + 1) = 1;
- *(u16 *)(p122 + 6) = 40960;
- *(s32 *)(p122 + 76) = *(s32 *)(p122 + 12);
- p123 = Func_0200a502(2, 0);
- *(u8 *)((u8 *)(p123) + 98) = 0;
- *(u8 *)((u8 *)((u8 *)(p123) + 98) + 1) = 1;
- *(u16 *)(p123 + 6) = 40960;
- *(s32 *)(p123 + 76) = *(s32 *)(p123 + 12);
- p124 = Func_0200a522(3, 0);
- *(u8 *)((u8 *)(p124) + 98) = 0;
- *(u8 *)((u8 *)((u8 *)(p124) + 98) + 1) = 1;
- *(u16 *)(p124 + 6) = 40960;
- *(s32 *)(p124 + 76) = *(s32 *)(p124 + 12);
- p125 = Func_0200a53c(21, 0);
- *(u8 *)((u8 *)(p125) + 98) = 0;
- *(u8 *)((u8 *)((u8 *)(p125) + 98) + 1) = 1;
- *(s32 *)(p125 + 76) = *(s32 *)(p125 + 12);
- p126 = Func_0200a554(6, 0);
- *(u8 *)((u8 *)(p126) + 98) = 0;
- *(u8 *)((u8 *)((u8 *)(p126) + 98) + 1) = 1;
- *(s32 *)(p126 + 76) = *(s32 *)(p126 + 12);
- p127 = Func_0200a56c(23, 0);
- *(u8 *)((u8 *)(p127) + 85) = 0;
- Func_0200a578(23);
- Func_0200a4de(0);
- Func_0200a61e(23, 7);
- Func_0200a65e(23, 2);
- *(u32 *)0x0200e764 = 0;
- *(u32 *)0x0200e760 = 240;
- Func_0200a45c(0x0200d6a1, 3200);
- Func_0200a45a(1);
- while (Func_0200a570(567) == 0) {
- }
- Func_0200a582(257);
- Func_0200a5a0(30);
- Func_0200a590(282);
- Func_0200a73c();
- Func_0200a6dc(2, 91);
- *(u16 *)0x05000000 = 0x7fff;
- *(u32 *)(*(u32 *)0x03001ebc + 456) = 1;
- Func_0200a73e();
- Func_0200a74a();
-}
diff --git a/games/gs1/semantic/overlay-assembly.json b/games/gs1/semantic/overlay-assembly.json
index 7abf42912..0977f35ee 100644
--- a/games/gs1/semantic/overlay-assembly.json
+++ b/games/gs1/semantic/overlay-assembly.json
@@ -626,19 +626,6 @@
"games/gs1/recon/en/dossiers.json#resource_3a5:020004e4"
]
},
- {
- "overlay": "resource_3c9",
- "start": "0x020008b4",
- "end": "0x0200124a",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete owner reconstruction accounts for all 255 calls, presentation-object state, workspace transition, and conditional event progress",
- "candidate and reference differ by 142 bytes after all decoded control flow and side effects are represented; the reference contains two embedded literal pools plus approved GCC allocation and scheduling residuals",
- "games/gs1/recon/en/dossiers.json#resource_3c9:020008b4"
- ]
- },
{
"overlay": "resource_3a5",
"start": "0x0200088c",
@@ -1901,80 +1888,9 @@
"byte-exact decoded-overlay assembly round trip"
]
},
- {
- "overlay": "resource_3c5",
- "start": "0x0200186c",
- "end": "0x0200245e",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 330 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_3c5:0200186c"
- ]
- },
- {
- "overlay": "resource_395",
- "start": "0x02000488",
- "end": "0x02001056",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 319 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_395:02000470"
- ]
- },
- {
- "overlay": "resource_396",
- "start": "0x0200069c",
- "end": "0x02000918",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 221 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_396:0200069c",
- "boundary corrected to the reviewed 636-byte span in games/gs1/semantic/regions.json"
- ]
- },
- {
- "overlay": "resource_38d",
- "start": "0x020019b0",
- "end": "0x02002182",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 185 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_38d:020019b0"
- ]
- },
- {
- "overlay": "resource_3a2",
- "start": "0x02000924",
- "end": "0x02000fcc",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 187 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_3a2:02000924"
- ]
- },
{
"overlay": "resource_375",
- "start": "0x020000dc",
+ "start": "0x02000170",
"end": "0x02000736",
"kind": "generated_call_script_module",
"retention": "keep_structured_asm",
@@ -1983,27 +1899,14 @@
"complete deterministic reconstruction accounts for all 167 calls, arguments, branches, loops, and explicit memory operations",
"the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
"a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_375:020000dc"
- ]
- },
- {
- "overlay": "resource_3c5",
- "start": "0x02001238",
- "end": "0x0200186a",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 184 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_3c5:02001238"
+ "games/gs1/recon/en/dossiers.json#resource_375:020000dc",
+ "resource_375:020000dc (148 bytes) is now exact C"
]
},
{
"overlay": "resource_399",
"start": "0x02000f84",
- "end": "0x0200154c",
+ "end": "0x02000f90",
"kind": "generated_call_script_module",
"retention": "keep_structured_asm",
"confidence": "proven",
@@ -2011,74 +1914,8 @@
"complete deterministic reconstruction accounts for all 142 calls, arguments, branches, loops, and explicit memory operations",
"the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
"a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_399:02000f84"
- ]
- },
- {
- "overlay": "resource_3aa",
- "start": "0x02001450",
- "end": "0x02001a16",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 138 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_3aa:02001450"
- ]
- },
- {
- "overlay": "resource_380",
- "start": "0x0200178c",
- "end": "0x02001ce2",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 147 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_380:02001780"
- ]
- },
- {
- "overlay": "resource_380",
- "start": "0x02000a98",
- "end": "0x02000d5c",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 61 calls, the conditional setup loop, workspace state write, returned actor handle, and every argument",
- "approved GCC allocation and literal scheduling change the owner register-save set and extent",
- "games/gs1/recon/en/dossiers.json#resource_380:02000a98"
- ]
- },
- {
- "overlay": "resource_380",
- "start": "0x02000f8c",
- "end": "0x02001392",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete owner reconstruction accounts for all 118 calls, both motion loops, actor state writes, coordinate deltas, and the conditional scene-counter increment",
- "candidate and reference extents differ by four bytes after every decoded side effect is represented; residual is approved GCC allocation and literal scheduling",
- "games/gs1/recon/en/dossiers.json#resource_380:02000f8c"
- ]
- },
- {
- "overlay": "resource_3bc",
- "start": "0x02001a0c",
- "end": "0x02001c20",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete owner reconstruction accounts for all 47 calls, source-relative four-actor placement, three conditional coordinate handoffs, and final scene positioning",
- "candidate and reference differ by six bytes after all decoded side effects are represented; residual is approved GCC allocation and literal scheduling",
- "games/gs1/recon/en/dossiers.json#resource_3bc:02001a0c"
+ "games/gs1/recon/en/dossiers.json#resource_399:02000f84",
+ "resource_399:02000f90 (1468 bytes) is now exact C"
]
},
{
@@ -2094,19 +1931,6 @@
"games/gs1/recon/en/dossiers.json#resource_3bc:02001c20"
]
},
- {
- "overlay": "resource_3bc",
- "start": "0x02001df8",
- "end": "0x02001f90",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for the global mode gate, all three state routes, 40 calls, and every scene argument",
- "candidate and reference differ by four bytes after all decoded control flow is represented; residual is approved GCC allocation and literal scheduling",
- "games/gs1/recon/en/dossiers.json#resource_3bc:02001df8"
- ]
- },
{
"overlay": "resource_3bc",
"start": "0x02001f90",
@@ -2133,19 +1957,6 @@
"games/gs1/recon/en/dossiers.json#resource_3c9:02003e9c"
]
},
- {
- "overlay": "resource_3c9",
- "start": "0x0200423c",
- "end": "0x02004736",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete owner reconstruction accounts for all 141 calls, actor-coordinate stages, presentation-object fields, polling, palette write, and terminal workspace state",
- "candidate and complete-owner reference differ by 48 bytes after all decoded side effects are represented; residual is approved GCC allocation and literal scheduling",
- "games/gs1/recon/en/dossiers.json#resource_3c9:0200423c"
- ]
- },
{
"overlay": "resource_377",
"start": "0x02000578",
@@ -2224,19 +2035,6 @@
"games/gs1/recon/en/dossiers.json#resource_373:020015dc"
]
},
- {
- "overlay": "resource_383",
- "start": "0x02000de4",
- "end": "0x02001348",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "the audited ordinary-C reconstruction accounts for all 151 calls, arguments, and memory effects across the complete owner",
- "the approved seven-route GCC 2.96 cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_383:02000de4"
- ]
- },
{
"overlay": "resource_383",
"start": "0x02001348",
@@ -2250,37 +2048,10 @@
"games/gs1/recon/en/dossiers.json#resource_383:02001348"
]
},
- {
- "overlay": "resource_381",
- "start": "0x02000054",
- "end": "0x02000e30",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "the audited ordinary-C reconstruction accounts for all 337 calls, branch conditions, arguments, and memory effects across the complete two-phase owner",
- "the approved seven-route GCC 2.96 cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_381:02000054"
- ]
- },
- {
- "overlay": "resource_371",
- "start": "0x02001064",
- "end": "0x0200155a",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 115 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_371:02001064"
- ]
- },
{
"overlay": "resource_3af",
"start": "0x02001db0",
- "end": "0x02002282",
+ "end": "0x02001f90",
"kind": "generated_call_script_module",
"retention": "keep_structured_asm",
"confidence": "proven",
@@ -2288,13 +2059,14 @@
"complete deterministic reconstruction accounts for all 137 calls, arguments, branches, loops, and explicit memory operations",
"the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
"a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_3af:02001db0"
+ "games/gs1/recon/en/dossiers.json#resource_3af:02001db0",
+ "resource_3af:02001f90 (816 bytes) is now exact C"
]
},
{
"overlay": "resource_374",
"start": "0x02000b8c",
- "end": "0x0200105a",
+ "end": "0x02000bbc",
"kind": "generated_call_script_module",
"retention": "keep_structured_asm",
"confidence": "proven",
@@ -2302,7 +2074,8 @@
"complete deterministic reconstruction accounts for all 113 calls, arguments, branches, loops, and explicit memory operations",
"the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
"a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_374:02000b8c"
+ "games/gs1/recon/en/dossiers.json#resource_374:02000b8c",
+ "resource_374:02000bbc (1224 bytes) is now exact C"
]
},
{
@@ -2362,53 +2135,10 @@
"games/gs1/recon/en/dossiers.json#resource_3af:02002618"
]
},
- {
- "overlay": "resource_37b",
- "start": "0x02000554",
- "end": "0x02000a16",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 123 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_37b:02000554"
- ]
- },
- {
- "overlay": "resource_37f",
- "start": "0x0200161c",
- "end": "0x02001a86",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 82 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_37f:02001604",
- "start corrected from 0x02001604 to 0x0200161c: the first 24 bytes are the literal pool of the preceding owner resource_37f:02000f8c, now exact C"
- ]
- },
- {
- "overlay": "resource_371",
- "start": "0x02000c28",
- "end": "0x02001062",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 123 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_371:02000c1c"
- ]
- },
{
"overlay": "resource_39e",
"start": "0x0200064c",
- "end": "0x02000a8e",
+ "end": "0x02000658",
"kind": "generated_call_script_module",
"retention": "keep_structured_asm",
"confidence": "proven",
@@ -2416,35 +2146,8 @@
"complete deterministic reconstruction accounts for all 125 calls, arguments, branches, loops, and explicit memory operations",
"the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
"a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_39e:0200064c"
- ]
- },
- {
- "overlay": "resource_377",
- "start": "0x02000f90",
- "end": "0x020013a2",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 103 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_377:02000f90"
- ]
- },
- {
- "overlay": "resource_37b",
- "start": "0x02000150",
- "end": "0x02000552",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 116 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_37b:02000150"
+ "games/gs1/recon/en/dossiers.json#resource_39e:0200064c",
+ "resource_39e:02000658 (196 bytes) is now exact C"
]
},
{
@@ -2489,20 +2192,6 @@
"games/gs1/recon/en/dossiers.json#resource_3b9:02000708"
]
},
- {
- "overlay": "resource_38e",
- "start": "0x0200050c",
- "end": "0x020008b6",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 89 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_38e:0200050c"
- ]
- },
{
"overlay": "resource_381",
"start": "0x02001798",
@@ -2517,20 +2206,6 @@
"games/gs1/recon/en/dossiers.json#resource_381:02001798"
]
},
- {
- "overlay": "resource_372",
- "start": "0x02002dec",
- "end": "0x0200316a",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete deterministic reconstruction accounts for all 84 calls, arguments, branches, loops, and explicit memory operations",
- "the reference contains zero high-register moves while approved GCC CSE/allocation changes repeated-immediate construction and owner extent",
- "a six-mode optimization and CSE cohort produced zero exact emissions",
- "games/gs1/recon/en/dossiers.json#resource_372:02002dec"
- ]
- },
{
"overlay": "resource_3c7",
"start": "0x0200015c",
@@ -2695,32 +2370,6 @@
"games/gs1/recon/en/dossiers.json#resource_3a0:02000324"
]
},
- {
- "overlay": "resource_383",
- "start": "0x02001f50",
- "end": "0x020021c8",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 61 calls, arguments, signed scene-selector branches, shared-object flags, and two workspace transitions",
- "direct assembly audit removed a false branch-target call and restored selected-actor forwarding plus states 513 and 521",
- "games/gs1/recon/en/dossiers.json#resource_383:02001f50"
- ]
- },
- {
- "overlay": "resource_383",
- "start": "0x020021c8",
- "end": "0x02002546",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 91 calls, arguments, nested conditionals, success/fallback routing, shared-object flags, and workspace state",
- "direct assembly audit restored three literal-backed actor setup calls and the fallback guard omitted by the mechanical draft",
- "games/gs1/recon/en/dossiers.json#resource_383:020021c8"
- ]
- },
{
"overlay": "resource_3a4",
"start": "0x02001838",
@@ -2747,45 +2396,6 @@
"games/gs1/recon/en/dossiers.json#resource_3a4:02001d14"
]
},
- {
- "overlay": "resource_3b9",
- "start": "0x02001cd4",
- "end": "0x020023c6",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 180 calls, arguments, the event-result branch, both progress updates, and all workspace state writes",
- "direct boundary and literal-pool audit restored every semantic operation omitted by the mechanical draft",
- "games/gs1/recon/en/dossiers.json#resource_3b9:02001cd4"
- ]
- },
- {
- "overlay": "resource_375",
- "start": "0x0200150c",
- "end": "0x0200172c",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 46 calls, progress predicates, actor-state writes, and both progress-dependent branches",
- "direct boundary and literal-pool audit excludes the preceding pool and confirms the complete callable owner through its return",
- "games/gs1/recon/en/dossiers.json#resource_375:0200150c"
- ]
- },
- {
- "overlay": "resource_375",
- "start": "0x02001760",
- "end": "0x02001972",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 60 calls, nested resource predicates, presentation arguments, and actor-coordinate forwarding",
- "direct boundary and literal-pool audit confirms the complete callable owner through its return",
- "games/gs1/recon/en/dossiers.json#resource_375:02001760"
- ]
- },
{
"overlay": "resource_3bb",
"start": "0x020010dc",
@@ -2822,18 +2432,6 @@
"games/gs1/recon/en/dossiers.json#resource_3b9:02001298"
]
},
- {
- "overlay": "resource_3b1",
- "start": "0x02001b34",
- "end": "0x02001f3c",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 107 calls, the guarded entry, three actor presentation phases, and both actor flag updates",
- "games/gs1/recon/en/dossiers.json#resource_3b1:02001b34"
- ]
- },
{
"overlay": "resource_3b9",
"start": "0x02000dcc",
@@ -2858,30 +2456,6 @@
"games/gs1/recon/en/dossiers.json#resource_3b1:020052f4"
]
},
- {
- "overlay": "resource_3b1",
- "start": "0x020057ec",
- "end": "0x02005c48",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 112 calls, three returned actor handles and their uses, formation phases, and the terminal presentation-state clear",
- "games/gs1/recon/en/dossiers.json#resource_3b1:020057ec"
- ]
- },
- {
- "overlay": "resource_3b1",
- "start": "0x02005d10",
- "end": "0x02006110",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 87 calls, four returned actor handles and their uses, both progress decisions, both workspace-counter updates, and every presentation phase",
- "games/gs1/recon/en/dossiers.json#resource_3b1:02005d10"
- ]
- },
{
"overlay": "resource_3b1",
"start": "0x02004254",
@@ -2894,18 +2468,6 @@
"games/gs1/recon/en/dossiers.json#resource_3b1:02004254"
]
},
- {
- "overlay": "resource_3b1",
- "start": "0x020038ac",
- "end": "0x02003d10",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 112 calls, the workspace presentation field, three null-gated actor-coordinate transfers, and the terminal event literal",
- "games/gs1/recon/en/dossiers.json#resource_3b1:020038ac"
- ]
- },
{
"overlay": "resource_39c",
"start": "0x02004a08",
@@ -2918,30 +2480,6 @@
"games/gs1/recon/en/dossiers.json#resource_39c:02004a08"
]
},
- {
- "overlay": "resource_3b1",
- "start": "0x02001f3c",
- "end": "0x020027d8",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 229 calls and their arguments across the linear actor presentation owner",
- "games/gs1/recon/en/dossiers.json#resource_3b1:02001f3c"
- ]
- },
- {
- "overlay": "resource_3ab",
- "start": "0x0200131c",
- "end": "0x020015bc",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 70 calls, two completion waits, and fifteen actor/effect memory operations",
- "games/gs1/recon/en/dossiers.json#resource_3ab:0200131c"
- ]
- },
{
"overlay": "resource_39b",
"start": "0x02001730",
@@ -2966,78 +2504,6 @@
"games/gs1/recon/en/dossiers.json#resource_3a0:02000f30"
]
},
- {
- "overlay": "resource_3b1",
- "start": "0x020027d8",
- "end": "0x02002ff0",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 203 calls, three scene-counter branches, and six nullable actor-coordinate transfers",
- "games/gs1/recon/en/dossiers.json#resource_3b1:020027d8"
- ]
- },
- {
- "overlay": "resource_380",
- "start": "0x020006f4",
- "end": "0x02000a64",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 84 calls and the six-pass opening effect loop",
- "games/gs1/recon/en/dossiers.json#resource_380:020006f4"
- ]
- },
- {
- "overlay": "resource_3ba",
- "start": "0x02001214",
- "end": "0x020013e4",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 46 calls and the phase-selected full, revisit, and active-scene paths",
- "games/gs1/recon/en/dossiers.json#resource_3ba:02001214"
- ]
- },
- {
- "overlay": "resource_3ba",
- "start": "0x020016ec",
- "end": "0x02001898",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 42 calls and the phase-selected full, revisit, and active-scene paths",
- "games/gs1/recon/en/dossiers.json#resource_3ba:020016ec"
- ]
- },
- {
- "overlay": "resource_3b0",
- "start": "0x02000e78",
- "end": "0x020010a0",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 56 calls, seven-actor staging, both workspace-state updates, and the final actor selector branch",
- "games/gs1/recon/en/dossiers.json#resource_3b0:02000e78"
- ]
- },
- {
- "overlay": "resource_3bb",
- "start": "0x020016d4",
- "end": "0x02001898",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 40 calls, the phase-selected full and revisit paths, and the lifted actor-state transfer",
- "games/gs1/recon/en/dossiers.json#resource_3bb:020016d4"
- ]
- },
{
"overlay": "resource_3b0",
"start": "0x02000564",
@@ -3098,18 +2564,6 @@
"games/gs1/recon/en/dossiers.json#resource_378:0200088c"
]
},
- {
- "overlay": "resource_39e",
- "start": "0x02001494",
- "end": "0x02001d50",
- "kind": "generated_call_script_module",
- "retention": "keep_structured_asm",
- "confidence": "proven",
- "evidence": [
- "complete reconstruction accounts for all 233 calls, both skip-beat gates, workspace updates, and story-flag effects",
- "games/gs1/recon/en/dossiers.json#resource_39e:02001494"
- ]
- },
{
"overlay": "resource_3af",
"start": "0x02002c84",
@@ -3276,14 +2730,15 @@
},
{
"overlay": "resource_3ba",
- "start": "0x02002844",
+ "start": "0x02002910",
"end": "0x02002bac",
"kind": "structured_scene_module",
"retention": "keep_structured_asm",
"confidence": "strong",
"evidence": [
"complete retained body accounts for 43 calls, 1 loop(s), 37 memory operation(s), and its production owner boundary",
- "games/gs1/recon/en/dossiers.json#resource_3ba:02002844"
+ "games/gs1/recon/en/dossiers.json#resource_3ba:02002844",
+ "resource_3ba:02002844 (204 bytes) is now exact C"
]
},
{
@@ -3457,18 +2912,6 @@
"2 zero bytes of alignment padding before the exact owner at 0x02000d4c; no instructions"
]
},
- {
- "overlay": "resource_381",
- "start": "0x020029a4",
- "end": "0x02002ba0",
- "kind": "structured_scene_module",
- "retention": "keep_structured_asm",
- "confidence": "strong",
- "evidence": [
- "complete production body accounts for 28 calls, 3 loop(s), 7 memory operation(s), and its audited boundary",
- "games/gs1/recon/en/dossiers.json#resource_381:020029a4"
- ]
- },
{
"overlay": "resource_3bc",
"start": "0x02000ba2",
@@ -3480,19 +2923,6 @@
"2 zero bytes of alignment padding before the exact owner at 0x02000ba4; no instructions"
]
},
- {
- "overlay": "resource_3bc",
- "start": "0x02000c5c",
- "end": "0x02000d70",
- "kind": "structured_scene_module",
- "retention": "keep_structured_asm",
- "confidence": "strong",
- "evidence": [
- "complete production body accounts for 40 calls, 1 loop(s), 0 memory operation(s), and its audited boundary",
- "games/gs1/recon/en/dossiers.json#resource_3bc:02000ba2",
- "region split around the exact C owner at 0x02000ba4..0x02000c5c; the retained bytes after it keep their classification"
- ]
- },
{
"overlay": "resource_3c4",
"start": "0x02001742",
diff --git a/games/gs1/source-paths.json b/games/gs1/source-paths.json
index 29c351873..b7d229166 100644
--- a/games/gs1/source-paths.json
+++ b/games/gs1/source-paths.json
@@ -7240,23 +7240,27 @@
"name": "MapScene_RunLargeObjectSequence"
},
"resource_380:02000a98": {
- "name": "FieldScene_RunPartyIntroduction"
+ "name": "FieldScene_RunPartyIntroduction",
+ "source": "overlays/scene_primary_script/run_scene_380_party_introduction.c"
},
"resource_380:02000d5c": {
"name": "FieldScene_StagePairedActors",
"source": "overlays/scene_primary_script/run_scene_380_sequence_c.c"
},
"resource_380:02000f8c": {
- "name": "FieldScene_RunActorFormationSequence"
+ "name": "FieldScene_RunActorFormationSequence",
+ "source": "overlays/scene_primary_script/run_scene_380_actor_formation_sequence.c"
},
"resource_3bc:02001a0c": {
- "name": "FieldScene_ArrangeFourActors"
+ "name": "FieldScene_ArrangeFourActors",
+ "source": "overlays/scene_primary_script/run_scene_3bc_arrange_four_actors.c"
},
"resource_3bc:02001c20": {
"name": "FieldScene_RunDualArrivalSequence"
},
"resource_3bc:02001df8": {
- "name": "FieldScene_RunSecondArrivalSequence"
+ "name": "FieldScene_RunSecondArrivalSequence",
+ "source": "overlays/scene_primary_script/run_scene_3bc_second_arrival_sequence.c"
},
"resource_3bc:02001f90": {
"name": "FieldScene_RunTimedArrivalSequence"
@@ -7269,7 +7273,8 @@
"name": "FieldScene_RunMultiActorPresentation"
},
"resource_3c9:0200423c": {
- "name": "FieldScene_RunExtendedPresentation"
+ "name": "FieldScene_RunExtendedPresentation",
+ "source": "overlays/scene_primary_script/run_scene_3c9_extended_presentation.c"
},
"resource_377:02000578": {
"name": "FieldScene_RunComplexActorSequence"
@@ -7297,13 +7302,15 @@
"source": "overlays/scene_primary_script/run_scene_383_sequence_a.c"
},
"resource_383:02000de4": {
- "name": "FieldScene_RunMainSequence"
+ "name": "FieldScene_RunMainSequence",
+ "source": "overlays/scene_primary_script/run_scene_383_main_sequence.c"
},
"resource_383:02001348": {
"name": "FieldScene_RunClosingSequence"
},
"resource_381:02000054": {
- "name": "RunEventScript01"
+ "name": "RunEventScript01",
+ "source": "overlays/scene_primary_script/run_scene_381_event_script01.c"
},
"resource_3af:020039ec": {
"name": "FieldScene_RunStepThen10",
@@ -14422,7 +14429,8 @@
"source": "battle/presentation/build_unit_entries.c"
},
"main:080b9324": {
- "name": "BattlePresentation_BuildOpponentEntries"
+ "name": "BattlePresentation_BuildOpponentEntries",
+ "source": "battle/presentation/build_opponent_entries.c"
},
"main:080b9724": {
"name": "BattlePresentation_AppendLinkedActions"
@@ -14610,15 +14618,13 @@
"main:080fa264": {
"name": "Audio_ResumePlayer"
},
- "resource_371:02001064": {
- "name": "RunEventScript02"
- },
"resource_372:020028a4": {
"name": "RunEventScript01",
"source": "overlays/scene_primary_script/run_scene_372_event_script01.c"
},
"resource_372:02002dec": {
- "name": "RunEventScript02"
+ "name": "RunEventScript02",
+ "source": "overlays/scene_primary_script/run_scene_372_event_script02.c"
},
"resource_374:02000b8c": {
"name": "RunEventScript01"
@@ -14627,10 +14633,12 @@
"name": "FieldScene_RunExtendedSequence"
},
"resource_375:020000dc": {
- "name": "RunEventScript01"
+ "name": "RunEventScript01",
+ "source": "overlays/scene_primary_script/run_scene_375_event_script01.c"
},
"resource_377:02000f90": {
- "name": "RunEventScript01"
+ "name": "RunEventScript01",
+ "source": "overlays/scene_primary_script/run_scene_377_event_script01.c"
},
"resource_379:02000074": {
"name": "RunEventScript01",
@@ -14641,10 +14649,8 @@
"source": "map/locations/sol_shinden/start_trap_event.c"
},
"resource_37b:02000150": {
- "name": "RunEventScript01"
- },
- "resource_37b:02000554": {
- "name": "RunEventScript02"
+ "name": "RunEventScript01",
+ "source": "overlays/scene_primary_script/run_scene_37b_event_script01.c"
},
"resource_381:02001798": {
"name": "RunEventScript02"
@@ -14654,13 +14660,16 @@
"source": "overlays/scene_primary_script/run_scene_383_event_script01.c"
},
"resource_38d:020019b0": {
- "name": "RunEventScript02"
+ "name": "RunEventScript02",
+ "source": "overlays/scene_primary_script/run_scene_38d_event_script02.c"
},
"resource_38e:0200050c": {
- "name": "RunEventScript01"
+ "name": "RunEventScript01",
+ "source": "overlays/scene_primary_script/run_scene_38e_event_script01.c"
},
"resource_396:0200069c": {
- "name": "RunEventScript01"
+ "name": "RunEventScript01",
+ "source": "overlays/scene_primary_script/run_scene_396_event_script01.c"
},
"resource_399:02000f84": {
"name": "RunEventScript01"
@@ -14680,7 +14689,8 @@
"name": "RunEventScript01"
},
"resource_3a2:02000924": {
- "name": "RunEventScript01"
+ "name": "RunEventScript01",
+ "source": "overlays/scene_primary_script/run_scene_3a2_event_script01.c"
},
"resource_3a4:02003028": {
"name": "RunEventScript01",
@@ -14714,7 +14724,8 @@
"source": "overlays/event_script/run_event_script_01_3aa_02000360.c"
},
"resource_3aa:02001450": {
- "name": "RunEventScript04"
+ "name": "RunEventScript04",
+ "source": "overlays/scene_primary_script/run_scene_3aa_event_script04.c"
},
"resource_3af:02001db0": {
"name": "RunEventScript01"
@@ -14758,10 +14769,8 @@
"name": "RunEventScript01"
},
"resource_3c5:02001238": {
- "name": "RunEventScript01"
- },
- "resource_3c5:0200186c": {
- "name": "RunEventScript02"
+ "name": "RunEventScript01",
+ "source": "overlays/scene_primary_script/run_scene_3c5_event_script01.c"
},
"resource_3ce:0200029c": {
"name": "FieldScene_GrantItemListToSlots",
@@ -14842,13 +14851,15 @@
"name": "BattleEffect_CleanupSceneObjects"
},
"main:080a1d08": {
- "name": "InventoryMenu_ShowModalMessage"
+ "name": "InventoryMenu_ShowModalMessage",
+ "source": "inventory_menu/show_modal_message.c"
},
"main:080a24d0": {
"name": "RunAssetSelectionScreen"
},
"main:080b3444": {
- "name": "Shop_SelectPartyMemberItem"
+ "name": "Shop_SelectPartyMemberItem",
+ "source": "shop/select_party_member_item.c"
},
"main:08004838": {
"name": "PaletteDma_LoadBlock"
@@ -14878,7 +14889,8 @@
"name": "MusicTrack_ClearModulationState"
},
"main:080fb2a4": {
- "name": "MusicPlayer_SetPitchAndUpdateFrequency"
+ "name": "MusicPlayer_SetPitchAndUpdateFrequency",
+ "source": "audio/music/player/set_pitch_and_update_frequency.c"
},
"main:08002dd8": {
"name": "Runtime_ReleaseHeapBlock"
@@ -14927,7 +14939,8 @@
"name": "FieldScene_ConfigureAlternateActorLayout"
},
"resource_3c9:020008b4": {
- "name": "FieldScene_RunScriptedActorPresentation"
+ "name": "FieldScene_RunScriptedActorPresentation",
+ "source": "overlays/scene_primary_script/run_scene_3c9_scripted_actor_presentation.c"
},
"resource_373:02002f14": {
"name": "FieldScene_RunPrimaryActorSequence",
@@ -14961,10 +14974,12 @@
"source": "overlays/scene_primary_script/run_scene_3af_encounter_closing_sequence.c"
},
"resource_383:02001f50": {
- "name": "FieldScene_SelectAndConfigureActorPair"
+ "name": "FieldScene_SelectAndConfigureActorPair",
+ "source": "overlays/scene_primary_script/run_scene_383_select_and_configure_actor_pair.c"
},
"resource_383:020021c8": {
- "name": "FieldScene_RunConditionalActorSequence"
+ "name": "FieldScene_RunConditionalActorSequence",
+ "source": "overlays/scene_primary_script/run_scene_383_conditional_actor_sequence.c"
},
"resource_3a4:02001838": {
"name": "FieldScene_BuildMultiPhasePresentation"
@@ -14973,13 +14988,16 @@
"name": "FieldScene_RunMultiPhasePresentation"
},
"resource_3b9:02001cd4": {
- "name": "FieldScene_BuildActorPresentationSequence"
+ "name": "FieldScene_BuildActorPresentationSequence",
+ "source": "overlays/scene_primary_script/run_scene_3b9_build_actor_presentation_sequence.c"
},
"resource_375:0200150c": {
- "name": "FieldScene_ConfigureProgressDependentActors"
+ "name": "FieldScene_ConfigureProgressDependentActors",
+ "source": "overlays/scene_primary_script/run_scene_375_configure_progress_dependent_actors.c"
},
"resource_375:02001760": {
- "name": "FieldScene_RunProgressDependentActorSequence"
+ "name": "FieldScene_RunProgressDependentActorSequence",
+ "source": "overlays/scene_primary_script/run_scene_375_progress_dependent_actor_sequence.c"
},
"resource_3bb:020010dc": {
"name": "FieldScene_ConfigureActorFormation"
@@ -15003,7 +15021,8 @@
"source": "overlays/scene_primary_script/run_scene_3ad_multi_actor_presentation.c"
},
"resource_3b1:02001b34": {
- "name": "FieldScene_RunThreeActorPresentation"
+ "name": "FieldScene_RunThreeActorPresentation",
+ "source": "overlays/scene_primary_script/run_scene_3b1_three_actor_presentation.c"
},
"resource_3b9:02000dcc": {
"name": "FieldScene_RunLargeActorPresentationSetup"
@@ -15016,10 +15035,12 @@
"name": "FieldScene_RunFormationAndEffectPresentation"
},
"resource_3b1:020057ec": {
- "name": "FieldScene_RunExtendedFormationPresentation"
+ "name": "FieldScene_RunExtendedFormationPresentation",
+ "source": "overlays/scene_primary_script/run_scene_3b1_extended_formation_presentation.c"
},
"resource_3b1:02005d10": {
- "name": "FieldScene_RunFourActorProgressPresentation"
+ "name": "FieldScene_RunFourActorProgressPresentation",
+ "source": "overlays/scene_primary_script/run_scene_3b1_four_actor_progress_presentation.c"
},
"resource_3b1:02004254": {
"name": "FieldScene_RunConditionalActorPresentation"
@@ -15029,7 +15050,8 @@
"source": "overlays/scene_primary_script/run_scene_399_three_actor_choreography.c"
},
"resource_3b1:020038ac": {
- "name": "FieldScene_RunActorAvailabilityPresentation"
+ "name": "FieldScene_RunActorAvailabilityPresentation",
+ "source": "overlays/scene_primary_script/run_scene_3b1_actor_availability_presentation.c"
},
"resource_39c:02004a08": {
"name": "FieldScene_RunActorCoordinateDialogueSequence"
@@ -15039,14 +15061,16 @@
"source": "overlays/scene_primary_script/run_scene_378_paired_actor_choreography.c"
},
"resource_3b1:02001f3c": {
- "name": "FieldScene_RunExtendedActorChoreography"
+ "name": "FieldScene_RunExtendedActorChoreography",
+ "source": "overlays/scene_primary_script/run_scene_3b1_extended_actor_choreography.c"
},
"resource_3bc:02001474": {
"name": "FieldScene_RunMultiPhaseActorSequence",
"source": "overlays/scene_primary_script/run_scene_3bc_multi_phase_actor_sequence.c"
},
"resource_3ab:0200131c": {
- "name": "FieldScene_RunActorDialogueMovementSequence"
+ "name": "FieldScene_RunActorDialogueMovementSequence",
+ "source": "overlays/scene_primary_script/run_scene_3ab_actor_dialogue_movement_sequence.c"
},
"resource_39b:02001730": {
"name": "FieldScene_RunActorExchangeChoreography"
@@ -15087,7 +15111,8 @@
"name": "FieldScene_RunActorNineteenScript"
},
"resource_3b1:020027d8": {
- "name": "FieldScene_RunBranchingActorPresentation"
+ "name": "FieldScene_RunBranchingActorPresentation",
+ "source": "overlays/scene_primary_script/run_scene_3b1_branching_actor_presentation.c"
},
"resource_3b1:020050e4": {
"name": "FieldScene_RunPositionTransferPresentation",
@@ -15098,7 +15123,8 @@
"source": "overlays/scene_primary_script/run_scene_3a8_two_actor_cutscene_sequence.c"
},
"resource_380:020006f4": {
- "name": "FieldScene_RunMultiStageEffectPresentation"
+ "name": "FieldScene_RunMultiStageEffectPresentation",
+ "source": "overlays/scene_primary_script/run_scene_380_multi_stage_effect_presentation.c"
},
"resource_380:02002400": {
"name": "FieldScene_RunSixPassEffectSequence",
@@ -15109,20 +15135,24 @@
"source": "overlays/scene_primary_script/run_scene_39c_actor_three_branch_sequence.c"
},
"resource_3ba:02001214": {
- "name": "FieldScene_RunMapEntranceCoordinator"
+ "name": "FieldScene_RunMapEntranceCoordinator",
+ "source": "overlays/scene_primary_script/run_scene_3ba_map_entrance_coordinator.c"
},
"resource_3bb:02001538": {
"name": "FieldScene_RunSceneThreeCoordinator",
"source": "overlays/scene_primary_script/run_scene_3bb_scene_three_coordinator.c"
},
"resource_3ba:020016ec": {
- "name": "FieldScene_RunSceneFourCoordinator"
+ "name": "FieldScene_RunSceneFourCoordinator",
+ "source": "overlays/scene_primary_script/run_scene_3ba_scene_four_coordinator.c"
},
"resource_3b0:02000e78": {
- "name": "FieldScene_RunSevenActorEnsemble"
+ "name": "FieldScene_RunSevenActorEnsemble",
+ "source": "overlays/scene_primary_script/run_scene_3b0_seven_actor_ensemble.c"
},
"resource_3bb:020016d4": {
- "name": "FieldScene_RunLiftedActorCoordinator"
+ "name": "FieldScene_RunLiftedActorCoordinator",
+ "source": "overlays/scene_primary_script/run_scene_3bb_lifted_actor_coordinator.c"
},
"resource_3b0:020007b0": {
"name": "FieldScene_RunActorNinePresentationCycles",
@@ -15152,7 +15182,8 @@
"source": "overlays/scene_primary_script/run_scene_378_actor_update_sequence.c"
},
"resource_39e:02001494": {
- "name": "FieldScene_RunSecondEnsembleBeat"
+ "name": "FieldScene_RunSecondEnsembleBeat",
+ "source": "overlays/scene_primary_script/run_scene_39e_second_ensemble_beat.c"
},
"resource_39e:02001dbc": {
"name": "FieldScene_RunEnsembleStoryBeat",
@@ -15292,7 +15323,8 @@
"source": "overlays/scene_primary_script/run_scene_3bb_late_sequence.c"
},
"resource_3ba:02002844": {
- "name": "FieldScene_RunLateSequence"
+ "name": "FieldScene_RunLateSequence",
+ "source": "overlays/scene_primary_script/run_scene_3ba_late_sequence.c"
},
"resource_39a:02001750": {
"name": "FieldScene_RunPrimarySequence",
@@ -15524,7 +15556,8 @@
"source": "overlays/scene_primary_script/run_scene_378_supplemental_sequence_one.c"
},
"resource_381:020029a4": {
- "name": "FieldScene_RunSupplementalSequenceOne"
+ "name": "FieldScene_RunSupplementalSequenceOne",
+ "source": "overlays/scene_primary_script/run_scene_381_supplemental_sequence_one.c"
},
"resource_3a7:02000754": {
"name": "FieldScene_RunSupplementalSequenceOne",
@@ -15651,7 +15684,8 @@
"source": "overlays/scene_effect_sequence/run_primary_effect_sequence.c"
},
"resource_37f:0200161c": {
- "name": "RunEventScript02"
+ "name": "RunEventScript02",
+ "source": "overlays/scene_primary_script/run_scene_37f_event_script02.c"
},
"resource_3c4:02001fdc": {
"name": "FieldScene_RunLateSequenceHead",
@@ -16662,10 +16696,12 @@
"source": "overlays/scene_primary_script/run_scene_382_020004a0.c"
},
"resource_371:02000c28": {
- "name": "RunEventScript01Second"
+ "name": "RunEventScript01Second",
+ "source": "overlays/scene_primary_script/run_scene_371_event_script01_second.c"
},
"resource_380:0200178c": {
- "name": "RunEventScript01Second"
+ "name": "RunEventScript01Second",
+ "source": "overlays/scene_primary_script/run_scene_380_event_script01_second.c"
},
"resource_371:02000a8c": {
"name": "RunEventScript01",
@@ -16676,7 +16712,8 @@
"source": "overlays/event_script/run_event_script_01_380_02001450.c"
},
"resource_395:02000488": {
- "name": "RunEventScript01Second"
+ "name": "RunEventScript01Second",
+ "source": "overlays/scene_primary_script/run_scene_395_event_script01_second.c"
},
"resource_395:020002ec": {
"name": "RunEventScript01",
@@ -17229,6 +17266,134 @@
"main:0800ff54": {
"name": "Map_RenderPaletteMappedBlock",
"source": "map/shared/render_palette_mapped_block.c"
+ },
+ "resource_372:0200173c": {
+ "name": "FieldScene_RunScene372SequenceF",
+ "source": "overlays/scene_primary_script/run_scene_372_sequence_f.c"
+ },
+ "resource_373:020010d8": {
+ "name": "FieldScene_RunScene373SequenceF",
+ "source": "overlays/scene_primary_script/run_scene_373_sequence_f.c"
+ },
+ "resource_374:02000bbc": {
+ "name": "FieldScene_RunScene374SequenceA",
+ "source": "overlays/scene_primary_script/run_scene_374_sequence_a.c"
+ },
+ "resource_377:0200133c": {
+ "name": "FieldScene_RunScene377SequenceA",
+ "source": "overlays/scene_primary_script/run_scene_377_sequence_a.c"
+ },
+ "resource_37b:02000614": {
+ "name": "FieldScene_RunScene37bSequenceD",
+ "source": "overlays/scene_primary_script/run_scene_37b_sequence_d.c"
+ },
+ "resource_37b:0200166c": {
+ "name": "FieldScene_RunScene37bSequenceE",
+ "source": "overlays/scene_primary_script/run_scene_37b_sequence_e.c"
+ },
+ "resource_37b:020016a4": {
+ "name": "FieldScene_RunScene37bSequenceF",
+ "source": "overlays/scene_primary_script/run_scene_37b_sequence_f.c"
+ },
+ "resource_37b:020016dc": {
+ "name": "FieldScene_RunScene37bSequenceG",
+ "source": "overlays/scene_primary_script/run_scene_37b_sequence_g.c"
+ },
+ "resource_37f:020000ec": {
+ "name": "FieldScene_RunScene37fSequenceC",
+ "source": "overlays/scene_primary_script/run_scene_37f_sequence_c.c"
+ },
+ "resource_37f:020017c0": {
+ "name": "FieldScene_RunScene37fSequenceB",
+ "source": "overlays/scene_primary_script/run_scene_37f_sequence_b.c"
+ },
+ "resource_383:02002db4": {
+ "name": "FieldScene_RunScene383_02002db4",
+ "source": "overlays/scene_primary_script/run_scene_383_02002db4.c"
+ },
+ "resource_38e:020005dc": {
+ "name": "FieldScene_RunScene38eSequenceA",
+ "source": "overlays/scene_primary_script/run_scene_38e_sequence_a.c"
+ },
+ "resource_399:02000f90": {
+ "name": "FieldScene_RunScene399SequenceB",
+ "source": "overlays/scene_primary_script/run_scene_399_sequence_b.c"
+ },
+ "resource_39a:020017e4": {
+ "name": "FieldScene_RunScene39aSequenceD",
+ "source": "overlays/scene_primary_script/run_scene_39a_sequence_d.c"
+ },
+ "resource_39a:02001948": {
+ "name": "FieldScene_RunScene39aSequenceC",
+ "source": "overlays/scene_primary_script/run_scene_39a_sequence_c.c"
+ },
+ "resource_39a:02001a34": {
+ "name": "FieldScene_RunScene39aSequenceB",
+ "source": "overlays/scene_primary_script/run_scene_39a_sequence_b.c"
+ },
+ "resource_39e:02000658": {
+ "name": "FieldScene_RunScene39eSequenceB",
+ "source": "overlays/scene_primary_script/run_scene_39e_sequence_b.c"
+ },
+ "resource_39e:0200071c": {
+ "name": "FieldScene_RunScene39eSequenceC",
+ "source": "overlays/scene_primary_script/run_scene_39e_sequence_c.c"
+ },
+ "resource_3a2:02000ac0": {
+ "name": "FieldScene_RunScene3a2SequenceB",
+ "source": "overlays/scene_primary_script/run_scene_3a2_sequence_b.c"
+ },
+ "resource_3a2:02000b2c": {
+ "name": "FieldScene_RunScene3a2SequenceC",
+ "source": "overlays/scene_primary_script/run_scene_3a2_sequence_c.c"
+ },
+ "resource_3a2:02000c30": {
+ "name": "FieldScene_RunScene3a2SequenceD",
+ "source": "overlays/scene_primary_script/run_scene_3a2_sequence_d.c"
+ },
+ "resource_3af:02001f90": {
+ "name": "FieldScene_RunScene3afSequenceB",
+ "source": "overlays/scene_primary_script/run_scene_3af_sequence_b.c"
+ },
+ "resource_3bf:02000d54": {
+ "name": "FieldScene_RunScene3bfSequenceE",
+ "source": "overlays/scene_primary_script/run_scene_3bf_sequence_e.c"
+ },
+ "resource_3c5:02001b10": {
+ "name": "FieldScene_RunScene3c5SequenceC",
+ "source": "overlays/scene_primary_script/run_scene_3c5_sequence_c.c"
+ },
+ "resource_3bc:02000c5c": {
+ "name": "FieldScene_RunScene3bcSequenceB",
+ "source": "overlays/scene_primary_script/run_scene_3bc_sequence_b.c"
+ },
+ "resource_3aa:02001494": {
+ "name": "FieldScene_RunScene3aaSequenceA",
+ "source": "overlays/scene_primary_script/run_scene_3aa_sequence_a.c"
+ },
+ "main:08010704": {
+ "name": "Graphics_CopyRectKeepLow",
+ "source": "graphics/tile/copy_rect_keep_low.c"
+ },
+ "main:080207c4": {
+ "name": "SaveState_LoadSelectedSlot",
+ "source": "save/state/load_selected_slot.c"
+ },
+ "main:08028c04": {
+ "name": "Menu_RunResourceModePrompt",
+ "source": "menu/run_resource_mode_prompt.c"
+ },
+ "main:0808ce74": {
+ "name": "Map_GetFocusedObjectTile",
+ "source": "map/get_focused_object_tile.c"
+ },
+ "main:0808e14c": {
+ "name": "Map_FindMatchingTrigger",
+ "source": "map/find_matching_trigger.c"
+ },
+ "main:080a6b64": {
+ "name": "PsynergyMenu_DrawVisibleActionPage",
+ "source": "psynergy_menu/draw_visible_action_page.c"
}
}
}
diff --git a/games/gs1/recon/en/main/080fb2a4.c b/games/gs1/src/audio/music/player/set_pitch_and_update_frequency.c
similarity index 63%
rename from games/gs1/recon/en/main/080fb2a4.c
rename to games/gs1/src/audio/music/player/set_pitch_and_update_frequency.c
index 29873f56d..42cdc85e3 100644
--- a/games/gs1/recon/en/main/080fb2a4.c
+++ b/games/gs1/src/audio/music/player/set_pitch_and_update_frequency.c
@@ -11,12 +11,12 @@ struct MusicPlayerPitchState {
void MusicPlayer_SetPitchAndUpdateFrequency(
struct MusicPlayerPitchState *player,
- s32 value)
+ u16 value)
{
- u16 pitch = value;
-
if (player->ident == 0x68736d53) {
- player->pitch = pitch;
- player->scaled_pitch = (pitch * player->pitch_scale) >> 8;
+ player->ident++;
+ player->pitch = value;
+ player->scaled_pitch = (player->pitch_scale * player->pitch) >> 8;
+ player->ident = 0x68736d53;
}
}
diff --git a/games/gs1/src/battle/presentation/build_opponent_entries.c b/games/gs1/src/battle/presentation/build_opponent_entries.c
new file mode 100644
index 000000000..16f1a92c2
--- /dev/null
+++ b/games/gs1/src/battle/presentation/build_opponent_entries.c
@@ -0,0 +1,94 @@
+#include "types.h"
+#include "battle_party.h"
+#include "battle_runtime.h"
+#include "fixed_math.h"
+
+void Func_080bd424(void *entry, s32 retry);
+u32 Random16(void);
+
+struct BattlePresentationOpponentEntry {
+ s16 unit_id;
+ u16 unknown_02;
+ u16 value;
+ s16 kind;
+ s16 parameter;
+ s16 unknown_0a;
+ u8 unknown_0c[4];
+};
+
+s32 Func_080b9324(
+ struct BattlePresentationOpponentEntry *entries)
+{
+ s32 entry_count;
+ u8 *mode;
+ u16 unit_ids[14];
+ s32 unit_count;
+ s32 index;
+ s32 copy_index;
+ s32 unit_id;
+ struct BattleUnit *unit;
+ struct BattlePresentationOpponentEntry *entry;
+ s32 agility;
+ s32 limit;
+ s32 first;
+ s32 second;
+ s32 swap;
+
+ entry_count = 0;
+ mode = *(u8 **)0x03001e74 + 0x45;
+ if (*mode == 1) {
+ return 0;
+ }
+
+ unit_count = BattleParty_ListLivingUnits(2, unit_ids);
+ if (unit_count == 0) {
+ return 0;
+ }
+
+ index = 31;
+ do {
+ first = (u32)(unit_count * Random16()) >> 16;
+ second = (u32)(unit_count * Random16()) >> 16;
+ swap = unit_ids[first];
+ unit_ids[first] = unit_ids[second];
+ unit_ids[second] = swap;
+ index--;
+ } while (index >= 0);
+
+ if (*mode == 2) {
+ limit = ((u32)(Random16() * 5) >> 16) + 1;
+ if (limit <= 1) {
+ limit = 2;
+ }
+ if (limit < unit_count) {
+ unit_count = limit;
+ }
+ }
+
+ for (index = 0; index < unit_count; index++) {
+ unit_id = unit_ids[index];
+ unit = BattleUnit_Get(unit_id);
+ for (copy_index = 0; copy_index < unit->action_entry_count; copy_index++) {
+ entry = &entries[entry_count];
+ entry->unit_id = unit_id;
+ agility = unit->agility;
+ entry->value = agility;
+ if (copy_index != 0) {
+ entry->value = (s16)agility / 2;
+ }
+ if (unit->sleep != 0 || unit->stun != 0) {
+ entry->kind = 8;
+ entry->parameter = 0;
+ entry->unknown_0a = 0x100;
+ } else {
+ Func_080bd424(entry, 0);
+ }
+ entry_count++;
+ if (*mode == 2) {
+ break;
+ }
+ }
+ }
+
+ return entry_count;
+}
diff --git a/games/gs1/recon/en/main/08010704.c b/games/gs1/src/graphics/tile/copy_rect_keep_low.c
similarity index 61%
rename from games/gs1/recon/en/main/08010704.c
rename to games/gs1/src/graphics/tile/copy_rect_keep_low.c
index 064d4202b..1efdf8480 100644
--- a/games/gs1/recon/en/main/08010704.c
+++ b/games/gs1/src/graphics/tile/copy_rect_keep_low.c
@@ -2,17 +2,21 @@
void Func_08010704(s32 srcX, s32 srcY, s32 width, s32 height, s32 dstX, s32 dstY)
{
- u32 base = 0x02010000;
- u8 *dst = (u8 *)(base + (((dstY << 7) + dstX) << 2));
- u8 *src = (u8 *)(base + (((srcY << 7) + srcX) << 2));
- s32 row;
+ u8 *src = (u8 *)0x02010000;
+ u8 *dst = src + (((dstY << 7) + dstX) << 2);
+ u16 row;
+
+ src += ((srcY << 7) + srcX) << 2;
if (height > 0) {
row = 0;
do {
- u32 *dstRow = (u32 *)(dst + (row << 9));
- u32 *srcRow = (u32 *)(src + (row << 9));
- s32 col;
+ u32 *srcRow;
+ u32 *dstRow;
+ u16 col;
+
+ dstRow = (u32 *)(dst + (row << 9));
+ srcRow = (u32 *)(src + (row << 9));
if (width > 0) {
col = 0;
diff --git a/games/gs1/recon/en/main/080a1d08.c b/games/gs1/src/inventory_menu/show_modal_message.c
similarity index 66%
rename from games/gs1/recon/en/main/080a1d08.c
rename to games/gs1/src/inventory_menu/show_modal_message.c
index 1a257c88f..d87174562 100644
--- a/games/gs1/recon/en/main/080a1d08.c
+++ b/games/gs1/src/inventory_menu/show_modal_message.c
@@ -1,6 +1,5 @@
#include "inventory_menu.h"
-
-#define INPUT_NEW_KEYS (*(volatile u32 *)0x03001c94)
+#include "global_cells.h"
void Func_08015108(s32 message, s32 *, s32 *, s32 *, s32 *);
s32 UiWindow_UpdateOrCreate(s32 *, s32, s32, s32, s32, s32);
@@ -10,44 +9,43 @@ void Func_08015278(s32 window);
void UiText_DrawAt(s32 message, s32 window, s32 x, s32 y);
void UiText_DrawMessageAt(s32 message, s32 window, s32 x, s32 y);
void WaitFrames(s32 frames);
-void Func_080770c8(s32 flag);
+void GameFlag_Set(s32 flag);
void UiWindow_CloseIfOpen(s32 *, s32);
-#define InventoryMenu_ShowModalMessage Func_080a1d08
-
/* Show an inventory message and optionally wait for an acknowledgement. */
-void InventoryMenu_ShowModalMessage(
+void Func_080a1d08(
s32 message,
s32 acknowledgement_mode,
s32 window_mode)
{
- u8 *menu = *(u8 **)0x03001f2c;
+ struct InventoryMenuState *menu;
s32 window;
s32 left;
s32 top;
s32 width;
s32 height;
- (*(struct InventoryMenuIcon **)(menu + 0x14))->state = 13;
+ menu = Data_03001f2c;
+ (*(struct InventoryMenuIcon **)((u8 *)menu + 0x14))->state = 13;
if (window_mode != -1) {
Func_08015108(message, &left, &top, &width, &height);
if (UiWindow_UpdateOrCreate(
- (s32 *)(menu + 0x3c),
+ (s32 *)((u8 *)menu + 0x3c),
acknowledgement_mode,
window_mode,
width,
height,
0x102) == 0) {
WindowBounds_Set(
- *(s32 *)(menu + 0x3c),
+ *(s32 *)((u8 *)menu + 0x3c),
acknowledgement_mode,
window_mode,
width,
height);
}
- window = *(s32 *)(menu + 0x3c);
+ window = *(s32 *)((u8 *)menu + 0x3c);
} else {
- window = *(s32 *)(menu + 0x2c);
+ window = menu->info_window;
}
UiWindow_Commit(window);
@@ -61,17 +59,21 @@ void InventoryMenu_ShowModalMessage(
WaitFrames(1);
do {
WaitFrames(1);
- } while ((INPUT_NEW_KEYS & (1 | 2 | 8)) == 0);
+ if ((*(volatile u32 *)ADDR_03001C94 & 1) != 0)
+ break;
+ if ((*(volatile u32 *)ADDR_03001C94 & 2) != 0)
+ break;
+ } while ((*(volatile u32 *)ADDR_03001C94 & 8) == 0);
if (window_mode == -1)
UiWindow_Commit(window);
Func_08015278(window);
} else {
- Func_080770c8(0x151);
+ GameFlag_Set(0x151);
}
- *(s16 *)(menu + 0x222) = 1;
- (*(struct InventoryMenuIcon **)(menu + 0x14))->state = 1;
+ menu->completion_flag = 1;
+ (*(struct InventoryMenuIcon **)((u8 *)menu + 0x14))->state = 1;
if (window_mode != -1)
- UiWindow_CloseIfOpen((s32 *)(menu + 0x3c), 1);
+ UiWindow_CloseIfOpen((s32 *)((u8 *)menu + 0x3c), 1);
}
diff --git a/games/gs1/recon/en/main/0808e14c.c b/games/gs1/src/map/find_matching_trigger.c
similarity index 54%
rename from games/gs1/recon/en/main/0808e14c.c
rename to games/gs1/src/map/find_matching_trigger.c
index 8fc2d7fd7..bd2720686 100644
--- a/games/gs1/recon/en/main/0808e14c.c
+++ b/games/gs1/src/map/find_matching_trigger.c
@@ -1,24 +1,22 @@
#include "types.h"
#include "object_lookup.h"
-#define GetFocusedObjectCollision Func_0808bd24
-
-s32 Func_0808ddec(u32 object_id);
+s32 Func_0808ddec(s32 object_id);
s32 GameFlag_IsConditionActive(s32 condition);
-s32 GetFocusedObjectCollision(void);
+s32 Func_0808bd24(void);
/* 12-byte trigger table, terminated by a sentinel entry whose first word is
-1. flags: bits0-3 = type (must be 4), bit4 = which candidate id `id`
is compared against, bits8-15 = a source/party id to match against the
- caller's masked argument. facing: bits0-7 = id to compare against
+ caller's masked argument. metadata: bits0-7 = id to compare against
`id`, bit11 = enable the facing-quantum check, bits12-15 = required
facing quantum (top nibble of a 0-0xffff angle, matching the angle unit
RotateVectorByMagnitude and Object_0808bd24.kind use elsewhere). */
struct Trigger_0808e14c {
- u32 flags;
- s16 facing;
+ s32 flags;
+ u16 metadata;
s16 condition;
- u8 unknown_08[4];
+ s32 effect;
};
struct Runtime_0808e14c {
@@ -33,7 +31,7 @@ struct Object_0808e14c {
struct Global_0808e14c {
u8 padding000[0x1f4];
- u32 object_id;
+ s32 object_id;
};
extern struct Global_0808e14c Data_02000240;
@@ -41,26 +39,20 @@ extern struct Runtime_0808e14c *Data_03001ebc;
void *Func_0808e14c(u32 arg0)
{
- struct Trigger_0808e14c *trigger;
- struct Object_0808e14c *object;
- u32 facing;
- s32 id;
- u32 masked;
- u32 collision;
-
- trigger = Data_03001ebc->triggers;
- object = ObjectTable_Get(Data_02000240.object_id);
- facing = object->kind;
- id = Func_0808ddec(Data_02000240.object_id);
- masked = arg0 & 0x1ff;
- collision = GetFocusedObjectCollision();
+ struct Trigger_0808e14c *trigger = Data_03001ebc->triggers;
+ struct Object_0808e14c *object = ObjectTable_Get(Data_02000240.object_id);
+ s32 facing = object->kind;
+ s32 id = Func_0808ddec(Data_02000240.object_id);
+ s32 masked = arg0 & 0x1ff;
+ s32 collision = Func_0808bd24();
- for (; trigger->flags != (u32)-1; trigger++) {
- s32 dirNibble = trigger->facing & 0xf000;
- s16 facingWord = trigger->facing;
- s16 dirCheckEnabled = facingWord & 0x800;
- u32 type = trigger->flags & 0xf;
- u32 matchId = facingWord & 0xff;
+ for (; trigger->flags != -1; trigger++) {
+ s32 dirNibble = (s16)trigger->metadata & 0xf000;
+ s16 dirCheckEnabled = trigger->metadata & 0x800;
+ s32 matchId = trigger->metadata & 0xff;
+ s32 type = trigger->flags & 0xf;
+ s32 flags;
+ u8 src;
if (type != 4)
continue;
@@ -71,15 +63,15 @@ void *Func_0808e14c(u32 arg0)
if ((u16)diff > 0x2ffe)
continue;
}
- if (masked != 0 && ((u8 *)&trigger->flags)[1] != masked)
+ flags = trigger->flags;
+ src = ((u8 *)&trigger->flags)[1];
+ if (masked != 0 && src != masked)
continue;
- if (trigger->flags & 0x10) {
+ if (flags & 0x10) {
if (matchId == id)
return trigger;
- } else {
- if (matchId == collision)
- return trigger;
- }
+ } else if (matchId == collision)
+ return trigger;
}
return 0;
diff --git a/games/gs1/src/map/get_focused_object_tile.c b/games/gs1/src/map/get_focused_object_tile.c
new file mode 100644
index 000000000..ab5fe5838
--- /dev/null
+++ b/games/gs1/src/map/get_focused_object_tile.c
@@ -0,0 +1,111 @@
+#include "types.h"
+#include "map.h"
+
+struct Object_0808bd24 {
+ u8 padding00[6];
+ u16 kind;
+ s32 x;
+ s32 unknown_0c;
+ s32 y;
+ u8 padding14[14];
+ u8 terrain_id;
+};
+
+struct Runtime_0808bd24 {
+ u8 padding000[0x19e];
+ s16 mode;
+};
+
+struct Global_0808bd24 {
+ u8 padding000[0x1f4];
+ u32 object_id;
+};
+
+struct Position_0808bd24 {
+ s32 x;
+ s32 unknown_04;
+ s32 y;
+};
+
+void RotateVectorByMagnitude(s32, u32, struct Position_0808bd24 *);
+s32 Func_080091a8(s32, s32, s32);
+s32 Func_0808d48c(s32, s32);
+void *ObjectTable_Get(u32);
+
+extern struct Global_0808bd24 Data_02000240;
+extern struct Runtime_0808bd24 *Data_03001ebc;
+
+s32 Func_0808ce74(void)
+{
+ u32 runtime_slot_address;
+ struct Runtime_0808bd24 *runtime;
+ struct Object_0808bd24 *object;
+ struct MapState *map;
+ struct Position_0808bd24 position;
+ u8 *tile;
+ s32 x;
+ s32 y;
+ s32 result;
+ u8 tile_value;
+
+ result = 0;
+ object = ObjectTable_Get(Data_02000240.object_id);
+ runtime_slot_address = (u32)&Data_03001ebc;
+ runtime = Data_03001ebc;
+ map = *(struct MapState **)(runtime_slot_address - 76);
+
+ if (object != 0) {
+ position.x = object->x;
+ position.unknown_04 = object->unknown_0c;
+ position.y = object->y;
+ RotateVectorByMagnitude(0x100000, object->kind, &position);
+
+ if (runtime->mode == 3) {
+ u32 tile_x;
+ u32 tile_y;
+
+ x = position.x;
+ if (x < 0)
+ x += 0x1fffff;
+ tile_x = (x >> 21) & 31;
+
+ y = position.y;
+ if (y < 0)
+ y += 0x1fffff;
+ tile_y = (y >> 21) & 31;
+
+ tile = (u8 *)(0x02020000 + ((tile_x + (tile_y << 5)) << 2));
+ } else {
+ tile = (u8 *)map->layers[0].cells;
+
+ x = position.x;
+ if (x < 0)
+ x += 0xfffff;
+ {
+ u32 tile_x = x >> 20;
+
+ y = position.y;
+ if (y < 0)
+ y += 0xfffff;
+
+ tile = (u8 *)((u32)tile +
+ ((tile_x + ((u32)(y >> 20) << 7)) << 2));
+ }
+ }
+
+ tile_value = tile[2];
+ if ((u32)(tile_value - 242) <= 5) {
+ s32 height;
+ s32 base;
+
+ height = Func_080091a8(object->terrain_id, position.x, position.y);
+ base = object->unknown_0c;
+ if (height >= base && height <= base + 0x400000)
+ result = tile_value;
+ } else if (Func_0808d48c(3, tile_value) != 0) {
+ result = tile_value;
+ }
+ }
+
+ return result;
+}
diff --git a/games/gs1/recon/en/main/08028c04.c b/games/gs1/src/menu/run_resource_mode_prompt.c
similarity index 65%
rename from games/gs1/recon/en/main/08028c04.c
rename to games/gs1/src/menu/run_resource_mode_prompt.c
index 9de9bc7ff..9dfefcb5e 100644
--- a/games/gs1/recon/en/main/08028c04.c
+++ b/games/gs1/src/menu/run_resource_mode_prompt.c
@@ -1,8 +1,8 @@
#include "types.h"
-#define M2C_FIELD(expr, type_ptr, offset) (*(type_ptr)((s8 *)(expr) + (offset)))
-
-extern void *Data_03001f38;
+extern u8 Data_03001f38;
+extern u8 Value_00000c76;
+extern u8 Value_00000c77;
void *Func_080284dc(void);
void Menu_AppendResourceEntry(s32);
@@ -19,7 +19,7 @@ void Func_0802851c(void);
s32 Func_08028c04(s32 mode)
{
- void *state;
+ u8 *state;
s32 window_a;
s32 window_b;
s32 msg_base;
@@ -27,7 +27,7 @@ s32 Func_08028c04(s32 mode)
s32 value;
Func_080284dc();
- state = Data_03001f38;
+ state = *(u8 **)&Data_03001f38;
if (mode == 0) {
Menu_AppendResourceEntry(0x2C);
Menu_AppendResourceEntry(0x2D);
@@ -38,28 +38,31 @@ s32 Func_08028c04(s32 mode)
}
Func_08028808(0x11, 7, 0);
if (mode != 0) {
+ s32 none;
Func_080041d8(0x08028AA9, 0xC76);
- M2C_FIELD(state, u16 *, 0x96) = 0xFFFF;
+ none = 0xFFFF;
+ *(u16 *)(state + 0x96) = none;
window_b = Func_080162d4(7, 0, 0x11, 4, 2);
- msg_base = 0xC77;
- win_b_field = (s32 *)((u8 *)state + 0x80);
+ msg_base = (s32)&Value_00000c77;
+ win_b_field = (s32 *)(state + 0x80);
*win_b_field = window_b;
Func_0801e74c(msg_base, window_b, 0, 4);
window_a = Func_080162d4(3, 4, 0x19, 0xC, 2);
- M2C_FIELD(state, s32 *, 0x7C) = window_a;
+ *(s32 *)(state + 0x7C) = window_a;
Func_0801e74c(msg_base + 1, window_a, 8, 0);
- Func_0801e74c(msg_base + 2, M2C_FIELD(state, s32 *, 0x7C), 8, 0xB);
+ Func_0801e74c(msg_base + 2, *(s32 *)(state + 0x7C), 8, 0xB);
msg_base += 3;
- Func_0801e74c(msg_base, M2C_FIELD(state, s32 *, 0x7C), 8, 0x16);
+ Func_0801e74c(msg_base, *(s32 *)(state + 0x7C), 8, 0x16);
} else {
+ s32 none;
Func_080041d8(0x08028B81, 0xC76);
- M2C_FIELD(state, u16 *, 0x96) = 0xFFFF;
+ none = 0xFFFF;
+ *(u16 *)(state + 0x96) = none;
window_b = Func_080162d4(6, 0, 0x12, 4, 2);
- win_b_field = (s32 *)((u8 *)state + 0x80);
+ win_b_field = (s32 *)(state + 0x80);
*win_b_field = window_b;
- Func_0801e74c(0xC76, window_b, 2, 4);
- window_a = Func_080162d4(1, 5, 0x1C, 7, 2);
- M2C_FIELD(state, s32 *, 0x7C) = window_a;
+ Func_0801e74c((s32)&Value_00000c76, window_b, 2, 4);
+ *(s32 *)(state + 0x7C) = Func_080162d4(1, 5, 0x1C, 7, 2);
}
value = Func_08028574(0);
if (mode != 0) {
@@ -68,9 +71,9 @@ s32 Func_08028c04(s32 mode)
Func_08004278(0x08028B81);
}
Func_08016478(*win_b_field);
- Func_08016478(M2C_FIELD(state, s32 *, 0x7C));
+ Func_08016478(*(s32 *)(state + 0x7C));
Func_08016418(*win_b_field, 2);
- Func_08016418(M2C_FIELD(state, s32 *, 0x7C), 2);
+ Func_08016418(*(s32 *)(state + 0x7C), 2);
Func_080030f8(1);
Func_0802851c();
return value;
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_371_event_script01_second.c b/games/gs1/src/overlays/scene_primary_script/run_scene_371_event_script01_second.c
new file mode 100644
index 000000000..c1c3657d1
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_371_event_script01_second.c
@@ -0,0 +1,546 @@
+#include "types.h"
+
+#define RunEventScript01 Func_02000c28
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0200caf4[];
+extern u8 Data_03001ebc[];
+void Func_02002586();
+void Func_0200284e();
+void Func_02002852();
+void Func_02004dc8();
+void Func_02004dec();
+void Func_02004e2a();
+void Func_02004efe();
+void Func_02004f02();
+void Func_02004f10();
+s32 Func_02004f2a();
+void Func_02004f7e();
+void Func_02004f88();
+s32 Func_02004fb0();
+void Func_02004fca();
+void Func_02004fcc();
+void Func_02004fd0();
+void Func_02004fd8();
+void Func_02004fda();
+void Func_02004fe4();
+void Func_02004fe6();
+void Func_02004fee();
+void Func_02004ffc();
+void Func_02005004();
+void Func_0200500a();
+void Func_02005012();
+void Func_02005020();
+s32 Func_02005022();
+void Func_0200503e();
+void Func_02005042();
+void Func_02005056();
+void Func_02005058();
+void Func_02005084();
+void Func_0200508a();
+void Func_02005090();
+void Func_02005098();
+void Func_020050ac();
+void Func_020050be();
+void Func_020050ca();
+void Func_020050cc();
+void Func_020050d4();
+void Func_020050da();
+void Func_020050f8();
+void Func_02005106();
+void Func_02005110();
+void Func_02005114();
+void Func_0200511c();
+void Func_02005128();
+void Func_02005136();
+void Func_02005140();
+void Func_02005144();
+void Func_0200514a();
+void Func_0200515e();
+void Func_0200516a();
+void Func_02005176();
+void Func_02005182();
+void Func_0200518c();
+void Func_0200518e();
+void Func_0200519a();
+void Func_0200519c();
+void Func_020051a2();
+void Func_020051aa();
+void Func_020051ac();
+void Func_020051b2();
+void Func_020051ba();
+void Func_020051c4();
+void Func_020051d6();
+void Func_020051dc();
+void Func_020051e0();
+void Func_020051e2();
+void Func_020051ec();
+void Func_020051f8();
+void Func_0200520a();
+s32 Func_02005210();
+void Func_02005230();
+void Func_02005244();
+void Func_02005246();
+void Func_0200525a();
+void Func_0200525c();
+void Func_02005266();
+void Func_0200526c();
+void Func_02005274();
+void Func_02005280();
+void Func_02005294();
+void Func_0200529a();
+void Func_020052a2();
+void Func_020052a6();
+void Func_020052ae();
+void Func_020052b0();
+void Func_020052ba();
+void Func_020052d0();
+void Func_020052e6();
+void Func_02005302();
+void Func_02005304();
+void Func_02005318();
+void Func_0200531c();
+void Func_02005324();
+void Func_02005336();
+void Func_02005340();
+void Func_02005346();
+void Func_0200534c();
+void Func_02005356();
+void Func_02005358();
+void Func_02005366();
+void Func_0200536e();
+void Func_0200537c();
+void Func_02005380();
+void Func_02005382();
+void Func_02005396();
+void Func_02005398();
+void Func_020053a4();
+void Func_020053a6();
+void Func_020053b0();
+void Func_020053b2();
+void Func_020053c4();
+void Func_020053d2();
+void Func_020053d6();
+void Func_020053e2();
+void Func_020053fc();
+void Func_02005410();
+void Func_02005412();
+void Func_02005418();
+void Func_0200541c();
+void Func_02005422();
+void Func_02005426();
+void Func_02005436();
+s32 Func_02005464();
+void Func_02005466();
+void Func_02005478();
+s32 Func_02005488();
+s32 Func_02005494();
+void Func_02005496();
+void Func_020054a2();
+s32 Func_020054a6();
+void Func_020054ac();
+s32 Func_020054b2();
+void Func_020054be();
+void Func_020054d4();
+void Func_020054d6();
+void Func_020054ea();
+void Func_020054ee();
+void Func_020054fa();
+void Func_02005588();
+void Func_02005592();
+void Func_02005596();
+void Func_020055a4();
+void Func_020055b6();
+void Func_020055c0();
+void Func_020055d0();
+void Func_020055e2();
+void Func_020055e8();
+void Func_020055ec();
+void Func_020055f4();
+void Func_020055fe();
+void Func_02005606();
+void Func_02005612();
+void Func_02005614();
+void Func_02005620();
+void Func_02005622();
+void Func_02005624();
+void Func_02005626();
+void Func_02005630();
+void Func_02005636();
+void Func_0200563a();
+void Func_0200563c();
+s32 Func_02005646();
+void Func_0200564c();
+void Func_0200564e();
+void Func_02005650();
+void Func_02005652();
+void Func_02005658();
+void Func_0200565c();
+void Func_0200565e();
+void Func_02005662();
+void Func_0200566c();
+void Func_0200566e();
+void Func_02005676();
+s32 Func_0200567a();
+void Func_02005680();
+void Func_02005698();
+void Func_0200569c();
+void Func_020056aa();
+void Func_020056b0();
+void Func_020056c2();
+void Func_020056ce();
+void Func_020056d0();
+void Func_020056d6();
+void Func_020056e4();
+void Func_0200570a();
+void Func_02005736();
+void Func_02005742();
+void Func_0200576a();
+void Func_0200576e();
+s32 Func_02005778();
+void Func_02005782();
+void Func_0200578e();
+void Func_02005796();
+void Func_020057a6();
+void Func_020057ae();
+void Func_020057b2();
+void Func_020057ba();
+void Func_020057be();
+void Func_020057c4();
+void Func_020057cc();
+void Func_020057ce();
+void Func_020057d4();
+void Func_020057d8();
+void Func_020057da();
+void Func_020057e8();
+void Func_020057fa();
+void Func_02005810();
+void Func_02005818();
+void Func_0200581c();
+void Func_02005830();
+void Func_02005836();
+void Func_0200583c();
+void Func_02005892();
+void Func_020058aa();
+void Func_020058c4();
+void Func_020058ec();
+void Func_02005914();
+void Func_02005920();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript01(void)
+{
+ u32 i;
+ s32 rec8;
+ s32 record;
+ s32 v5;
+ s32 base5_200caf4;
+
+ rec8 = Value1(Func_02004f2a, 15);
+ Func_02004f10();
+ Call2(Func_020050ca, 0x14000, 1);
+ Func_02004dc8(4);
+ Func_02005084();
+ Func_02005098();
+ Func_020050ac();
+ Call4(Func_02005056, -1, -1, -1, 0);
+ Func_02004dec(1);
+ Call3(Func_02004f7e, 0, 0x19999, 0xcccc);
+ Call3(Func_02004f88, 1, 0x19999, 0xcccc);
+ Call3(Func_02004fcc, 0, 0x16fc, 0x628);
+ Call3(Func_02005058, 0, 0x6000, 0);
+ Call3(Func_02004ffc, 8, 0x16d80000, 0x6280000);
+ Func_02004e2a(1);
+ Func_02005042(8, 15);
+ record = Func_02004fb0(8);
+ Func_02004efe(record, 0);
+ Call3(Func_02004fd0, 10, 0x19999, 0x6666);
+ Call3(Func_02004fda, 11, 0x19999, 0x6666);
+ Call3(Func_02004fe4, 12, 0x19999, 0x6666);
+ Call3(Func_02004fee, 13, 0x19999, 0x6666);
+ Func_0200518c(141);
+ Call2(Func_02005004, 10, 0x200c9e4);
+ Func_02004fca(20);
+ Call2(Func_02005012, 11, 0x200cb50);
+ Func_02004fd8(20);
+ Call2(Func_02005020, 12, 0x200cc74);
+ Func_02004fe6(20);
+ Func_0200503e(13, 0x200cd98);
+ Call1(Func_020051c4, 0x121);
+ record = Value1(Func_02005022, 0);
+ if (record != 0) {
+ Func_02005090(1, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02005084, 1, 0x1704, 0x640);
+ Call3(Func_02005110, 0, 0x2000, 0);
+ Call3(Func_0200511c, 1, 0xa000, 20);
+ Call3(Func_02005136, 0, 0x101, 0);
+ Call3(Func_02005140, 1, 0x101, 60);
+ Call3(Func_020050d4, 8, 0x16d80000, 0x6380000);
+ Func_02004f02(1);
+ Call1(Func_02005128, 0x1215);
+ Func_0200514a(8, 0, 10);
+ Call3(Func_0200515e, 0, 0x6000, 0);
+ Call3(Func_0200516a, 1, 0x6000, 40);
+ Call3(Func_02005176, 0, 0x2000, 0);
+ Call3(Func_02005182, 1, 0xa000, 60);
+ Call3(Func_0200518e, 0, 0x6000, 0);
+ Call3(Func_0200519a, 1, 0x6000, 10);
+ Func_02005280(141);
+ Call2(Func_020050f8, 10, 0x200ca78);
+ Func_020050be(20);
+ Call2(Func_02005106, 11, 0x200cbe4);
+ Func_020050cc(20);
+ Call2(Func_02005114, 12, 0x200cd08);
+ Func_020050da(10);
+ Call3(Func_020051d6, 0, 0x4000, 0);
+ Call3(Func_020051e2, 1, 0x4000, 10);
+ Call2(Func_0200514a, 13, 0x200ce2c);
+ Call1(Func_020052d0, 0x121);
+ Func_02005106(20);
+ Func_0200529a();
+ Func_020051a2(10, 1);
+ Func_020051aa(11, 1);
+ Func_020051b2(12, 1);
+ Func_020051ba(13, 1);
+ Call4(Func_0200525a, 0x16080000, -1, 0x6f80000, 1);
+ Func_02005266();
+ Func_02005144(20);
+ Func_020052d0();
+ Call3(Func_020051dc, 9, 0x16080000, 0x6d80000);
+ Func_0200500a(1);
+ Call3(Func_0200519c, 9, 0x13333, 0x9999);
+ Call3(Func_020051e0, 9, 0x1608, 0x6c8);
+ Call3(Func_020051ec, 9, 0x15f8, 0x6c8);
+ Call3(Func_020051f8, 9, 0x15f8, 0x6f8);
+ Func_0200518e(20);
+ Func_02005246(9, 2);
+ Func_0200519c(20);
+ Call2(Func_020052ae, 9, 0x102);
+ Func_020051ac(60);
+ Func_020052a6(9, 0, 20);
+ Func_02005266(9, 3);
+ Func_020052b0(9, 0, 20);
+ Call3(Func_0200525c, 8, 0x16180000, 0x6f80000);
+ Func_0200508a(1);
+ Func_020052a2(8, 0);
+ record = Func_02005210(8);
+ Func_0200515e(record, 1);
+ Call3(Func_02005230, 8, 0xcccc, 0x6666);
+ Call3(Func_02005274, 8, 0x1608, 0x6f8);
+ Func_0200520a(20);
+ Func_020052ba(8, 2);
+ Call3(Func_02005304, 0x2008, 0, 10);
+ Call3(Func_02005318, 8, 0x3000, 60);
+ Call3(Func_02005324, 8, 0x8000, 10);
+ Call2(Func_02005346, 8, 0x102);
+ Func_02005244(60);
+ Call3(Func_02005340, 9, 0x3000, 0);
+ Call3(Func_0200534c, 8, 0x3000, 40);
+ Call2(Func_0200536e, 8, 0x102);
+ Func_0200526c(60);
+ Func_0200531c(8, 2);
+ Call3(Func_02005366, 0x2008, 0, 40);
+ Func_02005336(9, 1);
+ Func_02005380(9, 0, 10);
+ Func_02005382(9, 0, 10);
+ Call3(Func_020053a4, 8, 0x105, 60);
+ Call3(Func_02005396, 0x2008, 0, 10);
+ Func_02005366(8, 1);
+ Func_02005356(8, 3);
+ Call3(Func_020053b0, 0x2008, 0, 10);
+ Call3(Func_020053d2, 9, 0x101, 60);
+ Func_020053c4(9, 0, 20);
+ Func_0200537c(8, 3);
+ Func_02005478();
+ Func_020054be(107);
+ Call2(Func_02005412, 0x40000, 0x40000);
+ Func_02002586();
+ Call1(Func_020054d4, 0x121);
+ Call3(Func_02005410, 8, 0x100, 0);
+ Call3(Func_0200541c, 9, 0x100, 0);
+ Call3(Func_02005418, 8, 0x8000, 0);
+ Func_02005422(9, 0, 40);
+ Call3(Func_02005496, 8, 0xb000, 0);
+ Call3(Func_020054a2, 9, 0xb000, 0);
+ Call2(Func_020054d6, 0x10000, 0x2000);
+ Call4(Func_020054ee, 0x15e80000, -1, 0x6c80000, 1);
+ Func_020054fa();
+ Call3(Func_02005466, 14, 0x15a80000, 0x6a80000);
+ Func_02005294(1);
+ Call3(Func_02005426, 14, 0x4ccc, 0x2666);
+ Call2(Func_02005436, 14, 0x200cebc);
+ Func_020053fc(160);
+ *(s32 *)(rec8 + 72) = 0x1999;
+ *(s32 *)(rec8 + 68) = 0x1999;
+ *(s32 *)(rec8 + 24) = 0x18000;
+ *(s32 *)(rec8 + 28) = 0x18000;
+ {
+ s32 shown = 0;
+
+ *(u16 *)(rec8 + 100) = shown;
+ }
+ *(s32 *)(rec8 + 12) = 0x400000;
+ {
+ s32 target = *(s32 *)(rec8 + 80);
+ s32 shown = 0xf000;
+
+ *(u16 *)(target + 30) = shown;
+ }
+ Func_02005398(rec8, 0);
+ Func_02005358(rec8, 2);
+ Func_020052e6(1);
+ record = Func_02005464(15);
+ Func_020053b2(record, 0);
+ Call2(Func_02005304, 0x20097a5, 0xc80);
+ do {
+ Func_02005302(1);
+ } while (*(s16 *)(rec8 + 100) == 0);
+ record = Func_02005488(15);
+ Func_020053d6(record, 0);
+ record = Func_02005494(14);
+ Func_020053e2(record, 0);
+ Func_02005478(10);
+ v5 = 192;
+ record = Func_020054a6(9);
+ *(s32 *)(record + 40) = (v5 << 11);
+ record = Value1(Func_020054b2, 8);
+ *(s32 *)(record + 40) = (v5 << 11);
+ Func_02005662(145);
+ Call2(Func_020055b6, 0x40000, 0x40000);
+ Func_0200284e();
+ Func_02002852();
+ Func_020054ac(60);
+ Call2(Func_020055d0, 0x20000, 0x4000);
+ Call4(Func_020055e8, 0x16080000, -1, 0x6f80000, 1);
+ Func_020055f4();
+ Func_02005658();
+ Call2(Func_020055e2, 9, 0x102);
+ Call2(Func_020055ec, 8, 0x102);
+ Func_020054ea(60);
+ Call1(Func_020053b0, 0x20097a5);
+ Func_020053a6(1);
+ Func_02005588(14, 0, 0);
+ Func_02005592(15, 0, 0);
+ Call3(Func_02005606, 8, 0x8000, 10);
+ Func_020055c0(8, 4, 40);
+ Call3(Func_02005612, 0x2008, 0, 10);
+ Func_02005624(9, 0, 10);
+ Func_02005626(9, 0, 20);
+ Call3(Func_0200563a, 8, 0xc000, 40);
+ Call3(Func_0200563c, 0x2008, 0, 20);
+ Func_020055fe(9, 4, 20);
+ Func_02005650(9, 0, 10);
+ Func_02005620(8, 1);
+ Call3(Func_0200566c, 8, 0x8000, 10);
+ Call3(Func_0200566e, 0x2008, 0, 10);
+ Call2(Func_02005698, 9, 0x102);
+ Func_02005596(80);
+ Func_02005636(8, 3);
+ Func_020055a4(20);
+ Func_0200565c(9, 1);
+ Func_0200564c(9, 3);
+ Call3(Func_02005630, 8, 0x1618, 0x6f8);
+ Func_02005652(8, 0, 0);
+ Call3(Func_02005646, 9, 0x15f8, 0x6c8);
+ Call3(Func_02005652, 9, 0x1608, 0x6c8);
+ Call3(Func_0200565e, 9, 0x1608, 0x6d8);
+ Func_02005680(9, 0, 0);
+ Func_020057ce(141);
+ Value2(Func_02005646, 10, 0x200cac4);
+ Call2(Func_0200564e, 11, 0x200cc30);
+ Func_02005614(40);
+ Call2(Func_0200565c, 12, 0x200cd54);
+ Func_02005622(40);
+ Value2(Func_0200567a, 13, 0x200ce78);
+ Func_020057be();
+ Call3(Func_020056c2, 0, 0x170c0000, 0x6280000);
+ Call3(Func_020056ce, 1, 0x17140000, 0x6400000);
+ Call2(Func_0200576a, 0x40000, 0x8000);
+ Call4(Func_02005782, 0x16d80000, -1, 0x6480000, 1);
+ Func_0200578e();
+ base5_200caf4 = (s32)Data_0200caf4;
+ Func_020056b0(10, base5_200caf4);
+ Func_02005676(20);
+ Call2(Func_02005796, 0x6666, 0xccc);
+ Call4(Func_020057ae, 0x16d80000, -1, 0x6080000, 1);
+ Func_020056d6(11, base5_200caf4);
+ Func_0200569c(20);
+ Func_020056e4(12, base5_200caf4);
+ Func_020056aa(20);
+ Call3(Func_020057a6, 0, 0x8000, 0);
+ Call3(Func_020057b2, 1, 0x8000, 0);
+ Func_0200570a(13, base5_200caf4);
+ Func_020056d0(40);
+ Call3(Func_020057cc, 0, 0xc000, 0);
+ Call3(Func_020057d8, 1, 0xc000, 0);
+ Func_02005736(13);
+ Call1(Func_020058c4, 0x121);
+ Call2(Func_02005818, 0x40000, 0x8000);
+ Call4(Func_02005830, 0x16f80000, -1, 0x6480000, 1);
+ Func_0200583c();
+ Call3(Func_02005810, 0, 0x2000, 0);
+ Call3(Func_0200581c, 1, 0xa000, 80);
+ Func_020057c4(0, 3);
+ Func_020057d4(1, 3);
+ Func_02005742(20);
+ Func_020057da(1, 2);
+ record = Value1(Func_02005778, 0);
+ if (record != 0) {
+ Func_020057ba(1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_020057e8(1);
+ Func_020057fa(1, 0, 0);
+ Call2(Func_02005892, 0xcccc, 0x1999);
+ Call4(Func_020058aa, 0x16d80000, -1, 0x6480000, 1);
+ Call3(Func_020057cc, 0, 0xcccc, 0x6666);
+ Call3(Func_02005810, 0, 0x16d8, 0x628);
+ Func_02005914();
+ Func_02005920();
+ Call1(Func_0200576e, 0x85a);
+ Func_020058ec(3);
+ Func_02005836();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_372_event_script02.c b/games/gs1/src/overlays/scene_primary_script/run_scene_372_event_script02.c
new file mode 100644
index 000000000..2a32a0d92
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_372_event_script02.c
@@ -0,0 +1,250 @@
+#include "types.h"
+
+#define RunEventScript02 Func_02002dec
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02006304();
+s32 Func_020074d0();
+s32 Func_020074dc();
+void Func_02007506();
+void Func_02007554();
+void Func_02007562();
+void Func_02007570();
+s32 Func_0200757e();
+s32 Func_020075a8();
+void Func_020075c8();
+void Func_020075e6();
+s32 Func_020075ea();
+void Func_020075ec();
+s32 Func_02007610();
+void Func_02007616();
+s32 Func_0200762c();
+void Func_02007638();
+void Func_02007672();
+void Func_0200768e();
+void Func_02007694();
+void Func_0200769a();
+void Func_0200769c();
+void Func_020076b2();
+void Func_020076b4();
+void Func_020076c8();
+void Func_020076d4();
+void Func_020076d8();
+void Func_020076e0();
+void Func_02007706();
+void Func_02007720();
+void Func_02007728();
+void Func_02007740();
+void Func_0200774a();
+void Func_0200774e();
+void Func_02007750();
+void Func_02007766();
+void Func_0200777a();
+void Func_0200778c();
+void Func_0200778e();
+void Func_020077a6();
+void Func_020077b8();
+void Func_020077bc();
+void Func_020077be();
+void Func_020077c4();
+void Func_020077ce();
+void Func_020077d0();
+void Func_020077d8();
+void Func_020077e4();
+void Func_020077f0();
+void Func_02007802();
+void Func_02007806();
+void Func_0200780a();
+void Func_0200781a();
+void Func_0200781c();
+void Func_02007820();
+void Func_02007822();
+void Func_0200782a();
+void Func_02007834();
+void Func_02007842();
+void Func_02007844();
+void Func_02007854();
+void Func_02007856();
+void Func_02007866();
+void Func_0200786c();
+s32 Func_02007876();
+void Func_02007886();
+void Func_02007890();
+void Func_0200789a();
+void Func_020078a2();
+void Func_020078a6();
+void Func_020078ac();
+void Func_020078ae();
+void Func_020078b6();
+void Func_020078b8();
+void Func_020078c0();
+void Func_020078c8();
+void Func_020078d8();
+void Func_02007908();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* Byte 9 of the linked record is a packed pair of two-bit fields. A
+ * bitfield store emits movs #13 / negs; mask arithmetic narrows to
+ * movs #243. */
+struct Rec9 {
+ u8 pad00[9];
+ u8 lo : 2;
+ u8 mode : 2;
+ u8 hi : 4;
+};
+
+struct Work80 {
+ u8 pad00[35];
+ u8 flags;
+ u8 pad36[44];
+ struct Rec9 *child;
+};
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript02(void)
+{
+ u32 i;
+ u8 *rec;
+ u8 *record;
+ struct Rec9 *p4;
+
+ if (Value1(Func_020074d0, 0x840) == 0) {
+ } else {
+ if (Value1(Func_020074dc, 0x841) != 0) {
+ } else {
+ Func_02007506();
+ Call3(Func_02007554, 0, 0x10000, 0x8000);
+ Call3(Func_02007562, 22, 0x10000, 0x8000);
+ Call3(Func_02007570, 26, 0x10000, 0x8000);
+ Call3(Func_0200757e, 8, 0x10000, 0x8000);
+ Call3(Func_020075c8, 0, 217, 0x557);
+ record = Value1(Func_0200757e, 0);
+ if (record != 0) {
+ Func_020075ec(22, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_020075e6, 22, 235, 0x557);
+ Call3(Func_02007672, 22, 0xb000, 0);
+ record = Value1(Func_020075a8, 0);
+ if (record != 0) {
+ Func_02007616(26, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02007610, 26, 199, 0x557);
+ Call3(Func_0200769c, 26, 0xd000, 0);
+ Call3(Func_02007638, 25, 0xf70000, 0x4ba0000);
+ Call3(Func_020076b4, 25, 0x6000, 0);
+ record = Value1(Func_020075ea, 8);
+ p4 = ((struct Work80 *)record)->child;
+ ((struct Work80 *)record)->flags &= 254;
+ p4->mode = 1;
+ rec = Value1(Func_02007610, 0);
+ p4 = ((struct Work80 *)rec)->child;
+ ((struct Work80 *)rec)->flags &= 254;
+ p4->mode = 2;
+ record = Value1(Func_0200762c, 0);
+ if (record != 0) {
+ Func_0200769a(8, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02007694, 8, 221, 0x569);
+ Call3(Func_02007720, 8, 0xb000, 60);
+ Func_020076e0(26, 2);
+ Call1(Func_02007706, 0xec6);
+ Func_02007728(26, 0, 40);
+ Call3(Func_020076d4, 9, 0x650000, 0x4ad0000);
+ Call3(Func_02007750, 9, 0x2000, 0);
+ Call3(Func_0200774a, 0x1009, 0, 10);
+ Call3(Func_02007766, 26, 0xa000, 0);
+ Call2(Func_0200778e, 0x13333, 0x2666);
+ Call4(Func_020077a6, 0x650000, -1, 0x4ad0000, 1);
+ Call3(Func_020076c8, 9, 0x16666, 0xb333);
+ Call2(Func_020076d8, 9, 0x200cd1c);
+ Func_0200768e(60);
+ Call2(Func_020077be, 0x9999, 0x1333);
+ Call4(Func_020077d8, 0xbb0000, -1, 0x5300000, 1);
+ Func_020077e4();
+ Func_020076b2(40);
+ Func_0200777a(26, 2);
+ Func_020077bc(26, 0, 20);
+ Func_0200778c(9, 2);
+ Call3(Func_020077ce, 0x4009, 0, 20);
+ Call2(Func_0200780a, 0x20000, 0x4000);
+ Call4(Func_02007822, 0xdd0000, -1, 0x5690000, 1);
+ Func_020077c4(0, 8, 0);
+ Func_020077ce(22, 8, 0);
+ Call3(Func_0200781a, 26, 0x3000, 80);
+ Call4(Func_02007854, 0xb60000, -1, 0x5500000, 1);
+ Call3(Func_020077b8, 8, 182, 0x568);
+ Func_02007802(8, 9, 0);
+ Func_02007740(30);
+ Func_020077f0(8, 3);
+ Func_0200774e(10);
+ Func_02007820(0, 9, 0);
+ Func_0200782a(22, 9, 0);
+ Func_02007834(26, 9, 0);
+ Func_0200781c(9, 3);
+ Func_0200786c(9, 0);
+ Func_02007844(26, 2);
+ Func_02007886(26, 0, 10);
+ Call3(Func_020078a2, 9, 0xe000, 40);
+ Call3(Func_020078ae, 9, 0x3000, 20);
+ Func_02007856(9, 3);
+ Func_020078a6(9, 0);
+ Func_02007890(26, 8, 0);
+ Func_0200789a(22, 0, 0);
+ Func_020077d0(40);
+ Func_020078a2(0, 9, 0);
+ Func_020078ac(22, 9, 0);
+ Func_020078b6(26, 9, 0);
+ Func_020078c0(8, 9, 0);
+ Func_020078c0(9, 2);
+ Func_02007806(20);
+ Func_02007908(9, 0, 10);
+ Func_020078b8(0, 3);
+ Func_020078c0(26, 3);
+ Func_020078c8(22, 3);
+ Func_020078d8(8, 3);
+ rec[35] |= 1;
+ record = Value1(Func_02007876, 8);
+ record[35] |= 1;
+ Func_02006304();
+ Call1(Func_02007842, 0x841);
+ Func_02007866();
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_372_sequence_f.c b/games/gs1/src/overlays/scene_primary_script/run_scene_372_sequence_f.c
new file mode 100644
index 000000000..1fc4da770
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_372_sequence_f.c
@@ -0,0 +1,251 @@
+#include "types.h"
+
+#define FieldScene_RunScene372SequenceB Func_0200173c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00000e70[];
+extern u8 Data_00000e74[];
+void Func_02005e66();
+s32 Func_02005e7c();
+void Func_02005e90();
+void Func_02005ea0();
+void Func_02005ef0();
+s32 Func_02005f08();
+s32 Func_02005f0a();
+void Func_02005f12();
+void Func_02005f1a();
+s32 Func_02005f20();
+void Func_02005f22();
+void Func_02005f2a();
+void Func_02005f34();
+void Func_02005f36();
+void Func_02005f40();
+void Func_02005f50();
+void Func_02005f52();
+void Func_02005f62();
+void Func_02005f68();
+void Func_02005f6a();
+void Func_02005f78();
+void Func_02005f8a();
+void Func_02005f92();
+void Func_02005f9a();
+void Func_02005f9e();
+void Func_02005fb2();
+void Func_02005fc8();
+void Func_02005fce();
+void Func_02005fd6();
+s32 Func_02005fec();
+s32 Func_02005ff6();
+void Func_0200601e();
+void Func_02006036();
+void Func_0200604a();
+void Func_02006056();
+s32 Func_0200605a();
+void Func_0200605c();
+void Func_02006066();
+void Func_02006068();
+void Func_0200606a();
+void Func_0200606c();
+void Func_0200606e();
+void Func_02006082();
+void Func_0200608c();
+void Func_0200608e();
+void Func_0200609e();
+void Func_020060a0();
+void Func_020060a4();
+void Func_020060a8();
+void Func_020060bc();
+void Func_020060c0();
+s32 Func_020060c2();
+void Func_020060c6();
+void Func_020060ca();
+void Func_020060d0();
+void Func_020060dc();
+void Func_020060de();
+void Func_020060e8();
+void Func_020060ec();
+void Func_020060ee();
+void Func_020060f4();
+void Func_020060f8();
+void Func_02006130();
+void Func_02006138();
+s32 Func_02006146();
+void Func_02006150();
+void Func_0200618a();
+void Func_02006190();
+void Func_020061a0();
+void Func_020061a6();
+void Func_020061a8();
+void Func_020061b6();
+void Func_020061be();
+void Func_020061c4();
+void Func_020061c8();
+void Func_020061f0();
+void Func_02006200();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene372SequenceB(void)
+{
+ s32 record;
+ s32 flag;
+
+ Value2(Func_02005f20, 22, 0);
+ Func_02005f12(0, 22, 0);
+ flag = 0;
+ if (Value2(Func_02005e7c, 0, 0) == 0) {
+ Call1(Func_02005f36, 0xee5);
+ flag = 1;
+ } else {
+ Call1(Func_02005f40, 0xee6);
+ }
+ Func_02005e66(20);
+ Func_02005f68(22, 0, 40);
+ Call2(Func_02005f9a, 22, 0x100);
+ Func_02005f22(21, 3);
+ Func_02005f2a(22, 1);
+ Func_02005e90(40);
+ Func_02005f62(22, 0, 0);
+ Func_02005ea0(20);
+ Func_02005f50(22, 3);
+ if (flag != 0) {
+ Func_02005f92((s32)Data_00000e70);
+ } else {
+ Call1(Func_02005f9a, 0xee7);
+ }
+ Func_02005fb2(22, 0);
+ Func_02005f6a(22, 2);
+ record = Value1(Func_02005f08, 0);
+ if (record != 0) {
+ Func_02005f52(22, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02005f78(22);
+ Func_02005f8a(22, 0, 0);
+ Func_02005f1a(1, 1);
+ Call1(Func_02005ef0, 0x837);
+}
+
+void Func_02001828(void)
+{
+ u32 i;
+ s32 record;
+ s32 base5_e74;
+
+ if (Value1(Func_02005f0a, 0x837) != 0) {
+ } else {
+ Func_02005f34();
+ Call2(Func_02006056, 22, 0x100);
+ base5_e74 = (s32)Data_00000e74;
+ Func_0200601e(base5_e74);
+ Func_02006036(22, 0);
+ Call3(Func_0200606a, 0, 0x100, 20);
+ Call3(Func_02006066, 0, 0x4000, 0);
+ Call2(Func_0200608e, 0x6666, 0xccc);
+ Call4(Func_020060a8, 0x1000000, -1, 0x24c0000, 1);
+ Call3(Func_02005fce, 22, 0x20000, 0x10000);
+ Value2(Func_02005ff6, 22, 0x200c934);
+ Func_02006068(0, 22, 0);
+ Func_02005f9e(30);
+ Value2(Func_02005ff6, 22, 0x200c984);
+ Func_0200609e(22, 0);
+ record = Func_02005fec(22);
+ *(s32 *)(record + 28) = 0x10000;
+ Func_02006082(22, 1);
+ Func_02005fc8(20);
+ Func_020060d0(22, 0);
+ Func_02005fd6(40);
+ Func_020060a0(22, 1);
+ Func_020060c6((base5_e74 + 5));
+ Func_020060e8(22, 0, 20);
+ Func_020060a0(0, 3);
+ Func_020060a8(22, 3);
+ Func_020060f8(22, 0);
+ Call3(Func_0200605c, 22, 0x10000, 0x8000);
+ Func_020060bc(22, 2);
+ record = Value1(Func_0200605a, 0);
+ if (record != 0) {
+ Func_020060a4(22, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_020060ca(22);
+ Func_020060dc(22, 0, 0);
+ Func_0200606c(1, 1);
+ Func_020060f4(21, 3);
+ Call1(Func_0200604a, 0x837);
+ Func_0200606e();
+ }
+}
+
+void Func_0200198c(void)
+{
+ u32 i;
+ s32 record;
+
+ Func_0200608c();
+ record = Value1(Func_020060c2, 0);
+ if (record != 0) {
+ Func_02006130(22, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_020060ee, 22, 0x10000, 0x8000);
+ Call3(Func_02006138, 22, 0x119, 0x1fb);
+ Func_0200618a(22, 0, 0);
+ Func_020060c0(30);
+ Call1(Func_020061a6, 0xe7b);
+ Func_020061be(22, 0);
+ Func_020061a0(0, 22, 0);
+ Func_020060de(10);
+ Func_020061a6(0, 1);
+ Func_020060ec(20);
+ Call3(Func_02006200, 22, 0x4000, 0);
+ Func_020061f0(22, 0);
+ Func_020061a8(22, 2);
+ record = Value1(Func_02006146, 0);
+ if (record != 0) {
+ Func_02006190(22, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_020061b6(22);
+ Func_020061c8(22, 0, 0);
+ Call3(Func_020061c4, 0, 0x100, 0x205);
+ Func_02006150();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_373_sequence_f.c b/games/gs1/src/overlays/scene_primary_script/run_scene_373_sequence_f.c
new file mode 100644
index 000000000..e837343de
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_373_sequence_f.c
@@ -0,0 +1,101 @@
+#include "types.h"
+
+#define FieldScene_RunScene373SequenceE Func_020010d8
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02007076();
+s32 Func_02007082();
+void Func_020070a6();
+void Func_020070b0();
+void Func_020070c4();
+void Func_020070ee();
+void Func_020070f0();
+void Func_02007112();
+s32 Func_02007114();
+void Func_02007120();
+void Func_0200712e();
+void Func_02007142();
+void Func_0200714e();
+void Func_02007156();
+void Func_02007174();
+void Func_0200719a();
+void Func_020071bc();
+void Func_020071c6();
+void Func_020071d0();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene373SequenceE(void)
+{
+ u32 i;
+ s32 pos[3];
+ s32 **slot;
+ s32 *saved;
+ s32 record;
+
+ if (Value1(Func_02007082, 0x808) == 0) {
+ slot = *(s32 ***)0x03001e70;
+ Func_020070b0();
+ Call3(Func_020070ee, 0, 0x10000, 0x8000);
+ Func_0200714e(0, 1);
+ Func_020070c4(2);
+ Call1(Func_0200719a, 0xf4d);
+ Func_020071bc(15, 0, 2);
+ Func_020071c6(16, 0, 2);
+ record = Value1(Func_02007114, 0);
+ pos[0] = *(s32 *)(record + 8);
+ pos[1] = *(s32 *)(record + 12);
+ pos[2] = *(s32 *)(record + 16);
+ saved = *slot;
+ *slot = pos;
+ for (i = 0; i != 40; i++) {
+ pos[2] += 0x20000;
+ Func_02007112(1);
+ Func_02007076();
+ }
+ Func_02007120(60);
+ Call2(Func_020070f0, 0xf4f, 1);
+ Func_0200712e(6);
+ for (i = 0; i != 40; i++) {
+ pos[2] += -0x20000;
+ Func_02007142(1);
+ Func_020070a6();
+ }
+ *slot = saved;
+ Func_02007156(60);
+ Call3(Func_020071d0, 0, 70, 0x2e5);
+ Func_02007174();
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_374_sequence_a.c b/games/gs1/src/overlays/scene_primary_script/run_scene_374_sequence_a.c
new file mode 100644
index 000000000..047de4f0b
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_374_sequence_a.c
@@ -0,0 +1,305 @@
+#include "types.h"
+
+#define FieldScene_RunScene374SequenceA Func_02000bbc
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00004000[];
+extern u8 Data_0200aef0[];
+extern u8 Data_0200ac00[];
+void Func_02003048();
+s32 Func_02003050();
+void Func_0200310c();
+void Func_02003176();
+void Func_020031bc();
+s32 Func_020031c4();
+void Func_020031cc();
+void Func_020031ee();
+void Func_020031fe();
+void Func_02003212();
+void Func_0200321e();
+void Func_02003226();
+s32 Func_02003238();
+s32 Func_02003246();
+void Func_02003254();
+void Func_02003256();
+void Func_0200325e();
+void Func_02003278();
+s32 Func_0200327a();
+void Func_020032ec();
+void Func_020032fa();
+s32 Func_02003302();
+void Func_0200332a();
+void Func_0200333c();
+void Func_02003344();
+void Func_0200335c();
+void Func_02003360();
+void Func_02003364();
+void Func_0200338e();
+void Func_02003390();
+void Func_0200339a();
+void Func_020033aa();
+void Func_020033ae();
+void Func_020033b6();
+void Func_020033b8();
+void Func_020033c2();
+void Func_020033cc();
+void Func_020033d0();
+void Func_020033d2();
+void Func_020033d4();
+void Func_020033dc();
+void Func_020033e2();
+void Func_020033f8();
+void Func_020033fc();
+s32 Func_02003402();
+void Func_02003422();
+void Func_02003424();
+void Func_0200342a();
+void Func_02003436();
+void Func_02003450();
+void Func_0200345c();
+void Func_0200345e();
+s32 Func_0200346a();
+void Func_020034a4();
+void Func_020034a6();
+void Func_020034b2();
+void Func_020034b4();
+void Func_020034cc();
+void Func_020034d2();
+void Func_020034d8();
+void Func_020034da();
+void Func_020034dc();
+void Func_020034f0();
+void Func_0200350e();
+s32 Func_02003512();
+void Func_0200357e();
+void Func_020035a6();
+void Func_020035a8();
+void Func_020035b4();
+void Func_020035dc();
+void Func_020035e8();
+void Func_020035f4();
+void Func_020035fc();
+void Func_02003600();
+void Func_02003608();
+void Func_02003618();
+void Func_02003620();
+void Func_02003628();
+void Func_02003630();
+void Func_0200364a();
+void Func_02003660();
+void Func_02003662();
+void Func_02003666();
+void Func_0200366e();
+s32 Func_0200367c();
+void Func_0200367e();
+void Func_0200368a();
+void Func_020036aa();
+s32 Func_020036ac();
+void Func_020036be();
+void Func_020036c6();
+void Func_020036ca();
+void Func_020036ce();
+s32 Func_020036dc();
+void Func_020036ee();
+void Func_020036f6();
+void Func_020036fe();
+void Func_0200370c();
+void Func_0200371e();
+void Func_0200372e();
+void Func_0200373c();
+void Func_0200374e();
+void Func_020037a2();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene374SequenceA(void)
+{
+ u32 i;
+ s32 record;
+ s32 base5_200aef0;
+ s32 base5_4000;
+
+ i = 0;
+ if (Value1(Func_02003238, 0x834) == 0) {
+ } else {
+ if (Value1(Func_02003246, 0x840) != 0) {
+ } else {
+ Func_02003278();
+ Call2(Func_02003390, 0x19999, 0x3333);
+ Call4(Func_020033aa, 0xc50000, -1, 0x3000000, 1);
+ Func_020033b6();
+ Call1(Func_02003364, 0xeb6);
+ Func_02003344(19, 2);
+ Call3(Func_0200338e, 0x4013, 0, 10);
+ Call3(Func_020032ec, 0, 0x10000, 0x8000);
+ Call3(Func_020032fa, 25, 0x10000, 0x8000);
+ Call3(Func_0200333c, 0, 179, 0x315);
+ record = Value1(Func_02003302, 0);
+ if (record != 0) {
+ Func_02003360(25, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_0200335c, 25, 179, 0x324);
+ Func_020033ae(0, 25, 40);
+ Func_020033f8(0, 0, 0);
+ Call3((void (*)())Func_02003402, 25, 0, 0);
+ Func_0200339a(17, 3);
+ Func_020033aa(18, 3);
+ Func_020033dc(17, 18, 0);
+ Func_0200332a(20);
+ Func_020033d2(17, 1);
+ Call3(Func_02003424, 0x4011, 0, 10);
+ Func_020033cc(18, 3);
+ Func_02003436(18, 0, 10);
+ Func_02003450(17, 0, 0);
+ Call3(Func_0200345c, 18, 0xf000, 10);
+ Func_020033fc(19, 3);
+ Call3(Func_0200345e, 0x4013, 0, 10);
+ Call3(Func_020033b8, 17, 0x19999, 0xcccc);
+ Call3(Func_020033c2, 18, 0x19999, 0xcccc);
+ base5_200aef0 = (s32)Data_0200aef0;
+ Func_020033d4(17, base5_200aef0);
+ Func_0200339a(20);
+ Func_020033e2(18, base5_200aef0);
+ Call3(Func_020034a6, 0, 0xc000, 0);
+ Call3(Func_020034b2, 25, 0xc000, 60);
+ Value2(Func_02003402, 0, 0x200af50);
+ Call2(Func_02003422, 25, 0x200af78);
+ Func_020033d0(20);
+ Func_020034d2(0, 0, 0);
+ Func_020034dc(25, 0, 10);
+ Func_020034cc(25, 0);
+ Call3(Func_020034f0, 19, 0x8000, 0);
+ Value3(Func_02003050, 26, 0x6000, 20);
+ Func_020034b4(26, 2);
+ Func_02003048(26, 10);
+ Func_020034a4(0, 3);
+ Func_020034b4(25, 3);
+ Func_0200342a(20);
+ Func_020034da(19, 2);
+ Value2(Func_02003512, 0x4013, 0);
+ if (Value2(Func_0200346a, 0, 0) == 1) {
+ i = 1;
+ Func_020034d8(19, 4);
+ } else {
+ Func_0200350e(19, 3);
+ bump_step(1);
+ }
+ Call2(Func_0200357e, 0x4013, 0);
+ if (i != 0) {
+ bump_step(1);
+ }
+ base5_4000 = 0x4000;
+ Func_0200310c(22, base5_4000, 30);
+ Func_020035a8(22, 0);
+ Call3(Func_020035dc, 19, 0x100, 0);
+ Call3(Func_020035e8, 26, 0x100, 0);
+ Call3(Func_020035f4, 0, 0x100, 0);
+ Call3(Func_02003600, 25, 0x100, 40);
+ Call3(Func_020035fc, 19, 0xa000, 0);
+ Call3(Func_02003608, 26, 0xa000, 0);
+ Call3(Func_02003618, 0, 0xe000, 0);
+ Func_02003176(25, 0xe000, 10);
+ Call2(Func_0200364a, 0x13333, 0x2666);
+ Call4(Func_02003662, 0xd70000, -1, 0x2f60000, 1);
+ Func_0200366e();
+ Call2(Func_02003666, 0xcccc, 0x1999);
+ Call4(Func_0200367e, 0xcd0000, -1, 0x30a0000, 1);
+ Call2(Func_020035a6, 22, 0x200a874);
+ Func_020035b4(22);
+ Value3(Func_020031c4, 22, 0x2000, 60);
+ Func_02003628(19, 2);
+ Func_020031bc(19, 10);
+ Func_02003620(22, 3);
+ Func_020031cc(22, 20);
+ Func_02003630(19, 3);
+ Func_020035a6(10);
+ Func_020031fe(19, base5_4000, 30);
+ Func_020031ee((base5_4000 + 19), 10);
+ Func_02003212(26, 0xe000, 30);
+ Func_02003660(26, 3);
+ Func_02003226(19, 0x8000, 30);
+ Func_0200368a(19, 2);
+ Func_0200321e((base5_4000 + 19), 10);
+ Call3((void (*)())Func_020036ac, 0, 25, 40);
+ Func_020036f6(0, 0, 0);
+ Func_02003254(25, 0, 20);
+ Func_0200325e(26, 0x8000, 30);
+ Func_020036aa(26, 3);
+ Func_02003256(26, 30);
+ Value3(Func_0200327a, 26, 0xc000, 30);
+ Func_020036c6(26, 3);
+ Func_020036ce(22, 3);
+ Func_020036ce(25, 2);
+ record = Value1(Func_0200367c, 0);
+ if (record != 0) {
+ Func_020036be(25, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Call1((void (*)())Func_020036dc, 25);
+ Func_020036ee(25, 0, 0);
+ Func_020036fe(26, 2);
+ record = Value1(Func_020036ac, 0);
+ if (record != 0) {
+ Func_020036ee(26, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200370c(26);
+ Func_0200371e(26, 0, 0);
+ Func_0200372e(22, 2);
+ record = Value1(Func_020036dc, 0);
+ if (record != 0) {
+ Func_0200371e(22, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200373c(22);
+ Func_0200374e(22, 0, 0);
+ Call3(Func_020037a2, 19, 0x10000, (s32)Data_0200ac00);
+ Call1(Func_020036ca, 0x840);
+ Func_020036f6();
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_375_configure_progress_dependent_actors.c b/games/gs1/src/overlays/scene_primary_script/run_scene_375_configure_progress_dependent_actors.c
new file mode 100644
index 000000000..2c5a2a8d4
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_375_configure_progress_dependent_actors.c
@@ -0,0 +1,186 @@
+#include "types.h"
+
+#define FieldScene_ConfigureProgressDependentActors Func_0200150c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02001ffa();
+s32 Func_02002f98();
+void Func_02002fa2();
+s32 Func_02002fa8();
+void Func_02002fb2();
+void Func_02002fda();
+s32 *Func_0200302a();
+s32 Func_02003032();
+void Func_02003044();
+void Func_0200304e();
+void Func_02003050();
+s32 *Func_02003058();
+void Func_02003062();
+void Func_0200306c();
+void Func_02003074();
+void Func_02003078();
+void Func_02003082();
+void Func_02003088();
+void Func_0200308a();
+void Func_0200309e();
+void Func_020030a2();
+void Func_020030ae();
+void Func_020030c0();
+s32 Func_020030ea();
+void Func_020030f6();
+s32 Func_02003100();
+void Func_02003104();
+s32 Func_0200312a();
+void Func_02003142();
+void Func_0200314c();
+void Func_02003156();
+void Func_02003160();
+s32 Func_0200316a();
+void Func_0200318e();
+void Func_02003198();
+void Func_020031a2();
+void Func_020031a8();
+void Func_020031bc();
+void Func_020031ca();
+void Func_020031fc();
+void Func_02003218();
+void Func_02003224();
+
+extern s16 Data_02000240[];
+extern u8 Data_02009ce0[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call0(void (*f)())
+{
+ f();
+}
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2_10(void (*f)(), s32 a1, s32 a0)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ s32 *Value1p(s32 *(*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call3_120(void (*f)(), s32 a1, s32 a2, s32 a0)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+s32 FieldScene_ConfigureProgressDependentActors(void)
+{
+ s16 *table;
+ u8 *progress;
+ u8 *record;
+ s32 *p;
+ s32 n21;
+ s32 n19;
+ s32 n23;
+ s32 n24;
+ s32 n20;
+ s32 base;
+ u32 lim;
+ s32 twelve;
+ u8 value;
+
+ table = Data_02000240;
+ progress = (u8 *)&table[225];
+ lim = 128;
+ if ((u32)((*(u16 *)progress - 5) << 16) <= (lim << 9)) {
+ Call1(Func_02002fa2, 0x12f);
+ }
+ if (Value1(Func_02002f98, 0x109) != 0) {
+ Call1(Func_02002fb2, 0x242);
+ }
+ if (Value1(Func_02002fa8, 0x834) != 0) {
+ Call0(Func_020030ea);
+ Call0(Func_020030f6);
+ Call0(Func_02002fda);
+ Call3(Func_02003044, 12, 0, 0);
+ Call3(Func_0200304e, 13, 0, 0);
+ Call3(Func_02003058, 14, 0, 0);
+ Call3(Func_02003062, 15, 0, 0);
+ Call3_120(Func_0200306c, 0, 0, 5);
+ p = Value1p(Func_0200302a, 8);
+ record = (u8 *)p + 89;
+ value = *(volatile u8 *)record;
+ *(volatile u8 *)record = (u8)(value | 8);
+ Call3(Func_02003088, 11, 166 << 15, 0x01090000);
+ Call3(Func_02003082, 11, 83, 0x111);
+ Call2_10(Func_020030a2, 5, 11);
+ p = Value1p(Func_02003058, 11);
+ twelve = 12;
+ *(u16 *)((u8 *)p + 32) = twelve;
+ Call2_10(Func_02003074, 0x02009c34, 11);
+ if (Value1(Func_02003032, 0x839) != 0) {
+ Call3(Func_020030c0, 11, 0, 0);
+ }
+ Call0(Func_0200306c);
+ n21 = 21;
+ Call6(Func_02003050, 9, 24, 1, 1, 14, n21);
+ Call6(Func_02003062, 9, 24, 1, 1, 15, n21);
+ n23 = 23;
+ n19 = 19;
+ Call6(Func_02003078, 9, 24, 1, 1, n23, n19);
+ n24 = 24;
+ Call6(Func_0200308a, 9, 24, 1, 1, n24, n19);
+ n20 = 20;
+ Call6(Func_0200309e, 9, 24, 1, 1, n23, n20);
+ Call6(Func_020030ae, 9, 24, 1, 1, n24, n20);
+ } else {
+ Call3(Func_02003142, 9, 0, 0);
+ Call3(Func_0200314c, 10, 0, 0);
+ Call3(Func_02003156, 1, 0, 0);
+ Call3(Func_02003160, 11, 0, 0);
+ Call0(Func_02003104);
+ if (Value1(Func_020030ea, 0x109) == 0) {
+ if (*(s16 *)progress == 10) {
+ Call0(Func_02001ffa);
+ }
+ }
+ if (Value1(Func_02003100, 0x801) != 0) {
+ Call3(Func_0200318e, 13, 0, 0);
+ Call3(Func_02003198, 14, 0, 0);
+ Call3(Func_020031a2, 15, 0, 0);
+ } else if (Value1(Func_0200312a, 0x808) != 0) {
+ Call3_120(Func_020031bc, 196 << 17, 188 << 17, 14);
+ Call3_120(Func_020031ca, 188 << 17, 188 << 17, 15);
+ base = (s32)Data_02009ce0;
+ Call3(Func_02003218, 14, 128 << 9, base);
+ Call3(Func_02003224, 15, 128 << 9, base);
+ }
+ if (Value1(Func_0200316a, 0x87a) != 0) {
+ Call3_120(Func_020031fc, 132 << 16, 132 << 17, 16);
+ }
+ Call0(Func_020031a8);
+ }
+ return 0;
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_375_event_script01.c b/games/gs1/src/overlays/scene_primary_script/run_scene_375_event_script01.c
new file mode 100644
index 000000000..7fb4663b0
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_375_event_script01.c
@@ -0,0 +1,84 @@
+#include "types.h"
+
+#define RunEventScript01 Func_020000dc
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00000f76[];
+s32 Func_02001b4a();
+void Func_02001b64();
+void Func_02001b96();
+s32 Func_02001bbe();
+void Func_02001be8();
+void Func_02001c1c();
+void Func_02001c20();
+void Func_02001c2e();
+void Func_02001c34();
+void Func_02001c48();
+s32 Func_02001c56();
+void Func_02001c60();
+void Func_02001c68();
+void Func_02001c88();
+void Func_02001cac();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript01(void)
+{
+ u32 i;
+ s32 record;
+ s32 base5_f76;
+
+ Func_02001b64();
+ if (Value1(Func_02001b4a, 0x815) != 0) {
+ Call1(Func_02001c1c, 0x11c4);
+ Func_02001c34(12, 0);
+ } else {
+ base5_f76 = (s32)Data_00000f76;
+ Func_02001c2e(base5_f76);
+ Func_02001c20(12, 0, 10);
+ Func_02001c20(12, 2);
+ Func_02001b96(6);
+ Value2(Func_02001c56, 12, 0);
+ if (Value2(Func_02001bbe, 0, 0) == 0) {
+ Func_02001c60((base5_f76 + 1));
+ } else {
+ Func_02001c68((base5_f76 + 2));
+ }
+ Func_02001c48(12, 3);
+ Func_02001c88(12, 0);
+ Call3(Func_02001cac, 12, 0xc000, 10);
+ }
+ Func_02001be8();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_375_progress_dependent_actor_sequence.c b/games/gs1/src/overlays/scene_primary_script/run_scene_375_progress_dependent_actor_sequence.c
new file mode 100644
index 000000000..646a22d15
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_375_progress_dependent_actor_sequence.c
@@ -0,0 +1,188 @@
+#include "types.h"
+
+#define FieldScene_RunProgressDependentActorSequence Func_02001760
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00000e85[];
+extern u8 Data_02009ce0[];
+extern u8 Data_03001ebc[];
+s32 Func_020031ca();
+s32 Func_020031d6();
+void Func_020031fe();
+void Func_0200321e();
+void Func_02003220();
+void Func_02003254();
+s32 Func_0200328e();
+void Func_020032a0();
+void Func_020032b4();
+void Func_020032c2();
+void Func_020032c6();
+s32 Func_020032c8();
+void Func_020032cc();
+void Func_020032dc();
+void Func_020032de();
+void Func_020032e4();
+void Func_020032e6();
+void Func_020032fe();
+void Func_02003322();
+void Func_0200332a();
+void Func_0200333c();
+void Func_02003340();
+void Func_0200334c();
+void Func_02003352();
+s32 Func_02003360();
+void Func_0200336a();
+void Func_02003370();
+void Func_02003378();
+void Func_0200338a();
+void Func_02003390();
+void Func_02003392();
+void Func_02003398();
+void Func_0200339c();
+void Func_020033a2();
+void Func_020033a6();
+void Func_020033b2();
+void Func_020033b4();
+void Func_020033b8();
+void Func_020033bc();
+void Func_020033be();
+void Func_020033ce();
+s32 Func_020033e0();
+void Func_020033f6();
+void Func_02003404();
+void Func_0200340a();
+void Func_02003414();
+void Func_02003416();
+void Func_0200341a();
+void Func_0200342a();
+void Func_02003438();
+void Func_0200344a();
+void Func_02003464();
+void Func_02003470();
+void Func_02003482();
+void Func_0200348c();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunProgressDependentActorSequence(void)
+{
+ u32 i;
+ s32 record;
+ s32 base5_e85;
+ s32 base5_2009ce0;
+
+ if (Value1(Func_020031ca, 0x839) != 0) {
+ } else {
+ if (Value1(Func_020031d6, 0x82f) != 0) {
+ Func_020031fe();
+ ((void (*)())Func_0200328e)(11, 2);
+ Call1(Func_020032b4, 0xe8b);
+ Func_020032cc(11, 0);
+ Func_02003220();
+ } else {
+ Func_0200321e();
+ Func_02003254(11);
+ Func_020032b4(11, 1);
+ base5_e85 = (s32)Data_00000e85;
+ Func_020032dc(base5_e85);
+ Func_020032fe(11, 0, 20);
+ Call3(Func_02003322, 0, 0x100, 30);
+ Call4(Func_02003352, 0x620000, -1, 0x11b0000, 1);
+ Call3(Func_020032b4, 0, 94, 0x125);
+ Call3(Func_02003340, 0, 0xa000, 0);
+ record = Value1(Func_0200328e, 0);
+ if (record != 0) {
+ Func_020032e4(1, *(volatile s32 *)(record + 8), *(volatile s32 *)(record + 16));
+ }
+ Call3(Func_020032de, 1, 110, 0x117);
+ Call3(Func_0200336a, 1, 0xa000, 40);
+ Func_0200332a(11, 2);
+ Func_020032a0(40);
+ Value2(Func_02003360, 11, 0);
+ if (Value2(Func_020032c8, 0, 0) == 0) {
+ Func_0200334c(11, 2);
+ Func_020032c2(20);
+ Func_02003378((base5_e85 + 2));
+ Func_02003390(11, 0);
+ Call1(Func_020032c6, 0x82f);
+ } else {
+ Func_02003370(11, 2);
+ Func_020032e6(20);
+ Func_0200339c((base5_e85 + 3));
+ Func_020033be(11, 0, 40);
+ Func_02003398(11, 0, 0);
+ Func_02003378(11, 1);
+ Func_02003392(11, 4, 40);
+ Func_0200338a(11, 6);
+ Call3(Func_02003404, 11, 0x101, 40);
+ Func_020033f6(11, 0, 10);
+ Func_020033a6(11, 1);
+ Func_0200333c(10);
+ Func_020033bc(11, 3);
+ Func_02003416(11, 0, 10);
+ Func_020033ce(11, 3);
+ base5_2009ce0 = (s32)Data_02009ce0;
+ Call3(Func_0200340a, 0, 0x1000b, base5_2009ce0);
+ Call3(Func_02003414, 1, 0x1000b, base5_2009ce0);
+ Call2(Func_020033b4, 11, 0x2009bdc);
+ Func_020033b2(0);
+ Func_020033b8(1);
+ Call3(Func_02003464, 0, 0x4000, 0);
+ Call3(Func_02003470, 1, 0x4000, 60);
+ Call3(Func_02003482, 0, 0x105, 0);
+ Call3(Func_0200348c, 1, 0x105, 120);
+ Call1(Func_020033a2, 0x839);
+ }
+ Func_0200342a(1, 2);
+ record = Value1(Func_020033e0, 0);
+ if (record != 0) {
+ Func_0200341a(1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02003438(1);
+ Func_0200344a(1, 0, 0);
+ Func_020033f6();
+ }
+ }
+}
diff --git a/games/gs1/recon/en/overlays/resource_377_c_02000f90.c b/games/gs1/src/overlays/scene_primary_script/run_scene_377_event_script01.c
similarity index 52%
rename from games/gs1/recon/en/overlays/resource_377_c_02000f90.c
rename to games/gs1/src/overlays/scene_primary_script/run_scene_377_event_script01.c
index 1eefa4674..c66068539 100644
--- a/games/gs1/recon/en/overlays/resource_377_c_02000f90.c
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_377_event_script01.c
@@ -1,11 +1,12 @@
#include "types.h"
+#define RunEventScript01 Func_02000f90
#define RunEventScript01 Func_02000f90
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 103 calls, 0 loops, 5 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00001c6f[];
+extern u8 Data_00001c79[];
void Func_0200289e();
void Func_020028a0();
void Func_020028d2();
@@ -18,12 +19,12 @@ void Func_02002950();
void Func_02002962();
void Func_02002972();
void Func_02002984();
-void *Func_02002986();
+void Func_02002986();
void Func_0200298c();
void Func_0200299c();
void Func_0200299e();
void Func_020029a0();
-void *Func_020029a8();
+void Func_020029a8();
void Func_020029b4();
void Func_020029c4();
void Func_020029cc();
@@ -31,7 +32,7 @@ s32 Func_020029da();
void Func_020029ec();
void Func_020029f0();
void Func_020029f6();
-void Func_020029f8();
+s32 Func_020029f8();
void Func_02002a08();
void Func_02002a1c();
void Func_02002a2e();
@@ -39,23 +40,23 @@ void Func_02002a32();
s32 Func_02002a34();
void Func_02002a40();
void Func_02002a50();
-void Func_02002a52();
+s32 Func_02002a52();
void Func_02002a62();
void Func_02002a64();
void Func_02002a66();
void Func_02002a76();
void Func_02002a7e();
void Func_02002a90();
-void Func_02002a98();
+s32 Func_02002a98();
void Func_02002ab8();
void Func_02002ac0();
void Func_02002ad0();
void Func_02002ae0();
void Func_02002ae2();
-void Func_02002af2();
-void *Func_02002afe();
+s32 Func_02002af2();
+u8 *Func_02002afe();
void Func_02002b02();
-void *Func_02002b0e();
+s32 Func_02002b0e();
void Func_02002b18();
void Func_02002b1a();
void Func_02002b20();
@@ -68,7 +69,7 @@ void Func_02002b4c();
void Func_02002b52();
void Func_02002b5c();
void Func_02002b62();
-void *Func_02002b68();
+u8 *Func_02002b68();
void Func_02002b72();
void Func_02002b74();
void Func_02002b82();
@@ -105,29 +106,59 @@ void Func_02002d3e();
void Func_02002d46();
void Func_02002d6a();
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
void RunEventScript01(void)
{
- s32 base;
- void *p6;
- void *p64;
- void *p66;
- void *p7;
- void *p74;
+ u32 i;
+ u8 *record;
+ s32 base5_1c6f;
Func_020028a0();
- Func_020028d2(0, 39321, 19660);
- Func_02002914(0, 569, 393);
- Func_020029a0(0, 16384, 40);
+ Call3(Func_020028d2, 0, 0x9999, 0x4ccc);
+ Call3(Func_02002914, 0, 0x239, 0x189);
+ Call3(Func_020029a0, 0, 0x4000, 40);
Func_02002950(8, 2);
- p6 = Func_02002986(7270);
- p7 = Func_020029a8(8, 0, 80);
- Func_020029da(8, 257, 60);
+ Call1(Func_02002986, 0x1c66);
+ Func_020029a8(8, 0, 80);
+ Call3(Func_020029da, 8, 0x101, 60);
Func_02002972(8, 1);
Func_020029c4(8, 0, 60);
Func_0200298c(8, 2);
Func_020028fa(80);
- Func_02002934(8, 52428, 26214);
- Func_02002962(8, 584, 406);
+ Call3(Func_02002934, 8, 0xcccc, 0x6666);
+ Call3(Func_02002962, 8, 0x248, 0x196);
Func_020028a0(11);
Func_0200289e(12);
Func_0200299e(8, 12);
@@ -135,11 +166,11 @@ void RunEventScript01(void)
Func_020029cc(8, 2);
Func_0200293a(40);
Func_02002a1c(8, 0, 40);
- Func_02002a50(8, 264, 40);
+ Call3(Func_02002a50, 8, 0x108, 40);
Func_02002a32(8, 0, 40);
- Func_02002a64(0, 261, 60);
+ Call3(Func_02002a64, 0, 0x105, 60);
Func_020029ec(8, 13);
- Func_02002a76(8, 259, 0);
+ Call3(Func_02002a76, 8, 0x103, 0);
Func_020029f6(8, 11);
Func_02002984(40);
Func_02002a66(8, 0, 40);
@@ -148,27 +179,31 @@ void RunEventScript01(void)
Func_02002a7e(8, 0, 20);
Func_02002a2e(8, 12);
Func_020029b4(20);
- Func_02002ac0(0, 258, 60);
+ Call3(Func_02002ac0, 0, 0x102, 60);
Func_02002a40(8, 13);
- Func_02002a98(8, 0);
- Func_020029f8(0, 0);
- if (Func_020029da(2076) != 0) {
- Func_02002b02(8, 258, 60);
+ Value2(Func_02002a98, 8, 0);
+ if (Value2(Func_020029f8, 0, 0) == 1) {
+ bump_step(1);
+ }
+ if (Value1(Func_020029da, 0x81c) != 0) {
+ Call3(Func_02002b02, 8, 0x102, 60);
}
Func_02002a08(20);
Func_02002ae0(8, 0);
- Func_02002b1a(8, 263, 60);
- base = 7279;
- Func_02002ae2(base);
- Func_02002af2(8, 0);
- Func_02002a52(0, 0);
- if (Func_02002a34(2076) != 0) {
- Func_02002b5c(8, 258, 60);
+ Call3(Func_02002b1a, 8, 0x107, 60);
+ base5_1c6f = (s32)Data_00001c6f;
+ Func_02002ae2(base5_1c6f);
+ Value2(Func_02002af2, 8, 0);
+ if (Value2(Func_02002a52, 0, 0) == 1) {
+ bump_step(1);
+ }
+ if (Value1(Func_02002a34, 0x81c) != 0) {
+ Call3(Func_02002b5c, 8, 0x102, 60);
}
Func_02002a62(20);
Func_02002b3a(8, 0);
- Func_02002b74(8, 263, 60);
- Func_02002b3a(base + 3);
+ Call3(Func_02002b74, 8, 0x107, 60);
+ Func_02002b3a((base5_1c6f + 3));
Func_02002b52(8, 0);
Func_02002b22(8, 1);
Func_02002a90(20);
@@ -180,50 +215,42 @@ void RunEventScript01(void)
Func_02002b9a(8, 0, 40);
Func_02002b62(8, 2);
Func_02002ad0(40);
- p64 = Func_02002afe(0);
- *(u16 *)(p64 + 6) = 0;
+ record = Func_02002afe(0);
+ {
+ s32 shown = 0;
+
+ *(u16 *)(record + 6) = shown;
+ }
Func_020029f0(1);
- p66 = Func_02002b0e(0);
- *(u8 *)((u8 *)(p66) + 90) &= 0xfe;
- Func_02002b4c(0, 558, 388);
- Func_02002b36(8, 78643, 39321);
+ *(u8 *)(Func_02002b0e(0) + 90) &= 254;
+ Call3(Func_02002b4c, 0, 0x22e, 0x184);
+ Call3(Func_02002b36, 8, 0x13333, 0x9999);
Func_02002b86(8, 14);
- Func_02002b72(8, 586, 400);
+ Call3(Func_02002b72, 8, 0x24a, 0x190);
Func_02002b20(40);
- Func_02002b96(8, 580, 382);
- Func_02002c22(8, 32768, 40);
- p74 = Func_02002b68(0);
- *(u8 *)((u8 *)(p74) + 90) |= 0x1;
- Func_02002c3e(8, 49152, 8);
+ Call3(Func_02002b96, 8, 0x244, 0x17e);
+ Call3(Func_02002c22, 8, 0x8000, 40);
+ {
+ u8 *record = Func_02002b68(0);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ Call3(Func_02002c3e, 8, 0xc000, 8);
Func_02002c48(8, 0, 8);
- Func_02002c54(8, 16384, 8);
- Func_02002c60(8, 32768, 10);
+ Call3(Func_02002c54, 8, 0x4000, 8);
+ Call3(Func_02002c60, 8, 0x8000, 10);
Func_02002c0a(8, 4, 20);
Func_02002c14(8, 6, 40);
Func_02002c1e(8, 4, 20);
Func_02002c78(8, 0, 40);
- Func_02002bda(8, 26214, 13107);
- Func_02002c20(8, 572, 384);
+ Call3(Func_02002bda, 8, 0x6666, 0x3333);
+ Call3(Func_02002c20, 8, 0x23c, 0x180);
Func_02002c9a(8, 0, 20);
Func_02002c4a(0, 3);
Func_02002bd0(20);
Func_02002c58(8, 3);
- Func_02002bce(2078);
- Func_02002bd4(515);
+ Call1(Func_02002bce, 0x81e);
+ Call1(Func_02002bd4, 0x203);
Func_02002bf8();
- Func_02002c4c();
- if (Func_02002c32() != 0) {
- Func_02002d12(8, 65536);
- Func_02002c60(20);
- Func_02002d26();
- Func_02002d3e(8, 0);
- } else {
- Func_02002d10(8, 2);
- Func_02002c7e(40);
- Func_02002d46();
- Func_02002d6a(8, 0, 40);
- Func_02002c6a();
- }
- Func_02002cae();
}
-
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_377_sequence_a.c b/games/gs1/src/overlays/scene_primary_script/run_scene_377_sequence_a.c
new file mode 100644
index 000000000..50ccbb536
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_377_sequence_a.c
@@ -0,0 +1,70 @@
+#include "types.h"
+
+#define FieldScene_RunScene377SequenceA Func_0200133c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00001c79[];
+s32 Func_02002c32();
+void Func_02002c4c();
+void Func_02002c60();
+void Func_02002c6a();
+void Func_02002c7e();
+void Func_02002cae();
+void Func_02002d10();
+void Func_02002d12();
+void Func_02002d26();
+void Func_02002d3e();
+void Func_02002d46();
+void Func_02002d6a();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene377SequenceA(void)
+{
+ u32 i;
+ s32 record;
+ s32 base5_1c79;
+
+ Func_02002c4c();
+ if (Value1(Func_02002c32, 0x203) != 0) {
+ Call3(Func_02002d12, 8, 0x10000, 0x2009e6c);
+ Func_02002c60(20);
+ Call1(Func_02002d26, 0x1c77);
+ Func_02002d3e(8, 0);
+ } else {
+ Func_02002d10(8, 2);
+ Func_02002c7e(40);
+ base5_1c79 = (s32)Data_00001c79;
+ Func_02002d46(base5_1c79);
+ Func_02002d6a(8, 0, 40);
+ Func_02002c6a((base5_1c79 + 1), 1);
+ }
+ Func_02002cae();
+}
diff --git a/games/gs1/recon/en/overlays/resource_37b_c_02000150.c b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_event_script01.c
similarity index 52%
rename from games/gs1/recon/en/overlays/resource_37b_c_02000150.c
rename to games/gs1/src/overlays/scene_primary_script/run_scene_37b_event_script01.c
index 18cd3584a..8ed3db236 100644
--- a/games/gs1/recon/en/overlays/resource_37b_c_02000150.c
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_event_script01.c
@@ -2,10 +2,8 @@
#define RunEventScript01 Func_02000150
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 116 calls, 0 loops, 0 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
-
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
void Func_0200253e();
void Func_0200259c();
void Func_020025a8();
@@ -110,73 +108,129 @@ void Func_020029c0();
void Func_020029c2();
void Func_020029dc();
void Func_020029f8();
+s32 Func_02002a06();
void Func_02002a20();
+void Func_02002a28();
+s32 Func_02002a36();
void Func_02002a3a();
void Func_02002a46();
+void Func_02002a4e();
+void Func_02002a58();
+void Func_02002a60();
+void Func_02002a64();
+void Func_02002a70();
+void Func_02002a7e();
+void Func_02002a90();
+extern u8 Data_03001ebc[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
void RunEventScript01(void)
{
+ u32 i;
+ s32 record;
+
Func_020025a8();
+ *(s32 *)(*(u8 **)Data_03001ebc + 0x1c0) = 0x100;
+ *(s32 *)(*(u8 **)Data_03001ebc + 0x1c8) = 32;
Func_020026b2();
Func_020026c6();
Func_020025c4(20);
- Func_0200262a(8, 37748736, 15204352);
+ Call3(Func_0200262a, 8, 0x2400000, 0xe80000);
Func_020025d8(1);
- Func_0200266e();
+ Call1(Func_0200266e, 0x101a);
Func_0200253e(8, 6);
- Func_0200264c(8, 37748736, 18350080);
- Func_020026c4();
- Func_020026dc();
- Func_02002642(8, 65536, 32768);
- Func_0200266e(8, 576, 216);
+ Call3(Func_0200264c, 8, 0x2400000, 0x1180000);
+ Call2(Func_020026c4, 0xcccc, 0x1999);
+ Call4(Func_020026dc, 0x23e0000, -1, 0xb40000, 1);
+ Call3(Func_02002642, 8, 0x10000, 0x8000);
+ Call3(Func_0200266e, 8, 0x240, 216);
Func_0200262c(20);
Func_020026a6(5, 2, 0);
Func_0200263c(30);
Func_0200259c(5, 6);
Func_020026c4(8, 2);
Func_02002652(6);
- Func_02002706(8, 36864, 0);
+ Call3(Func_02002706, 8, 0x9000, 0);
Func_02002664(10);
- Func_02002734();
- Func_0200274c();
+ Call2(Func_02002734, 0x59999, 0xb333);
+ Call4(Func_0200274c, 0x11f0000, -1, 0xb00000, 1);
Func_02002758();
Func_02002686(60);
- Func_02002766();
+ Call4(Func_02002766, 0x23e0000, -1, 0xb40000, 1);
Func_02002772();
Func_020026a0(20);
Func_02002710(8, 3);
Func_020026ae(10);
- Func_02002762(8, 49152, 0);
+ Call3(Func_02002762, 8, 0xc000, 0);
Func_020026c0(10);
Func_0200273a(8, 6, 0);
- Func_02002700(8, 196608, 131072);
- Func_0200272c(8, 576, 184);
+ Call3(Func_02002700, 8, 0x30000, 0x20000);
+ Call3(Func_0200272c, 8, 0x240, 184);
Func_020026ea(40);
Func_0200264a(8, 6);
- Func_020027a6(8, 32768, 0);
+ Call3(Func_020027a6, 8, 0x8000, 0);
Func_02002704(40);
+ *(s32 *)(*(u8 **)Data_03001ebc + 0x1c0) = 0x202;
+ *(s32 *)(*(u8 **)Data_03001ebc + 0x1c8) = 16;
Func_02002812();
Func_0200281e();
- Func_020027f6();
+ Call4(Func_020027f6, 0x11f0000, -1, 0xb00000, 0);
Func_020026da();
Func_020026a0(1);
Func_0200282c();
Func_02002840();
Func_0200273e(40);
- Func_020027a4(8, 27787264, 13107200);
+ Call3(Func_020027a4, 8, 0x1a80000, 0xc80000);
Func_020026c2(1);
Func_020026b2(8, 20);
Func_0200285e();
Func_0200286a();
- Func_020027c8(8, 37748736, 12058624);
- Func_02002850();
+ Call3(Func_020027c8, 8, 0x2400000, 0xb80000);
+ Call4(Func_02002850, 0x23e0000, -1, 0xb40000, 0);
Func_02002734();
Func_020026fa(1);
Func_02002886();
Func_0200289a();
Func_02002798(20);
- Func_02002868();
- Func_02002880();
+ Call2(Func_02002868, 0x13333, 0x2666);
+ Call4(Func_02002880, 0x23e0000, -1, 0x9d0000, 1);
Func_0200288c();
Func_020027ba(20);
Func_0200283a(1, 2);
@@ -187,16 +241,16 @@ void RunEventScript01(void)
Func_020027e8(40);
Func_02002858(8, 4);
Func_02002750(8, 80);
- Func_020028bc(8, 258, 0);
+ Call3(Func_020028bc, 8, 0x102, 0);
Func_0200280a(60);
- Func_020028be(8, 49152, 0);
+ Call3(Func_020028be, 8, 0xc000, 0);
Func_0200281c(30);
Func_0200277c(8, 20);
- Func_020028e6(0);
- Func_020028f0(1);
- Func_020028fa(5);
+ Call3(Func_020028e6, 0, 0x101, 0);
+ Call3(Func_020028f0, 1, 0x101, 0);
+ Call3(Func_020028fa, 5, 0x101, 0);
Func_02002848(60);
- Func_020028fc(8, 49152, 0);
+ Call3(Func_020028fc, 8, 0xc000, 0);
Func_0200285a(30);
Func_020028ca(8, 4);
Func_020027c2(8, 6);
@@ -206,9 +260,9 @@ void RunEventScript01(void)
Func_0200288a(40);
Func_020028fa(8, 3);
Func_020027f2(8, 6);
- Func_0200294e(0, 16384, 0);
- Func_0200295a(5, 16384, 0);
- Func_02002966(1, 16384, 0);
+ Call3(Func_0200294e, 0, 0x4000, 0);
+ Call3(Func_0200295a, 5, 0x4000, 0);
+ Call3(Func_02002966, 1, 0x4000, 0);
Func_020028c4(40);
Func_0200292c(1, 3);
Func_02002934(5, 3);
@@ -216,21 +270,37 @@ void RunEventScript01(void)
Func_020028e2(20);
Func_02002952(8, 3);
Func_0200284a(8, 6);
- Func_020029c2();
- Func_020029dc(37748736, -1, 14090240, 1);
- Func_020029c0(8, 16384, 0);
+ Call2(Func_020029c2, 0x19999, 0x3333);
+ Call4(Func_020029dc, 0x2400000, -1, 0xd70000, 1);
+ Call3(Func_020029c0, 8, 0x4000, 0);
Func_0200291e(10);
Func_02002998(8, 6, 0);
- Func_0200297c(8, 576, 217);
+ Call3(Func_0200297c, 8, 0x240, 217);
Func_0200293a(20);
- Func_0200298e(8, 576);
+ Call3(Func_0200298e, 8, 0x240, 0x141);
Func_020029a8(8, 0, 0);
- Func_02002a20();
- Func_02002a3a(37748736, -1, 8912896, 1);
+ Call2(Func_02002a20, 0x39999, 0x7333);
+ Call4(Func_02002a3a, 0x2400000, -1, 0x880000, 1);
Func_02002a46();
Func_02002974(20);
- Func_020029aa(1, 65536, 32768);
- Func_020029b8(5, 65536, 32768);
+ Call3(Func_020029aa, 1, 0x10000, 0x8000);
+ Call3(Func_020029b8, 5, 0x10000, 0x8000);
Func_020029f8(1, 2);
+ record = Value1(Func_02002a06, 0);
+ if (record != 0) {
+ Func_02002a28(1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02002a4e(1);
+ Func_02002a60(1, 0, 0);
+ Func_02002a70(5, 2);
+ record = Value1(Func_02002a36, 0);
+ if (record != 0) {
+ Func_02002a58(5, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02002a7e(5);
+ Func_02002a90(5, 0, 0);
+ Call1(Func_02002a36, 0x12f);
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c0)) = 0x204;
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c8)) = 16;
+ Func_02002a64();
}
-
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_d.c b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_d.c
new file mode 100644
index 000000000..7aea49634
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_d.c
@@ -0,0 +1,386 @@
+#include "types.h"
+
+#define FieldScene_RunScene37bSequenceA Func_02000614
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02002a02();
+void Func_02002a52();
+void Func_02002a6c();
+void Func_02002a88();
+void Func_02002a9c();
+void Func_02002ae2();
+void Func_02002aee();
+void Func_02002af2();
+void Func_02002af8();
+void Func_02002b08();
+void Func_02002b1a();
+void Func_02002b24();
+void Func_02002b32();
+void Func_02002b36();
+void Func_02002b3c();
+void Func_02002b56();
+void Func_02002b5c();
+void Func_02002b64();
+void Func_02002b6a();
+void Func_02002b76();
+void Func_02002b7a();
+void Func_02002b82();
+void Func_02002b8a();
+void Func_02002b92();
+void Func_02002ba0();
+void Func_02002bb6();
+void Func_02002bbc();
+void Func_02002bc6();
+void Func_02002bce();
+void Func_02002be2();
+void Func_02002bea();
+void Func_02002bf0();
+void Func_02002c02();
+void Func_02002c0e();
+void Func_02002c10();
+void Func_02002c18();
+void Func_02002c1c();
+void Func_02002c20();
+void Func_02002c28();
+void Func_02002c30();
+void Func_02002c3a();
+void Func_02002c4e();
+void Func_02002c54();
+void Func_02002c58();
+void Func_02002c62();
+void Func_02002c6c();
+void Func_02002c7c();
+void Func_02002c82();
+void Func_02002c8a();
+void Func_02002c92();
+void Func_02002c98();
+void Func_02002cae();
+void Func_02002cb2();
+void Func_02002cbc();
+void Func_02002cc4();
+void Func_02002cce();
+void Func_02002cd2();
+void Func_02002cda();
+void Func_02002cde();
+void Func_02002cea();
+void Func_02002d00();
+void Func_02002d08();
+void Func_02002d1e();
+void Func_02002d24();
+void Func_02002d34();
+void Func_02002d3e();
+void Func_02002d68();
+void Func_02002d6e();
+void Func_02002d82();
+void Func_02002d84();
+void Func_02002d8c();
+void Func_02002d8e();
+void Func_02002d98();
+void Func_02002da4();
+void Func_02002daa();
+void Func_02002db0();
+void Func_02002dbc();
+void Func_02002dbe();
+void Func_02002dc2();
+void Func_02002dc8();
+void Func_02002dd4();
+void Func_02002de6();
+void Func_02002dfc();
+void Func_02002e00();
+void Func_02002e0e();
+void Func_02002e14();
+void Func_02002e18();
+void Func_02002e20();
+void Func_02002e24();
+void Func_02002e30();
+void Func_02002e3e();
+void Func_02002e4a();
+void Func_02002e4e();
+void Func_02002e64();
+void Func_02002e70();
+void Func_02002e76();
+void Func_02002e9e();
+void Func_02002ea2();
+void Func_02002ea8();
+void Func_02002eb2();
+s32 Func_02002eb4();
+void Func_02002eca();
+s32 Func_02002ed0();
+void Func_02002ede();
+void Func_02002ee4();
+void Func_02002eec();
+void Func_02002ef8();
+void Func_02002f04();
+void Func_02002f08();
+void Func_02002f24();
+void Func_02002f36();
+void Func_02002f3c();
+void Func_02002f3e();
+void Func_02002f4c();
+void Func_02002f4e();
+void Func_02002f56();
+void Func_02002f5c();
+void Func_02002f66();
+void Func_02002f6a();
+void Func_02002f72();
+void Func_02002f82();
+void Func_02002f84();
+void Func_02002f90();
+void Func_02002f9e();
+void Func_02002faa();
+void Func_02002fdc();
+void Func_02002fde();
+void Func_02002fee();
+void Func_02002ff4();
+void Func_02002ff8();
+void Func_02002ffc();
+void Func_0200300c();
+void Func_02003012();
+void Func_02003026();
+void Func_0200303c();
+void Func_0200304a();
+s32 Func_02003050();
+void Func_0200305e();
+void Func_0200306e();
+void Func_02003072();
+void Func_02003076();
+s32 Func_02003080();
+void Func_0200308a();
+void Func_02003090();
+void Func_02003098();
+void Func_020030a2();
+void Func_020030a4();
+void Func_020030aa();
+void Func_020030b0();
+void Func_020030b2();
+void Func_020030ba();
+void Func_020030c8();
+void Func_020030da();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene37bSequenceA(void)
+{
+ u32 i;
+ s32 record;
+
+ Func_02002a6c();
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x100;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c8)) = 32;
+ Func_02002b76();
+ Func_02002b8a();
+ Func_02002a88(20);
+ Call3(Func_02002aee, 8, 0x2400000, 0x1280000);
+ Func_02002a9c(1);
+ Call1(Func_02002b32, 0x1004);
+ Func_02002a02(8, 6);
+ Call2(Func_02002b7a, 0xcccc, 0x1999);
+ Call4(Func_02002b92, 0x23e0000, -1, 0xb40000, 1);
+ Call3(Func_02002af8, 8, 0x10000, 0x8000);
+ Call3(Func_02002b24, 8, 0x240, 216);
+ Func_02002ae2(20);
+ Func_02002b5c(5, 2, 0);
+ Func_02002af2(30);
+ Func_02002a52(5, 6);
+ Func_02002b7a(8, 2);
+ Func_02002b08(6);
+ Call3(Func_02002bbc, 8, 0x9000, 0);
+ Func_02002b1a(10);
+ Call2(Func_02002bea, 0x59999, 0xb333);
+ Call4(Func_02002c02, 0x11f0000, -1, 0xb00000, 1);
+ Func_02002c0e();
+ Func_02002b3c(60);
+ Call4(Func_02002c1c, 0x23e0000, -1, 0xb40000, 1);
+ Func_02002c28();
+ Func_02002b56(20);
+ Func_02002bc6(8, 3);
+ Func_02002b64(10);
+ Call3(Func_02002c18, 8, 0xc000, 0);
+ Func_02002b76(10);
+ Func_02002bf0(8, 6, 0);
+ Call3(Func_02002bb6, 8, 0x30000, 0x20000);
+ Call3(Func_02002be2, 8, 0x240, 184);
+ Func_02002ba0(40);
+ Func_02002c10(8, 3);
+ Func_02002b08(8, 6);
+ Func_02002c18(1, 3);
+ Func_02002c20(5, 3);
+ Func_02002c30(0, 3);
+ Func_02002bce(40);
+ Func_02002c4e(8, 3);
+ Func_02002b36(8, 6);
+ Func_02002c58(0, 2, 0);
+ Func_02002c62(1, 2, 0);
+ Func_02002c6c(5, 2, 0);
+ Func_02002c02(30);
+ Func_02002c82(1, 2);
+ Func_02002b6a(1, 6);
+ Func_02002c92(8, 1);
+ Func_02002c8a(8, 4);
+ Func_02002b82(8, 6);
+ Func_02002cbc(0, 5, 0);
+ Func_02002c3a(40);
+ Func_02002cc4(8, 0, 0);
+ Func_02002cce(8, 5, 0);
+ Func_02002c54(40);
+ Func_02002cce(8, 6, 0);
+ Call3(Func_02002cb2, 8, 0x240, 216);
+ Call3(Func_02002d1e, 8, 0x8000, 0);
+ Func_02002c7c(10);
+ Call3(Func_02002cae, 8, 0x13333, 0x9999);
+ Call3(Func_02002cd2, 8, 0x1b0, 200);
+ Func_02002c98(20);
+ Call2(Func_02002d68, 0x26666, 0x4ccc);
+ Call4(Func_02002d82, 0x1200000, -1, 0xab0000, 1);
+ Func_02002d8e();
+ Func_02002cbc(80);
+ Func_02002d24(8, 1);
+ Call4(Func_02002da4, 0x23e0000, -1, 0xb40000, 1);
+ Func_02002cda(20);
+ Func_02002d8c(8, 0, 0);
+ Func_02002cea(30);
+ Call3(Func_02002d3e, 8, 0x240, 216);
+ Call3(Func_02002daa, 8, 0xc000, 0);
+ Func_02002d08(10);
+ Call3(Func_02002dbc, 0, 0x4000, 0);
+ Call3(Func_02002dc8, 5, 0x4000, 0);
+ Call3(Func_02002dd4, 1, 0x4000, 0);
+ Call2(Func_02002dfc, 0xcccc, 0x1999);
+ Call4(Func_02002e14, 0x23e0000, -1, 0xab0000, 1);
+ Func_02002dbe(8, 6, 0);
+ Call3(Func_02002d84, 8, 0x30000, 0x20000);
+ Call3(Func_02002db0, 8, 0x240, 184);
+ Func_02002d6e(80);
+ Func_02002cce(8, 6);
+ Func_02002de6(8, 4);
+ Func_02002cde(8, 20);
+ Call3(Func_02002e4a, 5, 0x102, 0);
+ Func_02002d98(40);
+ Func_02002e18(5, 2);
+ Func_02002d00(5, 6);
+ Func_02002e18(8, 3);
+ Call3(Func_02002e64, 8, 0x8000, 0);
+ Func_02002dc2(40);
+ Call3(Func_02002e76, 8, 0xc000, 0);
+ Func_02002dd4(30);
+ Func_02002d34(8, 6);
+ Call3(Func_02002e9e, 0, 0x101, 0);
+ Call3(Func_02002ea8, 1, 0x101, 0);
+ Call3(Func_02002eb2, 5, 0x101, 0);
+ Func_02002e00(60);
+ Func_02002e70(8, 4);
+ Func_02002d68(8, 6);
+ Func_02002ea2(1, 0, 0);
+ Func_02002e20(40);
+ Func_02002eb2(5, 0, 0);
+ Func_02002e30(40);
+ Value2(Func_02002ed0, 8, 0);
+ Call3(Func_02002eec, 0, 0x4000, 0);
+ Call3(Func_02002ef8, 5, 0x4000, 0);
+ Call3(Func_02002f04, 1, 0x4000, 0);
+ if (Value2(Func_02002eb4, 0, 0) == 0) {
+ Call1(Func_02002f36, 0x1010);
+ } else {
+ Call1(Func_02002f3e, 0x1011);
+ }
+ Func_02002e0e(8, 6);
+ Call1(Func_02002f4c, 0x1012);
+ Func_02002f3c(8, 2);
+ Func_02002e24(8, 6);
+ Call3(Func_02002f90, 1, 0x102, 0);
+ Func_02002ede(60);
+ Func_02002e3e(1, 6);
+ Func_02002f56(8, 3);
+ Func_02002e4e(8, 6);
+ Call3(Func_02002faa, 8, 0x4000, 0);
+ Func_02002f08(20);
+ Func_02002f82(8, 6, 0);
+ Call3(Func_02002f66, 8, 0x240, 216);
+ Func_02002f24(40);
+ Call2(Func_02002ff4, 0xcccc, 0x1999);
+ Call4(Func_0200300c, 0x23e0000, -1, 0xbf0000, 1);
+ Call3(Func_02002f72, 8, 0x10000, 0x8000);
+ Call3(Func_02002f9e, 8, 0x240, 232);
+ Func_02002f5c(40);
+ Func_02002fdc(8, 2);
+ Func_02002f6a(40);
+ Func_02002eca(8, 6);
+ Call3(Func_02003026, 8, 0xc000, 0);
+ Func_02002f84(30);
+ Func_02002ee4(8, 6);
+ Func_02002ffc(8, 3);
+ Call4(Func_02003076, 0x2400000, -1, 0xd70000, 1);
+ Call3(Func_02002ff8, 8, 0x23e, 0x143);
+ Func_02003012(8, 0, 0);
+ Call2(Func_0200308a, 0x39999, 0x7333);
+ Call4(Func_020030a4, 0x2400000, -1, 0x880000, 1);
+ Func_020030b0();
+ Func_02002fde(20);
+ Func_02003090(5, 0, 0);
+ Func_02002fee(10);
+ Func_02002f4e(5, 6);
+ Func_0200305e(1, 3);
+ Func_0200306e(5, 3);
+ Call3(Func_0200303c, 1, 0x10000, 0x8000);
+ Call3(Func_0200304a, 5, 0x10000, 0x8000);
+ Func_0200308a(5, 2);
+ record = Value1(Func_02003050, 0);
+ if (record != 0) {
+ Func_02003072(5, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02003098(5);
+ Func_020030aa(5, 0, 0);
+ Func_020030ba(1, 2);
+ record = Value1(Func_02003080, 0);
+ if (record != 0) {
+ Func_020030a2(1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_020030c8(1);
+ Func_020030da(1, 0, 0);
+ Call1(Func_02003080, 0x12f);
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x204;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c8)) = 16;
+ Func_020030b2();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_e.c b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_e.c
new file mode 100644
index 000000000..b6ce45998
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_e.c
@@ -0,0 +1,48 @@
+#include "types.h"
+
+#define FieldScene_RunScene37bSequenceC Func_0200166c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02003ac0();
+s32 Func_02003ade();
+s32 Func_02003ae8();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene37bSequenceC(void)
+{
+ s32 rec1;
+ s32 rec2;
+ s32 a;
+
+ rec1 = Value1(Func_02003ade, 0);
+ a = *(s32 *)(rec1 + 8) >> 20;
+ rec2 = Value1(Func_02003ae8, 0);
+ if ((*(s32 *)(rec2 + 16) >> 20) == 7) {
+ if ((u32)(a - 13) <= 1) {
+ Call4(Func_02003ac0, 2, 0xd00000, 0x700000, 255);
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_f.c b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_f.c
new file mode 100644
index 000000000..2e58d966a
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_f.c
@@ -0,0 +1,48 @@
+#include "types.h"
+
+#define FieldScene_RunScene37bSequenceD Func_020016a4
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02003af8();
+s32 Func_02003b16();
+s32 Func_02003b20();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene37bSequenceD(void)
+{
+ s32 rec1;
+ s32 rec2;
+ s32 field;
+
+ rec1 = Value1(Func_02003b16, 0);
+ field = *(s32 *)(rec1 + 8) >> 20;
+ rec2 = Value1(Func_02003b20, 0);
+ if ((*(s32 *)(rec2 + 16) >> 20) == 7) {
+ if ((u32)(field - 21) <= 1) {
+ Call4(Func_02003af8, 2, 0x1600000, 0x700000, 255);
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_g.c b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_g.c
new file mode 100644
index 000000000..062394739
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_37b_sequence_g.c
@@ -0,0 +1,198 @@
+#include "types.h"
+
+#define FieldScene_RunScene37bSequenceF Func_020016dc
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02003b1a();
+void Func_02003b2a();
+u8 *Func_02003b50();
+s32 Func_02003b54();
+void Func_02003b68();
+s32 Func_02003b82();
+s32 Func_02003b8e();
+s32 Func_02003b96();
+void Func_02003ba2();
+s32 Func_02003bae();
+void Func_02003bd0();
+s32 Func_02003bfa();
+s32 Func_02003c1a();
+void Func_02003c28();
+void Func_02003c44();
+void Func_02003c5a();
+void Func_02003c5e();
+void Func_02003c70();
+void Func_02003c7a();
+void Func_02003c80();
+void Func_02003c86();
+void Func_02003c90();
+void Func_02003c9c();
+void Func_02003ca0();
+void Func_02003ca6();
+void Func_02003cac();
+void Func_02003cb2();
+void Func_02003cb8();
+void Func_02003cbc();
+void Func_02003ccc();
+void Func_02003cd2();
+void Func_02003cee();
+s32 Func_02003cf6();
+s32 Func_02003d00();
+void Func_02003d02();
+s32 Func_02003d0a();
+s32 Func_02003d14();
+void Func_02003d18();
+void Func_02003d20();
+void Func_02003d24();
+void Func_02003d26();
+void Func_02003d2a();
+void Func_02003d3c();
+void Func_02003d7c();
+void Func_02003d7e();
+void Func_02003df0();
+void Func_02003e20();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene37bSequenceF(void)
+{
+ u32 i;
+ u8 *rec8;
+ s32 record;
+ u8 *p5;
+
+ rec8 = Func_02003b50(17);
+ Call4(Func_02003b1a, 2, 0x1100000, 0x800000, 0);
+ Call4(Func_02003b2a, 2, 0x1200000, 0x800000, 0);
+ if (rec8 == 0) {
+ } else {
+ p5 = *(s32 *)(rec8 + 16);
+ Func_02003b68();
+ if (((s32)p5 >> 20) != 8) {
+ } else {
+ if (Value1(Func_02003b54, 0x207) == 0) {
+ record = Value1(Func_02003b96, 0);
+ if ((u32)(*(s32 *)(record + 16) >> 19) <= 17) {
+ Call3(Func_02003bd0, 0, 0x121, 158);
+ record = Func_02003bae(0);
+ {
+ s32 shown = 0xc000;
+
+ *(u16 *)(record + 6) = shown;
+ }
+ }
+ }
+ if (Value1(Func_02003b82, 0x816) == 0) {
+ } else {
+ if (Value1(Func_02003b8e, 0x817) == 0) {
+ } else {
+ Call1(Func_02003ba2, 0x818);
+ Call2(Func_02003c86, 0x20000, 0x4000);
+ Call4(Func_02003ca0, 0x11e0000, -1, 0x920000, 1);
+ Func_02003cac();
+ *(u8 *)(Func_02003bfa(17) + 90) &= 254;
+ Value3(Func_02003c1a, 17, 0x30000, 0x10000);
+ {
+ s32 z = 0;
+
+ rec8[85] = (u8)z;
+ Func_02003cb2(17, 3);
+ Func_02003d20(189);
+ Call3(Func_02003c44, 17, 0x120, 178);
+ Call1((void (*)())Func_02003c1a, 8);
+ Call3(Func_02003c80, 18, 0x1200000, 0xb20000);
+ *(s32 *)(rec8 + 56) = -0x80000000;
+ *(s32 *)(rec8 + 60) = -0x80000000;
+ *(s32 *)(rec8 + 64) = -0x80000000;
+ *(s32 *)(rec8 + 8) = z;
+ *(s32 *)(rec8 + 12) = z;
+ *(s32 *)(rec8 + 16) = z;
+ *(s32 *)(rec8 + 36) = z;
+ *(s32 *)(rec8 + 40) = z;
+ *(s32 *)(rec8 + 44) = z;
+ Func_02003ca0(17, 0, 0);
+ }
+ Call3(Func_02003c28, 0x10000, 0x10000, 0x10000);
+ Func_02003c5e(10);
+ Func_02003d7c(141);
+ Call3(Func_02003c44, 0x30000, 0x30000, 0x10000);
+ Func_02003c7a(10);
+ Call3(Func_02003c5a, 0x50000, 0x50000, 0x10000);
+ Func_02003c90(35);
+ Call3(Func_02003c70, 0x40000, 0x40000, 0x10000);
+ Func_02003ca6(20);
+ Call3(Func_02003c86, 0x30000, 0x30000, 0x10000);
+ Func_02003cbc(30);
+ Call3(Func_02003c9c, 0x20000, 0x20000, 0x10000);
+ Func_02003cd2(40);
+ Call1(Func_02003df0, 0x121);
+ Call3(Func_02003cb8, 0x10000, 0x10000, 0x10000);
+ Func_02003cee(10);
+ Call3(Func_02003ccc, -1, -1, 0xe666);
+ Func_02003d02(60);
+ Func_02003e20(188);
+ if (Value1(Func_02003cf6, 0x80b) != 0) {
+ if (Value1(Func_02003d00, 0x80c) != 0) {
+ if (Value1(Func_02003d0a, 0x80d) != 0) {
+ if (Value1(Func_02003d14, 0x80e) != 0) {
+ Call1(Func_02003d26, 0x80f);
+ }
+ }
+ }
+ }
+ Func_02003d3c(40);
+ Call2(Func_02003d24, 0x1038, 1);
+ Call6(Func_02003d18, 0, 1, 2, 1, 17, 8);
+ Call6(Func_02003d2a, 17, 9, 2, 1, 17, 7);
+ }
+ }
+ }
+ Func_02003d7e();
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_37f_event_script02.c b/games/gs1/src/overlays/scene_primary_script/run_scene_37f_event_script02.c
new file mode 100644
index 000000000..b222ef3db
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_37f_event_script02.c
@@ -0,0 +1,136 @@
+#include "types.h"
+
+#define RunEventScript02 Func_0200161c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_020031cc();
+void Func_020031e0();
+s32 Func_0200320e();
+void Func_0200322a();
+void Func_02003232();
+void Func_0200324c();
+void Func_0200325e();
+void Func_02003266();
+void Func_0200326a();
+void Func_0200326c();
+void Func_02003284();
+void Func_0200328a();
+void Func_020032ac();
+void Func_020032d6();
+void Func_020032ea();
+void Func_020032ee();
+void Func_020032fa();
+void Func_0200331e();
+void Func_02003322();
+s32 Func_0200332e();
+void Func_02003334();
+void Func_0200333c();
+void Func_02003342();
+void Func_02003346();
+void Func_02003348();
+void Func_02003350();
+void Func_02003354();
+void Func_02003360();
+void Func_02003362();
+void Func_0200336a();
+void Func_0200336c();
+void Func_0200336e();
+void Func_02003376();
+void Func_02003380();
+void Func_02003382();
+void Func_0200338e();
+void Func_020033a0();
+void Func_020033a2();
+void Func_020033a6();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript02(void)
+{
+ u32 i;
+ s32 record;
+
+ Func_020031cc();
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x204;
+ Func_020032d6();
+ Func_020032ea();
+ Func_020031e0(20);
+ record = Value1(Func_0200320e, 0);
+ if (record != 0) {
+ Func_0200324c(8, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02003232, 8, 0x10000, 0x8000);
+ Func_0200326a(8, 2);
+ Call3(Func_0200325e, 8, 24, -10);
+ Func_0200326c(8);
+ Func_02003284(8, 1);
+ Func_0200322a(6);
+ Call3(Func_020032ee, 8, 0xb000, 0);
+ Call3(Func_020032fa, 0, 0xc000, 40);
+ Call2(Func_02003322, 0x26666, 0x4ccc);
+ Call4(Func_0200333c, 0x6880000, -1, 0x20c0000, 1);
+ Func_02003348();
+ Func_02003266(20);
+ Call2(Func_02003346, 0x19999, 0x3333);
+ Call4(Func_02003360, 0x7580000, -1, 0x20c0000, 1);
+ Func_0200336c();
+ Func_0200328a(20);
+ Call2(Func_0200336a, 0x33333, 0x6666);
+ Call4(Func_02003382, 0x6e90000, -1, 0x2240000, 1);
+ Func_0200338e();
+ Func_020032ac(20);
+ Func_02003334(8, 2);
+ Func_02003376(8, 0, 30);
+ Call1(Func_02003354, 0x103a);
+ Call3(Func_02003376, 0x4008, 0, 10);
+ Call3(Func_020033a2, 8, 0x100, 40);
+ Func_02003362(8, 1);
+ Call3(Func_020033a6, 8, 0x5000, 20);
+ Call3(Func_020033a0, 0x4008, 0, 10);
+ Func_02003360(8, 2);
+ record = Value1(Func_0200332e, 0);
+ if (record != 0) {
+ Func_02003350(8, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200336e(8);
+ Func_02003380(8, 0, 0);
+ Call1(Func_0200331e, 0x825);
+ Func_02003342();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_37f_sequence_b.c b/games/gs1/src/overlays/scene_primary_script/run_scene_37f_sequence_b.c
new file mode 100644
index 000000000..c8cd23fff
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_37f_sequence_b.c
@@ -0,0 +1,172 @@
+#include "types.h"
+
+#define FieldScene_RunScene37fSequenceA Func_020017c0
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+s32 Func_0200333c();
+void Func_0200334e();
+void Func_02003360();
+void Func_02003372();
+void Func_02003384();
+void Func_02003396();
+void Func_020033b0();
+s32 Func_020033c4();
+void Func_020033e0();
+s32 Func_020033f4();
+void Func_02003410();
+s32 Func_02003420();
+void Func_02003442();
+s32 Func_02003452();
+void Func_0200345a();
+void Func_02003472();
+s32 Func_02003482();
+void Func_0200348a();
+void Func_020034a6();
+s32 Func_020034b6();
+void Func_020034ba();
+void Func_020034d6();
+s32 Func_020034e6();
+void Func_020034ec();
+void Func_02003508();
+s32 Func_02003518();
+void Func_0200351c();
+void Func_02003538();
+s32 Func_02003548();
+void Func_02003550();
+void Func_0200356c();
+s32 Func_0200357c();
+void Func_02003580();
+void Func_0200359c();
+s32 Func_020035ac();
+void Func_020035b2();
+void Func_020035ce();
+s32 Func_020035de();
+void Func_020035e2();
+void Func_02003616();
+void Func_02003646();
+void Func_02003678();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+static __inline__ s32 Value6(s32 (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ return f(a0, a1, a2, a3, a4, a5);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene37fSequenceA(s32 a0)
+{
+ u32 i;
+ s32 record;
+
+ Value6(Func_0200333c, 122, 20, 1, 1, 100, 32);
+ Call6(Func_0200334e, 122, 20, 1, 1, 104, 32);
+ Call6(Func_02003360, 122, 20, 1, 1, 108, 32);
+ Call6(Func_02003372, 122, 20, 1, 1, 112, 32);
+ Call6(Func_02003384, 122, 20, 1, 1, 116, 32);
+ Call6(Func_02003396, 122, 20, 1, 1, 120, 32);
+ if (Value1(Func_020033c4, 0x311) != 0) {
+ Call6(Func_020033b0, 121, 20, 1, 1, 100, 32);
+ if (a0 != 0) {
+ Call3(Func_0200345a, 9, 0x6380000, 0x2080000);
+ }
+ } else {
+ if (Value1(Func_020033f4, 0x310) != 0) {
+ Call6(Func_020033e0, 121, 20, 1, 1, 100, 32);
+ if (a0 != 0) {
+ Call3(Func_0200348a, 9, 0x6580000, 0x2080000);
+ }
+ }
+ }
+ if (Value1(Func_02003420, 0x313) != 0) {
+ Call6(Func_02003410, 121, 20, 1, 1, 104, 32);
+ if (a0 != 0) {
+ Call3(Func_020034ba, 10, 0x6780000, 0x2080000);
+ }
+ } else {
+ if (Value1(Func_02003452, 0x312) != 0) {
+ Call6(Func_02003442, 121, 20, 1, 1, 104, 32);
+ if (a0 != 0) {
+ Call3(Func_020034ec, 10, 0x6980000, 0x2080000);
+ }
+ }
+ }
+ if (Value1(Func_02003482, 0x315) != 0) {
+ Call6(Func_02003472, 121, 20, 1, 1, 108, 32);
+ if (a0 != 0) {
+ Call3(Func_0200351c, 11, 0x6b80000, 0x2080000);
+ }
+ } else {
+ if (Value1(Func_020034b6, 0x314) != 0) {
+ Call6(Func_020034a6, 121, 20, 1, 1, 108, 32);
+ if (a0 != 0) {
+ Call3(Func_02003550, 11, 0x6d80000, 0x2080000);
+ }
+ }
+ }
+ if (Value1(Func_020034e6, 0x317) != 0) {
+ Call6(Func_020034d6, 121, 20, 1, 1, 112, 32);
+ if (a0 != 0) {
+ Call3(Func_02003580, 12, 0x6f80000, 0x2080000);
+ }
+ } else {
+ if (Value1(Func_02003518, 0x316) != 0) {
+ Call6(Func_02003508, 121, 20, 1, 1, 112, 32);
+ if (a0 != 0) {
+ Call3(Func_020035b2, 12, 0x7180000, 0x2080000);
+ }
+ }
+ }
+ if (Value1(Func_02003548, 0x319) != 0) {
+ Call6(Func_02003538, 121, 20, 1, 1, 116, 32);
+ if (a0 != 0) {
+ Call3(Func_020035e2, 13, 0x7380000, 0x2080000);
+ }
+ } else {
+ if (Value1(Func_0200357c, 0x318) != 0) {
+ Call6(Func_0200356c, 121, 20, 1, 1, 116, 32);
+ if (a0 != 0) {
+ Call3(Func_02003616, 13, 0x7580000, 0x2080000);
+ }
+ }
+ }
+ if (Value1(Func_020035ac, 0x31b) != 0) {
+ Call6(Func_0200359c, 121, 20, 1, 1, 120, 32);
+ if (a0 != 0) {
+ Call3(Func_02003646, 14, 0x7780000, 0x2080000);
+ }
+ } else {
+ if (Value1(Func_020035de, 0x31a) != 0) {
+ Call6(Func_020035ce, 121, 20, 1, 1, 120, 32);
+ if (a0 != 0) {
+ Call3(Func_02003678, 14, 0x7980000, 0x2080000);
+ }
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_37f_sequence_c.c b/games/gs1/src/overlays/scene_primary_script/run_scene_37f_sequence_c.c
new file mode 100644
index 000000000..8b24d79fa
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_37f_sequence_c.c
@@ -0,0 +1,56 @@
+#include "types.h"
+
+#define FieldScene_RunScene37fSequenceC Func_020000ec
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern s16 Data_02000240[];
+extern u8 Data_00000010[];
+extern u8 Data_00000013[];
+extern u8 Data_0200a2e4[];
+extern u8 Data_0200a524[];
+extern u8 Data_0200a41c[];
+extern u8 Data_0200a32c[];
+extern u8 Data_0200a2d8[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+s32 FieldScene_RunScene37fSequenceC(void)
+{
+ s16 scene_id;
+ s16 sub;
+
+ scene_id = Data_02000240[224];
+ if (scene_id == (s32)Data_00000013) {
+ return (s32)Data_0200a2e4;
+ } else {
+ if (scene_id == (s32)Data_00000010) {
+ sub = Data_02000240[225];
+ switch (sub) {
+ case 11:
+ case 12:
+ case 13:
+ return (s32)Data_0200a41c;
+ case 14:
+ case 15:
+ case 16:
+ return (s32)Data_0200a524;
+ default:
+ return (s32)Data_0200a32c;
+ }
+ } else {
+ return (s32)Data_0200a2d8;
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_380_actor_formation_sequence.c b/games/gs1/src/overlays/scene_primary_script/run_scene_380_actor_formation_sequence.c
new file mode 100644
index 000000000..b2a7be2bb
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_380_actor_formation_sequence.c
@@ -0,0 +1,320 @@
+#include "types.h"
+
+#define FieldScene_RunActorFormationSequence Func_02000f8c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_020051f8();
+void Func_02005208();
+void Func_02005230();
+void Func_0200524c();
+void Func_02005268();
+void Func_0200529e();
+void Func_020052b6();
+void Func_0200530c();
+void Func_0200544a();
+void Func_020054ae();
+void Func_020054d4();
+void Func_020054f6();
+void Func_02005570();
+void Func_02005636();
+void Func_0200565e();
+void Func_0200566e();
+void Func_020059ae();
+void Func_020059c4();
+void Func_020059f2();
+void Func_020059fc();
+void Func_02005a1c();
+s32 Func_02005a30();
+u8 *Func_02005a38();
+void Func_02005a50();
+void Func_02005a58();
+void Func_02005a72();
+void Func_02005a78();
+void Func_02005a8a();
+void Func_02005a94();
+void Func_02005aac();
+void Func_02005aae();
+void Func_02005ab2();
+void Func_02005ab8();
+void Func_02005abe();
+void Func_02005ada();
+s32 Func_02005ae0();
+void Func_02005b04();
+void Func_02005b14();
+void Func_02005b26();
+void Func_02005b36();
+void Func_02005b3a();
+void Func_02005b5c();
+void Func_02005b64();
+void Func_02005b68();
+void Func_02005b70();
+void Func_02005b76();
+u8 *Func_02005b7c();
+void Func_02005b86();
+void Func_02005b88();
+void Func_02005ba4();
+void Func_02005ba6();
+void Func_02005bb6();
+void Func_02005bbc();
+void Func_02005bc8();
+void Func_02005bd2();
+void Func_02005bde();
+void Func_02005be0();
+void Func_02005bf2();
+void Func_02005c0a();
+s32 Func_02005c16();
+void Func_02005c18();
+void Func_02005c26();
+void Func_02005c3a();
+void Func_02005c3e();
+void Func_02005c48();
+void Func_02005c4e();
+void Func_02005c50();
+void Func_02005c54();
+void Func_02005c5a();
+void Func_02005c5c();
+void Func_02005c64();
+void Func_02005c82();
+void Func_02005caa();
+void Func_02005cb4();
+void Func_02005cca();
+void Func_02005cce();
+void Func_02005cd2();
+void Func_02005cda();
+void Func_02005cfc();
+s32 Func_02005d02();
+void Func_02005d04();
+void Func_02005d14();
+void Func_02005d44();
+void Func_02005d50();
+void Func_02005d54();
+void Func_02005d5c();
+void Func_02005d60();
+void Func_02005d64();
+s32 Func_02005da2();
+void Func_02005db4();
+void Func_02005dd8();
+void Func_02005dde();
+void Func_02005dea();
+void Func_02005dfa();
+void Func_02005e00();
+void Func_02005e0e();
+void Func_02005e1a();
+void Func_02005e30();
+void Func_02005e3a();
+void Func_02005e4a();
+void Func_02005e52();
+void Func_02005e5c();
+void Func_02005e62();
+void Func_02005e68();
+void Func_02005e76();
+void Func_02005e82();
+void Func_02005ea6();
+void Func_02005eba();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunActorFormationSequence(void)
+{
+ u32 i;
+ s32 zero;
+ u8 *p10;
+ u8 *p9;
+ s32 rec8;
+ u8 *record;
+
+ Func_02005aae(61);
+ Func_020059ae(10, 4);
+ Call1(Func_020059fc, 0x107d);
+ Func_020051f8(10, 10);
+ Func_020059c4(11, 4);
+ Func_02005208(11, 30);
+ Call3(Func_02005a58, 9, 0x102, 60);
+ Func_020059f2(9, 4, 10);
+ Func_020059fc(9, 6, 30);
+ Func_02005230(9, 10);
+ Func_02005a1c(10, 1);
+ Call3(Func_02005a78, 10, 0xb000, 10);
+ Func_0200524c(10, 20);
+ Call2((void (*)())Func_02005a38, 11, 1);
+ Call3(Func_02005a94, 11, 0xd000, 20);
+ Func_02005268(11, 30);
+ Call3(Func_02005ab8, 9, 0x102, 60);
+ Func_02005ab2(5, 0, 0);
+ Call3(Func_02005abe, 9, 0x7000, 80);
+ Call3(Func_02005ada, 5, 0x102, 40);
+ Func_0200529e(5, 20);
+ Func_02005a8a(9, 2);
+ Func_02005a72(9, 4);
+ Func_020052b6(9, 10);
+ rec8 = Value1(Func_02005a30, 12);
+ record = Func_02005a38(8);
+ p9 = *(u8 **)(rec8 + 80) + 38;
+ zero = 0;
+ *p9 = (u8)zero;
+ *(s32 *)(rec8 + 24) = 0x1999;
+ *(s32 *)(rec8 + 28) = 0x1999;
+ *(s32 *)(record + 24) = 0x1999;
+ *(s32 *)(record + 28) = 0x1999;
+ Value2(Func_02005ae0, 12, 0x100);
+ Call3(Func_02005aac, 12, 0x1d70000, 0x1220000);
+ p10 = rec8 + 85;
+ *p10 = (u8)zero;
+ *(s32 *)(rec8 + 12) = 0x280000;
+ Func_02005a50(1);
+ Func_0200530c(12, 10);
+ Call3(Func_02005b5c, 5, 0x100, 0);
+ Call3(Func_02005b68, 9, 0x100, 30);
+ Call3(Func_02005b64, 5, 0xc000, 0);
+ Call3(Func_02005b70, 9, 0xb000, 10);
+ Call3((void (*)())Func_02005b7c, 11, 0xd000, 0);
+ Call3(Func_02005b88, 10, 0xb000, 0);
+ Call2(Func_02005bbc, 0x20000, 0x4000);
+ Call4(Func_02005bd2, 0x1d70000, -1, 0x1350000, 1);
+ Func_02005bde();
+ Call3(Func_02005b3a, 8, 0x1d70000, 0x1220000);
+ Func_02005c50(190);
+ Func_02005bc8(12, 2);
+ for (i = 0; i != 90; i++) {
+ *(s32 *)(rec8 + 12) += -0x1999;
+ *(s32 *)(rec8 + 24) += 0x28f;
+ *(s32 *)(rec8 + 28) += 0x28f;
+ *(s32 *)(record + 24) += 0x28f;
+ *(s32 *)(record + 28) += 0x28f;
+ Func_02005b04(1);
+ }
+ *p10 = 5;
+ Func_02005b14(80);
+ for (i = 0; i != 60; i++) {
+ *(s32 *)(rec8 + 12) += -0x8000;
+ Func_02005b26(1);
+ }
+ *p10 = 3;
+ Func_02005b36(30);
+ {
+ s32 shown = 1;
+
+ *p9 = shown;
+ }
+ Func_02005bb6(8, 0, 0);
+ Func_02005c3e(12, 1);
+ {
+ u8 *record = Func_02005b7c(12);
+ u8 value = *(volatile u8 *)&record[35];
+
+ record[35] = (u8)(value | 1);
+ }
+ Value2(Func_02005c16, 12, 0);
+ Call3(Func_02005ba4, 12, 0x8000, 0x4000);
+ Call3(Func_02005be0, 12, 0x1d7, 0x132);
+ Func_02005b86(40);
+ Func_02005c26(12, 2);
+ Call2(Func_0200544a, 0x400c, 20);
+ Func_02005c48(5, 9, 0);
+ Func_02005ba6(20);
+ Func_02005c3e(5, 2);
+ Func_02005c4e(9, 2);
+ Func_02005bbc(40);
+ Func_02005c54(10, 1);
+ Func_02005c64(11, 1);
+ Func_02005bd2(20);
+ Func_02005c5a(10, 4);
+ Call3(Func_02005cce, 10, 0x5000, 0);
+ Call3(Func_02005cda, 11, 0x5000, 10);
+ Func_020054ae(10, 30);
+ Call2(Func_02005d04, 12, 0x102);
+ Func_02005c0a(60);
+ Func_02005caa(11, 1);
+ Func_02005c18(10);
+ Func_020054d4(11, 30);
+ Call3(Func_02005d14, 11, 0xd000, 30);
+ Func_02005cb4(11, 3);
+ Func_02005c3a(20);
+ Func_020054f6(11, 30);
+ Func_02005cca(12, 3);
+ Func_02005c50(20);
+ Call3(Func_02005d44, 11, 0x5000, 40);
+ Call3(Func_02005d50, 9, 0x5000, 0);
+ Call3(Func_02005d5c, 5, 0x6000, 20);
+ Func_02005cfc(10, 3);
+ Func_02005c82(20);
+ Func_02005dde();
+ Func_02005dea();
+ Call4(Func_02005db4, 0x1080000, -1, 0x1cc0000, 0);
+ Func_02005be0();
+ Func_02005b76(1);
+ Func_02005dfa();
+ Func_02005e0e();
+ Func_02005cb4(40);
+ Func_02005570(10, 40);
+ Func_02005d54(0, 3);
+ Func_02005d64(1, 3);
+ Func_02005cd2(80);
+ Value2(Func_02005da2, 11, 0);
+ if (Value2(Func_02005d02, 0, 0) != 0) {
+ bump_step(1);
+ }
+ Func_02005dd8(9, 0, 20);
+ Func_02005e5c();
+ Func_02005e68();
+ Call4(Func_02005e30, 0x1dd0000, -1, 0x14e0000, 0);
+ Func_02005c5c();
+ Func_02005bf2(1);
+ Func_02005ea6();
+ Func_02005eba();
+ Func_02005d60(20);
+ Func_02005e00(10, 2);
+ Call3(Func_02005e5c, 10, 0xb000, 10);
+ Call1(Func_02005e3a, 0x108d);
+ Func_02005636(10, 20);
+ Call3(Func_02005e76, 5, 0x2000, 0);
+ Call3(Func_02005e82, 9, 0x3000, 10);
+ Func_02005e1a(9, 4);
+ Call2(Func_0200565e, 0x5009, 40);
+ Func_02005e4a(11, 1);
+ Func_0200566e(11, 10);
+ Func_02005e52(5, 2);
+ Func_02005e62(9, 2);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_380_event_script01_second.c b/games/gs1/src/overlays/scene_primary_script/run_scene_380_event_script01_second.c
new file mode 100644
index 000000000..2f6b1dd36
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_380_event_script01_second.c
@@ -0,0 +1,379 @@
+#include "types.h"
+
+#define FieldScene_RunScene380SequenceA Func_0200178c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_000010b0[];
+extern u8 Data_000010b2[];
+void Func_02005a3e();
+void Func_02005a70();
+void Func_02005a9a();
+void Func_02005abe();
+void Func_02005adc();
+void Func_02005af4();
+void Func_02005b04();
+void Func_02005b1a();
+void Func_02005b46();
+void Func_02005b56();
+void Func_02005b6c();
+void Func_02005b84();
+void Func_02005b94();
+void Func_02005ba4();
+void Func_02005bde();
+void Func_02005d08();
+void Func_02005d3c();
+void Func_02005d62();
+void Func_02005e0e();
+void Func_02006134();
+void Func_02006158();
+s32 Func_02006162();
+void Func_0200617a();
+void Func_02006198();
+void Func_020061b8();
+void Func_020061c2();
+void Func_020061c6();
+void Func_020061ca();
+void Func_020061f4();
+void Func_02006202();
+void Func_02006204();
+void Func_0200620c();
+void Func_02006212();
+void Func_0200621a();
+void Func_0200621c();
+void Func_02006220();
+void Func_02006230();
+void Func_02006244();
+void Func_0200624c();
+void Func_0200625e();
+void Func_02006276();
+void Func_0200627c();
+void Func_02006286();
+void Func_0200628a();
+void Func_02006294();
+void Func_0200629a();
+void Func_020062a2();
+void Func_020062a6();
+void Func_020062b0();
+void Func_020062be();
+void Func_020062c8();
+void Func_020062e0();
+void Func_020062f0();
+void Func_020062fe();
+void Func_02006304();
+void Func_0200630e();
+void Func_0200631a();
+void Func_02006340();
+void Func_02006342();
+void Func_02006358();
+void Func_0200635a();
+void Func_02006370();
+void Func_02006380();
+s32 Func_020063a2();
+void Func_020063a6();
+void Func_020063b2();
+void Func_020063c0();
+void Func_020063ce();
+void Func_020063e4();
+void Func_020063f4();
+void Func_020063fe();
+void Func_02006402();
+void Func_0200640a();
+void Func_02006410();
+void Func_02006418();
+void Func_0200641a();
+void Func_02006426();
+void Func_0200643e();
+void Func_02006448();
+s32 Func_0200644e();
+void Func_0200645a();
+void Func_0200646e();
+void Func_0200647e();
+void Func_02006486();
+void Func_02006492();
+void Func_020064a0();
+void Func_020064b4();
+void Func_020064b8();
+void Func_020064ba();
+void Func_020064c0();
+void Func_020064c2();
+void Func_020064c6();
+s32 Func_020064ee();
+s32 Func_020064fa();
+void Func_020064fc();
+void Func_02006500();
+void Func_02006526();
+void Func_0200652a();
+void Func_02006536();
+void Func_02006540();
+void Func_0200654c();
+void Func_02006556();
+void Func_0200657e();
+void Func_0200658c();
+void Func_020065c0();
+void Func_020065d2();
+s32 Func_020065d6();
+void Func_020065d8();
+void Func_020065e2();
+void Func_02006602();
+void Func_0200661a();
+void Func_0200661c();
+void Func_0200662a();
+void Func_02006632();
+void Func_02006640();
+void Func_02006648();
+void Func_02006656();
+void Func_0200665e();
+void Func_02006678();
+void Func_0200667a();
+void Func_0200668a();
+void Func_0200668e();
+void Func_020066a4();
+void Func_020066a6();
+void Func_020066b6();
+void Func_020066ba();
+void Func_020066d0();
+void Func_020066e6();
+void Func_02006776();
+void Func_020067a2();
+void Func_020067ce();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene380SequenceA(void)
+{
+ u8 *rec;
+ s32 record;
+ s32 base6_10b0;
+ s32 base6_10b2;
+ s32 count;
+ s32 n;
+ u16 *slot;
+ s32 item;
+
+ Func_020062a6(161);
+ Func_020061c6(12, 3);
+ Func_02006134(40);
+ record = Value1(Func_02006162, 12);
+ if (record != 0) {
+ Func_020061b8(13, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Func_020061c2(12, 0, 0);
+ Func_02006158(20);
+ Call3(Func_0200624c, 13, 0x3000, 40);
+ Func_02006204(5, 3);
+ Func_0200620c(5, 3);
+ Func_0200617a(40);
+ Func_0200621a(5, 2);
+ Func_02005a3e(5, 20);
+ Func_02006212(13, 3);
+ Func_02006198(10);
+ Func_02006230(5, 3);
+ Call3(Func_02006294, 9, 0x8000, 10);
+ Func_0200624c(9, 2);
+ Func_02005a70(9, 40);
+ Func_02006244(5, 3);
+ Func_020061ca(40);
+ Call3(Func_020062be, 9, 0xb000, 40);
+ Func_02006276(13, 2);
+ Func_02005a9a(13, 20);
+ Func_02006286(5, 1);
+ Func_020061f4(40);
+ Func_0200627c(13, 3);
+ Func_02006202(10);
+ Func_02005abe(13, 40);
+ Func_020062a2(10, 1);
+ Func_0200629a(10, 3);
+ Func_02006220(10);
+ Func_02005adc(10, 10);
+ Func_020062c8(11, 1);
+ Func_020062b0(11, 3);
+ Func_02005af4(11, 80);
+ Func_020062e0(13, 2);
+ Func_02005b04(13, 40);
+ Func_020062f0(5, 2);
+ Func_0200625e(10);
+ Func_02005b1a(5, 10);
+ Func_020062fe(13, 2);
+ Func_0200630e(9, 2);
+ Func_0200627c(80);
+ Func_02006304(5, 4);
+ Func_0200628a(20);
+ Func_02005b46(5, 80);
+ Func_0200631a(13, 4);
+ Func_02005b56(13, 80);
+ Func_02006342(5, 2);
+ Func_020062b0(4);
+ Func_02005b6c(5, 20);
+ Func_02006358(10, 1);
+ Func_02006340(10, 3);
+ Func_02005b84(10, 10);
+ Func_02006370(11, 1);
+ Func_02005b94(11, 10);
+ Func_02006380(10, 1);
+ Func_02005ba4(10, 10);
+ Call3(Func_020063e4, 9, 0x3000, 80);
+ Call3(Func_020063fe, 9, 0x105, 80);
+ Func_020063a6(11, 1);
+ Call3(Func_02006402, 11, 0x5000, 40);
+ Func_020063b2(11, 2);
+ Func_02005bde(11, 20);
+ Func_02006486();
+ Func_02006492();
+ Call4(Func_0200645a, 0x1050000, -1, 0x1d20000, 0);
+ Func_02006286();
+ Func_0200621c(1);
+ Func_020064a0();
+ Func_020064b4();
+ Func_0200635a(20);
+ Call3(Func_0200644e, 0, 0x3000, 0);
+ Call3(Func_0200645a, 1, 0xb000, 20);
+ Func_0200640a(0, 2);
+ Func_0200641a(1, 2);
+ Call3(Func_020063c0, 0, 0x8000, 0x4000);
+ Call3(Func_020063ce, 1, 0x8000, 0x4000);
+ Call3(Func_02006402, 0, 244, 0x1de);
+ Call3(Func_02006418, 1, 0x104, 0x1ea);
+ Func_02006426(0);
+ Func_0200643e(0, 1);
+ Call3(Func_020064ba, 0, 0x3000, 0);
+ Call3(Func_020064c6, 1, 0xb000, 20);
+ Func_0200647e(0, 2);
+ Func_0200646e(1, 4);
+ Func_020063f4(20);
+ slot = (u16 *)Func_020063a2(1);
+ count = 0;
+ slot = (u16 *)((u8 *)slot + 0xd8);
+ for (n = 14; n >= 0; n--) {
+ item = *slot++ & 0x1ff;
+ if ((u32)(item - 220) <= 1 || item == 223) {
+ count++;
+ }
+ }
+ Value2(Func_020064ee, 1, 0);
+ if (Value2(Func_0200644e, 0, 0) == 0) {
+ base6_10b0 = (s32)Data_000010b0;
+ Call1((void (*)())Func_020064fa, base6_10b0);
+ Func_020064c2(1, 3);
+ Func_02006448(10);
+ if (count <= 2) {
+ Func_02005d08(1, 30);
+ Call3(Func_020064c0, 1, 252, 0x1e6);
+ Func_02006500(1, 2);
+ Func_0200646e(10);
+ Func_02006410((base6_10b0 + 1), 1, 0);
+ goto L_02001bdc;
+ }
+ Call1(Func_02006540, 0x10b4);
+ Func_02005d3c(1, 30);
+ } else {
+ if (count <= 2) {
+ base6_10b2 = (s32)Data_000010b2;
+ Func_02006556(base6_10b2);
+ Func_02006536(1, 3);
+ Func_02006526(1, 4);
+ Func_02005d62(1, 10);
+ Func_02006536(1, 4);
+ Func_02006556(1, 1);
+ Call3(Func_020064fc, 1, 0x20000, 0x10000);
+ rec = Value1(Func_020064fa, 0);
+ rec[90] &= 254;
+ Call3(Func_0200654c, 1, 244, 0x1de);
+ Call3(Func_0200652a, 0, 0x18000, 0xc000);
+ Func_0200658c(0, 6, 0);
+ Call3(Func_02006556, 0, 218, 0x1d7);
+ Func_0200657e(0);
+ Func_020064b8((base6_10b2 + 1), 1, 0);
+ Func_020065c0(0, 2);
+ Func_0200661a(0, 0, 30);
+ {
+ u8 value = *(volatile u8 *)&rec[90];
+
+ rec[90] = (u8)(value | 1);
+ }
+ } else {
+ Call1(Func_02006602, 0x10b5);
+ Func_020065e2(1, 3);
+ Func_020065d2(1, 4);
+ Func_02005e0e(1, 10);
+ Func_020065e2(1, 4);
+ Call3(Func_02006656, 0, 0xe000, 30);
+ }
+ }
+ L_02001bdc:;
+ Call2(Func_0200668a, 0x8000, 0x1000);
+ Func_0200668a(1, 1);
+ Func_020066a6();
+ Call3(Func_0200667a, 1, 0x8000, 30);
+ Func_02006632(1, 2);
+ Call3(Func_020065d8, 1, 0x8000, 0x4000);
+ rec = Value1(Func_020065d6, 1);
+ rec[90] &= 254;
+ Call3(Func_0200662a, 1, 0x108, 0x1e2);
+ {
+ u8 value = *(volatile u8 *)&rec[90];
+
+ rec[90] = (u8)(value | 1);
+ }
+ Call3(Func_02006640, 1, 0x116, 0x1e0);
+ *(s32 *)(rec + 48) = 0x30000;
+ *(s32 *)(rec + 52) = 0x20000;
+ Func_02006776(153);
+ *(s32 *)(rec + 40) = 0x60000;
+ Func_02006678(1, 7);
+ Call3(Func_0200665e, 1, 0x138, 0x1d6);
+ Func_0200668e(1, 1);
+ Func_0200661c(30);
+ Func_020067a2(153);
+ *(s32 *)(rec + 40) = 0x60000;
+ Func_020066a4(1, 7);
+ Call3(Func_0200668a, 1, 0x156, 0x1d6);
+ Func_020066ba(1, 1);
+ Func_02006648(30);
+ Func_020067ce(153);
+ *(s32 *)(rec + 40) = 0x60000;
+ Func_020066d0(1, 7);
+ Call3(Func_020066b6, 1, 0x178, 0x1d6);
+ Func_020066e6(1, 1);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_380_multi_stage_effect_presentation.c b/games/gs1/src/overlays/scene_primary_script/run_scene_380_multi_stage_effect_presentation.c
new file mode 100644
index 000000000..c8b11061d
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_380_multi_stage_effect_presentation.c
@@ -0,0 +1,236 @@
+#include "types.h"
+
+#define FieldScene_RunMultiStageEffectPresentation Func_020006f4
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00001076[];
+s32 Func_02004bc6();
+void Func_02004c2c();
+void Func_02005056();
+void Func_0200506c();
+void Func_0200507c();
+void Func_0200509c();
+void Func_020050a0();
+void Func_020050aa();
+void Func_020050b4();
+void Func_020050c4();
+void Func_020050ca();
+void Func_020050d2();
+void Func_020050fa();
+void Func_02005102();
+void Func_02005112();
+void Func_02005124();
+void Func_02005134();
+void Func_02005138();
+void Func_0200513e();
+void Func_02005162();
+void Func_0200516e();
+void Func_02005180();
+void Func_02005186();
+void Func_02005198();
+void Func_020051a8();
+void Func_020051b2();
+void Func_020051cc();
+void Func_020051e0();
+void Func_020051ec();
+void Func_020051f6();
+void Func_0200520c();
+void Func_0200521a();
+void Func_0200521c();
+void Func_0200521e();
+void Func_02005220();
+void Func_02005226();
+void Func_02005236();
+void Func_02005238();
+void Func_0200523c();
+void Func_02005242();
+void Func_02005248();
+void Func_02005260();
+void Func_0200526a();
+void Func_0200528a();
+void Func_0200529a();
+s32 Func_0200529c();
+void Func_020052b0();
+void Func_020052bc();
+void Func_020052be();
+void Func_020052ce();
+void Func_020052d4();
+void Func_020052e8();
+void Func_02005302();
+void Func_0200530e();
+void Func_02005324();
+void Func_02005330();
+void Func_02005338();
+void Func_0200535e();
+void Func_02005380();
+void Func_020053a0();
+void Func_020053ac();
+void Func_020053bc();
+void Func_020053ca();
+void Func_020053d6();
+void Func_020053f2();
+void Func_020053f6();
+void Func_02005408();
+void Func_0200540a();
+void Func_02005414();
+void Func_02005430();
+void Func_02005436();
+void Func_0200545e();
+void Func_02005488();
+void Func_02005494();
+void Func_020054a4();
+void Func_020054a8();
+void Func_020054b8();
+void Func_020054d4();
+void Func_020054e0();
+void Func_020054ee();
+void Func_02005502();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+static __inline__ s32 Value4(s32 (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ return f(a0, a1, a2, a3);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunMultiStageEffectPresentation(void)
+{
+ u32 i;
+ s32 rec7;
+ s32 record;
+ s32 base5_1076;
+
+ Func_020050a0();
+ Func_0200521e(141);
+ for (i = 0; i != 6; i++) {
+ Call2(Func_020051e0, 0x404a4e, 1);
+ Func_020051f6(8);
+ Func_020050b4(8);
+ Call2(Func_020051f6, 0x10000, 1);
+ Func_0200520c(8);
+ Func_020050ca(8);
+ if (i == 1) {
+ Call3(Func_02005056, 0x10000, 0x10000, 0x10000);
+ }
+ }
+ Call3(Func_0200506c, 0x10000, 0x20000, 0x10000);
+ Func_020050fa(30);
+ Func_0200507c(0, 0, 0);
+ Call2(Func_0200521c, 0x59999, 0xb333);
+ Call4(Func_02005236, 0x1d80000, -1, 0x620000, 1);
+ Func_02005242();
+ Call3(Func_020050aa, 0x10000, 0x20000, 0x10000);
+ Func_02005138(20);
+ Func_020052be(144);
+ Func_0200509c(0x200d088, 84, 4);
+ Call6(Func_020050c4, 0, 0, 1, 1, 29, 4);
+ Call6(Func_020050d2, 87, 42, 29, 6, 1, 2);
+ Func_02005180(40);
+ Func_02005102(0, 0, 0);
+ Call4(Func_020052b0, 0x1570000, -1, 0x1710000, 1);
+ Func_020052bc();
+ Call3(Func_02005124, 0x10000, 0x20000, 0x10000);
+ Func_020051b2(20);
+ Func_02005338(144);
+ Func_02005112(0x200d088, 76, 21);
+ Call6(Func_02005134, 0, 0, 1, 1, 21, 21);
+ Call6(Func_0200513e, 87, 42, 21, 23, 1, 2);
+ Func_020051ec(40);
+ Func_0200516e(0, 0, 0);
+ Call2(Func_0200530e, 0x33333, 0x6666);
+ Call4(Func_02005324, 0x1570000, -1, 0x1f10000, 1);
+ Func_02005330();
+ Call3(Func_02005198, 0x10000, 0x20000, 0x10000);
+ Func_02005226(20);
+ Func_020053ac(144);
+ Func_02005186(0x200d088, 76, 29);
+ Call6(Func_020051a8, 0, 0, 1, 1, 21, 29);
+ Call6(Func_020051b2, 87, 42, 21, 31, 1, 2);
+ Func_02005260(40);
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x202;
+ Func_020053ca();
+ Func_020053d6();
+ Call4(Func_020053a0, 0x2c80000, -1, 0x980000, 0);
+ Func_020051cc();
+ Func_02005162(1);
+ Call3(Func_0200521a, 0x20000, 0x10000, 0x10000);
+ Func_020053f6();
+ Func_0200540a();
+ Func_020052b0(40);
+ Call1(Func_02005436, 0x121);
+ Call3(Func_0200523c, -1, -1, 0xe666);
+ Func_02005248();
+ Func_020052ce(20);
+ Call6(Func_02005238, 0, 40, 43, 46, 3, 3);
+ record = 0x2c80000;
+ Func_020052e8(20);
+ rec7 = Value4(Func_02004bc6, 221, record, 0x100000, 0x900000);
+ Func_02005302(40);
+ Func_0200529a(rec7, 1);
+ base5_1076 = (s32)Data_00001076;
+ Value2(Func_0200529c, base5_1076, 1);
+ Call3(Func_02005408, 9, 0xe000, 0);
+ Call3(Func_02005414, 5, 0xe000, 20);
+ Func_02005488();
+ Func_02005494();
+ Call4(Func_0200545e, 0x1ce0000, -1, 0x15e0000, 0);
+ Func_0200528a();
+ Func_02005220(1);
+ Func_020054a4();
+ Func_020054b8();
+ Func_0200535e(40);
+ Func_020053f2(9, 4, 30);
+ Func_02005430(base5_1076 - 2);
+ Func_02004c2c(9, 20);
+ Func_020054d4();
+ Func_020054e0();
+ Call4(Func_020054a8, record, -1, 0x980000, 0);
+ Func_020052d4();
+ Func_0200526a(1);
+ Func_020054ee();
+ Func_02005502();
+ Call1(Func_02005380, 0x83d);
+ Func_020053bc();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_380_party_introduction.c b/games/gs1/src/overlays/scene_primary_script/run_scene_380_party_introduction.c
new file mode 100644
index 000000000..26ac420cb
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_380_party_introduction.c
@@ -0,0 +1,178 @@
+#include "types.h"
+
+#define FieldScene_RunPartyIntroduction Func_02000a98
+
+void Func_020055ba();
+void Func_0200557c();
+void Func_02005592();
+void Func_02005450();
+void Func_020055a8();
+void Func_02005466();
+void Func_020053f2();
+void Func_02005408();
+void Func_02005496();
+void Func_020055ae();
+void Func_020055c6();
+void Func_020055d2();
+void Func_0200543a();
+void Func_020054c8();
+void Func_0200564e();
+void Func_0200542c();
+void Func_02005454();
+void Func_02005460();
+void Func_0200550e();
+void Func_02005490();
+void Func_02005630();
+void Func_02005648();
+void Func_02005654();
+void Func_020054bc();
+void Func_0200554a();
+void Func_020056d0();
+void Func_020054aa();
+void Func_020054ce();
+void Func_020054d6();
+void Func_02005584();
+void Func_02005506();
+void Func_020056a6();
+void Func_020056be();
+void Func_020056ca();
+void Func_02005532();
+void Func_020055c0();
+void Func_02005746();
+void Func_02005520();
+void Func_02005544();
+void Func_0200554c();
+void Func_020055fa();
+void Func_02005764();
+void Func_02005770();
+void Func_02005738();
+void Func_02005564();
+void Func_020054fa();
+void Func_020055b2();
+void Func_0200578e();
+void Func_020057a2();
+void Func_020057ce();
+void Func_020055d4();
+void Func_020055e0();
+void Func_02005666();
+void Func_020055d0();
+void Func_0200567e();
+s32 Func_02004f5c();
+void Func_02005698();
+
+extern u8 *Data_03001ebc;
+
+static __inline__ void Call0(void (*f)())
+{
+ f();
+}
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call2_10(void (*f)(), s32 a1, s32 a0)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+static __inline__ s32 Value4(s32 (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ return f(a0, a1, a2, a3);
+}
+
+void Func_02000a98(void)
+{
+ s32 i;
+ s32 label;
+ s32 spawned;
+
+ Call1(Func_020055ba, 141);
+ for (i = 0; i != 6; i++) {
+ Call2_10(Func_0200557c, 1, 0x004049d2);
+ Call1(Func_02005592, 8);
+ Call1(Func_02005450, 8);
+ Call2(Func_02005592, 128 << 9, 1);
+ Call1(Func_020055a8, 8);
+ Call1(Func_02005466, 8);
+ if (i == 1) {
+ Call3(Func_020053f2, 128 << 9, 128 << 9, 128 << 9);
+ }
+ }
+ Call3(Func_02005408, 128 << 10, 128 << 9, 128 << 9);
+ Call1(Func_02005496, 30);
+ Call2(Func_020055ae, 0x26666, 0x4ccc);
+ Call4(Func_020055c6, 167 << 16, -1, 0x02110000, 1);
+ Call0(Func_020055d2);
+ Call3(Func_0200543a, 128 << 9, 128 << 10, 128 << 9);
+ Call1(Func_020054c8, 20);
+ Call1(Func_0200564e, 144);
+ label = 0x0200d088;
+ Call3(Func_0200542c, label, 65, 31);
+ Call6(Func_02005454, 0, 0, 1, 1, 10, 31);
+ Call6(Func_02005460, 87, 42, 10, 33, 1, 2);
+ Call1(Func_0200550e, 40);
+ Call3(Func_02005490, 0, 0, 0);
+ Call2(Func_02005630, 0x66666, 0xcccc);
+ Call4(Func_02005648, 0x01870000, -1, 177 << 16, 1);
+ Call0(Func_02005654);
+ Call3(Func_020054bc, 128 << 9, 128 << 10, 128 << 9);
+ Call1(Func_0200554a, 20);
+ Call1(Func_020056d0, 144);
+ Call3(Func_020054aa, label, 79, 9);
+ Call6(Func_020054ce, 0, 0, 1, 1, 24, 9);
+ Call6(Func_020054d6, 87, 42, 24, 11, 1, 2);
+ Call1(Func_02005584, 40);
+ Call3(Func_02005506, 0, 0, 0);
+ Call2(Func_020056a6, 0x26666, 0x4ccc);
+ Call4(Func_020056be, 0x02470000, -1, 193 << 16, 1);
+ Call0(Func_020056ca);
+ Call3(Func_02005532, 128 << 9, 128 << 10, 128 << 9);
+ Call1(Func_020055c0, 20);
+ Call1(Func_02005746, 144);
+ Call3(Func_02005520, label, 91, 10);
+ Call6(Func_02005544, 0, 0, 1, 1, 36, 10);
+ Call6(Func_0200554c, 87, 42, 36, 12, 1, 2);
+ Call1(Func_020055fa, 40);
+ *(u32 *)(Data_03001ebc + (224 << 1)) = (224 << 1) + 66;
+ Call0(Func_02005764);
+ Call0(Func_02005770);
+ Call4(Func_02005738, 232 << 16, -1, 0x01dd0000, 0);
+ Call0(Func_02005564);
+ Call1(Func_020054fa, 1);
+ Call3(Func_020055b2, 128 << 10, 128 << 9, 128 << 9);
+ Call0(Func_0200578e);
+ Call0(Func_020057a2);
+ Call1(Func_02005648, 40);
+ Call1(Func_020057ce, 0x121);
+ Call3(Func_020055d4, -1, -1, 0xe666);
+ Call0(Func_020055e0);
+ Call1(Func_02005666, 20);
+ Call6(Func_020055d0, 0, 40, 13, 66, 3, 3);
+ Call1(Func_0200567e, 20);
+ spawned = Value4(Func_02004f5c, 223, 232 << 16, 128 << 13, 232 << 17);
+ Call1(Func_02005698, 40);
+ Call2(Func_02005630, spawned, 1);
+ Call2(Func_02005630, 0x1077, 1);
+}
diff --git a/games/gs1/recon/en/overlays/resource_381_c_02000054.c b/games/gs1/src/overlays/scene_primary_script/run_scene_381_event_script01.c
similarity index 54%
rename from games/gs1/recon/en/overlays/resource_381_c_02000054.c
rename to games/gs1/src/overlays/scene_primary_script/run_scene_381_event_script01.c
index ff6d6bcaa..6b7882248 100644
--- a/games/gs1/recon/en/overlays/resource_381_c_02000054.c
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_381_event_script01.c
@@ -1,12 +1,10 @@
#include "types.h"
-#define FieldScene_RunTwoPhaseActorSequence Func_02000054
+#define RunEventScript01 Func_02000054
-/* AUDITED GENERATED SCENE SCRIPT for FieldScene_RunTwoPhaseActorSequence:
- * all 337 calls, branches, arguments, and reference memory effects are
- * represented in machine order. */
-
-void *Func_020010bc();
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_020010bc();
void Func_02001570();
void Func_02001ba8();
void Func_02001bb6();
@@ -41,12 +39,12 @@ void Func_0200361e();
void Func_02003620();
void Func_0200362a();
void Func_02003638();
-void *Func_0200363e();
+void Func_0200363e();
void Func_0200364a();
void Func_02003654();
void Func_02003668();
void Func_02003684();
-void *Func_0200368e();
+void Func_0200368e();
void Func_020036a2();
void Func_020036d6();
void Func_02003706();
@@ -69,11 +67,11 @@ void Func_02003770();
void Func_02003776();
void Func_0200377a();
void Func_0200377c();
-void Func_02003784();
+u8 *Func_02003784();
void Func_0200378a();
void Func_02003796();
void Func_02003798();
-void *Func_0200379c();
+s32 Func_0200379c();
void Func_020037a0();
void Func_020037a6();
void Func_020037b4();
@@ -94,7 +92,7 @@ void Func_02003894();
s32 Func_020038a0();
void Func_020038a8();
void Func_020038b4();
-void Func_020038e2();
+s32 Func_020038e2();
void Func_020038e6();
void Func_020038ec();
void Func_020038f2();
@@ -102,7 +100,7 @@ void Func_02003910();
void Func_0200391c();
void Func_02003924();
void Func_02003930();
-void Func_02003938();
+s32 Func_02003938();
void Func_0200393c();
void Func_02003942();
void Func_02003948();
@@ -128,7 +126,7 @@ void Func_02003a74();
void Func_02003a7c();
void Func_02003a80();
void Func_02003a8c();
-void Func_02003a92();
+s32 Func_02003a92();
void Func_02003a94();
void Func_02003aa2();
void Func_02003aa4();
@@ -236,7 +234,7 @@ void Func_02003f36();
void Func_02003f3a();
void Func_02003f42();
void Func_02003f4c();
-void *Func_02003f4e();
+s32 Func_02003f4e();
void Func_02003f80();
void Func_02003f90();
void Func_02003f9e();
@@ -315,64 +313,107 @@ void Func_0200438a();
void Func_0200438c();
void Func_020043a4();
-void Func_02000054(void)
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
{
- void *p2;
- void *p25;
- void *p253;
- void *p6;
- void *p67;
- s32 *sceneState;
+ f(a0, a1);
+}
- sceneState = (s32 *)(*(u32 *)0x03001ec4 + 1036);
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript01(void)
+{
+ u32 i;
+ u8 *g;
+ u8 *rec7;
+ u8 *record;
+ u8 *p7;
+
+ g = (u8 *)0x03001ec4;
+ p7 = *(u8 **)g;
Func_02003530();
- *sceneState = 0;
- p2 = Func_0200368e(141);
- Func_0200350e(65536, 65536, 65536);
- Func_020035bc(0, 15204352, 10223616);
- Func_020035ca(1, 14286848, 11272192);
- p6 = Func_0200363e(0, 45056, 0);
- Func_0200364a(1, 53248, 0);
- Func_020035ee(5, 31129600, 21757952);
- Func_020035fa(9, 32178176, 21757952);
- Func_02003606(11, 30081024, 22806528);
- Func_02003612(10, 33226752, 22806528);
- Func_0200361e(13, 30867456, 20054016);
- Func_0200362a(14, 31391744, 23724032);
+ *(s32 *)(p7 + 0x40c) = 0;
+ Func_0200368e(141);
+ Call3(Func_0200350e, 0x10000, 0x10000, 0x10000);
+ Call3(Func_020035bc, 0, 0xe80000, 0x9c0000);
+ Call3(Func_020035ca, 1, 0xda0000, 0xac0000);
+ Call3(Func_0200363e, 0, 0xb000, 0);
+ Call3(Func_0200364a, 1, 0xd000, 0);
+ Call3(Func_020035ee, 5, 0x1db0000, 0x14c0000);
+ Call3(Func_020035fa, 9, 0x1eb0000, 0x14c0000);
+ Call3(Func_02003606, 11, 0x1cb0000, 0x15c0000);
+ Call3(Func_02003612, 10, 0x1fb0000, 0x15c0000);
+ Call3(Func_0200361e, 13, 0x1d70000, 0x1320000);
+ Call3(Func_0200362a, 14, 0x1df0000, 0x16a0000);
Func_020036a2(15, 1);
- Func_020036d6(15204352, -1, 10223616, 0);
+ Call4(Func_020036d6, 0xe80000, -1, 0x9c0000, 0);
Func_0200357a();
- *(s32 *)(*(u32 *)0x03001ebc + 456) = 8;
+ *(s32 *)(*(u8 **)(g - 8) + 0x1c8) = 8;
Func_02003722();
Func_0200372e();
- Func_0200371e(32767, 0);
+ Call2(Func_0200371e, 0x7fff, 0);
Func_0200372c(4);
Func_0200360a(4);
- Func_02003734(65536, 0);
+ Call2(Func_02003734, 0x10000, 0);
Func_02003742(4);
Func_02003620(4);
- p25 = Func_020010bc();
- Func_0200374c(32767, 0);
+ Func_020010bc();
+ Call2(Func_0200374c, 0x7fff, 0);
Func_0200375a(4);
Func_02003638(16);
Func_02003796(144);
- Func_02003768(65536, 0);
+ Call2(Func_02003768, 0x10000, 0);
Func_02003776(4);
Func_02003654(4);
- Func_0200377c(32767, 0);
+ Call2(Func_0200377c, 0x7fff, 0);
Func_0200378a(4);
Func_02003668(4);
Func_020037c6(144);
- Func_02003798(65536, 0);
+ Call2(Func_02003798, 0x10000, 0);
Func_020037a6(48);
Func_02003684(48);
Func_0200370e(0, 6, 0);
Func_02003718(1, 6, 20);
Func_02002f1e(1, 20, 20);
Func_02002f28(0, 20, 40);
- Func_02003762(4301);
- Func_02003784(11, 0, 20);
- Func_02003784(10, 0);
+ Call1(Func_02003762, 0x10cd);
+ Call3((void (*)())Func_02003784, 11, 0, 20);
+ Call2((void (*)())Func_02003784, 10, 0);
Func_02002f4a(1, 20, 0);
Func_020037a0(5, 0, 20);
Func_02002f5e(0, 20, 0);
@@ -383,91 +424,92 @@ void Func_02000054(void)
Func_02003796(0, 2);
Func_020037a6(1, 2);
Func_0200371c(20);
- Func_020037f8(0, 45056, 0);
- Func_02003804(1, 53248, 30);
+ Call3(Func_020037f8, 0, 0xb000, 0);
+ Call3(Func_02003804, 1, 0xd000, 30);
Func_02002fba(1, 20, 0);
Func_020037ce(0, 2);
Func_020037de(1, 2);
Func_02003754(20);
Func_02002fda(0, 20, 20);
- Func_02003784(15);
- Func_02003722();
- Func_020037de(15, 21299200, 19791872);
- p67 = Func_0200379c(15);
- *(u8 *)((u8 *)(p67) + 85) = 5;
- *sceneState = 1;
- Func_020038e6(289);
- Func_02003764(-1, -1, 58982);
+ record = Func_02003784(15);
+ Func_02003722(record, 0);
+ Call3(Func_020037de, 15, 0x1450000, 0x12e0000);
+ record = Value1(Func_0200379c, 15);
+ record[85] = 5;
+ *(s32 *)(((s32)p7 + 0x40c)) = 1;
+ Call1(Func_020038e6, 0x121);
+ Call3(Func_02003764, -1, -1, 0xe666);
Func_02003770();
Func_020037a6(150);
Func_02003878(11, 0, 20);
Func_02003878(5, 0);
Func_0200388a(10, 0, 10);
Func_02003864(0, 1, 20);
- Func_020038a8(0, 12288, 0);
- Func_020038b4(1, 12288, 10);
- Func_02003858(5, 31129600, 21757952);
- Func_02003864(9, 32178176, 21757952);
- Func_02003870(11, 30081024, 22806528);
- Func_0200387c(10, 33226752, 22806528);
- Func_02003888(13, 30867456, 20054016);
- Func_02003894(14, 31391744, 23724032);
- Func_02003924(419430, 52428);
- Func_0200393c(21495808, -1, 19595264, 1);
+ Call3(Func_020038a8, 0, 0x3000, 0);
+ Call3(Func_020038b4, 1, 0x3000, 10);
+ Call3(Func_02003858, 5, 0x1db0000, 0x14c0000);
+ Call3(Func_02003864, 9, 0x1eb0000, 0x14c0000);
+ Call3(Func_02003870, 11, 0x1cb0000, 0x15c0000);
+ Call3(Func_0200387c, 10, 0x1fb0000, 0x15c0000);
+ Call3(Func_02003888, 13, 0x1d70000, 0x1320000);
+ Call3(Func_02003894, 14, 0x1df0000, 0x16a0000);
+ Call2(Func_02003924, 0x66666, 0xcccc);
+ Call4(Func_0200393c, 0x1480000, -1, 0x12b0000, 1);
Func_02003948();
Func_020039a6(167);
- Func_02003976(2118292, 2);
+ Call2(Func_02003976, 0x205294, 2);
Func_02003984(20);
Func_0200377a(20);
- Func_0200398c(65536, 2);
+ Call2(Func_0200398c, 0x10000, 2);
Func_0200399a(20);
Func_02003878(200);
- Func_02003938(4097, 0);
- if (Func_020038a0(0, 0) == 0) {
- Func_02003942(4310);
+ Value2(Func_02003938, 0x1001, 0);
+ if (Value2(Func_020038a0, 0, 0) == 0) {
+ Call1(Func_02003942, 0x10d6);
+ } else {
+ Call1(Func_02003998, 0x10d7);
}
- Func_02003998(4311);
- Func_020039ba(4097, 0, 80);
- Func_020039a8(4312);
+ Call3(Func_020039ba, 0x1001, 0, 80);
+ Call1(Func_020039a8, 0x10d8);
Func_020039ca(9, 0, 20);
Func_02003188(1, 20, 0);
- *sceneState = 0;
+ *(s32 *)(((s32)p7 + 0x40c)) = 0;
Func_02003a72(141);
- Func_020038f2(65536, 131072, 65536);
+ Call3(Func_020038f2, 0x10000, 0x20000, 0x10000);
Func_02003930(80);
- *sceneState = 1;
- Func_02003a92(289);
- Func_02003910(-1, -1, 58982);
+ *(s32 *)(((s32)p7 + 0x40c)) = 1;
+ Call1(Func_02003a92, 0x121);
+ Call3(Func_02003910, -1, -1, 0xe666);
Func_0200391c();
Func_020031d2(0, 20, 60);
Func_02003a28(14, 0, 30);
- Func_02003a3c(15, 40960, 40);
+ Call3(Func_02003a3c, 15, 0xa000, 40);
Func_020031f2(1, 20, 20);
Func_020031fc(0, 20, 20);
- Func_02003a52(4097, 0, 30);
- Func_02003a66(15, 4096, 40);
+ Call3(Func_02003a52, 0x1001, 0, 30);
+ Call3(Func_02003a66, 15, 0x1000, 40);
Func_0200321c(1, 20, 20);
Func_02003226(0, 20, 20);
Func_02003a7c(5, 0, 30);
Func_02001570();
- Func_020038e2(33591493, 3200);
- Func_020038ec(33592157, 3200);
+ Value2(Func_020038e2, 0x20090c5, 0xc80);
+ Call2(Func_020038ec, 0x200935d, 0xc80);
Func_020039d2(240);
Func_02003aa4(10, 0, 30);
- Func_02003a50(5, 31129600, 21757952);
- Func_02003a5c(9, 32178176, 21757952);
- Func_02003a68(11, 30081024, 22806528);
- Func_02003a74(10, 33226752, 22806528);
- Func_02003a80(13, 30867456, 20054016);
- Func_02003a8c(14, 31391744, 23724032);
- Func_02003b00(5, 32768, 0);
- Func_02003b0c(9, 32768, 0);
- Func_02003b18(11, 32768, 0);
- Func_02003b24(10, 32768, 0);
- Func_02003b30(13, 32768, 0);
- Func_02003b3c(14, 32768, 0);
- Func_02003a92(5);
- Func_02003b82();
+ Call3(Func_02003a50, 5, 0x1db0000, 0x14c0000);
+ Call3(Func_02003a5c, 9, 0x1eb0000, 0x14c0000);
+ Call3(Func_02003a68, 11, 0x1cb0000, 0x15c0000);
+ Call3(Func_02003a74, 10, 0x1fb0000, 0x15c0000);
+ Call3(Func_02003a80, 13, 0x1d70000, 0x1320000);
+ Call3(Func_02003a8c, 14, 0x1df0000, 0x16a0000);
+ Call3(Func_02003b00, 5, 0x8000, 0);
+ Call3(Func_02003b0c, 9, 0x8000, 0);
+ Call3(Func_02003b18, 11, 0x8000, 0);
+ Call3(Func_02003b24, 10, 0x8000, 0);
+ Call3(Func_02003b30, 13, 0x8000, 0);
+ Call3(Func_02003b3c, 14, 0x8000, 0);
+ record = Value1(Func_02003a92, 5);
+ Call4(Func_02003b82, (*(s16 *)(record + 10) << 16), -1, (*(s16 *)(record + 18) << 16), 1);
Func_02003b8e();
Func_02003a94(40);
Func_02003b2c(13, 2);
@@ -480,190 +522,196 @@ void Func_02000054(void)
Func_02003b70(10, 11, 40);
Func_02003b50(10, 4);
Func_02003bb2(10, 0, 10);
- Func_02003bd6(5, 256, 0);
- Func_02003bd2(5, 12288, 40);
- Func_02003bd4(16389, 0, 10);
- Func_02003be8(10, 45056, 0);
- Func_02003bf4(11, 53248, 40);
+ Call3(Func_02003bd6, 5, 0x100, 0);
+ Call3(Func_02003bd2, 5, 0x3000, 40);
+ Call3(Func_02003bd4, 0x4005, 0, 10);
+ Call3(Func_02003be8, 10, 0xb000, 0);
+ Call3(Func_02003bf4, 11, 0xd000, 40);
Func_02003bc6(10, 11, 40);
- Func_02003c18(10, 261, 40);
- Func_02003c14(10, 45056, 10);
+ Call3(Func_02003c18, 10, 0x105, 40);
+ Call3(Func_02003c14, 10, 0xb000, 10);
Func_02003c16(10, 0, 10);
- Func_02003c2a(10, 32768, 10);
+ Call3(Func_02003c2a, 10, 0x8000, 10);
Func_02003bf2(11, 2);
Func_02003c34(11, 0, 10);
Func_02003be4(10, 3);
Func_02003c46(10, 0, 40);
- Func_02003c5a(14, 45056, 60);
+ Call3(Func_02003c5a, 14, 0xb000, 60);
Func_02003c0a(14, 3);
Func_02003c64(14, 0, 10);
- Func_02003c78(13, 12288, 0);
- Func_02003c84(5, 12288, 0);
- Func_02003c90(9, 20480, 0);
- Func_02003c9c(11, 12288, 0);
- Func_02003ca8(10, 20480, 20);
- Func_02003cb4(14, 53248, 20);
+ Call3(Func_02003c78, 13, 0x3000, 0);
+ Call3(Func_02003c84, 5, 0x3000, 0);
+ Call3(Func_02003c90, 9, 0x5000, 0);
+ Call3(Func_02003c9c, 11, 0x3000, 0);
+ Call3(Func_02003ca8, 10, 0x5000, 20);
+ Call3(Func_02003cb4, 14, 0xd000, 20);
Func_02003c64(14, 4);
Func_02003cbe(14, 0, 10);
- Func_02003ce0(13, 259, 0);
- Func_02003c3e(13, 65536, 32768);
- Func_02003c72(13, 471, 314);
+ Call3(Func_02003ce0, 13, 0x103, 0);
+ Call3(Func_02003c3e, 13, 0x10000, 0x8000);
+ Call3(Func_02003c72, 13, 0x1d7, 0x13a);
Func_02003caa(13, 3);
Func_02003cf4(13, 0, 10);
- Func_02003d08(14, 45056, 10);
+ Call3(Func_02003d08, 14, 0xb000, 10);
Func_02003cb0(14, 4);
Func_02003d12(14, 0, 10);
Func_02003cda(13, 3);
Func_02003d24(13, 0, 10);
Func_02003cf4(9, 2);
- Func_02003d36(16393, 0, 10);
- Func_02003d4a(10, 45056, 20);
+ Call3(Func_02003d36, 0x4009, 0, 10);
+ Call3(Func_02003d4a, 10, 0xb000, 20);
Func_02003d4c(10, 0, 30);
Func_02003d5e(11, 0, 20);
Func_02003d26(11, 2);
Func_02003c9c(30);
Func_02003d1c(11, 3);
Func_02003caa(30);
- Func_02003d86(11, 53248, 30);
+ Call3(Func_02003d86, 11, 0xd000, 30);
Func_02003d36(11, 4);
Func_02003cc4(10);
Func_02003d96(11, 0, 10);
- Func_02003daa(13, 20480, 20);
+ Call3(Func_02003daa, 13, 0x5000, 20);
Func_02003dc0(13, 2);
Func_02003d36(20);
Func_02003dd8(10, 11, 0);
Func_02003d46(30);
Func_02003dbe(10, 3);
Func_02003dce(11, 3);
- Func_02003e32(11, 53248, 0);
- Func_02003e3e(10, 45056, 0);
+ Call3(Func_02003e32, 11, 0xd000, 0);
+ Call3(Func_02003e3e, 10, 0xb000, 0);
Func_02003d74(40);
Func_02003e0c(13, 1);
Func_02003d82(30);
- Func_02003e5e(13, 32768, 0);
+ Call3(Func_02003e5e, 13, 0x8000, 0);
Func_02003d94(40);
- Func_02003e80(13, 258, 0);
+ Call3(Func_02003e80, 13, 0x102, 0);
Func_02003da6(60);
- Func_02003e82(14, 45056, 0);
+ Call3(Func_02003e82, 14, 0xb000, 0);
Func_02003db8(30);
Func_02003e38(14, 4);
- Func_02003e92(8206, 0, 30);
- Func_02003ea6(9, 45056, 0);
- Func_02003eb2(5, 45056, 0);
- Func_02003ebe(13, 12288, 20);
- Func_02003eda(5, 258, 40);
- Func_02003ecc(8197, 0, 40);
- Func_02003eee(13, 261, 60);
+ Call3(Func_02003e92, 0x200e, 0, 30);
+ Call3(Func_02003ea6, 9, 0xb000, 0);
+ Call3(Func_02003eb2, 5, 0xb000, 0);
+ Call3(Func_02003ebe, 13, 0x3000, 20);
+ Call3(Func_02003eda, 5, 0x102, 40);
+ Call3(Func_02003ecc, 0x2005, 0, 40);
+ Call3(Func_02003eee, 13, 0x105, 60);
Func_02003e8e(13, 3);
- Func_02003f00(10, 257, 0);
- Func_02003f0a(11, 257, 60);
+ Call3(Func_02003f00, 10, 0x101, 0);
+ Call3(Func_02003f0a, 11, 0x101, 60);
Func_02003ec2(14, 2);
Func_02003f04(14, 0, 60);
Func_02003ebc(13, 3);
Func_02003e4a(40);
- Func_02003f36(5, 258, 0);
- Func_02003f42(9, 258, 40);
+ Call3(Func_02003f36, 5, 0x102, 0);
+ Call3(Func_02003f42, 9, 0x102, 40);
Func_02003f04(10, 11, 20);
Func_02003ee4(10, 3);
Func_02003ef4(11, 3);
Func_02003e82(20);
- Func_02003ebc(10, 39321, 19660);
- Func_02003ec6(11, 39321, 19660);
- Func_02003ef2(11, 475, 348);
- Func_02003efe(10, 491, 348);
+ Call3(Func_02003ebc, 10, 0x9999, 0x4ccc);
+ Call3(Func_02003ec6, 11, 0x9999, 0x4ccc);
+ Call3(Func_02003ef2, 11, 0x1db, 0x15c);
+ Call3(Func_02003efe, 10, 0x1eb, 0x15c);
Func_02003f14(11);
Func_02003f1a(10);
Func_02003f32(11, 1);
Func_02003f3a(10, 1);
- Func_02003fa6(11, 53248, 0);
- Func_02003fb2(10, 45056, 0);
- Func_02003fbe(13, 12288, 10);
- Func_02003fd8(11, 259, 0);
+ Call3(Func_02003fa6, 11, 0xd000, 0);
+ Call3(Func_02003fb2, 10, 0xb000, 0);
+ Call3(Func_02003fbe, 13, 0x3000, 10);
+ Call3(Func_02003fd8, 11, 0x103, 0);
Func_02003f90(11, 2);
- Func_02003fc8(8203, 0);
- Func_02003f42(11, 104857, 52428);
- Func_02003f4c(5, 78643, 39321);
- Func_02003f80(11, 475, 338);
- p253 = Func_02003f4e(11);
- *(u8 *)((u8 *)(p253) + 90) &= 0xfe;
- Func_02003fa0(11, 475, 348);
+ Call2(Func_02003fc8, 0x200b, 0);
+ Call3(Func_02003f42, 11, 0x19999, 0xcccc);
+ Call3(Func_02003f4c, 5, 0x13333, 0x9999);
+ Call3(Func_02003f80, 11, 0x1db, 0x152);
+ record = (u8 *)Value1(Func_02003f4e, 11);
+ rec7 = record;
+ rec7 += 90;
+ *rec7 &= 254;
+ Call3(Func_02003fa0, 11, 0x1db, 0x15c);
Func_02003fe0(5, 1);
Func_02003fda(5, 4, 0);
- Func_02003fbe(5, 459, 316);
- Func_02003fa4(5, 32768, 16384);
- Func_0200405e(13, 259, 0);
+ Call3(Func_02003fbe, 5, 0x1cb, 0x13c);
+ Call3(Func_02003fa4, 5, 0x8000, 0x4000);
+ Call3(Func_0200405e, 13, 0x103, 0);
Func_0200400e(13, 3);
Func_02004058(13, 0, 30);
Func_02004028(11, 1);
Func_02003f9e(20);
- *(u8 *)((u8 *)(p253) + 90) |= 0x1;
- Func_02003fe4(11, 65536, 32768);
- Func_02004018(11, 475, 332);
- Func_0200409c(11, 45056, 20);
- Func_02004094(8203, 0);
- Func_020040b0(10, 45056, 0);
+ {
+ u8 value = *(volatile u8 *)rec7;
+
+ *rec7 = (u8)(value | 1);
+ }
+ Call3(Func_02003fe4, 11, 0x10000, 0x8000);
+ Call3(Func_02004018, 11, 0x1db, 0x14c);
+ Call3(Func_0200409c, 11, 0xb000, 20);
+ Call2(Func_02004094, 0x200b, 0);
+ Call3(Func_020040b0, 10, 0xb000, 0);
Func_02004070(10, 2);
Func_020040ba(10, 0, 20);
- Func_020040de(11, 258, 20);
- Func_020040da(5, 12288, 0);
- Func_020040e6(11, 12288, 20);
+ Call3(Func_020040de, 11, 0x102, 20);
+ Call3(Func_020040da, 5, 0x3000, 0);
+ Call3(Func_020040e6, 11, 0x3000, 20);
Func_02004096(10, 4);
Func_0200409e(11, 3);
- Func_02004102(11, 45056, 20);
+ Call3(Func_02004102, 11, 0xb000, 20);
Func_020040b2(11, 3);
Func_020040ba(13, 3);
Func_02004048(20);
- Func_020040a6(5, 432, 316);
- Func_020040ba(13, 422, 311);
+ Call3(Func_020040a6, 5, 0x1b0, 0x13c);
+ Call3(Func_020040ba, 13, 0x1a6, 0x137);
Func_020040da(5, 1);
- Func_02004146(5, 12288, 0);
- Func_02004152(13, 12288, 20);
+ Call3(Func_02004146, 5, 0x3000, 0);
+ Call3(Func_02004152, 13, 0x3000, 20);
Func_0200411a(10, 2);
- Func_02004166(10, 53248, 20);
- Func_02004168(4106, 0, 40);
+ Call3(Func_02004166, 10, 0xd000, 20);
+ Call3(Func_02004168, 0x100a, 0, 40);
Func_02004138(9, 2);
Func_020040ae(20);
- Func_0200418a(9, 45056, 30);
- Func_020040f8(9, 32768, 16384);
- Func_0200412c(9, 491, 296);
- Func_020041b0(9, 20480, 40);
- Func_0200411e(10, 65536, 32768);
- Func_0200412c(11, 65536, 32768);
- Func_0200413a(13, 65536, 32768);
- Func_02004148(14, 65536, 32768);
- Func_0200417c(10, 471, 308);
- Func_02004200(10, 20480, 0);
- Func_02004194(11, 455, 308);
- Func_02004218(11, 12288, 0);
- Func_020041ac(14, 487, 308);
- Func_02004230(10, 49152, 0);
- Func_0200423c(11, 53248, 0);
- Func_02004248(14, 45056, 0);
- Func_02004254(5, 53248, 0);
- Func_02004260(13, 53248, 0);
- Func_0200428c(32768, 4096);
- Func_020042a6(30932992, -1, 19660800, 1);
+ Call3(Func_0200418a, 9, 0xb000, 30);
+ Call3(Func_020040f8, 9, 0x8000, 0x4000);
+ Call3(Func_0200412c, 9, 0x1eb, 0x128);
+ Call3(Func_020041b0, 9, 0x5000, 40);
+ Call3(Func_0200411e, 10, 0x10000, 0x8000);
+ Call3(Func_0200412c, 11, 0x10000, 0x8000);
+ Call3(Func_0200413a, 13, 0x10000, 0x8000);
+ Call3(Func_02004148, 14, 0x10000, 0x8000);
+ Call3(Func_0200417c, 10, 0x1d7, 0x134);
+ Call3(Func_02004200, 10, 0x5000, 0);
+ Call3(Func_02004194, 11, 0x1c7, 0x134);
+ Call3(Func_02004218, 11, 0x3000, 0);
+ Call3(Func_020041ac, 14, 0x1e7, 0x134);
+ Call3(Func_02004230, 10, 0xc000, 0);
+ Call3(Func_0200423c, 11, 0xd000, 0);
+ Call3(Func_02004248, 14, 0xb000, 0);
+ Call3(Func_02004254, 5, 0xd000, 0);
+ Call3(Func_02004260, 13, 0xd000, 0);
+ Call2(Func_0200428c, 0x8000, 0x1000);
+ Call4(Func_020042a6, 0x1d80000, -1, 0x12c0000, 1);
Func_020042b2();
Func_02004206(40);
- Func_02004204(582);
- Func_0200424a(10, 32768, 16384);
- Func_02004258(11, 32768, 16384);
- Func_02004266(14, 32768, 16384);
+ Call1(Func_02004204, 0x246);
+ Call3(Func_0200424a, 10, 0x8000, 0x4000);
+ Call3(Func_02004258, 11, 0x8000, 0x4000);
+ Call3(Func_02004266, 14, 0x8000, 0x4000);
Func_020042b6(10, 3);
Func_02001ba8(10);
Func_020042dc(9, 2);
Func_02001bb6(9);
Func_020042d2(11, 3);
Func_02001bc4(11);
- Func_0200433c(5, 36864, 40);
+ Call3(Func_0200433c, 5, 0x9000, 40);
Func_020042fc(5, 2);
- Func_02004346();
- Func_0200435a(13, 12288, 0);
- Func_02004366(5, 45056, 30);
- Func_02004372(13, 57344, 0);
+ Call3(Func_02004346, 0x2005, 0, 40);
+ Call3(Func_0200435a, 13, 0x3000, 0);
+ Call3(Func_02004366, 5, 0xb000, 30);
+ Call3(Func_02004372, 13, 0xe000, 0);
Func_02001c0c(5);
Func_02001c12(13);
- Func_0200438a(14, 28672, 40);
+ Call3(Func_0200438a, 14, 0x7000, 40);
Func_0200438c(14, 0, 30);
Func_02004344(14, 4);
Func_020042d2(20);
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_381_supplemental_sequence_one.c b/games/gs1/src/overlays/scene_primary_script/run_scene_381_supplemental_sequence_one.c
new file mode 100644
index 000000000..c3f8939b3
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_381_supplemental_sequence_one.c
@@ -0,0 +1,194 @@
+#include "types.h"
+
+#define FieldScene_RunSupplementalSequenceOne Func_020029a4
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02005e66();
+void Func_02005e92();
+void Func_02005ea4();
+s32 Func_02005ea6();
+void Func_02005eae();
+void Func_02005eb8();
+void Func_02005ec0();
+void Func_02005ec2();
+void Func_02005ecc();
+void Func_02005ed6();
+void Func_02005ee0();
+void Func_02005eea();
+void Func_02005ef4();
+void Func_02005efe();
+void Func_02005f08();
+void Func_02005f30();
+void Func_02005f38();
+void Func_02005f4e();
+void Func_02005fcc();
+void Func_02005fd6();
+void Func_02005fe4();
+void Func_0200601a();
+void Func_02006048();
+void Func_02006054();
+void Func_020060e4();
+void Func_02006150();
+void Func_0200615e();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value4(s32 (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ return f(a0, a1, a2, a3);
+}
+
+extern s32 Data_0200b684[];
+extern s32 Data_0200bb10[];
+extern s32 Data_0200bb40[];
+extern u8 Data_0200aba1[];
+
+struct Inner {
+ u8 _0[9];
+ u8 a : 2;
+ u8 b : 2;
+ u8 c : 4;
+ u8 _10[28];
+ u8 f38;
+};
+
+struct Record {
+ u8 _0[80];
+ struct Inner *inner;
+ u8 _84;
+ u8 f85;
+};
+
+void FieldScene_RunSupplementalSequenceOne(u32 a0)
+{
+ u32 i;
+ s32 none;
+ s32 one;
+ s32 *p;
+ s32 *pairs;
+ u8 *flags;
+ struct Record *record;
+ s32 v1;
+ s32 v2;
+ s32 v3;
+
+ for (i = 0; i <= 15; i++) {
+ Func_02005eae(i + 16);
+ }
+ switch (a0) {
+ case 0:
+ Call2(Func_02005fcc, 0x4039d2, 1);
+ break;
+ case 1:
+ Call2(Func_02005fcc, 0x4049d2, 1);
+ break;
+ case 2:
+ Call2(Func_02005fcc, 0x404a4e, 1);
+ break;
+ case 3:
+ Call2(Func_02005fd6, 0x403a52, 1);
+ break;
+ }
+ Func_02005fe4(60);
+ Func_0200601a(214);
+ p = Data_0200b684;
+ i = 0;
+ none = i;
+ pairs = p;
+ for (; i <= 9; i++) {
+ v1 = pairs[0];
+ v3 = 0;
+ v2 = pairs[1];
+ switch (a0) {
+ case 0:
+ v1 += 0xe80000;
+ v3 = 0x900000;
+ break;
+ case 1:
+ v1 += 0xe80000;
+ v3 = 0x1d00000;
+ break;
+ case 2:
+ v1 += 0x02c70000;
+ v3 = 0x900000;
+ break;
+ case 3:
+ v1 += 0x02c70000;
+ v3 = 0x1d00000;
+ break;
+ }
+ Data_0200bb40[i] = none;
+ record = (struct Record *)Value4(Func_02005ea6, 0x11c, v1, v2, v3);
+ Data_0200bb10[i] = (s32)record;
+ record->f85 = none;
+ record->inner->f38 = none;
+ record->inner->b = 1;
+ Func_02005ec0(record, 6);
+ Func_02005e66(6);
+ pairs += 2;
+ }
+ if (a0 == 0) {
+ Call3(Func_02006048, 0, 0x100, 0);
+ Call3(Func_02006054, 1, 0x100, 0);
+ }
+ Func_02005e92(20);
+ Call2(Func_02005ea4, (s32)Data_0200aba1, 0xc80);
+ one = 1;
+ Func_020060e4(246);
+ Data_0200bb40[0] = one;
+ Func_02005eae(6);
+ Data_0200bb40[1] = one;
+ Func_02005eb8(6);
+ Data_0200bb40[2] = one;
+ Func_02005ec2(6);
+ Data_0200bb40[3] = one;
+ Func_02005ecc(6);
+ Data_0200bb40[4] = one;
+ Func_02005ed6(6);
+ Data_0200bb40[5] = one;
+ Func_02005ee0(6);
+ Data_0200bb40[6] = one;
+ Func_02005eea(6);
+ Data_0200bb40[7] = one;
+ Func_02005ef4(6);
+ Data_0200bb40[8] = one;
+ Func_02005efe(6);
+ Data_0200bb40[9] = one;
+ Func_02005f08(6);
+ for (;;) {
+ flags = (u8 *)Data_0200bb40;
+ for (i = 0; i <= 9; i++) {
+ if (*(s32 *)(flags + (i << 2)) != 0) {
+ i = 222 << 2;
+ break;
+ }
+ }
+ if (i != (222 << 2)) {
+ break;
+ }
+ Func_02005f30(1);
+ }
+ Func_02005f38(40);
+ Call1(Func_02005f4e, (s32)Data_0200aba1);
+ Call2(Func_02006150, 0x10000, 1);
+ Func_0200615e(40);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_383_02002db4.c b/games/gs1/src/overlays/scene_primary_script/run_scene_383_02002db4.c
new file mode 100644
index 000000000..0907344e1
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_383_02002db4.c
@@ -0,0 +1,126 @@
+#include "types.h"
+
+#define FieldScene_RunScene383_02002db4 Func_02002db4
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00000015[];
+extern u8 Data_02000240[];
+void Func_02007458();
+void Func_020074a2();
+void Func_020074f2();
+void Func_0200750e();
+void Func_0200751c();
+void Func_02007538();
+void Func_0200756c();
+void Func_02007ae8();
+void Func_02007b3a();
+void Func_02007b8e();
+void Func_02007b9c();
+void Func_02007baa();
+void Func_02007bce();
+void Func_02007bdc();
+void Func_02007be2();
+void Func_02007bea();
+void Func_02007bf8();
+void Func_02007c16();
+void Func_02007c22();
+void Func_02007c2e();
+void Func_02007c5e();
+void Func_02007c62();
+void Func_02007c64();
+void Func_02007c70();
+void Func_02007c7c();
+void Func_02007c9c();
+void Func_02007caa();
+void Func_02007cac();
+void Func_02007cb2();
+void Func_02007cba();
+void Func_02007cc6();
+void Func_02007cce();
+void Func_02007ce8();
+void Func_02007d34();
+void Func_02007d40();
+void Func_02007d4c();
+void Func_02007d5c();
+void Func_02007dc6();
+void Func_02007dd6();
+void Func_02007dd8();
+extern u8 Data_03001ebc[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene383_02002db4(void)
+{
+ u32 i;
+ s32 record;
+ s16 base3_2000240;
+
+ Call3(Func_02007b8e, 10, 0x3180000, 0x1a00000);
+ Call3(Func_02007b9c, 11, 0x3200000, 0x1900000);
+ Call3(Func_02007baa, 12, 0x3080000, 0x1a00000);
+ Call3(Func_02007c16, 10, 0x3000, 0);
+ Call3(Func_02007c22, 11, 0x3000, 0);
+ Call3(Func_02007c2e, 12, 0x3000, 0);
+ Call3(Func_02007bdc, 0, 0x3180000, 0x1b80000);
+ Call3(Func_02007bea, 1, 0x3280000, 0x1b00000);
+ Call3(Func_02007bf8, 2, 0x3180000, 0x1c80000);
+ Call3(Func_02007c64, 0, 0xc000, 0);
+ Call3(Func_02007c70, 1, 0xb000, 0);
+ Call3(Func_02007c7c, 2, 0xb000, 0);
+ Func_02007c5e(8, 10, 0);
+ *(s32 *)(*(u8 **)Data_03001ebc + 0x1c0) = 0x209;
+ Func_02007cba(0, 0);
+ Func_02007cce();
+ Func_02007b3a();
+ Func_02007ae8(1);
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c8)) = 32;
+ Func_02007458();
+ Func_02007bce(60);
+ Call1(Func_02007cac, 0x12e1);
+ Func_02007c9c(11, 1);
+ Func_02007be2(20);
+ Func_020074a2(11, 30);
+ Func_02007cb2(12, 1);
+ Func_02007bf8(20);
+ Func_02007ce8(12, 0);
+ Func_020074f2(10, 11, 30);
+ Func_02007caa(10, 3);
+ Func_0200751c(11, 3, 30);
+ Func_0200750e(10, 12, 30);
+ Func_02007cc6(10, 3);
+ Func_02007538(12, 3, 40);
+ Call3(Func_02007d34, 10, 0x3000, 0);
+ Call3(Func_02007d40, 11, 0x3000, 0);
+ Call3(Func_02007d4c, 12, 0x3000, 0);
+ Func_02007c62(20);
+ Func_0200756c(10, 4, 20);
+ Func_02007d5c(10, 0);
+ *(s32 *)(*(u8 **)Data_03001ebc + 0x1c0) = 0x200;
+ Func_02007dc6((s32)Data_00000015, 17);
+ Func_02007dd6((s32)Data_00000015, 16);
+ base3_2000240 = (s32)Data_02000240;
+ *(u8 *)((base3_2000240 + 0x22b)) = 3;
+ Func_02007dd8(12, 5);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_383_conditional_actor_sequence.c b/games/gs1/src/overlays/scene_primary_script/run_scene_383_conditional_actor_sequence.c
new file mode 100644
index 000000000..4437d4ae1
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_383_conditional_actor_sequence.c
@@ -0,0 +1,264 @@
+#include "types.h"
+
+#define FieldScene_RunConditionalActorSequence Func_020021c8
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_0200689a();
+void Func_02006900();
+void Func_02006912();
+void Func_02006948();
+void Func_0200694c();
+void Func_02006952();
+void Func_02006972();
+void Func_02006982();
+void Func_020069b2();
+void Func_020069ba();
+void Func_02006a00();
+void Func_02006a26();
+void Func_02006a28();
+void Func_02006a48();
+void Func_02006a4a();
+void Func_02006a6a();
+void Func_02006a74();
+void Func_02006a92();
+void Func_02006aa4();
+void Func_02006aae();
+void Func_02006ab4();
+void Func_02006ab6();
+void Func_02006ad0();
+void Func_02006ad6();
+void Func_02006ade();
+void Func_02006b24();
+void Func_02006b28();
+void Func_02006b4e();
+u8 *Func_02006f56();
+void Func_02006f86();
+void Func_02006f88();
+void Func_02006f90();
+void Func_02006f9a();
+s32 Func_02006fc2();
+s32 Func_02006fda();
+s32 Func_02006fec();
+void Func_02006ff0();
+void Func_02006ffe();
+void Func_02007006();
+void Func_02007008();
+void Func_0200700c();
+void Func_0200702c();
+void Func_0200703a();
+void Func_0200705c();
+void Func_02007068();
+void Func_02007076();
+void Func_02007090();
+void Func_020070a8();
+void Func_020070c0();
+void Func_020070c8();
+void Func_020070d0();
+void Func_020070ee();
+void Func_020070f4();
+void Func_02007108();
+void Func_02007118();
+void Func_0200711a();
+s32 Func_0200711c();
+void Func_0200712c();
+void Func_02007136();
+s32 Func_02007148();
+void Func_02007158();
+void Func_02007168();
+void Func_02007172();
+void Func_02007182();
+s32 Func_02007186();
+void Func_02007188();
+void Func_02007196();
+void Func_020071a2();
+void Func_020071aa();
+void Func_020071ae();
+s32 Func_020071ba();
+s32 Func_020071e8();
+void Func_020071f4();
+void Func_0200720e();
+s32 Func_02007226();
+void Func_02007242();
+void Func_02007262();
+void Func_020072a4();
+void Func_020072bc();
+void Func_020072ca();
+void Func_020072d6();
+void Func_020072de();
+void Func_02007300();
+void Func_02007302();
+void Func_02007308();
+void Func_0200730a();
+void Func_0200732c();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call0(void (*f)())
+{
+ f();
+}
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+/* Actor record +9 bits 2..3: mode = 1 emits movs #13 / negs, not a folded 243. */
+struct Rec9 {
+ u8 pad00[9];
+ u8 lo : 2;
+ u8 mode : 2;
+ u8 hi : 4;
+};
+
+struct Work80 {
+ u8 pad00[80];
+ struct Rec9 *rec;
+};
+
+void FieldScene_RunConditionalActorSequence(void)
+{
+ u32 i;
+ u8 *record;
+
+ Func_020070d0();
+ Func_02007008(0, 1);
+ {
+ u8 *record = Func_02006f56(0);
+ u8 value = *(volatile u8 *)&record[35];
+
+ record[35] = (u8)(value | 1);
+ }
+ Call4(Func_0200705c, 0x200000, 0x2400000, 0x1900000, 0x3a80000);
+ Call3(Func_02006f86, 0, 0xcccc, 0x6666);
+ Call3(Func_02006f90, 1, 0xcccc, 0x6666);
+ Call3(Func_02006f9a, 2, 0xcccc, 0x6666);
+ Call3(Func_02006ff0, 0, 0xf80000, 0x2d80000);
+ Call3(Func_02006ffe, 2, 0x1080000, 0x2e80000);
+ Call3(Func_0200700c, 1, 0xe80000, 0x2e80000);
+ record = (u8 *)Value1(Func_02006fc2, 0);
+ ((struct Work80 *)record)->rec->mode = 1;
+ record = (u8 *)Value1(Func_02006fda, 1);
+ ((struct Work80 *)record)->rec->mode = 1;
+ record = (u8 *)Value1(Func_02006fec, 2);
+ ((struct Work80 *)record)->rec->mode = 1;
+ Func_02007090(0, 2, 0);
+ Func_0200689a(1, 2, 30);
+ Call3(Func_02007068, 24, 0x680000, 0x2b80000);
+ Call3(Func_02007076, 25, 0x780000, 0x2b80000);
+ Func_020070c0(24, 25, 0);
+ Func_02007108(0, 0);
+ Call0((void (*)())Func_0200711c);
+ Func_02006f88();
+ Func_02007006(30);
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c8)) = 24;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x201;
+ Func_02007182();
+ Func_02007196();
+ Func_0200702c(40);
+ Func_020070f4(1, 1);
+ Func_0200703a(10);
+ Call1(Func_02007118, 0x12ae);
+ Func_02006900(1, 20);
+ Func_02006952(2, 3, 20);
+ Func_02006912(2, 20);
+ Func_0200694c(0, 1, 50);
+ Func_02007136(0, 2, 0);
+ Func_02006948(1, 2, 20);
+ Func_02006982(2, 4, 20);
+ Func_02007172(2, 0);
+ Call3(Func_02007196, 0, 0x102, 0);
+ Call3(Func_020071a2, 1, 0x102, 0);
+ Func_020070a8(60);
+ Func_020069b2(2, 3, 20);
+ Func_02006972(2, 30);
+ Func_02007182(1, 1);
+ Func_020070c8(20);
+ Func_020069ba(0, 1, 20);
+ Value2(Func_020071ba, 1, 0);
+ i = 0;
+ if (Value2(Func_0200711c, 0, 0) != 0) {
+ Func_020070ee(20);
+ Func_020071ae(2, 2);
+ Func_02006a00(1, 4, 30);
+ Value2(Func_020071e8, 1, 0);
+ if (Value2(Func_02007148, 0, 0) != 0) {
+ Func_0200711a(20);
+ Call3(Func_02007226, 2, 0x102, 0);
+ Func_0200712c(60);
+ Func_020071f4(2, 2);
+ Func_02006a26(0, 2, 20);
+ Value2(Func_02007226, 2, 0);
+ if (Value2(Func_02007186, 2, 0) != 0) {
+ Func_02007158(20);
+ Call3(Func_02007262, 2, 0x105, 0);
+ Func_02007168(60);
+ Func_02006a28(2, 20);
+ Func_02006a4a(1, 2, 10);
+ Func_02007242(1, 1);
+ Func_02007188(10);
+ Func_02006a48(1, 10);
+ Func_02006a6a(2, 1, 20);
+ Call3(Func_020072a4, 2, 0x101, 0);
+ Func_020071aa(60);
+ Func_02006ab4(2, 4, 20);
+ Func_02006a74(1, 10);
+ Func_02006aae(1, 0, 20);
+ Func_02006ad0(1, 3, 20);
+ i = 1;
+ Func_02006a92(1, 20);
+ }
+ }
+ }
+ if (i == 0) {
+ Call1(Func_020072bc, 0x12bc);
+ Func_02006aa4(1, 20);
+ Func_02006ade(1, 0, 20);
+ Func_02006ab6(1, 20);
+ }
+ Call3(Func_02007308, 0, 0x105, 0);
+ Func_0200720e(60);
+ Func_020072d6(1, 1);
+ Func_02006ad6(1, 10);
+ Func_02006b28(1, 3, 10);
+ Func_02007302(1, 2, 0);
+ Func_02006b24(0, 2, 10);
+ Func_0200732c(1, 0);
+ Func_02006b4e(2, 3, 10);
+ Call3(Func_020072ca, 2, 248, 0x2d8);
+ Call3(Func_020072de, 1, 248, 0x2d8);
+ Func_02007300(1, 0, 0);
+ Func_0200730a(2, 0, 0);
+}
diff --git a/games/gs1/recon/en/overlays/resource_383_c_02000de4.c b/games/gs1/src/overlays/scene_primary_script/run_scene_383_main_sequence.c
similarity index 66%
rename from games/gs1/recon/en/overlays/resource_383_c_02000de4.c
rename to games/gs1/src/overlays/scene_primary_script/run_scene_383_main_sequence.c
index e24ab6818..694f19200 100644
--- a/games/gs1/recon/en/overlays/resource_383_c_02000de4.c
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_383_main_sequence.c
@@ -2,10 +2,9 @@
#define FieldScene_RunMainSequence Func_02000de4
-/* AUDITED GENERATED SCENE SCRIPT for FieldScene_RunMainSequence:
- * all 151 calls, arguments, and reference memory effects are represented
- * in machine order. */
-
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0000125f[];
void Func_02005416();
void Func_0200542e();
void Func_020054a8();
@@ -45,20 +44,20 @@ void Func_02005908();
void Func_0200592a();
void Func_0200593c();
void Func_0200594e();
-void *Func_02005b2a();
+void Func_02005b2a();
void Func_02005b46();
-void *Func_02005b56();
+void Func_02005b56();
void Func_02005b6e();
-void *Func_02005b70();
+s32 Func_02005b70();
void Func_02005b92();
void Func_02005bc4();
void Func_02005bda();
-void *Func_02005be4();
+s32 Func_02005be4();
void Func_02005bf0();
void Func_02005bfc();
-void *Func_02005c0a();
+u8 *Func_02005c0a();
void Func_02005c1e();
-void *Func_02005c28();
+void Func_02005c28();
void Func_02005c2c();
void Func_02005c36();
void Func_02005c4c();
@@ -82,13 +81,13 @@ void Func_02005d26();
void Func_02005d48();
void Func_02005d58();
void Func_02005d5c();
-void *Func_02005d6c();
+s32 Func_02005d6c();
void Func_02005d70();
void Func_02005d78();
void Func_02005d7a();
void Func_02005d82();
-void Func_02005d86();
-void *Func_02005d8e();
+s32 Func_02005d86();
+u8 *Func_02005d8e();
void Func_02005d98();
void Func_02005dba();
void Func_02005dcc();
@@ -150,47 +149,78 @@ void Func_02006128();
void Func_02006138();
void Func_02006158();
-void Func_02000de4(void)
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunMainSequence(void)
{
- void *p1;
- void *p16;
- void *p19;
- void *p2;
- void *p5;
- void *p59;
- void *p6;
- void *p62;
+ u32 i;
+ u8 *record;
+ s32 base8_125f;
- p1 = Func_02005b2a(20);
- p2 = Func_02005b70(2);
- *(u8 *)((u8 *)(p2) + 91) = 0;
- Func_02005bf0(2, 4, 0, 0);
+ Func_02005b2a(20);
+ *(u8 *)(Func_02005b70(2) + 91) = 0;
+ Func_02005bf0(2, 4, 0);
Func_02005b46(40);
- p5 = Func_02005c28(4703);
- p6 = Func_02005b56(20);
+ base8_125f = (s32)Data_0000125f;
+ Func_02005c28(base8_125f);
+ Func_02005b56(20);
Func_02005416(2, 20);
- Func_02005c68(2, 257, 0);
+ Call3(Func_02005c68, 2, 0x101, 0);
Func_02005b6e(50);
Func_0200542e(2, 30);
- Func_02005bfc(2, 376, 392);
+ Call3(Func_02005bfc, 2, 0x178, 0x188);
Func_020054a8(2, 0);
Func_02005b92(40);
Func_020054de();
Func_02005c5e(0, 1);
- p16 = Func_02005be4(0);
- *(u8 *)((u8 *)(p16) + 90) &= 0xfe;
- Func_02005c36(0, 384, 424);
+ *(u8 *)(Func_02005be4(0) + 90) &= 254;
+ Call3(Func_02005c36, 0, 0x180, 0x1a8);
Func_02005bc4(1);
- p19 = Func_02005c0a(0);
- *(u8 *)((u8 *)(p19) + 90) |= 0x1;
+ {
+ u8 *record = Func_02005c0a(0);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
Func_02005bda(30);
Func_02005cca(2, 0);
- Func_02005cf4(0, 258);
- Func_02005cfe(1, 258);
+ Call2(Func_02005cf4, 0, 0x102);
+ Call2(Func_02005cfe, 1, 0x102);
Func_02005bfc(60);
Func_02005c9c(0, 3);
Func_0200550e(1, 3, 30);
- Func_02005d18(2, 257, 0);
+ Call3(Func_02005d18, 2, 0x101, 0);
Func_02005c1e(60);
Func_02005ce6(2, 1);
Func_02005c2c(10);
@@ -202,36 +232,39 @@ void Func_02000de4(void)
Func_02005d1e(0, 2);
Func_02005c64(10);
Func_0200553e(0, 1, 40);
- Func_02005d7a(0, 258, 0);
- Func_02005d86(1, 258, 0);
+ Call3(Func_02005d7a, 0, 0x102, 0);
+ Call3(Func_02005d86, 1, 0x102, 0);
Func_02005c8c(60);
- Func_02005d98(2, 258, 0);
+ Call3(Func_02005d98, 2, 0x102, 0);
Func_02005c9e(60);
- Func_02005d86(2, 0);
+ Value2(Func_02005d86, 2, 0);
Func_02005d78(0, 2, 0);
Func_02005d82(1, 2, 0);
Func_02005cfa(0, 0);
Func_02005cc8(30);
Func_020055d2(2, 3, 10);
- Func_02005d58(2, 384, 408);
+ Call3(Func_02005d58, 2, 0x180, 0x198);
Func_02005ce6(10);
- Func_02005ca8(4708, 1);
- Func_02005dd0(4709);
+ Func_02005ca8((base8_125f + 5), 1);
+ Func_02005dd0((base8_125f + 6));
Func_02005dd2(2, 1, 0);
Func_020055dc(0, 1, 20);
- Func_02005e18(1, 258, 0);
+ Call3(Func_02005e18, 1, 0x102, 0);
Func_02005d1e(60);
Func_02005de6(1, 1);
- p59 = Func_02005d6c(1);
- *(u8 *)((u8 *)(p59) + 90) &= 0xfe;
- Func_02005dba(1, 352, 408);
+ *(u8 *)(Func_02005d6c(1) + 90) &= 254;
+ Call3(Func_02005dba, 1, 0x160, 0x198);
Func_02005d48(1);
- p62 = Func_02005d8e(1);
- *(u8 *)((u8 *)(p62) + 90) |= 0x1;
+ {
+ u8 *record = Func_02005d8e(1);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
Func_02005d5c(10);
- Func_02005dda(2, 368, 408);
+ Call3(Func_02005dda, 2, 0x170, 0x198);
Func_02005d70(20);
- Func_02005df6(0, 368, 424);
+ Call3(Func_02005df6, 0, 0x170, 0x1a8);
Func_02005e50(0, 1, 0);
Func_02005e16(2);
Func_020056b2(2, 1);
@@ -252,25 +285,25 @@ void Func_02000de4(void)
Func_02005716(0, 3, 40);
Func_02005ee8(0, 2, 0);
Func_020056fa(1, 2, 30);
- Func_02005f34(0, 257, 0);
- Func_02005f3e(1, 257, 0);
+ Call3(Func_02005f34, 0, 0x101, 0);
+ Call3(Func_02005f3e, 1, 0x101, 0);
Func_02005e44(60);
Func_0200574e(2, 3, 20);
Func_02005f3e(2, 0);
- Func_02005f60(1, 259, 0);
+ Call3(Func_02005f60, 1, 0x103, 0);
Func_02005e66(60);
Func_02005740(1, 0, 10);
Func_02005f60(1, 0);
- Func_02005f84(2, 256, 0);
+ Call3(Func_02005f84, 2, 0x100, 0);
Func_02005e8a(60);
Func_02005f7a(2, 0);
- Func_02005f9e(1, 258, 0);
+ Call3(Func_02005f9e, 1, 0x102, 0);
Func_02005ea4(60);
- Func_02005e66(4716, 1);
- Func_02005f8e(4717);
+ Func_02005e66((base8_125f + 13), 1);
+ Func_02005f8e((base8_125f + 14));
Func_02005f90(2, 0, 0);
Func_02005f92(1, 0, 0);
- Func_02005fd6(0, 258, 0);
+ Call3(Func_02005fd6, 0, 0x102, 0);
Func_02005edc(60);
Func_02005800(2, 0);
Func_020060a8();
@@ -286,7 +319,7 @@ void Func_02000de4(void)
Func_0200583c(1, 4, 10);
Func_0200580a(1, 30);
Func_02006024(2, 1, 0);
- Func_02006066(2, 257, 0);
+ Call3(Func_02006066, 2, 0x101, 0);
Func_02005f6c(30);
Func_0200585e(0, 1, 10);
Func_02006016(0, 3);
@@ -294,19 +327,19 @@ void Func_02000de4(void)
Func_0200605a(0, 2, 0);
Func_02006064(1, 2, 0);
Func_0200606e(2, 0, 0);
- Func_020060b2(2, 262, 0);
+ Call3(Func_020060b2, 2, 0x106, 0);
Func_02005fb8(60);
Func_02005878(2, 10);
Func_02006060(0, 3);
Func_020058d2(1, 3, 20);
Func_020058dc(2, 4, 20);
Func_0200589c(2, 20);
- Func_020060ee(0, 257, 0);
- Func_020060f8(1, 257, 0);
+ Call3(Func_020060ee, 0, 0x101, 0);
+ Call3(Func_020060f8, 1, 0x101, 0);
Func_02005ffe(60);
Func_02005908(2, 3, 10);
Func_020058c8(2, 30);
- Func_0200611a(0);
+ Call3(Func_0200611a, 0, 0x105, 0);
Func_02006020(60);
Func_0200592a(2, 4, 10);
Func_020058ea(2, 30);
@@ -314,7 +347,7 @@ void Func_02000de4(void)
Func_020060dc(0, 3);
Func_0200594e(1, 3, 20);
Func_02006076(2, 1);
- Func_02006138(4703);
+ Call1(Func_02006138, base8_125f + 22);
Func_02006128(2, 1);
Func_02006158(2, 0);
}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_383_select_and_configure_actor_pair.c b/games/gs1/src/overlays/scene_primary_script/run_scene_383_select_and_configure_actor_pair.c
new file mode 100644
index 000000000..78b79c068
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_383_select_and_configure_actor_pair.c
@@ -0,0 +1,212 @@
+#include "types.h"
+
+#define FieldScene_SelectAndConfigureActorPair Func_02001f50
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02004318();
+void Func_020065f0();
+void Func_0200661c();
+void Func_02006654();
+void Func_0200666a();
+void Func_0200668c();
+void Func_0200669c();
+void Func_020066ca();
+void Func_020066d6();
+void Func_0200673c();
+void Func_02006bdc();
+void Func_02006c8a();
+void Func_02006c92();
+void Func_02006c9e();
+void Func_02006d00();
+void Func_02006d4a();
+void Func_02006d52();
+void Func_02006d5a();
+void Func_02006d62();
+void Func_02006d6a();
+void Func_02006d8e();
+void Func_02006da4();
+void Func_02006daa();
+void Func_02006db6();
+void Func_02006db8();
+void Func_02006dc2();
+void Func_02006dc4();
+void Func_02006df0();
+void Func_02006df6();
+s32 Func_02006e00();
+void Func_02006e04();
+void Func_02006e0a();
+void Func_02006e1a();
+void Func_02006e20();
+void Func_02006e22();
+void Func_02006e30();
+void Func_02006e3e();
+void Func_02006e48();
+void Func_02006e5a();
+void Func_02006e64();
+void Func_02006e6c();
+s32 Func_02006e76();
+void Func_02006e86();
+void Func_02006e8c();
+s32 Func_02006e8e();
+void Func_02006e9c();
+s32 Func_02006ea0();
+void Func_02006eb4();
+void Func_02006ec4();
+void Func_02006eca();
+void Func_02006ee2();
+void Func_02006ee4();
+u8 *Func_02006eec();
+void Func_02006ef0();
+u8 *Func_02006ef8();
+void Func_02006f7e();
+void Func_02006fec();
+void Func_02006ff8();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+struct Bitf {
+ unsigned char skip[9];
+ unsigned char pad : 2;
+ unsigned char vis : 2;
+};
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_SelectAndConfigureActorPair(void)
+{
+ u8 *work;
+ s16 *step;
+ s32 n;
+ u8 *record;
+
+ work = *(u8 **)0x03001ebc;
+ Func_02006c9e();
+ Call1(Func_02006bdc, 0x200c8c9);
+ Call1(Func_02006c8a, 0x107);
+ Call1(Func_02006c92, 0x250);
+ Func_02006d4a(24, 1);
+ Func_02006d52(25, 1);
+ Func_02006d5a(2, 1);
+ Func_02006d62(0, 1);
+ Func_02006d6a(1, 1);
+ Func_02006da4(1, 2, 0);
+ Func_02006db6(0, 2, 0);
+ Func_02006db8(24, 2, 0);
+ Func_02006dc2(25, 2, 0);
+ Func_02006d00(10);
+ n = 24;
+ step = (s16 *)(work + 0x182);
+ switch (*step) {
+ case 202:
+ case 203:
+ Call1(Func_02006df6, 0x12a4);
+ Call2(Func_02006e30, 25, 0x102);
+ Func_02006df0(25, 2);
+ Func_020065f0(25, 20);
+ n = 25;
+ if (*step == 202)
+ break;
+ case 201:
+ Call1(Func_02006e20, 0x12a3);
+ Call2(Func_02006e5a, 24, 0x102);
+ Func_02006e1a(24, 2);
+ n = 24;
+ Func_0200661c(24, 20);
+ break;
+ }
+ Func_02006e04(2, 1);
+ Func_02006e3e(2, n, 0);
+ Func_02006e48(1, 2, 0);
+ Func_02006e48(1, 2);
+ Func_02006d8e(20);
+ Call1(Func_02006e6c, 0x12a5);
+ Func_02006654(1, 20);
+ Func_02006e64(2, 2);
+ Func_02006daa(20);
+ Func_0200666a(2, 20);
+ Func_020066d6(2, n);
+ Func_02006f7e();
+ Func_02006dc4(60);
+ Func_02006e8c(24, 2);
+ Func_0200668c(24, 20);
+ Func_02006e9c(25, 2);
+ Func_0200669c(25, 20);
+ Call3(Func_02006ef0, 2, 0x100, 60);
+ Func_0200673c();
+ Func_02006eb4(1, 2);
+ Func_02006ec4(0, 2);
+ Func_02006e0a(20);
+ Func_020066ca(1, 20);
+ Func_02006ee4(2, 1, 0);
+ Func_02006e22(20);
+ Func_02006eca(2, 3);
+ Func_02006e30(40);
+ record = Value1(Func_02006e76, 0);
+ ((struct Bitf *)*(s32 *)(record + 80))->vis = 1;
+ record = Value1(Func_02006e8e, 1);
+ ((struct Bitf *)*(s32 *)(record + 80))->vis = 1;
+ record = Value1(Func_02006ea0, 2);
+ ((struct Bitf *)*(s32 *)(record + 80))->vis = 1;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c8)) = 24;
+ *(s32 *)(*(u8 **)0x03001ebc + 0x1c0) = 0x201;
+ Func_02006fec();
+ Func_02006ff8();
+ Func_02004318();
+ Call6(Func_02006e48, 14, 45, 3, 1, 14, 44);
+ Call1(Func_02006e86, 0x853);
+ {
+ u8 *record = Func_02006eec(24);
+ s32 shown = 5;
+
+ *(u16 *)(record + 100) = shown;
+ }
+ {
+ u8 *record = Func_02006ef8(25);
+ s32 shown = 4;
+
+ *(u16 *)(record + 100) = shown;
+ }
+ Value2(Func_02006e00, 0x200aba1, 0xc80);
+ *(s32 *)(*(u8 **)0x03001ebc + 0x1c0) = 0x209;
+ Func_02006ee2();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_38d_event_script02.c b/games/gs1/src/overlays/scene_primary_script/run_scene_38d_event_script02.c
new file mode 100644
index 000000000..0152af9b0
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_38d_event_script02.c
@@ -0,0 +1,482 @@
+#include "types.h"
+
+#define RunEventScript02 Func_020019b0
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_020035de();
+void Func_020036ec();
+void Func_02003748();
+void Func_0200376a();
+void Func_020037d4();
+void Func_02003846();
+void Func_020038ac();
+void Func_020038fc();
+void Func_02003dd4();
+void Func_02003df4();
+void Func_02003e08();
+void Func_02003e1a();
+void Func_02003e24();
+void Func_02003e8c();
+void Func_02003eee();
+void Func_02003ef0();
+void Func_02003efc();
+void Func_02003f06();
+s32 Func_02003f10();
+void Func_02003f12();
+void Func_02003f28();
+void Func_02003f34();
+void Func_02003f44();
+void Func_02003f46();
+void Func_02003f52();
+s32 Func_02003f58();
+void Func_02003f66();
+void Func_02003f7e();
+void Func_02003f8c();
+void Func_02003f96();
+void Func_02003fa4();
+s32 Func_02003fae();
+s32 Func_02003fb0();
+void Func_02003fb2();
+void Func_02003fbc();
+s32 Func_02003fc4();
+void Func_02003fc6();
+void Func_02003fd2();
+s32 Func_02003fd8();
+void Func_02003fea();
+void Func_02003ff0();
+void Func_02003ff8();
+void Func_02004002();
+void Func_02004010();
+void Func_0200401e();
+void Func_02004024();
+void Func_02004032();
+void Func_02004034();
+void Func_02004046();
+s32 Func_0200405a();
+void Func_0200406a();
+void Func_02004078();
+void Func_0200407c();
+void Func_0200407e();
+void Func_02004080();
+void Func_02004086();
+void Func_02004088();
+void Func_02004090();
+s32 Func_0200409a();
+void Func_0200409e();
+void Func_020040ac();
+void Func_020040b6();
+void Func_020040be();
+void Func_020040c6();
+void Func_020040da();
+s32 Func_020040e2();
+void Func_020040f4();
+void Func_02004138();
+void Func_02004144();
+void Func_02004146();
+void Func_02004156();
+void Func_02004158();
+void Func_02004180();
+void Func_02004186();
+void Func_020041b6();
+void Func_020041c0();
+s32 Func_020041c4();
+void Func_0200420a();
+void Func_02004214();
+void Func_02004222();
+s32 Func_0200422e();
+void Func_02004232();
+void Func_0200423e();
+void Func_02004250();
+void Func_02004256();
+void Func_0200425c();
+void Func_0200426a();
+void Func_02004272();
+void Func_0200428e();
+void Func_02004290();
+void Func_020042a0();
+void Func_020042a8();
+s32 Func_020042aa();
+void Func_020042ca();
+s32 Func_020042d0();
+void Func_020042d6();
+void Func_02004320();
+void Func_02004324();
+void Func_02004330();
+s32 Func_0200434e();
+void Func_0200435c();
+void Func_0200436a();
+void Func_02004382();
+void Func_02004384();
+void Func_020043a0();
+void Func_020043aa();
+void Func_020043c2();
+void Func_020043c8();
+void Func_020043de();
+void Func_020043e4();
+void Func_020043ea();
+void Func_020043ec();
+s32 Func_020043ee();
+void Func_020043f4();
+void Func_02004400();
+void Func_02004402();
+void Func_02004404();
+void Func_02004412();
+void Func_0200441e();
+void Func_0200442c();
+void Func_0200443a();
+void Func_02004450();
+void Func_02004464();
+void Func_0200447a();
+void Func_02004488();
+s32 Func_02004490();
+void Func_02004496();
+void Func_020044a0();
+void Func_020044c6();
+void Func_020044ca();
+void Func_020044d2();
+void Func_020044d4();
+s32 Func_020044de();
+s32 Func_020044fe();
+void Func_02004502();
+void Func_02004510();
+void Func_02004516();
+void Func_02004518();
+void Func_0200451a();
+s32 Func_0200451e();
+void Func_02004522();
+void Func_02004526();
+void Func_0200452a();
+void Func_02004530();
+void Func_02004538();
+void Func_0200453a();
+void Func_02004540();
+void Func_02004542();
+void Func_0200454e();
+void Func_02004550();
+void Func_02004558();
+void Func_02004560();
+void Func_02004562();
+void Func_02004580();
+void Func_02004586();
+void Func_0200458e();
+void Func_020045a0();
+void Func_020045a8();
+void Func_020045aa();
+s32 Func_020045b0();
+void Func_020045b2();
+void Func_020045ba();
+void Func_020045c2();
+void Func_020045c8();
+void Func_020045ce();
+void Func_020045dc();
+void Func_020045f2();
+void Func_0200460c();
+void Func_0200460e();
+void Func_02004610();
+void Func_02004624();
+void Func_02004634();
+void Func_02004638();
+void Func_02004670();
+void Func_02004678();
+void Func_020046f0();
+void Func_020046fc();
+void Func_02004706();
+extern u8 Data_03001ebc[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript02(void)
+{
+ u32 i;
+ s32 record;
+ s32 flag;
+ s32 base5_200a5c0;
+
+ Func_02003e24();
+ Call4(Func_02003f46, -1, -1, -1, 0);
+ Func_02003dd4(1);
+ flag = 0;
+ *(u8 *)(Func_02003f58() + 85) = (u8)flag;
+ Call4(Func_02003f66, 0x37e0000, -1, 0x2980000, 0);
+ Func_02003df4(1);
+ Func_02003eee(0, 0, 0);
+ Func_02003e1a();
+ Func_02003e08(1);
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c0)) = 0x201;
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c8)) = 16;
+ Func_02003fb2();
+ Func_02003fc6();
+ Func_02003e8c(40);
+ Call3(Func_02003f28, 19, 0x3780000, 0x31e0000);
+ Call3(Func_02003f34, 0, 0x3880000, 0x31e0000);
+ Call2(Func_02003fbc, 0x9999, 0x1333);
+ Call4(Func_02003fd2, 0x37e0000, -1, 0x2ba0000, 1);
+ Call3(Func_02003efc, 19, 0xcccc, 0x6666);
+ Call3(Func_02003f06, 0, 0x9999, 0x4ccc);
+ Call3(Func_02003f44, 19, 0x378, 0x2d0);
+ Call3(Func_02003f52, 0, 0x388, 0x2e0);
+ Func_02003ef0(60);
+ Func_02003f7e(19);
+ Func_02003f96(19, 1);
+ Func_02003f8c(0);
+ Func_02003fa4(0, 1);
+ Func_02003f12(20);
+ Func_02003fd2(19, 2);
+ Call1(Func_02003ff0, 0x1728);
+ flag = 1;
+ if (Value1(Func_02003f10, 0x84f) == 0) {
+ bump_step(1);
+ flag = 0;
+ }
+ Func_02004024(19, 0);
+ if (flag) {
+ bump_step(1);
+ }
+ Call4(Func_0200407e, 0x37e0000, -1, 0x2980000, 1);
+ Value2(Func_02003fae, 19, 0x200a5d4);
+ Call3(Func_02003fea, 0, 0x37e, 0x2ac);
+ record = Value1(Func_02003fb0, 0);
+ if (record != 0) {
+ Func_0200401e(1, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ record = Value1(Func_02003fc4, 0);
+ if (record != 0) {
+ Func_02004032(2, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ record = Value1(Func_02003fd8, 0);
+ if (record != 0) {
+ Func_02004046(3, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02003ff8, 1, 0x9999, 0x4ccc);
+ Call3(Func_02004002, 2, 0x9999, 0x4ccc);
+ Call3(Func_02004010, 3, 0x10000, 0x8000);
+ Func_02004078(1, 2);
+ Func_02004080(2, 2);
+ Func_02004088(3, 2);
+ Call3(Func_0200407c, 1, -16, 16);
+ Func_02004086(2, 16, 16);
+ Func_02004090(3, 32, 16);
+ Func_0200409e(2);
+ Func_020040b6(1, 1);
+ Func_020040be(2, 1);
+ Func_020040c6(3, 1);
+ Func_02004034(10);
+ Call3(Func_02004138, 1, 0xc000, 0);
+ Call3(Func_02004144, 2, 0xc000, 0);
+ Func_020040da(3);
+ Call3(Func_02004156, 3, 0xa000, 0);
+ Func_020040ac(19);
+ Func_0200406a(20);
+ flag = 1;
+ if (Value1(Func_0200405a, 0x84f) == 0) {
+ bump_step(1);
+ flag = 0;
+ }
+ Func_02004146(18, 3);
+ Call3(Func_02004180, 0x2012, 0, 20);
+ if (flag) {
+ bump_step(1);
+ }
+ flag = 1;
+ if (Value1(Func_0200409a, 0x84f) == 0) {
+ bump_step(1);
+ flag = 0;
+ }
+ Func_02004186(18, 1);
+ Call3(Func_020041c0, 0x2012, 0, 10);
+ if (flag) {
+ bump_step(1);
+ }
+ Func_020035de();
+ Func_020040f4(20);
+ if (Value1(Func_020040e2, 0x84f) != 0) {
+ Call3(Func_0200420a, 0, 0x102, 60);
+ Call3(Func_02004214, 1, 0x105, 40);
+ } else {
+ Func_02004158(40);
+ }
+ Call3(Func_0200425c, 1, 0xc000, 10);
+ Call3(Func_02004256, 0x4001, 0, 10);
+ Call3(Func_02004272, 2, 0xc000, 10);
+ Func_02004222(2, 3);
+ Call2(Func_0200426a, 0x4002, 0);
+ Call3(Func_0200428e, 3, 0xa000, 10);
+ Func_0200423e(3, 3);
+ Call3(Func_02004290, 0x4003, 0, 20);
+ Func_02004250(18, 3);
+ Func_020041b6(20);
+ Call3(Func_020042a8, 0x2012, 0, 20);
+ Call3(Func_020042ca, 1, 0x103, 0);
+ Call3(Func_020042d6, 0, 0x102, 60);
+ if (Value1(Func_020041c4, 0x84f) != 0) {
+ Func_020042a0(18, 1);
+ Func_02004290(18, 4);
+ Value2(Func_020042d0, 0x2012, 0);
+ Func_020036ec();
+ flag = 1;
+ if (Value2(Func_0200422e, 0, 0) != 0) {
+ bump_step(1);
+ flag = 0;
+ }
+ Call3(Func_02004320, 18, 0x5000, 0);
+ Func_02003748();
+ Func_02004232(10);
+ Call3(Func_02004324, 0x2012, 0, 10);
+ if (flag) {
+ bump_step(1);
+ }
+ Call3(Func_0200435c, 18, 0x102, 60);
+ } else {
+ bump_step(4);
+ }
+ Value2(Func_0200434e, 0x2012, 0);
+ Func_0200376a();
+ if (Value2(Func_020042aa, 0, 0) == 0) {
+ Call1(Func_0200435c, 0x1737);
+ } else {
+ Call1(Func_02004384, 0x1738);
+ }
+ Func_020037d4();
+ Call3(Func_020043aa, 0x2012, 0, 20);
+ Func_02004382(19, 1);
+ Call1(Func_020043a0, 0x1739);
+ Func_020043c2(19, 0, 10);
+ Call3(Func_020043de, 0, 0x6000, 0);
+ Call3(Func_020043ea, 1, 0xe000, 0);
+ Func_020043f4(2, 0, 0);
+ Call3(Func_02004400, 3, 0x8000, 40);
+ Func_020043c8(18, 2);
+ Call3(Func_02004402, 0x2012, 0, 10);
+ Call3(Func_0200441e, 0, 0xc000, 0);
+ Func_02003846();
+ Func_02004330(10);
+ Call3(Func_0200443a, 18, 0x105, 60);
+ Call3(Func_0200442c, 0x2012, 0, 10);
+ Func_020043e4(0, 3);
+ Func_020043ec(1, 3);
+ Func_020043f4(2, 3);
+ Func_02004404(3, 3);
+ Func_0200436a(20);
+ Func_02004412(18, 3);
+ Call3(Func_02004464, 0x2012, 0, 10);
+ Call3(Func_02004488, 18, 0x108, 60);
+ Call3(Func_0200447a, 0x2012, 0, 10);
+ Call3(Func_02004496, 18, 0x3000, 10);
+ Call3(Func_02004490, 0x2012, 0, 10);
+ Func_02004450(18, 3);
+ Value2(Func_02004490, 0x2012, 0);
+ Func_020038ac();
+ flag = 1;
+ if (Value2(Func_020043ee, 0, 0) == 1) {
+ bump_step(1);
+ flag = 0;
+ }
+ Func_020038fc();
+ Call3(Func_020044d2, 0x2012, 0, 10);
+ if (flag) {
+ bump_step(1);
+ }
+ Call3(Func_02004502, 18, 0x7000, 10);
+ Func_020044ca(19, 1);
+ Call3(Func_02004516, 19, 0x1000, 20);
+ Func_020044c6(18, 3);
+ Func_0200442c(20);
+ Func_020044d4(19, 3);
+ Func_02004526(19, 0, 10);
+ Call3(Func_02004542, 19, 0x3000, 10);
+ Call3(Func_0200454e, 18, 0x3000, 20);
+ Func_02004516(18, 1);
+ Call3(Func_02004550, 0x2012, 0, 10);
+ Func_02004510(18, 3);
+ Call3(Func_02004562, 0x2012, 0, 10);
+ Func_0200451a(0, 3);
+ Func_02004522(1, 3);
+ Func_0200452a(2, 3);
+ Func_0200453a(3, 3);
+ Func_020044a0(20);
+ Func_02004540(1, 2);
+ record = Value1(Func_020044de, 0);
+ if (record != 0) {
+ Func_02004518(1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02004560(2, 2);
+ record = Value1(Func_020044fe, 0);
+ if (record != 0) {
+ Func_02004538(2, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02004580(3, 2);
+ record = Value1(Func_0200451e, 0);
+ if (record != 0) {
+ Func_02004558(3, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200458e(1);
+ Func_020045a0(1, 0, 0);
+ Func_020045aa(2, 0, 0);
+ Func_020045a8(3);
+ Func_020045ba(3, 0, 0);
+ Func_02004530(20);
+ Call3(Func_02004634, 18, 0x5000, 0);
+ base5_200a5c0 = 0x200a5c0;
+ Call3(Func_0200460e, 0, 0x10013, base5_200a5c0);
+ Call3(Func_020045c2, 19, 0x354, 0x286);
+ Call3(Func_020045ce, 19, 0x354, 0x29a);
+ Call3(Func_020045dc, 19, 0x360, 0x2a0);
+ Call3(Func_02004670, 19, 0x1000, 10);
+ Func_02004638(19, 1);
+ Func_02004586(10);
+ Func_02004678(19, 0, 10);
+ Call3(Func_0200460c, 19, 0x376, 0x2c4);
+ Call3(Func_02004610, 19, 0x37e, 0x2fc);
+ Call3(Func_02004624, 0, 0x37e, 0x2fc);
+ Func_020046f0();
+ Func_020046fc();
+ Call1(Func_020045b2, 0x322);
+ if (Value1(Func_020045b0, 0x84f) == 0) {
+ Call1(Func_020045c2, 0x84f);
+ Call1(Func_020045c8, 0x84a);
+ }
+ Func_02004706(6);
+ Func_020045f2();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_38e_event_script01.c b/games/gs1/src/overlays/scene_primary_script/run_scene_38e_event_script01.c
new file mode 100644
index 000000000..01d7ed6d5
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_38e_event_script01.c
@@ -0,0 +1,83 @@
+#include "types.h"
+
+#define RunEventScript01 Func_0200050c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02000b92();
+void Func_02000ea2();
+s32 Func_02000fc6();
+s32 Func_02000fd8();
+void Func_02000fe2();
+s32 Func_02000fe8();
+s32 Func_0200100a();
+s32 Func_02001014();
+s32 Func_02001034();
+s32 Func_02001062();
+void Func_02001068();
+void Func_02001074();
+void Func_02001092();
+void Func_020010b6();
+void Func_020010c6();
+void Func_0200111a();
+void Func_02001124();
+extern u8 Data_02008bf4[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript01(void)
+{
+ u32 i;
+ s32 record;
+
+ if (Value1(Func_02000fc6, 0x109) != 0) {
+ Call1(Func_02000fe2, 0x200);
+ }
+ if (Value1(Func_02000fd8, 0xfd2) == 0) {
+ Func_02000ea2(13);
+ }
+ if (Value1(Func_02000fe8, 0x84a) != 0) {
+ Call3(Func_02001068, 11, 0x1340000, 0x1070000);
+ Call3(Func_02001074, 12, 0x15a0000, 0x1070000);
+ if (Value1(Func_0200100a, 0x84f) == 0) {
+ if (Value1(Func_02001014, 0x845) == 0) {
+ Func_02001092(11, 0, 0);
+ Call3(Func_020010c6, 12, 0x10000, (s32)Data_02008bf4);
+ }
+ }
+ }
+ if (Value1(Func_02001034, 0x845) != 0) {
+ Call3(Func_020010b6, 10, 0xe00000, 0x1240000);
+ Call3(Func_0200111a, 10, 0x4000, 0);
+ Func_02001124(8, 0, 0);
+ if (Value1(Func_02001062, 0x85e) == 0) {
+ Func_02000b92();
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_38e_sequence_a.c b/games/gs1/src/overlays/scene_primary_script/run_scene_38e_sequence_a.c
new file mode 100644
index 000000000..f502b542c
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_38e_sequence_a.c
@@ -0,0 +1,203 @@
+#include "types.h"
+
+#define FieldScene_RunScene38eSequenceA Func_020005dc
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00001720[];
+void Func_0200105a();
+void Func_02001094();
+void Func_020010b4();
+void Func_02001140();
+void Func_0200115e();
+void Func_0200118e();
+void Func_020011a0();
+void Func_020011a2();
+void Func_020011bc();
+void Func_020011cc();
+void Func_020011d2();
+void Func_020011d6();
+void Func_020011da();
+void Func_020011ee();
+void Func_020011f6();
+void Func_0200120a();
+void Func_02001216();
+void Func_02001218();
+void Func_02001226();
+void Func_02001228();
+s32 Func_0200122c();
+void Func_02001234();
+void Func_0200123a();
+void Func_02001240();
+void Func_02001244();
+void Func_0200124c();
+void Func_02001258();
+s32 Func_0200125a();
+void Func_0200126c();
+void Func_02001272();
+void Func_02001286();
+s32 Func_0200128c();
+void Func_02001294();
+void Func_02001296();
+void Func_0200129a();
+void Func_0200129c();
+void Func_0200129e();
+void Func_020012a6();
+void Func_020012b8();
+void Func_020012c4();
+void Func_020012d2();
+void Func_020012d8();
+void Func_020012da();
+void Func_020012de();
+s32 Func_020012e4();
+void Func_020012e6();
+void Func_020012fc();
+u8 *Func_02001306();
+void Func_02001312();
+void Func_02001322();
+void Func_0200132a();
+void Func_0200132c();
+void Func_0200132e();
+void Func_02001334();
+void Func_02001342();
+void Func_02001358();
+void Func_0200136e();
+void Func_02001380();
+void Func_02001382();
+void Func_0200138c();
+void Func_020013a2();
+void Func_020013a4();
+void Func_020013b4();
+void Func_02001450();
+void Func_02001456();
+void Func_02001462();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene38eSequenceA(void)
+{
+ u32 i;
+ u8 *record;
+
+ Func_020010b4();
+ Call4(Func_0200118e, -1, -1, -1, 0);
+ Call4(Func_020011a0, 0x1400000, -1, 0x1400000, 0);
+ Func_02001094();
+ Func_0200105a(1);
+ Call3(Func_02001140, 0, 0x1400000, 0x1740000);
+ Func_020011cc();
+ Call2(Func_020011bc, 0x3333, 0x666);
+ Call4(Func_020011d6, 0x1400000, -1, 0x1220000, 1);
+ Call3(Func_02001140, 0, 0x9999, 0x4ccc);
+ Call3(Func_0200115e, 0, 0x140, 0x136);
+ Call3(Func_020011da, 11, 0x3000, 10);
+ Func_020011a2(11, 2);
+ Call3(Func_020011f6, 11, 0x100, 60);
+ Func_020011cc((s32)Data_00001720);
+ Func_020011ee(11, 0, 10);
+ Call3(Func_0200120a, 12, 0x5000, 10);
+ Func_020011d2(12, 2);
+ Call3(Func_02001226, 12, 0x100, 60);
+ Func_02001218(12, 0, 20);
+ Call3(Func_02001234, 11, 0x1000, 0);
+ Call3(Func_02001240, 12, 0x7000, 40);
+ Call3(Func_0200124c, 11, 0x3000, 0);
+ Call3(Func_02001258, 12, 0x5000, 10);
+ Func_02001228(11, 1);
+ Call3((void (*)())Func_0200125a, 11, 0, 10);
+ Func_0200123a(12, 1);
+ Value2(Func_0200125a, 12, 0);
+ Call3(Func_02001286, 0, 0xe000, 0);
+ while (Value2(Func_0200122c, 0, 0) != 0) {
+ Call3(Func_0200129c, 12, 0x100, 60);
+ Call1(Func_02001272, 0x1724);
+ Call3(Func_02001294, 12, 0, 10);
+ Func_0200126c(12, 2);
+ Func_02001294(12, 0);
+ }
+ Func_02001216(10);
+ Call3(Func_020012d2, 11, 0x3000, 0);
+ Call3(Func_020012de, 12, 0x5000, 20);
+ Func_02001296(11, 3);
+ Func_020012a6(12, 3);
+ Func_02001244(20);
+ Func_020012c4(11, 1);
+ Call1(Func_020012da, 0x1726);
+ Func_020012fc(11, 0, 10);
+ Call3(Func_0200129a, 11, 0x10000, 0x8000);
+ Call3(Func_020012b8, 11, 0x13a, 0x118);
+ Call3(Func_02001334, 0, 0xc000, 20);
+ Func_0200132e(11, 0, 40);
+ Call2(Func_02001358, 0, 0x102);
+ Func_0200129e(60);
+ if (Value1(Func_0200128c, 0x84a) == 0) {
+ Call3(Func_020012e6, 12, 0x10000, 0x8000);
+ *(u8 *)(Func_020012e4(12) + 90) &= 254;
+ Call3(Func_02001312, 12, 0x15a, 0x107);
+ Func_020012d8(1);
+ {
+ u8 *record = Func_02001306(12);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ }
+ Call3(Func_02001322, 11, 0xcccc, 0x6666);
+ Call3(Func_0200132c, 0, 0xcccc, 0x6666);
+ Call3(Func_02001342, 11, 0x148, 0x106);
+ Call3(Func_02001358, 0, 0x148, 0x116);
+ Func_02001380(11, 1);
+ Func_02001140();
+ Func_0200132a(40);
+ Call3(Func_0200136e, 0, 0x148, 242);
+ Call3(Func_02001382, 11, 0x148, 242);
+ Func_020013a4(11, 0, 0);
+ Func_020013a2(0);
+ Func_020013b4(0, 0, 0);
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x201;
+ Func_02001456();
+ Func_02001462();
+ Func_02001450(10);
+ Func_0200138c();
+}
diff --git a/games/gs1/recon/en/overlays/resource_395_c_02000488.c b/games/gs1/src/overlays/scene_primary_script/run_scene_395_event_script01_second.c
similarity index 55%
rename from games/gs1/recon/en/overlays/resource_395_c_02000488.c
rename to games/gs1/src/overlays/scene_primary_script/run_scene_395_event_script01_second.c
index e52eee6c6..d36187927 100644
--- a/games/gs1/recon/en/overlays/resource_395_c_02000488.c
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_395_event_script01_second.c
@@ -1,11 +1,9 @@
#include "types.h"
-#define RunEventScript01 Func_02000488
-
-/* AUDITED GENERATED CALL SCRIPT for RunEventScript01: 319 calls, 2 loops, 0 memory operations.
- * Recovered from the complete decoded owner. Calls, arguments, control flow,
- * loops, and memory operations are accounted for against the ROM. */
+#define FieldScene_RunScene395SequenceA Func_02000488
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
void Func_02001974();
void Func_020019e6();
void Func_020019f4();
@@ -22,7 +20,7 @@ void Func_02001c5c();
void Func_02001ce8();
void Func_02001dda();
void Func_02001e02();
-void Func_02001e0e();
+s32 Func_02001e0e();
void Func_02001e16();
void Func_02001e36();
void Func_02001e4e();
@@ -30,12 +28,12 @@ void Func_02001e5e();
void Func_02001e60();
void Func_02001e6e();
void Func_02001e76();
-void Func_02001e7c();
+s32 Func_02001e7c();
void Func_02001e86();
s32 Func_02001e88();
void Func_02001e8a();
s32 Func_02001e9c();
-void Func_02001ec2();
+s32 Func_02001ec2();
void Func_02001eca();
void Func_02001ecc();
void Func_02001ece();
@@ -128,7 +126,7 @@ void Func_02002202();
void Func_02002228();
void Func_0200222c();
void Func_02002236();
-void Func_02002244();
+s32 Func_02002244();
void Func_02002252();
void Func_02002260();
void Func_02002268();
@@ -182,7 +180,7 @@ void Func_0200247a();
void Func_0200247c();
void Func_0200248c();
void Func_02002498();
-void Func_020024a4();
+s32 Func_020024a4();
void Func_020024a8();
void Func_020024b4();
void Func_020024be();
@@ -271,12 +269,12 @@ void Func_020028b0();
void Func_020028b8();
void Func_020028c8();
void Func_020028d0();
-void Func_020028d6();
+s32 Func_020028d6();
void Func_020028d8();
void Func_020028e6();
void Func_020028f4();
void Func_02002902();
-void Func_0200291e();
+s32 Func_0200291e();
void Func_02002942();
void Func_0200294e();
void Func_0200295a();
@@ -289,7 +287,7 @@ void Func_020029aa();
void Func_020029b2();
void Func_020029b4();
void Func_020029b8();
-void Func_020029be();
+s32 Func_020029be();
void Func_020029c2();
void Func_020029c8();
void Func_020029d2();
@@ -301,61 +299,130 @@ void Func_02002a42();
void Func_02002a6a();
void Func_02002a80();
void Func_02002af6();
+void Func_020095a1();
+extern s32 Data_02009dcc;
+extern s32 Data_02009dc0[];
+extern s32 Data_02009dd4;
+extern u8 Data_02009b6c[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call0(void (*f)())
+{
+ f();
+}
-void RunEventScript01(void)
+static __inline__ void Call1(void (*f)(), s32 a0)
{
- s32 i1;
- s32 i2;
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
- Func_02001e0e(3);
- Func_02001e7c(0, 328, 212);
- Func_02001ee8(0, 49152, 20);
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene395SequenceA(void)
+{
+ u32 i;
+ s32 rec8;
+ s32 record;
+ s32 base5_20095a1;
+ s32 base5_2009b6c;
+
+ rec8 = Func_02001e0e(3);
+ Value3(Func_02001e7c, 0, 0x148, 212);
+ Call3(Func_02001ee8, 0, 0xc000, 20);
Func_02001f5e(17);
- Func_02001e16(5357, 1);
- Func_02001e7c(1, 65536, 32768);
- Func_02001e8a(2, 65536, 32768);
- if (Func_02001e88(0) != 0) {
- Func_02001ece(1);
+ Call2(Func_02001e16, 0x14ed, 1);
+ Call3(Func_02001e7c, 1, 0x10000, 0x8000);
+ Call3(Func_02001e8a, 2, 0x10000, 0x8000);
+ record = Value1(Func_02001e88, 0);
+ if (record != 0) {
+ Func_02001ece(1, *(s32 *)(record + 8), *(s32 *)(record + 16));
}
- if (Func_02001e9c(0) != 0) {
- Func_02001ee2(2);
+ record = Value1(Func_02001e9c, 0);
+ if (record != 0) {
+ Func_02001ee2(2, *(s32 *)(record + 8), *(s32 *)(record + 16));
}
- Func_02001ec2(1, 33594040);
- Func_02001eca(2, 33594100);
- Func_02001ed4(3, 65536, 32768);
- if (Func_02001ed2(0) != 0) {
- Func_02001f18(3);
+ Value2(Func_02001ec2, 1, 0x2009ab8);
+ Func_02001eca(2, 0x2009af4);
+ if (rec8 != 0) {
+ Call3(Func_02001ed4, 3, 0x10000, 0x8000);
+ record = Value1(Func_02001ed2, 0);
+ if (record != 0) {
+ Func_02001f18(3, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Func_02001ef8(3, 0x2009b30);
}
- Func_02001ef8(3, 33594160);
Func_02001f06(2);
Func_02001ed4(40);
Func_02001e02(0);
Func_02001fd8(32);
Func_02001e5e(40);
- Func_02001e76(33591989, 3200);
+ Data_02009dd4 = 0;
+ Call2(Func_02001e76, 0x20092b5, 0xc80);
Func_02001efc(40);
- Func_02001fb8(1, 24576, 20);
- Func_02001fd8(209715, 26214);
- Func_02001ff2(16777216, -1, 16646144, 1);
+ Call3(Func_02001fb8, 1, 0x6000, 20);
+ Call2(Func_02001fd8, 0x33333, 0x6666);
+ Call4(Func_02001ff2, 0x1000000, -1, 0xfe0000, 1);
Func_02001ffe();
Func_0200204c(246);
Func_02001f32(40);
- Func_02001fee(2, 8192, 20);
- Func_0200201c(27066368, -1, 17104896, 1);
+ Call3(Func_02001fee, 2, 0x2000, 20);
+ Call4(Func_0200201c, 0x19d0000, -1, 0x1050000, 1);
Func_02002028();
Func_02002076(246);
Func_02001f5c(40);
- Func_02002018(0, 16384, 0);
- Func_02002024(3, 16384, 20);
- Func_02002056(21364736, -1, 25165824, 1);
+ Call3(Func_02002018, 0, 0x4000, 0);
+ Call3(Func_02002024, 3, 0x4000, 20);
+ Call4(Func_02002056, 0x1460000, -1, 0x1800000, 1);
Func_02002062();
Func_020020b0(246);
- for (i1 = 1; i1 != 24; i1++) {
- Func_02001f14(1);
+ if (Data_02009dd4 != 24) {
+ do {
+ Func_02001f14(1);
+ } while (Data_02009dd4 != 24);
}
- Func_02001f30(33591989);
+ Call1(Func_02001f30, 0x20092b5);
Func_02001f26(10);
- for (i2 = 0; i2 < 3; i2++) {
+ for (i = 0; i < 4; i++) {
Func_02001ede(0);
Func_020020b4(6);
Func_02001f3a(6);
@@ -366,22 +433,22 @@ void RunEventScript01(void)
Func_02001f08(0);
Func_020020de(40);
Func_02001f64(80);
- Func_020020ce(21495808, 524288, 13893632, 1);
+ Call4(Func_020020ce, 0x1480000, 0x80000, 0xd40000, 1);
Func_020020da();
Func_02002008(40);
Func_02001974(10, 1);
Func_02002016(40);
Func_0200213c(7);
- Func_020020b2(5358);
+ Call1(Func_020020b2, 0x14ee);
Func_020020ca(8, 0);
Func_020020aa(0, 2);
Func_020020b2(1, 2);
Func_020020ba(3, 2);
Func_020020ca(2, 2);
- Func_02002106(0, 49152, 0);
- Func_02002112(1, 49152, 0);
- Func_0200211e(3, 49152, 0);
- Func_0200212a(2, 49152, 20);
+ Call3(Func_02002106, 0, 0xc000, 0);
+ Call3(Func_02002112, 1, 0xc000, 0);
+ Call3(Func_0200211e, 3, 0xc000, 0);
+ Call3(Func_0200212a, 2, 0xc000, 20);
Func_020019e6(10, 2);
Func_02002088(20);
Func_020019f4(10, 3);
@@ -389,60 +456,66 @@ void RunEventScript01(void)
Func_02001a02(10, 1);
Func_020020a4(20);
Func_0200214c(8, 0);
- Func_02002176(0, 261, 0);
- Func_02002180(1, 261, 0);
- Func_0200218a(3, 261, 0);
- Func_02002194(2, 261, 40);
- Func_020021b4(15335424, 0, 15204352, 1);
+ Call3(Func_02002176, 0, 0x105, 0);
+ Call3(Func_02002180, 1, 0x105, 0);
+ Call3(Func_0200218a, 3, 0x105, 0);
+ Call3(Func_02002194, 2, 0x105, 40);
+ Call4(Func_020021b4, 0xea0000, 0, 0xe80000, 1);
Func_020021c0();
Func_020020ee(40);
Func_02001a5a(11, 1);
Func_020020fc(40);
Func_02001a68(11, 3);
Func_0200210a(20);
- Func_020021bc(16393, 0, 20);
+ Call3(Func_020021bc, 0x4009, 0, 20);
Func_02001a80(11, 2);
Func_02002122(10);
- Func_020021de(0, 24576, 0);
- Func_020021ea(1, 24576, 0);
- Func_020021f6(2, 24576, 0);
- Func_02002202(3, 24576, 20);
+ Call3(Func_020021de, 0, 0x6000, 0);
+ Call3(Func_020021ea, 1, 0x6000, 0);
+ Call3(Func_020021f6, 2, 0x6000, 0);
+ Call3(Func_02002202, 3, 0x6000, 20);
Func_02001abe(11, 3);
Func_02002160(20);
Func_02001acc(11, 2);
Func_0200216e(20);
Func_02001ada(11, 3);
- Func_02002228(16393, 0, 10);
+ Call3(Func_02002228, 0x4009, 0, 10);
Func_02001aec(10, 0);
Func_0200218e(20);
- Func_02002236(32776, 0);
+ Call2(Func_02002236, 0x8008, 0);
Func_02001b02(10, 1);
Func_020021a4(20);
- Func_02002244(32776, 0);
- Func_02002268(0, 49152, 0);
- Func_02002274(1, 57344, 0);
- Func_02002280(2, 40960, 0);
- Func_0200228c(3, 49152, 0);
- if (Func_020021fc(0, 0) == 0) {
- Func_02002290(16393, 0);
- Func_02002298(32776, 0);
+ Value2(Func_02002244, 0x8008, 0);
+ Call3(Func_02002268, 0, 0xc000, 0);
+ Call3(Func_02002274, 1, 0xe000, 0);
+ Call3(Func_02002280, 2, 0xa000, 0);
+ Call3(Func_0200228c, 3, 0xc000, 0);
+ if (Value2(Func_020021fc, 0, 0) == 0) {
+ Call2(Func_02002290, 0x4009, 0);
+ Call2(Func_02002298, 0x8008, 0);
+ } else {
+ bump_step(2);
+ Call3(Func_0200230c, 3, 0x103, 0);
+ Call3(Func_02002316, 1, 0x103, 0);
+ Call3(Func_02002320, 2, 0x103, 40);
+ Func_020022c8(1, 4);
+ Func_02002310(1, 0);
+ if (rec8 != 0) {
+ Func_020022fc(3, 2);
+ Func_02002324(3, 0);
+ } else {
+ bump_step(1);
+ }
+ Func_02002304(2, 3);
+ Func_02002344(2, 0);
+ Call2(Func_0200234c, 0x4009, 0);
+ Call2(Func_02002354, 0x8008, 0);
}
- Func_0200230c(3, 259, 0, 474);
- Func_02002316(1, 259, 0);
- Func_02002320(2, 259, 40);
- Func_020022c8(1, 4);
- Func_02002310(1, 0);
- Func_020022fc(3, 2);
- Func_02002324(3, 0);
- Func_02002304(2, 3);
- Func_02002344(2, 0);
- Func_0200234c(16393, 0);
- Func_02002354(32776, 0);
Func_0200231c(0, 3);
Func_02002324(1, 3);
Func_0200232c(3, 3);
Func_0200233c(2, 3);
- Func_020023b6(21495808, 524288, 13893632, 1);
+ Call4(Func_020023b6, 0x1480000, 0x80000, 0xd40000, 1);
Func_020023c2();
Func_020022f0(20);
Func_02001c5c(10, 0);
@@ -450,13 +523,18 @@ void RunEventScript01(void)
Func_0200222c(0);
Func_02002402(1);
Func_02002288(1);
- Func_02002400(4219416, 1);
+ Call2(Func_02002400, 0x406218, 1);
Func_02002416(40);
Func_02002324(60);
- Func_020022ca(33592737, 3200, 33594816, 13434880);
+ Data_02009dcc = 0;
+ Data_02009dc0[0] = 0x1480000;
+ Data_02009dc0[1] = 0x300000;
+ base5_20095a1 = (s32)Func_020095a1;
+ Data_02009dc0[2] = 0xcd0000;
+ Call2(Func_020022ca, base5_20095a1, 0xc80);
Func_02002350(100);
- Func_020022de(33592737);
- Func_02002446(32767, 0);
+ Func_020022de(base5_20095a1);
+ Call2(Func_02002446, 0x7fff, 0);
Func_0200245c(60);
Func_0200236a(100);
Func_02002298(0);
@@ -464,77 +542,79 @@ void RunEventScript01(void)
Func_0200237c(40);
Func_02001ce8(10, 1);
Func_0200238a(10);
- Func_02002420(5371);
- Func_02002438(32776, 0);
+ Call1(Func_02002420, 0x14fb);
+ Call2(Func_02002438, 0x8008, 0);
Func_02002400(0, 3);
Func_02002408(1, 3);
Func_02002410(3, 3);
Func_02002420(2, 3);
- Func_02002498(15335424, 0, 15204352, 1);
- Func_020024a4();
+ Call4(Func_02002498, 0xea0000, 0, 0xe80000, 1);
+ Call0((void (*)())Func_020024a4);
Func_020023d2(20);
- Func_0200247a(16393, 0);
- Func_0200248c(32776, 0, 10);
+ Call2(Func_0200247a, 0x4009, 0);
+ Call3(Func_0200248c, 0x8008, 0, 10);
Func_0200246c(1, 2);
- Func_020024a8(0, 24576, 0);
- Func_020024b4(1, 57344, 10);
- Func_020024a4(1, 0);
- if (Func_0200242c(0, 0) == 0) {
- Func_020024e4(1, 258, 40);
+ Call3(Func_020024a8, 0, 0x6000, 0);
+ Call3(Func_020024b4, 1, 0xe000, 10);
+ Value2(Func_020024a4, 1, 0);
+ if (Value2(Func_0200242c, 0, 0) == 0) {
+ Call3(Func_020024e4, 1, 0x102, 40);
+ } else {
+ Func_020024be(1, 4);
+ bump_step(1);
}
- Func_020024be(1, 4);
Func_0200250e(1, 0);
Func_02001dda(10, 4);
Func_0200247c(20);
- Func_02002512(5377);
- Func_0200252a(32776, 0);
- Func_02002546(0, 49152, 0);
- Func_02002552(1, 49152, 0);
- Func_0200254a(32776, 0);
+ Call1(Func_02002512, 0x1501);
+ Call2(Func_0200252a, 0x8008, 0);
+ Call3(Func_02002546, 0, 0xc000, 0);
+ Call3(Func_02002552, 1, 0xc000, 0);
+ Call2(Func_0200254a, 0x8008, 0);
Func_02002512(0, 3);
Func_0200251a(1, 3);
Func_02002522(3, 3);
Func_02002532(2, 3);
Func_02001e36(10, 4);
Func_020024d8(20);
- Func_0200258a(32776, 0, 20);
+ Call3(Func_0200258a, 0x8008, 0, 20);
Func_02001e4e(11, 0);
- Func_0200259c(16393, 0, 20);
+ Call3(Func_0200259c, 0x4009, 0, 20);
Func_02001e60(11, 3);
Func_02002502(40);
Func_02001e6e(11, 1);
Func_02002510(20);
- Func_020025c2(16393, 0, 20);
+ Call3(Func_020025c2, 0x4009, 0, 20);
Func_02001e86(10, 2);
Func_02002528(20);
- Func_020025d0(32776, 0);
- Func_020025fc(0, 258, 0);
- Func_02002608(1, 258, 0);
- Func_02002614(3, 258, 0);
- Func_02002620(2, 258, 80);
+ Call2(Func_020025d0, 0x8008, 0);
+ Call3(Func_020025fc, 0, 0x102, 0);
+ Call3(Func_02002608, 1, 0x102, 0);
+ Call3(Func_02002614, 3, 0x102, 0);
+ Call3(Func_02002620, 2, 0x102, 80);
Func_02001ecc(11, 5);
Func_0200256e(60);
Func_02001eda(11, 3);
Func_0200257c(20);
- Func_0200262e(16393, 0, 20);
+ Call3(Func_0200262e, 0x4009, 0, 20);
Func_02001ef2(10, 5);
Func_02002594(40);
Func_02001f00(10, 2);
Func_020025a2(20);
- Func_02002654(16392, 0, 20);
+ Call3(Func_02002654, 0x4008, 0, 20);
Func_02002634(1, 2);
- Func_02002670(1, 32768, 10);
+ Call3(Func_02002670, 1, 0x8000, 10);
Func_02002668(1, 0);
- Func_02002684(2, 32768, 20);
- Func_0200267c(32770, 0);
+ Call3(Func_02002684, 2, 0x8000, 20);
+ Call2(Func_0200267c, 0x8002, 0);
Func_02001f48(11, 4);
Func_020025ea(20);
- Func_0200269c(16393, 0, 20);
- Func_020026b0(1, 57344, 0);
- Func_020026bc(0, 24576, 10);
+ Call3(Func_0200269c, 0x4009, 0, 20);
+ Call3(Func_020026b0, 1, 0xe000, 0);
+ Call3(Func_020026bc, 0, 0x6000, 10);
Func_020026be(1, 0, 20);
Func_02001f82(10, 1);
- Func_020026d0(32776, 0, 10);
+ Call3(Func_020026d0, 0x8008, 0, 10);
Func_02001f94(10, 2);
Func_02002636(20);
Func_02001fa2(11, 3);
@@ -544,96 +624,105 @@ void RunEventScript01(void)
Func_02002580(0);
Func_02002756(1);
Func_020025dc(1);
- Func_02002754(4219416, 1);
+ Call2(Func_02002754, 0x406218, 1);
Func_0200276a(40);
Func_02002678(60);
- Func_0200261e(33592737, 3200, 33594816, 16908288);
+ Data_02009dcc = 0;
+ Data_02009dc0[0] = 0x880000;
+ Data_02009dc0[1] = 0x140000;
+ base5_20095a1 = (s32)Func_020095a1;
+ Data_02009dc0[2] = 0x1020000;
+ Call2(Func_0200261e, base5_20095a1, 0xc80);
Func_020026a4(100);
- Func_02002760(0, 24576, 0);
- Func_0200276c(1, 24576, 0);
- Func_02002778(3, 24576, 0);
- Func_02002784(2, 24576, 40);
+ Call3(Func_02002760, 0, 0x6000, 0);
+ Call3(Func_0200276c, 1, 0x6000, 0);
+ Call3(Func_02002778, 3, 0x6000, 0);
+ Call3(Func_02002784, 2, 0x6000, 40);
Func_02002754(2, 1);
- Func_020027a8(2, 256, 20);
- Func_0200279a(32770, 0, 10);
+ Call3(Func_020027a8, 2, 0x100, 20);
+ Call3(Func_0200279a, 0x8002, 0, 10);
Func_0200277a(0, 2);
- Func_020027b6(0, 8192, 10);
+ Call3(Func_020027b6, 0, 0x2000, 10);
Func_02002776(0, 3);
Func_0200207a(10, 4);
Func_0200271c(20);
- Func_020027c4(32776, 0);
- Func_020027ee(2, 257, 60);
- Func_020027ea(2, 49152, 10);
- Func_020027ec(32770, 0, 10);
- Func_02002800(0, 49152, 0);
- Func_0200280c(3, 49152, 0);
- Func_02002818(1, 49152, 20);
- Func_0200281a(32776, 0, 10);
+ Call2(Func_020027c4, 0x8008, 0);
+ Call3(Func_020027ee, 2, 0x101, 60);
+ Call3(Func_020027ea, 2, 0xc000, 10);
+ Call3(Func_020027ec, 0x8002, 0, 10);
+ Call3(Func_02002800, 0, 0xc000, 0);
+ Call3(Func_0200280c, 3, 0xc000, 0);
+ Call3(Func_02002818, 1, 0xc000, 20);
+ Call3(Func_0200281a, 0x8008, 0, 10);
Func_020027da(0, 3);
Func_020027e2(1, 3);
Func_020027ea(3, 3);
Func_020027fa(2, 3);
Func_02002798(10);
- Func_02002854(0, 24576, 0);
- Func_02002860(1, 24576, 0);
- Func_0200286c(3, 24576, 0);
- Func_02002878(2, 24576, 120);
- Func_02002756(33592737);
+ Call3(Func_02002854, 0, 0x6000, 0);
+ Call3(Func_02002860, 1, 0x6000, 0);
+ Call3(Func_0200286c, 3, 0x6000, 0);
+ Call3(Func_02002878, 2, 0x6000, 120);
+ Func_02002756(base5_20095a1);
Func_020027d4(60);
Func_02002702(0);
Func_020028d8(40);
Func_0200214c(10, 2);
Func_020027ee(20);
- Func_020028a0(32776, 0, 20);
+ Call3(Func_020028a0, 0x8008, 0, 20);
Func_02002164(11, 3);
- Func_020028a8(16393, 0);
- Func_020028b0(32776, 0);
+ Call2(Func_020028a8, 0x4009, 0);
+ Call2(Func_020028b0, 0x8008, 0);
Func_0200217c(11, 4);
Func_0200281e(20);
- Func_020028d0(16393, 0, 10);
+ Call3(Func_020028d0, 0x4009, 0, 10);
Func_020028a8(0, 2);
Func_020028b0(1, 2);
Func_020028b8(3, 2);
Func_020028c8(2, 2);
Func_020021e2(10, 1);
- Func_0200291e();
- Func_02002942(0, 49152, 0);
- Func_0200294e(1, 57344, 0);
- Func_0200295a(3, 49152, 0);
- Func_02002966(2, 40960, 0);
- Func_020028d6(0, 0);
+ Value2(Func_0200291e, 0x8008, 0);
+ Call3(Func_02002942, 0, 0xc000, 0);
+ Call3(Func_0200294e, 1, 0xe000, 0);
+ Call3(Func_0200295a, 3, 0xc000, 0);
+ Call3(Func_02002966, 2, 0xa000, 0);
+ if (Value2(Func_020028d6, 0, 0) == 1) {
+ bump_step(1);
+ }
Func_020028d8(10);
- Func_02002244(10, 2);
+ Call2((void (*)())Func_02002244, 10, 2);
Func_020028e6(20);
Func_02002252(11, 3);
Func_020028f4(40);
Func_02002260(10, 1);
Func_02002902(20);
- Func_020029b4();
- Func_020029c8(0, 16384, 0);
+ Call3(Func_020029b4, 0x8008, 0, 10);
+ Call3(Func_020029c8, 0, 0x4000, 0);
Func_020029d2(1, 0, 0);
- Func_020029de(3, 49152, 0);
- Func_020029ea(2, 32768, 10);
+ Call3(Func_020029de, 3, 0xc000, 0);
+ Call3(Func_020029ea, 2, 0x8000, 10);
Func_020029a2(0, 3);
Func_020029aa(1, 3);
Func_020029b2(3, 3);
Func_020029c2(2, 3);
Func_02002a80(17);
- Func_0200299a(1);
- Func_020029a6(3);
- Func_020029be(2);
+ base5_2009b6c = (s32)Data_02009b6c;
+ Func_0200299a(1, base5_2009b6c);
+ if (rec8 != 0) {
+ Func_020029a6(3, base5_2009b6c);
+ }
+ Value2(Func_020029be, 2, base5_2009b6c);
Func_020022ea(10, 4);
Func_020022f2(10, 4);
Func_02002994(20);
- Func_02002a2a();
- Func_02002a42();
+ Call1(Func_02002a2a, 0x1519);
+ Call2(Func_02002a42, 0x8008, 0);
Func_0200230e(11, 4);
Func_02002316(11, 4);
Func_020029b8(20);
- Func_02002a6a();
+ Call3(Func_02002a6a, 0x4009, 0, 10);
Func_02002a32(0, 3);
- Func_020029c8();
+ Call1(Func_020029c8, 0x845);
Func_02002af6(1);
Func_0200277a(184, 185);
}
-
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_396_event_script01.c b/games/gs1/src/overlays/scene_primary_script/run_scene_396_event_script01.c
new file mode 100644
index 000000000..216b5ba87
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_396_event_script01.c
@@ -0,0 +1,183 @@
+#include "types.h"
+
+#define RunEventScript01 Func_0200069c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0000002d[];
+extern u8 Data_02000240[];
+void Func_02001c08();
+void Func_02001c66();
+void Func_02001ccc();
+s32 Func_0200216a();
+void Func_02002188();
+void Func_020021d2();
+void Func_020021e0();
+void Func_020021ee();
+s32 Func_020021fa();
+void Func_020021fc();
+void Func_02002204();
+s32 Func_02002214();
+void Func_02002226();
+s32 Func_0200222a();
+s32 Func_0200223e();
+s32 Func_02002256();
+void Func_02002258();
+void Func_0200226a();
+void Func_0200226c();
+void Func_0200227c();
+s32 Func_02002284();
+s32 Func_0200228c();
+void Func_0200228e();
+void Func_0200229c();
+s32 Func_020022a4();
+void Func_020022a6();
+void Func_020022a8();
+void Func_020022b6();
+void Func_020022bc();
+void Func_020022ea();
+void Func_020022f8();
+void Func_0200230e();
+void Func_0200231a();
+void Func_02002324();
+void Func_02002326();
+void Func_0200232c();
+void Func_02002332();
+void Func_02002334();
+void Func_0200233c();
+void Func_0200234c();
+void Func_0200237a();
+void Func_02002384();
+void Func_0200238c();
+void Func_02002394();
+void Func_02002398();
+void Func_020023a4();
+void Func_020023b0();
+void Func_020023b4();
+void Func_020023bc();
+void Func_020023cc();
+void Func_020023d4();
+void Func_02002406();
+void Func_02002410();
+void Func_0200241a();
+void Func_02002424();
+void Func_02002490();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript01(void)
+{
+ u32 i;
+ s32 rec8;
+ s32 record;
+ s32 base3_2000240;
+
+ rec8 = Value1(Func_0200216a, 3);
+ Func_02002188();
+ Func_020022a6(17);
+ Call1(Func_02002204, 0x14ce);
+ Call3(Func_02002226, 0x8009, 0, 20);
+ Func_020022bc(29);
+ Call3(Func_020021d2, 0, 0x10000, 0x8000);
+ Call3(Func_020021e0, 1, 0x10000, 0x8000);
+ Call3(Func_020021ee, 2, 0x10000, 0x8000);
+ Call3(Func_020021fc, 3, 0x10000, 0x8000);
+ *(u8 *)(Func_020021fa(3) + 35) &= 254;
+ Func_0200228e(3, 2);
+ *(u8 *)(Func_02002214(0) + 35) &= 254;
+ Value2(Func_020022a4, 0, 2);
+ record = Value1(Func_0200222a, 0);
+ if (record != 0) {
+ Func_02002258(1, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ record = Value1(Func_0200223e, 0);
+ if (record != 0) {
+ Func_0200226c(2, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ if (rec8 != 0) {
+ record = Value1(Func_02002256, 0);
+ if (record != 0) {
+ Call3((void (*)())Func_02002284, 3, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Func_0200227c(3, 0x2009e2c);
+ }
+ Value2(Func_02002284, 0, 0x2009db4);
+ Value2(Func_0200228c, 1, 0x2009ddc);
+ Call2(Func_0200229c, 2, 0x2009e04);
+ Func_0200226a(10);
+ Call3(Func_0200230e, 0, 0xc000, 0);
+ Call3(Func_0200231a, 1, 0xc000, 0);
+ Call3(Func_02002326, 3, 0xc000, 0);
+ Call3(Func_02002332, 2, 0xc000, 40);
+ Func_020022ea(8, 11);
+ Func_020022a8(10);
+ Func_020022f8(8, 8);
+ Func_020022b6(20);
+ Func_02001c08(8);
+ Call2(Func_0200234c, 0x8008, 0);
+ Func_02002324(0, 2);
+ Func_0200232c(1, 2);
+ Func_02002334(3, 2);
+ Func_0200233c(2, 2);
+ Call3(Func_02002398, 0, 0x100, 0);
+ Call3(Func_020023a4, 1, 0x100, 0);
+ Call3(Func_020023b0, 3, 0x100, 0);
+ Call3(Func_020023bc, 2, 0x100, 60);
+ Func_02001c66(11);
+ Call3(Func_020023b4, 0x8008, 0, 10);
+ Func_02002384(0, 1);
+ Func_0200238c(1, 1);
+ Func_02002394(3, 1);
+ Func_020023a4(2, 1);
+ Call2(Func_020023d4, 0x8008, 0);
+ Call2(Func_02002406, 0, 0x102);
+ Call2(Func_02002410, 1, 0x102);
+ Call2(Func_0200241a, 3, 0x102);
+ Call2(Func_02002424, 2, 0x102);
+ Func_0200237a(40);
+ Func_02001ccc(11);
+ Call2(Func_02002410, 0x8008, 0);
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x200;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c8)) = 64;
+ base3_2000240 = (s32)Data_02000240;
+ *(u8 *)((base3_2000240 + 0x22b)) = 3;
+ Func_02002490((s32)Data_0000002d, 19);
+ Func_02002490(36, 0);
+ Func_020023cc();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_399_sequence_b.c b/games/gs1/src/overlays/scene_primary_script/run_scene_399_sequence_b.c
new file mode 100644
index 000000000..647c7c9b5
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_399_sequence_b.c
@@ -0,0 +1,374 @@
+#include "types.h"
+
+#define FieldScene_RunScene399SequenceB Func_02000f90
+
+extern u8 Data_0200a74c[];
+extern u8 Data_0200a5ec[];
+extern u8 Data_0200a760[];
+extern u8 Data_03001ebc[];
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02002800();
+void Func_0200312a();
+void Func_020031c4();
+void Func_02003248();
+void Func_02003252();
+void Func_0200325c();
+s32 Func_02003270();
+s32 Func_02003284();
+void Func_020032a6();
+void Func_020032c2();
+void Func_020032d2();
+void Func_020032dc();
+void Func_020032e6();
+void Func_020032ec();
+void Func_020032ee();
+void Func_020032fa();
+void Func_020032fc();
+void Func_02003302();
+void Func_0200331c();
+void Func_0200331e();
+s32 Func_02003322();
+void Func_02003332();
+void Func_02003342();
+void Func_02003352();
+void Func_0200336a();
+void Func_0200336e();
+void Func_02003374();
+void Func_0200337e();
+void Func_0200338a();
+s32 Func_0200338c();
+void Func_02003392();
+void Func_020033a0();
+void Func_020033b2();
+void Func_020033b8();
+void Func_020033c4();
+void Func_020033c8();
+void Func_020033d2();
+void Func_020033da();
+void Func_020033dc();
+void Func_020033e0();
+void Func_020033e4();
+void Func_020033ee();
+void Func_020033f8();
+void Func_02003400();
+void Func_0200340a();
+void Func_0200340c();
+void Func_02003420();
+void Func_02003436();
+void Func_0200343c();
+void Func_02003440();
+void Func_02003442();
+void Func_02003448();
+void Func_0200344e();
+void Func_02003458();
+void Func_0200345c();
+void Func_02003460();
+void Func_02003466();
+void Func_0200346e();
+void Func_02003472();
+void Func_0200347a();
+void Func_02003480();
+u8 *Func_02003482();
+void Func_02003484();
+void Func_02003490();
+void Func_02003498();
+void Func_020034a0();
+void Func_020034a2();
+void Func_020034b8();
+void Func_020034d2();
+s32 Func_020034d6();
+void Func_020034e0();
+void Func_020034f0();
+void Func_020034f2();
+void Func_020034fa();
+void Func_02003510();
+void Func_02003518();
+void Func_0200351a();
+void Func_0200351c();
+void Func_02003554();
+void Func_02003558();
+void Func_02003580();
+void Func_02003598();
+void Func_020035a4();
+void Func_020035b2();
+void Func_020035d4();
+void Func_020035e2();
+void Func_020035ea();
+void Func_020035f2();
+u8 *Func_02003616();
+void Func_02003618();
+void Func_0200361c();
+void Func_02003622();
+void Func_02003630();
+s32 Func_02003632();
+void Func_02003634();
+void Func_02003638();
+void Func_0200365a();
+void Func_02003662();
+void Func_02003670();
+void Func_02003676();
+void Func_0200367c();
+void Func_02003684();
+void Func_0200368a();
+void Func_02003692();
+s32 Func_02003696();
+void Func_020036a4();
+s32 Func_020036a8();
+void Func_020036b0();
+s32 Func_020036b8();
+void Func_020036bc();
+void Func_020036c8();
+void Func_020036ca();
+void Func_020036d0();
+void Func_020036ec();
+u8 *Func_020036f0();
+void Func_020036fa();
+void Func_020036fc();
+u8 *Func_02003700();
+void Func_02003704();
+u8 *Func_0200370e();
+void Func_02003720();
+void Func_02003728();
+void Func_0200372c();
+void Func_02003732();
+void Func_02003738();
+void Func_0200373c();
+void Func_0200374e();
+void Func_0200375c();
+void Func_0200376e();
+void Func_02003830();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene399SequenceB(void)
+{
+ u32 i;
+ u8 *record;
+ s32 base5_200a74c;
+ s32 base5_200a5ec;
+ s32 base5_200a760;
+
+ Func_020031c4();
+ Call3(Func_02003252, 3, 0xb60000, 0x960000);
+ Call4(Func_020032fc, 0x8d0000, -1, 0xdd0000, 0);
+ Func_0200312a(1);
+ Call2(Func_02003302, 0x4ccc, 0x999);
+ Call4(Func_0200331c, 0x8c0000, -1, 0xa40000, 1);
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c0)) = 0x100;
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c8)) = 40;
+ Func_0200336e();
+ Call3(Func_02003248, 0, 0x6666, 0x3333);
+ Call3(Func_02003252, 1, 0x6666, 0x3333);
+ Call3(Func_0200325c, 2, 0x6666, 0x3333);
+ Func_020032a6(0, 142, 221);
+ Call3(Func_02003342, 0, 0xd000, 0);
+ record = Value1(Func_02003270, 0);
+ if (record != 0) {
+ Func_020032e6(1, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ record = Value1(Func_02003284, 0);
+ if (record != 0) {
+ Func_020032fa(2, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Func_020032dc(1, 150, 234);
+ Func_020032ee(2, 134, 234);
+ Func_0200331e(1, 1);
+ base5_200a74c = (s32)Data_0200a74c;
+ Call3(Func_0200336a, 0, 0x10003, base5_200a74c);
+ Call3(Func_02003374, 1, 0x10003, base5_200a74c);
+ Call3(Func_0200337e, 2, 0x10003, base5_200a74c);
+ Func_020033da();
+ base5_200a5ec = (s32)Data_0200a5ec;
+ Func_020032ec(9, base5_200a5ec);
+ Func_020032c2(40);
+ Call2(Func_020033dc, 3, 0x102);
+ Func_020032d2(40);
+ Func_0200338a(3, 1);
+ Call1(Func_020033b8, 0x155c);
+ Func_020033d2(3, 0, 20);
+ Value2(Func_02003322, 9, base5_200a5ec);
+ Func_020033e4(9, 0, 20);
+ Call3(Func_02003400, 3, 0x8000, 20);
+ Func_0200340a(8, 0, 10);
+ Func_020033b2(8, 4);
+ Func_0200340c(8, 0, 40);
+ Func_020033c4(3, 3);
+ Func_02003332(10);
+ Call3(Func_02003436, 3, 0x4000, 0);
+ Call3(Func_02003442, 8, 0x3000, 20);
+ Func_0200343c(3, 0, 10);
+ Value2(Func_0200338c, 9, base5_200a5ec);
+ Func_02002800();
+ Call3(Func_02003472, 3, 0x101, 60);
+ Func_0200345c(3, 0, 40);
+ Func_02003466(9, 0, 20);
+ Call3(Func_02003490, 8, 0x105, 60);
+ Func_02003420(9, 7);
+ Call3(Func_02003352, 0x200b1c0, 10, 69);
+ Func_020033a0(10);
+ Func_02003458(3, 2);
+ Func_02003448(3, 4);
+ Func_020034a2(3, 0, 20);
+ Func_02003472(9, 1);
+ Func_020033c8(40);
+ Func_02003460(9, 8);
+ Call3(Func_02003392, 0x200b1d6, 10, 69);
+ Func_020033e0(40);
+ Func_02003480(3, 3);
+ Func_020033ee(20);
+ Func_020034f0(8, 0, 20);
+ Func_02003498(8, 3);
+ Func_020034f2(8, 0, 10);
+ Call3(Func_0200351c, 3, 0x101, 30);
+ Call3(Func_02003518, 3, 0x8000, 10);
+ Func_020034b8(3, 4);
+ Func_0200351a(3, 0, 10);
+ Func_020034d2(8, 3);
+ Func_02003440(20);
+ Func_020034e0(3, 3);
+ Func_0200344e(40);
+ Call3(Func_02003484, 3, 0x10000, 0x8000);
+ {
+ u8 *record = Func_02003482(3);
+ s32 shown = 0;
+
+ *(u16 *)(record + 100) = shown;
+ }
+ Call2(Func_020034a0, 3, 0x200a670);
+ while (*(s16 *)(Func_020034d6(3) + 100) == 0) {
+ Func_020033f8(1);
+ }
+ Call4(Func_020035f2, 0x8c0000, -1, 0xc60000, 1);
+ Func_02003510(3);
+ Call3(Func_020035ea, 3, 0x101, 80);
+ Func_020035d4(3, 0, 40);
+ Func_020035a4(3, 1);
+ Func_020034fa(10);
+ Func_020035e2(3, 0);
+ Func_020036c8(131);
+ Call2(Func_0200365a, 0x10000, 0);
+ Call2(Func_0200365a, 0x207e9f, 0);
+ Func_02003670(10);
+ Func_0200346e(1);
+ Func_020036ec(220);
+ Func_0200347a(40);
+ Call2(Func_0200367c, 0x10000, 0);
+ Func_02003692(60);
+ Func_02003490(60);
+ Call2(Func_02003662, 3, 0x102);
+ Func_02003558(20);
+ Func_0200365a(3, 0, 10);
+ Call3(Func_02003598, 3, 0x20000, 0x10000);
+ Func_020035e2(3, 202, 198);
+ Func_02003580(40);
+ Func_02003638(3, 2);
+ Func_02003670(3, 0);
+ Func_02003630(3, 4);
+ Func_0200368a(3, 0, 20);
+ Call2(Func_020036bc, 3, 0x102);
+ Func_020035b2(40);
+ Func_020036a4(3, 0, 40);
+ Call3(Func_020036d0, 3, 0x100, 40);
+ Func_020036b0(3, 0);
+ Call1((void (*)())Func_02003616, 0);
+ Func_0200361c(1);
+ Func_02003622(2);
+ Call3(Func_02003618, 3, 0x30000, 0x18000);
+ {
+ u8 *record = Func_02003616(3);
+ s32 shown = 0;
+
+ *(u16 *)(record + 100) = shown;
+ }
+ Call2(Func_02003634, 3, 0x200a6e0);
+ while (*(s16 *)(Func_02003632(3) + 100) == 0) {
+ Func_02003554(1);
+ }
+ Call3(Func_02003720, 0, 0x4000, 0);
+ Call3(Func_0200372c, 1, 0x4000, 0);
+ Call3(Func_02003738, 2, 0x4000, 10);
+ Call3(Func_02003676, 0, 0x40000, 0x20000);
+ Call3(Func_02003684, 1, 0x40000, 0x20000);
+ Call3(Func_02003692, 2, 0x40000, 0x20000);
+ Func_02003830(152);
+ *(u8 *)(Func_02003696(0) + 90) &= 254;
+ *(u8 *)(Func_020036a8(1) + 90) &= 254;
+ *(u8 *)(Func_020036b8(2) + 90) &= 254;
+ Func_020036fa(0, 132, 206);
+ Func_02003704(1, 136, 221);
+ Call3((void (*)())Func_0200370e, 2, 122, 238);
+ Func_020036fc(3);
+ Func_020036ca(80);
+ {
+ u8 *record = Func_020036f0(0);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ {
+ u8 *record = Func_02003700(1);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ {
+ u8 *record = Func_0200370e(2);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ Call3(Func_02003728, 0, 0xcccc, 0x6666);
+ Call3(Func_02003732, 1, 0xcccc, 0x6666);
+ Call3(Func_0200373c, 2, 0xcccc, 0x6666);
+ base5_200a760 = (s32)Data_0200a760;
+ Func_0200374e(1, base5_200a760);
+ Func_0200376e(2, base5_200a760);
+ Func_0200372c(20);
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c0)) = 0x209;
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c8)) = 24;
+ Call1(Func_02003738, 0x82b);
+ Func_0200375c();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_b.c b/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_b.c
new file mode 100644
index 000000000..17217587d
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_b.c
@@ -0,0 +1,38 @@
+#include "types.h"
+
+#define FieldScene_RunScene39aSequenceB Func_02001a34
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0000003f[];
+extern u8 Data_00000040[];
+extern s16 Data_02000240[];
+void Func_02003530();
+void Func_0200353c();
+void Func_02003562();
+s32 Func_02003d9e();
+
+void FieldScene_RunScene39aSequenceB(void)
+{
+ u8 *work;
+ s16 *table;
+ s16 scene;
+
+ work = *(u8 **)0x03001ebc;
+ table = Data_02000240;
+ scene = *(s16 *)(work + 0x16c);
+ if (table[0xE0] == (s32)Data_0000003f) {
+ if (scene == 17) {
+ Func_02003530(0, -32);
+ } else {
+ Func_0200353c(-32, 0);
+ }
+ }
+ if (table[0xE0] == (s32)Data_00000040) {
+ if (scene == 25) {
+ if (Func_02003d9e(0x309) != 0) {
+ Func_02003562(0, 32);
+ }
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_c.c b/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_c.c
new file mode 100644
index 000000000..2432bd862
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_c.c
@@ -0,0 +1,56 @@
+#include "types.h"
+
+#define FieldScene_RunScene39aSequenceC Func_02001948
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0000003e[];
+extern u8 Data_0000003f[];
+extern u8 Data_00000040[];
+extern u8 Data_00000041[];
+extern u8 Data_02000240[];
+void Func_020029c4();
+void Func_02002ae8();
+void Func_02002c8e();
+void Func_02002ff2();
+void Func_02003c60();
+void Func_02003c80();
+void Func_02003cae();
+void Func_02003cec();
+void Func_02003d02();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+void FieldScene_RunScene39aSequenceC(void)
+{
+ u8 *base;
+ s32 val;
+
+ base = Data_02000240;
+ val = *(s16 *)(base + 0x1c0);
+ if (val == (s32)Data_0000003e) {
+ Call6(Func_02003c60, 8, 29, 15, 5, 8, 42);
+ Func_020029c4();
+ } else if (val == (s32)Data_0000003f) {
+ Call6(Func_02003c80, 12, 8, 10, 18, 0, 28);
+ Func_02002ae8();
+ } else if (val == (s32)Data_00000040 && *(s16 *)(base + 0x1c2) != 1) {
+ Call6(Func_02003cae, 12, 21, 9, 16, 12, 3);
+ Func_02002c8e();
+ } else if (*(s16 *)(base + 0x1c0) == (s32)Data_00000041) {
+ if ((u32)((*(u16 *)(base + 0x1c2) - 1) << 16) <= 0x10000) {
+ Call6(Func_02003cec, 14, 10, 9, 8, 22, 20);
+ } else {
+ Call6(Func_02003d02, 7, 45, 11, 4, 20, 45);
+ }
+ Func_02002ff2();
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_d.c b/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_d.c
new file mode 100644
index 000000000..916422cae
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_39a_sequence_d.c
@@ -0,0 +1,133 @@
+#include "types.h"
+
+#define FieldScene_RunScene39aSequenceD Func_020017e4
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00000040[];
+extern u8 Data_00000043[];
+extern u8 Data_02000240[];
+extern s32 Data_0200b328;
+extern u8 *Data_03001ee0;
+s32 Func_02002718();
+void Func_02002726();
+void Func_02003132();
+void Func_02003334();
+s32 Func_02003b1a();
+void Func_02003b7c();
+u8 *Func_02003bac();
+void Func_02003bb6();
+void Func_02003bc8();
+s32 Func_02003be0();
+void Func_02003c02();
+s32 Func_02003c0a();
+void Func_02003c88();
+void Func_02003c94();
+void Func_02003cc0();
+void Func_02003cd6();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+static __inline__ s32 Value4(s32 (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ return f(a0, a1, a2, a3);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene39aSequenceD(void)
+{
+ u8 *base;
+ u8 *record;
+ s32 val;
+ s32 y;
+
+ Func_02003132();
+ base = Data_02000240;
+ val = *(s16 *)(base + 0x1c0);
+ if (val == (s32)Data_00000040) {
+ if (Value1(Func_02003b1a, 0xf13) == 0) {
+ if (*(s16 *)(base + 0x1c2) == 1) {
+ Func_02003334();
+ }
+ }
+ {
+ u8 *p = Data_02000240;
+ if ((u32)((*(u16 *)(p + 0x1c2) - 2) << 16) <= 0x30000) {
+ y = 0x1c40000;
+ Value4(Func_02002718, 0x9c0000, 0, y, 223);
+ Call4(Func_02002726, 0xbc0000, 0, y, 223);
+ }
+ }
+ } else if (val == (s32)Data_00000043) {
+ record = Func_02003bac(8);
+ y = 0;
+ Data_0200b328 = y;
+ record[85] = (u8)y;
+ *(s32 *)(record + 12) = y;
+ Value2(Func_02003c0a, 8, 1);
+ Call2(Func_02003c02, 8, 15);
+ switch (*(s16 *)(base + 0x1c2)) {
+ case 1:
+ case 2:
+ Func_02003c88(0);
+ Data_0200b328 = 1;
+ break;
+ case 5:
+ Func_02003c94(0);
+ Data_0200b328 = 1;
+ y = (s32)Data_03001ee0;
+ *(s32 *)(y + 24) = 0;
+ break;
+ }
+ {
+ u8 *q = Data_02000240;
+ if (*(s16 *)(q + 0x1c2) <= 6) {
+ if (Value1(Func_02003be0, 0x820) != 0) {
+ Call6(Func_02003bb6, 30, 57, 19, 57, 1, 1);
+ Call6(Func_02003bc8, 30, 8, 12, 8, 8, 7);
+ } else {
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x100;
+ Call2(Func_02003cc0, 0x203108, 1);
+ Call2(Func_02003cc0, 0x203108, 1);
+ Func_02003cd6(1);
+ Func_02003b7c(1);
+ }
+ }
+ }
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_39e_second_ensemble_beat.c b/games/gs1/src/overlays/scene_primary_script/run_scene_39e_second_ensemble_beat.c
new file mode 100644
index 000000000..aefecaa3d
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_39e_second_ensemble_beat.c
@@ -0,0 +1,515 @@
+#include "types.h"
+
+#define FieldScene_RunSecondEnsembleBeat Func_02001494
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_0200585e();
+void Func_02005874();
+void Func_02005898();
+void Func_020058c2();
+void Func_020058ea();
+void Func_0200590c();
+void Func_02005924();
+void Func_02005926();
+void Func_02005930();
+void Func_02005934();
+void Func_0200593a();
+void Func_02005976();
+void Func_02005982();
+void Func_02005984();
+void Func_02005990();
+void Func_0200599c();
+void Func_020059a0();
+void Func_020059a6();
+void Func_020059a8();
+void Func_020059ac();
+void Func_020059b2();
+void Func_020059b4();
+void Func_020059be();
+s32 Func_020059c6();
+void Func_020059d0();
+void Func_020059d4();
+u8 *Func_020059ea();
+void Func_02005a06();
+void Func_02005a0e();
+void Func_02005a1c();
+void Func_02005a34();
+void Func_02005a48();
+void Func_02005a54();
+void Func_02005a9a();
+void Func_02005aa2();
+void Func_02005aa4();
+void Func_02005aae();
+void Func_02005ab8();
+void Func_02005ac2();
+void Func_02005acc();
+void Func_02005ad6();
+void Func_02005ae0();
+void Func_02005ae8();
+void Func_02005aea();
+void Func_02005af0();
+void Func_02005af8();
+void Func_02005b00();
+void Func_02005b04();
+void Func_02005b08();
+void Func_02005b10();
+void Func_02005b12();
+void Func_02005b18();
+void Func_02005b28();
+void Func_02005b30();
+void Func_02005b42();
+void Func_02005b4c();
+void Func_02005b5a();
+void Func_02005b68();
+void Func_02005b80();
+void Func_02005b8a();
+void Func_02005b8e();
+void Func_02005b9e();
+void Func_02005ba8();
+void Func_02005bb2();
+void Func_02005bbc();
+void Func_02005bc6();
+void Func_02005bcc();
+void Func_02005bd0();
+void Func_02005bd2();
+void Func_02005bda();
+void Func_02005be4();
+void Func_02005bea();
+void Func_02005bee();
+void Func_02005bf4();
+void Func_02005c02();
+void Func_02005c10();
+void Func_02005c28();
+void Func_02005c52();
+void Func_02005c54();
+void Func_02005c56();
+void Func_02005c6c();
+void Func_02005c78();
+void Func_02005c80();
+void Func_02005c82();
+void Func_02005c84();
+void Func_02005c8e();
+void Func_02005c92();
+void Func_02005c94();
+void Func_02005c9a();
+void Func_02005ca4();
+void Func_02005cb2();
+void Func_02005cbc();
+void Func_02005cc2();
+void Func_02005cc8();
+void Func_02005cd4();
+void Func_02005cd8();
+void Func_02005ce6();
+void Func_02005cec();
+void Func_02005cfa();
+void Func_02005d1c();
+void Func_02005d22();
+void Func_02005d2e();
+void Func_02005d38();
+void Func_02005d4a();
+void Func_02005d5c();
+void Func_02005d6c();
+void Func_02005d84();
+void Func_02005d86();
+void Func_02005d94();
+void Func_02005d9a();
+void Func_02005da0();
+void Func_02005dac();
+void Func_02005db0();
+void Func_02005db2();
+void Func_02005dc4();
+void Func_02005dce();
+void Func_02005dd6();
+void Func_02005dde();
+void Func_02005dec();
+void Func_02005df4();
+void Func_02005dfa();
+void Func_02005e00();
+void Func_02005e02();
+void Func_02005e0e();
+void Func_02005e16();
+void Func_02005e18();
+void Func_02005e1a();
+void Func_02005e26();
+void Func_02005e2e();
+void Func_02005e32();
+void Func_02005e34();
+void Func_02005e3c();
+void Func_02005e42();
+void Func_02005e46();
+void Func_02005e50();
+void Func_02005e5c();
+void Func_02005e5e();
+void Func_02005e60();
+void Func_02005e66();
+void Func_02005e74();
+void Func_02005e7e();
+void Func_02005e8c();
+void Func_02005e96();
+void Func_02005e9c();
+void Func_02005eb4();
+void Func_02005ece();
+void Func_02005ed6();
+void Func_02005edc();
+void Func_02005ee0();
+void Func_02005ee4();
+void Func_02005eec();
+void Func_02005ef6();
+void Func_02005efe();
+void Func_02005f04();
+void Func_02005f0c();
+void Func_02005f0e();
+void Func_02005f2c();
+u8 *Func_02005f36();
+u8 *Func_02005f42();
+void Func_02005f46();
+u8 *Func_02005f4e();
+u8 *Func_02005f58();
+void Func_02005f5e();
+void Func_02005f6a();
+void Func_02005f76();
+void Func_02005f78();
+void Func_02005f7e();
+void Func_02005fa8();
+void Func_02005fb8();
+void Func_02005fc4();
+void Func_02005fd4();
+void Func_0200600c();
+void Func_02006018();
+void Func_02006020();
+s32 Func_02006026();
+void Func_02006028();
+void Func_02006032();
+void Func_0200603c();
+void Func_02006046();
+void Func_0200604a();
+void Func_02006050();
+void Func_02006054();
+void Func_02006056();
+void Func_0200605a();
+void Func_02006064();
+void Func_0200606e();
+void Func_02006078();
+void Func_02006084();
+s32 Func_02006086();
+s32 Func_020060b2();
+void Func_020060c6();
+s32 Func_020060ce();
+void Func_020060d0();
+void Func_020060d4();
+void Func_020060de();
+void Func_020060e6();
+void Func_020060f0();
+void Func_020060fa();
+s32 Func_0200612e();
+void Func_02006134();
+void Func_02006138();
+void Func_02006156();
+void Func_0200615c();
+void Func_0200616e();
+void Func_02006174();
+void Func_02006184();
+void Func_0200618c();
+void Func_020061be();
+void Func_020061e0();
+void Func_020061ec();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(u8 **slot, s32 amount)
+{
+ u8 *work = *slot;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunSecondEnsembleBeat(void)
+{
+ u32 i;
+ u8 *record;
+ u8 **scene;
+
+ Call1(Func_0200585e, 0x89a);
+ Func_02005874(30);
+ Func_02005926(13, 0, 0);
+ Func_02005930(15, 0, 0);
+ Func_0200593a(16, 0, 0);
+ Func_02005898(20);
+ Call3(Func_0200599c, 13, 0x100, 0);
+ Call3(Func_020059a8, 15, 0x100, 0);
+ Call3(Func_020059b4, 16, 0x100, 0);
+ Func_020058c2(60);
+ Call1(Func_02005990, 0x183b);
+ Func_020059b2(13, 0, 20);
+ Func_02005984(0, 13, 0);
+ Func_02005984(15, 1);
+ Func_020058ea(20);
+ Func_020059d4(15, 0, 20);
+ Func_020059a6(0, 15, 0);
+ Func_020059a6(16, 2);
+ Func_0200590c(20);
+ Func_020059be(0, 16, 0);
+ Func_02005a06(16, 0);
+ Func_02005924(50);
+ Func_02005a34(16, 1);
+ Call3(Func_02005976, 16, 0xcccc, 0x6666);
+ Func_020059a0(16, 176, 248);
+ Call3(Func_020059ac, 16, 0x134, 248);
+ Call3(Func_02005a48, 0, 0x2000, 0);
+ Call3(Func_02005a54, 16, 0xc000, 20);
+ Func_02005b12(158);
+ Call3(Func_02005934, 0x200c77a, 78, 13);
+ Func_02005a1c(16, 2);
+ Func_02005982(20);
+ Call3(Func_020059d0, 16, 0x18000, 0xc000);
+ *(u8 *)(Func_020059c6(16) + 90) &= 254;
+ Call3(Func_02005a0e, 16, 0x134, 0x110);
+ Func_020059b4(1);
+ {
+ u8 *record = Func_020059ea(16);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ Func_02005aae(16, 0, 50);
+ Call3(Func_02005a54, 17, 0x1300000, 0xd80000);
+ Call3(Func_02005a48, 17, 0x130, 248);
+ Func_02005a9a(9, 17, 0);
+ Func_02005aa4(10, 17, 0);
+ Func_02005aae(11, 17, 0);
+ Func_02005ab8(12, 17, 0);
+ Func_02005ac2(13, 17, 0);
+ Func_02005acc(14, 17, 0);
+ Func_02005ad6(15, 17, 0);
+ Func_02005ae0(16, 17, 0);
+ Func_02005aea(0, 17, 0);
+ Func_02005a48(10);
+ Func_02005ae8(9, 2);
+ Func_02005af0(10, 2);
+ Func_02005af8(11, 2);
+ Func_02005b00(12, 2);
+ Func_02005b08(13, 2);
+ Func_02005b10(14, 2);
+ Func_02005b18(15, 2);
+ Func_02005b28(16, 2);
+ Call3(Func_02005b8a, 17, 0x103, 60);
+ Call3(Func_02005b18, 18, 0x1300000, 0xd80000);
+ Call3(Func_02005b04, 18, 0x130, 248);
+ Call3(Func_02005b12, 17, 0x118, 0x108);
+ Func_02005b30(18);
+ Call3(Func_02005bbc, 18, 0x5000, 0);
+ Func_02005b42(17);
+ Func_02005c80(159);
+ Call3(Func_02005aa2, 0x200c790, 78, 13);
+ Func_02005bcc(18, 0, 20);
+ Func_02005b9e(9, 17, 0);
+ Func_02005ba8(10, 17, 0);
+ Func_02005bb2(11, 17, 0);
+ Func_02005bbc(12, 17, 0);
+ Func_02005bc6(13, 17, 0);
+ Func_02005bd0(14, 17, 0);
+ Func_02005bda(15, 17, 0);
+ Func_02005be4(16, 17, 0);
+ Func_02005bee(0, 17, 0);
+ Func_02005b4c(10);
+ Func_02005bf4(17, 2);
+ Func_02005b5a(20);
+ Func_02005bea(18, 4);
+ Func_02005b68(20);
+ Func_02005c52(18, 0, 20);
+ Func_02005c02(17, 3);
+ Func_02005b80(20);
+ Func_02005c28(18, 1);
+ Func_02005b8e(20);
+ Func_02005c78(18, 0, 20);
+ Call3(Func_02005c94, 17, 0xd000, 20);
+ Func_02005c8e(17, 0, 20);
+ Call3(Func_02005cb2, 18, 0x102, 60);
+ Func_02005ca4(18, 0, 20);
+ Func_02005c54(17, 3);
+ Func_02005bd2(20);
+ Func_02005cbc(17, 0, 20);
+ Func_02005c6c(18, 3);
+ Func_02005bea(20);
+ Func_02005cd4(18, 0, 20);
+ Func_02005c84(17, 3);
+ Func_02005c02(20);
+ Func_02005c92(18, 4);
+ Func_02005c10(20);
+ Func_02005cfa(18, 0, 20);
+ Func_02005cc2(17, 2);
+ Func_02005c28(20);
+ Func_02005d22(17, 0, 20);
+ Func_02005d1c(17, 0, 20);
+ Call3(Func_02005d38, 16, 0x8000, 20);
+ Func_02005cd8(16, 3);
+ Func_02005c56(20);
+ Func_02005ce6(17, 3);
+ Func_02005c82(20);
+ Func_02005d6c(17, 0, 20);
+ Func_02005d1c(16, 3);
+ Func_02005c9a(20);
+ Func_02005d84(16, 0, 20);
+ Call3(Func_02005da0, 17, 0x8000, 20);
+ Func_02005d9a(17, 0, 20);
+ Func_02005d4a(9, 3);
+ Func_02005cc8(20);
+ Func_02005db2(9, 0, 20);
+ Call3(Func_02005dce, 17, 0xd000, 20);
+ Func_02005d86(17, 1);
+ Func_02005cec(20);
+ Func_02005dd6(17, 0, 20);
+ Call3(Func_02005dfa, 18, 0x102, 60);
+ Func_02005dec(18, 0, 20);
+ Call3(Func_02005e0e, 17, 0x101, 60);
+ Func_02005e00(17, 0, 20);
+ Func_02005db0(18, 3);
+ Func_02005d2e(20);
+ Func_02005e18(18, 0, 20);
+ Call3(Func_02005e3c, 17, 0x100, 60);
+ Func_02005e2e(17, 0, 20);
+ Func_02005dde(18, 4);
+ Func_02005d5c(20);
+ Call3(Func_02005e5e, 17, 0x103, 60);
+ Func_02005e50(17, 0, 20);
+ Call3(Func_02005e74, 18, 0x100, 60);
+ Func_02005e66(18, 0, 20);
+ Func_02005e16(17, 4);
+ Func_02005d94(20);
+ Func_02005e7e(17, 0, 20);
+ Func_02005e46(18, 2);
+ Func_02005dac(20);
+ Func_02005e96(18, 0, 20);
+ Func_02005e5e(17, 2);
+ Func_02005dc4(10);
+ Call3(Func_02005e32, 17, 0x100, 0x118);
+ Call3(Func_02005ece, 17, 0x4000, 20);
+ Func_02005e60(17, 0, 0);
+ Func_02005e26(17);
+ Func_02005df4(30);
+ Func_02005e9c(9, 2);
+ Func_02005e02(20);
+ Func_02005eec(9, 0, 20);
+ Func_02005eb4(15, 2);
+ Func_02005e1a(20);
+ Func_02005f04(15, 0, 20);
+ Func_02005ed6(16, 18, 0);
+ Func_02005e34(20);
+ Func_02005edc(16, 2);
+ Func_02005e42(20);
+ Func_02005f2c(16, 0, 20);
+ Func_02005efe(18, 16, 0);
+ Func_02005e5c(20);
+ Func_02005f46(18, 0, 20);
+ Func_02005ef6(18, 4);
+ Func_02005e74(20);
+ Func_02005f5e(18, 0, 20);
+ Func_02005f0e(18, 3);
+ Func_02005e8c(20);
+ Func_02005f76(18, 0, 20);
+ Call3(Func_02005ee0, 18, 0xcccc, 0x6666);
+ Call3(Func_02005f0c, 18, 0x100, 248);
+ Call3(Func_02005fa8, 18, 0xc000, 20);
+ Call2((void (*)())Func_02005f58, 18, 1);
+ Call3(Func_02005fc4, 18, 0x100, 60);
+ Call3((void (*)())Func_02005f36, 18, 240, 184);
+ Func_02005f7e(18, 2);
+ Func_02005ee4(20);
+ Call3(Func_02005f6a, 19, 0xe80000, 0xa80000);
+ Call3(Func_02005f78, 20, 0xe80000, 0xa80000);
+ record = Func_02005f36(19);
+ *(s32 *)(record + 12) = 0xc0000;
+ record = Func_02005f42(19);
+ *(s32 *)(record + 60) = -0x80000000;
+ record = Func_02005f4e(19);
+ *(s32 *)(record + 24) = 0xcccc;
+ record = Func_02005f58(19);
+ {
+ s32 slot = *(s32 *)(record + 80);
+ s32 shown = 0x8000;
+
+ *(u16 *)(slot + 30) = shown;
+ }
+ Func_020060de(124);
+ Func_02006020(18, 0, 20);
+ Call3(Func_0200603c, 0, 0xc000, 20);
+ Call3(Func_02005fb8, 16, 0x100, 240);
+ Call3(Func_02006054, 16, 0xb000, 20);
+ Func_0200600c(16, 1);
+ Func_02006056(16, 0, 20);
+ Func_02006028(9, 0, 0);
+ Func_02006032(10, 0, 0);
+ Func_0200603c(11, 0, 0);
+ Func_02006046(12, 0, 0);
+ Func_02006050(13, 0, 0);
+ Func_0200605a(14, 0, 0);
+ Func_02006064(15, 0, 0);
+ Func_0200606e(16, 0, 0);
+ Func_0200606e(18, 2);
+ Func_02005fd4(20);
+ Call3(Func_020060d0, 18, 0x5000, 20);
+ Func_0200604a(18, 248, 208);
+ Call3(Func_020060e6, 18, 0x5000, 20);
+ Value2(Func_020060ce, 18, 0);
+ if (Value2(Func_02006026, 0, 0) == 0) {
+ Value2(Func_020060b2, 16, 1);
+ Func_02006018(20);
+ Func_0200616e(16, 0, 20);
+ Call1(Func_02006084, 0x898);
+ goto L_02001d12;
+ } else {
+ scene = (u8 **)0x03001ebc;
+ bump_step(scene, 1);
+ Func_02006032(20);
+ Call3(Func_02006134, 18, 0x105, 60);
+ Call3(Func_02006138, 18, 0x4000, 20);
+ Func_020060f0(16, 2);
+ Func_02006056(20);
+ Value2(Func_0200612e, 16, 0);
+ if (Value2(Func_02006086, 0, 0) == 0) {
+ Func_020060fa(16, 3);
+ Func_02006078(20);
+ Call3(Func_02006174, 18, 0xb000, 20);
+ Func_0200616e(18, 0, 20);
+ Call1(Func_02006084, 0x898);
+ goto L_02001d12;
+ }
+ }
+ bump_step(scene, 1);
+ Func_020060c6(20);
+ Func_02006156(18, 4);
+ Func_020060d4(20);
+ Func_020061be(18, 0, 20);
+ Call1(Func_020060d4, 0x899);
+ L_02001d12:;
+ Call3(Func_020061e0, 10, 0x8000, 0);
+ Call3(Func_020061ec, 11, 0x8000, 20);
+ Func_02006184(10, 5);
+ Func_0200618c(11, 5);
+ Func_0200615c(12, 0x200c638);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_39e_sequence_b.c b/games/gs1/src/overlays/scene_primary_script/run_scene_39e_sequence_b.c
new file mode 100644
index 000000000..46e5a834d
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_39e_sequence_b.c
@@ -0,0 +1,82 @@
+#include "types.h"
+
+#define FieldScene_RunScene39eSequenceB Func_02000658
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02004a28();
+void Func_02004a3a();
+void Func_02004a48();
+void Func_02004a5c();
+void Func_02004a76();
+void Func_02004a9c();
+void Func_02004aa4();
+void Func_02004abe();
+void Func_02004aea();
+void Func_02004af0();
+void Func_02004af6();
+void Func_02004b16();
+void Func_02004b36();
+void Func_02004b40();
+void Func_02004b58();
+void Func_02004b7a();
+void Func_02004b7e();
+void Func_02004b86();
+void Func_02004ba0();
+void Func_02004ba8();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene39eSequenceB(void)
+{
+ u32 i;
+ s32 record;
+
+ Func_02004a3a();
+ Call1(Func_02004a28, 0x894);
+ Func_02004aea(9, 0, 0);
+ Func_02004a48(10);
+ Call1(Func_02004b16, 0x17b7);
+ Func_02004af6(9, 2);
+ Func_02004a5c(20);
+ Call3(Func_02004b58, 0, 0x8000, 20);
+ Func_02004b58(9, 0);
+ Func_02004a76(10);
+ Call3(Func_02004b7a, 9, 0x100, 80);
+ Call3(Func_02004b7e, 9, 0xd000, 20);
+ Func_02004b36(9, 2);
+ Func_02004a9c(20);
+ Func_02004b86(9, 0, 20);
+ Func_02004ba0(9, 0, 20);
+ Func_02004b40(9, 3);
+ Func_02004abe(20);
+ Func_02004ba8(9, 0, 20);
+ Call6(Func_02004aa4, 10, 26, 1, 1, 10, 24);
+ Func_02004af0();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_39e_sequence_c.c b/games/gs1/src/overlays/scene_primary_script/run_scene_39e_sequence_c.c
new file mode 100644
index 000000000..abf49f6fb
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_39e_sequence_c.c
@@ -0,0 +1,265 @@
+#include "types.h"
+
+#define FieldScene_RunScene39eSequenceC Func_0200071c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_0200486a();
+void Func_020048c8();
+void Func_02004902();
+void Func_02004966();
+void Func_02004990();
+void Func_020049f4();
+s32 Func_02004ae4();
+void Func_02004afc();
+void Func_02004b14();
+void Func_02004b4c();
+s32 Func_02004b56();
+void Func_02004b64();
+s32 Func_02004b68();
+void Func_02004b6e();
+void Func_02004b7a();
+void Func_02004b8c();
+void Func_02004bc2();
+void Func_02004bc6();
+s32 Func_02004bd4();
+s32 Func_02004bde();
+void Func_02004be4();
+void Func_02004be6();
+s32 Func_02004bf2();
+void Func_02004c00();
+void Func_02004c0e();
+void Func_02004c10();
+void Func_02004c18();
+void Func_02004c1a();
+void Func_02004c22();
+void Func_02004c3c();
+void Func_02004c48();
+void Func_02004c50();
+void Func_02004c7e();
+void Func_02004c88();
+void Func_02004c8e();
+s32 Func_02004c92();
+s32 Func_02004c9a();
+void Func_02004c9c();
+void Func_02004ca6();
+void Func_02004ca8();
+void Func_02004cc4();
+void Func_02004cd2();
+void Func_02004cd6();
+void Func_02004cda();
+void Func_02004ce4();
+void Func_02004cf2();
+void Func_02004d00();
+void Func_02004d16();
+void Func_02004d1a();
+void Func_02004d24();
+void Func_02004d2a();
+void Func_02004d36();
+s32 Func_02004d3a();
+void Func_02004d46();
+void Func_02004d4c();
+void Func_02004d54();
+void Func_02004d66();
+void Func_02004d78();
+void Func_02004d7a();
+void Func_02004d82();
+void Func_02004d86();
+void Func_02004d94();
+void Func_02004da6();
+s32 Func_02004daa();
+void Func_02004db0();
+void Func_02004db2();
+void Func_02004dc0();
+void Func_02004dc4();
+void Func_02004dda();
+void Func_02004de0();
+void Func_02004df6();
+void Func_02004e1e();
+void Func_02004e20();
+void Func_02004e3e();
+void Func_02004e42();
+void Func_02004e48();
+s32 Func_02004e52();
+void Func_02004e5c();
+void Func_02004e66();
+void Func_02004e6a();
+void Func_02004e74();
+void Func_02004eb8();
+void Func_02004ec6();
+void Func_02004ed6();
+void Func_02004edc();
+void Func_02004ee8();
+void Func_02004efc();
+void Func_02004efe();
+void Func_02004f14();
+void Func_02004f1e();
+void Func_02004f28();
+void Func_02004f34();
+void Func_02004f38();
+void Func_02004f3a();
+void Func_02004f50();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene39eSequenceC(void)
+{
+ u32 i;
+ s32 rec7;
+ s32 record;
+
+ Func_02004afc();
+ rec7 = Value1(Func_02004ae4, 0x300);
+ if (rec7 != 0) {
+ Call3(Func_02004b6e, 0, 168, 0x1f8);
+ Func_02004b14(5);
+ Call3(Func_02004c10, 0, 0xc000, 20);
+ *(u8 *)(Func_02004b56(8) + 91) = 0;
+ Func_02004cda(152);
+ record = Func_02004b68(8);
+ *(s32 *)(record + 40) = 0x80000;
+ Func_02004bc6(8, 1);
+ Func_02004b4c(30);
+ Call1(Func_02004c1a, 0x17ac);
+ } else {
+ Call1(Func_02004c22, 0x179f);
+ Func_0200486a(0, 8);
+ Call1((void (*)())Func_02004b68, 30);
+ Func_02004c48(8, 0);
+ Func_020048c8();
+ Func_02004b7a(20);
+ Call3(Func_02004be6, 0, 168, 0x1f8);
+ Func_02004b8c(5);
+ Call3(Func_02004c88, 0, 0xc000, 20);
+ Func_02004d46(152);
+ *(u8 *)(Func_02004bd4(8) + 91) = rec7;
+ record = Func_02004bde(8);
+ *(s32 *)(record + 40) = 0x80000;
+ Func_02004c3c(8, 1);
+ Func_02004bc2(30);
+ Value2(Func_02004c9a, 8, 0);
+ if (Value2(Func_02004bf2, 0, 0) == 1) {
+ Func_02004c7e(8, 2);
+ Func_02004be4(20);
+ Func_02004cc4(8, 0);
+ Call1((void (*)())Func_02004bf2, 20);
+ Func_02004902(8, 0);
+ Func_02004c00(30);
+ Func_02004ca8(0, 2);
+ Func_02004c0e(50);
+ Func_02004966();
+ Func_02004c18(30);
+ Func_02004ca8(8, 3);
+ Func_02004d00(8, 0);
+ } else {
+ bump_step(2);
+ Func_02004d1a(8, 0);
+ }
+ Func_02004cd2(8, 3);
+ Func_02004c50(30);
+ Call3(Func_02004d54, 8, 0x100, 60);
+ Call1(Func_02004d2a, 0x17a4);
+ Value2(Func_02004d3a, 8, 0);
+ if (Value2(Func_02004c92, 0, 0) == 1) {
+ Call3(Func_02004d78, 8, 0x105, 60);
+ Func_02004990(8, 0);
+ Func_02004c8e(30);
+ Func_02004d36(0, 2);
+ Func_02004c9c(50);
+ Func_020049f4();
+ Func_02004ca6(30);
+ Func_02004d86(8, 0);
+ bump_step(1);
+ } else {
+ bump_step(1);
+ Func_02004cd6(20);
+ Func_02004d66(8, 3);
+ Func_02004ce4(20);
+ Func_02004dc4(8, 0);
+ }
+ Func_02004cf2(20);
+ Func_02004d82(8, 4);
+ Func_02004d00(20);
+ Func_02004de0(8, 0);
+ Func_02004db0(0, 2);
+ Func_02004d16(20);
+ Func_02004df6(8, 0);
+ Func_02004d24(20);
+ Call3(Func_02004e20, 8, 0xc000, 20);
+ Call3(Func_02004d7a, 8, 0x4ccc, 0x2666);
+ Call3(Func_02004da6, 8, 168, 0x1d0);
+ Func_02004d4c(60);
+ Call3(Func_02004e48, 8, 0x4000, 40);
+ Func_02004e42(8, 0, 10);
+ Call3(Func_02004e66, 0, 0x102, 60);
+ Call3(Func_02004dda, 8, 168, 0x1d8);
+ }
+ Value2(Func_02004e52, 8, 0);
+ if (Value2(Func_02004daa, 0, 0) == 1) {
+ Call1(Func_02004e5c, 0x17ab);
+ Func_02004e74(8, 0);
+ Call1(Func_02004d94, 0x300);
+ } else {
+ Call1(Func_02004e74, 0x17ad);
+ Func_02004db2(30);
+ Func_02004e42(8, 3);
+ Func_02004dc0(20);
+ Call2(Func_02004edc, 0x8000, 0x1000);
+ Func_02004efc(8, 1);
+ Call2(Func_02004f1e, 0x10000, 0);
+ Call2(Func_02004f1e, 0x10003, 1);
+ Func_02004f34(30);
+ Func_02004f50();
+ Func_02004f14();
+ Func_02004b64();
+ Call2(Func_02004f3a, 0x10000, 0);
+ Func_02004f50(30);
+ Func_02004ee8(8, 0);
+ Func_02004eb8(8, 2);
+ Func_02004e1e(20);
+ Func_02004efe(8, 0);
+ Func_02004ec6(0, 1);
+ Call2(Func_02004f38, 0, 0x102);
+ Func_02004e3e(60);
+ Func_02004f28(8, 0, 10);
+ Call1(Func_02004e3e, 0x891);
+ }
+ Func_02004ed6(8, 5);
+ Func_02004e6a();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_event_script01.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_event_script01.c
new file mode 100644
index 000000000..020d85345
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_event_script01.c
@@ -0,0 +1,148 @@
+#include "types.h"
+
+#define RunEventScript01 Func_02000924
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+s32 Func_02001dfa();
+void Func_02001e24();
+void Func_02001e48();
+u8 *Func_02001e6e();
+s32 Func_02001e78();
+void Func_02001e92();
+void Func_02001ea2();
+void Func_02001ea4();
+u8 *Func_02001eb4();
+void Func_02001ebc();
+void Func_02001ec8();
+void Func_02001ed2();
+void Func_02001ede();
+void Func_02001eea();
+void Func_02001eee();
+s32 Func_02001f14();
+void Func_02001f2a();
+void Func_02001f3a();
+void Func_02001f3c();
+void Func_02001f3e();
+void Func_02001f48();
+void Func_02001f4a();
+void Func_02001f4e();
+u8 *Func_02001f50();
+void Func_02001f5c();
+void Func_02001f6a();
+void Func_02001f70();
+void Func_02001f76();
+void Func_02001f8c();
+void Func_02001f94();
+void Func_02001fa4();
+void Func_02001fd2();
+void Func_02001fd6();
+void Func_02001fe8();
+void Func_02001ff0();
+void Func_02002014();
+void Func_0200202e();
+void Func_02002030();
+void Func_02002038();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript01(void)
+{
+ u32 i;
+ u8 *record;
+
+ if (Value1(Func_02001dfa, 0x89a) == 0) {
+ } else {
+ Func_02001e24();
+ Call3(Func_02001e92, 10, 0x2180000, 0xd80000);
+ Call1(Func_02001ec8, 0x18b5);
+ Func_02001eea(10, 0, 20);
+ Func_02001ed2(0, 2);
+ Func_02001e48(20);
+ record = Func_02001e6e(0);
+ *(s32 *)(record + 108) = 0x2008055;
+ record = Value1(Func_02001e78, 0);
+ if ((*(s32 *)(record + 16) >> 20) == 13) {
+ Call3(Func_02001ebc, 0, 0x1b8, 200);
+ }
+ Call3(Func_02001ea2, 10, 0x20000, 0x10000);
+ Func_02001f4a(10, 2);
+ Call3(Func_02001ede, 10, 0x198, 216);
+ {
+ u8 *record = Func_02001eb4(10);
+ u8 value = *(volatile u8 *)&record[35];
+
+ record[35] = (u8)(value | 1);
+ }
+ Func_02001ea4(10);
+ Call3(Func_02001f70, 10, 0x8000, 20);
+ Func_02001f6a(10, 0, 20);
+ Func_02001f4a(10, 2);
+ Call2(Func_02001fa4, 10, 0x102);
+ Func_02001ed2(60);
+ Func_02001f8c(10, 0, 20);
+ Value2(Func_02001f14, 10, 0x200962c);
+ Call4(Func_02001fd6, 0x1280000, -1, 0x1580000, 1);
+ Call1(Func_02001eee, 0x8b0);
+ Func_02001f3c(10);
+ Func_02001ff0();
+ Call3(Func_02001f3e, 0, 0x10000, 0x8000);
+ Call2(Func_02001f4e, 0, 0x20096b8);
+ Func_02001f5c(0);
+ Func_02001f2a(10);
+ i = 0;
+ record = Func_02001f50(0);
+ *(s32 *)(record + 108) = i;
+ Func_02001f3a(30);
+ Func_02001fd2(10, 2);
+ Func_02001f48(20);
+ Call3(Func_02002014, 10, 0x5000, 120);
+ Call3(Func_0200202e, 10, 0x105, 60);
+ Call3(Func_02002038, 0, 0x101, 60);
+ Func_02001fe8(10, 4);
+ Func_02001f76(20);
+ Func_02002030(10, 0, 20);
+ Func_02001f94();
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_b.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_b.c
new file mode 100644
index 000000000..e45c376b1
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_b.c
@@ -0,0 +1,63 @@
+#include "types.h"
+
+#define FieldScene_RunScene3a2SequenceB Func_02000ac0
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02001fb4();
+s32 Func_02001fe4();
+void Func_02001fe6();
+void Func_02001ff4();
+void Func_02002012();
+void Func_0200204a();
+s32 Func_02002064();
+void Func_02002066();
+void Func_0200208c();
+void Func_020020ae();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene3a2SequenceB(void)
+{
+ u32 i;
+ s32 record;
+
+ Func_02001fb4();
+ Call1(Func_0200204a, 0x18b9);
+ Call3(Func_0200208c, 10, 0x105, 60);
+ Value2(Func_02002064, 10, 0);
+ if (Value2(Func_02001fe4, 0, 0) == 1) {
+ bump_step(1);
+ }
+ Func_02001fe6(20);
+ Func_02002066(10, 4);
+ Func_02001ff4(20);
+ Func_020020ae(10, 0, 20);
+ Func_02002012();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_c.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_c.c
new file mode 100644
index 000000000..25b872684
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_c.c
@@ -0,0 +1,103 @@
+#include "types.h"
+
+#define FieldScene_RunScene3a2SequenceC Func_02000b2c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02002020();
+void Func_02002026();
+void Func_0200204c();
+void Func_0200206a();
+void Func_02002082();
+void Func_020020b0();
+void Func_020020ca();
+void Func_020020d6();
+void Func_020020ea();
+void Func_020020ec();
+void Func_020020f2();
+void Func_020020f4();
+void Func_020020fa();
+void Func_0200210c();
+void Func_02002114();
+void Func_0200211c();
+void Func_02002122();
+void Func_02002124();
+void Func_02002126();
+void Func_02002128();
+void Func_0200212a();
+void Func_0200213c();
+void Func_02002152();
+void Func_02002158();
+void Func_02002164();
+void Func_02002170();
+void Func_02002184();
+void Func_0200218c();
+void Func_020021b8();
+void Func_020021be();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene3a2SequenceC(void)
+{
+ u32 i;
+ s32 record;
+
+ Func_02002020();
+ Func_0200211c();
+ Func_02002128();
+ Func_02002026(30);
+ Call3(Func_020020f2, 0, 0x6000, 0);
+ Func_0200212a(9, 1);
+ Func_02002126();
+ Func_020020d6(8, 2);
+ Func_0200204c(20);
+ Call1(Func_020020ea, 0x19cf);
+ Func_0200210c(8, 0, 20);
+ Func_020020f4(9, 1);
+ Func_0200206a(20);
+ Func_02002124(9, 0, 20);
+ Func_020020f4(8, 3);
+ Func_02002082(20);
+ Func_0200213c(8, 0, 20);
+ Call3(Func_02002158, 10, 0xd000, 20);
+ Func_02002152(10, 0, 20);
+ Func_02002122(8, 3);
+ Func_020020b0(60);
+ Call3(Func_0200218c, 8, 0x102, 60);
+ Func_0200213c(8, 4);
+ Func_020020ca(20);
+ Func_02002184(8, 0, 20);
+ Func_02002164(10, 2);
+ Call2(Func_020021be, 10, 0x102);
+ Func_020020ec(60);
+ Call3(Func_020021b8, 10, 0xb000, 20);
+ Func_02002170(9, 5);
+ Func_02002114();
+ Call1(Func_020020fa, 0x8b1);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_d.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_d.c
new file mode 100644
index 000000000..359b728d5
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3a2_sequence_d.c
@@ -0,0 +1,256 @@
+#include "types.h"
+
+#define FieldScene_RunScene3a2SequenceD Func_02000c30
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02002124();
+void Func_02002134();
+void Func_0200215e();
+void Func_02002176();
+void Func_0200219a();
+void Func_020021b6();
+void Func_020021d2();
+void Func_020021d6();
+void Func_020021d8();
+void Func_020021e4();
+void Func_020021ee();
+void Func_020021f4();
+void Func_020021fe();
+void Func_02002200();
+void Func_02002202();
+void Func_0200220c();
+s32 Func_02002214();
+void Func_02002218();
+s32 Func_02002226();
+void Func_02002230();
+void Func_02002238();
+void Func_02002240();
+void Func_0200224a();
+void Func_0200224c();
+void Func_02002268();
+void Func_0200226e();
+void Func_0200227e();
+void Func_02002284();
+void Func_02002290();
+void Func_0200229a();
+void Func_0200229e();
+void Func_020022a0();
+void Func_020022a2();
+void Func_020022aa();
+void Func_020022b4();
+void Func_020022c2();
+void Func_020022c4();
+void Func_020022d4();
+void Func_020022e0();
+void Func_020022e6();
+void Func_020022e8();
+void Func_020022ec();
+void Func_020022ee();
+void Func_020022f0();
+void Func_020022fa();
+void Func_02002308();
+void Func_02002314();
+void Func_02002326();
+void Func_0200232e();
+void Func_02002344();
+void Func_0200234e();
+void Func_0200235a();
+void Func_0200235e();
+void Func_0200236e();
+void Func_02002376();
+void Func_0200237c();
+void Func_0200237e();
+void Func_02002386();
+void Func_0200238a();
+void Func_0200238e();
+void Func_02002390();
+void Func_0200239e();
+void Func_020023aa();
+s32 Func_020023ac();
+void Func_020023ae();
+void Func_020023b4();
+void Func_020023bc();
+void Func_020023c2();
+void Func_020023c4();
+void Func_020023cc();
+void Func_020023ce();
+void Func_020023d6();
+void Func_020023e4();
+void Func_02002402();
+u8 *Func_02002408();
+void Func_0200240a();
+void Func_02002424();
+void Func_0200242a();
+void Func_02002440();
+void Func_02002442();
+void Func_0200244a();
+void Func_02002458();
+void Func_0200245a();
+void Func_0200246c();
+void Func_02002470();
+void Func_02002472();
+void Func_02002476();
+void Func_02002486();
+void Func_02002488();
+void Func_0200248c();
+void Func_02002490();
+void Func_02002492();
+void Func_0200249c();
+void Func_020024b4();
+void Func_020024cc();
+void Func_020024d4();
+void Func_020024e4();
+void Func_020024fc();
+void Func_02002514();
+void Func_02002588();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene3a2SequenceD(void)
+{
+ u32 i;
+ u8 *record;
+
+ Func_02002124();
+ Call2(Func_020021fe, 8, 0x102);
+ Func_020021b6(8, 2);
+ Func_02002134(60);
+ Call1(Func_020021d2, 0x19da);
+ Func_020021f4(8, 0, 20);
+ Call2(Func_02002226, 10, 0x102);
+ Func_020021d8(10, 4, 0);
+ Func_0200215e(60);
+ Func_02002218(10, 0, 20);
+ Func_02002200(8, 1);
+ Func_02002176(20);
+ Func_02002230(8, 0, 20);
+ Call3(Func_0200224c, 10, 0xd000, 20);
+ Func_0200220c(10, 3);
+ Func_0200219a(20);
+ Call3(Func_020021ee, 8, 178, 0x114);
+ Call3(Func_02002202, 10, 172, 0x11c);
+ Func_02002218(8);
+ Call3(Func_02002284, 8, 0x5000, 0);
+ Call3(Func_02002290, 10, 0xb000, 0);
+ Func_020021d6(20);
+ Func_0200226e(8, 2);
+ Func_020021e4(20);
+ Func_0200229e(8, 0, 20);
+ *(u8 *)(Func_02002214(8) + 90) &= 254;
+ *(u8 *)(Func_02002226(10) + 90) &= 254;
+ Call3(Func_02002240, 8, 0x3333, 0x1999);
+ Call3(Func_0200224a, 10, 0x3333, 0x1999);
+ Func_0200229a(8, 5);
+ Func_020022a2(10, 6);
+ Func_02002238(20);
+ Func_0200236e(125);
+ Func_020022a0(8, 2, 0);
+ Func_020022aa(9, 2, 0);
+ Func_020022b4(10, 2, 0);
+ Func_020022c2(10);
+ Func_02002268(30);
+ Func_020022e0(8, 5);
+ Func_020022e8(10, 6);
+ Func_0200227e(20);
+ Func_020023b4(125);
+ Func_020022e6(8, 4, 0);
+ Func_020022f0(9, 4, 0);
+ Func_020022fa(10, 4, 0);
+ Func_02002308(10);
+ Func_020022ee(9);
+ Func_02002326(8, 1);
+ Func_0200232e(10, 1);
+ Func_020022c4(50);
+ Func_0200234e(10, 2, 0);
+ Func_020022d4(20);
+ Func_0200238e(10, 0, 20);
+ Func_0200235e(8, 3);
+ Func_020022ec(20);
+ Value2(Func_020023ac, 8, 0);
+ Func_020023ae(8, 0, 20);
+ Func_02002376(8, 5);
+ Func_0200237e(10, 6);
+ Func_02002314(20);
+ Func_0200244a(125);
+ Func_0200237c(8, 2, 0);
+ Func_02002386(9, 2, 0);
+ Func_02002390(10, 2, 0);
+ Func_0200239e(10);
+ Func_02002344(30);
+ Func_020023bc(8, 5);
+ Func_020023c4(10, 6);
+ Func_0200235a(20);
+ Func_02002490(125);
+ Func_020023c2(8, 4, 0);
+ Func_020023cc(9, 4, 0);
+ Func_020023d6(10, 4, 0);
+ Func_020023e4(10);
+ Func_0200238a(40);
+ Func_02002402(8, 1);
+ Func_0200240a(10, 1);
+ Func_02002424(10, 2, 0);
+ Func_020023aa(20);
+ Call3(Func_02002476, 10, 0xd000, 20);
+ Func_02002470(10, 0, 20);
+ Func_02002440(8, 3);
+ Func_020023ce(20);
+ Func_02002488(8, 0, 30);
+ Func_02002492(8, 0, 20);
+ {
+ u8 *record = Func_02002408(10);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ Call3(Func_02002424, 10, 0xcccc, 0x6666);
+ Call3(Func_02002458, 10, 168, 0x128);
+ Call3(Func_020024d4, 10, 0xd000, 20);
+ Func_0200248c(10, 5);
+ Func_0200249c(8, 3);
+ Func_0200242a(20);
+ Func_020024e4(8, 0, 20);
+ Func_020024b4(10, 3);
+ Func_02002442(20);
+ Func_020024fc(10, 0, 20);
+ Func_020024cc(8, 3);
+ Func_0200245a(20);
+ Func_02002514(8, 0, 20);
+ Func_020024e4(0, 3);
+ Func_02002472(20);
+ Func_02002486();
+ Call1(Func_0200246c, 0x8b2);
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x201;
+ Func_02002588(6);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3aa_event_script04.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3aa_event_script04.c
new file mode 100644
index 000000000..e020a155f
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3aa_event_script04.c
@@ -0,0 +1,30 @@
+#include "types.h"
+
+void Func_02002f92(s32, s32, s32);
+void Func_02002f9e(s32, s32, s32);
+void Func_02002faa(s32, s32, s32);
+void Func_02002fb6(s32, s32, s32);
+void Func_02002f08(s32);
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+#define RunEventScript04 Func_02001450
+
+void RunEventScript04(s32 handoff)
+{
+ Call3(Func_02002f92, 0, 0xc000, 0);
+ Call3(Func_02002f9e, 1, 0xc000, 0);
+ Call3(Func_02002faa, 2, 0xc000, 0);
+ Call3(Func_02002fb6, 3, 0xc000, 0);
+ if (handoff != 0) {
+ Call1(Func_02002f08, handoff);
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3aa_sequence_a.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3aa_sequence_a.c
new file mode 100644
index 000000000..95d0611f6
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3aa_sequence_a.c
@@ -0,0 +1,335 @@
+#include "types.h"
+
+#define FieldScene_RunScene3aaSequenceA Func_02001494
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02002a2e();
+void Func_02002d34();
+void Func_02002ee4();
+void Func_02002f00();
+void Func_02002f02();
+void Func_02002f1c();
+void Func_02002fbc();
+void Func_02002fc6();
+void Func_02002fd0();
+void Func_02002fda();
+void Func_02002fe4();
+s32 Func_02002ff0();
+void Func_02002ffe();
+s32 Func_02003004();
+void Func_02003012();
+void Func_02003016();
+s32 Func_02003018();
+void Func_0200303e();
+void Func_0200304a();
+void Func_02003052();
+void Func_02003054();
+void Func_02003062();
+void Func_02003064();
+void Func_02003066();
+void Func_02003070();
+void Func_02003072();
+void Func_02003086();
+void Func_020030ae();
+void Func_020030b6();
+void Func_020030be();
+void Func_020030e2();
+void Func_02003106();
+void Func_02003124();
+void Func_02003128();
+void Func_02003148();
+void Func_0200314a();
+void Func_0200314e();
+void Func_0200315c();
+void Func_02003160();
+void Func_0200316a();
+void Func_02003170();
+s32 Func_02003176();
+void Func_02003186();
+void Func_02003190();
+void Func_0200319a();
+void Func_020031a4();
+void Func_020031ac();
+void Func_020031ae();
+void Func_020031b2();
+void Func_020031b6();
+void Func_020031be();
+void Func_020031c8();
+void Func_020031ce();
+void Func_020031d8();
+void Func_020031dc();
+void Func_020031e0();
+s32 Func_020031e4();
+void Func_020031f6();
+void Func_020031fc();
+void Func_0200322e();
+void Func_0200323a();
+void Func_0200326e();
+void Func_02003270();
+void Func_02003280();
+void Func_0200328c();
+void Func_02003298();
+void Func_0200329e();
+void Func_020032b8();
+void Func_020032ba();
+void Func_020032be();
+void Func_020032c0();
+void Func_020032c2();
+void Func_020032ca();
+void Func_020032ce();
+void Func_020032e0();
+void Func_020032e6();
+void Func_020032ea();
+void Func_020032f2();
+void Func_020032f4();
+void Func_020032fc();
+void Func_02003310();
+s32 Func_02003312();
+void Func_02003324();
+void Func_0200333a();
+void Func_02003340();
+void Func_02003342();
+void Func_02003356();
+void Func_0200335a();
+void Func_02003368();
+s32 Func_02003382();
+void Func_02003392();
+void Func_020033c2();
+void Func_020033d2();
+void Func_020033f0();
+void Func_020033f2();
+void Func_02003402();
+void Func_02003410();
+void Func_02003418();
+void Func_0200341a();
+void Func_0200342c();
+void Func_02003446();
+void Func_02003448();
+void Func_0200344a();
+void Func_0200345e();
+void Func_02003464();
+void Func_02003466();
+void Func_0200346c();
+void Func_02003476();
+void Func_02003478();
+void Func_0200347c();
+void Func_02003482();
+void Func_02003488();
+void Func_0200348a();
+void Func_0200348e();
+s32 Func_02003492();
+void Func_0200349a();
+void Func_020034a0();
+s32 Func_020034a2();
+void Func_020034aa();
+void Func_020034b2();
+void Func_020034ba();
+void Func_020034ca();
+
+extern u8 Data_03001ebc[];
+extern u8 Data_02009b94[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene3aaSequenceA(void)
+{
+ u32 i;
+ s32 record;
+
+ Func_02002f1c();
+ Call4(Func_02002ffe, -1, -1, -1, 0);
+ Func_02002ee4(1);
+ Call4(Func_02003016, 0x3600000, -1, 0x2180000, 0);
+ Func_02002f02();
+ Func_02002f00(1);
+ Call3(Func_02002fbc, 0, 0x3600000, 0x2760000);
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c0)) = 0x100;
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c8)) = 40;
+ Func_02003072();
+ Call2(Func_0200304a, 0x6666, 0xccc);
+ Call4(Func_02003064, 0x3600000, -1, 0x1d80000, 1);
+ Call3(Func_02002fc6, 0, 0xcccc, 0x6666);
+ Call3(Func_02002fd0, 1, 0xcccc, 0x6666);
+ Call3(Func_02002fda, 2, 0xcccc, 0x6666);
+ Call3(Func_02002fe4, 3, 0xcccc, 0x6666);
+ Call3(Func_02003012, 0, 0x360, 0x1f2);
+ record = Value1(Func_02002ff0, 0);
+ if (record != 0) {
+ Func_0200303e(1, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ record = Value1(Func_02003004, 0);
+ if (record != 0) {
+ Func_02003052(2, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ record = Value1(Func_02003018, 0);
+ if (record != 0) {
+ Func_02003066(3, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02003054, 0, 0x358, 0x1e6);
+ Call3(Func_02003062, 1, 0x350, 0x1f6);
+ Call3(Func_02003070, 2, 0x368, 0x1e6);
+ Call3(Func_02003086, 3, 0x370, 0x1f6);
+ Func_020030ae(0, 1);
+ Func_020030b6(1, 1);
+ Func_020030be(2, 1);
+ Func_02003054(10);
+ Func_02002a2e(10);
+ Func_02003124(9, 0x100, 20);
+ Call3(Func_02003128, 9, 0x5000, 20);
+ Call1(Func_02003106, 0x2588);
+ Call3(Func_02003128, 0x2009, 0, 10);
+ Func_0200314a(8, 0x100, 20);
+ Call3(Func_0200314e, 8, 0x3000, 20);
+ Func_02003148(8, 0, 20);
+ Call3(Func_0200316a, 8, 0x107, 60);
+ Func_0200315c(8, 0, 10);
+ Call2(Func_02003186, 0, 0x102);
+ Call2(Func_02003190, 1, 0x102);
+ Call2(Func_0200319a, 2, 0x102);
+ Call2(Func_020031a4, 3, 0x102);
+ Func_020030e2(60);
+ Call3(Func_020031ae, 9, 0x102, 60);
+ Call3(Func_020031b2, 9, 0x7000, 10);
+ Call3(Func_020031ac, 0x2009, 0, 10);
+ Call3(Func_020031c8, 8, 0x1000, 10);
+ Call3(Func_020031dc, 8, 0x108, 20);
+ Func_020031ce(8, 0, 40);
+ Func_020031b6(8, 2);
+ Func_020031e0(8, 0, 20);
+ Call3(Func_020031fc, 8, 0x3000, 10);
+ Value2(Func_020031e4, 8, 0);
+ i = 1;
+ if (Value2(Func_02003176, 0, 0) == 0) {
+ Func_02003160(10);
+ Func_020031d8(8, 3);
+ } else {
+ Func_02003170(10);
+ bump_step(1);
+ Func_020031f6(8, 4);
+ i = 0;
+ }
+ Func_0200323a(8, 0, 10);
+ if (i != 0) {
+ bump_step(1);
+ }
+ Func_0200322e(9, 2);
+ Call2(Func_02003280, 9, 0x102);
+ Func_020031be(80);
+ Call3(Func_02003270, 0x2009, 0, 10);
+ Call3(Func_0200328c, 8, 0x1000, 10);
+ Call3(Func_0200329e, 8, 0x107, 40);
+ Func_0200326e(2, 3);
+ Call3(Func_02003298, 0x2002, 0, 20);
+ Call3(Func_020032ba, 8, 0x105, 60);
+ Call3(Func_020032be, 8, 0x3000, 60);
+ Func_020032b8(8, 0, 10);
+ Func_02003298(1, 2);
+ Func_020032ca(1, 0, 10);
+ Call3(Func_020032e6, 9, 0x5000, 0);
+ Call3(Func_020032f2, 2, 0x6000, 10);
+ Func_020032c2(2, 2);
+ Call3(Func_020032f4, 0x6002, 0, 10);
+ Call3(Func_02003310, 2, 0xc000, 10);
+ Func_020032e0(2, 2);
+ Call3(Func_02003312, 0x2002, 0, 20);
+ Func_020032ea(8, 3);
+ Func_02003324(8, 0, 20);
+ Call3(Func_02003340, 2, 0x8000, 20);
+ Call3(Func_0200333a, 0x6002, 0, 10);
+ Call3(Func_02003356, 3, 0xa000, 10);
+ Call3(Func_02003368, 3, 0x105, 40);
+ Func_0200335a(3, 0, 10);
+ Func_02003342(2, 2);
+ Func_020032c0(80);
+ Func_02003340(2, 3);
+ Func_020032ce(20);
+ Call3(Func_02003392, 1, 0xe000, 10);
+ Func_0200335a(1, 4);
+ Value2(Func_02003382, 1, 0);
+ if (Value2(Func_02003312, 0, 0) == 0) {
+ Func_020032fc(20);
+ bump_step(1);
+ } else {
+ Func_02003340(20);
+ Func_020033f2(1, 0, 10);
+ }
+ Func_020033c2(2, 3);
+ Func_020033d2(3, 3);
+ Func_02002d34(20);
+ Func_020033f0(9, 2);
+ Call3(Func_0200341a, 0x2009, 0, 10);
+ Func_02003402(3, 2);
+ Func_0200342c(3, 0, 10);
+ Call3(Func_02003448, 9, 0x3000, 10);
+ Func_02003410(9, 3);
+ Call3(Func_0200344a, 0x2009, 0, 10);
+ Call3(Func_0200346c, 2, 0x101, 60);
+ Call3(Func_0200345e, 0x2002, 0, 10);
+ Func_02003446(9, 1);
+ Call3(Func_02003482, 9, 0x5000, 10);
+ Call3(Func_0200347c, 0x2009, 0, 10);
+ Func_02003464(1, 2);
+ Func_0200348e(1, 0, 10);
+ Func_02003466(9, 4);
+ Call3(Func_020034a0, 0x2009, 0, 10);
+ Func_02003488(3, 1);
+ Func_020034b2(3, 0, 10);
+ Func_0200349a(8, 1);
+ Func_02003418(20);
+ Func_020034ca(8, 0, 10);
+ Func_0200349a(0, 3);
+ Call2((void (*)())Func_020034a2, 1, 3);
+ Func_020034aa(2, 3);
+ Func_020034ba(3, 3);
+ Func_02003448(20);
+ Func_0200348a(1, (s32)Data_02009b94);
+ Value2(Func_02003492, 2, (s32)Data_02009b94);
+ Value2(Func_020034a2, 3, (s32)Data_02009b94);
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c8)) = 16;
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c0)) = 0x209;
+ Call1(Func_02003478, 0x12f);
+ Call1(Func_02003476, 0x914);
+ Func_0200349a();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3ab_actor_dialogue_movement_sequence.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3ab_actor_dialogue_movement_sequence.c
new file mode 100644
index 000000000..bbeae5083
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3ab_actor_dialogue_movement_sequence.c
@@ -0,0 +1,222 @@
+#include "types.h"
+
+#define FieldScene_RunActorDialogueMovementSequence Func_0200131c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02002cfe();
+void Func_02002d00();
+void Func_02002d58();
+void Func_02002d6e();
+void Func_02002d7c();
+void Func_02002d8a();
+void Func_02002d92();
+void Func_02002d9c();
+void Func_02002da6();
+void Func_02002db4();
+void Func_02002dc0();
+void Func_02002dca();
+void Func_02002dd6();
+void Func_02002ddc();
+void Func_02002de0();
+void Func_02002de2();
+void Func_02002de6();
+void Func_02002df2();
+void Func_02002dfe();
+void Func_02002e06();
+u8 *Func_02002e0a();
+u8 *Func_02002e1a();
+void Func_02002e26();
+void Func_02002e32();
+void Func_02002e42();
+u8 *Func_02002e4e();
+void Func_02002e56();
+u8 *Func_02002e52();
+u8 *Func_02002e62();
+s32 Func_02002e6e();
+void Func_02002e72();
+s32 Func_02002e84();
+void Func_02002e86();
+void Func_02002e88();
+void Func_02002e8e();
+void Func_02002e90();
+void Func_02002e96();
+u8 *Func_02002ea8();
+void Func_02002eb0();
+u8 *Func_02002ec4();
+void Func_02002ecc();
+s32 Func_02002ede();
+void Func_02002ee0();
+void Func_02002ee6();
+void Func_02002f12();
+u8 *Func_02002f1c();
+void Func_02002f26();
+u8 *Func_02002f2c();
+void Func_02002f2e();
+void Func_02002f44();
+void Func_02002f4a();
+void Func_02002f56();
+void Func_02002f58();
+void Func_02002f5e();
+void Func_02002f60();
+void Func_02002f7a();
+void Func_02002f7e();
+void Func_02002f84();
+void Func_02002f8a();
+void Func_02002f96();
+void Func_02002fa2();
+void Func_02002fa8();
+void Func_02002fc0();
+void Func_02002fc8();
+void Func_02002fd4();
+void Func_02003022();
+void Func_0200302e();
+void Func_020092a5();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunActorDialogueMovementSequence(void)
+{
+ u32 i;
+ u8 *record;
+ s32 base6_20092a5;
+
+ Func_02002d00();
+ Call3(Func_02002d6e, 0, 0xa00000, 0x800000);
+ Call3(Func_02002d7c, 8, 0x980000, 0x700000);
+ Call3(Func_02002d8a, 9, 0xa80000, 0x700000);
+ Call3(Func_02002de6, 0, 0x4000, 0);
+ Call3(Func_02002df2, 17, 0x3000, 0);
+ Call3(Func_02002dfe, 18, 0x5000, 0);
+ Func_02002e26(0, 0);
+ Func_02002e42();
+ Func_02002d58(30);
+ Call3(Func_02002d92, 0, 0x1cccc, 0xe666);
+ Call3(Func_02002d9c, 8, 0x1cccc, 0xe666);
+ Call3(Func_02002da6, 9, 0x1cccc, 0xe666);
+ Call3(Func_02002dca, 8, 152, 0x120);
+ Call3(Func_02002dd6, 9, 168, 0x120);
+ Func_02002e06(0, 4);
+ Call3(Func_02002de2, 0, 160, 0x128);
+ base6_20092a5 = (s32)Func_020092a5;
+ Call2(Func_02002cfe, base6_20092a5, 0xc80);
+ Func_02002db4(1);
+ Func_02002f12(121);
+ Func_02002dc0(20);
+ Func_02002e88(8, 3);
+ Func_02002e90(9, 3);
+ Func_02002f2e(121);
+ Func_02002ddc(30);
+ {
+ u8 *record = Func_02002e0a(8);
+ u8 value = *(volatile u8 *)&record[35];
+
+ record[35] = (u8)(value | 1);
+ }
+ {
+ u8 *record = Func_02002e1a(9);
+ u8 value = *(volatile u8 *)&record[35];
+
+ record[35] = (u8)(value | 1);
+ }
+ Func_02002e72(0, 4);
+ Func_02002f60(121);
+ Call1((void (*)())Func_02002e6e, 0);
+ Func_02002e86(8, 1);
+ Func_02002e8e(9, 1);
+ Func_02002d7c(base6_20092a5);
+ {
+ u8 *record = Func_02002e52(0);
+ u8 value = *(volatile u8 *)&record[85];
+
+ record[85] = (u8)(value | 2);
+ }
+ record = Func_02002e62(0);
+ *(s32 *)(record + 40) = 0x60000;
+ record = Value1(Func_02002e6e, 0);
+ *(s32 *)(record + 44) = 0x60000;
+ Func_02002e4e(1);
+ goto wait_e84;
+ do {
+ Func_02002e56(1);
+ wait_e84:
+ record = (u8 *)Value1(Func_02002e84, 0);
+ } while (*(s32 *)(record + 12) != 0);
+ Call3(Func_02002f26, 0, 0xc000, 0);
+ Func_02002ee6(0, 19);
+ Func_02002fd4(127);
+ Call2(Func_02002f56, 0, 0x102);
+ Call2(Func_02002de0, (s32)Func_020092a5, 0xc80);
+ Func_02002e96(2);
+ record = Func_02002ec4(0);
+ *(s32 *)(record + 40) = 0x30000;
+ Func_02002ea8(1);
+ goto wait_ede;
+ do {
+ Func_02002eb0(1);
+ wait_ede:
+ record = (u8 *)Value1(Func_02002ede, 0);
+ } while (*(s32 *)(record + 12) != 0);
+ Call2(Func_02002f96, 0, 0x102);
+ Func_02002ecc(10);
+ Func_02002f44(0, 1);
+ Call1(Func_02002e32, (s32)Func_020092a5);
+ Func_02002ee0(50);
+ Call1(Func_02002f7e, 0x2410);
+ Func_02002f96(8, 0);
+ {
+ u8 *record = Func_02002f1c(8);
+ u8 value = *(volatile u8 *)&record[35];
+
+ record[35] = (u8)(value | 1);
+ }
+ {
+ u8 *record = Func_02002f2c(9);
+ u8 value = *(volatile u8 *)&record[35];
+
+ record[35] = (u8)(value | 1);
+ }
+ Call3(Func_02002f4a, 8, 0x10000, 0x8000);
+ Call3(Func_02002f58, 9, 0x10000, 0x8000);
+ Func_02002f7a(8, 144, 200);
+ Func_02002f84(9, 176, 200);
+ Func_02002fa2(8);
+ Func_02002fa8(9);
+ Func_02002fc0(8, 1);
+ Func_02002fc8(9, 1);
+ Func_02002f5e(30);
+ Call3(Func_02003022, 8, 0x3000, 0);
+ Call3(Func_0200302e, 9, 0x5000, 0);
+ Func_02002f8a();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3af_sequence_b.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3af_sequence_b.c
new file mode 100644
index 000000000..907c7be49
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3af_sequence_b.c
@@ -0,0 +1,234 @@
+#include "types.h"
+
+#define FieldScene_RunScene3afSequenceB Func_02001f90
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0200c764[];
+extern u8 Data_0200c7a8[];
+extern u8 Data_0200c7ec[];
+extern u8 Data_0200c80c[];
+extern u8 Data_0200c888[];
+void Func_02002db6();
+void Func_02005bfa();
+void Func_02006210();
+void Func_0200621c();
+void Func_0200624c();
+void Func_02006278();
+void Func_02006280();
+void Func_02006284();
+void Func_02006290();
+void Func_0200629c();
+void Func_020062a8();
+void Func_020062aa();
+s32 Func_020062ae();
+void Func_020062b4();
+void Func_020062b6();
+s32 Func_020062da();
+s32 Func_020062e6();
+s32 Func_020062f2();
+s32 Func_020062fe();
+s32 Func_0200630a();
+s32 Func_02006316();
+void Func_0200633c();
+void Func_02006340();
+void Func_0200634c();
+s32 Func_02006362();
+s32 Func_02006386();
+void Func_0200638a();
+s32 Func_02006392();
+s32 Func_0200639e();
+void Func_020063a2();
+s32 Func_020063a8();
+void Func_020063b8();
+void Func_020063c6();
+void Func_020063ce();
+void Func_020063d0();
+void Func_020063d4();
+s32 Func_020063d6();
+void Func_020063e0();
+s32 Func_020063e8();
+void Func_0200642c();
+void Func_02006436();
+void Func_0200643a();
+void Func_0200645c();
+void Func_02006466();
+void Func_0200646a();
+void Func_02006472();
+void Func_02006474();
+void Func_0200647e();
+void Func_0200648c();
+void Func_02006490();
+void Func_02006494();
+void Func_020064a4();
+void Func_020064ae();
+void Func_020064ba();
+s32 Func_020064be();
+void Func_020064c8();
+s32 Func_020064d6();
+void Func_020064e8();
+void Func_020064ee();
+void Func_020064f8();
+void Func_02006500();
+void Func_02006506();
+void Func_0200650a();
+void Func_02006510();
+void Func_02006514();
+void Func_0200651c();
+void Func_02006530();
+void Func_02006532();
+void Func_02006534();
+void Func_0200653c();
+void Func_02006540();
+void Func_02006566();
+void Func_02006578();
+void Func_0200657e();
+void Func_02006584();
+void Func_0200658a();
+void Func_020065ba();
+void Func_020065d2();
+void Func_02006642();
+void Func_0200667e();
+void Func_0200668a();
+void Func_02006692();
+void Func_0200669e();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene3afSequenceB(void)
+{
+ u32 i;
+ s32 record;
+ s32 base5_200c80c;
+ s32 base5_200c7a8;
+ s32 base5_200c764;
+ s32 base5_200c7ec;
+ s32 base5_200c888;
+
+ Func_02006280();
+ Func_02006340(0, 15);
+ record = Func_020062ae(0);
+ Func_0200624c(record, 0);
+ Call1(Func_020062aa, 0x200d160);
+ Func_02006210(1);
+ Call1(Func_020062b6, 0x200d268);
+ Func_0200621c(1);
+ Func_0200633c(31, 0);
+ record = Func_020062da(24);
+ Func_02006278(record, 1);
+ record = Func_020062e6(25);
+ Func_02006284(record, 1);
+ record = Func_020062f2(26);
+ Func_02006290(record, 1);
+ record = Func_020062fe(27);
+ Func_0200629c(record, 1);
+ record = Func_0200630a(28);
+ Func_020062a8(record, 1);
+ record = Func_02006316(29);
+ Func_020062b4(record, 1);
+ Call3(Func_0200638a, 22, 0x1000000, 0x2800000);
+ base5_200c80c = (s32)Data_0200c80c;
+ Func_0200634c(22, base5_200c80c);
+ Call3(Func_020063a2, 21, 0x10c0000, 0x2b40000);
+ Value2(Func_02006362, 22, base5_200c80c);
+ Call3(Func_020063b8, 24, 0xf20000, 0x25c0000);
+ Call3(Func_020063c6, 25, 0x1080000, 0x2580000);
+ Call3(Func_020063d4, 26, 0xfe0000, 0x29c0000);
+ Call3(Func_020063e0, 27, 0x11a0000, 0x2920000);
+ *(u8 *)(Func_02006386(24) + 99) = 0;
+ *(u8 *)(Func_02006392(25) + 99) = 1;
+ *(u8 *)(Func_0200639e(26) + 99) = 0;
+ *(u8 *)(Func_020063a8(27) + 99) = 1;
+ base5_200c7a8 = (s32)Data_0200c7a8;
+ Func_020063ce(24, base5_200c7a8);
+ Value2(Func_020063d6, 25, base5_200c7a8);
+ base5_200c764 = (s32)Data_0200c764;
+ Func_020063e0(26, base5_200c764);
+ Value2(Func_020063e8, 27, base5_200c764);
+ Func_0200643a(20, 0, 0);
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x202;
+ Func_0200651c();
+ Func_02006530();
+ Call1(Func_020063d0, 0x190);
+ Call3(Func_02006466, 28, 0xfe0000, 0x2e40000);
+ Call3(Func_02006472, 29, 0x180000, 0x24a0000);
+ Call3(Func_0200642c, 28, 0x19999, 0xcccc);
+ Call3(Func_02006436, 29, 0x19999, 0xcccc);
+ Call3(Func_0200646a, 29, 172, 0x284);
+ Call3(Func_0200647e, 28, 200, 0x294);
+ Call3(Func_0200645c, 0, 0x40000, 0x20000);
+ Call3(Func_02006490, 0, 174, 0x26c);
+ Call3(Func_020064a4, 28, 180, 0x244);
+ Func_020065ba(146);
+ base5_200c7ec = (s32)Data_0200c7ec;
+ Func_0200648c(28, base5_200c7ec);
+ Func_02006494(29, base5_200c7ec);
+ Func_020065d2(240);
+ Call3(Func_020064ee, 31, 0x860000, 0x2520000);
+ Call2(Func_020064ae, 31, 0x200c814);
+ Func_02006474(10);
+ Call3(Func_0200650a, 30, 0x860000, 0x2480000);
+ Call3(Func_020064c8, 30, 0x40000, 0x20000);
+ record = Func_020064be(30);
+ *(s32 *)(record + 40) = 0x80000;
+ Call3(Func_02006510, 30, 186, 0x264);
+ record = Func_020064d6(30);
+ Func_02006474(record, 1);
+ Func_020064ba(10);
+ Call3(Func_02006500, 30, 0x20000, 0x10000);
+ Call3(Func_0200653c, 30, 216, 0x258);
+ Call2(Func_02005bfa, 30, 0xc000);
+ Func_02002db6();
+ Func_020064e8(10);
+ base5_200c888 = (s32)Data_0200c888;
+ Func_02006532(30, base5_200c888);
+ Func_020064f8(10);
+ Func_02006540(28, base5_200c888);
+ Func_02006506(10);
+ Func_02006566(29, base5_200c888);
+ Func_02006514(20);
+ Func_02006692(147);
+ Func_0200667e();
+ Func_0200668a();
+ Func_02006578(24);
+ Func_0200657e(25);
+ Func_02006584(26);
+ Func_0200658a(27);
+ Func_02006540(10);
+ Func_02006514();
+ Func_02006642(21);
+ Call3(Func_02006534, 0x1e45, 1, 0);
+ Func_02006530();
+ Func_0200669e(13);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3b0_seven_actor_ensemble.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3b0_seven_actor_ensemble.c
new file mode 100644
index 000000000..0d5571616
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3b0_seven_actor_ensemble.c
@@ -0,0 +1,189 @@
+#include "types.h"
+
+#define FieldScene_RunSevenActorEnsemble Func_02000e78
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0000006f[];
+extern u8 Data_02000240[];
+extern u8 Data_03001ebc[];
+void Func_02001926();
+void Func_0200192c();
+void Func_02001932();
+void Func_02001938();
+void Func_0200193e();
+void Func_02001944();
+void Func_0200194a();
+void Func_02002050();
+void Func_02002084();
+void Func_02002090();
+void Func_020020ba();
+s32 Func_020020be();
+void Func_020020f6();
+void Func_02002108();
+void Func_02002112();
+void Func_0200213c();
+void Func_02002142();
+void Func_02002148();
+void Func_0200214e();
+void Func_02002154();
+void Func_0200215a();
+void Func_0200215e();
+void Func_02002160();
+void Func_0200216c();
+s32 Func_02002176();
+void Func_0200217a();
+void Func_02002188();
+void Func_02002196();
+void Func_020021a4();
+void Func_020021b2();
+void Func_020021c0();
+s32 Func_020021c2();
+s32 Func_020021ca();
+s32 Func_020021d2();
+void Func_020021d8();
+s32 Func_020021da();
+void Func_020021de();
+s32 Func_020021e2();
+s32 Func_020021ea();
+void Func_020021f2();
+void Func_0200222a();
+void Func_02002230();
+void Func_02002248();
+void Func_02002256();
+void Func_02002270();
+void Func_02002278();
+void Func_0200227a();
+void Func_0200228c();
+void Func_020022a0();
+void Func_020022b2();
+void Func_0200231c();
+void Func_02002324();
+void Func_02002328();
+void Func_0200232c();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ s32 Value0(s32 (*f)())
+{
+ return f();
+}
+
+static __inline__ void Call0(void (*f)())
+{
+ f();
+}
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunSevenActorEnsemble(void)
+{
+ u32 i;
+ s32 record;
+
+ Func_02002090();
+ Func_02002108(0, 15);
+ record = Func_020020be(0);
+ Func_02002084(record, 0);
+ Call1(Func_020020ba, 0x200976c);
+ Func_02002050(1);
+ Func_02001926(9);
+ Func_0200192c(10);
+ Func_02001932(11);
+ Func_02001938(12);
+ Func_0200193e(13);
+ Func_02001944(14);
+ Func_0200194a(15);
+ Call2(Func_02002112, 8, 0x200939c);
+ *(s32 *)(*(u8 **)Data_03001ebc + 0x1c0) = 0x203;
+ Call0((void (*)())Func_020021ca);
+ Func_020021de();
+ Call1(Func_020020f6, 0x190);
+ Func_0200213c(9);
+ Func_02002142(10);
+ Func_02002148(11);
+ Func_0200214e(12);
+ Func_02002154(13);
+ Func_0200215a(14);
+ Func_02002160(15);
+ Call3(Func_0200215e, 9, 0x30000, 0x18000);
+ Call3(Func_0200216c, 10, 0x30000, 0x18000);
+ Call3(Func_0200217a, 11, 0x30000, 0x18000);
+ Call3(Func_02002188, 12, 0x30000, 0x18000);
+ Call3(Func_02002196, 13, 0x30000, 0x18000);
+ Call3(Func_020021a4, 14, 0x30000, 0x18000);
+ Call3(Func_020021b2, 15, 0x30000, 0x18000);
+ Value2(Func_020021c2, 9, 0x2009450);
+ Value2(Func_020021ca, 10, 0x2009480);
+ Value2(Func_020021d2, 11, 0x20094b0);
+ Value2(Func_020021da, 12, 0x20094e0);
+ Value2(Func_020021e2, 13, 0x2009510);
+ Value2(Func_020021ea, 14, 0x2009540);
+ Call2(Func_020021f2, 15, 0x2009570);
+ Func_020021c0(40);
+ Func_02002230(8, 3);
+ Call2(Func_0200227a, 8, 0x102);
+ Func_020021d8(120);
+ Func_02002248(8, 1);
+ Call3(Func_0200228c, 8, 0x100, 60);
+ Call3(Func_0200222a, 8, 0x10000, 0x8000);
+ Call3(Func_02002256, 8, 164, 0x158);
+ Func_02002270(8, 4, 10);
+ Func_0200227a(8, 6, 20);
+ Call1(Func_020022a0, 0x1ee4);
+ Func_020022b2(8, 0, 20);
+ *(s32 *)(*(u8 **)Data_03001ebc + 0x1c0) = 0x202;
+ Func_0200231c();
+ Func_02002328();
+ {
+ u8 *p;
+ u16 *slot;
+ s32 shown;
+
+ p = Data_02000240;
+ {
+ s32 v;
+
+ v = (s32)Data_0000006f;
+ *(u16 *)(p + 0x1c4) = v;
+ }
+ slot = (u16 *)(p + 0x1c6);
+ shown = 2;
+ *slot = shown;
+ }
+ if (Value0(Func_02002176) == 11) {
+ Func_02002324(15);
+ } else {
+ Func_0200232c(14);
+ }
+ Func_02002278();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_actor_availability_presentation.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_actor_availability_presentation.c
new file mode 100644
index 000000000..39aaf7d01
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_actor_availability_presentation.c
@@ -0,0 +1,298 @@
+#include "types.h"
+
+#define FieldScene_RunActorAvailabilityPresentation Func_020038ac
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02008188();
+void Func_0200818e();
+void Func_0200819e();
+s32 Func_020081ae();
+void Func_020081b8();
+void Func_020081c6();
+void Func_02008204();
+void Func_02008212();
+void Func_02008220();
+void Func_0200823c();
+void Func_020082fa();
+void Func_02008312();
+void Func_02008332();
+void Func_02008348();
+void Func_02008352();
+void Func_0200835c();
+void Func_02008366();
+void Func_0200839c();
+void Func_020083b6();
+void Func_020083c4();
+void Func_020083f6();
+void Func_02008400();
+s32 Func_0200840a();
+void Func_02008438();
+void Func_02008446();
+s32 Func_02008456();
+void Func_02008478();
+s32 Func_0200847e();
+void Func_02008498();
+s32 Func_0200849e();
+void Func_020084ae();
+s32 Func_020084ca();
+void Func_020084cc();
+void Func_020084fe();
+void Func_02008506();
+void Func_0200858c();
+void Func_02008596();
+void Func_020085dc();
+void Func_02009d84();
+void Func_02009e4c();
+void Func_02009e76();
+void Func_02009e90();
+void Func_02009e9c();
+void Func_02009ea8();
+s32 Func_02009eaa();
+void Func_02009ed2();
+s32 Func_02009ede();
+void Func_02009f06();
+void Func_02009f0c();
+void Func_02009f0e();
+s32 Func_02009f14();
+void Func_02009f18();
+void Func_02009f20();
+void Func_02009f3a();
+void Func_02009f3c();
+void Func_02009f4a();
+void Func_02009f4c();
+void Func_02009f54();
+void Func_02009f7a();
+void Func_02009f80();
+void Func_02009f82();
+void Func_02009fc0();
+void Func_02009ff6();
+void Func_0200a00e();
+void Func_0200a020();
+void Func_0200a026();
+void Func_0200a02e();
+void Func_0200a034();
+void Func_0200a03c();
+void Func_0200a044();
+void Func_0200a04c();
+void Func_0200a04e();
+void Func_0200a058();
+void Func_0200a064();
+void Func_0200a074();
+void Func_0200a088();
+void Func_0200a08a();
+void Func_0200a0a0();
+void Func_0200a0b2();
+void Func_0200a0bc();
+void Func_0200a0e4();
+void Func_0200a0f6();
+void Func_0200a10c();
+void Func_0200a10e();
+void Func_0200a124();
+void Func_0200a132();
+void Func_0200a13c();
+void Func_0200a15e();
+void Func_0200a160();
+void Func_0200a162();
+void Func_0200a166();
+void Func_0200a16c();
+void Func_0200a18a();
+void Func_0200a194();
+void Func_0200a19e();
+void Func_0200a1a2();
+s32 Func_0200a1a6();
+void Func_0200a1aa();
+void Func_0200a1b2();
+void Func_0200a1b4();
+void Func_0200a1c8();
+void Func_0200a1da();
+void Func_0200a1de();
+void Func_0200a1ea();
+void Func_0200a1ec();
+void Func_0200a214();
+void Func_0200a25c();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+static __inline__ s32 Value4(s32 (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ return f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunActorAvailabilityPresentation(void)
+{
+ s32 c_1b8;
+ s32 c_5000;
+ s32 c_d000;
+ s32 c_b000;
+ s32 c_8000;
+ s32 c_100;
+ s32 record;
+
+ Func_02009d84();
+ Call3((void (*)())Func_020081ae, 25, 0, 0);
+ Func_020081b8(24, 1, 0);
+ Call4(Func_0200818e, 0x1b80000, -1, 0xa80000, 0x1000001);
+ c_1b8 = 0x1b8;
+ c_5000 = 0x5000;
+ Func_02008188(27, c_1b8, 164, c_5000);
+ c_d000 = 0xd000;
+ Func_0200819e(8, 0x1ac, 190, c_d000);
+ c_b000 = 0xb000;
+ Value4(Func_020081ae, 9, 0x1c4, 190, c_b000);
+ Func_02009e76(9, 1);
+ c_8000 = 0x8000;
+ Func_020081c6(0, c_1b8, 134, c_8000);
+ c_100 = 0x100;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = c_100;
+ Func_02009f7a();
+ Call3(Func_02009e4c, 0, 0xcccc, 0x6666);
+ Call3(Func_02009e90, 0, 0x198, 134);
+ Call3(Func_02009e9c, 0, 0x198, 148);
+ Call3(Func_02009ea8, 0, 0x1a8, 148);
+ Call3(Func_02009f54, 0, 0x4000, 20);
+ Func_02009f0c(27, 1);
+ Call1(Func_02009f3a, 0x1e27);
+ Func_02008204(27);
+ Func_02009f20(8, 1);
+ Func_02008212(8);
+ Func_02009f0e(27, 3);
+ Func_02008220(27);
+ Func_0200823c(27, c_d000);
+ record = Value1(Func_02009eaa, 0);
+ if (record != 0) {
+ Func_02009f18(1, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02009ed2, 1, 0xcccc, 0x6666);
+ Call3((void (*)())Func_02009f14, 1, c_1b8, 148);
+ Call3(Func_02009fc0, 1, 0x4000, 0);
+ record = Value1(Func_02009ede, 1);
+ if (record != 0) {
+ Func_02009f4c(2, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02009f06, 2, 0xcccc, 0x6666);
+ Call3(Func_02009f4a, 2, 0x1c8, 148);
+ Call3(Func_02009ff6, 2, 0x4000, 0);
+ record = Value1(Func_02009f14, 2);
+ if (record != 0) {
+ Func_02009f82(3, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02009f3c, 3, 0xcccc, 0x6666);
+ Call3(Func_02009f80, 3, 0x1d8, 148);
+ Call3(Func_0200a02e, 3, 0x4000, 20);
+ Func_02008352(0, 0, 60);
+ Func_0200835c(1, 0x4000, 20);
+ Func_02008366(2, 1, 20);
+ Func_0200a058(27, c_5000, 20);
+ Func_020082fa(27);
+ Func_0200a00e(9, 1);
+ Func_0200a088(9, c_100, 40);
+ Func_02008312(9);
+ Func_0200a026(1, 3);
+ Call3(Func_0200a0a0, 1, 0x103, 60);
+ Func_0200a020(27, 3);
+ Func_02008332(27);
+ Func_0200a04e(10, 1);
+ Func_0200a026(10, 3);
+ Func_02008348(10);
+ Func_0200a034(8, 3);
+ Func_0200a03c(9, 3);
+ Func_0200a044(11, 3);
+ Func_0200a04c(12, 3);
+ Func_0200a064(13, 3);
+ Func_020083f6(0, 0, 40);
+ Func_02008400(2, 1, 0);
+ Value3(Func_0200840a, 1, 0x4000, 20);
+ Func_0200a08a(27, 4);
+ Func_0200839c(27);
+ Call3(Func_0200a124, 8, 0x102, 60);
+ Func_0200a0bc(8, 1);
+ Func_020083b6(8);
+ Func_0200a0b2(27, 3);
+ Func_020083c4(27);
+ Func_0200a132(8, 0, 0);
+ Func_0200a13c(9, c_8000, 40);
+ Call3(Func_0200a160, 8, 0x102, 0);
+ Call3(Func_0200a16c, 8, 0x102, 40);
+ Func_0200a10c(27, 1);
+ Func_0200a0e4(27, 3);
+ Func_0200a15e(27, 0, 20);
+ Func_0200a0f6(8, 3);
+ Func_0200a10e(9, 3);
+ Func_0200a074(40);
+ Value3(Func_0200a1a6, 9, c_100, 20);
+ Func_02008446(9, c_b000);
+ Func_02008438(9);
+ Value2(Func_02008456, 27, 0x3000);
+ Call3(Func_0200a1c8, 27, 0x101, 60);
+ Func_0200a1aa(27, 0, 60);
+ Call3(Func_0200a1de, 27, 0x106, 20);
+ Value2(Func_0200847e, 27, c_b000);
+ Func_0200a166(27, 3);
+ Func_02008478(27);
+ Func_020084fe(3, 2, 80);
+ Value2(Func_0200849e, 8, c_d000);
+ Func_0200a19e(8, 2);
+ Func_02008498(8);
+ Func_0200a194(9, 3);
+ Func_0200a1b4(9, 2);
+ Func_020084ae(9);
+ Value2(Func_020084ca, 27, c_5000);
+ Func_0200a1b2(27, 3);
+ Func_0200a1da(27, 1);
+ Func_020084cc(27);
+ Call3(Func_0200a162, 27, 0xcccc, 0x6666);
+ Call3(Func_0200a1a6, 27, 0x198, 158);
+ Call3(Func_0200a1b2, 27, 0x198, 148);
+ Func_0200a25c(27, 0, 20);
+ Func_0200a214(27, 1);
+ Func_02008506(27);
+ Func_0200858c(1, c_8000, 20);
+ Func_02008596(2, 1, 0);
+ Call3(Func_0200a1ea, 27, 0x198, 134);
+ Func_0200a1ec(27, c_1b8, 134);
+ Func_0200a18a(40);
+ Func_020085dc(9, 10, 0);
+ Call1(Func_0200a1a2, 0x926);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_branching_actor_presentation.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_branching_actor_presentation.c
new file mode 100644
index 000000000..13fbc9873
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_branching_actor_presentation.c
@@ -0,0 +1,491 @@
+#include "types.h"
+
+#define FieldScene_RunBranchingActorPresentation Func_020027d8
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00001008[];
+extern u8 Data_00004008[];
+extern u8 Data_0000900c[];
+extern u8 Data_0200e6e4[];
+void Func_0200707e();
+void Func_0200710c();
+void Func_0200711e();
+void Func_02007160();
+void Func_0200716e();
+void Func_020071be();
+void Func_020071cc();
+void Func_020071e0();
+void Func_02007232();
+void Func_02007246();
+void Func_0200725e();
+void Func_02007264();
+void Func_02007274();
+void Func_0200727a();
+void Func_02007296();
+void Func_0200729c();
+void Func_020072a4();
+void Func_020072b2();
+void Func_020072c8();
+void Func_020072ce();
+void Func_020072de();
+void Func_020072ec();
+void Func_020072fa();
+void Func_02007402();
+void Func_02007410();
+void Func_02007426();
+void Func_02007434();
+void Func_02007442();
+void Func_02007450();
+void Func_0200745e();
+void Func_020074de();
+void Func_020074fe();
+void Func_02007508();
+void Func_02007522();
+void Func_02007540();
+void Func_02007558();
+void Func_02007580();
+void Func_0200758e();
+void Func_020075c2();
+void Func_020075c8();
+void Func_020075d8();
+void Func_020075de();
+void Func_020075e6();
+void Func_02007614();
+s32 Func_0200761a();
+void Func_02007630();
+s32 Func_0200768a();
+void Func_02007698();
+void Func_020076c0();
+void Func_020076d6();
+void Func_020076e6();
+void Func_020076f4();
+void Func_0200776c();
+void Func_02007814();
+void Func_02008caa();
+s32 Func_02008d6e();
+void Func_02008d78();
+void Func_02008d7e();
+void Func_02008d92();
+void Func_02008d9a();
+void Func_02008da2();
+void Func_02008daa();
+void Func_02008db4();
+void Func_02008dba();
+void Func_02008de4();
+void Func_02008dfe();
+void Func_02008e16();
+void Func_02008e1a();
+void Func_02008e22();
+void Func_02008e2c();
+void Func_02008e2e();
+s32 Func_02008e36();
+void Func_02008e3a();
+void Func_02008e46();
+void Func_02008e5c();
+void Func_02008e6e();
+void Func_02008e74();
+void Func_02008e94();
+void Func_02008ec8();
+void Func_02008ed0();
+void Func_02008ede();
+void Func_02008ef4();
+void Func_02008ef6();
+void Func_02008f0c();
+void Func_02008f24();
+void Func_02008f26();
+void Func_02008f3c();
+void Func_02008f4a();
+void Func_02008f56();
+void Func_02008f7c();
+void Func_02008f82();
+void Func_02008f92();
+void Func_02008f96();
+void Func_02008fa4();
+void Func_02008fae();
+void Func_02008fb6();
+void Func_02008fba();
+s32 Func_02008fbe();
+void Func_02008fc0();
+void Func_02008fe4();
+void Func_02008fea();
+void Func_02008ff4();
+s32 Func_02008ffa();
+void Func_02008ffc();
+void Func_02009026();
+void Func_0200902c();
+void Func_02009030();
+s32 Func_02009036();
+void Func_0200905a();
+void Func_02009062();
+void Func_02009064();
+void Func_02009068();
+void Func_0200906c();
+void Func_0200906e();
+void Func_02009078();
+void Func_020090a0();
+void Func_020090a4();
+void Func_020090a8();
+s32 Func_020090b2();
+void Func_020090dc();
+void Func_0200910c();
+void Func_02009118();
+void Func_0200911e();
+void Func_0200914c();
+void Func_02009154();
+void Func_02009156();
+void Func_02009172();
+void Func_02009178();
+s32 Func_0200917a();
+void Func_020091b6();
+void Func_020091c4();
+void Func_020091d2();
+void Func_020091ec();
+void Func_020091fa();
+void Func_020091fe();
+void Func_02009214();
+void Func_0200921a();
+void Func_02009222();
+void Func_02009224();
+void Func_02009244();
+void Func_0200925e();
+void Func_0200926c();
+void Func_02009270();
+void Func_02009286();
+void Func_020092a4();
+void Func_020092be();
+void Func_020092c6();
+void Func_020092c8();
+void Func_020092d4();
+s32 Func_020092fa();
+void Func_02009308();
+void Func_0200931a();
+void Func_02009350();
+void Func_0200936c();
+void Func_0200936e();
+void Func_02009372();
+void Func_02009382();
+void Func_02009386();
+void Func_0200938c();
+void Func_02009390();
+void Func_02009396();
+void Func_0200939e();
+void Func_020093a0();
+void Func_020093aa();
+void Func_020093b4();
+void Func_020093b6();
+void Func_020093bc();
+s32 Func_020093c2();
+void Func_020093c4();
+void Func_020093ca();
+void Func_020093d8();
+s32 Func_020093dc();
+void Func_020093e4();
+void Func_020093e6();
+void Func_020093e8();
+void Func_020093ec();
+s32 Func_0200940c();
+void Func_0200941c();
+void Func_0200941e();
+void Func_0200942c();
+s32 Func_0200943c();
+void Func_0200943e();
+void Func_02009448();
+void Func_0200944c();
+void Func_0200944e();
+void Func_02009452();
+void Func_0200945e();
+void Func_0200946e();
+void Func_02009474();
+void Func_0200947c();
+s32 Func_0200947e();
+void Func_0200948e();
+void Func_0200949e();
+void Func_020094ac();
+void Func_020094bc();
+void Func_020094be();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunBranchingActorPresentation(void)
+{
+ u32 i;
+ s32 record;
+ s32 base5_1008;
+ s32 base7_900c;
+ s32 base5_4008;
+ s32 base5_200e6e4;
+
+ Func_02008caa();
+ Func_02008e2e();
+ Func_02008d78(8, 0, 0);
+ Call3(Func_02008de4, 8, 0x100, 40);
+ base5_1008 = 0x1008;
+ Func_02008d7e(8, 3);
+ Call1(Func_02008db4, 0x1ddb);
+ Func_0200707e(base5_1008);
+ Func_02008d92(9, 1);
+ Func_02008d9a(12, 1);
+ Func_02008da2(11, 1);
+ Func_02008daa(13, 1);
+ Func_02008dba(10, 1);
+ Call3(Func_02008e16, 9, 0xd000, 0);
+ Call3(Func_02008e22, 12, 0xd000, 0);
+ Call3(Func_02008e2e, 11, 0xd000, 0);
+ Call3(Func_02008e3a, 13, 0xd000, 0);
+ Call3(Func_02008e46, 10, 0xb000, 20);
+ Func_02008dfe(8, 1);
+ Value2(Func_02008e36, base5_1008, 0);
+ if (Value2(Func_02008d6e, 0, 0) == 0) {
+ Func_02008e1a(9, 2);
+ Call1(Func_0200710c, 0x9009);
+ Call3(Func_02008e94, 8, 0x108, 40);
+ Func_0200711e(base5_1008);
+ bump_step(2);
+ } else {
+ bump_step(2);
+ Func_02008e6e(9, 1);
+ Call1(Func_02007160, 0x9009);
+ Func_02008e74(8, 2);
+ Call1(Func_0200716e, 0x9008);
+ }
+ Call3(Func_02008ef4, 13, 0x105, 40);
+ Call2(Func_02008f0c, 0xcccc, 0x1999);
+ Call4(Func_02008f26, 0x1d80000, -1, 0x27c0000, 1);
+ Call3(Func_02008e2c, 13, 0x10000, 0x8000);
+ Call3(Func_02008e74, 13, 0x1d8, 0x296);
+ Func_020071cc(13, 0xb000);
+ Func_020071be(13);
+ Func_020071e0(8, 0x5000);
+ Func_02008ec8(8, 3);
+ Func_02008ed0(9, 3);
+ Func_02008f4a(11, 0, 0);
+ Call3(Func_02008f56, 13, 0x8000, 20);
+ Func_02008ede(11, 3);
+ Func_02008ef6(13, 3);
+ Func_02008e5c(20);
+ Func_02008f24(12, 1);
+ Func_02007232(12, 0x3000);
+ Call3(Func_02008f7c, 0x100c, 0, 20);
+ Func_02008f96(11, 0xb000, 20);
+ Call3(Func_02008fba, 11, 0x101, 40);
+ Func_02007246(11);
+ base7_900c = (s32)Data_0000900c;
+ Func_02007264(12, 0xd000);
+ Func_02008f3c(12, 4);
+ Func_0200725e(base7_900c);
+ Func_0200727a(13, 0xb000);
+ Func_02008f82(13, 1);
+ Func_02007274(13);
+ Call3(Func_02008ffc, 9, 0x100, 20);
+ Func_0200729c(9, 0x3000);
+ Func_02008fa4(9, 1);
+ Func_02007296(9);
+ Func_02008f92(12, 3);
+ Func_020072a4(base7_900c);
+ Func_02008fc0(8, 2);
+ Func_020072b2(8);
+ Func_020072ce(12, 0xd000);
+ Func_02008fb6(12, 3);
+ Func_020072c8(base7_900c);
+ Func_02008fe4(11, 2);
+ Func_020072ec(11, 0xb000);
+ Func_020072de(11);
+ Func_020072fa(12, 0);
+ Func_020072ec(base7_900c);
+ Func_0200905a(8, 0x3000, 0);
+ Func_02009064(9, 0, 0);
+ Func_0200906e(11, 0xd000, 0);
+ Func_02009078(13, 0xd000, 0);
+ Call3(Func_02008fae, 0, 0x10000, 0x8000);
+ Call3(Func_02008ff4, 0, 0x1e6, 0x260);
+ Call3(Func_020090a0, 0, 0x8000, 0);
+ record = Value1(Func_02008fbe, 0);
+ if (record != 0) {
+ Func_0200902c(1, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02008fea, 1, 0x10000, 0x8000);
+ Call3(Func_02009030, 1, 0x1e6, 0x270);
+ Call3(Func_020090dc, 1, 0x8000, 0);
+ record = Value1(Func_02008ffa, 1);
+ if (record != 0) {
+ Func_02009068(2, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02009026, 2, 0x10000, 0x8000);
+ Call3(Func_0200906c, 2, 0x1e6, 0x280);
+ Call3(Func_02009118, 2, 0x8000, 0);
+ record = Value1(Func_02009036, 2);
+ if (record != 0) {
+ Func_020090a4(3, *(s32 *)(record + 8), *(s32 *)(record + 16));
+ }
+ Call3(Func_02009062, 3, 0x10000, 0x8000);
+ Call3(Func_020090a8, 3, 0x1e6, 0x290);
+ Call3(Func_02009154, 3, 0x8000, 20);
+ Call3(Func_02009178, 12, 0x108, 40);
+ Func_02007402(base7_900c);
+ Func_0200911e(9, 1);
+ Call1(Func_02007410, 0x1009);
+ Func_0200910c(8, 3);
+ Func_02007434(8, 0x5000);
+ Func_02007426(8);
+ Func_02007442(8, 0x3000);
+ Value2(Func_0200917a, 8, 0);
+ if (Value2(Func_020090b2, 0, 0) == 1) {
+ Func_02009156(8, 2);
+ Func_02007450(8);
+ Func_0200914c(12, 3);
+ Func_0200745e(base7_900c);
+ Func_02009172(9, 1);
+ Call3(Func_020091c4, 0x9009, 0, 40);
+ bump_step(1);
+ } else {
+ bump_step(3);
+ Func_020091d2(8, 3);
+ Func_02009224(8, 0, 40);
+ }
+ Func_020091ec(13, 1);
+ Func_020074de(13);
+ Func_020091fa(8, 1);
+ Func_02007508(8, 0x5000);
+ Func_020074fe(8);
+ Func_0200921a(13, 1);
+ Func_02007522(13, 0xb000);
+ Func_0200926c(13, 0, 20);
+ Func_02009214(8, 3);
+ Call3(Func_020091b6, 8, 0xcccc, 0x6666);
+ base5_4008 = (s32)Data_00004008;
+ Call3(Func_020091fe, 8, 0x1d8, 0x278);
+ Func_02007540(base5_4008);
+ Call3(Func_020092c6, 13, 0x103, 40);
+ Func_0200925e(13, 2);
+ Func_02007558(13);
+ Func_02009244(8, 4);
+ Func_020092be(base5_4008, 0, 40);
+ Func_02009286(11, 1);
+ Func_0200758e(11, 0xb000);
+ Call1(Func_02007580, 0x100b);
+ Call3(Func_02009308, 10, 0x102, 20);
+ Call3(Func_02009222, 10, 0x26666, 0x13333);
+ Func_020092a4(10, 2, 0);
+ Call3(Func_02009270, 10, 0x1ce, 0x2a2);
+ Func_020075c8(10, 0xb000);
+ Func_020092c8(10, 2);
+ Func_020075c2(10);
+ Func_020075de(9, 0x5000);
+ Func_020092c6(9, 4);
+ Func_020075d8(9);
+ Func_020092d4(8, 3);
+ Func_020075e6(base5_4008);
+ Call3(Func_0200936e, 13, 0x102, 40);
+ Func_02009350(13, 0, 40);
+ Value2(Func_0200761a, 9, 0x3000);
+ Func_0200931a(9, 2);
+ Call1(Func_02007614, 0x1009);
+ Func_02007630(12, 0);
+ Call3(Func_0200938c, 8, 0x8000, 0);
+ Func_02009396(9, 0x5000, 0);
+ Func_020093a0(11, 0xb000, 0);
+ Func_020093aa(13, 0xb000, 0);
+ Func_020093b4(10, 0xb000, 20);
+ Func_0200936c(12, 1);
+ Call3(Func_020093b6, 0x100c, 0, 20);
+ Call3(Func_020093e8, 8, 0x101, 40);
+ Value2(Func_0200768a, 8, 0xd000);
+ Value2(Func_020093c2, 0x1008, 0);
+ if (Value2(Func_020092fa, 0, 0) == 0) {
+ Func_02009386(8, 3);
+ Call1(Func_02007698, 0x1008);
+ bump_step(1);
+ } else {
+ bump_step(1);
+ Call1(Func_020076c0, 0x1008);
+ }
+ Func_020093bc(0, 3);
+ Func_020093c4(8, 3);
+ Call1(Func_020076d6, 0x1008);
+ Call2(Func_020076f4, 8, 0x8000);
+ Call1(Func_020076e6, (s32)Data_00004008);
+ Func_0200776c(2, 0, 0);
+ Call2((void (*)())Func_020093dc, 12, 3);
+ Func_020093e4(11, 3);
+ Func_020093ec(9, 3);
+ Func_0200941c(10, 2);
+ Func_0200942c(13, 2);
+ Func_02009372(20);
+ base5_200e6e4 = (s32)Data_0200e6e4;
+ Func_020093bc(10, base5_200e6e4);
+ Func_02009382(4);
+ Func_020093ca(11, base5_200e6e4);
+ Func_02009390(4);
+ Func_020093d8(12, base5_200e6e4);
+ Func_0200939e(4);
+ Func_020093e6(9, base5_200e6e4);
+ Func_0200943e(3, 2);
+ record = Value1(Func_020093dc, 2);
+ if (record != 0) {
+ Func_0200941e(3, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200944c(3);
+ Func_0200945e(3, 0, 0);
+ Func_0200946e(2, 2);
+ record = Value1(Func_0200940c, 1);
+ if (record != 0) {
+ Func_0200944e(2, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200947c(2);
+ Func_0200948e(2, 0, 0);
+ Func_0200949e(1, 2);
+ record = Value1(Func_0200943c, 0);
+ if (record != 0) {
+ Call3((void (*)())Func_0200947e, 1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_020094ac(1);
+ Func_020094be(1, 0, 0);
+ Value2(Func_0200947e, 13, base5_200e6e4);
+ Call3(Func_020094bc, 8, 0x1c8, 0x288);
+ Func_02007814(8, 0);
+ Func_02009452(232);
+ Call1(Func_02009448, 0x925);
+ Func_02009474();
+}
diff --git a/games/gs1/recon/en/overlays/resource_3b1_c_02001f3c.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_extended_actor_choreography.c
similarity index 52%
rename from games/gs1/recon/en/overlays/resource_3b1_c_02001f3c.c
rename to games/gs1/src/overlays/scene_primary_script/run_scene_3b1_extended_actor_choreography.c
index 23ce66ba3..40aa80127 100644
--- a/games/gs1/recon/en/overlays/resource_3b1_c_02001f3c.c
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_extended_actor_choreography.c
@@ -1,11 +1,12 @@
#include "types.h"
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_RunExtendedActorChoreography:
- * all 229 calls and their arguments in machine order across the complete
- * linear presentation owner. */
-
#define FieldScene_RunExtendedActorChoreography Func_02001f3c
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0000100c[];
+extern u8 Data_0000400b[];
+extern u8 Data_00008008[];
void Func_020067e8();
void Func_02006814();
void Func_0200683a();
@@ -16,17 +17,17 @@ void Func_020068aa();
void Func_020068c4();
void Func_020068d2();
void Func_020068e0();
-void Func_020068f4();
+s32 Func_020068f4();
void Func_02006904();
-void Func_0200693e();
-void Func_02006990();
+s32 Func_0200693e();
+s32 Func_02006990();
void Func_020069b6();
void Func_020069de();
void Func_020069ec();
void Func_02006a10();
void Func_02006a20();
void Func_02006a36();
-void Func_02006a3c();
+s32 Func_02006a3c();
void Func_02006a4e();
void Func_02006a6a();
void Func_02006a78();
@@ -47,7 +48,7 @@ void Func_02006c72();
void Func_02006c8c();
void Func_02006c9a();
void Func_02006cc8();
-void Func_02006da8();
+s32 Func_02006da8();
void Func_02006dae();
void Func_02006dbe();
void Func_02006dd0();
@@ -55,19 +56,20 @@ void Func_02006df4();
void Func_02006e08();
void Func_02006e18();
void Func_02006e2e();
-void Func_02006e34();
+s32 Func_02006e34();
void Func_02006e4a();
void Func_02006e58();
void Func_02006e62();
void Func_02006e74();
void Func_02006e8c();
void Func_02006ea2();
-void Func_02006ea8();
+s32 Func_02006ea8();
void Func_02006eb8();
void Func_02006ebe();
void Func_02006f08();
void Func_02006f16();
void Func_02006f24();
+void Func_02006f32();
void Func_02006f4c();
void Func_02006f5a();
void Func_020084f0();
@@ -145,7 +147,7 @@ void Func_0200886c();
void Func_0200888c();
void Func_020088b4();
void Func_020088ba();
-void Func_020088c4();
+s32 Func_020088c4();
void Func_020088d2();
void Func_020088f4();
void Func_0200890e();
@@ -160,7 +162,7 @@ void Func_02008986();
void Func_02008988();
void Func_02008992();
void Func_0200899e();
-void Func_020089a8();
+s32 Func_020089a8();
void Func_020089b8();
void Func_020089c0();
void Func_020089e8();
@@ -199,7 +201,7 @@ void Func_02008b56();
void Func_02008b8e();
void Func_02008b90();
void Func_02008b92();
-void Func_02008bb8();
+s32 Func_02008bb8();
void Func_02008bc6();
void Func_02008bea();
void Func_02008bee();
@@ -230,241 +232,294 @@ void Func_02008d44();
void Func_02008d98();
void Func_02008dc8();
-void Func_02001f3c(void)
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunExtendedActorChoreography(void)
{
- s32 base;
+ u32 i;
+ s32 record;
+ s32 base6_100c;
+ s32 base5_400b;
+ s32 base5_8008;
+ s32 k_b000;
+ s32 k_5000;
+ s32 k_d000;
Func_020085ae(28);
- Func_0200854e(157286, 19660);
- Func_02006814(29884416, -1, 42467328, 268435476);
+ Call2(Func_0200854e, 0x26666, 0x4ccc);
+ Func_02006814(0x1c80000, -1, 0x2880000, 0x10000014);
Func_020084f0(9, 1);
- Func_0200851e(7571);
+ Call1(Func_0200851e, 0x1d93);
Func_020067e8(9);
- Func_02008558(0, 53248, 0);
- Func_02008564(10, 53248, 0);
+ Call3(Func_02008558, 0, 0xd000, 0);
+ Call3(Func_02008564, 10, 0xd000, 0);
Func_0200856e(11, 0, 0);
- Func_0200857a(12, 12288, 0);
- Func_02008586(13, 32768, 40);
- Func_020085a8(9, 259, 40);
+ Call3(Func_0200857a, 12, 0x3000, 0);
+ Call3(Func_02008586, 13, 0x8000, 40);
+ Call3(Func_020085a8, 9, 0x103, 40);
Func_02008540(9, 2);
Func_0200683a(9);
Func_020085a8(12, 0, 0);
- Func_020085b4(11, 53248, 0);
- Func_020085c0(13, 53248, 20);
+ Call3(Func_020085b4, 11, 0xd000, 0);
+ Call3(Func_020085c0, 13, 0xd000, 20);
Func_02008578(11, 1);
- Func_0200686e(4107);
- Func_020085f6(13, 258, 20);
+ Func_0200686e(0x100b);
+ Call3(Func_020085f6, 13, 0x102, 20);
Func_0200858e(13, 2);
Func_02006888(13);
- Func_0200860e(9, 261, 60);
+ Call3(Func_0200860e, 9, 0x105, 60);
Func_02006898(9);
- Func_02008620(12, 260, 20);
- Func_020068aa(36876);
+ Call3(Func_02008620, 12, 0x104, 20);
+ Call1(Func_020068aa, 0x900c);
Func_020085c6(8, 1);
Func_020085a0(8, 3);
Func_020068c4(8);
- Func_020068e0(12, 12288);
- Func_020068d2(36876);
- Func_020068f4(11, 45056);
+ Func_020068e0(12, 0x3000);
+ Call1(Func_020068d2, 0x900c);
+ k_b000 = 0xb000;
+ Value2(Func_020068f4, 11, k_b000);
Func_020085dc(11, 3);
Func_02008542(10);
Func_0200860a(13, 1);
Func_020085f2(13, 3);
Func_02006904(13);
- Func_02008674(13, 32768, 0);
- Func_02008680(12, 20480, 0);
- Func_0200693e(11, 20480);
- Func_020085c0(13, 26214, 13107);
- Func_020085ca(12, 52428, 26214);
- Func_02008608(12, 444, 668);
- Func_0200861e(13, 472, 668);
+ Call3(Func_02008674, 13, 0x8000, 0);
+ Call3(Func_02008680, 12, 0x5000, 0);
+ k_5000 = 0x5000;
+ Value2(Func_0200693e, 11, k_5000);
+ Call3(Func_020085c0, 13, 0x6666, 0x3333);
+ Call3(Func_020085ca, 12, 0xcccc, 0x6666);
+ Call3(Func_02008608, 12, 0x1bc, 0x29c);
+ Call3(Func_0200861e, 13, 0x1d8, 0x29c);
Func_02008634(12);
Func_0200864c(12, 1);
Func_020085c2(80);
- Func_02006990(12, 53248);
- Func_02008702(12, 257, 60);
+ k_d000 = 0xd000;
+ Value2(Func_02006990, 12, k_d000);
+ Call3(Func_02008702, 12, 0x101, 60);
Func_020086a2(11, 1);
Func_020085e8(20);
- base = 16395;
- Func_020086f2(base, 0, 40);
+ Call3(Func_020086f2, 0x400b, 0, 40);
Func_020086ba(11, 2);
- Func_02008714(11, 53248, 0);
- Func_020069b6(4107);
- Func_02008724(12, 53248, 0);
- Func_02008746(9, 257, 60);
+ Func_02008714(11, k_d000, 0);
+ Func_020069b6(0x100b);
+ Func_02008724(12, k_d000, 0);
+ Call3(Func_02008746, 9, 0x101, 60);
Func_020086b6(11, 4);
Func_0200862c(20);
- Func_020069de(4107);
+ Func_020069de(0x100b);
Func_020086ca(9, 3);
Func_020069ec(9);
- Func_0200875a(13, 53248, 0);
- Func_02008784(13, 258);
+ Func_0200875a(13, k_d000, 0);
+ Call2(Func_02008784, 13, 0x102);
Func_0200870e(13, 2, 20);
Func_02006a10(13);
Func_0200870c(9, 3);
- base = 4108;
+ base6_100c = (s32)Data_0000100c;
Func_02006a20(9);
- Func_02006a3c(11, 53248);
+ Value2(Func_02006a3c, 11, k_d000);
Func_02008744(12, 1);
- Func_02006a36(base);
- Func_020087bc(8, 261, 40);
+ Func_02006a36(base6_100c);
+ Call3(Func_020087bc, 8, 0x105, 40);
Func_0200872c(8, 3);
Func_02006a4e(8);
- Func_020087d6(13, 258, 40);
+ Call3(Func_020087d6, 13, 0x102, 40);
Func_02008768(13, 4, 0);
Func_02006a6a(13);
Func_02008756(9, 3);
Func_02006a78(9);
Func_02008794(11, 1);
- Func_02006a86(4107);
- Func_0200880e(8, 258, 40);
+ Func_02006a86(0x100b);
+ Call3(Func_0200880e, 8, 0x102, 40);
Func_020087e6(8, 0);
Func_020087ae(11, 2);
- Func_02008800(4107, 0, 40);
- Func_02008834(9, 256, 0);
- Func_02008826(9, 20480, 20);
+ Func_02008800(0x100b, 0, 40);
+ Call3(Func_02008834, 9, 0x100, 0);
+ Func_02008826(9, k_5000, 20);
Func_020087d6(9, 2);
Func_02008828(9, 0, 20);
Func_020087c0(11, 3);
Func_02008736(20);
- Func_0200886a(12, 256, 40);
+ Call3(Func_0200886a, 12, 0x100, 40);
Func_02008802(12, 2);
- base = 16395;
- Func_02006afe(base);
- Func_0200886c(11, 20480, 20);
- Func_02006b0e(base);
+ base5_400b = 0x400b;
+ Func_02006afe(base6_100c);
+ Func_0200886c(11, k_5000, 20);
+ Func_02006b0e(base5_400b);
Func_02008822(12, 2);
- Func_02006b1c(base);
+ Func_02006b1c(base6_100c);
Func_02008818(11, 3);
Func_02008840(11, 1);
- Func_02006b32(base);
- Func_020088ba(12, 258, 60);
+ Func_02006b32(base5_400b);
+ Call3(Func_020088ba, 12, 0x102, 60);
Func_0200885a(9, 1);
Func_02006b4c(9);
- Func_020088d2(11, 257, 40);
- Func_020088c4(11, 53248, 20);
+ Call3(Func_020088d2, 11, 0x101, 40);
+ Value3(Func_020088c4, 11, k_d000, 20);
Func_0200884c(9, 3);
Func_02006b6e(9);
- Func_020088f4(11, 259, 20);
+ Call3(Func_020088f4, 11, 0x103, 20);
Func_0200888c(11, 2);
- Func_02006b86(4107);
- Func_0200890e(9, 264, 40);
+ Func_02006b86(0x100b);
+ Call3(Func_0200890e, 9, 0x108, 40);
Func_02006b98(9);
Func_020088b4(8, 1);
Func_0200888c(8, 3);
Func_02006bae(8);
- Func_02008958(9, 53248, 40);
+ Func_02008958(9, k_d000, 40);
Func_02006bfa(9);
Func_02008916(12, 1);
Func_0200885c(20);
- Func_02006c0e(base);
- Func_0200897c(11, 20480, 0);
- Func_02008986(9, 20480, 0);
- Func_02008992(13, 32768, 0);
- Func_0200899e(0, 49152, 0);
- Func_020089a8(10, 45056, 40);
+ Func_02006c0e(base6_100c);
+ Func_0200897c(11, k_5000, 0);
+ Func_02008986(9, k_5000, 0);
+ Call3(Func_02008992, 13, 0x8000, 0);
+ Call3(Func_0200899e, 0, 0xc000, 0);
+ Value3(Func_020089a8, 10, k_b000, 40);
Func_02008960(11, 1);
- Func_02006c52(base);
+ Func_02006c52(base5_400b);
Func_0200893e(12, 3);
- Func_020089b8(base, 0, 20);
+ Func_020089b8(base6_100c, 0, 20);
Func_02008980(9, 2);
Func_02006c72(9);
- Func_020089fa(12, 264, 40);
+ Call3(Func_020089fa, 12, 0x108, 40);
Func_0200896a(12, 3);
- Func_02006c8c(base);
+ Func_02006c8c(base6_100c);
Func_02008988(8, 3);
Func_02006c9a(8);
- Func_02008a0a(8, 32768, 20);
+ Call3(Func_02008a0a, 8, 0x8000, 20);
Func_02008aa0(19);
Func_020089c0(8, 2);
- base = 32776;
- Func_02008a3e(8, 256, 80);
- Func_02006cc8(base);
- Func_02008a4e(12, 257, 0);
- Func_02008a58(11, 257, 0);
- Func_02008a62(13, 257, 0);
- Func_02008a6c(10, 257, 0);
- Func_02008a76(0, 257, 40);
- Func_02008a68(12, 53248, 0);
- Func_02008a72(11, 53248, 0);
- Func_02008a7c(13, 45056, 0);
- Func_02008a86(10, 45056, 0);
- Func_02008a92(0, 49152, 40);
- Func_02008abc(8, 258);
+ base5_8008 = (s32)Data_00008008;
+ Call3(Func_02008a3e, 8, 0x100, 80);
+ Func_02006cc8(base5_8008);
+ Call3(Func_02008a4e, 12, 0x101, 0);
+ Call3(Func_02008a58, 11, 0x101, 0);
+ Call3(Func_02008a62, 13, 0x101, 0);
+ Call3(Func_02008a6c, 10, 0x101, 0);
+ Call3(Func_02008a76, 0, 0x101, 40);
+ Func_02008a68(12, k_d000, 0);
+ Func_02008a72(11, k_d000, 0);
+ Func_02008a7c(13, k_b000, 0);
+ Func_02008a86(10, k_b000, 0);
+ Call3(Func_02008a92, 0, 0xc000, 40);
+ Call2(Func_02008abc, 8, 0x102);
Func_02008a46(8, 4, 40);
Func_02008a56(8, 2);
- Func_02008a9e(base, 0);
- Func_020089e8(8, 104857, 52428);
- Func_02008a2a(8, 475, 598);
- Func_02008ad6(8, 32768, 0);
- Func_02008a0c(9, 65536, 32768);
- Func_02008a50(9, 462, 618);
- Func_02006da8(9, 45056);
- Func_02008b1c(9, 256, 40);
+ Func_02008a9e(base5_8008, 0);
+ Call3(Func_020089e8, 8, 0x19999, 0xcccc);
+ Call3(Func_02008a2a, 8, 0x1db, 0x256);
+ Call3(Func_02008ad6, 8, 0x8000, 0);
+ Call3(Func_02008a0c, 9, 0x10000, 0x8000);
+ Call3(Func_02008a50, 9, 0x1ce, 0x26a);
+ Value2(Func_02006da8, 9, k_b000);
+ Call3(Func_02008b1c, 9, 0x100, 40);
Func_02008ab4(9, 2);
- Func_02006dae(32777);
- Func_02008b34(11, 257, 60);
+ Call1(Func_02006dae, 0x8009);
+ Call3(Func_02008b34, 11, 0x101, 60);
Func_02006dbe(11);
- Func_02008b46(12, 258, 20);
- Func_02006dd0(base);
- Func_02008b56(8, 259, 20);
+ Call3(Func_02008b46, 12, 0x102, 20);
+ Func_02006dd0(base6_100c);
+ Call3(Func_02008b56, 8, 0x103, 20);
Func_02008ae8(8, 4, 0);
- Func_02008b52(8, 20480, 20);
+ Func_02008b52(8, k_5000, 20);
Func_02006df4(8);
Func_02008bee(28);
Func_02008b0e(8, 3);
Func_02006e08(8);
- Func_02008b8e(13, 257, 60);
+ Call3(Func_02008b8e, 13, 0x101, 60);
Func_02006e18(13);
- Func_02006e34(8, 12288);
+ Value2(Func_02006e34, 8, 0x3000);
Func_02008b1c(8, 4);
Func_02006e2e(8);
- Func_02008b00(12, 444, 628);
- Func_02006e58(12, 53248);
- Func_02006e4a(36876);
- Func_02008bb8(8, 20480, 20);
+ Call3(Func_02008b00, 12, 0x1bc, 0x274);
+ Func_02006e58(12, k_d000);
+ Call1(Func_02006e4a, 0x900c);
+ Value3(Func_02008bb8, 8, k_5000, 20);
Func_02008b50(8, 3);
Func_02006e62(8);
- Func_02008bea(11, 258, 60);
- Func_02006e74(4107);
- Func_02008bfa(13, 263, 40);
+ Call3(Func_02008bea, 11, 0x102, 60);
+ Func_02006e74(0x100b);
+ Call3(Func_02008bfa, 13, 0x107, 40);
Func_02008b92(13, 2);
Func_02006e8c(13);
- Func_02006ea8(9, 12288);
+ Value2(Func_02006ea8, 9, 0x3000);
Func_02008b90(9, 4);
- Func_02006ea2(4105);
+ Call1(Func_02006ea2, 0x1009);
Func_02006ebe(12, 0);
Func_02008bc6(8, 1);
Func_02006eb8(8);
Func_02008c26(11, 0, 0);
- Func_02008c48(12, 261, 0);
- Func_02008c52(9, 261, 60);
- Func_02008c6a(78643, 9830);
- Func_02008c0e(10, 1, 44564480, 268435456);
+ Call3(Func_02008c48, 12, 0x105, 0);
+ Call3(Func_02008c52, 9, 0x105, 60);
+ Call2(Func_02008c6a, 0x13333, 0x2666);
+ Func_02006f32(0x1d00000, -1, 0x2a80000, 0x10000000);
+ Func_02008c0e(10, 1);
Func_02006f16(10, 0);
Func_02006f08(10);
Func_02008c76(0, 0, 0);
- Func_02008c9a(10, 258, 40);
+ Call3(Func_02008c9a, 10, 0x102, 40);
Func_02006f24(10);
- Func_02008c94(10, 32768, 20);
- Func_02008cb8(10, 256, 0);
+ Call3(Func_02008c94, 10, 0x8000, 20);
+ Call3(Func_02008cb8, 10, 0x100, 0);
Func_02008c4a(10, 4, 40);
Func_02006f4c(10);
Func_02008c68(10, 1);
Func_02006f5a(10);
- Func_02008bf4(13, 65536, 32768);
- Func_02008c30(13, 438, 659);
- Func_02008ce4(8, 32768, 0);
- Func_02008cee(9, 45056, 0);
- Func_02008cf8(12, 12288, 0);
- Func_02008d02(11, 45056, 0);
+ Call3(Func_02008bf4, 13, 0x10000, 0x8000);
+ Call3(Func_02008c30, 13, 0x1b6, 0x293);
+ Call3(Func_02008ce4, 8, 0x8000, 0);
+ Func_02008cee(9, k_b000, 0);
+ Func_02008cf8(12, 0x3000, 0);
+ Func_02008d02(11, k_b000, 0);
Func_02008d98(17);
- Func_02008c3e(10, 65536, 32768);
- Func_02008c82(10, 488, 686);
- Func_02008d2c(10, 45056, 0);
+ Call3(Func_02008c3e, 10, 0x10000, 0x8000);
+ Call3(Func_02008c82, 10, 0x1e8, 0x2ae);
+ Func_02008d2c(10, k_b000, 0);
Func_02008ca2(13);
Func_02008cba(13, 1);
- Func_02008d44(13, 53248, 0);
+ Func_02008d44(13, k_d000, 0);
Func_02008dc8();
- Func_02008c26();
+ Call1(Func_02008c26, 0x921);
}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_extended_formation_presentation.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_extended_formation_presentation.c
new file mode 100644
index 000000000..69b5f3985
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_extended_formation_presentation.c
@@ -0,0 +1,277 @@
+#include "types.h"
+
+#define FieldScene_RunExtendedFormationPresentation Func_020057ec
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02009ed8();
+void Func_0200a106();
+void Func_0200a110();
+void Func_0200a126();
+void Func_0200a16c();
+void Func_0200a186();
+void Func_0200a188();
+void Func_0200a212();
+s32 Func_0200a218();
+void Func_0200a2a6();
+s32 Func_0200a2ac();
+void Func_0200a37a();
+void Func_0200a384();
+void Func_0200a38e();
+void Func_0200a398();
+void Func_0200a3dc();
+s32 Func_0200a3e2();
+s32 Func_0200a402();
+void Func_0200a4e8();
+s32 Func_0200a7a2();
+s32 Func_0200a7ac();
+s32 Func_0200a7b6();
+void Func_0200bcdc();
+void Func_0200bce0();
+void Func_0200bd28();
+void Func_0200bd38();
+s32 Func_0200bd42();
+void Func_0200bd54();
+void Func_0200bd64();
+void Func_0200bd66();
+void Func_0200bd76();
+void Func_0200bd7e();
+void Func_0200bd8e();
+void Func_0200bd92();
+void Func_0200bd94();
+void Func_0200bdbe();
+void Func_0200bdec();
+void Func_0200be84();
+void Func_0200be88();
+void Func_0200beb4();
+void Func_0200bed6();
+void Func_0200bee6();
+s32 Func_0200beea();
+void Func_0200bef0();
+void Func_0200bef8();
+void Func_0200bf04();
+void Func_0200bf0e();
+void Func_0200bf1a();
+void Func_0200bf1c();
+void Func_0200bf20();
+void Func_0200bf24();
+void Func_0200bf26();
+void Func_0200bf2e();
+void Func_0200bf30();
+void Func_0200bf3a();
+void Func_0200bf3e();
+void Func_0200bf42();
+void Func_0200bf46();
+void Func_0200bf48();
+void Func_0200bf52();
+void Func_0200bf76();
+void Func_0200bf94();
+void Func_0200bfa0();
+void Func_0200bfac();
+void Func_0200bfb8();
+void Func_0200bfba();
+void Func_0200bfc2();
+void Func_0200bfc4();
+void Func_0200bfca();
+void Func_0200bfda();
+s32 Func_0200c01e();
+void Func_0200c054();
+void Func_0200c05e();
+void Func_0200c068();
+void Func_0200c072();
+void Func_0200c07e();
+void Func_0200c080();
+void Func_0200c08c();
+void Func_0200c08e();
+void Func_0200c098();
+void Func_0200c0a2();
+void Func_0200c0a4();
+void Func_0200c0a6();
+void Func_0200c0ae();
+void Func_0200c0b2();
+void Func_0200c0ba();
+void Func_0200c0bc();
+void Func_0200c0be();
+void Func_0200c0c2();
+void Func_0200c0c4();
+void Func_0200c0c8();
+void Func_0200c0d0();
+s32 Func_0200c0d8();
+void Func_0200c0da();
+void Func_0200c0e2();
+void Func_0200c0e6();
+void Func_0200c0ea();
+void Func_0200c0ec();
+void Func_0200c0f0();
+void Func_0200c0f6();
+void Func_0200c0f8();
+void Func_0200c102();
+void Func_0200c104();
+void Func_0200c110();
+void Func_0200c14a();
+extern u8 Data_0200e818[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunExtendedFormationPresentation(void)
+{
+ s32 i;
+ s32 rec2;
+ s32 rec4;
+ s32 rec8;
+ s32 record;
+
+ rec8 = Value2(Func_0200a7a2, 0, 0);
+ rec2 = Value2(Func_0200a7ac, 1, 0);
+ rec4 = Value2(Func_0200a7b6, 2, 0);
+ Func_0200bcdc();
+ Func_0200a106(10, 0, 0);
+ Func_0200a110(17, 0, 0);
+ Call3(Func_0200bd7e, 8, 0x1d80000, 0x980000);
+ Func_0200bd8e(9, 5);
+ Call3(Func_0200bd94, 27, 0x1b80000, 0x860000);
+ Func_0200bdec(27, 15);
+ record = Func_0200bd42(27);
+ Func_0200bce0(record, 0);
+ i = 1;
+ Func_02009ed8(16);
+ i = -i;
+ Call4(Func_0200a126, 0x1b60000, i, 0xae0000, 0x1000001);
+ Func_0200a16c(8, 1, 20);
+ Call1((void (*)())Func_0200beea, 19);
+ Func_0200bef0(181);
+ Call3(Func_0200bd28, 0x20000, 0x20000, 0x10000);
+ Func_0200bd66(10);
+ Call3(Func_0200bd38, i, i, 0xe666);
+ Func_0200bd76(80);
+ Func_0200bf1c(181);
+ Call3(Func_0200bd54, 0x20000, 0x20000, 0x10000);
+ Func_0200bd92(10);
+ Call3(Func_0200bd64, i, i, 0xe666);
+ Func_0200bf42(63);
+ Call1(Func_0200bd92, 0x11a);
+ Call2(Func_0200bee6, 3, 0x102);
+ Func_0200bdbe(40);
+ Func_0200a186(3, 0x6000);
+ Call1(Func_0200beb4, 0x1ec1);
+ Func_0200bed6(3, 0, 40);
+ Func_0200a188(27);
+ Call3(Func_0200bef8, 0, 0x2000, 0);
+ Call3(Func_0200bf04, 1, 0xa000, 0);
+ Func_0200bf0e(2, 0, 0);
+ Call3(Func_0200bf1a, 3, 0xe000, 40);
+ Func_0200bf24(0, 0x6000, 0);
+ Call3(Func_0200bf30, 1, 0xe000, 0);
+ Func_0200bf3a(2, 0x6000, 0);
+ Call3(Func_0200bf46, 3, 0x8000, 40);
+ Call3(Func_0200bf52, 2, 0xe000, 0);
+ Call3(Func_0200bf76, 2, 0x100, 60);
+ Value2(Func_0200a218, 2, 0x2000);
+ Func_0200bf20(2, 1);
+ Func_0200a212(2);
+ Func_0200bf26(0, 1);
+ Func_0200bf2e(1, 1);
+ Func_0200bf3e(3, 1);
+ Func_0200be84(10);
+ Call3(Func_0200bfa0, 0, 0xc000, 0);
+ Call3(Func_0200bfac, 1, 0xc000, 0);
+ Call3(Func_0200bfb8, 2, 0xe000, 0);
+ Call3(Func_0200bfc4, 3, 0xa000, 20);
+ Func_0200bf94(27, 0);
+ record = Func_0200beea(27);
+ Func_0200be88(record, 1);
+ Call3(Func_0200bf0e, 27, 0x10000, 0x8000);
+ Call3(Func_0200bf52, 27, 0x1ae, 134);
+ Value2(Func_0200a2ac, 27, 0x3000);
+ Func_0200bfac(27, 2);
+ Func_0200a2a6(27);
+ Func_0200bfba(rec8, 1);
+ Func_0200bfc2(rec2, 1);
+ Func_0200bfca(rec4, 1);
+ Func_0200bfda(13, 1);
+ Call2(Func_0200c054, rec8, 0x102);
+ Call2(Func_0200c05e, rec2, 0x102);
+ Call2(Func_0200c068, rec4, 0x102);
+ Call2(Func_0200c072, 13, 0x102);
+ Func_0200bf48(40);
+ Func_0200a37a(12, rec8, 0);
+ Func_0200a384(12, rec2, 1);
+ Func_0200a38e(12, rec4, 0);
+ Func_0200a398(11, 1, 0);
+ Call3(Func_0200c08c, rec8, 0xd000, 0);
+ Call3(Func_0200c098, rec2, 0xb000, 0);
+ Call3(Func_0200c0a4, rec4, 0xd000, 0);
+ Func_0200c0ae(0, 0, 0);
+ Call3(Func_0200c0ba, 1, 0x8000, 0);
+ Func_0200c0c4(2, 0, 0);
+ Call3(Func_0200c0d0, 3, 0x8000, 40);
+ Func_0200c080(27, 2);
+ Func_0200c0c8(27, 0);
+ Call3(Func_0200c0ec, 0, 0xc000, 0);
+ Call3(Func_0200c0f8, 1, 0xc000, 0);
+ Call3(Func_0200c104, 2, 0xc000, 0);
+ Call3(Func_0200c110, 3, 0xc000, 20);
+ i = 128;
+ Call3(Func_0200c07e, 27, 0x1b8, 134);
+ i <<= 8;
+ Func_0200c0a2(27, 0, 0);
+ Value2(Func_0200a3e2, 1, i);
+ Func_0200c0ea(1, 1);
+ Func_0200a3dc(1);
+ Func_0200c14a(2, 0, 0);
+ Value2(Func_0200a402, 3, i);
+ Func_0200c0da(0, 3);
+ Func_0200c0e2(1, 3);
+ Func_0200c0ea(2, 3);
+ Func_0200c102(3, 3);
+ Call3(Func_0200c0a6, 1, 0x10000, i);
+ Call3(Func_0200c0b2, 2, 0x10000, i);
+ Call3(Func_0200c0be, 3, 0x10000, i);
+ Func_0200c0d0(1, (s32)Data_0200e818);
+ Value2(Func_0200c0d8, 2, (s32)Data_0200e818);
+ Func_0200c0f0(3, (s32)Data_0200e818);
+ Call1(Func_0200c08e, 0x302);
+ *(s32 *)0x0200ff84 = 0;
+ Value2(Func_0200c01e, 0x200dc49, 0xc80);
+ Func_0200a4e8(23, 0, 0);
+ Func_0200c0f6(27);
+ Call1(Func_0200c0bc, 0x12f);
+ Call1(Func_0200c0c2, 0x927);
+ Func_0200c0e6();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_four_actor_progress_presentation.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_four_actor_progress_presentation.c
new file mode 100644
index 000000000..6004a33bd
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_four_actor_progress_presentation.c
@@ -0,0 +1,261 @@
+#include "types.h"
+
+#define FieldScene_RunFourActorProgressPresentation Func_02005d10
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_020094fa();
+void Func_0200a400();
+void Func_0200a638();
+void Func_0200a642();
+void Func_0200a656();
+void Func_0200a67a();
+void Func_0200a69c();
+void Func_0200a706();
+void Func_0200a710();
+void Func_0200a71a();
+void Func_0200a724();
+void Func_0200a72e();
+void Func_0200a746();
+void Func_0200a75a();
+void Func_0200a790();
+void Func_0200a818();
+void Func_0200a826();
+void Func_0200a99a();
+s32 Func_0200acc6();
+s32 Func_0200acd0();
+s32 Func_0200acda();
+s32 Func_0200ace4();
+void Func_0200c20a();
+void Func_0200c248();
+s32 Func_0200c26c();
+s32 Func_0200c2aa();
+void Func_0200c2b0();
+void Func_0200c2be();
+void Func_0200c2ce();
+void Func_0200c2d4();
+void Func_0200c2e8();
+void Func_0200c312();
+void Func_0200c316();
+s32 Func_0200c31e();
+s32 Func_0200c32c();
+s32 Func_0200c336();
+void Func_0200c354();
+void Func_0200c37a();
+void Func_0200c3b0();
+void Func_0200c3ca();
+s32 Func_0200c3f2();
+s32 Func_0200c3fc();
+void Func_0200c408();
+void Func_0200c422();
+void Func_0200c424();
+void Func_0200c42e();
+void Func_0200c432();
+void Func_0200c43a();
+void Func_0200c446();
+void Func_0200c448();
+void Func_0200c44c();
+void Func_0200c460();
+void Func_0200c46c();
+void Func_0200c488();
+void Func_0200c4b2();
+void Func_0200c4d4();
+void Func_0200c4e2();
+void Func_0200c4ee();
+void Func_0200c4fa();
+void Func_0200c502();
+void Func_0200c506();
+void Func_0200c510();
+void Func_0200c51e();
+void Func_0200c52c();
+void Func_0200c53c();
+void Func_0200c554();
+void Func_0200c55c();
+void Func_0200c568();
+void Func_0200c56a();
+void Func_0200c56c();
+void Func_0200c574();
+void Func_0200c576();
+void Func_0200c578();
+void Func_0200c586();
+void Func_0200c598();
+void Func_0200c59a();
+s32 Func_0200c5a0();
+void Func_0200c5aa();
+void Func_0200c5b6();
+s32 Func_0200c5b8();
+void Func_0200c5c2();
+void Func_0200c5ce();
+void Func_0200c5da();
+
+extern u8 Data_0200e904[];
+extern u8 Data_0200e938[];
+extern u8 Data_0200e7c8[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunFourActorProgressPresentation(void)
+{
+ u32 i;
+ s32 rec;
+ s32 rec2;
+ s32 rec4;
+ s32 rec7;
+ s32 record;
+ s32 base6_200e904;
+ s32 base5_200e938;
+ s32 base5_200e7c8;
+
+ rec7 = Value2(Func_0200acc6, 0, 0);
+ rec2 = Value2(Func_0200acd0, 1, 0);
+ rec4 = Value2(Func_0200acda, 2, 0);
+ rec = Value2(Func_0200ace4, 3, 0);
+ Func_0200c20a();
+ Func_020094fa();
+ Func_0200a638(10, 0, 0);
+ Func_0200a642(17, 0, 0);
+ Call3(Func_0200c2b0, 8, 0x1d80000, 0x980000);
+ Call3(Func_0200c2be, 27, 0x1b80000, 0x860000);
+ Func_0200c316(27, 15);
+ record = Func_0200c26c(27);
+ Func_0200c20a(record, 0);
+ Func_0200a400(16);
+ Func_0200c2e8(9, 5);
+ Call4(Func_0200a656, 0x1b60000, -1, 0xae0000, 0x1000001);
+ Func_0200a69c(8, 1, 20);
+ Func_0200c354(27, 0);
+ record = Func_0200c2aa(27);
+ Func_0200c248(record, 1);
+ Call3(Func_0200c2ce, 27, 0x10000, 0x8000);
+ Call3(Func_0200c312, 27, 0x198, 132);
+ Call3(Func_0200c31e, 27, 0x198, 142);
+ Call3(Func_0200c3ca, 27, 0x3000, 20);
+ Func_0200c37a(27, 2);
+ Call1(Func_0200c3b0, 0x1f29);
+ Func_0200a67a(27);
+ Func_0200c2d4(120);
+ Func_0200a706(12, rec7, 0);
+ Func_0200a710(12, rec2, 1);
+ Func_0200a71a(12, rec4, 0);
+ Func_0200a724(12, rec, 1);
+ Func_0200a72e(11, 0, 0);
+ Call3(Func_0200c422, rec7, 0xd000, 0);
+ Call3(Func_0200c42e, rec2, 0xb000, 0);
+ Call3(Func_0200c43a, rec4, 0xd000, 0);
+ Call3(Func_0200c446, rec, 0xb000, 60);
+ base6_200e904 = 0;
+ if (Value1(Func_0200c31e, 0x934) != 0) {
+ base6_200e904 = 2;
+ } else {
+ if (Value1(Func_0200c32c, 0x933) != 0 || Value1(Func_0200c336, 0x92f) != 0) {
+ base6_200e904 = 1;
+ }
+ }
+ Func_0200c424(rec7, 1);
+ if (base6_200e904 == 1) {
+ bump_step(1);
+ } else {
+ if (base6_200e904 == 2) {
+ bump_step(2);
+ }
+ }
+ Func_0200c44c(rec7, 2);
+ Func_0200a746(rec7);
+ Call1(Func_0200c488, 0x1f2d);
+ Func_0200c448(27, 4);
+ Func_0200a75a(27);
+ Call3(Func_0200c4e2, rec7, 0x102, 0);
+ Call3(Func_0200c4ee, rec2, 0x102, 0);
+ Call3(Func_0200c4fa, rec4, 0x102, 0);
+ Call3(Func_0200c506, rec, 0x102, 60);
+ Func_0200a790(27);
+ Call3(Func_0200c460, 27, 0x198, 132);
+ Call3(Func_0200c46c, 27, 0x1bc, 132);
+ Func_0200c432(27);
+ Func_0200c408(40);
+ if (base6_200e904 == 0) {
+ if (Value1(Func_0200c3f2, 0x92c) != 0 || Value1(Func_0200c3fc, 0x92d) != 0) {
+ base6_200e904 = 3;
+ }
+ }
+ if (base6_200e904 == 0) {
+ bump_step(1);
+ } else {
+ if (base6_200e904 == 1) {
+ bump_step(2);
+ } else {
+ if (base6_200e904 == 2) {
+ bump_step(3);
+ }
+ }
+ }
+ Func_0200a826(rec7, 0);
+ Func_0200a818(rec7);
+ Call3(Func_0200c4b2, rec7, 0x10000, 0x8000);
+ base6_200e904 = (s32)Data_0200e904;
+ Func_0200c4d4(rec7, base6_200e904);
+ Call3(Func_0200c5a0, rec2, 0x5000, 0);
+ Func_0200c5aa(rec4, 0, 0);
+ Call3(Func_0200c5b6, rec, 0x8000, 40);
+ Call3(Func_0200c5c2, rec2, 0xd000, 0);
+ Call3(Func_0200c5ce, rec4, 0xb000, 0);
+ Call3(Func_0200c5da, rec, 0x5000, 20);
+ Call3(Func_0200c510, rec2, 0x10000, 0x8000);
+ Call3(Func_0200c51e, rec4, 0x10000, 0x8000);
+ Call3(Func_0200c52c, rec, 0x10000, 0x8000);
+ Func_0200c53c(rec4, base6_200e904);
+ Func_0200c502(40);
+ base5_200e938 = (s32)Data_0200e938;
+ Func_0200c55c(rec2, base5_200e938);
+ Func_0200c554(rec2, base6_200e904);
+ Func_0200c56c(rec, base5_200e938);
+ Func_0200c574(rec, base6_200e904);
+ Call3(Func_0200c56a, 1, 0x10000, 0x8000);
+ Call3(Func_0200c578, 2, 0x10000, 0x8000);
+ Call3(Func_0200c586, 3, 0x10000, 0x8000);
+ base5_200e7c8 = (s32)Data_0200e7c8;
+ Func_0200c598(1, base5_200e7c8);
+ Value2(Func_0200c5a0, 2, base5_200e7c8);
+ Value2(Func_0200c5b8, 3, base5_200e7c8);
+ Func_0200a99a(23, 0, 0);
+ Call1(Func_0200c568, 0x927);
+ Call1(Func_0200c568, 0x8a0);
+ Call1(Func_0200c576, 0x12f);
+ Func_0200c59a();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_three_actor_presentation.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_three_actor_presentation.c
new file mode 100644
index 000000000..63873d2ef
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3b1_three_actor_presentation.c
@@ -0,0 +1,271 @@
+#include "types.h"
+
+#define FieldScene_RunThreeActorPresentation Func_02001b34
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_0000800c[];
+extern u8 Data_0000a00e[];
+extern u8 Data_0200e6a8[];
+void Func_020063f0();
+void Func_02006412();
+void Func_02006418();
+void Func_0200641a();
+void Func_02006448();
+void Func_02006458();
+void Func_02006476();
+void Func_02006484();
+void Func_02006498();
+void Func_020064a6();
+void Func_020064b4();
+void Func_020064ba();
+void Func_020064c8();
+void Func_020064d6();
+void Func_020064e4();
+void Func_020064f2();
+void Func_02006514();
+void Func_02006554();
+void Func_0200656a();
+void Func_02006570();
+void Func_0200658c();
+void Func_0200659a();
+void Func_020065b2();
+void Func_020065ee();
+void Func_020065fe();
+void Func_02006622();
+void Func_02006630();
+void Func_0200664a();
+void Func_02006658();
+void Func_02006720();
+s32 Func_02007fe6();
+void Func_02008018();
+void Func_020080bc();
+void Func_020080f4();
+void Func_02008120();
+void Func_02008122();
+void Func_02008136();
+void Func_02008154();
+void Func_0200815e();
+void Func_0200817c();
+void Func_02008180();
+void Func_02008188();
+void Func_02008192();
+void Func_0200819c();
+void Func_020081b6();
+void Func_020081bc();
+void Func_020081c0();
+void Func_020081c2();
+void Func_020081c6();
+void Func_020081dc();
+void Func_020081e0();
+void Func_020081e6();
+void Func_02008214();
+void Func_02008228();
+void Func_0200825a();
+void Func_02008266();
+void Func_02008268();
+void Func_02008278();
+void Func_02008280();
+void Func_02008286();
+void Func_020082a4();
+void Func_020082a8();
+void Func_020082b8();
+void Func_020082c0();
+void Func_020082c2();
+void Func_020082f2();
+void Func_020082f6();
+void Func_020082fe();
+void Func_02008308();
+void Func_02008312();
+void Func_0200831e();
+void Func_02008320();
+void Func_02008322();
+void Func_02008324();
+void Func_0200832a();
+void Func_0200832c();
+void Func_02008330();
+s32 Func_02008336();
+void Func_02008340();
+void Func_02008346();
+void Func_0200834e();
+u8 *Func_02008358();
+void Func_0200835c();
+void Func_02008366();
+void Func_0200838c();
+void Func_02008394();
+void Func_020083b6();
+void Func_020083b8();
+void Func_020083c6();
+void Func_020083e6();
+void Func_0200840a();
+void Func_0200840e();
+void Func_02008426();
+void Func_02008454();
+void Func_02008460();
+void Func_02008476();
+void Func_020084a8();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunThreeActorPresentation(void)
+{
+ u32 i;
+ u8 *record;
+ s32 base6_800c;
+ s32 base5_a00e;
+ s32 base5_200e6a8;
+
+ if (Value1(Func_02007fe6, 0x911) == 0) {
+ } else {
+ Func_02008018();
+ Func_0200819c();
+ Call2(Func_02008154, 0x26666, 0x4ccc);
+ Call4(Func_02006418, 0x5b70000, -1, 0x1d00000, 0x10000014);
+ Func_020080f4(13, 1);
+ Call1(Func_02008122, 0x1d56);
+ Func_020063f0(0x200d);
+ Func_02006412(12, 0xd000);
+ base6_800c = (s32)Data_0000800c;
+ Call3(Func_02008188, 12, 0x102, 20);
+ Func_02008120(12, 2);
+ Func_0200641a(base6_800c);
+ Func_02008136(14, 1);
+ Call3(Func_02008180, 0xa00e, 0, 20);
+ Func_02006448(12, 0);
+ base5_a00e = 0xa00e;
+ Call3(Func_020081bc, 12, 0x101, 40);
+ Call3(Func_020081c6, 14, 0x103, 40);
+ Func_0200815e(14, 3);
+ Func_02006458(base5_a00e);
+ Call2(Func_020081e6, 12, 0x102);
+ Func_020080bc(40);
+ Func_0200817c(12, 3);
+ Func_02006476(base6_800c);
+ Func_02008192(14, 1);
+ Func_02006484(base5_a00e);
+ Func_020064a6(14, 0xb000);
+ Func_02006498(base5_a00e);
+ Func_020064b4(12, 0xd000);
+ Call3(Func_02008228, 12, 0x100, 30);
+ Func_020081c0(12, 1);
+ Func_020064ba(base6_800c);
+ Func_020081b6(13, 4);
+ Func_020064c8(0x200d);
+ Func_020081dc(13, 2);
+ Func_020064d6(0x200d);
+ Func_020081c2(12, 4);
+ Func_020064e4(base6_800c);
+ Func_020081e0(14, 4);
+ Func_020064f2(base5_a00e);
+ Func_02006514(14, 0x8000);
+ Func_02008214(14, 2);
+ Func_02008266(base5_a00e, 0, 20);
+ Func_02008280(12, 0, 0);
+ Call3(Func_020082a4, 12, 0x102, 80);
+ Func_02008286(base6_800c, 0, 20);
+ Call3(Func_020082b8, 14, 0x103, 0);
+ Call3(Func_020082c2, 13, 0x103, 60);
+ Func_0200825a(14, 2);
+ Func_02006554(base5_a00e);
+ Func_02006570(14, 0xb000);
+ Func_02008278(14, 1);
+ Func_0200656a(base5_a00e);
+ Func_0200658c(13, 0x3000);
+ Call3(Func_020082fe, 13, 0x101, 0);
+ Call3(Func_02008308, 12, 0x101, 60);
+ Func_020082a8(13, 1);
+ Func_0200659a(13);
+ Call3(Func_02008320, 14, 0x103, 40);
+ Func_020082c0(14, 1);
+ Func_020065b2(base5_a00e);
+ Func_02008320(12, 0xd000, 0);
+ Call3(Func_0200832c, 13, 0x5000, 40);
+ Call3((void (*)())Func_02008336, 12, 0, 0);
+ Func_020065ee(13, 0x3000);
+ Func_020082f6(12, 2);
+ Func_02008340(base6_800c, 0, 20);
+ Call3(Func_0200835c, 14, 0x4000, 40);
+ Func_020065fe(base5_a00e);
+ Func_02008312(12, 2);
+ Func_02008322(13, 2);
+ Func_02008268(60);
+ Func_02008330(13, 1);
+ Func_02006622(13);
+ Func_0200831e(14, 3);
+ Func_02006630(base5_a00e);
+ Call3(Func_020083b8, 12, 0x102, 40);
+ Call2((void (*)())Func_02008358, 12, 2);
+ Func_0200664a(base6_800c);
+ Func_02008346(13, 3);
+ Func_02006658(13);
+ Func_020083c6(14, 0xb000, 40);
+ Func_0200834e(14, 3);
+ Func_02008366(13, 3);
+ Call3(Func_02008308, 14, 0x19999, 0xcccc);
+ Call3(Func_02008312, 13, 0x19999, 0xcccc);
+ base5_200e6a8 = (s32)Data_0200e6a8;
+ Func_02008324(14, base5_200e6a8);
+ Func_0200832c(13, base5_200e6a8);
+ Func_020082f2(20);
+ Call3(Func_0200840e, 12, 0x4000, 0);
+ Call3(Func_02008340, 0, 0x26666, 0x13333);
+ *(u8 *)(Func_02008336(0) + 90) &= 254;
+ Call3(Func_02008394, 0, 184, 0x208);
+ Func_0200832a(1);
+ {
+ u8 *record = Func_02008358(0);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ Func_02008454(0, 0x8000, 20);
+ Call3(Func_02008460, 0, 0x4000, 0);
+ Func_0200840a(12, 4, 20);
+ Call3(Func_02008476, 0, 0xa000, 20);
+ Func_02008426(12, 2);
+ Func_02006720(12);
+ Call3(Func_020083b6, 12, 0x19999, 0xcccc);
+ Func_020083c6(12, base5_200e6a8);
+ Func_0200838c(40);
+ Call3(Func_020084a8, 0, 0x4000, 0);
+ Func_020083e6(12);
+ Call1(Func_0200838c, 0x922);
+ Func_020083b8();
+ }
+}
diff --git a/games/gs1/recon/en/overlays/resource_3b9_c_02001cd4.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3b9_build_actor_presentation_sequence.c
similarity index 53%
rename from games/gs1/recon/en/overlays/resource_3b9_c_02001cd4.c
rename to games/gs1/src/overlays/scene_primary_script/run_scene_3b9_build_actor_presentation_sequence.c
index 1e8ad5ea1..c3c7e894a 100644
--- a/games/gs1/recon/en/overlays/resource_3b9_c_02001cd4.c
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3b9_build_actor_presentation_sequence.c
@@ -1,11 +1,9 @@
#include "types.h"
-/* AUDITED GENERATED CALL SCRIPT for FieldScene_BuildActorPresentationSequence:
- * 180 calls, one event-result branch, two progress updates, and four scene
- * state writes across the complete callable owner. */
-
#define FieldScene_BuildActorPresentationSequence Func_02001cd4
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
void Func_02003a00();
void Func_02003a36();
void Func_02003a44();
@@ -20,7 +18,7 @@ void Func_02003aea();
void Func_02003af2();
void Func_02003b16();
void Func_02003b18();
-void Func_02003b32();
+s32 Func_02003b32();
void Func_02003b42();
void Func_02003b50();
void Func_02003b58();
@@ -46,7 +44,7 @@ void Func_02003ea6();
void Func_02003eb4();
void Func_02003ec0();
void Func_02003eca();
-void Func_02003ed0();
+s32 Func_02003ed0();
void Func_02003f5a();
void Func_0200489c();
void Func_020048ca();
@@ -120,7 +118,7 @@ void Func_02004d02();
void Func_02004d0c();
void Func_02004d16();
void Func_02004d36();
-int Func_02004d3c();
+s32 Func_02004d3c();
void Func_02004d42();
void Func_02004d4c();
void Func_02004d4e();
@@ -129,7 +127,7 @@ void Func_02004d6a();
void Func_02004d74();
void Func_02004d7e();
void Func_02004d8c();
-void Func_02004da2();
+s32 Func_02004da2();
void Func_02004da6();
void Func_02004db0();
void Func_02004dc2();
@@ -156,7 +154,7 @@ void Func_02004eea();
void Func_02004ef6();
void Func_02004efc();
void Func_02004efe();
-void Func_02004f04();
+s32 Func_02004f04();
void Func_02004f06();
void Func_02004f1c();
void Func_02004f1e();
@@ -180,193 +178,245 @@ void Func_020050b2();
void Func_020050d0();
void Func_020050dc();
-void Func_02001cd4(void)
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+extern u8 Data_0200adac[];
+
+static __inline__ void bump_step(s32 amount)
{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_BuildActorPresentationSequence(void)
+{
+ s32 flag;
+ s32 k6000;
+ s32 k8000;
+ s32 base5_200adac;
+
Func_020048d4();
- Func_02004942(1, 51904512, 8912896);
- Func_02004950(2, 54001664, 8912896);
- Func_0200495e(3, 52953088, 9961472);
+ Call3(Func_02004942, 1, 0x3180000, 0x880000);
+ Call3(Func_02004950, 2, 0x3380000, 0x880000);
+ Call3(Func_0200495e, 3, 0x3280000, 0x980000);
Func_0200489c(1);
- Func_02004a06(-1, -1, -1, 0);
+ Call4(Func_02004a06, -1, -1, -1, 0);
Func_02004a36(0, 0);
Func_02004a36(0, 0);
Func_02004a4c(1);
Func_020048ca(1);
- *(u32 *)(*(u32 *)0x03001ebc + 448) = 515;
- *(u32 *)(*(u32 *)0x03001ebc + 456) = 1;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x203;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c8)) = 1;
Func_02004a76();
Func_02004a8a();
Func_02004a72(0, 0);
- Func_02004a72(65538, 0);
+ Call2(Func_02004a72, 0x10002, 0);
Func_02004a88(40);
Func_02004966(80);
Func_020049fe(8, 1);
Func_02004974(20);
Func_02004a0c(2, 2);
Func_02004982(40);
- Func_02003a00(8, 12288);
+ Func_02003a00(8, 0x3000);
Func_02004a28(8, 2);
Func_0200499e(20);
- Func_02004ac0(65536, 0);
+ Call2(Func_02004ac0, 0x10000, 0);
Func_02004ad6(40);
Func_020049b4(80);
- Func_02004a98(2, 256, 0);
+ Call3(Func_02004a98, 2, 0x100, 0);
Func_02004a58(2, 1);
Func_020049ce(20);
- Func_02004a7c(8440);
+ Call1(Func_02004a7c, 0x20f8);
Func_02003a36(2);
Func_02004a62(8, 3);
Func_02003a44(8);
- Func_02004acc(3, 258, 40);
+ Call3(Func_02004acc, 3, 0x102, 40);
Func_02003a56(3);
- Func_02004ad6(8, 32768, 0);
+ Call3(Func_02004ad6, 8, 0x8000, 0);
Func_02004ae0(9, 0, 40);
- Func_02004aec(8, 20480, 0);
- Func_02003a94(9, 12288);
- Func_02004b06(9, 261, 20);
+ Call3(Func_02004aec, 8, 0x5000, 0);
+ Func_02003a94(9, 0x3000);
+ Call3(Func_02004b06, 9, 0x105, 20);
Func_02003a90(9);
- Func_02004b16(1, 259, 20);
+ Call3(Func_02004b16, 1, 0x103, 20);
Func_02004ace(1, 2);
Func_02003aa8(1);
- Func_02004b30(10, 258, 40);
+ Call3(Func_02004b30, 10, 0x102, 40);
Func_02003aba(10);
Func_02004ae6(11, 3);
Func_02003ac8(11);
- Func_02003aea(2, 40960);
+ Func_02003aea(2, 0xa000);
Func_02004b02(2, 4);
Func_02003ae4(2);
Func_02004b20(3, 1);
Func_02003af2(3);
- Func_02004b78(1, 259, 20);
+ Call3(Func_02004b78, 1, 0x103, 20);
Func_02003b18(1, 0);
+ k6000 = 0x6000;
Func_02004b3c(1, 2);
Func_02003b16(1);
- Func_02003b32(0, 24576);
- Func_02004ba6(0, 258, 60);
+ Value2(Func_02003b32, 0, k6000);
+ Call3(Func_02004ba6, 0, 0x102, 60);
Func_02004b66(2, 1);
- Func_02003b50(2, 32768);
+ Call2(Func_02003b50, 2, 0x8000);
Func_02003b42(2);
Func_02004b5e(3, 4);
Func_02004af4(20);
Func_02003b58(3);
Func_02004b96(1, 1);
- Func_02003b7e(1, 8192);
+ Func_02003b7e(1, 0x2000);
Func_02003b70(1);
- Func_02004bf6(2, 261, 60);
- Func_02004bf8(2, 8192, 0);
+ Call3(Func_02004bf6, 2, 0x105, 60);
+ Func_02004bf8(2, 0x2000, 0);
Func_02004c02(1, 0, 0);
- Func_02004c0e(3, 57344, 20);
- Func_02004c22(0, 258, 0);
- Func_02004c2e(1, 258, 0);
- Func_02004c3a(3, 258, 80);
- Func_02004c4a(2, 262, 0);
+ Call3(Func_02004c0e, 3, 0xe000, 20);
+ Call3(Func_02004c22, 0, 0x102, 0);
+ Call3(Func_02004c2e, 1, 0x102, 0);
+ Call3(Func_02004c3a, 3, 0x102, 80);
+ Call3(Func_02004c4a, 2, 0x106, 0);
Func_02004c0a(2, 1);
- Func_02003bf2(2, 49152);
+ Func_02003bf2(2, 0xc000);
Func_02003be4(2);
- Func_02004c62(0, 49152, 0);
- Func_02004c6c(1, 49152, 0);
- Func_02004c76(3, 49152, 20);
- Func_02003c1e(8, 12288);
+ Func_02004c62(0, 0xc000, 0);
+ Func_02004c6c(1, 0xc000, 0);
+ Func_02004c76(3, 0xc000, 20);
+ Func_02003c1e(8, 0x3000);
Func_02004c36(8, 3);
Func_02003c18(8);
- Func_02004ca0(0, 256, 0);
- Func_02004cac(1, 256, 0);
- Func_02004cb8(3, 256, 40);
+ Call3(Func_02004ca0, 0, 0x100, 0);
+ Call3(Func_02004cac, 1, 0x100, 0);
+ Call3(Func_02004cb8, 3, 0x100, 40);
Func_02004c78(9, 1);
Func_02003c4a(9);
- Func_02004cc8(0, 24576, 0);
- Func_02004cd4(1, 57344, 0);
- Func_02004cde(2, 24576, 0);
- Func_02004cea(3, 57344, 40);
+ Func_02004cc8(0, k6000, 0);
+ Call3(Func_02004cd4, 1, 0xe000, 0);
+ Func_02004cde(2, k6000, 0);
+ Call3(Func_02004cea, 3, 0xe000, 40);
Func_02004cb2(10, 1);
Func_02003c84(10);
- Func_02004d02(0, 49152, 0);
- Func_02004d0c(1, 49152, 0);
- Func_02004d16(2, 49152, 0);
- Func_02003cbe(3, 49152);
+ Func_02004d02(0, 0xc000, 0);
+ Func_02004d0c(1, 0xc000, 0);
+ Func_02004d16(2, 0xc000, 0);
+ Func_02003cbe(3, 0xc000);
Func_02004cd6(11, 3);
Func_02003cb8(11);
- Func_02004d36(0, 24576, 0);
- Func_02004d42(1, 57344, 0);
- Func_02004d4c(2, 24576, 0);
- Func_02004d58(3, 57344, 20);
- Func_02004d6a(1, 261, 0);
- Func_02004d74(2, 261, 0);
- Func_02004d7e(3, 261, 80);
- Func_02004d8c(2, 262, 0);
+ Func_02004d36(0, k6000, 0);
+ Call3(Func_02004d42, 1, 0xe000, 0);
+ Func_02004d4c(2, k6000, 0);
+ Call3(Func_02004d58, 3, 0xe000, 20);
+ Call3(Func_02004d6a, 1, 0x105, 0);
+ Call3(Func_02004d74, 2, 0x105, 0);
+ Call3(Func_02004d7e, 3, 0x105, 80);
+ Call3(Func_02004d8c, 2, 0x106, 0);
Func_02004d4e(2, 1);
- Func_02003d36(2, 57344);
+ Func_02003d36(2, 0xe000);
Func_02003d28(2);
Func_02004da6(0, 0, 0);
Func_02004db0(1, 0, 20);
- Func_02004dc2(11, 257, 60);
- Func_02004da2(2, 0);
- Func_02004dcc(0, 8192, 0);
- Func_02004dd6(1, 57344, 0);
- Func_02004de0(2, 40960, 0);
- Func_02004dea(3, 49152, 0);
+ Call3(Func_02004dc2, 11, 0x101, 60);
+ Value2(Func_02004da2, 2, 0);
+ Func_02004dcc(0, 0x2000, 0);
+ Func_02004dd6(1, 0xe000, 0);
+ Func_02004de0(2, 0xa000, 0);
+ Func_02004dea(3, 0xc000, 0);
+ flag = 0;
if (Func_02004d3c(0, 0) == 1) {
Func_02003da4(2);
- (*(u16 *)(*(u32 *)0x03001ebc + 472))++;
+ flag = 1;
} else {
- (*(u16 *)(*(u32 *)0x03001ebc + 472))++;
+ bump_step(1);
Func_02004de4(2, 3);
- Func_02003ddc(2, 49152);
+ Func_02003ddc(2, 0xc000);
Func_02003dce(2);
}
- Func_02004e62(8, 32768, 0, 473);
+ if (flag) {
+ bump_step(1);
+ }
+ Call3(Func_02004e62, 8, 0x8000, 0);
Func_02004e6c(9, 0, 0);
- Func_02004e78(10, 12288, 0);
- Func_02004e84(11, 45056, 20);
- Func_02004e96(8, 261, 0);
- Func_02004ea0(9, 261, 0);
- Func_02004eaa(10, 261, 0);
- Func_02004eb6(11, 261, 60);
+ Call3(Func_02004e78, 10, 0x3000, 0);
+ Call3(Func_02004e84, 11, 0xb000, 20);
+ Call3(Func_02004e96, 8, 0x105, 0);
+ Call3(Func_02004ea0, 9, 0x105, 0);
+ Call3(Func_02004eaa, 10, 0x105, 0);
+ Call3(Func_02004eb6, 11, 0x105, 60);
Func_02004e78(8, 1);
- Func_02003e60(8, 12288);
+ Func_02003e60(8, 0x3000);
Func_02003e52(8);
- Func_02004ed2(0, 49152, 0);
- Func_02004ede(1, 49152, 0);
- Func_02004eea(2, 49152, 0);
- Func_02004ef6(3, 49152, 20);
+ Call3(Func_02004ed2, 0, 0xc000, 0);
+ Call3(Func_02004ede, 1, 0xc000, 0);
+ Call3(Func_02004eea, 2, 0xc000, 0);
+ Call3(Func_02004ef6, 3, 0xc000, 20);
Func_02004ebe(9, 1);
- Func_02003ea6(9, 12288);
+ Func_02003ea6(9, 0x3000);
Func_02003e98(9);
Func_02004ed4(10, 1);
- Func_02003ec0(10, 20480);
+ Call2(Func_02003ec0, 10, 0x5000);
+ k8000 = 0x8000;
Func_02003eb4(10);
- Func_02003ed0(11, 32768);
+ Value2(Func_02003ed0, 11, k8000);
Func_02004ee8(11, 3);
Func_02003eca(11);
- Func_02004f4a(1, 57344, 0);
- Func_02004f56(2, 40960, 20);
+ Call3(Func_02004f4a, 1, 0xe000, 0);
+ Call3(Func_02004f56, 2, 0xa000, 20);
Func_02004efe(1, 3);
Func_02004f06(2, 3);
Func_02004f1e(3, 3);
- Func_02004ed2(1, 65536, 32768);
- Func_02004ede(2, 65536, 32768);
- Func_02004eea(3, 65536, 32768);
- Func_02004efc(1, 0x0200adac);
- Func_02004f04(2, 0x0200adac);
- Func_02004f1c(3, 0x0200adac);
+ Call3(Func_02004ed2, 1, 0x10000, k8000);
+ Call3(Func_02004ede, 2, 0x10000, k8000);
+ Call3(Func_02004eea, 3, 0x10000, k8000);
+ base5_200adac = (s32)Data_0200adac;
+ Func_02004efc(1, base5_200adac);
+ Value2(Func_02004f04, 2, base5_200adac);
+ Func_02004f1c(3, base5_200adac);
Func_02004ee2(20);
Func_02003f5a(0, 0);
Func_02004f72(0, 3);
Func_02004f7a(11, 3);
- Func_02004f2e(11, 65536, 32768);
- Func_02004f3a(0, 65536, 32768);
+ Call3(Func_02004f2e, 11, 0x10000, k8000);
+ Call3(Func_02004f3a, 0, 0x10000, k8000);
Func_02004f8a(11, 2);
- Func_02004f74(11, 830, 152);
- Func_02004f80(11, 808, 164);
- Func_02004f86(11, 808, 312);
+ Call3(Func_02004f74, 11, 0x33e, 152);
+ Call3(Func_02004f80, 11, 0x328, 164);
+ Call3(Func_02004f86, 11, 0x328, 0x138);
Func_02004f44(20);
- Func_0200503c(0x6666, 0x0ccc);
- Func_02005056(52953088, -1, 20447232, 1);
- Func_02004fca(0, 808, 164);
- Func_02004fd0(0, 808, 312);
+ Call2(Func_0200503c, 0x6666, 0xccc);
+ Call4(Func_02005056, 0x3280000, -1, 0x1380000, 1);
+ Call3(Func_02004fca, 0, 0x328, 164);
+ Call3(Func_02004fd0, 0, 0x328, 0x138);
Func_02004f7e(60);
- *(u32 *)(*(u32 *)0x03001ebc + 448) = 256;
- *(u32 *)(*(u32 *)0x03001ebc + 456) = 40;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c0)) = 0x100;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c8)) = 40;
Func_020050d0();
Func_020050dc();
Func_020050b2(64);
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_late_sequence.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_late_sequence.c
new file mode 100644
index 000000000..e0bfe7db7
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_late_sequence.c
@@ -0,0 +1,84 @@
+#include "types.h"
+
+#define FieldScene_RunLateSequence Func_02002844
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_020049aa();
+void Func_020049d6();
+s32 Func_02004f36();
+s32 Func_02004f62();
+void Func_020063dc();
+void Func_02006512();
+void Func_02006532();
+void Func_0200653c();
+void Func_0200655a();
+void Func_02006580();
+void Func_02006600();
+void Func_02006614();
+void Func_0200662c();
+void Func_02006644();
+void Func_02006678();
+void Func_020066a4();
+void Func_020066aa();
+void Func_020066b6();
+s32 Func_020066d8();
+void Func_020066da();
+void Func_020066e6();
+
+struct Work26 {
+ u8 pad[26];
+ u16 field;
+};
+
+extern struct Work26 Data_0200c628;
+extern struct Work26 Data_0200be76;
+
+void FieldScene_RunLateSequence(s32 a0)
+{
+ s32 scaled;
+ s32 mag;
+ s32 arg;
+ struct Work26 *p1;
+ struct Work26 *p2;
+
+ Func_02006644(247);
+ Func_02006600();
+ Func_02006614();
+ p1 = &Data_0200c628;
+ p2 = &Data_0200be76;
+ scaled = a0 * 60;
+ p1->field = (u16)scaled;
+ mag = a0;
+ if (a0 < 0) {
+ mag = -a0;
+ }
+ p2->field = (u16)(mag * 60);
+ if (a0 < 0) {
+ s32 n;
+
+ Func_02006512(30);
+ Func_02006678(86);
+ Func_020049aa(8);
+ Func_02004f36(3, 1);
+ n = a0 + mag - mag;
+ Func_02006532(((n - (n << 4)) << 2) + 60);
+ arg = 0;
+ } else {
+ Func_0200653c(30);
+ Func_020066a4(a0 + 90);
+ Func_020049d6(4);
+ Func_02004f62(3, 0);
+ Func_0200655a(scaled + 60);
+ arg = 8;
+ }
+ Func_0200662c(arg, 0x105, 0);
+ while (Func_020066d8() != 0) {
+ Func_020063dc(1);
+ }
+ Func_020066da(19);
+ Func_02006580(30);
+ Func_020066e6(0x121);
+ Func_020066aa();
+ Func_020066b6();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_map_entrance_coordinator.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_map_entrance_coordinator.c
new file mode 100644
index 000000000..c68818074
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_map_entrance_coordinator.c
@@ -0,0 +1,162 @@
+#include "types.h"
+
+#define FieldScene_RunMapEntranceCoordinator Func_02001214
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_02000240[];
+extern u8 Data_03001ebc[];
+extern s16 Data_02000240_t[][1];
+void Func_02002d86();
+s32 Func_02002f9c();
+void Func_020031cc();
+s32 Func_02003246();
+s32 Func_02003b8c();
+void Func_02003e7a();
+void Func_02003ece();
+void Func_02003ed8();
+void Func_02003f1a();
+void Func_02003f24();
+s32 Func_02004146();
+s32 Func_02004150();
+s32 Func_0200415c();
+void Func_02004c14();
+void Func_02004c1e();
+void Func_02004c60();
+void Func_02004c6a();
+void Func_02004ed0();
+void Func_02004f34();
+void Func_02004f52();
+void Func_02004f5a();
+void Func_02004f76();
+void Func_02004f7e();
+void Func_02004fa4();
+void Func_02004fb0();
+void Func_02004fb4();
+void Func_02004fc2();
+void Func_02004fdc();
+void Func_02004fe8();
+void Func_02004ff0();
+void Func_02005002();
+void Func_02005008();
+void Func_0200501e();
+void Func_0200502e();
+void Func_02005038();
+void Func_0200503a();
+void Func_02005042();
+void Func_02005068();
+void Func_02005076();
+void Func_02005080();
+void Func_0200509c();
+void Func_020050b4();
+void Func_020050c8();
+void Func_020050e8();
+void Func_020050fe();
+void Func_02005100();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunMapEntranceCoordinator(s32 a0)
+{
+ u32 i;
+ s32 rec;
+ s32 record;
+
+ if (Data_02000240_t[225][0] == 2) {
+ Func_02002d86();
+ } else {
+ Func_02004ed0();
+ rec = Value2(Func_02002f9c, a0, 1);
+ if (rec != 0) {
+ } else {
+ Call1(Func_02004f76, 0x208c);
+ Call2(Func_02004fc2, 0x30000, 0x6000);
+ Call4(Func_02004fdc, 0x1480000, -1, 0xa80000, 1);
+ Func_02004fe8();
+ Func_02004fb0(a0, 0);
+ Value3(Func_02003b8c, 0, 0x118, 200);
+ Call3(Func_02004f52, 0, 0x10000, 0x8000);
+ Call3(Func_02004f7e, 0, 0x168, 200);
+ Func_02004f34(30);
+ Call3(Func_02005008, 0, 0x102, 60);
+ Func_02004ff0(a0, 0);
+ Call3(Func_02004fa4, 0, 0x138, 200);
+ Func_02004f5a(30);
+ Call3(Func_0200501e, 0, 0xc000, 10);
+ Call3(Func_0200503a, 0, 0x106, 60);
+ Call3(Func_02004fb4, 0, 0x18000, 0xc000);
+ Func_02004146(0, 0x128, 184);
+ Value3(Func_02004150, 0, 0x128, 152);
+ Value3(Func_0200415c, 0, 0x138, 152);
+ Call3(Func_02005068, 0, 0x4000, 15);
+ Func_02004c14();
+ Func_02003ece(0);
+ Func_02004c1e();
+ Func_02003ed8(0);
+ Call3(Func_02005002, 0, 0x18000, 0xc000);
+ Call3(Func_0200502e, 0, 0x130, 184);
+ Func_02005038(0, 0x128, 192);
+ Func_02005042(0, 0x128, 200);
+ Func_020050b4(0, 0, 15);
+ Func_02004c60();
+ Func_02003f1a(0);
+ Func_02004c6a();
+ Func_02003f24(0);
+ Func_02005080(0, 1);
+ Func_020050c8(a0, 0);
+ Func_02003e7a(0);
+ Func_020050fe(0, 0);
+ Call3(Func_0200509c, 9, 0x1380000, 0xa80000);
+ Func_020031cc(a0, 1);
+ goto L_020013c2;
+ }
+ if (rec == 1) {
+ Call1(Func_020050e8, 0x208b);
+ Func_02005100(a0, 0);
+ }
+ L_020013c2:;
+ Value3(Func_02003246, rec, a0, 1);
+ Func_02005076();
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_scene_four_coordinator.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_scene_four_coordinator.c
new file mode 100644
index 000000000..008f5b336
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3ba_scene_four_coordinator.c
@@ -0,0 +1,148 @@
+#include "types.h"
+
+#define FieldScene_RunSceneFourCoordinator Func_020016ec
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_02000240[];
+extern u8 Data_03001ebc[];
+extern s16 Data_02000240_t[][1];
+s32 Func_02001b18();
+void Func_0200325e();
+s32 Func_02003474();
+void Func_02003680();
+s32 Func_020036fa();
+s32 Func_02004080();
+void Func_0200432e();
+s32 Func_0200447a();
+void Func_02004546();
+s32 Func_02004606();
+s32 Func_02004610();
+void Func_0200461c();
+void Func_020053a8();
+void Func_020053fc();
+void Func_0200544e();
+void Func_0200546a();
+void Func_02005474();
+void Func_02005488();
+void Func_02005494();
+void Func_0200549a();
+void Func_020054b4();
+void Func_020054c0();
+void Func_020054c2();
+void Func_020054ca();
+void Func_020054d2();
+void Func_020054de();
+void Func_020054f6();
+void Func_020054fa();
+void Func_020054fe();
+void Func_0200552a();
+void Func_02005550();
+void Func_02005566();
+void Func_02005578();
+void Func_0200557c();
+void Func_02005594();
+void Func_0200559c();
+void Func_020055b2();
+void Func_020055b4();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunSceneFourCoordinator(s32 a0)
+{
+ u32 i;
+ s32 rec;
+ s32 record;
+
+ if (Data_02000240_t[225][0] == 2) {
+ Func_0200325e();
+ } else {
+ Func_020053a8();
+ rec = Value2(Func_02003474, a0, 4);
+ if (rec != 0) {
+ } else {
+ Call1(Func_0200544e, 0x2099);
+ Call2(Func_0200549a, 0x30000, 0x6000);
+ Call4(Func_020054b4, 0x4400000, -1, 0xa80000, 1);
+ Func_020054c0();
+ Func_02005488(a0, 0);
+ Value3(Func_0200447a, 120, 72, 0);
+ Func_0200549a(a0, 0);
+ Func_02004546();
+ Func_020053fc(15);
+ Value3(Func_02004080, 0, 0x3d8, 200);
+ Func_020054ca(0, 0, 10);
+ Func_020054c2(a0, 0);
+ Call3(Func_020054de, 0, 0x4000, 30);
+ Call3(Func_020054fa, 0, 0x106, 60);
+ Call3(Func_02005474, 0, 0x18000, 0xc000);
+ Func_02004606(0, 0x3e8, 192);
+ Value3(Func_02004610, 0, 0x3e8, 176);
+ Call3(Func_0200461c, 0, 0x3f8, 168);
+ Func_0200546a(15);
+ Value3(Func_02001b18, 18, 160, 0);
+ Call4(Func_02005566, 0x4400000, -1, 0xa80000, 1);
+ Func_020054f6(0, 1);
+ Func_02005494(10);
+ Call3(Func_020054d2, 0, 0x10000, 0x8000);
+ Call3(Func_020054fe, 0, 0x4a8, 168);
+ Func_020054b4(10);
+ Call3(Func_02005578, 0, 0x8000, 30);
+ Call3(Func_02005594, 0, 0x102, 60);
+ Func_0200557c(a0, 0);
+ Func_0200432e(0);
+ Func_020055b2(0, 0);
+ Call3(Func_02005550, 18, 0x3f80000, 0xa80000);
+ Func_02003680(a0, 4);
+ goto L_02001876;
+ }
+ if (rec == 1) {
+ Call1(Func_0200559c, 0x2098);
+ Func_020055b4(a0, 0);
+ }
+ L_02001876:;
+ Value3(Func_020036fa, rec, a0, 4);
+ Func_0200552a();
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3bb_lifted_actor_coordinator.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3bb_lifted_actor_coordinator.c
new file mode 100644
index 000000000..6fe7a0ae1
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3bb_lifted_actor_coordinator.c
@@ -0,0 +1,148 @@
+#include "types.h"
+
+#define FieldScene_RunLiftedActorCoordinator Func_020016d4
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_02000240[];
+extern u8 Data_03001ebc[];
+extern s16 Data_02000240_t[][1];
+void Func_020034de();
+s32 Func_020036f4();
+void Func_02003918();
+s32 Func_02003992();
+s32 Func_02004310();
+void Func_020045d4();
+s32 Func_02004902();
+void Func_02005628();
+void Func_02005654();
+void Func_0200565e();
+void Func_020056d6();
+void Func_02005702();
+s32 Func_0200571c();
+void Func_0200571e();
+void Func_0200572a();
+void Func_0200573a();
+void Func_02005744();
+void Func_02005750();
+void Func_02005752();
+void Func_0200575e();
+void Func_0200576a();
+void Func_0200576c();
+void Func_0200576e();
+void Func_0200577a();
+s32 Func_0200577e();
+void Func_020057b6();
+void Func_020057c2();
+void Func_020057d0();
+void Func_020057e0();
+void Func_020057ea();
+void Func_02005816();
+void Func_02005818();
+void Func_0200582a();
+void Func_0200583c();
+void Func_0200583e();
+void Func_02005854();
+void Func_02005862();
+void Func_02005868();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunLiftedActorCoordinator(s32 a0)
+{
+ u32 i;
+ s32 rec;
+ s32 record;
+
+ if (Data_02000240_t[225][0] == 2) {
+ Func_020034de();
+ } else {
+ Func_02005628();
+ rec = Value2(Func_020036f4, a0, 4);
+ if (rec != 0) {
+ } else {
+ Call1(Func_020056d6, 0x20aa);
+ Call2(Func_0200572a, 0x30000, 0x6000);
+ Call4(Func_02005744, 0x2180000, -1, 0xf00000, 1);
+ Func_02005750();
+ Func_0200565e(45);
+ Call2(Func_02005752, 0x10000, 0x2000);
+ Call4(Func_0200576c, 0x2180000, -1, 0xc00000, 1);
+ Func_0200577a();
+ Func_0200573a(a0, 0);
+ Func_02004310(0, 0x278, 0x108);
+ Call3(Func_020056d6, 0, 0x10000, 0x8000);
+ Call3(Func_02005702, 0, 0x268, 0x108);
+ Value3(Func_0200577e, 0, 0xc000, 20);
+ Func_020057ea();
+ Call2(Func_020057b6, 0x4000, 0x800);
+ Call4(Func_020057d0, 0x2180000, -1, 0xa00000, 1);
+ Call3(Func_0200571e, 0, 0x8000, 0x4000);
+ Func_0200575e(0, 10);
+ record = Func_0200571c(0);
+ Func_02005654(record, *(s32 *)(record + 8), (*(s32 *)(record + 12) + 0x400000), *(s32 *)(record + 16));
+ Func_0200576a(0);
+ Func_0200583e();
+ Call4(Func_02005818, -1, -1, -1, 0);
+ Func_020057e0(a0, 0);
+ Call3(Func_0200576e, 0, 0x18000, 0xc000);
+ Value3(Func_02004902, 0, 0x1e8, 248);
+ Call3(Func_02005816, 0, 0x4000, 20);
+ Func_020057e0(0, 6, 0);
+ Call4(Func_02005862, 0x2180000, -1, 0xa00000, 1);
+ Func_0200582a(a0, 0);
+ Func_020045d4(0);
+ Func_02005868(0, 0);
+ Func_02003918(a0, 4);
+ goto L_02001876;
+ }
+ if (rec == 1) {
+ Call1(Func_0200583c, 0x20a9);
+ Func_02005854(a0, 0);
+ }
+ L_02001876:;
+ Value3(Func_02003992, rec, a0, 4);
+ Func_020057c2();
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_arrange_four_actors.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_arrange_four_actors.c
new file mode 100644
index 000000000..9ca33edaa
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_arrange_four_actors.c
@@ -0,0 +1,156 @@
+#include "types.h"
+
+#define FieldScene_ArrangeFourActors Func_02001a0c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_0200642a();
+s32 Func_02006432();
+void Func_02006460();
+void Func_0200646e();
+void Func_0200647c();
+void Func_0200648a();
+void Func_02006498();
+s32 Func_020064dc();
+s32 Func_020064ec();
+void Func_020064fe();
+void Func_0200650c();
+s32 Func_02006518();
+void Func_02006526();
+void Func_0200653e();
+void Func_02006560();
+s32 Func_0200656c();
+void Func_02006580();
+s32 Func_0200658c();
+void Func_02006590();
+void Func_02006598();
+void Func_020065a0();
+void Func_020065a6();
+void Func_020065a8();
+s32 Func_020065ac();
+void Func_020065b0();
+void Func_020065b8();
+void Func_020065be();
+void Func_020065c0();
+void Func_020065c2();
+void Func_020065c6();
+void Func_020065d0();
+void Func_020065de();
+void Func_020065e0();
+void Func_020065e6();
+void Func_020065fe();
+void Func_02006600();
+void Func_02006606();
+void Func_02006626();
+void Func_02006628();
+void Func_02006630();
+void Func_02006632();
+void Func_0200663a();
+void Func_0200663c();
+void Func_020066c4();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_ArrangeFourActors(s32 a0)
+{
+ u32 i;
+ s32 p10;
+ s32 p8;
+ s32 p9;
+ s32 p9b;
+ s32 record;
+
+ record = Func_02006432();
+ p9 = *(s16 *)(record + 10);
+ p10 = *(s16 *)(record + 18);
+ Func_0200642a();
+ Call3(Func_02006460, a0, 0x10000, 0x8000);
+ Call3(Func_0200646e, 0, 0x10000, 0x8000);
+ Call3(Func_0200647c, 1, 0x10000, 0x8000);
+ Call3(Func_0200648a, 2, 0x10000, 0x8000);
+ Call3(Func_02006498, 3, 0x10000, 0x8000);
+ Value3(Func_020064ec, 0, ((s32)p9 << 16), (((s32)p10 << 16) + -0x300000));
+ Func_020064fe(1, (((s32)p9 << 16) + -0x100000), (-0x280000 + ((s32)p10 << 16)));
+ p8 = (-0x280000 + ((s32)p10 << 16));
+ Func_0200650c(2, (((s32)p9 << 16) + 0x100000), p8);
+ Value3(Func_02006518, 3, ((s32)p9 << 16), (((s32)p10 << 16) + -0x200000));
+ Func_02006526(a0, ((s32)p9 << 16), (((s32)p10 << 16) + -0x500000));
+ record = Func_020064dc(0);
+ {
+ s32 shown = 0xc000;
+
+ *(u16 *)(record + 6) = shown;
+ }
+ Func_020065c2(0, 0);
+ Func_02006626();
+ Func_0200663a();
+ Call1(Func_02006590, 0x20ed);
+ Func_02006560(a0, 3);
+ Func_020065b0(a0, 0);
+ Func_02006580(a0, 2);
+ Func_020065c0(a0, 0);
+ Func_02006590(a0, 2);
+ Func_020065d0(a0, 0);
+ Func_020065a0(a0, 2);
+ Func_020065e0(a0, 0);
+ Func_02006598(3, 3);
+ Func_020065a0(1, 3);
+ Func_020065a8(2, 3);
+ Func_020065b8(0, 3);
+ Func_0200653e(6);
+ Func_020065be(1, 2);
+ record = Value1(Func_0200656c, 0);
+ if (record != 0) {
+ Func_020065a6(1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_020065de(2, 2);
+ record = Value1(Func_0200658c, 0);
+ if (record != 0) {
+ Func_020065c6(2, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_020065fe(3, 2);
+ record = Value1(Func_020065ac, 0);
+ if (record != 0) {
+ Func_020065e6(3, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02006606(a0, (p9 - 16), (p10 - 64));
+ Func_02006628(1, 0, 0);
+ Func_02006632(2, 0, 0);
+ Func_0200663c(3, 0, 0);
+ Func_02006630(a0, (p9 - 16), (p10 - 16));
+ Func_0200663a(a0, p9, p10);
+ Func_020066c4(a0, 0xc000, 10);
+ Func_02006600();
+ p9b = (p9 - 16);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_second_arrival_sequence.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_second_arrival_sequence.c
new file mode 100644
index 000000000..10e53a2f6
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_second_arrival_sequence.c
@@ -0,0 +1,148 @@
+#include "types.h"
+
+#define FieldScene_RunSecondArrivalSequence Func_02001df8
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_02000240[];
+extern u8 Data_03001ebc[];
+extern s16 Data_02000240_t[][1];
+void Func_0200469a();
+s32 Func_020048b0();
+void Func_02004aaa();
+s32 Func_02004b24();
+s32 Func_020054a8();
+void Func_02005766();
+s32 Func_02005960();
+void Func_020059ce();
+void Func_020059de();
+void Func_020059ee();
+s32 Func_02005a00();
+void Func_02005a0c();
+void Func_02005a5c();
+void Func_02006814();
+void Func_0200684c();
+void Func_0200688a();
+void Func_0200689e();
+void Func_020068da();
+void Func_02006910();
+void Func_0200691e();
+void Func_02006920();
+void Func_0200692e();
+void Func_02006930();
+void Func_02006948();
+void Func_02006956();
+s32 Func_02006984();
+s32 Func_020069a4();
+void Func_020069a8();
+void Func_020069be();
+void Func_020069c6();
+void Func_020069ca();
+void Func_020069e8();
+void Func_020069ea();
+void Func_02006a00();
+void Func_02006a08();
+void Func_02006a16();
+void Func_02006a2e();
+void Func_02006a42();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunSecondArrivalSequence(s32 a0)
+{
+ u32 i;
+ s32 rec;
+ s32 record;
+
+ if (Data_02000240_t[225][0] == 2) {
+ Func_0200469a();
+ } else {
+ Func_02006814();
+ rec = Value2(Func_020048b0, a0, 2);
+ if (rec != 0) {
+ } else {
+ Call1(Func_020068da, 0x20b7);
+ Call2(Func_0200692e, 0x30000, 0x6000);
+ Call4(Func_02006948, 0x1780000, -1, 0x980000, 1);
+ Func_02006956();
+ Func_0200684c(30);
+ Func_0200691e(a0, 0);
+ Func_020054a8(0, 0x118, 200);
+ Call3(Func_0200689e, 0, 0x18000, 0xc000);
+ Value3(Func_02005a00, 0, 0x118, 152);
+ Call3(Func_02005a0c, 0, 0x128, 152);
+ Func_0200688a(10);
+ Func_020069c6();
+ Call4(Func_020069a8, -1, -1, -1, 0);
+ Value3(Func_02006984, 0, 0xc000, 15);
+ Func_020069e8();
+ Call4(Func_020069ca, -1, -1, -1, 0);
+ Value3(Func_020069a4, 0, 0, 15);
+ Func_02006a08();
+ Call4(Func_020069ea, -1, -1, -1, 0);
+ Call3(Func_020069c6, 0, 0x4000, 15);
+ Func_020069be(a0, 0);
+ Value3(Func_02005960, 96, 40, 0);
+ Func_020059ce(128, 40, 10);
+ Func_02006910(30);
+ Func_020059de(160, 40, 10);
+ Func_02006920(30);
+ Func_020059ee(160, 72, 10);
+ Func_02006930(30);
+ Func_02006a00(a0, 0);
+ Func_02005a5c();
+ Func_02005766(0);
+ Func_02006a42(0, 0);
+ Func_02004aaa(a0, 2);
+ goto L_02001f70;
+ }
+ if (rec == 1) {
+ Call1(Func_02006a16, 0x20b6);
+ Func_02006a2e(a0, 0);
+ }
+ L_02001f70:;
+ Value3(Func_02004b24, rec, a0, 2);
+ ((void (*)())Func_02006984)();
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_sequence_b.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_sequence_b.c
new file mode 100644
index 000000000..4ec2ac6a8
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3bc_sequence_b.c
@@ -0,0 +1,108 @@
+#include "types.h"
+
+#define FieldScene_RunScene3bcSequenceB Func_02000c5c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00000091[];
+extern u8 Data_02000240[];
+void Func_02004920();
+void Func_02004942();
+s32 Func_02004a48();
+void Func_02005664();
+void Func_020056b4();
+void Func_020056b6();
+void Func_020056c4();
+void Func_020056d0();
+void Func_020056da();
+void Func_020056e2();
+void Func_02005704();
+void Func_02005714();
+void Func_02005718();
+void Func_02005724();
+void Func_02005726();
+void Func_0200572c();
+void Func_02005744();
+void Func_02005752();
+void Func_02005754();
+void Func_02005766();
+void Func_0200578e();
+void Func_02005796();
+s32 Func_02005850();
+s32 Func_0200586c();
+void Func_0200587c();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene3bcSequenceB(void)
+{
+ s32 i;
+ s32 rec8;
+ s32 record;
+ s32 base3_2000240;
+ s32 four;
+
+ four = 4;
+ Func_02004920();
+ Func_02005664();
+ rec8 = Value2(Func_02004a48, 3, 17);
+ Func_02004942();
+ for (i = 9; i >= 0; i--) {
+ Call1(Func_020056b4, 8);
+ }
+ Call3(Func_020056b6, 8, 0x10000, 0x8000);
+ Call3(Func_020056e2, 8, 0x5f8, 192);
+ Call3(Func_020056d0, 0, 0x10000, 0x8000);
+ Call3(Func_02005704, 0, 0x5d8, 192);
+ Func_0200572c(8, 1);
+ Func_02005766(0, 8, 0);
+ Func_020056c4(10);
+ Func_02005744(8, 3);
+ Func_02005754(0, 3);
+ Func_020056da(20);
+ Call3(Func_02005718, 0, 0x20000, 0x10000);
+ Call3(Func_02005726, 8, 0x20000, 0x10000);
+ Call3(Func_02005752, 0, 0x5e0, 192);
+ Call3(Func_02005766, 8, 0x5f0, 192);
+ Func_0200578e(0, 16);
+ Func_02005796(8, 9);
+ Func_02005724(10);
+ record = four - rec8;
+ Value2(Func_02005850, 72, record + 1);
+ do {
+ base3_2000240 = (s32)Data_02000240;
+ *(u8 *)((base3_2000240 + 0x22b)) = 3;
+ } while (0);
+ {
+ s32 p91 = (s32)Data_00000091;
+ Value2(Func_0200586c, p91, four);
+ Func_0200587c(p91, 5);
+ }
+ Call1(Func_02005714, 0x11a);
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3bf_sequence_e.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3bf_sequence_e.c
new file mode 100644
index 000000000..e853bd803
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3bf_sequence_e.c
@@ -0,0 +1,37 @@
+#include "types.h"
+
+#define FieldScene_RunScene3bfSequenceB Func_02000d54
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_02006346();
+void Func_02006358();
+void Func_02006376();
+void Func_02006390();
+
+extern s32 Data_0200f73c[];
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+void FieldScene_RunScene3bfSequenceB(s32 a0)
+{
+ s32 position_x;
+ s32 position_z;
+
+ position_x = Data_0200f73c[a0 * 2];
+ position_z = Data_0200f73c[a0 * 2 + 1];
+ Call6(Func_02006346, 0, 77, 1, 3, position_x, position_z);
+ Call6(Func_02006358, 1, 77, 1, 1, position_x + 1, position_z);
+ Call6(Func_02006376, position_x, position_z - 45, 1, 1, position_x, position_z - 44);
+ if (a0 == 1) {
+ Call6(Func_02006390, position_x, position_z - 44, 1, 1, position_x, position_z - 43);
+ }
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3c5_event_script01.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3c5_event_script01.c
new file mode 100644
index 000000000..dfb4f5710
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3c5_event_script01.c
@@ -0,0 +1,555 @@
+#include "types.h"
+
+#define RunEventScript01 Func_02001238
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+void Func_0200405e();
+void Func_02004064();
+void Func_02004080();
+void Func_020040b0();
+void Func_020040b8();
+void Func_020040de();
+void Func_020040f6();
+void Func_02004104();
+void Func_0200412a();
+void Func_0200412c();
+void Func_0200413a();
+void Func_02004140();
+void Func_02004148();
+void Func_02004166();
+void Func_0200416a();
+void Func_0200416c();
+void Func_0200417a();
+void Func_02004188();
+void Func_0200419c();
+void Func_0200419e();
+void Func_020041b4();
+void Func_020041b6();
+void Func_020041ca();
+void Func_020041e4();
+void Func_020041f4();
+void Func_020041f8();
+void Func_020041fa();
+void Func_020041fe();
+void Func_02004202();
+void Func_02004208();
+void Func_0200420e();
+void Func_02004210();
+void Func_02004212();
+void Func_02004214();
+void Func_02004218();
+void Func_0200421c();
+void Func_0200421e();
+void Func_02004220();
+void Func_02004222();
+void Func_0200422a();
+void Func_0200422e();
+void Func_02004230();
+void Func_02004234();
+void Func_0200423a();
+void Func_0200423e();
+void Func_02004244();
+void Func_0200424c();
+void Func_0200425a();
+void Func_0200426a();
+void Func_0200427c();
+void Func_0200428a();
+void Func_02004292();
+void Func_02004296();
+void Func_020042a6();
+void Func_020042ae();
+void Func_020042b0();
+void Func_020042c2();
+void Func_020042d4();
+void Func_020042dc();
+void Func_020042f0();
+void Func_020042f8();
+void Func_02004306();
+void Func_0200430c();
+void Func_02004314();
+void Func_02004322();
+void Func_02004330();
+void Func_02004334();
+void Func_02004336();
+void Func_0200433c();
+void Func_02004348();
+void Func_02004356();
+void Func_02004364();
+void Func_02004368();
+void Func_0200436a();
+void Func_0200436e();
+void Func_02004372();
+void Func_0200437c();
+void Func_02004380();
+void Func_02004384();
+void Func_0200438e();
+void Func_02004394();
+void Func_020043a8();
+s32 Func_020043b6();
+void Func_020043b8();
+void Func_020043ba();
+void Func_020043c6();
+void Func_020043c8();
+void Func_020043de();
+void Func_020043e2();
+void Func_020043ea();
+void Func_020043ec();
+void Func_020043fa();
+void Func_02004404();
+void Func_02004408();
+void Func_0200440a();
+void Func_02004416();
+void Func_02004424();
+void Func_0200442a();
+void Func_02004432();
+void Func_02004442();
+s32 Func_02004446();
+void Func_0200446a();
+void Func_02004474();
+void Func_02004478();
+void Func_02004482();
+void Func_02004486();
+void Func_02004488();
+void Func_0200448a();
+void Func_02004498();
+void Func_020044a6();
+void Func_020044b4();
+void Func_020044ce();
+void Func_020044d0();
+void Func_020044dc();
+void Func_020044ea();
+void Func_020044f4();
+void Func_020044f8();
+void Func_02004506();
+void Func_0200451c();
+void Func_02004520();
+void Func_0200452a();
+void Func_0200452c();
+s32 Func_0200453a();
+void Func_02004544();
+void Func_0200454a();
+void Func_02004556();
+void Func_0200455a();
+void Func_02004566();
+void Func_02004568();
+void Func_02004580();
+void Func_02004586();
+void Func_02004590();
+void Func_0200459c();
+void Func_020045a0();
+void Func_020045ae();
+void Func_020045b4();
+void Func_020045b8();
+void Func_020045c8();
+s32 Func_020045ca();
+void Func_020045d6();
+void Func_020045e0();
+void Func_020045e2();
+void Func_020045f0();
+void Func_020045fa();
+void Func_02004608();
+void Func_02004616();
+void Func_0200461c();
+void Func_02004628();
+void Func_02004638();
+void Func_0200463a();
+void Func_02004648();
+void Func_02004652();
+void Func_02004656();
+void Func_02004662();
+void Func_02004670();
+void Func_02004678();
+s32 Func_0200467e();
+void Func_02004688();
+void Func_020046ba();
+void Func_020046ca();
+void Func_020046d0();
+void Func_020046e0();
+void Func_020046f4();
+void Func_020046f8();
+void Func_020046fa();
+s32 Func_0200470e();
+void Func_02004712();
+void Func_0200473a();
+void Func_0200473e();
+void Func_020046b4();
+void Func_020046c2();
+void Func_020046f2();
+void Func_02004700();
+void Func_02004720();
+void Func_02004724();
+void Func_02004740();
+void Func_0200475e();
+void Func_02004762();
+void Func_02004774();
+void Func_02004792();
+void Func_020047a2();
+void Func_020047aa();
+void Func_020047ac();
+void Func_020047b8();
+void Func_020047ba();
+void Func_020047c6();
+void Func_020047cc();
+void Func_020047d2();
+void Func_020047d6();
+void Func_020047fa();
+void Func_020047fe();
+void Func_0200480c();
+void Func_02004814();
+void Func_02004818();
+void Func_0200481a();
+void Func_0200483c();
+void Func_02004848();
+void Func_02004850();
+void Func_02004876();
+void Func_0200487e();
+void Func_020048a4();
+void Func_020048a8();
+void Func_020048b2();
+void Func_020048b4();
+void Func_020048bc();
+s32 Func_020048c2();
+void Func_020048c6();
+void Func_020048cc();
+void Func_020048e2();
+void Func_020048e4();
+s32 Func_020048f2();
+void Func_020048f4();
+void Func_020048f6();
+void Func_020048fc();
+void Func_02004902();
+void Func_02004908();
+void Func_0200490a();
+void Func_02004914();
+void Func_0200491c();
+s32 Func_02004922();
+void Func_0200492a();
+void Func_0200492c();
+void Func_02004930();
+void Func_0200493a();
+void Func_0200493e();
+void Func_02004944();
+void Func_0200494c();
+void Func_0200495c();
+void Func_0200496a();
+void Func_0200497c();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void RunEventScript01(void)
+{
+ u32 i;
+ s32 record;
+
+ Call1(Func_0200405e, 0x988);
+ Call1(Func_02004064, 0x98a);
+ Func_02004080();
+ Func_020041b4();
+ Call1(Func_0200412a, 0x2702);
+ Call3(Func_020040b8, 0, 0x10000, 0x8000);
+ Call3(Func_020040de, 0, 0x128, 0x160);
+ Call3(Func_0200416a, 0, 0xc000, 0);
+ Func_020040b0(10);
+ Call4(Func_020041fe, 10, 16, 0, 0xc000);
+ Call4(Func_0200420e, 1, -8, 16, 0xc000);
+ Call4(Func_0200421c, 2, 8, 16, 0xc000);
+ Call4(Func_0200422a, 3, 24, 16, 0xc000);
+ Func_02004140(3);
+ Func_020040f6(20);
+ Func_020041b6(14, 0);
+ Func_02004104(10);
+ Call2(Func_020041f8, 0x30000, 0x6000);
+ Call4(Func_02004212, 0x1180000, -1, 0x1200000, 1);
+ Func_0200421e();
+ Func_0200412c(20);
+ Func_0200419c(11, 3);
+ Func_0200413a(30);
+ Func_020041fa(11, 0);
+ Func_02004148(10);
+ Call3(Func_02004214, 14, 0xc000, 0);
+ Call3(Func_02004220, 11, 0xc000, 0);
+ Func_02004166(30);
+ Func_0200416c(10);
+ Func_020041f4(14, 2);
+ Func_0200417a(20);
+ Func_0200423a(14, 0);
+ Func_02004188(10);
+ Func_02004208(13, 2);
+ Func_02004218(12, 2);
+ Func_0200419e(40);
+ Func_0200421e(13, 2);
+ Func_0200422e(12, 2);
+ Func_020041b4(40);
+ Func_02004234(13, 2);
+ Func_02004244(12, 2);
+ Func_020041ca(40);
+ Call3(Func_020042a6, 12, 0x102, 50);
+ Func_02004296(12, 0);
+ Func_020041e4(10);
+ Func_020042ae(13, 0, 0);
+ Func_020041f4(25);
+ Func_0200427c(13, 2);
+ Func_02004202(20);
+ Func_020042c2(13, 0);
+ Func_02004210(10);
+ Call3(Func_020042dc, 12, 0x8000, 0);
+ Func_02004222(20);
+ Func_02004292(13, 4);
+ Func_02004230(20);
+ Func_020042f0(13, 0);
+ Func_0200423e(10);
+ Func_020042ae(11, 4);
+ Func_0200424c(20);
+ Func_0200430c(11, 0);
+ Func_0200425a(20);
+ Call3(Func_02004334, 13, 0x107, 40);
+ Func_0200426a(10);
+ Call3(Func_02004336, 13, 0x4000, 0);
+ Func_0200427c(20);
+ Func_0200433c(13, 0);
+ Func_0200428a(20);
+ Call3(Func_02004364, 13, 0x101, 75);
+ Call3(Func_0200436e, 14, 0x101, 60);
+ Call3(Func_0200436a, 12, 0x4000, 0);
+ Func_020042b0(20);
+ Call3(Func_0200437c, 11, 0x4000, 0);
+ Func_020042c2(20);
+ Call3(Func_0200438e, 14, 0x4000, 0);
+ Func_020042d4(30);
+ Func_02004394(14, 0);
+ Call4(Func_020043de, 0x1180000, -1, 0x1400000, 1);
+ Func_020043ea();
+ Func_020042f8(20);
+ Func_02004368(10, 3);
+ Func_02004306(30);
+ Func_020043c6(10, 0);
+ Func_02004314(10);
+ Func_02004384(10, 4);
+ Func_02004322(20);
+ Func_020043e2(10, 0);
+ Func_02004330(20);
+ Call3(Func_0200440a, 14, 0x105, 60);
+ Func_020043fa(14, 0);
+ Func_02004348(10);
+ Func_020043b8(3, 4);
+ Func_02004356(20);
+ Func_02004416(3, 0);
+ Func_02004364(10);
+ Func_020043ec(2, 2);
+ Func_02004372(20);
+ Func_02004432(2, 0);
+ Func_02004380(10);
+ Func_02004408(1, 2);
+ Func_0200438e(20);
+ Value2(Func_02004446, 1, 0);
+ if (Value2(Func_020043b6, 0, 0) == 0) {
+ Func_020043a8(30);
+ Call3(Func_02004474, 10, 0x8000, 0);
+ Func_020043ba(30);
+ Func_0200442a(10, 3);
+ Func_020043c8(30);
+ Func_02004488(10, 0);
+ bump_step(1);
+ } else {
+ Func_02004404(30);
+ Call3(Func_020044d0, 10, 0x8000, 0);
+ Func_02004416(30);
+ Func_02004486(10, 4);
+ Func_02004424(20);
+ bump_step(1);
+ Func_020044f4(10, 0);
+ }
+ Func_02004442(10);
+ Call3(Func_0200451c, 14, 0x101, 60);
+ Call3(Func_02004482, 14, 0x10000, 0x8000);
+ Func_020045b4(14, 0, 16);
+ Func_0200446a(20);
+ Func_0200452a(14, 0);
+ Func_02004478(10);
+ Call3(Func_02004544, 10, 0xc000, 0);
+ Func_0200448a(35);
+ Func_0200454a(10, 0);
+ Func_02004498(10);
+ Func_02004520(14, 2);
+ Func_020044a6(20);
+ Func_02004566(14, 0);
+ Func_020044b4(20);
+ Call3(Func_02004590, 3, 0x102, 40);
+ Func_02004580(3, 0);
+ Func_020044ce(10);
+ Func_02004556(2, 2);
+ Func_020044dc(20);
+ Func_0200459c(2, 0);
+ Func_020044ea(10);
+ Func_0200455a(1, 3);
+ Func_020044f8(30);
+ Func_020045b8(1, 0);
+ Func_02004506(20);
+ Call3(Func_020045e2, 14, 0x100, 40);
+ Value2(Func_020045ca, 14, 0);
+ if (Value2(Func_0200453a, 0, 0) == 0) {
+ Func_0200452c(30);
+ Func_0200459c(14, 4);
+ Call1((void (*)())Func_0200453a, 20);
+ Func_020045fa(14, 0);
+ bump_step(1);
+ } else {
+ Func_0200455a(30);
+ Call2((void (*)())Func_020045ca, 14, 4);
+ Func_02004568(20);
+ bump_step(1);
+ Func_02004638(14, 0);
+ }
+ Func_02004586(10);
+ Call3(Func_02004662, 10, 0x102, 50);
+ Func_02004652(10, 0);
+ Func_020045a0(10);
+ Func_02004628(13, 2);
+ Func_020045ae(20);
+ Call3(Func_020045e0, 13, 0x14ccc, 0xa666);
+ Func_02004712(13, 0, 16);
+ Func_020045c8(20);
+ Func_02004688(13, 0);
+ Func_020045d6(10);
+ Call3(Func_02004608, 12, 0x14ccc, 0xa666);
+ Func_0200473a(12, 0, 16);
+ Func_020045f0(20);
+ Call3(Func_020046ca, 12, 0x107, 50);
+ Func_020046ba(12, 0);
+ Func_02004608(10);
+ Func_02004678(14, 3);
+ Func_02004616(30);
+ Func_0200461c(10);
+ Call3(Func_020046f8, 10, 0x102, 60);
+ Call3(Func_020046f4, 10, 0x8000, 0);
+ Func_0200463a(25);
+ Func_020046fa(10, 0);
+ Func_02004648(10);
+ Func_020046d0(10, 2);
+ Func_02004656(20);
+ Value2(Func_0200470e, 10, 0);
+ if (Value2(Func_0200467e, 0, 0) == 0) {
+ Func_02004670(30);
+ Func_020046e0(10, 3);
+ Call1((void (*)())Func_0200467e, 30);
+ Func_0200473e(10, 0);
+ bump_step(1);
+ } else {
+ Func_020046b4(30);
+ Func_02004724(10, 4);
+ Func_020046c2(20);
+ bump_step(1);
+ Func_02004792(10, 0);
+ }
+ Func_020046e0(10);
+ Call3(Func_020047ac, 10, 0xc000, 0);
+ Func_020046f2(35);
+ Func_02004762(14, 3);
+ Func_02004700(30);
+ Call3(Func_020047cc, 14, 0xb000, 0);
+ Func_02004712(40);
+ Func_020047d2(14, 0);
+ Func_02004720(10);
+ Func_020047ba(12, 13, 50);
+ Func_02004792(12, 3);
+ Func_020047a2(13, 3);
+ Func_02004740(30);
+ Call3(Func_0200480c, 12, 0x4000, 0);
+ Call3(Func_02004818, 13, 0x4000, 0);
+ Func_0200475e(20);
+ Func_020047c6(12, 3);
+ Func_020047d6(13, 3);
+ Func_02004774(30);
+ Call3(Func_020047aa, 12, 0x10000, 0x8000);
+ Call3(Func_020047b8, 13, 0x10000, 0x8000);
+ Func_020048e2(12, 32, 0);
+ Func_020048f4(13, 32, 0);
+ Func_020048f6(12, 0, 16);
+ Func_02004908(13, 16, 0);
+ Call3(Func_020047fe, 13, 0x158, 0x138);
+ Call3(Func_02004814, 12, 0x158, 0x150);
+ Func_0200483c(13, 1);
+ Call3(Func_020048a8, 12, 0x8000, 0);
+ Call3(Func_020048b4, 13, 0x8000, 0);
+ Func_020047fa(10);
+ Call3(Func_020048c6, 14, 0x4000, 0);
+ Func_0200480c(20);
+ Func_020048cc(14, 0);
+ Func_0200481a(10);
+ Call3(Func_02004850, 14, 0x10000, 0x8000);
+ Call3(Func_02004876, 14, 0x148, 0x138);
+ Call3(Func_02004902, 14, 0x8000, 0);
+ Func_02004848(30);
+ Call3(Func_0200487e, 11, 0x10000, 0x8000);
+ Call3(Func_020048a4, 11, 0x148, 0x148);
+ Call3(Func_02004930, 11, 0x8000, 0);
+ Func_02004876(20);
+ Call3(Func_020048a8, 1, 0x13333, 0x9999);
+ Call3(Func_020048b2, 2, 0x13333, 0x9999);
+ Call3(Func_020048bc, 3, 0x13333, 0x9999);
+ Func_020048fc(1, 2);
+ record = Value1(Func_020048c2, 0);
+ if (record != 0) {
+ Func_020048e4(1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200490a(1);
+ Func_0200491c(1, 0, 0);
+ Func_0200492c(2, 2);
+ record = Value1(Func_020048f2, 0);
+ if (record != 0) {
+ Func_02004914(2, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200493a(2);
+ Func_0200494c(2, 0, 0);
+ Func_0200495c(3, 2);
+ record = Value1(Func_02004922, 0);
+ if (record != 0) {
+ Func_02004944(3, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_0200496a(3);
+ Func_0200497c(3, 0, 0);
+ Func_0200492a(10);
+ Func_0200493e();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3c5_sequence_c.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3c5_sequence_c.c
new file mode 100644
index 000000000..78d68c98c
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3c5_sequence_c.c
@@ -0,0 +1,583 @@
+#include "types.h"
+
+#define FieldScene_RunScene3c5SequenceC Func_02001b10
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_03001ebc[];
+void Func_02004394();
+void Func_02004936();
+void Func_02004952();
+void Func_02004980();
+void Func_0200498a();
+void Func_020049b0();
+void Func_020049b6();
+void Func_020049de();
+void Func_020049e4();
+void Func_020049f6();
+void Func_020049fc();
+void Func_02004a00();
+void Func_02004a24();
+void Func_02004a3a();
+void Func_02004a5a();
+void Func_02004a84();
+void Func_02004a86();
+void Func_02004a8e();
+void Func_02004a90();
+void Func_02004a9e();
+void Func_02004aaa();
+void Func_02004aac();
+void Func_02004ab0();
+void Func_02004ac2();
+void Func_02004ac4();
+void Func_02004ac6();
+void Func_02004acc();
+void Func_02004ad0();
+void Func_02004ad2();
+void Func_02004adc();
+void Func_02004ae2();
+void Func_02004aea();
+void Func_02004af0();
+void Func_02004b00();
+void Func_02004b0c();
+void Func_02004b18();
+void Func_02004b1a();
+void Func_02004b20();
+void Func_02004b24();
+void Func_02004b26();
+void Func_02004b2e();
+void Func_02004b32();
+void Func_02004b3c();
+void Func_02004b3e();
+void Func_02004b4a();
+void Func_02004b58();
+void Func_02004b5e();
+void Func_02004b72();
+void Func_02004b78();
+void Func_02004b80();
+void Func_02004b88();
+void Func_02004b8e();
+void Func_02004b9c();
+void Func_02004ba0();
+void Func_02004ba2();
+void Func_02004ba8();
+void Func_02004baa();
+void Func_02004bb8();
+void Func_02004bbc();
+void Func_02004bc4();
+void Func_02004bc8();
+void Func_02004bd4();
+void Func_02004be2();
+void Func_02004bee();
+void Func_02004bf0();
+void Func_02004bfe();
+void Func_02004c04();
+void Func_02004c0a();
+void Func_02004c16();
+void Func_02004c22();
+void Func_02004c24();
+void Func_02004c32();
+void Func_02004c34();
+void Func_02004c38();
+void Func_02004c40();
+void Func_02004c56();
+void Func_02004c5c();
+void Func_02004c60();
+void Func_02004c64();
+void Func_02004c7a();
+void Func_02004c8a();
+void Func_02004c9a();
+void Func_02004c9c();
+void Func_02004ca0();
+void Func_02004ca2();
+void Func_02004cb2();
+void Func_02004cc6();
+void Func_02004cd0();
+void Func_02004cdc();
+void Func_02004d04();
+void Func_02004d10();
+void Func_02004d18();
+void Func_02004d22();
+void Func_02004d4c();
+void Func_02004d64();
+void Func_02004d74();
+void Func_02004d76();
+void Func_02004d7e();
+void Func_02004d84();
+void Func_02004d8a();
+void Func_02004d90();
+void Func_02004d96();
+void Func_02004d9e();
+void Func_02004da2();
+void Func_02004dac();
+void Func_02004dae();
+void Func_02004dba();
+void Func_02004dc6();
+void Func_02004dc8();
+void Func_02004dcc();
+void Func_02004dd2();
+void Func_02004dda();
+void Func_02004dec();
+void Func_02004df4();
+void Func_02004dfe();
+void Func_02004e00();
+void Func_02004e1c();
+void Func_02004e1e();
+void Func_02004e2a();
+void Func_02004e34();
+void Func_02004e38();
+void Func_02004e42();
+void Func_02004e46();
+void Func_02004e52();
+void Func_02004e5c();
+void Func_02004e5e();
+void Func_02004e62();
+void Func_02004e68();
+void Func_02004e86();
+void Func_02004e8c();
+void Func_02004e9a();
+void Func_02004ea6();
+void Func_02004eb8();
+void Func_02004ec2();
+s32 Func_02004ed0();
+void Func_02004ed6();
+void Func_02004eda();
+void Func_02004edc();
+void Func_02004ef0();
+void Func_02004ef8();
+void Func_02004efe();
+s32 Func_02004f1a();
+void Func_02004f1c();
+void Func_02004f20();
+void Func_02004f2a();
+void Func_02004f34();
+void Func_02004f40();
+void Func_02004f46();
+void Func_02004f4a();
+void Func_02004f4c();
+void Func_02004f54();
+void Func_02004f58();
+void Func_02004f64();
+void Func_02004f66();
+void Func_02004f70();
+void Func_02004f74();
+void Func_02004f78();
+void Func_02004f82();
+void Func_02004f90();
+void Func_02004f9e();
+void Func_02004fa4();
+void Func_02004fac();
+void Func_02004fba();
+void Func_02004fcc();
+void Func_02004fce();
+void Func_02004fd6();
+void Func_02004fe8();
+void Func_02004ff2();
+s32 Func_02004ff6();
+void Func_02004ffa();
+void Func_02005000();
+void Func_02005006();
+void Func_02005008();
+void Func_02005020();
+void Func_02005026();
+void Func_02005034();
+void Func_02005046();
+void Func_02005050();
+void Func_02005054();
+void Func_02005064();
+void Func_0200506a();
+void Func_02005072();
+void Func_02005084();
+void Func_02005086();
+void Func_0200508c();
+void Func_0200509a();
+void Func_020050a0();
+void Func_020050a6();
+void Func_020050ae();
+void Func_020050b4();
+void Func_020050b6();
+void Func_020050c0();
+void Func_020050c8();
+void Func_020050ce();
+void Func_020050dc();
+void Func_020050ea();
+void Func_020050fc();
+void Func_02005100();
+void Func_0200510a();
+void Func_02005124();
+void Func_02005128();
+void Func_02005134();
+void Func_0200513e();
+void Func_02005142();
+void Func_0200514e();
+void Func_02005158();
+void Func_0200515c();
+void Func_0200517a();
+void Func_02005180();
+void Func_02005182();
+void Func_02005184();
+void Func_0200519c();
+void Func_020051b4();
+void Func_020051b6();
+void Func_020051be();
+void Func_020051c4();
+void Func_020051c8();
+void Func_020051cc();
+s32 Func_020051ce();
+void Func_020051d4();
+void Func_020051dc();
+void Func_020051e2();
+void Func_020051e4();
+void Func_020051e6();
+void Func_020051ee();
+void Func_020051f0();
+void Func_020051f4();
+s32 Func_020051fe();
+void Func_02005208();
+void Func_02005216();
+void Func_02005220();
+void Func_02005228();
+s32 Func_0200522e();
+void Func_02005236();
+void Func_02005238();
+void Func_02005246();
+void Func_02005250();
+void Func_02005258();
+void Func_02005268();
+void Func_02005276();
+void Func_02005284();
+void Func_02005288();
+void Func_02005298();
+void Func_02005302();
+void Func_0200530e();
+void Func_0200531a();
+void Func_02005326();
+void Func_02005332();
+void Func_0200533e();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScene3c5SequenceC(void)
+{
+ u32 i;
+ s32 record;
+
+ Call1(Func_02004936, 0x989);
+ Func_02004952();
+ Func_02004a86();
+ Call1(Func_020049fc, 0x272f);
+ Call3(Func_0200498a, 0, 0x10000, 0x8000);
+ Call3(Func_020049b0, 0, 0x128, 0x138);
+ Func_02004a3a(0, 0, 0);
+ Func_02004980(10);
+ Func_02004acc(1, 0, 16, 0);
+ Call4(Func_02004adc, 2, -16, -8, 0);
+ Call4(Func_02004aea, 3, -16, 24, 0);
+ Func_02004a00(3);
+ Func_020049b6(20);
+ Call2(Func_02004aaa, 0x30000, 0x6000);
+ Call4(Func_02004ac4, 0x1180000, -1, 0x1480000, 1);
+ Func_02004ad0();
+ Func_020049de(10);
+ Func_020049e4(10);
+ Call3(Func_02004ab0, 10, 0xb000, 0);
+ Func_020049f6(10);
+ Call3(Func_02004ad2, 10, 0x100, 40);
+ Func_02004ac2(10, 0);
+ Func_02004a84(10, 4, 13);
+ Func_02004a8e(10, 4, 30);
+ Func_02004a24(10);
+ Call3(Func_02004b00, 11, 0x100, 0);
+ Call3(Func_02004b0c, 12, 0x100, 0);
+ Call3(Func_02004b18, 13, 0x100, 0);
+ Call3(Func_02004b24, 14, 0x100, 40);
+ Func_02004a5a(10);
+ Call3(Func_02004b26, 14, 0xb000, 0);
+ Call3(Func_02004b32, 11, 0xb000, 0);
+ Call3(Func_02004b3e, 12, 0xb000, 0);
+ Call3(Func_02004b4a, 13, 0xb000, 0);
+ Func_02004a90(30);
+ Func_02004b18(14, 2);
+ Func_02004a9e(20);
+ Func_02004b5e(14, 0);
+ Func_02004aac(20);
+ Call3(Func_02004b88, 13, 0x102, 40);
+ Func_02004b78(13, 0);
+ Func_02004ac6(20);
+ Call3(Func_02004ba0, 12, 0x101, 50);
+ Call3(Func_02004b9c, 12, 0x8000, 0);
+ Func_02004ae2(25);
+ Func_02004ba2(12, 0);
+ Func_02004af0(10);
+ Call3(Func_02004bbc, 14, 0x8000, 0);
+ Call3(Func_02004bc8, 11, 0x8000, 0);
+ Call3(Func_02004bd4, 13, 0x8000, 0);
+ Func_02004b1a(30);
+ Func_02004b20(10);
+ Func_02004ba8(3, 2);
+ Func_02004b2e(20);
+ Func_02004bee(3, 0);
+ Func_02004b3c(10);
+ Func_02004bc4(2, 2);
+ Func_02004b4a(20);
+ Func_02004c0a(2, 0);
+ Func_02004b58(10);
+ Call3(Func_02004c34, 1, 0x102, 40);
+ Func_02004c24(1, 0);
+ Func_02004b72(20);
+ Func_02004be2(10, 4);
+ Func_02004b80(20);
+ Func_02004c40(10, 0);
+ Func_02004b8e(10);
+ Func_02004c16(14, 2);
+ Func_02004b9c(25);
+ Func_02004c5c(14, 0);
+ Func_02004baa(10);
+ Func_02004c32(10, 2);
+ Func_02004bb8(20);
+ Call3(Func_02004bee, 10, 0x10000, 0x8000);
+ Call3(Func_02004d22, 10, 0, -40);
+ Func_02004c9c(10, 0, 0);
+ Func_02004be2(20);
+ Func_02004ca2(10, 0);
+ Func_02004bf0(10);
+ Func_02004c60(14, 3);
+ Func_02004bfe(30);
+ Func_02004c04(10);
+ Call3(Func_02004cd0, 13, 0x4000, 0);
+ Call3(Func_02004cdc, 12, 0xc000, 0);
+ Func_02004c22(30);
+ Func_02004c8a(12, 3);
+ Func_02004c9a(13, 3);
+ Func_02004c38(30);
+ Call3(Func_02004d04, 13, 0x8000, 0);
+ Call3(Func_02004d10, 12, 0x8000, 0);
+ Func_02004c56(20);
+ Func_02004cc6(10, 3);
+ Func_02004c64(30);
+ Func_02004d4c(10, 1);
+ Call3(Func_02004dc8, 10, 0, -32);
+ Func_02004394();
+ Call1(Func_02004c7a, 0x301);
+ Call4(Func_02004d84, -1, -1, -1, 0);
+ Func_02004ca0();
+ Call3(Func_02004d74, 10, 0x102, 40);
+ Func_02004d64(10, 0);
+ Func_02004cb2(10);
+ Call3(Func_02004d7e, 14, 0xb000, 0);
+ Call3(Func_02004d8a, 11, 0xb000, 0);
+ Call3(Func_02004d96, 12, 0xb000, 0);
+ Call3(Func_02004da2, 13, 0xb000, 0);
+ Call3(Func_02004dae, 0, 0xc000, 0);
+ Call3(Func_02004dba, 1, 0xc000, 0);
+ Call3(Func_02004dc6, 2, 0xc000, 0);
+ Call3(Func_02004dd2, 3, 0xc000, 0);
+ Func_02004d18(30);
+ Call3(Func_02004df4, 11, 0x100, 0);
+ Call3(Func_02004e00, 12, 0x100, 0);
+ Call3(Func_02004e1e, 13, 0x100, 0);
+ Call3(Func_02004e2a, 14, 0x100, 70);
+ Call4(Func_02004e5c, 0x1180000, -1, 0x1380000, 1);
+ Func_02004e68();
+ Func_02004d76(10);
+ Call3(Func_02004e52, 12, 0x102, 40);
+ Func_02004e42(12, 0);
+ Func_02004d90(10);
+ Func_02004e00(13, 4);
+ Func_02004d9e(20);
+ Func_02004e5e(13, 0);
+ Func_02004dac(10);
+ Func_02004e34(2, 2);
+ Func_02004dba(30);
+ Call3(Func_02004e86, 2, 0x2000, 0);
+ Func_02004dcc(20);
+ Func_02004e8c(2, 0);
+ Func_02004dda(10);
+ Call3(Func_02004ea6, 10, 0x4000, 0);
+ Func_02004dec(30);
+ Call3(Func_02004eb8, 3, 0xe000, 0);
+ Func_02004dfe(30);
+ Call3(Func_02004eda, 3, 0x102, 40);
+ Call3(Func_02004ed6, 0, 0x3000, 0);
+ Func_02004e1c(20);
+ Func_02004edc(3, 0);
+ Func_02004e2a(10);
+ Func_02004e9a(1, 4);
+ Func_02004e38(20);
+ Func_02004ef8(1, 0);
+ Func_02004e46(20);
+ Call3(Func_02004f20, 14, 0x103, 50);
+ Call3(Func_02004f1c, 14, 0x8000, 0);
+ Func_02004e62(20);
+ Value2(Func_02004f1a, 14, 0);
+ Func_02004f34(0, 0, 0);
+ Call3(Func_02004f40, 11, 0x8000, 0);
+ Call3(Func_02004f4c, 12, 0x8000, 0);
+ Call3(Func_02004f58, 13, 0x8000, 0);
+ Call3(Func_02004f64, 2, 0x1000, 0);
+ Call3(Func_02004f70, 3, 0xe000, 0);
+ if (Value2(Func_02004ed0, 0, 0) == 0) {
+ Func_02004ec2(30);
+ Func_02004f4a(14, 2);
+ ((void (*)())Func_02004ed0)(20);
+ Func_02004f90(14, 0);
+ bump_step(1);
+ } else {
+ Func_02004ef0(30);
+ Func_02004f78(14, 2);
+ Func_02004efe(20);
+ bump_step(1);
+ Func_02004fce(14, 0);
+ }
+ Func_02004f1c(10);
+ Func_02004fa4(10, 2);
+ Func_02004f2a(20);
+ Func_02005084(10, 0, 16);
+ Call3(Func_02005000, 10, 0x2000, 0);
+ Func_02004f46(20);
+ Func_02005006(10, 0);
+ Func_02004f54(10);
+ Call3(Func_02005020, 14, 0xa000, 0);
+ Func_02004f66(20);
+ Func_02004fd6(14, 4);
+ Func_02004f74(20);
+ Func_02005034(14, 0);
+ Func_02004f82(10);
+ Func_02004ff2(10, 3);
+ Func_02004f90(30);
+ Func_02005050(10, 0);
+ Func_02004f9e(10);
+ Func_02005026(14, 2);
+ Func_02004fac(20);
+ Func_02005064(14, 0);
+ Func_02004fba(40);
+ Call3(Func_02005086, 10, 0x5000, 0);
+ Func_02004fcc(20);
+ Call3(Func_020050a6, 10, 0x101, 60);
+ if (Value2(Func_02004ff6, 0, 0) == 0) {
+ Func_02004fe8(30);
+ Call3(Func_020050b4, 10, 0x2000, 0);
+ Func_02004ffa(20);
+ Func_0200506a(10, 3);
+ Func_02005008(30);
+ Func_020050c8(10, 0);
+ bump_step(1);
+ } else {
+ Func_02005034(30);
+ Call3(Func_02005100, 10, 0x2000, 0);
+ Func_02005046(20);
+ Func_020050b6(10, 4);
+ Func_02005054(20);
+ bump_step(1);
+ Func_02005124(10, 0);
+ }
+ Func_02005072(10);
+ Call3(Func_0200514e, 14, 0x102, 50);
+ Func_0200513e(14, 0);
+ Func_0200508c(15);
+ Func_020050fc(10, 3);
+ Func_0200509a(30);
+ Func_020050a0(20);
+ Func_02005128(14, 2);
+ Func_020050ae(40);
+ Call3(Func_0200517a, 14, 0x8000, 0);
+ Func_020050c0(20);
+ Func_02005180(14, 0);
+ Func_020050ce(10);
+ Func_0200513e(14, 3);
+ Func_020050dc(30);
+ Func_0200519c(14, 0);
+ Func_020050ea(10);
+ Call3(Func_020051b6, 10, 0x5000, 0);
+ Func_020050fc(25);
+ Func_02005184(10, 2);
+ Func_0200510a(20);
+ Call3(Func_02005158, 10, 0x138, 0x138);
+ Func_020051e2(0, 0, 0);
+ Call3(Func_020051ee, 10, 0x8000, 0);
+ Func_02005134(25);
+ Func_020051f4(10, 0);
+ Func_02005142(10);
+ Func_020051dc(0, 1, 0);
+ Func_020051e6(3, 2, 0);
+ Func_0200515c(30);
+ Func_020051c4(0, 3);
+ Func_020051cc(1, 3);
+ Func_020051d4(3, 3);
+ Func_020051e4(2, 3);
+ Func_02005182(30);
+ Call3(Func_020051b4, 1, 0x13333, 0x9999);
+ Call3(Func_020051be, 2, 0x13333, 0x9999);
+ Call3(Func_020051c8, 3, 0x13333, 0x9999);
+ Func_02005208(1, 2);
+ record = Value1(Func_020051ce, 0);
+ if (record != 0) {
+ Func_020051f0(1, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02005216(1);
+ Func_02005228(1, 0, 0);
+ Func_02005238(2, 2);
+ record = Value1(Func_020051fe, 0);
+ if (record != 0) {
+ Func_02005220(2, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02005246(2);
+ Func_02005258(2, 0, 0);
+ Func_02005268(3, 2);
+ record = Value1(Func_0200522e, 0);
+ if (record != 0) {
+ Func_02005250(3, *(s16 *)(record + 10), *(s16 *)(record + 18));
+ }
+ Func_02005276(3);
+ Func_02005288(3, 0, 0);
+ Func_02005236(10);
+ Call3(Func_02005302, 0, 0xc000, 0);
+ Call3(Func_0200530e, 10, 0xb000, 0);
+ Call3(Func_0200531a, 14, 0xb000, 0);
+ Call3(Func_02005326, 11, 0xb000, 0);
+ Call3(Func_02005332, 12, 0xb000, 0);
+ Call3(Func_0200533e, 13, 0xb000, 0);
+ Func_02005284(30);
+ Func_02005298();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3c9_extended_presentation.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3c9_extended_presentation.c
new file mode 100644
index 000000000..a2dbb67bb
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3c9_extended_presentation.c
@@ -0,0 +1,441 @@
+#include "types.h"
+
+#define FieldScene_RunExtendedPresentation Func_0200423c
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00000000[];
+extern u8 Data_00000002[];
+extern u8 Data_0200b6d1[];
+extern u8 Data_0200d6a1[];
+extern u8 Data_0200e088[];
+extern u8 Data_0200e0d0[];
+extern u8 Data_0200e0f4[];
+extern u8 Data_0200e130[];
+extern u8 Data_0200e760[];
+extern u8 Data_0200e764[];
+void Func_02004f60();
+void Func_02004f8a();
+void Func_02004fb6();
+void Func_02009b8a();
+void Func_02009b9a();
+void Func_02009bae();
+void Func_02009bbe();
+void Func_02009bd4();
+void Func_02009bea();
+void Func_02009c00();
+void Func_02009c16();
+void Func_02009f22();
+void Func_02009f7c();
+void Func_02009f90();
+void Func_02009fc2();
+void Func_02009fd8();
+void Func_0200a028();
+void Func_0200a038();
+void Func_0200a074();
+u8 *Func_0200a084();
+s32 Func_0200a08e();
+void Func_0200a096();
+void Func_0200a0a2();
+void Func_0200a0ae();
+void Func_0200a0b2();
+void Func_0200a0b4();
+void Func_0200a0ba();
+void Func_0200a0be();
+void Func_0200a0c6();
+void Func_0200a0ce();
+void Func_0200a0d2();
+void Func_0200a0da();
+void Func_0200a0e6();
+void Func_0200a0ec();
+u8 *Func_0200a0f2();
+void Func_0200a0fa();
+u8 *Func_0200a0fc();
+void Func_0200a0fe();
+void Func_0200a10a();
+u8 *Func_0200a10e();
+u8 *Func_0200a11a();
+void Func_0200a120();
+void Func_0200a122();
+s32 Func_0200a128();
+void Func_0200a134();
+void Func_0200a152();
+u8 *Func_0200a158();
+u8 *Func_0200a164();
+void Func_0200a16a();
+s32 Func_0200a170();
+void Func_0200a176();
+void Func_0200a186();
+u8 *Func_0200a194();
+u8 *Func_0200a1a0();
+s32 Func_0200a1ac();
+void Func_0200a1ea();
+void Func_0200a1f0();
+void Func_0200a204();
+void Func_0200a206();
+void Func_0200a210();
+void Func_0200a21a();
+void Func_0200a226();
+void Func_0200a228();
+void Func_0200a234();
+u8 *Func_0200a242();
+s32 Func_0200a254();
+void Func_0200a25a();
+u8 *Func_0200a264();
+void Func_0200a266();
+void Func_0200a272();
+s32 Func_0200a278();
+s32 Func_0200a288();
+void Func_0200a292();
+s32 Func_0200a29e();
+s32 Func_0200a2b4();
+void Func_0200a2c8();
+s32 Func_0200a2ca();
+void Func_0200a2e0();
+void Func_0200a304();
+u8 *Func_0200a30c();
+void Func_0200a32a();
+void Func_0200a348();
+void Func_0200a352();
+void Func_0200a358();
+s32 Func_0200a35a();
+void Func_0200a35e();
+s32 Func_0200a362();
+s32 Func_0200a36a();
+void Func_0200a36e();
+void Func_0200a372();
+u8 *Func_0200a3c0();
+void Func_0200a3da();
+s32 Func_0200a3e6();
+s32 Func_0200a3ee();
+s32 Func_0200a3f6();
+void Func_0200a414();
+void Func_0200a416();
+void Func_0200a432();
+void Func_0200a43e();
+void Func_0200a45a();
+void Func_0200a45c();
+void Func_0200a470();
+s32 Func_0200a474();
+void Func_0200a48c();
+void Func_0200a492();
+void Func_0200a4a8();
+void Func_0200a4be();
+void Func_0200a4c4();
+void Func_0200a4ce();
+void Func_0200a4de();
+void Func_0200a4e4();
+s32 Func_0200a4e8();
+void Func_0200a4ec();
+s32 Func_0200a502();
+void Func_0200a50e();
+s32 Func_0200a522();
+s32 Func_0200a53c();
+void Func_0200a548();
+s32 Func_0200a554();
+s32 Func_0200a56c();
+s32 Func_0200a570();
+u8 *Func_0200a578();
+void Func_0200a582();
+void Func_0200a590();
+void Func_0200a5a0();
+void Func_0200a61e();
+void Func_0200a65e();
+void Func_0200a6dc();
+void Func_0200a73c();
+void Func_0200a73e();
+void Func_0200a74a();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+static __inline__ void Call6(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3, s32 a4, s32 a5)
+{
+ f(a0, a1, a2, a3, a4, a5);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)0x03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunExtendedPresentation(void)
+{
+ u32 i;
+ u16 p8[1];
+ u8 *rec26;
+ u8 *rec27;
+ u8 *rec28;
+ u8 *record;
+ s32 base5_200e088;
+ s32 none;
+ s32 base5_200e0d0;
+ s32 base5_200e0f4;
+ s32 x_pos;
+ s32 z_pos;
+ s32 y_neg1;
+
+ Call1((void (*)())Func_0200a11a, 19);
+ Call1(Func_0200a122, 0x120);
+ Call3(Func_02009f22, 0x30000, 0x30000, 0x10000);
+ Call3(Func_0200a096, 0, 0x100, 0);
+ Call3(Func_0200a0a2, 1, 0x100, 0);
+ Call3(Func_0200a0ae, 2, 0x100, 0);
+ Call3(Func_0200a0ba, 3, 0x100, 0);
+ Call3(Func_0200a0c6, 21, 0x100, 0);
+ Call3(Func_0200a0d2, 6, 0x100, 10);
+ Call3(Func_0200a0ce, 0, 0xa000, 0);
+ Call3(Func_0200a0da, 1, 0xa000, 0);
+ Call3(Func_0200a0e6, 2, 0xa000, 0);
+ Call3((void (*)())Func_0200a0f2, 3, 0xa000, 0);
+ Call3(Func_0200a0fe, 21, 0xd000, 0);
+ Call3(Func_0200a10a, 6, 0xd000, 0);
+ Call3(Func_02009fc2, 0x20000, 0x20000, 0x10000);
+ Func_0200a038(10);
+ Call3(Func_02009fd8, 0x10000, 0x10000, 0x10000);
+ Call4(Func_0200a16a, 0x1300000, 0x200000, 0xb40000, 1);
+ Func_0200a176();
+ record = Func_0200a084(24);
+ *(s32 *)(record + 24) = 0x1999;
+ record = Value1(Func_0200a08e, 25);
+ *(s32 *)(record + 24) = 0x1999;
+ base5_200e088 = (s32)Data_0200e088;
+ Func_0200a0b2(24, base5_200e088);
+ Func_0200a0ba(25, base5_200e088);
+ Func_0200a228(145);
+ Call3(Func_0200a028, 0x60000, 0x60000, 0x10000);
+ Call2(Func_0200a1f0, 0x4063ff, 0);
+ Func_0200a206(16);
+ Func_02009f7c(20);
+ Call2(Func_0200a204, 0x7fff, 0);
+ Func_0200a21a(24);
+ Func_02009f90(60);
+ Func_0200a266(141);
+ Call1(Func_0200a0b4, 0x236);
+ record = Func_0200a0f2(24);
+ *(s32 *)(record + 12) = -0x600000;
+ record = Func_0200a0fc(25);
+ *(s32 *)(record + 12) = -0x400000;
+ Call2((void (*)())Func_0200a1a0, 26, 7);
+ record = Func_0200a10e(26);
+ Func_0200a074(record, 0);
+ rec26 = Func_0200a11a(26);
+ y_neg1 = -0x10000;
+ *(s32 *)(rec26 + 28) = y_neg1;
+ record = Value1(Func_0200a128, 24);
+ none = 0;
+ *(s32 *)(rec26 + 24) = *(s32 *)(record + 24);
+ rec26[85] = none;
+ x_pos = 0x1300000;
+ *(s32 *)(rec26 + 8) = x_pos;
+ *(s32 *)(rec26 + 12) = -0x200000;
+ z_pos = 0x600000;
+ *(s32 *)(rec26 + 16) = z_pos;
+ Func_0200a1ea(27, 7);
+ record = Func_0200a158(27);
+ Func_0200a0be(record, 0);
+ rec27 = Func_0200a164(27);
+ *(s32 *)(rec27 + 28) = y_neg1;
+ record = Value1(Func_0200a170, 24);
+ *(s32 *)(rec27 + 24) = *(s32 *)(record + 24);
+ rec27[85] = none;
+ *(s32 *)(rec27 + 8) = x_pos;
+ *(s32 *)(rec27 + 12) = none;
+ *(s32 *)(rec27 + 16) = z_pos;
+ Func_0200a226(28, 7);
+ record = Func_0200a194(28);
+ Func_0200a0fa(record, 0);
+ rec28 = Func_0200a1a0(28);
+ *(s32 *)(rec28 + 28) = y_neg1;
+ record = Value1(Func_0200a1ac, 24);
+ *(s32 *)(rec28 + 24) = *(s32 *)(record + 24);
+ rec28[85] = none;
+ *(s32 *)(rec28 + 8) = x_pos;
+ *(s32 *)(rec28 + 12) = 0x200000;
+ *(s32 *)(rec28 + 16) = z_pos;
+ Call6(Func_0200a120, 102, 4, 74, 4, 18, 23);
+ Call6(Func_0200a134, 39, 72, 11, 72, 16, 21);
+ Call6(Func_0200a152, 19, 6, 3, 7, 22, 6);
+ Call6((void (*)())Func_0200a164, 19, 6, 3, 7, 13, 6);
+ Call6(Func_0200a176, 19, 6, 3, 7, 22, 13);
+ Call6(Func_0200a186, 19, 6, 3, 7, 13, 13);
+ Func_0200a0ec(1);
+ record = Func_0200a242(8);
+ *(s32 *)(record + 8) += -0x100000;
+ Func_02009b8a();
+ record = Value1(Func_0200a254, 9);
+ *(s32 *)(record + 8) += -0x100000;
+ Func_02009b9a();
+ record = Func_0200a264(10);
+ *(s32 *)(record + 8) += 0x100000;
+ Func_02009bae();
+ record = Value1(Func_0200a278, 11);
+ *(s32 *)(record + 8) += 0x100000;
+ Func_02009bbe();
+ record = Value1(Func_0200a288, 0);
+ *(s32 *)(record + 8) += 0x100000;
+ *(s32 *)(record + 16) += 0x100000;
+ Func_02009bd4();
+ record = Value1(Func_0200a29e, 1);
+ *(s32 *)(record + 8) += 0x100000;
+ *(s32 *)(record + 16) += 0x100000;
+ Func_02009bea();
+ record = Value1(Func_0200a2b4, 2);
+ *(s32 *)(record + 8) += 0x100000;
+ *(s32 *)(record + 16) += 0x100000;
+ Func_02009c00();
+ record = Value1(Func_0200a2ca, 3);
+ *(s32 *)(record + 8) += 0x100000;
+ *(s32 *)(record + 16) += 0x100000;
+ Func_02009c16();
+ Call3(Func_0200a348, 21, 0xc40000, 0xdc0000);
+ Func_0200a358(21, 5);
+ Call3(Func_0200a35e, 6, 0xbc0000, 0x13c0000);
+ Func_0200a36e(6, 5);
+ record = Func_0200a30c(6);
+ Func_0200a272(record, 0);
+ Call3(Func_0200a292, 0x40000, 0x40000, 0x10000);
+ Call2(Func_0200a45a, 0x4063ff, 0);
+ Func_0200a470(120);
+ base5_200e0d0 = (s32)Data_0200e0d0;
+ Func_0200a352(24, base5_200e0d0);
+ Value2(Func_0200a35a, 25, base5_200e0d0);
+ Value2(Func_0200a362, 26, base5_200e0d0);
+ Value2(Func_0200a36a, 27, base5_200e0d0);
+ Func_0200a372(28, base5_200e0d0);
+ Func_0200a210(120);
+ Call3(Func_0200a2e0, 0x30000, 0x30000, 0x10000);
+ Call2(Func_0200a4a8, 0x203210, 0);
+ Func_0200a4be(120);
+ Func_0200a234(120);
+ Call3(Func_0200a304, 0x20000, 0x20000, 0x10000);
+ Call2(Func_0200a4ce, 0x10000, 0);
+ Func_0200a4e4(120);
+ Func_0200a25a(120);
+ Call3(Func_0200a32a, 0x10000, 0x10000, 0x10000);
+ record = Func_0200a3c0(24);
+ base5_200e0f4 = (s32)Data_0200e0f4;
+ *(s32 *)(record + 28) = 0x51e;
+ Value2(Func_0200a3e6, 25, base5_200e0f4);
+ Value2(Func_0200a3ee, 26, base5_200e0f4);
+ Value2(Func_0200a3f6, 27, base5_200e0f4);
+ Func_0200a416(28, base5_200e0f4);
+ Call1(Func_0200a56c, 0x121);
+ Func_0200a48c(24, 15);
+ Func_0200a3da(20);
+ Call2(Func_0200a432, 24, (s32)Data_0200e130);
+ Call1(Func_0200a2c8, (s32)Data_0200b6d1);
+ Func_0200a492(2, 2, 20);
+ Func_02004f60(2);
+ Call3(Func_0200a4ec, 1, 0x6000, 20);
+ Call2(Func_0200a50e, 1, 0x102);
+ Func_0200a414(20);
+ Func_0200a4c4(1, 2);
+ Func_02004f8a(1);
+ Call3(Func_0200a45c, 3, 0xcccc, 0x6666);
+ Call3(Func_0200a4a8, 3, 0x146, 220);
+ Func_0200a43e(40);
+ Call2(Func_0200a548, 3, 0x102);
+ Func_02004fb6(3);
+ record = Value1(Func_0200a474, 0);
+ record[98] = none;
+ *(u8 *)((record + 98) + 1) = 1;
+ *(s32 *)(record + 76) = *(s32 *)(record + 12);
+ p8[0] = (u16)(s32)Data_00000000;
+ {
+ s32 shown = 0xa000;
+
+ *(u16 *)(record + 6) = shown;
+ }
+ record = Value1(Func_0200a4e8, 1);
+ record[98] = p8[0];
+ *(u8 *)((record + 98) + 1) = 1;
+ {
+ s32 shown = 0xa000;
+
+ *(u16 *)(record + 6) = shown;
+ }
+ *(s32 *)(record + 76) = *(s32 *)(record + 12);
+ record = Value1(Func_0200a502, 2);
+ record[98] = p8[0];
+ *(u8 *)((record + 98) + 1) = 1;
+ {
+ s32 shown = 0xa000;
+
+ *(u16 *)(record + 6) = shown;
+ }
+ *(s32 *)(record + 76) = *(s32 *)(record + 12);
+ record = Value1(Func_0200a522, 3);
+ record[98] = p8[0];
+ *(u8 *)((record + 98) + 1) = 1;
+ {
+ s32 shown = 0xa000;
+
+ *(u16 *)(record + 6) = shown;
+ }
+ *(s32 *)(record + 76) = *(s32 *)(record + 12);
+ record = Value1(Func_0200a53c, 21);
+ record[98] = p8[0];
+ *(u8 *)((record + 98) + 1) = 1;
+ *(s32 *)(record + 76) = *(s32 *)(record + 12);
+ record = Value1(Func_0200a554, 6);
+ record[98] = p8[0];
+ *(u8 *)((record + 98) + 1) = 1;
+ *(s32 *)(record + 76) = *(s32 *)(record + 12);
+ *(u8 *)(Func_0200a56c(23) + 85) = p8[0];
+ record = Func_0200a578(23);
+ Func_0200a4de(record, 0);
+ Func_0200a61e(23, 7);
+ Func_0200a65e(23, 2);
+ *(s32 *)Data_0200e764 = none;
+ *(s32 *)Data_0200e760 = 240;
+ Call2(Func_0200a45c, (s32)Data_0200d6a1, 0xc80);
+ do {
+ Func_0200a45a(1);
+ } while (Value1(Func_0200a570, 0x237) == 0);
+ Call1(Func_0200a582, 0x101);
+ Func_0200a5a0(30);
+ Call1(Func_0200a590, 0x11a);
+ Func_0200a73c();
+ Func_0200a6dc((s32)Data_00000002, 91);
+ i = 0x7fff;
+ *(u16 *)0x05000000 = i;
+ *(s32 *)((*(u8 **)0x03001ebc + 0x1c8)) = 1;
+ Func_0200a73e();
+ Func_0200a74a();
+}
diff --git a/games/gs1/src/overlays/scene_primary_script/run_scene_3c9_scripted_actor_presentation.c b/games/gs1/src/overlays/scene_primary_script/run_scene_3c9_scripted_actor_presentation.c
new file mode 100644
index 000000000..ab5cd3e60
--- /dev/null
+++ b/games/gs1/src/overlays/scene_primary_script/run_scene_3c9_scripted_actor_presentation.c
@@ -0,0 +1,621 @@
+#include "types.h"
+
+#define FieldScene_RunScriptedActorPresentation Func_020008b4
+
+/* Loader-relocated overlay calls: each symbol names the pre-relocation call
+ * word the image holds. */
+extern u8 Data_00000000[];
+extern u8 Data_00002014[];
+extern u8 Data_00004013[];
+extern u8 Data_00008001[];
+extern u8 Data_00008015[];
+extern u8 Data_0000a014[];
+extern u8 Data_03001ebc[];
+extern u8 Data_0200dfc4[];
+void Func_02001442();
+s32 Func_0200147c();
+void Func_020014ba();
+void Func_020014c8();
+void Func_020014e6();
+void Func_020014ea();
+void Func_020014ec();
+void Func_02001572();
+void Func_02001582();
+void Func_02001590();
+void Func_020015a0();
+void Func_020015ae();
+void Func_020015e0();
+void Func_020015ea();
+void Func_020015fa();
+void Func_0200161e();
+void Func_02001648();
+s32 Func_0200164a();
+void Func_020016a2();
+void Func_020016c4();
+void Func_020016d4();
+void Func_020016e2();
+void Func_0200173a();
+void Func_02001772();
+s32 Func_02001790();
+void Func_020017a0();
+void Func_020017a6();
+void Func_020017b8();
+void Func_020017c6();
+void Func_020017d4();
+void Func_02001846();
+void Func_02001858();
+void Func_02001866();
+void Func_0200188a();
+void Func_0200189a();
+void Func_020018ac();
+void Func_020018ba();
+void Func_020018c8();
+void Func_02001900();
+void Func_02001918();
+void Func_02001930();
+void Func_0200194a();
+void Func_02001966();
+void Func_02001976();
+void Func_02001992();
+void Func_020019a0();
+void Func_020019f4();
+void Func_02001a04();
+void Func_02001a26();
+void Func_02001a74();
+void Func_02001b54();
+void Func_02001b5c();
+void Func_02001b64();
+void Func_02001d8e();
+void Func_02001d96();
+void Func_02001d9e();
+void Func_020064f8();
+void Func_0200655a();
+void Func_020065ca();
+void Func_02006600();
+s32 Func_02006612();
+u8 *Func_02006664();
+s32 Func_02006686();
+void Func_02006690();
+void Func_02006698();
+void Func_020066d6();
+s32 Func_020066da();
+void Func_020066e0();
+void Func_020066e4();
+void Func_02006700();
+void Func_02006704();
+void Func_02006728();
+u8 *Func_0200672a();
+void Func_02006732();
+void Func_02006734();
+void Func_0200673a();
+void Func_0200673c();
+void Func_02006742();
+void Func_0200674e();
+void Func_02006752();
+void Func_02006764();
+void Func_02006768();
+void Func_02006772();
+void Func_02006776();
+void Func_02006786();
+void Func_02006792();
+u8 *Func_0200679a();
+void Func_020067c4();
+void Func_020067d6();
+u8 *Func_020067d8();
+void Func_020067da();
+void Func_020067ec();
+void Func_020067f6();
+void Func_0200680a();
+u8 *Func_02006810();
+u8 *Func_02006840();
+void Func_0200684a();
+void Func_02006860();
+s32 Func_02006862();
+void Func_0200686c();
+void Func_02006872();
+void Func_020068be();
+void Func_020068c8();
+void Func_020068ce();
+void Func_020068d4();
+void Func_020068e6();
+void Func_02006906();
+void Func_02006908();
+void Func_0200690e();
+void Func_02006914();
+void Func_02006916();
+void Func_0200692e();
+void Func_02006934();
+void Func_02006946();
+void Func_0200697e();
+void Func_02006980();
+void Func_0200698a();
+void Func_02006994();
+void Func_0200699c();
+void Func_0200699e();
+void Func_020069cc();
+void Func_020069d6();
+void Func_020069e0();
+void Func_020069e2();
+void Func_020069f6();
+void Func_02006a04();
+s32 Func_02006a1a();
+s32 Func_02006a24();
+void Func_02006a34();
+void Func_02006a40();
+void Func_02006a66();
+void Func_02006a6e();
+void Func_02006a70();
+void Func_02006a88();
+void Func_02006a90();
+void Func_02006a94();
+void Func_02006a9c();
+void Func_02006aa8();
+void Func_02006aae();
+void Func_02006ab2();
+void Func_02006ad0();
+void Func_02006aea();
+void Func_02006aec();
+void Func_02006b0c();
+void Func_02006b2a();
+void Func_02006b3a();
+void Func_02006b48();
+void Func_02006b5e();
+void Func_02006b60();
+void Func_02006b6a();
+void Func_02006b84();
+void Func_02006b86();
+void Func_02006b90();
+void Func_02006b96();
+void Func_02006ba8();
+void Func_02006bae();
+void Func_02006bd2();
+void Func_02006bd4();
+void Func_02006bdc();
+void Func_02006be2();
+void Func_02006be6();
+void Func_02006bf0();
+void Func_02006bfe();
+void Func_02006c02();
+void Func_02006c04();
+s32 Func_02006c14();
+void Func_02006c22();
+void Func_02006c28();
+void Func_02006c2a();
+void Func_02006c3a();
+void Func_02006c3c();
+void Func_02006c46();
+void Func_02006c5e();
+void Func_02006c82();
+void Func_02006c96();
+void Func_02006ca4();
+void Func_02006cc2();
+void Func_02006ccc();
+void Func_02006ce8();
+void Func_02006cf6();
+void Func_02006cfa();
+void Func_02006d2a();
+void Func_02006d34();
+void Func_02006d3e();
+void Func_02006d6e();
+void Func_02006d72();
+void Func_02006d78();
+s32 Func_02006d7c();
+void Func_02006d80();
+void Func_02006da0();
+void Func_02006da4();
+void Func_02006dae();
+void Func_02006db8();
+void Func_02006dbe();
+void Func_02006ddc();
+void Func_02006de2();
+void Func_02006dea();
+void Func_02006df2();
+void Func_02006e00();
+void Func_02006e14();
+void Func_02006e1c();
+void Func_02006e24();
+void Func_02006e32();
+void Func_02006e34();
+void Func_02006e5c();
+void Func_02006e5e();
+void Func_02006e62();
+void Func_02006e64();
+void Func_02006e68();
+void Func_02006e7e();
+void Func_02006e80();
+void Func_02006e8a();
+void Func_02006ea2();
+void Func_02006eba();
+void Func_02006ec6();
+void Func_02006ecc();
+void Func_02006ee4();
+void Func_02006ef0();
+void Func_02006f00();
+s32 Func_02006f06();
+void Func_02006f34();
+void Func_02006f36();
+void Func_02006f58();
+void Func_02006f60();
+void Func_02006f6e();
+void Func_02006f74();
+void Func_02006f82();
+s32 Func_02006f8a();
+void Func_02006f8e();
+s32 Func_02006f96();
+void Func_02006faa();
+void Func_02006fb0();
+void Func_02006fb8();
+void Func_02006fba();
+void Func_02006fc0();
+void Func_02006fc2();
+void Func_02006fc6();
+void Func_02006fce();
+void Func_02006fd0();
+void Func_02006fdc();
+void Func_02006ff0();
+void Func_02006ffe();
+s32 Func_02007008();
+
+/* Call sites spelled through these wrappers pass their constants straight
+ * into the argument registers; a direct call precomputes a costly constant
+ * into a pseudo that the compiler then shares with later uses in the block.
+ * A value-returning call also sets r0 last of its arguments. */
+
+static __inline__ void Call1(void (*f)(), s32 a0)
+{
+ f(a0);
+}
+
+static __inline__ s32 Value1(s32 (*f)(), s32 a0)
+{
+ return f(a0);
+}
+
+static __inline__ void Call2(void (*f)(), s32 a0, s32 a1)
+{
+ f(a0, a1);
+}
+
+static __inline__ s32 Value2(s32 (*f)(), s32 a0, s32 a1)
+{
+ return f(a0, a1);
+}
+
+static __inline__ void Call3(void (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ f(a0, a1, a2);
+}
+
+static __inline__ s32 Value3(s32 (*f)(), s32 a0, s32 a1, s32 a2)
+{
+ return f(a0, a1, a2);
+}
+
+static __inline__ void Call4(void (*f)(), s32 a0, s32 a1, s32 a2, s32 a3)
+{
+ f(a0, a1, a2, a3);
+}
+
+/* The scene step counter at 0x1d8 of the shared scene work record. */
+static __inline__ void bump_step(s32 amount)
+{
+ u8 *work = *(u8 **)Data_03001ebc;
+
+ *(u16 *)(work + 0x1d8) = (u16)(*(u16 *)(work + 0x1d8) + amount);
+}
+
+void FieldScene_RunScriptedActorPresentation(void)
+{
+ u32 i;
+ u16 p8[1];
+ u8 *rec7;
+ u8 *rec8;
+ u8 *record;
+ s32 none;
+ s32 base6_4013;
+ s32 base5_2014;
+ s32 base6_8015;
+ s32 base5_a014;
+ s32 base5_8001;
+ s32 base5_200dfc4;
+
+ rec7 = Value1(Func_02006612, 18);
+ Func_02006600();
+ Func_02001b54(1, 0);
+ Func_02001b5c(2, 0);
+ Func_02001b64(3, 0);
+ Call4(Func_02006732, -1, -1, -1, 0);
+ Func_020064f8(1);
+ none = 0;
+ rec7[85] = none;
+ {
+ u8 value = *(volatile u8 *)&rec7[35];
+
+ rec7[35] = (u8)(value | 2);
+ }
+ record = Func_02006664(18);
+ Func_020065ca(record, 0);
+ Func_02006742(18, 1);
+ Call3(Func_020066e0, 18, 0x2440000, 0x1520000);
+ rec8 = Value1(Func_02006686, 0);
+ rec8[85] = none;
+ Func_02006768(0, 1);
+ Call3(Func_02006704, 0, 0x2450000, 0x1200000);
+ Func_0200655a(1);
+ Func_020067f6();
+ Func_0200680a();
+ Func_02006698(20);
+ Call3(Func_020066d6, 18, 0x10000, 0x8000);
+ Call3(Func_020066e4, 0, 0x10000, 0x8000);
+ *(u8 *)(Func_020066da(0) + 90) &= 254;
+ Call3(Func_02006728, 18, 0x244, 221);
+ Call3(Func_0200673a, 0, 0x245, 171);
+ Call3(Func_0200673c, 18, 0x212, 211);
+ Call3(Func_0200674e, 0, 0x213, 161);
+ Call3(Func_02006752, 18, 0x208, 191);
+ Call3(Func_02006764, 0, 0x209, 141);
+ record = Func_0200672a(18);
+ Func_02006690(record, 1);
+ Call3(Func_02006772, 18, 0x203, 171);
+ Call3(Func_02006786, 0, 0x204, 121);
+ Call1(Func_020068ce, 0x120);
+ Func_02006734(20);
+ Func_020067c4(0, 6);
+ Func_020067da(0);
+ *(s32 *)(rec8 + 8) = 0x2040000;
+ *(s32 *)(rec8 + 12) = 0x80000;
+ *(s32 *)(rec8 + 16) = 0x940000;
+ {
+ s32 shown = 0x8000;
+
+ *(u16 *)(rec8 + 6) = shown;
+ }
+ rec8[85] = 3;
+ p8[0] = (u16)(s32)Data_00000000;
+ Func_02006908(152);
+ *(s32 *)(rec8 + 40) = 0x40000;
+ Func_02006914(152);
+ record = Func_0200679a(0);
+ Func_02006700(record, 1);
+ Call3(Func_020067ec, 0, 0x1f8, 148);
+ Func_02006792(10);
+ {
+ u8 *record = Func_020067d8(0);
+ u8 value = *(volatile u8 *)&record[90];
+
+ record[90] = (u8)(value | 1);
+ }
+ {
+ s32 shown = 0x4000;
+
+ *(u16 *)(rec8 + 6) = shown;
+ }
+ *(s32 *)(rec8 + 12) = -0x200000;
+ Func_020067d6(20);
+ Call1(Func_0200697e, 0x134);
+ Call3(Func_0200684a, 18, 0x20c, 191);
+ record = Func_02006810(18);
+ Func_02006776(record, 0);
+ Call3(Func_02006860, 18, 0x212, 211);
+ Call3(Func_0200686c, 18, 0x244, 221);
+ Call3(Func_02006872, 18, 0x244, 0x152);
+ {
+ u8 *record = Func_02006840(0);
+ u8 value = *(volatile u8 *)&record[35];
+
+ record[35] = (u8)(value | 1);
+ }
+ Value3(Func_02006862, 0, 0xcccc, 0x6666);
+ Func_02001d8e(1, 1);
+ Func_02001d96(2, 1);
+ Func_02001d9e(3, 1);
+ Call3(Func_020068be, 0, 0x1ec, 164);
+ Call3(Func_020068c8, 1, 0x202, 164);
+ Call3(Func_020068d4, 2, 0x1ec, 140);
+ Call3(Func_020068e6, 3, 0x202, 140);
+ Func_02006906(0, 1);
+ Func_0200690e(1, 1);
+ Func_02006916(2, 1);
+ Func_02006980(0, 0x4000, 0);
+ Func_0200698a(1, 0x4000, 0);
+ Func_02006994(2, 0x4000, 0);
+ Func_0200699e(3, 0x4000, 0);
+ Func_02006934(18);
+ Func_02006946(18, 0, 0);
+ base6_4013 = (s32)Data_00004013;
+ Call1(Func_02006a6e, 0x121);
+ Call1(Func_0200699c, 0x2757);
+ Func_02001442(base6_4013);
+ Func_020069cc(0, 0x8000, 0);
+ Func_020069d6(1, 0x8000, 0);
+ Func_020069e0(2, 0x8000, 0);
+ Value2(Func_0200147c, 3, 0x8000);
+ *(u8 *)(Func_02006a24() + 85) = p8[0];
+ Value2(Func_02006a1a, 0x4cccc, 0x9999);
+ Call4(Func_02006a34, 0x1300000, 0x200000, 0x9e0000, 1);
+ Func_02006a40();
+ Func_0200692e(20);
+ base5_2014 = (s32)Data_00002014;
+ Func_020014ba(20, 0xd000);
+ Func_020069f6(20, 1);
+ Func_02006aec(61);
+ Func_020014ba(base5_2014);
+ Func_020069e2(19, 4);
+ Func_020014c8(base6_4013);
+ Func_020014ea(20, 0xb000);
+ Call3(Func_02006a70, 20, 0x105, 40);
+ Func_020014e6(base5_2014);
+ Func_020014ec(21);
+ Call3(Func_02006a88, 19, 0x100, 0);
+ Call3(Func_02006a94, 20, 0x100, 20);
+ Call3(Func_02006a90, 6, 0x3000, 0);
+ Call3(Func_02006a9c, 19, 0x5000, 0);
+ Call3(Func_02006aa8, 20, 0x5000, 20);
+ Call2(Func_02006ad0, 0x19999, 0x3333);
+ Call4(Func_02006aea, 0x1260000, -1, 0xc20000, 1);
+ Func_020069e0(20);
+ Call3((void (*)())Func_02006a1a, 21, 0xcccc, 0x6666);
+ Call3(Func_02006a66, 21, 0x110, 200);
+ Func_02006aae(20, 1);
+ Func_02006a04(20);
+ Func_02001572(base5_2014);
+ Call3(Func_02006b0c, 19, 0x103, 20);
+ Func_02001582(19);
+ Func_02006ab2(21, 3);
+ Func_02001590(21);
+ Call3(Func_02006b2a, 20, 0x101, 40);
+ Func_020015a0(base5_2014);
+ Func_02006ad0(21, 4);
+ Func_020015ae(21);
+ Call3(Func_02006b48, 19, 0x101, 60);
+ Func_02006b3a(19, 0, 40);
+ Call3(Func_02006b5e, 19, 0x106, 40);
+ Func_020015ea(19, 0x8000);
+ Func_020015e0(0x2013);
+ Func_02006b6a(6, 0, 0);
+ Call3(Func_02006b84, 21, 0x103, 40);
+ Func_020015fa(21);
+ Call3(Func_02006b86, 19, 0x3000, 0);
+ Func_02006b90(20, 0xb000, 40);
+ Func_02006b60(21, 1);
+ Func_0200161e(21);
+ Call3(Func_02006bae, 20, 0x5000, 0);
+ Func_0200164a(19, 0x5000);
+ Call3(Func_02006bd2, 19, 0x108, 20);
+ Func_02001648(0x2013);
+ Call3(Func_02006be2, 21, 0x103, 20);
+ Func_02006bd4(21, 0, 20);
+ Func_02006be6(20, 0x8000, 40);
+ Func_02006b96(20, 4);
+ Func_02006bf0(base5_2014, 0, 40);
+ Func_02006ba8(21, 3);
+ Func_02006c02(21, 0, 20);
+ Func_02006c14(20, 0x5000, 20);
+ Func_02006bdc(21, 2);
+ Func_020016a2(21);
+ Call3(Func_02006c3c, 20, 0x105, 0);
+ Call3(Func_02006c46, 19, 0x105, 80);
+ Func_02006bfe(21, 2);
+ Func_020016c4(21);
+ Call3(Func_02006c5e, 19, 0x101, 60);
+ Func_020016d4(0x2013);
+ Func_02006c04(21, 3);
+ Func_020016e2(21);
+ Func_02006c2a(19, 1);
+ Func_02006c3a(20, 1);
+ Func_02006b90(20);
+ Func_02006c28(21, 4);
+ Func_02006c82(21, 0, 20);
+ Call3(Func_02006ca4, 20, 0x105, 60);
+ Func_02006c96(base5_2014, 0, 20);
+ Func_0200173a(21, 0xb000);
+ Func_02001772(21);
+ Value2(Func_02001790, 6, 0x3000);
+ Func_02006ccc(6, 2);
+ Func_02006c22(20);
+ Func_020017a6(21, 0xd000);
+ Func_02006cc2(19, 4);
+ Func_020017a0(0x2013);
+ Func_02006d2a(6, 0, 0);
+ Func_02006cfa(21, 1);
+ Func_020017b8(21);
+ Func_02006ce8(20, 3);
+ Func_020017c6(base5_2014);
+ Func_02006cf6(21, 4);
+ Func_020017d4(21);
+ Call3(Func_02006d6e, 20, 0x101, 0);
+ Call3(Func_02006d78, 19, 0x101, 80);
+ Func_02006d72(19, 0x8000, 0);
+ Call3(Func_02006d7c, 20, 0x8000, 0);
+ Call2(Func_02006da4, 0x6666, 0xccc);
+ Call4(Func_02006dbe, 0x1260000, -1, 0xb40000, 1);
+ Call3(Func_02006d2a, 21, 0x106, 176);
+ base6_8015 = (s32)Data_00008015;
+ Func_02006dae(21, 0x8000, 40);
+ Func_02006db8(21, 0, 20);
+ Func_02006d80(21, 2);
+ Func_02001846(base6_8015);
+ Call3(Func_02006de2, 19, 0x100, 20);
+ Func_02001858(0x2013);
+ Func_02006da0(21, 2);
+ Func_02001866(base6_8015);
+ Call3(Func_02006e00, 20, 0x103, 40);
+ Call3(Func_02006df2, 0xa014, 0, 20);
+ Call3(Func_02006e14, 21, 0x105, 20);
+ Func_0200188a(base6_8015);
+ Call3(Func_02006e24, 19, 0x103, 20);
+ Call1(Func_0200189a, 0x2013);
+ Call3(Func_02006e34, 21, 0x101, 40);
+ base5_a014 = 0xa014;
+ Func_020018ac(base6_8015);
+ Func_02006ddc(20, 4);
+ Func_020018ba(base5_a014);
+ Func_02006dea(19, 3);
+ Func_020018c8(0x2013);
+ Call3(Func_02006e62, 21, 0x103, 60);
+ Func_02006e5c(21, 0x8000, 20);
+ Call3(Func_02006e5e, 0xa015, 0, 40);
+ Call3(Func_02006e80, 6, 0x105, 120);
+ Call3(Func_02006e8a, 20, 0x105, 60);
+ Func_02001900(base5_a014);
+ Func_02006e8a(21, 0, 40);
+ Func_02006e32(19, 3);
+ Func_02001918(0x2013);
+ Func_02006e68(21, 1);
+ Func_02006ea2(base6_8015, 0, 20);
+ Func_02001930(base5_a014);
+ Call3(Func_02006ecc, 21, 0x100, 40);
+ Func_02006e64(19, 4);
+ Func_0200194a(0x2013);
+ Call3(Func_02006ee4, 6, 0x105, 40);
+ Call3(Func_02006ef0, 20, 0x108, 40);
+ Func_02001966(base5_a014);
+ Call3(Func_02006f00, 19, 0x103, 20);
+ Func_02001976(0x2013);
+ Func_02006ec6(21, 1);
+ Func_02006e1c(20);
+ Func_02006ecc(20, 2);
+ Func_02001992(base5_a014);
+ Func_02006eba(19, 4);
+ Func_020019a0(0x2013);
+ *(s32 *)((*(u8 **)Data_03001ebc + 0x1c0)) = 0x202;
+ Func_02006fba();
+ Func_02006fc6();
+ Call4(Func_02006f6e, 0x1f80000, -0x180000, 0xa80000, 0);
+ Func_02006d34(1);
+ Func_02006db8();
+ Func_02006d3e(1);
+ base5_8001 = (s32)Data_00008001;
+ Func_02006fdc();
+ Func_02006ff0();
+ Func_02006e7e(20);
+ Func_02006f36(1, 1);
+ Func_020019f4(base5_8001);
+ Call3(Func_02006f8e, 3, 0x101, 40);
+ Func_02001a04(3);
+ Func_02006f34(2, 3);
+ Call3(Func_02006f8e, 0x1002, 0, 40);
+ Func_02006f58(1, 2, 20);
+ Func_02001a26(base5_8001);
+ Value2(Func_02006f96, base5_8001, 0);
+ Func_02006fb8(0, 0, 0);
+ Func_02006fc2(2, 0x4000, 0);
+ Call3(Func_02006fce, 3, 0x2000, 0);
+ if (Value2(Func_02006f06, 0, 0) == 1) {
+ bump_step(1);
+ }
+ Call1((void (*)())Func_02006f06, 20);
+ Func_02001a74(1);
+ Func_02006ffe(2, 0, 0);
+ Value3(Func_02007008, 3, 0x8000, 20);
+ Func_02006fb0(0, 3);
+ Func_02006fb8(1, 3);
+ Func_02006fc0(2, 3);
+ Func_02006fd0(3, 3);
+ base5_200dfc4 = (s32)Data_0200dfc4;
+ Func_02006f82(1, base5_200dfc4);
+ Value2(Func_02006f8a, 2, base5_200dfc4);
+ Func_02006faa(3, base5_200dfc4);
+ Func_02006f60(20);
+ Func_02006f74();
+}
diff --git a/games/gs1/recon/en/main/080a6b64.c b/games/gs1/src/psynergy_menu/draw_visible_action_page.c
similarity index 84%
rename from games/gs1/recon/en/main/080a6b64.c
rename to games/gs1/src/psynergy_menu/draw_visible_action_page.c
index ad065ea3e..163e4cee4 100644
--- a/games/gs1/recon/en/main/080a6b64.c
+++ b/games/gs1/src/psynergy_menu/draw_visible_action_page.c
@@ -17,7 +17,7 @@ s32 Func_080a6b64(s32 window, s32 unused, const struct MenuResult *state)
u32 first_entry;
u32 visible_count;
u8 row;
- s32 cursor;
+ s32 ofs;
struct BattleUnit *owner;
struct BattleAction *ability;
struct PsynergyMenuState *menu = Data_03001f2c;
@@ -45,27 +45,27 @@ s32 Func_080a6b64(s32 window, s32 unused, const struct MenuResult *state)
row = 0;
if (visible_count > row) {
- cursor = first_entry * 2;
+ ofs = (s32)(first_entry * 2) + 0x1c8;
do {
owner = Func_08077008(menu->owner_ids[0]);
- ability = Ability_GetData(0x3fff & *(const u16 *)((u8 *)menu->psynergies + cursor));
+ ability = Ability_GetData(0x3fff & *(u16 *)(ofs + (s32)menu));
if (ability->pp_cost > owner->pp) {
UiPalette_SetColor(2);
- } else if (Func_080a735c(0x3fff & *(const u16 *)((u8 *)menu->psynergies + cursor)) != 0) {
+ } else if (Func_080a735c(0x3fff & *(u16 *)(ofs + (s32)menu)) != 0) {
UiPalette_SetColor(4);
} else {
UiPalette_SetColor(15);
}
UiText_DrawAt(
- (0x3fff & *(const u16 *)((u8 *)menu->psynergies + cursor)) + (s32)&Value_00000333,
+ (0x3fff & *(u16 *)(ofs + (s32)menu)) + (s32)&Value_00000333,
window, 16, row * 16 + 8);
Func_080150a8(ability->pp_cost, 2, window, 104, row * 16 + 8);
UiPalette_SetColor(15);
row++;
- cursor += 2;
+ ofs += 2;
} while (visible_count > row);
}
diff --git a/games/gs1/src/save/state/load_selected_slot.c b/games/gs1/src/save/state/load_selected_slot.c
new file mode 100644
index 000000000..fd00d0dc0
--- /dev/null
+++ b/games/gs1/src/save/state/load_selected_slot.c
@@ -0,0 +1,86 @@
+#include "types.h"
+#include "runtime_interfaces.h"
+#include "global_cells.h"
+
+extern u8 Value_0000000a;
+extern u8 Value_0000000b;
+extern u8 Value_00000014;
+extern u8 Value_00000017;
+extern u8 Value_0000001a;
+extern char Data_02000000;
+extern s16 Data_02002004;
+
+s32 Func_080056cc(void);
+void Func_08005c68(void);
+s32 Func_08020244(s16, s32);
+void Func_0801776c(s32, s32);
+s32 UiWork_IsComplete(void);
+s32 WaitFrames(s32);
+s32 Func_08028df4(s32, s32, s32, s32);
+void UiWork_FinalizePendingCore(void);
+void Audio_PlayCue(s32);
+void Func_0801f818(void);
+void Func_0808a5b0(void);
+s32 Func_08005920(s32, void *);
+
+s32 Func_080207c4(void)
+{
+ s32 found;
+ s32 value;
+ s32 result = 0;
+
+ found = Func_080056cc();
+ if (found != 0) {
+ Func_0801776c((s32)&Value_0000000a, 1);
+ result = -9;
+ } else {
+ u8 *work;
+
+ Func_08005c68();
+ work = *(u8 **)ADDR_03001F1C;
+ value = Func_08020244(Data_02002004, 0);
+ if (value == -1) {
+ result = value;
+ } else {
+ s32 offset;
+
+ offset = (value << 6) + 0x105c;
+ if (work[offset] != 0) {
+ Func_0801776c((s32)&Value_00000014, 13);
+ while (UiWork_IsComplete() == 0) {
+ WaitFrames(1);
+ }
+ if (Func_08028df4(1, 0, 0, 1) != 0) {
+ UiWork_FinalizePendingCore();
+ goto skip;
+ }
+ UiWork_FinalizePendingCore();
+ }
+ Data_02002004 = value;
+ Audio_PlayCue(85);
+ Func_0801776c((s32)&Value_0000001a, 13);
+ while (UiWork_IsComplete() == 0) {
+ WaitFrames(1);
+ }
+ Func_0801f818();
+ Func_0808a5b0();
+ {
+ void *base = &Data_02000000;
+
+ found = Func_08005920(value, base);
+ base = (char *)base + 0x1000;
+ found |= Func_08005920(value + 3, base);
+ }
+ UiWork_FinalizePendingCore();
+ if (found != 0) {
+ Func_0801776c((s32)&Value_0000000b, 1);
+ result = -3;
+ } else {
+ Func_0801776c((s32)&Value_00000017, 9);
+ }
+ }
+ }
+skip:
+ Func_08005cf8();
+ return result;
+}
diff --git a/games/gs1/recon/en/main/080b3444.c b/games/gs1/src/shop/select_party_member_item.c
similarity index 95%
rename from games/gs1/recon/en/main/080b3444.c
rename to games/gs1/src/shop/select_party_member_item.c
index eb8830f72..ed2f200f7 100644
--- a/games/gs1/recon/en/main/080b3444.c
+++ b/games/gs1/src/shop/select_party_member_item.c
@@ -22,10 +22,8 @@ s32 Func_080b362c(s32 unit_id);
s32 Func_08077248(s32 unit_id);
void Audio_PlayCue(s32 cue);
-#define Shop_SelectPartyMemberItem Func_080b3444
-
/* Select a party member and then an item owned by that member. */
-s32 Shop_SelectPartyMemberItem(s32 *selected_unit, s32 *selected_item)
+s32 Func_080b3444(s32 *selected_unit, s32 *selected_item)
{
struct ShopRuntime *shop;
struct ShopCursorAnchor *cursor_anchor;
@@ -46,8 +44,8 @@ s32 Shop_SelectPartyMemberItem(s32 *selected_unit, s32 *selected_item)
list_window,
0,
result);
- cursor_anchor->unknown_00[4] = result;
cursor_anchor->kind = 4;
+ cursor_anchor->unknown_00[4] = result;
Func_080b0a20(&shop->cursor, -32, 112);
shop->cursor.anchor = cursor_anchor;
shop->mode = 12;
@@ -84,7 +82,7 @@ s32 Shop_SelectPartyMemberItem(s32 *selected_unit, s32 *selected_item)
*selected_unit = unit_id;
*selected_item = item_slot;
result = 0;
- break;
+ goto done;
}
if ((INPUT_NEW_KEYS & 2) != 0) {
@@ -92,7 +90,7 @@ s32 Shop_SelectPartyMemberItem(s32 *selected_unit, s32 *selected_item)
*selected_unit = -1;
*selected_item = -1;
result = -1;
- break;
+ goto done;
}
if ((INPUT_REPEAT_KEYS & 0x20) != 0) {
@@ -107,6 +105,7 @@ s32 Shop_SelectPartyMemberItem(s32 *selected_unit, s32 *selected_item)
}
}
+done:
Func_080a1030();
UiWindow_Close(list_window, 2);
UiWindow_Close(shop->item_window, 2);