user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<computeDistanceToAll>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  add    %eax,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L41
L88:
  mov    -0x18(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movw   $0x1,(%rax)
  addl   $0x1,-0x18(%rbp)
L41:
  mov    -0x18(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L88
  movl   $0x0,-0x14(%rbp)
  jmp    L12
L67:
  mov    -0x14(%rbp),%eax
  movswl %ax,%ecx
  mov    -0x14(%rbp),%eax
  movswl %ax,%edx
  mov    -0x40(%rbp),%r8
  mov    -0x48(%rbp),%rdi
  mov    -0x2c(%rbp),%esi
  mov    -0x28(%rbp),%rax
  sub    $0x8,%rsp
  push   $0x1
  push   -0x8(%rbp)
  push   -0x38(%rbp)
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <dijkstra@plt>
  add    $0x20,%rsp
  movl   $0x0,-0x10(%rbp)
  jmp    L68
L23:
  mov    -0x10(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jne    L77
  mov    -0x14(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movw   $0x0,(%rax)
  jmp    L126
L77:
  mov    -0x10(%rbp),%eax
  mov    %ax,-0x1a(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L39
L107:
  movswq -0x1a(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %ax,-0x1a(%rbp)
  cmpw   $0xffff,-0x1a(%rbp)
  je     L17
  addl   $0x1,-0xc(%rbp)
L39:
  movswl -0x1a(%rbp),%eax
  cmp    %eax,-0x14(%rbp)
  jne    L107
  jmp    L100
L17:
  nop
L100:
  cmpw   $0xffff,-0x1a(%rbp)
  jne    L85
  mov    -0x14(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movw   $0xffff,(%rax)
  jmp    L126
L85:
  mov    -0x14(%rbp),%eax
  imul   -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mov    -0xc(%rbp),%edx
  mov    %dx,(%rax)
L126:
  addl   $0x1,-0x10(%rbp)
L68:
  mov    -0x10(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L23
  addl   $0x1,-0x14(%rbp)
L12:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L67
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

assistant: ```c
void computeDistanceToAll(short *graph, int zoneCount, short *temp1, short *temp2, short *temp3, short *d) {
  short *costZone = (short *)malloc(zoneCount * sizeof(short));
  for (int i = 0; i < zoneCount; i++)
    costZone[i] = 1;
  for (int i = 0; i < zoneCount; i++) {
    dijkstra(graph, zoneCount, (short)i, (short)i, temp3, temp2, temp1, costZone, (char)1);
    for (int j = 0; j < zoneCount; j++) {
      if (j == i) {
        d[i * zoneCount + j] = 0;
      } else {
        short zone = j;
        int k;
        for (k = 0; zone != i; k++) {
          zone = temp2[zone];
          if (zone == -1)
            break;
        }
        if (zone == -1) {
          d[i * zoneCount + j] = -1;
        } else {
          d[i * zoneCount + j] = k;
        }
      }
    }
  }
  free(costZone);
}
```