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    L15
L58:
  mov    0x10(%rsp),%eax
  mov    $0x1000000,%ebx
  mov    0xc(%rsp),%edx
  sub    %r14d,%eax
  cmp    %ebx,%eax
  cmovle %eax,%ebx
  test   %edx,%edx
  je     L27
L60:
  mov    0x14(%rsp),%eax
  test   %eax,%eax
  je     L34
  mov    %ebx,%edx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
L99:
  movl   $0x1,0xc(%rsp)
  test   %ebx,%ebx
  jle    L38
L39:
  xor    %r15d,%r15d
  jmp    L33
  nop
L5:
  add    %eax,%r15d
  cmp    %ebx,%r15d
  jge    L88
L33:
  mov    %ebx,%edx
  movslq %r15d,%rsi
  mov    %r12d,%edi
  sub    %r15d,%edx
  add    %rbp,%rsi
  call   <write@plt>
  test   %eax,%eax
  jg     L5
L34:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
L121:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L88:
  movslq %ebx,%rbx
  add    %rbx,%r14
  cmp    %r14,0x18(%rsp)
  jg     L58
L15:
  mov    %rbp,%rdi
  call   <free@plt>
  xor    %eax,%eax
  jmp    L121
  nopl   (%rax)
L27:
  mov    %eax,%edx
L141:
  test   %eax,%eax
  jle    L120
  xor    %r15d,%r15d
  jmp    L161
  nopl   0x0(%rax,%rax,1)
L81:
  js     L34
  add    %eax,%r15d
  cmp    %ebx,%r15d
  jge    L156
L161:
  mov    %ebx,%edx
  movslq %r15d,%rsi
  mov    %r13d,%edi
  sub    %r15d,%edx
  add    %rbp,%rsi
  call   <read@plt>
  test   %eax,%eax
  jne    L81
  mov    %r15d,%ebx
  jmp    L99
L156:
  mov    %r15d,%ebx
  jmp    L39
L38:
  movslq %ebx,%rbx
  add    %rbx,%r14
  cmp    %r14,0x18(%rsp)
  jle    L15
  mov    0x10(%rsp),%ebx
  mov    $0x1000000,%eax
  sub    %r14d,%ebx
  cmp    %eax,%ebx
  cmovg  %eax,%ebx
  jmp    L60
L120:
  cmp    %r14,0x18(%rsp)
  jle    L15
  mov    $0x1000000,%ebx
  mov    %edx,%eax
  cmp    %ebx,%edx
  cmovle %edx,%ebx
  jmp    L141
```

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;
}
```