This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.
pubfn__divdi3(a: i64, b: i64) callconv(.c) i64 {
// Set aside the sign of the quotient.constsign: u64 = @bitCast((a ^ b) >> 63);
// Take absolute value of a and b via abs(x) = (x^(x >> 63)) - (x >> 63).constabs_a = (a ^ (a >> 63)) -% (a >> 63);
constabs_b = (b ^ (b >> 63)) -% (b >> 63);
// Unsigned divisionconstres = __udivmoddi4(@bitCast(abs_a), @bitCast(abs_b), null);
// Apply sign of quotient to result and return.return@bitCast((res ^ sign) -% sign);
}