; LLVM IR from FSmallenburg/EDMD :: Grow (mdgrow)

; 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.sevent = type { double, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i32, i32 }

@currentlist = external dso_local global i32, align 4
@nempty = external dso_local global i32, align 4
@eventpool = external dso_local global [100012 x ptr], align 16
@eventlists = external dso_local global [500001 x ptr], align 16

; 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 uwtable
define dso_local void @removeevent(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.sevent, ptr %6, i32 0, i32 9
  %8 = load i32, ptr %7, align 4, !tbaa !9
  %9 = load i32, ptr @currentlist, align 4, !tbaa !13
  %10 = icmp ne i32 %8, %9
  br i1 %10, label %11, label %52

11:                                               ; preds = %1
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.sevent, ptr %12, i32 0, i32 7
  %14 = load ptr, ptr %13, align 8, !tbaa !14
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %24

16:                                               ; preds = %11
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.sevent, ptr %17, i32 0, i32 6
  %19 = load ptr, ptr %18, align 8, !tbaa !15
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.sevent, ptr %20, i32 0, i32 7
  %22 = load ptr, ptr %21, align 8, !tbaa !14
  %23 = getelementptr inbounds %struct.sevent, ptr %22, i32 0, i32 6
  store ptr %19, ptr %23, align 8, !tbaa !15
  br label %24

24:                                               ; preds = %16, %11
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.sevent, ptr %25, i32 0, i32 6
  %27 = load ptr, ptr %26, align 8, !tbaa !15
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %37

29:                                               ; preds = %24
  %30 = load ptr, ptr %2, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.sevent, ptr %30, i32 0, i32 7
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.sevent, ptr %33, i32 0, i32 6
  %35 = load ptr, ptr %34, align 8, !tbaa !15
  %36 = getelementptr inbounds %struct.sevent, ptr %35, i32 0, i32 7
  store ptr %32, ptr %36, align 8, !tbaa !14
  br label %46

37:                                               ; preds = %24
  %38 = load ptr, ptr %2, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.sevent, ptr %38, i32 0, i32 7
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  %41 = load ptr, ptr %2, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.sevent, ptr %41, i32 0, i32 9
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [500001 x ptr], ptr @eventlists, i64 0, i64 %44
  store ptr %40, ptr %45, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %37, %29
  %47 = load ptr, ptr %2, align 8, !tbaa !5
  %48 = load i32, ptr @nempty, align 4, !tbaa !13
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr @nempty, align 4, !tbaa !13
  %50 = sext i32 %48 to i64
  %51 = getelementptr inbounds [100012 x ptr], ptr @eventpool, i64 0, i64 %50
  store ptr %47, ptr %51, align 8, !tbaa !5
  br label %184

52:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #2
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.sevent, ptr %53, i32 0, i32 3
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  store ptr %55, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #2
  %56 = load ptr, ptr %2, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.sevent, ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !17
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %73

60:                                               ; preds = %52
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.sevent, ptr %61, i32 0, i32 2
  %63 = load ptr, ptr %62, align 8, !tbaa !18
  store ptr %63, ptr %4, align 8, !tbaa !5
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %72

66:                                               ; preds = %60
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.sevent, ptr %68, i32 0, i32 3
  store ptr %67, ptr %69, align 8, !tbaa !16
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.sevent, ptr %70, i32 0, i32 2
  store ptr null, ptr %71, align 8, !tbaa !18
  br label %72

72:                                               ; preds = %66, %60
  br label %164

73:                                               ; preds = %52
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.sevent, ptr %74, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !18
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %87

78:                                               ; preds = %73
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.sevent, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !17
  store ptr %81, ptr %4, align 8, !tbaa !5
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.sevent, ptr %83, i32 0, i32 3
  store ptr %82, ptr %84, align 8, !tbaa !16
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.sevent, ptr %85, i32 0, i32 1
  store ptr null, ptr %86, align 8, !tbaa !17
  br label %163

87:                                               ; preds = %73
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.sevent, ptr %88, i32 0, i32 2
  %90 = load ptr, ptr %89, align 8, !tbaa !18
  store ptr %90, ptr %4, align 8, !tbaa !5
  br label %91

91:                                               ; preds = %96, %87
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.sevent, ptr %92, i32 0, i32 1
  %94 = load ptr, ptr %93, align 8, !tbaa !17
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %100

96:                                               ; preds = %91
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.sevent, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !17
  store ptr %99, ptr %4, align 8, !tbaa !5
  br label %91, !llvm.loop !19

100:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.sevent, ptr %101, i32 0, i32 3
  %103 = load ptr, ptr %102, align 8, !tbaa !16
  store ptr %103, ptr %5, align 8, !tbaa !5
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = load ptr, ptr %2, align 8, !tbaa !5
  %106 = icmp ne ptr %104, %105
  br i1 %106, label %107, label %144

107:                                              ; preds = %100
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.sevent, ptr %108, i32 0, i32 2
  %110 = load ptr, ptr %109, align 8, !tbaa !18
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.sevent, ptr %111, i32 0, i32 1
  store ptr %110, ptr %112, align 8, !tbaa !17
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.sevent, ptr %113, i32 0, i32 2
  %115 = load ptr, ptr %114, align 8, !tbaa !18
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %123

117:                                              ; preds = %107
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.sevent, ptr %119, i32 0, i32 2
  %121 = load ptr, ptr %120, align 8, !tbaa !18
  %122 = getelementptr inbounds %struct.sevent, ptr %121, i32 0, i32 3
  store ptr %118, ptr %122, align 8, !tbaa !16
  br label %123

123:                                              ; preds = %117, %107
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = load ptr, ptr %2, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.sevent, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !17
  %128 = getelementptr inbounds %struct.sevent, ptr %127, i32 0, i32 3
  store ptr %124, ptr %128, align 8, !tbaa !16
  %129 = load ptr, ptr %2, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.sevent, ptr %129, i32 0, i32 1
  %131 = load ptr, ptr %130, align 8, !tbaa !17
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.sevent, ptr %132, i32 0, i32 1
  store ptr %131, ptr %133, align 8, !tbaa !17
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.sevent, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !18
  %138 = getelementptr inbounds %struct.sevent, ptr %137, i32 0, i32 3
  store ptr %134, ptr %138, align 8, !tbaa !16
  %139 = load ptr, ptr %2, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.sevent, ptr %139, i32 0, i32 2
  %141 = load ptr, ptr %140, align 8, !tbaa !18
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.sevent, ptr %142, i32 0, i32 2
  store ptr %141, ptr %143, align 8, !tbaa !18
  br label %155

144:                                              ; preds = %100
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = load ptr, ptr %2, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.sevent, ptr %146, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !17
  %149 = getelementptr inbounds %struct.sevent, ptr %148, i32 0, i32 3
  store ptr %145, ptr %149, align 8, !tbaa !16
  %150 = load ptr, ptr %2, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.sevent, ptr %150, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !17
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.sevent, ptr %153, i32 0, i32 1
  store ptr %152, ptr %154, align 8, !tbaa !17
  br label %155

155:                                              ; preds = %144, %123
  %156 = load ptr, ptr %3, align 8, !tbaa !5
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.sevent, ptr %157, i32 0, i32 3
  store ptr %156, ptr %158, align 8, !tbaa !16
  %159 = load ptr, ptr %2, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.sevent, ptr %159, i32 0, i32 1
  store ptr null, ptr %160, align 8, !tbaa !17
  %161 = load ptr, ptr %2, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.sevent, ptr %161, i32 0, i32 2
  store ptr null, ptr %162, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  br label %163

163:                                              ; preds = %155, %78
  br label %164

164:                                              ; preds = %163, %72
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.sevent, ptr %165, i32 0, i32 1
  %167 = load ptr, ptr %166, align 8, !tbaa !17
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = icmp eq ptr %167, %168
  br i1 %169, label %170, label %174

170:                                              ; preds = %164
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.sevent, ptr %172, i32 0, i32 1
  store ptr %171, ptr %173, align 8, !tbaa !17
  br label %178

174:                                              ; preds = %164
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.sevent, ptr %176, i32 0, i32 2
  store ptr %175, ptr %177, align 8, !tbaa !18
  br label %178

178:                                              ; preds = %174, %170
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  %180 = load i32, ptr @nempty, align 4, !tbaa !13
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr @nempty, align 4, !tbaa !13
  %182 = sext i32 %180 to i64
  %183 = getelementptr inbounds [100012 x ptr], ptr @eventpool, i64 0, i64 %182
  store ptr %179, ptr %183, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #2
  br label %184

184:                                              ; preds = %178, %46
  ret void
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 68}
!10 = !{!"sevent", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !7, i64 64, !12, i64 68, !12, i64 72}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!10, !6, i64 56}
!15 = !{!10, !6, i64 48}
!16 = !{!10, !6, i64 24}
!17 = !{!10, !6, i64 8}
!18 = !{!10, !6, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"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"

@currentlist = external dso_local local_unnamed_addr global i32, align 4
@nempty = external dso_local local_unnamed_addr global i32, align 4
@eventpool = external dso_local local_unnamed_addr global [100012 x ptr], align 16
@eventlists = external dso_local local_unnamed_addr global [500001 x ptr], align 16

; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local void @removeevent(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 68
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = load i32, ptr @currentlist, align 4, !tbaa !12
  %.not = icmp eq i32 %3, %4
  br i1 %.not, label %13, label %5

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  %7 = load ptr, ptr %6, align 8, !tbaa !13
  %.not69 = icmp eq ptr %7, null
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 48
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !14
  br i1 %.not69, label %._crit_edge, label %8

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %7, i64 48
  store ptr %.pre, ptr %9, align 8, !tbaa !14
  br label %._crit_edge

._crit_edge:                                      ; preds = %5, %8
  %.not70 = icmp eq ptr %.pre, null
  %10 = sext i32 %3 to i64
  %11 = getelementptr inbounds [500001 x ptr], ptr @eventlists, i64 0, i64 %10
  %12 = getelementptr inbounds i8, ptr %.pre, i64 56
  %.sink = select i1 %.not70, ptr %11, ptr %12
  store ptr %7, ptr %.sink, align 8, !tbaa !15
  br label %51

13:                                               ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !16
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !17
  %18 = icmp eq ptr %17, null
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = load ptr, ptr %19, align 8, !tbaa !18
  %.not68 = icmp eq ptr %20, null
  br i1 %18, label %21, label %24

21:                                               ; preds = %13
  br i1 %.not68, label %46, label %22

22:                                               ; preds = %21
  %23 = getelementptr inbounds i8, ptr %20, i64 24
  store ptr %15, ptr %23, align 8, !tbaa !16
  store ptr null, ptr %19, align 8, !tbaa !18
  br label %46

24:                                               ; preds = %13
  br i1 %.not68, label %25, label %.preheader

25:                                               ; preds = %24
  %26 = getelementptr inbounds i8, ptr %17, i64 24
  store ptr %15, ptr %26, align 8, !tbaa !16
  store ptr null, ptr %16, align 8, !tbaa !17
  br label %46

.preheader:                                       ; preds = %24, %.preheader
  %.0 = phi ptr [ %28, %.preheader ], [ %20, %24 ]
  %27 = getelementptr inbounds i8, ptr %.0, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !17
  %.not65 = icmp eq ptr %28, null
  br i1 %.not65, label %29, label %.preheader, !llvm.loop !19

29:                                               ; preds = %.preheader
  %30 = getelementptr inbounds i8, ptr %.0, i64 8
  %31 = getelementptr inbounds i8, ptr %.0, i64 24
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %.not66 = icmp eq ptr %32, %0
  br i1 %.not66, label %43, label %33

33:                                               ; preds = %29
  %34 = getelementptr inbounds i8, ptr %.0, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %32, i64 8
  store ptr %35, ptr %36, align 8, !tbaa !17
  %.not67 = icmp eq ptr %35, null
  br i1 %.not67, label %39, label %37

37:                                               ; preds = %33
  %38 = getelementptr inbounds i8, ptr %35, i64 24
  store ptr %32, ptr %38, align 8, !tbaa !16
  br label %39

39:                                               ; preds = %37, %33
  %40 = load ptr, ptr %16, align 8, !tbaa !17
  %41 = getelementptr inbounds i8, ptr %40, i64 24
  store ptr %.0, ptr %41, align 8, !tbaa !16
  store ptr %40, ptr %30, align 8, !tbaa !17
  %42 = getelementptr inbounds i8, ptr %20, i64 24
  store ptr %.0, ptr %42, align 8, !tbaa !16
  store ptr %20, ptr %34, align 8, !tbaa !18
  br label %45

43:                                               ; preds = %29
  %44 = getelementptr inbounds i8, ptr %17, i64 24
  store ptr %.0, ptr %44, align 8, !tbaa !16
  store ptr %17, ptr %30, align 8, !tbaa !17
  br label %45

45:                                               ; preds = %43, %39
  store ptr %15, ptr %31, align 8, !tbaa !16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %16, i8 0, i64 16, i1 false)
  br label %46

46:                                               ; preds = %25, %45, %21, %22
  %.1 = phi ptr [ %20, %22 ], [ null, %21 ], [ %17, %25 ], [ %.0, %45 ]
  %47 = getelementptr inbounds i8, ptr %15, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !17
  %49 = icmp eq ptr %48, %0
  %50 = getelementptr inbounds i8, ptr %15, i64 16
  %.sink73 = select i1 %49, ptr %47, ptr %50
  store ptr %.1, ptr %.sink73, align 8, !tbaa !15
  br label %51

51:                                               ; preds = %46, %._crit_edge
  %52 = load i32, ptr @nempty, align 4, !tbaa !12
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr @nempty, align 4, !tbaa !12
  %54 = sext i32 %52 to i64
  %55 = getelementptr inbounds [100012 x ptr], ptr @eventpool, i64 0, i64 %54
  store ptr %0, ptr %55, align 8, !tbaa !15
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) 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 nounwind willreturn memory(argmem: write) }

!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, !11, i64 68}
!6 = !{!"sevent", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !8, i64 64, !11, i64 68, !11, i64 72}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!6, !10, i64 56}
!14 = !{!6, !10, i64 48}
!15 = !{!10, !10, i64 0}
!16 = !{!6, !10, i64 24}
!17 = !{!6, !10, i64 8}
!18 = !{!6, !10, i64 16}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass