user: Translate the below assembly code into C programming language:

```asm
<rob>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %esi,%eax
  test   %esi,%esi
  je     L20
  mov    %rdi,%rcx
  cmp    $0x1,%esi
  je     L231
  cmp    $0x2,%esi
  je     L97
  movslq %esi,%rbx
  shl    $0x2,%rbx
  lea    0xf(%rbx),%rax
  mov    %rax,%rdi
  and    $0xfffffffffffffff0,%rdi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L103:
  cmp    %rdx,%rsp
  je     L186
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L103
L231:
  mov    (%rdi),%eax
  jmp    L20
L97:
  mov    0x4(%rdi),%eax
  mov    (%rdi),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
  jmp    L20
L186:
  mov    %rdi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L164
  orq    $0x0,-0x8(%rsp,%rax,1)
L164:
  mov    %rsp,%rdx
  test   %esi,%esi
  jle    L91
  mov    $0x1,%r8d
  mov    $0x0,%eax
  mov    $0x0,%r10d
  mov    $0x0,%r11d
  lea    -0x1(%rsi),%r13d
  mov    $0x0,%r14d
  mov    $0x1,%r12d
  jmp    L65
L49:
  mov    (%rcx),%edi
  mov    %edi,(%rdx)
  mov    $0x1,%r11d
  jmp    L21
L185:
  mov    0x4(%rcx),%edi
  cmp    (%rcx),%edi
  jle    L107
  mov    %edi,0x4(%rdx)
  mov    $0x0,%r11d
  jmp    L21
L107:
  mov    (%rdx),%edi
  mov    %edi,0x4(%rdx)
  jmp    L21
L120:
  mov    %r15d,%edi
  cmp    %eax,%r13d
  cmove  %r14d,%r10d
L100:
  mov    %edi,(%rdx,%rax,4)
  cmp    %r8d,%esi
  jle    L335
L21:
  add    $0x1,%rax
  add    $0x1,%r8d
L65:
  test   %eax,%eax
  je     L49
  cmp    $0x1,%eax
  je     L185
  mov    -0x8(%rdx,%rax,4),%edi
  add    (%rcx,%rax,4),%edi
  mov    -0x4(%rdx,%rax,4),%r15d
  cmp    %edi,%r15d
  jge    L120
  cmp    %eax,%r13d
  cmove  %r12d,%r10d
  cmp    $0x2,%eax
  cmove  %r12d,%r11d
  jmp    L100
L335:
  test   %r11d,%r11d
  je     L91
  test   %r10d,%r10d
  je     L91
  lea    (%rdx,%rbx,1),%r10
  mov    -0x4(%r10),%r9d
  mov    (%rcx),%r8d
  mov    %r9d,%r11d
  sub    %r8d,%r11d
  sub    -0x4(%rcx,%rbx,1),%r9d
  mov    $0x0,%edi
  mov    $0x2,%r12d
  mov    $0x1,%ebx
  jmp    L298
L91:
  sub    $0x1,%esi
  movslq %esi,%rsi
  mov    (%rdx,%rsi,4),%eax
  jmp    L20
L219:
  mov    0x4(%rcx),%eax
  mov    %eax,0x4(%rdx)
  jmp    L87
L77:
  mov    0x4(%rcx),%eax
  mov    0x8(%rcx),%r13d
  cmp    %r13d,%eax
  cmovl  %r13d,%eax
  mov    %eax,0x8(%rdx)
L198:
  cmp    %r12d,%esi
  jle    L317
L87:
  add    $0x1,%ebx
  add    $0x1,%r12d
  add    $0x4,%rdi
L298:
  cmp    $0x1,%ebx
  je     L219
  cmp    $0x2,%ebx
  je     L77
  mov    -0x4(%rdx,%rdi,1),%eax
  add    0x4(%rcx,%rdi,1),%eax
  mov    (%rdx,%rdi,1),%r13d
  cmp    %r13d,%eax
  cmovl  %r13d,%eax
  mov    %eax,0x4(%rdx,%rdi,1)
  jmp    L198
L317:
  mov    -0x4(%r10),%edi
  lea    -0x1(%rsi),%r12d
  mov    $0x0,%eax
  jmp    L325
L43:
  mov    %r8d,(%rdx)
  jmp    L177
L346:
  mov    -0x8(%rdx,%rax,4),%esi
  add    (%rcx,%rax,4),%esi
  mov    -0x4(%rdx,%rax,4),%ebx
  cmp    %ebx,%esi
  cmovl  %ebx,%esi
  mov    %esi,(%rdx,%rax,4)
L177:
  add    $0x1,%rax
  cmp    %rax,%r12
  je     L29
L325:
  test   %eax,%eax
  je     L43
  cmp    $0x1,%eax
  jne    L346
  mov    0x4(%rcx),%esi
  cmp    %r8d,%esi
  cmovl  %r8d,%esi
  mov    %esi,0x4(%rdx)
  jmp    L177
L29:
  mov    -0x8(%r10),%eax
  cmp    %eax,%edi
  cmovge %edi,%eax
  cmp    %r11d,%eax
  cmovl  %r11d,%eax
  cmp    %r9d,%eax
  cmovl  %r9d,%eax
L20:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L122
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L122:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int rob(int *nums, int numsSize) {
  if (!numsSize)
    return (0);
  if (numsSize == 1)
    return (nums[0]);
  if (numsSize == 2)
    return (nums[0] > nums[1] ? nums[0] : nums[1]);
  int money[numsSize];
  int i, first, last, t;
  int r1, r2;
  first = last = 0;
  for (i = 0; i < numsSize; i++) {
    if (i == 0) {
      money[i] = nums[0];
      first = 1;
      continue;
    }
    if (i == 1) {
      if (nums[1] > nums[0]) {
        money[i] = nums[1];
        first = 0;
      } else {
        money[i] = money[i - 1];
      }
      continue;
    }
    t = nums[i] + money[i - 2];
    if (t > money[i - 1]) {
      money[i] = t;
      if (i == (numsSize - 1))
        last = 1;
      if ((i - 2) == 0)
        first = 1;
    } else {
      money[i] = money[i - 1];
      if (i == (numsSize - 1))
        last = 0;
    }
  }
  if (!first || !last)
    return (money[numsSize - 1]);
  first = money[numsSize - 1] - nums[0];
  last = money[numsSize - 1] - nums[numsSize - 1];
  for (i = 1; i < numsSize; i++) {
    if (i == 1) {
      money[i] = nums[i];
      continue;
    }
    if (i == 2) {
      money[i] = nums[2] > nums[1] ? nums[2] : nums[1];
      continue;
    }
    t = nums[i] + money[i - 2];
    money[i] = t > money[i - 1] ? t : money[i - 1];
  }
  r1 = money[numsSize - 1];
  for (i = 0; i < (numsSize - 1); i++) {
    if (i == 0) {
      money[i] = nums[i];
      continue;
    }
    if (i == 1) {
      money[i] = nums[1] > nums[0] ? nums[1] : nums[0];
      continue;
    }
    t = nums[i] + money[i - 2];
    money[i] = t > money[i - 1] ? t : money[i - 1];
  }
  r2 = money[numsSize - 2];
  if (last > first)
    first = last;
  if (r1 > first)
    first = r1;
  if (r2 > first)
    first = r2;
  return (first);
}
```