UML diagrams are coding language-agnostic, so it doesn't matter if you want to model C, Java, or Python with it.
Taking a look at the code you provided and the questions you asked, you it seems to me that you are new to UML and struggling with the granularity of the model.
It therefore is a good exercise to start by first modeling with lowest granularity level.
Find the functions that don't use other functions within them and model them as activity diagrams (one diagram per function), where each activity in the diagram is a statement within your code.
Then find functions that use the functions that you already have modeled an do the same, but now the call of an function (for instance your line: var = func5( ¶m1); ) is also a single statement an therefore a single activity in your diagram.
Finally when you have modeled the main function of you code you have reached the highest granularity level.
Hope this will help you.