user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %rbx
  sub    $0x50,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  mov    D183(%rip),%rbx
  jmp    L193
L124:
  divsd  0x10(%rsp),%xmm2
  movapd %xmm2,%xmm0
  movq   %rbx,%xmm1
  andpd  %xmm2,%xmm1
  movsd  D3(%rip),%xmm5
  ucomisd %xmm1,%xmm5
  jbe    L26
  cvttsd2si %xmm2,%rdx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  cmpnlesd %xmm1,%xmm2
  movsd  D279(%rip),%xmm5
  andpd  %xmm5,%xmm2
  addsd  %xmm2,%xmm1
  movq   %rbx,%xmm2
  andnpd %xmm0,%xmm2
  orpd   %xmm1,%xmm2
L26:
  cvttsd2si %xmm2,%edi
  mov    %eax,%edx
  sub    %esi,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  mulsd  D161(%rip),%xmm0
  divsd  %xmm4,%xmm0
  addsd  D279(%rip),%xmm0
  addsd  D130(%rip),%xmm0
  movapd %xmm0,%xmm4
  movsd  D183(%rip),%xmm2
  movapd %xmm0,%xmm1
  andpd  %xmm2,%xmm1
  movsd  D3(%rip),%xmm5
  ucomisd %xmm1,%xmm5
  jbe    L13
  cvttsd2si %xmm0,%rdx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  cmpnlesd %xmm1,%xmm4
  movsd  D279(%rip),%xmm5
  andpd  %xmm5,%xmm4
  addsd  %xmm1,%xmm4
  andnpd %xmm0,%xmm2
  orpd   %xmm2,%xmm4
L13:
  cvttsd2si %xmm4,%esi
  test   %esi,%esi
  jle    L46
  cmp    %esi,%edi
  jle    L46
L130:
  lea    D76(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L193:
  lea    0x40(%rsp),%rcx
  lea    0x3c(%rsp),%rdx
  lea    0x38(%rsp),%rsi
  lea    0x44(%rsp),%r8
  lea    D125(%rip),%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    0x38(%rsp),%edi
  mov    0x3c(%rsp),%eax
  mov    0x40(%rsp),%esi
  mov    0x44(%rsp),%ecx
  mov    %edi,%edx
  or     %eax,%edx
  or     %esi,%edx
  or     %ecx,%edx
  je     L63
  pxor   %xmm7,%xmm7
  cvtsi2sd %ecx,%xmm7
  movsd  %xmm7,0x10(%rsp)
  movsd  D75(%rip),%xmm1
  movapd %xmm7,%xmm2
  addsd  %xmm1,%xmm2
  pxor   %xmm6,%xmm6
  cvtsi2sd %eax,%xmm6
  movsd  %xmm6,0x8(%rsp)
  pxor   %xmm3,%xmm3
  cvtsi2sd %esi,%xmm3
  mov    %eax,%edx
  imul   %ecx,%edx
  pxor   %xmm4,%xmm4
  cvtsi2sd %edx,%xmm4
  mulsd  %xmm2,%xmm6
  movapd %xmm6,%xmm0
  mulsd  %xmm3,%xmm1
  subsd  %xmm1,%xmm0
  divsd  %xmm4,%xmm0
  movapd %xmm0,%xmm1
  movsd  D183(%rip),%xmm6
  movapd %xmm0,%xmm5
  andpd  %xmm6,%xmm5
  movsd  D3(%rip),%xmm7
  ucomisd %xmm5,%xmm7
  jbe    L18
  cvttsd2si %xmm0,%rdx
  pxor   %xmm5,%xmm5
  cvtsi2sd %rdx,%xmm5
  movapd %xmm5,%xmm1
  cmpnlesd %xmm0,%xmm1
  movsd  D279(%rip),%xmm7
  andpd  %xmm7,%xmm1
  subsd  %xmm1,%xmm5
  andnpd %xmm0,%xmm6
  orpd   %xmm6,%xmm5
  movapd %xmm5,%xmm1
L18:
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jae    L124
  movapd %xmm1,%xmm5
  subsd  D279(%rip),%xmm5
  pxor   %xmm6,%xmm6
  cvtsi2sd %edi,%xmm6
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  %xmm4,%xmm1
  mulsd  %xmm5,%xmm1
  divsd  D161(%rip),%xmm1
  subsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm0
  comisd %xmm6,%xmm0
  jbe    L124
  movsd  D161(%rip),%xmm0
  movsd  0x8(%rsp),%xmm7
  movapd %xmm7,%xmm1
  mulsd  %xmm0,%xmm1
  addsd  %xmm4,%xmm1
  mulsd  %xmm3,%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  mulsd  %xmm1,%xmm1
  movsd  0x10(%rsp),%xmm3
  movapd %xmm3,%xmm0
  mulsd  D231(%rip),%xmm0
  movapd %xmm7,%xmm4
  mulsd  %xmm7,%xmm0
  sub    %esi,%edi
  pxor   %xmm2,%xmm2
  cvtsi2sd %edi,%xmm2
  mulsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm1
  movapd %xmm1,%xmm7
  movsd  %xmm1,0x20(%rsp)
  pxor   %xmm0,%xmm0
  ucomisd %xmm1,%xmm0
  ja     L175
  sqrtsd %xmm7,%xmm7
  movsd  %xmm7,0x28(%rsp)
  movapd %xmm3,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,0x8(%rsp)
L142:
  movsd  0x20(%rsp),%xmm1
  sqrtsd %xmm1,%xmm1
L83:
  movsd  0x18(%rsp),%xmm0
  subsd  %xmm1,%xmm0
  divsd  0x8(%rsp),%xmm0
  addsd  D130(%rip),%xmm0
  movapd %xmm0,%xmm3
  movsd  D183(%rip),%xmm2
  movapd %xmm0,%xmm1
  andpd  %xmm2,%xmm1
  movsd  D3(%rip),%xmm4
  ucomisd %xmm1,%xmm4
  jbe    L62
  cvttsd2si %xmm0,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  cmpnlesd %xmm1,%xmm3
  movsd  D279(%rip),%xmm4
  andpd  %xmm4,%xmm3
  addsd  %xmm1,%xmm3
  andnpd %xmm0,%xmm2
  orpd   %xmm2,%xmm3
L62:
  cvttsd2si %xmm3,%esi
  test   %esi,%esi
  jle    L188
L182:
  lea    D267(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L193
L175:
  movsd  0x20(%rsp),%xmm0
  call   <sqrt@plt>
  movsd  %xmm0,0x28(%rsp)
  movsd  0x10(%rsp),%xmm3
  addsd  %xmm3,%xmm3
  mulsd  0x8(%rsp),%xmm3
  movsd  %xmm3,0x8(%rsp)
  pxor   %xmm0,%xmm0
  ucomisd 0x20(%rsp),%xmm0
  jbe    L142
  movsd  0x20(%rsp),%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  jmp    L83
L188:
  movsd  0x18(%rsp),%xmm0
  addsd  0x28(%rsp),%xmm0
  divsd  0x8(%rsp),%xmm0
  subsd  D130(%rip),%xmm0
  movapd %xmm0,%xmm3
  movsd  D183(%rip),%xmm2
  movapd %xmm0,%xmm1
  andpd  %xmm2,%xmm1
  movsd  D3(%rip),%xmm4
  ucomisd %xmm1,%xmm4
  jbe    L183
  cvttsd2si %xmm0,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  movapd %xmm1,%xmm3
  cmpnlesd %xmm0,%xmm3
  movsd  D279(%rip),%xmm4
  andpd  %xmm4,%xmm3
  subsd  %xmm3,%xmm1
  andnpd %xmm0,%xmm2
  movapd %xmm1,%xmm3
  orpd   %xmm2,%xmm3
L183:
  cvttsd2si %xmm3,%esi
  jmp    L182
L46:
  pxor   %xmm0,%xmm0
  cvtsi2sd %edi,%xmm0
  movsd  D161(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  mulsd  0x8(%rsp),%xmm0
  lea    -0x1(%rdi),%edx
  imul   %edi,%edx
  imul   %ecx,%edx
  imul   %edx,%eax
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm3
  divsd  %xmm3,%xmm0
  addsd  D130(%rip),%xmm0
  movapd %xmm0,%xmm3
  movsd  D183(%rip),%xmm2
  movapd %xmm0,%xmm1
  andpd  %xmm2,%xmm1
  movsd  D3(%rip),%xmm4
  ucomisd %xmm1,%xmm4
  jbe    L143
  cvttsd2si %xmm0,%rax
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  cmpnlesd %xmm1,%xmm3
  movsd  D279(%rip),%xmm4
  andpd  %xmm4,%xmm3
  addsd  %xmm1,%xmm3
  andnpd %xmm0,%xmm2
  orpd   %xmm2,%xmm3
L143:
  cvttsd2si %xmm3,%esi
  jmp    L130
L63:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L118
  mov    $0x0,%eax
  add    $0x50,%rsp
  pop    %rbx
  ret
L118:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D183
type: byte[8]
name: parse_data
arguments: data_label: D3
type: f32[2]
name: parse_data
arguments: data_label: D279
type: f32[2]
name: parse_data
arguments: data_label: D161
type: f64
name: parse_data
arguments: data_label: D130
type: byte[8]
name: parse_data
arguments: data_label: D76
type: string
name: parse_data
arguments: data_label: D125
type: string
name: parse_data
arguments: data_label: D75
type: f64
name: parse_data
arguments: data_label: D231
type: f64
name: parse_data
arguments: data_label: D267
type: string

tool: {"D183": [0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f]}

tool: {"D3": [0.0,176.0]}

tool: {"D279": [0.0,1.875]}

tool: D161: 200

tool: {"D130": [0x8d,0xed,0xb5,0xa0,0xf7,0xc6,0xb0,0x3e]}

tool: D76: failure on day %d


tool: D125: %d%d%d%d

tool: D75: 100

tool: D231: 800

tool: D267: success on day %d


assistant: ```c
int main() {
  int H, U, D, F;
  double k;
  double s = 0.0;
  int flag;
  int ans1, ans2;
  int k1;
  while (scanf("%d%d%d%d", &H, &U, &D, &F), H || U || D || F) {
    flag = 1;
    k = floor(((100.0 + F) * U - 100.0 * D) / (F * U));
    if (k <= 0)
      flag = 0;
    if (flag)
      s = k * U - F * U * k * (k - 1) / 200.0 - (k - 1) * D;
    flag = (flag && s > H);
    if (flag) {
      ans1 = floor((200.0 * U + F * U - 200.0 * D + sqrt(pow(200.0 * U + F * U - 200.0 * D, 2) - 800.0 * F * U * (H - D))) / (2.0 * F * U) - 1e-6);
      ans2 = ceil((200.0 * U + F * U - 200.0 * D - sqrt(pow(200.0 * U + F * U - 200.0 * D, 2) - 800.0 * F * U * (H - D))) / (2.0 * F * U) + 1e-6);
      if (ans2 > 0)
        ans1 = ans2;
      printf("success on day %d\n", ans1);
    } else {
      k1 = ceil((100.0 + F) / F);
      ans1 = ceil(200.0 * (U - D) / (F * U) + 1 + 1e-6);
      ans2 = ceil((200.0 * k1 * U - k1 * (k1 - 1) * F * U) / (200.0 * D) + 1e-6);
      if (ans1 <= 0 || ans1 >= k1)
        ans1 = ans2;
      printf("failure on day %d\n", ans1);
    }
  }
  return 0;
}
```