#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 */
struct timeval {
  long tv_sec;
  long tv_usec;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, double);
double sin(double);
int main(int argc, char **argv) {
  double a[1000][1000];
  int i, j;
  FILE *ff;
  for (i = 0; i < 1000; ++i) {
    for (j = 0; j < 1000; ++j) {
      a[i][j] = 10 * i + j;
    }
  }
  double timeElapsed = 0.0;
  do {
    struct timeval timeElapsed_start, timeElapsed_end;
    long timeElapsed_seconds, timeElapsed_useconds;
    gettimeofday(&timeElapsed_start, NULL);
    {
      for (int i = 0; i < 1000; ++i) {
        for (int j = 0; j < 1000 - 2; ++j) {
          for (int k = 0; k < 100; k++)
            a[i][j] = sin(0.00001 * a[i][j + 2]);
        }
      }
    }
    gettimeofday(&timeElapsed_end, NULL);
    timeElapsed_seconds = timeElapsed_end.tv_sec - timeElapsed_start.tv_sec;
    timeElapsed_useconds = timeElapsed_end.tv_usec - timeElapsed_start.tv_usec;
    timeElapsed = (timeElapsed_seconds * 1000 + timeElapsed_useconds / 1000.0);
  } while (0);
  printf("%.6lf\n", timeElapsed);
  ff = fopen("4.out", "w");
  for (i = 0; i < 1000; ++i) {
    for (j = 0; j < 1000; ++j) {
      fprintf(ff, "%f ", a[i][j]);
    }
    fprintf(ff, "\n");
  }
  fclose(ff);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7a1270,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x7a1214(%rbp)
cmpl   $0x3e8,-0x7a1214(%rbp)
jge    120f <main+0xaf>
movl   $0x0,-0x7a1218(%rbp)
cmpl   $0x3e8,-0x7a1218(%rbp)
jge    11f6 <main+0x96>
imul   $0xa,-0x7a1214(%rbp),%eax
add    -0x7a1218(%rbp),%eax
cvtsi2sd %eax,%xmm0
movslq -0x7a1214(%rbp),%rcx
lea    -0x7a1210(%rbp),%rax
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
movslq -0x7a1218(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x7a1218(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1218(%rbp)
jmp    119d <main+0x3d>
jmp    11fb <main+0x9b>
mov    -0x7a1214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1214(%rbp)
jmp    1183 <main+0x23>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x7a1228(%rbp)
ff
lea    -0x7a1238(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
movl   $0x0,-0x7a125c(%rbp)
cmpl   $0x3e8,-0x7a125c(%rbp)
jge    1315 <main+0x1b5>
movl   $0x0,-0x7a1260(%rbp)
cmpl   $0x3e6,-0x7a1260(%rbp)
jge    12fc <main+0x19c>
movl   $0x0,-0x7a1264(%rbp)
cmpl   $0x64,-0x7a1264(%rbp)
jge    12e3 <main+0x183>
movslq -0x7a125c(%rbp),%rcx
lea    -0x7a1210(%rbp),%rax
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a1260(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xd67(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
call   1070 <sin@plt>
movslq -0x7a125c(%rbp),%rcx
lea    -0x7a1210(%rbp),%rax
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
movslq -0x7a1260(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x7a1264(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1264(%rbp)
jmp    1268 <main+0x108>
jmp    12e8 <main+0x188>
mov    -0x7a1260(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1260(%rbp)
jmp    124e <main+0xee>
jmp    1301 <main+0x1a1>
mov    -0x7a125c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a125c(%rbp)
jmp    1234 <main+0xd4>
lea    -0x7a1248(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
mov    -0x7a1248(%rbp),%rax
sub    -0x7a1238(%rbp),%rax
mov    %rax,-0x7a1250(%rbp)
mov    -0x7a1240(%rbp),%rax
sub    -0x7a1230(%rbp),%rax
mov    %rax,-0x7a1258(%rbp)
imul   $0x3e8,-0x7a1250(%rbp),%rax
cvtsi2sd %rax,%xmm0
cvtsi2sdq -0x7a1258(%rbp),%xmm1
85 ff
movsd  0xc90(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x7a1228(%rbp)
ff
movsd  -0x7a1228(%rbp),%xmm0
ff
lea    0xc81(%rip),%rdi
call   1040 <printf@plt>
lea    0xc7c(%rip),%rdi
lea    0xc7b(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x7a1220(%rbp)
movl   $0x0,-0x7a1214(%rbp)
cmpl   $0x3e8,-0x7a1214(%rbp)
jge    1458 <main+0x2f8>
movl   $0x0,-0x7a1218(%rbp)
cmpl   $0x3e8,-0x7a1218(%rbp)
jge    142f <main+0x2cf>
mov    -0x7a1220(%rbp),%rdi
movslq -0x7a1214(%rbp),%rcx
lea    -0x7a1210(%rbp),%rax
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
movslq -0x7a1218(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xc0b(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    -0x7a1218(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1218(%rbp)
jmp    13d2 <main+0x272>
mov    -0x7a1220(%rbp),%rdi
lea    0xbd8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x7a1214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1214(%rbp)
jmp    13b8 <main+0x258>
mov    -0x7a1220(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x7a1270,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x7a1230,%rsp
lea    0x30(%rsp),%rax
xor    %ecx,%ecx
movdqa 0xe72(%rip),%xmm0
movdqa 0xe7a(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
lea    (%rcx,%rcx,1),%rdx
lea    (%rdx,%rdx,4),%rsi
movq   %rsi,%xmm2
pshufd $0x44,%xmm2,%xmm2
lea    (%rdx,%rdx,4),%rdx
add    $0x2,%rdx
movq   %rdx,%xmm3
pshufd $0x44,%xmm3,%xmm3
mov    $0x2,%edx
movdqa %xmm0,%xmm4
nopl   (%rax)
movdqa %xmm4,%xmm5
paddq  %xmm2,%xmm5
movdqa %xmm3,%xmm6
paddq  %xmm4,%xmm6
pshufd $0xe8,%xmm5,%xmm5
cvtdq2pd %xmm5,%xmm5
pshufd $0xe8,%xmm6,%xmm6
cvtdq2pd %xmm6,%xmm6
movaps %xmm5,-0x10(%rax,%rdx,8)
movaps %xmm6,(%rax,%rdx,8)
paddq  %xmm1,%xmm4
add    $0x4,%rdx
cmp    $0x3ea,%rdx
jne    11d0 <main+0x60>
add    $0x1,%rcx
add    $0x1f40,%rax
cmp    $0x3e8,%rcx
jne    11a0 <main+0x30>
xor    %r14d,%r14d
lea    0x20(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
xchg   %ax,%ax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
imul   $0x1f40,%r14,%rax
lea    (%rsp,%rax,1),%r15
add    $0x30,%r15
movsd  0x10(%r15,%rbx,8),%xmm0
mulsd  0xdc2(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x64,%ebp
nopl   0x0(%rax)
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movsd  0x8(%rsp),%xmm0
call   1080 <sin@plt>
movq   0x8(%rsp),%xmm0
call   1080 <sin@plt>
add    $0xfffffff6,%ebp
jne    1270 <main+0x100>
movq   %xmm0,(%r15,%rbx,8)
add    $0x1,%rbx
cmp    $0x3e6,%rbx
jne    1240 <main+0xd0>
add    $0x1,%r14
cmp    $0x3e8,%r14
jne    1230 <main+0xc0>
xor    %r15d,%r15d
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    0x10(%rsp),%rax
sub    0x20(%rsp),%rax
mov    0x18(%rsp),%rcx
sub    0x28(%rsp),%rcx
imul   $0x3e8,%rax,%rax
cvtsi2sd %rax,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %rcx,%xmm0
divsd  0xcde(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xcdb(%rip),%rdi
call   1040 <printf@plt>
lea    0xcd6(%rip),%rdi
lea    0xcd5(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r12
lea    0x30(%rsp),%rbp
lea    0xcc3(%rip),%r14
nopl   0x0(%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%rbp,%rbx,8),%xmm0
mov    %r12,%rdi
mov    %r14,%rsi
mov    $0x1,%al
call   1070 <fprintf@plt>
add    $0x1,%rbx
cmp    $0x3e8,%rbx
jne    1390 <main+0x220>
mov    $0xa,%edi
mov    %r12,%rsi
call   1060 <fputc@plt>
add    $0x1,%r15
add    $0x1f40,%rbp
cmp    $0x3e8,%r15
jne    1380 <main+0x210>
mov    %r12,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x7a1230,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
@.str = [7 x i8] c"%.6lf\0A\00"
@.str.1 = [6 x i8] c"4.out\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [4 x i8] c"%f \00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [1000 x [1000 x double]]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca double
%11 = alloca %struct.timeval
%12 = alloca %struct.timeval
%13 = alloca i64
%14 = alloca i64
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %18
18: ; preds = %41, %2
%19 = load i32, i32* %7
%20 = icmp slt i32 %19, 1000
br i1 %20, label %21, label %44
21: ; preds = %18
store i32 0, i32* %8
br label %22
22: ; preds = %37, %21
%23 = load i32, i32* %8
%24 = icmp slt i32 %23, 1000
br i1 %24, label %25, label %40
25: ; preds = %22
%26 = load i32, i32* %7
%27 = mul nsw i32 10, %26
%28 = load i32, i32* %8
%29 = add nsw i32 %27, %28
%30 = sitofp i32 %29 to double
%31 = load i32, i32* %7
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %6, i64 0, i64 %32
%34 = load i32, i32* %8
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [1000 x double], [1000 x double]* %33, i64 0, i64 %35
store double %30, double* %36
br label %37
37: ; preds = %25
%38 = load i32, i32* %8
%39 = add nsw i32 %38, 1
store i32 %39, i32* %8
br label %22
40: ; preds = %22
br label %41
41: ; preds = %40
%42 = load i32, i32* %7
%43 = add nsw i32 %42, 1
store i32 %43, i32* %7
br label %18
44: ; preds = %18
store double 0.000000e+00, double* %10
br label %45
45: ; preds = %44
%46 = call i32 @gettimeofday(%struct.timeval* %11, i32* null)
store i32 0, i32* %15
br label %47
47: ; preds = %83, %45
%48 = load i32, i32* %15
%49 = icmp slt i32 %48, 1000
br i1 %49, label %50, label %86
50: ; preds = %47
store i32 0, i32* %16
br label %51
51: ; preds = %79, %50
%52 = load i32, i32* %16
%53 = icmp slt i32 %52, 998
br i1 %53, label %54, label %82
54: ; preds = %51
store i32 0, i32* %17
br label %55
55: ; preds = %75, %54
%56 = load i32, i32* %17
%57 = icmp slt i32 %56, 100
br i1 %57, label %58, label %78
58: ; preds = %55
%59 = load i32, i32* %15
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %6, i64 0, i64 %60
%62 = load i32, i32* %16
%63 = add nsw i32 %62, 2
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [1000 x double], [1000 x double]* %61, i64 0, i64 %64
%66 = load double, double* %65
%67 = fmul double 1.000000e-05, %66
%68 = call double @sin(double %67)
%69 = load i32, i32* %15
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %6, i64 0, i64 %70
%72 = load i32, i32* %16
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [1000 x double], [1000 x double]* %71, i64 0, i64 %73
store double %68, double* %74
br label %75
75: ; preds = %58
%76 = load i32, i32* %17
%77 = add nsw i32 %76, 1
store i32 %77, i32* %17
br label %55
78: ; preds = %55
br label %79
79: ; preds = %78
%80 = load i32, i32* %16
%81 = add nsw i32 %80, 1
store i32 %81, i32* %16
br label %51
82: ; preds = %51
br label %83
83: ; preds = %82
%84 = load i32, i32* %15
%85 = add nsw i32 %84, 1
store i32 %85, i32* %15
br label %47
86: ; preds = %47
%87 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
%88 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
%89 = load i64, i64* %88
%90 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 0
%91 = load i64, i64* %90
%92 = sub nsw i64 %89, %91
store i64 %92, i64* %13
%93 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 1
%94 = load i64, i64* %93
%95 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 1
%96 = load i64, i64* %95
%97 = sub nsw i64 %94, %96
store i64 %97, i64* %14
%98 = load i64, i64* %13
%99 = mul nsw i64 %98, 1000
%100 = sitofp i64 %99 to double
%101 = load i64, i64* %14
%102 = sitofp i64 %101 to double
%103 = fdiv double %102, 1.000000e+03
%104 = fadd double %100, %103
store double %104, double* %10
br label %105
105: ; preds = %86
%106 = load double, double* %10
%107 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %106)
%108 = call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %108, i32** %9
store i32 0, i32* %7
br label %109
109: ; preds = %132, %105
%110 = load i32, i32* %7
%111 = icmp slt i32 %110, 1000
br i1 %111, label %112, label %135
112: ; preds = %109
store i32 0, i32* %8
br label %113
113: ; preds = %126, %112
%114 = load i32, i32* %8
%115 = icmp slt i32 %114, 1000
br i1 %115, label %116, label %129
116: ; preds = %113
%117 = load i32*, i32** %9
%118 = load i32, i32* %7
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %6, i64 0, i64 %119
%121 = load i32, i32* %8
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [1000 x double], [1000 x double]* %120, i64 0, i64 %122
%124 = load double, double* %123
%125 = call i32 (i32*, i8*, ...) @fprintf(i32* %117, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %124)
br label %126
126: ; preds = %116
%127 = load i32, i32* %8
%128 = add nsw i32 %127, 1
store i32 %128, i32* %8
br label %113
129: ; preds = %113
%130 = load i32*, i32** %9
%131 = call i32 (i32*, i8*, ...) @fprintf(i32* %130, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %132
132: ; preds = %129
%133 = load i32, i32* %7
%134 = add nsw i32 %133, 1
store i32 %134, i32* %7
br label %109
135: ; preds = %109
%136 = load i32*, i32** %9
%137 = call i32 @fclose(i32* %136)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
@.str = [7 x i8] c"%.6lf\0A\00"
@.str.1 = [6 x i8] c"4.out\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [4 x i8] c"%f \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x [1000 x double]]
%4 = alloca %struct.timeval
%5 = alloca %struct.timeval
%6 = bitcast [1000 x [1000 x double]]* %3 to i8*
br label %7
7: ; preds = %2, %31
%8 = phi i64 [ 0, %2 ], [ %32, %31 ]
%9 = mul nuw nsw i64 %8, 10
%10 = insertelement <2 x i64> poison, i64 %9, i64 0
%11 = shufflevector <2 x i64> %10, <2 x i64> poison, <2 x i32> zeroinitializer
%12 = add nuw i64 %9, 2
%13 = insertelement <2 x i64> poison, i64 %12, i64 0
%14 = shufflevector <2 x i64> %13, <2 x i64> poison, <2 x i32> zeroinitializer
br label %15
15: ; preds = %15, %7
%16 = phi i64 [ 0, %7 ], [ %28, %15 ]
%17 = phi <2 x i64> [ <i64 0, i64 1>, %7 ], [ %29, %15 ]
%18 = add nuw nsw <2 x i64> %17, %11
%19 = add <2 x i64> %14, %17
%20 = trunc <2 x i64> %18 to <2 x i32>
%21 = trunc <2 x i64> %19 to <2 x i32>
%22 = sitofp <2 x i32> %20 to <2 x double>
%23 = sitofp <2 x i32> %21 to <2 x double>
%24 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %3, i64 0, i64 %8, i64 %16
%25 = bitcast double* %24 to <2 x double>*
store <2 x double> %22, <2 x double>* %25
%26 = getelementptr inbounds double, double* %24, i64 2
%27 = bitcast double* %26 to <2 x double>*
store <2 x double> %23, <2 x double>* %27
%28 = add nuw i64 %16, 4
%29 = add <2 x i64> %17, <i64 4, i64 4>
%30 = icmp eq i64 %28, 1000
br i1 %30, label %31, label %15
31: ; preds = %15
%32 = add nuw nsw i64 %8, 1
%33 = icmp eq i64 %32, 1000
br i1 %33, label %34, label %7
34: ; preds = %31
%35 = bitcast %struct.timeval* %4 to i8*
%36 = bitcast %struct.timeval* %5 to i8*
%37 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
br label %38
38: ; preds = %34, %65
%39 = phi i64 [ 0, %34 ], [ %66, %65 ]
br label %59
40: ; preds = %65
%41 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%42 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%43 = load i64, i64* %42
%44 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%45 = load i64, i64* %44
%46 = sub nsw i64 %43, %45
%47 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%48 = load i64, i64* %47
%49 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%50 = load i64, i64* %49
%51 = sub nsw i64 %48, %50
%52 = mul nsw i64 %46, 1000
%53 = sitofp i64 %52 to double
%54 = sitofp i64 %51 to double
%55 = fdiv double %54, 1.000000e+03
%56 = fadd double %55, %53
%57 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %56)
%58 = tail call i32* @fopen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %86
59: ; preds = %38, %68
%60 = phi i64 [ 0, %38 ], [ %70, %68 ]
%61 = add nuw nsw i64 %60, 2
%62 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %3, i64 0, i64 %39, i64 %61
%63 = load double, double* %62
%64 = fmul double %63, 1.000000e-05
br label %72
65: ; preds = %68
%66 = add nuw nsw i64 %39, 1
%67 = icmp eq i64 %66, 1000
br i1 %67, label %40, label %38
68: ; preds = %72
%69 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %3, i64 0, i64 %39, i64 %60
store double %83, double* %69
%70 = add nuw nsw i64 %60, 1
%71 = icmp eq i64 %70, 998
br i1 %71, label %65, label %59
72: ; preds = %72, %59
%73 = phi i32 [ 0, %59 ], [ %84, %72 ]
%74 = tail call double @sin(double %64)
%75 = tail call double @sin(double %64)
%76 = tail call double @sin(double %64)
%77 = tail call double @sin(double %64)
%78 = tail call double @sin(double %64)
%79 = tail call double @sin(double %64)
%80 = tail call double @sin(double %64)
%81 = tail call double @sin(double %64)
%82 = tail call double @sin(double %64)
%83 = tail call double @sin(double %64)
%84 = add nuw nsw i32 %73, 10
%85 = icmp eq i32 %84, 100
br i1 %85, label %68, label %72
86: ; preds = %40, %95
%87 = phi i64 [ 0, %40 ], [ %97, %95 ]
br label %88
88: ; preds = %86, %88
%89 = phi i64 [ 0, %86 ], [ %93, %88 ]
%90 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %3, i64 0, i64 %87, i64 %89
%91 = load double, double* %90
%92 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %58, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %91)
%93 = add nuw nsw i64 %89, 1
%94 = icmp eq i64 %93, 1000
br i1 %94, label %95, label %88
95: ; preds = %88
%96 = tail call i32 @fputc(i32 10, i32* %58)
%97 = add nuw nsw i64 %87, 1
%98 = icmp eq i64 %97, 1000
br i1 %98, label %99, label %86
99: ; preds = %95
%100 = tail call i32 @fclose(i32* %58)
ret i32 0
}