#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 M_PI;
double cos(double);
double fabs(double);
double pow(double, int);
int /*<<< orphan*/ printf(char *, int, double, int, double);
double sin(double);
double f_chans(double x, double a, int n, int s) {
  int k, m, mmax, kmax;
  double y, psin, t, pi, en, tt;
  printf("\nchans^{(%d)}_{%g,%d}(%g)\n", s, a, n, x);
  pi = M_PI;
  y = n;
  y = y / (a - 1);
  if (fabs(x) >= y)
    return 0;
  en = 1. / n;
  mmax = 20;
  kmax = 300;
  y = 0;
  for (k = 1; k < kmax; k++) {
    psin = 1;
    t = (pi * k) * (a - 1) * en;
    tt = pow(t, s);
    for (m = 1; m < mmax; m++) {
      t = t / a;
      psin = psin * (sin(t) / t);
    }
    switch (s % 4) {
    case 0:
      psin = pow(psin, n) * cos((pi * k * (a - 1) * en) * x);
      break;
    case 1:
      psin = -pow(psin, n) * sin((pi * k * (a - 1) * en) * x);
      break;
    case 2:
      psin = -pow(psin, n) * cos((pi * k * (a - 1) * en) * x);
      break;
    case 3:
      psin = pow(psin, n) * sin((pi * k * (a - 1) * en) * x);
      break;
    }
    psin = psin * tt;
    y = y + psin;
  }
  y = y * (a - 1) * en;
  printf("\nend of chans^{(%d)}_{%g,%d}(%g)\n", s, a, n, x);
  return y;
}


x86 assembly (clang, -O0):
<f_chans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    -0x20(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%edx
movsd  -0x10(%rbp),%xmm1
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e6a(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe6d(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movaps 0xe44(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     11d8 <f_chans+0x98>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1507 <f_chans+0x3c7>
cvtsi2sdl -0x1c(%rbp),%xmm1
movsd  0xe2b(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movl   $0x14,-0x2c(%rbp)
movl   $0x12c,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    14bd <f_chans+0x37d>
movsd  0xdf1(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xdd1(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%edi
call   1060 <pow@plt>
movsd  %xmm0,-0x60(%rbp)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    12bd <f_chans+0x17d>
movsd  -0x48(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    126a <f_chans+0x12a>
mov    -0x20(%rbp),%eax
mov    %eax,%edx
add    $0x3,%edx
test   %eax,%eax
mov    %eax,%ecx
cmovs  %edx,%ecx
and    $0xfffffffc,%ecx
sub    %ecx,%eax
mov    %eax,%ecx
mov    %rcx,-0x70(%rbp)
sub    $0x3,%eax
ja     1491 <f_chans+0x351>
mov    -0x70(%rbp),%rax
lea    0xd2d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  -0x40(%rbp),%xmm0
mov    -0x1c(%rbp),%edi
call   1060 <pow@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xcef(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1491 <f_chans+0x351>
movsd  -0x40(%rbp),%xmm0
mov    -0x1c(%rbp),%edi
call   1060 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xc7e(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1491 <f_chans+0x351>
movsd  -0x40(%rbp),%xmm0
mov    -0x1c(%rbp),%edi
call   1060 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xc0a(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1491 <f_chans+0x351>
movsd  -0x40(%rbp),%xmm0
mov    -0x1c(%rbp),%edi
call   1060 <pow@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xbaa(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    120b <f_chans+0xcb>
movsd  -0x38(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xb41(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x20(%rbp),%esi
movsd  -0x18(%rbp),%xmm0
mov    -0x1c(%rbp),%edx
movsd  -0x10(%rbp),%xmm1
lea    0xb4b(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_chans>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %esi,%r15d
mov    %edi,%ebx
movaps %xmm1,%xmm2
movsd  %xmm1,0x28(%rsp)
movaps %xmm0,%xmm1
movaps %xmm0,0x40(%rsp)
lea    0xed5(%rip),%rdi
movaps %xmm2,%xmm0
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,0xc(%rsp)
cvtsi2sd %ebx,%xmm3
movsd  0xe7b(%rip),%xmm0
addsd  0x28(%rsp),%xmm0
movapd %xmm3,%xmm1
movsd  %xmm0,0x50(%rsp)
divsd  %xmm0,%xmm1
movapd 0xe6f(%rip),%xmm2
andpd  0x40(%rsp),%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm2
jae    13fa <f_chans+0x2ba>
mov    0x2e2c(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  0xe3a(%rip),%xmm0
movapd %xmm0,%xmm4
lea    0x3(%r15),%eax
test   %r15d,%r15d
cmovns %r15d,%eax
divsd  %xmm3,%xmm4
and    $0xfffffffc,%eax
mov    %r15d,%ebp
sub    %eax,%ebp
xorpd  %xmm2,%xmm2
mov    $0x1,%ebx
mov    %ebp,%r12d
lea    0xe34(%rip),%r13
movapd %xmm0,%xmm3
movsd  %xmm4,0x38(%rsp)
jmp    1279 <f_chans+0x139>
nopl   0x0(%rax,%rax,1)
movapd %xmm1,%xmm0
mov    0xc(%rsp),%edi
call   1060 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
mulsd  0x40(%rsp),%xmm0
call   1040 <sin@plt>
movapd %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm1
movsd  0x60(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0x70(%rsp),%xmm2
addsd  %xmm0,%xmm2
movsd  0xdae(%rip),%xmm1
movsd  0x68(%rsp),%xmm3
addsd  %xmm1,%xmm3
add    $0x1,%ebx
cmp    $0x12c,%ebx
movsd  0x38(%rsp),%xmm4
je     13c1 <f_chans+0x281>
movsd  %xmm2,0x70(%rsp)
movsd  0x58(%rsp),%xmm0
movsd  %xmm3,0x68(%rsp)
mulsd  %xmm3,%xmm0
mulsd  0x50(%rsp),%xmm0
mulsd  %xmm4,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %r15d,%edi
call   1060 <pow@plt>
movsd  %xmm0,0x60(%rsp)
mov    $0x12,%r14d
movsd  0x20(%rsp),%xmm1
movsd  0xd47(%rip),%xmm0
movsd  %xmm0,0x30(%rsp)
nopw   0x0(%rax,%rax,1)
movsd  0x28(%rsp),%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
call   1040 <sin@plt>
movapd %xmm0,%xmm1
movsd  0x10(%rsp),%xmm2
divsd  %xmm2,%xmm1
mulsd  0x30(%rsp),%xmm1
test   %r14d,%r14d
je     1340 <f_chans+0x200>
movapd %xmm2,%xmm0
divsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x30(%rsp)
call   1040 <sin@plt>
movsd  0x10(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  0x30(%rsp),%xmm2
mulsd  %xmm0,%xmm2
add    $0xfffffffe,%r14d
movsd  %xmm2,0x30(%rsp)
jmp    12d0 <f_chans+0x190>
nopl   (%rax)
cmp    $0x3,%ebp
ja     123e <f_chans+0xfe>
movslq 0x0(%r13,%r12,4),%rax
add    %r13,%rax
jmp    *%rax
movapd %xmm1,%xmm0
mov    0xc(%rsp),%edi
call   1060 <pow@plt>
movsd  %xmm0,0x10(%rsp)
jmp    13ab <f_chans+0x26b>
nopl   0x0(%rax,%rax,1)
movapd %xmm1,%xmm0
mov    0xc(%rsp),%edi
call   1060 <pow@plt>
xorpd  0xc9b(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
jmp    1223 <f_chans+0xe3>
movapd %xmm1,%xmm0
mov    0xc(%rsp),%edi
call   1060 <pow@plt>
xorpd  0xc7b(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
mulsd  0x40(%rsp),%xmm0
call   1050 <cos@plt>
jmp    1234 <f_chans+0xf4>
movsd  0x50(%rsp),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm4
movsd  %xmm4,0x38(%rsp)
lea    0xc7f(%rip),%rdi
mov    %r15d,%esi
movsd  0x28(%rsp),%xmm0
mov    0xc(%rsp),%edx
movapd 0x40(%rsp),%xmm1
call   1030 <printf@plt>
movsd  0x38(%rsp),%xmm0
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\0Achans^{(%d)}_{%g,%d}(%g)\0A\00"
@M_PI = global double 0.000000e+00
@.str.1 = [34 x i8] c"\0Aend of chans^{(%d)}_{%g,%d}(%g)\0A\00"
define double @f_chans(double %0, double %1, i32 %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store double %0, double* %6
store double %1, double* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%20 = load i32, i32* %9
%21 = load double, double* %7
%22 = load i32, i32* %8
%23 = load double, double* %6
%24 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %20, double %21, i32 %22, double %23)
%25 = load double, double* @M_PI
store double %25, double* %17
%26 = load i32, i32* %8
%27 = sitofp i32 %26 to double
store double %27, double* %14
%28 = load double, double* %14
%29 = load double, double* %7
%30 = fsub double %29, 1.000000e+00
%31 = fdiv double %28, %30
store double %31, double* %14
%32 = load double, double* %6
%33 = call double @llvm.fabs.f64(double %32)
%34 = load double, double* %14
%35 = fcmp oge double %33, %34
br i1 %35, label %36, label %37
36: ; preds = %4
store double 0.000000e+00, double* %5
br label %171
37: ; preds = %4
%38 = load i32, i32* %8
%39 = sitofp i32 %38 to double
%40 = fdiv double 1.000000e+00, %39
store double %40, double* %18
store i32 20, i32* %12
store i32 300, i32* %13
store double 0.000000e+00, double* %14
store i32 1, i32* %10
br label %41
41: ; preds = %155, %37
%42 = load i32, i32* %10
%43 = load i32, i32* %13
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %158
45: ; preds = %41
store double 1.000000e+00, double* %15
%46 = load double, double* %17
%47 = load i32, i32* %10
%48 = sitofp i32 %47 to double
%49 = fmul double %46, %48
%50 = load double, double* %7
%51 = fsub double %50, 1.000000e+00
%52 = fmul double %49, %51
%53 = load double, double* %18
%54 = fmul double %52, %53
store double %54, double* %16
%55 = load double, double* %16
%56 = load i32, i32* %9
%57 = call double @pow(double %55, i32 %56)
store double %57, double* %19
store i32 1, i32* %11
br label %58
58: ; preds = %72, %45
%59 = load i32, i32* %11
%60 = load i32, i32* %12
%61 = icmp slt i32 %59, %60
br i1 %61, label %62, label %75
62: ; preds = %58
%63 = load double, double* %16
%64 = load double, double* %7
%65 = fdiv double %63, %64
store double %65, double* %16
%66 = load double, double* %15
%67 = load double, double* %16
%68 = call double @sin(double %67)
%69 = load double, double* %16
%70 = fdiv double %68, %69
%71 = fmul double %66, %70
store double %71, double* %15
br label %72
72: ; preds = %62
%73 = load i32, i32* %11
%74 = add nsw i32 %73, 1
store i32 %74, i32* %11
br label %58
75: ; preds = %58
%76 = load i32, i32* %9
%77 = srem i32 %76, 4
switch i32 %77, label %148 [
i32 0, label %78
i32 1, label %95
i32 2, label %113
i32 3, label %131
]
78: ; preds = %75
%79 = load double, double* %15
%80 = load i32, i32* %8
%81 = call double @pow(double %79, i32 %80)
%82 = load double, double* %17
%83 = load i32, i32* %10
%84 = sitofp i32 %83 to double
%85 = fmul double %82, %84
%86 = load double, double* %7
%87 = fsub double %86, 1.000000e+00
%88 = fmul double %85, %87
%89 = load double, double* %18
%90 = fmul double %88, %89
%91 = load double, double* %6
%92 = fmul double %90, %91
%93 = call double @cos(double %92)
%94 = fmul double %81, %93
store double %94, double* %15
br label %148
95: ; preds = %75
%96 = load double, double* %15
%97 = load i32, i32* %8
%98 = call double @pow(double %96, i32 %97)
%99 = fneg double %98
%100 = load double, double* %17
%101 = load i32, i32* %10
%102 = sitofp i32 %101 to double
%103 = fmul double %100, %102
%104 = load double, double* %7
%105 = fsub double %104, 1.000000e+00
%106 = fmul double %103, %105
%107 = load double, double* %18
%108 = fmul double %106, %107
%109 = load double, double* %6
%110 = fmul double %108, %109
%111 = call double @sin(double %110)
%112 = fmul double %99, %111
store double %112, double* %15
br label %148
113: ; preds = %75
%114 = load double, double* %15
%115 = load i32, i32* %8
%116 = call double @pow(double %114, i32 %115)
%117 = fneg double %116
%118 = load double, double* %17
%119 = load i32, i32* %10
%120 = sitofp i32 %119 to double
%121 = fmul double %118, %120
%122 = load double, double* %7
%123 = fsub double %122, 1.000000e+00
%124 = fmul double %121, %123
%125 = load double, double* %18
%126 = fmul double %124, %125
%127 = load double, double* %6
%128 = fmul double %126, %127
%129 = call double @cos(double %128)
%130 = fmul double %117, %129
store double %130, double* %15
br label %148
131: ; preds = %75
%132 = load double, double* %15
%133 = load i32, i32* %8
%134 = call double @pow(double %132, i32 %133)
%135 = load double, double* %17
%136 = load i32, i32* %10
%137 = sitofp i32 %136 to double
%138 = fmul double %135, %137
%139 = load double, double* %7
%140 = fsub double %139, 1.000000e+00
%141 = fmul double %138, %140
%142 = load double, double* %18
%143 = fmul double %141, %142
%144 = load double, double* %6
%145 = fmul double %143, %144
%146 = call double @sin(double %145)
%147 = fmul double %134, %146
store double %147, double* %15
br label %148
148: ; preds = %75, %131, %113, %95, %78
%149 = load double, double* %15
%150 = load double, double* %19
%151 = fmul double %149, %150
store double %151, double* %15
%152 = load double, double* %14
%153 = load double, double* %15
%154 = fadd double %152, %153
store double %154, double* %14
br label %155
155: ; preds = %148
%156 = load i32, i32* %10
%157 = add nsw i32 %156, 1
store i32 %157, i32* %10
br label %41
158: ; preds = %41
%159 = load double, double* %14
%160 = load double, double* %7
%161 = fsub double %160, 1.000000e+00
%162 = fmul double %159, %161
%163 = load double, double* %18
%164 = fmul double %162, %163
store double %164, double* %14
%165 = load i32, i32* %9
%166 = load double, double* %7
%167 = load i32, i32* %8
%168 = load double, double* %6
%169 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %165, double %166, i32 %167, double %168)
%170 = load double, double* %14
store double %170, double* %5
br label %171
171: ; preds = %158, %36
%172 = load double, double* %5
ret double %172
}

LLVM IR (-O2):
@.str = [27 x i8] c"\0Achans^{(%d)}_{%g,%d}(%g)\0A\00"
@M_PI = global double 0.000000e+00
@.str.1 = [34 x i8] c"\0Aend of chans^{(%d)}_{%g,%d}(%g)\0A\00"
define double @f_chans(double %0, double %1, i32 %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %3, double %1, i32 %2, double %0)
%6 = load double, double* @M_PI
%7 = sitofp i32 %2 to double
%8 = fadd double %1, -1.000000e+00
%9 = fdiv double %7, %8
%10 = tail call double @llvm.fabs.f64(double %0)
%11 = fcmp ult double %10, %9
br i1 %11, label %12, label %71
12: ; preds = %4
%13 = fdiv double 1.000000e+00, %7
%14 = srem i32 %3, 4
br label %15
15: ; preds = %12, %61
%16 = phi i32 [ 1, %12 ], [ %65, %61 ]
%17 = phi double [ 0.000000e+00, %12 ], [ %64, %61 ]
%18 = sitofp i32 %16 to double
%19 = fmul double %6, %18
%20 = fmul double %8, %19
%21 = fmul double %13, %20
%22 = tail call double @pow(double %21, i32 %3)
br label %23
23: ; preds = %32, %15
%24 = phi i32 [ 1, %15 ], [ %37, %32 ]
%25 = phi double [ %21, %15 ], [ %33, %32 ]
%26 = phi double [ 1.000000e+00, %15 ], [ %36, %32 ]
%27 = fdiv double %25, %1
%28 = tail call double @sin(double %27)
%29 = fdiv double %28, %27
%30 = fmul double %26, %29
%31 = icmp eq i32 %24, 19
br i1 %31, label %38, label %32
32: ; preds = %23
%33 = fdiv double %27, %1
%34 = tail call double @sin(double %33)
%35 = fdiv double %34, %33
%36 = fmul double %30, %35
%37 = add nuw nsw i32 %24, 2
br label %23
38: ; preds = %23
switch i32 %14, label %61 [
i32 0, label %39
i32 1, label %44
i32 2, label %50
i32 3, label %56
]
39: ; preds = %38
%40 = tail call double @pow(double %30, i32 %2)
%41 = fmul double %21, %0
%42 = tail call double @cos(double %41)
%43 = fmul double %40, %42
br label %61
44: ; preds = %38
%45 = tail call double @pow(double %30, i32 %2)
%46 = fneg double %45
%47 = fmul double %21, %0
%48 = tail call double @sin(double %47)
%49 = fmul double %48, %46
br label %61
50: ; preds = %38
%51 = tail call double @pow(double %30, i32 %2)
%52 = fneg double %51
%53 = fmul double %21, %0
%54 = tail call double @cos(double %53)
%55 = fmul double %54, %52
br label %61
56: ; preds = %38
%57 = tail call double @pow(double %30, i32 %2)
%58 = fmul double %21, %0
%59 = tail call double @sin(double %58)
%60 = fmul double %57, %59
br label %61
61: ; preds = %38, %56, %50, %44, %39
%62 = phi double [ %30, %38 ], [ %60, %56 ], [ %55, %50 ], [ %49, %44 ], [ %43, %39 ]
%63 = fmul double %22, %62
%64 = fadd double %17, %63
%65 = add nuw nsw i32 %16, 1
%66 = icmp eq i32 %65, 300
br i1 %66, label %67, label %15
67: ; preds = %61
%68 = fmul double %8, %64
%69 = fmul double %13, %68
%70 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %3, double %1, i32 %2, double %0)
br label %71
71: ; preds = %4, %67
%72 = phi double [ %69, %67 ], [ 0.000000e+00, %4 ]
ret double %72
}