user: 请从给定的汇编指令推导出C源代码：

```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
  test   %esi,%esi
  je     L267
  mov    %rdi,%rcx
  cmp    $0x1,%esi
  je     L61
  cmp    $0x2,%esi
  je     L17
  movslq %esi,%r12
  mov    %rsp,%rdi
  shl    $0x2,%r12
  lea    0xf(%r12),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rdi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rdi,%rsp
  je     L167
L182:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdi,%rsp
  jne    L182
L167:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L214
  orq    $0x0,-0x8(%rsp,%rdx,1)
L214:
  mov    %rsp,%rdx
  lea    -0x1(%rsi),%r11d
  test   %esi,%esi
  jle    L34
  mov    $0x1,%edi
  xor    %eax,%eax
  xor    %ebx,%ebx
  xor    %r14d,%r14d
  xor    %r13d,%r13d
  mov    $0x1,%r10d
  jmp    L92
  nopl   0x0(%rax)
L243:
  cmp    $0x1,%eax
  je     L153
  mov    -0x4(%rdx,%rax,4),%r15d
  mov    -0x8(%rdx,%rax,4),%r8d
  add    (%rcx,%rax,4),%r8d
  cmp    %r8d,%r15d
  jge    L155
  cmp    %r11d,%eax
  mov    %r8d,%r15d
  cmove  %r10d,%ebx
  cmp    $0x2,%eax
  mov    %r15d,(%rdx,%rax,4)
  cmove  %r10d,%r14d
  cmp    %edi,%esi
  jle    L84
L249:
  add    $0x1,%rax
  add    $0x1,%edi
L92:
  test   %rax,%rax
  jne    L243
  mov    (%rcx),%r8d
  mov    $0x1,%r14d
  mov    %r8d,(%rdx)
  jmp    L249
  nop
L22:
  sub    $0x2,%esi
  mov    %r10d,%eax
  cmp    %r10d,%r8d
  movslq %esi,%rsi
  cmovge %r8d,%eax
  mov    (%rdx,%rsi,4),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
  cmp    %ebx,%eax
  cmovl  %ebx,%eax
L267:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L328
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nop
L17:
  mov    0x4(%rdi),%eax
  mov    (%rdi),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
  jmp    L267
  nopl   0x0(%rax)
L155:
  cmp    %r11d,%eax
  mov    %r15d,(%rdx,%rax,4)
  cmove  %r13d,%ebx
  cmp    %edi,%esi
  jg     L249
L84:
  movslq %r11d,%r13
  and    $0x1,%r14d
  mov    (%rdx,%r13,4),%r10d
  je     L117
  test   %ebx,%ebx
  je     L117
  mov    (%rcx),%r9d
  mov    %r10d,%r8d
  mov    $0x1,%eax
  sub    -0x4(%rcx,%r12,1),%r10d
  sub    %r9d,%r8d
  jmp    L52
  nopl   0x0(%rax)
L27:
  cmp    $0x2,%eax
  je     L2
  mov    -0x4(%rdx,%rax,4),%ebx
  mov    -0x8(%rdx,%rax,4),%edi
  add    (%rcx,%rax,4),%edi
  cmp    %ebx,%edi
  cmovl  %ebx,%edi
  mov    %edi,(%rdx,%rax,4)
  lea    0x1(%rax),%edi
  cmp    %edi,%esi
  jle    L136
L160:
  add    $0x1,%rax
L52:
  cmp    $0x1,%rax
  jne    L27
  mov    0x4(%rcx),%edi
  mov    %edi,0x4(%rdx)
  jmp    L160
  nopl   0x0(%rax)
L153:
  mov    0x4(%rcx),%r8d
  cmp    (%rcx),%r8d
  jle    L126
  mov    %r8d,0x4(%rdx)
  xor    %r14d,%r14d
  jmp    L249
  nopl   0x0(%rax)
L2:
  mov    0x4(%rcx),%edi
  mov    0x8(%rcx),%ebx
  cmp    %ebx,%edi
  cmovl  %ebx,%edi
  mov    %edi,0x8(%rdx)
  lea    0x1(%rax),%edi
  cmp    %edi,%esi
  jg     L160
L136:
  mov    (%rdx,%r13,4),%ebx
  mov    %r11d,%r12d
  xor    %eax,%eax
  test   %r11d,%r11d
  jg     L271
  jmp    L22
  nopl   0x0(%rax,%rax,1)
L33:
  cmp    $0x1,%eax
  je     L65
  mov    -0x4(%rdx,%rax,4),%r11d
  mov    -0x8(%rdx,%rax,4),%edi
  add    (%rcx,%rax,4),%edi
  cmp    %r11d,%edi
  cmovl  %r11d,%edi
  mov    %edi,(%rdx,%rax,4)
L230:
  add    $0x1,%rax
  cmp    %rax,%r12
  je     L22
L271:
  test   %rax,%rax
  jne    L33
  mov    %r9d,(%rdx)
  jmp    L230
  nopw   0x0(%rax,%rax,1)
L65:
  mov    0x4(%rcx),%edi
  cmp    %r9d,%edi
  cmovl  %r9d,%edi
  mov    %edi,0x4(%rdx)
  jmp    L230
  nopw   0x0(%rax,%rax,1)
L126:
  mov    (%rdx),%r8d
  mov    %r8d,0x4(%rdx)
  jmp    L249
L34:
  movslq %r11d,%r13
  nop
L117:
  mov    (%rdx,%r13,4),%eax
  jmp    L267
  nopl   0x0(%rax)
L61:
  mov    (%rdi),%eax
  jmp    L267
L328:
  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);
}
```