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

```asm
<update_map>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,%rax
  mov    %rdx,%rdi
  mov    %rdx,0x10(%rsp)
  mov    %rcx,0x28(%rsp)
  mov    %r8,0x8(%rsp)
  mov    %r9d,0x18(%rsp)
  mov    0x70(%rsp),%r14d
  mov    0x78(%rsp),%edx
  cvtsd2ss %xmm0,%xmm0
  mulss  %xmm0,%xmm0
  movss  D14(%rip),%xmm1
  divss  %xmm0,%xmm1
  movss  %xmm1,0x4(%rsp)
  test   %edx,%edx
  jle    L3
  lea    0x8(%rax),%rbx
  lea    0x8(%rdi),%r15
  lea    -0x1(%rdx),%edx
  lea    0x10(%rax,%rdx,8),%rax
  mov    %rax,0x20(%rsp)
  lea    -0x1(%r14),%eax
  lea    0x8(,%rax,4),%r12
  lea    0x1(%r9),%eax
  mov    %eax,0x1c(%rsp)
  jmp    L130
L19:
  mov    $0x0,%ecx
  jmp    L34
L141:
  cmpl   $0x0,0x80(%rsp)
  jle    L136
L10:
  mov    0x28(%rsp),%rax
  lea    0x8(%rax),%rbp
  mov    $0x1,%r13d
  pxor   %xmm4,%xmm4
  movss  %xmm4,(%rsp)
L143:
  mov    0x8(%rsp),%rax
  mov    (%rax,%r13,4),%eax
  cmpl   $0x0,0x18(%rsp)
  jle    L19
  cltq
  mov    0x10(%rsp),%rdi
  mov    (%rdi,%rax,8),%r8
  mov    (%r15),%rdi
  mov    0x1c(%rsp),%esi
  mov    $0x1,%edx
  mov    $0x0,%ecx
L12:
  mov    (%r8,%rdx,4),%eax
  sub    (%rdi,%rdx,4),%eax
  imul   %eax,%eax
  add    %eax,%ecx
  add    $0x1,%rdx
  cmp    %rsi,%rdx
  jne    L12
L34:
  pxor   %xmm0,%xmm0
  cvtsi2ss %ecx,%xmm0
  mulss  0x4(%rsp),%xmm0
  cvtss2sd %xmm0,%xmm0
  call   <exp@plt>
  pxor   %xmm1,%xmm1
  cvtsd2ss %xmm0,%xmm1
  movss  (%rsp),%xmm2
  addss  %xmm1,%xmm2
  movss  %xmm2,(%rsp)
  test   %r14d,%r14d
  jle    L2
  mov    $0x4,%eax
L128:
  mov    %rax,%rdx
  add    (%rbx),%rdx
  mov    0x0(%rbp),%rcx
  movaps %xmm1,%xmm0
  mulss  (%rcx,%rax,1),%xmm0
  addss  (%rdx),%xmm0
  movss  %xmm0,(%rdx)
  add    $0x4,%rax
  cmp    %r12,%rax
  jne    L128
L2:
  add    $0x1,%r13
  add    $0x8,%rbp
  cmp    %r13d,0x80(%rsp)
  jge    L143
  movss  D15(%rip),%xmm1
  divss  (%rsp),%xmm1
  test   %r14d,%r14d
  jle    L136
L135:
  mov    $0x4,%edx
  mov    $0x1,%eax
L61:
  mov    %rdx,%rcx
  add    (%rbx),%rcx
  movaps %xmm1,%xmm0
  mulss  (%rcx),%xmm0
  movss  %xmm0,(%rcx)
  add    $0x1,%eax
  add    $0x4,%rdx
  cmp    %eax,%r14d
  jge    L61
L136:
  add    $0x8,%rbx
  add    $0x8,%r15
  cmp    0x20(%rsp),%rbx
  je     L3
L130:
  mov    $0x4,%eax
  test   %r14d,%r14d
  jle    L141
L121:
  mov    (%rbx),%rdx
  movl   $0x0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %r12,%rax
  jne    L121
  cmpl   $0x0,0x80(%rsp)
  jg     L10
  movss  D15(%rip),%xmm1
  divss  D23(%rip),%xmm1
  jmp    L135
L3:
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: read_data
arguments: data_label: D14
type: byte[4]
name: read_data
arguments: data_label: D15
type: f32
name: read_data
arguments: data_label: D23
type: byte[4]

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

tool: D15: 1

tool: {"D23": [0x00,0x00,0x00,0x00]}

assistant: ```c
void update_map(map, a, coords, data, win_list, sigmax, dim, ivars, total_units, samples) float **map, **data, **a, sigmax;
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();
  factorx = -.5 / (sigmax * sigmax);
  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;
  }
}
```