Hi there, and welcome to F1GP research :)
Well, it looks like you already found what you need. Basically, the game does what you already showed in the screenshot: once track data has been read from the track file, the difference between start and end of the track (which does not fit together exactly) is calculated and the position of all track segments is adjusted a little bit to make it fit.
You can see the process in the ChequeredFlag editor where all calculations are in Java, not assembler. It's quite some time since I wrote it, so I don't remember the details. Anyway, the result is exactly the same as in the game.
If you wonder about calculations for the CC line, these are even more complicated and still not fully understood. Again, ChequeredFlag has a calculation that works, which is a transcription of the assembler code. Many variables are still named like in the disassembler sources as we just don't know their meaning.
Hope that helps, and good luck.