user: Translate the below assembly code into C programming language:

```asm
<copy>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %edx,-0x64(%rbp)
  mov    %ecx,-0x68(%rbp)
  mov    %r8d,-0x6c(%rbp)
  mov    %r9d,-0x70(%rbp)
  cmpl   $0x8,0x18(%rbp)
  ja     L107
  mov    0x18(%rbp),%eax
  lea    0x0(,%rax,4),%rdx
  lea    D7(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D7(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x50(%rbp)
  mov    -0x70(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x48(%rbp)
  mov    0x10(%rbp),%eax
  cltd
  idivl  -0x64(%rbp)
  mov    %eax,0x10(%rbp)
  jmp    L37
L90:
  mov    -0x50(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x48(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x50(%rbp)
  mov    -0x6c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x48(%rbp)
L37:
  mov    0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x10(%rbp)
  test   %eax,%eax
  jne    L90
  jmp    L126
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x40(%rbp)
  mov    -0x70(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x38(%rbp)
  mov    -0x64(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    0x10(%rbp),%eax
  cltd
  idiv   %ecx
  mov    %eax,0x10(%rbp)
  jmp    L128
L2:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x40(%rbp)
  mov    -0x6c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x38(%rbp)
L128:
  mov    0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x10(%rbp)
  test   %eax,%eax
  jne    L2
  jmp    L126
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x68(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x70(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x28(%rbp)
  mov    -0x64(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  lea    (%rdx,%rax,1),%esi
  mov    0x10(%rbp),%eax
  cltd
  idiv   %esi
  mov    %eax,0x10(%rbp)
  jmp    L8
L78:
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x28(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x30(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x30(%rbp),%rax
  mov    0x8(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x64(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x30(%rbp)
  mov    -0x6c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x28(%rbp)
L8:
  mov    0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x10(%rbp)
  test   %eax,%eax
  jne    L78
  jmp    L126
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x20(%rbp)
  mov    -0x70(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x18(%rbp)
  mov    -0x64(%rbp),%eax
  lea    0x0(,%rax,4),%edi
  mov    0x10(%rbp),%eax
  cltd
  idiv   %edi
  mov    %eax,0x10(%rbp)
  jmp    L41
L57:
  mov    -0x20(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x20(%rbp)
  mov    -0x6c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x18(%rbp)
L41:
  mov    0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x10(%rbp)
  test   %eax,%eax
  jne    L57
  jmp    L126
  mov    -0x58(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x60(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x68(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x10(%rbp)
  mov    -0x70(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x8(%rbp)
  mov    -0x64(%rbp),%eax
  lea    0x0(,%rax,8),%ecx
  mov    0x10(%rbp),%eax
  cltd
  idiv   %ecx
  mov    %eax,0x10(%rbp)
  jmp    L14
L94:
  mov    -0x10(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x64(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x10(%rbp)
  mov    -0x6c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x8(%rbp)
L14:
  mov    0x10(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,0x10(%rbp)
  test   %eax,%eax
  jne    L94
  jmp    L126
L107:
  mov    0x18(%rbp),%eax
  mov    %eax,%ecx
  lea    D14(%rip),%rax
  mov    %rax,%rdx
  mov    $0x1,%esi
  mov    $0x25,%edi
  call   <mp_msg@plt>
  nop
L126:
  nop
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: label: D14
data_type: string

tool: D14: [channels] Unsupported number of bytes/sample: %i please report this error on the MPlayer mailing list. 


assistant: ```c
void copy(void *in, void *out, int ins, int inos, int outs, int outos, int len, int bps) {
  switch (bps) {
  case 1: {
    int8_t *tin = (int8_t *)in;
    int8_t *tout = (int8_t *)out;
    tin += inos;
    tout += outos;
    len = len / ins;
    while (len--) {
      *tout = *tin;
      tin += ins;
      tout += outs;
    }
    break;
  }
  case 2: {
    int16_t *tin = (int16_t *)in;
    int16_t *tout = (int16_t *)out;
    tin += inos;
    tout += outos;
    len = len / (2 * ins);
    while (len--) {
      *tout = *tin;
      tin += ins;
      tout += outs;
    }
    break;
  }
  case 3: {
    int8_t *tin = (int8_t *)in;
    int8_t *tout = (int8_t *)out;
    tin += 3 * inos;
    tout += 3 * outos;
    len = len / (3 * ins);
    while (len--) {
      tout[0] = tin[0];
      tout[1] = tin[1];
      tout[2] = tin[2];
      tin += 3 * ins;
      tout += 3 * outs;
    }
    break;
  }
  case 4: {
    int32_t *tin = (int32_t *)in;
    int32_t *tout = (int32_t *)out;
    tin += inos;
    tout += outos;
    len = len / (4 * ins);
    while (len--) {
      *tout = *tin;
      tin += ins;
      tout += outs;
    }
    break;
  }
  case 8: {
    int64_t *tin = (int64_t *)in;
    int64_t *tout = (int64_t *)out;
    tin += inos;
    tout += outos;
    len = len / (8 * ins);
    while (len--) {
      *tout = *tin;
      tin += ins;
      tout += outs;
    }
    break;
  }
  default:
    mp_msg(37, 1,
           "[channels] Unsupported number of bytes/sample: %i"
           " please report this error on the MPlayer mailing list. \n",
           bps);
  }
}
```