user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<rob3>:
  endbr64
  mov    $0x0,%eax
  test   %esi,%esi
  jle    L179
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r15
  mov    %esi,%r12d
  movslq %esi,%rax
  mov    %rax,0x18(%rsp)
  lea    0x0(,%rsi,8),%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  lea    0x0(,%r12,4),%r14d
  mov    %r12d,%eax
  lea    (%rbx,%rax,8),%r13
  mov    %rbx,%rbp
L143:
  mov    %r14d,%edi
  call   <malloc@plt>
  mov    %rax,0x0(%rbp)
  add    $0x8,%rbp
  cmp    %r13,%rbp
  jne    L143
  mov    %r12d,%esi
  shl    $0x2,%rsi
  mov    $0x0,%eax
L84:
  mov    (%r15,%rax,1),%ecx
  mov    (%rbx,%rax,2),%rdx
  mov    %ecx,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L84
  cmp    $0x1,%r12d
  jle    L87
  lea    -0x1(%r12),%eax
  mov    %eax,0x8(%rsp)
  movq   $0x8,0x10(%rsp)
  movl   $0x2,0xc(%rsp)
  jmp    L104
L160:
  add    $0x1,%ebp
  add    $0x1,%r10
  add    $0x8,%r12
  add    $0x1,%r9d
  add    $0x1,%r11d
  add    $0x4,%r13
  cmp    0x8(%rsp),%ebp
  je     L70
L106:
  mov    %r12,%r8
  mov    (%rsp),%rax
  lea    (%rax,%r13,1),%rdi
  mov    D3(%rip),%rax
  mov    (%rax),%edx
  mov    (%r12),%rax
  mov    %edx,(%rax,%rdi,1)
  lea    -0x1(%r9),%eax
  cmp    %eax,%ebp
  jg     L160
  mov    %r13,%rdx
  mov    %ebp,%eax
  jmp    L145
L70:
  addl   $0x1,0xc(%rsp)
  addq   $0x4,0x10(%rsp)
  subl   $0x1,0x8(%rsp)
  je     L87
L104:
  mov    0x8(%rsp),%eax
  sub    $0x1,%eax
  js     L70
  mov    0xc(%rsp),%eax
  mov    %eax,%r9d
  lea    -0x2(%rax),%r11d
  mov    %rbx,%r12
  mov    $0xfffffffffffffff8,%r13
  mov    $0x1,%r10d
  mov    $0x0,%ebp
  mov    0x10(%rsp),%rax
  add    $0x4,%rax
  mov    %rax,(%rsp)
  jmp    L106
L87:
  mov    (%rbx),%rax
  mov    0x18(%rsp),%rbx
  mov    -0x4(%rax,%rbx,4),%eax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L36:
  mov    (%r8),%rsi
  add    (%rsi,%rdx,1),%ecx
  jmp    L154
L97:
  cmp    %r11d,%eax
  jge    L154
  mov    0x20(%rbx,%rdx,2),%rsi
  add    (%rsi,%rdi,1),%ecx
L154:
  mov    %rdi,%rsi
  add    (%r8),%rsi
  cmp    %ecx,(%rsi)
  jge    L132
  mov    %ecx,(%rsi)
L132:
  add    $0x1,%eax
  add    $0x4,%rdx
  cmp    %r9d,%eax
  je     L160
L145:
  mov    0x8(%r15,%rdx,1),%ecx
  cmp    %r10d,%eax
  jle    L97
  cmp    %r11d,%eax
  jge    L36
  mov    0x20(%rbx,%rdx,2),%rsi
  mov    (%rsi,%rdi,1),%esi
  mov    (%r8),%r14
  add    (%r14,%rdx,1),%esi
  add    %esi,%ecx
  jmp    L154
L179:
  ret
```

assistant: ```c
int rob3(int *nums, int numsSize) {
  if (numsSize <= 0)
    return 0;
  int **array = malloc(sizeof(int *) * numsSize);
  for (int i = 0; i < numsSize; i++)
    array[i] = malloc(sizeof(int) * numsSize);
  for (int i = 0; i < numsSize; i++)
    array[i][i] = nums[i];
  for (int length = 2; length <= numsSize; length++) {
    for (int i = 0; i < numsSize - length + 1; i++) {
      int j = i + length - 1;
      array[i][j] = INT_MIN;
      for (int k = i; k <= j; k++) {
        int tmp = nums[k];
        if (k >= 2 + i && k <= j - 2)
          tmp += array[i][k - 2] + array[k + 2][j];
        else if (k <= j - 2)
          tmp += array[k + 2][j];
        else if (k >= 2 + i)
          tmp += array[i][k - 2];
        if (array[i][j] < tmp)
          array[i][j] = tmp;
      }
    }
  }
  return array[0][numsSize - 1];
}
```