#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 */
int M_PI;
double cos(double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ printval(double, int);
double sin(double);
int /*<<< orphan*/ strcmp(char *, char *);
scalar_t__ strstr(char *, char *);
int main(int argc, char *argv[]) {
  int i, j;
  int do_sin = argc > 1 && !strcmp(argv[1], "sin");
  int fixed = argc > 1 && strstr(argv[1], "fixed");
  double (*func)(double) = do_sin ? sin : cos;
  printf("/* This file was automatically generated. */\n");
  printf("#define CONFIG_FFT_FLOAT %d\n", !fixed);
  printf("#include \"libavcodec/%s\"\n", do_sin ? "rdft.h" : "fft.h");
  for (i = 4; i <= 16; i++) {
    int m = 1 << i;
    double freq = 2 * M_PI / m;
    printf("%s(%i) = {\n   ", do_sin ? "SINTABLE" : "COSTABLE", m);
    for (j = 0; j < m / 2 - 1; j++) {
      int idx = j > m / 4 ? m / 2 - j : j;
      if (do_sin && j >= m / 4)
        idx = m / 4 - j;
      printval(func(idx * freq), fixed);
      if ((j & 3) == 3)
        printf("\n   ");
    }
    printval(func(do_sin ? -(m / 4 - 1) * freq : freq), fixed);
    printf("\n};\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x3d(%rbp)
jle    1184 <main+0x44>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe8c(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x3d(%rbp)
mov    -0x3d(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x3e(%rbp)
jle    11bc <main+0x7c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe57(%rip),%rsi
call   1060 <strstr@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x3e(%rbp)
mov    -0x3e(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edx
mov    0x2e0f(%rip),%rax
mov    0x2e00(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
mov    %rax,-0x28(%rbp)
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%ecx
lea    0xe5f(%rip),%rsi
lea    0xe51(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x4,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jg     13ee <main+0x2ae>
mov    -0x14(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x2c(%rbp)
mov    0x2d90(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cltd
idivl  -0x2c(%rbp)
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x1c(%rbp),%ecx
lea    0xe20(%rip),%rsi
lea    0xe10(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0x2c(%rbp),%edx
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    137c <main+0x23c>
mov    -0x18(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
cmp    %ecx,%eax
jle    12ef <main+0x1af>
mov    -0x2c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
sub    -0x18(%rbp),%eax
mov    %eax,-0x4c(%rbp)
jmp    12f5 <main+0x1b5>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1334 <main+0x1f4>
mov    -0x18(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
cmp    %ecx,%eax
jl     1334 <main+0x1f4>
mov    -0x2c(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
sub    -0x18(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x28(%rbp),%rax
cvtsi2sdl -0x3c(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   *%rax
mov    -0x20(%rbp),%edi
call   1050 <printval@plt>
mov    -0x18(%rbp),%eax
and    $0x3,%eax
cmp    $0x3,%eax
jne    1369 <main+0x229>
lea    0xd24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    136e <main+0x22e>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    129a <main+0x15a>
mov    -0x28(%rbp),%rax
mov    %rax,-0x58(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     13b5 <main+0x275>
mov    -0x2c(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
sub    $0x1,%ecx
xor    %eax,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
jmp    13bf <main+0x27f>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x58(%rbp),%rax
movsd  -0x60(%rbp),%xmm0
call   *%rax
mov    -0x20(%rbp),%edi
call   1050 <printval@plt>
lea    0xcc4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    123a <main+0xfa>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     11b1 <main+0x61>
mov    0x8(%rsi),%rbx
lea    0xe8d(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
mov    %eax,%r14d
lea    0xe7f(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strstr@plt>
xor    %ebp,%ebp
movl   $0x0,0x8(%rsp)
test   %rax,%rax
sete   %al
setne  %cl
test   %r14d,%r14d
sete   %bl
jne    11c9 <main+0x79>
mov    0x2e29(%rip),%rdx
jmp    11d0 <main+0x80>
mov    0x2e28(%rip),%rax
mov    %rax,0x10(%rsp)
movl   $0x0,0x8(%rsp)
xor    %ebx,%ebx
jmp    11e2 <main+0x92>
mov    0x2e10(%rip),%rdx
mov    %rdx,0x10(%rsp)
mov    0x8(%rsp),%edx
mov    %cl,%dl
mov    %edx,0x8(%rsp)
mov    %al,%bpl
lea    0xe86(%rip),%rdi
call   1030 <puts@plt>
lea    0xe15(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe3c(%rip),%rax
lea    0xe3c(%rip),%rsi
test   %bl,%bl
cmovne %rax,%rsi
lea    0xe0e(%rip),%rdi
lea    0xe3d(%rip),%rax
lea    0xe3f(%rip),%rcx
cmovne %rax,%rcx
mov    %rcx,0x30(%rsp)
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%r14d
xor    $0x1,%r14b
mov    $0x4,%ebp
mov    %ebx,0x24(%rsp)
jmp    12a5 <main+0x155>
nopl   0x0(%rax)
mov    0x28(%rsp),%rcx
lea    0x3(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x2,%eax
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
mov    0xc(%rsp),%ebp
call   *0x10(%rsp)
mov    0x8(%rsp),%edi
call   1060 <printval@plt>
lea    0xe08(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
cmp    $0x11,%ebp
je     13ab <main+0x25b>
mov    $0x1,%ebx
mov    %ebp,0xc(%rsp)
mov    %ebp,%ecx
shl    %cl,%ebx
mov    0x2d2f(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cltd
idiv   %ebx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsp)
lea    0xd7a(%rip),%rdi
mov    0x30(%rsp),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,0x28(%rsp)
cmp    $0x4,%ebx
jl     1390 <main+0x240>
mov    0x28(%rsp),%rax
mov    %eax,%r12d
shr    $0x1f,%r12d
add    %eax,%r12d
sar    %r12d
mov    %eax,%r13d
shr    $0x2,%r13d
cmp    $0x3,%r12d
mov    $0x2,%ebx
cmovge %r12d,%ebx
add    $0xffffffff,%ebx
xor    %r15d,%r15d
mov    %r13d,%ebp
jmp    1340 <main+0x1f0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15d
add    $0xffffffff,%r12d
add    $0xffffffff,%ebp
cmp    %r15d,%ebx
je     1390 <main+0x240>
cmp    %r15d,%r13d
mov    %r15d,%eax
cmovb  %r12d,%eax
mov    %ebp,%ecx
cmova  %eax,%ecx
test   %r14b,%r14b
cmovne %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mulsd  0x18(%rsp),%xmm0
call   *0x10(%rsp)
mov    0x8(%rsp),%edi
call   1060 <printval@plt>
mov    %r15d,%eax
not    %eax
test   $0x3,%al
jne    1330 <main+0x1e0>
lea    0xcd9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1330 <main+0x1e0>
nopl   0x0(%rax,%rax,1)
mov    0x24(%rsp),%ebx
test   %bl,%bl
jne    1250 <main+0x100>
mov    0xc(%rsp),%ebp
movsd  0x18(%rsp),%xmm0
jmp    1280 <main+0x130>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"sin\00"
@.str.1 = [6 x i8] c"fixed\00"
@.str.2 = [46 x i8] c"/* This file was automatically generated. */\0A\00"
@.str.3 = [29 x i8] c"#define CONFIG_FFT_FLOAT %d\0A\00"
@.str.4 = [26 x i8] c"#include \22libavcodec/%s\22\0A\00"
@.str.5 = [7 x i8] c"rdft.h\00"
@.str.6 = [6 x i8] c"fft.h\00"
@M_PI = global i32 0
@.str.7 = [15 x i8] c"%s(%i) = {\0A \00"
@.str.8 = [9 x i8] c"SINTABLE\00"
@.str.9 = [9 x i8] c"COSTABLE\00"
@.str.10 = [5 x i8] c"\0A \00"
@.str.11 = [5 x i8] c"\0A};\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double (double)*
%11 = alloca i32
%12 = alloca double
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp sgt i32 %14, 1
br i1 %15, label %16, label %23
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @strcmp(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
br label %23
23: ; preds = %16, %2
%24 = phi i1 [ false, %2 ], [ %22, %16 ]
%25 = zext i1 %24 to i32
store i32 %25, i32* %8
%26 = load i32, i32* %4
%27 = icmp sgt i32 %26, 1
br i1 %27, label %28, label %34
28: ; preds = %23
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = call i64 @strstr(i8* %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%33 = icmp ne i64 %32, 0
br label %34
34: ; preds = %28, %23
%35 = phi i1 [ false, %23 ], [ %33, %28 ]
%36 = zext i1 %35 to i32
store i32 %36, i32* %9
%37 = load i32, i32* %8
%38 = icmp ne i32 %37, 0
%39 = zext i1 %38 to i64
%40 = select i1 %38, double (double)* @sin, double (double)* @cos
store double (double)* %40, double (double)** %10
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%42 = load i32, i32* %9
%43 = icmp ne i32 %42, 0
%44 = xor i1 %43, true
%45 = zext i1 %44 to i32
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %45)
%47 = load i32, i32* %8
%48 = icmp ne i32 %47, 0
%49 = zext i1 %48 to i64
%50 = select i1 %48, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0)
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %50)
store i32 4, i32* %6
br label %52
52: ; preds = %139, %34
%53 = load i32, i32* %6
%54 = icmp sle i32 %53, 16
br i1 %54, label %55, label %142
55: ; preds = %52
%56 = load i32, i32* %6
%57 = shl i32 1, %56
store i32 %57, i32* %11
%58 = load i32, i32* @M_PI
%59 = mul nsw i32 2, %58
%60 = load i32, i32* %11
%61 = sdiv i32 %59, %60
%62 = sitofp i32 %61 to double
store double %62, double* %12
%63 = load i32, i32* %8
%64 = icmp ne i32 %63, 0
%65 = zext i1 %64 to i64
%66 = select i1 %64, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0)
%67 = load i32, i32* %11
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %66, i32 %67)
store i32 0, i32* %7
br label %69
69: ; preds = %116, %55
%70 = load i32, i32* %7
%71 = load i32, i32* %11
%72 = sdiv i32 %71, 2
%73 = sub nsw i32 %72, 1
%74 = icmp slt i32 %70, %73
br i1 %74, label %75, label %119
75: ; preds = %69
%76 = load i32, i32* %7
%77 = load i32, i32* %11
%78 = sdiv i32 %77, 4
%79 = icmp sgt i32 %76, %78
br i1 %79, label %80, label %85
80: ; preds = %75
%81 = load i32, i32* %11
%82 = sdiv i32 %81, 2
%83 = load i32, i32* %7
%84 = sub nsw i32 %82, %83
br label %87
85: ; preds = %75
%86 = load i32, i32* %7
br label %87
87: ; preds = %85, %80
%88 = phi i32 [ %84, %80 ], [ %86, %85 ]
store i32 %88, i32* %13
%89 = load i32, i32* %8
%90 = icmp ne i32 %89, 0
br i1 %90, label %91, label %101
91: ; preds = %87
%92 = load i32, i32* %7
%93 = load i32, i32* %11
%94 = sdiv i32 %93, 4
%95 = icmp sge i32 %92, %94
br i1 %95, label %96, label %101
96: ; preds = %91
%97 = load i32, i32* %11
%98 = sdiv i32 %97, 4
%99 = load i32, i32* %7
%100 = sub nsw i32 %98, %99
store i32 %100, i32* %13
br label %101
101: ; preds = %96, %91, %87
%102 = load double (double)*, double (double)** %10
%103 = load i32, i32* %13
%104 = sitofp i32 %103 to double
%105 = load double, double* %12
%106 = fmul double %104, %105
%107 = call double %102(double %106)
%108 = load i32, i32* %9
%109 = call i32 @printval(double %107, i32 %108)
%110 = load i32, i32* %7
%111 = and i32 %110, 3
%112 = icmp eq i32 %111, 3
br i1 %112, label %113, label %115
113: ; preds = %101
%114 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %115
115: ; preds = %113, %101
br label %116
116: ; preds = %115
%117 = load i32, i32* %7
%118 = add nsw i32 %117, 1
store i32 %118, i32* %7
br label %69
119: ; preds = %69
%120 = load double (double)*, double (double)** %10
%121 = load i32, i32* %8
%122 = icmp ne i32 %121, 0
br i1 %122, label %123, label %131
123: ; preds = %119
%124 = load i32, i32* %11
%125 = sdiv i32 %124, 4
%126 = sub nsw i32 %125, 1
%127 = sub nsw i32 0, %126
%128 = sitofp i32 %127 to double
%129 = load double, double* %12
%130 = fmul double %128, %129
br label %133
131: ; preds = %119
%132 = load double, double* %12
br label %133
133: ; preds = %131, %123
%134 = phi double [ %130, %123 ], [ %132, %131 ]
%135 = call double %120(double %134)
%136 = load i32, i32* %9
%137 = call i32 @printval(double %135, i32 %136)
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.11, i64 0, i64 0))
br label %139
139: ; preds = %133
%140 = load i32, i32* %6
%141 = add nsw i32 %140, 1
store i32 %141, i32* %6
br label %52
142: ; preds = %52
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"sin\00"
@.str.1 = [6 x i8] c"fixed\00"
@.str.3 = [29 x i8] c"#define CONFIG_FFT_FLOAT %d\0A\00"
@.str.4 = [26 x i8] c"#include \22libavcodec/%s\22\0A\00"
@.str.5 = [7 x i8] c"rdft.h\00"
@.str.6 = [6 x i8] c"fft.h\00"
@M_PI = global i32 0
@.str.7 = [15 x i8] c"%s(%i) = {\0A \00"
@.str.8 = [9 x i8] c"SINTABLE\00"
@.str.9 = [9 x i8] c"COSTABLE\00"
@.str.10 = [5 x i8] c"\0A \00"
@str = [45 x i8] c"/* This file was automatically generated. */\00"
@str.12 = [4 x i8] c"\0A};\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
%9 = tail call i64 @strstr(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
%12 = select i1 %8, double (double)* @sin, double (double)* @cos
%13 = xor i1 %10, true
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %4, %2
%16 = phi i32 [ 0, %2 ], [ %11, %4 ]
%17 = phi i32 [ 1, %2 ], [ %14, %4 ]
%18 = phi i1 [ false, %2 ], [ %8, %4 ]
%19 = phi double (double)* [ @cos, %2 ], [ %12, %4 ]
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%22 = select i1 %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i8* %22)
%24 = select i1 %18, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0)
%25 = xor i1 %18, true
br label %26
26: ; preds = %15, %66
%27 = phi i32 [ 4, %15 ], [ %71, %66 ]
%28 = shl nuw nsw i32 1, %27
%29 = load i32, i32* @M_PI
%30 = shl nsw i32 %29, 1
%31 = sdiv i32 %30, %28
%32 = sitofp i32 %31 to double
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %24, i32 %28)
%34 = sdiv i32 %28, 2
%35 = icmp sgt i32 %28, 3
br i1 %35, label %36, label %60
36: ; preds = %26
%37 = lshr i32 %28, 2
%38 = call i32 @llvm.smax.i32(i32 %34, i32 2)
%39 = add nsw i32 %38, -1
br label %40
40: ; preds = %36, %57
%41 = phi i32 [ 0, %36 ], [ %58, %57 ]
%42 = icmp ult i32 %37, %41
%43 = sub nsw i32 %34, %41
%44 = select i1 %42, i32 %43, i32 %41
%45 = icmp ugt i32 %37, %41
%46 = select i1 %25, i1 true, i1 %45
%47 = sub nsw i32 %37, %41
%48 = select i1 %46, i32 %44, i32 %47
%49 = sitofp i32 %48 to double
%50 = fmul double %32, %49
%51 = tail call double %19(double %50)
%52 = tail call i32 @printval(double %51, i32 %16)
%53 = and i32 %41, 3
%54 = icmp eq i32 %53, 3
br i1 %54, label %55, label %57
55: ; preds = %40
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
br label %57
57: ; preds = %55, %40
%58 = add nuw nsw i32 %41, 1
%59 = icmp eq i32 %58, %39
br i1 %59, label %60, label %40
60: ; preds = %57, %26
br i1 %18, label %61, label %66
61: ; preds = %60
%62 = sdiv i32 %28, -4
%63 = add nsw i32 %62, 1
%64 = sitofp i32 %63 to double
%65 = fmul double %64, %32
br label %66
66: ; preds = %60, %61
%67 = phi double [ %65, %61 ], [ %32, %60 ]
%68 = tail call double %19(double %67)
%69 = tail call i32 @printval(double %68, i32 %16)
%70 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.12, i64 0, i64 0))
%71 = add nuw nsw i32 %27, 1
%72 = icmp eq i32 %71, 17
br i1 %72, label %73, label %26
73: ; preds = %66
ret i32 0
}