user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<update_map2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  mov    %r8,-0x78(%rbp)
  mov    %r9,-0x80(%rbp)
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x88(%rbp)
  pxor   %xmm0,%xmm0
  cvtsd2ss %xmm1,%xmm0
  movss  %xmm0,-0x90(%rbp)
  movss  -0x88(%rbp),%xmm0
  movaps %xmm0,%xmm1
  mulss  %xmm0,%xmm1
  movss  D6(%rip),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x2c(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x24(%rbp)
  movl   $0x1,-0x44(%rbp)
  jmp    L1
L27:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edi
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    0x18(%rbp),%r9d
  mov    -0x44(%rbp),%r10d
  mov    -0x70(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  sub    $0x8,%rsp
  mov    0x10(%rbp),%r8d
  push   %r8
  mov    0x20(%rbp),%r8d
  push   %r8
  push   %rdi
  mov    %r10d,%r8d
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <find_winner_pe2@plt>
  add    $0x20,%rsp
  mov    %eax,(%rbx)
  addl   $0x1,-0x44(%rbp)
L1:
  mov    -0x44(%rbp),%eax
  cmp    0x28(%rbp),%eax
  jle    L27
  movl   $0x1,-0x40(%rbp)
  jmp    L80
L86:
  movl   $0x1,-0x3c(%rbp)
  jmp    L32
L77:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L32:
  mov    -0x3c(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jle    L77
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x34(%rbp)
  movl   $0x1,-0x44(%rbp)
  jmp    L92
L25:
  movl   $0x0,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x1c(%rbp)
  movl   $0x1,-0x3c(%rbp)
  jmp    L14
L8:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x68(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  sub    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  imul   %eax,%eax
  add    %eax,-0x38(%rbp)
  addl   $0x1,-0x3c(%rbp)
L14:
  mov    -0x3c(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L8
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x38(%rbp),%xmm0
  mulss  -0x30(%rbp),%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm0,%xmm2
  movq   %xmm2,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  -0x34(%rbp),%xmm0
  addss  -0x18(%rbp),%xmm0
  movss  %xmm0,-0x34(%rbp)
  movl   $0x1,-0x3c(%rbp)
  jmp    L39
L93:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  -0x18(%rbp),%xmm0
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L39:
  mov    -0x3c(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jle    L93
  addl   $0x1,-0x44(%rbp)
L92:
  mov    -0x44(%rbp),%eax
  cmp    0x28(%rbp),%eax
  jle    L25
  movss  D19(%rip),%xmm0
  divss  -0x34(%rbp),%xmm0
  movss  %xmm0,-0x34(%rbp)
  movl   $0x1,-0x3c(%rbp)
  jmp    L50
L37:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x3c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mulss  -0x34(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x3c(%rbp)
L50:
  mov    -0x3c(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jle    L37
  addl   $0x1,-0x40(%rbp)
L80:
  mov    -0x40(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jle    L86
  mov    0x28(%rbp),%r8d
  mov    0x20(%rbp),%edi
  mov    0x18(%rbp),%ecx
  mov    -0x70(%rbp),%rdx
  mov    -0x60(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <rms_data_weights@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x20(%rbp)
  movss  -0x20(%rbp),%xmm0
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D6
type_infered: byte[4]
name: disassemble_data
arguments: tag: D19
type_infered: f32

tool: {"D6": [0x00,0x00,0x00,0xbf]}

tool: D19: 1

assistant: ```c
float update_map2(map, a, coords, data, win_list, weight_list, sigmax, dim, ivars, total_units, samples, mode)
float **map, **data, **a, sigmax, *weight_list, mode;
int **coords, *win_list;
int dim, ivars, total_units, samples;
{
  int i, j, k, winner, dist, diff, time_count;
  float factorx, c, distf, sum, ypred, d, weight_sumx;
  float weightx, tot_error, tot_error2, rms_error, rms_data_weights(), curve_weight();
  float mean, std, maxw, minw;
  factorx = -.5 / (sigmax * sigmax);
  mean = 0;
  maxw = 0;
  minw = 0;
  for (i = 1; i <= samples; i++) {
    win_list[i] = find_winner_pe2(map, a, coords, data, i, ivars, win_list[i], total_units, dim);
  }
  for (j = 1; j <= total_units; j++) {
    for (k = 1; k <= ivars; k++)
      map[j][k] = 0;
    weight_sumx = 0;
    for (i = 1; i <= samples; i++) {
      dist = 0;
      winner = win_list[i];
      for (k = 1; k <= dim; k++) {
        diff = coords[winner][k] - coords[j][k];
        dist = dist + diff * diff;
      }
      weightx = exp(dist * factorx);
      weight_sumx += weightx;
      for (k = 1; k <= ivars; k++)
        map[j][k] += data[i][k] * weightx;
    }
    weight_sumx = 1.0 / weight_sumx;
    for (k = 1; k <= ivars; k++)
      map[j][k] = map[j][k] * weight_sumx;
  }
  rms_error = rms_data_weights(map, a, data, ivars, total_units, samples);
  return (rms_error);
}
```