; LLVM IR from tangjz/acm-icpc :: 51nod/1162.ll (Z9factorizeRnRiPn)

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

@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z12miller_rabinn(i64 noundef, i64 noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z11pollard_rhox(i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef { i64, i64 } @_Z15quadratic_sieven(i64 noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9factorizeRnRiPn(ptr noundef nonnull align 16 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [9 x i128], align 16
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i128, align 16
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i128, align 16
  %16 = alloca i128, align 16
  %17 = alloca i128, align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 144, ptr %9) #4
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = load i128, ptr %18, align 16, !tbaa !11
  %20 = load i32, ptr %8, align 4, !tbaa !9
  %21 = add nsw i32 %20, 1
  store i32 %21, ptr %8, align 4, !tbaa !9
  %22 = sext i32 %20 to i64
  %23 = getelementptr inbounds [9 x i128], ptr %9, i64 0, i64 %22
  store i128 %19, ptr %23, align 16, !tbaa !11
  br label %24

24:                                               ; preds = %164, %162, %3
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = icmp slt i32 %25, %26
  br i1 %27, label %28, label %165

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %7, align 4, !tbaa !9
  %31 = sext i32 %29 to i64
  %32 = getelementptr inbounds [9 x i128], ptr %9, i64 0, i64 %31
  store ptr %32, ptr %10, align 8, !tbaa !5
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = load i128, ptr %33, align 16, !tbaa !11
  %35 = icmp eq i128 %34, 1
  br i1 %35, label %36, label %37

36:                                               ; preds = %28
  store i32 2, ptr %11, align 4
  br label %162, !llvm.loop !13

37:                                               ; preds = %28
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = load i128, ptr %38, align 16, !tbaa !11
  store i128 %39, ptr %12, align 16, !tbaa !11
  %40 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %41 = load i64, ptr %40, align 16
  %42 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %43 = load i64, ptr %42, align 8
  %44 = call noundef zeroext i1 @_Z12miller_rabinn(i64 noundef %41, i64 noundef %43)
  br i1 %44, label %45, label %96

45:                                               ; preds = %37
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = load i128, ptr %46, align 16, !tbaa !11
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = load i128, ptr %48, align 16, !tbaa !11
  %50 = sdiv i128 %49, %47
  store i128 %50, ptr %48, align 16, !tbaa !11
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load i128, ptr %51, align 16, !tbaa !11
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %54, align 4, !tbaa !9
  %57 = sext i32 %55 to i64
  %58 = getelementptr inbounds i128, ptr %53, i64 %57
  store i128 %52, ptr %58, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %59 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %59, ptr %13, align 4, !tbaa !9
  br label %60

60:                                               ; preds = %92, %45
  %61 = load i32, ptr %13, align 4, !tbaa !9
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  store i32 4, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %95

65:                                               ; preds = %60
  br label %66

66:                                               ; preds = %75, %65
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [9 x i128], ptr %9, i64 0, i64 %68
  %70 = load i128, ptr %69, align 16, !tbaa !11
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load i128, ptr %71, align 16, !tbaa !11
  %73 = srem i128 %70, %72
  %74 = icmp eq i128 %73, 0
  br i1 %74, label %75, label %91

75:                                               ; preds = %66
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = load i128, ptr %76, align 16, !tbaa !11
  %78 = load i32, ptr %13, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [9 x i128], ptr %9, i64 0, i64 %79
  %81 = load i128, ptr %80, align 16, !tbaa !11
  %82 = sdiv i128 %81, %77
  store i128 %82, ptr %80, align 16, !tbaa !11
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = load i128, ptr %83, align 16, !tbaa !11
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = load i32, ptr %86, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %86, align 4, !tbaa !9
  %89 = sext i32 %87 to i64
  %90 = getelementptr inbounds i128, ptr %85, i64 %89
  store i128 %84, ptr %90, align 16, !tbaa !11
  br label %66, !llvm.loop !15

91:                                               ; preds = %66
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %13, align 4, !tbaa !9
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %13, align 4, !tbaa !9
  br label %60, !llvm.loop !16

95:                                               ; preds = %64
  br label %161

96:                                               ; preds = %37
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = load i128, ptr %97, align 16, !tbaa !11
  %99 = icmp sle i128 %98, 1000000000000000001
  br i1 %99, label %100, label %127

100:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  br label %101

101:                                              ; preds = %110, %100
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load i128, ptr %102, align 16, !tbaa !11
  %104 = trunc i128 %103 to i64
  %105 = call noundef i64 @_Z11pollard_rhox(i64 noundef %104)
  store i64 %105, ptr %14, align 8, !tbaa !17
  %106 = sext i64 %105 to i128
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = load i128, ptr %107, align 16, !tbaa !11
  %109 = icmp eq i128 %106, %108
  br i1 %109, label %110, label %111

110:                                              ; preds = %101
  br label %101, !llvm.loop !19

111:                                              ; preds = %101
  %112 = load i64, ptr %14, align 8, !tbaa !17
  %113 = sext i64 %112 to i128
  %114 = load i32, ptr %8, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %8, align 4, !tbaa !9
  %116 = sext i32 %114 to i64
  %117 = getelementptr inbounds [9 x i128], ptr %9, i64 0, i64 %116
  store i128 %113, ptr %117, align 16, !tbaa !11
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = load i128, ptr %118, align 16, !tbaa !11
  %120 = load i64, ptr %14, align 8, !tbaa !17
  %121 = sext i64 %120 to i128
  %122 = sdiv i128 %119, %121
  %123 = load i32, ptr %8, align 4, !tbaa !9
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr %8, align 4, !tbaa !9
  %125 = sext i32 %123 to i64
  %126 = getelementptr inbounds [9 x i128], ptr %9, i64 0, i64 %125
  store i128 %122, ptr %126, align 16, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %160

127:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #4
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = load i128, ptr %128, align 16, !tbaa !11
  store i128 %129, ptr %16, align 16, !tbaa !11
  %130 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %131 = load i64, ptr %130, align 16
  %132 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %133 = load i64, ptr %132, align 8
  %134 = call noundef { i64, i64 } @_Z15quadratic_sieven(i64 noundef %131, i64 noundef %133)
  %135 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %136 = extractvalue { i64, i64 } %134, 0
  store i64 %136, ptr %135, align 16
  %137 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %138 = extractvalue { i64, i64 } %134, 1
  store i64 %138, ptr %137, align 8
  %139 = load i128, ptr %17, align 16, !tbaa !11
  store i128 %139, ptr %15, align 16, !tbaa !11
  %140 = load ptr, ptr %10, align 8, !tbaa !5
  %141 = load i128, ptr %140, align 16, !tbaa !11
  %142 = load i128, ptr %15, align 16, !tbaa !11
  %143 = icmp eq i128 %141, %142
  br i1 %143, label %144, label %146

144:                                              ; preds = %127
  %145 = call i32 @puts(ptr noundef @.str.1)
  br label %146

146:                                              ; preds = %144, %127
  %147 = load i128, ptr %15, align 16, !tbaa !11
  %148 = load i32, ptr %8, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %8, align 4, !tbaa !9
  %150 = sext i32 %148 to i64
  %151 = getelementptr inbounds [9 x i128], ptr %9, i64 0, i64 %150
  store i128 %147, ptr %151, align 16, !tbaa !11
  %152 = load ptr, ptr %10, align 8, !tbaa !5
  %153 = load i128, ptr %152, align 16, !tbaa !11
  %154 = load i128, ptr %15, align 16, !tbaa !11
  %155 = sdiv i128 %153, %154
  %156 = load i32, ptr %8, align 4, !tbaa !9
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %8, align 4, !tbaa !9
  %158 = sext i32 %156 to i64
  %159 = getelementptr inbounds [9 x i128], ptr %9, i64 0, i64 %158
  store i128 %155, ptr %159, align 16, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  br label %160

160:                                              ; preds = %146, %111
  br label %161

161:                                              ; preds = %160, %95
  store i32 0, ptr %11, align 4
  br label %162

162:                                              ; preds = %161, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %163 = load i32, ptr %11, align 4
  switch i32 %163, label %166 [
    i32 0, label %164
    i32 2, label %24
  ]

164:                                              ; preds = %162
  br label %24, !llvm.loop !13

165:                                              ; preds = %24
  call void @llvm.lifetime.end.p0(i64 144, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void

166:                                              ; preds = %162
  unreachable
}

declare i32 @puts(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 = !{!"__int128", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !7, i64 0}
!19 = distinct !{!19, !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"

@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z12miller_rabinn(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z11pollard_rhox(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef { i64, i64 } @_Z15quadratic_sieven(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z9factorizeRnRiPn(ptr nocapture noundef nonnull align 16 dereferenceable(16) %0, ptr nocapture noundef nonnull align 4 dereferenceable(4) %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #2 {
  %4 = alloca [9 x i128], align 16
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %4) #4
  %5 = load i128, ptr %0, align 16, !tbaa !5
  store i128 %5, ptr %4, align 16, !tbaa !5
  br label %6

6:                                                ; preds = %3, %.loopexit
  %indvars.iv63 = phi i64 [ 0, %3 ], [ %indvars.iv.next64, %.loopexit ]
  %indvars.iv58 = phi i64 [ 1, %3 ], [ %indvars.iv.next59, %.loopexit ]
  %.04254 = phi i32 [ 1, %3 ], [ %.2, %.loopexit ]
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %7 = getelementptr inbounds [9 x i128], ptr %4, i64 0, i64 %indvars.iv63
  %8 = load i128, ptr %7, align 16, !tbaa !5
  %9 = icmp eq i128 %8, 1
  br i1 %9, label %.loopexit, label %10, !llvm.loop !9

10:                                               ; preds = %6
  %.sroa.011.0.extract.trunc = trunc i128 %8 to i64
  %.sroa.212.0.extract.shift = lshr i128 %8, 64
  %.sroa.212.0.extract.trunc = trunc nuw i128 %.sroa.212.0.extract.shift to i64
  %11 = tail call noundef zeroext i1 @_Z12miller_rabinn(i64 noundef %.sroa.011.0.extract.trunc, i64 noundef %.sroa.212.0.extract.trunc)
  br i1 %11, label %12, label %37

12:                                               ; preds = %10
  %13 = load i128, ptr %0, align 16, !tbaa !5
  %14 = sdiv i128 %13, %8
  store i128 %14, ptr %0, align 16, !tbaa !5
  %15 = load i32, ptr %1, align 4, !tbaa !11
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr %1, align 4, !tbaa !11
  %17 = sext i32 %15 to i64
  %18 = getelementptr inbounds i128, ptr %2, i64 %17
  store i128 %8, ptr %18, align 16, !tbaa !5
  %19 = sext i32 %.04254 to i64
  %20 = icmp slt i64 %indvars.iv.next64, %19
  br i1 %20, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %12
  %wide.trip.count = zext i32 %.04254 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %35
  %21 = phi i128 [ %8, %.preheader.preheader ], [ %36, %35 ]
  %indvars.iv60 = phi i64 [ %indvars.iv58, %.preheader.preheader ], [ %indvars.iv.next61, %35 ]
  %.lcssa485152 = phi i32 [ %16, %.preheader.preheader ], [ %.lcssa4850, %35 ]
  %22 = getelementptr inbounds [9 x i128], ptr %4, i64 0, i64 %indvars.iv60
  %23 = load i128, ptr %22, align 16, !tbaa !5
  %24 = srem i128 %23, %21
  %25 = icmp eq i128 %24, 0
  br i1 %25, label %.lr.ph.preheader, label %35

.lr.ph.preheader:                                 ; preds = %.preheader
  %26 = sext i32 %.lcssa485152 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %26, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %27 = phi i128 [ %21, %.lr.ph.preheader ], [ %30, %.lr.ph ]
  %28 = phi i128 [ %23, %.lr.ph.preheader ], [ %29, %.lr.ph ]
  %29 = sdiv i128 %28, %27
  store i128 %29, ptr %22, align 16, !tbaa !5
  %30 = load i128, ptr %7, align 16, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %31 = getelementptr inbounds i128, ptr %2, i64 %indvars.iv
  store i128 %30, ptr %31, align 16, !tbaa !5
  %32 = srem i128 %29, %30
  %33 = icmp eq i128 %32, 0
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph
  %34 = trunc nsw i64 %indvars.iv.next to i32
  store i32 %34, ptr %1, align 4, !tbaa !11
  br label %35

35:                                               ; preds = %._crit_edge, %.preheader
  %36 = phi i128 [ %30, %._crit_edge ], [ %21, %.preheader ]
  %.lcssa4850 = phi i32 [ %34, %._crit_edge ], [ %.lcssa485152, %.preheader ]
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next61, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.preheader, !llvm.loop !14

37:                                               ; preds = %10
  %38 = icmp slt i128 %8, 1000000000000000002
  br i1 %38, label %.preheader47, label %42

.preheader47:                                     ; preds = %37, %.preheader47
  %39 = tail call noundef i64 @_Z11pollard_rhox(i64 noundef %.sroa.011.0.extract.trunc)
  %40 = sext i64 %39 to i128
  %41 = icmp eq i128 %8, %40
  br i1 %41, label %.preheader47, label %.loopexit.sink.split, !llvm.loop !15

42:                                               ; preds = %37
  %43 = tail call noundef { i64, i64 } @_Z15quadratic_sieven(i64 noundef %.sroa.011.0.extract.trunc, i64 noundef %.sroa.212.0.extract.trunc)
  %44 = extractvalue { i64, i64 } %43, 0
  %45 = extractvalue { i64, i64 } %43, 1
  %.sroa.2.0.insert.ext = zext i64 %45 to i128
  %.sroa.2.0.insert.shift = shl nuw i128 %.sroa.2.0.insert.ext, 64
  %.sroa.0.0.insert.ext = zext i64 %44 to i128
  %.sroa.0.0.insert.insert = or disjoint i128 %.sroa.2.0.insert.shift, %.sroa.0.0.insert.ext
  %46 = icmp eq i128 %8, %.sroa.0.0.insert.insert
  br i1 %46, label %47, label %.loopexit.sink.split

47:                                               ; preds = %42
  %48 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1)
  br label %.loopexit.sink.split

.loopexit.sink.split:                             ; preds = %.preheader47, %42, %47
  %.sroa.0.0.insert.insert.sink71 = phi i128 [ %.sroa.0.0.insert.insert, %47 ], [ %.sroa.0.0.insert.insert, %42 ], [ %40, %.preheader47 ]
  %49 = add nsw i32 %.04254, 1
  %50 = sext i32 %.04254 to i64
  %51 = getelementptr inbounds [9 x i128], ptr %4, i64 0, i64 %50
  store i128 %.sroa.0.0.insert.insert.sink71, ptr %51, align 16, !tbaa !5
  %52 = load i128, ptr %7, align 16, !tbaa !5
  %53 = sdiv i128 %52, %.sroa.0.0.insert.insert.sink71
  %54 = add nsw i32 %.04254, 2
  %55 = sext i32 %49 to i64
  %56 = getelementptr inbounds [9 x i128], ptr %4, i64 0, i64 %55
  store i128 %53, ptr %56, align 16, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %35, %.loopexit.sink.split, %12, %6
  %.2 = phi i32 [ %.04254, %6 ], [ %.04254, %12 ], [ %54, %.loopexit.sink.split ], [ %.04254, %35 ]
  %57 = sext i32 %.2 to i64
  %58 = icmp slt i64 %indvars.iv.next64, %57
  %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1
  br i1 %58, label %6, label %59

59:                                               ; preds = %.loopexit
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %4) #4
  ret void
}

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

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


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