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

```asm
<questions>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <randomize@plt>
  jmp    L9
L83:
  mov    %ebx,%esi
  lea    D59(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  sub    $0x1,%r12d
  jmp    L9
L54:
  mov    %ebx,%edi
  call   <sayCorrect@plt>
  sub    $0x1,%r12d
L9:
  test   %r12d,%r12d
  je     L14
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <randomInteger@plt>
  mov    %eax,%ebp
  mov    $0x14,%esi
  mov    $0x1,%edi
  call   <randomInteger@plt>
  mov    %eax,%r13d
  movsd  D22(%rip),%xmm0
  call   <randomChance@plt>
  lea    0x0(%rbp,%r13,1),%edx
  mov    %ebp,%ebx
  sub    %r13d,%ebx
  test   %eax,%eax
  cmovne %edx,%ebx
  lea    -0x1(%rbx),%edx
  cmp    $0x12,%edx
  ja     L9
  test   %eax,%eax
  lea    D57(%rip),%rdx
  lea    D50(%rip),%rax
  cmovne %rax,%rdx
  mov    %r13d,%ecx
  mov    %ebp,%esi
  lea    D6(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%r13d
  lea    0x4(%rsp),%r15
  lea    D62(%rip),%r14
  jmp    L82
L34:
  lea    D3(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L45:
  add    $0x1,%r13d
L82:
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    %eax,%ebp
L80:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%eax
  jne    L80
  cmp    $0x3,%r13d
  je     L83
  test   %ebp,%ebp
  je     L34
  cmp    %ebx,0x4(%rsp)
  je     L54
  lea    D3(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L45
L14:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L43
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L43:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D59
type: string
name: parse_data
arguments: tag: D22
type: f64
name: parse_data
arguments: tag: D57
type: string
name: parse_data
arguments: tag: D50
type: string
name: parse_data
arguments: tag: D6
type: string
name: parse_data
arguments: tag: D62
type: string
name: parse_data
arguments: tag: D3
type: string

tool: D59: No, the answer is %d.


tool: D22: 0.5

tool: D57: -

tool: D50: +

tool: D6: What is %d %s %d? 

tool: D62: %d

tool: D3: That's incorrect. Try a different answer: 

assistant: ```c
void questions(int times) {
  randomize();
  int x, y, sum, answer, correct, loop;
  int op;
  int ref, c;
  while (times) {
    x = randomInteger(1, 20);
    y = randomInteger(1, 20);
    op = randomChance(0.5);
    correct = 1;
    sum = (op) ? x + y : x - y;
    loop = 0;
    if (sum > 0 && sum < 20) {
      printf("What is %d %s %d? ", x, (op) ? "+" : "-", y);
      while (correct) {
        ref = scanf("%d", &answer);
        while ((c = getchar()) != '\n')
          ;
        if (loop == 2) {
          printf("No, the answer is %d.\n", sum);
          times--;
          break;
        }
        if (ref != 0) {
          if (answer == sum) {
            sayCorrect(sum);
            correct = 0;
            times--;
          } else {
            printf("That's incorrect. Try a different answer: ");
            loop++;
          }
        } else {
          printf("That's incorrect. Try a different answer: ");
          loop++;
        }
      }
    }
  }
}
```