user: 下面的汇编指令对应的C源代码是什么:

```asm
<chunk_creation_servers>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x38(%rbp),%rdx
  mov    -0x48(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <matocsserv_getservers_wrandom@plt>
  mov    %eax,-0x28(%rbp)
  cmpl   $0x0,-0x28(%rbp)
  jne    L180
  mov    -0x38(%rbp),%eax
  test   %eax,%eax
  setg   %al
  movzbl %al,%edx
  mov    -0x58(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  jmp    L331
L180:
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edi
  call   <labelset_get_create_mode@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edi
  call   <labelset_get_create_goal@plt>
  mov    %eax,-0x20(%rbp)
  mov    -0x28(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L246
  mov    -0x38(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x20(%rbp)
  jg     L246
  mov    -0x58(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x0,%eax
  jmp    L331
L246:
  mov    -0x58(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x4c(%rbp),%eax
  mov    %eax,%edi
  call   <labelset_has_create_labels@plt>
  test   %rax,%rax
  je     L282
  lea    -0x18(%rbp),%rdx
  mov    -0x4c(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <labelset_get_create_labelmasks@plt>
  mov    %eax,-0x20(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L296
L27:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x30(%rbp)
L296:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cmp    %eax,-0x30(%rbp)
  jl     L27
  mov    -0x18(%rbp),%rdx
  mov    -0x48(%rbp),%rcx
  mov    -0x28(%rbp),%esi
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <do_perfect_match@plt>
  mov    %rax,-0x10(%rbp)
  cmpl   $0x2,-0x24(%rbp)
  je     L16
  movl   $0x0,-0x34(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L242
L165:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L310
  movl   $0x0,-0x2c(%rbp)
  jmp    L133
L99:
  mov    -0x20(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  sub    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L35
  mov    -0x20(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%rax
  add    %rcx,%rax
  sub    $0x1,%edx
  mov    %edx,(%rax)
  mov    -0x20(%rbp),%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  sub    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x30(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L83
L35:
  addl   $0x1,-0x2c(%rbp)
L133:
  mov    -0x2c(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L99
  jmp    L83
L310:
  addl   $0x1,-0x34(%rbp)
L83:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L340
  addl   $0x1,-0x30(%rbp)
L242:
  mov    -0x30(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jl     L165
  jmp    L328
L340:
  nop
L328:
  cmpl   $0x1,-0x24(%rbp)
  jne    L16
  mov    -0x34(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L16
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x20(%rbp)
  jg     L16
  mov    -0x58(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x0,%eax
  jmp    L331
L16:
  movl   $0x0,-0x30(%rbp)
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L254
L245:
  addl   $0x1,-0x30(%rbp)
L138:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jge    L191
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jns    L245
  jmp    L191
L43:
  subl   $0x1,-0x2c(%rbp)
L191:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jge    L239
  mov    -0x20(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  js     L43
L239:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jge    L254
  mov    -0x20(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x20(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    -0x20(%rbp),%ecx
  mov    -0x30(%rbp),%edx
  add    %ecx,%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x10(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x20(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x48(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x1c(%rbp),%eax
  mov    %eax,(%rdx)
L254:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L138
  cmpl   $0x2,-0x24(%rbp)
  jne    L282
  mov    -0x30(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jge    L60
  mov    -0x38(%rbp),%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x20(%rbp)
  jg     L60
  mov    -0x58(%rbp),%rax
  movl   $0x1,(%rax)
  mov    $0x0,%eax
  jmp    L331
L60:
  mov    -0x30(%rbp),%eax
  jmp    L331
L282:
  mov    -0x28(%rbp),%eax
L331:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L127
  call   <__stack_chk_fail@plt>
L127:
  leave
  ret
```

assistant: ```c
uint16_t chunk_creation_servers(uint16_t csids[10000], uint8_t lsetid, uint8_t *olflag) {
  int32_t *matching;
  uint32_t **labelmasks;
  uint8_t labelcnt;
  uint8_t create_mode;
  uint16_t servcount;
  uint16_t goodlabelscount;
  uint16_t overloaded;
  uint32_t i, j;
  int32_t x;
  servcount = matocsserv_getservers_wrandom(csids, &overloaded);
  if (servcount == 0) {
    *olflag = (overloaded > 0) ? 1 : 0;
    return 0;
  }
  create_mode = labelset_get_create_mode(lsetid);
  labelcnt = labelset_get_create_goal(lsetid);
  if (servcount < labelcnt && servcount + overloaded >= labelcnt) {
    *olflag = 1;
    return 0;
  } else {
    *olflag = 0;
  }
  if (labelset_has_create_labels(lsetid)) {
    labelcnt = labelset_get_create_labelmasks(lsetid, &labelmasks);
    for (i = 0; i < servcount / 2; i++) {
      x = csids[i];
      csids[i] = csids[servcount - 1 - i];
      csids[servcount - 1 - i] = x;
    }
    matching = do_perfect_match(labelcnt, servcount, labelmasks, csids);
    if (create_mode != 2) {
      goodlabelscount = 0;
      for (i = 0; i < labelcnt; i++) {
        if (matching[i] < 0) {
          for (j = 0; j < servcount; j++) {
            if (matching[labelcnt + servcount - j - 1] < 0) {
              matching[i] = labelcnt + servcount - j - 1;
              matching[labelcnt + servcount - j - 1] = i;
              break;
            }
          }
        } else {
          goodlabelscount++;
        }
        if (matching[i] < 0) {
          break;
        }
      }
      if (create_mode == 1) {
        if (goodlabelscount < labelcnt && goodlabelscount + overloaded >= labelcnt) {
          *olflag = 1;
          return 0;
        }
      }
    }
    i = 0;
    j = servcount - 1;
    while (i < j) {
      while (i < j && matching[labelcnt + i] >= 0) {
        i++;
      }
      while (i < j && matching[labelcnt + j] < 0) {
        j--;
      }
      if (i < j) {
        x = matching[labelcnt + i];
        matching[labelcnt + i] = matching[labelcnt + j];
        matching[labelcnt + j] = x;
        x = csids[i];
        csids[i] = csids[j];
        csids[j] = x;
      }
    }
    if (create_mode == 2) {
      if (i < labelcnt && i + overloaded >= labelcnt) {
        *olflag = 1;
        return 0;
      }
      return i;
    }
  }
  return servcount;
}
```