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

; 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.DynamicWallStr = type { [16 x i8], i32, i32, double, double, double, double, [4 x double] }
%struct.AtomStr = type { ptr, ptr }
%struct.DynamicStr = type { [4 x i32], [4 x double], [4 x double], %struct.HBStr, %struct.HBNeighborStr, %struct.InteractionEventStr }
%struct.HBStr = type { i32, i32, i8, i32 }
%struct.HBNeighborStr = type { [5 x i32], i32, i32 }
%struct.InteractionEventStr = type { i32, i64, i64, double, double, i32, i32 }

@atomnum = external global i32, align 4
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@wallType = external global [20 x i8], align 16
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@boxDimension = external global [4 x double], align 16
@currenttime = external global double, align 8
@wallDyn = external global %struct.DynamicWallStr, align 8
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1
@atom = external global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @DoWallDyn() #3 {
  %1 = alloca i32, align 4
  %2 = load double, ptr @currenttime, align 8, !tbaa !5
  %3 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 6), align 8, !tbaa !9
  %4 = fcmp oge double %2, %3
  br i1 %4, label %5, label %148

5:                                                ; preds = %0
  %6 = call i32 @strcmp(ptr noundef @wallDyn, ptr noundef @.str.18) #5
  %7 = icmp eq i32 %6, 0
  br i1 %7, label %8, label %49

8:                                                ; preds = %5
  %9 = load double, ptr getelementptr inbounds ([4 x double], ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 7), i64 0, i64 2), align 8, !tbaa !5
  %10 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %11 = fsub double %9, %10
  %12 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 3), align 8, !tbaa !12
  %13 = fcmp oge double %11, %12
  br i1 %13, label %18, label %14

14:                                               ; preds = %8
  %15 = load double, ptr getelementptr inbounds ([4 x double], ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 7), i64 0, i64 2), align 8, !tbaa !5
  %16 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %17 = fcmp oeq double %15, %16
  br i1 %17, label %18, label %21

18:                                               ; preds = %14, %8
  %19 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  %20 = mul nsw i32 %19, -1
  store i32 %20, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  store i32 0, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 2), align 4, !tbaa !14
  br label %48

21:                                               ; preds = %14
  %22 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %23 = load double, ptr @currenttime, align 8, !tbaa !5
  %24 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 4), align 8, !tbaa !15
  %25 = fdiv double %23, %24
  %26 = fadd double %25, 1.000000e+00
  %27 = fptosi double %26 to i32
  %28 = sitofp i32 %27 to double
  %29 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 3), align 8, !tbaa !12
  %30 = call double @llvm.fmuladd.f64(double %28, double %29, double %22)
  %31 = load double, ptr @currenttime, align 8, !tbaa !5
  %32 = fsub double %31, 1.000000e+00
  %33 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %34 = fneg double %32
  %35 = call double @llvm.fmuladd.f64(double %34, double %33, double %30)
  %36 = load double, ptr getelementptr inbounds ([4 x double], ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 7), i64 0, i64 2), align 8, !tbaa !5
  %37 = fsub double %35, %36
  %38 = call double @llvm.fabs.f64(double %37)
  %39 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %40 = fcmp ole double %38, %39
  br i1 %40, label %41, label %47

41:                                               ; preds = %21
  %42 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 2), align 4, !tbaa !14
  %43 = icmp sge i32 %42, 5
  br i1 %43, label %44, label %47

44:                                               ; preds = %41
  %45 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  %46 = mul nsw i32 %45, -1
  store i32 %46, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  store i32 0, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 2), align 4, !tbaa !14
  br label %47

47:                                               ; preds = %44, %41, %21
  br label %48

48:                                               ; preds = %47, %18
  br label %49

49:                                               ; preds = %48, %5
  %50 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 6), align 8, !tbaa !9
  %51 = fadd double %50, 1.000000e+00
  store double %51, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 6), align 8, !tbaa !9
  %52 = call i32 @strcmp(ptr noundef @wallType, ptr noundef @.str.8) #5
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %60

54:                                               ; preds = %49
  %55 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  %56 = sitofp i32 %55 to double
  %57 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %58 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %59 = call double @llvm.fmuladd.f64(double %56, double %57, double %58)
  store double %59, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  br label %95

60:                                               ; preds = %49
  %61 = call i32 @strcmp(ptr noundef @wallType, ptr noundef @.str.9) #5
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %74

63:                                               ; preds = %60
  %64 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  %65 = sitofp i32 %64 to double
  %66 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %67 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %68 = call double @llvm.fmuladd.f64(double %65, double %66, double %67)
  store double %68, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %69 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  %70 = sitofp i32 %69 to double
  %71 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %72 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 3), align 8, !tbaa !5
  %73 = call double @llvm.fmuladd.f64(double %70, double %71, double %72)
  store double %73, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 3), align 8, !tbaa !5
  br label %94

74:                                               ; preds = %60
  %75 = call i32 @strcmp(ptr noundef @wallType, ptr noundef @.str.7) #5
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %93

77:                                               ; preds = %74
  %78 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  %79 = sitofp i32 %78 to double
  %80 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %81 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 1), align 8, !tbaa !5
  %82 = call double @llvm.fmuladd.f64(double %79, double %80, double %81)
  store double %82, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 1), align 8, !tbaa !5
  %83 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  %84 = sitofp i32 %83 to double
  %85 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %86 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %87 = call double @llvm.fmuladd.f64(double %84, double %85, double %86)
  store double %87, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %88 = load i32, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 1), align 8, !tbaa !13
  %89 = sitofp i32 %88 to double
  %90 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %91 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 3), align 8, !tbaa !5
  %92 = call double @llvm.fmuladd.f64(double %89, double %90, double %91)
  store double %92, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 3), align 8, !tbaa !5
  br label %93

93:                                               ; preds = %77, %74
  br label %94

94:                                               ; preds = %93, %63
  br label %95

95:                                               ; preds = %94, %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 1, ptr %1, align 4, !tbaa !17
  br label %96

96:                                               ; preds = %124, %95
  %97 = load i32, ptr %1, align 4, !tbaa !17
  %98 = load i32, ptr @atomnum, align 4, !tbaa !17
  %99 = icmp sle i32 %97, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %127

101:                                              ; preds = %96
  %102 = load ptr, ptr @atom, align 8, !tbaa !18
  %103 = load i32, ptr %1, align 4, !tbaa !17
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds %struct.AtomStr, ptr %102, i64 %104
  %106 = getelementptr inbounds %struct.AtomStr, ptr %105, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !20
  %108 = getelementptr inbounds %struct.DynamicStr, ptr %107, i32 0, i32 5
  %109 = getelementptr inbounds %struct.InteractionEventStr, ptr %108, i32 0, i32 5
  %110 = load i32, ptr %109, align 8, !tbaa !22
  %111 = icmp eq i32 %110, 5
  br i1 %111, label %112, label %123

112:                                              ; preds = %101
  %113 = load ptr, ptr @atom, align 8, !tbaa !18
  %114 = load i32, ptr %1, align 4, !tbaa !17
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds %struct.AtomStr, ptr %113, i64 %115
  %117 = getelementptr inbounds %struct.AtomStr, ptr %116, i32 0, i32 1
  %118 = load ptr, ptr %117, align 8, !tbaa !20
  %119 = getelementptr inbounds %struct.DynamicStr, ptr %118, i32 0, i32 5
  %120 = getelementptr inbounds %struct.InteractionEventStr, ptr %119, i32 0, i32 1
  %121 = load i64, ptr %120, align 8, !tbaa !28
  %122 = add nsw i64 %121, 1
  store i64 %122, ptr %120, align 8, !tbaa !28
  br label %123

123:                                              ; preds = %112, %101
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %1, align 4, !tbaa !17
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %1, align 4, !tbaa !17
  br label %96, !llvm.loop !29

127:                                              ; preds = %100
  %128 = load double, ptr getelementptr inbounds ([4 x double], ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 7), i64 0, i64 2), align 8, !tbaa !5
  %129 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %130 = fsub double %128, %129
  %131 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 3), align 8, !tbaa !12
  %132 = fcmp oge double %130, %131
  br i1 %132, label %133, label %136

133:                                              ; preds = %127
  %134 = call i32 @strcmp(ptr noundef @wallDyn, ptr noundef @.str.19) #5
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %145, label %136

136:                                              ; preds = %133, %127
  %137 = load double, ptr getelementptr inbounds ([4 x double], ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 7), i64 0, i64 2), align 8, !tbaa !5
  %138 = load double, ptr getelementptr inbounds ([4 x double], ptr @boxDimension, i64 0, i64 2), align 16, !tbaa !5
  %139 = fsub double %137, %138
  %140 = load double, ptr getelementptr inbounds (%struct.DynamicWallStr, ptr @wallDyn, i32 0, i32 5), align 8, !tbaa !16
  %141 = fcmp ole double %139, %140
  br i1 %141, label %142, label %147

142:                                              ; preds = %136
  %143 = call i32 @strcmp(ptr noundef @wallDyn, ptr noundef @.str.20) #5
  %144 = icmp eq i32 %143, 0
  br i1 %144, label %145, label %147

145:                                              ; preds = %142, %133
  %146 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef @wallDyn, ptr noundef @.str.6) #6
  br label %147

147:                                              ; preds = %145, %142, %136
  br label %148

148:                                              ; preds = %147, %0
  ret void
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { 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 = { nounwind willreturn memory(read) }
attributes #6 = { 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, !6, i64 48}
!10 = !{!"DynamicWallStr", !7, i64 0, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !7, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 24}
!13 = !{!10, !11, i64 16}
!14 = !{!10, !11, i64 20}
!15 = !{!10, !6, i64 32}
!16 = !{!10, !6, i64 40}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = !{!21, !19, i64 8}
!21 = !{!"AtomStr", !19, i64 0, !19, i64 8}
!22 = !{!23, !11, i64 168}
!23 = !{!"DynamicStr", !7, i64 0, !7, i64 16, !7, i64 48, !24, i64 80, !25, i64 96, !26, i64 128}
!24 = !{!"HBStr", !11, i64 0, !11, i64 4, !7, i64 8, !11, i64 12}
!25 = !{!"HBNeighborStr", !7, i64 0, !11, i64 20, !11, i64 24}
!26 = !{!"InteractionEventStr", !11, i64 0, !27, i64 8, !27, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 44}
!27 = !{!"long", !7, i64 0}
!28 = !{!23, !27, i64 136}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; 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.DynamicWallStr = type { [16 x i8], i32, i32, double, double, double, double, [4 x double] }
%struct.AtomStr = type { ptr, ptr }

@atomnum = external local_unnamed_addr global i32, align 4
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@wallType = external global [20 x i8], align 16
@.str.7 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@boxDimension = external local_unnamed_addr global [4 x double], align 16
@currenttime = external local_unnamed_addr global double, align 8
@wallDyn = external global %struct.DynamicWallStr, align 8
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1
@atom = external local_unnamed_addr global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: nofree nounwind uwtable
define dso_local void @DoWallDyn() local_unnamed_addr #2 {
  %1 = load double, ptr @currenttime, align 8, !tbaa !5
  %2 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 48), align 8, !tbaa !9
  %3 = fcmp ult double %1, %2
  br i1 %3, label %120, label %4

4:                                                ; preds = %0
  %5 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallDyn, ptr noundef nonnull dereferenceable(1) @.str.18) #5
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %7, label %32

7:                                                ; preds = %4
  %8 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 72), align 8, !tbaa !5
  %9 = load double, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 16), align 16, !tbaa !5
  %10 = fsub double %8, %9
  %11 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 24), align 8, !tbaa !12
  %12 = fcmp oge double %10, %11
  %13 = fcmp oeq double %8, %9
  %or.cond9 = or i1 %13, %12
  br i1 %or.cond9, label %.sink.split, label %14

14:                                               ; preds = %7
  %15 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 32), align 8, !tbaa !13
  %16 = fdiv double %1, %15
  %17 = fadd double %16, 1.000000e+00
  %18 = fptosi double %17 to i32
  %19 = sitofp i32 %18 to double
  %20 = tail call double @llvm.fmuladd.f64(double %19, double %11, double %9)
  %21 = fadd double %1, -1.000000e+00
  %22 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 40), align 8, !tbaa !14
  %23 = fneg double %21
  %24 = tail call double @llvm.fmuladd.f64(double %23, double %22, double %20)
  %25 = fsub double %24, %8
  %26 = tail call double @llvm.fabs.f64(double %25)
  %27 = fcmp ole double %26, %22
  %28 = load i32, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 20), align 4
  %29 = icmp sgt i32 %28, 4
  %or.cond = select i1 %27, i1 %29, i1 false
  br i1 %or.cond, label %.sink.split, label %32

.sink.split:                                      ; preds = %14, %7
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 16), align 8, !tbaa !15
  %31 = sub nsw i32 0, %30
  store i32 %31, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 16), align 8, !tbaa !15
  store i32 0, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 20), align 4, !tbaa !16
  br label %32

32:                                               ; preds = %.sink.split, %14, %4
  %33 = fadd double %2, 1.000000e+00
  store double %33, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 48), align 8, !tbaa !9
  %34 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallType, ptr noundef nonnull dereferenceable(1) @.str.8) #5
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %42

36:                                               ; preds = %32
  %37 = load i32, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 16), align 8, !tbaa !15
  %38 = sitofp i32 %37 to double
  %39 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 40), align 8, !tbaa !14
  %40 = load double, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 16), align 16, !tbaa !5
  %41 = tail call double @llvm.fmuladd.f64(double %38, double %39, double %40)
  store double %41, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 16), align 16, !tbaa !5
  br label %69

42:                                               ; preds = %32
  %43 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallType, ptr noundef nonnull dereferenceable(1) @.str.9) #5
  %44 = icmp eq i32 %43, 0
  br i1 %44, label %45, label %54

45:                                               ; preds = %42
  %46 = load i32, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 16), align 8, !tbaa !15
  %47 = sitofp i32 %46 to double
  %48 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 40), align 8
  %49 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 16), align 16, !tbaa !5
  %50 = insertelement <2 x double> poison, double %47, i64 0
  %51 = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> zeroinitializer
  %52 = shufflevector <2 x double> %48, <2 x double> poison, <2 x i32> zeroinitializer
  %53 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %51, <2 x double> %52, <2 x double> %49)
  store <2 x double> %53, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 16), align 16, !tbaa !5
  br label %69

54:                                               ; preds = %42
  %55 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallType, ptr noundef nonnull dereferenceable(1) @.str.7) #5
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %69

57:                                               ; preds = %54
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 16), align 8, !tbaa !15
  %59 = sitofp i32 %58 to double
  %60 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 40), align 8, !tbaa !14
  %61 = load <2 x double>, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 8), align 8, !tbaa !5
  %62 = insertelement <2 x double> poison, double %59, i64 0
  %63 = shufflevector <2 x double> %62, <2 x double> poison, <2 x i32> zeroinitializer
  %64 = insertelement <2 x double> poison, double %60, i64 0
  %65 = shufflevector <2 x double> %64, <2 x double> poison, <2 x i32> zeroinitializer
  %66 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %63, <2 x double> %65, <2 x double> %61)
  store <2 x double> %66, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 8), align 8, !tbaa !5
  %67 = load double, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 24), align 8, !tbaa !5
  %68 = tail call double @llvm.fmuladd.f64(double %59, double %60, double %67)
  store double %68, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 24), align 8, !tbaa !5
  br label %69

69:                                               ; preds = %45, %57, %54, %36
  %70 = load i32, ptr @atomnum, align 4, !tbaa !17
  %.not10 = icmp slt i32 %70, 1
  br i1 %.not10, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %69
  %71 = load ptr, ptr @atom, align 8, !tbaa !18
  %72 = zext nneg i32 %70 to i64
  %xtraiter = and i64 %72, 1
  %73 = icmp eq i32 %70, 1
  br i1 %73, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %72, 2147483646
  br label %88

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

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa
  %74 = getelementptr inbounds %struct.AtomStr, ptr %71, i64 %indvars.iv.unr, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !20
  %76 = getelementptr inbounds i8, ptr %75, i64 168
  %77 = load i32, ptr %76, align 8, !tbaa !22
  %78 = icmp eq i32 %77, 5
  br i1 %78, label %79, label %._crit_edge

79:                                               ; preds = %.epil.preheader
  %80 = getelementptr inbounds i8, ptr %75, i64 136
  %81 = load i64, ptr %80, align 8, !tbaa !28
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %80, align 8, !tbaa !28
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %79, %.epil.preheader, %69
  %83 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 72), align 8, !tbaa !5
  %84 = load double, ptr getelementptr inbounds (i8, ptr @boxDimension, i64 16), align 16, !tbaa !5
  %85 = fsub double %83, %84
  %86 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 24), align 8, !tbaa !12
  %87 = fcmp ult double %85, %86
  br i1 %87, label %112, label %109

88:                                               ; preds = %108, %.lr.ph.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.new ], [ %indvars.iv.next.1, %108 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %108 ]
  %89 = getelementptr inbounds %struct.AtomStr, ptr %71, i64 %indvars.iv, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !20
  %91 = getelementptr inbounds i8, ptr %90, i64 168
  %92 = load i32, ptr %91, align 8, !tbaa !22
  %93 = icmp eq i32 %92, 5
  br i1 %93, label %94, label %98

94:                                               ; preds = %88
  %95 = getelementptr inbounds i8, ptr %90, i64 136
  %96 = load i64, ptr %95, align 8, !tbaa !28
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %95, align 8, !tbaa !28
  br label %98

98:                                               ; preds = %88, %94
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %99 = getelementptr inbounds %struct.AtomStr, ptr %71, i64 %indvars.iv.next, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !20
  %101 = getelementptr inbounds i8, ptr %100, i64 168
  %102 = load i32, ptr %101, align 8, !tbaa !22
  %103 = icmp eq i32 %102, 5
  br i1 %103, label %104, label %108

104:                                              ; preds = %98
  %105 = getelementptr inbounds i8, ptr %100, i64 136
  %106 = load i64, ptr %105, align 8, !tbaa !28
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %105, align 8, !tbaa !28
  br label %108

108:                                              ; preds = %104, %98
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %88, !llvm.loop !29

109:                                              ; preds = %._crit_edge
  %110 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallDyn, ptr noundef nonnull dereferenceable(1) @.str.19) #5
  %111 = icmp eq i32 %110, 0
  br i1 %111, label %118, label %112

112:                                              ; preds = %109, %._crit_edge
  %113 = load double, ptr getelementptr inbounds (i8, ptr @wallDyn, i64 40), align 8, !tbaa !14
  %114 = fcmp ugt double %85, %113
  br i1 %114, label %120, label %115

115:                                              ; preds = %112
  %116 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) @wallDyn, ptr noundef nonnull dereferenceable(1) @.str.20) #5
  %117 = icmp eq i32 %116, 0
  br i1 %117, label %118, label %120

118:                                              ; preds = %115, %109
  %119 = tail call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) @wallDyn, ptr noundef nonnull dereferenceable(1) @.str.6) #6
  br label %120

120:                                              ; preds = %112, %115, %118, %0
  ret void
}

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

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

; 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>) #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nofree 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 #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind willreturn memory(read) }
attributes #6 = { 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, !6, i64 48}
!10 = !{!"DynamicWallStr", !7, i64 0, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !7, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 24}
!13 = !{!10, !6, i64 32}
!14 = !{!10, !6, i64 40}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !11, i64 20}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = !{!21, !19, i64 8}
!21 = !{!"AtomStr", !19, i64 0, !19, i64 8}
!22 = !{!23, !11, i64 168}
!23 = !{!"DynamicStr", !7, i64 0, !7, i64 16, !7, i64 48, !24, i64 80, !25, i64 96, !26, i64 128}
!24 = !{!"HBStr", !11, i64 0, !11, i64 4, !7, i64 8, !11, i64 12}
!25 = !{!"HBNeighborStr", !7, i64 0, !11, i64 20, !11, i64 24}
!26 = !{!"InteractionEventStr", !11, i64 0, !27, i64 8, !27, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 44}
!27 = !{!"long", !7, i64 0}
!28 = !{!23, !27, i64 136}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass