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     L262
  mov    %rdi,%rcx
  cmp    $0x1,%esi
  je     L108
  cmp    $0x2,%esi
  je     L183
  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     L148
L77:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdi,%rsp
  jne    L77
L148:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  je     L149
  orq    $0x0,-0x8(%rsp,%rdx,1)
L149:
  mov    %rsp,%rdx
  lea    -0x1(%rsi),%r9d
  test   %esi,%esi
  jle    L338
  mov    $0x1,%r8d
  xor    %eax,%eax
  xor    %ebx,%ebx
  xor    %r14d,%r14d
  xor    %r13d,%r13d
  mov    $0x1,%r11d
  jmp    L121
  nopl   (%rax)
L197:
  cmp    $0x1,%eax
  je     L82
  mov    -0x4(%rdx,%rax,4),%r15d
  mov    -0x8(%rdx,%rax,4),%edi
  add    (%rcx,%rax,4),%edi
  cmp    %edi,%r15d
  jge    L326
  cmp    %r9d,%eax
  mov    %edi,(%rdx,%rax,4)
  cmove  %r11d,%ebx
  cmp    $0x2,%eax
  cmove  %r11d,%r14d
  cmp    %r8d,%esi
  jle    L243
L328:
  add    $0x1,%rax
  add    $0x1,%r8d
L121:
  test   %rax,%rax
  jne    L197
  mov    (%rcx),%edi
  mov    $0x1,%r14d
  mov    %edi,(%rdx)
  jmp    L328
  nopl   0x0(%rax)
L74:
  sub    $0x2,%esi
  mov    %r11d,%eax
  cmp    %r11d,%r8d
  movslq %esi,%rsi
  cmovge %r8d,%eax
  mov    (%rdx,%rsi,4),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
  cmp    %ebx,%eax
  cmovl  %ebx,%eax
L262:
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L289
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nop
L183:
  mov    0x4(%rdi),%eax
  mov    (%rdi),%edx
  cmp    %edx,%eax
  cmovl  %edx,%eax
  jmp    L262
  nopl   0x0(%rax)
L326:
  mov    %r15d,%edi
  cmp    %r9d,%eax
  mov    %edi,(%rdx,%rax,4)
  cmove  %r13d,%ebx
  cmp    %r8d,%esi
  jg     L328
L243:
  movslq %r9d,%r13
  and    $0x1,%r14d
  mov    (%rdx,%r13,4),%r11d
  je     L165
  test   %ebx,%ebx
  je     L165
  mov    (%rcx),%r10d
  mov    %r11d,%r8d
  mov    $0x1,%eax
  sub    -0x4(%rcx,%r12,1),%r11d
  sub    %r10d,%r8d
  jmp    L244
  nopl   0x0(%rax)
L88:
  cmp    $0x2,%eax
  je     L64
  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    L261
L46:
  add    $0x1,%rax
L244:
  cmp    $0x1,%rax
  jne    L88
  mov    0x4(%rcx),%edi
  mov    %edi,0x4(%rdx)
  jmp    L46
  nopl   0x0(%rax)
L82:
  mov    0x4(%rcx),%edi
  cmp    (%rcx),%edi
  jle    L76
  mov    %edi,0x4(%rdx)
  xor    %r14d,%r14d
  jmp    L328
  cs nopw 0x0(%rax,%rax,1)
L64:
  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     L46
L261:
  mov    (%rdx,%r13,4),%ebx
  mov    %r9d,%r12d
  xor    %eax,%eax
  test   %r9d,%r9d
  jg     L309
  jmp    L74
  nopl   0x0(%rax,%rax,1)
L152:
  cmp    $0x1,%eax
  je     L136
  mov    -0x4(%rdx,%rax,4),%r9d
  mov    -0x8(%rdx,%rax,4),%edi
  add    (%rcx,%rax,4),%edi
  cmp    %r9d,%edi
  cmovl  %r9d,%edi
  mov    %edi,(%rdx,%rax,4)
L62:
  add    $0x1,%rax
  cmp    %rax,%r12
  je     L74
L309:
  test   %rax,%rax
  jne    L152
  mov    %r10d,(%rdx)
  jmp    L62
  nopw   0x0(%rax,%rax,1)
L136:
  mov    0x4(%rcx),%edi
  cmp    %r10d,%edi
  cmovl  %r10d,%edi
  mov    %edi,0x4(%rdx)
  jmp    L62
  nopw   0x0(%rax,%rax,1)
L76:
  mov    (%rdx),%edi
  mov    %edi,0x4(%rdx)
  jmp    L328
L338:
  movslq %r9d,%r13
  nopl   (%rax)
L165:
  mov    (%rdx,%r13,4),%eax
  jmp    L262
  nopl   0x0(%rax)
L108:
  mov    (%rdi),%eax
  jmp    L262
L289:
  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);
}
```