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

```asm
<outfloat>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  movsd  %xmm0,-0x38(%rbp)
  mov    %edi,-0x3c(%rbp)
  mov    %esi,-0x40(%rbp)
  mov    %edx,%eax
  mov    %ecx,-0x48(%rbp)
  mov    %r8,%r13
  mov    %al,-0x44(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x38(%rbp),%xmm0
  seta   %al
  movzbl %al,%eax
  mov    %eax,-0x24(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  je     L166
  movsd  -0x38(%rbp),%xmm0
  movq   D28(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
L166:
  mov    $0x0,%ebx
  jmp    L140
L177:
  movsd  -0x38(%rbp),%xmm1
  movsd  D17(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  add    $0x1,%ebx
L140:
  cmp    -0x40(%rbp),%ebx
  jl     L177
  movsd  -0x38(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%r12d
  cmpl   $0x0,-0x40(%rbp)
  jne    L2
  mov    $0x1,%edx
  jmp    L318
L2:
  mov    $0x2,%edx
L318:
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x3c(%rbp)
  jge    L83
  mov    -0x3c(%rbp),%eax
  mov    %r13,%rsi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <e_outfloat@plt>
  mov    -0x3c(%rbp),%eax
  cltq
  add    %r13,%rax
  jmp    L175
L83:
  mov    -0x3c(%rbp),%eax
  cltq
  sub    $0x1,%rax
  lea    0x0(%r13,%rax,1),%rbx
  jmp    L14
L193:
  movslq %r12d,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %r12d,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %r12d,%edx
  sub    %eax,%edx
  mov    %edx,%eax
  add    $0x30,%eax
  mov    %al,(%rbx)
  movslq %r12d,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %r12d,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  mov    %eax,%r12d
  sub    $0x1,%rbx
L14:
  mov    -0x3c(%rbp),%eax
  cltq
  mov    -0x40(%rbp),%edx
  movslq %edx,%rdx
  sub    %rdx,%rax
  add    %r13,%rax
  cmp    %rax,%rbx
  jae    L193
  cmpl   $0x0,-0x40(%rbp)
  jle    L135
  mov    %rbx,%rax
  lea    -0x1(%rax),%rbx
  movb   $0x2e,(%rax)
L135:
  test   %r12d,%r12d
  jne    L150
  mov    %rbx,%rax
  lea    -0x1(%rax),%rbx
  movb   $0x30,(%rax)
  jmp    L150
L22:
  test   %r12d,%r12d
  je     L112
  movslq %r12d,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %r12d,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %r12d,%edx
  sub    %eax,%edx
  mov    %edx,%eax
  add    $0x30,%eax
  mov    %al,(%rbx)
  movslq %r12d,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %r12d,%edx
  sar    $0x1f,%edx
  sub    %edx,%eax
  mov    %eax,%r12d
  sub    $0x1,%rbx
L150:
  cmp    %r13,%rbx
  jae    L22
  jmp    L296
L112:
  nop
L296:
  test   %r12d,%r12d
  je     L49
  mov    -0x3c(%rbp),%eax
  mov    %r13,%rsi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <e_outfloat@plt>
  mov    -0x3c(%rbp),%eax
  cltq
  add    %r13,%rax
  jmp    L175
L49:
  cmp    %r13,%rbx
  jae    L15
  cmpl   $0x0,-0x24(%rbp)
  je     L15
  mov    -0x3c(%rbp),%eax
  mov    %r13,%rsi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <e_outfloat@plt>
  mov    -0x3c(%rbp),%eax
  cltq
  add    %r13,%rax
  jmp    L175
L15:
  cmpl   $0x0,-0x48(%rbp)
  je     L53
  add    $0x1,%rbx
  cmpl   $0x0,-0x24(%rbp)
  je     L190
  lea    0x1(%r13),%rax
  jmp    L74
L190:
  mov    %r13,%rax
L74:
  mov    %rax,%r12
  jmp    L45
L82:
  movzbl (%rbx),%eax
  mov    %al,(%r12)
  add    $0x1,%rbx
  add    $0x1,%r12
L45:
  mov    -0x3c(%rbp),%eax
  cltq
  add    %r13,%rax
  cmp    %rax,%rbx
  jb     L82
  jmp    L79
L194:
  movzbl -0x44(%rbp),%eax
  mov    %al,(%r12)
  add    $0x1,%r12
L79:
  mov    -0x3c(%rbp),%eax
  cltq
  add    %r13,%rax
  cmp    %rax,%r12
  jb     L194
  cmpl   $0x0,-0x24(%rbp)
  je     L304
  movb   $0x2d,0x0(%r13)
  jmp    L304
L53:
  mov    %rbx,%r12
  jmp    L277
L147:
  movzbl -0x44(%rbp),%eax
  mov    %al,(%r12)
  sub    $0x1,%r12
L277:
  cmp    %r13,%r12
  jae    L147
  cmpl   $0x0,-0x24(%rbp)
  je     L304
  cmpb   $0x20,-0x44(%rbp)
  jne    L57
  movb   $0x2d,(%rbx)
  jmp    L304
L57:
  movb   $0x2d,0x0(%r13)
L304:
  mov    -0x3c(%rbp),%eax
  cltq
  add    %r13,%rax
L175:
  add    $0x38,%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: label: D28
type: f32[2]
name: read_data
arguments: label: D17
type: f64
name: read_data
arguments: label: D3
type: f64

tool: {"D28": [0.0,-0.0]}

tool: D17: 10

tool: D3: 0.5

assistant: ```c
char *outfloat(value, width, nplace, fill_char, left_justify, p)
double value;
int width, nplace;
char fill_char;
int left_justify;
register char *p;
{
  register int i, intval;
  register char *place, *to, *from;
  int negative;
  negative = value < 0.0 ? 1 : 0;
  if (negative)
    value = -value;
  for (i = 0; i < nplace; i++)
    value *= 10.0;
  intval = value + 0.5;
  if (nplace + (nplace == 0 ? 1 : 2) > width) {
    e_outfloat(width, p);
    return p + width;
  }
  for (place = p + width - 1; place >= p + width - nplace; place--) {
    *place = '0' + intval % 10;
    intval /= 10;
  }
  if (nplace > 0)
    *place-- = '.';
  if (intval == 0)
    *place-- = '0';
  for (; place >= p; place--) {
    if (intval == 0)
      break;
    else {
      *place = '0' + intval % 10;
      intval /= 10;
    }
  }
  if (intval != 0) {
    e_outfloat(width, p);
    return p + width;
  }
  if (place < p && negative) {
    e_outfloat(width, p);
    return p + width;
  }
  if (left_justify) {
    for (from = place + 1, to = (negative ? p + 1 : p); from < p + width; from++, to++)
      *to = *from;
    for (; to < p + width; to++)
      *to = fill_char;
    if (negative)
      *p = '-';
  } else {
    for (to = place; to >= p; to--)
      *to = fill_char;
    if (negative) {
      if (fill_char == ' ')
        *place = '-';
      else
        *p = '-';
    }
  }
  return p + width;
}
```