; LLVM IR from smv1999/CompetitiveProgrammingQuestionBank :: Passwords (1d_password)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = zext i32 %14 to i64
  %16 = call ptr @llvm.stacksave.p0()
  store ptr %16, ptr %7, align 8
  %17 = alloca i32, i64 %15, align 16
  store i64 %15, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %18

18:                                               ; preds = %28, %2
  %19 = load i32, ptr %9, align 4, !tbaa !5
  %20 = load i32, ptr %6, align 4, !tbaa !5
  %21 = icmp slt i32 %19, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %31

23:                                               ; preds = %18
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = getelementptr inbounds i32, ptr %17, i64 %25
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %26)
  br label %28

28:                                               ; preds = %23
  %29 = load i32, ptr %9, align 4, !tbaa !5
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %9, align 4, !tbaa !5
  br label %18, !llvm.loop !11

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

32:                                               ; preds = %94, %31
  %33 = load i32, ptr %10, align 4, !tbaa !5
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = sub nsw i32 %34, 2
  %36 = icmp sle i32 %33, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %97

38:                                               ; preds = %32
  %39 = load i32, ptr %10, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds i32, ptr %17, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp eq i32 %42, -1
  br i1 %43, label %44, label %93

44:                                               ; preds = %38
  %45 = load i32, ptr %10, align 4, !tbaa !5
  %46 = sub nsw i32 %45, 1
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds i32, ptr %17, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = srem i32 %49, 2
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = add nsw i32 %51, 1
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %17, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = srem i32 %55, 2
  %57 = icmp eq i32 %50, %56
  br i1 %57, label %58, label %74

58:                                               ; preds = %44
  %59 = load i32, ptr %10, align 4, !tbaa !5
  %60 = sub nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds i32, ptr %17, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds i32, ptr %17, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = sub nsw i32 %63, %68
  %70 = call i32 @llvm.abs.i32(i32 %69, i1 true)
  %71 = load i32, ptr %10, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds i32, ptr %17, i64 %72
  store i32 %70, ptr %73, align 4, !tbaa !5
  br label %92

74:                                               ; preds = %44
  %75 = load i32, ptr %10, align 4, !tbaa !5
  %76 = sub nsw i32 %75, 1
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds i32, ptr %17, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %80 = load i32, ptr %10, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i32, ptr %17, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = add nsw i32 %79, %84
  %86 = sdiv i32 %85, 2
  %87 = call noundef double @_ZSt5floorIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %86)
  %88 = fptosi double %87 to i32
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %17, i64 %90
  store i32 %88, ptr %91, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %74, %58
  br label %93

93:                                               ; preds = %92, %38
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %10, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %10, align 4, !tbaa !5
  br label %32, !llvm.loop !13

97:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %120, %97
  %99 = load i32, ptr %11, align 4, !tbaa !5
  %100 = load i32, ptr %6, align 4, !tbaa !5
  %101 = sub nsw i32 %100, 2
  %102 = icmp sle i32 %99, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %123

104:                                              ; preds = %98
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i32, ptr %17, i64 %106
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = icmp ne i32 %108, 1
  br i1 %109, label %110, label %119

110:                                              ; preds = %104
  %111 = load i32, ptr %11, align 4, !tbaa !5
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds i32, ptr %17, i64 %112
  %114 = load i32, ptr %113, align 4, !tbaa !5
  %115 = sub nsw i32 %114, 1
  %116 = load i32, ptr %11, align 4, !tbaa !5
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds i32, ptr %17, i64 %117
  store i32 %115, ptr %118, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %110, %104
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %11, align 4, !tbaa !5
  br label %98, !llvm.loop !14

123:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %124

124:                                              ; preds = %135, %123
  %125 = load i32, ptr %12, align 4, !tbaa !5
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %138

129:                                              ; preds = %124
  %130 = load i32, ptr %12, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i32, ptr %17, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %133)
  br label %135

135:                                              ; preds = %129
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %12, align 4, !tbaa !5
  br label %124, !llvm.loop !15

138:                                              ; preds = %128
  store i32 0, ptr %3, align 4
  %139 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %139)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %140 = load i32, ptr %3, align 4
  ret i32 %140
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt5floorIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %5 = load i32, ptr %3, align 4, !tbaa !5
  %6 = zext i32 %5 to i64
  %7 = call ptr @llvm.stacksave.p0()
  %8 = alloca i32, i64 %6, align 16
  %9 = load i32, ptr %3, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph, label %._crit_edge

.preheader30:                                     ; preds = %.lr.ph
  %11 = add nsw i32 %14, -2
  %.not32 = icmp slt i32 %14, 3
  br i1 %.not32, label %.preheader29, label %.lr.ph34

.lr.ph:                                           ; preds = %2, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %2 ]
  %12 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = icmp slt i64 %indvars.iv.next, %15
  br i1 %16, label %.lr.ph, label %.preheader30, !llvm.loop !9

.preheader29:                                     ; preds = %83, %.preheader30
  %17 = phi i32 [ %14, %.preheader30 ], [ %84, %83 ]
  %.lcssa = phi i32 [ %11, %.preheader30 ], [ %85, %83 ]
  %.not2735 = icmp slt i32 %.lcssa, 0
  br i1 %.not2735, label %.preheader, label %.lr.ph37.preheader

.lr.ph37.preheader:                               ; preds = %.preheader29
  %18 = add nuw i32 %.lcssa, 1
  %wide.trip.count = zext nneg i32 %18 to i64
  %min.iters.check = icmp ult i32 %.lcssa, 7
  br i1 %min.iters.check, label %.lr.ph37.preheader75, label %vector.ph

.lr.ph37.preheader75:                             ; preds = %middle.block, %.lr.ph37.preheader
  %indvars.iv45.ph = phi i64 [ 0, %.lr.ph37.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph37

vector.ph:                                        ; preds = %.lr.ph37.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue74, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue74 ]
  %19 = or disjoint i64 %index, 4
  %20 = getelementptr inbounds i32, ptr %8, i64 %index
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %wide.load = load <4 x i32>, ptr %20, align 16, !tbaa !5
  %wide.load60 = load <4 x i32>, ptr %21, align 16, !tbaa !5
  %22 = icmp ne <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %23 = icmp ne <4 x i32> %wide.load60, <i32 1, i32 1, i32 1, i32 1>
  %24 = extractelement <4 x i1> %22, i64 0
  br i1 %24, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %25 = getelementptr inbounds i32, ptr %8, i64 %index
  %26 = extractelement <4 x i32> %wide.load, i64 0
  %27 = add nsw i32 %26, -1
  store i32 %27, ptr %25, align 16, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %28 = extractelement <4 x i1> %22, i64 1
  br i1 %28, label %pred.store.if61, label %pred.store.continue62

pred.store.if61:                                  ; preds = %pred.store.continue
  %29 = or disjoint i64 %index, 1
  %30 = getelementptr inbounds i32, ptr %8, i64 %29
  %31 = extractelement <4 x i32> %wide.load, i64 1
  %32 = add nsw i32 %31, -1
  store i32 %32, ptr %30, align 4, !tbaa !5
  br label %pred.store.continue62

pred.store.continue62:                            ; preds = %pred.store.if61, %pred.store.continue
  %33 = extractelement <4 x i1> %22, i64 2
  br i1 %33, label %pred.store.if63, label %pred.store.continue64

pred.store.if63:                                  ; preds = %pred.store.continue62
  %34 = or disjoint i64 %index, 2
  %35 = getelementptr inbounds i32, ptr %8, i64 %34
  %36 = extractelement <4 x i32> %wide.load, i64 2
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr %35, align 8, !tbaa !5
  br label %pred.store.continue64

pred.store.continue64:                            ; preds = %pred.store.if63, %pred.store.continue62
  %38 = extractelement <4 x i1> %22, i64 3
  br i1 %38, label %pred.store.if65, label %pred.store.continue66

pred.store.if65:                                  ; preds = %pred.store.continue64
  %39 = or disjoint i64 %index, 3
  %40 = getelementptr inbounds i32, ptr %8, i64 %39
  %41 = extractelement <4 x i32> %wide.load, i64 3
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr %40, align 4, !tbaa !5
  br label %pred.store.continue66

pred.store.continue66:                            ; preds = %pred.store.if65, %pred.store.continue64
  %43 = extractelement <4 x i1> %23, i64 0
  br i1 %43, label %pred.store.if67, label %pred.store.continue68

pred.store.if67:                                  ; preds = %pred.store.continue66
  %44 = getelementptr inbounds i32, ptr %8, i64 %19
  %45 = extractelement <4 x i32> %wide.load60, i64 0
  %46 = add nsw i32 %45, -1
  store i32 %46, ptr %44, align 16, !tbaa !5
  br label %pred.store.continue68

pred.store.continue68:                            ; preds = %pred.store.if67, %pred.store.continue66
  %47 = extractelement <4 x i1> %23, i64 1
  br i1 %47, label %pred.store.if69, label %pred.store.continue70

pred.store.if69:                                  ; preds = %pred.store.continue68
  %48 = or disjoint i64 %index, 5
  %49 = getelementptr inbounds i32, ptr %8, i64 %48
  %50 = extractelement <4 x i32> %wide.load60, i64 1
  %51 = add nsw i32 %50, -1
  store i32 %51, ptr %49, align 4, !tbaa !5
  br label %pred.store.continue70

pred.store.continue70:                            ; preds = %pred.store.if69, %pred.store.continue68
  %52 = extractelement <4 x i1> %23, i64 2
  br i1 %52, label %pred.store.if71, label %pred.store.continue72

pred.store.if71:                                  ; preds = %pred.store.continue70
  %53 = or disjoint i64 %index, 6
  %54 = getelementptr inbounds i32, ptr %8, i64 %53
  %55 = extractelement <4 x i32> %wide.load60, i64 2
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr %54, align 8, !tbaa !5
  br label %pred.store.continue72

pred.store.continue72:                            ; preds = %pred.store.if71, %pred.store.continue70
  %57 = extractelement <4 x i1> %23, i64 3
  br i1 %57, label %pred.store.if73, label %pred.store.continue74

pred.store.if73:                                  ; preds = %pred.store.continue72
  %58 = or disjoint i64 %index, 7
  %59 = getelementptr inbounds i32, ptr %8, i64 %58
  %60 = extractelement <4 x i32> %wide.load60, i64 3
  %61 = add nsw i32 %60, -1
  store i32 %61, ptr %59, align 4, !tbaa !5
  br label %pred.store.continue74

pred.store.continue74:                            ; preds = %pred.store.if73, %pred.store.continue72
  %index.next = add nuw i64 %index, 8
  %62 = icmp eq i64 %index.next, %n.vec
  br i1 %62, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %pred.store.continue74
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader, label %.lr.ph37.preheader75

.lr.ph34:                                         ; preds = %.preheader30, %83
  %63 = phi i32 [ %84, %83 ], [ %14, %.preheader30 ]
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %83 ], [ 1, %.preheader30 ]
  %64 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv42
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = icmp eq i32 %65, -1
  br i1 %66, label %67, label %83

67:                                               ; preds = %.lr.ph34
  %68 = getelementptr i8, ptr %64, i64 -4
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = srem i32 %69, 2
  %71 = getelementptr inbounds i8, ptr %64, i64 4
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = srem i32 %72, 2
  %74 = icmp eq i32 %70, %73
  br i1 %74, label %75, label %78

75:                                               ; preds = %67
  %76 = sub nsw i32 %69, %72
  %77 = call i32 @llvm.abs.i32(i32 %76, i1 true)
  store i32 %77, ptr %64, align 4, !tbaa !5
  br label %83

78:                                               ; preds = %67
  %79 = add nsw i32 %72, %69
  %80 = sdiv i32 %79, 2
  %81 = call noundef double @_ZSt5floorIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef %80)
  %82 = fptosi double %81 to i32
  store i32 %82, ptr %64, align 4, !tbaa !5
  %.pre = load i32, ptr %3, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %.lr.ph34, %78, %75
  %84 = phi i32 [ %63, %.lr.ph34 ], [ %.pre, %78 ], [ %63, %75 ]
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %85 = add nsw i32 %84, -2
  %86 = sext i32 %85 to i64
  %.not.not = icmp slt i64 %indvars.iv42, %86
  br i1 %.not.not, label %.lr.ph34, label %.preheader29, !llvm.loop !14

.preheader:                                       ; preds = %92, %middle.block, %.preheader29
  %87 = icmp sgt i32 %17, 0
  br i1 %87, label %.lr.ph39, label %._crit_edge

.lr.ph37:                                         ; preds = %.lr.ph37.preheader75, %92
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %92 ], [ %indvars.iv45.ph, %.lr.ph37.preheader75 ]
  %88 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv45
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %.not28 = icmp eq i32 %89, 1
  br i1 %.not28, label %92, label %90

90:                                               ; preds = %.lr.ph37
  %91 = add nsw i32 %89, -1
  store i32 %91, ptr %88, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %.lr.ph37, %90
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next46, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph37, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph39, %2, %.preheader
  call void @llvm.stackrestore.p0(ptr %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i32 0

.lr.ph39:                                         ; preds = %.preheader, %.lr.ph39
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %.lr.ph39 ], [ 0, %.preheader ]
  %93 = getelementptr inbounds i32, ptr %8, i64 %indvars.iv48
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %94)
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %96 = load i32, ptr %3, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = icmp slt i64 %indvars.iv.next49, %97
  br i1 %98, label %.lr.ph39, label %._crit_edge, !llvm.loop !16
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt5floorIiEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i32 noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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}


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