user: 这段汇编代码用C语言表示是什么样的：

```asm
<ti_atr>:
  endbr64
  push   %r15
  mov    $0x1,%eax
  push   %r14
  mov    %rdx,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  cvttsd2si (%rdx),%r15d
  test   %r15d,%r15d
  jle    L26
  mov    %rcx,%rdx
  mov    (%rcx),%rcx
  mov    %edi,%ebx
  mov    %r14,%rdi
  mov    (%rsi),%rbp
  mov    0x8(%rsi),%r12
  mov    %rdx,0x8(%rsp)
  mov    %rcx,(%rsp)
  mov    0x10(%rsi),%r13
  call   <ti_atr_start@plt>
  mov    %eax,%r8d
  xor    %eax,%eax
  cmp    %ebx,%r8d
  jge    L26
  pxor   %xmm8,%xmm8
  cmp    $0x1,%r15d
  movsd  0x0(%rbp),%xmm1
  movsd  D8(%rip),%xmm5
  cvtsi2sd %r15d,%xmm8
  subsd  (%r12),%xmm1
  mov    (%rsp),%rcx
  addsd  D35(%rip),%xmm1
  mov    0x8(%rsp),%rdx
  divsd  %xmm8,%xmm5
  je     L5
  movq   D11(%rip),%xmm2
  movslq %r15d,%rsi
  mov    $0x1,%eax
  nopl   0x0(%rax,%rax,1)
L27:
  movsd  0x0(%rbp,%rax,8),%xmm0
  movsd  -0x8(%r13,%rax,8),%xmm7
  movsd  (%r12,%rax,8),%xmm6
  add    $0x1,%rax
  movapd %xmm0,%xmm4
  subsd  %xmm7,%xmm4
  subsd  %xmm6,%xmm0
  movapd %xmm6,%xmm3
  subsd  %xmm7,%xmm3
  andpd  %xmm2,%xmm4
  maxsd  %xmm0,%xmm4
  andpd  %xmm2,%xmm3
  maxsd  %xmm4,%xmm3
  addsd  %xmm3,%xmm1
  cmp    %rax,%rsi
  jne    L27
L5:
  lea    0x8(%rcx),%rsi
  divsd  %xmm8,%xmm1
  movsd  %xmm1,(%rcx)
  cmp    %ebx,%r15d
  jge    L25
  movslq %r15d,%rax
  movq   D11(%rip),%xmm2
  mov    %rax,%rdi
  neg    %rdi
  lea    (%rcx,%rdi,8),%rcx
  nopl   0x0(%rax,%rax,1)
L51:
  movsd  0x0(%rbp,%rax,8),%xmm0
  movsd  -0x8(%r13,%rax,8),%xmm7
  movsd  (%r12,%rax,8),%xmm6
  movapd %xmm0,%xmm4
  subsd  %xmm7,%xmm4
  subsd  %xmm6,%xmm0
  movapd %xmm6,%xmm3
  subsd  %xmm7,%xmm3
  andpd  %xmm2,%xmm4
  maxsd  %xmm0,%xmm4
  andpd  %xmm2,%xmm3
  maxsd  %xmm4,%xmm3
  movapd %xmm3,%xmm0
  subsd  %xmm1,%xmm0
  mulsd  %xmm5,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L51
  lea    -0x1(%rbx),%eax
  sub    %r15d,%eax
  lea    0x8(%rsi,%rax,8),%rsi
L25:
  sub    (%rdx),%rsi
  mov    %r14,%rdi
  sar    $0x3,%rsi
  mov    %rsi,%rbp
  call   <ti_atr_start@plt>
  xor    %edi,%edi
  sub    %eax,%ebx
  movslq %ebx,%rbx
  cmp    %rbp,%rbx
  sete   %dil
  call   <assert@plt>
  xor    %eax,%eax
L26:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: label: D8
data_type: f64
name: unpack_data
arguments: label: D35
data_type: f64
name: unpack_data
arguments: label: D11
data_type: qword

tool: D8: 1

tool: D35: 0

tool: D11: 9223372036854775807

assistant: ```c
int ti_atr(int size, double const *const *inputs, double const *options, double *const *outputs) {
  const double *high = inputs[0];
  const double *low = inputs[1];
  const double *close = inputs[2];
  const int period = (int)options[0];
  double *output = outputs[0];
  if (period < 1)
    return 1;
  if (size <= ti_atr_start(options))
    return 0;
  const double per = 1.0 / ((double)period);
  double sum = 0;
  double truerange;
  sum += high[0] - low[0];
  int i;
  for (i = 1; i < period; ++i) {
    do {
      const double l = low[i];
      const double h = high[i];
      const double c = close[i - 1];
      const double ych = fabs(h - c);
      const double ycl = fabs(l - c);
      double v = h - l;
      if (ych > v)
        v = ych;
      if (ycl > v)
        v = ycl;
      truerange = v;
    } while (0);
    sum += truerange;
  }
  double val = sum / period;
  *output++ = val;
  for (i = period; i < size; ++i) {
    do {
      const double l = low[i];
      const double h = high[i];
      const double c = close[i - 1];
      const double ych = fabs(h - c);
      const double ycl = fabs(l - c);
      double v = h - l;
      if (ych > v)
        v = ych;
      if (ycl > v)
        v = ycl;
      truerange = v;
    } while (0);
    val = (truerange - val) * per + val;
    *output++ = val;
  }
  assert(output - outputs[0] == size - ti_atr_start(options));
  return 0;
}
```