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

```asm
<nicelog>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x1e8,%rsp
  movq   %xmm1,%r12
  mov    %edi,%ebx
  mov    %rsi,0x18(%rsp)
  mov    %rdx,0x38(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x1d8(%rsp)
  xor    %eax,%eax
  mov    D83(%rip),%rax
  mov    %rax,0x40(%rsp)
  mov    D88(%rip),%rax
  mov    %rax,0x48(%rsp)
  mov    D92(%rip),%rax
  mov    %rax,0x50(%rsp)
  mov    D117(%rip),%rax
  mov    %rax,0x58(%rsp)
  mov    D39(%rip),%rax
  mov    %rax,0x60(%rsp)
  lea    0x70(%rsp),%rdi
  lea    D98(%rip),%rsi
  mov    $0x2d,%ecx
  rep movsq %ds:(%rsi),%es:(%rdi)
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  jae    L164
  movq   %r12,%xmm6
  comisd %xmm6,%xmm1
  jae    L164
  comisd %xmm6,%xmm0
  jbe    L8
  movq   %xmm0,%rax
  movq   %r12,%xmm0
  mov    %rax,%r12
L8:
  call   <log@plt>
  divsd  D164(%rip),%xmm0
  divsd  D199(%rip),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm0,%xmm1
  ja     L155
L25:
  cvttsd2si %xmm0,%ebp
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  movsd  D154(%rip),%xmm0
  call   <pow@plt>
  movsd  %xmm0,0x10(%rsp)
  movq   %r12,%xmm0
  call   <log@plt>
  divsd  D164(%rip),%xmm0
  divsd  D199(%rip),%xmm0
  comisd D136(%rip),%xmm0
  jbe    L175
  mulsd  D206(%rip),%xmm0
  addsd  D39(%rip),%xmm0
L175:
  cvttsd2si %xmm0,%eax
  sub    %ebp,%eax
  mov    %eax,0x20(%rsp)
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  D83(%rip),%xmm0
  addsd  D39(%rip),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,0x24(%rsp)
  cmp    %eax,%ebx
  jge    L129
  mov    $0x0,%eax
  movsd  D39(%rip),%xmm1
  jmp    L83
L155:
  mulsd  D206(%rip),%xmm0
  subsd  D39(%rip),%xmm0
  jmp    L25
L156:
  subl   $0x1,0x20(%rsp)
  mov    $0x0,%eax
L39:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x20(%rsp),%xmm0
  movslq %eax,%rdx
  mulsd  0x40(%rsp,%rdx,8),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%ecx
  mov    %ecx,0x24(%rsp)
  cmp    %ebx,%ecx
  jle    L60
L83:
  cmp    $0x4,%eax
  je     L156
  add    $0x1,%eax
  cmp    $0x4,%eax
  jle    L39
L60:
  cmpl   $0x0,0x20(%rsp)
  jle    L113
  movslq %eax,%rdx
  lea    0x70(%rsp,%rdx,8),%rdi
  mov    %rdi,0x30(%rsp)
  mov    $0xffffffff,%r13d
  mov    $0x0,%r12d
  mov    %rdx,0x28(%rsp)
  jmp    L76
L129:
  mov    $0x0,%eax
  jmp    L60
L107:
  movslq %r13d,%rax
  mov    0x18(%rsp),%rsi
  lea    (%rsi,%rax,8),%r15
  mov    0x30(%rsp),%rbp
  mov    $0x1,%ebx
L49:
  lea    0x0(%r13,%rbx,1),%r14d
  movsd  0x10(%rsp),%xmm2
  mulsd  0x0(%rbp),%xmm2
  movsd  %xmm2,(%rsp)
  pxor   %xmm1,%xmm1
  cvtsi2sd %r12d,%xmm1
  movsd  D154(%rip),%xmm0
  call   <pow@plt>
  mulsd  (%rsp),%xmm0
  movsd  %xmm0,(%r15,%rbx,8)
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  add    $0x1,%rbx
  add    $0x28,%rbp
  movsd  0x8(%rsp),%xmm3
  comisd %xmm0,%xmm3
  ja     L49
  mov    %r14d,%r13d
L30:
  add    $0x1,%r12d
  cmp    0x20(%rsp),%r12d
  je     L113
L76:
  mov    0x28(%rsp),%rax
  movsd  0x40(%rsp,%rax,8),%xmm4
  movsd  %xmm4,0x8(%rsp)
  pxor   %xmm5,%xmm5
  comisd %xmm5,%xmm4
  ja     L107
  jmp    L30
L113:
  pxor   %xmm1,%xmm1
  cvtsi2sdl 0x20(%rsp),%xmm1
  movsd  D154(%rip),%xmm0
  call   <pow@plt>
  mov    0x24(%rsp),%edi
  movslq %edi,%rax
  mulsd  0x10(%rsp),%xmm0
  mov    0x18(%rsp),%rdx
  movsd  %xmm0,-0x8(%rdx,%rax,8)
  mov    0x38(%rsp),%rax
  mov    %edi,(%rax)
L164:
  mov    0x1d8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L11
  add    $0x1e8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L11:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_label: D83
type: f32[2]
name: retrieve_data
arguments: data_label: D88
type: f32[2]
name: retrieve_data
arguments: data_label: D92
type: f32[2]
name: retrieve_data
arguments: data_label: D117
type: f32[2]
name: retrieve_data
arguments: data_label: D39
type: f64
name: retrieve_data
arguments: data_label: D98
type: f64
name: retrieve_data
arguments: data_label: D164
type: f64
name: retrieve_data
arguments: data_label: D199
type: f64
name: retrieve_data
arguments: data_label: D154
type: f64
name: retrieve_data
arguments: data_label: D136
type: f32[4]
name: retrieve_data
arguments: data_label: D206
type: f64

tool: {"D83": [0.0,2.53125]}

tool: {"D88": [0.0,2.3125]}

tool: {"D92": [0.0,2.125]}

tool: {"D117": [0.0,2.0]}

tool: D39: 1

tool: D98: 1

tool: D164: 0.99999

tool: D199: 2.30258

tool: D154: 10

tool: {"D136": [0.0,0.0,1.5231795214734853e-34,1.8749974966049194]}

tool: D206: 0.9999

assistant: ```c
void nicelog(double llimit, double ulimit, int max, double *val, int *nret) {
  int i, j, k, ij, mul, icy, nexp, nrt;
  double xxl, xxu;
  double lind[5] = {9, 5, 3, 2, 1};
  double seed[9][5] = {1, 1, 1, 1, 1, 2, 2, 2, 3, 0, 3, 4, 5, 0, 0, 4, 6, 0, 0, 0, 5, 8, 0, 0, 0, 6, 0, 0, 0, 0, 7, 0, 0, 0, 0, 8, 0, 0, 0, 0, 9, 0, 0, 0, 0};
  nrt = 0;
  if (llimit <= 0.0 || ulimit <= 0.0) {
    return;
  }
  xxl = llimit;
  xxu = ulimit;
  if (xxu < xxl) {
    xxl = ulimit;
    xxu = llimit;
  }
  xxl = log(xxl) / 0.99999 / 2.30258;
  if (xxl < 0) {
    xxl = xxl * 0.9999 - 1.0;
  }
  ij = xxl;
  mul = ij;
  xxl = pow(10, (double)ij);
  xxu = log(xxu) / 0.99999 / 2.30258;
  if (xxu > 0) {
    xxu = xxu * 0.9999 + 1.0;
  }
  icy = xxu;
  icy = icy - ij;
  for (k = 0; k < 5; k++) {
    nrt = icy * lind[k] + 1;
    if (nrt <= max) {
      break;
    }
    if (k == 4) {
      k = -1;
      icy--;
    }
  }
  ij = -1;
  for (i = 0; i < icy; i++) {
    for (j = 0; j < lind[k]; j++) {
      ij++;
      val[ij] = seed[j][k] * xxl * pow(10.0, (double)(i));
    }
  }
  val[nrt - 1] = xxl * pow(10.0, (double)icy);
  nexp = mul;
  *nret = nrt;
}
```