user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<radfg>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,0x78(%rsp)
  mov    %rsi,0x30(%rsp)
  mov    %rdx,%r12
  mov    %rcx,%r15
  mov    %r8,%r13
  mov    %r9,%rbx
  lea    0x1(%rsi),%rax
  mov    %rax,0x38(%rsp)
  shr    %rax
  mov    %rax,0x18(%rsp)
  cmp    $0x1,%rdi
  je     L37
  mov    %rdi,%r14
  mov    %rsi,%rbp
  lea    0x0(,%rcx,8),%rdx
  mov    %r8,%rsi
  mov    %r9,%rdi
  call   <memcpy@plt>
  cmp    $0x1,%rbp
  jbe    L83
  mov    %r14,%rdi
  imul   %r12,%rdi
  mov    %rdi,%r11
  mov    %rdi,0x8(%rsp)
  mov    %r14,%r10
  lea    0x0(,%r14,8),%rax
  mov    %rax,(%rsp)
  lea    -0x3(%r14),%rax
  and    $0xfffffffffffffffe,%rax
  mov    %rax,0x10(%rsp)
  mov    $0x0,%ebp
  mov    $0x1,%r14d
  mov    0xd0(%rsp),%rax
  add    $0x10,%rax
  mov    %rax,0x20(%rsp)
  mov    %r15,0x28(%rsp)
  jmp    L136
L206:
  add    $0x1,%r14
  add    0x8(%rsp),%r11
  add    %r10,%rbp
  cmp    %r14,0x30(%rsp)
  je     L494
L136:
  test   %r12,%r12
  je     L206
  lea    0x8(,%r11,8),%r8
  mov    0xd0(%rsp),%rax
  lea    (%rax,%rbp,8),%r15
  mov    0x10(%rsp),%rax
  add    %rbp,%rax
  mov    0x20(%rsp),%rdi
  lea    (%rdi,%rax,8),%rsi
  mov    %r11,%rdi
  mov    $0x0,%r9d
L357:
  movsd  0x0(%r13,%rdi,8),%xmm0
  movsd  %xmm0,(%rbx,%rdi,8)
  cmp    $0x2,%r10
  jbe    L278
  lea    0x0(%r13,%r8,1),%rdx
  lea    (%rbx,%r8,1),%rcx
  mov    %r15,%rax
L573:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  movsd  0x8(%rax),%xmm1
  mulsd  0x8(%rdx),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rcx)
  movsd  (%rax),%xmm0
  mulsd  0x8(%rdx),%xmm0
  movsd  0x8(%rax),%xmm1
  mulsd  (%rdx),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rcx)
  add    $0x10,%rax
  add    $0x10,%rdx
  add    $0x10,%rcx
  cmp    %rsi,%rax
  jne    L573
L278:
  add    $0x1,%r9
  add    %r10,%rdi
  add    (%rsp),%r8
  cmp    %r9,%r12
  jne    L357
  jmp    L206
L494:
  mov    0x28(%rsp),%r15
L83:
  mov    0x30(%rsp),%r14
  lea    -0x1(%r14),%rdx
  mov    %rdx,0x28(%rsp)
  cmpq   $0x3,0x38(%rsp)
  jbe    L534
  mov    0x78(%rsp),%rsi
  mov    %rsi,%rdi
  imul   %r12,%rdi
  mov    %rdi,%rcx
  mov    %rdi,0x10(%rsp)
  imul   %rdi,%rdx
  lea    (%r12,%r12,1),%rax
  neg    %rax
  mov    %rsi,%rdi
  imul   %rsi,%rax
  mov    %rax,0x20(%rsp)
  lea    -0x2(%r14),%rsi
  imul   %rcx,%rsi
  lea    -0x3(%rdi),%rax
  and    $0xfffffffffffffffe,%rax
  mov    %rax,%r14
  mov    %rcx,0x8(%rsp)
  mov    $0x1,%ecx
  lea    0x8(%rbx),%r11
  lea    0x8(%r13),%rax
  mov    %rax,(%rsp)
  lea    0x18(%r13),%rbp
  mov    %r15,0x40(%rsp)
  mov    %rdx,%r15
  mov    %r13,0x48(%rsp)
  mov    %rcx,%r13
  mov    %rbx,0x50(%rsp)
  mov    %rdi,%rbx
  jmp    L359
L102:
  lea    (%r11,%r10,8),%rcx
  lea    0x0(,%r8,8),%rax
  lea    (%r11,%rax,1),%rdx
  add    (%rsp),%rax
  lea    (%r14,%r8,1),%rdi
  lea    0x0(%rbp,%rdi,8),%rdi
L456:
  movsd  (%rcx),%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  movsd  (%rcx),%xmm0
  subsd  (%rdx),%xmm0
  movsd  %xmm0,0x8(%rax,%rsi,8)
  movsd  0x8(%rdx),%xmm0
  addsd  0x8(%rcx),%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  0x8(%rdx),%xmm0
  subsd  0x8(%rcx),%xmm0
  movsd  %xmm0,(%rax,%rsi,8)
  add    $0x10,%rcx
  add    $0x10,%rdx
  add    $0x10,%rax
  cmp    %rdi,%rax
  jne    L456
L360:
  add    $0x1,%r9
  add    %rbx,%r10
  add    %rbx,%r8
  cmp    %r9,%r12
  je     L421
L344:
  cmp    $0x2,%rbx
  ja     L102
  jmp    L360
L421:
  add    $0x1,%r13
  mov    0x10(%rsp),%rdi
  sub    %rdi,%r15
  add    %rdi,0x8(%rsp)
  add    0x20(%rsp),%rsi
  cmp    %r13,0x18(%rsp)
  jbe    L216
L359:
  mov    0x8(%rsp),%r8
  mov    %r15,%r10
  mov    $0x0,%r9d
  test   %r12,%r12
  jne    L344
  jmp    L421
L37:
  lea    0x0(,%rcx,8),%rdx
  mov    %r9,%rsi
  mov    %r8,%rdi
  call   <memcpy@plt>
  mov    0x30(%rsp),%rax
  sub    $0x1,%rax
  mov    %rax,0x28(%rsp)
  cmpq   $0x3,0x38(%rsp)
  ja     L474
L534:
  mov    0x30(%rsp),%r14
  mov    %r14d,%edi
  shl    $0x4,%edi
  call   <util_malloc_@plt>
  mov    %rax,%rbp
  test   %r14,%r14
  js     L547
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14,%xmm0
L337:
  movsd  D21(%rip),%xmm1
  movapd %xmm1,%xmm4
  divsd  %xmm0,%xmm4
  movsd  %xmm4,(%rsp)
  mov    D17(%rip),%rax
  mov    %rax,0x0(%rbp)
  movq   $0x0,0x8(%rbp)
  comisd D6(%rip),%xmm4
  jae    L430
  cvttsd2si %xmm4,%r14
L553:
  mov    0x30(%rsp),%rax
  shl    $0x4,%rax
  mov    %rax,0x8(%rsp)
  lea    -0x10(%rbp,%rax,1),%rsi
  mov    %rsi,0x10(%rsp)
  mov    %r14,%rdi
  call   <cos@plt>
  mov    0x10(%rsp),%rsi
  movsd  %xmm0,(%rsi)
  movsd  %xmm0,0x10(%rbp)
  mov    %r14,%rdi
  call   <sin@plt>
  movsd  %xmm0,0x18(%rbp)
  xorpd  D28(%rip),%xmm0
  mov    0x8(%rsp),%rax
  movsd  %xmm0,-0x8(%rbp,%rax,1)
  mov    0x30(%rsp),%rax
  mov    %rax,%rdi
  shr    %rdi
  cmp    $0x3,%rax
  jbe    L43
  sub    $0x2,%rax
  shl    $0x4,%rax
  add    %rbp,%rax
  lea    0x20(%rbp),%rsi
  mov    $0x2,%r14d
  mov    %rbp,0x8(%rsp)
  mov    %rax,%rbp
  mov    %r12,0x10(%rsp)
  mov    %rsi,%r12
  mov    %r15,0x20(%rsp)
  mov    %rdi,%r15
  mov    %r13,0x40(%rsp)
  jmp    L137
L558:
  movsd  (%rbx,%rax,1),%xmm0
  addsd  (%rbx,%rdx,1),%xmm0
  movsd  %xmm0,0x0(%r13,%rdx,1)
  movsd  (%rbx,%rax,1),%xmm0
  subsd  (%rbx,%rdx,1),%xmm0
  movsd  %xmm0,0x0(%r13,%rax,1)
  add    $0x1,%rcx
  add    %rsi,%rax
  add    %rsi,%rdx
  cmp    %rcx,%r12
  jne    L558
L221:
  add    $0x1,%rdi
  add    %r11,%r9
  add    %r10,%r8
  cmp    %rdi,%rbp
  jbe    L534
L429:
  mov    %r8,%rdx
  mov    %r9,%rax
  mov    $0x0,%ecx
  test   %r12,%r12
  jne    L558
  jmp    L221
L216:
  mov    0x40(%rsp),%r15
  mov    0x48(%rsp),%r13
  mov    0x50(%rsp),%rbx
L474:
  mov    0x78(%rsp),%rax
  mov    %rax,%r10
  imul   %r12,%r10
  mov    %r10,%r11
  neg    %r11
  shl    $0x3,%r11
  shl    $0x3,%r10
  mov    0x28(%rsp),%r9
  imul   %r10,%r9
  lea    0x0(,%rax,8),%rsi
  mov    %r10,%r8
  mov    $0x1,%edi
  mov    0x18(%rsp),%rbp
  jmp    L429
L547:
  mov    0x30(%rsp),%rdi
  mov    %rdi,%rax
  shr    %rax
  and    $0x1,%edi
  or     %rdi,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L337
L430:
  movsd  (%rsp),%xmm0
  subsd  D6(%rip),%xmm0
  cvttsd2si %xmm0,%r14
  btc    $0x3f,%r14
  jmp    L553
L80:
  mov    %r14,%rax
  shr    %rax
  mov    %r14,%rdx
  and    $0x1,%edx
  or     %rdx,%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  %xmm0,%xmm0
  jmp    L4
L292:
  subsd  D6(%rip),%xmm0
  cvttsd2si %xmm0,%r13
  movabs $0x8000000000000000,%rax
  xor    %rax,%r13
L268:
  mov    %r13,%rdi
  call   <cos@plt>
  movsd  %xmm0,0x0(%rbp)
  movsd  %xmm0,(%r12)
  mov    %r13,%rdi
  call   <sin@plt>
  movsd  %xmm0,0x8(%r12)
  xorpd  D28(%rip),%xmm0
  movsd  %xmm0,0x8(%rbp)
  add    $0x1,%r14
  sub    $0x10,%rbp
  add    $0x10,%r12
  cmp    %r15,%r14
  ja     L419
L137:
  test   %r14,%r14
  js     L80
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14,%xmm0
L4:
  mulsd  (%rsp),%xmm0
  comisd D6(%rip),%xmm0
  jae    L292
  cvttsd2si %xmm0,%r13
  jmp    L268
L419:
  mov    0x8(%rsp),%rbp
  mov    0x10(%rsp),%r12
  mov    0x20(%rsp),%r15
  mov    0x40(%rsp),%r13
L43:
  cmpq   $0x3,0x38(%rsp)
  jbe    L329
  lea    0x0(,%r15,8),%rsi
  mov    %rsi,0x40(%rsp)
  mov    0x30(%rsp),%rdx
  lea    (%rdx,%rdx,1),%rax
  mov    %rax,0x58(%rsp)
  lea    0x10(%rbp),%rax
  mov    %rax,0x20(%rsp)
  lea    (%rbx,%rsi,1),%r11
  mov    %r15,%rax
  neg    %rax
  shl    $0x3,%rax
  mov    %rax,0x50(%rsp)
  mov    0x28(%rsp),%rdi
  mov    %rdi,%rax
  imul   %rsi,%rax
  lea    (%rbx,%rax,1),%r14
  lea    (%r15,%r15,1),%rcx
  mov    %rcx,(%rsp)
  sub    $0x1,%rdi
  mov    %rdi,%rcx
  imul   %r15,%rcx
  mov    %r15,%rdi
  shl    $0x4,%rdi
  add    %rbx,%rdi
  lea    0x0(%r13,%rsi,1),%r10
  mov    %r10,0x48(%rsp)
  add    %r13,%rax
  mov    %rax,0x70(%rsp)
  mov    $0x4,%eax
  sub    %rdx,%rax
  imul   %r15,%rax
  mov    %rax,0x60(%rsp)
  imul   %rsi,%rdx
  mov    %rdx,%rax
  add    %r13,%rax
  mov    %rax,0x68(%rsp)
  movq   $0x1,0x10(%rsp)
  mov    %r12,0x80(%rsp)
  mov    %rbx,0x88(%rsp)
L88:
  mov    0x20(%rsp),%rax
  movsd  (%rax),%xmm1
  movsd  0x8(%rax),%xmm2
  test   %r15,%r15
  je     L252
  mov    $0x0,%eax
  mov    0x48(%rsp),%rbx
  mov    0x70(%rsp),%r12
L105:
  movapd %xmm1,%xmm0
  mulsd  (%rbx,%rax,8),%xmm0
  addsd  0x0(%r13,%rax,8),%xmm0
  movsd  %xmm0,(%r11,%rax,8)
  movapd %xmm2,%xmm0
  mulsd  (%r12,%rax,8),%xmm0
  movsd  %xmm0,(%r14,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r15
  jne    L105
L252:
  mov    0x10(%rsp),%rax
  lea    (%rax,%rax,1),%r8
  mov    %r8,0x8(%rsp)
  cmpq   $0x5,0x38(%rsp)
  jbe    L438
  mov    0x60(%rsp),%rsi
  mov    (%rsp),%r10
  mov    $0x2,%r9d
  mov    0x58(%rsp),%rbx
  mov    0x68(%rsp),%r12
  mov    %r13,0x28(%rsp)
  mov    0x18(%rsp),%r13
L188:
  add    0x8(%rsp),%r8
  mov    %r8,%rax
  sub    %rbx,%rax
  cmp    %r8,%rbx
  cmovbe %rax,%r8
  movsd  0x0(%rbp,%r8,8),%xmm1
  movsd  0x8(%rbp,%r8,8),%xmm2
  test   %r15,%r15
  je     L472
  mov    %r10,%rax
  neg    %rax
  lea    (%r12,%rax,8),%rdx
  mov    %r11,%rax
L619:
  movapd %xmm1,%xmm0
  mulsd  (%rdx,%rsi,8),%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  movapd %xmm2,%xmm0
  mulsd  (%rdx),%xmm0
  addsd  (%rax,%rcx,8),%xmm0
  movsd  %xmm0,(%rax,%rcx,8)
  add    $0x8,%rax
  add    $0x8,%rdx
  cmp    %rdi,%rax
  jne    L619
L472:
  add    $0x1,%r9
  add    %r15,%r10
  add    (%rsp),%rsi
  cmp    %r9,%r13
  ja     L188
  mov    0x28(%rsp),%r13
L438:
  addq   $0x1,0x10(%rsp)
  mov    0x10(%rsp),%rax
  addq   $0x10,0x20(%rsp)
  mov    0x40(%rsp),%rbx
  add    %rbx,%r11
  add    0x50(%rsp),%r14
  sub    (%rsp),%rcx
  add    %rbx,%rdi
  cmp    %rax,0x18(%rsp)
  ja     L88
  mov    0x80(%rsp),%r12
  mov    0x88(%rsp),%rbx
  mov    %rbp,%rdi
  call   <util_free_@plt>
  mov    0x48(%rsp),%r14
  mov    $0x1,%edx
  mov    0x18(%rsp),%rcx
  mov    0x40(%rsp),%rsi
  jmp    L361
L598:
  movsd  (%rbx,%rax,8),%xmm0
  addsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r15
  jne    L598
L348:
  add    $0x1,%rdx
  add    %rsi,%r14
  cmp    %rdx,%rcx
  jbe    L157
L361:
  mov    $0x0,%eax
  test   %r15,%r15
  jne    L598
  jmp    L348
L620:
  lea    0x0(%rbp,%r9,8),%rax
  lea    0x0(%rbp,%r15,8),%rdx
  lea    -0x20(%r8),%rsi
  lea    0x0(%r13,%r9,1),%rcx
  lea    (%rbx,%rcx,8),%rdi
  mov    %r8,%rcx
L215:
  movsd  (%rax),%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rcx)
  movsd  (%rax),%xmm0
  subsd  (%rdx),%xmm0
  movsd  %xmm0,(%rsi)
  movsd  0x8(%rdx),%xmm0
  addsd  0x8(%rax),%xmm0
  movsd  %xmm0,0x8(%rcx)
  movsd  0x8(%rdx),%xmm0
  subsd  0x8(%rax),%xmm0
  movsd  %xmm0,0x8(%rsi)
  add    $0x10,%rax
  add    $0x10,%rdx
  add    $0x10,%rcx
  sub    $0x10,%rsi
  cmp    %rax,%rdi
  jne    L215
L594:
  add    $0x1,%r10
  add    (%rsp),%r8
  add    %r11,%r9
  add    %r11,%r15
  cmp    %r10,%r12
  je     L559
L554:
  cmp    $0x2,%r11
  ja     L620
  jmp    L594
L559:
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  mov    0x10(%rsp),%rsi
  add    %rsi,0x28(%rsp)
  mov    0x38(%rsp),%rsi
  add    %rsi,0x20(%rsp)
  sub    %rsi,%r14
  cmp    %rax,0x18(%rsp)
  jbe    L431
L457:
  test   %r12,%r12
  je     L559
  mov    %r14,%r15
  mov    0x20(%rsp),%r9
  mov    0x28(%rsp),%r8
  mov    $0x0,%r10d
  jmp    L554
L329:
  mov    %rbp,%rdi
  call   <util_free_@plt>
  test   %r12,%r12
  jne    L375
L431:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L157:
  test   %r12,%r12
  je     L629
L375:
  mov    0x78(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,%rdi
  imul   0x30(%rsp),%rdi
  mov    %rdi,(%rsp)
  mov    %r13,%r14
  mov    %rbx,%r15
  mov    $0x0,%ebp
  mov    %r13,0x8(%rsp)
  mov    %rax,%r13
L116:
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <memcpy@plt>
  add    $0x1,%rbp
  add    (%rsp),%r14
  add    %r13,%r15
  cmp    %rbp,%r12
  jne    L116
  mov    0x8(%rsp),%r13
  cmpq   $0x3,0x38(%rsp)
  jbe    L431
L629:
  mov    0x78(%rsp),%rcx
  mov    %rcx,%rdi
  imul   %r12,%rdi
  mov    %rdi,0x38(%rsp)
  lea    0x0(,%rdi,8),%r11
  lea    (%rbx,%r11,1),%r9
  mov    %rcx,%rax
  shl    $0x4,%rax
  mov    %rax,0x10(%rsp)
  lea    0x0(%r13,%rax,1),%r8
  mov    0x30(%rsp),%rdx
  lea    -0x1(%rdx),%r14
  lea    (%r12,%r12,1),%rax
  neg    %rax
  imul   %rcx,%rax
  mov    %rax,%rbp
  mov    %rdx,%rax
  lea    -0x2(%rdx),%rsi
  imul   %rdi,%rsi
  mov    %rcx,%rdi
  shl    $0x3,%rdi
  imul   %rdi,%rax
  mov    %rax,%r15
  mov    $0x1,%r10d
  mov    %r14,(%rsp)
  mov    0x18(%rsp),%r14
L119:
  test   %r12,%r12
  je     L164
  mov    %r8,%rdx
  mov    %r9,%rax
  mov    $0x0,%ecx
L35:
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rdx)
  movsd  (%rax,%rsi,8),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x1,%rcx
  add    %rdi,%rax
  add    %r15,%rdx
  cmp    %rcx,%r12
  jne    L35
L164:
  add    $0x1,%r10
  add    %r11,%r9
  add    0x10(%rsp),%r8
  add    %rbp,%rsi
  cmp    %r10,%r14
  ja     L119
  mov    (%rsp),%r14
  cmpq   $0x1,0x78(%rsp)
  je     L431
  mov    0x10(%rsp),%rax
  lea    0x8(%r13,%rax,1),%rax
  mov    %rax,0x28(%rsp)
  mov    0x38(%rsp),%rdi
  imul   %rdi,%r14
  mov    0x78(%rsp),%r11
  lea    -0x3(%r11),%rax
  and    $0xfffffffffffffffe,%rax
  mov    %rax,%r13
  mov    %rdi,0x20(%rsp)
  movq   $0x1,0x8(%rsp)
  lea    0x8(%rbx),%rbp
  add    $0x18,%rbx
  mov    %r15,(%rsp)
  jmp    L457
```

tool_calls: name: disassemble_data
arguments: label: D21
datatype: f64
name: disassemble_data
arguments: label: D17
datatype: f64
name: disassemble_data
arguments: label: D6
datatype: f32[4]
name: disassemble_data
arguments: label: D28
datatype: f32[4]

tool: D21: 6.283185307179586

tool: D17: 1

tool: {"D6": [0.0,448.0,0.0,0.0]}

tool: {"D28": [0.0,-0.0,0.0,0.0]}

assistant: ```c
void radfg(size_t ido, size_t ip, size_t l1, size_t idl1, double *cc, double *ch, const double *wa) {
  const size_t cdim = ip;
  static const double twopi = 6.28318530717958647692;
  size_t idij, ipph, i, j, k, l, j2, ic, jc, lc, ik;
  double ai1, ai2, ar1, ar2, arg;
  double *csarr;
  size_t aidx;
  ipph = (ip + 1) / 2;
  if (ido != 1) {
    memcpy(ch, cc, idl1 * sizeof(double));
    for (j = 1; j < ip; j++)
      for (k = 0; k < l1; k++) {
        ch[(0) + ido * ((k) + l1 * (j))] = cc[(0) + ido * ((k) + l1 * (j))];
        idij = (j - 1) * ido + 1;
        for (i = 2; i < ido; i += 2, idij += 2) {
          ch[(i - 1) + ido * ((k) + l1 * (j))] = wa[idij - 1] * cc[(i - 1) + ido * ((k) + l1 * (j))] + wa[idij] * cc[(i) + ido * ((k) + l1 * (j))];
          ch[(i) + ido * ((k) + l1 * (j))] = wa[idij - 1] * cc[(i) + ido * ((k) + l1 * (j))] - wa[idij] * cc[(i - 1) + ido * ((k) + l1 * (j))];
        }
      }
    for (j = 1, jc = ip - 1; j < ipph; j++, jc--)
      for (k = 0; k < l1; k++)
        for (i = 2; i < ido; i += 2) {
          {
            cc[(i - 1) + ido * ((k) + l1 * (j))] = ch[(i - 1) + ido * ((k) + l1 * (jc))] + ch[(i - 1) + ido * ((k) + l1 * (j))];
            cc[(i) + ido * ((k) + l1 * (jc))] = ch[(i - 1) + ido * ((k) + l1 * (jc))] - ch[(i - 1) + ido * ((k) + l1 * (j))];
          }
          {
            cc[(i) + ido * ((k) + l1 * (j))] = ch[(i) + ido * ((k) + l1 * (j))] + ch[(i) + ido * ((k) + l1 * (jc))];
            cc[(i - 1) + ido * ((k) + l1 * (jc))] = ch[(i) + ido * ((k) + l1 * (j))] - ch[(i) + ido * ((k) + l1 * (jc))];
          }
        }
  } else
    memcpy(cc, ch, idl1 * sizeof(double));
  for (j = 1, jc = ip - 1; j < ipph; j++, jc--)
    for (k = 0; k < l1; k++) {
      cc[(0) + ido * ((k) + l1 * (j))] = ch[(0) + ido * ((k) + l1 * (jc))] + ch[(0) + ido * ((k) + l1 * (j))];
      cc[(0) + ido * ((k) + l1 * (jc))] = ch[(0) + ido * ((k) + l1 * (jc))] - ch[(0) + ido * ((k) + l1 * (j))];
    }
  csarr = ((double *)util_malloc_((2 * ip) * sizeof(double)));
  arg = twopi / ip;
  csarr[0] = 1.;
  csarr[1] = 0.;
  csarr[2] = csarr[2 * ip - 2] = cos(arg);
  csarr[3] = sin(arg);
  csarr[2 * ip - 1] = -csarr[3];
  for (i = 2; i <= ip / 2; ++i) {
    csarr[2 * i] = csarr[2 * ip - 2 * i] = cos(i * arg);
    csarr[2 * i + 1] = sin(i * arg);
    csarr[2 * ip - 2 * i + 1] = -csarr[2 * i + 1];
  }
  for (l = 1, lc = ip - 1; l < ipph; l++, lc--) {
    ar1 = csarr[2 * l];
    ai1 = csarr[2 * l + 1];
    for (ik = 0; ik < idl1; ik++) {
      ch[(ik) + idl1 * (l)] = cc[(ik) + idl1 * (0)] + ar1 * cc[(ik) + idl1 * (1)];
      ch[(ik) + idl1 * (lc)] = ai1 * cc[(ik) + idl1 * (ip - 1)];
    }
    aidx = 2 * l;
    for (j = 2, jc = ip - 2; j < ipph; j++, jc--) {
      aidx += 2 * l;
      if (aidx >= 2 * ip)
        aidx -= 2 * ip;
      ar2 = csarr[aidx];
      ai2 = csarr[aidx + 1];
      for (ik = 0; ik < idl1; ik++) {
        ch[(ik) + idl1 * (l)] += ar2 * cc[(ik) + idl1 * (j)];
        ch[(ik) + idl1 * (lc)] += ai2 * cc[(ik) + idl1 * (jc)];
      }
    }
  }
  do {
    util_free_(csarr);
    (csarr) = NULL;
  } while (0);
  for (j = 1; j < ipph; j++)
    for (ik = 0; ik < idl1; ik++)
      ch[(ik) + idl1 * (0)] += cc[(ik) + idl1 * (j)];
  for (k = 0; k < l1; k++)
    memcpy(&cc[(0) + ido * ((0) + cdim * (k))], &ch[(0) + ido * ((k) + l1 * (0))], ido * sizeof(double));
  for (j = 1; j < ipph; j++) {
    jc = ip - j;
    j2 = 2 * j;
    for (k = 0; k < l1; k++) {
      cc[(ido - 1) + ido * ((j2 - 1) + cdim * (k))] = ch[(0) + ido * ((k) + l1 * (j))];
      cc[(0) + ido * ((j2) + cdim * (k))] = ch[(0) + ido * ((k) + l1 * (jc))];
    }
  }
  if (ido == 1)
    return;
  for (j = 1; j < ipph; j++) {
    jc = ip - j;
    j2 = 2 * j;
    for (k = 0; k < l1; k++)
      for (i = 2; i < ido; i += 2) {
        ic = ido - i;
        {
          cc[(i - 1) + ido * ((j2) + cdim * (k))] = ch[(i - 1) + ido * ((k) + l1 * (j))] + ch[(i - 1) + ido * ((k) + l1 * (jc))];
          cc[(ic - 1) + ido * ((j2 - 1) + cdim * (k))] = ch[(i - 1) + ido * ((k) + l1 * (j))] - ch[(i - 1) + ido * ((k) + l1 * (jc))];
        }
        {
          cc[(i) + ido * ((j2) + cdim * (k))] = ch[(i) + ido * ((k) + l1 * (jc))] + ch[(i) + ido * ((k) + l1 * (j))];
          cc[(ic) + ido * ((j2 - 1) + cdim * (k))] = ch[(i) + ido * ((k) + l1 * (jc))] - ch[(i) + ido * ((k) + l1 * (j))];
        }
      }
  }
}
```