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

```asm
<maxelemdel>:
  endbr64
  push   %r15
  mov    %rdi,%rcx
  mov    %esi,%r10d
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  test   %esi,%esi
  jle    L29
  xor    %r11d,%r11d
  xor    %r9d,%r9d
  xor    %edi,%edi
  xor    %r8d,%r8d
  movslq %edx,%rsi
  nopl   0x0(%rax)
L122:
  test   %r12d,%r12d
  jle    L41
  mov    %r10d,%eax
  imul   %edi,%eax
  add    %r9d,%eax
  cltq
  movsd  (%rcx,%rax,8),%xmm1
  movslq %r11d,%rax
  lea    (%rcx,%rax,8),%rdx
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L31:
  movsd  (%rdx,%rax,8),%xmm0
  comisd %xmm1,%xmm0
  jbe    L82
  movapd %xmm0,%xmm1
  mov    %eax,%r9d
  mov    %r8d,%edi
L82:
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L31
L41:
  add    $0x1,%r8d
  add    %r10d,%r11d
  cmp    %r8d,%r10d
  jne    L122
  lea    -0x1(%r10),%r15d
  cmp    %edi,%r15d
  jle    L56
L4:
  test   %r12d,%r12d
  jle    L21
  mov    %r12d,%eax
  mov    %r10d,%r9d
  mov    %r12d,%esi
  movslq %r10d,%r14
  shr    %eax
  imul   %edi,%r9d
  and    $0xfffffffe,%esi
  lea    -0x1(%rax),%ebx
  lea    -0x1(%r12),%eax
  mov    %eax,0xc(%rsp)
  add    $0x1,%rbx
  mov    %rax,0x10(%rsp)
  lea    0x8(%rcx),%rax
  lea    (%r10,%r9,1),%ebp
  movslq %r9d,%r13
  mov    %rax,0x18(%rsp)
  movslq %ebp,%rbp
  shl    $0x4,%rbx
  nopl   0x0(%rax)
L81:
  lea    0x8(,%rbp,8),%rdx
  lea    0x0(,%r13,8),%r8
  mov    %r9d,%eax
  add    $0x1,%edi
  add    %r10d,%r9d
  cmp    %rdx,%r8
  je     L2
  cmpl   $0x2,0xc(%rsp)
  jbe    L2
  lea    -0x8(%rcx,%rdx,1),%r11
  add    %rcx,%r8
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L47:
  movupd (%r11,%rdx,1),%xmm2
  movups %xmm2,(%r8,%rdx,1)
  add    $0x10,%rdx
  cmp    %rdx,%rbx
  jne    L47
  cmp    %r12d,%esi
  je     L159
  lea    (%rsi,%r9,1),%edx
  add    %esi,%eax
  movslq %edx,%rdx
  cltq
  movsd  (%rcx,%rdx,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
L159:
  add    %r14,%r13
  add    %r14,%rbp
  cmp    %edi,%r15d
  jne    L81
L112:
  imul   %r15d,%r10d
  mov    %r12d,%edx
  xor    %esi,%esi
  shl    $0x3,%rdx
  movslq %r10d,%rax
  lea    (%rcx,%rax,8),%rdi
  call   <memset@plt>
L21:
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L2:
  lea    -0x8(%rcx,%rdx,1),%rax
  mov    0x10(%rsp),%rdx
  mov    0x18(%rsp),%r11
  add    %rbp,%rdx
  lea    (%r11,%rdx,8),%r8
  mov    %r13,%rdx
  sub    %rbp,%rdx
  nopl   0x0(%rax)
L36:
  movsd  (%rax),%xmm0
  movsd  %xmm0,(%rax,%rdx,8)
  add    $0x8,%rax
  cmp    %r8,%rax
  jne    L36
  jmp    L159
L29:
  xor    %edi,%edi
  lea    -0x1(%r10),%r15d
  cmp    %edi,%r15d
  jg     L4
L56:
  test   %r12d,%r12d
  jg     L112
  jmp    L21
```

assistant: ```c
int maxelemdel(double *matrix, int n, int m) {
  int i, j, s, p;
  s = 0;
  p = 0;
  for (i = 0; i < n; ++i) {
    for (j = 0; j < m; ++j) {
      if (matrix[n * i + j] > matrix[n * s + p]) {
        s = i;
        p = j;
      }
    }
  }
  for (i = s; i < n - 1; ++i) {
    for (j = 0; j < m; ++j) {
      matrix[n * i + j] = matrix[n * (i + 1) + j];
    }
  }
  for (j = 0; j < m; ++j) {
    matrix[(n - 1) * n + j] = 0;
  }
  return 0;
}
```