The Foreign Function & Memory API in Java provides significantly easier access to functions in C libraries than the outdated ...
The compiler analyzed it, optimized it, and emitted precisely the machine instructions you expected. Same input, same output.