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

```asm
<nextPermutation>:
  endbr64
  movslq %esi,%rax
  cmp    $0x1,%eax
  je     L245
  lea    -0x2(%rax),%r10d
  push   %r14
  lea    -0x1(%rax),%r8d
  push   %r13
  mov    %r10d,%esi
  push   %r12
  push   %rbp
  push   %rbx
  test   %r10d,%r10d
  js     L140
  movslq %r10d,%r9
  movslq %r8d,%rdx
  shl    $0x2,%r9
  lea    (%rdi,%rdx,4),%r13
  lea    (%rdi,%r9,1),%rcx
  lea    0x8(%r9),%rbp
  mov    %rcx,%r12
L292:
  mov    (%rcx),%edx
  cmp    0x4(%rcx),%edx
  jle    L288
L7:
  sub    $0x1,%esi
  sub    $0x4,%rcx
  cmp    $0xffffffff,%esi
  jne    L292
L140:
  test   %r8d,%r8d
  jle    L162
  mov    %r10d,%r11d
  shl    $0x2,%rax
  shr    %r11d
  mov    %rax,%rcx
  lea    0x1(%r11),%edx
  mov    %rdx,%r9
  shl    $0x2,%rdx
  sub    %rdx,%rcx
  cmp    %rdx,%rcx
  setge  %dl
  test   %rax,%rax
  setle  %cl
  or     %cl,%dl
  je     L276
  cmp    $0x1,%r10d
  jbe    L276
  cmp    $0x5,%r10d
  jbe    L81
  mov    %r9d,%esi
  mov    %rdi,%rdx
  lea    -0x10(%rdi,%rax,1),%rcx
  shr    $0x2,%esi
  sub    $0x1,%esi
  shl    $0x4,%rsi
  lea    0x10(%rdi,%rsi,1),%rsi
  xchg   %ax,%ax
L307:
  movdqu (%rcx),%xmm5
  movdqu (%rdx),%xmm1
  add    $0x10,%rdx
  sub    $0x10,%rcx
  pshufd $0x1b,%xmm5,%xmm0
  pxor   %xmm0,%xmm1
  movups %xmm1,-0x10(%rdx)
  movdqu 0x10(%rcx),%xmm6
  pshufd $0x1b,%xmm6,%xmm0
  pxor   %xmm1,%xmm0
  pshufd $0x1b,%xmm0,%xmm1
  movups %xmm1,0x10(%rcx)
  movdqu -0x10(%rdx),%xmm7
  pxor   %xmm7,%xmm0
  movups %xmm0,-0x10(%rdx)
  cmp    %rdx,%rsi
  jne    L307
  mov    %r9d,%ecx
  and    $0xfffffffc,%ecx
  mov    %ecx,%edx
  sub    %ecx,%r8d
  cmp    %ecx,%r9d
  je     L162
L180:
  sub    %ecx,%r9d
  cmp    %ecx,%r11d
  je     L104
  shl    $0x2,%rcx
  sub    $0x8,%rax
  sub    %rcx,%rax
  lea    (%rdi,%rcx,1),%rsi
  add    %rdi,%rax
  movq   (%rsi),%xmm1
  movq   (%rax),%xmm0
  pshufd $0xe1,%xmm0,%xmm0
  pxor   %xmm0,%xmm1
  movq   %xmm1,(%rsi)
  movq   (%rax),%xmm0
  pshufd $0xe1,%xmm0,%xmm0
  pxor   %xmm1,%xmm0
  pshufd $0xe1,%xmm0,%xmm1
  movq   %xmm1,(%rax)
  movq   (%rsi),%xmm1
  mov    %r9d,%eax
  and    $0xfffffffe,%eax
  pxor   %xmm0,%xmm1
  sub    %eax,%r8d
  add    %eax,%edx
  movq   %xmm1,(%rsi)
  cmp    %eax,%r9d
  je     L162
L104:
  movslq %edx,%rax
  movslq %r8d,%r8
  lea    (%rdi,%rax,4),%rdx
  lea    (%rdi,%r8,4),%rcx
  mov    (%rdx),%eax
  xor    (%rcx),%eax
  mov    %eax,(%rdx)
  xor    (%rcx),%eax
  mov    %eax,(%rcx)
  xor    %eax,(%rdx)
L162:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L288:
  cmp    %r8d,%esi
  jge    L7
  mov    %r10d,%r11d
  mov    %r12,%r14
  mov    %r13,%rbx
  sub    %esi,%r11d
  shl    $0x2,%r11
  sub    %r11,%r14
L40:
  mov    (%rbx),%r11d
  cmp    %r11d,%edx
  jge    L82
  xor    %r11d,%edx
  lea    (%rax,%rsi,1),%r8d
  lea    0x1(%rsi),%r10d
  mov    %edx,(%rcx)
  lea    -0x1(%r8),%eax
  xor    (%rbx),%edx
  mov    %edx,(%rbx)
  xor    %edx,(%rcx)
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %eax,%edx
  sar    %edx
  cmp    %r10d,%edx
  jl     L162
  mov    %edx,%r11d
  movslq %esi,%r12
  sub    %esi,%r11d
  lea    0x1(%r12),%rbx
  mov    %r11d,%eax
  lea    0x0(,%rbx,4),%rcx
  lea    (%rbx,%rax,1),%r13
  neg    %rax
  lea    0x0(%rbp,%rax,4),%rax
  shl    $0x2,%r13
  cmp    %rax,%r13
  setle  %al
  cmp    %rcx,%rbp
  setle  %bpl
  or     %bpl,%al
  je     L70
  cmp    $0x1,%r11d
  je     L70
  lea    -0x1(%r11),%eax
  cmp    $0x2,%eax
  jbe    L59
  lea    (%rdi,%rcx,1),%rax
  mov    %r11d,%ecx
  lea    -0x8(%rdi,%r9,1),%rdx
  shr    $0x2,%ecx
  lea    -0x1(%rcx),%esi
  lea    0x10(%rax),%rcx
  shl    $0x4,%rsi
  add    %rcx,%rsi
  jmp    L272
  nopw   0x0(%rax,%rax,1)
L4:
  add    $0x10,%rcx
L272:
  movdqu (%rdx),%xmm2
  movdqu (%rax),%xmm1
  sub    $0x10,%rdx
  pshufd $0x1b,%xmm2,%xmm0
  pxor   %xmm0,%xmm1
  movups %xmm1,(%rax)
  movdqu 0x10(%rdx),%xmm3
  pshufd $0x1b,%xmm3,%xmm0
  pxor   %xmm1,%xmm0
  pshufd $0x1b,%xmm0,%xmm1
  movups %xmm1,0x10(%rdx)
  movdqu (%rax),%xmm4
  pxor   %xmm4,%xmm0
  movups %xmm0,(%rax)
  mov    %rcx,%rax
  cmp    %rsi,%rcx
  jne    L4
  mov    %r11d,%eax
  and    $0xfffffffc,%eax
  add    %eax,%r10d
  cmp    %eax,%r11d
  je     L162
  sub    %eax,%r11d
  cmp    $0x1,%r11d
  je     L255
L279:
  add    %rax,%rbx
  neg    %rax
  lea    (%r9,%rax,4),%rax
  lea    (%rdi,%rbx,4),%rdx
  add    %rdi,%rax
  movq   (%rdx),%xmm1
  movq   (%rax),%xmm0
  pshufd $0xe1,%xmm0,%xmm0
  pxor   %xmm0,%xmm1
  movq   %xmm1,(%rdx)
  movq   (%rax),%xmm0
  pshufd $0xe1,%xmm0,%xmm0
  pxor   %xmm1,%xmm0
  pshufd $0xe1,%xmm0,%xmm1
  movq   %xmm1,(%rax)
  movq   (%rdx),%xmm1
  mov    %r11d,%eax
  and    $0xfffffffe,%eax
  pxor   %xmm0,%xmm1
  add    %eax,%r10d
  movq   %xmm1,(%rdx)
  cmp    %r11d,%eax
  je     L162
L255:
  movslq %r10d,%rax
  lea    (%rdi,%rax,4),%rdx
  mov    %r8d,%eax
  sub    %r10d,%eax
  cltq
  lea    (%rdi,%rax,4),%rcx
  mov    (%rdx),%eax
  xor    (%rcx),%eax
  mov    %eax,(%rdx)
  xor    (%rcx),%eax
  mov    %eax,(%rcx)
  xor    %eax,(%rdx)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L82:
  sub    $0x4,%rbx
  cmp    %rbx,%r14
  jne    L40
  jmp    L7
  nopw   0x0(%rax,%rax,1)
L245:
  ret
  nopl   0x0(%rax)
L70:
  sub    %esi,%edx
  movslq %r8d,%rax
  add    %rdi,%rcx
  sub    $0x1,%edx
  sub    %rbx,%rax
  add    %r12,%rdx
  lea    (%rdi,%rax,4),%rax
  lea    0x8(%rdi,%rdx,4),%rsi
  nopw   0x0(%rax,%rax,1)
L309:
  mov    (%rcx),%edx
  xor    (%rax),%edx
  sub    $0x4,%rax
  mov    %edx,(%rcx)
  xor    0x4(%rax),%edx
  mov    %edx,0x4(%rax)
  xor    %edx,(%rcx)
  add    $0x4,%rcx
  cmp    %rsi,%rcx
  jne    L309
  jmp    L162
L59:
  xor    %eax,%eax
  jmp    L279
L276:
  movslq %r8d,%r8
  xor    %edx,%edx
  nopl   0x0(%rax)
L46:
  mov    (%rdi,%r8,4),%eax
  xor    (%rdi,%rdx,4),%eax
  mov    %eax,(%rdi,%rdx,4)
  xor    (%rdi,%r8,4),%eax
  mov    %eax,(%rdi,%r8,4)
  sub    $0x1,%r8
  xor    %eax,(%rdi,%rdx,4)
  add    $0x1,%rdx
  cmp    %edx,%r8d
  jg     L46
  jmp    L162
L81:
  xor    %ecx,%ecx
  xor    %edx,%edx
  jmp    L180
```

assistant: ```c
void nextPermutation(int *nums, int numsSize) {
  if (numsSize == 1)
    return;
  for (int i = numsSize - 2; i >= 0; i--) {
    if (nums[i] > nums[i + 1])
      continue;
    for (int j = numsSize - 1; j > i; j--) {
      if (nums[i] >= nums[j])
        continue;
      nums[i] ^= nums[j];
      nums[j] ^= nums[i];
      nums[i] ^= nums[j];
      for (int k = i + 1; k <= (i + numsSize - 1) / 2; k++) {
        nums[k] ^= nums[numsSize + i - k];
        nums[numsSize + i - k] ^= nums[k];
        nums[k] ^= nums[numsSize + i - k];
      }
      return;
    }
  }
  for (int k = 0; k < numsSize - 1 - k; k++) {
    nums[k] ^= nums[numsSize - 1 - k];
    nums[numsSize - 1 - k] ^= nums[k];
    nums[k] ^= nums[numsSize - 1 - k];
  }
}
```