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

```asm
<qd_to_digits>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x78,%rsp
  mov    %rdx,0x10(%rsp)
  lea    0x20(%rsp),%r12
  mov    %r12,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  call   <qd_abs@plt>
  movsd  0x0(%r13),%xmm0
  ucomisd D34(%rip),%xmm0
  jp     L315
  jne    L315
  test   %ebx,%ebx
  jle    L110
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L193
  add    $0x78,%rsp
  movslq %ebx,%rdx
  mov    %rbp,%rdi
  mov    $0x30,%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    11c0 <memset@plt>
L169:
  movzbl 0x0(%rbp),%eax
  cmp    $0x30,%al
  jle    L279
  movslq 0x1c(%rsp),%r14
  movslq %ebx,%r13
  cmpb   $0x34,-0x1(%rbp,%r14,1)
  jle    L50
  lea    -0x1(%rbx),%eax
  addb   $0x1,-0x2(%rbp,%r14,1)
  test   %eax,%eax
  jle    L29
  movslq %eax,%rdx
  lea    -0x2(%rbp,%r13,1),%rcx
  lea    -0x2(%rbx),%esi
  add    %rbp,%rdx
  sub    %rsi,%rcx
  movzbl (%rdx),%eax
  jmp    L192
  nop
L259:
  sub    $0xa,%eax
  sub    $0x1,%rdx
  mov    %al,0x1(%rdx)
  movzbl (%rdx),%eax
  add    $0x1,%eax
  mov    %al,(%rdx)
  cmp    %rdx,%rcx
  je     L29
L192:
  cmp    $0x39,%al
  jg     L259
L29:
  movzbl 0x0(%rbp),%eax
L50:
  cmp    $0x39,%al
  jle    L76
  addl   $0x1,0x18(%rsp)
  cmp    $0x1,%ebx
  jle    L73
  lea    -0x2(%rbx),%eax
  lea    -0x1(%r13),%rsi
  mov    %r13,%rdi
  sub    %rax,%rsi
  sub    %rax,%rdi
  lea    0x1(%rax),%rdx
  add    %rbp,%rsi
  add    %rbp,%rdi
  call   <memmove@plt>
L73:
  mov    $0x3031,%eax
  mov    %ax,0x0(%rbp)
L76:
  mov    0x10(%rsp),%rax
  mov    0x18(%rsp),%ebx
  movb   $0x0,0x0(%rbp,%r13,1)
  mov    %ebx,(%rax)
L110:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L193
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L315:
  call   <fabs@plt>
  mov    %eax,%edi
  call   <log10@plt>
  mov    %eax,%edi
  call   <floor@plt>
  mov    %eax,0x18(%rsp)
  mov    %rax,%r13
  cmp    $0xfffffed4,%eax
  jl     L235
  cmp    $0x12c,%eax
  jg     L263
  movsd  D62(%rip),%xmm2
  lea    0x40(%rsp),%r14
  mov    %r14,%rdi
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x8(%rsp)
  call   <qd_real@plt>
  mov    0x18(%rsp),%esi
  mov    %r14,%rdx
L320:
  mov    %r14,%rdi
  call   <qd_npwr@plt>
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <qd_div@plt>
L246:
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rdi
  call   <qd_gt_qd_d@plt>
  cmp    $0x1,%eax
  je     L226
  movsd  D51(%rip),%xmm0
  mov    %r12,%rdi
  call   <qd_lt_qd_d@plt>
  cmp    $0x1,%eax
  je     L53
L198:
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rdi
  call   <qd_geq_qd_d@plt>
  cmp    $0x1,%eax
  je     L318
  movsd  D51(%rip),%xmm0
  mov    %r12,%rdi
  call   <qd_lt_qd_d@plt>
  cmp    $0x1,%eax
  je     L318
  lea    0x1(%rbx),%ecx
  mov    %ebx,%eax
  mov    %rbp,%r14
  mov    %ecx,0x1c(%rsp)
  lea    0x1(%rbp,%rax,1),%r13
  test   %ecx,%ecx
  jle    L21
  nopl   0x0(%rax)
L127:
  pxor   %xmm0,%xmm0
  mov    %r12,%rsi
  mov    %r12,%rdi
  add    $0x1,%r14
  cvttsd2si 0x20(%rsp),%r15d
  cvtsi2sd %r15d,%xmm0
  call   <qd_sub_qd_d@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rsi
  mov    %r12,%rdi
  call   <qd_mul_d@plt>
  lea    0x30(%r15),%edx
  mov    %dl,-0x1(%r14)
  cmp    %r13,%r14
  jne    L127
L21:
  test   %ebx,%ebx
  jle    L169
  movslq %ebx,%r13
  lea    -0x1(%rbx),%edx
  lea    -0x1(%rbp,%r13,1),%rcx
  lea    0x0(%rbp,%r13,1),%rax
  sub    %rdx,%rcx
  jmp    L286
  nopw   0x0(%rax,%rax,1)
L154:
  add    $0xa,%edx
  subb   $0x1,-0x1(%rax)
  mov    %dl,(%rax)
L96:
  sub    $0x1,%rax
  cmp    %rcx,%rax
  je     L169
L286:
  movzbl (%rax),%edx
  cmp    $0x2f,%dl
  jle    L154
  cmp    $0x39,%dl
  jle    L96
  sub    $0xa,%edx
  addb   $0x1,-0x1(%rax)
  mov    %dl,(%rax)
  jmp    L96
  cs nopw 0x0(%rax,%rax,1)
L263:
  mov    $0xffffffcb,%esi
  mov    %r12,%rdi
  lea    0x40(%rsp),%r14
  call   <qd_ldexp@plt>
  movsd  D62(%rip),%xmm1
  mov    %r14,%rdi
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%rsp)
  call   <qd_real@plt>
  mov    0x18(%rsp),%esi
  mov    %r14,%rdx
  mov    %r14,%rdi
  call   <qd_npwr@plt>
  mov    %r14,%rsi
  mov    %r12,%rdi
  mov    %r12,%rdx
  call   <qd_div@plt>
  mov    $0x35,%esi
  mov    %r12,%rdi
  call   <qd_ldexp@plt>
  jmp    L246
  nopl   0x0(%rax,%rax,1)
L318:
  lea    D17(%rip),%rdi
  call   <printf@plt>
  jmp    L110
  nopl   0x0(%rax)
L226:
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rsi
  mov    %r12,%rdi
  call   <qd_div_qd_d@plt>
  lea    0x1(%r13),%eax
  mov    %eax,0x18(%rsp)
  jmp    L198
  cs nopw 0x0(%rax,%rax,1)
L235:
  movsd  D62(%rip),%xmm3
  lea    0x40(%rsp),%r14
  mov    %r14,%rdi
  movapd %xmm3,%xmm0
  movsd  %xmm3,0x8(%rsp)
  call   <qd_real@plt>
  mov    %r14,%rdx
  mov    $0x12c,%esi
  mov    %r14,%rdi
  call   <qd_npwr@plt>
  mov    %r12,%rdx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <qd_mul@plt>
  movsd  0x8(%rsp),%xmm0
  mov    %r14,%rdi
  call   <qd_real@plt>
  lea    0x12c(%r13),%esi
  mov    %r14,%rdx
  jmp    L320
  nopw   0x0(%rax,%rax,1)
L53:
  movsd  0x8(%rsp),%xmm0
  mov    %r12,%rsi
  mov    %r12,%rdi
  call   <qd_mul_d@plt>
  lea    -0x1(%r13),%eax
  mov    %eax,0x18(%rsp)
  jmp    L198
  xchg   %ax,%ax
L279:
  lea    D2(%rip),%rdi
  call   <printf@plt>
  jmp    L110
L193:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D34
type_infered: f64
name: unpack_data
arguments: label: D62
type_infered: f64
name: unpack_data
arguments: label: D51
type_infered: f64
name: unpack_data
arguments: label: D17
type_infered: string
name: unpack_data
arguments: label: D2
type_infered: string

tool: D34: 0

tool: D62: 10

tool: D51: 1

tool: D17: qd_to_digits: cannot compute exponent

tool: D2: qd_to_digits: nonpositive leading digit

assistant: ```c
void qd_to_digits(const double *a, char *s, int *expn, int precision) {
  int D = precision + 1;
  double acc[4];
  double tmp[4];
  int i, d, e;
  qd_abs(a, acc);
  if (a[0] == 0.0) {
    expn = 0;
    for (i = 0; i < precision; i++)
      s[i] = '0';
    return;
  }
  e = (int)(floor(log10(fabs(a[0]))));
  if (e < -300) {
    qd_real(10.0, tmp);
    qd_npwr(tmp, 300, tmp);
    qd_mul(acc, tmp, acc);
    qd_real(10.0, tmp);
    qd_npwr(tmp, e + 300, tmp);
    qd_div(acc, tmp, acc);
  } else if (e > 300) {
    qd_ldexp(acc, -53);
    qd_real(10.0, tmp);
    qd_npwr(tmp, e, tmp);
    qd_div(acc, tmp, acc);
    qd_ldexp(acc, 53);
  } else {
    qd_real(10.0, tmp);
    qd_npwr(tmp, e, tmp);
    qd_div(acc, tmp, acc);
  }
  if (qd_gt_qd_d(acc, 10.0) == 1) {
    qd_div_qd_d(acc, 10.0, acc);
    e++;
  } else if (qd_lt_qd_d(acc, 1.0) == 1) {
    qd_mul_d(acc, 10.0, acc);
    e--;
  }
  if ((qd_geq_qd_d(acc, 10.0) == 1) || (qd_lt_qd_d(acc, 1.0) == 1)) {
    printf("qd_to_digits: cannot compute exponent");
    return;
  }
  for (i = 0; i < D; i++) {
    d = ((int)acc[0]);
    qd_sub_qd_d(acc, (double)d, acc);
    qd_mul_d(acc, 10.0, acc);
    s[i] = ((char)(d + '0'));
  }
  for (i = D - 1; i > 0; i--) {
    if (s[i] < '0') {
      s[i - 1]--;
      s[i] += 10;
    } else if (s[i] > '9') {
      s[i - 1]++;
      s[i] -= 10;
    }
  }
  if (s[0] <= '0') {
    printf("qd_to_digits: nonpositive leading digit");
    return;
  }
  if (s[D - 1] >= '5') {
    s[D - 2]++;
    i = D - 2;
    while (i > 0 && s[i] > '9') {
      s[i] -= 10;
      s[--i]++;
    }
  }
  if (s[0] > '9') {
    e++;
    for (i = precision; i >= 2; i--)
      s[i] = s[i - 1];
    s[0] = '1';
    s[1] = '0';
  }
  s[precision] = 0;
  *expn = e;
}
```