user: Please show me the C implementation that matches the assembly code listed below:

```asm
<Edit_Distance_multiple_word_NoEndPenaltySeq1>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x140,%rsp
  mov    %rdi,-0x128(%rbp)
  mov    %rsi,-0x130(%rbp)
  mov    %edx,-0x134(%rbp)
  mov    %ecx,-0x138(%rbp)
  movabs $0x8000000000000000,%rax
  mov    %rax,-0xb8(%rbp)
  cmpl   $0x0,-0x138(%rbp)
  jne    L376
  mov    $0x0,%eax
  jmp    L135
L376:
  cmpl   $0x3f,-0x134(%rbp)
  jle    L4
  mov    -0x134(%rbp),%eax
  sub    $0x3f,%eax
  lea    0x3f(%rax),%edx
  test   %eax,%eax
  cmovs  %edx,%eax
  sar    $0x6,%eax
  mov    %eax,-0x100(%rbp)
  mov    -0x134(%rbp),%eax
  lea    -0x3f(%rax),%edx
  mov    -0x100(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  test   %eax,%eax
  jle    L352
  mov    -0x100(%rbp),%eax
  add    $0x2,%eax
  jmp    L123
L352:
  mov    -0x100(%rbp),%eax
  add    $0x1,%eax
L123:
  mov    %eax,-0x104(%rbp)
  jmp    L21
L4:
  movl   $0x1,-0x104(%rbp)
L21:
  mov    -0x104(%rbp),%eax
  sub    $0x1,%eax
  shl    $0x6,%eax
  add    $0x3f,%eax
  sub    -0x134(%rbp),%eax
  mov    %eax,-0xfc(%rbp)
  mov    -0xfc(%rbp),%eax
  mov    $0xffffffffffffffff,%rdx
  mov    %eax,%ecx
  shr    %cl,%rdx
  mov    %rdx,%rax
  mov    %rax,-0xb0(%rbp)
  mov    -0x104(%rbp),%eax
  mov    %eax,-0xf8(%rbp)
  mov    -0xf8(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0xa8(%rbp)
  mov    -0xf8(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0xa0(%rbp)
  mov    -0xf8(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x98(%rbp)
  mov    -0xf8(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x90(%rbp)
  mov    -0xf8(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x88(%rbp)
  mov    -0xf8(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x80(%rbp)
  mov    -0xf8(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x78(%rbp)
  movl   $0x0,-0x110(%rbp)
  jmp    L3
L152:
  movq   $0x1,-0xe8(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa0(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movq   $0x0,(%rax)
  mov    -0x110(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,-0x114(%rbp)
  jmp    L368
L138:
  mov    -0x114(%rbp),%eax
  cmp    -0x134(%rbp),%eax
  jg     L311
  cmpl   $0x0,-0x114(%rbp)
  jne    L291
  cmpl   $0x0,-0x110(%rbp)
  je     L278
L291:
  mov    -0x114(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x41,%eax
  cmp    $0x13,%eax
  ja     L319
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D48(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D48(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x110(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0xa8(%rbp),%rdx
  add    %rcx,%rdx
  or     -0xe8(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L278
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x110(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0xa0(%rbp),%rdx
  add    %rcx,%rdx
  or     -0xe8(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L278
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x110(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x98(%rbp),%rdx
  add    %rcx,%rdx
  or     -0xe8(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L278
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x110(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x90(%rbp),%rdx
  add    %rcx,%rdx
  or     -0xe8(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L278
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x110(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x88(%rbp),%rdx
  add    %rcx,%rdx
  or     -0xe8(%rbp),%rax
  mov    %rax,(%rdx)
  jmp    L278
L319:
  mov    -0x114(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x114(%rbp),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0xa0(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x98(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L135
L278:
  shlq   -0xe8(%rbp)
L311:
  addl   $0x1,-0x114(%rbp)
L368:
  mov    -0x110(%rbp),%eax
  add    $0x1,%eax
  shl    $0x6,%eax
  cmp    %eax,-0x114(%rbp)
  jl     L138
  addl   $0x1,-0x110(%rbp)
L3:
  mov    -0x110(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L152
  mov    -0x80(%rbp),%rax
  movq   $0x1,(%rax)
  mov    -0x78(%rbp),%rax
  movq   $0x1,(%rax)
  movl   $0x0,-0x114(%rbp)
  jmp    L265
L161:
  movq   $0x0,-0xe0(%rbp)
  movq   $0x1,-0xd8(%rbp)
  movq   $0x0,-0xd0(%rbp)
  mov    -0x114(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x130(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x41,%eax
  cmp    $0x13,%eax
  ja     L303
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D4(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D4(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0xa8(%rbp),%rax
  mov    %rax,-0xf0(%rbp)
  jmp    L239
  mov    -0xa0(%rbp),%rax
  mov    %rax,-0xf0(%rbp)
  jmp    L239
  mov    -0x98(%rbp),%rax
  mov    %rax,-0xf0(%rbp)
  jmp    L239
  mov    -0x90(%rbp),%rax
  mov    %rax,-0xf0(%rbp)
  jmp    L239
  mov    -0x88(%rbp),%rax
  mov    %rax,-0xf0(%rbp)
  jmp    L239
L303:
  mov    -0x114(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x130(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0xa0(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x98(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L135
L239:
  movl   $0x0,-0x110(%rbp)
  jmp    L205
L244:
  mov    -0xd8(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    -0xd0(%rbp),%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xf0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  or     -0x58(%rbp),%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x50(%rbp),%rax
  not    %rax
  mov    %rax,-0x48(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  or     -0x48(%rbp),%rax
  mov    %rax,-0x40(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  xor    -0x40(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x40(%rbp),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x30(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  setb   %al
  movzbl %al,%eax
  mov    %rax,-0xe0(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  add    %rax,-0x30(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  cmp    %rax,-0x30(%rbp)
  jae    L241
  mov    $0x1,%eax
  jmp    L143
L241:
  mov    $0x0,%eax
L143:
  or     %rax,-0xe0(%rbp)
  mov    -0x30(%rbp),%rax
  and    -0x48(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  xor    -0x38(%rbp),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x78(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  and    -0x28(%rbp),%rax
  or     %rdx,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x20(%rbp),%rax
  and    -0xb8(%rbp),%rax
  shr    $0x3f,%rax
  mov    %rax,-0xd0(%rbp)
  mov    -0x18(%rbp),%rax
  and    -0xb8(%rbp),%rax
  shr    $0x3f,%rax
  mov    %rax,-0xd8(%rbp)
  mov    -0x20(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x18(%rbp),%rax
  lea    (%rax,%rax,1),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rax,%rdx
  mov    -0x50(%rbp),%rax
  and    -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  mov    -0x50(%rbp),%rax
  and    -0x10(%rbp),%rax
  mov    -0x110(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x78(%rbp),%rdx
  add    %rcx,%rdx
  or     -0x8(%rbp),%rax
  mov    %rax,(%rdx)
  addl   $0x1,-0x110(%rbp)
L205:
  mov    -0x110(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L244
  addl   $0x1,-0x114(%rbp)
L265:
  mov    -0x114(%rbp),%eax
  cmp    -0x138(%rbp),%eax
  jl     L161
  movq   $0x1,-0x70(%rbp)
  mov    -0x138(%rbp),%eax
  mov    %eax,-0x108(%rbp)
  movl   $0x0,-0xf4(%rbp)
  mov    -0x138(%rbp),%eax
  mov    %eax,-0x10c(%rbp)
  movl   $0x0,-0x110(%rbp)
  jmp    L304
L356:
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x80(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0xc8(%rbp)
  mov    -0x110(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x78(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  not    %rax
  mov    %rax,-0xc0(%rbp)
  mov    -0xf8(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x110(%rbp)
  jne    L46
  mov    -0xb0(%rbp),%rax
  and    %rax,-0xc8(%rbp)
  mov    -0xb0(%rbp),%rax
  and    %rax,-0xc0(%rbp)
L46:
  movl   $0x0,-0x114(%rbp)
  jmp    L141
L370:
  mov    -0x114(%rbp),%eax
  or     -0x110(%rbp),%eax
  test   %eax,%eax
  je     L73
  mov    -0x10c(%rbp),%eax
  mov    -0xc8(%rbp),%rdx
  mov    %edx,%ecx
  mov    -0x70(%rbp),%rdx
  and    %ecx,%edx
  sub    %edx,%eax
  mov    %eax,-0x10c(%rbp)
  mov    -0xc0(%rbp),%rax
  mov    %eax,%edx
  mov    -0x70(%rbp),%rax
  and    %eax,%edx
  mov    -0x10c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x10c(%rbp)
  mov    -0x10c(%rbp),%eax
  cmp    -0x108(%rbp),%eax
  jge    L73
  mov    -0x10c(%rbp),%eax
  mov    %eax,-0x108(%rbp)
  mov    -0x110(%rbp),%eax
  shl    $0x6,%eax
  mov    %eax,%edx
  mov    -0x114(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0xf4(%rbp)
L73:
  shrq   -0xc8(%rbp)
  shrq   -0xc0(%rbp)
  addl   $0x1,-0x114(%rbp)
L141:
  cmpl   $0x3f,-0x114(%rbp)
  jle    L370
  addl   $0x1,-0x110(%rbp)
L304:
  mov    -0x110(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L356
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0xa0(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x98(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x108(%rbp),%eax
L135:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D13
type_guessed: string
name: disassemble_data
arguments: data_label: D52
type_guessed: string

tool: D13: 
Error, non-ACGTN character read at position %d in string:%c

tool: D52: 
Error, non-ACGTN character read in string:%c

assistant: ```c
int Edit_Distance_multiple_word_NoEndPenaltySeq1(char *stringN, char *stringM, int N, int M) {
  int i, j;
  unsigned long long int *matchA;
  unsigned long long int *matchC;
  unsigned long long int *matchG;
  unsigned long long int *matchT;
  unsigned long long int *matchN;
  unsigned long long int *matchVector;
  unsigned long long int bitmask;
  unsigned long long int matchString;
  unsigned long long int *P_D;
  unsigned long long int *P_S_or_P_D;
  unsigned long long int M_m;
  unsigned long long int R_IS;
  unsigned long long int not_M_I;
  unsigned long long int not_M_I_xor_P_D;
  unsigned long long int VC_0;
  unsigned long long int VC_plus_1;
  unsigned long long int VC_0_shift;
  unsigned long long int VC_plus_1_shift;
  unsigned long long int sum;
  unsigned long long int sum_and_R_IS;
  unsigned long long int highBitMask64 = 0x8000000000000000;
  unsigned long long int carryBitSum;
  unsigned long long int carryBitVC_plus_1_shift;
  unsigned long long int carryBitVC_0_shift;
  unsigned long long int oldCarryBitVC_plus_1_shift;
  unsigned long long int oldCarryBitVC_0_shift;
  unsigned long long int P_DErase;
  unsigned long long int P_IErase;
  unsigned long long int mask;
  int Score;
  int bestFinalRowScore;
  int nWords;
  int integerPart;
  int NWords;
  int junkBits;
  unsigned long long int junkBitsMask;
  int bestFinalColumn;
  if (M == 0)
    return (0);
  if (N > 64 - 1) {
    integerPart = (N - 64 + 1) / 64;
    nWords = (N - 64 + 1 - 64 * integerPart) > 0 ? integerPart + 2 : integerPart + 1;
  } else
    nWords = 1;
  junkBits = 64 - 1 + (nWords - 1) * 64 - N;
  junkBitsMask = 0xFFFFFFFFFFFFFFFF >> junkBits;
  NWords = nWords;
  matchA = (unsigned long long int *)calloc(NWords, sizeof(unsigned long long int));
  matchC = (unsigned long long int *)calloc(NWords, sizeof(unsigned long long int));
  matchG = (unsigned long long int *)calloc(NWords, sizeof(unsigned long long int));
  matchT = (unsigned long long int *)calloc(NWords, sizeof(unsigned long long int));
  matchN = (unsigned long long int *)calloc(NWords, sizeof(unsigned long long int));
  P_D = (unsigned long long int *)calloc(NWords, sizeof(unsigned long long int));
  P_S_or_P_D = (unsigned long long int *)calloc(NWords, sizeof(unsigned long long int));
  for (j = 0; j < NWords; j++) {
    bitmask = 0x0000000000000001;
    matchA[j] = 0x0000000000000000;
    matchC[j] = 0x0000000000000000;
    matchG[j] = 0x0000000000000000;
    matchT[j] = 0x0000000000000000;
    matchN[j] = 0x0000000000000000;
    for (i = j * 64; i < (j + 1) * 64; i++) {
      if (i <= N) {
        if (i || j) {
          switch (stringN[i - 1]) {
          case 'A':
            matchA[j] |= bitmask;
            break;
          case 'C':
            matchC[j] |= bitmask;
            break;
          case 'G':
            matchG[j] |= bitmask;
            break;
          case 'T':
            matchT[j] |= bitmask;
            break;
          case 'N':
            matchN[j] |= bitmask;
            break;
          default:
            printf("\nError, non-ACGTN character read at position "
                   "%d in string:%c",
                   i, stringN[i]);
            free(matchA);
            free(matchC);
            free(matchG);
            free(matchT);
            free(matchN);
            free(P_D);
            free(P_S_or_P_D);
            ;
            return (-1);
            break;
          }
        }
        bitmask <<= 1;
      }
    }
  }
  P_D[0] = 1;
  P_S_or_P_D[0] = 1;
  for (i = 0; i < M; i++) {
    carryBitSum = 0x0000000000000000;
    carryBitVC_plus_1_shift = 0x0000000000000001;
    carryBitVC_0_shift = 0x0000000000000000;
    switch (stringM[i]) {
    case 'A':
      matchVector = matchA;
      break;
    case 'C':
      matchVector = matchC;
      break;
    case 'G':
      matchVector = matchG;
      break;
    case 'T':
      matchVector = matchT;
      break;
    case 'N':
      matchVector = matchN;
      break;
    default:
      printf("\nError, non-ACGTN character read in string:%c", stringM[i]);
      free(matchA);
      free(matchC);
      free(matchG);
      free(matchT);
      free(matchN);
      free(P_D);
      free(P_S_or_P_D);
      ;
      return (-1);
      break;
    }
    for (j = 0; j < NWords; j++) {
      oldCarryBitVC_plus_1_shift = carryBitVC_plus_1_shift;
      oldCarryBitVC_0_shift = carryBitVC_0_shift;
      matchString = matchVector[j];
      M_m = matchString | P_D[j];
      R_IS = ~M_m;
      not_M_I = R_IS | P_S_or_P_D[j];
      not_M_I_xor_P_D = not_M_I ^ P_D[j];
      sum = not_M_I + carryBitSum;
      carryBitSum = (sum < not_M_I) ? 1 : 0;
      sum += P_S_or_P_D[j];
      carryBitSum |= (sum < P_S_or_P_D[j]) ? 1 : 0;
      sum_and_R_IS = sum & R_IS;
      VC_0 = sum_and_R_IS ^ not_M_I_xor_P_D;
      VC_plus_1 = P_D[j] | (sum_and_R_IS & P_S_or_P_D[j]);
      carryBitVC_0_shift = (VC_0 & highBitMask64) >> 63;
      carryBitVC_plus_1_shift = (VC_plus_1 & highBitMask64) >> 63;
      VC_0_shift = (VC_0 << 1) + oldCarryBitVC_0_shift;
      VC_plus_1_shift = (VC_plus_1 << 1) + oldCarryBitVC_plus_1_shift;
      P_D[j] = M_m & VC_plus_1_shift;
      P_S_or_P_D[j] = VC_plus_1_shift | (M_m & VC_0_shift);
    }
  }
  mask = 0x0000000000000001;
  bestFinalRowScore = M;
  bestFinalColumn = 0;
  Score = M;
  for (j = 0; j < NWords; j++) {
    P_DErase = P_D[j];
    P_IErase = ~P_S_or_P_D[j];
    if (j == NWords - 1) {
      P_DErase &= junkBitsMask;
      P_IErase &= junkBitsMask;
    }
    for (i = 0; i < 64; i++) {
      if (i | j) {
        Score -= (int)P_DErase & mask;
        Score += (int)P_IErase & mask;
        if (Score < bestFinalRowScore) {
          bestFinalRowScore = Score;
          bestFinalColumn = j * 64 + i;
        }
      }
      P_DErase >>= 1;
      P_IErase >>= 1;
    }
  }
  free(matchA);
  free(matchC);
  free(matchG);
  free(matchT);
  free(matchN);
  free(P_D);
  free(P_S_or_P_D);
  ;
  return (bestFinalRowScore);
}
```