user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %r15
  lea    D53(%rip),%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D32(%rip),%rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x24(%rsp),%r14
  lea    0x20(%rsp),%r13
  lea    0x1c(%rsp),%r12
  lea    0x18(%rsp),%rbp
  nopl   0x0(%rax)
L32:
  mov    %r14,%r8
  mov    %r13,%rcx
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <scanf@plt>
  test   %rax,%rax
  je     L12
  mov    0x18(%rsp),%eax
  mov    0x1c(%rsp),%esi
  mov    0x20(%rsp),%edi
  mov    0x24(%rsp),%ecx
  mov    %eax,%edx
  imul   %esi,%edx
  imul   %edi,%edx
  imul   %ecx,%edx
  test   %edx,%edx
  je     L12
  pxor   %xmm2,%xmm2
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cltd
  cvtsi2ss %ecx,%xmm2
  cvtsi2ss %eax,%xmm0
  idiv   %ecx
  divss  %xmm2,%xmm0
  cvtsi2ss %edi,%xmm1
  xor    %eax,%eax
  cvtss2sd %xmm1,%xmm1
  divsd  D26(%rip),%xmm1
  test   %edx,%edx
  setg   %al
  cvttss2si %xmm0,%r9d
  pxor   %xmm0,%xmm0
  cvtsi2ss %esi,%xmm0
  add    %eax,%r9d
  mov    %esi,%eax
  divss  %xmm2,%xmm0
  cltd
  idiv   %ecx
  xor    %eax,%eax
  cvttss2si %xmm0,%edi
  test   %edx,%edx
  setg   %al
  add    %eax,%edi
  ucomisd D29(%rip),%xmm1
  lea    (%r9,%rdi,1),%r8d
  jp     L34
  jne    L34
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  mov    %r15,%rdi
  cvtsi2ss %r9d,%xmm0
  cvtsi2ss %r8d,%xmm1
  divss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  mulsd  D14(%rip),%xmm0
  cvttsd2si %xmm0,%esi
  call   <printf@plt>
  jmp    L32
  nopl   0x0(%rax,%rax,1)
L34:
  movsd  D55(%rip),%xmm0
  mov    %r9d,%edi
  mov    %r8d,0xc(%rsp)
  subsd  %xmm1,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsp)
  call   <pow@plt>
  mov    0xc(%rsp),%edi
  movsd  (%rsp),%xmm0
  mov    %eax,0x8(%rsp)
  call   <pow@plt>
  mov    0x8(%rsp),%edx
  mov    $0x1,%ecx
  mov    %r15,%rdi
  mov    %eax,%r8d
  mov    %ecx,%eax
  sub    %edx,%eax
  sub    %r8d,%ecx
  cltd
  idiv   %ecx
  imul   $0x64,%eax,%esi
  call   <printf@plt>
  jmp    L32
  nopw   0x0(%rax,%rax,1)
L12:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L41
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L41:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D53
type_infered: string
name: retrieve_data
arguments: label: D32
type_infered: string
name: retrieve_data
arguments: label: D26
type_infered: f64
name: retrieve_data
arguments: label: D29
type_infered: f64
name: retrieve_data
arguments: label: D14
type_infered: byte[8]
name: retrieve_data
arguments: label: D55
type_infered: byte[8]

tool: D53: %.1lf


tool: D32: %d%d%d%d

tool: D26: 6

tool: D29: 0.5

tool: {"D14": [0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x40]}

tool: {"D55": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
int main() {
  int ev1, ev2, at, d, n1, n2;
  double p, q, prob;
  while (scanf("%d%d%d%d", &ev1, &ev2, &at, &d) && ev1 * ev2 * at * d != 0) {
    p = (float)at / 6.0;
    q = 1 - p;
    n1 = (float)ev1 / d;
    if (ev1 % d > 0) {
      n1++;
    }
    n2 = (float)ev2 / d;
    if (ev2 % d > 0) {
      n2++;
    }
    if (p == 0.5) {
      prob = (float)n1 / (n1 + n2);
      printf("%.1lf\n", 100 * prob);
    } else {
      printf("%.1lf\n", 100 * ((1 - pow((q / p), n1)) / (1 - pow((q / p), n1 + n2))));
    }
  }
  return 0;
}
```