; LLVM IR from gstonge/spreading_CR :: src (evolution)

; 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.std::pair" = type { i32, double }

; 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 speculatable willreturn memory(none)
declare double @llvm.floor.f64(double) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3net16StaticNetworkSIR14is_susceptibleEj(ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) #3 align 2

declare void @_ZN3net16StaticNetworkSIR9infectionEj(ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3net12update_eventERNS_16StaticNetworkSIRERN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEERSt25uniform_real_distributionIdERSt6vectorISt4pairIjjESaISH_EEb(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca i64, align 8
  %15 = alloca double, align 8
  %16 = alloca i8, align 1
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %21 = zext i1 %4 to i8
  store i8 %21, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZN3net16StaticNetworkSIR14get_event_treeEv(ptr noundef nonnull align 8 dereferenceable(384) %22)
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %25)
  %27 = call noundef i32 @_ZN3net10BinaryTree14get_leaf_indexEd(ptr noundef nonnull align 8 dereferenceable(96) %23, double noundef %26)
  %28 = zext i32 %27 to i64
  store i64 %28, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load i64, ptr %11, align 8, !tbaa !11
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3net16StaticNetworkSIR20get_propensity_groupEm(ptr noundef nonnull align 8 dereferenceable(384) %29, i64 noundef %30)
  store ptr %31, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i64, ptr %11, align 8, !tbaa !11
  %34 = call noundef double @_ZNK3net16StaticNetworkSIR18get_max_propensityEm(ptr noundef nonnull align 8 dereferenceable(384) %32, i64 noundef %33)
  store double %34, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  store i8 0, ptr %16, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  br label %35

35:                                               ; preds = %64, %5
  %36 = load i8, ptr %16, align 1, !tbaa !9, !range !15, !noundef !16
  %37 = trunc i8 %36 to i1
  %38 = xor i1 %37, true
  br i1 %38, label %39, label %65

39:                                               ; preds = %35
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %41)
  store double %42, ptr %17, align 8, !tbaa !13
  %43 = load double, ptr %17, align 8, !tbaa !13
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = call noundef i64 @_ZNKSt6vectorISt4pairIjdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #5
  %46 = uitofp i64 %45 to double
  %47 = fmul double %43, %46
  %48 = call double @llvm.floor.f64(double %47)
  %49 = fptoui double %48 to i64
  store i64 %49, ptr %14, align 8, !tbaa !11
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %51)
  store double %52, ptr %17, align 8, !tbaa !13
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = load i64, ptr %14, align 8, !tbaa !11
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt4pairIjdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %54) #5
  %56 = getelementptr inbounds %"struct.std::pair", ptr %55, i32 0, i32 1
  %57 = load double, ptr %56, align 8, !tbaa !17
  store double %57, ptr %15, align 8, !tbaa !13
  %58 = load double, ptr %17, align 8, !tbaa !13
  %59 = load double, ptr %15, align 8, !tbaa !13
  %60 = load double, ptr %13, align 8, !tbaa !13
  %61 = fdiv double %59, %60
  %62 = fcmp olt double %58, %61
  br i1 %62, label %63, label %64

63:                                               ; preds = %39
  store i8 1, ptr %16, align 1, !tbaa !9
  br label %64

64:                                               ; preds = %63, %39
  br label %35, !llvm.loop !20

65:                                               ; preds = %35
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 8 dereferenceable(16) %67)
  store double %68, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = load i64, ptr %14, align 8, !tbaa !11
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt4pairIjdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %70) #5
  %72 = getelementptr inbounds %"struct.std::pair", ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !22
  store i32 %73, ptr %18, align 4, !tbaa !23
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = load i32, ptr %18, align 4, !tbaa !23
  %76 = call noundef zeroext i1 @_ZN3net16StaticNetworkSIR11is_infectedEj(ptr noundef nonnull align 8 dereferenceable(384) %74, i32 noundef %75)
  br i1 %76, label %77, label %119

77:                                               ; preds = %65
  %78 = load double, ptr %17, align 8, !tbaa !13
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = call noundef double @_ZNK3net16StaticNetworkSIR17get_recovery_rateEv(ptr noundef nonnull align 8 dereferenceable(384) %79)
  %81 = load double, ptr %15, align 8, !tbaa !13
  %82 = fdiv double %80, %81
  %83 = fcmp olt double %78, %82
  br i1 %83, label %84, label %88

84:                                               ; preds = %77
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load i64, ptr %11, align 8, !tbaa !11
  %87 = load i64, ptr %14, align 8, !tbaa !11
  call void @_ZN3net16StaticNetworkSIR8recoveryEmm(ptr noundef nonnull align 8 dereferenceable(384) %85, i64 noundef %86, i64 noundef %87)
  br label %118

88:                                               ; preds = %77
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %89, ptr noundef nonnull align 8 dereferenceable(16) %90)
  store double %91, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load i32, ptr %18, align 4, !tbaa !23
  %94 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3net7Network19get_neighbor_vectorEj(ptr noundef nonnull align 8 dereferenceable(16) %92, i32 noundef %93)
  store ptr %94, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %95 = load ptr, ptr %19, align 8, !tbaa !5
  %96 = load double, ptr %17, align 8, !tbaa !13
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %97) #5
  %99 = uitofp i64 %98 to double
  %100 = fmul double %96, %99
  %101 = call double @llvm.floor.f64(double %100)
  %102 = fptoui double %101 to i64
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %102) #5
  %104 = load i32, ptr %103, align 4, !tbaa !23
  store i32 %104, ptr %20, align 4, !tbaa !23
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = load i32, ptr %20, align 4, !tbaa !23
  %107 = call noundef zeroext i1 @_ZN3net16StaticNetworkSIR14is_susceptibleEj(ptr noundef nonnull align 8 dereferenceable(384) %105, i32 noundef %106)
  br i1 %107, label %108, label %117

108:                                              ; preds = %88
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = load i32, ptr %20, align 4, !tbaa !23
  call void @_ZN3net16StaticNetworkSIR9infectionEj(ptr noundef nonnull align 8 dereferenceable(384) %109, i32 noundef %110)
  %111 = load i8, ptr %10, align 1, !tbaa !9, !range !15, !noundef !16
  %112 = trunc i8 %111 to i1
  br i1 %112, label %113, label %116

113:                                              ; preds = %108
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = call noundef nonnull align 1 ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE12emplace_backIJRjS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %114, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %20)
  br label %116

116:                                              ; preds = %113, %108
  br label %117

117:                                              ; preds = %116, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %118

118:                                              ; preds = %117, %84
  br label %123

119:                                              ; preds = %65
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = load i64, ptr %11, align 8, !tbaa !11
  %122 = load i64, ptr %14, align 8, !tbaa !11
  call void @_ZN3net16StaticNetworkSIR13immunity_lossEmm(ptr noundef nonnull align 8 dereferenceable(384) %120, i64 noundef %121, i64 noundef %122)
  br label %123

123:                                              ; preds = %119, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(96) ptr @_ZN3net16StaticNetworkSIR14get_event_treeEv(ptr noundef nonnull align 8 dereferenceable(384)) #3 align 2

declare noundef i32 @_ZN3net10BinaryTree14get_leaf_indexEd(ptr noundef nonnull align 8 dereferenceable(96), double noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3net16StaticNetworkSIR20get_propensity_groupEm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3net16StaticNetworkSIR18get_max_propensityEm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorISt4pairIjdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt4pairIjdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3net16StaticNetworkSIR11is_infectedEj(ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3net16StaticNetworkSIR17get_recovery_rateEv(ptr noundef nonnull align 8 dereferenceable(384)) #3 align 2

declare void @_ZN3net16StaticNetworkSIR8recoveryEmm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef, i64 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3net7Network19get_neighbor_vectorEj(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE12emplace_backIJRjS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

declare void @_ZN3net16StaticNetworkSIR13immunity_lossEmm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef, i64 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress 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 = { mustprogress 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 = { "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 }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !14, i64 8}
!18 = !{!"_ZTSSt4pairIjdE", !19, i64 0, !14, i64 8}
!19 = !{!"int", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!18, !19, i64 0}
!23 = !{!19, !19, 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"

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3net16StaticNetworkSIR14is_susceptibleEj(ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) local_unnamed_addr #3 align 2

declare void @_ZN3net16StaticNetworkSIR9infectionEj(ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3net12update_eventERNS_16StaticNetworkSIRERN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEERSt25uniform_real_distributionIdERSt6vectorISt4pairIjjESaISH_EEb(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, i1 noundef zeroext %4) local_unnamed_addr #2 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = tail call noundef nonnull align 8 dereferenceable(96) ptr @_ZN3net16StaticNetworkSIR14get_event_treeEv(ptr noundef nonnull align 8 dereferenceable(384) %0)
  %9 = tail call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %10 = tail call noundef i32 @_ZN3net10BinaryTree14get_leaf_indexEd(ptr noundef nonnull align 8 dereferenceable(96) %8, double noundef %9)
  %11 = zext i32 %10 to i64
  %12 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3net16StaticNetworkSIR20get_propensity_groupEm(ptr noundef nonnull align 8 dereferenceable(384) %0, i64 noundef %11)
  %13 = tail call noundef double @_ZNK3net16StaticNetworkSIR18get_max_propensityEm(ptr noundef nonnull align 8 dereferenceable(384) %0, i64 noundef %11)
  br label %14

14:                                               ; preds = %5, %14
  %15 = tail call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %16 = tail call noundef i64 @_ZNKSt6vectorISt4pairIjdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  %17 = uitofp i64 %16 to double
  %18 = fmul double %15, %17
  %19 = tail call double @llvm.floor.f64(double %18)
  %20 = fptoui double %19 to i64
  %21 = tail call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt4pairIjdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %20) #5
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = fdiv double %24, %13
  %26 = fcmp olt double %21, %25
  br i1 %26, label %27, label %14, !llvm.loop !11

27:                                               ; preds = %14
  %28 = tail call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %1)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %29 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt4pairIjdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %20) #5
  %30 = load i32, ptr %29, align 8, !tbaa !13
  store i32 %30, ptr %6, align 4, !tbaa !14
  %31 = tail call noundef zeroext i1 @_ZN3net16StaticNetworkSIR11is_infectedEj(ptr noundef nonnull align 8 dereferenceable(384) %0, i32 noundef %30)
  br i1 %31, label %32, label %52

32:                                               ; preds = %27
  %33 = tail call noundef double @_ZNK3net16StaticNetworkSIR17get_recovery_rateEv(ptr noundef nonnull align 8 dereferenceable(384) %0)
  %34 = fdiv double %33, %24
  %35 = fcmp olt double %28, %34
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  tail call void @_ZN3net16StaticNetworkSIR8recoveryEmm(ptr noundef nonnull align 8 dereferenceable(384) %0, i64 noundef %11, i64 noundef %20)
  br label %53

37:                                               ; preds = %32
  %38 = tail call noundef double @_ZNSt25uniform_real_distributionIdEclIN10pcg_detail6engineIjmNS2_12xsh_rr_mixinIjmEELb1ENS2_15specific_streamImEENS2_18default_multiplierImEEEEEEdRT_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %39 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3net7Network19get_neighbor_vectorEj(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %30)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %40 = tail call noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #5
  %41 = uitofp i64 %40 to double
  %42 = fmul double %38, %41
  %43 = tail call double @llvm.floor.f64(double %42)
  %44 = fptoui double %43 to i64
  %45 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %44) #5
  %46 = load i32, ptr %45, align 4, !tbaa !14
  store i32 %46, ptr %7, align 4, !tbaa !14
  %47 = tail call noundef zeroext i1 @_ZN3net16StaticNetworkSIR14is_susceptibleEj(ptr noundef nonnull align 8 dereferenceable(384) %0, i32 noundef %46)
  br i1 %47, label %48, label %51

48:                                               ; preds = %37
  tail call void @_ZN3net16StaticNetworkSIR9infectionEj(ptr noundef nonnull align 8 dereferenceable(384) %0, i32 noundef %46)
  br i1 %4, label %49, label %51

49:                                               ; preds = %48
  %50 = call noundef nonnull align 1 ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE12emplace_backIJRjS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br label %51

51:                                               ; preds = %48, %49, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %53

52:                                               ; preds = %27
  tail call void @_ZN3net16StaticNetworkSIR13immunity_lossEmm(ptr noundef nonnull align 8 dereferenceable(384) %0, i64 noundef %11, i64 noundef %20)
  br label %53

53:                                               ; preds = %36, %51, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(96) ptr @_ZN3net16StaticNetworkSIR14get_event_treeEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3 align 2

declare noundef i32 @_ZN3net10BinaryTree14get_leaf_indexEd(ptr noundef nonnull align 8 dereferenceable(96), double noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3net16StaticNetworkSIR20get_propensity_groupEm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3net16StaticNetworkSIR18get_max_propensityEm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorISt4pairIjdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt4pairIjdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3net16StaticNetworkSIR11is_infectedEj(ptr noundef nonnull align 8 dereferenceable(384), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3net16StaticNetworkSIR17get_recovery_rateEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3 align 2

declare void @_ZN3net16StaticNetworkSIR8recoveryEmm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3net7Network19get_neighbor_vectorEj(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorIjSaIjEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIjSaIjEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 1 ptr @_ZNSt6vectorISt4pairIjjESaIS1_EE12emplace_backIJRjS5_EEERS1_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

declare void @_ZN3net16StaticNetworkSIR13immunity_lossEmm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef, i64 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { mustprogress 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 = { mustprogress 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 = { "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 }

!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, !10, i64 8}
!6 = !{!"_ZTSSt4pairIjdE", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!6, !7, i64 0}
!14 = !{!7, !7, i64 0}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopRotatePass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass