Load Tensorflow Graph from file then convert to pb or TFLite

I have a tensorflow model file model.dat. It was trained by others so I know nothing about the model itself (model format and tensorflow version etc.) I only have the inference code and it can work fine.

Now I need to convert this model to TFlite for usage on Android. But I can’t find a way to do it.

Here’s part of inference code.

TF_Buffer *buffer;
buffer = ReadBufferFromFile("model.dat");
TF_Graph *graph = TF_NewGraph();
TF_Status *status = TF_NewStatus();
TF_ImportGraphDefOptions *opts = TF_NewImportGraphDefOptions();
TF_GraphImportGraphDef(graph, buffer, opts, status);

So I have TF_Graph loaded. But I cannot find the export function. How can I save the graph as, for example a pb file, So that I can convert to TFLite from it ?