user: What would the C source look like for the assembly code provided here?

```asm
<copy_border>:
  endbr64
  push   %r15
  lea    -0x1(%rdx),%r9d
  lea    0x1(%rcx),%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,-0x14(%rsp)
  mov    %esi,-0x18(%rsp)
  mov    %ecx,-0xc(%rsp)
  cmp    %eax,%r9d
  jg     L209
  mov    %edx,%ebx
  mov    %ecx,%r15d
  movslq %esi,%rax
  movslq %edi,%rcx
  sub    %ebx,%r15d
  mov    (%r8,%rax,8),%r11
  mov    0x8(%r8,%rax,8),%rbp
  lea    0x2(%r15),%eax
  mov    -0x8(%r8,%rcx,8),%rdx
  mov    (%r8,%rcx,8),%rcx
  mov    %r15d,-0x10(%rsp)
  mov    %eax,-0x28(%rsp)
  movslq %ebx,%rax
  lea    (%rax,%rax,1),%rdi
  mov    %rax,-0x20(%rsp)
  lea    0xe(%rdi),%r14
  lea    -0x2(%rdi),%rax
  lea    (%rdx,%r14,1),%r13
  lea    (%rcx,%rax,1),%r12
  cmp    %r13,%r12
  lea    (%rdx,%rax,1),%r10
  lea    (%r11,%rdi,1),%r15
  setae  %r13b
  add    %rcx,%r14
  lea    0x0(%rbp,%rax,1),%rsi
  cmp    %r14,%r10
  setae  %r14b
  or     %r14d,%r13d
  cmpl   $0x2,-0x28(%rsp)
  seta   %r14b
  and    %r14d,%r13d
  mov    %r10,%r14
  sub    %r15,%r14
  cmp    $0xc,%r14
  seta   %r14b
  and    %r13d,%r14d
  mov    %rsi,%r13
  sub    %r15,%r13
  lea    (%rdx,%rdi,1),%r15
  cmp    $0xc,%r13
  seta   %r13b
  and    %r14d,%r13d
  mov    %rsi,%r14
  sub    %r15,%r14
  cmp    $0xc,%r14
  seta   %r14b
  test   %r14b,%r13b
  je     L67
  add    %rcx,%rdi
  mov    %rsi,%r13
  sub    %rdi,%r13
  cmp    $0xc,%r13
  jbe    L67
  mov    -0x10(%rsp),%r15d
  cmpl   $0x6,-0x28(%rsp)
  lea    0x3(%r15),%r13d
  jbe    L242
  mov    %r13d,%ebx
  add    %r11,%rax
  xor    %edi,%edi
  shr    $0x3,%ebx
  shl    $0x4,%rbx
  nopl   0x0(%rax,%rax,1)
L204:
  movdqu (%rax,%rdi,1),%xmm0
  movups %xmm0,(%r10,%rdi,1)
  movdqu (%r12,%rdi,1),%xmm1
  movups %xmm1,(%rsi,%rdi,1)
  add    $0x10,%rdi
  cmp    %rbx,%rdi
  jne    L204
  mov    %r13d,%eax
  and    $0xfffffff8,%eax
  add    %eax,%r9d
  cmp    %eax,%r13d
  je     L209
  mov    -0x10(%rsp),%esi
  sub    %eax,%esi
  lea    0x3(%rsi),%r13d
  add    $0x2,%esi
  cmp    $0x2,%esi
  jbe    L178
L120:
  add    -0x20(%rsp),%rax
  add    %rax,%rax
  mov    -0x2(%r11,%rax,1),%rsi
  mov    %rsi,-0x2(%rdx,%rax,1)
  mov    -0x2(%rcx,%rax,1),%rsi
  mov    %rsi,-0x2(%rbp,%rax,1)
  mov    %r13d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%r9d
  cmp    %eax,%r13d
  je     L209
L178:
  movslq %r9d,%rsi
  movzwl (%r11,%rsi,2),%edi
  lea    (%rsi,%rsi,1),%rax
  mov    %di,(%rdx,%rsi,2)
  movzwl (%rcx,%rsi,2),%edi
  mov    %di,0x0(%rbp,%rsi,2)
  cmp    %r9d,-0xc(%rsp)
  jl     L209
  movzwl 0x2(%r11,%rax,1),%esi
  mov    %si,0x2(%rdx,%rax,1)
  movzwl 0x2(%rcx,%rax,1),%esi
  mov    %si,0x2(%rbp,%rax,1)
  jle    L209
  movzwl 0x4(%r11,%rax,1),%esi
  mov    %si,0x4(%rdx,%rax,1)
  movzwl 0x4(%rcx,%rax,1),%edx
  mov    %dx,0x4(%rbp,%rax,1)
L209:
  mov    -0x14(%rsp),%esi
  mov    -0x18(%rsp),%ebx
  lea    -0x1(%rsi),%r9d
  lea    0x1(%rbx),%eax
  cmp    %eax,%r9d
  jg     L5
  movslq %esi,%r13
  movslq %ebx,%rax
  sub    %esi,%ebx
  mov    (%r8,%r13,8),%rdx
  lea    0x0(%r13,%r13,1),%rdi
  mov    (%r8,%rax,8),%r10
  lea    0x2(%rbx),%ebp
  mov    0x8(%r8,%rax,8),%r11
  lea    -0x2(%rdi),%rax
  lea    0xe(%rdi),%r14
  mov    %ebp,-0x20(%rsp)
  mov    -0x8(%r8,%r13,8),%rcx
  lea    (%rdx,%rax,1),%r12
  lea    (%r10,%rdi,1),%r15
  mov    %r12,-0x28(%rsp)
  lea    (%r11,%rax,1),%rsi
  lea    (%rcx,%r14,1),%r12
  cmp    %r12,-0x28(%rsp)
  lea    (%rcx,%rax,1),%r8
  setae  %r12b
  add    %rdx,%r14
  cmp    %r14,%r8
  setae  %r14b
  or     %r12d,%r14d
  mov    %rsi,%r12
  sub    %r15,%r12
  cmp    $0xc,%r12
  seta   %r12b
  and    %r14d,%r12d
  cmp    $0x2,%ebp
  mov    %rsi,%rbp
  seta   %r14b
  and    %r14d,%r12d
  lea    (%rdx,%rdi,1),%r14
  sub    %r14,%rbp
  cmp    $0xc,%rbp
  seta   %r14b
  and    %r14d,%r12d
  mov    %r8,%r14
  sub    %r15,%r14
  cmp    $0xc,%r14
  seta   %r14b
  test   %r14b,%r12b
  je     L93
  add    %rcx,%rdi
  mov    %rsi,%r12
  sub    %rdi,%r12
  cmp    $0xc,%r12
  jbe    L93
  cmpl   $0x6,-0x20(%rsp)
  lea    0x3(%rbx),%r12d
  jbe    L172
  mov    %r12d,%r14d
  mov    -0x28(%rsp),%rbp
  add    %r10,%rax
  xor    %edi,%edi
  shr    $0x3,%r14d
  shl    $0x4,%r14
  nopw   0x0(%rax,%rax,1)
L203:
  movdqu (%rax,%rdi,1),%xmm2
  movups %xmm2,(%r8,%rdi,1)
  movdqu 0x0(%rbp,%rdi,1),%xmm3
  movups %xmm3,(%rsi,%rdi,1)
  add    $0x10,%rdi
  cmp    %r14,%rdi
  jne    L203
  mov    %r12d,%eax
  and    $0xfffffff8,%eax
  add    %eax,%r9d
  cmp    %eax,%r12d
  je     L5
  sub    %eax,%ebx
  lea    0x3(%rbx),%r12d
  add    $0x2,%ebx
  cmp    $0x2,%ebx
  jbe    L112
L138:
  add    %r13,%rax
  add    %rax,%rax
  mov    -0x2(%r10,%rax,1),%rsi
  mov    %rsi,-0x2(%rcx,%rax,1)
  mov    -0x2(%rdx,%rax,1),%rsi
  mov    %rsi,-0x2(%r11,%rax,1)
  mov    %r12d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%r9d
  cmp    %eax,%r12d
  je     L5
L112:
  movslq %r9d,%rsi
  movzwl (%r10,%rsi,2),%edi
  lea    (%rsi,%rsi,1),%rax
  mov    %di,(%rcx,%rsi,2)
  movzwl (%rdx,%rsi,2),%edi
  mov    %di,(%r11,%rsi,2)
  cmp    %r9d,-0x18(%rsp)
  jl     L5
  movzwl 0x2(%r10,%rax,1),%esi
  mov    %si,0x2(%rcx,%rax,1)
  movzwl 0x2(%rdx,%rax,1),%esi
  mov    %si,0x2(%r11,%rax,1)
  jle    L5
  movzwl 0x4(%r10,%rax,1),%esi
  mov    %si,0x4(%rcx,%rax,1)
  movzwl 0x4(%rdx,%rax,1),%edx
  mov    %dx,0x4(%r11,%rax,1)
L5:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L93:
  mov    -0x18(%rsp),%edi
  add    $0x2,%edi
  sub    -0x14(%rsp),%edi
  add    %r13,%rdi
  add    %rdi,%rdi
  nopl   0x0(%rax)
L163:
  movzwl (%r10,%rax,1),%esi
  mov    %si,(%rcx,%rax,1)
  movzwl (%rdx,%rax,1),%esi
  mov    %si,(%r11,%rax,1)
  add    $0x2,%rax
  cmp    %rdi,%rax
  jne    L163
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L67:
  mov    -0xc(%rsp),%edi
  add    $0x2,%edi
  sub    %ebx,%edi
  add    -0x20(%rsp),%rdi
  add    %rdi,%rdi
  nopl   0x0(%rax)
L0:
  movzwl (%r11,%rax,1),%esi
  mov    %si,(%rdx,%rax,1)
  movzwl (%rcx,%rax,1),%esi
  mov    %si,0x0(%rbp,%rax,1)
  add    $0x2,%rax
  cmp    %rdi,%rax
  jne    L0
  jmp    L209
L242:
  xor    %eax,%eax
  jmp    L120
L172:
  xor    %eax,%eax
  jmp    L138
```

assistant: ```c
void copy_border(int rmin, int rmax, int cmin, int cmax, short **grid) {
  int i;
  for (i = cmin - 1; i <= cmax + 1; ++i) {
    grid[rmin - 1][i] = grid[rmax][i];
    grid[rmax + 1][i] = grid[rmin][i];
  }
  for (i = rmin - 1; i <= rmax + 1; ++i) {
    grid[rmin - 1][i] = grid[rmax][i];
    grid[rmax + 1][i] = grid[rmin][i];
  }
  return;
}
```