user: 请将以下的汇编代码转换成C语言代码：

```asm
<maxsummadd>:
  endbr64
  push   %r15
  mov    %rdi,%rcx
  mov    %esi,%edi
  mov    %edx,%esi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  test   %edx,%edx
  jle    L152
  cmp    $0x1,%edx
  je     L11
  shr    %edx
  pxor   %xmm3,%xmm3
  mov    %rcx,%rax
  sub    $0x1,%edx
  movapd %xmm3,%xmm2
  shl    $0x4,%rdx
  lea    0x10(%rcx,%rdx,1),%rdx
  nop
L58:
  movsd  (%rax),%xmm0
  add    $0x10,%rax
  addsd  %xmm0,%xmm2
  movsd  -0x8(%rax),%xmm0
  addsd  %xmm0,%xmm2
  cmp    %rdx,%rax
  jne    L58
  mov    %esi,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%sil
  je     L33
L100:
  cltq
  addsd  (%rcx,%rax,8),%xmm2
L33:
  cmp    $0x1,%edi
  jle    L230
L109:
  mov    %esi,%eax
  mov    %esi,%r11d
  mov    %edi,%edx
  xor    %r9d,%r9d
  shr    %eax
  and    $0xfffffffe,%r11d
  mov    $0x1,%r10d
  lea    -0x1(%rax),%ebx
  add    $0x1,%rbx
  shl    $0x4,%rbx
  cs nopw 0x0(%rax,%rax,1)
L15:
  movapd %xmm3,%xmm0
  test   %esi,%esi
  jle    L189
  cmp    $0x1,%esi
  je     L231
  movslq %edx,%rax
  movapd %xmm3,%xmm0
  lea    (%rcx,%rax,8),%rax
  lea    (%rbx,%rax,1),%r8
L236:
  movsd  (%rax),%xmm1
  add    $0x10,%rax
  addsd  %xmm1,%xmm0
  movsd  -0x8(%rax),%xmm1
  addsd  %xmm1,%xmm0
  cmp    %r8,%rax
  jne    L236
  mov    %r11d,%eax
  cmp    %r11d,%esi
  je     L189
L48:
  add    %edx,%eax
  cltq
  addsd  (%rcx,%rax,8),%xmm0
L189:
  comisd %xmm2,%xmm0
  maxsd  %xmm2,%xmm0
  cmova  %r10d,%r9d
  add    $0x1,%r10d
  movapd %xmm0,%xmm2
  add    %edi,%edx
  cmp    %r10d,%edi
  jne    L15
L121:
  mov    %r9d,%eax
  mov    %esi,%r10d
  xor    %r8d,%r8d
  imul   %edi,%eax
  and    $0xfffffffe,%r10d
  movslq %eax,%rbx
  add    %r10d,%eax
  lea    0x8(,%rbx,8),%rdx
  cltq
  mov    %rbx,-0x20(%rsp)
  lea    (%rcx,%rbx,8),%rbp
  mov    %rdx,-0x28(%rsp)
  lea    (%rcx,%rax,8),%rbx
  mov    %esi,%edx
  lea    -0x1(%rsi),%eax
  shr    %edx
  mov    %rax,-0x18(%rsp)
  mov    %rax,%r15
  lea    0x8(%rcx),%rax
  lea    -0x1(%rdx),%r11d
  mov    %rax,-0x10(%rsp)
  xor    %edx,%edx
  add    $0x1,%r11
  shl    $0x4,%r11
  xchg   %ax,%ax
L218:
  cmp    %r8d,%r9d
  je     L101
  test   %esi,%esi
  jle    L101
  movslq %edx,%r12
  lea    0x0(,%r12,8),%rax
  cmp    %rax,-0x28(%rsp)
  je     L134
  cmp    $0x1,%r15d
  jbe    L134
  add    %rcx,%rax
  xor    %r12d,%r12d
  nopw   0x0(%rax,%rax,1)
L140:
  movupd 0x0(%rbp,%r12,1),%xmm0
  movupd (%rax,%r12,1),%xmm4
  addpd  %xmm4,%xmm0
  movups %xmm0,(%rax,%r12,1)
  add    $0x10,%r12
  cmp    %r11,%r12
  jne    L140
  cmp    %esi,%r10d
  je     L101
  lea    (%rdx,%r10,1),%eax
  cltq
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,(%rax)
L101:
  add    $0x1,%r8d
  add    %edi,%edx
  cmp    %r8d,%edi
  jg     L218
L104:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L134:
  mov    -0x18(%rsp),%r14
  add    %rcx,%rax
  lea    (%r14,%r12,1),%r13
  mov    -0x10(%rsp),%r14
  lea    (%r14,%r13,8),%r14
  mov    -0x20(%rsp),%r13
  sub    %r12,%r13
  nopl   (%rax)
L12:
  movsd  (%rax),%xmm0
  addsd  (%rax,%r13,8),%xmm0
  add    $0x8,%rax
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%r14
  jne    L12
  jmp    L101
L231:
  movapd %xmm3,%xmm0
  xor    %eax,%eax
  jmp    L48
L152:
  pxor   %xmm3,%xmm3
  movapd %xmm3,%xmm2
  cmp    $0x1,%edi
  jg     L109
L230:
  jne    L104
  xor    %r9d,%r9d
  jmp    L121
  nopl   0x0(%rax,%rax,1)
L11:
  pxor   %xmm3,%xmm3
  xor    %eax,%eax
  movapd %xmm3,%xmm2
  jmp    L100
```

assistant: ```c
int maxsummadd(double *matrix, int n, int m) {
  int i, j, s;
  double sum, max;
  max = 0;
  s = 0;
  for (int i = 0; i < m; ++i) {
    max += matrix[i];
  }
  for (i = 1; i < n; ++i) {
    sum = 0;
    for (j = 0; j < m; ++j) {
      sum += matrix[i * n + j];
    }
    if (max < sum) {
      max = sum;
      s = i;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (i == s)
      continue;
    for (int j = 0; j < m; ++j) {
      matrix[i * n + j] += matrix[s * n + j];
    }
  }
  return 0;
}
```