I am new to inline assembly. I have tried understanding different opcodes, and understood quite a bit, but still not be able to correlate them in context to STATICCALL opcode. Kindly help me understand what's happening here in this piece of code
function getUint(address addr, bytes memory data) internal view returns (uint result) {
result = 0;
assembly {
let status := staticcall(16000, addr, add(data, 32), mload(data), 0, 0)
// Success!
if eq(status, 1) {
if eq(returndatasize(), 32) {
returndatacopy(0, 0, 32)
result := mload(0)
}
}
}
}
As far as I have understood from solidity assembly documentation,
STATICCALL: identical to call(g, a, 0, in, insize, out, outsize) but does not have v value and do not allow state modifications
How do the parameters in the above code represent in, insize, out and outsize?