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

; 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, i32, [50 x i8], [50 x i8], %struct.REMDTempStr }
%struct.REMDTempStr = type { i32, double }
%struct.AtomListStr = type { i32, [27 x i32], [27 x i32], [27 x i32], double, ptr, ptr, ptr }
%struct.ObstructionStr = type { i32, i32, ptr, ptr, ptr }
%struct.CGGovStr = type { [2 x [16 x i8]], i32, i32, ptr, ptr }
%struct.AtomStr = type { ptr, ptr }

@REMDInfo = external global %struct.REMDStr, align 8
@fileList = external global ptr, align 8
@atomnum = external global i32, align 4
@atomList = external global %struct.AtomListStr, align 8
@atom = external global ptr, align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@neworcontinue = external global [20 x i8], align 16
@wallExist = external global [20 x i8], align 16
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@obstObj = external global %struct.ObstructionStr, align 8
@CG = external global %struct.CGGovStr, align 8
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@currenttime = external global double, align 8
@outputrate = external global double, align 8
@outputrecord = external global double, align 8
@.str.4 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [65 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @Prepare() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #6
  store ptr null, ptr %1, align 8, !tbaa !5
  %5 = load i32, ptr @REMDInfo, align 8, !tbaa !9
  %6 = icmp ne i32 %5, 0
  br i1 %6, label %7, label %8

7:                                                ; preds = %0
  store ptr getelementptr inbounds (%struct.REMDStr, ptr @REMDInfo, i32 0, i32 4), ptr %1, align 8, !tbaa !5
  br label %8

8:                                                ; preds = %7, %0
  %9 = load ptr, ptr %1, align 8, !tbaa !5
  %10 = load ptr, ptr @fileList, align 8, !tbaa !5
  call void @InitializeFiles(ptr noundef %9, ptr noundef %10)
  %11 = load ptr, ptr @fileList, align 8, !tbaa !5
  call void @SaveData(i32 noundef 8, ptr noundef %11)
  %12 = load i32, ptr @atomnum, align 4, !tbaa !14
  %13 = add nsw i32 %12, 1
  %14 = sext i32 %13 to i64
  %15 = call noalias ptr @calloc(i64 noundef %14, i64 noundef 8) #7
  store ptr %15, ptr getelementptr inbounds (%struct.AtomListStr, ptr @atomList, i32 0, i32 7), align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !14
  br label %16

16:                                               ; preds = %30, %8
  %17 = load i32, ptr %2, align 4, !tbaa !14
  %18 = load i32, ptr @atomnum, align 4, !tbaa !14
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %33

21:                                               ; preds = %16
  %22 = load ptr, ptr @atom, align 8, !tbaa !5
  %23 = load i32, ptr %2, align 4, !tbaa !14
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds %struct.AtomStr, ptr %22, i64 %24
  %26 = load ptr, ptr getelementptr inbounds (%struct.AtomListStr, ptr @atomList, i32 0, i32 7), align 8, !tbaa !15
  %27 = load i32, ptr %2, align 4, !tbaa !14
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds ptr, ptr %26, i64 %28
  store ptr %25, ptr %29, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %21
  %31 = load i32, ptr %2, align 4, !tbaa !14
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %2, align 4, !tbaa !14
  br label %16, !llvm.loop !17

33:                                               ; preds = %20
  %34 = call i32 @strcmp(ptr noundef @.str, ptr noundef @neworcontinue) #8
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %74

36:                                               ; preds = %33
  %37 = load ptr, ptr @fileList, align 8, !tbaa !5
  call void @SaveData(i32 noundef 9, ptr noundef %37)
  %38 = call i32 @strcmp(ptr noundef @wallExist, ptr noundef @.str.1) #8
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %42

40:                                               ; preds = %36
  %41 = load ptr, ptr @fileList, align 8, !tbaa !5
  call void @SaveData(i32 noundef 10, ptr noundef %41)
  br label %42

42:                                               ; preds = %40, %36
  %43 = load i32, ptr @obstObj, align 8, !tbaa !19
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %42
  %46 = load ptr, ptr @fileList, align 8, !tbaa !5
  call void @SaveData(i32 noundef 11, ptr noundef %46)
  br label %47

47:                                               ; preds = %45, %42
  %48 = load i32, ptr getelementptr inbounds (%struct.CGGovStr, ptr @CG, i32 0, i32 1), align 8, !tbaa !21
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %52

50:                                               ; preds = %47
  %51 = load ptr, ptr @fileList, align 8, !tbaa !5
  call void @SaveData(i32 noundef 12, ptr noundef %51)
  br label %52

52:                                               ; preds = %50, %47
  call void @SDEnergyMin(i64 noundef 20000, ptr noundef @atomList)
  call void @PBC(ptr noundef @.str.2, ptr noundef null, ptr noundef @atomList)
  call void @LinkList(ptr noundef @.str.2, ptr noundef null, ptr noundef null, ptr noundef @atomList)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %53 = load i32, ptr @atomnum, align 4, !tbaa !14
  %54 = add nsw i32 %53, 2
  %55 = sext i32 %54 to i64
  %56 = call noalias ptr @calloc(i64 noundef %55, i64 noundef 4) #7
  store ptr %56, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !14
  br label %57

57:                                               ; preds = %68, %52
  %58 = load i32, ptr %4, align 4, !tbaa !14
  %59 = load i32, ptr @atomnum, align 4, !tbaa !14
  %60 = icmp sle i32 %58, %59
  br i1 %60, label %62, label %61

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

62:                                               ; preds = %57
  %63 = load i32, ptr %4, align 4, !tbaa !14
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = load i32, ptr %4, align 4, !tbaa !14
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %64, i64 %66
  store i32 %63, ptr %67, align 4, !tbaa !14
  br label %68

68:                                               ; preds = %62
  %69 = load i32, ptr %4, align 4, !tbaa !14
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %4, align 4, !tbaa !14
  br label %57, !llvm.loop !23

71:                                               ; preds = %61
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  call void @Predict(ptr noundef %72, ptr noundef @atomList)
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %73) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %86

74:                                               ; preds = %33
  %75 = call i32 @strcmp(ptr noundef @.str.3, ptr noundef @neworcontinue) #8
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %81

77:                                               ; preds = %74
  %78 = load double, ptr @currenttime, align 8, !tbaa !24
  %79 = load double, ptr @outputrate, align 8, !tbaa !24
  %80 = fadd double %78, %79
  store double %80, ptr @outputrecord, align 8, !tbaa !24
  br label %85

81:                                               ; preds = %74
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.5)
  %84 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 59)
  br label %85

85:                                               ; preds = %81, %77
  br label %86

86:                                               ; preds = %85, %71
  call void @CreateCBT()
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #6
  ret void
}

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

declare void @InitializeFiles(ptr noundef, ptr noundef) #2

declare void @SaveData(i32 noundef, ptr noundef) #2

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

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

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

declare void @SDEnergyMin(i64 noundef, ptr noundef) #2

declare void @PBC(ptr noundef, ptr noundef, ptr noundef) #2

declare void @LinkList(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @Predict(ptr noundef, ptr noundef) #0

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

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

declare void @CreateCBT() #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 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"REMDStr", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 12, !7, i64 62, !12, i64 112}
!11 = !{!"int", !7, i64 0}
!12 = !{!"REMDTempStr", !11, i64 0, !13, i64 8}
!13 = !{!"double", !7, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!16, !6, i64 352}
!16 = !{!"AtomListStr", !11, i64 0, !7, i64 4, !7, i64 112, !7, i64 220, !13, i64 328, !6, i64 336, !6, i64 344, !6, i64 352}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !11, i64 0}
!20 = !{!"ObstructionStr", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24}
!21 = !{!22, !11, i64 32}
!22 = !{!"CGGovStr", !7, i64 0, !11, i64 32, !11, i64 36, !6, i64 40, !6, i64 48}
!23 = distinct !{!23, !18}
!24 = !{!13, !13, 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.REMDStr = type { i32, i32, i32, [50 x i8], [50 x i8], %struct.REMDTempStr }
%struct.REMDTempStr = type { i32, double }
%struct.AtomListStr = type { i32, [27 x i32], [27 x i32], [27 x i32], double, ptr, ptr, ptr }
%struct.ObstructionStr = type { i32, i32, ptr, ptr, ptr }
%struct.CGGovStr = type { [2 x [16 x i8]], i32, i32, ptr, ptr }
%struct.AtomStr = type { ptr, ptr }

@REMDInfo = external global %struct.REMDStr, align 8
@fileList = external local_unnamed_addr global ptr, align 8
@atomnum = external local_unnamed_addr global i32, align 4
@atomList = external global %struct.AtomListStr, align 8
@atom = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [4 x i8], align 1
@neworcontinue = external global [20 x i8], align 16
@wallExist = external global [20 x i8], align 16
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@obstObj = external local_unnamed_addr global %struct.ObstructionStr, align 8
@CG = external local_unnamed_addr global %struct.CGGovStr, align 8
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [9 x i8], align 1
@currenttime = external local_unnamed_addr global double, align 8
@outputrate = external local_unnamed_addr global double, align 8
@outputrecord = external local_unnamed_addr global double, align 8
@.str.4 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [65 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @Prepare() local_unnamed_addr #0 {
  %1 = load i32, ptr @REMDInfo, align 8, !tbaa !5
  %.not = icmp eq i32 %1, 0
  %spec.store.select = select i1 %.not, ptr null, ptr getelementptr inbounds (i8, ptr @REMDInfo, i64 62)
  %2 = load ptr, ptr @fileList, align 8, !tbaa !12
  tail call void @InitializeFiles(ptr noundef %spec.store.select, ptr noundef %2) #6
  %3 = load ptr, ptr @fileList, align 8, !tbaa !12
  tail call void @SaveData(i32 noundef 8, ptr noundef %3) #6
  %4 = load i32, ptr @atomnum, align 4, !tbaa !14
  %5 = add i32 %4, 1
  %6 = sext i32 %5 to i64
  %7 = tail call noalias ptr @calloc(i64 noundef %6, i64 noundef 8) #7
  store ptr %7, ptr getelementptr inbounds (i8, ptr @atomList, i64 352), align 8, !tbaa !15
  %.not1216 = icmp slt i32 %4, 1
  br i1 %.not1216, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %wide.trip.count = zext i32 %5 to i64
  %8 = add nsw i64 %wide.trip.count, -1
  %9 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %8, 3
  %10 = icmp ult i64 %9, 3
  br i1 %10, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %8, -4
  br label %.lr.ph

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next.3, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph.epil ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %11 = load ptr, ptr @atom, align 8, !tbaa !12
  %12 = getelementptr inbounds %struct.AtomStr, ptr %11, i64 %indvars.iv.epil
  %13 = load ptr, ptr getelementptr inbounds (i8, ptr @atomList, i64 352), align 8, !tbaa !15
  %14 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv.epil
  store ptr %12, ptr %14, align 8, !tbaa !12
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !17

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %0
  %15 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull dereferenceable(1) @neworcontinue) #8
  %16 = icmp eq i32 %15, 0
  br i1 %16, label %33, label %59

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.3, %.lr.ph ]
  %17 = load ptr, ptr @atom, align 8, !tbaa !12
  %18 = getelementptr inbounds %struct.AtomStr, ptr %17, i64 %indvars.iv
  %19 = load ptr, ptr getelementptr inbounds (i8, ptr @atomList, i64 352), align 8, !tbaa !15
  %20 = getelementptr inbounds ptr, ptr %19, i64 %indvars.iv
  store ptr %18, ptr %20, align 8, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load ptr, ptr @atom, align 8, !tbaa !12
  %22 = getelementptr inbounds %struct.AtomStr, ptr %21, i64 %indvars.iv.next
  %23 = load ptr, ptr getelementptr inbounds (i8, ptr @atomList, i64 352), align 8, !tbaa !15
  %24 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv.next
  store ptr %22, ptr %24, align 8, !tbaa !12
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %25 = load ptr, ptr @atom, align 8, !tbaa !12
  %26 = getelementptr inbounds %struct.AtomStr, ptr %25, i64 %indvars.iv.next.1
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @atomList, i64 352), align 8, !tbaa !15
  %28 = getelementptr inbounds ptr, ptr %27, i64 %indvars.iv.next.1
  store ptr %26, ptr %28, align 8, !tbaa !12
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %29 = load ptr, ptr @atom, align 8, !tbaa !12
  %30 = getelementptr inbounds %struct.AtomStr, ptr %29, i64 %indvars.iv.next.2
  %31 = load ptr, ptr getelementptr inbounds (i8, ptr @atomList, i64 352), align 8, !tbaa !15
  %32 = getelementptr inbounds ptr, ptr %31, i64 %indvars.iv.next.2
  store ptr %30, ptr %32, align 8, !tbaa !12
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !19

33:                                               ; preds = %._crit_edge
  %34 = load ptr, ptr @fileList, align 8, !tbaa !12
  tail call void @SaveData(i32 noundef 9, ptr noundef %34) #6
  %35 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallExist, ptr noundef nonnull dereferenceable(1) @.str.1) #8
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %33
  %38 = load ptr, ptr @fileList, align 8, !tbaa !12
  tail call void @SaveData(i32 noundef 10, ptr noundef %38) #6
  br label %39

39:                                               ; preds = %37, %33
  %40 = load i32, ptr @obstObj, align 8, !tbaa !21
  %.not13 = icmp eq i32 %40, 0
  br i1 %.not13, label %43, label %41

41:                                               ; preds = %39
  %42 = load ptr, ptr @fileList, align 8, !tbaa !12
  tail call void @SaveData(i32 noundef 11, ptr noundef %42) #6
  br label %43

43:                                               ; preds = %41, %39
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @CG, i64 32), align 8, !tbaa !23
  %.not14 = icmp eq i32 %44, 0
  br i1 %.not14, label %47, label %45

45:                                               ; preds = %43
  %46 = load ptr, ptr @fileList, align 8, !tbaa !12
  tail call void @SaveData(i32 noundef 12, ptr noundef %46) #6
  br label %47

47:                                               ; preds = %45, %43
  tail call void @SDEnergyMin(i64 noundef 20000, ptr noundef nonnull @atomList) #6
  tail call void @PBC(ptr noundef nonnull @.str.2, ptr noundef null, ptr noundef nonnull @atomList) #6
  tail call void @LinkList(ptr noundef nonnull @.str.2, ptr noundef null, ptr noundef null, ptr noundef nonnull @atomList) #6
  %48 = load i32, ptr @atomnum, align 4, !tbaa !14
  %49 = add nsw i32 %48, 2
  %50 = sext i32 %49 to i64
  %51 = tail call noalias ptr @calloc(i64 noundef %50, i64 noundef 4) #7
  %.not1518 = icmp slt i32 %48, 1
  br i1 %.not1518, label %._crit_edge22, label %.lr.ph21.preheader

.lr.ph21.preheader:                               ; preds = %47
  %52 = add nuw i32 %48, 1
  %wide.trip.count27 = zext i32 %52 to i64
  %53 = zext nneg i32 %48 to i64
  %min.iters.check = icmp ult i32 %48, 8
  br i1 %min.iters.check, label %.lr.ph21.preheader30, label %vector.ph

.lr.ph21.preheader30:                             ; preds = %middle.block, %.lr.ph21.preheader
  %indvars.iv24.ph = phi i64 [ 1, %.lr.ph21.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph21

vector.ph:                                        ; preds = %.lr.ph21.preheader
  %n.vec = and i64 %53, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx = or disjoint i64 %index, 1
  %54 = getelementptr inbounds i32, ptr %51, i64 %offset.idx
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  store <4 x i32> %vec.ind, ptr %54, align 4, !tbaa !14
  store <4 x i32> %step.add, ptr %55, align 4, !tbaa !14
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %56 = icmp eq i64 %index.next, %n.vec
  br i1 %56, label %middle.block, label %vector.body, !llvm.loop !25

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %53
  br i1 %cmp.n, label %._crit_edge22, label %.lr.ph21.preheader30

._crit_edge22:                                    ; preds = %.lr.ph21, %middle.block, %47
  tail call void @Predict(ptr noundef %51, ptr noundef nonnull @atomList)
  tail call void @free(ptr noundef %51) #6
  br label %70

.lr.ph21:                                         ; preds = %.lr.ph21.preheader30, %.lr.ph21
  %indvars.iv24 = phi i64 [ %indvars.iv.next25, %.lr.ph21 ], [ %indvars.iv24.ph, %.lr.ph21.preheader30 ]
  %57 = getelementptr inbounds i32, ptr %51, i64 %indvars.iv24
  %58 = trunc nuw nsw i64 %indvars.iv24 to i32
  store i32 %58, ptr %57, align 4, !tbaa !14
  %indvars.iv.next25 = add nuw nsw i64 %indvars.iv24, 1
  %exitcond28.not = icmp eq i64 %indvars.iv.next25, %wide.trip.count27
  br i1 %exitcond28.not, label %._crit_edge22, label %.lr.ph21, !llvm.loop !28

59:                                               ; preds = %._crit_edge
  %60 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @.str.3, ptr noundef nonnull dereferenceable(1) @neworcontinue) #8
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %66

62:                                               ; preds = %59
  %63 = load double, ptr @currenttime, align 8, !tbaa !29
  %64 = load double, ptr @outputrate, align 8, !tbaa !29
  %65 = fadd double %63, %64
  store double %65, ptr @outputrecord, align 8, !tbaa !29
  br label %70

66:                                               ; preds = %59
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %68 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5)
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, ptr noundef nonnull @.str.7, i32 noundef 59)
  br label %70

70:                                               ; preds = %62, %66, %._crit_edge22
  tail call void @CreateCBT() #6
  ret void
}

declare void @InitializeFiles(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @SaveData(i32 noundef, ptr 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 #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

declare void @SDEnergyMin(i64 noundef, ptr noundef) local_unnamed_addr #1

declare void @PBC(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @LinkList(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Predict(ptr noundef, ptr noundef) local_unnamed_addr #0

; 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: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

declare void @CreateCBT() 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 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(argmem: 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }
attributes #8 = { 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, !7, i64 0}
!6 = !{!"REMDStr", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !8, i64 62, !10, i64 112}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"REMDTempStr", !7, i64 0, !11, i64 8}
!11 = !{!"double", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !13, i64 352}
!16 = !{!"AtomListStr", !7, i64 0, !8, i64 4, !8, i64 112, !8, i64 220, !11, i64 328, !13, i64 336, !13, i64 344, !13, i64 352}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !7, i64 0}
!22 = !{!"ObstructionStr", !7, i64 0, !7, i64 4, !13, i64 8, !13, i64 16, !13, i64 24}
!23 = !{!24, !7, i64 32}
!24 = !{!"CGGovStr", !8, i64 0, !7, i64 32, !7, i64 36, !13, i64 40, !13, i64 48}
!25 = distinct !{!25, !20, !26, !27}
!26 = !{!"llvm.loop.isvectorized", i32 1}
!27 = !{!"llvm.loop.unroll.runtime.disable"}
!28 = distinct !{!28, !20, !27, !26}
!29 = !{!11, !11, i64 0}


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