#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double frctl(double *, double, unsigned int);
void cztab(double *x, unsigned int n, double *cn, double *zn) {
  if (cn != NULL)
    *cn = frctl(x, .75, n) - frctl(x, .25, n);
  if (zn != NULL)
    *zn = frctl(x, .5, n);
  return;
}


x86 assembly (clang, -O0):
<cztab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1173 <cztab+0x63>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  0xec7(%rip),%xmm0
call   1030 <frctl@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  0xea6(%rip),%xmm0
call   1030 <frctl@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     119a <cztab+0x8a>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
movsd  0xe83(%rip),%xmm0
call   1030 <frctl@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cztab>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %esi,%r15d
mov    %rdi,%rbx
test   %rdx,%rdx
je     1161 <cztab+0x51>
mov    %rdx,%rbp
movsd  0xed0(%rip),%xmm0
mov    %rbx,%rdi
mov    %r15d,%esi
call   1030 <frctl@plt>
movsd  %xmm0,(%rsp)
movsd  0xec0(%rip),%xmm0
mov    %rbx,%rdi
mov    %r15d,%esi
call   1030 <frctl@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%rbp)
test   %r14,%r14
je     117e <cztab+0x6e>
movsd  0xea2(%rip),%xmm0
mov    %rbx,%rdi
mov    %r15d,%esi
call   1030 <frctl@plt>
movsd  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @cztab(double* %0, i32 %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %7
%10 = icmp ne double* %9, null
br i1 %10, label %11, label %20
11: ; preds = %4
%12 = load double*, double** %5
%13 = load i32, i32* %6
%14 = call double @frctl(double* %12, double 7.500000e-01, i32 %13)
%15 = load double*, double** %5
%16 = load i32, i32* %6
%17 = call double @frctl(double* %15, double 2.500000e-01, i32 %16)
%18 = fsub double %14, %17
%19 = load double*, double** %7
store double %18, double* %19
br label %20
20: ; preds = %11, %4
%21 = load double*, double** %8
%22 = icmp ne double* %21, null
br i1 %22, label %23, label %28
23: ; preds = %20
%24 = load double*, double** %5
%25 = load i32, i32* %6
%26 = call double @frctl(double* %24, double 5.000000e-01, i32 %25)
%27 = load double*, double** %8
store double %26, double* %27
br label %28
28: ; preds = %23, %20
ret void
}

LLVM IR (-O2):
define void @cztab(double* %0, i32 %1, double* writeonly %2, double* writeonly %3) {
%5 = icmp eq double* %2, null
br i1 %5, label %10, label %6
6: ; preds = %4
%7 = tail call double @frctl(double* %0, double 7.500000e-01, i32 %1)
%8 = tail call double @frctl(double* %0, double 2.500000e-01, i32 %1)
%9 = fsub double %7, %8
store double %9, double* %2
br label %10
10: ; preds = %6, %4
%11 = icmp eq double* %3, null
br i1 %11, label %14, label %12
12: ; preds = %10
%13 = tail call double @frctl(double* %0, double 5.000000e-01, i32 %1)
store double %13, double* %3
br label %14
14: ; preds = %12, %10
ret void
}