# gate 225 (run link100, lane ARM9T): the arm9 .data TABLES the port hosted
# nowhere.
#
# Seated by hal/arm9_tables_link100.cpp (five tables read out of
# config/arm9/relocs.txt and cross-read against extracted/arm9_dec.bin at base
# 0x02004000) and, for the last line, by hal/scene_boot.cpp's
# l2_fill_0208ea6c slot +0x04. Every body here is compiled by this file's
# addition and would be dropped by /OPT:REF without the table word that
# references it; the WORD is the work, the slice line only makes the body
# available to be referenced.
#
# THE TABLES AND WHAT EACH LINE BUYS -- the full derivation, including every
# ROM word and how each table was sized, is in the header of
# hal/arm9_tables_link100.cpp.
#
#   data_02099fe4  the arm9 IRQ vector table, 22 slots, 9 distinct bodies.
#                  The eight forwarders tail into 0x02056cc0, so
#                  _ZN3IRQ13DmaTimHandlerEj rides in behind them (tenth line).
#   data_02094390  dScMB_c's 4-slot graph descriptor, 3 bodies; _ZN7dScMB_c15graphCallback_c14GraphCallback3Ev
#                  names func_02034d34, so that one rides in behind it.
#   data_02092188  the Stage's graph callback table, 4 words (delta to
#                  _ZTSN10dScStage_c15graphCallback_cE is 0x10). ONE body: slot 1. Slots 0 and 3 are
#                  already linked, and slot 2, Stage::GraphCallback2, TRAPPED on
#                  port/slice_w8a.txt's ruling -- the old src took the address
#                  of reg_G2S_DB_BG3PA and MSVC cannot put a global at
#                  0x04001030; closure.py named _reg_G2S_DB_BG3PA as its one
#                  unresolved external. Run linkfull lane SEATS3 armed it: the
#                  synced src passes REG_DB_BG3PA, a literal pointer, and the
#                  table is registered with the frame beat, which runs slot 2
#                  (the minimap affine) on every level.
#   data_0209a424  a callback pair, 2 words (delta to data_0209a42c is 0x8).
#                  Two leaf predicates with no callees at all.
#   _ZTVSt9type_info  a two-slot vtable hosted 4 words wide (the symbol span; the
#                  last two words are the NEXT table's Itanium header). ONE
#                  body: slot 0. Slot 1 is _ZNSt9type_infoD0Ev, an .exceptix census
#                  row and not this lane's, so it traps.
#   data_0208eacc  slots +0x00 and +0x04 only (gate 225b), the FaderBrightness
#   data_0208eafc  destructor pair on each of the three sibling tables
#   data_0208eb2c  hal/scene_boot.cpp trap-fills. Five of the six bodies are
#                  new to the link; _ZN10FaderColorD1Ev was already in it on
#                  slice_intro.txt. WHY ONLY TWO SLOTS: every reader of
#                  data_0209f5bc / data_0209d4ac in the image was enumerated
#                  and no dispatch site anywhere reaches slot 0 or slot 1, so
#                  the garbage-receiver hazard that made run link100 lane
#                  TAIL2 back gate 219's full fill out is not reachable here.
#                  The audit is at THE THREE SIBLING TABLES in scene_boot.cpp.
#                  data_0208eacc slot 2 (AdvanceFade) is a row this lane leaves
#                  on the table on purpose: its one dispatch site IS cdecl and
#                  seating it is a live MASTER_BRIGHT write, i.e. a rendering
#                  change rather than a linkage one.
#   data_0208ea6c  slot +0x04 only, the deleting destructor. That slot's own
#                  comment in hal/scene_boot.cpp already says why it was left:
#                  "The reason is a slice line, not a missing body ... it is on
#                  NO slice ... Putting it on one is a port/slice_*.txt edit,
#                  which is outside this change's one-file scope." This is that
#                  slice line.
#
# NOT HERE, each for a measured reason:
#
#   src/func_02030b58.c        data_020927ec's four slots. THE TABLE IS REAL
#   src/func_02030c38.c        and its words were read; what stopped it is the
#   src/func_02030ca0.c        closure. Resolved symbol by symbol against this
#   src/func_02030dac.c        build's own walk_window.map, the four bodies
#                              require 40 unlinked TUs and 17 arm9 data symbols
#                              the port hosts nowhere -- the wireless/WM stack,
#                              through func_0203d950 and func_02030790 -- and
#                              one of the 40 is src/_ZN3IRQ13SetIRQHandlerEjPFvvE.cpp,
#                              which is an LNK2005 against ntr/runtime.cpp's
#                              host copy of that symbol on sight. That is a
#                              lane, not a line, and it is a bigger one than
#                              its four census rows suggest.
#   src/func_020432e4.c        data_02099f50 and data_02099f68, one word each.
#   src/func_0204322c.c        BOTH ALREADY HAVE A HOST COPY: closure.py named
#                              them as FOREIGN-object LNK2005 candidates against
#                              func_0204322c_hostcopy.cpp.obj before any link
#                              ran. The tables stay unhosted; a seat would buy
#                              nothing and break the build.
#   (src/_ZN5Stage14GraphCallback2Ev.cpp was listed here, data_02092188 slot 2,
#    until run linkfull lane SEATS3 armed it below GraphCallback1: main now
#    spells its register as the literal pointer REG_DB_BG3PA, so the reason
#    above no longer holds.)
#   src/__sinit_02074fb8.c     it WRITES data_020a0c68 before main. Slicing it
#                              would buy one TU and change what the port does
#                              at startup; data_02094390 is seated without it.
#   src/func_02030e4c.c        data_020927ec's only reader, and a member of run
#                              link100's Entry/boot-chain census, not this lane.
#   src/func_ov000_020aa420.c  the ov000 root that names func_020189f0 /
#                              func_02018a40 / func_02018a58. Its own two ROM
#                              referrers are FS_LoadOverlay+0x8c and
#                              func_0201a2f8+0x6c, and BOTH are unlinked --
#                              func_0201a2f8's own referrers are _ZN9BootScene13InitResourcesEv
#                              and _ZN7dScMB_c13InitResourcesEv, the two scene-boot roots
#                              port/arm9_frontier.txt ranks first and second.
#                              There is no cheap edge; the census marks it
#                              `unreferenced` and that is correct.
#   src/_ZN10dFdDummy_c14SetForwardTimeEj.cpp      data_0208ea6c slots +0x10, +0x0c and +0x08. All
#   src/_ZN10dFdDummy_c15SetBackwardTimeEj.cpp      three carry the "recovered from vtable slot
#   src/_ZN10dFdDummy_c11AdvanceFadeEv.cpp        identity" marker, so they are GUESSES, and
#                              hal/scene_boot.cpp already routes those three
#                              slots past them (two transcriptions and a
#                              forward). port/tools/inferred_stub_guard.py is
#                              there to refuse exactly this and this gate does
#                              not argue with it.
src/_ZN3IRQ12EmptyHandlerEv.cpp
src/_ZN3IRQ19Tim0OverflowHandlerEv.cpp
src/_ZN3IRQ19Tim1OverflowHandlerEv.cpp
src/_ZN3IRQ19Tim2OverflowHandlerEv.cpp
src/_ZN3IRQ19Tim3OverflowHandlerEv.cpp
src/_ZN3IRQ11Dma0HandlerEv.cpp
src/_ZN3IRQ11Dma1HandlerEv.cpp
src/_ZN3IRQ11Dma2HandlerEv.cpp
src/_ZN3IRQ11Dma3HandlerEv.cpp
src/_ZN3IRQ13DmaTimHandlerEj.cpp
src/_ZN7dScMB_c15graphCallback_c14GraphCallback0Ev.cpp
src/_ZN7dScMB_c15graphCallback_c14GraphCallback2Ev.cpp
src/_ZN7dScMB_c15graphCallback_c14GraphCallback3Ev.cpp
src/func_02034d34.cpp
# RETIRED at SLICE1: body now in src/_ZN10dFdDummy_cD1Ev.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/_ZN10dFdDummy_cD0Ev.cpp
src/engine/fader/_ZN15FaderBrightnessD1Ev.cpp
# RETIRED at SLICE1: body now in src/engine/fader/_ZN15FaderBrightnessD1Ev.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/engine/fader/_ZN15FaderBrightnessD0Ev.cpp
src/engine/fader/_ZN5FaderD1Ev.cpp
# RETIRED at SLICE1: body now in src/engine/fader/_ZN5FaderD1Ev.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/engine/fader/_ZN5FaderD0Ev.cpp
# RETIRED at SLICE1: body now in src/engine/fader/_ZN10FaderColorD1Ev.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/engine/fader/_ZN10FaderColorD0Ev.cpp
src/_ZN5Stage14GraphCallback1Ev.cpp
src/_ZN5Stage14GraphCallback2Ev.cpp
src/func_0206e254.c
src/func_0206e240.c
src/_ZNSt9type_infoD1Ev.cpp
# A LINK FIX, NOT A ROW. src/_ZN7dScMB_c15graphCallback_c14GraphCallback3Ev.cpp (data_02094390 slot 3) calls
# OAM::Flush as well as OAM::Reset. src/_ZN3OAM5FlushEv.cpp is already on
# slice_gate6.txt and slice_gate214.txt, which reach walk_window and
# walk_window_hires but NOT smoke_player -- so the first link of this gate gave
# walk_window and walk_window_hires clean and smoke_player one LNK2019,
# `unresolved external symbol __ZN3OAM5FlushEv referenced in function
# _func_02034b40`. The line below puts the ROM's own body on the third target
# too; CMake dedupes the identical absolute path on the two that already had
# it, so nothing is compiled twice and the linked count does not move (this TU
# was already counted through walk_window).
src/_ZN3OAM5FlushEv.cpp
