; LLVM IR from bqi343/cp-notebook :: Contests/USACO Training/Ch 5/5.3 schlnet.ll (Z2f1i)

; 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"

@posi = external dso_local global [101 x [101 x i8]], align 16
@d1 = external dso_local global [101 x i8], align 16
@N = external dso_local global i32, align 4
@co = external dso_local global [101 x i32], align 16
@T = external dso_local global [101 x i32], align 16
@cT = external dso_local global i32, align 4

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z2f1i(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %6 = load i32, ptr %2, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %7
  %9 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %10 = trunc i8 %9 to i1
  br i1 %10, label %11, label %12

11:                                               ; preds = %1
  br label %85

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %46, %12
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = load i32, ptr @N, align 4, !tbaa !5
  %16 = add nsw i32 %15, 1
  %17 = icmp slt i32 %14, %16
  br i1 %17, label %19, label %18

18:                                               ; preds = %13
  store i32 2, ptr %4, align 4
  br label %49

19:                                               ; preds = %13
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [101 x [101 x i8]], ptr @posi, i64 0, i64 %21
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [101 x i8], ptr %22, i64 0, i64 %24
  %26 = load i8, ptr %25, align 1, !tbaa !9, !range !11, !noundef !12
  %27 = trunc i8 %26 to i1
  %28 = zext i1 %27 to i32
  %29 = icmp eq i32 %28, 1
  br i1 %29, label %30, label %45

30:                                               ; preds = %19
  %31 = load i32, ptr %2, align 4, !tbaa !5
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [101 x [101 x i8]], ptr @posi, i64 0, i64 %32
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [101 x i8], ptr %33, i64 0, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !9, !range !11, !noundef !12
  %38 = trunc i8 %37 to i1
  %39 = zext i1 %38 to i32
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %45

41:                                               ; preds = %30
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %43
  store i8 1, ptr %44, align 1, !tbaa !9
  store i32 1, ptr %4, align 4
  br label %49

45:                                               ; preds = %30, %19
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %3, align 4, !tbaa !5
  br label %13, !llvm.loop !13

49:                                               ; preds = %41, %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  %50 = load i32, ptr %4, align 4
  switch i32 %50, label %86 [
    i32 2, label %51
    i32 1, label %85
  ]

51:                                               ; preds = %49
  %52 = load i32, ptr @cT, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr @cT, align 4, !tbaa !5
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [101 x i32], ptr @co, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [101 x i32], ptr @T, i64 0, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %59, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #2
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %82, %51
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = load i32, ptr @N, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  %66 = icmp slt i32 %63, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %62
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #2
  br label %85

68:                                               ; preds = %62
  %69 = load i32, ptr %2, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [101 x [101 x i8]], ptr @posi, i64 0, i64 %70
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [101 x i8], ptr %71, i64 0, i64 %73
  %75 = load i8, ptr %74, align 1, !tbaa !9, !range !11, !noundef !12
  %76 = trunc i8 %75 to i1
  br i1 %76, label %77, label %81

77:                                               ; preds = %68
  %78 = load i32, ptr %5, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %79
  store i8 1, ptr %80, align 1, !tbaa !9
  br label %81

81:                                               ; preds = %77, %68
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %5, align 4, !tbaa !5
  br label %62, !llvm.loop !15

85:                                               ; preds = %67, %49, %11
  ret void

86:                                               ; preds = %49
  unreachable
}

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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"

@posi = external dso_local local_unnamed_addr global [101 x [101 x i8]], align 16
@d1 = external dso_local local_unnamed_addr global [101 x i8], align 16
@N = external dso_local local_unnamed_addr global i32, align 4
@co = external dso_local local_unnamed_addr global [101 x i32], align 16
@T = external dso_local local_unnamed_addr global [101 x i32], align 16
@cT = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: mustprogress nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable
define dso_local void @_Z2f1i(i32 noundef %0) local_unnamed_addr #0 {
  %2 = sext i32 %0 to i64
  %3 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %2
  %4 = load i8, ptr %3, align 1, !tbaa !5, !range !9, !noundef !10
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %1
  %6 = load i32, ptr @N, align 4, !tbaa !11
  %.not22 = icmp slt i32 %6, 1
  br i1 %.not22, label %.loopexit.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  %7 = add nuw i32 %6, 1
  %wide.trip.count = zext i32 %7 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %15
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %15 ]
  %8 = getelementptr inbounds [101 x [101 x i8]], ptr @posi, i64 0, i64 %indvars.iv, i64 %2
  %9 = load i8, ptr %8, align 1, !tbaa !5, !range !9, !noundef !10
  %10 = trunc nuw i8 %9 to i1
  br i1 %10, label %11, label %15

11:                                               ; preds = %.lr.ph
  %12 = getelementptr inbounds [101 x [101 x i8]], ptr @posi, i64 0, i64 %2, i64 %indvars.iv
  %13 = load i8, ptr %12, align 1, !tbaa !5, !range !9, !noundef !10
  %14 = icmp eq i8 %13, 0
  br i1 %14, label %16, label %15

15:                                               ; preds = %.lr.ph, %11
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !13

16:                                               ; preds = %11
  store i8 1, ptr %3, align 1, !tbaa !5
  br label %.loopexit

._crit_edge:                                      ; preds = %15
  %17 = load i32, ptr @cT, align 4, !tbaa !11
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr @cT, align 4, !tbaa !11
  %19 = getelementptr inbounds [101 x i32], ptr @co, i64 0, i64 %2
  %20 = load i32, ptr %19, align 4, !tbaa !11
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [101 x i32], ptr @T, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 4, !tbaa !11
  br i1 %.not22, label %.loopexit, label %iter.check

iter.check:                                       ; preds = %._crit_edge
  %25 = add nuw i32 %6, 1
  %wide.trip.count32 = zext i32 %25 to i64
  %26 = zext nneg i32 %6 to i64
  %min.iters.check = icmp ult i32 %6, 8
  br i1 %min.iters.check, label %.lr.ph27.preheader, label %vector.main.loop.iter.check

vector.main.loop.iter.check:                      ; preds = %iter.check
  %min.iters.check34 = icmp ult i32 %6, 32
  br i1 %min.iters.check34, label %vec.epilog.ph, label %vector.ph

vector.ph:                                        ; preds = %vector.main.loop.iter.check
  %n.vec = and i64 %26, 2147483616
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue97, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue97 ]
  %offset.idx = or disjoint i64 %index, 1
  %27 = or disjoint i64 %index, 17
  %28 = getelementptr inbounds [101 x [101 x i8]], ptr @posi, i64 0, i64 %2, i64 %offset.idx
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load = load <16 x i8>, ptr %28, align 1, !tbaa !5
  %wide.load35 = load <16 x i8>, ptr %29, align 1, !tbaa !5
  %30 = trunc <16 x i8> %wide.load to <16 x i1>
  %31 = trunc <16 x i8> %wide.load35 to <16 x i1>
  %32 = extractelement <16 x i1> %30, i64 0
  br i1 %32, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %33 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %offset.idx
  store i8 1, ptr %33, align 1, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %34 = extractelement <16 x i1> %30, i64 1
  br i1 %34, label %pred.store.if36, label %pred.store.continue37

pred.store.if36:                                  ; preds = %pred.store.continue
  %35 = or disjoint i64 %index, 2
  %36 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %35
  store i8 1, ptr %36, align 2, !tbaa !5
  br label %pred.store.continue37

pred.store.continue37:                            ; preds = %pred.store.if36, %pred.store.continue
  %37 = extractelement <16 x i1> %30, i64 2
  br i1 %37, label %pred.store.if38, label %pred.store.continue39

pred.store.if38:                                  ; preds = %pred.store.continue37
  %38 = or disjoint i64 %index, 3
  %39 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %38
  store i8 1, ptr %39, align 1, !tbaa !5
  br label %pred.store.continue39

pred.store.continue39:                            ; preds = %pred.store.if38, %pred.store.continue37
  %40 = extractelement <16 x i1> %30, i64 3
  br i1 %40, label %pred.store.if40, label %pred.store.continue41

pred.store.if40:                                  ; preds = %pred.store.continue39
  %41 = or disjoint i64 %index, 4
  %42 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %41
  store i8 1, ptr %42, align 4, !tbaa !5
  br label %pred.store.continue41

pred.store.continue41:                            ; preds = %pred.store.if40, %pred.store.continue39
  %43 = extractelement <16 x i1> %30, i64 4
  br i1 %43, label %pred.store.if42, label %pred.store.continue43

pred.store.if42:                                  ; preds = %pred.store.continue41
  %44 = or disjoint i64 %index, 5
  %45 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %44
  store i8 1, ptr %45, align 1, !tbaa !5
  br label %pred.store.continue43

pred.store.continue43:                            ; preds = %pred.store.if42, %pred.store.continue41
  %46 = extractelement <16 x i1> %30, i64 5
  br i1 %46, label %pred.store.if44, label %pred.store.continue45

pred.store.if44:                                  ; preds = %pred.store.continue43
  %47 = or disjoint i64 %index, 6
  %48 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %47
  store i8 1, ptr %48, align 2, !tbaa !5
  br label %pred.store.continue45

pred.store.continue45:                            ; preds = %pred.store.if44, %pred.store.continue43
  %49 = extractelement <16 x i1> %30, i64 6
  br i1 %49, label %pred.store.if46, label %pred.store.continue47

pred.store.if46:                                  ; preds = %pred.store.continue45
  %50 = or disjoint i64 %index, 7
  %51 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %50
  store i8 1, ptr %51, align 1, !tbaa !5
  br label %pred.store.continue47

pred.store.continue47:                            ; preds = %pred.store.if46, %pred.store.continue45
  %52 = extractelement <16 x i1> %30, i64 7
  br i1 %52, label %pred.store.if48, label %pred.store.continue49

pred.store.if48:                                  ; preds = %pred.store.continue47
  %53 = or disjoint i64 %index, 8
  %54 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %53
  store i8 1, ptr %54, align 8, !tbaa !5
  br label %pred.store.continue49

pred.store.continue49:                            ; preds = %pred.store.if48, %pred.store.continue47
  %55 = extractelement <16 x i1> %30, i64 8
  br i1 %55, label %pred.store.if50, label %pred.store.continue51

pred.store.if50:                                  ; preds = %pred.store.continue49
  %56 = or disjoint i64 %index, 9
  %57 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %56
  store i8 1, ptr %57, align 1, !tbaa !5
  br label %pred.store.continue51

pred.store.continue51:                            ; preds = %pred.store.if50, %pred.store.continue49
  %58 = extractelement <16 x i1> %30, i64 9
  br i1 %58, label %pred.store.if52, label %pred.store.continue53

pred.store.if52:                                  ; preds = %pred.store.continue51
  %59 = or disjoint i64 %index, 10
  %60 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %59
  store i8 1, ptr %60, align 2, !tbaa !5
  br label %pred.store.continue53

pred.store.continue53:                            ; preds = %pred.store.if52, %pred.store.continue51
  %61 = extractelement <16 x i1> %30, i64 10
  br i1 %61, label %pred.store.if54, label %pred.store.continue55

pred.store.if54:                                  ; preds = %pred.store.continue53
  %62 = or disjoint i64 %index, 11
  %63 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %62
  store i8 1, ptr %63, align 1, !tbaa !5
  br label %pred.store.continue55

pred.store.continue55:                            ; preds = %pred.store.if54, %pred.store.continue53
  %64 = extractelement <16 x i1> %30, i64 11
  br i1 %64, label %pred.store.if56, label %pred.store.continue57

pred.store.if56:                                  ; preds = %pred.store.continue55
  %65 = or disjoint i64 %index, 12
  %66 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %65
  store i8 1, ptr %66, align 4, !tbaa !5
  br label %pred.store.continue57

pred.store.continue57:                            ; preds = %pred.store.if56, %pred.store.continue55
  %67 = extractelement <16 x i1> %30, i64 12
  br i1 %67, label %pred.store.if58, label %pred.store.continue59

pred.store.if58:                                  ; preds = %pred.store.continue57
  %68 = or disjoint i64 %index, 13
  %69 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %68
  store i8 1, ptr %69, align 1, !tbaa !5
  br label %pred.store.continue59

pred.store.continue59:                            ; preds = %pred.store.if58, %pred.store.continue57
  %70 = extractelement <16 x i1> %30, i64 13
  br i1 %70, label %pred.store.if60, label %pred.store.continue61

pred.store.if60:                                  ; preds = %pred.store.continue59
  %71 = or disjoint i64 %index, 14
  %72 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %71
  store i8 1, ptr %72, align 2, !tbaa !5
  br label %pred.store.continue61

pred.store.continue61:                            ; preds = %pred.store.if60, %pred.store.continue59
  %73 = extractelement <16 x i1> %30, i64 14
  br i1 %73, label %pred.store.if62, label %pred.store.continue63

pred.store.if62:                                  ; preds = %pred.store.continue61
  %74 = or disjoint i64 %index, 15
  %75 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %74
  store i8 1, ptr %75, align 1, !tbaa !5
  br label %pred.store.continue63

pred.store.continue63:                            ; preds = %pred.store.if62, %pred.store.continue61
  %76 = extractelement <16 x i1> %30, i64 15
  br i1 %76, label %pred.store.if64, label %pred.store.continue65

pred.store.if64:                                  ; preds = %pred.store.continue63
  %77 = or disjoint i64 %index, 16
  %78 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %77
  store i8 1, ptr %78, align 16, !tbaa !5
  br label %pred.store.continue65

pred.store.continue65:                            ; preds = %pred.store.if64, %pred.store.continue63
  %79 = extractelement <16 x i1> %31, i64 0
  br i1 %79, label %pred.store.if66, label %pred.store.continue67

pred.store.if66:                                  ; preds = %pred.store.continue65
  %80 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %27
  store i8 1, ptr %80, align 1, !tbaa !5
  br label %pred.store.continue67

pred.store.continue67:                            ; preds = %pred.store.if66, %pred.store.continue65
  %81 = extractelement <16 x i1> %31, i64 1
  br i1 %81, label %pred.store.if68, label %pred.store.continue69

pred.store.if68:                                  ; preds = %pred.store.continue67
  %82 = or disjoint i64 %index, 18
  %83 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %82
  store i8 1, ptr %83, align 2, !tbaa !5
  br label %pred.store.continue69

pred.store.continue69:                            ; preds = %pred.store.if68, %pred.store.continue67
  %84 = extractelement <16 x i1> %31, i64 2
  br i1 %84, label %pred.store.if70, label %pred.store.continue71

pred.store.if70:                                  ; preds = %pred.store.continue69
  %85 = or disjoint i64 %index, 19
  %86 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %85
  store i8 1, ptr %86, align 1, !tbaa !5
  br label %pred.store.continue71

pred.store.continue71:                            ; preds = %pred.store.if70, %pred.store.continue69
  %87 = extractelement <16 x i1> %31, i64 3
  br i1 %87, label %pred.store.if72, label %pred.store.continue73

pred.store.if72:                                  ; preds = %pred.store.continue71
  %88 = or disjoint i64 %index, 20
  %89 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %88
  store i8 1, ptr %89, align 4, !tbaa !5
  br label %pred.store.continue73

pred.store.continue73:                            ; preds = %pred.store.if72, %pred.store.continue71
  %90 = extractelement <16 x i1> %31, i64 4
  br i1 %90, label %pred.store.if74, label %pred.store.continue75

pred.store.if74:                                  ; preds = %pred.store.continue73
  %91 = or disjoint i64 %index, 21
  %92 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %91
  store i8 1, ptr %92, align 1, !tbaa !5
  br label %pred.store.continue75

pred.store.continue75:                            ; preds = %pred.store.if74, %pred.store.continue73
  %93 = extractelement <16 x i1> %31, i64 5
  br i1 %93, label %pred.store.if76, label %pred.store.continue77

pred.store.if76:                                  ; preds = %pred.store.continue75
  %94 = or disjoint i64 %index, 22
  %95 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %94
  store i8 1, ptr %95, align 2, !tbaa !5
  br label %pred.store.continue77

pred.store.continue77:                            ; preds = %pred.store.if76, %pred.store.continue75
  %96 = extractelement <16 x i1> %31, i64 6
  br i1 %96, label %pred.store.if78, label %pred.store.continue79

pred.store.if78:                                  ; preds = %pred.store.continue77
  %97 = or disjoint i64 %index, 23
  %98 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %97
  store i8 1, ptr %98, align 1, !tbaa !5
  br label %pred.store.continue79

pred.store.continue79:                            ; preds = %pred.store.if78, %pred.store.continue77
  %99 = extractelement <16 x i1> %31, i64 7
  br i1 %99, label %pred.store.if80, label %pred.store.continue81

pred.store.if80:                                  ; preds = %pred.store.continue79
  %100 = or disjoint i64 %index, 24
  %101 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %100
  store i8 1, ptr %101, align 8, !tbaa !5
  br label %pred.store.continue81

pred.store.continue81:                            ; preds = %pred.store.if80, %pred.store.continue79
  %102 = extractelement <16 x i1> %31, i64 8
  br i1 %102, label %pred.store.if82, label %pred.store.continue83

pred.store.if82:                                  ; preds = %pred.store.continue81
  %103 = or disjoint i64 %index, 25
  %104 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %103
  store i8 1, ptr %104, align 1, !tbaa !5
  br label %pred.store.continue83

pred.store.continue83:                            ; preds = %pred.store.if82, %pred.store.continue81
  %105 = extractelement <16 x i1> %31, i64 9
  br i1 %105, label %pred.store.if84, label %pred.store.continue85

pred.store.if84:                                  ; preds = %pred.store.continue83
  %106 = or disjoint i64 %index, 26
  %107 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %106
  store i8 1, ptr %107, align 2, !tbaa !5
  br label %pred.store.continue85

pred.store.continue85:                            ; preds = %pred.store.if84, %pred.store.continue83
  %108 = extractelement <16 x i1> %31, i64 10
  br i1 %108, label %pred.store.if86, label %pred.store.continue87

pred.store.if86:                                  ; preds = %pred.store.continue85
  %109 = or disjoint i64 %index, 27
  %110 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %109
  store i8 1, ptr %110, align 1, !tbaa !5
  br label %pred.store.continue87

pred.store.continue87:                            ; preds = %pred.store.if86, %pred.store.continue85
  %111 = extractelement <16 x i1> %31, i64 11
  br i1 %111, label %pred.store.if88, label %pred.store.continue89

pred.store.if88:                                  ; preds = %pred.store.continue87
  %112 = or disjoint i64 %index, 28
  %113 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %112
  store i8 1, ptr %113, align 4, !tbaa !5
  br label %pred.store.continue89

pred.store.continue89:                            ; preds = %pred.store.if88, %pred.store.continue87
  %114 = extractelement <16 x i1> %31, i64 12
  br i1 %114, label %pred.store.if90, label %pred.store.continue91

pred.store.if90:                                  ; preds = %pred.store.continue89
  %115 = or disjoint i64 %index, 29
  %116 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %115
  store i8 1, ptr %116, align 1, !tbaa !5
  br label %pred.store.continue91

pred.store.continue91:                            ; preds = %pred.store.if90, %pred.store.continue89
  %117 = extractelement <16 x i1> %31, i64 13
  br i1 %117, label %pred.store.if92, label %pred.store.continue93

pred.store.if92:                                  ; preds = %pred.store.continue91
  %118 = or disjoint i64 %index, 30
  %119 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %118
  store i8 1, ptr %119, align 2, !tbaa !5
  br label %pred.store.continue93

pred.store.continue93:                            ; preds = %pred.store.if92, %pred.store.continue91
  %120 = extractelement <16 x i1> %31, i64 14
  br i1 %120, label %pred.store.if94, label %pred.store.continue95

pred.store.if94:                                  ; preds = %pred.store.continue93
  %121 = or disjoint i64 %index, 31
  %122 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %121
  store i8 1, ptr %122, align 1, !tbaa !5
  br label %pred.store.continue95

pred.store.continue95:                            ; preds = %pred.store.if94, %pred.store.continue93
  %123 = extractelement <16 x i1> %31, i64 15
  br i1 %123, label %pred.store.if96, label %pred.store.continue97

pred.store.if96:                                  ; preds = %pred.store.continue95
  %124 = add i64 %index, 32
  %125 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %124
  store i8 1, ptr %125, align 16, !tbaa !5
  br label %pred.store.continue97

pred.store.continue97:                            ; preds = %pred.store.if96, %pred.store.continue95
  %index.next = add nuw i64 %index, 32
  %126 = icmp eq i64 %index.next, %n.vec
  br i1 %126, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %pred.store.continue97
  %cmp.n = icmp eq i64 %n.vec, %26
  br i1 %cmp.n, label %.loopexit, label %vec.epilog.iter.check

vec.epilog.iter.check:                            ; preds = %middle.block
  %ind.end100 = or disjoint i64 %n.vec, 1
  %n.vec.remaining = and i64 %26, 24
  %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0
  br i1 %min.epilog.iters.check, label %.lr.ph27.preheader, label %vec.epilog.ph

vec.epilog.ph:                                    ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check
  %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
  %n.vec99 = and i64 %26, 2147483640
  %ind.end = or disjoint i64 %n.vec99, 1
  br label %vec.epilog.vector.body

vec.epilog.vector.body:                           ; preds = %pred.store.continue119, %vec.epilog.ph
  %index101 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next120, %pred.store.continue119 ]
  %offset.idx102 = or disjoint i64 %index101, 1
  %127 = getelementptr inbounds [101 x [101 x i8]], ptr @posi, i64 0, i64 %2, i64 %offset.idx102
  %wide.load103 = load <8 x i8>, ptr %127, align 1, !tbaa !5
  %128 = trunc <8 x i8> %wide.load103 to <8 x i1>
  %129 = extractelement <8 x i1> %128, i64 0
  br i1 %129, label %pred.store.if104, label %pred.store.continue105

pred.store.if104:                                 ; preds = %vec.epilog.vector.body
  %130 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %offset.idx102
  store i8 1, ptr %130, align 1, !tbaa !5
  br label %pred.store.continue105

pred.store.continue105:                           ; preds = %pred.store.if104, %vec.epilog.vector.body
  %131 = extractelement <8 x i1> %128, i64 1
  br i1 %131, label %pred.store.if106, label %pred.store.continue107

pred.store.if106:                                 ; preds = %pred.store.continue105
  %132 = or disjoint i64 %index101, 2
  %133 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %132
  store i8 1, ptr %133, align 2, !tbaa !5
  br label %pred.store.continue107

pred.store.continue107:                           ; preds = %pred.store.if106, %pred.store.continue105
  %134 = extractelement <8 x i1> %128, i64 2
  br i1 %134, label %pred.store.if108, label %pred.store.continue109

pred.store.if108:                                 ; preds = %pred.store.continue107
  %135 = or disjoint i64 %index101, 3
  %136 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %135
  store i8 1, ptr %136, align 1, !tbaa !5
  br label %pred.store.continue109

pred.store.continue109:                           ; preds = %pred.store.if108, %pred.store.continue107
  %137 = extractelement <8 x i1> %128, i64 3
  br i1 %137, label %pred.store.if110, label %pred.store.continue111

pred.store.if110:                                 ; preds = %pred.store.continue109
  %138 = or disjoint i64 %index101, 4
  %139 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %138
  store i8 1, ptr %139, align 4, !tbaa !5
  br label %pred.store.continue111

pred.store.continue111:                           ; preds = %pred.store.if110, %pred.store.continue109
  %140 = extractelement <8 x i1> %128, i64 4
  br i1 %140, label %pred.store.if112, label %pred.store.continue113

pred.store.if112:                                 ; preds = %pred.store.continue111
  %141 = or disjoint i64 %index101, 5
  %142 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %141
  store i8 1, ptr %142, align 1, !tbaa !5
  br label %pred.store.continue113

pred.store.continue113:                           ; preds = %pred.store.if112, %pred.store.continue111
  %143 = extractelement <8 x i1> %128, i64 5
  br i1 %143, label %pred.store.if114, label %pred.store.continue115

pred.store.if114:                                 ; preds = %pred.store.continue113
  %144 = or disjoint i64 %index101, 6
  %145 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %144
  store i8 1, ptr %145, align 2, !tbaa !5
  br label %pred.store.continue115

pred.store.continue115:                           ; preds = %pred.store.if114, %pred.store.continue113
  %146 = extractelement <8 x i1> %128, i64 6
  br i1 %146, label %pred.store.if116, label %pred.store.continue117

pred.store.if116:                                 ; preds = %pred.store.continue115
  %147 = or disjoint i64 %index101, 7
  %148 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %147
  store i8 1, ptr %148, align 1, !tbaa !5
  br label %pred.store.continue117

pred.store.continue117:                           ; preds = %pred.store.if116, %pred.store.continue115
  %149 = extractelement <8 x i1> %128, i64 7
  br i1 %149, label %pred.store.if118, label %pred.store.continue119

pred.store.if118:                                 ; preds = %pred.store.continue117
  %150 = add i64 %index101, 8
  %151 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %150
  store i8 1, ptr %151, align 8, !tbaa !5
  br label %pred.store.continue119

pred.store.continue119:                           ; preds = %pred.store.if118, %pred.store.continue117
  %index.next120 = add nuw i64 %index101, 8
  %152 = icmp eq i64 %index.next120, %n.vec99
  br i1 %152, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !18

vec.epilog.middle.block:                          ; preds = %pred.store.continue119
  %cmp.n121 = icmp eq i64 %n.vec99, %26
  br i1 %cmp.n121, label %.loopexit, label %.lr.ph27.preheader

.lr.ph27.preheader:                               ; preds = %vec.epilog.middle.block, %iter.check, %vec.epilog.iter.check
  %indvars.iv29.ph = phi i64 [ 1, %iter.check ], [ %ind.end100, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ]
  br label %.lr.ph27

.lr.ph27:                                         ; preds = %.lr.ph27.preheader, %158
  %indvars.iv29 = phi i64 [ %indvars.iv.next30, %158 ], [ %indvars.iv29.ph, %.lr.ph27.preheader ]
  %153 = getelementptr inbounds [101 x [101 x i8]], ptr @posi, i64 0, i64 %2, i64 %indvars.iv29
  %154 = load i8, ptr %153, align 1, !tbaa !5, !range !9, !noundef !10
  %155 = trunc nuw i8 %154 to i1
  br i1 %155, label %156, label %158

156:                                              ; preds = %.lr.ph27
  %157 = getelementptr inbounds [101 x i8], ptr @d1, i64 0, i64 %indvars.iv29
  store i8 1, ptr %157, align 1, !tbaa !5
  br label %158

158:                                              ; preds = %.lr.ph27, %156
  %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1
  %exitcond33.not = icmp eq i64 %indvars.iv.next30, %wide.trip.count32
  br i1 %exitcond33.not, label %.loopexit, label %.lr.ph27, !llvm.loop !19

.loopexit.critedge:                               ; preds = %.preheader
  %159 = load i32, ptr @cT, align 4, !tbaa !11
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr @cT, align 4, !tbaa !11
  %161 = getelementptr inbounds [101 x i32], ptr @co, i64 0, i64 %2
  %162 = load i32, ptr %161, align 4, !tbaa !11
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [101 x i32], ptr @T, i64 0, i64 %163
  %165 = load i32, ptr %164, align 4, !tbaa !11
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %164, align 4, !tbaa !11
  br label %.loopexit

.loopexit:                                        ; preds = %158, %middle.block, %vec.epilog.middle.block, %.loopexit.critedge, %._crit_edge, %16, %1
  ret void
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind memory(readwrite, argmem: none, 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++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !14, !16, !17}
!19 = distinct !{!19, !14, !17, !16}


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