user: What is the c source code of the assembly code below?

```asm
<update2>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r12
  mov    %rsi,%rbp
  mov    %rdx,%rbx
  mov    %rcx,%r13
  movss  %xmm0,0xc(%rsp)
  mov    (%rcx),%eax
  lea    0x4(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,%rdi
  movl   $0x0,(%rax)
  cmpl   $0x0,0x0(%r13)
  jle    L289
  mov    $0x1,%eax
L475:
  movswl 0x2(%r13,%rax,4),%edx
  mov    %edx,(%rdi,%rax,4)
  andl   $0xffff,0x0(%r13,%rax,4)
  add    $0x1,%rax
  cmp    %eax,0x0(%r13)
  jge    L475
L289:
  mov    0x4(%r13),%eax
  cmp    $0x3,%eax
  je     L462
  mov    $0x1,%r8d
  mov    $0x4,%r9d
  pxor   %xmm5,%xmm5
  mov    $0x1,%esi
  movaps %xmm5,%xmm4
  movaps %xmm5,%xmm3
  movaps %xmm5,%xmm2
  mov    $0x0,%ecx
  jmp    L174
L74:
  movslq %r8d,%rax
  lea    0x0(%r13,%rax,4),%rdx
  cmpl   $0x0,(%rdx)
  jne    L281
L235:
  mov    $0xfc,%eax
L448:
  movss  (%r12,%rax,1),%xmm0
  addss  0x0(%rbp,%rax,1),%xmm0
  movss  %xmm0,(%rbx,%rax,1)
  sub    $0x4,%rax
  cmp    $0xfffffffffffffffc,%rax
  jne    L448
  add    $0x100,%r12
  add    $0x100,%rbp
  add    $0x100,%rbx
  add    $0x1,%r8d
  add    $0x4,%rdx
  cmpl   $0x0,(%rdx)
  je     L235
L281:
  movslq %r8d,%rax
  lea    0x0(,%rax,4),%r9
  mov    0x0(%r13,%rax,4),%eax
  cmp    $0x3,%eax
  je     L462
L174:
  test   %eax,%eax
  je     L74
  mov    %eax,%edx
  and    $0x1,%edx
  jne    L62
  test   $0x2,%al
  je     L281
  test   $0x80,%al
  jne    L106
  test   $0x40,%al
  je     L481
  movaps %xmm4,%xmm0
  addss  0x16c(%r12),%xmm0
  cvttss2si %xmm0,%eax
  mov    (%rdi,%r9,1),%r10d
  cmp    $0x1,%r10d
  jle    L405
  lea    0x174(%r12),%rdx
  lea    -0x2(%r10),%r10d
  shl    $0x8,%r10
  lea    0x274(%r12,%r10,1),%r10
L99:
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  (%rdx),%xmm0
  cvttss2si %xmm0,%eax
  add    $0x100,%rdx
  cmp    %r10,%rdx
  jne    L99
  jmp    L405
L62:
  test   $0x80,%al
  jne    L374
  test   $0x40,%al
  je     L468
  movaps %xmm2,%xmm0
  addss  0x16c(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    (%rdi,%r9,1),%r10d
  cmp    $0x1,%r10d
  jle    L84
  lea    0x174(%rbp),%rdx
  lea    -0x2(%r10),%r10d
  shl    $0x8,%r10
  lea    0x274(%rbp,%r10,1),%r10
L410:
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  addss  (%rdx),%xmm0
  cvttss2si %xmm0,%eax
  add    $0x100,%rdx
  cmp    %r10,%rdx
  jne    L410
  jmp    L84
L374:
  mov    (%rdi,%r9,1),%eax
  cmp    $0x1,%eax
  jle    L45
  lea    0x74(%rbp),%r10
  lea    -0x2(%rax),%edx
  shl    $0x8,%rdx
  lea    0x174(%rbp,%rdx,1),%r11
  mov    %ecx,%edx
L479:
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  addss  (%r10),%xmm0
  cvttss2si %xmm0,%edx
  add    $0x100,%r10
  cmp    %r10,%r11
  jne    L479
  sub    $0x1,%eax
L250:
  shl    $0x6,%eax
  add    $0x1b,%eax
  cltq
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  addss  0x0(%rbp,%rax,4),%xmm0
  cvttss2si %xmm0,%eax
  jmp    L84
L45:
  mov    %ecx,%edx
  mov    %ecx,%eax
  jmp    L250
L468:
  movaps %xmm3,%xmm0
  addss  0x16c(%rbp),%xmm0
  cvttss2si %xmm0,%r10d
  mov    (%rdi,%r9,1),%r11d
  cmp    $0x2,%r11d
  jle    L280
  lea    0x170(%rbp),%rax
  lea    -0x3(%r11),%edx
  shl    $0x8,%rdx
  lea    0x270(%rbp,%rdx,1),%rdx
L182:
  pxor   %xmm0,%xmm0
  cvtsi2ss %r10d,%xmm0
  addss  (%rax),%xmm0
  cvttss2si %xmm0,%r10d
  add    $0x100,%rax
  cmp    %rax,%rdx
  jne    L182
  lea    -0x1(%r11),%edx
L280:
  mov    %edx,%eax
  shl    $0x6,%eax
  add    $0x1b,%eax
  cltq
  pxor   %xmm0,%xmm0
  cvtsi2ss %r10d,%xmm0
  addss  0x0(%rbp,%rax,4),%xmm0
  cvttss2si %xmm0,%eax
L84:
  cltd
  idivl  (%rdi,%r9,1)
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  0xc(%rsp),%xmm0
  cvttss2si %xmm0,%r10d
  movslq %r8d,%rax
  mov    0x0(%r13,%rax,4),%eax
  test   $0x1,%al
  je     L281
  cmp    $0x3,%eax
  je     L281
  lea    0x1(%r8),%r9d
  movslq %r9d,%r9
  lea    0xdc(%rbx),%rdx
L337:
  mov    $0xfc,%eax
L207:
  movss  0x0(%rbp,%rax,1),%xmm0
  movss  %xmm0,(%rbx,%rax,1)
  sub    $0x4,%rax
  cmp    $0xfffffffffffffffc,%rax
  jne    L207
  pxor   %xmm1,%xmm1
  cvtsi2ss %r10d,%xmm1
  movaps %xmm1,%xmm0
  addss  0x5c(%rbx),%xmm0
  movss  %xmm0,0x5c(%rbx)
  lea    0x80(%rbx),%rax
L213:
  movaps %xmm1,%xmm0
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  add    $0x4,%rax
  cmp    %rax,%rdx
  jne    L213
  add    $0x100,%rbp
  add    $0x100,%rbx
  mov    %r9d,%r8d
  mov    0x0(%r13,%r9,4),%eax
  add    $0x1,%r9
  add    $0x100,%rdx
  test   $0x1,%al
  je     L281
  cmp    $0x3,%eax
  jne    L337
  jmp    L281
L106:
  mov    (%rdi,%r9,1),%eax
  cmp    $0x1,%eax
  jle    L11
  lea    0x74(%r12),%r10
  lea    -0x2(%rax),%r11d
  shl    $0x8,%r11
  lea    0x174(%r12,%r11,1),%r11
L357:
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  addss  (%r10),%xmm0
  cvttss2si %xmm0,%edx
  add    $0x100,%r10
  cmp    %r11,%r10
  jne    L357
  sub    $0x1,%eax
L321:
  shl    $0x6,%eax
  add    $0x1b,%eax
  cltq
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  addss  (%r12,%rax,4),%xmm0
  cvttss2si %xmm0,%eax
  jmp    L405
L11:
  mov    %edx,%eax
  jmp    L321
L481:
  movaps %xmm5,%xmm0
  addss  0x16c(%r12),%xmm0
  cvttss2si %xmm0,%edx
  mov    (%rdi,%r9,1),%eax
  cmp    $0x2,%eax
  jle    L77
  lea    0x170(%r12),%r10
  lea    -0x3(%rax),%r11d
  shl    $0x8,%r11
  lea    0x270(%r12,%r11,1),%r11
L316:
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  addss  (%r10),%xmm0
  cvttss2si %xmm0,%edx
  add    $0x100,%r10
  cmp    %r11,%r10
  jne    L316
  sub    $0x1,%eax
L260:
  shl    $0x6,%eax
  add    $0x1b,%eax
  cltq
  pxor   %xmm0,%xmm0
  cvtsi2ss %edx,%xmm0
  addss  (%r12,%rax,4),%xmm0
  cvttss2si %xmm0,%eax
L405:
  cltd
  idivl  (%rdi,%r9,1)
  pxor   %xmm0,%xmm0
  cvtsi2ss %eax,%xmm0
  mulss  0xc(%rsp),%xmm0
  cvttss2si %xmm0,%r10d
  movslq %r8d,%rax
  mov    0x0(%r13,%rax,4),%eax
  test   $0x2,%al
  je     L281
  cmp    $0x3,%eax
  je     L281
  lea    0x1(%r8),%r9d
  movslq %r9d,%r9
  lea    0xdc(%rbx),%rdx
L309:
  mov    $0xfc,%eax
L24:
  movss  (%r12,%rax,1),%xmm0
  movss  %xmm0,(%rbx,%rax,1)
  sub    $0x4,%rax
  cmp    $0xfffffffffffffffc,%rax
  jne    L24
  pxor   %xmm1,%xmm1
  cvtsi2ss %r10d,%xmm1
  movaps %xmm1,%xmm0
  addss  0x5c(%rbx),%xmm0
  movss  %xmm0,0x5c(%rbx)
  lea    0x80(%rbx),%rax
L90:
  movaps %xmm1,%xmm0
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L90
  add    $0x100,%r12
  add    $0x100,%rbx
  mov    %r9d,%r8d
  mov    0x0(%r13,%r9,4),%eax
  add    $0x1,%r9
  add    $0x100,%rdx
  test   $0x2,%al
  je     L281
  cmp    $0x3,%eax
  jne    L309
  jmp    L281
L77:
  mov    %esi,%eax
  jmp    L260
L462:
  mov    $0xfc,%eax
L443:
  movss  (%r12,%rax,1),%xmm0
  addss  0x0(%rbp,%rax,1),%xmm0
  movss  %xmm0,(%rbx,%rax,1)
  sub    $0x4,%rax
  cmp    $0xfffffffffffffffc,%rax
  jne    L443
  mov    0x0(%r13),%eax
  shl    $0x6,%eax
  cltq
  shl    $0x2,%rax
  sub    %rax,%rbx
  call   <free@plt>
  mov    %rbx,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
```

assistant: ```c
float *update2(const float *profa, const float *profb, float *newp, int *path, int sipa, int sipb, float internal_gap_weight) {
  int i, c;
  int *gap_len = 0;
  int gap_cost = 0;
  gap_len = malloc(sizeof(int) * (path[0] + 1));
  gap_len[0] = 0;
  for (i = 1; i <= path[0]; i++) {
    gap_len[i] = (path[i] >> 16);
    path[i] = path[i] & 0x0000ffff;
  }
  c = 1;
  while (path[c] != 3) {
    gap_cost = 0;
    if (!path[c]) {
      while (!path[c] && path[c] != 3) {
        for (i = 64; i--;) {
          newp[i] = profa[i] + profb[i];
        }
        profa += 64;
        profb += 64;
        newp += 64;
        c++;
      }
    } else if (path[c] & 1) {
      if (path[c] & 128) {
        for (i = 0; i < gap_len[c] - 1; i++) {
          gap_cost += profb[29 + 64 * i];
        }
        gap_cost += profb[27 + 64 * i];
      } else if (path[c] & 64) {
        gap_cost += profb[27 + 64];
        for (i = 1; i < gap_len[c]; i++) {
          gap_cost += profb[29 + 64 * i];
        }
      } else {
        gap_cost += profb[27 + 64];
        for (i = 1; i < gap_len[c] - 1; i++) {
          gap_cost += profb[28 + 64 * i];
        }
        gap_cost += profb[27 + 64 * i];
      }
      gap_cost /= gap_len[c];
      gap_cost *= internal_gap_weight;
      while (path[c] & 1 && path[c] != 3) {
        for (i = 64; i--;) {
          newp[i] = profb[i];
        }
        newp[23] += gap_cost;
        for (i = 32; i < 55; i++) {
          newp[i] += gap_cost;
        }
        profb += 64;
        newp += 64;
        c++;
      }
    } else if (path[c] & 2) {
      if (path[c] & 128) {
        for (i = 0; i < gap_len[c] - 1; i++) {
          gap_cost += profa[29 + 64 * i];
        }
        gap_cost += profa[27 + 64 * i];
      } else if (path[c] & 64) {
        gap_cost += profa[27 + 64];
        for (i = 1; i < gap_len[c]; i++) {
          gap_cost += profa[29 + 64 * i];
        }
      } else {
        gap_cost += profa[27 + 64];
        for (i = 1; i < gap_len[c] - 1; i++) {
          gap_cost += profa[28 + 64 * i];
        }
        gap_cost += profa[27 + 64 * i];
      }
      gap_cost /= gap_len[c];
      gap_cost *= internal_gap_weight;
      while (path[c] & 2 && path[c] != 3) {
        for (i = 64; i--;) {
          newp[i] = profa[i];
        }
        newp[23] += gap_cost;
        for (i = 32; i < 55; i++) {
          newp[i] += gap_cost;
        }
        profa += 64;
        newp += 64;
        c++;
      }
    }
  }
  for (i = 64; i--;) {
    newp[i] = profa[i] + profb[i];
  }
  newp -= path[0] * 64;
  free(gap_len);
  return newp;
}
```