# run rel0215 wave 2, lane cast-sweep2: OV034'S OWN CAST (level 26, Tiny-Huge
# Island's CAVE, data/stage/tibi_deka_in). Overlay 2 of 4 in this lane.
#
# The three-way source inventory (run rel0215 lane prop18 closed the hole):
#     delinked complete to a src/ TU   35
#     present but NONMATCHING-bannered  1   _ZN7Wiggler8BehaviorEv
#     MISSING                           0
#                                      --
#                                      36  == config/arm9/overlays/ov034/
#                                             symbols.txt's kind:function count
#
# THIRTY-TWO of the thirty-six are listed below.
#
# THE LAST MISSING BODY LANDED, AND IT IS A DECLARED DRAFT.
# _ZN7Wiggler8BehaviorEv (0x02112b5c, 0x6e0 bytes, vtable slot 6) had NO delink
# block in config/arm9/overlays/ov034/delinks.txt and no src file anywhere in
# the tree -- the only such symbol in the overlay. Main matched it at 36e8cbcce
# (PR #2008) and lane prop18 propagated src/_ZN7Wiggler8BehaviorEv.cpp here
# VERBATIM, by address, blob 70a58eb36714d32803108c480fc7a9c9737a288d.
#
# READ THE BANNER BEFORE READING THE SLICE ROW. It is a DECLARED NONMATCHING
# DRAFT at div 20 of 440 words and it is NOT enrolled in delinks.txt, so it
# does not count as decompiled. What makes it admissible as the port's running
# code is the SHAPE of the residue rather than its size: all twenty words are
# register/scheduling routing, sixteen of them pure instruction reorder (our
# word is in the cartridge a few words away with the registers already right)
# and four the setup block's 0x1000 materialisation plus one address
# association. Zero opcode, immediate or condition differences. Re-measured in
# this tree at mwccarm 2004/b56 with strict relocs against
# extracted/overlays/overlay_0034.bin at base 0x021111a0: size 0x6e0 exact,
# 20 MISMATCH words, the same twenty main reports.
#
# THE FACE IS RETIRED. `ov34_missing_behavior` and its unread
# `port_ov034_missing_behavior_hits()` accessor are deleted from
# hal/actor_classes_ov034.cpp, the ov074 state-0 precedent prop17 set: a face
# is a tenant, not a fixture. WHAT THE PORT GETS BACK: the Wiggler no longer
# holds state DEMOWAIT forever. Behavior is the only caller of the state
# machine's tick half, so seating it is what makes the tick half reachable at
# all.
#
# THE SEAT NEEDED NO THUNK, AND THAT WAS VERIFIED FROM THE RELOCATIONS. The
# ONLY reference to 0x02112b5c in ov034's relocs.txt is
# `from:0x021144d4 kind:load`, which is _ZTV7Wiggler (0x021144bc) + 0x18 =
# slot 6. No arm_call, no pointer-to-member record, no data-table word. So the
# body is reached exclusively through the vtable, the existing
# __fastcall(self, dummy) wrapper carries MSVC's thiscall across, and the
# ov075 member-pointer recipe does not apply here.
#
# SIX NAMES ARE BRIDGED BY ADDRESS, not edited at the source: the decomp line
# has taken a C++ rename this branch has not, so the body spells dCc_c /
# dBgCh_Actr where this branch spells CylinderClsn / WithMeshClsn. The full
# address table, the convention check and the /alternatename directives are in
# hal/actor_classes_ov034.cpp.
#
# FOUR MORE TUs are HELD OUT, three host-copied because MSVC cannot deliver
# their dispatch and one because it cannot deliver its receiver:
#
#   src/func_ov034_021125b8.cpp   -> port/unmatched/Wiggler_StateEnter.cpp
#   src/func_ov034_02112604.cpp   -> port/unmatched/Wiggler_StateTick.cpp
#   src/_ZN7Wiggler6RenderEv.cpp  -> port/unmatched/Wiggler_Render.cpp
#   src/d_a_hanachan.c           -> port_factory_wiggler in
#                                    hal/actor_classes_ov034.cpp
#
# THE FACTORY IS THE CHIEFCHILLY r0 RIDE-THROUGH, the shape port/slice_w12.txt
# already holds src/d_a_king_donketu.cpp out for. daHanachan_c_classInit calls
# `func_020aed98();` with NO ARGUMENT because in the ROM the object operator new
# just returned is still in r0 when Enemy::C2 is entered (0x021136b0 bl
# ActorBase::operator new / 0x021136b4 movs r4,r0 / 0x021136bc bl 0x020aed98).
# mwcc reproduced that, so the TU is byte-faithful and unusable under cdecl --
# and the name it spells is an ARM9-STYLE spelling of an OV002 symbol
# (relocs.txt: module:overlays(2,7), and ov002's 0x020aed98 is _ZN12dEnemyBase_cC2Ev)
# that exists nowhere in the link, so the first build failed at LNK2019 rather
# than silently. port_factory_wiggler is the ROM's own sequence with the
# receiver spelled, every offset, count and stride read from the disassembly.
#
# The first two are the mwcc pointer-to-member state machine: both form a PMF
# type on an INCOMPLETE class, where MSVC's representation is the "unknown
# inheritance" form and not the ROM's 8-byte {function, delta} pair. ELEVEN
# entries of twenty bytes at data_ov034_02114538, indexed by the state at
# +0x8c4 -- the Ukiki/BabyPenguin shape with an INDEX instead of a cell pointer.
# The third is the ModelAnim slot-5 collision, and here it is five of them: the
# Wiggler array-constructs FIVE ModelAnims at +0x110 (stride 0x64), and Render
# walks all five through a local six-virtual shadow whose g5 is the ROM's slot
# 5. The host _ZTV9ModelAnim is MSVC-ordered, so ROM slot 5 lands on Virtual18
# (the Koopa / Whomp / MontyMole case, port/unmatched/Koopa_Render.cpp).
# All three matched TUs STAY in src/ as the byte proof.
#
# Nothing is refused in the unmodellable sense: no asm-void block, no scheduler,
# no card loader, no wireless wrapper, and no //cpp real-destructor of the ov024
# PyramidTag shape -- both destructors are plain .c files with C names and both
# ride from src.
#
# NO IDENTITY SHIFT AND NO RESOLVER PLACEHOLDER. dsd named this class correctly
# (_ZTV7Wiggler 0x021144bc, RTTI "12daHanachan_c" -- Hanachan is the ROM's word
# for the Wiggler), the vtable width dsd infers is the right 31, and no ov034 TU
# spells VT0/VT1/VT2 or G0/G1. It is the cleanest overlay in this lane.
#
# TWO PER-SOURCE -D RENAMES travel with this slice (port/CMakeLists.txt), and
# they are the same rename twice:
#
#   func_ov034_02111588.cpp   state 9 DAMAGE_WAIT's tick
#   func_ov034_021119ac.c     state 6 DAMAGETALK's tick
#                             Both CALL a function they spell
#                             data_ov052_021125b8 -- an OV052 name, and a
#                             DATA-kind one, for this overlay's own state
#                             setter. The ROM's own arm_calls at 0x021115b0,
#                             0x021119ec and 0x02111a00 resolve to 0x021125b8
#                             module:overlay(34). ov052 IS mounted, so the name
#                             resolves and both bodies would call into ov052's
#                             data.
#
# THE SLICED TU THAT DID NOT REACH THE MAP NOW DOES (lane prop18).
# src/func_ov034_02112874.c has exactly ONE caller in the whole ROM: the
# arm_call at 0x02112eac, which is INSIDE _ZN7Wiggler8BehaviorEv. While
# Behavior was faced nothing referenced it and /OPT:REF stripped it, so linkage
# counted 30 of 35 rather than 31 -- measured, not predicted: it is absent from
# the baseline walk_window.map at cons tip 75c3a5354. With the body seated it
# is back, which is the second half of this lane's +2 linkage delta.
# WHAT IT IS: the caterpillar. It drags the four trailing segments after the
# head, sets each one's yaw from the segment ahead, writes their positions into
# both MovingCylinderClsnWithPos arrays (+0x478 and +0x5b8, stride 0x40) and
# ground-raycasts each one so it sits on the floor.
# A THIRD SYMBOL CAME BACK WITH THEM AND IS NOT COUNTED HERE:
# func_ov034_02112604, the state machine's TICK dispatcher, whose only caller is
# also Behavior. /OPT:REF is transitive, so it was stripped too -- which is the
# link-level statement of what the face cost. It is a HOST COPY
# (port/unmatched/Wiggler_StateTick.cpp), so it changes the map and not the
# linkage number. The ov030 lane's Ukiki_StateTick note describes the same
# shape from the other direction.
#
# THE MEASURED CLOSURE GAP: none. The first link added no arm9 TU -- Actor,
# ActorBase, Enemy, Model, ModelAnim, ShadowModel, MaterialChanger,
# TextureSequence, MovingCylinderClsnWithPos, WithMeshClsn, CylinderClsn,
# Animation, SharedFilePtr, Event, Memory and the array construct/destroy
# helpers are all already in the walk_window link for other classes. Measured
# off the link, not guessed.

# ---- the class: factory, destructors, and the five own slots --------------
src/_ZN7WigglerD1Ev.cpp
# RETIRED at SLICE1: body now in src/_ZN7WigglerD1Ev.cpp. MSVC folds the ROM destructor variants into one symbol, so only one of a class two per-function destructor TUs can be compiled.
#src/_ZN7WigglerD0Ev.cpp
src/_ZN7Wiggler13InitResourcesEv.cpp
src/_ZN7Wiggler16CleanupResourcesEv.cpp
# slot 6, propagated from main 36e8cbcce by lane prop18. A DECLARED NONMATCHING
# DRAFT (div 20 of 440, all of it register/scheduling routing) -- read the
# banner block at the top of this file before quoting this row as a match.
src/_ZN7Wiggler8BehaviorEv.cpp

# ---- the eleven states, twenty-two handlers, in table order ---------------
# 0 DEMOWAIT
src/func_ov034_02112484.cpp
src/func_ov034_02112348.c
# 1 DEMOCALL
src/func_ov034_02112330.cpp
src/func_ov034_02112284.c
# 2 MOVE_STOP
src/func_ov034_02112270.c
src/func_ov034_021120ac.cpp
# 3 MOVE_START
src/func_ov034_02112020.c
src/func_ov034_02111e68.c
# 4 MOVE
src/func_ov034_02111e4c.c
src/func_ov034_02111c48.c
# 5 DAMAGE
src/func_ov034_02111bb0.c
src/func_ov034_02111a64.c
# 6 DAMAGETALK
src/func_ov034_02111a0c.cpp
src/func_ov034_021119ac.c
# 7 DEAD
src/func_ov034_02111974.c
src/func_ov034_02111788.cpp
# 8 DAMAGE_STOP
src/func_ov034_02111720.c
src/func_ov034_021115cc.cpp
# 9 DAMAGE_WAIT
src/func_ov034_021115c0.c
src/func_ov034_02111588.cpp
# 10 DAMAGE_START
src/func_ov034_02111520.c
src/func_ov034_021113d4.c

# ---- the three helpers the states and Behavior share ----------------------
src/func_ov034_02112650.c
src/func_ov034_02112688.c
src/func_ov034_02112874.c
src/func_ov034_021129ec.c

# ---- the static initialiser ----------------------------------------------
src/__sinit_ov034_021138ec.c
