user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<nextPermutation>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  cmpl   $0x0,-0x1c(%rbp)
  je     L131
  cmpl   $0x1,-0x1c(%rbp)
  je     L131
  movl   $0xffffffff,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    $0x2,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L20
L67:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jge    L17
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x8(%rbp)
  jmp    L69
L17:
  subl   $0x1,-0x10(%rbp)
L20:
  cmpl   $0x0,-0x10(%rbp)
  jns    L67
L69:
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  jmp    L80
L136:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cmp    %eax,%edx
  jle    L60
  mov    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L71
L60:
  subl   $0x1,-0x10(%rbp)
L80:
  cmpl   $0x0,-0x10(%rbp)
  jns    L136
L71:
  cmpl   $0x0,-0x8(%rbp)
  js     L34
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x8(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0xc(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
L34:
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  mov    %eax,-0xc(%rbp)
  jmp    L133
L50:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x18(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x10(%rbp)
  subl   $0x1,-0x4(%rbp)
L133:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jle    L50
  jmp    L59
L131:
  nop
L59:
  pop    %rbp
  ret
```

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