/* Imports */
#include "../LibGOO.huff"

/* Interface */
#define function computeGooBalance(uint256,uint256,uint256) nonpayable returns (uint256)


/* Methods */
#define macro COMPUTE_GOO_BALANCE_WRAPPER() = takes (0) returns (0) {
    0x04 calldataload           // [emissionMultiple]
    0x24 calldataload           // [lastBalanceWad,emissionMultiple]  
    0x44 calldataload           // [timeElapsedWad,lastBalanceWad,emissionMultiple]  

    COMPUTE_GOO_BALANCE()
    
    0x00 mstore                 // [lastBalanceWad,emissionMultiple] 
    0x20 0x00 return            // []
}



/* Function Dispatcher */
#define macro MAIN() = takes (0) returns (0) {
    // Identify which function is being called.
    0x00 calldataload 
    
    // Extract the function signature
    0xe0 shr

    // Jump table
    dup1 __FUNC_SIG(computeGooBalance) eq  compute_goo_balance jumpi
 

    compute_goo_balance:
    COMPUTE_GOO_BALANCE_WRAPPER()
}
