This is a controlled code-generation measurement, not a repository task. Do not call tools, read files, search, execute commands, delegate, or modify anything. Return only JSON matching the supplied schema. Generate source for the three functions below, without a main function, HTTP code, tests, comments, or markdown. Helpers are allowed. No external dependencies.
quote(unit_price, quantity): multiply signed 64-bit integers with checked overflow.
can_order(stock, quantity): stock >= 0 AND quantity > 0 AND quantity <= stock.
remaining(stock, quantity): subtract quantity from stock with checked signed 64-bit overflow.
Negative results are permitted. Do not add business validation beyond can_order. Inputs already fit signed int64. The functions must be named exactly as above. No input or output parsing.
Language: JavaScript ES modules (Node 26). Export the three functions. Input integers are BigInt. Return BigInt or boolean. Throw RangeError for results outside signed int64; JavaScript BigInt otherwise does not overflow. Use BigInt literals for integer bounds.