(module
  (import "metering" "gasAmount" (global $gas i64))
  (func $useGas (param $amount i64)
    get_global $gas
    get_local $amount
    i64.sub
    set_global $gas
    (if (i64.lt_s (get_global $gas) (i64.const 0))
      (then
        ;; out of gas
        (unreachable)  
        )
      )
    )
)
