user: Demonstrate the C code that generates the assembly output below:

```asm
<ti_aroonosc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %edi,-0x64(%rbp)
  mov    %rsi,-0x70(%rbp)
  mov    %rdx,-0x78(%rbp)
  mov    %rcx,-0x80(%rbp)
  mov    -0x70(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x30(%rbp)
  mov    -0x70(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x80(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x78(%rbp),%rax
  movsd  (%rax),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x4c(%rbp)
  cmpl   $0x0,-0x4c(%rbp)
  jg     L19
  mov    $0x1,%eax
  jmp    L30
L19:
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <ti_aroon_start@plt>
  cmp    %eax,-0x64(%rbp)
  jg     L199
  mov    $0x0,%eax
  jmp    L30
L199:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x4c(%rbp),%xmm1
  movsd  D2(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x60(%rbp)
  movl   $0xffffffff,-0x5c(%rbp)
  movl   $0xffffffff,-0x58(%rbp)
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x28(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x4c(%rbp),%eax
  mov    %eax,-0x54(%rbp)
  jmp    L93
L122:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x5c(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jge    L157
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  jmp    L99
L141:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  comisd -0x40(%rbp),%xmm0
  jae    L105
  jmp    L99
L105:
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
L99:
  addl   $0x1,-0x50(%rbp)
  mov    -0x50(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jle    L141
  jmp    L143
L157:
  movsd  -0x18(%rbp),%xmm0
  comisd -0x40(%rbp),%xmm0
  jb     L143
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x5c(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x40(%rbp)
L143:
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x58(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jge    L116
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x58(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x60(%rbp),%eax
  mov    %eax,-0x50(%rbp)
  jmp    L31
L140:
  mov    -0x50(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x38(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jae    L18
  jmp    L31
L18:
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x58(%rbp)
L31:
  addl   $0x1,-0x50(%rbp)
  mov    -0x50(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jle    L140
  jmp    L156
L116:
  movsd  -0x38(%rbp),%xmm0
  comisd -0x18(%rbp),%xmm0
  jb     L156
  mov    -0x54(%rbp),%eax
  mov    %eax,-0x58(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
L156:
  mov    -0x5c(%rbp),%eax
  sub    -0x58(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mov    -0x48(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  mulsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x54(%rbp)
  addl   $0x1,-0x60(%rbp)
L93:
  mov    -0x54(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jl     L122
  mov    -0x80(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%rax
  sub    %rdx,%rax
  sar    $0x3,%rax
  mov    %rax,%rbx
  mov    -0x78(%rbp),%rax
  mov    %rax,%rdi
  call   <ti_aroonosc_start@plt>
  mov    %eax,%edx
  mov    -0x64(%rbp),%eax
  sub    %edx,%eax
  cltq
  cmp    %rax,%rbx
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x0,%eax
L30:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D2
type_infered: f64

tool: D2: 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;
}
```