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

```asm
<print_double>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L161
  mov    $0x2d,%edi
  call   <myputc@plt>
  movsd  -0x38(%rbp),%xmm0
  movq   D4(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
L161:
  movsd  -0x38(%rbp),%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  test   %rax,%rax
  js     L129
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L0
L129:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L0:
  movsd  -0x38(%rbp),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,-0x38(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L105
L167:
  mov    -0x28(%rbp),%ecx
  mov    %ecx,%edx
  mov    $0xcccccccd,%eax
  imul   %rdx,%rax
  shr    $0x20,%rax
  mov    %eax,%edx
  shr    $0x3,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  sub    %eax,%ecx
  mov    %ecx,%edx
  mov    -0x24(%rbp),%eax
  cltq
  mov    %dl,-0x20(%rbp,%rax,1)
  mov    -0x28(%rbp),%eax
  mov    %eax,%edx
  mov    $0xcccccccd,%eax
  imul   %rdx,%rax
  shr    $0x20,%rax
  shr    $0x3,%eax
  mov    %eax,-0x28(%rbp)
  addl   $0x1,-0x24(%rbp)
L105:
  cmpl   $0xb,-0x24(%rbp)
  jle    L167
  subl   $0x1,-0x24(%rbp)
  jmp    L121
L57:
  mov    -0x24(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  test   %al,%al
  jne    L115
  subl   $0x1,-0x24(%rbp)
L121:
  cmpl   $0x0,-0x24(%rbp)
  jns    L57
  jmp    L127
L115:
  nop
L127:
  cmpl   $0x0,-0x24(%rbp)
  jns    L123
  movl   $0x0,-0x24(%rbp)
  jmp    L123
L16:
  mov    -0x24(%rbp),%eax
  cltq
  movzbl -0x20(%rbp,%rax,1),%eax
  add    $0x30,%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <myputc@plt>
  subl   $0x1,-0x24(%rbp)
L123:
  cmpl   $0x0,-0x24(%rbp)
  jns    L16
  mov    $0x2e,%edi
  call   <myputc@plt>
  movl   $0x0,-0x24(%rbp)
  jmp    L83
L136:
  movsd  -0x38(%rbp),%xmm1
  movsd  D19(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x38(%rbp),%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%eax
  add    $0x30,%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <myputc@plt>
  mov    -0x28(%rbp),%eax
  test   %rax,%rax
  js     L50
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L45
L50:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L45:
  movsd  -0x38(%rbp),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,-0x38(%rbp)
  addl   $0x1,-0x24(%rbp)
L83:
  cmpl   $0xd,-0x24(%rbp)
  jle    L136
  mov    $0xa,%edi
  call   <myputc@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L27
  call   <__stack_chk_fail@plt>
L27:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D4
data_type: byte[8]
name: parse_data
arguments: data_label: D19
data_type: f64

tool: {"D4": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: D19: 10

assistant: ```c
void print_double(double x) {
  unsigned int xi;
  char buf[16];
  int i;
  if (x < 0) {
    myputc('-');
    x = -x;
  }
  xi = (unsigned int)x;
  x -= (double)xi;
  for (i = 0; i < 12; i++) {
    buf[i] = xi % 10;
    xi /= 10;
  }
  for (i--; i >= 0; i--)
    if (buf[i] != 0)
      break;
  if (i < 0)
    i = 0;
  for (; i >= 0; i--)
    myputc('0' + buf[i]);
  myputc('.');
  for (i = 0; i < 14; i++) {
    x *= 10.0;
    xi = (unsigned int)x;
    myputc('0' + xi);
    x -= (double)xi;
  }
  myputc('\n');
}
```