user: Converte this assembly snippet into its equivalent C code:

```asm
<update_map1>:
  endbr64
  push   %r15
  cvtsd2ss %xmm0,%xmm0
  mulss  %xmm0,%xmm0
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %r9d,%ebx
  sub    $0x78,%rsp
  movss  D16(%rip),%xmm1
  mov    0xc0(%rsp),%edi
  mov    %rcx,0x20(%rsp)
  divss  %xmm0,%xmm1
  mov    %r8,0x18(%rsp)
  mov    0xb0(%rsp),%r14d
  movss  %xmm1,0x28(%rsp)
  test   %edi,%edi
  jle    L269
  mov    $0x1,%r12d
  mov    %r9d,(%rsp)
  mov    %r14d,%ebx
  mov    %rsi,%r15
  mov    %r12,%r14
  mov    0x18(%rsp),%r12
  nopw   0x0(%rax,%rax,1)
L195:
  sub    $0x8,%rsp
  mov    %r14d,%r8d
  mov    %ebx,%r9d
  mov    %rbp,%rdx
  mov    0x8(%rsp),%eax
  mov    %r15,%rsi
  mov    %r13,%rdi
  push   %rax
  mov    0xc8(%rsp),%eax
  push   %rax
  mov    (%r12,%r14,4),%eax
  push   %rax
  mov    0x40(%rsp),%rcx
  xor    %eax,%eax
  call   <find_winner_pe2@plt>
  add    $0x20,%rsp
  mov    %eax,(%r12,%r14,4)
  add    $0x1,%r14
  cmp    %r14d,0xc0(%rsp)
  jge    L195
  mov    %ebx,%r14d
  mov    (%rsp),%ebx
L269:
  mov    0xb8(%rsp),%ecx
  test   %ecx,%ecx
  jle    L286
  movq   $0x8,0x8(%rsp)
  lea    0x8(%r13),%rax
  mov    %r14d,%r13d
  mov    %rax,0x10(%rsp)
  mov    0xb8(%rsp),%eax
  add    $0x1,%eax
  shl    $0x3,%rax
  mov    %rax,0x50(%rsp)
  lea    -0x1(%r14),%eax
  mov    %eax,0x34(%rsp)
  mov    %rax,0x48(%rsp)
  lea    0x4(,%rax,4),%rax
  mov    %rax,0x58(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %eax,0x2c(%rsp)
  mov    %ebx,%eax
  shr    $0x2,%eax
  lea    -0x1(%rax),%r15d
  mov    %ebx,%eax
  and    $0xfffffffc,%eax
  shl    $0x4,%r15
  mov    %eax,0x30(%rsp)
  add    $0x1,%eax
  add    $0x14,%r15
  mov    %eax,0x3c(%rsp)
  mov    %r14d,%eax
  shr    $0x2,%eax
  lea    -0x1(%rax),%ecx
  mov    %r14d,%eax
  and    $0xfffffffc,%eax
  shl    $0x4,%rcx
  mov    %eax,0x38(%rsp)
  add    $0x1,%eax
  test   %r14d,%r14d
  lea    0x14(%rcx),%r12
  mov    %eax,0x40(%rsp)
  mov    $0x1,%eax
  cmovg  %r14d,%eax
  mov    %r12,%r14
  mov    %ebx,%r12d
  mov    %eax,%esi
  mov    %eax,0x44(%rsp)
  shr    $0x2,%eax
  sub    $0x1,%eax
  and    $0xfffffffc,%esi
  shl    $0x4,%rax
  mov    %esi,0x68(%rsp)
  mov    %rax,0x60(%rsp)
  lea    0x1(%rsi),%eax
  mov    %eax,0x6c(%rsp)
  nopl   (%rax)
L319:
  test   %r13d,%r13d
  jle    L310
  mov    0x10(%rsp),%rax
  mov    0x58(%rsp),%rdx
  xor    %esi,%esi
  mov    (%rax),%rax
  lea    0x4(%rax),%rdi
  mov    %rax,(%rsp)
  call   <memset@plt>
  mov    0xc0(%rsp),%edx
  test   %edx,%edx
  jle    L210
L275:
  mov    $0x1,%ebx
  mov    %r13d,%eax
  pxor   %xmm3,%xmm3
  mov    %r14,%r13
  mov    %rbx,%r14
  mov    %eax,%ebx
  nopl   0x0(%rax,%rax,1)
L216:
  mov    0x18(%rsp),%rax
  movslq (%rax,%r14,4),%rax
  test   %r12d,%r12d
  jle    L209
  mov    0x0(%rbp,%rax,8),%rdx
  mov    0x8(%rsp),%rax
  cmpl   $0x2,0x2c(%rsp)
  mov    0x0(%rbp,%rax,1),%rax
  jbe    L153
  mov    $0x4,%ecx
  pxor   %xmm2,%xmm2
  nopl   (%rax)
L271:
  movdqu (%rdx,%rcx,1),%xmm0
  movdqu (%rax,%rcx,1),%xmm4
  add    $0x10,%rcx
  psubd  %xmm4,%xmm0
  movdqa %xmm0,%xmm1
  pmuludq %xmm0,%xmm1
  psrlq  $0x20,%xmm0
  pmuludq %xmm0,%xmm0
  pshufd $0x8,%xmm1,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  punpckldq %xmm0,%xmm1
  paddd  %xmm1,%xmm2
  cmp    %r15,%rcx
  jne    L271
  movdqa %xmm2,%xmm0
  psrldq $0x8,%xmm0
  paddd  %xmm0,%xmm2
  movdqa %xmm2,%xmm0
  psrldq $0x4,%xmm0
  paddd  %xmm0,%xmm2
  movd   %xmm2,%ecx
  cmp    0x30(%rsp),%r12d
  je     L284
  mov    0x3c(%rsp),%r10d
L191:
  movslq %r10d,%r9
  mov    (%rdx,%r9,4),%edi
  sub    (%rax,%r9,4),%edi
  lea    0x0(,%r9,4),%r11
  mov    %edi,%r9d
  imul   %edi,%r9d
  add    %r9d,%ecx
  lea    0x1(%r10),%r9d
  cmp    %r9d,%r12d
  jl     L284
  mov    0x4(%rdx,%r11,1),%r9d
  sub    0x4(%rax,%r11,1),%r9d
  add    $0x2,%r10d
  imul   %r9d,%r9d
  add    %r9d,%ecx
  cmp    %r12d,%r10d
  jg     L284
  mov    0x8(%rdx,%r11,1),%edx
  sub    0x8(%rax,%r11,1),%edx
  mov    %edx,%eax
  imul   %edx,%eax
  add    %eax,%ecx
L284:
  pxor   %xmm0,%xmm0
  cvtsi2ss %ecx,%xmm0
L203:
  mulss  0x28(%rsp),%xmm0
  movss  %xmm3,(%rsp)
  cvtss2sd %xmm0,%xmm0
  call   <exp@plt>
  movss  (%rsp),%xmm3
  cvtsd2ss %xmm0,%xmm0
  addss  %xmm0,%xmm3
  test   %ebx,%ebx
  jle    L37
  mov    0x10(%rsp),%rax
  mov    0x20(%rsp),%rdi
  mov    (%rax),%rax
  mov    (%rdi,%r14,8),%rcx
  mov    %rax,%rdx
  sub    %rcx,%rdx
  sub    $0x4,%rdx
  cmp    $0x8,%rdx
  jbe    L34
  cmp    $0x1,%ebx
  je     L34
  cmpl   $0x2,0x34(%rsp)
  jbe    L7
  movaps %xmm0,%xmm2
  mov    $0x4,%edx
  shufps $0x0,%xmm2,%xmm2
  nopl   0x0(%rax,%rax,1)
L42:
  movups (%rcx,%rdx,1),%xmm1
  movups (%rax,%rdx,1),%xmm5
  mulps  %xmm2,%xmm1
  addps  %xmm5,%xmm1
  movups %xmm1,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %r13,%rdx
  jne    L42
  mov    0x38(%rsp),%r10d
  cmp    %r10d,%ebx
  je     L37
  mov    %ebx,%r9d
  mov    0x40(%rsp),%edx
  sub    %r10d,%r9d
  cmp    $0x1,%r9d
  je     L32
L199:
  lea    0x1(%r10),%r11d
  movaps %xmm0,%xmm2
  movq   (%rcx,%r11,4),%xmm1
  shufps $0xe0,%xmm2,%xmm2
  lea    (%rax,%r11,4),%r10
  mulps  %xmm2,%xmm1
  movq   (%r10),%xmm2
  addps  %xmm2,%xmm1
  movlps %xmm1,(%r10)
  mov    %r9d,%r10d
  and    $0xfffffffe,%r10d
  add    %r10d,%edx
  cmp    %r10d,%r9d
  je     L37
L32:
  movslq %edx,%rdx
  mulss  (%rcx,%rdx,4),%xmm0
  lea    (%rax,%rdx,4),%rax
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
L37:
  add    $0x1,%r14
  cmp    %r14d,0xc0(%rsp)
  jge    L216
  movss  D29(%rip),%xmm1
  mov    %r13,%r14
  mov    %ebx,%r13d
  divss  %xmm3,%xmm1
  test   %ebx,%ebx
  jle    L28
  mov    0x10(%rsp),%rax
  mov    (%rax),%rdx
  cmp    $0x3,%r13d
  jle    L180
L357:
  mov    0x60(%rsp),%rsi
  movaps %xmm1,%xmm2
  lea    0x4(%rdx),%rax
  shufps $0x0,%xmm2,%xmm2
  lea    0x14(%rdx,%rsi,1),%rcx
  nopw   0x0(%rax,%rax,1)
L225:
  movups (%rax),%xmm0
  add    $0x10,%rax
  mulps  %xmm2,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rcx,%rax
  jne    L225
  mov    0x68(%rsp),%eax
  cmp    %eax,0x44(%rsp)
  je     L28
  mov    %eax,%esi
  mov    0x6c(%rsp),%eax
L88:
  mov    0x44(%rsp),%ecx
  sub    %esi,%ecx
  cmp    $0x1,%ecx
  je     L59
  add    $0x1,%esi
  movaps %xmm1,%xmm2
  lea    (%rdx,%rsi,4),%rsi
  shufps $0xe0,%xmm2,%xmm2
  movq   (%rsi),%xmm0
  mulps  %xmm2,%xmm0
  movlps %xmm0,(%rsi)
  mov    %ecx,%esi
  and    $0xfffffffe,%esi
  add    %esi,%eax
  cmp    %ecx,%esi
  je     L28
L59:
  cltq
  lea    (%rdx,%rax,4),%rax
  mulss  (%rax),%xmm1
  movss  %xmm1,(%rax)
L28:
  addq   $0x8,0x8(%rsp)
  mov    0x8(%rsp),%rax
  addq   $0x8,0x10(%rsp)
  cmp    %rax,0x50(%rsp)
  jne    L319
L286:
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L34:
  mov    0x48(%rsp),%rsi
  mov    $0x1,%edx
  lea    0x2(%rsi),%r9
  xchg   %ax,%ax
L143:
  movss  (%rcx,%rdx,4),%xmm1
  mulss  %xmm0,%xmm1
  addss  (%rax,%rdx,4),%xmm1
  movss  %xmm1,(%rax,%rdx,4)
  add    $0x1,%rdx
  cmp    %r9,%rdx
  jne    L143
  jmp    L37
  nopl   0x0(%rax)
L209:
  pxor   %xmm0,%xmm0
  jmp    L203
L153:
  xor    %ecx,%ecx
  mov    $0x1,%r10d
  jmp    L191
L7:
  mov    %ebx,%r9d
  xor    %r10d,%r10d
  mov    $0x1,%edx
  jmp    L199
L310:
  mov    0xc0(%rsp),%eax
  test   %eax,%eax
  jg     L275
  jmp    L28
L210:
  movss  D29(%rip),%xmm0
  mov    0x10(%rsp),%rax
  movaps %xmm0,%xmm1
  mov    (%rax),%rdx
  divss  D19(%rip),%xmm1
  cmp    $0x3,%r13d
  jg     L357
L180:
  xor    %esi,%esi
  mov    $0x1,%eax
  jmp    L88
```

tool_calls: name: read_data
arguments: data_label: D16
type_guessed: byte[4]
name: read_data
arguments: data_label: D29
type_guessed: f32
name: read_data
arguments: data_label: D19
type_guessed: byte[4]

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

tool: D29: 1

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

assistant: ```c
void update_map1(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 (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;
  }
}
```