; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/191 Division 2/Problem A (A)

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

@n = external dso_local global i32, align 4
@a = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %22, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr @n, align 4, !tbaa !5
  %15 = icmp sle i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %25

17:                                               ; preds = %12
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %19
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %20)
  br label %22

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !9

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

26:                                               ; preds = %97, %25
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %100

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %32 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %32, ptr %6, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %93, %31
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %33
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %96

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %39 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %39, ptr %7, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %51, %38
  %41 = load i32, ptr %7, align 4, !tbaa !5
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %54

45:                                               ; preds = %40
  %46 = load i32, ptr %7, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = xor i32 %49, 1
  store i32 %50, ptr %48, align 4, !tbaa !5
  br label %51

51:                                               ; preds = %45
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %7, align 4, !tbaa !5
  br label %40, !llvm.loop !11

54:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %55

55:                                               ; preds = %73, %54
  %56 = load i32, ptr %9, align 4, !tbaa !5
  %57 = load i32, ptr @n, align 4, !tbaa !5
  %58 = icmp sle i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %76

60:                                               ; preds = %55
  %61 = load i32, ptr %9, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %69

66:                                               ; preds = %60
  %67 = load i32, ptr %8, align 4, !tbaa !5
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr %8, align 4, !tbaa !5
  br label %70

69:                                               ; preds = %60
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %70

70:                                               ; preds = %69, %66
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %72 = load i32, ptr %71, align 4, !tbaa !5
  store i32 %72, ptr %3, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %70
  %74 = load i32, ptr %9, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %9, align 4, !tbaa !5
  br label %55, !llvm.loop !12

76:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %77 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %77, ptr %10, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %89, %76
  %79 = load i32, ptr %10, align 4, !tbaa !5
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = icmp sle i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 17, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %92

83:                                               ; preds = %78
  %84 = load i32, ptr %10, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = xor i32 %87, 1
  store i32 %88, ptr %86, align 4, !tbaa !5
  br label %89

89:                                               ; preds = %83
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %10, align 4, !tbaa !5
  br label %78, !llvm.loop !13

92:                                               ; preds = %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %6, align 4, !tbaa !5
  br label %33, !llvm.loop !14

96:                                               ; preds = %37
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %4, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %4, align 4, !tbaa !5
  br label %26, !llvm.loop !15

100:                                              ; preds = %30
  %101 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z2trIiJEEvT_DpRKT0_(i32 noundef %101)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  %102 = load i32, ptr %1, align 4
  ret i32 %102
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trIiJEEvT_DpRKT0_(i32 noundef) #4

attributes #0 = { mustprogress norecurse 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


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

@n = external dso_local global i32, align 4
@a = external dso_local global [101 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not35 = icmp slt i32 %4, 1
  br i1 %.not35, label %._crit_edge.thread, label %.lr.ph

._crit_edge.thread:                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %._crit_edge54

._crit_edge:                                      ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  store i32 0, ptr %1, align 4, !tbaa !5
  %.not2752 = icmp slt i32 %7, 1
  br i1 %.not2752, label %._crit_edge54, label %.preheader34

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %5 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %5)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = sext i32 %7 to i64
  %.not.not = icmp slt i64 %indvars.iv, %8
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.preheader34:                                     ; preds = %._crit_edge, %._crit_edge51
  %9 = phi i32 [ %22, %._crit_edge51 ], [ 0, %._crit_edge ]
  %10 = phi i32 [ %23, %._crit_edge51 ], [ %7, %._crit_edge ]
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %._crit_edge51 ], [ 2, %._crit_edge ]
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %._crit_edge51 ], [ 1, %._crit_edge ]
  %indvars80 = trunc i64 %indvars.iv56 to i32
  %.not2849 = icmp slt i32 %10, %indvars80
  br i1 %.not2849, label %._crit_edge51, label %.preheader33

._crit_edge54:                                    ; preds = %._crit_edge51, %._crit_edge.thread, %._crit_edge
  %11 = phi i32 [ 0, %._crit_edge ], [ 0, %._crit_edge.thread ], [ %22, %._crit_edge51 ]
  call void @_Z2trIiJEEvT_DpRKT0_(i32 noundef %11)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 0

.preheader33:                                     ; preds = %.preheader34, %._crit_edge48
  %indvar = phi i64 [ %indvar.next, %._crit_edge48 ], [ 0, %.preheader34 ]
  %12 = phi i32 [ %27, %._crit_edge48 ], [ %9, %.preheader34 ]
  %13 = phi i32 [ %28, %._crit_edge48 ], [ %10, %.preheader34 ]
  %14 = phi i32 [ %29, %._crit_edge48 ], [ %10, %.preheader34 ]
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %._crit_edge48 ], [ %indvars.iv73, %.preheader34 ]
  %.02450 = phi i32 [ %43, %._crit_edge48 ], [ %indvars80, %.preheader34 ]
  %15 = add i64 %indvar, 1
  %16 = add i64 %indvar, 1
  %.not2937 = icmp ult i32 %.02450, %indvars80
  br i1 %.not2937, label %._crit_edge40, label %.lr.ph39.preheader

.lr.ph39.preheader:                               ; preds = %.preheader33
  %min.iters.check95 = icmp ult i64 %15, 8
  br i1 %min.iters.check95, label %.lr.ph39.preheader109, label %vector.ph96

.lr.ph39.preheader109:                            ; preds = %middle.block93, %.lr.ph39.preheader
  %indvars.iv58.ph = phi i64 [ %indvars.iv56, %.lr.ph39.preheader ], [ %ind.end99, %middle.block93 ]
  br label %.lr.ph39

vector.ph96:                                      ; preds = %.lr.ph39.preheader
  %n.vec98 = and i64 %15, -8
  %ind.end99 = add i64 %indvars.iv56, %n.vec98
  br label %vector.body101

vector.body101:                                   ; preds = %vector.body101, %vector.ph96
  %index102 = phi i64 [ 0, %vector.ph96 ], [ %index.next106, %vector.body101 ]
  %offset.idx103 = add i64 %indvars.iv56, %index102
  %17 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %offset.idx103
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %wide.load104 = load <4 x i32>, ptr %17, align 4, !tbaa !5
  %wide.load105 = load <4 x i32>, ptr %18, align 4, !tbaa !5
  %19 = xor <4 x i32> %wide.load104, <i32 1, i32 1, i32 1, i32 1>
  %20 = xor <4 x i32> %wide.load105, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %19, ptr %17, align 4, !tbaa !5
  store <4 x i32> %20, ptr %18, align 4, !tbaa !5
  %index.next106 = add nuw i64 %index102, 8
  %21 = icmp eq i64 %index.next106, %n.vec98
  br i1 %21, label %middle.block93, label %vector.body101, !llvm.loop !11

middle.block93:                                   ; preds = %vector.body101
  %cmp.n107 = icmp eq i64 %15, %n.vec98
  br i1 %cmp.n107, label %._crit_edge40, label %.lr.ph39.preheader109

._crit_edge51:                                    ; preds = %._crit_edge48, %.preheader34
  %22 = phi i32 [ %9, %.preheader34 ], [ %27, %._crit_edge48 ]
  %23 = phi i32 [ %10, %.preheader34 ], [ %28, %._crit_edge48 ]
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %.not27.not = icmp sgt i32 %23, %indvars80
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  br i1 %.not27.not, label %.preheader34, label %._crit_edge54, !llvm.loop !14

._crit_edge40:                                    ; preds = %.lr.ph39, %middle.block93, %.preheader33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  store i32 0, ptr %2, align 4, !tbaa !5
  %.not3041 = icmp slt i32 %14, 1
  br i1 %.not3041, label %.preheader, label %.lr.ph44

.lr.ph39:                                         ; preds = %.lr.ph39.preheader109, %.lr.ph39
  %indvars.iv58 = phi i64 [ %indvars.iv.next59, %.lr.ph39 ], [ %indvars.iv58.ph, %.lr.ph39.preheader109 ]
  %24 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv58
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = xor i32 %25, 1
  store i32 %26, ptr %24, align 4, !tbaa !5
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next59, %indvars.iv75
  br i1 %exitcond.not, label %._crit_edge40, label %.lr.ph39, !llvm.loop !15

.preheader:                                       ; preds = %.lr.ph44, %._crit_edge40
  %27 = phi i32 [ %12, %._crit_edge40 ], [ %40, %.lr.ph44 ]
  %28 = phi i32 [ %13, %._crit_edge40 ], [ %41, %.lr.ph44 ]
  %29 = phi i32 [ %14, %._crit_edge40 ], [ %41, %.lr.ph44 ]
  br i1 %.not2937, label %._crit_edge48, label %.lr.ph47.preheader

.lr.ph47.preheader:                               ; preds = %.preheader
  %min.iters.check = icmp ult i64 %16, 8
  br i1 %min.iters.check, label %.lr.ph47.preheader108, label %vector.ph

.lr.ph47.preheader108:                            ; preds = %middle.block, %.lr.ph47.preheader
  %indvars.iv68.ph = phi i64 [ %indvars.iv56, %.lr.ph47.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph47

vector.ph:                                        ; preds = %.lr.ph47.preheader
  %n.vec = and i64 %16, -8
  %ind.end = add i64 %indvars.iv56, %n.vec
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = add i64 %indvars.iv56, %index
  %30 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %offset.idx
  %31 = getelementptr inbounds i8, ptr %30, i64 16
  %wide.load = load <4 x i32>, ptr %30, align 4, !tbaa !5
  %wide.load92 = load <4 x i32>, ptr %31, align 4, !tbaa !5
  %32 = xor <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %33 = xor <4 x i32> %wide.load92, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %32, ptr %30, align 4, !tbaa !5
  store <4 x i32> %33, ptr %31, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %34 = icmp eq i64 %index.next, %n.vec
  br i1 %34, label %middle.block, label %vector.body, !llvm.loop !16

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %16, %n.vec
  br i1 %cmp.n, label %._crit_edge48, label %.lr.ph47.preheader108

.lr.ph44:                                         ; preds = %._crit_edge40, %.lr.ph44
  %indvars.iv65 = phi i64 [ %indvars.iv.next66, %.lr.ph44 ], [ 1, %._crit_edge40 ]
  %35 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv65
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %.not32 = icmp eq i32 %36, 0
  %37 = load i32, ptr %2, align 4
  %38 = add nsw i32 %37, 1
  %storemerge = select i1 %.not32, i32 0, i32 %38
  store i32 %storemerge, ptr %2, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %40 = load i32, ptr %39, align 4, !tbaa !5
  store i32 %40, ptr %1, align 4, !tbaa !5
  %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %.not30.not = icmp slt i64 %indvars.iv65, %42
  br i1 %.not30.not, label %.lr.ph44, label %.preheader, !llvm.loop !17

._crit_edge48:                                    ; preds = %.lr.ph47, %middle.block, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  %43 = add nuw nsw i32 %.02450, 1
  %.not28.not = icmp slt i32 %.02450, %29
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %indvar.next = add i64 %indvar, 1
  br i1 %.not28.not, label %.preheader33, label %._crit_edge51, !llvm.loop !18

.lr.ph47:                                         ; preds = %.lr.ph47.preheader108, %.lr.ph47
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.lr.ph47 ], [ %indvars.iv68.ph, %.lr.ph47.preheader108 ]
  %44 = getelementptr inbounds [101 x i32], ptr @a, i64 0, i64 %indvars.iv68
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = xor i32 %45, 1
  store i32 %46, ptr %44, align 4, !tbaa !5
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  %exitcond72.not = icmp eq i64 %indvars.iv.next69, %indvars.iv75
  br i1 %exitcond72.not, label %._crit_edge48, label %.lr.ph47, !llvm.loop !19
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2trIiJEEvT_DpRKT0_(i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress norecurse 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !13, !12}
!16 = distinct !{!16, !10, !12, !13}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !13, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,SROAPass,SimplifyCFGPass,TailCallElimPass