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

```asm
<sendFile>:
  endbr64
  push   %r13
  mov    %rdi,%r13
  mov    $0xffff,%edi
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  call   <malloc@plt>
  lea    D56(%rip),%rsi
  mov    %r13,%rdi
  mov    %rax,%rbp
  call   <fopen@plt>
  test   %rax,%rax
  je     L33
  xor    %ecx,%ecx
  mov    %r12d,%edi
  mov    $0x4,%edx
  mov    %rax,%rbx
  lea    D12(%rip),%rsi
  call   <send@plt>
  xor    %ecx,%ecx
  mov    $0xffff,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <recv@plt>
  jmp    L2
  cs nopw 0x0(%rax,%rax,1)
L16:
  call   <memset@plt>
  mov    %rbx,%rdx
  mov    $0xffff,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  mov    %rbp,%rdi
  call   <strlen@plt>
  xor    %ecx,%ecx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  mov    %eax,%edx
  call   <send@plt>
L2:
  mov    %rbx,%rdi
  call   <feof@plt>
  mov    $0xffff,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  test   %eax,%eax
  je     L16
  call   <memset@plt>
  lea    0x1(%rbp),%rdi
  lea    D41(%rip),%rsi
  call   <strcpy@plt>
  mov    %r12d,%edi
  xor    %ecx,%ecx
  mov    $0x5,%edx
  mov    %rbp,%rsi
  xor    %r12d,%r12d
  call   <send@plt>
L29:
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L33:
  mov    $0xffff,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    %r13,%rdx
  lea    D7(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rsi
  lea    D36(%rip),%rdi
  call   <printf@plt>
  mov    %r12d,%edi
  xor    %ecx,%ecx
  mov    $0x10,%edx
  lea    D45(%rip),%rsi
  call   <send@plt>
  mov    %r12d,%edi
  xor    %ecx,%ecx
  mov    $0xffff,%edx
  mov    %rbp,%rsi
  mov    $0x1,%r12d
  call   <recv@plt>
  jmp    L29
```

tool_calls: name: disassemble_data
arguments: data_label: D56
type_infered: string
name: disassemble_data
arguments: data_label: D12
type_infered: string
name: disassemble_data
arguments: data_label: D41
type_infered: string
name: disassemble_data
arguments: data_label: D7
type_infered: string
name: disassemble_data
arguments: data_label: D36
type_infered: string
name: disassemble_data
arguments: data_label: D45
type_infered: string

tool: D56: r

tool: D12: @OK

tool: D41: @EOF

tool: D7: File "%s" not found.


tool: D36: %s

tool: D45: File not Found!

assistant: ```c
int sendFile(char *fileName, int socket) {
  char *buffer;
  int bufferSize = 65535;
  buffer = malloc(bufferSize * sizeof(char));
  int returnValue = 0;
  FILE *outFile = fopen(fileName, "r");
  if (outFile == NULL) {
    memset(buffer, 0, bufferSize);
    sprintf(buffer, "File \"%s\" not found.\n", fileName);
    printf("%s", buffer);
    send(socket, "File not Found!", 16, 0);
    recv(socket, buffer, bufferSize, 0);
    returnValue = 1;
  } else {
    send(socket, "@OK", 4, 0);
    recv(socket, buffer, bufferSize, 0);
    while (!feof(outFile)) {
      memset(buffer, 0, bufferSize);
      fgets(buffer, bufferSize, outFile);
      send(socket, buffer, strlen(buffer), 0);
    }
    memset(buffer, 0, bufferSize);
    strcpy(buffer + 1, "@EOF");
    send(socket, buffer, 5, 0);
  }
  free(buffer);
  return returnValue;
}
```