user: What would the C source look like for the assembly code provided here:

```asm
<nicelog>:
  endbr64
  push   %r15
  movapd %xmm1,%xmm4
  pxor   %xmm7,%xmm7
  mov    $0x2d,%ecx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %edi,%ebp
  push   %rbx
  sub    $0x1f8,%rsp
  movapd D96(%rip),%xmm1
  movsd  D20(%rip),%xmm3
  mov    %rsi,0x30(%rsp)
  lea    0x80(%rsp),%rbx
  lea    D87(%rip),%rsi
  mov    %rdx,0x48(%rsp)
  mov    %rbx,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x1e8(%rsp)
  xor    %eax,%eax
  comisd %xmm0,%xmm7
  movaps %xmm1,0x50(%rsp)
  movapd D38(%rip),%xmm1
  rep movsq %ds:(%rsi),%es:(%rdi)
  movsd  %xmm3,0x70(%rsp)
  movaps %xmm1,0x60(%rsp)
  jae    L139
  comisd %xmm4,%xmm7
  jae    L139
  comisd %xmm4,%xmm0
  jbe    L37
  movq   %xmm0,%rax
  movapd %xmm4,%xmm0
  movq   %rax,%xmm4
L37:
  movsd  %xmm4,0x8(%rsp)
  call   <log@plt>
  pxor   %xmm3,%xmm3
  divsd  D106(%rip),%xmm0
  divsd  D115(%rip),%xmm0
  comisd %xmm0,%xmm3
  mov    D20(%rip),%rax
  movsd  0x8(%rsp),%xmm4
  movq   %rax,%xmm3
  ja     L102
L136:
  cvttsd2si %xmm0,%r12d
  pxor   %xmm1,%xmm1
  movsd  D161(%rip),%xmm2
  movsd  %xmm4,0x8(%rsp)
  movapd %xmm2,%xmm0
  cvtsi2sd %r12d,%xmm1
  call   <pow@plt>
  movsd  0x8(%rsp),%xmm4
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm4,%xmm0
  call   <log@plt>
  mov    D161(%rip),%rax
  pxor   %xmm3,%xmm3
  divsd  D106(%rip),%xmm0
  divsd  D115(%rip),%xmm0
  comisd %xmm3,%xmm0
  movq   %rax,%xmm2
  mov    D20(%rip),%rax
  movq   %rax,%xmm3
  jbe    L24
  mulsd  D53(%rip),%xmm0
  addsd  %xmm3,%xmm0
L24:
  cvttsd2si %xmm0,%r14d
  pxor   %xmm4,%xmm4
  movsd  D96(%rip),%xmm1
  sub    %r12d,%r14d
  cvtsi2sd %r14d,%xmm4
  mov    %r14d,0x28(%rsp)
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x38(%rsp)
  mulsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,0x2c(%rsp)
  cmp    %eax,%ebp
  jge    L121
  movsd  D36(%rip),%xmm0
  mulsd  %xmm4,%xmm0
  addsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%eax
  cmp    %eax,%ebp
  mov    %eax,0x2c(%rsp)
  mov    $0x1,%eax
  jge    L109
L19:
  movapd %xmm4,%xmm0
L34:
  add    $0x1,%eax
  movslq %eax,%rdx
  movsd  0x50(%rsp,%rdx,8),%xmm7
  mulsd  %xmm7,%xmm0
  movsd  %xmm7,0x18(%rsp)
  addsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%esi
  mov    %esi,0x2c(%rsp)
  cmp    %esi,%ebp
  jge    L160
  cmp    $0x4,%eax
  jne    L104
  subl   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%eax
  pxor   %xmm4,%xmm4
  cvtsi2sd %eax,%xmm4
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x38(%rsp)
  mulsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  cvttsd2si %xmm0,%eax
  cmp    %ebp,%eax
  mov    %eax,0x2c(%rsp)
  mov    $0x0,%eax
  jg     L19
  movsd  %xmm1,0x18(%rsp)
L207:
  movslq %eax,%rdx
  mov    0x28(%rsp),%eax
  test   %eax,%eax
  jle    L158
L22:
  lea    (%rbx,%rdx,8),%rax
  xor    %r13d,%r13d
  mov    $0xffffffff,%ebx
  mov    %rax,0x40(%rsp)
  nop
L133:
  pxor   %xmm1,%xmm1
  mov    0x30(%rsp),%rcx
  movslq %ebx,%rax
  mov    0x40(%rsp),%r15
  cvtsi2sd %r13d,%xmm1
  mov    $0x1,%r14d
  lea    (%rcx,%rax,8),%rbp
L87:
  movsd  0x20(%rsp),%xmm5
  movapd %xmm2,%xmm0
  lea    (%rbx,%r14,1),%r12d
  add    $0x28,%r15
  mulsd  -0x28(%r15),%xmm5
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm5,0x8(%rsp)
  call   <pow@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  0x18(%rsp),%xmm6
  mov    D161(%rip),%rax
  movsd  0x10(%rsp),%xmm1
  movq   %rax,%xmm2
  movsd  %xmm0,0x0(%rbp,%r14,8)
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14d,%xmm0
  add    $0x1,%r14
  comisd %xmm0,%xmm6
  ja     L87
  add    $0x1,%r13d
  cmp    0x28(%rsp),%r13d
  je     L158
  mov    %r12d,%ebx
  jmp    L133
L160:
  mov    0x28(%rsp),%ecx
  test   %ecx,%ecx
  jle    L158
  pxor   %xmm4,%xmm4
  comisd %xmm4,%xmm7
  ja     L22
  nopw   0x0(%rax,%rax,1)
L158:
  movsd  0x38(%rsp),%xmm1
  movapd %xmm2,%xmm0
  call   <pow@plt>
  mulsd  0x20(%rsp),%xmm0
  movslq 0x2c(%rsp),%rax
  mov    0x30(%rsp),%rdx
  mov    %rax,%rdi
  movsd  %xmm0,-0x8(%rdx,%rax,8)
  mov    0x48(%rsp),%rax
  mov    %edi,(%rax)
L139:
  mov    0x1e8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0x1f8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  mulsd  D53(%rip),%xmm0
  subsd  %xmm3,%xmm0
  jmp    L136
L121:
  xor    %eax,%eax
  movsd  %xmm1,0x18(%rsp)
  jmp    L207
L104:
  movsd  0x38(%rsp),%xmm0
  jmp    L34
L109:
  mov    D36(%rip),%rdi
  mov    %rdi,0x18(%rsp)
  jmp    L207
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D96
type_guessed: f32[4]
name: retrieve_data
arguments: data_tag: D20
type_guessed: f64
name: retrieve_data
arguments: data_tag: D87
type_guessed: f64
name: retrieve_data
arguments: data_tag: D38
type_guessed: f32[4]
name: retrieve_data
arguments: data_tag: D106
type_guessed: f64
name: retrieve_data
arguments: data_tag: D115
type_guessed: f64
name: retrieve_data
arguments: data_tag: D161
type_guessed: f64
name: retrieve_data
arguments: data_tag: D53
type_guessed: f64
name: retrieve_data
arguments: data_tag: D36
type_guessed: f32[2]

tool: {"D96": [0.0,2.53125,0.0,2.3125]}

tool: D20: 1

tool: D87: 1

tool: {"D38": [0.0,2.125,0.0,2.0]}

tool: D106: 0.99999

tool: D115: 2.30258

tool: D161: 10

tool: D53: 0.9999

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

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