enclave {
    from "sgx_tstdc.edl" import *;
    from "sgx_stdio.edl" import *;
    from "sgx_backtrace.edl" import *;

    trusted {
        public void tvm_ecall_init([isptr, user_check] TVMRetValueHandle ret);
        public void tvm_ecall_packed_func(int func_id,
                                          [in, count=num_args] const TVMValue* arg_values,
                                          [in, count=num_args] const int* type_codes,
                                          int num_args,
                                          [out] TVMValue* ret_val,
                                          [out] int* ret_type_code);
    };

    untrusted {
        void tvm_ocall_packed_func([in, string] const char* name,
                                   [in, count=num_args] const TVMValue* arg_values,
                                   [in, count=num_args] const int* type_codes,
                                   int num_args,
                                   [out] TVMValue* ret_val,
                                   [out] int* ret_type_code);
        void tvm_ocall_register_export([in, string] const char* name, int func_id);
    };
};

