user: Converte this assembly snippet into its equivalent C code:

```asm
<nicelog>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x200,%rsp
  movsd  %xmm0,-0x1d8(%rbp)
  movsd  %xmm1,-0x1e0(%rbp)
  mov    %edi,-0x1e4(%rbp)
  mov    %rsi,-0x1f0(%rbp)
  mov    %rdx,-0x1f8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movsd  D108(%rip),%xmm0
  movsd  %xmm0,-0x1a0(%rbp)
  movsd  D179(%rip),%xmm0
  movsd  %xmm0,-0x198(%rbp)
  movsd  D61(%rip),%xmm0
  movsd  %xmm0,-0x190(%rbp)
  movsd  D20(%rip),%xmm0
  movsd  %xmm0,-0x188(%rbp)
  movsd  D96(%rip),%xmm0
  movsd  %xmm0,-0x180(%rbp)
  lea    -0x170(%rbp),%rax
  lea    D130(%rip),%rdx
  mov    $0x2d,%ecx
  mov    %rax,%rdi
  mov    %rdx,%rsi
  rep movsq %ds:(%rsi),%es:(%rdi)
  movl   $0x0,-0x1bc(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x1d8(%rbp),%xmm0
  jae    L130
  pxor   %xmm0,%xmm0
  comisd -0x1e0(%rbp),%xmm0
  jae    L130
  movsd  -0x1d8(%rbp),%xmm0
  movsd  %xmm0,-0x1b0(%rbp)
  movsd  -0x1e0(%rbp),%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
  movsd  -0x1b0(%rbp),%xmm0
  comisd -0x1a8(%rbp),%xmm0
  jbe    L100
  movsd  -0x1e0(%rbp),%xmm0
  movsd  %xmm0,-0x1b0(%rbp)
  movsd  -0x1d8(%rbp),%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
L100:
  mov    -0x1b0(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  movsd  D163(%rip),%xmm1
  movq   %rax,%xmm0
  divsd  %xmm1,%xmm0
  movsd  D148(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1b0(%rbp)
  pxor   %xmm0,%xmm0
  comisd -0x1b0(%rbp),%xmm0
  jbe    L84
  movsd  -0x1b0(%rbp),%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D96(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1b0(%rbp)
L84:
  movsd  -0x1b0(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x1c4(%rbp)
  mov    -0x1c4(%rbp),%eax
  mov    %eax,-0x1b8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x1c4(%rbp),%xmm0
  mov    D57(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x1b0(%rbp)
  mov    -0x1a8(%rbp),%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  movsd  D163(%rip),%xmm1
  movq   %rax,%xmm0
  divsd  %xmm1,%xmm0
  movsd  D148(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
  movsd  -0x1a8(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L155
  movsd  -0x1a8(%rbp),%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D96(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x1a8(%rbp)
L155:
  movsd  -0x1a8(%rbp),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x1c0(%rbp)
  mov    -0x1c4(%rbp),%eax
  sub    %eax,-0x1c0(%rbp)
  movl   $0x0,-0x1c8(%rbp)
  jmp    L40
L146:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x1c0(%rbp),%xmm1
  mov    -0x1c8(%rbp),%eax
  cltq
  movsd  -0x1a0(%rbp,%rax,8),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D96(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x1bc(%rbp)
  mov    -0x1bc(%rbp),%eax
  cmp    -0x1e4(%rbp),%eax
  jle    L58
  cmpl   $0x4,-0x1c8(%rbp)
  jne    L108
  movl   $0xffffffff,-0x1c8(%rbp)
  subl   $0x1,-0x1c0(%rbp)
L108:
  addl   $0x1,-0x1c8(%rbp)
L40:
  cmpl   $0x4,-0x1c8(%rbp)
  jle    L146
  jmp    L30
L58:
  nop
L30:
  movl   $0xffffffff,-0x1c4(%rbp)
  movl   $0x0,-0x1d0(%rbp)
  jmp    L72
L71:
  movl   $0x0,-0x1cc(%rbp)
  jmp    L136
L29:
  addl   $0x1,-0x1c4(%rbp)
  mov    -0x1c8(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x1cc(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  add    %rcx,%rax
  movsd  -0x170(%rbp,%rax,8),%xmm0
  mulsd  -0x1b0(%rbp),%xmm0
  movsd  %xmm0,-0x200(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x1d0(%rbp),%xmm0
  mov    D57(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  mov    -0x1c4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x1f0(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x200(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1cc(%rbp)
L136:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x1cc(%rbp),%xmm1
  mov    -0x1c8(%rbp),%eax
  cltq
  movsd  -0x1a0(%rbp,%rax,8),%xmm0
  comisd %xmm1,%xmm0
  ja     L29
  addl   $0x1,-0x1d0(%rbp)
L72:
  mov    -0x1d0(%rbp),%eax
  cmp    -0x1c0(%rbp),%eax
  jl     L71
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x1c0(%rbp),%xmm0
  mov    D57(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    -0x1bc(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  lea    -0x8(%rdx),%rcx
  mov    -0x1f0(%rbp),%rdx
  add    %rcx,%rdx
  movq   %rax,%xmm0
  mulsd  -0x1b0(%rbp),%xmm0
  movsd  %xmm0,(%rdx)
  mov    -0x1b8(%rbp),%eax
  mov    %eax,-0x1b4(%rbp)
  mov    -0x1f8(%rbp),%rax
  mov    -0x1bc(%rbp),%edx
  mov    %edx,(%rax)
  jmp    L123
L130:
  nop
L123:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L10
  call   <__stack_chk_fail@plt>
L10:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D108
type: f32[2]
name: retrieve_data
arguments: data_label: D179
type: f32[2]
name: retrieve_data
arguments: data_label: D61
type: f32[2]
name: retrieve_data
arguments: data_label: D20
type: f32[2]
name: retrieve_data
arguments: data_label: D96
type: f64
name: retrieve_data
arguments: data_label: D130
type: f64
name: retrieve_data
arguments: data_label: D163
type: f64
name: retrieve_data
arguments: data_label: D148
type: f64
name: retrieve_data
arguments: data_label: D32
type: f64
name: retrieve_data
arguments: data_label: D57
type: f64

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

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

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

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

tool: D96: 1

tool: D130: 1

tool: D163: 0.99999

tool: D148: 2.30258

tool: D32: 0.9999

tool: D57: 10

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;
}
```