; LLVM IR from tsotchke/quantum_geometric_tensor :: src/quantum_geometric/core (quantum_geometric_core)

; 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.Stream = type { ptr, i8 }
%struct.Event = type { ptr, i8, ptr }

@streams = external hidden global [16 x %struct.Stream], align 16
@events = external hidden global [32 x %struct.Event], align 16
@is_initialized = external hidden global 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 uwtable
define dso_local i32 @geometric_core_record_event(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %14

13:                                               ; preds = %2
  store i32 -1, ptr %3, align 4
  br label %80

14:                                               ; preds = %2
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %14
  store i32 -1, ptr %3, align 4
  br label %80

18:                                               ; preds = %14
  %19 = load i8, ptr @is_initialized, align 1, !tbaa !9, !range !11, !noundef !12
  %20 = trunc i8 %19 to i1
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  store i32 -4, ptr %3, align 4
  br label %80

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #2
  store i32 0, ptr %8, align 4, !tbaa !13
  br label %23

23:                                               ; preds = %40, %22
  %24 = load i32, ptr %8, align 4, !tbaa !13
  %25 = icmp slt i32 %24, 32
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  store i32 2, ptr %9, align 4
  br label %43

27:                                               ; preds = %23
  %28 = load i32, ptr %8, align 4, !tbaa !13
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [32 x %struct.Event], ptr @events, i64 0, i64 %29
  %31 = getelementptr inbounds %struct.Event, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !15
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = icmp eq ptr %32, %33
  br i1 %34, label %35, label %39

35:                                               ; preds = %27
  %36 = load i32, ptr %8, align 4, !tbaa !13
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [32 x %struct.Event], ptr @events, i64 0, i64 %37
  store ptr %38, ptr %6, align 8, !tbaa !5
  store i32 2, ptr %9, align 4
  br label %43

39:                                               ; preds = %27
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %8, align 4, !tbaa !13
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %8, align 4, !tbaa !13
  br label %23, !llvm.loop !17

43:                                               ; preds = %35, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #2
  br label %44

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #2
  store i32 0, ptr %10, align 4, !tbaa !13
  br label %45

45:                                               ; preds = %62, %44
  %46 = load i32, ptr %10, align 4, !tbaa !13
  %47 = icmp slt i32 %46, 16
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  store i32 5, ptr %9, align 4
  br label %65

49:                                               ; preds = %45
  %50 = load i32, ptr %10, align 4, !tbaa !13
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [16 x %struct.Stream], ptr @streams, i64 0, i64 %51
  %53 = getelementptr inbounds %struct.Stream, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 16, !tbaa !19
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = icmp eq ptr %54, %55
  br i1 %56, label %57, label %61

57:                                               ; preds = %49
  %58 = load i32, ptr %10, align 4, !tbaa !13
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [16 x %struct.Stream], ptr @streams, i64 0, i64 %59
  store ptr %60, ptr %7, align 8, !tbaa !5
  store i32 5, ptr %9, align 4
  br label %65

61:                                               ; preds = %49
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %10, align 4, !tbaa !13
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %10, align 4, !tbaa !13
  br label %45, !llvm.loop !21

65:                                               ; preds = %57, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #2
  br label %66

66:                                               ; preds = %65
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %72

69:                                               ; preds = %66
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %73, label %72

72:                                               ; preds = %69, %66
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %79

73:                                               ; preds = %69
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.Event, ptr %74, i32 0, i32 1
  store i8 1, ptr %75, align 8, !tbaa !22
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.Event, ptr %77, i32 0, i32 2
  store ptr %76, ptr %78, align 8, !tbaa !23
  store i32 0, ptr %3, align 4
  store i32 1, ptr %9, align 4
  br label %79

79:                                               ; preds = %73, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  br label %80

80:                                               ; preds = %79, %21, %17, %13
  %81 = load i32, ptr %3, align 4
  ret i32 %81
}

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, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"Event", !6, i64 0, !10, i64 8, !6, i64 16}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !6, i64 0}
!20 = !{!"Stream", !6, i64 0, !10, i64 8}
!21 = distinct !{!21, !18}
!22 = !{!16, !10, i64 8}
!23 = !{!16, !6, i64 16}


; 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.Stream = type { ptr, i8 }
%struct.Event = type { ptr, i8, ptr }

@streams = external hidden global [16 x %struct.Stream], align 16
@events = external hidden local_unnamed_addr global [32 x %struct.Event], align 16
@is_initialized = external hidden local_unnamed_addr global i8, align 1

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: write, inaccessiblemem: none) uwtable
define dso_local range(i32 -4, 1) i32 @geometric_core_record_event(ptr noundef readnone %0, ptr noundef readnone %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  %4 = icmp eq ptr %1, null
  %or.cond24 = or i1 %3, %4
  br i1 %or.cond24, label %.thread, label %5

5:                                                ; preds = %2
  %6 = load i8, ptr @is_initialized, align 1, !tbaa !5, !range !9, !noundef !10
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %.preheader.preheader, label %.thread

.preheader.preheader:                             ; preds = %5
  %8 = load ptr, ptr @events, align 16, !tbaa !11
  %9 = icmp eq ptr %8, %0
  br i1 %9, label %72, label %.preheader.1

.preheader.1:                                     ; preds = %.preheader.preheader
  %10 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 24), align 8, !tbaa !11
  %11 = icmp eq ptr %10, %0
  br i1 %11, label %72, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.1
  %12 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 48), align 16, !tbaa !11
  %13 = icmp eq ptr %12, %0
  br i1 %13, label %72, label %.preheader.3

.preheader.3:                                     ; preds = %.preheader.2
  %14 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 72), align 8, !tbaa !11
  %15 = icmp eq ptr %14, %0
  br i1 %15, label %72, label %.preheader.4

.preheader.4:                                     ; preds = %.preheader.3
  %16 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 96), align 16, !tbaa !11
  %17 = icmp eq ptr %16, %0
  br i1 %17, label %72, label %.preheader.5

.preheader.5:                                     ; preds = %.preheader.4
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 120), align 8, !tbaa !11
  %19 = icmp eq ptr %18, %0
  br i1 %19, label %72, label %.preheader.6

.preheader.6:                                     ; preds = %.preheader.5
  %20 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 144), align 16, !tbaa !11
  %21 = icmp eq ptr %20, %0
  br i1 %21, label %72, label %.preheader.7

.preheader.7:                                     ; preds = %.preheader.6
  %22 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 168), align 8, !tbaa !11
  %23 = icmp eq ptr %22, %0
  br i1 %23, label %72, label %.preheader.8

.preheader.8:                                     ; preds = %.preheader.7
  %24 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 192), align 16, !tbaa !11
  %25 = icmp eq ptr %24, %0
  br i1 %25, label %72, label %.preheader.9

.preheader.9:                                     ; preds = %.preheader.8
  %26 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 216), align 8, !tbaa !11
  %27 = icmp eq ptr %26, %0
  br i1 %27, label %72, label %.preheader.10

.preheader.10:                                    ; preds = %.preheader.9
  %28 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 240), align 16, !tbaa !11
  %29 = icmp eq ptr %28, %0
  br i1 %29, label %72, label %.preheader.11

.preheader.11:                                    ; preds = %.preheader.10
  %30 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 264), align 8, !tbaa !11
  %31 = icmp eq ptr %30, %0
  br i1 %31, label %72, label %.preheader.12

.preheader.12:                                    ; preds = %.preheader.11
  %32 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 288), align 16, !tbaa !11
  %33 = icmp eq ptr %32, %0
  br i1 %33, label %72, label %.preheader.13

.preheader.13:                                    ; preds = %.preheader.12
  %34 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 312), align 8, !tbaa !11
  %35 = icmp eq ptr %34, %0
  br i1 %35, label %72, label %.preheader.14

.preheader.14:                                    ; preds = %.preheader.13
  %36 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 336), align 16, !tbaa !11
  %37 = icmp eq ptr %36, %0
  br i1 %37, label %72, label %.preheader.15

.preheader.15:                                    ; preds = %.preheader.14
  %38 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 360), align 8, !tbaa !11
  %39 = icmp eq ptr %38, %0
  br i1 %39, label %72, label %.preheader.16

.preheader.16:                                    ; preds = %.preheader.15
  %40 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 384), align 16, !tbaa !11
  %41 = icmp eq ptr %40, %0
  br i1 %41, label %72, label %.preheader.17

.preheader.17:                                    ; preds = %.preheader.16
  %42 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 408), align 8, !tbaa !11
  %43 = icmp eq ptr %42, %0
  br i1 %43, label %72, label %.preheader.18

.preheader.18:                                    ; preds = %.preheader.17
  %44 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 432), align 16, !tbaa !11
  %45 = icmp eq ptr %44, %0
  br i1 %45, label %72, label %.preheader.19

.preheader.19:                                    ; preds = %.preheader.18
  %46 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 456), align 8, !tbaa !11
  %47 = icmp eq ptr %46, %0
  br i1 %47, label %72, label %.preheader.20

.preheader.20:                                    ; preds = %.preheader.19
  %48 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 480), align 16, !tbaa !11
  %49 = icmp eq ptr %48, %0
  br i1 %49, label %72, label %.preheader.21

.preheader.21:                                    ; preds = %.preheader.20
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 504), align 8, !tbaa !11
  %51 = icmp eq ptr %50, %0
  br i1 %51, label %72, label %.preheader.22

.preheader.22:                                    ; preds = %.preheader.21
  %52 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 528), align 16, !tbaa !11
  %53 = icmp eq ptr %52, %0
  br i1 %53, label %72, label %.preheader.23

.preheader.23:                                    ; preds = %.preheader.22
  %54 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 552), align 8, !tbaa !11
  %55 = icmp eq ptr %54, %0
  br i1 %55, label %72, label %.preheader.24

.preheader.24:                                    ; preds = %.preheader.23
  %56 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 576), align 16, !tbaa !11
  %57 = icmp eq ptr %56, %0
  br i1 %57, label %72, label %.preheader.25

.preheader.25:                                    ; preds = %.preheader.24
  %58 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 600), align 8, !tbaa !11
  %59 = icmp eq ptr %58, %0
  br i1 %59, label %72, label %.preheader.26

.preheader.26:                                    ; preds = %.preheader.25
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 624), align 16, !tbaa !11
  %61 = icmp eq ptr %60, %0
  br i1 %61, label %72, label %.preheader.27

.preheader.27:                                    ; preds = %.preheader.26
  %62 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 648), align 8, !tbaa !11
  %63 = icmp eq ptr %62, %0
  br i1 %63, label %72, label %.preheader.28

.preheader.28:                                    ; preds = %.preheader.27
  %64 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 672), align 16, !tbaa !11
  %65 = icmp eq ptr %64, %0
  br i1 %65, label %72, label %.preheader.29

.preheader.29:                                    ; preds = %.preheader.28
  %66 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 696), align 8, !tbaa !11
  %67 = icmp eq ptr %66, %0
  br i1 %67, label %72, label %.preheader.30

.preheader.30:                                    ; preds = %.preheader.29
  %68 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 720), align 16, !tbaa !11
  %69 = icmp eq ptr %68, %0
  br i1 %69, label %72, label %.preheader.31

.preheader.31:                                    ; preds = %.preheader.30
  %70 = load ptr, ptr getelementptr inbounds (i8, ptr @events, i64 744), align 8, !tbaa !11
  %71 = icmp ne ptr %70, %0
  %spec.select32 = select i1 %71, ptr null, ptr getelementptr inbounds (i8, ptr @events, i64 744)
  br label %72

72:                                               ; preds = %.preheader.31, %.preheader.30, %.preheader.29, %.preheader.28, %.preheader.27, %.preheader.26, %.preheader.25, %.preheader.24, %.preheader.23, %.preheader.22, %.preheader.21, %.preheader.20, %.preheader.19, %.preheader.18, %.preheader.17, %.preheader.16, %.preheader.15, %.preheader.14, %.preheader.13, %.preheader.12, %.preheader.11, %.preheader.10, %.preheader.9, %.preheader.8, %.preheader.7, %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %.not = phi i1 [ false, %.preheader.preheader ], [ false, %.preheader.1 ], [ false, %.preheader.2 ], [ false, %.preheader.3 ], [ false, %.preheader.4 ], [ false, %.preheader.5 ], [ false, %.preheader.6 ], [ false, %.preheader.7 ], [ false, %.preheader.8 ], [ false, %.preheader.9 ], [ false, %.preheader.10 ], [ false, %.preheader.11 ], [ false, %.preheader.12 ], [ false, %.preheader.13 ], [ false, %.preheader.14 ], [ false, %.preheader.15 ], [ false, %.preheader.16 ], [ false, %.preheader.17 ], [ false, %.preheader.18 ], [ false, %.preheader.19 ], [ false, %.preheader.20 ], [ false, %.preheader.21 ], [ false, %.preheader.22 ], [ false, %.preheader.23 ], [ false, %.preheader.24 ], [ false, %.preheader.25 ], [ false, %.preheader.26 ], [ false, %.preheader.27 ], [ false, %.preheader.28 ], [ false, %.preheader.29 ], [ false, %.preheader.30 ], [ %71, %.preheader.31 ]
  %.020 = phi ptr [ @events, %.preheader.preheader ], [ getelementptr inbounds (i8, ptr @events, i64 24), %.preheader.1 ], [ getelementptr inbounds (i8, ptr @events, i64 48), %.preheader.2 ], [ getelementptr inbounds (i8, ptr @events, i64 72), %.preheader.3 ], [ getelementptr inbounds (i8, ptr @events, i64 96), %.preheader.4 ], [ getelementptr inbounds (i8, ptr @events, i64 120), %.preheader.5 ], [ getelementptr inbounds (i8, ptr @events, i64 144), %.preheader.6 ], [ getelementptr inbounds (i8, ptr @events, i64 168), %.preheader.7 ], [ getelementptr inbounds (i8, ptr @events, i64 192), %.preheader.8 ], [ getelementptr inbounds (i8, ptr @events, i64 216), %.preheader.9 ], [ getelementptr inbounds (i8, ptr @events, i64 240), %.preheader.10 ], [ getelementptr inbounds (i8, ptr @events, i64 264), %.preheader.11 ], [ getelementptr inbounds (i8, ptr @events, i64 288), %.preheader.12 ], [ getelementptr inbounds (i8, ptr @events, i64 312), %.preheader.13 ], [ getelementptr inbounds (i8, ptr @events, i64 336), %.preheader.14 ], [ getelementptr inbounds (i8, ptr @events, i64 360), %.preheader.15 ], [ getelementptr inbounds (i8, ptr @events, i64 384), %.preheader.16 ], [ getelementptr inbounds (i8, ptr @events, i64 408), %.preheader.17 ], [ getelementptr inbounds (i8, ptr @events, i64 432), %.preheader.18 ], [ getelementptr inbounds (i8, ptr @events, i64 456), %.preheader.19 ], [ getelementptr inbounds (i8, ptr @events, i64 480), %.preheader.20 ], [ getelementptr inbounds (i8, ptr @events, i64 504), %.preheader.21 ], [ getelementptr inbounds (i8, ptr @events, i64 528), %.preheader.22 ], [ getelementptr inbounds (i8, ptr @events, i64 552), %.preheader.23 ], [ getelementptr inbounds (i8, ptr @events, i64 576), %.preheader.24 ], [ getelementptr inbounds (i8, ptr @events, i64 600), %.preheader.25 ], [ getelementptr inbounds (i8, ptr @events, i64 624), %.preheader.26 ], [ getelementptr inbounds (i8, ptr @events, i64 648), %.preheader.27 ], [ getelementptr inbounds (i8, ptr @events, i64 672), %.preheader.28 ], [ getelementptr inbounds (i8, ptr @events, i64 696), %.preheader.29 ], [ getelementptr inbounds (i8, ptr @events, i64 720), %.preheader.30 ], [ %spec.select32, %.preheader.31 ]
  %73 = load ptr, ptr @streams, align 16, !tbaa !14
  %74 = icmp eq ptr %73, %1
  br i1 %74, label %120, label %75

75:                                               ; preds = %72
  %76 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 16), align 16, !tbaa !14
  %77 = icmp eq ptr %76, %1
  br i1 %77, label %120, label %78

78:                                               ; preds = %75
  %79 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 32), align 16, !tbaa !14
  %80 = icmp eq ptr %79, %1
  br i1 %80, label %120, label %81

81:                                               ; preds = %78
  %82 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 48), align 16, !tbaa !14
  %83 = icmp eq ptr %82, %1
  br i1 %83, label %120, label %84

84:                                               ; preds = %81
  %85 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 64), align 16, !tbaa !14
  %86 = icmp eq ptr %85, %1
  br i1 %86, label %120, label %87

87:                                               ; preds = %84
  %88 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 80), align 16, !tbaa !14
  %89 = icmp eq ptr %88, %1
  br i1 %89, label %120, label %90

90:                                               ; preds = %87
  %91 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 96), align 16, !tbaa !14
  %92 = icmp eq ptr %91, %1
  br i1 %92, label %120, label %93

93:                                               ; preds = %90
  %94 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 112), align 16, !tbaa !14
  %95 = icmp eq ptr %94, %1
  br i1 %95, label %120, label %96

96:                                               ; preds = %93
  %97 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 128), align 16, !tbaa !14
  %98 = icmp eq ptr %97, %1
  br i1 %98, label %120, label %99

99:                                               ; preds = %96
  %100 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 144), align 16, !tbaa !14
  %101 = icmp eq ptr %100, %1
  br i1 %101, label %120, label %102

102:                                              ; preds = %99
  %103 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 160), align 16, !tbaa !14
  %104 = icmp eq ptr %103, %1
  br i1 %104, label %120, label %105

105:                                              ; preds = %102
  %106 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 176), align 16, !tbaa !14
  %107 = icmp eq ptr %106, %1
  br i1 %107, label %120, label %108

108:                                              ; preds = %105
  %109 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 192), align 16, !tbaa !14
  %110 = icmp eq ptr %109, %1
  br i1 %110, label %120, label %111

111:                                              ; preds = %108
  %112 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 208), align 16, !tbaa !14
  %113 = icmp eq ptr %112, %1
  br i1 %113, label %120, label %114

114:                                              ; preds = %111
  %115 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 224), align 16, !tbaa !14
  %116 = icmp eq ptr %115, %1
  br i1 %116, label %120, label %117

117:                                              ; preds = %114
  %118 = load ptr, ptr getelementptr inbounds (i8, ptr @streams, i64 240), align 16, !tbaa !14
  %119 = icmp eq ptr %118, %1
  br i1 %119, label %120, label %.thread

120:                                              ; preds = %117, %114, %111, %108, %105, %102, %99, %96, %93, %90, %87, %84, %81, %78, %75, %72
  %.lcssa = phi ptr [ @streams, %72 ], [ getelementptr inbounds (i8, ptr @streams, i64 16), %75 ], [ getelementptr inbounds (i8, ptr @streams, i64 32), %78 ], [ getelementptr inbounds (i8, ptr @streams, i64 48), %81 ], [ getelementptr inbounds (i8, ptr @streams, i64 64), %84 ], [ getelementptr inbounds (i8, ptr @streams, i64 80), %87 ], [ getelementptr inbounds (i8, ptr @streams, i64 96), %90 ], [ getelementptr inbounds (i8, ptr @streams, i64 112), %93 ], [ getelementptr inbounds (i8, ptr @streams, i64 128), %96 ], [ getelementptr inbounds (i8, ptr @streams, i64 144), %99 ], [ getelementptr inbounds (i8, ptr @streams, i64 160), %102 ], [ getelementptr inbounds (i8, ptr @streams, i64 176), %105 ], [ getelementptr inbounds (i8, ptr @streams, i64 192), %108 ], [ getelementptr inbounds (i8, ptr @streams, i64 208), %111 ], [ getelementptr inbounds (i8, ptr @streams, i64 224), %114 ], [ getelementptr inbounds (i8, ptr @streams, i64 240), %117 ]
  br i1 %.not, label %.thread, label %121

121:                                              ; preds = %120
  %122 = getelementptr inbounds i8, ptr %.020, i64 8
  store i8 1, ptr %122, align 8, !tbaa !16
  %123 = getelementptr inbounds i8, ptr %.020, i64 16
  store ptr %.lcssa, ptr %123, align 8, !tbaa !17
  br label %.thread

.thread:                                          ; preds = %117, %121, %120, %5, %2
  %.1 = phi i32 [ -1, %2 ], [ -4, %5 ], [ 0, %121 ], [ -1, %120 ], [ -1, %117 ]
  ret i32 %.1
}

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

!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 = !{!"_Bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !13, i64 0}
!12 = !{!"Event", !13, i64 0, !6, i64 8, !13, i64 16}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"Stream", !13, i64 0, !6, i64 8}
!16 = !{!12, !6, i64 8}
!17 = !{!12, !13, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass