user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<breathFirstSearch>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %ecx,%eax
  mov    %r8,-0x30(%rbp)
  mov    %r9,-0x38(%rbp)
  mov    0x10(%rbp),%ecx
  mov    %dx,-0x20(%rbp)
  mov    %ax,-0x24(%rbp)
  mov    %ecx,%eax
  mov    %al,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  movzwl -0x20(%rbp),%eax
  mov    %ax,(%rdx)
  movl   $0x0,-0x8(%rbp)
  jmp    L52
L4:
  mov    -0x8(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movw   $0xffff,(%rax)
  addl   $0x1,-0x8(%rbp)
L52:
  mov    -0x8(%rbp),%eax
  cmp    -0x1c(%rbp),%eax
  jl     L4
  jmp    L36
L25:
  subl   $0x1,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %ax,-0xc(%rbp)
  cmpb   $0x0,-0x28(%rbp)
  jne    L111
  movzwl -0xc(%rbp),%eax
  cmp    -0x24(%rbp),%ax
  je     L77
L111:
  movl   $0x0,-0x8(%rbp)
  jmp    L106
L29:
  movswq -0xa(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  cmp    $0xffff,%ax
  jne    L102
  mov    -0x4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x4(%rbp)
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  movzwl -0xa(%rbp),%eax
  mov    %ax,(%rdx)
  movswq -0xa(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  movzwl -0xc(%rbp),%eax
  mov    %ax,(%rdx)
L102:
  addl   $0x1,-0x8(%rbp)
L106:
  cmpl   $0x5,-0x8(%rbp)
  jg     L36
  movswl -0xc(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %ax,-0xa(%rbp)
  cmpw   $0xffff,-0xa(%rbp)
  jne    L29
L36:
  cmpl   $0x0,-0x4(%rbp)
  jne    L25
  jmp    L19
L77:
  nop
L19:
  movzwl -0x24(%rbp),%eax
  mov    %ax,-0xc(%rbp)
  mov    -0x30(%rbp),%rax
  movzwl -0xc(%rbp),%edx
  mov    %dx,(%rax)
  movl   $0x1,-0x8(%rbp)
  jmp    L57
L66:
  movswq -0xc(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  mov    %ax,-0xc(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  movzwl -0xc(%rbp),%eax
  mov    %ax,(%rdx)
  cmpw   $0xffff,-0xc(%rbp)
  jne    L64
  mov    $0xffffffff,%eax
  jmp    L142
L64:
  addl   $0x1,-0x8(%rbp)
L57:
  movzwl -0xc(%rbp),%eax
  cmp    -0x20(%rbp),%ax
  jne    L66
  mov    -0x8(%rbp),%eax
  cltq
  add    %rax,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
L142:
  pop    %rbp
  ret
```

assistant: ```c
short breathFirstSearch(short *graph, int zoneCount, short startZone, short endZone, short *temp1, short *temp2, char all) {
  int i, n = 0;
  short zone, next;
  temp1[n++] = startZone;
  for (i = 0; i < zoneCount; i++) {
    temp2[i] = -1;
  }
  for (; n;) {
    zone = temp1[--n];
    if (!all && zone == endZone)
      break;
    for (i = 0; i < 6 && ((next = graph[zone * 6 + i]) != -1); i++) {
      if (temp2[next] == -1) {
        temp1[n++] = next;
        temp2[next] = zone;
      }
    }
  }
  zone = endZone;
  temp1[0] = zone;
  for (i = 1; zone != startZone; i++) {
    zone = temp2[zone];
    temp1[i] = zone;
    if (zone == -1)
      return -1;
  }
  return temp1[i - 2];
}
```