user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<edflib_sprint_number_nonlocalized>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x3b9aca00,-0x10(%rbp)
  movsd  -0x30(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x14(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x14(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x30(%rbp),%xmm0
  jbe    L129
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2d,(%rax)
  cmpl   $0x0,-0x14(%rbp)
  jns    L129
  negl   -0x14(%rbp)
L129:
  movl   $0xa,-0x1c(%rbp)
  jmp    L23
L133:
  mov    -0x14(%rbp),%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jne    L119
  cmpl   $0x0,-0x20(%rbp)
  je     L126
L119:
  mov    -0xc(%rbp),%eax
  lea    0x30(%rax),%ecx
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  movl   $0x1,-0x20(%rbp)
L126:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x10(%rbp)
  subl   $0x1,-0x1c(%rbp)
L23:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L133
  cmpl   $0x0,-0x20(%rbp)
  jne    L159
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x30,(%rax)
L159:
  movl   $0x5f5e100,-0x10(%rbp)
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jns    L104
  negl   -0x14(%rbp)
L104:
  cmpl   $0x0,-0x14(%rbp)
  jne    L91
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  mov    -0x18(%rbp),%eax
  jmp    L78
L91:
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2e,(%rax)
  movl   $0x9,-0x1c(%rbp)
  jmp    L11
L70:
  mov    -0x14(%rbp),%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  cltd
  idivl  -0x10(%rbp)
  mov    %edx,-0x14(%rbp)
  mov    -0xc(%rbp),%eax
  lea    0x30(%rax),%ecx
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x18(%rbp)
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x10(%rbp)
  subl   $0x1,-0x1c(%rbp)
L11:
  cmpl   $0x0,-0x1c(%rbp)
  jne    L70
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  subl   $0x1,-0x18(%rbp)
  jmp    L112
L9:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L132
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L142
L132:
  addl   $0x1,-0x18(%rbp)
  jmp    L122
L142:
  subl   $0x1,-0x18(%rbp)
L112:
  cmpl   $0x0,-0x18(%rbp)
  jg     L9
L122:
  mov    -0x18(%rbp),%eax
L78:
  pop    %rbp
  ret
```

assistant: ```c
int edflib_sprint_number_nonlocalized(char *str, double nr) {
  int flag = 0, z, i, j = 0, q, base = 1000000000;
  double var;
  q = (int)nr;
  var = nr - q;
  if (nr < 0.0) {
    str[j++] = '-';
    if (q < 0) {
      q = -q;
    }
  }
  for (i = 10; i; i--) {
    z = q / base;
    q %= base;
    if (z || flag) {
      str[j++] = '0' + z;
      flag = 1;
    }
    base /= 10;
  }
  if (!flag) {
    str[j++] = '0';
  }
  base = 100000000;
  var *= (base * 10);
  q = (int)var;
  if (q < 0) {
    q = -q;
  }
  if (!q) {
    str[j] = 0;
    return j;
  }
  str[j++] = '.';
  for (i = 9; i; i--) {
    z = q / base;
    q %= base;
    str[j++] = '0' + z;
    base /= 10;
  }
  str[j] = 0;
  j--;
  for (; j > 0; j--) {
    if (str[j] == '0') {
      str[j] = 0;
    } else {
      j++;
      break;
    }
  }
  return j;
}
```