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

```asm
<AskForBonus>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  mov    %rdi,%r13
  lea    D6(%rip),%rdi
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  lea    D66(%rip),%rbx
  sub    $0x8,%rsp
  call   <printf@plt>
  lea    D52(%rip),%rdi
  call   <printf@plt>
  lea    D50(%rip),%rdi
  call   <printf@plt>
  lea    D36(%rip),%rdi
  call   <printf@plt>
  lea    D14(%rip),%rdi
  call   <printf@plt>
  mov    %r13,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    D40(%rip),%r13
  nopl   0x0(%rax,%rax,1)
L10:
  mov    %r13,%rdi
  call   <printf@plt>
  xor    %eax,%eax
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  cmpl   $0x1,(%r12)
  ja     L10
  lea    D31(%rip),%rdi
  lea    D62(%rip),%r12
  call   <printf@plt>
  mov    %r15,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  lea    D26(%rip),%rdi
  call   <printf@plt>
  mov    %r14,%rsi
  mov    %rbx,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  nopl   (%rax)
L16:
  mov    %r12,%rdi
  call   <printf@plt>
  xor    %eax,%eax
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  cmpl   $0x1,0x0(%rbp)
  ja     L16
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D6
data_type: string
name: retrieve_data
arguments: data_tag: D66
data_type: string
name: retrieve_data
arguments: data_tag: D52
data_type: string
name: retrieve_data
arguments: data_tag: D50
data_type: string
name: retrieve_data
arguments: data_tag: D36
data_type: string
name: retrieve_data
arguments: data_tag: D14
data_type: string
name: retrieve_data
arguments: data_tag: D40
data_type: string
name: retrieve_data
arguments: data_tag: D31
data_type: string
name: retrieve_data
arguments: data_tag: D62
data_type: string
name: retrieve_data
arguments: data_tag: D26
data_type: string

tool: D6: ToBeFree's Dice Fight Probability Calculator, version 1.42.2


tool: D66: %d

tool: D52: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.


tool: D50: GPL 3.0, https://github.com/ToBeFree/DiceCalculator



tool: D36: When the simulation is running, press Ctrl+C to exit.


tool: D14: Enter integer bonus (e.g. 1 or -2): 

tool: D40: Add 0.5 to the bonus? (0 for no, 1 for yes): 

tool: D31: How many dice? 

tool: D62: Enable fast calculation mode (print each 100,000,000th line only)? (0 for no, 1 for yes): 

tool: D26: How many sides per die? 

assistant: ```c
void AskForBonus(int *bonus, int *floatbonus, unsigned int *numberofdice, unsigned int *numberofsides, int *fastmode) {
  printf("ToBeFree's Dice Fight Probability Calculator, version 1.42.2\n");
  printf("This program is distributed in the hope that it will be useful, "
         "but WITHOUT ANY WARRANTY; "
         "without even the implied warranty of MERCHANTABILITY "
         "or FITNESS FOR A PARTICULAR PURPOSE.  See the "
         "GNU General Public License for more details.\n");
  printf("GPL 3.0, https://github.com/ToBeFree/DiceCalculator\n\n");
  printf("When the simulation is running, press Ctrl+C to exit.\n");
  printf("Enter integer bonus (e.g. 1 or -2): ");
  scanf("%d", bonus);
  do {
    printf("Add 0.5 to the bonus? (0 for no, 1 for yes): ");
    scanf("%d", floatbonus);
  } while (((*floatbonus) != 0) && ((*floatbonus) != 1));
  printf("How many dice? ");
  scanf("%d", numberofdice);
  printf("How many sides per die? ");
  scanf("%d", numberofsides);
  do {
    printf("Enable fast calculation mode (print each 100,000,000th line only)? "
           "(0 for no, 1 for yes): ");
    scanf("%d", fastmode);
  } while (((*fastmode) != 0) && ((*fastmode) != 1));
}
```