user: Demonstrate the C code that generates the assembly output below:

```asm
<main>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  sub    $0xf90,%rsp
  lea    D36(%rip),%rdi
  xor    %r12d,%r12d
  lea    D45(%rip),%rbp
  lea    0x30(%rsp),%rcx
  lea    0x28(%rsp),%rdx
  mov    %fs:0x28,%rax
  mov    %rax,0x1f88(%rsp)
  xor    %eax,%eax
  lea    0x20(%rsp),%rsi
  lea    0x38(%rsp),%r8
  call   <scanf@plt>
  lea    0x40(%rsp),%rbx
  nopl   (%rax)
L105:
  pxor   %xmm1,%xmm1
  movsd  0x20(%rsp),%xmm0
  mov    %r12d,%esi
  mov    %rbp,%rdi
  cvtsi2sd %r12d,%xmm1
  movsd  0x28(%rsp),%xmm2
  mov    $0x1,%eax
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm2
  mulsd  %xmm1,%xmm0
  mulsd  %xmm1,%xmm2
  mulsd  %xmm1,%xmm0
  mulsd  0x30(%rsp),%xmm1
  addsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  addsd  0x38(%rsp),%xmm0
  movsd  %xmm0,(%rbx,%r12,8)
  add    $0x1,%r12
  call   <printf@plt>
  cmp    $0x3e8,%r12
  jne    L105
  xor    %eax,%eax
  pxor   %xmm3,%xmm3
  jmp    L14
  nopl   0x0(%rax,%rax,1)
L107:
  add    $0x1,%rax
  cmp    $0x3e8,%rax
  je     L67
L14:
  comisd (%rbx,%rax,8),%xmm3
  jbe    L107
  pxor   %xmm7,%xmm7
  cvtsi2sd %eax,%xmm7
  movsd  %xmm7,0x8(%rsp)
L67:
  xor    %eax,%eax
  jmp    L162
  nopl   (%rax)
L137:
  add    $0x1,%rax
  cmp    $0x3e8,%rax
  je     L106
L162:
  movsd  (%rbx,%rax,8),%xmm0
  comisd %xmm3,%xmm0
  jbe    L137
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
L124:
  cvttsd2si 0x8(%rsp),%eax
  xor    %ebp,%ebp
  lea    D3(%rip),%rbx
  lea    D10(%rip),%r12
  cltq
  movsd  0x40(%rsp,%rax,8),%xmm4
L76:
  comisd %xmm4,%xmm3
  jbe    L127
L8:
  movsd  0x8(%rsp),%xmm2
  addsd  %xmm1,%xmm2
  mulsd  D19(%rip),%xmm2
  cvttsd2si %xmm2,%eax
  cltq
  movsd  0x40(%rsp,%rax,8),%xmm0
  comisd %xmm3,%xmm0
  jbe    L188
  ucomisd %xmm2,%xmm2
  jp     L83
  movsd  0x8(%rsp),%xmm6
  ucomisd %xmm2,%xmm6
  setnp  %al
  cmovne %ebp,%eax
  test   %al,%al
  jne    L127
L83:
  movsd  0x8(%rsp),%xmm0
  movapd %xmm2,%xmm1
  mov    %rbx,%rdi
  mov    $0x3,%eax
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  call   <printf@plt>
  movsd  0x18(%rsp),%xmm4
  pxor   %xmm3,%xmm3
  movsd  0x10(%rsp),%xmm2
  comisd %xmm4,%xmm3
  movapd %xmm2,%xmm1
  ja     L8
L127:
  mov    0x1f88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L4
  add    $0x1f90,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nop
L188:
  comisd %xmm0,%xmm3
  jbe    L178
  movsd  %xmm2,0x8(%rsp)
L37:
  movsd  0x8(%rsp),%xmm5
  ucomisd %xmm1,%xmm5
  setnp  %al
  cmovne %ebp,%eax
  test   %al,%al
  je     L92
  ucomisd %xmm1,%xmm2
  setnp  %al
  cmovne %ebp,%eax
  test   %al,%al
  jne    L127
L92:
  movsd  0x8(%rsp),%xmm0
  mov    %rbx,%rdi
  mov    $0x3,%eax
  movsd  %xmm1,0x10(%rsp)
  call   <printf@plt>
  movsd  0x10(%rsp),%xmm1
  pxor   %xmm3,%xmm3
  cvttsd2si %xmm1,%eax
  cltq
  movsd  0x40(%rsp,%rax,8),%xmm0
  comisd %xmm3,%xmm0
  jbe    L127
  cvttsd2si 0x8(%rsp),%eax
  cltq
  movsd  0x40(%rsp,%rax,8),%xmm4
  jmp    L76
  nopw   0x0(%rax,%rax,1)
L178:
  movapd %xmm2,%xmm0
  mov    %r12,%rdi
  mov    $0x1,%eax
  movsd  %xmm1,0x18(%rsp)
  movsd  %xmm2,0x10(%rsp)
  call   <printf@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  0x18(%rsp),%xmm1
  jmp    L37
L106:
  movsd  0x40(%rsp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm3,%xmm0
  ja     L124
  jmp    L127
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: tag: D36
datatype: string
name: parse_data
arguments: tag: D45
datatype: string
name: parse_data
arguments: tag: D3
datatype: string
name: parse_data
arguments: tag: D10
datatype: string
name: parse_data
arguments: tag: D19
datatype: byte[8]

tool: D36: %lf %lf %lf %lf

tool: D45: Func: %lf for x = %d


tool: D3: %lf	%lf	%lf


tool: D10: The root is at %lf

tool: {"D19": [0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x3f]}

assistant: ```c
main() {
  double a, b, c, d;
  double p1, p2, mid;
  double function[1000];
  scanf("%lf %lf %lf %lf", &a, &b, &c, &d);
  int i;
  for (i = 0; i <= 999; ++i) {
    function[i] = (a * i * i * i) + (b * i * i) + (c * i) + (d);
    printf("Func: %lf for x = %d\n", function[i], i);
  }
  for (i = 0; i <= 999; ++i) {
    if (function[i] < 0) {
      p1 = i;
      break;
    }
  }
  for (i = 0; i <= 999; ++i) {
    if (function[i] > 0) {
      p2 = i;
      break;
    }
  }
  while (function[(int)p2] > 0 && function[(int)p1] < 0) {
    mid = (p1 + p2) / 2.0;
    if (function[(int)mid] > 0) {
      p2 = mid;
    } else if (function[(int)mid] < 0) {
      p1 = mid;
    } else {
      printf("The root is at %lf", mid);
    }
    if (p1 == p2 && p2 == mid)
      break;
    printf("%lf\t%lf\t%lf\n", p1, p2, mid);
  }
}
```