user: What is the c source code of the assembly code below:

```asm
<copy_border>:
  endbr64
  push   %r15
  lea    -0x1(%rdx),%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %eax,%ebx
  mov    %eax,-0x14(%rsp)
  lea    0x1(%rcx),%eax
  mov    %edi,-0x1c(%rsp)
  mov    %esi,-0x18(%rsp)
  cmp    %eax,%ebx
  jg     L32
  mov    %edx,%ebp
  movslq %esi,%rax
  mov    %ecx,%r15d
  movslq %edi,%rcx
  movslq %ebp,%rbx
  mov    (%r8,%rax,8),%rsi
  mov    0x8(%r8,%rax,8),%r9
  mov    %r15d,%eax
  lea    0x0(,%rbx,8),%r10
  mov    -0x8(%r8,%rcx,8),%rdx
  sub    %ebp,%eax
  mov    (%r8,%rcx,8),%rcx
  mov    %eax,-0x20(%rsp)
  lea    -0x8(%r10),%rax
  lea    (%rsi,%r10,1),%r12
  lea    (%rdx,%rax,1),%r11
  lea    (%r9,%rax,1),%rdi
  mov    %rbx,-0x10(%rsp)
  cmp    %r12,%r11
  lea    0x8(%r10),%r13
  lea    (%rcx,%rax,1),%rbx
  setne  %r14b
  cmp    %rdi,%r12
  setne  %r12b
  and    %r14d,%r12d
  cmpl   $0xfffffffe,-0x20(%rsp)
  setb   %r14b
  and    %r14d,%r12d
  lea    (%rdx,%r10,1),%r14
  cmp    %r14,%rdi
  setne  %r14b
  add    %rcx,%r10
  and    %r12d,%r14d
  cmp    %r10,%rdi
  setne  %r10b
  test   %r10b,%r14b
  je     L39
  lea    (%rdx,%r13,1),%r10
  cmp    %r10,%rbx
  setae  %r10b
  add    %rcx,%r13
  cmp    %r13,%r11
  setae  %r12b
  or     %r10b,%r12b
  je     L39
  mov    -0x20(%rsp),%ebp
  add    %rsi,%rax
  xor    %r10d,%r10d
  add    $0x3,%ebp
  mov    %ebp,%r12d
  shr    %r12d
  shl    $0x4,%r12
  nopl   0x0(%rax,%rax,1)
L77:
  movupd (%rax,%r10,1),%xmm1
  movups %xmm1,(%r11,%r10,1)
  movupd (%rbx,%r10,1),%xmm2
  movups %xmm2,(%rdi,%r10,1)
  add    $0x10,%r10
  cmp    %r12,%r10
  jne    L77
  mov    -0x14(%rsp),%eax
  mov    %ebp,%edi
  and    $0xfffffffe,%edi
  add    %edi,%eax
  cmp    %edi,%ebp
  je     L32
  cltq
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  movsd  (%rcx,%rax,8),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
L32:
  mov    -0x1c(%rsp),%r15d
  mov    -0x18(%rsp),%ebx
  lea    -0x1(%r15),%eax
  lea    0x1(%rbx),%edx
  cmp    %edx,%eax
  jg     L65
  movslq %ebx,%r10
  movslq %r15d,%r14
  sub    %r15d,%ebx
  lea    0x0(,%r14,8),%r9
  mov    (%r8,%r10,8),%rdi
  mov    (%r8,%r14,8),%rsi
  mov    %ebx,-0x20(%rsp)
  mov    0x8(%r8,%r10,8),%r10
  lea    -0x8(%r9),%rdx
  mov    -0x8(%r8,%r9,1),%rcx
  lea    0x8(%r9),%rbp
  lea    (%rsi,%r9,1),%r12
  lea    (%rdi,%r9,1),%r15
  lea    (%r10,%rdx,1),%r8
  lea    (%rcx,%rdx,1),%r11
  cmp    %r12,%r8
  lea    (%rsi,%rdx,1),%rbx
  setne  %r12b
  cmp    %r8,%r15
  setne  %r13b
  and    %r12d,%r13d
  cmpl   $0xfffffffe,-0x20(%rsp)
  setb   %r12b
  and    %r13d,%r12d
  cmp    %r11,%r15
  setne  %r13b
  add    %rcx,%r9
  and    %r12d,%r13d
  cmp    %r9,%r8
  setne  %r9b
  test   %r9b,%r13b
  je     L109
  lea    (%rcx,%rbp,1),%r9
  cmp    %r9,%rbx
  setae  %r9b
  add    %rsi,%rbp
  cmp    %rbp,%r11
  setae  %bpl
  or     %r9b,%bpl
  je     L109
  mov    -0x20(%rsp),%r12d
  add    %rdi,%rdx
  xor    %r9d,%r9d
  add    $0x3,%r12d
  mov    %r12d,%ebp
  shr    %ebp
  shl    $0x4,%rbp
L26:
  movupd (%rdx,%r9,1),%xmm3
  movups %xmm3,(%r11,%r9,1)
  movupd (%rbx,%r9,1),%xmm4
  movups %xmm4,(%r8,%r9,1)
  add    $0x10,%r9
  cmp    %rbp,%r9
  jne    L26
  mov    %r12d,%edx
  and    $0xfffffffe,%edx
  add    %edx,%eax
  cmp    %edx,%r12d
  je     L65
  cltq
  movsd  (%rdi,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%r10,%rax,8)
L65:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L39:
  lea    0x2(%r15),%edi
  sub    %ebp,%edi
  add    -0x10(%rsp),%rdi
  shl    $0x3,%rdi
  nop
L122:
  movsd  (%rsi,%rax,1),%xmm0
  movsd  %xmm0,(%rdx,%rax,1)
  movsd  (%rcx,%rax,1),%xmm0
  movsd  %xmm0,(%r9,%rax,1)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L122
  jmp    L32
  nopl   0x0(%rax,%rax,1)
L109:
  mov    -0x18(%rsp),%eax
  add    $0x2,%eax
  sub    -0x1c(%rsp),%eax
  add    %r14,%rax
  shl    $0x3,%rax
  nopw   0x0(%rax,%rax,1)
L97:
  movsd  (%rdi,%rdx,1),%xmm0
  movsd  %xmm0,(%rcx,%rdx,1)
  movsd  (%rsi,%rdx,1),%xmm0
  movsd  %xmm0,(%r10,%rdx,1)
  add    $0x8,%rdx
  cmp    %rax,%rdx
  jne    L97
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void copy_border(int rmin, int rmax, int cmin, int cmax, double **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;
}
```