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     L21
L32:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L32
L21:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L170
L5:
  lea    0x3(%rsp),%rdi
  mov    %rdi,%rbx
  and    $0xfffffffffffffffc,%rdi
  shr    $0x2,%rbx
  mov    %rdi,%r14
  test   %r13d,%r13d
  js     L70
  lea    0x4(,%r15,4),%rdx
  mov    %r12,%rsi
  call   <memcpy@plt>
  mov    %r14,%rdi
  cmp    $0x1,%r13d
  jle    L70
  mov    $0x1,%edx
  nopw   0x0(%rax,%rax,1)
L35:
  mov    (%r12,%rdx,4),%ecx
  xor    %eax,%eax
  xchg   %ax,%ax
L49:
  cmp    %ecx,(%r12,%rax,4)
  jge    L152
  mov    (%rdi,%rax,4),%esi
  add    %ecx,%esi
  cmp    %esi,(%rdi,%rdx,4)
  jge    L152
  mov    %esi,(%rdi,%rdx,4)
L152:
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L49
  lea    0x1(%rax),%rdx
  cmp    %r15,%rdx
  jne    L35
  test   %r13d,%r13d
  mov    $0x1,%ecx
  cmovg  %r13d,%ecx
  cmp    $0x3,%r13d
  jle    L96
  mov    %ecx,%edx
  pxor   %xmm2,%xmm2
  mov    %rdi,%rax
  shr    $0x2,%edx
  shl    $0x4,%rdx
  add    %rdi,%rdx
  xchg   %ax,%ax
L197:
  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    L197
  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     L163
  movslq %edx,%rcx
  lea    (%rdi,%rcx,4),%r14
  mov    (%r14),%ecx
  cmp    %ecx,%eax
  cmovl  %ecx,%eax
  add    $0x1,%edx
  cmp    %edx,%r13d
  jle    L163
L184:
  mov    0x4(%r14),%ecx
  cmp    %ecx,%eax
  cmovl  %ecx,%eax
  add    $0x1,%edx
  cmp    %r13d,%edx
  jge    L163
  mov    0x8(%r14),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
L163:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L60
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L170:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L5
L70:
  cmp    $0x1,%r13d
  je     L79
  xor    %eax,%eax
  jmp    L163
L96:
  mov    0x0(,%rbx,4),%eax
  xor    %edx,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  mov    $0x1,%edx
  jmp    L184
L79:
  mov    0x0(,%rbx,4),%eax
  xor    %edx,%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  jmp    L163
L60:
  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;
}
```