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

```asm
<ti_aroonosc>:
  endbr64
  push   %r15
  mov    $0x1,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  cvttsd2si (%rdx),%r14d
  mov    %edi,0x10(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %r14d,0x14(%rsp)
  test   %r14d,%r14d
  jle    L91
  mov    %edi,%r15d
  mov    %rdx,%rdi
  mov    (%rsi),%rbx
  mov    0x8(%rsi),%rbp
  mov    (%rcx),%r12
  mov    %rdx,%r13
  call   <ti_aroon_start@plt>
  mov    %eax,%r8d
  xor    %eax,%eax
  cmp    %r15d,%r8d
  jge    L91
  pxor   %xmm0,%xmm0
  movsd  (%rbx),%xmm1
  movsd  0x0(%rbp),%xmm2
  cvtsi2sd %r14d,%xmm0
  movsd  D9(%rip),%xmm4
  divsd  %xmm0,%xmm4
  cmp    %r15d,%r14d
  jge    L146
  mov    %r13,0x18(%rsp)
  movslq %r14d,%rcx
  sub    %r14d,%r15d
  xor    %esi,%esi
  mov    $0xffffffff,%r9d
  mov    $0xffffffff,%r8d
  xor    %edi,%edi
  jmp    L23
  nopl   (%rax)
L77:
  sub    %r9d,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
L37:
  mulsd  %xmm4,%xmm0
  add    $0x1,%rcx
  movsd  %xmm0,(%r12,%rsi,8)
  add    $0x1,%rsi
  cmp    %edi,%r15d
  je     L131
L23:
  mov    %edi,%r14d
  movsd  (%rbx,%rcx,8),%xmm0
  mov    %ecx,%r13d
  add    $0x1,%edi
  mov    %esi,%r11d
  cmp    %r8d,%esi
  jg     L192
  comisd %xmm1,%xmm0
  jb     L6
  movapd %xmm0,%xmm1
  mov    %ecx,%r8d
L6:
  cmp    %r9d,%r11d
  jg     L167
L34:
  movsd  0x0(%rbp,%rcx,8),%xmm3
L187:
  comisd %xmm3,%xmm2
  mov    %r8d,%eax
  jb     L77
  sub    %r13d,%eax
  pxor   %xmm0,%xmm0
  movapd %xmm3,%xmm2
  mov    %r13d,%r9d
  cvtsi2sd %eax,%xmm0
  jmp    L37
  nopl   (%rax)
L131:
  mov    0x10(%rsp),%eax
  mov    0x18(%rsp),%r13
  sub    $0x1,%eax
  sub    0x14(%rsp),%eax
  lea    0x8(%r12,%rax,8),%r12
L146:
  mov    0x8(%rsp),%rax
  mov    %r13,%rdi
  sub    (%rax),%r12
  call   <ti_aroonosc_start@plt>
  sar    $0x3,%r12
  xor    %edi,%edi
  mov    %eax,%r8d
  mov    0x10(%rsp),%eax
  sub    %r8d,%eax
  cltq
  cmp    %r12,%rax
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
L91:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L192:
  movsd  (%rbx,%rsi,8),%xmm1
  mov    %ecx,%r10d
  cmp    %edi,%ecx
  jl     L13
  movslq %edi,%rax
  mov    %r14d,%r8d
  mov    %rax,%rdx
  nopl   0x0(%rax)
L93:
  movsd  (%rbx,%rdx,8),%xmm0
  comisd %xmm1,%xmm0
  jb     L160
  movapd %xmm0,%xmm1
  mov    %edx,%r8d
L160:
  add    $0x1,%rdx
  cmp    %edx,%r10d
  jge    L93
  cmp    %r9d,%r11d
  jle    L34
  movsd  0x0(%rbp,%rsi,8),%xmm2
L51:
  mov    %r14d,%r9d
  nopl   (%rax)
L124:
  movsd  0x0(%rbp,%rax,8),%xmm0
  comisd %xmm0,%xmm2
  jb     L36
  movapd %xmm0,%xmm2
  mov    %eax,%r9d
L36:
  add    $0x1,%rax
  cmp    %ecx,%eax
  jle    L124
  mov    %r8d,%eax
  pxor   %xmm0,%xmm0
  sub    %r9d,%eax
  cvtsi2sd %eax,%xmm0
  jmp    L37
  xchg   %ax,%ax
L167:
  movsd  0x0(%rbp,%rsi,8),%xmm2
  movslq %edi,%rax
  cmp    %ecx,%edi
  jle    L51
  mov    %r8d,%eax
  pxor   %xmm0,%xmm0
  mov    %r14d,%r9d
  sub    %r14d,%eax
  cvtsi2sd %eax,%xmm0
  jmp    L37
  nopl   0x0(%rax,%rax,1)
L13:
  cmp    %r9d,%esi
  jg     L200
  movsd  0x0(%rbp,%rcx,8),%xmm3
  mov    %r14d,%r8d
  jmp    L187
L200:
  movsd  0x0(%rbp,%rsi,8),%xmm2
  mov    %r14d,%r8d
  mov    %r14d,%r9d
  pxor   %xmm0,%xmm0
  jmp    L37
```

tool_calls: name: unpack_data
arguments: label: D9
data_type: f64

tool: D9: 100

assistant: ```c
int ti_aroonosc(int size, double const *const *inputs, double const *options, double *const *outputs) {
  const double *high = inputs[0];
  const double *low = inputs[1];
  double *output = outputs[0];
  const int period = (int)options[0];
  if (period < 1)
    return 1;
  if (size <= ti_aroon_start(options))
    return 0;
  const double scale = 100.0 / period;
  int trail = 0, maxi = -1, mini = -1;
  double max = high[0];
  double min = low[0];
  int i, j;
  for (i = period; i < size; ++i, ++trail) {
    double bar = high[i];
    if (maxi < trail) {
      maxi = trail;
      max = high[maxi];
      j = trail;
      while (++j <= i) {
        bar = high[j];
        if (bar >= max) {
          max = bar;
          maxi = j;
        }
      }
    } else if (bar >= max) {
      maxi = i;
      max = bar;
    }
    bar = low[i];
    if (mini < trail) {
      mini = trail;
      min = low[mini];
      j = trail;
      while (++j <= i) {
        bar = low[j];
        if (bar <= min) {
          min = bar;
          mini = j;
        }
      }
    } else if (bar <= min) {
      mini = i;
      min = bar;
    }
    *output++ = (maxi - mini) * scale;
  }
  assert(output - outputs[0] == size - ti_aroonosc_start(options));
  return 0;
}
```