#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
double cos(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(short **, int, int, int /*<<< orphan*/ *);
int sin(int);
void main() {
  int i, j;
  double temp;
  short data[256 + 2];
  FILE *fd;
  fd = fopen("halfwave.raw", "wb");
  for (i = 0; i < 256 / 2; i++)
    data[i] = 32767 * sin(i * 2 * 3.14159265358979323846 / (double)256);
  for (i = 256 / 2; i < 256; i++)
    data[i] = 0;
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("sinewave.raw", "wb");
  for (i = 256 / 2; i < 256; i++)
    data[i] = 32767 * sin(i * 2 * 3.14159265358979323846 / (double)256);
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("sineblnk.raw", "wb");
  for (i = 0; i < 256 / 2; i++)
    data[i] = data[2 * i];
  for (i = 256 / 2; i < 256; i++)
    data[i] = 0;
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("fwavblnk.raw", "wb");
  for (i = 0; i < 256 / 4; i++)
    data[i + 256 / 4] = data[i];
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("snglpeak.raw", "wb");
  for (i = 0; i <= 256 / 4; i++)
    data[i] = 32767 * (1.0 - cos(i * 2 * 3.14159265358979323846 / (double)256));
  for (i = 0; i <= 256 / 4; i++)
    data[256 / 2 - i] = data[i];
  for (i = 256 / 2; i < 256; i++)
    data[i] = 0;
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("twopeaks.raw", "wb");
  for (i = 0; i <= 256 / 2; i++) {
    data[256 / 2 + i] = -data[i];
  }
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("peksblnk.raw", "wb");
  for (i = 0; i <= 256 / 2; i++)
    data[i] = data[i * 2];
  for (i = 256 / 2; i < 256; i++)
    data[i] = 0;
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("ppksblnk.raw", "wb");
  for (i = 0; i <= 256 / 4; i++)
    data[i + 256 / 4] = data[i];
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("impuls10.raw", "wb");
  for (i = 0; i < 256; i++) {
    temp = 0.0;
    for (j = 1; j <= 10; j++)
      temp += cos(i * j * 2 * 3.14159265358979323846 / (double)256);
    data[i] = 32767 / 10.0 * temp;
  }
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("impuls20.raw", "wb");
  for (i = 0; i < 256; i++) {
    temp = 0.0;
    for (j = 1; j <= 20; j++)
      temp += cos(i * j * 2 * 3.14159265358979323846 / (double)256);
    data[i] = 32767 / 20.0 * temp;
  }
  fwrite(&data, 2, 256, fd);
  fclose(fd);
  fd = fopen("impuls40.raw", "wb");
  for (i = 0; i < 256; i++) {
    temp = 0.0;
    for (j = 1; j <= 40; j++)
      temp += cos(i * j * 2 * 3.14159265358979323846 / (double)256);
    data[i] = 32767 / 40.0 * temp;
  }
  fwrite(&data, 2, 256, fd);
  fclose(fd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
lea    0xed6(%rip),%rdi
lea    0xedc(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jge    11d7 <main+0x87>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe75(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe61(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
imul   $0x7fff,%eax,%eax
mov    %ax,%cx
movslq -0x4(%rbp),%rax
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    117c <main+0x2c>
movl   $0x80,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1207 <main+0xb7>
movslq -0x4(%rbp),%rax
movw   $0x0,-0x220(%rbp,%rax,2)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11de <main+0x8e>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xe11(%rip),%rdi
lea    0xe07(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x80,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    12ac <main+0x15c>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xda0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd8c(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
imul   $0x7fff,%eax,%eax
mov    %ax,%cx
movslq -0x4(%rbp),%rax
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1251 <main+0x101>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xd79(%rip),%rdi
lea    0xd62(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jge    132d <main+0x1dd>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
mov    -0x220(%rbp,%rax,2),%cx
ff
movslq -0x4(%rbp),%rax
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    12f6 <main+0x1a6>
movl   $0x80,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    135d <main+0x20d>
movslq -0x4(%rbp),%rax
movw   $0x0,-0x220(%rbp,%rax,2)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1334 <main+0x1e4>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xcd5(%rip),%rdi
lea    0xcb1(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    13db <main+0x28b>
movslq -0x4(%rbp),%rax
mov    -0x220(%rbp,%rax,2),%cx
ff
mov    -0x4(%rbp),%eax
add    $0x40,%eax
cltq
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    13a7 <main+0x257>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xc64(%rip),%rdi
lea    0xc33(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jg     1495 <main+0x345>
mov    -0x4(%rbp),%eax
add    %eax,%eax
cvtsi2sd %eax,%xmm0
movsd  0xbd0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xbbc(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xbc4(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xbc0(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,%cx
movslq -0x4(%rbp),%rax
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1425 <main+0x2d5>
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jg     14d2 <main+0x382>
movslq -0x4(%rbp),%rax
mov    -0x220(%rbp,%rax,2),%cx
ff
mov    $0x80,%eax
sub    -0x4(%rbp),%eax
cltq
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    149c <main+0x34c>
movl   $0x80,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1502 <main+0x3b2>
movslq -0x4(%rbp),%rax
movw   $0x0,-0x220(%rbp,%rax,2)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    14d9 <main+0x389>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xb4a(%rip),%rdi
lea    0xb0c(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jg     158c <main+0x43c>
movslq -0x4(%rbp),%rax
movswl -0x220(%rbp,%rax,2),%ecx
ff
xor    %eax,%eax
sub    %ecx,%eax
mov    %ax,%cx
mov    -0x4(%rbp),%eax
add    $0x80,%eax
cltq
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    154c <main+0x3fc>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xacd(%rip),%rdi
lea    0xa82(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jg     160d <main+0x4bd>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltq
mov    -0x220(%rbp,%rax,2),%cx
ff
movslq -0x4(%rbp),%rax
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    15d6 <main+0x486>
movl   $0x80,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    163d <main+0x4ed>
movslq -0x4(%rbp),%rax
movw   $0x0,-0x220(%rbp,%rax,2)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1614 <main+0x4c4>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xa29(%rip),%rdi
lea    0x9d1(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jg     16bb <main+0x56b>
movslq -0x4(%rbp),%rax
mov    -0x220(%rbp,%rax,2),%cx
ff
mov    -0x4(%rbp),%eax
add    $0x40,%eax
cltq
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1687 <main+0x537>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0x9b8(%rip),%rdi
lea    0x953(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    17a4 <main+0x654>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jg     1772 <main+0x622>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0x8cf(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x8bb(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1721 <main+0x5d1>
movsd  -0x10(%rbp),%xmm0
movsd  0x8a1(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,%cx
movslq -0x4(%rbp),%rax
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1705 <main+0x5b5>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0x8dc(%rip),%rdi
lea    0x86a(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    188d <main+0x73d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     185b <main+0x70b>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0x7e6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x7d2(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    180a <main+0x6ba>
movsd  -0x10(%rbp),%xmm0
movsd  0x7b0(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,%cx
movslq -0x4(%rbp),%rax
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    17ee <main+0x69e>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
lea    0x800(%rip),%rdi
lea    0x781(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x228(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1976 <main+0x826>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x28,-0x8(%rbp)
jg     1944 <main+0x7f4>
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0x6fd(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x6e9(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    18f3 <main+0x7a3>
movsd  -0x10(%rbp),%xmm0
movsd  0x6af(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,%cx
movslq -0x4(%rbp),%rax
mov    %cx,-0x220(%rbp,%rax,2)
ff
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    18d7 <main+0x787>
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rcx
mov    $0x2,%esi
mov    $0x100,%edx
call   1070 <fwrite@plt>
mov    -0x228(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x248,%rsp
lea    0xed8(%rip),%rdi
lea    0xede(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  0xe71(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe6d(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mov    %eax,%ecx
shl    $0xf,%ecx
sub    %eax,%ecx
mov    %cx,0x40(%rsp,%rbp,1)
lea    0x2(%rbp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe3a(%rip),%xmm0
mulsd  0xe3a(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mov    %eax,%ecx
shl    $0xf,%ecx
sub    %eax,%ecx
mov    %cx,0x42(%rsp,%rbp,1)
add    $0x4,%rbp
cmp    $0x100,%rbp
jne    1180 <main+0x30>
lea    0x140(%rsp),%r12
xorpd  %xmm0,%xmm0
movapd %xmm0,0x230(%rsp)
movapd %xmm0,0x220(%rsp)
movapd %xmm0,0x210(%rsp)
movapd %xmm0,0x200(%rsp)
movapd %xmm0,0x1f0(%rsp)
movapd %xmm0,0x1e0(%rsp)
movapd %xmm0,0x1d0(%rsp)
movapd %xmm0,0x1c0(%rsp)
movapd %xmm0,0x1b0(%rsp)
movapd %xmm0,0x1a0(%rsp)
movapd %xmm0,0x190(%rsp)
movapd %xmm0,0x180(%rsp)
movapd %xmm0,0x170(%rsp)
movapd %xmm0,0x160(%rsp)
movapd %xmm0,0x150(%rsp)
movapd %xmm0,0x140(%rsp)
lea    0x40(%rsp),%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xd9e(%rip),%rdi
lea    0xd94(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r14
mov    $0x102,%ebp
mov    $0x100,%ebx
nopl   0x0(%rax,%rax,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  0xd21(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd1d(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mov    %eax,%ecx
shl    $0xf,%ecx
sub    %eax,%ecx
mov    %cx,0x40(%rsp,%rbx,1)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xced(%rip),%xmm0
mulsd  0xced(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mov    %eax,%ecx
shl    $0xf,%ecx
sub    %eax,%ecx
mov    %cx,0x42(%rsp,%rbx,1)
add    $0x4,%ebp
add    $0x4,%rbx
cmp    $0x200,%rbx
jne    12d0 <main+0x180>
lea    0x40(%rsp),%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    %r14,%rcx
call   1070 <fwrite@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
lea    0xcf7(%rip),%rdi
lea    0xce0(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    $0x3,%eax
nopw   0x0(%rax,%rax,1)
movzwl 0x34(%rsp,%rax,4),%ecx
mov    %cx,0x3a(%rsp,%rax,2)
movzwl 0x38(%rsp,%rax,4),%ecx
mov    %cx,0x3c(%rsp,%rax,2)
movzwl 0x3c(%rsp,%rax,4),%ecx
mov    %cx,0x3e(%rsp,%rax,2)
movzwl 0x40(%rsp,%rax,4),%ecx
mov    %cx,0x40(%rsp,%rax,2)
add    $0x4,%rax
cmp    $0x83,%rax
jne    1380 <main+0x230>
xorpd  %xmm0,%xmm0
movapd %xmm0,0xf0(%r12)
movapd %xmm0,0xe0(%r12)
movapd %xmm0,0xd0(%r12)
movapd %xmm0,0xc0(%r12)
movapd %xmm0,0xb0(%r12)
movapd %xmm0,0xa0(%r12)
movapd %xmm0,0x90(%r12)
movapd %xmm0,0x80(%r12)
movapd %xmm0,0x70(%r12)
movapd %xmm0,0x60(%r12)
movapd %xmm0,0x50(%r12)
movapd %xmm0,0x40(%r12)
movapd %xmm0,0x30(%r12)
movapd %xmm0,0x20(%r12)
movapd %xmm0,0x10(%r12)
movapd %xmm0,(%r12)
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xc02(%rip),%rdi
lea    0xbde(%rip),%r15
mov    %r15,%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
movaps 0x40(%rsp),%xmm0
movapd 0x50(%rsp),%xmm1
movaps 0x60(%rsp),%xmm2
movaps 0x70(%rsp),%xmm3
movaps %xmm0,0xc0(%rsp)
movapd %xmm1,0xd0(%rsp)
movaps %xmm2,0xe0(%rsp)
movaps %xmm3,0xf0(%rsp)
movaps 0x80(%rsp),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0x90(%rsp),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xa0(%rsp),%xmm0
movaps %xmm0,0x120(%rsp)
movapd 0xb0(%rsp),%xmm0
movapd %xmm0,0x130(%rsp)
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    %rax,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xb61(%rip),%rdi
mov    %r15,%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0xac1(%rip),%xmm0
mulsd  0xac1(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  0xab8(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xab4(%rip),%xmm1
cvttsd2si %xmm1,%eax
mov    %ax,0x40(%rsp,%rbp,1)
cmp    $0x80,%rbp
je     15bf <main+0x46f>
lea    0x2(%rbp),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xa78(%rip),%xmm0
mulsd  0xa78(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  0xa6f(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xa6b(%rip),%xmm1
cvttsd2si %xmm1,%eax
mov    %ax,0x42(%rsp,%rbp,1)
add    $0x4,%rbp
jmp    1530 <main+0x3e0>
mov    $0x4,%eax
mov    %r12,%rcx
nopw   0x0(%rax,%rax,1)
movzwl 0x38(%rsp,%rax,2),%edx
mov    %dx,(%rcx)
movzwl 0x3a(%rsp,%rax,2),%edx
mov    %dx,-0x2(%rcx)
movzwl 0x3c(%rsp,%rax,2),%edx
mov    %dx,-0x4(%rcx)
movzwl 0x3e(%rsp,%rax,2),%edx
mov    %dx,-0x6(%rcx)
movzwl 0x40(%rsp,%rax,2),%edx
mov    %dx,-0x8(%rcx)
add    $0x5,%rax
add    $0xfffffffffffffff6,%rcx
cmp    $0x45,%rax
jne    15d0 <main+0x480>
xorpd  %xmm0,%xmm0
movapd %xmm0,0xf0(%r12)
movapd %xmm0,0xe0(%r12)
movapd %xmm0,0xd0(%r12)
movapd %xmm0,0xc0(%r12)
movapd %xmm0,0xb0(%r12)
movapd %xmm0,0xa0(%r12)
movapd %xmm0,0x90(%r12)
movapd %xmm0,0x80(%r12)
movapd %xmm0,0x70(%r12)
movapd %xmm0,0x60(%r12)
movapd %xmm0,0x50(%r12)
movapd %xmm0,0x40(%r12)
movapd %xmm0,0x30(%r12)
movapd %xmm0,0x20(%r12)
movapd %xmm0,0x10(%r12)
movapd %xmm0,(%r12)
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0x9c6(%rip),%rdi
lea    0x988(%rip),%r15
mov    %r15,%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
xorpd  %xmm0,%xmm0
psubw  0x40(%rsp),%xmm0
movdqa %xmm0,0x140(%rsp)
pxor   %xmm0,%xmm0
psubw  0x50(%rsp),%xmm0
movdqa %xmm0,0x150(%rsp)
pxor   %xmm0,%xmm0
psubw  0x60(%rsp),%xmm0
movdqa %xmm0,0x160(%rsp)
pxor   %xmm0,%xmm0
psubw  0x70(%rsp),%xmm0
movdqa %xmm0,0x170(%rsp)
pxor   %xmm0,%xmm0
psubw  0x80(%rsp),%xmm0
movdqa %xmm0,0x180(%rsp)
pxor   %xmm0,%xmm0
psubw  0x90(%rsp),%xmm0
movdqa %xmm0,0x190(%rsp)
pxor   %xmm0,%xmm0
psubw  0xa0(%rsp),%xmm0
movdqa %xmm0,0x1a0(%rsp)
pxor   %xmm0,%xmm0
psubw  0xb0(%rsp),%xmm0
movdqa %xmm0,0x1b0(%rsp)
pxor   %xmm0,%xmm0
psubw  0xc0(%rsp),%xmm0
movdqa %xmm0,0x1c0(%rsp)
pxor   %xmm0,%xmm0
psubw  0xd0(%rsp),%xmm0
movdqa %xmm0,0x1d0(%rsp)
pxor   %xmm0,%xmm0
psubw  0xe0(%rsp),%xmm0
movdqa %xmm0,0x1e0(%rsp)
pxor   %xmm0,%xmm0
psubw  0xf0(%rsp),%xmm0
movdqa %xmm0,0x1f0(%rsp)
pxor   %xmm0,%xmm0
psubw  0x100(%rsp),%xmm0
movdqa %xmm0,0x200(%rsp)
pxor   %xmm0,%xmm0
psubw  0x110(%rsp),%xmm0
movdqa %xmm0,0x210(%rsp)
pxor   %xmm0,%xmm0
psubw  0x120(%rsp),%xmm0
movdqa %xmm0,0x220(%rsp)
pxor   %xmm0,%xmm0
psubw  0x130(%rsp),%xmm0
movdqa %xmm0,0x230(%rsp)
xor    %eax,%eax
sub    0x140(%rsp),%ax
mov    %ax,0x240(%rsp)
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0x837(%rip),%rdi
mov    %r15,%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    $0x2,%eax
nopw   0x0(%rax,%rax,1)
movzwl 0x38(%rsp,%rax,4),%ecx
mov    %cx,0x3c(%rsp,%rax,2)
movzwl 0x3c(%rsp,%rax,4),%ecx
mov    %cx,0x3e(%rsp,%rax,2)
movzwl 0x40(%rsp,%rax,4),%ecx
mov    %cx,0x40(%rsp,%rax,2)
add    $0x3,%rax
cmp    $0x83,%rax
jne    1870 <main+0x720>
pxor   %xmm0,%xmm0
movdqa %xmm0,0xf0(%r12)
movdqa %xmm0,0xe0(%r12)
movdqa %xmm0,0xd0(%r12)
movdqa %xmm0,0xc0(%r12)
movdqa %xmm0,0xb0(%r12)
movdqa %xmm0,0xa0(%r12)
movdqa %xmm0,0x90(%r12)
movdqa %xmm0,0x80(%r12)
movdqa %xmm0,0x70(%r12)
movdqa %xmm0,0x60(%r12)
movdqa %xmm0,0x50(%r12)
movdqa %xmm0,0x40(%r12)
movdqa %xmm0,0x30(%r12)
movdqa %xmm0,0x20(%r12)
movdqa %xmm0,0x10(%r12)
movdqa %xmm0,(%r12)
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0x750(%rip),%rdi
lea    0x6f8(%rip),%r15
mov    %r15,%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
movaps 0x40(%rsp),%xmm0
movapd 0x50(%rsp),%xmm1
movaps 0x60(%rsp),%xmm2
movaps 0x70(%rsp),%xmm3
movaps %xmm0,0xc0(%rsp)
movapd %xmm1,0xd0(%rsp)
movaps %xmm2,0xe0(%rsp)
movaps %xmm3,0xf0(%rsp)
movaps 0x80(%rsp),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0x90(%rsp),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xa0(%rsp),%xmm0
movaps %xmm0,0x120(%rsp)
movapd 0xb0(%rsp),%xmm0
movapd %xmm0,0x130(%rsp)
movzwl 0xc0(%rsp),%eax
mov    %ax,0x140(%rsp)
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0x69f(%rip),%rdi
mov    %r15,%rsi
call   1060 <fopen@plt>
mov    %rax,0x30(%rsp)
xor    %ebx,%ebx
xor    %r14d,%r14d
xor    %ebp,%ebp
xor    %r15d,%r15d
movl   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0x20(%rsp)
movl   $0x0,0x1c(%rsp)
movl   $0x0,0x18(%rsp)
xor    %r12d,%r12d
xchg   %ax,%ax
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
movsd  0x5a0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x59c(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  0x5b7(%rip),%xmm0
movsd  %xmm0,(%rsp)
mov    %rbx,0x38(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x566(%rip),%xmm0
mulsd  0x566(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r14d,0x2c(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0x536(%rip),%xmm0
mulsd  0x536(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %ebp,0x28(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0x508(%rip),%xmm0
mulsd  0x508(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %r15d,0x24(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
mulsd  0x4d8(%rip),%xmm0
mulsd  0x4d8(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    0x8(%rsp),%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
mulsd  0x4aa(%rip),%xmm0
mulsd  0x4aa(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    0x10(%rsp),%r13d
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
mulsd  0x47a(%rip),%xmm0
mulsd  0x47a(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    0x20(%rsp),%ebp
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
mulsd  0x44c(%rip),%xmm0
mulsd  0x44c(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    0x1c(%rsp),%r14d
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0x41c(%rip),%xmm0
mulsd  0x41c(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    0x18(%rsp),%r15d
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
mulsd  0x3ec(%rip),%xmm0
mulsd  0x3ec(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
mulsd  0x3ee(%rip),%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,0x40(%rsp,%r12,1)
add    $0x2,%r12
add    $0x14,%r15d
mov    %r15d,0x18(%rsp)
add    $0x12,%r14d
mov    %r14d,0x1c(%rsp)
add    $0x10,%ebp
mov    %ebp,0x20(%rsp)
add    $0xe,%r13d
mov    %r13d,0x10(%rsp)
add    $0xc,%ebx
mov    %ebx,0x8(%rsp)
mov    0x24(%rsp),%r15d
add    $0xa,%r15d
mov    0x28(%rsp),%ebp
add    $0x8,%ebp
mov    0x2c(%rsp),%r14d
add    $0x6,%r14d
mov    0x38(%rsp),%rbx
add    $0x4,%ebx
cmp    $0x200,%r12
jne    1a50 <main+0x900>
lea    0x40(%rsp),%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    0x30(%rsp),%rbx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0x3f6(%rip),%rdi
lea    0x384(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,0x10(%rsp)
xor    %r15d,%r15d
xor    %r14d,%r14d
xor    %r12d,%r12d
nopl   0x0(%rax)
xorpd  %xmm0,%xmm0
mov    $0x14,%ebp
mov    %r15d,%ebx
mov    %r14d,%r13d
nop
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  0x2fb(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x2f7(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
mulsd  0x2c6(%rip),%xmm0
mulsd  0x2c6(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  0x8(%rsp),%xmm0
add    %r14d,%r13d
add    %r14d,%ebx
add    $0xfffffffe,%ebp
jne    1cf0 <main+0xba0>
mulsd  0x2c4(%rip),%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,0x40(%rsp,%r12,2)
add    $0x1,%r12
add    $0x4,%r14d
add    $0x2,%r15d
cmp    $0x100,%r12
jne    1ce0 <main+0xb90>
lea    0x40(%rsp),%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    0x10(%rsp),%rbx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0x313(%rip),%rdi
lea    0x294(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,0x10(%rsp)
xor    %r15d,%r15d
xor    %r14d,%r14d
xor    %r12d,%r12d
nopl   0x0(%rax)
xorpd  %xmm0,%xmm0
mov    $0x28,%ebp
mov    %r15d,%ebx
mov    %r14d,%r13d
nop
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  0x20b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x207(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
mulsd  0x1d6(%rip),%xmm0
mulsd  0x1d6(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
addsd  0x8(%rsp),%xmm0
add    %r14d,%r13d
add    %r14d,%ebx
add    $0xfffffffe,%ebp
jne    1de0 <main+0xc90>
mulsd  0x1dc(%rip),%xmm0
cvttsd2si %xmm0,%eax
mov    %ax,0x40(%rsp,%r12,2)
add    $0x1,%r12
add    $0x4,%r14d
add    $0x2,%r15d
cmp    $0x100,%r12
jne    1dd0 <main+0xc80>
lea    0x40(%rsp),%rdi
mov    $0x2,%esi
mov    $0x100,%edx
mov    0x10(%rsp),%rbx
mov    %rbx,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
add    $0x248,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"halfwave.raw\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [13 x i8] c"sinewave.raw\00"
@.str.3 = [13 x i8] c"sineblnk.raw\00"
@.str.4 = [13 x i8] c"fwavblnk.raw\00"
@.str.5 = [13 x i8] c"snglpeak.raw\00"
@.str.6 = [13 x i8] c"twopeaks.raw\00"
@.str.7 = [13 x i8] c"peksblnk.raw\00"
@.str.8 = [13 x i8] c"ppksblnk.raw\00"
@.str.9 = [13 x i8] c"impuls10.raw\00"
@.str.10 = [13 x i8] c"impuls20.raw\00"
@.str.11 = [13 x i8] c"impuls40.raw\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca [258 x i16]
%5 = alloca i32*
%6 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %6, i32** %5
store i32 0, i32* %1
br label %7
7: ; preds = %23, %0
%8 = load i32, i32* %1
%9 = icmp slt i32 %8, 128
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load i32, i32* %1
%12 = mul nsw i32 %11, 2
%13 = sitofp i32 %12 to double
%14 = fmul double %13, 0x400921FB54442D18
%15 = fdiv double %14, 2.560000e+02
%16 = fptosi double %15 to i32
%17 = call i32 @sin(i32 %16)
%18 = mul nsw i32 32767, %17
%19 = trunc i32 %18 to i16
%20 = load i32, i32* %1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %21
store i16 %19, i16* %22
br label %23
23: ; preds = %10
%24 = load i32, i32* %1
%25 = add nsw i32 %24, 1
store i32 %25, i32* %1
br label %7
26: ; preds = %7
store i32 128, i32* %1
br label %27
27: ; preds = %34, %26
%28 = load i32, i32* %1
%29 = icmp slt i32 %28, 256
br i1 %29, label %30, label %37
30: ; preds = %27
%31 = load i32, i32* %1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %32
store i16 0, i16* %33
br label %34
34: ; preds = %30
%35 = load i32, i32* %1
%36 = add nsw i32 %35, 1
store i32 %36, i32* %1
br label %27
37: ; preds = %27
%38 = bitcast [258 x i16]* %4 to i16**
%39 = load i32*, i32** %5
%40 = call i32 @fwrite(i16** %38, i32 2, i32 256, i32* %39)
%41 = load i32*, i32** %5
%42 = call i32 @fclose(i32* %41)
%43 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %43, i32** %5
store i32 128, i32* %1
br label %44
44: ; preds = %60, %37
%45 = load i32, i32* %1
%46 = icmp slt i32 %45, 256
br i1 %46, label %47, label %63
47: ; preds = %44
%48 = load i32, i32* %1
%49 = mul nsw i32 %48, 2
%50 = sitofp i32 %49 to double
%51 = fmul double %50, 0x400921FB54442D18
%52 = fdiv double %51, 2.560000e+02
%53 = fptosi double %52 to i32
%54 = call i32 @sin(i32 %53)
%55 = mul nsw i32 32767, %54
%56 = trunc i32 %55 to i16
%57 = load i32, i32* %1
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %58
store i16 %56, i16* %59
br label %60
60: ; preds = %47
%61 = load i32, i32* %1
%62 = add nsw i32 %61, 1
store i32 %62, i32* %1
br label %44
63: ; preds = %44
%64 = bitcast [258 x i16]* %4 to i16**
%65 = load i32*, i32** %5
%66 = call i32 @fwrite(i16** %64, i32 2, i32 256, i32* %65)
%67 = load i32*, i32** %5
%68 = call i32 @fclose(i32* %67)
%69 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %69, i32** %5
store i32 0, i32* %1
br label %70
70: ; preds = %82, %63
%71 = load i32, i32* %1
%72 = icmp slt i32 %71, 128
br i1 %72, label %73, label %85
73: ; preds = %70
%74 = load i32, i32* %1
%75 = mul nsw i32 2, %74
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %76
%78 = load i16, i16* %77
%79 = load i32, i32* %1
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %80
store i16 %78, i16* %81
br label %82
82: ; preds = %73
%83 = load i32, i32* %1
%84 = add nsw i32 %83, 1
store i32 %84, i32* %1
br label %70
85: ; preds = %70
store i32 128, i32* %1
br label %86
86: ; preds = %93, %85
%87 = load i32, i32* %1
%88 = icmp slt i32 %87, 256
br i1 %88, label %89, label %96
89: ; preds = %86
%90 = load i32, i32* %1
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %91
store i16 0, i16* %92
br label %93
93: ; preds = %89
%94 = load i32, i32* %1
%95 = add nsw i32 %94, 1
store i32 %95, i32* %1
br label %86
96: ; preds = %86
%97 = bitcast [258 x i16]* %4 to i16**
%98 = load i32*, i32** %5
%99 = call i32 @fwrite(i16** %97, i32 2, i32 256, i32* %98)
%100 = load i32*, i32** %5
%101 = call i32 @fclose(i32* %100)
%102 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %102, i32** %5
store i32 0, i32* %1
br label %103
103: ; preds = %115, %96
%104 = load i32, i32* %1
%105 = icmp slt i32 %104, 64
br i1 %105, label %106, label %118
106: ; preds = %103
%107 = load i32, i32* %1
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %108
%110 = load i16, i16* %109
%111 = load i32, i32* %1
%112 = add nsw i32 %111, 64
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %113
store i16 %110, i16* %114
br label %115
115: ; preds = %106
%116 = load i32, i32* %1
%117 = add nsw i32 %116, 1
store i32 %117, i32* %1
br label %103
118: ; preds = %103
%119 = bitcast [258 x i16]* %4 to i16**
%120 = load i32*, i32** %5
%121 = call i32 @fwrite(i16** %119, i32 2, i32 256, i32* %120)
%122 = load i32*, i32** %5
%123 = call i32 @fclose(i32* %122)
%124 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %124, i32** %5
store i32 0, i32* %1
br label %125
125: ; preds = %142, %118
%126 = load i32, i32* %1
%127 = icmp sle i32 %126, 64
br i1 %127, label %128, label %145
128: ; preds = %125
%129 = load i32, i32* %1
%130 = mul nsw i32 %129, 2
%131 = sitofp i32 %130 to double
%132 = fmul double %131, 0x400921FB54442D18
%133 = fdiv double %132, 2.560000e+02
%134 = fptosi double %133 to i32
%135 = call double @cos(i32 %134)
%136 = fsub double 1.000000e+00, %135
%137 = fmul double 3.276700e+04, %136
%138 = fptosi double %137 to i16
%139 = load i32, i32* %1
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %140
store i16 %138, i16* %141
br label %142
142: ; preds = %128
%143 = load i32, i32* %1
%144 = add nsw i32 %143, 1
store i32 %144, i32* %1
br label %125
145: ; preds = %125
store i32 0, i32* %1
br label %146
146: ; preds = %158, %145
%147 = load i32, i32* %1
%148 = icmp sle i32 %147, 64
br i1 %148, label %149, label %161
149: ; preds = %146
%150 = load i32, i32* %1
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %151
%153 = load i16, i16* %152
%154 = load i32, i32* %1
%155 = sub nsw i32 128, %154
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %156
store i16 %153, i16* %157
br label %158
158: ; preds = %149
%159 = load i32, i32* %1
%160 = add nsw i32 %159, 1
store i32 %160, i32* %1
br label %146
161: ; preds = %146
store i32 128, i32* %1
br label %162
162: ; preds = %169, %161
%163 = load i32, i32* %1
%164 = icmp slt i32 %163, 256
br i1 %164, label %165, label %172
165: ; preds = %162
%166 = load i32, i32* %1
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %167
store i16 0, i16* %168
br label %169
169: ; preds = %165
%170 = load i32, i32* %1
%171 = add nsw i32 %170, 1
store i32 %171, i32* %1
br label %162
172: ; preds = %162
%173 = bitcast [258 x i16]* %4 to i16**
%174 = load i32*, i32** %5
%175 = call i32 @fwrite(i16** %173, i32 2, i32 256, i32* %174)
%176 = load i32*, i32** %5
%177 = call i32 @fclose(i32* %176)
%178 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %178, i32** %5
store i32 0, i32* %1
br label %179
179: ; preds = %194, %172
%180 = load i32, i32* %1
%181 = icmp sle i32 %180, 128
br i1 %181, label %182, label %197
182: ; preds = %179
%183 = load i32, i32* %1
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %184
%186 = load i16, i16* %185
%187 = sext i16 %186 to i32
%188 = sub nsw i32 0, %187
%189 = trunc i32 %188 to i16
%190 = load i32, i32* %1
%191 = add nsw i32 128, %190
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %192
store i16 %189, i16* %193
br label %194
194: ; preds = %182
%195 = load i32, i32* %1
%196 = add nsw i32 %195, 1
store i32 %196, i32* %1
br label %179
197: ; preds = %179
%198 = bitcast [258 x i16]* %4 to i16**
%199 = load i32*, i32** %5
%200 = call i32 @fwrite(i16** %198, i32 2, i32 256, i32* %199)
%201 = load i32*, i32** %5
%202 = call i32 @fclose(i32* %201)
%203 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %203, i32** %5
store i32 0, i32* %1
br label %204
204: ; preds = %216, %197
%205 = load i32, i32* %1
%206 = icmp sle i32 %205, 128
br i1 %206, label %207, label %219
207: ; preds = %204
%208 = load i32, i32* %1
%209 = mul nsw i32 %208, 2
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %210
%212 = load i16, i16* %211
%213 = load i32, i32* %1
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %214
store i16 %212, i16* %215
br label %216
216: ; preds = %207
%217 = load i32, i32* %1
%218 = add nsw i32 %217, 1
store i32 %218, i32* %1
br label %204
219: ; preds = %204
store i32 128, i32* %1
br label %220
220: ; preds = %227, %219
%221 = load i32, i32* %1
%222 = icmp slt i32 %221, 256
br i1 %222, label %223, label %230
223: ; preds = %220
%224 = load i32, i32* %1
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %225
store i16 0, i16* %226
br label %227
227: ; preds = %223
%228 = load i32, i32* %1
%229 = add nsw i32 %228, 1
store i32 %229, i32* %1
br label %220
230: ; preds = %220
%231 = bitcast [258 x i16]* %4 to i16**
%232 = load i32*, i32** %5
%233 = call i32 @fwrite(i16** %231, i32 2, i32 256, i32* %232)
%234 = load i32*, i32** %5
%235 = call i32 @fclose(i32* %234)
%236 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %236, i32** %5
store i32 0, i32* %1
br label %237
237: ; preds = %249, %230
%238 = load i32, i32* %1
%239 = icmp sle i32 %238, 64
br i1 %239, label %240, label %252
240: ; preds = %237
%241 = load i32, i32* %1
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %242
%244 = load i16, i16* %243
%245 = load i32, i32* %1
%246 = add nsw i32 %245, 64
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %247
store i16 %244, i16* %248
br label %249
249: ; preds = %240
%250 = load i32, i32* %1
%251 = add nsw i32 %250, 1
store i32 %251, i32* %1
br label %237
252: ; preds = %237
%253 = bitcast [258 x i16]* %4 to i16**
%254 = load i32*, i32** %5
%255 = call i32 @fwrite(i16** %253, i32 2, i32 256, i32* %254)
%256 = load i32*, i32** %5
%257 = call i32 @fclose(i32* %256)
%258 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %258, i32** %5
store i32 0, i32* %1
br label %259
259: ; preds = %288, %252
%260 = load i32, i32* %1
%261 = icmp slt i32 %260, 256
br i1 %261, label %262, label %291
262: ; preds = %259
store double 0.000000e+00, double* %3
store i32 1, i32* %2
br label %263
263: ; preds = %278, %262
%264 = load i32, i32* %2
%265 = icmp sle i32 %264, 10
br i1 %265, label %266, label %281
266: ; preds = %263
%267 = load i32, i32* %1
%268 = load i32, i32* %2
%269 = mul nsw i32 %267, %268
%270 = mul nsw i32 %269, 2
%271 = sitofp i32 %270 to double
%272 = fmul double %271, 0x400921FB54442D18
%273 = fdiv double %272, 2.560000e+02
%274 = fptosi double %273 to i32
%275 = call double @cos(i32 %274)
%276 = load double, double* %3
%277 = fadd double %276, %275
store double %277, double* %3
br label %278
278: ; preds = %266
%279 = load i32, i32* %2
%280 = add nsw i32 %279, 1
store i32 %280, i32* %2
br label %263
281: ; preds = %263
%282 = load double, double* %3
%283 = fmul double 3.276700e+03, %282
%284 = fptosi double %283 to i16
%285 = load i32, i32* %1
%286 = sext i32 %285 to i64
%287 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %286
store i16 %284, i16* %287
br label %288
288: ; preds = %281
%289 = load i32, i32* %1
%290 = add nsw i32 %289, 1
store i32 %290, i32* %1
br label %259
291: ; preds = %259
%292 = bitcast [258 x i16]* %4 to i16**
%293 = load i32*, i32** %5
%294 = call i32 @fwrite(i16** %292, i32 2, i32 256, i32* %293)
%295 = load i32*, i32** %5
%296 = call i32 @fclose(i32* %295)
%297 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %297, i32** %5
store i32 0, i32* %1
br label %298
298: ; preds = %327, %291
%299 = load i32, i32* %1
%300 = icmp slt i32 %299, 256
br i1 %300, label %301, label %330
301: ; preds = %298
store double 0.000000e+00, double* %3
store i32 1, i32* %2
br label %302
302: ; preds = %317, %301
%303 = load i32, i32* %2
%304 = icmp sle i32 %303, 20
br i1 %304, label %305, label %320
305: ; preds = %302
%306 = load i32, i32* %1
%307 = load i32, i32* %2
%308 = mul nsw i32 %306, %307
%309 = mul nsw i32 %308, 2
%310 = sitofp i32 %309 to double
%311 = fmul double %310, 0x400921FB54442D18
%312 = fdiv double %311, 2.560000e+02
%313 = fptosi double %312 to i32
%314 = call double @cos(i32 %313)
%315 = load double, double* %3
%316 = fadd double %315, %314
store double %316, double* %3
br label %317
317: ; preds = %305
%318 = load i32, i32* %2
%319 = add nsw i32 %318, 1
store i32 %319, i32* %2
br label %302
320: ; preds = %302
%321 = load double, double* %3
%322 = fmul double 1.638350e+03, %321
%323 = fptosi double %322 to i16
%324 = load i32, i32* %1
%325 = sext i32 %324 to i64
%326 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %325
store i16 %323, i16* %326
br label %327
327: ; preds = %320
%328 = load i32, i32* %1
%329 = add nsw i32 %328, 1
store i32 %329, i32* %1
br label %298
330: ; preds = %298
%331 = bitcast [258 x i16]* %4 to i16**
%332 = load i32*, i32** %5
%333 = call i32 @fwrite(i16** %331, i32 2, i32 256, i32* %332)
%334 = load i32*, i32** %5
%335 = call i32 @fclose(i32* %334)
%336 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %336, i32** %5
store i32 0, i32* %1
br label %337
337: ; preds = %366, %330
%338 = load i32, i32* %1
%339 = icmp slt i32 %338, 256
br i1 %339, label %340, label %369
340: ; preds = %337
store double 0.000000e+00, double* %3
store i32 1, i32* %2
br label %341
341: ; preds = %356, %340
%342 = load i32, i32* %2
%343 = icmp sle i32 %342, 40
br i1 %343, label %344, label %359
344: ; preds = %341
%345 = load i32, i32* %1
%346 = load i32, i32* %2
%347 = mul nsw i32 %345, %346
%348 = mul nsw i32 %347, 2
%349 = sitofp i32 %348 to double
%350 = fmul double %349, 0x400921FB54442D18
%351 = fdiv double %350, 2.560000e+02
%352 = fptosi double %351 to i32
%353 = call double @cos(i32 %352)
%354 = load double, double* %3
%355 = fadd double %354, %353
store double %355, double* %3
br label %356
356: ; preds = %344
%357 = load i32, i32* %2
%358 = add nsw i32 %357, 1
store i32 %358, i32* %2
br label %341
359: ; preds = %341
%360 = load double, double* %3
%361 = fmul double 0x4089996666666666, %360
%362 = fptosi double %361 to i16
%363 = load i32, i32* %1
%364 = sext i32 %363 to i64
%365 = getelementptr inbounds [258 x i16], [258 x i16]* %4, i64 0, i64 %364
store i16 %362, i16* %365
br label %366
366: ; preds = %359
%367 = load i32, i32* %1
%368 = add nsw i32 %367, 1
store i32 %368, i32* %1
br label %337
369: ; preds = %337
%370 = bitcast [258 x i16]* %4 to i16**
%371 = load i32*, i32** %5
%372 = call i32 @fwrite(i16** %370, i32 2, i32 256, i32* %371)
%373 = load i32*, i32** %5
%374 = call i32 @fclose(i32* %373)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"halfwave.raw\00"
@.str.1 = [3 x i8] c"wb\00"
@.str.2 = [13 x i8] c"sinewave.raw\00"
@.str.3 = [13 x i8] c"sineblnk.raw\00"
@.str.4 = [13 x i8] c"fwavblnk.raw\00"
@.str.5 = [13 x i8] c"snglpeak.raw\00"
@.str.6 = [13 x i8] c"twopeaks.raw\00"
@.str.7 = [13 x i8] c"peksblnk.raw\00"
@.str.8 = [13 x i8] c"ppksblnk.raw\00"
@.str.9 = [13 x i8] c"impuls10.raw\00"
@.str.10 = [13 x i8] c"impuls20.raw\00"
@.str.11 = [13 x i8] c"impuls40.raw\00"
define void @main() {
%1 = alloca [258 x i16]
%2 = bitcast [258 x i16]* %1 to i8*
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %4
4: ; preds = %4, %0
%5 = phi i64 [ 0, %0 ], [ %27, %4 ]
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 1
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 0x400921FB54442D18
%10 = fmul double %9, 3.906250e-03
%11 = fptosi double %10 to i32
%12 = tail call i32 @sin(i32 %11)
%13 = trunc i32 %12 to i16
%14 = mul i16 %13, 32767
%15 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %5
store i16 %14, i16* %15
%16 = or i64 %5, 1
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 1
%19 = sitofp i32 %18 to double
%20 = fmul double %19, 0x400921FB54442D18
%21 = fmul double %20, 3.906250e-03
%22 = fptosi double %21 to i32
%23 = tail call i32 @sin(i32 %22)
%24 = trunc i32 %23 to i16
%25 = mul i16 %24, 32767
%26 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %16
store i16 %25, i16* %26
%27 = add nuw nsw i64 %5, 2
%28 = icmp eq i64 %27, 128
br i1 %28, label %29, label %4
29: ; preds = %4
%30 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 128
%31 = bitcast i16* %30 to i8*
%32 = bitcast [258 x i16]* %1 to i16**
%33 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %3)
%34 = tail call i32 @fclose(i32* %3)
%35 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %36
36: ; preds = %36, %29
%37 = phi i64 [ 128, %29 ], [ %59, %36 ]
%38 = trunc i64 %37 to i32
%39 = shl i32 %38, 1
%40 = sitofp i32 %39 to double
%41 = fmul double %40, 0x400921FB54442D18
%42 = fmul double %41, 3.906250e-03
%43 = fptosi double %42 to i32
%44 = tail call i32 @sin(i32 %43)
%45 = trunc i32 %44 to i16
%46 = mul i16 %45, 32767
%47 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %37
store i16 %46, i16* %47
%48 = or i64 %37, 1
%49 = trunc i64 %48 to i32
%50 = shl i32 %49, 1
%51 = sitofp i32 %50 to double
%52 = fmul double %51, 0x400921FB54442D18
%53 = fmul double %52, 3.906250e-03
%54 = fptosi double %53 to i32
%55 = tail call i32 @sin(i32 %54)
%56 = trunc i32 %55 to i16
%57 = mul i16 %56, 32767
%58 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %48
store i16 %57, i16* %58
%59 = add nuw nsw i64 %37, 2
%60 = icmp eq i64 %59, 256
br i1 %60, label %61, label %36
61: ; preds = %36
%62 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %35)
%63 = tail call i32 @fclose(i32* %35)
%64 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %65
65: ; preds = %65, %61
%66 = phi i64 [ 0, %61 ], [ %86, %65 ]
%67 = shl nuw nsw i64 %66, 1
%68 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %67
%69 = load i16, i16* %68
%70 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %66
store i16 %69, i16* %70
%71 = or i64 %66, 1
%72 = shl nuw nsw i64 %71, 1
%73 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %72
%74 = load i16, i16* %73
%75 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %71
store i16 %74, i16* %75
%76 = or i64 %66, 2
%77 = shl nuw nsw i64 %76, 1
%78 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %77
%79 = load i16, i16* %78
%80 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %76
store i16 %79, i16* %80
%81 = or i64 %66, 3
%82 = shl nuw nsw i64 %81, 1
%83 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %82
%84 = load i16, i16* %83
%85 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %81
store i16 %84, i16* %85
%86 = add nuw nsw i64 %66, 4
%87 = icmp eq i64 %86, 128
br i1 %87, label %88, label %65
88: ; preds = %65
%89 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %64)
%90 = tail call i32 @fclose(i32* %64)
%91 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%92 = bitcast [258 x i16]* %1 to <8 x i16>*
%93 = load <8 x i16>, <8 x i16>* %92
%94 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 64
%95 = bitcast i16* %94 to <8 x i16>*
store <8 x i16> %93, <8 x i16>* %95
%96 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 8
%97 = bitcast i16* %96 to <8 x i16>*
%98 = load <8 x i16>, <8 x i16>* %97
%99 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 72
%100 = bitcast i16* %99 to <8 x i16>*
store <8 x i16> %98, <8 x i16>* %100
%101 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 16
%102 = bitcast i16* %101 to <8 x i16>*
%103 = load <8 x i16>, <8 x i16>* %102
%104 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 80
%105 = bitcast i16* %104 to <8 x i16>*
store <8 x i16> %103, <8 x i16>* %105
%106 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 24
%107 = bitcast i16* %106 to <8 x i16>*
%108 = load <8 x i16>, <8 x i16>* %107
%109 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 88
%110 = bitcast i16* %109 to <8 x i16>*
store <8 x i16> %108, <8 x i16>* %110
%111 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 32
%112 = bitcast i16* %111 to <8 x i16>*
%113 = load <8 x i16>, <8 x i16>* %112
%114 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 96
%115 = bitcast i16* %114 to <8 x i16>*
store <8 x i16> %113, <8 x i16>* %115
%116 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 40
%117 = bitcast i16* %116 to <8 x i16>*
%118 = load <8 x i16>, <8 x i16>* %117
%119 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 104
%120 = bitcast i16* %119 to <8 x i16>*
store <8 x i16> %118, <8 x i16>* %120
%121 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 48
%122 = bitcast i16* %121 to <8 x i16>*
%123 = load <8 x i16>, <8 x i16>* %122
%124 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 112
%125 = bitcast i16* %124 to <8 x i16>*
store <8 x i16> %123, <8 x i16>* %125
%126 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 56
%127 = bitcast i16* %126 to <8 x i16>*
%128 = load <8 x i16>, <8 x i16>* %127
%129 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 120
%130 = bitcast i16* %129 to <8 x i16>*
store <8 x i16> %128, <8 x i16>* %130
%131 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %91)
%132 = tail call i32 @fclose(i32* %91)
%133 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %134
134: ; preds = %149, %88
%135 = phi i64 [ 0, %88 ], [ %161, %149 ]
%136 = trunc i64 %135 to i32
%137 = shl i32 %136, 1
%138 = sitofp i32 %137 to double
%139 = fmul double %138, 0x400921FB54442D18
%140 = fmul double %139, 3.906250e-03
%141 = fptosi double %140 to i32
%142 = tail call double @cos(i32 %141)
%143 = fsub double 1.000000e+00, %142
%144 = fmul double %143, 3.276700e+04
%145 = fptosi double %144 to i16
%146 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %135
store i16 %145, i16* %146
%147 = or i64 %135, 1
%148 = icmp eq i64 %147, 65
br i1 %148, label %162, label %149
149: ; preds = %134
%150 = trunc i64 %147 to i32
%151 = shl i32 %150, 1
%152 = sitofp i32 %151 to double
%153 = fmul double %152, 0x400921FB54442D18
%154 = fmul double %153, 3.906250e-03
%155 = fptosi double %154 to i32
%156 = tail call double @cos(i32 %155)
%157 = fsub double 1.000000e+00, %156
%158 = fmul double %157, 3.276700e+04
%159 = fptosi double %158 to i16
%160 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %147
store i16 %159, i16* %160
%161 = add nuw nsw i64 %135, 2
br label %134
162: ; preds = %134, %162
%163 = phi i64 [ %188, %162 ], [ 0, %134 ]
%164 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %163
%165 = load i16, i16* %164
%166 = sub nuw nsw i64 128, %163
%167 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %166
store i16 %165, i16* %167
%168 = add nuw nsw i64 %163, 1
%169 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %168
%170 = load i16, i16* %169
%171 = sub nsw i64 127, %163
%172 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %171
store i16 %170, i16* %172
%173 = add nuw nsw i64 %163, 2
%174 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %173
%175 = load i16, i16* %174
%176 = sub nsw i64 126, %163
%177 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %176
store i16 %175, i16* %177
%178 = add nuw nsw i64 %163, 3
%179 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %178
%180 = load i16, i16* %179
%181 = sub nsw i64 125, %163
%182 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %181
store i16 %180, i16* %182
%183 = add nuw nsw i64 %163, 4
%184 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %183
%185 = load i16, i16* %184
%186 = sub nsw i64 124, %163
%187 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %186
store i16 %185, i16* %187
%188 = add nuw nsw i64 %163, 5
%189 = icmp eq i64 %188, 65
br i1 %189, label %190, label %162
190: ; preds = %162
%191 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %133)
%192 = tail call i32 @fclose(i32* %133)
%193 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%194 = bitcast [258 x i16]* %1 to <8 x i16>*
%195 = load <8 x i16>, <8 x i16>* %194
%196 = sub <8 x i16> zeroinitializer, %195
%197 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 128
%198 = bitcast i16* %197 to <8 x i16>*
store <8 x i16> %196, <8 x i16>* %198
%199 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 8
%200 = bitcast i16* %199 to <8 x i16>*
%201 = load <8 x i16>, <8 x i16>* %200
%202 = sub <8 x i16> zeroinitializer, %201
%203 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 136
%204 = bitcast i16* %203 to <8 x i16>*
store <8 x i16> %202, <8 x i16>* %204
%205 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 16
%206 = bitcast i16* %205 to <8 x i16>*
%207 = load <8 x i16>, <8 x i16>* %206
%208 = sub <8 x i16> zeroinitializer, %207
%209 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 144
%210 = bitcast i16* %209 to <8 x i16>*
store <8 x i16> %208, <8 x i16>* %210
%211 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 24
%212 = bitcast i16* %211 to <8 x i16>*
%213 = load <8 x i16>, <8 x i16>* %212
%214 = sub <8 x i16> zeroinitializer, %213
%215 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 152
%216 = bitcast i16* %215 to <8 x i16>*
store <8 x i16> %214, <8 x i16>* %216
%217 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 32
%218 = bitcast i16* %217 to <8 x i16>*
%219 = load <8 x i16>, <8 x i16>* %218
%220 = sub <8 x i16> zeroinitializer, %219
%221 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 160
%222 = bitcast i16* %221 to <8 x i16>*
store <8 x i16> %220, <8 x i16>* %222
%223 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 40
%224 = bitcast i16* %223 to <8 x i16>*
%225 = load <8 x i16>, <8 x i16>* %224
%226 = sub <8 x i16> zeroinitializer, %225
%227 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 168
%228 = bitcast i16* %227 to <8 x i16>*
store <8 x i16> %226, <8 x i16>* %228
%229 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 48
%230 = bitcast i16* %229 to <8 x i16>*
%231 = load <8 x i16>, <8 x i16>* %230
%232 = sub <8 x i16> zeroinitializer, %231
%233 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 176
%234 = bitcast i16* %233 to <8 x i16>*
store <8 x i16> %232, <8 x i16>* %234
%235 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 56
%236 = bitcast i16* %235 to <8 x i16>*
%237 = load <8 x i16>, <8 x i16>* %236
%238 = sub <8 x i16> zeroinitializer, %237
%239 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 184
%240 = bitcast i16* %239 to <8 x i16>*
store <8 x i16> %238, <8 x i16>* %240
%241 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 64
%242 = bitcast i16* %241 to <8 x i16>*
%243 = load <8 x i16>, <8 x i16>* %242
%244 = sub <8 x i16> zeroinitializer, %243
%245 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 192
%246 = bitcast i16* %245 to <8 x i16>*
store <8 x i16> %244, <8 x i16>* %246
%247 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 72
%248 = bitcast i16* %247 to <8 x i16>*
%249 = load <8 x i16>, <8 x i16>* %248
%250 = sub <8 x i16> zeroinitializer, %249
%251 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 200
%252 = bitcast i16* %251 to <8 x i16>*
store <8 x i16> %250, <8 x i16>* %252
%253 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 80
%254 = bitcast i16* %253 to <8 x i16>*
%255 = load <8 x i16>, <8 x i16>* %254
%256 = sub <8 x i16> zeroinitializer, %255
%257 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 208
%258 = bitcast i16* %257 to <8 x i16>*
store <8 x i16> %256, <8 x i16>* %258
%259 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 88
%260 = bitcast i16* %259 to <8 x i16>*
%261 = load <8 x i16>, <8 x i16>* %260
%262 = sub <8 x i16> zeroinitializer, %261
%263 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 216
%264 = bitcast i16* %263 to <8 x i16>*
store <8 x i16> %262, <8 x i16>* %264
%265 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 96
%266 = bitcast i16* %265 to <8 x i16>*
%267 = load <8 x i16>, <8 x i16>* %266
%268 = sub <8 x i16> zeroinitializer, %267
%269 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 224
%270 = bitcast i16* %269 to <8 x i16>*
store <8 x i16> %268, <8 x i16>* %270
%271 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 104
%272 = bitcast i16* %271 to <8 x i16>*
%273 = load <8 x i16>, <8 x i16>* %272
%274 = sub <8 x i16> zeroinitializer, %273
%275 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 232
%276 = bitcast i16* %275 to <8 x i16>*
store <8 x i16> %274, <8 x i16>* %276
%277 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 112
%278 = bitcast i16* %277 to <8 x i16>*
%279 = load <8 x i16>, <8 x i16>* %278
%280 = sub <8 x i16> zeroinitializer, %279
%281 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 240
%282 = bitcast i16* %281 to <8 x i16>*
store <8 x i16> %280, <8 x i16>* %282
%283 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 120
%284 = bitcast i16* %283 to <8 x i16>*
%285 = load <8 x i16>, <8 x i16>* %284
%286 = sub <8 x i16> zeroinitializer, %285
%287 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 248
%288 = bitcast i16* %287 to <8 x i16>*
store <8 x i16> %286, <8 x i16>* %288
%289 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 128
%290 = load i16, i16* %289
%291 = sub i16 0, %290
%292 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 256
store i16 %291, i16* %292
%293 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %193)
%294 = tail call i32 @fclose(i32* %193)
%295 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %296
296: ; preds = %296, %190
%297 = phi i64 [ 0, %190 ], [ %312, %296 ]
%298 = shl nuw nsw i64 %297, 1
%299 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %298
%300 = load i16, i16* %299
%301 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %297
store i16 %300, i16* %301
%302 = add nuw nsw i64 %297, 1
%303 = shl nuw nsw i64 %302, 1
%304 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %303
%305 = load i16, i16* %304
%306 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %302
store i16 %305, i16* %306
%307 = add nuw nsw i64 %297, 2
%308 = shl nuw nsw i64 %307, 1
%309 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %308
%310 = load i16, i16* %309
%311 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %307
store i16 %310, i16* %311
%312 = add nuw nsw i64 %297, 3
%313 = icmp eq i64 %312, 129
br i1 %313, label %314, label %296
314: ; preds = %296
%315 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %295)
%316 = tail call i32 @fclose(i32* %295)
%317 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%318 = bitcast [258 x i16]* %1 to <8 x i16>*
%319 = load <8 x i16>, <8 x i16>* %318
%320 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 64
%321 = bitcast i16* %320 to <8 x i16>*
store <8 x i16> %319, <8 x i16>* %321
%322 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 8
%323 = bitcast i16* %322 to <8 x i16>*
%324 = load <8 x i16>, <8 x i16>* %323
%325 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 72
%326 = bitcast i16* %325 to <8 x i16>*
store <8 x i16> %324, <8 x i16>* %326
%327 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 16
%328 = bitcast i16* %327 to <8 x i16>*
%329 = load <8 x i16>, <8 x i16>* %328
%330 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 80
%331 = bitcast i16* %330 to <8 x i16>*
store <8 x i16> %329, <8 x i16>* %331
%332 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 24
%333 = bitcast i16* %332 to <8 x i16>*
%334 = load <8 x i16>, <8 x i16>* %333
%335 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 88
%336 = bitcast i16* %335 to <8 x i16>*
store <8 x i16> %334, <8 x i16>* %336
%337 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 32
%338 = bitcast i16* %337 to <8 x i16>*
%339 = load <8 x i16>, <8 x i16>* %338
%340 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 96
%341 = bitcast i16* %340 to <8 x i16>*
store <8 x i16> %339, <8 x i16>* %341
%342 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 40
%343 = bitcast i16* %342 to <8 x i16>*
%344 = load <8 x i16>, <8 x i16>* %343
%345 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 104
%346 = bitcast i16* %345 to <8 x i16>*
store <8 x i16> %344, <8 x i16>* %346
%347 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 48
%348 = bitcast i16* %347 to <8 x i16>*
%349 = load <8 x i16>, <8 x i16>* %348
%350 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 112
%351 = bitcast i16* %350 to <8 x i16>*
store <8 x i16> %349, <8 x i16>* %351
%352 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 56
%353 = bitcast i16* %352 to <8 x i16>*
%354 = load <8 x i16>, <8 x i16>* %353
%355 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 120
%356 = bitcast i16* %355 to <8 x i16>*
store <8 x i16> %354, <8 x i16>* %356
%357 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 64
%358 = load i16, i16* %357
%359 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 128
store i16 %358, i16* %359
%360 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %317)
%361 = tail call i32 @fclose(i32* %317)
%362 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %363
363: ; preds = %314, %363
%364 = phi i64 [ 0, %314 ], [ %448, %363 ]
%365 = trunc i64 %364 to i32
%366 = shl i32 %365, 1
%367 = sitofp i32 %366 to double
%368 = fmul double %367, 0x400921FB54442D18
%369 = fmul double %368, 3.906250e-03
%370 = fptosi double %369 to i32
%371 = tail call double @cos(i32 %370)
%372 = fadd double %371, 0.000000e+00
%373 = trunc i64 %364 to i32
%374 = shl i32 %373, 2
%375 = sitofp i32 %374 to double
%376 = fmul double %375, 0x400921FB54442D18
%377 = fmul double %376, 3.906250e-03
%378 = fptosi double %377 to i32
%379 = tail call double @cos(i32 %378)
%380 = fadd double %372, %379
%381 = trunc i64 %364 to i32
%382 = mul i32 %381, 6
%383 = sitofp i32 %382 to double
%384 = fmul double %383, 0x400921FB54442D18
%385 = fmul double %384, 3.906250e-03
%386 = fptosi double %385 to i32
%387 = tail call double @cos(i32 %386)
%388 = fadd double %380, %387
%389 = trunc i64 %364 to i32
%390 = shl i32 %389, 3
%391 = sitofp i32 %390 to double
%392 = fmul double %391, 0x400921FB54442D18
%393 = fmul double %392, 3.906250e-03
%394 = fptosi double %393 to i32
%395 = tail call double @cos(i32 %394)
%396 = fadd double %388, %395
%397 = trunc i64 %364 to i32
%398 = mul i32 %397, 10
%399 = sitofp i32 %398 to double
%400 = fmul double %399, 0x400921FB54442D18
%401 = fmul double %400, 3.906250e-03
%402 = fptosi double %401 to i32
%403 = tail call double @cos(i32 %402)
%404 = fadd double %396, %403
%405 = trunc i64 %364 to i32
%406 = mul i32 %405, 12
%407 = sitofp i32 %406 to double
%408 = fmul double %407, 0x400921FB54442D18
%409 = fmul double %408, 3.906250e-03
%410 = fptosi double %409 to i32
%411 = tail call double @cos(i32 %410)
%412 = fadd double %404, %411
%413 = trunc i64 %364 to i32
%414 = mul i32 %413, 14
%415 = sitofp i32 %414 to double
%416 = fmul double %415, 0x400921FB54442D18
%417 = fmul double %416, 3.906250e-03
%418 = fptosi double %417 to i32
%419 = tail call double @cos(i32 %418)
%420 = fadd double %412, %419
%421 = trunc i64 %364 to i32
%422 = shl i32 %421, 4
%423 = sitofp i32 %422 to double
%424 = fmul double %423, 0x400921FB54442D18
%425 = fmul double %424, 3.906250e-03
%426 = fptosi double %425 to i32
%427 = tail call double @cos(i32 %426)
%428 = fadd double %420, %427
%429 = trunc i64 %364 to i32
%430 = mul i32 %429, 18
%431 = sitofp i32 %430 to double
%432 = fmul double %431, 0x400921FB54442D18
%433 = fmul double %432, 3.906250e-03
%434 = fptosi double %433 to i32
%435 = tail call double @cos(i32 %434)
%436 = fadd double %428, %435
%437 = trunc i64 %364 to i32
%438 = mul i32 %437, 20
%439 = sitofp i32 %438 to double
%440 = fmul double %439, 0x400921FB54442D18
%441 = fmul double %440, 3.906250e-03
%442 = fptosi double %441 to i32
%443 = tail call double @cos(i32 %442)
%444 = fadd double %436, %443
%445 = fmul double %444, 3.276700e+03
%446 = fptosi double %445 to i16
%447 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %364
store i16 %446, i16* %447
%448 = add nuw nsw i64 %364, 1
%449 = icmp eq i64 %448, 256
br i1 %449, label %450, label %363
450: ; preds = %363
%451 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %362)
%452 = tail call i32 @fclose(i32* %362)
%453 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %454
454: ; preds = %450, %478
%455 = phi i64 [ 0, %450 ], [ %482, %478 ]
%456 = trunc i64 %455 to i32
%457 = shl i32 %456, 1
br label %458
458: ; preds = %458, %454
%459 = phi double [ 0.000000e+00, %454 ], [ %475, %458 ]
%460 = phi i32 [ 1, %454 ], [ %476, %458 ]
%461 = mul nuw nsw i32 %457, %460
%462 = sitofp i32 %461 to double
%463 = fmul double %462, 0x400921FB54442D18
%464 = fmul double %463, 3.906250e-03
%465 = fptosi double %464 to i32
%466 = tail call double @cos(i32 %465)
%467 = fadd double %459, %466
%468 = add nuw nsw i32 %460, 1
%469 = mul nuw nsw i32 %457, %468
%470 = sitofp i32 %469 to double
%471 = fmul double %470, 0x400921FB54442D18
%472 = fmul double %471, 3.906250e-03
%473 = fptosi double %472 to i32
%474 = tail call double @cos(i32 %473)
%475 = fadd double %467, %474
%476 = add nuw nsw i32 %460, 2
%477 = icmp eq i32 %476, 21
br i1 %477, label %478, label %458
478: ; preds = %458
%479 = fmul double %475, 1.638350e+03
%480 = fptosi double %479 to i16
%481 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %455
store i16 %480, i16* %481
%482 = add nuw nsw i64 %455, 1
%483 = icmp eq i64 %482, 256
br i1 %483, label %484, label %454
484: ; preds = %478
%485 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %453)
%486 = tail call i32 @fclose(i32* %453)
%487 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %488
488: ; preds = %484, %512
%489 = phi i64 [ 0, %484 ], [ %516, %512 ]
%490 = trunc i64 %489 to i32
%491 = shl i32 %490, 1
br label %492
492: ; preds = %492, %488
%493 = phi double [ 0.000000e+00, %488 ], [ %509, %492 ]
%494 = phi i32 [ 1, %488 ], [ %510, %492 ]
%495 = mul nuw nsw i32 %491, %494
%496 = sitofp i32 %495 to double
%497 = fmul double %496, 0x400921FB54442D18
%498 = fmul double %497, 3.906250e-03
%499 = fptosi double %498 to i32
%500 = tail call double @cos(i32 %499)
%501 = fadd double %493, %500
%502 = add nuw nsw i32 %494, 1
%503 = mul nuw nsw i32 %491, %502
%504 = sitofp i32 %503 to double
%505 = fmul double %504, 0x400921FB54442D18
%506 = fmul double %505, 3.906250e-03
%507 = fptosi double %506 to i32
%508 = tail call double @cos(i32 %507)
%509 = fadd double %501, %508
%510 = add nuw nsw i32 %494, 2
%511 = icmp eq i32 %510, 41
br i1 %511, label %512, label %492
512: ; preds = %492
%513 = fmul double %509, 0x4089996666666666
%514 = fptosi double %513 to i16
%515 = getelementptr inbounds [258 x i16], [258 x i16]* %1, i64 0, i64 %489
store i16 %514, i16* %515
%516 = add nuw nsw i64 %489, 1
%517 = icmp eq i64 %516, 256
br i1 %517, label %518, label %488
518: ; preds = %512
%519 = call i32 @fwrite(i16** %32, i32 2, i32 256, i32* %487)
%520 = tail call i32 @fclose(i32* %487)
ret void
}