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

```asm
<maxSum>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  movslq %esi,%r15
  push   %r14
  push   %r13
  mov    %r15,%r13
  push   %r12
  mov    %rdi,%r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  lea    0xf(,%r15,4),%rax
  mov    %rsp,%rcx
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L84
L109:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L109
L84:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L183
L122:
  lea    0x3(%rsp),%rdi
  mov    %rdi,%rbx
  and    $0xfffffffffffffffc,%rdi
  shr    $0x2,%rbx
  mov    %rdi,%r14
  test   %r13d,%r13d
  js     L29
  lea    0x4(,%r15,4),%rdx
  mov    %r12,%rsi
  call   <memcpy@plt>
  mov    %r14,%rdi
  cmp    $0x1,%r13d
  jle    L29
  mov    $0x1,%edx
  nopw   0x0(%rax,%rax,1)
L38:
  mov    (%r12,%rdx,4),%ecx
  xor    %eax,%eax
  xchg   %ax,%ax
L22:
  cmp    %ecx,(%r12,%rax,4)
  jge    L169
  mov    (%rdi,%rax,4),%esi
  add    %ecx,%esi
  cmp    %esi,(%rdi,%rdx,4)
  jge    L169
  mov    %esi,(%rdi,%rdx,4)
L169:
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L22
  lea    0x1(%rax),%rdx
  cmp    %r15,%rdx
  jne    L38
  test   %r13d,%r13d
  mov    $0x1,%ecx
  cmovg  %r13d,%ecx
  cmp    $0x3,%r13d
  jle    L107
  mov    %ecx,%edx
  pxor   %xmm2,%xmm2
  mov    %rdi,%rax
  shr    $0x2,%edx
  shl    $0x4,%rdx
  add    %rdi,%rdx
  xchg   %ax,%ax
L143:
  movdqu (%rax),%xmm0
  add    $0x10,%rax
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm2,%xmm1
  pand   %xmm1,%xmm0
  pandn  %xmm2,%xmm1
  movdqa %xmm1,%xmm2
  por    %xmm0,%xmm2
  cmp    %rdx,%rax
  jne    L143
  movdqa %xmm2,%xmm0
  mov    %ecx,%edx
  psrldq $0x8,%xmm0
  and    $0xfffffffc,%edx
  and    $0x3,%ecx
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm2,%xmm1
  pand   %xmm1,%xmm0
  pandn  %xmm2,%xmm1
  por    %xmm0,%xmm1
  movdqa %xmm1,%xmm2
  psrldq $0x4,%xmm2
  movdqa %xmm2,%xmm0
  pcmpgtd %xmm1,%xmm0
  pand   %xmm0,%xmm2
  pandn  %xmm1,%xmm0
  por    %xmm2,%xmm0
  movd   %xmm0,%eax
  je     L195
  movslq %edx,%rcx
  lea    (%rdi,%rcx,4),%r14
  mov    (%r14),%ecx
  cmp    %ecx,%eax
  cmovl  %ecx,%eax
  add    $0x1,%edx
  cmp    %edx,%r13d
  jle    L195
L99:
  mov    0x4(%r14),%ecx
  cmp    %ecx,%eax
  cmovl  %ecx,%eax
  add    $0x1,%edx
  cmp    %r13d,%edx
  jge    L195
  mov    0x8(%r14),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
L195:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L127
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L183:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L122
L29:
  cmp    $0x1,%r13d
  je     L13
  xor    %eax,%eax
  jmp    L195
L107:
  mov    0x0(,%rbx,4),%eax
  xor    %edx,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  mov    $0x1,%edx
  jmp    L99
L13:
  mov    0x0(,%rbx,4),%eax
  xor    %edx,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  jmp    L195
L127:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int maxSum(int arr[], int n) {
  int i, j, max = 0;
  int MSis[n];
  for (i = 0; i <= n; i++)
    MSis[i] = arr[i];
  for (i = 1; i < n; i++)
    for (j = 0; j < i; j++)
      if (arr[j] < arr[i] && MSis[i] < MSis[j] + arr[i])
        MSis[i] = MSis[j] + arr[i];
  for (i = 0; i < n; i++)
    if (max < MSis[i])
      max = MSis[i];
  return (max);
}
```