user: Translate the below assembly code into C programming language:

```asm
<rbasis>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x13000(%rsp),%r11
L142:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L142
  sub    $0x890,%rsp
  mov    %edi,%ebx
  mov    %fs:0x28,%rax
  mov    %rax,0x13888(%rsp)
  xor    %eax,%eax
  lea    (%rsi,%rdi,1),%r13d
  cmp    $0x270f,%r13d
  jg     L213
  movapd %xmm0,%xmm3
  mov    %esi,%ebp
  mov    %rdx,%rdi
  mov    %rcx,%r12
  cmp    $0x1,%r13d
  jle    L152
  mov    %r13d,%edx
  mov    $0x1,%eax
  movsd  D4(%rip),%xmm2
  pxor   %xmm4,%xmm4
  jmp    L44
L253:
  pxor   %xmm0,%xmm0
L113:
  movsd  %xmm0,(%rsp,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  je     L152
L44:
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rdi,%rax,4),%xmm0
  comisd %xmm0,%xmm3
  jb     L253
  pxor   %xmm1,%xmm1
  cvtsi2sdl 0x4(%rdi,%rax,4),%xmm1
  movapd %xmm3,%xmm0
  cmpltsd %xmm1,%xmm0
  movapd %xmm2,%xmm1
  andpd  %xmm0,%xmm1
  andnpd %xmm4,%xmm0
  orpd   %xmm1,%xmm0
  jmp    L113
L152:
  cmp    $0x1,%ebx
  jle    L223
  lea    -0x2(%r13),%r11d
  add    $0x1,%ebx
  mov    $0x2,%r10d
  pxor   %xmm5,%xmm5
  movapd %xmm5,%xmm9
  movapd %xmm5,%xmm8
  movapd %xmm5,%xmm4
  movapd %xmm5,%xmm7
  movapd %xmm5,%xmm6
  jmp    L61
L242:
  pxor   %xmm2,%xmm2
  cvtsi2sdl (%rcx),%xmm2
  movapd %xmm3,%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movslq %eax,%r14
  mov    -0x4(%rdi,%r14,4),%r14d
  sub    (%rcx),%r14d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r14d,%xmm1
  divsd  %xmm1,%xmm0
  jmp    L81
L77:
  movslq %eax,%r14
  mov    (%rdi,%r14,4),%r14d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r14d,%xmm1
  subsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm1
  sub    0x4(%rcx),%r14d
  pxor   %xmm2,%xmm2
  cvtsi2sd %r14d,%xmm2
  divsd  %xmm2,%xmm1
L234:
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsi)
  add    $0x8,%rdx
  add    $0x1,%eax
  add    $0x4,%rcx
  cmp    %r9d,%eax
  je     L50
L109:
  mov    %rdx,%rsi
  movsd  (%rdx),%xmm1
  ucomisd %xmm5,%xmm1
  jp     L242
  ucomisd %xmm9,%xmm1
  movapd %xmm8,%xmm0
  jne    L242
L81:
  movsd  0x8(%rsi),%xmm2
  ucomisd %xmm4,%xmm2
  jp     L77
  ucomisd %xmm7,%xmm2
  movapd %xmm6,%xmm1
  je     L234
  jmp    L77
L50:
  add    $0x1,%r10d
  sub    $0x1,%r11d
  cmp    %ebx,%r10d
  je     L223
L61:
  test   %r11d,%r11d
  jle    L50
  lea    0x8(%rsp),%rdx
  lea    0x1(%r10),%eax
  lea    0x4(%rdi),%rcx
  lea    0x1(%r10,%r11,1),%r9d
  jmp    L109
L223:
  movslq %r13d,%r13
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rdi,%r13,4),%xmm0
  ucomisd %xmm3,%xmm0
  jp     L119
  jne    L119
  movslq %ebp,%rax
  mov    D4(%rip),%rbx
  mov    %rbx,(%rsp,%rax,8)
L119:
  test   %ebp,%ebp
  jle    L213
  lea    0x1(%rbp),%edx
  mov    $0x1,%eax
  pxor   %xmm0,%xmm0
L67:
  movsd  (%rsp,%rax,8),%xmm1
  mulsd  (%r12,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L67
  mov    $0x1,%eax
  pxor   %xmm2,%xmm2
  movapd %xmm2,%xmm3
  jmp    L191
L169:
  movsd  (%rsp,%rax,8),%xmm1
  mulsd  (%r12,%rax,8),%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%r8,%rax,8)
L97:
  add    $0x1,%rax
  cmp    %rax,%rdx
  je     L213
L191:
  ucomisd %xmm2,%xmm0
  jp     L169
  ucomisd %xmm3,%xmm0
  jne    L169
  movq   $0x0,(%r8,%rax,8)
  jmp    L97
L213:
  mov    0x13888(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L64
  add    $0x13890,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L64:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D4
data_type: f32[2]

tool: {"D4": [0.0,1.875]}

assistant: ```c
void rbasis(int c, double t, int npts, int x[], double h[], double r[]) {
  int nplusc;
  int i, j, k;
  double d, e;
  double sum;
  double temp[10000];
  nplusc = npts + c;
  if (nplusc < 10000) {
    for (i = 1; i <= nplusc - 1; i++) {
      if ((t >= x[i]) && (t < x[i + 1]))
        temp[i] = 1;
      else
        temp[i] = 0;
    }
    for (k = 2; k <= c; k++) {
      for (i = 1; i <= nplusc - k; i++) {
        if (temp[i] != 0)
          d = ((t - x[i]) * temp[i]) / (x[i + k - 1] - x[i]);
        else
          d = 0;
        if (temp[i + 1] != 0)
          e = ((x[i + k] - t) * temp[i + 1]) / (x[i + k] - x[i + 1]);
        else
          e = 0;
        temp[i] = d + e;
      }
    }
    if (t == (double)x[nplusc]) {
      temp[npts] = 1;
    }
    sum = 0.;
    for (i = 1; i <= npts; i++) {
      sum = sum + temp[i] * h[i];
    }
    for (i = 1; i <= npts; i++) {
      if (sum != 0) {
        r[i] = (temp[i] * h[i]) / (sum);
      } else
        r[i] = 0;
    }
  }
}
```