user: 请从给定的汇编指令推导出C源代码：

```asm
<cvt>:
  endbr64
  push   %r15
  pxor   %xmm7,%xmm7
  push   %r14
  push   %r13
  push   %r12
  mov    %rcx,%r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x48,%rsp
  mov    %r8d,0x18(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  mov    $0x4e,%eax
  cmp    %eax,%edi
  cmovle %edi,%eax
  test   %eax,%eax
  mov    %eax,%esi
  mov    $0x0,%eax
  cmovns %esi,%eax
  comisd %xmm0,%xmm7
  mov    %eax,0x1c(%rsp)
  ja     L378
  movl   $0x0,(%rdx)
L515:
  lea    0x28(%rsp),%r15
  lea    0x50(%r12),%rbp
  mov    %r15,%rdi
  call   <modf@plt>
  pxor   %xmm7,%xmm7
  movapd %xmm0,%xmm1
  movsd  0x28(%rsp),%xmm0
  ucomisd %xmm7,%xmm0
  jp     L454
  jne    L454
  comisd %xmm7,%xmm1
  jbe    L182
  movsd  D49(%rip),%xmm6
  movsd  D38(%rip),%xmm2
  xor    %r13d,%r13d
  movapd %xmm6,%xmm0
  movsd  %xmm6,0x8(%rsp)
  mulsd  %xmm1,%xmm0
  comisd %xmm0,%xmm2
  movsd  %xmm0,0x30(%rsp)
  jbe    L491
  nopl   0x0(%rax)
L104:
  movapd %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  sub    $0x1,%r13d
  mulsd  %xmm1,%xmm0
  comisd %xmm0,%xmm2
  ja     L104
  movsd  %xmm0,0x30(%rsp)
  mov    %r12,%r15
L53:
  movslq 0x1c(%rsp),%rax
  mov    0x18(%rsp),%edx
  movslq %r13d,%rcx
  mov    %r13d,(%rbx)
  lea    (%r12,%rax,1),%r14
  add    %r14,%rcx
  test   %edx,%edx
  cmove  %rcx,%r14
  cmp    %r12,%r14
  jb     L417
  cmp    %r14,%r15
  ja     L117
  movsd  D49(%rip),%xmm2
  lea    0x30(%rsp),%r13
  movsd  %xmm2,0x8(%rsp)
  cmp    %rbp,%r15
  jb     L57
  jmp    L117
  nopl   (%rax)
L7:
  cmp    %r15,%r14
  jb     L117
L57:
  mulsd  0x8(%rsp),%xmm1
  mov    %r13,%rdi
  add    $0x1,%r15
  movapd %xmm1,%xmm0
  call   <modf@plt>
  cvttsd2si 0x30(%rsp),%edx
  movapd %xmm0,%xmm1
  add    $0x30,%edx
  mov    %dl,-0x1(%r15)
  cmp    %r15,%rbp
  ja     L7
L117:
  cmp    %rbp,%r14
  jae    L357
  movzbl (%r14),%eax
  lea    0x5(%rax),%edx
  mov    %dl,(%r14)
  cmp    $0x39,%dl
  jle    L367
  mov    0x18(%rsp),%eax
  mov    %r14,%rdx
  test   %eax,%eax
  je     L70
  movb   $0x30,(%rdx)
  cmp    %rdx,%r12
  jae    L347
L202:
  movzbl -0x1(%rdx),%eax
  lea    -0x1(%rdx),%rsi
  lea    0x1(%rax),%ecx
  mov    %cl,-0x1(%rdx)
  cmp    $0x39,%cl
  jle    L367
  mov    %rsi,%rdx
  movb   $0x30,(%rdx)
  cmp    %rdx,%r12
  jb     L202
  xchg   %ax,%ax
L347:
  movb   $0x31,(%rdx)
  addl   $0x1,(%rbx)
  cmpb   $0x39,(%rdx)
  jg     L347
L367:
  movb   $0x0,(%r14)
L4:
  mov    0x38(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L323
  add    $0x48,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L454:
  movsd  D49(%rip),%xmm7
  mov    %rbp,%r14
  xor    %r13d,%r13d
  movsd  %xmm7,0x8(%rsp)
  nopl   0x0(%rax)
L474:
  mov    %r15,%rdi
  movsd  %xmm1,0x10(%rsp)
  divsd  0x8(%rsp),%xmm0
  add    $0x1,%r13d
  call   <modf@plt>
  pxor   %xmm5,%xmm5
  mov    %r14,%rsi
  sub    $0x1,%r14
  movsd  %xmm0,0x30(%rsp)
  addsd  D47(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  0x10(%rsp),%xmm1
  cvttsd2si %xmm0,%ecx
  movsd  0x28(%rsp),%xmm0
  add    $0x30,%ecx
  ucomisd %xmm5,%xmm0
  mov    %cl,(%r14)
  jp     L474
  jne    L474
  cmp    %r14,%rbp
  jbe    L491
  mov    %r12,%rdi
  mov    %r12,%r8
  sub    %r14,%rdi
  sub    %rsi,%r8
  lea    0x4f(%rdi),%rcx
  cmp    $0xe,%r8
  jbe    L145
  cmp    $0x6,%rcx
  jbe    L145
  lea    0x50(%rdi),%r15
  cmp    $0xe,%rcx
  jbe    L37
  mov    %r15,%rsi
  xor    %ecx,%ecx
  and    $0xfffffffffffffff0,%rsi
  nopl   0x0(%rax)
L348:
  movdqu (%r14,%rcx,1),%xmm6
  movups %xmm6,(%r12,%rcx,1)
  add    $0x10,%rcx
  cmp    %rsi,%rcx
  jne    L348
  mov    %r15,%r8
  and    $0xfffffffffffffff0,%r8
  lea    (%r12,%r8,1),%rsi
  lea    (%r14,%r8,1),%rcx
  cmp    %r8,%r15
  je     L246
  sub    %r8,%rdi
  lea    0x50(%rdi),%r9
  add    $0x4f,%rdi
  cmp    $0x6,%rdi
  jbe    L540
L514:
  mov    (%r14,%r8,1),%rax
  mov    %rax,(%r12,%r8,1)
  mov    %r9,%rax
  and    $0xfffffffffffffff8,%rax
  add    %rax,%rsi
  add    %rax,%rcx
  cmp    %rax,%r9
  je     L246
L540:
  movzbl (%rcx),%eax
  mov    %al,(%rsi)
  lea    0x1(%rcx),%rax
  cmp    %rax,%rbp
  jbe    L246
  movzbl 0x1(%rcx),%eax
  mov    %al,0x1(%rsi)
  lea    0x2(%rcx),%rax
  cmp    %rax,%rbp
  jbe    L246
  movzbl 0x2(%rcx),%eax
  mov    %al,0x2(%rsi)
  lea    0x3(%rcx),%rax
  cmp    %rax,%rbp
  jbe    L246
  movzbl 0x3(%rcx),%eax
  mov    %al,0x3(%rsi)
  lea    0x4(%rcx),%rax
  cmp    %rax,%rbp
  jbe    L246
  movzbl 0x4(%rcx),%eax
  mov    %al,0x4(%rsi)
  lea    0x5(%rcx),%rax
  cmp    %rax,%rbp
  jbe    L246
  movzbl 0x5(%rcx),%eax
  mov    %al,0x5(%rsi)
  lea    0x6(%rcx),%rax
  cmp    %rax,%rbp
  jbe    L246
  movzbl 0x6(%rcx),%eax
  mov    %al,0x6(%rsi)
L246:
  add    %r12,%r15
  jmp    L53
  nopl   0x0(%rax)
L533:
  movb   $0x31,(%rdx)
  addl   $0x1,(%rbx)
  cmp    %r14,%r12
  jae    L11
  movb   $0x30,(%r14)
L11:
  add    $0x1,%r14
  cmpb   $0x39,(%rdx)
  jle    L367
  cmp    %rdx,%r12
  jae    L545
L70:
  movb   $0x30,(%rdx)
  cmp    %rdx,%r12
  jae    L533
L420:
  movzbl -0x1(%rdx),%eax
  lea    -0x1(%rdx),%rsi
  lea    0x1(%rax),%ecx
  mov    %cl,-0x1(%rdx)
  cmp    $0x39,%cl
  jle    L367
  mov    %rsi,%rdx
  movb   $0x30,(%rdx)
  cmp    %rdx,%r12
  jae    L533
  jmp    L420
  nopl   (%rax)
L545:
  movb   $0x31,(%rdx)
  addl   $0x1,(%rbx)
  cmp    %r14,%r12
  jae    L307
  movb   $0x30,(%r14)
L307:
  add    $0x1,%r14
  cmpb   $0x39,(%rdx)
  jg     L545
  jmp    L367
  nopl   (%rax)
L182:
  mov    %r12,%r15
  xor    %r13d,%r13d
  jmp    L53
  nopl   0x0(%rax,%rax,1)
L378:
  movl   $0x1,(%rdx)
  xorpd  D42(%rip),%xmm0
  jmp    L515
  nopl   0x0(%rax,%rax,1)
L417:
  movb   $0x0,(%r12)
  jmp    L4
  nopw   0x0(%rax,%rax,1)
L357:
  movb   $0x0,0x4f(%r12)
  jmp    L4
  nopl   0x0(%rax,%rax,1)
L145:
  mov    %r12,%rcx
  sub    %r14,%rcx
  lea    0x50(%rcx),%r8
  xor    %ecx,%ecx
  nopl   0x0(%rax)
L416:
  movzbl (%r14,%rcx,1),%esi
  mov    %sil,(%r12,%rcx,1)
  add    $0x1,%rcx
  cmp    %r8,%rcx
  jne    L416
  lea    0x50(%rdi),%r15
  jmp    L246
  nopl   0x0(%rax,%rax,1)
L491:
  mov    %r12,%r15
  jmp    L53
L37:
  mov    %r15,%r9
  mov    %r14,%rcx
  mov    %r12,%rsi
  xor    %r8d,%r8d
  jmp    L514
L323:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D49
type: byte[8]
name: retrieve_data
arguments: tag: D38
type: byte[8]
name: retrieve_data
arguments: tag: D47
type: byte[8]
name: retrieve_data
arguments: tag: D42
type: byte[16]

tool: {"D49": [0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x40]}

tool: {"D38": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D47": [0xb8,0x1e,0x85,0xeb,0x51,0xb8,0x9e,0x3f]}

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

assistant: ```c
char *cvt(double arg, int ndigits, int *decpt, int *sign, char *buf, int eflag) {
  int r2;
  double fi, fj;
  char *p, *p1;
  if (ndigits < 0) {
    ndigits = 0;
  }
  if (ndigits >= 80 - 1) {
    ndigits = 80 - 2;
  }
  r2 = 0;
  *sign = 0;
  p = &buf[0];
  if (arg < 0) {
    *sign = 1;
    arg = -arg;
  }
  arg = modf(arg, &fi);
  p1 = &buf[80];
  if (fi != 0) {
    p1 = &buf[80];
    while (fi != 0) {
      fj = modf(fi / 10, &fi);
      *--p1 = (int)((fj + .03) * 10) + '0';
      r2++;
    }
    while (p1 < &buf[80]) {
      *p++ = *p1++;
    }
  } else if (arg > 0) {
    while ((fj = arg * 10) < 1) {
      arg = fj;
      r2--;
    }
  }
  p1 = &buf[ndigits];
  if (eflag == 0) {
    p1 += r2;
  }
  *decpt = r2;
  if (p1 < &buf[0]) {
    buf[0] = '\0';
    return buf;
  }
  while (p <= p1 && p < &buf[80]) {
    arg *= 10;
    arg = modf(arg, &fj);
    *p++ = (int)fj + '0';
  }
  if (p1 >= &buf[80]) {
    buf[80 - 1] = '\0';
    return buf;
  }
  p = p1;
  *p1 += 5;
  while (*p1 > '9') {
    *p1 = '0';
    if (p1 > buf) {
      ++*--p1;
    } else {
      *p1 = '1';
      (*decpt)++;
      if (eflag == 0) {
        if (p > buf) {
          *p = '0';
        }
        p++;
      }
    }
  }
  *p = '\0';
  return buf;
}
```