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

```asm
<aiSearchBestSitu>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    D2(%rip),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x44(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L16
L76:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x20(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L62
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
L62:
  addl   $0x1,-0x30(%rbp)
L16:
  mov    -0x30(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L76
  movl   $0x0,-0x2c(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L9
L130:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  ucomisd -0x20(%rbp),%xmm0
  jp     L95
  ucomisd -0x20(%rbp),%xmm0
  jne    L95
  mov    -0x30(%rbp),%eax
  jmp    L103
L95:
  addl   $0x1,-0x30(%rbp)
L9:
  mov    -0x30(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L130
  movl   $0x0,-0x30(%rbp)
  jmp    L40
L53:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x18(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L147
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L147:
  addl   $0x1,-0x30(%rbp)
L40:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L53
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x30(%rbp)
  jmp    L92
L36:
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  ucomisd -0x18(%rbp),%xmm0
  jp     L0
  ucomisd -0x18(%rbp),%xmm0
  jne    L0
  mov    -0x30(%rbp),%eax
  jmp    L103
L0:
  addl   $0x1,-0x30(%rbp)
L92:
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L36
  mov    $0x0,%eax
  call   <rand@plt>
  cltd
  idivl  -0x28(%rbp)
  mov    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x24(%rbp),%eax
L103:
  leave
  ret
```

assistant: ```c
int aiSearchBestSitu(double CoG[], int turns[], int situNum) {
  int i, cntCog, cntTurn, bestSitu;
  int *bestSitusCog = malloc(situNum * sizeof(int));
  int *bestSitusTurn = malloc(situNum * sizeof(int));
  double lowerCog = INT_MAX;
  double fewerTurn = situNum;
  for (i = 0; i < situNum; i++) {
    if (CoG[i] < lowerCog) {
      lowerCog = CoG[i];
    }
  }
  cntCog = 0;
  for (i = 0; i < situNum; i++) {
    if (CoG[i] == lowerCog) {
      return i;
      bestSitusCog[cntCog] = i;
      cntCog++;
    }
  }
  for (i = 0; i < cntCog; i++) {
    if (turns[bestSitusCog[i]] < fewerTurn) {
      fewerTurn = turns[bestSitusCog[i]];
    }
  }
  cntTurn = 0;
  for (i = 0; i < cntCog; i++) {
    if (turns[bestSitusCog[i]] == fewerTurn) {
      return i;
      bestSitusTurn[cntTurn] = i;
      cntTurn++;
    }
  }
  bestSitu = bestSitusTurn[rand() % cntTurn];
  free(bestSitusCog);
  free(bestSitusTurn);
  return (bestSitu);
}
```