user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<strange_unique_prime_triplets>:
  endbr64
  push   %r15
  mov    %edx,%r9d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %esi,0x28(%rsp)
  test   %esi,%esi
  jle    L262
  movl   $0x0,0x8(%rsp)
  lea    -0x1(%rsi),%edx
  mov    %rdi,%rbx
  mov    %rdi,%rax
  lea    0x1(%rdi,%rdx,1),%rdx
L49:
  cmpb   $0x1,(%rax)
  sbbl   $0xffffffff,0x8(%rsp)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L49
  test   %r9d,%r9d
  jne    L255
L28:
  mov    0x8(%rsp),%eax
  cmp    $0x2,%eax
  jle    L237
  sub    $0x2,%eax
  movl   $0x0,0x24(%rsp)
  xor    %r15d,%r15d
  mov    %eax,0x2c(%rsp)
L221:
  mov    0x24(%rsp),%eax
  mov    $0x2,%esi
  lea    0x2(%rax),%r10d
  mov    %eax,%edx
  add    $0x1,%eax
  mov    %eax,0x24(%rsp)
  mov    $0x3,%eax
  test   %edx,%edx
  je     L226
  nop
L259:
  cmpb   $0x0,(%rbx,%rax,1)
  mov    %eax,%esi
  je     L56
  add    $0x1,%rax
  sub    $0x1,%edx
  jne    L259
  cmp    %r10d,0x8(%rsp)
  jle    L162
L226:
  lea    0x1(%rsi),%eax
  mov    0x8(%rsp),%r12d
  mov    $0x1,%r11d
  sub    0x24(%rsp),%r12d
  mov    %eax,0x20(%rsp)
  nopw   0x0(%rax,%rax,1)
L265:
  movslq 0x20(%rsp),%rax
  mov    %r11d,%ecx
  nopl   0x0(%rax,%rax,1)
L257:
  cmpb   $0x0,(%rbx,%rax,1)
  mov    %eax,%edx
  je     L185
  add    $0x1,%rax
  sub    $0x1,%ecx
  jne    L257
  cmp    %r10d,0x8(%rsp)
  jle    L154
  lea    (%rdx,%rsi,1),%r14d
  mov    $0x1,%ebp
  lea    0x1(%rdx),%r13d
  nopl   0x0(%rax)
L206:
  mov    %ebp,%ecx
  movslq %r13d,%rax
  nopl   (%rax)
L258:
  cmpb   $0x0,(%rbx,%rax,1)
  mov    %eax,%edi
  je     L243
  add    $0x1,%rax
  sub    $0x1,%ecx
  jne    L258
  lea    (%r14,%rdi,1),%r8d
  cmp    $0xbb7,%r8d
  jg     L52
  movslq %r8d,%rax
  cmpb   $0x0,(%rbx,%rax,1)
  je     L52
  add    $0x1,%r15d
  test   %r9d,%r9d
  jne    L244
  nopl   0x0(%rax)
L52:
  add    $0x1,%ebp
  cmp    %r12d,%ebp
  jne    L206
L154:
  add    $0x1,%r10d
  add    $0x1,%r11d
  sub    $0x1,%r12d
  cmp    0x8(%rsp),%r10d
  jl     L265
L162:
  mov    0x2c(%rsp),%esi
  cmp    %esi,0x24(%rsp)
  jne    L221
L94:
  mov    0x28(%rsp),%esi
  add    $0x38,%rsp
  mov    %r15d,%edx
  xor    %eax,%eax
  pop    %rbx
  lea    D11(%rip),%rdi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <printf@plt>
L243:
  add    $0x1,%rax
  jmp    L258
  nopl   0x0(%rax)
L185:
  add    $0x1,%rax
  jmp    L257
L244:
  mov    %edi,%ecx
  xor    %eax,%eax
  mov    %r9d,0x1c(%rsp)
  lea    D18(%rip),%rdi
  mov    %r11d,0x18(%rsp)
  mov    %r10d,0x14(%rsp)
  mov    %edx,0x10(%rsp)
  mov    %esi,0xc(%rsp)
  call   <printf@plt>
  mov    0x1c(%rsp),%r9d
  mov    0x18(%rsp),%r11d
  mov    0x14(%rsp),%r10d
  mov    0x10(%rsp),%edx
  mov    0xc(%rsp),%esi
  jmp    L52
L56:
  add    $0x1,%rax
  jmp    L259
L255:
  mov    0x28(%rsp),%esi
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  mov    %r9d,0xc(%rsp)
  call   <printf@plt>
  mov    0xc(%rsp),%r9d
  jmp    L28
L262:
  xor    %r15d,%r15d
  test   %edx,%edx
  je     L94
  mov    0x28(%rsp),%esi
  lea    D28(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L94
L237:
  xor    %r15d,%r15d
  jmp    L94
```

tool_calls: name: disassemble_data
arguments: data_tag: D11
data_type: string
name: disassemble_data
arguments: data_tag: D18
data_type: string
name: disassemble_data
arguments: data_tag: D28
data_type: string

tool: D11: Count of strange unique prime triplets < %d is %d.



tool: D18: %2d + %2d + %2d = %d


tool: D28: Strange unique prime triplets < %d:


assistant: ```c
void strange_unique_prime_triplets(unsigned char sieve[], int limit, bool verbose) {
  int count = 0, sum;
  int i, j, k, n, p;
  int pi, pj, pk;
  n = 0;
  for (i = 0; i < limit; i++) {
    if (sieve[i]) {
      n++;
    }
  }
  if (verbose) {
    printf("Strange unique prime triplets < %d:\n", limit);
  }
  for (i = 0; i + 2 < n; i++) {
    pi = 2;
    p = i;
    while (p > 0) {
      pi++;
      if (sieve[pi]) {
        p--;
      }
    }
    for (j = i + 1; j + 1 < n; j++) {
      pj = pi;
      p = j - i;
      while (p > 0) {
        pj++;
        if (sieve[pj]) {
          p--;
        }
      }
      for (k = j + 1; k < n; k++) {
        pk = pj;
        p = k - j;
        while (p > 0) {
          pk++;
          if (sieve[pk]) {
            p--;
          }
        }
        sum = pi + pj + pk;
        if (sum < 3000 && sieve[sum]) {
          count++;
          if (verbose) {
            printf("%2d + %2d + %2d = %d\n", pi, pj, pk, sum);
          }
        }
      }
    }
  }
  printf("Count of strange unique prime triplets < %d is %d.\n\n", limit, count);
}
```