user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    -0x50(%rbp),%rsi
  push   %r13
  push   %r12
  lea    D19(%rip),%r12
  push   %rbx
  mov    %r12,%rdi
  sub    $0x68,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x50(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x50(%rbp)
  test   %eax,%eax
  je     L88
  lea    -0x4c(%rbp),%rax
  lea    D1(%rip),%r13
  mov    %rax,-0x68(%rbp)
  lea    -0x44(%rbp),%rax
  lea    -0x3c(%rbp),%r14
  mov    %rax,-0x78(%rbp)
  lea    -0x48(%rbp),%rax
  mov    %rax,-0x70(%rbp)
  lea    -0x40(%rbp),%rax
  mov    %rax,-0x58(%rbp)
  nopl   0x0(%rax,%rax,1)
L92:
  mov    -0x68(%rbp),%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  mov    %rsp,-0x60(%rbp)
  xor    %r15d,%r15d
  call   <scanf@plt>
  mov    -0x78(%rbp),%rdx
  mov    -0x70(%rbp),%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x4c(%rbp),%eax
  lea    0x1(,%rax,8),%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  mov    -0x4c(%rbp),%eax
  test   %eax,%eax
  jle    L12
  nopl   0x0(%rax,%rax,1)
L178:
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    $0xffffffff,%esi
  mov    %rax,(%rbx,%r15,8)
  mov    %rax,%rdi
  mov    -0x4c(%rbp),%eax
  add    $0x1,%r15
  lea    0x0(,%rax,4),%edx
  call   <memset@plt>
  mov    -0x4c(%rbp),%eax
  cmp    %r15d,%eax
  jg     L178
  test   %eax,%eax
  jle    L12
  xor    %r15d,%r15d
L180:
  mov    -0x58(%rbp),%rsi
  mov    %r14,%rdx
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x1,%r15d
  call   <scanf@plt>
  movslq -0x40(%rbp),%rax
  movslq -0x3c(%rbp),%rdx
  mov    %r12,%rdi
  mov    (%rbx,%rax,8),%rax
  lea    (%rax,%rdx,4),%rsi
  xor    %eax,%eax
  call   <scanf@plt>
  cmp    %r15d,-0x4c(%rbp)
  jg     L180
L12:
  mov    %r14,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  movslq -0x4c(%rbp),%rax
  mov    %rsp,%rsi
  mov    %rax,%rdx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L46
L98:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L98
L46:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  je     L39
  orq    $0x0,-0x8(%rsp,%rcx,1)
L39:
  mov    %rsp,%r15
  shl    $0x2,%edx
  mov    $0x3f3f3f3f,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  movslq -0x4c(%rbp),%rax
  mov    %rsp,%rsi
  mov    %rax,%rdx
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L115
L14:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L14
L115:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L184
L205:
  lea    0x3(%rsp),%r8
  mov    $0xffffffff,%esi
  shl    $0x2,%edx
  mov    %r8,%rax
  and    $0xfffffffffffffffc,%r8
  shr    $0x2,%rax
  mov    %r8,%rdi
  mov    %r8,-0x88(%rbp)
  mov    %rax,-0x80(%rbp)
  call   <memset@plt>
  movslq -0x48(%rbp),%rsi
  mov    -0x80(%rbp),%rax
  xor    %ecx,%ecx
  movslq -0x4c(%rbp),%r9
  movslq -0x44(%rbp),%r10
  mov    %esi,0x0(,%rax,4)
  movslq %esi,%rax
  mov    -0x88(%rbp),%r8
  movl   $0x0,(%r15,%rax,4)
  mov    %r9,%r11
  cs nopw 0x0(%rax,%rax,1)
L94:
  sub    $0x1,%ecx
  cmp    %r10d,%esi
  je     L134
  lea    (%rbx,%rsi,8),%rax
  test   %r11d,%r11d
  jle    L134
  mov    (%rax),%rdi
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L54:
  mov    (%rdi,%rax,4),%edx
  cmp    $0xffffffff,%edx
  je     L193
  add    (%r15,%rsi,4),%edx
  cmp    (%r15,%rax,4),%edx
  jge    L193
  add    $0x1,%ecx
  mov    %edx,(%r15,%rax,4)
  movslq %ecx,%rdx
  mov    %eax,(%r8,%rdx,4)
L193:
  add    $0x1,%rax
  cmp    %r9,%rax
  jne    L54
L134:
  cmp    $0xffffffff,%ecx
  je     L16
  movslq %ecx,%rax
  movslq (%r8,%rax,4),%rsi
  jmp    L94
  nopw   0x0(%rax,%rax,1)
L16:
  mov    (%r15,%r10,4),%esi
  lea    D4(%rip),%rdi
  call   <printf@plt>
  mov    -0x50(%rbp),%eax
  mov    -0x60(%rbp),%rsp
  lea    -0x1(%rax),%edx
  mov    %edx,-0x50(%rbp)
  test   %eax,%eax
  jne    L92
L88:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L106
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L184:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L205
L106:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D19
datatype: string
name: extract_symbolic_data
arguments: data_tag: D1
datatype: string
name: extract_symbolic_data
arguments: data_tag: D4
datatype: string

tool: D19: %d

tool: D1: %d %d

tool: D4: %d


assistant: ```c
int main() {
  int cases;
  scanf("%d", &cases);
  while (cases--) {
    int roads;
    scanf("%d", &roads);
    int start, end;
    scanf("%d %d", &start, &end);
    int **Map = malloc(roads * sizeof(int *) + 1);
    for (int x = 0; x < roads; x++) {
      Map[x] = malloc(roads * sizeof(int));
      memset(Map[x], -1, roads * sizeof(int));
    }
    for (int x = 0; x < roads; x++) {
      int from, to;
      scanf("%d %d", &from, &to);
      scanf("%d", &Map[from][to]);
    }
    int ignore;
    scanf("%d", &ignore);
    int mincost[roads];
    memset(mincost, 0x3f3f3f3f, sizeof(mincost));
    int stack[roads];
    memset(stack, -1, sizeof(stack));
    int sidx = 0;
    stack[0] = start;
    mincost[start] = 0;
    while (sidx >= 0) {
      int curnode = stack[sidx];
      --sidx;
      for (int x = 0; curnode != end && x < roads; x++) {
        if (Map[curnode][x] != -1 && mincost[curnode] + Map[curnode][x] < mincost[x]) {
          mincost[x] = mincost[curnode] + Map[curnode][x];
          stack[++sidx] = x;
        }
      }
    }
    printf("%d\n", mincost[end]);
  }
  return 0;
}
```