; LLVM IR from alexzheng42/sDMD :: analysis (RMSD)

; 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"

%struct.REMDStr = type { i32, i32 }
%struct.PESurStr = type { i32, double }
%struct.FileStr = type { i32, [256 x i8] }

@stdout = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@path = external global [1024 x i8], align 16
@files = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [116 x i8], align 1
@EnSurGrid = external dso_local global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [30 x i8], align 1
@RE = external global %struct.REMDStr, align 4
@.str.22 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

declare i32 @fflush(ptr noundef) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

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

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

declare i32 @fclose(ptr noundef) #1

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @REMDPESurfaceCombine() #5 {
  %1 = alloca i32, align 4
  %2 = alloca double, align 8
  %3 = alloca [1024 x i8], align 16
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %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
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 1024, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %15 = call i32 (ptr, ...) @printf(ptr noundef @.str.22)
  %16 = load ptr, ptr @stdout, align 8, !tbaa !5
  %17 = call i32 @fflush(ptr noundef %16)
  %18 = call noalias ptr @calloc(i64 noundef 20, i64 noundef 8) #8
  store ptr %18, ptr @EnSurGrid, align 8, !tbaa !5
  %19 = call noalias ptr @calloc(i64 noundef 400, i64 noundef 16) #8
  %20 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %21 = getelementptr inbounds ptr, ptr %20, i64 0
  store ptr %19, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %38, %0
  %23 = load i32, ptr %6, align 4, !tbaa !9
  %24 = icmp slt i32 %23, 20
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %41

26:                                               ; preds = %22
  %27 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %28 = getelementptr inbounds ptr, ptr %27, i64 0
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = mul nsw i32 %30, 20
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds %struct.PESurStr, ptr %29, i64 %32
  %34 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds ptr, ptr %34, i64 %36
  store ptr %33, ptr %37, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %26
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %6, align 4, !tbaa !9
  br label %22, !llvm.loop !11

41:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %74, %41
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp slt i32 %43, 20
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %77

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %47

47:                                               ; preds = %70, %46
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = icmp slt i32 %48, 20
  br i1 %49, label %51, label %50

50:                                               ; preds = %47
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %73

51:                                               ; preds = %47
  %52 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %52, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = load i32, ptr %9, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %struct.PESurStr, ptr %56, i64 %58
  %60 = getelementptr inbounds %struct.PESurStr, ptr %59, i32 0, i32 0
  store i32 0, ptr %60, align 8, !tbaa !13
  %61 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %61, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %struct.PESurStr, ptr %65, i64 %67
  %69 = getelementptr inbounds %struct.PESurStr, ptr %68, i32 0, i32 1
  store double 0.000000e+00, ptr %69, align 8, !tbaa !16
  br label %70

70:                                               ; preds = %51
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %9, align 4, !tbaa !9
  br label %47, !llvm.loop !17

73:                                               ; preds = %50
  br label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %7, align 4, !tbaa !9
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %7, align 4, !tbaa !9
  br label %42, !llvm.loop !18

77:                                               ; preds = %45
  %78 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %79 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %78, ptr noundef @.str.3, ptr noundef @path, ptr noundef @.str.23) #7
  %80 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %81 = call noalias ptr @fopen(ptr noundef %80, ptr noundef @.str.4)
  store ptr %81, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %165, %77
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr getelementptr inbounds (%struct.REMDStr, ptr @RE, i32 0, i32 1), align 4, !tbaa !19
  %85 = icmp slt i32 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %168

87:                                               ; preds = %82
  %88 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %89 = load ptr, ptr @files, align 8, !tbaa !5
  %90 = getelementptr inbounds ptr, ptr %89, i64 15
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds %struct.FileStr, ptr %91, i64 %93
  %95 = getelementptr inbounds %struct.FileStr, ptr %94, i32 0, i32 1
  %96 = getelementptr inbounds [256 x i8], ptr %95, i64 0, i64 0
  %97 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %88, ptr noundef @.str.3, ptr noundef @path, ptr noundef %96) #7
  %98 = getelementptr inbounds [1024 x i8], ptr %3, i64 0, i64 0
  %99 = call noalias ptr @fopen(ptr noundef %98, ptr noundef @.str.8)
  store ptr %99, ptr %4, align 8, !tbaa !5
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = icmp eq ptr %100, null
  br i1 %101, label %102, label %112

102:                                              ; preds = %87
  %103 = load ptr, ptr @files, align 8, !tbaa !5
  %104 = getelementptr inbounds ptr, ptr %103, i64 15
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = load i32, ptr %10, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds %struct.FileStr, ptr %105, i64 %107
  %109 = getelementptr inbounds %struct.FileStr, ptr %108, i32 0, i32 1
  %110 = getelementptr inbounds [256 x i8], ptr %109, i64 0, i64 0
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef %110, ptr noundef @path, ptr noundef @.str.2, i32 noundef 421)
  call void @exit(i32 noundef 1) #9
  unreachable

112:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %159, %112
  %114 = load i32, ptr %11, align 4, !tbaa !9
  %115 = icmp slt i32 %114, 20
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %162

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %155, %117
  %119 = load i32, ptr %12, align 4, !tbaa !9
  %120 = icmp slt i32 %119, 20
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %158

122:                                              ; preds = %118
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %123, ptr noundef @.str.24, ptr noundef %2, ptr noundef %2, ptr noundef %2, ptr noundef %1)
  %125 = load i32, ptr %1, align 4, !tbaa !9
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %154

127:                                              ; preds = %122
  %128 = load double, ptr %2, align 8, !tbaa !21
  %129 = load i32, ptr %1, align 4, !tbaa !9
  %130 = sitofp i32 %129 to double
  %131 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds ptr, ptr %131, i64 %133
  %135 = load ptr, ptr %134, align 8, !tbaa !5
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.PESurStr, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.PESurStr, ptr %138, i32 0, i32 1
  %140 = load double, ptr %139, align 8, !tbaa !16
  %141 = call double @llvm.fmuladd.f64(double %128, double %130, double %140)
  store double %141, ptr %139, align 8, !tbaa !16
  %142 = load i32, ptr %1, align 4, !tbaa !9
  %143 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %144 = load i32, ptr %11, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds ptr, ptr %143, i64 %145
  %147 = load ptr, ptr %146, align 8, !tbaa !5
  %148 = load i32, ptr %12, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds %struct.PESurStr, ptr %147, i64 %149
  %151 = getelementptr inbounds %struct.PESurStr, ptr %150, i32 0, i32 0
  %152 = load i32, ptr %151, align 8, !tbaa !13
  %153 = add nsw i32 %152, %142
  store i32 %153, ptr %151, align 8, !tbaa !13
  br label %154

154:                                              ; preds = %127, %122
  br label %155

155:                                              ; preds = %154
  %156 = load i32, ptr %12, align 4, !tbaa !9
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %12, align 4, !tbaa !9
  br label %118, !llvm.loop !22

158:                                              ; preds = %121
  br label %159

159:                                              ; preds = %158
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %11, align 4, !tbaa !9
  br label %113, !llvm.loop !23

162:                                              ; preds = %116
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = call i32 @fclose(ptr noundef %163)
  br label %165

165:                                              ; preds = %162
  %166 = load i32, ptr %10, align 4, !tbaa !9
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %10, align 4, !tbaa !9
  br label %82, !llvm.loop !24

168:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %169

169:                                              ; preds = %248, %168
  %170 = load i32, ptr %13, align 4, !tbaa !9
  %171 = icmp slt i32 %170, 20
  br i1 %171, label %173, label %172

172:                                              ; preds = %169
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %251

173:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %244, %173
  %175 = load i32, ptr %14, align 4, !tbaa !9
  %176 = icmp slt i32 %175, 20
  br i1 %176, label %178, label %177

177:                                              ; preds = %174
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %247

178:                                              ; preds = %174
  %179 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %180 = load i32, ptr %13, align 4, !tbaa !9
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds ptr, ptr %179, i64 %181
  %183 = load ptr, ptr %182, align 8, !tbaa !5
  %184 = load i32, ptr %14, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds %struct.PESurStr, ptr %183, i64 %185
  %187 = getelementptr inbounds %struct.PESurStr, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 8, !tbaa !13
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %213

190:                                              ; preds = %178
  %191 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds ptr, ptr %191, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !5
  %196 = load i32, ptr %14, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds %struct.PESurStr, ptr %195, i64 %197
  %199 = getelementptr inbounds %struct.PESurStr, ptr %198, i32 0, i32 0
  %200 = load i32, ptr %199, align 8, !tbaa !13
  %201 = sitofp i32 %200 to double
  %202 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %203 = load i32, ptr %13, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds ptr, ptr %202, i64 %204
  %206 = load ptr, ptr %205, align 8, !tbaa !5
  %207 = load i32, ptr %14, align 4, !tbaa !9
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds %struct.PESurStr, ptr %206, i64 %208
  %210 = getelementptr inbounds %struct.PESurStr, ptr %209, i32 0, i32 1
  %211 = load double, ptr %210, align 8, !tbaa !16
  %212 = fdiv double %211, %201
  store double %212, ptr %210, align 8, !tbaa !16
  br label %213

213:                                              ; preds = %190, %178
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = load i32, ptr %13, align 4, !tbaa !9
  %216 = sitofp i32 %215 to double
  %217 = fadd double %216, 5.000000e-01
  %218 = fdiv double %217, 2.000000e+01
  %219 = load i32, ptr %14, align 4, !tbaa !9
  %220 = sitofp i32 %219 to double
  %221 = fadd double %220, 5.000000e-01
  %222 = fdiv double %221, 2.000000e+01
  %223 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %224 = load i32, ptr %13, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds ptr, ptr %223, i64 %225
  %227 = load ptr, ptr %226, align 8, !tbaa !5
  %228 = load i32, ptr %14, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds %struct.PESurStr, ptr %227, i64 %229
  %231 = getelementptr inbounds %struct.PESurStr, ptr %230, i32 0, i32 1
  %232 = load double, ptr %231, align 8, !tbaa !16
  %233 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %234 = load i32, ptr %13, align 4, !tbaa !9
  %235 = sext i32 %234 to i64
  %236 = getelementptr inbounds ptr, ptr %233, i64 %235
  %237 = load ptr, ptr %236, align 8, !tbaa !5
  %238 = load i32, ptr %14, align 4, !tbaa !9
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds %struct.PESurStr, ptr %237, i64 %239
  %241 = getelementptr inbounds %struct.PESurStr, ptr %240, i32 0, i32 0
  %242 = load i32, ptr %241, align 8, !tbaa !13
  %243 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %214, ptr noundef @.str.20, double noundef %218, double noundef %222, double noundef %232, i32 noundef %242) #7
  br label %244

244:                                              ; preds = %213
  %245 = load i32, ptr %14, align 4, !tbaa !9
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %14, align 4, !tbaa !9
  br label %174, !llvm.loop !25

247:                                              ; preds = %177
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %13, align 4, !tbaa !9
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %13, align 4, !tbaa !9
  br label %169, !llvm.loop !26

251:                                              ; preds = %172
  %252 = load ptr, ptr %5, align 8, !tbaa !5
  %253 = call i32 @fclose(ptr noundef %252)
  %254 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %255 = getelementptr inbounds ptr, ptr %254, i64 0
  %256 = load ptr, ptr %255, align 8, !tbaa !5
  call void @free(ptr noundef %256) #7
  %257 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  call void @free(ptr noundef %257) #7
  store ptr null, ptr @EnSurGrid, align 8, !tbaa !5
  %258 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %259 = load ptr, ptr @stdout, align 8, !tbaa !5
  %260 = call i32 @fflush(ptr noundef %259)
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret void
}

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { noreturn 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 = { 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 allocsize(0,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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }
attributes #9 = { noreturn 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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !10, i64 0}
!14 = !{!"PESurStr", !10, i64 0, !15, i64 8}
!15 = !{!"double", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = !{!20, !10, i64 4}
!20 = !{!"REMDStr", !10, i64 0, !10, i64 4}
!21 = !{!15, !15, i64 0}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}


; 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"

%struct.REMDStr = type { i32, i32 }
%struct.FileStr = type { i32, [256 x i8] }
%struct.PESurStr = type { i32, double }

@stdout = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [5 x i8], align 1
@path = external global [1024 x i8], align 16
@files = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [116 x i8], align 1
@EnSurGrid = external dso_local local_unnamed_addr global ptr, align 8
@.str.20 = external hidden unnamed_addr constant [30 x i8], align 1
@RE = external local_unnamed_addr global %struct.REMDStr, align 4
@.str.22 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @sprintf(ptr noalias nocapture noundef writeonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local void @REMDPESurfaceCombine() local_unnamed_addr #5 {
.preheader59:
  %0 = alloca i32, align 4
  %1 = alloca double, align 8
  %2 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %0) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %2) #8
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22)
  %4 = load ptr, ptr @stdout, align 8, !tbaa !5
  %5 = tail call i32 @fflush(ptr noundef %4)
  %6 = tail call noalias dereferenceable_or_null(160) ptr @calloc(i64 noundef 20, i64 noundef 8) #9
  store ptr %6, ptr @EnSurGrid, align 8, !tbaa !5
  %7 = tail call noalias dereferenceable_or_null(6400) ptr @calloc(i64 noundef 400, i64 noundef 16) #9
  store ptr %7, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 320
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %8, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %7, i64 640
  %11 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %10, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %7, i64 960
  %13 = getelementptr inbounds i8, ptr %6, i64 24
  store ptr %12, ptr %13, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %7, i64 1280
  %15 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr %14, ptr %15, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %7, i64 1600
  %17 = getelementptr inbounds i8, ptr %6, i64 40
  store ptr %16, ptr %17, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %7, i64 1920
  %19 = getelementptr inbounds i8, ptr %6, i64 48
  store ptr %18, ptr %19, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %7, i64 2240
  %21 = getelementptr inbounds i8, ptr %6, i64 56
  store ptr %20, ptr %21, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %7, i64 2560
  %23 = getelementptr inbounds i8, ptr %6, i64 64
  store ptr %22, ptr %23, align 8, !tbaa !5
  %24 = getelementptr inbounds i8, ptr %7, i64 2880
  %25 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr %24, ptr %25, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %7, i64 3200
  %27 = getelementptr inbounds i8, ptr %6, i64 80
  store ptr %26, ptr %27, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %7, i64 3520
  %29 = getelementptr inbounds i8, ptr %6, i64 88
  store ptr %28, ptr %29, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %7, i64 3840
  %31 = getelementptr inbounds i8, ptr %6, i64 96
  store ptr %30, ptr %31, align 8, !tbaa !5
  %32 = getelementptr inbounds i8, ptr %7, i64 4160
  %33 = getelementptr inbounds i8, ptr %6, i64 104
  store ptr %32, ptr %33, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %7, i64 4480
  %35 = getelementptr inbounds i8, ptr %6, i64 112
  store ptr %34, ptr %35, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %7, i64 4800
  %37 = getelementptr inbounds i8, ptr %6, i64 120
  store ptr %36, ptr %37, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %7, i64 5120
  %39 = getelementptr inbounds i8, ptr %6, i64 128
  store ptr %38, ptr %39, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %7, i64 5440
  %41 = getelementptr inbounds i8, ptr %6, i64 136
  store ptr %40, ptr %41, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %7, i64 5760
  %43 = getelementptr inbounds i8, ptr %6, i64 144
  store ptr %42, ptr %43, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %7, i64 6080
  %45 = getelementptr inbounds i8, ptr %6, i64 152
  store ptr %44, ptr %45, align 8, !tbaa !5
  br label %.preheader58

.preheader58:                                     ; preds = %.preheader59, %.preheader58
  %indvars.iv = phi i64 [ 0, %.preheader59 ], [ %indvars.iv.next, %.preheader58 ]
  %46 = getelementptr inbounds ptr, ptr %6, i64 %indvars.iv
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  store i32 0, ptr %47, align 8, !tbaa !9
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  store double 0.000000e+00, ptr %48, align 8, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %47, i64 16
  store i32 0, ptr %49, align 8, !tbaa !9
  %50 = getelementptr inbounds i8, ptr %47, i64 24
  store double 0.000000e+00, ptr %50, align 8, !tbaa !13
  %51 = getelementptr inbounds i8, ptr %47, i64 32
  store i32 0, ptr %51, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %47, i64 40
  store double 0.000000e+00, ptr %52, align 8, !tbaa !13
  %53 = getelementptr inbounds i8, ptr %47, i64 48
  store i32 0, ptr %53, align 8, !tbaa !9
  %54 = getelementptr inbounds i8, ptr %47, i64 56
  store double 0.000000e+00, ptr %54, align 8, !tbaa !13
  %55 = getelementptr inbounds i8, ptr %47, i64 64
  store i32 0, ptr %55, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %47, i64 72
  store double 0.000000e+00, ptr %56, align 8, !tbaa !13
  %57 = getelementptr inbounds i8, ptr %47, i64 80
  store i32 0, ptr %57, align 8, !tbaa !9
  %58 = getelementptr inbounds i8, ptr %47, i64 88
  store double 0.000000e+00, ptr %58, align 8, !tbaa !13
  %59 = getelementptr inbounds i8, ptr %47, i64 96
  store i32 0, ptr %59, align 8, !tbaa !9
  %60 = getelementptr inbounds i8, ptr %47, i64 104
  store double 0.000000e+00, ptr %60, align 8, !tbaa !13
  %61 = getelementptr inbounds i8, ptr %47, i64 112
  store i32 0, ptr %61, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %47, i64 120
  store double 0.000000e+00, ptr %62, align 8, !tbaa !13
  %63 = getelementptr inbounds i8, ptr %47, i64 128
  store i32 0, ptr %63, align 8, !tbaa !9
  %64 = getelementptr inbounds i8, ptr %47, i64 136
  store double 0.000000e+00, ptr %64, align 8, !tbaa !13
  %65 = getelementptr inbounds i8, ptr %47, i64 144
  store i32 0, ptr %65, align 8, !tbaa !9
  %66 = getelementptr inbounds i8, ptr %47, i64 152
  store double 0.000000e+00, ptr %66, align 8, !tbaa !13
  %67 = getelementptr inbounds i8, ptr %47, i64 160
  store i32 0, ptr %67, align 8, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %47, i64 168
  store double 0.000000e+00, ptr %68, align 8, !tbaa !13
  %69 = getelementptr inbounds i8, ptr %47, i64 176
  store i32 0, ptr %69, align 8, !tbaa !9
  %70 = getelementptr inbounds i8, ptr %47, i64 184
  store double 0.000000e+00, ptr %70, align 8, !tbaa !13
  %71 = getelementptr inbounds i8, ptr %47, i64 192
  store i32 0, ptr %71, align 8, !tbaa !9
  %72 = getelementptr inbounds i8, ptr %47, i64 200
  store double 0.000000e+00, ptr %72, align 8, !tbaa !13
  %73 = getelementptr inbounds i8, ptr %47, i64 208
  store i32 0, ptr %73, align 8, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %47, i64 216
  store double 0.000000e+00, ptr %74, align 8, !tbaa !13
  %75 = getelementptr inbounds i8, ptr %47, i64 224
  store i32 0, ptr %75, align 8, !tbaa !9
  %76 = getelementptr inbounds i8, ptr %47, i64 232
  store double 0.000000e+00, ptr %76, align 8, !tbaa !13
  %77 = getelementptr inbounds i8, ptr %47, i64 240
  store i32 0, ptr %77, align 8, !tbaa !9
  %78 = getelementptr inbounds i8, ptr %47, i64 248
  store double 0.000000e+00, ptr %78, align 8, !tbaa !13
  %79 = getelementptr inbounds i8, ptr %47, i64 256
  store i32 0, ptr %79, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %47, i64 264
  store double 0.000000e+00, ptr %80, align 8, !tbaa !13
  %81 = getelementptr inbounds i8, ptr %47, i64 272
  store i32 0, ptr %81, align 8, !tbaa !9
  %82 = getelementptr inbounds i8, ptr %47, i64 280
  store double 0.000000e+00, ptr %82, align 8, !tbaa !13
  %83 = getelementptr inbounds i8, ptr %47, i64 288
  store i32 0, ptr %83, align 8, !tbaa !9
  %84 = getelementptr inbounds i8, ptr %47, i64 296
  store double 0.000000e+00, ptr %84, align 8, !tbaa !13
  %85 = getelementptr inbounds i8, ptr %47, i64 304
  store i32 0, ptr %85, align 8, !tbaa !9
  %86 = getelementptr inbounds i8, ptr %47, i64 312
  store double 0.000000e+00, ptr %86, align 8, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 20
  br i1 %exitcond.not, label %87, label %.preheader58, !llvm.loop !14

87:                                               ; preds = %.preheader58
  %88 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @path, ptr noundef nonnull @.str.23) #8
  %89 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.4)
  %90 = load i32, ptr getelementptr inbounds (i8, ptr @RE, i64 4), align 4, !tbaa !16
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %.lr.ph, label %.preheader.preheader

.preheader.preheader:                             ; preds = %105, %87
  br label %.preheader

.lr.ph:                                           ; preds = %87, %105
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %105 ], [ 0, %87 ]
  %92 = load ptr, ptr @files, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 120
  %94 = load ptr, ptr %93, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.FileStr, ptr %94, i64 %indvars.iv80, i32 1
  %96 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull @path, ptr noundef nonnull %95) #8
  %97 = call noalias ptr @fopen(ptr noundef nonnull %2, ptr noundef nonnull @.str.8)
  %98 = icmp eq ptr %97, null
  br i1 %98, label %99, label %.preheader56

99:                                               ; preds = %.lr.ph
  %100 = load ptr, ptr @files, align 8, !tbaa !5
  %101 = getelementptr inbounds i8, ptr %100, i64 120
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.FileStr, ptr %102, i64 %indvars.iv80, i32 1
  %104 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull %103, ptr noundef nonnull @path, ptr noundef nonnull @.str.2, i32 noundef 421)
  call void @exit(i32 noundef 1) #10
  unreachable

.preheader56:                                     ; preds = %.lr.ph, %110
  %indvars.iv76 = phi i64 [ %indvars.iv.next77, %110 ], [ 0, %.lr.ph ]
  br label %111

105:                                              ; preds = %110
  %106 = call i32 @fclose(ptr noundef nonnull %97)
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @RE, i64 4), align 4, !tbaa !16
  %108 = sext i32 %107 to i64
  %109 = icmp slt i64 %indvars.iv.next81, %108
  br i1 %109, label %.lr.ph, label %.preheader.preheader, !llvm.loop !18

110:                                              ; preds = %126
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next77, 20
  br i1 %exitcond79.not, label %105, label %.preheader56, !llvm.loop !19

111:                                              ; preds = %.preheader56, %126
  %indvars.iv72 = phi i64 [ 0, %.preheader56 ], [ %indvars.iv.next73, %126 ]
  %112 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef nonnull %97, ptr noundef nonnull @.str.24, ptr noundef nonnull %1, ptr noundef nonnull %1, ptr noundef nonnull %1, ptr noundef nonnull %0) #8
  %113 = load i32, ptr %0, align 4, !tbaa !20
  %.not54 = icmp eq i32 %113, 0
  br i1 %.not54, label %126, label %114

114:                                              ; preds = %111
  %115 = load double, ptr %1, align 8, !tbaa !21
  %116 = sitofp i32 %113 to double
  %117 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %118 = getelementptr inbounds ptr, ptr %117, i64 %indvars.iv76
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.PESurStr, ptr %119, i64 %indvars.iv72, i32 1
  %121 = load double, ptr %120, align 8, !tbaa !13
  %122 = call double @llvm.fmuladd.f64(double %115, double %116, double %121)
  store double %122, ptr %120, align 8, !tbaa !13
  %123 = getelementptr inbounds %struct.PESurStr, ptr %119, i64 %indvars.iv72
  %124 = load i32, ptr %123, align 8, !tbaa !9
  %125 = add nsw i32 %124, %113
  store i32 %125, ptr %123, align 8, !tbaa !9
  br label %126

126:                                              ; preds = %111, %114
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next73, 20
  br i1 %exitcond75.not, label %110, label %111, !llvm.loop !22

.preheader:                                       ; preds = %.preheader.preheader, %139
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %139 ], [ 0, %.preheader.preheader ]
  %127 = trunc nuw nsw i64 %indvars.iv87 to i32
  %128 = uitofp nneg i32 %127 to double
  %129 = fadd double %128, 5.000000e-01
  %130 = fdiv double %129, 2.000000e+01
  br label %140

131:                                              ; preds = %139
  %132 = call i32 @fclose(ptr noundef %89)
  %133 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %134 = load ptr, ptr %133, align 8, !tbaa !5
  call void @free(ptr noundef %134) #8
  %135 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  call void @free(ptr noundef %135) #8
  store ptr null, ptr @EnSurGrid, align 8, !tbaa !5
  %136 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  %137 = load ptr, ptr @stdout, align 8, !tbaa !5
  %138 = call i32 @fflush(ptr noundef %137)
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %0) #8
  ret void

139:                                              ; preds = %151
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next88, 20
  br i1 %exitcond90.not, label %131, label %.preheader, !llvm.loop !23

140:                                              ; preds = %.preheader, %151
  %indvars.iv83 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next84, %151 ]
  %141 = load ptr, ptr @EnSurGrid, align 8, !tbaa !5
  %142 = getelementptr inbounds ptr, ptr %141, i64 %indvars.iv87
  %143 = load ptr, ptr %142, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.PESurStr, ptr %143, i64 %indvars.iv83
  %145 = load i32, ptr %144, align 8, !tbaa !9
  %.not = icmp eq i32 %145, 0
  br i1 %.not, label %._crit_edge, label %146

._crit_edge:                                      ; preds = %140
  %.phi.trans.insert = getelementptr inbounds i8, ptr %144, i64 8
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !13
  br label %151

146:                                              ; preds = %140
  %147 = sitofp i32 %145 to double
  %148 = getelementptr inbounds i8, ptr %144, i64 8
  %149 = load double, ptr %148, align 8, !tbaa !13
  %150 = fdiv double %149, %147
  store double %150, ptr %148, align 8, !tbaa !13
  br label %151

151:                                              ; preds = %._crit_edge, %146
  %152 = phi double [ %.pre, %._crit_edge ], [ %150, %146 ]
  %153 = trunc nuw nsw i64 %indvars.iv83 to i32
  %154 = uitofp nneg i32 %153 to double
  %155 = fadd double %154, 5.000000e-01
  %156 = fdiv double %155, 2.000000e+01
  %157 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef nonnull @.str.20, double noundef %130, double noundef %156, double noundef %152, i32 noundef %145) #8
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond86.not = icmp eq i64 %indvars.iv.next84, 20
  br i1 %exitcond86.not, label %139, label %140, !llvm.loop !24
}

declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { noreturn 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 allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #5 = { 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 #6 = { "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 #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { noreturn 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, !11, i64 0}
!10 = !{!"PESurStr", !11, i64 0, !12, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!17, !11, i64 4}
!17 = !{!"REMDStr", !11, i64 0, !11, i64 4}
!18 = distinct !{!18, !15}
!19 = distinct !{!19, !15}
!20 = !{!11, !11, i64 0}
!21 = !{!12, !12, i64 0}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass