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

```asm
<test_ctx_consttime_flag>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x20(%rbp)
  movq   $0x0,-0x18(%rbp)
  movl   $0x0,-0x24(%rbp)
  mov    $0x0,%eax
  call   <BN_CTX_new@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rcx
  lea    D39(%rip),%rax
  mov    %rax,%rdx
  mov    $0x920,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <test_ptr@plt>
  test   %eax,%eax
  je     L22
  mov    $0x0,%eax
  call   <BN_CTX_secure_new@plt>
  mov    %rax,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rcx
  lea    D65(%rip),%rax
  mov    %rax,%rdx
  mov    $0x921,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <test_ptr@plt>
  test   %eax,%eax
  je     L22
  movq   $0x0,-0x18(%rbp)
  jmp    L94
L84:
  cmpq   $0x0,-0x18(%rbp)
  jne    L38
  mov    -0x10(%rbp),%rax
  jmp    L14
L38:
  mov    -0x20(%rbp),%rax
L14:
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <test_ctx_set_ct_flag@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  mov    %eax,%ecx
  lea    D51(%rip),%rax
  mov    %rax,%rdx
  mov    $0x926,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <test_true@plt>
  test   %eax,%eax
  je     L63
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <test_ctx_check_ct_flag@plt>
  test   %rax,%rax
  setne  %al
  movzbl %al,%eax
  mov    %eax,%ecx
  lea    D6(%rip),%rax
  mov    %rax,%rdx
  mov    $0x927,%esi
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <test_true@plt>
  test   %eax,%eax
  je     L63
  addq   $0x1,-0x18(%rbp)
L94:
  cmpq   $0x1,-0x18(%rbp)
  jbe    L84
  movl   $0x1,-0x24(%rbp)
  jmp    L72
L22:
  nop
  jmp    L72
L63:
  nop
L72:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_CTX_free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <BN_CTX_free@plt>
  mov    -0x24(%rbp),%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D39
type: string
name: disassemble_data
arguments: data_tag: D4
type: string
name: disassemble_data
arguments: data_tag: D65
type: string
name: disassemble_data
arguments: data_tag: D51
type: string
name: disassemble_data
arguments: data_tag: D6
type: string

tool: D39: nctx = BN_CTX_new()

tool: D4: /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: D65: sctx = BN_CTX_secure_new()

tool: D51: test_ctx_set_ct_flag(c)

tool: D6: test_ctx_check_ct_flag(c)

assistant: ```c
int test_ctx_consttime_flag(void) {
  BN_CTX *nctx = NULL;
  BN_CTX *sctx = NULL;
  size_t i = 0;
  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", 2336, "nctx = BN_CTX_new()", nctx = BN_CTX_new()) || !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", 2337, "sctx = BN_CTX_secure_new()", sctx = BN_CTX_secure_new()))
    goto err;
  for (i = 0; i < 2; i++) {
    BN_CTX *c = i == 0 ? nctx : sctx;
    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", 2342, "test_ctx_set_ct_flag(c)", (test_ctx_set_ct_flag(c)) != 0) || !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", 2343, "test_ctx_check_ct_flag(c)", (test_ctx_check_ct_flag(c)) != 0))
      goto err;
  }
  st = 1;
err:
  BN_CTX_free(nctx);
  BN_CTX_free(sctx);
  return st;
}
```