user: 请将以下的汇编代码转换成C语言代码：

```asm
<update2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8d,-0x44(%rbp)
  mov    %r9d,-0x48(%rbp)
  movss  %xmm0,-0x4c(%rbp)
  movq   $0x0,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  add    $0x1,%eax
  cltq
  shl    $0x2,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movl   $0x0,(%rax)
  movl   $0x1,-0x14(%rbp)
  jmp    L449
L90:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  sar    $0x10,%edx
  mov    %edx,(%rax)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x40(%rbp),%rdx
  add    %rcx,%rdx
  movzwl %ax,%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x14(%rbp)
L449:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jle    L90
  movl   $0x1,-0x10(%rbp)
  jmp    L456
L274:
  movl   $0x0,-0xc(%rbp)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L101
  jmp    L201
L35:
  movl   $0x40,-0x14(%rbp)
  jmp    L314
L352:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
L314:
  mov    -0x14(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  test   %eax,%eax
  jne    L352
  addq   $0x100,-0x28(%rbp)
  addq   $0x100,-0x30(%rbp)
  addq   $0x100,-0x38(%rbp)
  addl   $0x1,-0x10(%rbp)
L201:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L456
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x3,%eax
  jne    L35
  jmp    L456
L101:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L310
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L367
  movl   $0x0,-0x14(%rbp)
  jmp    L381
L296:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1d,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  addl   $0x1,-0x14(%rbp)
L381:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jl     L296
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1b,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L197
L367:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x40,%eax
  test   %eax,%eax
  je     L124
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x16c,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L255
L254:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1d,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  addl   $0x1,-0x14(%rbp)
L255:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L254
  jmp    L197
L124:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x30(%rbp),%rax
  add    $0x16c,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L51
L322:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1c,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  addl   $0x1,-0x14(%rbp)
L51:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jl     L322
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1b,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
L197:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%esi
  mov    -0xc(%rbp),%eax
  cltd
  idiv   %esi
  mov    %eax,-0xc(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  mulss  -0x4c(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L123
L190:
  movl   $0x40,-0x14(%rbp)
  jmp    L377
L304:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
L377:
  mov    -0x14(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  test   %eax,%eax
  jne    L304
  mov    -0x38(%rbp),%rax
  add    $0x5c,%rax
  movss  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x5c,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  movl   $0x20,-0x14(%rbp)
  jmp    L424
L330:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L424:
  cmpl   $0x36,-0x14(%rbp)
  jle    L330
  addq   $0x100,-0x30(%rbp)
  addq   $0x100,-0x38(%rbp)
  addl   $0x1,-0x10(%rbp)
L123:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L456
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x3,%eax
  jne    L190
  jmp    L456
L310:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L456
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x80,%eax
  test   %eax,%eax
  je     L205
  movl   $0x0,-0x14(%rbp)
  jmp    L378
L85:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1d,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  addl   $0x1,-0x14(%rbp)
L378:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jl     L85
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1b,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L40
L205:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x40,%eax
  test   %eax,%eax
  je     L317
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x28(%rbp),%rax
  add    $0x16c,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L461
L471:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1d,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  addl   $0x1,-0x14(%rbp)
L461:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jl     L471
  jmp    L40
L317:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x28(%rbp),%rax
  add    $0x16c,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L9
L417:
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1c,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  addl   $0x1,-0x14(%rbp)
L9:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jl     L417
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0xc(%rbp),%xmm1
  mov    -0x14(%rbp),%eax
  shl    $0x6,%eax
  add    $0x1b,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm1,%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
L40:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%esi
  mov    -0xc(%rbp),%eax
  cltd
  idiv   %esi
  mov    %eax,-0xc(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  mulss  -0x4c(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L244
L455:
  movl   $0x40,-0x14(%rbp)
  jmp    L411
L220:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x38(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
L411:
  mov    -0x14(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  test   %eax,%eax
  jne    L220
  mov    -0x38(%rbp),%rax
  add    $0x5c,%rax
  movss  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  add    $0x5c,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  movl   $0x20,-0x14(%rbp)
  jmp    L151
L316:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0xc(%rbp),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L151:
  cmpl   $0x36,-0x14(%rbp)
  jle    L316
  addq   $0x100,-0x28(%rbp)
  addq   $0x100,-0x38(%rbp)
  addl   $0x1,-0x10(%rbp)
L244:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  and    $0x2,%eax
  test   %eax,%eax
  je     L456
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x3,%eax
  jne    L455
L456:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0x3,%eax
  jne    L274
  movl   $0x40,-0x14(%rbp)
  jmp    L389
L312:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
L389:
  mov    -0x14(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    %edx,-0x14(%rbp)
  test   %eax,%eax
  jne    L312
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  shl    $0x6,%eax
  cltq
  shl    $0x2,%rax
  neg    %rax
  add    %rax,-0x38(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x38(%rbp),%rax
  leave
  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;
}
```