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

```asm
<single_BB_Hbond>:
  endbr64
  push   %r15
  push   %r14
  lea    (%rdx,%rdi,8),%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    0xc0(%rsp),%rax
  mov    %rdi,0x8(%rsp)
  mov    %rsi,0x10(%rsp)
  mov    %rcx,0x20(%rsp)
  mov    %r8,(%rsp)
  mov    %r9,0x28(%rsp)
  mov    %rax,0x30(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  mov    (%r14),%rax
  mov    0x8(%rax),%r15
  cmp    0x10(%rax),%r15
  jg     L562
  lea    (%rdx,%rsi,8),%rax
  lea    (%rcx,%r15,8),%rbx
  mov    %rax,0x18(%rsp)
  lea    D285(%rip),%rbp
  nopl   0x0(%rax,%rax,1)
L457:
  mov    (%rbx),%rax
  mov    %rbp,%rdi
  movsbl 0x1(%rax),%esi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L306
  mov    (%rbx),%rax
  mov    %rbp,%rdi
  movsbl 0x3(%rax),%esi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L306
  mov    (%rbx),%rdi
  lea    D137(%rip),%rsi
  call   <strstr@plt>
  test   %rax,%rax
  je     L322
  mov    (%rbx),%rdi
  lea    D148(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L306
L322:
  mov    (%rsp),%r12
  add    0x8(%rsp),%r12
  movsbl (%r12),%edi
  call   <toupper@plt>
  cmp    $0x41,%al
  je     L313
  movsbl (%r12),%edi
  call   <toupper@plt>
  cmp    $0x47,%al
  je     L566
  movsbl (%r12),%edi
  call   <toupper@plt>
  cmp    $0x55,%al
  je     L575
  movsbl (%r12),%edi
  call   <toupper@plt>
  cmp    $0x43,%al
  je     L575
  movsbl (%r12),%edi
  call   <toupper@plt>
  cmp    $0x54,%al
  jne    L466
L575:
  mov    (%rbx),%rdi
  lea    D272(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L296
  nopl   0x0(%rax,%rax,1)
L306:
  mov    (%r14),%rax
  add    $0x1,%r15
  add    $0x8,%rbx
  cmp    %r15,0x10(%rax)
  jge    L457
L562:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L121
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L313:
  mov    (%rbx),%rdi
  lea    D272(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L306
  mov    (%rbx),%rdi
  lea    D298(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L306
  mov    (%rbx),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L306
  nopl   0x0(%rax)
L466:
  mov    0x18(%rsp),%rax
  mov    0x20(%rsp),%rdx
  mov    (%rax),%rax
  mov    0x8(%rax),%r13
  lea    (%rdx,%r13,8),%r12
  cmp    0x10(%rax),%r13
  jg     L306
  mov    %r15,0x38(%rsp)
  mov    %r14,0x40(%rsp)
  mov    0x18(%rsp),%r14
  cs nopw 0x0(%rax,%rax,1)
L258:
  mov    (%r12),%rax
  mov    %rbp,%rdi
  movsbl 0x1(%rax),%esi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L145
  mov    (%r12),%rax
  mov    %rbp,%rdi
  movsbl 0x3(%rax),%esi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L145
  mov    (%r12),%rdi
  lea    D137(%rip),%rsi
  call   <strstr@plt>
  test   %rax,%rax
  je     L216
  mov    (%r12),%rdi
  lea    D148(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L145
L216:
  mov    (%rsp),%r15
  add    0x10(%rsp),%r15
  movsbl (%r15),%edi
  call   <toupper@plt>
  cmp    $0x41,%al
  je     L544
  movsbl (%r15),%edi
  call   <toupper@plt>
  cmp    $0x47,%al
  je     L180
  movsbl (%r15),%edi
  call   <toupper@plt>
  cmp    $0x55,%al
  je     L164
  movsbl (%r15),%edi
  call   <toupper@plt>
  cmp    $0x43,%al
  je     L164
  movsbl (%r15),%edi
  call   <toupper@plt>
  cmp    $0x54,%al
  jne    L88
  nopw   0x0(%rax,%rax,1)
L164:
  mov    (%r12),%rdi
  lea    D272(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L145
L570:
  mov    (%r12),%rdi
  lea    D117(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L145
L88:
  mov    (%rbx),%rdi
  mov    (%r12),%rax
  cmpb   $0x43,0x1(%rdi)
  movzbl 0x1(%rax),%edx
  je     L276
  cmp    $0x43,%dl
  jne    L126
  cmpb   $0x27,0x3(%rdi)
  je     L145
L126:
  lea    D148(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L623
  mov    (%r12),%rdi
  lea    D148(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L145
L623:
  mov    (%rbx),%rdi
  lea    D148(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L178
  mov    (%r12),%rdi
  cmpb   $0x43,0x1(%rdi)
  je     L145
L380:
  lea    D148(%rip),%rsi
  call   <strcmp@plt>
  mov    (%rbx),%rdi
  test   %rax,%rax
  jne    L506
  cmpb   $0x43,0x1(%rdi)
  je     L145
L441:
  mov    (%r12),%rax
  cmpb   $0x43,0x1(%rax)
  je     L290
  lea    D148(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L501
L43:
  movsd  D185(%rip),%xmm4
  movsd  %xmm4,0x48(%rsp)
L578:
  mov    0x28(%rsp),%rax
  mov    0x38(%rsp),%rdx
  lea    0x50(%rsp),%rdi
  mov    (%rax,%rdx,8),%rcx
  mov    (%rax,%r13,8),%rdx
  mov    $0x1,%eax
L409:
  movsd  (%rcx,%rax,8),%xmm0
  subsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    $0x4,%rax
  jne    L409
  call   <veclen@plt>
  movsd  0x48(%rsp),%xmm1
  comisd %xmm0,%xmm1
  jbe    L145
  mov    0x30(%rsp),%rax
  movq   $0x1,(%rax)
  nopl   0x0(%rax,%rax,1)
L145:
  mov    (%r14),%rax
  add    $0x1,%r13
  add    $0x8,%r12
  cmp    %r13,0x10(%rax)
  jge    L258
  mov    0x40(%rsp),%r14
  mov    0x38(%rsp),%r15
  jmp    L306
  nopl   0x0(%rax)
L566:
  mov    (%rbx),%rdi
  lea    D272(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L306
  mov    (%rbx),%rdi
  lea    D298(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L306
  mov    (%rbx),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L306
  nopl   0x0(%rax,%rax,1)
L296:
  mov    (%rbx),%rdi
  lea    D117(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L306
  jmp    L466
  nopl   (%rax)
L544:
  mov    (%r12),%rdi
  lea    D272(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L145
  mov    (%r12),%rdi
  lea    D298(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L145
  mov    (%r12),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L88
  jmp    L145
L180:
  mov    (%r12),%rdi
  lea    D272(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L145
  mov    (%r12),%rdi
  lea    D298(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L145
  mov    (%r12),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L145
  jmp    L570
L276:
  cmp    $0x43,%dl
  je     L145
  cmpb   $0x27,0x3(%rax)
  jne    L126
  jmp    L145
L178:
  mov    (%r12),%rdi
  jmp    L380
L506:
  cmpb   $0x43,0x1(%rdi)
  jne    L441
  movsd  D222(%rip),%xmm2
  movsd  %xmm2,0x48(%rsp)
  jmp    L578
L290:
  movsd  D222(%rip),%xmm3
  movsd  %xmm3,0x48(%rsp)
  jmp    L578
L501:
  mov    (%r12),%rdi
  lea    D148(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L43
  jmp    L578
L121:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D285
type_guessed: string
name: read_data
arguments: label: D137
type_guessed: string
name: read_data
arguments: label: D148
type_guessed: string
name: read_data
arguments: label: D272
type_guessed: string
name: read_data
arguments: label: D298
type_guessed: string
name: read_data
arguments: label: D162
type_guessed: string
name: read_data
arguments: label: D117
type_guessed: string
name: read_data
arguments: label: D185
type_guessed: f64
name: read_data
arguments: label: D222
type_guessed: f64

tool: D285: P

tool: D137: '

tool: D148:  O2'

tool: D272:  C4 

tool: D298:  C5 

tool: D162:  C6 

tool: D117:  C2 

tool: D185: 3.4

tool: D222: 3.6

assistant: ```c
void single_BB_Hbond(long i, long j, long **seidx, char **AtomName, char *bseq, double **xyz, long *Hyes) {
  double dd, dist, dtmp[4];
  long k, m, n, num_hbonds = 0;
  for (m = seidx[i][1]; m <= seidx[i][2]; m++) {
    if (strchr("P", AtomName[m][1]) || strchr("P", AtomName[m][3]))
      continue;
    if (strstr(AtomName[m], "'") && strcmp(AtomName[m], " O2'"))
      continue;
    if (toupper(bseq[i]) == 'A') {
      if (!strcmp(AtomName[m], " C4 ") || !strcmp(AtomName[m], " C5 ") || !strcmp(AtomName[m], " C6 "))
        continue;
    } else if (toupper(bseq[i]) == 'G') {
      if (!strcmp(AtomName[m], " C4 ") || !strcmp(AtomName[m], " C5 ") || !strcmp(AtomName[m], " C6 ") || !strcmp(AtomName[m], " C2 "))
        continue;
    } else if (toupper(bseq[i]) == 'U' || toupper(bseq[i]) == 'C' || toupper(bseq[i]) == 'T') {
      if (!strcmp(AtomName[m], " C4 ") || !strcmp(AtomName[m], " C2 "))
        continue;
    }
    for (n = seidx[j][1]; n <= seidx[j][2]; n++) {
      if (strchr("P", AtomName[n][1]) || strchr("P", AtomName[n][3]))
        continue;
      if (strstr(AtomName[n], "'") && strcmp(AtomName[n], " O2'"))
        continue;
      if (toupper(bseq[j]) == 'A') {
        if (!strcmp(AtomName[n], " C4 ") || !strcmp(AtomName[n], " C5 ") || !strcmp(AtomName[n], " C6 "))
          continue;
      } else if (toupper(bseq[j]) == 'G') {
        if (!strcmp(AtomName[n], " C4 ") || !strcmp(AtomName[n], " C5 ") || !strcmp(AtomName[n], " C6 ") || !strcmp(AtomName[n], " C2 "))
          continue;
      } else if (toupper(bseq[j]) == 'U' || toupper(bseq[j]) == 'C' || toupper(bseq[j]) == 'T') {
        if (!strcmp(AtomName[n], " C4 ") || !strcmp(AtomName[n], " C2 "))
          continue;
      }
      if (AtomName[m][1] == 'C' && AtomName[n][1] == 'C')
        continue;
      if ((AtomName[m][1] == 'C' && AtomName[n][3] == '\'') || (AtomName[n][1] == 'C' && AtomName[m][3] == '\''))
        continue;
      if (!strcmp(AtomName[m], " O2'") && !strcmp(AtomName[n], " O2'"))
        continue;
      if ((!strcmp(AtomName[m], " O2'") && AtomName[n][1] == 'C') || (!strcmp(AtomName[n], " O2'") && AtomName[m][1] == 'C'))
        continue;
      if (AtomName[m][1] == 'C' || AtomName[n][1] == 'C') {
        dist = 3.6;
      } else if (!strcmp(AtomName[m], " O2'") || !strcmp(AtomName[n], " O2'"))
        dist = 3.4;
      for (k = 1; k <= 3; k++) {
        dtmp[k] = xyz[m][k] - xyz[n][k];
      }
      if ((dd = veclen(dtmp)) < dist) {
        *Hyes = 1;
      }
    }
  }
}
```