#include
// return value pair for unsigned integer division
typedef struct divuRet{
uint32_t quotient;
uint32_t remainder;
} divuRet;
// return value pair for signed integer division
typedef struct divRet{
int32_t quotient;
int32_t remainder;
} divRet;
// emulates unsigned integer division, returns divuRet — does not check for divide-by-zero
divuRet emulatedDivu(uint32_t dividend, uint32_t divisor);
// emulates signed integer division, returns divRet — does not check for divide-by-zero, remainder and dividend signs must be equal
divRet emulatedDiv(int32_t dividend, int32_t divisor);