; LLVM IR from ravireddy07/cpp-book :: src/Subsets/TargetSubset.ll (Z12targetSubsetPiii)

; 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_ostream" = type { ptr, %"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z12targetSubsetPiii(ptr noundef %0, i32 noundef %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = add nsw i32 %17, 1
  %19 = zext i32 %18 to i64
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = add nsw i32 %20, 1
  %22 = zext i32 %21 to i64
  %23 = call ptr @llvm.stacksave.p0()
  store ptr %23, ptr %7, align 8
  %24 = mul nuw i64 %19, %22
  %25 = alloca i8, i64 %24, align 16
  store i64 %19, ptr %8, align 8
  store i64 %22, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %37, %3
  %27 = load i32, ptr %10, align 4, !tbaa !9
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %40

31:                                               ; preds = %26
  %32 = mul nsw i64 0, %22
  %33 = getelementptr inbounds i8, ptr %25, i64 %32
  %34 = load i32, ptr %10, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i8, ptr %33, i64 %35
  store i8 0, ptr %36, align 1, !tbaa !11
  br label %37

37:                                               ; preds = %31
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %10, align 4, !tbaa !9
  br label %26, !llvm.loop !13

40:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %52, %40
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr %5, align 4, !tbaa !9
  %44 = icmp sle i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %55

46:                                               ; preds = %41
  %47 = load i32, ptr %11, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = mul nsw i64 %48, %22
  %50 = getelementptr inbounds i8, ptr %25, i64 %49
  %51 = getelementptr inbounds i8, ptr %50, i64 0
  store i8 0, ptr %51, align 1, !tbaa !11
  br label %52

52:                                               ; preds = %46
  %53 = load i32, ptr %11, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !15

55:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %56

56:                                               ; preds = %157, %55
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = load i32, ptr %5, align 4, !tbaa !9
  %59 = icmp sle i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %160

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 1, ptr %14, align 4, !tbaa !9
  br label %62

62:                                               ; preds = %153, %61
  %63 = load i32, ptr %14, align 4, !tbaa !9
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = icmp sle i32 %63, %64
  br i1 %65, label %67, label %66

66:                                               ; preds = %62
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %156

67:                                               ; preds = %62
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load i32, ptr %12, align 4, !tbaa !9
  %70 = sub nsw i32 %69, 1
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %68, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !9
  %74 = load i32, ptr %14, align 4, !tbaa !9
  %75 = icmp sgt i32 %73, %74
  br i1 %75, label %76, label %95

76:                                               ; preds = %67
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = mul nsw i64 %79, %22
  %81 = getelementptr inbounds i8, ptr %25, i64 %80
  %82 = load i32, ptr %14, align 4, !tbaa !9
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds i8, ptr %81, i64 %83
  %85 = load i8, ptr %84, align 1, !tbaa !11, !range !16, !noundef !17
  %86 = trunc i8 %85 to i1
  %87 = load i32, ptr %12, align 4, !tbaa !9
  %88 = sext i32 %87 to i64
  %89 = mul nsw i64 %88, %22
  %90 = getelementptr inbounds i8, ptr %25, i64 %89
  %91 = load i32, ptr %14, align 4, !tbaa !9
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i8, ptr %90, i64 %92
  %94 = zext i1 %86 to i8
  store i8 %94, ptr %93, align 1, !tbaa !11
  br label %152

95:                                               ; preds = %67
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = sub nsw i32 %97, 1
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds i32, ptr %96, i64 %99
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = load i32, ptr %14, align 4, !tbaa !9
  %103 = icmp eq i32 %101, %102
  br i1 %103, label %104, label %112

104:                                              ; preds = %95
  %105 = load i32, ptr %12, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = mul nsw i64 %106, %22
  %108 = getelementptr inbounds i8, ptr %25, i64 %107
  %109 = load i32, ptr %14, align 4, !tbaa !9
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds i8, ptr %108, i64 %110
  store i8 1, ptr %111, align 1, !tbaa !11
  br label %151

112:                                              ; preds = %95
  %113 = load i32, ptr %12, align 4, !tbaa !9
  %114 = sub nsw i32 %113, 1
  %115 = sext i32 %114 to i64
  %116 = mul nsw i64 %115, %22
  %117 = getelementptr inbounds i8, ptr %25, i64 %116
  %118 = load i32, ptr %14, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i8, ptr %117, i64 %119
  %121 = load i8, ptr %120, align 1, !tbaa !11, !range !16, !noundef !17
  %122 = trunc i8 %121 to i1
  br i1 %122, label %141, label %123

123:                                              ; preds = %112
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = sub nsw i32 %124, 1
  %126 = sext i32 %125 to i64
  %127 = mul nsw i64 %126, %22
  %128 = getelementptr inbounds i8, ptr %25, i64 %127
  %129 = load i32, ptr %14, align 4, !tbaa !9
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !9
  %132 = sub nsw i32 %131, 1
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %130, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = sub nsw i32 %129, %135
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i8, ptr %128, i64 %137
  %139 = load i8, ptr %138, align 1, !tbaa !11, !range !16, !noundef !17
  %140 = trunc i8 %139 to i1
  br label %141

141:                                              ; preds = %123, %112
  %142 = phi i1 [ true, %112 ], [ %140, %123 ]
  %143 = load i32, ptr %12, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = mul nsw i64 %144, %22
  %146 = getelementptr inbounds i8, ptr %25, i64 %145
  %147 = load i32, ptr %14, align 4, !tbaa !9
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds i8, ptr %146, i64 %148
  %150 = zext i1 %142 to i8
  store i8 %150, ptr %149, align 1, !tbaa !11
  br label %151

151:                                              ; preds = %141, %104
  br label %152

152:                                              ; preds = %151, %76
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %14, align 4, !tbaa !9
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %14, align 4, !tbaa !9
  br label %62, !llvm.loop !18

156:                                              ; preds = %66
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %12, align 4, !tbaa !9
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %12, align 4, !tbaa !9
  br label %56, !llvm.loop !19

160:                                              ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %189, %160
  %162 = load i32, ptr %15, align 4, !tbaa !9
  %163 = load i32, ptr %5, align 4, !tbaa !9
  %164 = icmp sle i32 %162, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  store i32 14, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %192

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %167

167:                                              ; preds = %184, %166
  %168 = load i32, ptr %16, align 4, !tbaa !9
  %169 = load i32, ptr %6, align 4, !tbaa !9
  %170 = icmp sle i32 %168, %169
  br i1 %170, label %172, label %171

171:                                              ; preds = %167
  store i32 17, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %187

172:                                              ; preds = %167
  %173 = load i32, ptr %15, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = mul nsw i64 %174, %22
  %176 = getelementptr inbounds i8, ptr %25, i64 %175
  %177 = load i32, ptr %16, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds i8, ptr %176, i64 %178
  %180 = load i8, ptr %179, align 1, !tbaa !11, !range !16, !noundef !17
  %181 = trunc i8 %180 to i1
  %182 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %181)
  %183 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %182, ptr noundef @.str)
  br label %184

184:                                              ; preds = %172
  %185 = load i32, ptr %16, align 4, !tbaa !9
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %16, align 4, !tbaa !9
  br label %167, !llvm.loop !20

187:                                              ; preds = %171
  %188 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  br label %189

189:                                              ; preds = %187
  %190 = load i32, ptr %15, align 4, !tbaa !9
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %15, align 4, !tbaa !9
  br label %161, !llvm.loop !21

192:                                              ; preds = %165
  %193 = load i32, ptr %5, align 4, !tbaa !9
  %194 = sext i32 %193 to i64
  %195 = mul nsw i64 %194, %22
  %196 = getelementptr inbounds i8, ptr %25, i64 %195
  %197 = load i32, ptr %6, align 4, !tbaa !9
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds i8, ptr %196, i64 %198
  %200 = load i8, ptr %199, align 1, !tbaa !11, !range !16, !noundef !17
  %201 = trunc i8 %200 to i1
  store i32 1, ptr %13, align 4
  %202 = load ptr, ptr %7, align 8
  call void @llvm.stackrestore.p0(ptr %202)
  ret i1 %201
}

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) #0 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !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"

%"class.std::basic_ostream" = type { ptr, %"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 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z12targetSubsetPiii(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = add i32 %1, 1
  %5 = zext i32 %4 to i64
  %6 = add i32 %2, 1
  %7 = zext i32 %6 to i64
  %8 = mul nuw i64 %7, %5
  %9 = alloca i8, i64 %8, align 16
  %.not63 = icmp slt i32 %2, 0
  br i1 %.not63, label %.preheader62, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %3
  call void @llvm.memset.p0.i64(ptr nonnull align 16 %9, i8 0, i64 %7, i1 false), !tbaa !5
  br label %.preheader62

.preheader62:                                     ; preds = %.lr.ph.preheader, %3
  %.not5465 = icmp slt i32 %1, 0
  br i1 %.not5465, label %._crit_edge80, label %.lr.ph67.preheader

.lr.ph67.preheader:                               ; preds = %.preheader62
  %xtraiter = and i64 %5, 3
  %10 = icmp ult i32 %4, 4
  br i1 %10, label %.preheader61.unr-lcssa, label %.lr.ph67.preheader.new

.lr.ph67.preheader.new:                           ; preds = %.lr.ph67.preheader
  %unroll_iter = and i64 %5, 4294967292
  br label %.lr.ph67

.preheader61.unr-lcssa:                           ; preds = %.lr.ph67, %.lr.ph67.preheader
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph67.preheader ], [ %indvars.iv.next.3, %.lr.ph67 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader61, label %.lr.ph67.epil

.lr.ph67.epil:                                    ; preds = %.preheader61.unr-lcssa, %.lr.ph67.epil
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.lr.ph67.epil ], [ %indvars.iv.unr, %.preheader61.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph67.epil ], [ 0, %.preheader61.unr-lcssa ]
  %11 = mul nuw nsw i64 %indvars.iv.epil, %7
  %12 = getelementptr inbounds i8, ptr %9, i64 %11
  store i8 0, ptr %12, align 1, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader61, label %.lr.ph67.epil, !llvm.loop !9

.preheader61:                                     ; preds = %.lr.ph67.epil, %.preheader61.unr-lcssa
  %.not5572 = icmp eq i32 %1, 0
  br i1 %.not5572, label %.preheader59, label %.preheader60.lr.ph

.preheader60.lr.ph:                               ; preds = %.preheader61
  %.not5868 = icmp slt i32 %2, 1
  br i1 %.not5868, label %.preheader.lr.ph, label %.preheader60

.lr.ph67:                                         ; preds = %.lr.ph67, %.lr.ph67.preheader.new
  %indvars.iv = phi i64 [ 0, %.lr.ph67.preheader.new ], [ %indvars.iv.next.3, %.lr.ph67 ]
  %niter = phi i64 [ 0, %.lr.ph67.preheader.new ], [ %niter.next.3, %.lr.ph67 ]
  %13 = mul nuw nsw i64 %indvars.iv, %7
  %14 = getelementptr inbounds i8, ptr %9, i64 %13
  store i8 0, ptr %14, align 4, !tbaa !5
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %15 = mul nuw nsw i64 %indvars.iv.next, %7
  %16 = getelementptr inbounds i8, ptr %9, i64 %15
  store i8 0, ptr %16, align 1, !tbaa !5
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %17 = mul nuw nsw i64 %indvars.iv.next.1, %7
  %18 = getelementptr inbounds i8, ptr %9, i64 %17
  store i8 0, ptr %18, align 2, !tbaa !5
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %19 = mul nuw nsw i64 %indvars.iv.next.2, %7
  %20 = getelementptr inbounds i8, ptr %9, i64 %19
  store i8 0, ptr %20, align 1, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader61.unr-lcssa, label %.lr.ph67, !llvm.loop !11

.preheader60:                                     ; preds = %.preheader60.lr.ph, %._crit_edge
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %._crit_edge ], [ 1, %.preheader60.lr.ph ]
  %21 = add nsw i64 %indvars.iv90, -1
  %22 = getelementptr inbounds i32, ptr %0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !13
  %24 = mul nuw nsw i64 %21, %7
  %25 = getelementptr inbounds i8, ptr %9, i64 %24
  %26 = mul nuw nsw i64 %indvars.iv90, %7
  %27 = getelementptr inbounds i8, ptr %9, i64 %26
  %28 = sext i32 %23 to i64
  %29 = zext i32 %23 to i64
  %30 = getelementptr inbounds i8, ptr %27, i64 %29
  br label %33

.preheader59:                                     ; preds = %._crit_edge, %.preheader61
  br i1 %.not5465, label %._crit_edge80, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader60.lr.ph, %.preheader59
  br i1 %.not63, label %.preheader.us, label %.preheader

.preheader.us:                                    ; preds = %.preheader.lr.ph, %.preheader.us
  %.04679.us = phi i32 [ %32, %.preheader.us ], [ 0, %.preheader.lr.ph ]
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %32 = add nuw i32 %.04679.us, 1
  %exitcond105.not = icmp eq i32 %.04679.us, %1
  br i1 %exitcond105.not, label %._crit_edge80, label %.preheader.us, !llvm.loop !15

._crit_edge:                                      ; preds = %53
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %5
  br i1 %exitcond94.not, label %.preheader59, label %.preheader60, !llvm.loop !16

33:                                               ; preds = %.preheader60, %53
  %indvars.iv85 = phi i64 [ 1, %.preheader60 ], [ %indvars.iv.next86, %53 ]
  %34 = icmp slt i64 %indvars.iv85, %28
  br i1 %34, label %35, label %39

35:                                               ; preds = %33
  %36 = getelementptr inbounds i8, ptr %25, i64 %indvars.iv85
  %37 = load i8, ptr %36, align 1, !tbaa !5, !range !17, !noundef !18
  %38 = getelementptr inbounds i8, ptr %27, i64 %indvars.iv85
  store i8 %37, ptr %38, align 1, !tbaa !5
  br label %53

39:                                               ; preds = %33
  %40 = icmp eq i64 %indvars.iv85, %29
  br i1 %40, label %41, label %42

41:                                               ; preds = %39
  store i8 1, ptr %30, align 1, !tbaa !5
  br label %53

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %25, i64 %indvars.iv85
  %44 = load i8, ptr %43, align 1, !tbaa !5, !range !17, !noundef !18
  %45 = trunc nuw i8 %44 to i1
  br i1 %45, label %50, label %46

46:                                               ; preds = %42
  %47 = sub nsw i64 %indvars.iv85, %28
  %48 = getelementptr inbounds i8, ptr %25, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !5, !range !17, !noundef !18
  br label %50

50:                                               ; preds = %46, %42
  %51 = phi i8 [ 1, %42 ], [ %49, %46 ]
  %52 = getelementptr inbounds i8, ptr %27, i64 %indvars.iv85
  store i8 %51, ptr %52, align 1, !tbaa !5
  br label %53

53:                                               ; preds = %35, %50, %41
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %7
  br i1 %exitcond89.not, label %._crit_edge, label %33, !llvm.loop !19

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge77
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %._crit_edge77 ], [ 0, %.preheader.lr.ph ]
  %54 = mul nuw nsw i64 %indvars.iv100, %7
  %55 = getelementptr inbounds i8, ptr %9, i64 %54
  br label %64

._crit_edge80:                                    ; preds = %._crit_edge77, %.preheader.us, %.preheader62, %.preheader59
  %56 = sext i32 %1 to i64
  %57 = mul nsw i64 %7, %56
  %58 = getelementptr inbounds i8, ptr %9, i64 %57
  %59 = sext i32 %2 to i64
  %60 = getelementptr inbounds i8, ptr %58, i64 %59
  %61 = load i8, ptr %60, align 1, !tbaa !5, !range !17, !noundef !18
  %62 = trunc nuw i8 %61 to i1
  ret i1 %62

._crit_edge77:                                    ; preds = %64
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %exitcond104.not = icmp eq i64 %indvars.iv.next101, %5
  br i1 %exitcond104.not, label %._crit_edge80, label %.preheader, !llvm.loop !15

64:                                               ; preds = %.preheader, %64
  %indvars.iv95 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next96, %64 ]
  %65 = getelementptr inbounds i8, ptr %55, i64 %indvars.iv95
  %66 = load i8, ptr %65, align 1, !tbaa !5, !range !17, !noundef !18
  %67 = trunc nuw i8 %66 to i1
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i1 noundef zeroext %67)
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull @.str)
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next96, %7
  br i1 %exitcond99.not, label %._crit_edge77, label %64, !llvm.loop !20
}

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEb(ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) local_unnamed_addr #0 align 2

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass