user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<test_smallprime>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    $0x0,%eax
  call   <BN_new@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rcx
  lea    D78(%rip),%rax
  mov    %rax,%rdx
  mov    $0x880,%esi
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <test_ptr@plt>
  test   %eax,%eax
  je     L46
  cmpl   $0x1,-0x14(%rbp)
  jg     L60
  mov    -0x14(%rbp),%esi
  mov    -0x8(%rbp),%rax
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %rax,%rdi
  call   <BN_generate_prime_ex@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  mov    %eax,%ecx
  lea    D36(%rip),%rax
  mov    %rax,%rdx
  mov    $0x884,%esi
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <test_false@plt>
  test   %eax,%eax
  jne    L55
  jmp    L58
L60:
  mov    -0x14(%rbp),%esi
  mov    -0x8(%rbp),%rax
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    $0x0,%edx
  mov    %rax,%rdi
  call   <BN_generate_prime_ex@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  mov    %eax,%ecx
  lea    D36(%rip),%rax
  mov    %rax,%rdx
  mov    $0x888,%esi
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <test_true@plt>
  test   %eax,%eax
  je     L32
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_num_bits@plt>
  mov    -0x14(%rbp),%edx
  mov    %edx,%r9d
  mov    %eax,%r8d
  lea    D44(%rip),%rax
  mov    %rax,%rcx
  lea    D49(%rip),%rax
  mov    %rax,%rdx
  mov    $0x88a,%esi
  lea    D88(%rip),%rax
  mov    %rax,%rdi
  call   <test_int_eq@plt>
  test   %eax,%eax
  je     L32
L55:
  movl   $0x1,-0xc(%rbp)
  jmp    L58
L46:
  nop
  jmp    L58
L32:
  nop
L58:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_free@plt>
  mov    -0xc(%rbp),%eax
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D78
data_type: string
name: parse_data
arguments: label: D88
data_type: string
name: parse_data
arguments: label: D36
data_type: string
name: parse_data
arguments: label: D44
data_type: string
name: parse_data
arguments: label: D49
data_type: string

tool: D78: r = BN_new()

tool: D88: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/bntest.c

tool: D36: BN_generate_prime_ex(r, kBits, 0, NULL, NULL, NULL)

tool: D44: kBits

tool: D49: BN_num_bits(r)

assistant: ```c
int test_smallprime(int kBits) {
  BIGNUM *r;
  int st = 0;
  if (!test_ptr("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/bntest.c", 2176, "r = BN_new()", r = BN_new()))
    goto err;
  if (kBits <= 1) {
    if (!test_false("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/bntest.c", 2180, "BN_generate_prime_ex(r, kBits, 0, NULL, NULL, NULL)", (BN_generate_prime_ex(r, kBits, 0, NULL, NULL, NULL)) != 0))
      goto err;
  } else {
    if (!test_true("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/bntest.c", 2184, "BN_generate_prime_ex(r, kBits, 0, NULL, NULL, NULL)", (BN_generate_prime_ex(r, kBits, 0, NULL, NULL, NULL)) != 0) || !test_int_eq("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/bntest.c", 2186, "BN_num_bits(r)", "kBits", BN_num_bits(r), kBits))
      goto err;
  }
  st = 1;
err:
  BN_free(r);
  return st;
}
```