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    D39(%rip),%rsi
  mov    %r13,%rdi
  mov    %rax,%rbp
  call   <fopen@plt>
  test   %rax,%rax
  je     L27
  xor    %ecx,%ecx
  mov    %r12d,%edi
  mov    $0x4,%edx
  mov    %rax,%rbx
  lea    D30(%rip),%rsi
  call   <send@plt>
  xor    %ecx,%ecx
  mov    $0xffff,%edx
  mov    %rbp,%rsi
  mov    %r12d,%edi
  call   <recv@plt>
  jmp    L35
  cs nopw 0x0(%rax,%rax,1)
L1:
  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>
L35:
  mov    %rbx,%rdi
  call   <feof@plt>
  mov    $0xffff,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  test   %eax,%eax
  je     L1
  call   <memset@plt>
  lea    0x1(%rbp),%rdi
  lea    D11(%rip),%rsi
  call   <strcpy@plt>
  mov    %r12d,%edi
  xor    %ecx,%ecx
  mov    $0x5,%edx
  mov    %rbp,%rsi
  xor    %r12d,%r12d
  call   <send@plt>
L5:
  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)
L27:
  mov    $0xffff,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  mov    %r13,%rdx
  lea    D27(%rip),%rsi
  mov    %rbp,%rdi
  call   <sprintf@plt>
  mov    %rbp,%rsi
  lea    D37(%rip),%rdi
  call   <printf@plt>
  mov    %r12d,%edi
  xor    %ecx,%ecx
  mov    $0x10,%edx
  lea    D8(%rip),%rsi
  call   <send@plt>
  mov    %r12d,%edi
  xor    %ecx,%ecx
  mov    $0xffff,%edx
  mov    %rbp,%rsi
  mov    $0x1,%r12d
  call   <recv@plt>
  jmp    L5
```

tool_calls: name: retrieve_data
arguments: data_label: D39
type_guessed: string
name: retrieve_data
arguments: data_label: D30
type_guessed: string
name: retrieve_data
arguments: data_label: D11
type_guessed: string
name: retrieve_data
arguments: data_label: D27
type_guessed: string
name: retrieve_data
arguments: data_label: D37
type_guessed: string
name: retrieve_data
arguments: data_label: D8
type_guessed: string

tool: D39: r

tool: D30: @OK

tool: D11: @EOF

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


tool: D37: %s

tool: D8: 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;
}
```