; LLVM IR from jingweizhanghuai/Morn :: test (test_math)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__.test_sin_cos = external hidden unnamed_addr constant [13 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local float @error_calculate(ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

declare ptr @m_Malloc(i32 noundef) #2

declare i32 @m_Rand(i32 noundef, i32 noundef) #2

declare void @_mTimerBegin(ptr noundef) #2

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #2

declare void @m_Free(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @test_sin_cos() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  %12 = call ptr @m_Malloc(i32 noundef 80000000)
  store ptr %12, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  %13 = call ptr @m_Malloc(i32 noundef 80000000)
  store ptr %13, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %14 = call ptr @m_Malloc(i32 noundef 80000000)
  store ptr %14, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %15 = call ptr @m_Malloc(i32 noundef 80000000)
  store ptr %15, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %16

16:                                               ; preds = %39, %0
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = icmp slt i32 %17, 10000000
  br i1 %18, label %20, label %19

19:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %42

20:                                               ; preds = %16
  %21 = call i32 @m_Rand(i32 noundef -1000000000, i32 noundef 1000000000)
  %22 = sitofp i32 %21 to double
  %23 = fdiv double %22, 0x4132D68700000000
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = load i32, ptr %5, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds double, ptr %24, i64 %26
  store double %23, ptr %27, align 8, !tbaa !11
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds double, ptr %28, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !11
  %33 = fmul double %32, 0x400921FB54442D18
  %34 = fdiv double %33, 1.800000e+02
  %35 = load ptr, ptr %1, align 8, !tbaa !5
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds double, ptr %35, i64 %37
  store double %34, ptr %38, align 8, !tbaa !11
  br label %39

39:                                               ; preds = %20
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %5, align 4, !tbaa !9
  br label %16, !llvm.loop !13

42:                                               ; preds = %19
  call void @_mTimerBegin(ptr noundef @.str.16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %58, %42
  %44 = load i32, ptr %6, align 4, !tbaa !9
  %45 = icmp slt i32 %44, 10000000
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %61

47:                                               ; preds = %43
  %48 = load ptr, ptr %1, align 8, !tbaa !5
  %49 = load i32, ptr %6, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds double, ptr %48, i64 %50
  %52 = load double, ptr %51, align 8, !tbaa !11
  %53 = call double @sin(double noundef %52) #4
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds double, ptr %54, i64 %56
  store double %53, ptr %57, align 8, !tbaa !11
  br label %58

58:                                               ; preds = %47
  %59 = load i32, ptr %6, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %6, align 4, !tbaa !9
  br label %43, !llvm.loop !15

61:                                               ; preds = %46
  %62 = call float @_mTimerEnd(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 111, ptr noundef @__FUNCTION__.test_sin_cos)
  call void @_mTimerBegin(ptr noundef @.str.17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %78, %61
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = icmp slt i32 %64, 10000000
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %81

67:                                               ; preds = %63
  %68 = load ptr, ptr %2, align 8, !tbaa !5
  %69 = load i32, ptr %7, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds double, ptr %68, i64 %70
  %72 = load double, ptr %71, align 8, !tbaa !11
  %73 = call double @mSin(double noundef %72)
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds double, ptr %74, i64 %76
  store double %73, ptr %77, align 8, !tbaa !11
  br label %78

78:                                               ; preds = %67
  %79 = load i32, ptr %7, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %7, align 4, !tbaa !9
  br label %63, !llvm.loop !16

81:                                               ; preds = %66
  %82 = call float @_mTimerEnd(ptr noundef @.str.17, ptr noundef @.str.1, i32 noundef 112, ptr noundef @__FUNCTION__.test_sin_cos)
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = call float @error_calculate(ptr noundef %83, ptr noundef %84, i32 noundef 10000000)
  %86 = fpext float %85 to double
  %87 = call i32 (ptr, ...) @printf(ptr noundef @.str.18, double noundef %86)
  call void @_mTimerBegin(ptr noundef @.str.19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %103, %81
  %89 = load i32, ptr %8, align 4, !tbaa !9
  %90 = icmp slt i32 %89, 10000000
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %106

92:                                               ; preds = %88
  %93 = load ptr, ptr %1, align 8, !tbaa !5
  %94 = load i32, ptr %8, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %93, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !11
  %98 = call double @cos(double noundef %97) #4
  %99 = load ptr, ptr %3, align 8, !tbaa !5
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds double, ptr %99, i64 %101
  store double %98, ptr %102, align 8, !tbaa !11
  br label %103

103:                                              ; preds = %92
  %104 = load i32, ptr %8, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %8, align 4, !tbaa !9
  br label %88, !llvm.loop !17

106:                                              ; preds = %91
  %107 = call float @_mTimerEnd(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 115, ptr noundef @__FUNCTION__.test_sin_cos)
  call void @_mTimerBegin(ptr noundef @.str.20)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %123, %106
  %109 = load i32, ptr %9, align 4, !tbaa !9
  %110 = icmp slt i32 %109, 10000000
  br i1 %110, label %112, label %111

111:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %126

112:                                              ; preds = %108
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = load i32, ptr %9, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds double, ptr %113, i64 %115
  %117 = load double, ptr %116, align 8, !tbaa !11
  %118 = call double @mCos(double noundef %117)
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds double, ptr %119, i64 %121
  store double %118, ptr %122, align 8, !tbaa !11
  br label %123

123:                                              ; preds = %112
  %124 = load i32, ptr %9, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %9, align 4, !tbaa !9
  br label %108, !llvm.loop !18

126:                                              ; preds = %111
  %127 = call float @_mTimerEnd(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 116, ptr noundef @__FUNCTION__.test_sin_cos)
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = call float @error_calculate(ptr noundef %128, ptr noundef %129, i32 noundef 10000000)
  %131 = fpext float %130 to double
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.21, double noundef %131)
  call void @_mTimerBegin(ptr noundef @.str.22)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %133

133:                                              ; preds = %148, %126
  %134 = load i32, ptr %10, align 4, !tbaa !9
  %135 = icmp slt i32 %134, 10000000
  br i1 %135, label %137, label %136

136:                                              ; preds = %133
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %151

137:                                              ; preds = %133
  %138 = load ptr, ptr %1, align 8, !tbaa !5
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds double, ptr %138, i64 %140
  %142 = load double, ptr %141, align 8, !tbaa !11
  %143 = call double @tan(double noundef %142) #4
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds double, ptr %144, i64 %146
  store double %143, ptr %147, align 8, !tbaa !11
  br label %148

148:                                              ; preds = %137
  %149 = load i32, ptr %10, align 4, !tbaa !9
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %10, align 4, !tbaa !9
  br label %133, !llvm.loop !19

151:                                              ; preds = %136
  %152 = call float @_mTimerEnd(ptr noundef @.str.22, ptr noundef @.str.1, i32 noundef 119, ptr noundef @__FUNCTION__.test_sin_cos)
  call void @_mTimerBegin(ptr noundef @.str.23)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %153

153:                                              ; preds = %168, %151
  %154 = load i32, ptr %11, align 4, !tbaa !9
  %155 = icmp slt i32 %154, 10000000
  br i1 %155, label %157, label %156

156:                                              ; preds = %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %171

157:                                              ; preds = %153
  %158 = load ptr, ptr %2, align 8, !tbaa !5
  %159 = load i32, ptr %11, align 4, !tbaa !9
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds double, ptr %158, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !11
  %163 = call double @mTan(double noundef %162)
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = load i32, ptr %11, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds double, ptr %164, i64 %166
  store double %163, ptr %167, align 8, !tbaa !11
  br label %168

168:                                              ; preds = %157
  %169 = load i32, ptr %11, align 4, !tbaa !9
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %11, align 4, !tbaa !9
  br label %153, !llvm.loop !20

171:                                              ; preds = %156
  %172 = call float @_mTimerEnd(ptr noundef @.str.23, ptr noundef @.str.1, i32 noundef 120, ptr noundef @__FUNCTION__.test_sin_cos)
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = load ptr, ptr %4, align 8, !tbaa !5
  %175 = call float @error_calculate(ptr noundef %173, ptr noundef %174, i32 noundef 10000000)
  %176 = fpext float %175 to double
  %177 = call i32 (ptr, ...) @printf(ptr noundef @.str.24, double noundef %176)
  %178 = load ptr, ptr %1, align 8, !tbaa !5
  call void @m_Free(ptr noundef %178)
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  call void @m_Free(ptr noundef %179)
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  call void @m_Free(ptr noundef %180)
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  call void @m_Free(ptr noundef %181)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  ret void
}

; Function Attrs: nounwind
declare double @sin(double noundef) #3

declare double @mSin(double noundef) #2

; Function Attrs: nounwind
declare double @cos(double noundef) #3

declare double @mCos(double noundef) #2

; Function Attrs: nounwind
declare double @tan(double noundef) #3

declare double @mTan(double noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.1 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@__FUNCTION__.test_sin_cos = external hidden unnamed_addr constant [13 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local float @error_calculate(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @m_Malloc(i32 noundef) local_unnamed_addr #1

declare i32 @m_Rand(i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @_mTimerBegin(ptr noundef) local_unnamed_addr #1

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

declare void @m_Free(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local void @test_sin_cos() local_unnamed_addr #0 {
  %1 = tail call ptr @m_Malloc(i32 noundef 80000000) #4
  %2 = tail call ptr @m_Malloc(i32 noundef 80000000) #4
  %3 = tail call ptr @m_Malloc(i32 noundef 80000000) #4
  %4 = tail call ptr @m_Malloc(i32 noundef 80000000) #4
  br label %6

5:                                                ; preds = %6
  tail call void @_mTimerBegin(ptr noundef nonnull @.str.16) #4
  br label %16

6:                                                ; preds = %0, %6
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %6 ]
  %7 = tail call i32 @m_Rand(i32 noundef -1000000000, i32 noundef 1000000000) #4
  %8 = sitofp i32 %7 to double
  %9 = fdiv double %8, 0x4132D68700000000
  %10 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  store double %9, ptr %10, align 8, !tbaa !5
  %11 = fmul double %9, 0x400921FB54442D18
  %12 = fdiv double %11, 1.800000e+02
  %13 = getelementptr inbounds double, ptr %1, i64 %indvars.iv
  store double %12, ptr %13, align 8, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 10000000
  br i1 %exitcond.not, label %5, label %6, !llvm.loop !9

14:                                               ; preds = %16
  %15 = tail call float @_mTimerEnd(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 111, ptr noundef nonnull @__FUNCTION__.test_sin_cos) #4
  tail call void @_mTimerBegin(ptr noundef nonnull @.str.17) #4
  br label %42

16:                                               ; preds = %16, %5
  %indvars.iv67 = phi i64 [ 0, %5 ], [ %indvars.iv.next68.4, %16 ]
  %17 = getelementptr inbounds double, ptr %1, i64 %indvars.iv67
  %18 = load double, ptr %17, align 8, !tbaa !5
  %19 = tail call double @sin(double noundef %18) #4
  %20 = getelementptr inbounds double, ptr %3, i64 %indvars.iv67
  store double %19, ptr %20, align 8, !tbaa !5
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %21 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next68
  %22 = load double, ptr %21, align 8, !tbaa !5
  %23 = tail call double @sin(double noundef %22) #4
  %24 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next68
  store double %23, ptr %24, align 8, !tbaa !5
  %indvars.iv.next68.1 = add nuw nsw i64 %indvars.iv67, 2
  %25 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next68.1
  %26 = load double, ptr %25, align 8, !tbaa !5
  %27 = tail call double @sin(double noundef %26) #4
  %28 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next68.1
  store double %27, ptr %28, align 8, !tbaa !5
  %indvars.iv.next68.2 = add nuw nsw i64 %indvars.iv67, 3
  %29 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next68.2
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = tail call double @sin(double noundef %30) #4
  %32 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next68.2
  store double %31, ptr %32, align 8, !tbaa !5
  %indvars.iv.next68.3 = add nuw nsw i64 %indvars.iv67, 4
  %33 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next68.3
  %34 = load double, ptr %33, align 8, !tbaa !5
  %35 = tail call double @sin(double noundef %34) #4
  %36 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next68.3
  store double %35, ptr %36, align 8, !tbaa !5
  %indvars.iv.next68.4 = add nuw nsw i64 %indvars.iv67, 5
  %exitcond70.not.4 = icmp eq i64 %indvars.iv.next68.4, 10000000
  br i1 %exitcond70.not.4, label %14, label %16, !llvm.loop !11

37:                                               ; preds = %42
  %38 = tail call float @_mTimerEnd(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.1, i32 noundef 112, ptr noundef nonnull @__FUNCTION__.test_sin_cos) #4
  %39 = tail call float @error_calculate(ptr noundef %3, ptr noundef nonnull %4, i32 noundef 10000000)
  %40 = fpext float %39 to double
  %41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18, double noundef %40)
  tail call void @_mTimerBegin(ptr noundef nonnull @.str.19) #4
  br label %49

42:                                               ; preds = %14, %42
  %indvars.iv71 = phi i64 [ 0, %14 ], [ %indvars.iv.next72, %42 ]
  %43 = getelementptr inbounds double, ptr %2, i64 %indvars.iv71
  %44 = load double, ptr %43, align 8, !tbaa !5
  %45 = tail call double @mSin(double noundef %44) #4
  %46 = getelementptr inbounds double, ptr %4, i64 %indvars.iv71
  store double %45, ptr %46, align 8, !tbaa !5
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond74.not = icmp eq i64 %indvars.iv.next72, 10000000
  br i1 %exitcond74.not, label %37, label %42, !llvm.loop !12

47:                                               ; preds = %49
  %48 = tail call float @_mTimerEnd(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 115, ptr noundef nonnull @__FUNCTION__.test_sin_cos) #4
  tail call void @_mTimerBegin(ptr noundef nonnull @.str.20) #4
  br label %75

49:                                               ; preds = %49, %37
  %indvars.iv75 = phi i64 [ 0, %37 ], [ %indvars.iv.next76.4, %49 ]
  %50 = getelementptr inbounds double, ptr %1, i64 %indvars.iv75
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = tail call double @cos(double noundef %51) #4
  %53 = getelementptr inbounds double, ptr %3, i64 %indvars.iv75
  store double %52, ptr %53, align 8, !tbaa !5
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %54 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next76
  %55 = load double, ptr %54, align 8, !tbaa !5
  %56 = tail call double @cos(double noundef %55) #4
  %57 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next76
  store double %56, ptr %57, align 8, !tbaa !5
  %indvars.iv.next76.1 = add nuw nsw i64 %indvars.iv75, 2
  %58 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next76.1
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = tail call double @cos(double noundef %59) #4
  %61 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next76.1
  store double %60, ptr %61, align 8, !tbaa !5
  %indvars.iv.next76.2 = add nuw nsw i64 %indvars.iv75, 3
  %62 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next76.2
  %63 = load double, ptr %62, align 8, !tbaa !5
  %64 = tail call double @cos(double noundef %63) #4
  %65 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next76.2
  store double %64, ptr %65, align 8, !tbaa !5
  %indvars.iv.next76.3 = add nuw nsw i64 %indvars.iv75, 4
  %66 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next76.3
  %67 = load double, ptr %66, align 8, !tbaa !5
  %68 = tail call double @cos(double noundef %67) #4
  %69 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next76.3
  store double %68, ptr %69, align 8, !tbaa !5
  %indvars.iv.next76.4 = add nuw nsw i64 %indvars.iv75, 5
  %exitcond78.not.4 = icmp eq i64 %indvars.iv.next76.4, 10000000
  br i1 %exitcond78.not.4, label %47, label %49, !llvm.loop !13

70:                                               ; preds = %75
  %71 = tail call float @_mTimerEnd(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 116, ptr noundef nonnull @__FUNCTION__.test_sin_cos) #4
  %72 = tail call float @error_calculate(ptr noundef %3, ptr noundef nonnull %4, i32 noundef 10000000)
  %73 = fpext float %72 to double
  %74 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21, double noundef %73)
  tail call void @_mTimerBegin(ptr noundef nonnull @.str.22) #4
  br label %82

75:                                               ; preds = %47, %75
  %indvars.iv79 = phi i64 [ 0, %47 ], [ %indvars.iv.next80, %75 ]
  %76 = getelementptr inbounds double, ptr %2, i64 %indvars.iv79
  %77 = load double, ptr %76, align 8, !tbaa !5
  %78 = tail call double @mCos(double noundef %77) #4
  %79 = getelementptr inbounds double, ptr %4, i64 %indvars.iv79
  store double %78, ptr %79, align 8, !tbaa !5
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next80, 10000000
  br i1 %exitcond82.not, label %70, label %75, !llvm.loop !14

80:                                               ; preds = %82
  %81 = tail call float @_mTimerEnd(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.1, i32 noundef 119, ptr noundef nonnull @__FUNCTION__.test_sin_cos) #4
  tail call void @_mTimerBegin(ptr noundef nonnull @.str.23) #4
  br label %108

82:                                               ; preds = %82, %70
  %indvars.iv83 = phi i64 [ 0, %70 ], [ %indvars.iv.next84.4, %82 ]
  %83 = getelementptr inbounds double, ptr %1, i64 %indvars.iv83
  %84 = load double, ptr %83, align 8, !tbaa !5
  %85 = tail call double @tan(double noundef %84) #4
  %86 = getelementptr inbounds double, ptr %3, i64 %indvars.iv83
  store double %85, ptr %86, align 8, !tbaa !5
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %87 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next84
  %88 = load double, ptr %87, align 8, !tbaa !5
  %89 = tail call double @tan(double noundef %88) #4
  %90 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next84
  store double %89, ptr %90, align 8, !tbaa !5
  %indvars.iv.next84.1 = add nuw nsw i64 %indvars.iv83, 2
  %91 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next84.1
  %92 = load double, ptr %91, align 8, !tbaa !5
  %93 = tail call double @tan(double noundef %92) #4
  %94 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next84.1
  store double %93, ptr %94, align 8, !tbaa !5
  %indvars.iv.next84.2 = add nuw nsw i64 %indvars.iv83, 3
  %95 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next84.2
  %96 = load double, ptr %95, align 8, !tbaa !5
  %97 = tail call double @tan(double noundef %96) #4
  %98 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next84.2
  store double %97, ptr %98, align 8, !tbaa !5
  %indvars.iv.next84.3 = add nuw nsw i64 %indvars.iv83, 4
  %99 = getelementptr inbounds double, ptr %1, i64 %indvars.iv.next84.3
  %100 = load double, ptr %99, align 8, !tbaa !5
  %101 = tail call double @tan(double noundef %100) #4
  %102 = getelementptr inbounds double, ptr %3, i64 %indvars.iv.next84.3
  store double %101, ptr %102, align 8, !tbaa !5
  %indvars.iv.next84.4 = add nuw nsw i64 %indvars.iv83, 5
  %exitcond86.not.4 = icmp eq i64 %indvars.iv.next84.4, 10000000
  br i1 %exitcond86.not.4, label %80, label %82, !llvm.loop !15

103:                                              ; preds = %108
  %104 = tail call float @_mTimerEnd(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.1, i32 noundef 120, ptr noundef nonnull @__FUNCTION__.test_sin_cos) #4
  %105 = tail call float @error_calculate(ptr noundef %3, ptr noundef nonnull %4, i32 noundef 10000000)
  %106 = fpext float %105 to double
  %107 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24, double noundef %106)
  tail call void @m_Free(ptr noundef %1) #4
  tail call void @m_Free(ptr noundef nonnull %2) #4
  tail call void @m_Free(ptr noundef %3) #4
  tail call void @m_Free(ptr noundef nonnull %4) #4
  ret void

108:                                              ; preds = %80, %108
  %indvars.iv87 = phi i64 [ 0, %80 ], [ %indvars.iv.next88, %108 ]
  %109 = getelementptr inbounds double, ptr %2, i64 %indvars.iv87
  %110 = load double, ptr %109, align 8, !tbaa !5
  %111 = tail call double @mTan(double noundef %110) #4
  %112 = getelementptr inbounds double, ptr %4, i64 %indvars.iv87
  store double %111, ptr %112, align 8, !tbaa !5
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next88, 10000000
  br i1 %exitcond90.not, label %103, label %108, !llvm.loop !16
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #3

declare double @mSin(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #3

declare double @mCos(double noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @tan(double noundef) local_unnamed_addr #3

declare double @mTan(double noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass