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

```asm
<get_scaling_basis_TRI>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x4(%rbp)
  mov    %esi,-0x8(%rbp)
  movsd  %xmm0,-0x10(%rbp)
  mov    %rdx,-0x18(%rbp)
  mov    %rcx,-0x20(%rbp)
  mov    %r8,-0x28(%rbp)
  mov    -0x4(%rbp),%eax
  test   %rax,%rax
  js     L35
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L72
L35:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L72:
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  D52(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  D11(%rip),%xmm1
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,%edi
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    -0x18(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x4(%rbp),%edx
  mov    -0x8(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L87
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L11
L87:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L11:
  movsd  D52(%rip),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x4(%rbp),%eax
  test   %rax,%rax
  js     L86
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L118
L86:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L118:
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  movsd  D52(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    D11(%rip),%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  mov    %eax,%eax
  test   %rax,%rax
  js     L23
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L74
L23:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L74:
  movsd  -0x30(%rbp),%xmm1
  divsd  %xmm0,%xmm1
  cvttsd2si %xmm1,%rax
  mov    %eax,%edi
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    -0x20(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x4(%rbp),%eax
  test   %rax,%rax
  js     L116
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L53
L116:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L53:
  movsd  D52(%rip),%xmm1
  subsd  -0x10(%rbp),%xmm1
  movq   %xmm1,%rax
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  mov    %eax,%eax
  test   %rax,%rax
  js     L4
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L94
L4:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L94:
  mov    -0x28(%rbp),%rax
  movsd  %xmm0,(%rax)
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D52
type_guessed: f64
name: unpack_data
arguments: data_tag: D11
type_guessed: f64

tool: D52: 1

tool: D11: 2

assistant: ```c
void get_scaling_basis_TRI(const unsigned int i, const unsigned int j, const double b, double *con_i, double *con_j, double *con_b) {
  *con_i = sqrt((2.0 * i + 1.0) / 2.0);
  *con_j = sqrt((i + j + 1.0) / pow(2.0, 2.0 * i + 1.0));
  *con_b = pow(1.0 - b, (double)i);
}
```