#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 *alloca(int);
float atof(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char, char, ...);
int rint(float);
double sin(int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
char *strchr(char *, char);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  int i, j;
  double *f;
  double *amp;
  if (argc < 2)
    usage();
  f = alloca(sizeof(*f) * (argc - 1));
  amp = alloca(sizeof(*amp) * (argc - 1));
  i = 0;
  while (argv[i + 1]) {
    char *pos = strchr(argv[i + 1], ',');
    f[i] = atof(argv[i + 1]);
    if (pos)
      amp[i] = atof(pos + 1) * 32767.f;
    else
      amp[i] = 32767.f;
    fprintf(stderr, "%g Hz, %g amp\n", f[i], amp[i]);
    i++;
  }
  for (i = 0; i < 44100 * 10; i++) {
    float val = 0;
    int ival;
    for (j = 0; j < argc - 1; j++)
      val += amp[j] * sin(i / 44100.f * f[j] * 2 * 3.14159265358979323846);
    ival = rint(val);
    if (ival > 32767.f)
      ival = 32767.f;
    if (ival < -32768.f)
      ival = -32768.f;
    fprintf(stdout, "%c%c%c%c", (char)(ival & 0xff), (char)((ival >> 8) & 0xff),
            (char)(ival & 0xff), (char)((ival >> 8) & 0xff));
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1197 <main+0x27>
mov    $0x0,%al
call   1090 <usage@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <alloca@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <alloca@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     12c0 <main+0x150>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
mov    $0x2c,%esi
call   1040 <strchr@plt>
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
cvtss2sd %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpq   $0x0,-0x30(%rbp)
je     1264 <main+0xf4>
mov    -0x30(%rbp),%rdi
add    $0x1,%rdi
call   1030 <atof@plt>
movss  0xdb6(%rip),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1279 <main+0x109>
mov    -0x28(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  0xdac(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rdx
cvttsd2si (%rax,%rdx,8),%eax
mov    %al,%cl
mov    -0x28(%rbp),%rax
movsd  (%rax,%rdx,8),%xmm0
cvttsd2si %xmm0,%eax
lea    0xd83(%rip),%rsi
movsbl %cl,%edx
movsbl %al,%ecx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11cc <main+0x5c>
movl   $0x0,-0x14(%rbp)
cmpl   $0x6baa8,-0x14(%rbp)
jge    141d <main+0x2ad>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1379 <main+0x209>
mov    -0x28(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm0
movss  0xcf5(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x18(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  0xce8(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcd4(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
movss  -0x34(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12e3 <main+0x173>
movss  -0x34(%rbp),%xmm0
call   1080 <rint@plt>
mov    %eax,-0x38(%rbp)
cvtsi2ssl -0x38(%rbp),%xmm0
movss  0xc6d(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    13a3 <main+0x233>
movl   $0x7fff,-0x38(%rbp)
cvtsi2ssl -0x38(%rbp),%xmm1
movss  0xc54(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    13c0 <main+0x250>
movl   $0xffff8000,-0x38(%rbp)
mov    0x2c11(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x38(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    -0x38(%rbp),%edx
and    $0xff,%edx
movsbl %dl,%r8d
mov    -0x38(%rbp),%edx
sar    $0x8,%edx
and    $0xff,%edx
movsbl %dl,%r9d
lea    0xc35(%rip),%rsi
movsbl %cl,%edx
movsbl %al,%ecx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12c7 <main+0x157>
xor    %eax,%eax
add    $0x40,%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    %rsi,%r12
mov    %edi,%ebx
cmp    $0x1,%edi
jg     118f <main+0x1f>
xor    %eax,%eax
call   1090 <usage@plt>
lea    -0x1(%rbx),%eax
mov    %eax,0x1c(%rsp)
mov    %rbx,0x28(%rsp)
lea    -0x8(,%rbx,8),%ebp
mov    %ebp,%edi
call   1060 <alloca@plt>
mov    %rax,%rbx
mov    %ebp,%edi
call   1060 <alloca@plt>
mov    %rax,%r15
mov    0x8(%r12),%rbp
test   %rbp,%rbp
je     1257 <main+0xe7>
xor    %r14d,%r14d
jmp    120b <main+0x9b>
nopl   0x0(%rax)
movsd  %xmm0,(%r15,%r14,1)
cvttsd2si (%rbx,%r14,1),%eax
mov    0x2dfd(%rip),%rcx
mov    (%rcx),%edi
cvttsd2si %xmm0,%ecx
movsbl %al,%edx
movsbl %cl,%ecx
lea    0xe22(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x10(%r12,%r14,1),%rbp
add    $0x8,%r14
test   %rbp,%rbp
je     1257 <main+0xe7>
mov    %rbp,%rdi
mov    $0x2c,%esi
call   1040 <strchr@plt>
mov    %rax,%r13
mov    %rbp,%rdi
call   1030 <atof@plt>
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rbx,%r14,1)
movsd  0xdcb(%rip),%xmm0
test   %r13,%r13
je     11d0 <main+0x60>
add    $0x1,%r13
mov    %r13,%rdi
call   1030 <atof@plt>
mulss  0xdc2(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
jmp    11d0 <main+0x60>
mov    0x1c(%rsp),%ebp
mov    %rbp,0x30(%rsp)
and    $0xfffffffe,%ebp
xor    %r12d,%r12d
mov    0x28(%rsp),%r14
jmp    12c9 <main+0x159>
nopl   (%rax)
movaps %xmm1,%xmm0
call   1080 <rint@plt>
cmp    $0x7fff,%eax
mov    $0x7fff,%ecx
cmovge %ecx,%eax
cmp    $0xffff8001,%eax
mov    $0xffff8000,%ecx
cmovl  %ecx,%eax
mov    0x2d3f(%rip),%rcx
mov    (%rcx),%edi
movsbl %al,%edx
shr    $0x8,%eax
movsbl %al,%ecx
lea    0xd7c(%rip),%rsi
mov    %edx,%r8d
mov    %ecx,%r9d
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x1,%r12d
cmp    $0x6baa8,%r12d
je     141a <main+0x2aa>
xorps  %xmm1,%xmm1
cmp    $0x2,%r14d
jl     1270 <main+0x100>
xorps  %xmm0,%xmm0
cvtsi2ss %r12d,%xmm0
divss  0xd32(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
cmpl   $0x1,0x1c(%rsp)
movsd  %xmm0,0x20(%rsp)
xorps  %xmm1,%xmm1
jne    1300 <main+0x190>
xor    %r13d,%r13d
jmp    13bc <main+0x24c>
xchg   %ax,%ax
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movss  %xmm1,0x10(%rsp)
movsd  (%r15,%r13,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rbx,%r13,8),%xmm0
mulsd  0x20(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xcce(%rip),%xmm2
mulsd  %xmm2,%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sin@plt>
movss  0x10(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x8(%rsp)
movsd  0x8(%r15,%r13,8),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rbx,%r13,8),%xmm0
mulsd  0x20(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0xc7d(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1070 <sin@plt>
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
add    $0x2,%r13
cmp    %r13,%rbp
jne    1310 <main+0x1a0>
movsd  0x20(%rsp),%xmm0
testb  $0x1,0x30(%rsp)
je     1270 <main+0x100>
movsd  (%r15,%r13,8),%xmm2
movsd  %xmm2,0x8(%rsp)
mulsd  (%rbx,%r13,8),%xmm0
addsd  %xmm0,%xmm0
mulsd  0xc1d(%rip),%xmm0
cvttsd2si %xmm0,%edi
movss  %xmm1,0x10(%rsp)
call   1070 <sin@plt>
movss  0x10(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
jmp    1270 <main+0x100>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"%g Hz, %g amp\0A\00"
@stdout = global i32 0
@.str.1 = [9 x i8] c"%c%c%c%c\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 double*
%9 = alloca double*
%10 = alloca i8*
%11 = alloca float
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @usage()
br label %17
17: ; preds = %15, %2
%18 = load i32, i32* %4
%19 = sub nsw i32 %18, 1
%20 = sext i32 %19 to i64
%21 = mul i64 8, %20
%22 = trunc i64 %21 to i32
%23 = call double* @alloca(i32 %22)
store double* %23, double** %8
%24 = load i32, i32* %4
%25 = sub nsw i32 %24, 1
%26 = sext i32 %25 to i64
%27 = mul i64 8, %26
%28 = trunc i64 %27 to i32
%29 = call double* @alloca(i32 %28)
store double* %29, double** %9
store i32 0, i32* %6
br label %30
30: ; preds = %75, %17
%31 = load i8**, i8*** %5
%32 = load i32, i32* %6
%33 = add nsw i32 %32, 1
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %31, i64 %34
%36 = load i8*, i8** %35
%37 = icmp ne i8* %36, null
br i1 %37, label %38, label %92
38: ; preds = %30
%39 = load i8**, i8*** %5
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %39, i64 %42
%44 = load i8*, i8** %43
%45 = call i8* @strchr(i8* %44, i8 signext 44)
store i8* %45, i8** %10
%46 = load i8**, i8*** %5
%47 = load i32, i32* %6
%48 = add nsw i32 %47, 1
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds i8*, i8** %46, i64 %49
%51 = load i8*, i8** %50
%52 = call float @atof(i8* %51)
%53 = fpext float %52 to double
%54 = load double*, double** %8
%55 = load i32, i32* %6
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %54, i64 %56
store double %53, double* %57
%58 = load i8*, i8** %10
%59 = icmp ne i8* %58, null
br i1 %59, label %60, label %70
60: ; preds = %38
%61 = load i8*, i8** %10
%62 = getelementptr inbounds i8, i8* %61, i64 1
%63 = call float @atof(i8* %62)
%64 = fmul float %63, 3.276700e+04
%65 = fpext float %64 to double
%66 = load double*, double** %9
%67 = load i32, i32* %6
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
store double %65, double* %69
br label %75
70: ; preds = %38
%71 = load double*, double** %9
%72 = load i32, i32* %6
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double, double* %71, i64 %73
store double 3.276700e+04, double* %74
br label %75
75: ; preds = %70, %60
%76 = load i32, i32* @stderr
%77 = load double*, double** %8
%78 = load i32, i32* %6
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds double, double* %77, i64 %79
%81 = load double, double* %80
%82 = fptosi double %81 to i8
%83 = load double*, double** %9
%84 = load i32, i32* %6
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds double, double* %83, i64 %85
%87 = load double, double* %86
%88 = fptosi double %87 to i8
%89 = call i32 (i32, i8*, i8, i8, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 signext %82, i8 signext %88)
%90 = load i32, i32* %6
%91 = add nsw i32 %90, 1
store i32 %91, i32* %6
br label %30
92: ; preds = %30
store i32 0, i32* %6
br label %93
93: ; preds = %160, %92
%94 = load i32, i32* %6
%95 = icmp slt i32 %94, 441000
br i1 %95, label %96, label %163
96: ; preds = %93
store float 0.000000e+00, float* %11
store i32 0, i32* %7
br label %97
97: ; preds = %126, %96
%98 = load i32, i32* %7
%99 = load i32, i32* %4
%100 = sub nsw i32 %99, 1
%101 = icmp slt i32 %98, %100
br i1 %101, label %102, label %129
102: ; preds = %97
%103 = load double*, double** %9
%104 = load i32, i32* %7
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds double, double* %103, i64 %105
%107 = load double, double* %106
%108 = load i32, i32* %6
%109 = sitofp i32 %108 to float
%110 = fdiv float %109, 4.410000e+04
%111 = fpext float %110 to double
%112 = load double*, double** %8
%113 = load i32, i32* %7
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
%116 = load double, double* %115
%117 = fmul double %111, %116
%118 = fmul double %117, 2.000000e+00
%119 = fmul double %118, 0x400921FB54442D18
%120 = fptosi double %119 to i32
%121 = call double @sin(i32 %120)
%122 = load float, float* %11
%123 = fpext float %122 to double
%124 = call double @llvm.fmuladd.f64(double %107, double %121, double %123)
%125 = fptrunc double %124 to float
store float %125, float* %11
br label %126
126: ; preds = %102
%127 = load i32, i32* %7
%128 = add nsw i32 %127, 1
store i32 %128, i32* %7
br label %97
129: ; preds = %97
%130 = load float, float* %11
%131 = call i32 @rint(float %130)
store i32 %131, i32* %12
%132 = load i32, i32* %12
%133 = sitofp i32 %132 to float
%134 = fcmp ogt float %133, 3.276700e+04
br i1 %134, label %135, label %136
135: ; preds = %129
store i32 32767, i32* %12
br label %136
136: ; preds = %135, %129
%137 = load i32, i32* %12
%138 = sitofp i32 %137 to float
%139 = fcmp olt float %138, -3.276800e+04
br i1 %139, label %140, label %141
140: ; preds = %136
store i32 -32768, i32* %12
br label %141
141: ; preds = %140, %136
%142 = load i32, i32* @stdout
%143 = load i32, i32* %12
%144 = and i32 %143, 255
%145 = trunc i32 %144 to i8
%146 = load i32, i32* %12
%147 = ashr i32 %146, 8
%148 = and i32 %147, 255
%149 = trunc i32 %148 to i8
%150 = load i32, i32* %12
%151 = and i32 %150, 255
%152 = trunc i32 %151 to i8
%153 = sext i8 %152 to i32
%154 = load i32, i32* %12
%155 = ashr i32 %154, 8
%156 = and i32 %155, 255
%157 = trunc i32 %156 to i8
%158 = sext i8 %157 to i32
%159 = call i32 (i32, i8*, i8, i8, ...) @fprintf(i32 %142, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8 signext %145, i8 signext %149, i32 %153, i32 %158)
br label %160
160: ; preds = %141
%161 = load i32, i32* %6
%162 = add nsw i32 %161, 1
store i32 %162, i32* %6
br label %93
163: ; preds = %93
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"%g Hz, %g amp\0A\00"
@stdout = global i32 0
@.str.1 = [9 x i8] c"%c%c%c%c\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (...) @usage()
br label %6
6: ; preds = %4, %2
%7 = add nsw i32 %0, -1
%8 = shl i32 %7, 3
%9 = tail call double* @alloca(i32 %8)
%10 = tail call double* @alloca(i32 %8)
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = icmp eq i8* %12, null
br i1 %13, label %14, label %21
14: ; preds = %36, %6
%15 = icmp sgt i32 %0, 1
%16 = zext i32 %7 to i64
%17 = and i64 %16, 1
%18 = icmp eq i32 %7, 1
%19 = and i64 %16, 4294967294
%20 = icmp eq i64 %17, 0
br label %48
21: ; preds = %6, %36
%22 = phi i64 [ %25, %36 ], [ 0, %6 ]
%23 = phi i64 [ %44, %36 ], [ 1, %6 ]
%24 = phi i8* [ %46, %36 ], [ %12, %6 ]
%25 = add nuw nsw i64 %22, 1
%26 = tail call i8* @strchr(i8* %24, i8 signext 44)
%27 = tail call float @atof(i8* %24)
%28 = fpext float %27 to double
%29 = getelementptr inbounds double, double* %9, i64 %22
store double %28, double* %29
%30 = icmp eq i8* %26, null
br i1 %30, label %36, label %31
31: ; preds = %21
%32 = getelementptr inbounds i8, i8* %26, i64 1
%33 = tail call float @atof(i8* %32)
%34 = fmul float %33, 3.276700e+04
%35 = fpext float %34 to double
br label %36
36: ; preds = %21, %31
%37 = phi double [ %35, %31 ], [ 3.276700e+04, %21 ]
%38 = getelementptr inbounds double, double* %10, i64 %22
store double %37, double* %38
%39 = load i32, i32* @stderr
%40 = load double, double* %29
%41 = fptosi double %40 to i8
%42 = fptosi double %37 to i8
%43 = tail call i32 (i32, i8*, i8, i8, ...) @fprintf(i32 %39, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8 signext %41, i8 signext %42)
%44 = add nuw i64 %23, 1
%45 = getelementptr inbounds i8*, i8** %1, i64 %44
%46 = load i8*, i8** %45
%47 = icmp eq i8* %46, null
br i1 %47, label %14, label %21
48: ; preds = %14, %103
%49 = phi i32 [ 0, %14 ], [ %119, %103 ]
br i1 %15, label %50, label %103
50: ; preds = %48
%51 = sitofp i32 %49 to float
%52 = fdiv float %51, 4.410000e+04
%53 = fpext float %52 to double
br i1 %18, label %86, label %54
54: ; preds = %50, %54
%55 = phi i64 [ %83, %54 ], [ 0, %50 ]
%56 = phi float [ %82, %54 ], [ 0.000000e+00, %50 ]
%57 = phi i64 [ %84, %54 ], [ 0, %50 ]
%58 = getelementptr inbounds double, double* %10, i64 %55
%59 = load double, double* %58
%60 = getelementptr inbounds double, double* %9, i64 %55
%61 = load double, double* %60
%62 = fmul double %61, %53
%63 = fmul double %62, 2.000000e+00
%64 = fmul double %63, 0x400921FB54442D18
%65 = fptosi double %64 to i32
%66 = tail call double @sin(i32 %65)
%67 = fpext float %56 to double
%68 = tail call double @llvm.fmuladd.f64(double %59, double %66, double %67)
%69 = fptrunc double %68 to float
%70 = or i64 %55, 1
%71 = getelementptr inbounds double, double* %10, i64 %70
%72 = load double, double* %71
%73 = getelementptr inbounds double, double* %9, i64 %70
%74 = load double, double* %73
%75 = fmul double %74, %53
%76 = fmul double %75, 2.000000e+00
%77 = fmul double %76, 0x400921FB54442D18
%78 = fptosi double %77 to i32
%79 = tail call double @sin(i32 %78)
%80 = fpext float %69 to double
%81 = tail call double @llvm.fmuladd.f64(double %72, double %79, double %80)
%82 = fptrunc double %81 to float
%83 = add nuw nsw i64 %55, 2
%84 = add i64 %57, 2
%85 = icmp eq i64 %84, %19
br i1 %85, label %86, label %54
86: ; preds = %54, %50
%87 = phi float [ undef, %50 ], [ %82, %54 ]
%88 = phi i64 [ 0, %50 ], [ %83, %54 ]
%89 = phi float [ 0.000000e+00, %50 ], [ %82, %54 ]
br i1 %20, label %103, label %90
90: ; preds = %86
%91 = getelementptr inbounds double, double* %10, i64 %88
%92 = load double, double* %91
%93 = getelementptr inbounds double, double* %9, i64 %88
%94 = load double, double* %93
%95 = fmul double %94, %53
%96 = fmul double %95, 2.000000e+00
%97 = fmul double %96, 0x400921FB54442D18
%98 = fptosi double %97 to i32
%99 = tail call double @sin(i32 %98)
%100 = fpext float %89 to double
%101 = tail call double @llvm.fmuladd.f64(double %92, double %99, double %100)
%102 = fptrunc double %101 to float
br label %103
103: ; preds = %90, %86, %48
%104 = phi float [ 0.000000e+00, %48 ], [ %87, %86 ], [ %102, %90 ]
%105 = tail call i32 @rint(float %104)
%106 = icmp slt i32 %105, 32767
%107 = select i1 %106, i32 %105, i32 32767
%108 = icmp sgt i32 %107, -32768
%109 = select i1 %108, i32 %107, i32 -32768
%110 = load i32, i32* @stdout
%111 = trunc i32 %109 to i8
%112 = lshr i32 %109, 8
%113 = trunc i32 %112 to i8
%114 = shl i32 %109, 24
%115 = ashr exact i32 %114, 24
%116 = shl i32 %112, 24
%117 = ashr exact i32 %116, 24
%118 = tail call i32 (i32, i8*, i8, i8, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8 signext %111, i8 signext %113, i32 %115, i32 %117)
%119 = add nuw nsw i32 %49, 1
%120 = icmp eq i32 %119, 441000
br i1 %120, label %121, label %48
121: ; preds = %103
ret i32 0
}