#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 (i = 1; i < 1000; ++i) {
        for (j = 2; j < 1000; ++j) {
          for (int k = 0; k < 100; ++k)
            a[i][j] = sin(0.01 * a[i - 1][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("5.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    $0x7a1260,%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   $0x1,-0x7a1214(%rbp)
cmpl   $0x3e8,-0x7a1214(%rbp)
jge    131a <main+0x1ba>
movl   $0x2,-0x7a1218(%rbp)
cmpl   $0x3e8,-0x7a1218(%rbp)
jge    1301 <main+0x1a1>
movl   $0x0,-0x7a125c(%rbp)
cmpl   $0x64,-0x7a125c(%rbp)
jge    12e8 <main+0x188>
mov    -0x7a1214(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x7a1210(%rbp),%rax
imul   $0x1f40,%rcx,%rcx
add    %rcx,%rax
mov    -0x7a1218(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  0xd62(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
call   1070 <sin@plt>
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    -0x7a125c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a125c(%rbp)
jmp    1268 <main+0x108>
jmp    12ed <main+0x18d>
mov    -0x7a1218(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1218(%rbp)
jmp    124e <main+0xee>
jmp    1306 <main+0x1a6>
mov    -0x7a1214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1214(%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  0xc8b(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x7a1228(%rbp)
ff
movsd  -0x7a1228(%rbp),%xmm0
ff
lea    0xc7c(%rip),%rdi
call   1040 <printf@plt>
lea    0xc77(%rip),%rdi
lea    0xc76(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x7a1220(%rbp)
movl   $0x0,-0x7a1214(%rbp)
cmpl   $0x3e8,-0x7a1214(%rbp)
jge    145d <main+0x2fd>
movl   $0x0,-0x7a1218(%rbp)
cmpl   $0x3e8,-0x7a1218(%rbp)
jge    1434 <main+0x2d4>
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    0xc06(%rip),%rsi
mov    $0x1,%al
call   1060 <fprintf@plt>
mov    -0x7a1218(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1218(%rbp)
jmp    13d7 <main+0x277>
mov    -0x7a1220(%rbp),%rdi
lea    0xbd3(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x7a1214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7a1214(%rbp)
jmp    13bd <main+0x25d>
mov    -0x7a1220(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x7a1260,%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>
lea    0x20(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
mov    $0x1,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    -0x1(%r15),%r14
mov    $0x2,%ebx
nopl   0x0(%rax)
imul   $0x1f40,%r14,%rax
add    %rsp,%rax
add    $0x30,%rax
imul   $0x1f40,%r15,%rcx
add    %rsp,%rcx
add    $0x30,%rcx
lea    (%rcx,%rbx,8),%r12
movsd  -0x10(%rax,%rbx,8),%xmm0
mulsd  0xda2(%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    1290 <main+0x120>
movq   %xmm0,(%r12)
add    $0x1,%rbx
cmp    $0x3e8,%rbx
jne    1250 <main+0xe0>
add    $0x1,%r15
cmp    $0x3e8,%r15
jne    1240 <main+0xd0>
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  0xcbe(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xcbb(%rip),%rdi
call   1040 <printf@plt>
lea    0xcb6(%rip),%rdi
lea    0xcb5(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r12
lea    0x30(%rsp),%rbp
lea    0xca3(%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    13b0 <main+0x240>
mov    $0xa,%edi
mov    %r12,%rsi
call   1060 <fputc@plt>
add    $0x1,%r15
add    $0x1f40,%rbp
cmp    $0x3e8,%r15
jne    13a0 <main+0x230>
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"5.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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %16
16: ; preds = %39, %2
%17 = load i32, i32* %7
%18 = icmp slt i32 %17, 1000
br i1 %18, label %19, label %42
19: ; preds = %16
store i32 0, i32* %8
br label %20
20: ; preds = %35, %19
%21 = load i32, i32* %8
%22 = icmp slt i32 %21, 1000
br i1 %22, label %23, label %38
23: ; preds = %20
%24 = load i32, i32* %7
%25 = mul nsw i32 10, %24
%26 = load i32, i32* %8
%27 = add nsw i32 %25, %26
%28 = sitofp i32 %27 to double
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %6, i64 0, i64 %30
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [1000 x double], [1000 x double]* %31, i64 0, i64 %33
store double %28, double* %34
br label %35
35: ; preds = %23
%36 = load i32, i32* %8
%37 = add nsw i32 %36, 1
store i32 %37, i32* %8
br label %20
38: ; preds = %20
br label %39
39: ; preds = %38
%40 = load i32, i32* %7
%41 = add nsw i32 %40, 1
store i32 %41, i32* %7
br label %16
42: ; preds = %16
store double 0.000000e+00, double* %10
br label %43
43: ; preds = %42
%44 = call i32 @gettimeofday(%struct.timeval* %11, i32* null)
store i32 1, i32* %7
br label %45
45: ; preds = %82, %43
%46 = load i32, i32* %7
%47 = icmp slt i32 %46, 1000
br i1 %47, label %48, label %85
48: ; preds = %45
store i32 2, i32* %8
br label %49
49: ; preds = %78, %48
%50 = load i32, i32* %8
%51 = icmp slt i32 %50, 1000
br i1 %51, label %52, label %81
52: ; preds = %49
store i32 0, i32* %15
br label %53
53: ; preds = %74, %52
%54 = load i32, i32* %15
%55 = icmp slt i32 %54, 100
br i1 %55, label %56, label %77
56: ; preds = %53
%57 = load i32, i32* %7
%58 = sub nsw i32 %57, 1
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %6, i64 0, i64 %59
%61 = load i32, i32* %8
%62 = sub nsw i32 %61, 2
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [1000 x double], [1000 x double]* %60, i64 0, i64 %63
%65 = load double, double* %64
%66 = fmul double 1.000000e-02, %65
%67 = call double @sin(double %66)
%68 = load i32, i32* %7
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %6, i64 0, i64 %69
%71 = load i32, i32* %8
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [1000 x double], [1000 x double]* %70, i64 0, i64 %72
store double %67, double* %73
br label %74
74: ; preds = %56
%75 = load i32, i32* %15
%76 = add nsw i32 %75, 1
store i32 %76, i32* %15
br label %53
77: ; preds = %53
br label %78
78: ; preds = %77
%79 = load i32, i32* %8
%80 = add nsw i32 %79, 1
store i32 %80, i32* %8
br label %49
81: ; preds = %49
br label %82
82: ; preds = %81
%83 = load i32, i32* %7
%84 = add nsw i32 %83, 1
store i32 %84, i32* %7
br label %45
85: ; preds = %45
%86 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
%87 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
%88 = load i64, i64* %87
%89 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 0
%90 = load i64, i64* %89
%91 = sub nsw i64 %88, %90
store i64 %91, i64* %13
%92 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 1
%93 = load i64, i64* %92
%94 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 1
%95 = load i64, i64* %94
%96 = sub nsw i64 %93, %95
store i64 %96, i64* %14
%97 = load i64, i64* %13
%98 = mul nsw i64 %97, 1000
%99 = sitofp i64 %98 to double
%100 = load i64, i64* %14
%101 = sitofp i64 %100 to double
%102 = fdiv double %101, 1.000000e+03
%103 = fadd double %99, %102
store double %103, double* %10
br label %104
104: ; preds = %85
%105 = load double, double* %10
%106 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %105)
%107 = 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* %107, i32** %9
store i32 0, i32* %7
br label %108
108: ; preds = %131, %104
%109 = load i32, i32* %7
%110 = icmp slt i32 %109, 1000
br i1 %110, label %111, label %134
111: ; preds = %108
store i32 0, i32* %8
br label %112
112: ; preds = %125, %111
%113 = load i32, i32* %8
%114 = icmp slt i32 %113, 1000
br i1 %114, label %115, label %128
115: ; preds = %112
%116 = load i32*, i32** %9
%117 = load i32, i32* %7
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %6, i64 0, i64 %118
%120 = load i32, i32* %8
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds [1000 x double], [1000 x double]* %119, i64 0, i64 %121
%123 = load double, double* %122
%124 = call i32 (i32*, i8*, ...) @fprintf(i32* %116, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %123)
br label %125
125: ; preds = %115
%126 = load i32, i32* %8
%127 = add nsw i32 %126, 1
store i32 %127, i32* %8
br label %112
128: ; preds = %112
%129 = load i32*, i32** %9
%130 = call i32 (i32*, i8*, ...) @fprintf(i32* %129, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %131
131: ; preds = %128
%132 = load i32, i32* %7
%133 = add nsw i32 %132, 1
store i32 %133, i32* %7
br label %108
134: ; preds = %108
%135 = load i32*, i32** %9
%136 = call i32 @fclose(i32* %135)
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"5.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 [ 1, %34 ], [ %66, %65 ]
%40 = add nsw i64 %39, -1
br label %41
41: ; preds = %38, %48
%42 = phi i64 [ 2, %38 ], [ %49, %48 ]
%43 = add nsw i64 %42, -2
%44 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %3, i64 0, i64 %40, i64 %43
%45 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %3, i64 0, i64 %39, i64 %42
%46 = load double, double* %44
%47 = fmul double %46, 1.000000e-02
br label %51
48: ; preds = %51
store double %62, double* %45
%49 = add nuw nsw i64 %42, 1
%50 = icmp eq i64 %49, 1000
br i1 %50, label %65, label %41
51: ; preds = %51, %41
%52 = phi i32 [ 0, %41 ], [ %63, %51 ]
%53 = tail call double @sin(double %47)
%54 = tail call double @sin(double %47)
%55 = tail call double @sin(double %47)
%56 = tail call double @sin(double %47)
%57 = tail call double @sin(double %47)
%58 = tail call double @sin(double %47)
%59 = tail call double @sin(double %47)
%60 = tail call double @sin(double %47)
%61 = tail call double @sin(double %47)
%62 = tail call double @sin(double %47)
%63 = add nuw nsw i32 %52, 10
%64 = icmp eq i32 %63, 100
br i1 %64, label %48, label %51
65: ; preds = %48
%66 = add nuw nsw i64 %39, 1
%67 = icmp eq i64 %66, 1000
br i1 %67, label %68, label %38
68: ; preds = %65
%69 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%70 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%71 = load i64, i64* %70
%72 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%73 = load i64, i64* %72
%74 = sub nsw i64 %71, %73
%75 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%76 = load i64, i64* %75
%77 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%78 = load i64, i64* %77
%79 = sub nsw i64 %76, %78
%80 = mul nsw i64 %74, 1000
%81 = sitofp i64 %80 to double
%82 = sitofp i64 %79 to double
%83 = fdiv double %82, 1.000000e+03
%84 = fadd double %83, %81
%85 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %84)
%86 = 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 %87
87: ; preds = %68, %96
%88 = phi i64 [ 0, %68 ], [ %98, %96 ]
br label %89
89: ; preds = %87, %89
%90 = phi i64 [ 0, %87 ], [ %94, %89 ]
%91 = getelementptr inbounds [1000 x [1000 x double]], [1000 x [1000 x double]]* %3, i64 0, i64 %88, i64 %90
%92 = load double, double* %91
%93 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %86, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %92)
%94 = add nuw nsw i64 %90, 1
%95 = icmp eq i64 %94, 1000
br i1 %95, label %96, label %89
96: ; preds = %89
%97 = tail call i32 @fputc(i32 10, i32* %86)
%98 = add nuw nsw i64 %88, 1
%99 = icmp eq i64 %98, 1000
br i1 %99, label %100, label %87
100: ; preds = %96
%101 = tail call i32 @fclose(i32* %86)
ret i32 0
}