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

```asm
<digit>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %rdi,0x28(%rsp)
  mov    %rsi,0x30(%rsp)
  mov    %rdx,%r14
  movaps %xmm0,%xmm6
  movss  %xmm0,0x24(%rsp)
  movaps %xmm1,%xmm7
  movss  %xmm1,0x3c(%rsp)
  mov    %ecx,%r13d
  movl   $0x1,(%rdx)
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm1,%xmm2
  movsd  %xmm2,0x48(%rsp)
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  %xmm1,0x40(%rsp)
  subsd  %xmm1,%xmm2
  movapd %xmm2,%xmm1
  lea    -0x1(%rcx),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%rsp)
  movss  D172(%rip),%xmm0
  andps  %xmm0,%xmm6
  movss  %xmm6,0x38(%rsp)
  andps  %xmm7,%xmm0
  movss  %xmm0,0x20(%rsp)
  comiss %xmm0,%xmm6
  jbe    L315
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm6,%xmm0
L64:
  mulsd  D209(%rip),%xmm0
  movsd  0x18(%rsp),%xmm6
  divsd  %xmm6,%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm6,0x8(%rsp)
  mov    $0xffffffff,%ebx
  movsd  D189(%rip),%xmm1
  movsd  D168(%rip),%xmm0
  comisd %xmm6,%xmm0
  jbe    L195
L117:
  movsd  0x8(%rsp),%xmm5
  mulsd  %xmm1,%xmm5
  movsd  %xmm5,0x8(%rsp)
  sub    $0x1,%ebx
  comisd %xmm5,%xmm0
  ja     L117
  jmp    L250
L315:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x20(%rsp),%xmm0
  jmp    L64
L195:
  movsd  0x18(%rsp),%xmm7
  movsd  %xmm7,0x8(%rsp)
  mov    $0xffffffff,%ebx
  jmp    L250
L332:
  movsd  0x8(%rsp),%xmm6
  mulsd  D189(%rip),%xmm6
  movsd  %xmm6,0x8(%rsp)
  sub    $0x1,%ebx
L250:
  movsd  0x8(%rsp),%xmm0
  call   <round@plt>
  movsd  0x8(%rsp),%xmm3
  subsd  %xmm3,%xmm0
  andpd  D78(%rip),%xmm0
  mulsd  0x10(%rsp),%xmm3
  comisd %xmm3,%xmm0
  ja     L332
  jmp    L115
L98:
  movsd  0x8(%rsp),%xmm7
  divsd  D189(%rip),%xmm7
  movsd  %xmm7,0x8(%rsp)
  add    $0x1,%ebx
L115:
  movsd  0x8(%rsp),%xmm0
  call   <round@plt>
  movsd  0x8(%rsp),%xmm4
  subsd  %xmm4,%xmm0
  andpd  D78(%rip),%xmm0
  mulsd  0x10(%rsp),%xmm4
  comisd %xmm0,%xmm4
  ja     L98
  mov    %ebx,%r12d
  neg    %r12d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r12d,%xmm1
  movsd  D189(%rip),%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm7
  movsd  %xmm0,0x10(%rsp)
  pxor   %xmm1,%xmm1
  cvtss2sd 0x38(%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  pxor   %xmm0,%xmm0
  cvtss2sd 0x20(%rsp),%xmm0
  mulsd  %xmm7,%xmm0
  maxsd  %xmm0,%xmm1
  movsd  0x18(%rsp),%xmm0
  mulsd  D10(%rip),%xmm0
  mulsd  %xmm7,%xmm0
  addsd  %xmm1,%xmm0
  call   <log10@plt>
  addsd  D168(%rip),%xmm0
  cvttsd2si %xmm0,%ebp
  cmp    $0x3,%ebx
  jg     L21
  lea    (%rbx,%rbp,1),%edx
  cmp    $0xfffffffd,%edx
  jge    L140
L21:
  lea    -0x1(%rbp),%eax
  mov    %eax,0x8(%rsp)
  cmp    $0x1,%ebp
  setg   %r15b
  movzbl %r15b,%r15d
  add    %ebp,%r15d
  pxor   %xmm0,%xmm0
  comiss 0x24(%rsp),%xmm0
  ja     L73
  comiss 0x3c(%rsp),%xmm0
  jbe    L216
L73:
  add    $0x1,%r15d
L216:
  sub    %ebp,%r12d
  add    $0x1,%r12d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r12d,%xmm1
  movsd  D189(%rip),%xmm0
  call   <pow@plt>
  cvtsd2ss %xmm0,%xmm0
  mov    0x30(%rsp),%rax
  movss  %xmm0,(%rax)
  cmp    $0x3,%ebx
  jle    L102
  lea    -0x1(%rbx,%rbp,1),%r8d
  mov    0x8(%rsp),%ecx
  mov    %r15d,%edx
  lea    D85(%rip),%rsi
  mov    0x28(%rsp),%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
L37:
  cmp    $0x3,%r13d
  je     L343
  cmp    $0x2,%r13d
  je     L139
L161:
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  add    %ebx,%ebp
  mov    $0x1,%r8d
  sub    %ebp,%r8d
  mov    0x8(%rsp),%ecx
  mov    %r15d,%edx
  lea    D117(%rip),%rsi
  mov    0x28(%rsp),%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L37
L343:
  movsd  0x40(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm7
  mulsd  %xmm7,%xmm0
  cvtsd2ss %xmm0,%xmm0
  ucomiss D59(%rip),%xmm0
  jp     L161
  jne    L161
  movsd  0x48(%rsp),%xmm0
  mulsd  %xmm7,%xmm0
  cvtsd2ss %xmm0,%xmm0
  ucomiss D164(%rip),%xmm0
  jp     L161
  jne    L161
  movl   $0x0,(%r14)
  jmp    L161
L139:
  movss  0x24(%rsp),%xmm7
  ucomiss D45(%rip),%xmm7
  jp     L113
  jne    L113
L22:
  movss  0x3c(%rsp),%xmm2
  ucomiss D45(%rip),%xmm2
  jp     L61
  jne    L61
L169:
  movl   $0x0,(%r14)
  jmp    L161
L113:
  movsd  0x40(%rsp),%xmm0
  mulsd  0x10(%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  ucomiss D59(%rip),%xmm0
  jp     L161
  je     L22
  jmp    L161
L61:
  movsd  0x48(%rsp),%xmm0
  mulsd  0x10(%rsp),%xmm0
  cvtsd2ss %xmm0,%xmm0
  ucomiss D164(%rip),%xmm0
  jp     L161
  je     L169
  jmp    L161
L140:
  test   %ebx,%ebx
  js     L92
  mov    $0x0,%r12d
L318:
  pxor   %xmm0,%xmm0
  comiss 0x24(%rsp),%xmm0
  ja     L235
  comiss 0x3c(%rsp),%xmm0
  jbe    L59
L235:
  add    $0x1,%edx
L59:
  mov    0x30(%rsp),%rax
  movl   $0x3f800000,(%rax)
  mov    %r12d,%ecx
  lea    D115(%rip),%rsi
  mov    0x28(%rsp),%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  jmp    L161
L92:
  mov    $0x1,%eax
  sub    %ebx,%eax
  sub    %ebp,%eax
  cmp    %ebp,%r12d
  mov    $0x0,%edx
  cmovl  %edx,%eax
  lea    0x1(%rbp,%rax,1),%edx
  jmp    L318
```

tool_calls: name: parse_data
arguments: tag: D172
data_type: dword
name: parse_data
arguments: tag: D209
data_type: byte[8]
name: parse_data
arguments: tag: D189
data_type: f64
name: parse_data
arguments: tag: D168
data_type: f64
name: parse_data
arguments: tag: D78
data_type: qword[2]
name: parse_data
arguments: tag: D10
data_type: f64
name: parse_data
arguments: tag: D85
data_type: string
name: parse_data
arguments: tag: D117
data_type: string
name: parse_data
arguments: tag: D59
data_type: byte[4]
name: parse_data
arguments: tag: D164
data_type: byte[4]
name: parse_data
arguments: tag: D45
data_type: f64
name: parse_data
arguments: tag: D115
data_type: string

tool: D172: 2147483647

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

tool: D189: 10

tool: D168: 1

tool: {"D78": [0x7fffffffffffffff,0x0000000000000000]}

tool: D10: 0.1

tool: D85: %%%d.%dfe+%2.2d

tool: D117: %%%d.%dfe-%2.2d

tool: {"D59": [0x00,0x00,0x80,0xbf]}

tool: {"D164": [0x00,0x00,0x80,0x3f]}

tool: D45: 0

tool: D115: %%%d.%df

assistant: ```c
void digit(char *format, float *scale, int *digflag, float xlo, float xhi, int nlab) {
  double sig, delta, x, y, log10(), pow();
  int p, q, width, digits;
  *digflag = 1;
  x = delta = ((double)xhi - (double)xlo) / (nlab - 1);
  sig = (1.0e-6) * (((fabs(xlo)) > (fabs(xhi)) ? (fabs(xlo)) : (fabs(xhi)))) / x;
  for (p = -1; x < 1.0;) {
    x *= 10.0;
    p--;
  }
  while (fabs(round(x) - x) > x * sig) {
    x *= 10.0;
    p--;
  }
  while (fabs(round(x) - x) < x * sig) {
    x /= 10.0;
    p++;
  }
  y = pow((double)10, (double)(-p));
  q = (int)(1.0 + log10(((fabs((double)xlo) * y) > (fabs((double)xhi) * y) ? (fabs((double)xlo) * y) : (fabs((double)xhi) * y)) + 0.1 * delta * y));
  if (p >= 4 || p + q < -3) {
    digits = q - 1;
    width = q;
    if (q > 1)
      width++;
    if (xlo < 0 || xhi < 0)
      (width)++;
    *scale = pow((double)10, (double)(-p - q + 1));
    if (p >= 4)
      sprintf(format, "%%%d.%dfe+%2.2d", width, digits, p + q - 1);
    else
      sprintf(format, "%%%d.%dfe-%2.2d", width, digits, 1 - (p + q));
    if (nlab == 3) {
      if ((float)(xlo * y) == -1.0 && (float)(xhi * y) == 1.0)
        *digflag = 0;
    } else if (nlab == 2) {
      if (((float)xlo == 0.0 || (float)(xlo * y) == -1.0) && ((float)xhi == 0.0 || (float)(xhi * y) == 1.0))
        *digflag = 0;
    }
  } else {
    if (p >= 0) {
      digits = 0;
      width = p + q;
    } else {
      digits = -p;
      width = 1 + q + ((-p) >= q) * (1 + (-p) - q);
    }
    if (xlo < 0 || xhi < 0)
      (width)++;
    *scale = 1.0;
    sprintf(format, "%%%d.%df", width, digits);
  }
}
```