user: What is the c source code of the assembly code below:

```asm
<solve>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    %rsi,%r14
  lea    0x0(,%rdi,4),%r13d
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %r13d,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  test   %r12,%r12
  sete   %al
  test   %rbp,%rbp
  sete   %dl
  or     %dl,%al
  jne    L21
  test   %r13,%r13
  je     L21
  mov    %r13,%r9
  mov    %rbp,%r8
  mov    %r12,%rcx
  mov    %r14,%rdx
  mov    $0x0,%esi
  mov    %ebx,%edi
  call   <dijkstra_shortest@plt>
  test   %ebx,%ebx
  jle    L145
  mov    %rbp,%rax
  mov    %ebx,%ecx
  shl    $0x2,%rcx
  lea    (%rcx,%rbp,1),%rdx
L113:
  mov    (%rax),%ebx
  test   %ebx,%ebx
  je     L37
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L113
  mov    $0x1,%ebx
L37:
  mov    %r12,%rax
  add    %r12,%rcx
  mov    $0x0,%r14d
L39:
  mov    (%rax),%edx
  cmp    %edx,%r14d
  cmovl  %edx,%r14d
  add    $0x4,%rax
  cmp    %rcx,%rax
  jne    L39
  mov    %r12,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  test   %ebx,%ebx
  jne    L98
  lea    D14(%rip),%rdi
  call   <puts@plt>
  jmp    L138
L21:
  lea    D10(%rip),%rdi
  call   <puts@plt>
  test   %r12,%r12
  jne    L46
L123:
  test   %rbp,%rbp
  jne    L76
L91:
  mov    $0x0,%ebx
  test   %r13,%r13
  jne    L64
L138:
  mov    %ebx,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L46:
  mov    %r12,%rdi
  call   <free@plt>
  jmp    L123
L76:
  mov    %rbp,%rdi
  call   <free@plt>
  jmp    L91
L64:
  mov    %r13,%rdi
  call   <free@plt>
  jmp    L138
L145:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  mov    $0x0,%r14d
L98:
  mov    %r14d,%esi
  lea    D19(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%ebx
  jmp    L138
```

tool_calls: name: retrieve_data
arguments: data_tag: D14
type_infered: string
name: retrieve_data
arguments: data_tag: D10
type_infered: string
name: retrieve_data
arguments: data_tag: D19
type_infered: string

tool: D14: input matrix wrong, not all cities could be reached!

tool: D10: not enough memory

tool: D19: minimal time: %d


assistant: ```c
int solve(int n, int *adjMtx) {
  int i;
  int all = 1;
  int max = 0;
  int *dist = (int *)malloc(n * sizeof(int));
  int *setv = (int *)malloc(n * sizeof(int));
  int *path = (int *)malloc(n * sizeof(int));
  if (dist == NULL || setv == NULL || path == NULL) {
    printf("not enough memory\n");
    if (dist)
      free(dist);
    if (setv)
      free(setv);
    if (path)
      free(path);
    return 0;
  }
  dijkstra_shortest(n, 0, adjMtx, dist, setv, path);
  for (i = 0; i < n; ++i) {
    if (setv[i] == 0) {
      all = 0;
      break;
    }
  }
  for (i = 0; i < n; ++i) {
    if (max < dist[i])
      max = dist[i];
  }
  free(dist);
  free(setv);
  free(path);
  if (all == 0) {
    printf("input matrix wrong, not all cities could be reached!\n");
    return 0;
  } else {
    printf("minimal time: %d\n", max);
    return 1;
  }
}
```