user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<sprint_fractional_12>:
  endbr64
  push   %r14
  pxor   %xmm1,%xmm1
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbx
  sub    $0x8,%rsp
  comisd %xmm0,%xmm1
  ja     L52
  mulsd  D48(%rip),%xmm0
  call   <nearbyint@plt>
  test   %eax,%eax
  jne    L45
L6:
  movb   $0x0,(%r12)
  xor    %r14d,%r14d
L51:
  mov    %r12,%rdi
  call   <strlen@plt>
  mov    %r14d,%edx
  lea    D38(%rip),%rsi
  lea    (%r12,%rax,1),%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L52:
  xorpd  D34(%rip),%xmm0
  mulsd  D48(%rip),%xmm0
  call   <nearbyint@plt>
  test   %eax,%eax
  je     L6
  movslq %eax,%rbx
  cltd
  imul   $0x2aaaaaab,%rbx,%rbx
  sar    $0x21,%rbx
  sub    %edx,%ebx
  movslq %ebx,%r13
  lea    0x0(%r13,%r13,2),%ecx
  mov    %r13,%rdx
  shl    $0x2,%ecx
  imul   $0x2aaaaaab,%r13,%r13
  sub    %ecx,%eax
  mov    %eax,%ebx
  mov    %edx,%eax
  sar    $0x1f,%eax
  sar    $0x21,%r13
  sub    %eax,%r13d
  lea    0x0(%r13,%r13,2),%eax
  mov    %r13d,%r14d
  shl    $0x2,%eax
  sub    %eax,%edx
  mov    $0x2d,%eax
  mov    %ax,(%r12)
  mov    %edx,%r13d
L21:
  mov    %r12,%rdi
  call   <strlen@plt>
  lea    (%r12,%rax,1),%rdi
  test   %ebx,%ebx
  je     L47
  mov    %ebx,%r8d
  mov    %r13d,%ecx
  mov    %r14d,%edx
  xor    %eax,%eax
  lea    D49(%rip),%rsi
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L47:
  test   %r13d,%r13d
  je     L51
  mov    %r13d,%ecx
  mov    %r14d,%edx
  lea    D59(%rip),%rsi
  xor    %eax,%eax
  call   <sprintf@plt>
  add    $0x8,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax)
L45:
  movslq %eax,%rbx
  cltd
  movb   $0x0,(%r12)
  imul   $0x2aaaaaab,%rbx,%rbx
  sar    $0x21,%rbx
  sub    %edx,%ebx
  movslq %ebx,%r13
  lea    0x0(%r13,%r13,2),%ecx
  mov    %r13,%rdx
  shl    $0x2,%ecx
  imul   $0x2aaaaaab,%r13,%r13
  sub    %ecx,%eax
  mov    %eax,%ebx
  mov    %edx,%eax
  sar    $0x1f,%eax
  sar    $0x21,%r13
  sub    %eax,%r13d
  lea    0x0(%r13,%r13,2),%eax
  mov    %r13d,%r14d
  shl    $0x2,%eax
  sub    %eax,%edx
  mov    %edx,%r13d
  jmp    L21
```

tool_calls: name: retrieve_data
arguments: label: D48
datatype: f64
name: retrieve_data
arguments: label: D38
datatype: string
name: retrieve_data
arguments: label: D34
datatype: f32[4]
name: retrieve_data
arguments: label: D49
datatype: string
name: retrieve_data
arguments: label: D59
datatype: string

tool: D48: 144

tool: D38: %d

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

tool: D49: %d;%d;%d

tool: D59: %d;%d

assistant: ```c
char *sprint_fractional_12(char *string, double v) {
  int d, p1, p2, neg = 0, n;
  if (v < 0.) {
    neg = 1;
    v = -v;
  }
  d = nearbyint(v * 144.);
  if (d == 0)
    neg = 0;
  p2 = d % 12;
  d /= 12;
  p1 = d % 12;
  d /= 12;
  string[0] = 0;
  if (neg)
    sprintf(string, "-");
  if (p2)
    sprintf(&string[strlen(string)], "%d;%d;%d", d, p1, p2);
  else if (p1)
    sprintf(&string[strlen(string)], "%d;%d", d, p1);
  else
    sprintf(&string[strlen(string)], "%d", d);
  return string;
}
```