user: 下面的汇编指令对应的C源代码是什么:

```asm
<file_transfer>:
  endbr64
  push   %r15
  push   %r14
  xor    %r14d,%r14d
  push   %r13
  mov    %edi,%r13d
  mov    $0x1000000,%edi
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    (%rdx),%rbx
  mov    %ecx,0x14(%rsp)
  mov    %rbx,0x18(%rsp)
  call   <malloc@plt>
  mov    %ebx,0x10(%rsp)
  movl   $0x0,0xc(%rsp)
  mov    %rax,%rbp
  test   %rbx,%rbx
  jle    L153
L43:
  mov    0x10(%rsp),%eax
  mov    $0x1000000,%ebx
  mov    0xc(%rsp),%edx
  sub    %r14d,%eax
  cmp    %ebx,%eax
  cmovle %eax,%ebx
  test   %edx,%edx
  je     L62
L171:
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  je     L152
  mov    %ebx,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
L199:
  movl   $0x1,0xc(%rsp)
  test   %ebx,%ebx
  jle    L118
L13:
  xor    %r15d,%r15d
  jmp    L172
  nop
L65:
  add    %eax,%r15d
  cmp    %ebx,%r15d
  jge    L141
L172:
  mov    %ebx,%edx
  movslq %r15d,%rsi
  mov    %r12d,%edi
  sub    %r15d,%edx
  add    %rbp,%rsi
  call   <write@plt>
  test   %eax,%eax
  jg     L65
L152:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
L27:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L141:
  movslq %ebx,%rbx
  add    %rbx,%r14
  cmp    %r14,0x18(%rsp)
  jg     L43
L153:
  mov    %rbp,%rdi
  call   <free@plt>
  xor    %eax,%eax
  jmp    L27
  nopl   (%rax)
L62:
  mov    %eax,%edx
L194:
  test   %eax,%eax
  jle    L115
  xor    %r15d,%r15d
  jmp    L55
  nopl   0x0(%rax,%rax,1)
L181:
  js     L152
  add    %eax,%r15d
  cmp    %ebx,%r15d
  jge    L167
L55:
  mov    %ebx,%edx
  movslq %r15d,%rsi
  mov    %r13d,%edi
  sub    %r15d,%edx
  add    %rbp,%rsi
  call   <read@plt>
  test   %eax,%eax
  jne    L181
  mov    %r15d,%ebx
  jmp    L199
L167:
  mov    %r15d,%ebx
  jmp    L13
L118:
  movslq %ebx,%rbx
  add    %rbx,%r14
  cmp    %r14,0x18(%rsp)
  jle    L153
  mov    0x10(%rsp),%ebx
  mov    $0x1000000,%eax
  sub    %r14d,%ebx
  cmp    %eax,%ebx
  cmovg  %eax,%ebx
  jmp    L171
L115:
  cmp    %r14,0x18(%rsp)
  jle    L153
  mov    $0x1000000,%ebx
  mov    %edx,%eax
  cmp    %ebx,%edx
  cmovle %edx,%ebx
  jmp    L194
```

assistant: ```c
int file_transfer(int infd, int outfd, uint64_t *s, int zero_fill) {
  uint64_t size = *s;
  int buffer_sz = 0x1000000;
  char *buffer = malloc(buffer_sz);
  int read_EOF = 0;
  uint64_t transferred = 0;
  while (transferred < size) {
    int remaining = size - transferred;
    if (remaining > buffer_sz)
      remaining = buffer_sz;
    if (!read_EOF) {
      int r = 0;
      while (r < remaining) {
        int res = read(infd, buffer + r, remaining - r);
        if (res == 0) {
          read_EOF = 1;
          break;
        }
        if (res < 0) {
          free(buffer);
          return -1;
        }
        r += res;
      }
      remaining = r;
    } else {
      if (zero_fill) {
        memset(buffer, 0, remaining);
      } else {
        free(buffer);
        return -1;
      }
    }
    int w = 0;
    while (w < remaining) {
      int res = write(outfd, buffer + w, remaining - w);
      if (res <= 0) {
        free(buffer);
        return -1;
      }
      w += res;
    }
    transferred += remaining;
  }
  free(buffer);
  return 0;
}
```