; LLVM IR from alexzheng42/sDMD :: src (DMD)

; 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.CGGovStr = type { [2 x [16 x i8]], i32, i32, ptr, ptr }

@savedir = external dso_local global [1024 x i8], align 16
@currenttime = external dso_local global double, align 8
@countReCal = external dso_local global i64, align 8
@collisioneventsum = external dso_local global i64, align 8
@HBeventsum = external dso_local global i64, align 8
@bondeventsum = external dso_local global i64, align 8
@HBNeighboreventsum = external dso_local global i64, align 8
@thermostateventsum = external dso_local global i64, align 8
@pbcandcrosseventsum = external dso_local global i64, align 8
@walleventsum = external dso_local global i64, align 8
@CGeventsum = external dso_local global i64, align 8
@oldtotaleventsum = external dso_local global i64, align 8
@newtotaleventsum = external dso_local global i64, align 8
@warningsum = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@timestep = external dso_local global double, align 8
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@targetTemperature = external dso_local global double, align 8
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@outputrate = external dso_local global double, align 8
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@cutoffr = external dso_local global double, align 8
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@Methodtype = external dso_local global [20 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1
@thermostatType = external dso_local global [20 x i8], align 16
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@thermoF = external dso_local global double, align 8
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@CG = external dso_local global %struct.CGGovStr, align 8
@.str.13 = external hidden unnamed_addr constant [26 x i8], align 1
@wallExist = external dso_local global [20 x i8], align 16
@.str.14 = external hidden unnamed_addr constant [26 x i8], align 1
@wallType = external dso_local global [20 x i8], align 16
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@boxDimension = external dso_local global [4 x double], align 16
@.str.16 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [4 x i8], align 1
@neworcontinue = external dso_local global [20 x i8], align 16
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca [200 x i8], align 16
  %15 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 200, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %16 = call i64 @clock() #6
  store i64 %16, ptr %6, align 8, !tbaa !11
  %17 = load i32, ptr %4, align 4, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !9
  call void @InputData(i32 noundef %17, ptr noundef %18)
  %19 = load double, ptr @currenttime, align 8, !tbaa !13
  store double %19, ptr %11, align 8, !tbaa !13
  %20 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %22 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %24 = load double, ptr @currenttime, align 8, !tbaa !13
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %24)
  %26 = load double, ptr @timestep, align 8, !tbaa !13
  %27 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %26)
  %28 = load double, ptr @targetTemperature, align 8, !tbaa !13
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, double noundef %28)
  %30 = load double, ptr @outputrate, align 8, !tbaa !13
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, double noundef %30)
  %32 = load double, ptr @cutoffr, align 8, !tbaa !13
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, double noundef %32)
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, ptr noundef @Methodtype)
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, ptr noundef @thermostatType)
  %36 = load double, ptr @thermoF, align 8, !tbaa !13
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, double noundef %36)
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, ptr noundef @.str.12, ptr noundef @CG, ptr noundef getelementptr inbounds ([2 x [16 x i8]], ptr @CG, i64 0, i64 1))
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, ptr noundef @wallExist)
  %40 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, ptr noundef @wallType)
  %41 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 1), align 8, !tbaa !13
  %42 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !13
  %43 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 3), align 8, !tbaa !13
  %44 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, double noundef %41, double noundef %42, double noundef %43)
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.1)
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str.16)
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %48 = getelementptr inbounds [200 x i8], ptr %14, i64 0, i64 0
  %49 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %48, ptr noundef @.str.17, ptr noundef @savedir) #6
  %50 = call i32 @strncmp(ptr noundef @.str.18, ptr noundef @neworcontinue, i64 noundef 1) #7
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %56, label %52

52:                                               ; preds = %2
  %53 = getelementptr inbounds [200 x i8], ptr %14, i64 0, i64 0
  %54 = call noalias ptr @fopen(ptr noundef %53, ptr noundef @.str.19)
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %58

56:                                               ; preds = %52, %2
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.20)
  store double 0.000000e+00, ptr %12, align 8, !tbaa !13
  br label %91

58:                                               ; preds = %52
  %59 = getelementptr inbounds [200 x i8], ptr %14, i64 0, i64 0
  %60 = call noalias ptr @fopen(ptr noundef %59, ptr noundef @.str.21)
  store ptr %60, ptr %15, align 8, !tbaa !9
  %61 = load ptr, ptr %15, align 8, !tbaa !9
  %62 = call i64 @fread(ptr noundef %12, i64 noundef 8, i64 noundef 1, ptr noundef %61)
  %63 = load double, ptr @timestep, align 8, !tbaa !13
  %64 = load double, ptr @currenttime, align 8, !tbaa !13
  %65 = fsub double %63, %64
  %66 = fdiv double %65, 1.000000e+02
  %67 = load double, ptr %12, align 8, !tbaa !13
  %68 = fmul double %66, %67
  store double %68, ptr %13, align 8, !tbaa !13
  %69 = load double, ptr %13, align 8, !tbaa !13
  %70 = fdiv double %69, 3.600000e+03
  %71 = call double @llvm.floor.f64(double %70)
  store double %71, ptr %8, align 8, !tbaa !13
  %72 = load double, ptr %13, align 8, !tbaa !13
  %73 = load double, ptr %8, align 8, !tbaa !13
  %74 = fneg double %73
  %75 = call double @llvm.fmuladd.f64(double %74, double 3.600000e+03, double %72)
  %76 = fdiv double %75, 6.000000e+01
  %77 = call double @llvm.floor.f64(double %76)
  store double %77, ptr %9, align 8, !tbaa !13
  %78 = load double, ptr %13, align 8, !tbaa !13
  %79 = load double, ptr %8, align 8, !tbaa !13
  %80 = fneg double %79
  %81 = call double @llvm.fmuladd.f64(double %80, double 3.600000e+03, double %78)
  %82 = load double, ptr %9, align 8, !tbaa !13
  %83 = fneg double %82
  %84 = call double @llvm.fmuladd.f64(double %83, double 6.000000e+01, double %81)
  store double %84, ptr %10, align 8, !tbaa !13
  %85 = load double, ptr %8, align 8, !tbaa !13
  %86 = load double, ptr %9, align 8, !tbaa !13
  %87 = load double, ptr %10, align 8, !tbaa !13
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, double noundef %85, double noundef %86, double noundef %87)
  %89 = load ptr, ptr %15, align 8, !tbaa !9
  %90 = call i32 @fclose(ptr noundef %89)
  br label %91

91:                                               ; preds = %58, %56
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str.23)
  call void @ThreadProcess()
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  %94 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %96 = load i64, ptr @collisioneventsum, align 8, !tbaa !11
  %97 = load i64, ptr @bondeventsum, align 8, !tbaa !11
  %98 = add nsw i64 %96, %97
  %99 = load i64, ptr @HBeventsum, align 8, !tbaa !11
  %100 = add nsw i64 %98, %99
  %101 = load i64, ptr @HBNeighboreventsum, align 8, !tbaa !11
  %102 = add nsw i64 %100, %101
  %103 = load i64, ptr @thermostateventsum, align 8, !tbaa !11
  %104 = add nsw i64 %102, %103
  %105 = load i64, ptr @pbcandcrosseventsum, align 8, !tbaa !11
  %106 = add nsw i64 %104, %105
  %107 = load i64, ptr @walleventsum, align 8, !tbaa !11
  %108 = add nsw i64 %106, %107
  %109 = load i64, ptr @CGeventsum, align 8, !tbaa !11
  %110 = add nsw i64 %108, %109
  store i64 %110, ptr @newtotaleventsum, align 8, !tbaa !11
  %111 = load i64, ptr @countReCal, align 8, !tbaa !11
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.25, i64 noundef %111)
  %113 = load i64, ptr @collisioneventsum, align 8, !tbaa !11
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.26, i64 noundef %113)
  %115 = load i64, ptr @bondeventsum, align 8, !tbaa !11
  %116 = call i32 (ptr, ...) @printf(ptr noundef @.str.27, i64 noundef %115)
  %117 = load i64, ptr @HBeventsum, align 8, !tbaa !11
  %118 = call i32 (ptr, ...) @printf(ptr noundef @.str.28, i64 noundef %117)
  %119 = load i64, ptr @HBNeighboreventsum, align 8, !tbaa !11
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.29, i64 noundef %119)
  %121 = load i64, ptr @thermostateventsum, align 8, !tbaa !11
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.30, i64 noundef %121)
  %123 = load i64, ptr @pbcandcrosseventsum, align 8, !tbaa !11
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.31, i64 noundef %123)
  %125 = load i64, ptr @walleventsum, align 8, !tbaa !11
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.32, i64 noundef %125)
  %127 = load i64, ptr @CGeventsum, align 8, !tbaa !11
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.33, i64 noundef %127)
  %129 = load i64, ptr @thermostateventsum, align 8, !tbaa !11
  %130 = sitofp i64 %129 to float
  %131 = load i64, ptr @newtotaleventsum, align 8, !tbaa !11
  %132 = sitofp i64 %131 to float
  %133 = fdiv float %130, %132
  %134 = fmul float %133, 1.000000e+02
  %135 = fpext float %134 to double
  %136 = call i32 (ptr, ...) @printf(ptr noundef @.str.34, double noundef %135)
  %137 = load i64, ptr @warningsum, align 8, !tbaa !11
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str.35, i64 noundef %137)
  %139 = call i64 @clock() #6
  store i64 %139, ptr %7, align 8, !tbaa !11
  %140 = load i64, ptr %7, align 8, !tbaa !11
  %141 = load i64, ptr %6, align 8, !tbaa !11
  %142 = sub nsw i64 %140, %141
  %143 = sitofp i64 %142 to double
  %144 = fdiv double %143, 1.000000e+06
  %145 = fdiv double %144, 3.600000e+03
  %146 = call double @llvm.floor.f64(double %145)
  store double %146, ptr %8, align 8, !tbaa !13
  %147 = load i64, ptr %7, align 8, !tbaa !11
  %148 = load i64, ptr %6, align 8, !tbaa !11
  %149 = sub nsw i64 %147, %148
  %150 = sitofp i64 %149 to double
  %151 = fdiv double %150, 1.000000e+06
  %152 = load double, ptr %8, align 8, !tbaa !13
  %153 = fneg double %152
  %154 = call double @llvm.fmuladd.f64(double %153, double 3.600000e+03, double %151)
  %155 = fdiv double %154, 6.000000e+01
  %156 = call double @llvm.floor.f64(double %155)
  store double %156, ptr %9, align 8, !tbaa !13
  %157 = load i64, ptr %7, align 8, !tbaa !11
  %158 = load i64, ptr %6, align 8, !tbaa !11
  %159 = sub nsw i64 %157, %158
  %160 = sitofp i64 %159 to double
  %161 = fdiv double %160, 1.000000e+06
  %162 = load double, ptr %8, align 8, !tbaa !13
  %163 = fneg double %162
  %164 = call double @llvm.fmuladd.f64(double %163, double 3.600000e+03, double %161)
  %165 = load double, ptr %9, align 8, !tbaa !13
  %166 = fneg double %165
  %167 = call double @llvm.fmuladd.f64(double %166, double 6.000000e+01, double %164)
  store double %167, ptr %10, align 8, !tbaa !13
  %168 = load double, ptr %8, align 8, !tbaa !13
  %169 = load double, ptr %9, align 8, !tbaa !13
  %170 = load double, ptr %10, align 8, !tbaa !13
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.36, double noundef %168, double noundef %169, double noundef %170)
  %172 = load i64, ptr @newtotaleventsum, align 8, !tbaa !11
  %173 = load i64, ptr @oldtotaleventsum, align 8, !tbaa !11
  %174 = sub nsw i64 %172, %173
  %175 = call i32 (ptr, ...) @printf(ptr noundef @.str.37, i64 noundef %174)
  %176 = getelementptr inbounds [200 x i8], ptr %14, i64 0, i64 0
  %177 = call noalias ptr @fopen(ptr noundef %176, ptr noundef @.str.38)
  store ptr %177, ptr %15, align 8, !tbaa !9
  %178 = load double, ptr %8, align 8, !tbaa !13
  %179 = load double, ptr %9, align 8, !tbaa !13
  %180 = fmul double %179, 6.000000e+01
  %181 = call double @llvm.fmuladd.f64(double %178, double 3.600000e+03, double %180)
  %182 = load double, ptr %10, align 8, !tbaa !13
  %183 = fadd double %182, %181
  store double %183, ptr %10, align 8, !tbaa !13
  %184 = load double, ptr %10, align 8, !tbaa !13
  %185 = load double, ptr %12, align 8, !tbaa !13
  %186 = load double, ptr %11, align 8, !tbaa !13
  %187 = fmul double %185, %186
  %188 = fdiv double %187, 1.000000e+02
  %189 = fadd double %184, %188
  %190 = load double, ptr @timestep, align 8, !tbaa !13
  %191 = fdiv double %189, %190
  %192 = fmul double %191, 1.000000e+02
  store double %192, ptr %13, align 8, !tbaa !13
  %193 = load ptr, ptr %15, align 8, !tbaa !9
  %194 = call i64 @fwrite(ptr noundef %13, i64 noundef 8, i64 noundef 1, ptr noundef %193)
  %195 = load ptr, ptr %15, align 8, !tbaa !9
  %196 = call i32 @fclose(ptr noundef %195)
  call void @GlobalCloseFree()
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 200, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  ret i32 0
}

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

; Function Attrs: nounwind
declare i64 @clock() #2

declare void @InputData(i32 noundef, ptr noundef) #3

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #4

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

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

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

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

declare i32 @fclose(ptr noundef) #3

declare void @ThreadProcess() #3

declare i64 @fwrite(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare void @GlobalCloseFree() #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 willreturn memory(read) "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}


; 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.CGGovStr = type { [2 x [16 x i8]], i32, i32, ptr, ptr }

@savedir = external dso_local global [1024 x i8], align 16
@currenttime = external dso_local local_unnamed_addr global double, align 8
@countReCal = external dso_local local_unnamed_addr global i64, align 8
@collisioneventsum = external dso_local local_unnamed_addr global i64, align 8
@HBeventsum = external dso_local local_unnamed_addr global i64, align 8
@bondeventsum = external dso_local local_unnamed_addr global i64, align 8
@HBNeighboreventsum = external dso_local local_unnamed_addr global i64, align 8
@thermostateventsum = external dso_local local_unnamed_addr global i64, align 8
@pbcandcrosseventsum = external dso_local local_unnamed_addr global i64, align 8
@walleventsum = external dso_local local_unnamed_addr global i64, align 8
@CGeventsum = external dso_local local_unnamed_addr global i64, align 8
@oldtotaleventsum = external dso_local local_unnamed_addr global i64, align 8
@newtotaleventsum = external dso_local local_unnamed_addr global i64, align 8
@warningsum = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@timestep = external dso_local local_unnamed_addr global double, align 8
@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@targetTemperature = external dso_local local_unnamed_addr global double, align 8
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@outputrate = external dso_local local_unnamed_addr global double, align 8
@.str.7 = external hidden unnamed_addr constant [28 x i8], align 1
@cutoffr = external dso_local local_unnamed_addr global double, align 8
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@Methodtype = external dso_local global [20 x i8], align 16
@.str.9 = external hidden unnamed_addr constant [26 x i8], align 1
@thermostatType = external dso_local global [20 x i8], align 16
@.str.10 = external hidden unnamed_addr constant [28 x i8], align 1
@thermoF = external dso_local local_unnamed_addr global double, align 8
@.str.11 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@CG = external dso_local global %struct.CGGovStr, align 8
@.str.13 = external hidden unnamed_addr constant [26 x i8], align 1
@wallExist = external dso_local global [20 x i8], align 16
@.str.14 = external hidden unnamed_addr constant [26 x i8], align 1
@wallType = external dso_local global [20 x i8], align 16
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@boxDimension = external dso_local local_unnamed_addr global [4 x double], align 16
@.str.16 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [4 x i8], align 1
@neworcontinue = external dso_local local_unnamed_addr global [20 x i8], align 16
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca [200 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %5) #7
  %6 = tail call i64 @clock() #7
  tail call void @InputData(i32 noundef %0, ptr noundef %1) #7
  %7 = load double, ptr @currenttime, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %12 = load double, ptr @currenttime, align 8, !tbaa !5
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %12)
  %14 = load double, ptr @timestep, align 8, !tbaa !5
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %14)
  %16 = load double, ptr @targetTemperature, align 8, !tbaa !5
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, double noundef %16)
  %18 = load double, ptr @outputrate, align 8, !tbaa !5
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, double noundef %18)
  %20 = load double, ptr @cutoffr, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %20)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, ptr noundef nonnull @Methodtype)
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull @thermostatType)
  %24 = load double, ptr @thermoF, align 8, !tbaa !5
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, double noundef %24)
  %26 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, ptr noundef nonnull @.str.12, ptr noundef nonnull @CG, ptr noundef nonnull getelementptr inbounds (i8, ptr @CG, i64 16))
  %27 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, ptr noundef nonnull @wallExist)
  %28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, ptr noundef nonnull @wallType)
  %29 = load double, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 8), align 8, !tbaa !5
  %30 = load double, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 16), align 16, !tbaa !5
  %31 = load double, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 24), align 8, !tbaa !5
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, double noundef %29, double noundef %30, double noundef %31)
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1)
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16)
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %36 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.17, ptr noundef nonnull @savedir) #7
  %lhsc = load i8, ptr @.str.18, align 1
  %rhsc = load i8, ptr @neworcontinue, align 16
  %37 = icmp eq i8 %lhsc, %rhsc
  br i1 %37, label %41, label %38

38:                                               ; preds = %2
  %39 = call noalias ptr @fopen(ptr noundef nonnull %5, ptr noundef nonnull @.str.19)
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %38, %2
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20)
  br label %62

43:                                               ; preds = %38
  %44 = call noalias ptr @fopen(ptr noundef nonnull %5, ptr noundef nonnull @.str.21)
  %45 = call i64 @fread(ptr noundef nonnull %3, i64 noundef 8, i64 noundef 1, ptr noundef %44)
  %46 = load double, ptr @timestep, align 8, !tbaa !5
  %47 = load double, ptr @currenttime, align 8, !tbaa !5
  %48 = fsub double %46, %47
  %49 = fdiv double %48, 1.000000e+02
  %50 = load double, ptr %3, align 8, !tbaa !5
  %51 = fmul double %50, %49
  %52 = fdiv double %51, 3.600000e+03
  %53 = tail call double @llvm.floor.f64(double %52)
  %54 = fneg double %53
  %55 = tail call double @llvm.fmuladd.f64(double %54, double 3.600000e+03, double %51)
  %56 = fdiv double %55, 6.000000e+01
  %57 = tail call double @llvm.floor.f64(double %56)
  %58 = fneg double %57
  %59 = tail call double @llvm.fmuladd.f64(double %58, double 6.000000e+01, double %55)
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, double noundef %53, double noundef %57, double noundef %59)
  %61 = tail call i32 @fclose(ptr noundef %44)
  br label %62

62:                                               ; preds = %43, %41
  %63 = phi double [ %50, %43 ], [ 0.000000e+00, %41 ]
  %64 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23)
  tail call void @ThreadProcess() #7
  %65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %68 = load i64, ptr @collisioneventsum, align 8, !tbaa !9
  %69 = load i64, ptr @bondeventsum, align 8, !tbaa !9
  %70 = add nsw i64 %69, %68
  %71 = load i64, ptr @HBeventsum, align 8, !tbaa !9
  %72 = add nsw i64 %70, %71
  %73 = load i64, ptr @HBNeighboreventsum, align 8, !tbaa !9
  %74 = add nsw i64 %72, %73
  %75 = load i64, ptr @thermostateventsum, align 8, !tbaa !9
  %76 = add nsw i64 %74, %75
  %77 = load i64, ptr @pbcandcrosseventsum, align 8, !tbaa !9
  %78 = add nsw i64 %76, %77
  %79 = load i64, ptr @walleventsum, align 8, !tbaa !9
  %80 = add nsw i64 %78, %79
  %81 = load i64, ptr @CGeventsum, align 8, !tbaa !9
  %82 = add nsw i64 %80, %81
  store i64 %82, ptr @newtotaleventsum, align 8, !tbaa !9
  %83 = load i64, ptr @countReCal, align 8, !tbaa !9
  %84 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25, i64 noundef %83)
  %85 = load i64, ptr @collisioneventsum, align 8, !tbaa !9
  %86 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26, i64 noundef %85)
  %87 = load i64, ptr @bondeventsum, align 8, !tbaa !9
  %88 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27, i64 noundef %87)
  %89 = load i64, ptr @HBeventsum, align 8, !tbaa !9
  %90 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28, i64 noundef %89)
  %91 = load i64, ptr @HBNeighboreventsum, align 8, !tbaa !9
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29, i64 noundef %91)
  %93 = load i64, ptr @thermostateventsum, align 8, !tbaa !9
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30, i64 noundef %93)
  %95 = load i64, ptr @pbcandcrosseventsum, align 8, !tbaa !9
  %96 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.31, i64 noundef %95)
  %97 = load i64, ptr @walleventsum, align 8, !tbaa !9
  %98 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32, i64 noundef %97)
  %99 = load i64, ptr @CGeventsum, align 8, !tbaa !9
  %100 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33, i64 noundef %99)
  %101 = load i64, ptr @thermostateventsum, align 8, !tbaa !9
  %102 = sitofp i64 %101 to float
  %103 = load i64, ptr @newtotaleventsum, align 8, !tbaa !9
  %104 = sitofp i64 %103 to float
  %105 = fdiv float %102, %104
  %106 = fmul float %105, 1.000000e+02
  %107 = fpext float %106 to double
  %108 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.34, double noundef %107)
  %109 = load i64, ptr @warningsum, align 8, !tbaa !9
  %110 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.35, i64 noundef %109)
  %111 = tail call i64 @clock() #7
  %112 = sub nsw i64 %111, %6
  %113 = sitofp i64 %112 to double
  %114 = fdiv double %113, 1.000000e+06
  %115 = fdiv double %114, 3.600000e+03
  %116 = tail call double @llvm.floor.f64(double %115)
  %117 = fneg double %116
  %118 = tail call double @llvm.fmuladd.f64(double %117, double 3.600000e+03, double %114)
  %119 = fdiv double %118, 6.000000e+01
  %120 = tail call double @llvm.floor.f64(double %119)
  %121 = fneg double %120
  %122 = fmul double %120, 6.000000e+01
  %123 = insertelement <2 x double> poison, double %121, i64 0
  %124 = insertelement <2 x double> %123, double %116, i64 1
  %125 = insertelement <2 x double> poison, double %118, i64 0
  %126 = insertelement <2 x double> %125, double %122, i64 1
  %127 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %124, <2 x double> <double 6.000000e+01, double 3.600000e+03>, <2 x double> %126)
  %128 = extractelement <2 x double> %127, i64 0
  %129 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.36, double noundef %116, double noundef %120, double noundef %128)
  %130 = load i64, ptr @newtotaleventsum, align 8, !tbaa !9
  %131 = load i64, ptr @oldtotaleventsum, align 8, !tbaa !9
  %132 = sub nsw i64 %130, %131
  %133 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37, i64 noundef %132)
  %134 = call noalias ptr @fopen(ptr noundef nonnull %5, ptr noundef nonnull @.str.38)
  %shift = shufflevector <2 x double> %127, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %135 = fadd <2 x double> %127, %shift
  %136 = extractelement <2 x double> %135, i64 0
  %137 = fmul double %7, %63
  %138 = fdiv double %137, 1.000000e+02
  %139 = fadd double %138, %136
  %140 = load double, ptr @timestep, align 8, !tbaa !5
  %141 = fdiv double %139, %140
  %142 = fmul double %141, 1.000000e+02
  store double %142, ptr %4, align 8, !tbaa !5
  %143 = call i64 @fwrite(ptr noundef nonnull %4, i64 noundef 8, i64 noundef 1, ptr noundef %134)
  %144 = tail call i32 @fclose(ptr noundef %134)
  tail call void @GlobalCloseFree() #7
  call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  ret i32 0
}

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

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #2

declare void @InputData(i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4

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

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

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

declare void @ThreadProcess() local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4

declare void @GlobalCloseFree() local_unnamed_addr #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #6

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 = { 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 #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,TailCallElimPass,VectorCombinePass