mirror of
https://github.com/HarbourMasters/Starship
synced 2026-08-03 17:19:09 -04:00
decompile lldiv
This commit is contained in:
@@ -1,7 +1,18 @@
|
||||
#include "global.h"
|
||||
#include "libc/stdlib.h"
|
||||
|
||||
#pragma GLOBAL_ASM("asm/us/nonmatchings/libultra/libc/ldiv/lldiv.s")
|
||||
lldiv_t lldiv(long long numer, long long denom) {
|
||||
lldiv_t val;
|
||||
|
||||
val.quot = numer / denom;
|
||||
val.rem = numer - denom * val.quot;
|
||||
if ((val.quot < 0) && (val.rem > 0)) {
|
||||
val.quot++;
|
||||
val.rem -= denom;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
ldiv_t ldiv(long numer, long denom) {
|
||||
ldiv_t val;
|
||||
|
||||
Reference in New Issue
Block a user