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

```asm
<edge_type>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  movzbl (%rcx,%rdx,1),%eax
  mov    %rdi,(%rsp)
  mov    %eax,%edx
  mov    %r8,0x8(%rsp)
  and    $0xffffffdf,%edx
  cmp    $0x41,%dl
  jne    L139
  test   %rdi,%rdi
  jle    L456
  add    $0x8,%rbx
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  mov    $0x1,%r12d
  lea    D536(%rip),%r13
  jmp    L812
  nopl   0x0(%rax)
L561:
  add    $0x1,%r14
L1438:
  mov    (%rbx),%rdi
  lea    D660(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L620
L525:
  add    $0x1,%r15
L1427:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L769
L1075:
  add    $0x1,%rbp
L545:
  add    $0x1,%r12
  add    $0x8,%rbx
  cmp    %r12,(%rsp)
  jl     L656
L812:
  mov    (%rbx),%rdi
  lea    D109(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L561
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L561
  mov    (%rbx),%rdi
  lea    D660(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L561
  jmp    L1438
  nopl   0x0(%rax,%rax,1)
L139:
  sub    $0x43,%eax
  cmp    $0x32,%al
  ja     L475
  lea    D405(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L475:
  xor    %ebx,%ebx
  xor    %r14d,%r14d
  xor    %eax,%eax
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  cmp    %rbx,%r14
  je     L1207
L366:
  cmp    %rbx,%r15
  je     L1244
  cmp    %rax,%rbp
  jge    L957
L1026:
  test   %rbx,%rbx
  je     L763
L299:
  cmp    $0x1,%rbx
  je     L1204
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L769:
  mov    (%rbx),%rdi
  lea    D479(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1075
  mov    (%rbx),%rdi
  lea    D704(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1075
  mov    (%rbx),%rdi
  lea    D20(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1075
  mov    (%rbx),%rdi
  lea    D159(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1075
  mov    (%rbx),%rdi
  lea    D313(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1075
  mov    (%rbx),%rdi
  lea    D352(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1075
  mov    (%rbx),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1075
  mov    (%rbx),%rdi
  lea    D103(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1075
  jmp    L545
  nopl   (%rax)
L620:
  mov    (%rbx),%rdi
  lea    D552(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L525
  mov    (%rbx),%rdi
  lea    D348(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L525
  mov    (%rbx),%rdi
  lea    D501(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L525
  jmp    L1427
  nopl   (%rax)
L656:
  cmp    %r15,%r14
  mov    %r15,%rax
  cmovge %r14,%rax
  cmp    %rax,%rbp
  mov    %rax,%rbx
  cmovge %rbp,%rbx
  cmp    %rbx,%r14
  jne    L366
L1207:
  mov    0x8(%rsp),%rdi
  lea    D820(%rip),%rsi
  call   <strcpy@plt>
  test   %rbx,%rbx
  jne    L299
  nopw   0x0(%rax,%rax,1)
L763:
  lea    D816(%rip),%rsi
L61:
  mov    0x8(%rsp),%rdi
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1060 <strcpy@plt>
  nop
L1204:
  lea    D669(%rip),%rsi
  jmp    L61
  nopl   0x0(%rax)
L456:
  lea    D820(%rip),%rsi
  mov    %r8,%rdi
  call   <strcpy@plt>
  jmp    L763
  cmpq   $0x0,(%rsp)
  jle    L225
  add    $0x8,%rbx
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  mov    $0x1,%r12d
  lea    D223(%rip),%r13
  jmp    L862
  nopw   0x0(%rax,%rax,1)
L607:
  add    $0x1,%r14
L711:
  mov    (%rbx),%rdi
  lea    D422(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L446
L193:
  add    $0x1,%r15
L564:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L667
L969:
  add    $0x1,%rbp
L1152:
  add    $0x1,%r12
  add    $0x8,%rbx
  cmp    %r12,(%rsp)
  jl     L656
L862:
  cmp    $0x1,%r12
  je     L275
  mov    -0x8(%rbx),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1152
L275:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L607
  mov    (%rbx),%rdi
  lea    D479(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L607
  mov    (%rbx),%rdi
  lea    D422(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L607
  jmp    L711
  cmpq   $0x0,(%rsp)
  jle    L225
  add    $0x8,%rbx
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  mov    $0x1,%r12d
  lea    D223(%rip),%r13
  jmp    L916
  nopl   0x0(%rax)
L311:
  add    $0x1,%r14
L631:
  mov    (%rbx),%rdi
  lea    D422(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L47
L536:
  add    $0x1,%r15
L717:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L1146
L1132:
  add    $0x1,%rbp
L903:
  add    $0x1,%r12
  add    $0x8,%rbx
  cmp    %r12,(%rsp)
  jl     L656
L916:
  cmp    $0x1,%r12
  je     L223
  mov    -0x8(%rbx),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L903
L223:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L311
  mov    (%rbx),%rdi
  lea    D479(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L311
  mov    (%rbx),%rdi
  lea    D422(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L311
  jmp    L631
  cmpq   $0x0,(%rsp)
  jle    L225
  add    $0x8,%rbx
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  mov    $0x1,%r12d
  lea    D536(%rip),%r13
  jmp    L491
  nopl   0x0(%rax)
L507:
  add    $0x1,%r14
L300:
  mov    (%rbx),%rdi
  lea    D394(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L1257
L1368:
  add    $0x1,%r15
L1131:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L1029
L1218:
  add    $0x1,%rbp
L800:
  add    $0x1,%r12
  add    $0x8,%rbx
  cmp    %r12,(%rsp)
  jl     L656
L491:
  cmp    $0x1,%r12
  je     L1008
  mov    -0x8(%rbx),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L800
L1008:
  mov    (%rbx),%rdi
  lea    D109(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L507
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L507
  mov    (%rbx),%rdi
  lea    D394(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L507
  jmp    L300
  cmpq   $0x0,(%rsp)
  jle    L225
  add    $0x8,%rbx
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  mov    $0x1,%r12d
  lea    D194(%rip),%r13
  jmp    L1099
  nopl   0x0(%rax)
L1273:
  add    $0x1,%r14
L517:
  mov    (%rbx),%rdi
  lea    D394(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L1148
L473:
  add    $0x1,%r15
L1309:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L233
L556:
  add    $0x1,%rbp
L637:
  add    $0x1,%r12
  add    $0x8,%rbx
  cmp    %r12,(%rsp)
  jl     L656
L1099:
  cmp    $0x1,%r12
  je     L730
  mov    -0x8(%rbx),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L637
L730:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1273
  mov    (%rbx),%rdi
  lea    D109(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1273
  mov    (%rbx),%rdi
  lea    D394(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1273
  jmp    L517
  cmpq   $0x0,(%rsp)
  jle    L225
  add    $0x8,%rbx
  xor    %ebp,%ebp
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  mov    $0x1,%r12d
  lea    D223(%rip),%r13
  jmp    L737
  nopl   0x0(%rax)
L1428:
  add    $0x1,%r14
L908:
  mov    (%rbx),%rdi
  lea    D442(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L234
L753:
  add    $0x1,%r15
L993:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L157
L919:
  add    $0x1,%rbp
L1311:
  add    $0x1,%r12
  add    $0x8,%rbx
  cmp    %r12,(%rsp)
  jl     L656
L737:
  cmp    $0x1,%r12
  je     L1346
  mov    -0x8(%rbx),%rsi
  mov    (%rbx),%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1311
L1346:
  mov    (%rbx),%rdi
  mov    %r13,%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1428
  mov    (%rbx),%rdi
  lea    D479(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1428
  mov    (%rbx),%rdi
  lea    D442(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1428
  jmp    L908
  cs nopw 0x0(%rax,%rax,1)
L234:
  mov    (%rbx),%rdi
  lea    D552(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L753
  mov    (%rbx),%rdi
  lea    D615(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L753
  jmp    L993
  nopl   (%rax)
L157:
  mov    (%rbx),%rdi
  lea    D109(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L919
  mov    (%rbx),%rdi
  lea    D159(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L919
  mov    (%rbx),%rdi
  lea    D313(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L919
  mov    (%rbx),%rdi
  lea    D352(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L919
  mov    (%rbx),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L919
  mov    (%rbx),%rdi
  lea    D103(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L919
  jmp    L1311
  nopl   (%rax)
L233:
  mov    (%rbx),%rdi
  lea    D479(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L556
  mov    (%rbx),%rdi
  lea    D704(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L556
  mov    (%rbx),%rdi
  lea    D20(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L556
  mov    (%rbx),%rdi
  lea    D159(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L556
  mov    (%rbx),%rdi
  lea    D313(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L556
  mov    (%rbx),%rdi
  lea    D103(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L556
  jmp    L637
  nopl   (%rax)
L1148:
  mov    (%rbx),%rdi
  lea    D552(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L473
  mov    (%rbx),%rdi
  lea    D348(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L473
  mov    (%rbx),%rdi
  lea    D501(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L473
  jmp    L1309
  nopl   (%rax)
L47:
  mov    (%rbx),%rdi
  lea    D109(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L536
  mov    (%rbx),%rdi
  lea    D615(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L536
  jmp    L717
  nopl   (%rax)
L1146:
  mov    (%rbx),%rdi
  lea    D552(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1132
  mov    (%rbx),%rdi
  lea    D159(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1132
  mov    (%rbx),%rdi
  lea    D313(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1132
  mov    (%rbx),%rdi
  lea    D352(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1132
  mov    (%rbx),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1132
  mov    (%rbx),%rdi
  lea    D103(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1132
  jmp    L903
  nopl   (%rax)
L1029:
  mov    (%rbx),%rdi
  lea    D479(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1218
  mov    (%rbx),%rdi
  lea    D704(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1218
  mov    (%rbx),%rdi
  lea    D20(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1218
  mov    (%rbx),%rdi
  lea    D159(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1218
  mov    (%rbx),%rdi
  lea    D313(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1218
  mov    (%rbx),%rdi
  lea    D352(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1218
  mov    (%rbx),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1218
  mov    (%rbx),%rdi
  lea    D103(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1218
  jmp    L800
  nopl   (%rax)
L1257:
  mov    (%rbx),%rdi
  lea    D552(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1368
  mov    (%rbx),%rdi
  lea    D348(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1368
  mov    (%rbx),%rdi
  lea    D501(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L1368
  jmp    L1131
  nopl   (%rax)
L667:
  mov    (%rbx),%rdi
  lea    D109(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L969
  mov    (%rbx),%rdi
  lea    D159(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L969
  mov    (%rbx),%rdi
  lea    D313(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L969
  mov    (%rbx),%rdi
  lea    D352(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L969
  mov    (%rbx),%rdi
  lea    D162(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L969
  mov    (%rbx),%rdi
  lea    D103(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L969
  jmp    L1152
  nopl   (%rax)
L446:
  mov    (%rbx),%rdi
  lea    D552(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L193
  mov    (%rbx),%rdi
  lea    D615(%rip),%rsi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L193
  jmp    L564
  nopl   (%rax)
L1244:
  mov    0x8(%rsp),%rdi
  lea    D243(%rip),%rsi
  call   <strcpy@plt>
  jmp    L1026
  cs nopw 0x0(%rax,%rax,1)
L957:
  mov    0x8(%rsp),%rdi
  lea    D395(%rip),%rsi
  call   <strcpy@plt>
  jmp    L1026
  cs nopw 0x0(%rax,%rax,1)
L225:
  mov    %r8,%rdi
  lea    D820(%rip),%rsi
  call   <strcpy@plt>
  jmp    L763
```

tool_calls: name: retrieve_data
arguments: data_label: D536
type_guessed: string
name: retrieve_data
arguments: data_label: D660
type_guessed: string
name: retrieve_data
arguments: data_label: D109
type_guessed: string
name: retrieve_data
arguments: data_label: D479
type_guessed: string
name: retrieve_data
arguments: data_label: D704
type_guessed: string
name: retrieve_data
arguments: data_label: D20
type_guessed: string
name: retrieve_data
arguments: data_label: D159
type_guessed: string
name: retrieve_data
arguments: data_label: D313
type_guessed: string
name: retrieve_data
arguments: data_label: D352
type_guessed: string
name: retrieve_data
arguments: data_label: D162
type_guessed: string
name: retrieve_data
arguments: data_label: D103
type_guessed: string
name: retrieve_data
arguments: data_label: D552
type_guessed: string
name: retrieve_data
arguments: data_label: D348
type_guessed: string
name: retrieve_data
arguments: data_label: D501
type_guessed: string
name: retrieve_data
arguments: data_label: D820
type_guessed: string
name: retrieve_data
arguments: data_label: D816
type_guessed: string
name: retrieve_data
arguments: data_label: D669
type_guessed: string
name: retrieve_data
arguments: data_label: D223
type_guessed: string
name: retrieve_data
arguments: data_label: D422
type_guessed: string
name: retrieve_data
arguments: data_label: D394
type_guessed: string
name: retrieve_data
arguments: data_label: D194
type_guessed: string
name: retrieve_data
arguments: data_label: D442
type_guessed: string
name: retrieve_data
arguments: data_label: D615
type_guessed: string
name: retrieve_data
arguments: data_label: D243
type_guessed: string
name: retrieve_data
arguments: data_label: D395
type_guessed: string

tool: D536:  C2 

tool: D660:  N6 

tool: D109:  N1 

tool: D479:  N3 

tool: D704:  C4 

tool: D20:  N9 

tool: D159:  C1'

tool: D313:  C2'

tool: D352:  C3'

tool: D162:  O3'

tool: D103:  O2'

tool: D552:  C5 

tool: D348:  N7 

tool: D501:  C8 

tool: D820: W

tool: D816: ?

tool: D669: .

tool: D223:  O2 

tool: D422:  O4 

tool: D394:  O6 

tool: D194:  N2 

tool: D442:  N4 

tool: D615:  C6 

tool: D243: H

tool: D395: S

assistant: ```c
void edge_type(long nh, char **hb_atm, long i, char *bseq, char *type_wd) {
  long k, max1, max2, max, Watson = 0, Hoogsteen = 0, Suger = 0;
  long s = 0, h = 0, w = 0;
  if (bseq[i] == 'A' || bseq[i] == 'a') {
    for (k = 1; k <= nh; k++) {
      if (strcmp(hb_atm[k], " N1 ") == 0 || strcmp(hb_atm[k], " C2 ") == 0 || strcmp(hb_atm[k], " N6 ") == 0)
        Watson++;
      if (strcmp(hb_atm[k], " N6 ") == 0 || strcmp(hb_atm[k], " C5 ") == 0 || strcmp(hb_atm[k], " N7 ") == 0 || strcmp(hb_atm[k], " C8 ") == 0)
        Hoogsteen++;
      if (strcmp(hb_atm[k], " C2 ") == 0 || strcmp(hb_atm[k], " N3 ") == 0 || strcmp(hb_atm[k], " C4 ") == 0 || strcmp(hb_atm[k], " N9 ") == 0 || strcmp(hb_atm[k], " C1'") == 0 || strcmp(hb_atm[k], " C2'") == 0 || strcmp(hb_atm[k], " C3'") == 0 || strcmp(hb_atm[k], " O3'") == 0 || strcmp(hb_atm[k], " O2'") == 0)
        Suger++;
    };
  } else if (bseq[i] == 'I' || bseq[i] == 'i') {
    for (k = 1; k <= nh; k++) {
      if (k > 1 && !strcmp(hb_atm[k], hb_atm[k - 1]))
        continue;
      if (strcmp(hb_atm[k], " N1 ") == 0 || strcmp(hb_atm[k], " C2 ") == 0 || strcmp(hb_atm[k], " O6 ") == 0)
        Watson++;
      if (strcmp(hb_atm[k], " O6 ") == 0 || strcmp(hb_atm[k], " C5 ") == 0 || strcmp(hb_atm[k], " N7 ") == 0 || strcmp(hb_atm[k], " C8 ") == 0)
        Hoogsteen++;
      if (strcmp(hb_atm[k], " C2 ") == 0 || strcmp(hb_atm[k], " N3 ") == 0 || strcmp(hb_atm[k], " C4 ") == 0 || strcmp(hb_atm[k], " N9 ") == 0 || strcmp(hb_atm[k], " C1'") == 0 || strcmp(hb_atm[k], " C2'") == 0 || strcmp(hb_atm[k], " C3'") == 0 || strcmp(hb_atm[k], " O3'") == 0 || strcmp(hb_atm[k], " O2'") == 0)
        Suger++;
    };
  } else if (bseq[i] == 'G' || bseq[i] == 'g') {
    for (k = 1; k <= nh; k++) {
      if (k > 1 && !strcmp(hb_atm[k], hb_atm[k - 1]))
        continue;
      if (strcmp(hb_atm[k], " N2 ") == 0 || strcmp(hb_atm[k], " N1 ") == 0 || strcmp(hb_atm[k], " O6 ") == 0)
        Watson++;
      if (strcmp(hb_atm[k], " O6 ") == 0 || strcmp(hb_atm[k], " C5 ") == 0 || strcmp(hb_atm[k], " N7 ") == 0 || strcmp(hb_atm[k], " C8 ") == 0)
        Hoogsteen++;
      if (strcmp(hb_atm[k], " N2 ") == 0 || strcmp(hb_atm[k], " N3 ") == 0 || strcmp(hb_atm[k], " C4 ") == 0 || strcmp(hb_atm[k], " N9 ") == 0 || strcmp(hb_atm[k], " C1'") == 0 || strcmp(hb_atm[k], " C2'") == 0 || strcmp(hb_atm[k], " O2'") == 0)
        Suger++;
    };
  } else if (bseq[i] == 'C' || bseq[i] == 'c') {
    for (k = 1; k <= nh; k++) {
      if (k > 1 && !strcmp(hb_atm[k], hb_atm[k - 1]))
        continue;
      if (strcmp(hb_atm[k], " O2 ") == 0 || strcmp(hb_atm[k], " N3 ") == 0 || strcmp(hb_atm[k], " N4 ") == 0)
        Watson++;
      if (strcmp(hb_atm[k], " N4 ") == 0 || strcmp(hb_atm[k], " C5 ") == 0 || strcmp(hb_atm[k], " C6 ") == 0)
        Hoogsteen++;
      if (strcmp(hb_atm[k], " O2 ") == 0 || strcmp(hb_atm[k], " N1 ") == 0 || strcmp(hb_atm[k], " C1'") == 0 || strcmp(hb_atm[k], " C2'") == 0 || strcmp(hb_atm[k], " C3'") == 0 || strcmp(hb_atm[k], " O3'") == 0 || strcmp(hb_atm[k], " O2'") == 0)
        Suger++;
    };
  } else if (bseq[i] == 'U' || bseq[i] == 'T' || bseq[i] == 'u' || bseq[i] == 't') {
    for (k = 1; k <= nh; k++) {
      if (k > 1 && !strcmp(hb_atm[k], hb_atm[k - 1]))
        continue;
      if (strcmp(hb_atm[k], " O2 ") == 0 || strcmp(hb_atm[k], " N3 ") == 0 || strcmp(hb_atm[k], " O4 ") == 0)
        Watson++;
      if (strcmp(hb_atm[k], " O4 ") == 0 || strcmp(hb_atm[k], " C5 ") == 0 || strcmp(hb_atm[k], " C6 ") == 0)
        Hoogsteen++;
      if (strcmp(hb_atm[k], " O2 ") == 0 || strcmp(hb_atm[k], " N1 ") == 0 || strcmp(hb_atm[k], " C1'") == 0 || strcmp(hb_atm[k], " C2'") == 0 || strcmp(hb_atm[k], " C3'") == 0 || strcmp(hb_atm[k], " O3'") == 0 || strcmp(hb_atm[k], " O2'") == 0)
        Suger++;
    };
  } else if (bseq[i] == 'P' || bseq[i] == 'p') {
    for (k = 1; k <= nh; k++) {
      if (k > 1 && !strcmp(hb_atm[k], hb_atm[k - 1]))
        continue;
      if (strcmp(hb_atm[k], " O2 ") == 0 || strcmp(hb_atm[k], " N3 ") == 0 || strcmp(hb_atm[k], " O4 ") == 0)
        Watson++;
      if (strcmp(hb_atm[k], " O4 ") == 0 || strcmp(hb_atm[k], " N1 ") == 0 || strcmp(hb_atm[k], " C6 ") == 0)
        Hoogsteen++;
      if (strcmp(hb_atm[k], " O2 ") == 0 || strcmp(hb_atm[k], " C5 ") == 0 || strcmp(hb_atm[k], " C1'") == 0 || strcmp(hb_atm[k], " C2'") == 0 || strcmp(hb_atm[k], " C3'") == 0 || strcmp(hb_atm[k], " O3'") == 0 || strcmp(hb_atm[k], " O2'") == 0)
        Suger++;
    };
  }
  w = Watson;
  h = Hoogsteen;
  s = Suger;
  max1 = (Watson >= Hoogsteen) ? Watson : Hoogsteen;
  max2 = (Hoogsteen >= Suger) ? Hoogsteen : Suger;
  max = (max1 >= max2) ? max1 : max2;
  if (Watson == max)
    strcpy(type_wd, "W");
  else if (Hoogsteen == max)
    strcpy(type_wd, "H");
  else if (Suger == max)
    strcpy(type_wd, "S");
  if (max == 0)
    strcpy(type_wd, "?");
  if (max == 1)
    strcpy(type_wd, ".");
}
```