; LLVM IR from smv1999/CompetitiveProgrammingQuestionBank :: General Questions (Difficult_pattern4)

; 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 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local 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
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %7 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %6)
  %9 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %9, ptr %2, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %120, %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = icmp sge i32 %11, 1
  br i1 %12, label %13, label %123

13:                                               ; preds = %10
  %14 = load i32, ptr %6, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sub nsw i32 %14, %15
  store i32 %16, ptr %4, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %22, %13
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = icmp sge i32 %18, 1
  br i1 %19, label %20, label %25

20:                                               ; preds = %17
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %22

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

25:                                               ; preds = %17
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %39, %25
  %27 = load i32, ptr %3, align 4, !tbaa !5
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = icmp sle i32 %27, %28
  br i1 %29, label %30, label %42

30:                                               ; preds = %26
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = srem i32 %31, 2
  %33 = icmp eq i32 %32, 1
  br i1 %33, label %34, label %36

34:                                               ; preds = %30
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %38

36:                                               ; preds = %30
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %38

38:                                               ; preds = %36, %34
  br label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %3, align 4, !tbaa !5
  br label %26, !llvm.loop !11

42:                                               ; preds = %26
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sub nsw i32 %43, 1
  store i32 %44, ptr %5, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %57, %42
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = icmp sge i32 %46, 1
  br i1 %47, label %48, label %60

48:                                               ; preds = %45
  %49 = load i32, ptr %5, align 4, !tbaa !5
  %50 = srem i32 %49, 2
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %54

52:                                               ; preds = %48
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %56

54:                                               ; preds = %48
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %56

56:                                               ; preds = %54, %52
  br label %57

57:                                               ; preds = %56
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = add nsw i32 %58, -1
  store i32 %59, ptr %5, align 4, !tbaa !5
  br label %45, !llvm.loop !12

60:                                               ; preds = %45
  %61 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %61, ptr %3, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %68, %60
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = load i32, ptr %2, align 4, !tbaa !5
  %65 = icmp sge i32 %63, %64
  br i1 %65, label %66, label %71

66:                                               ; preds = %62
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %68

68:                                               ; preds = %66
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = add nsw i32 %69, -1
  store i32 %70, ptr %3, align 4, !tbaa !5
  br label %62, !llvm.loop !13

71:                                               ; preds = %62
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = load i32, ptr %2, align 4, !tbaa !5
  %74 = sub nsw i32 %72, %73
  store i32 %74, ptr %3, align 4, !tbaa !5
  br label %75

75:                                               ; preds = %80, %71
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = icmp sge i32 %76, 1
  br i1 %77, label %78, label %83

78:                                               ; preds = %75
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %80

80:                                               ; preds = %78
  %81 = load i32, ptr %3, align 4, !tbaa !5
  %82 = add nsw i32 %81, -1
  store i32 %82, ptr %3, align 4, !tbaa !5
  br label %75, !llvm.loop !14

83:                                               ; preds = %75
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %97, %83
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = load i32, ptr %2, align 4, !tbaa !5
  %87 = icmp sle i32 %85, %86
  br i1 %87, label %88, label %100

88:                                               ; preds = %84
  %89 = load i32, ptr %3, align 4, !tbaa !5
  %90 = srem i32 %89, 2
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %94

92:                                               ; preds = %88
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %96

94:                                               ; preds = %88
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %96

96:                                               ; preds = %94, %92
  br label %97

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

100:                                              ; preds = %84
  %101 = load i32, ptr %2, align 4, !tbaa !5
  %102 = sub nsw i32 %101, 1
  store i32 %102, ptr %5, align 4, !tbaa !5
  br label %103

103:                                              ; preds = %115, %100
  %104 = load i32, ptr %5, align 4, !tbaa !5
  %105 = icmp sge i32 %104, 1
  br i1 %105, label %106, label %118

106:                                              ; preds = %103
  %107 = load i32, ptr %5, align 4, !tbaa !5
  %108 = srem i32 %107, 2
  %109 = icmp eq i32 %108, 1
  br i1 %109, label %110, label %112

110:                                              ; preds = %106
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %114

112:                                              ; preds = %106
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %114

114:                                              ; preds = %112, %110
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %5, align 4, !tbaa !5
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %5, align 4, !tbaa !5
  br label %103, !llvm.loop !16

118:                                              ; preds = %103
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %120

120:                                              ; preds = %118
  %121 = load i32, ptr %2, align 4, !tbaa !5
  %122 = add nsw i32 %121, -1
  store i32 %122, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !17

123:                                              ; preds = %10
  %124 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %124, ptr %2, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %187, %123
  %126 = load i32, ptr %2, align 4, !tbaa !5
  %127 = icmp sge i32 %126, 1
  br i1 %127, label %128, label %190

128:                                              ; preds = %125
  %129 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %129, ptr %3, align 4, !tbaa !5
  br label %130

130:                                              ; preds = %135, %128
  %131 = load i32, ptr %3, align 4, !tbaa !5
  %132 = icmp sge i32 %131, 1
  br i1 %132, label %133, label %138

133:                                              ; preds = %130
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %135

135:                                              ; preds = %133
  %136 = load i32, ptr %3, align 4, !tbaa !5
  %137 = add nsw i32 %136, -1
  store i32 %137, ptr %3, align 4, !tbaa !5
  br label %130, !llvm.loop !18

138:                                              ; preds = %130
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = load i32, ptr %2, align 4, !tbaa !5
  %141 = sub nsw i32 %139, %140
  store i32 %141, ptr %4, align 4, !tbaa !5
  br label %142

142:                                              ; preds = %147, %138
  %143 = load i32, ptr %4, align 4, !tbaa !5
  %144 = icmp sge i32 %143, 1
  br i1 %144, label %145, label %150

145:                                              ; preds = %142
  %146 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %147

147:                                              ; preds = %145
  %148 = load i32, ptr %4, align 4, !tbaa !5
  %149 = add nsw i32 %148, -1
  store i32 %149, ptr %4, align 4, !tbaa !5
  br label %142, !llvm.loop !19

150:                                              ; preds = %142
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %164, %150
  %152 = load i32, ptr %3, align 4, !tbaa !5
  %153 = load i32, ptr %2, align 4, !tbaa !5
  %154 = icmp sle i32 %152, %153
  br i1 %154, label %155, label %167

155:                                              ; preds = %151
  %156 = load i32, ptr %3, align 4, !tbaa !5
  %157 = srem i32 %156, 2
  %158 = icmp eq i32 %157, 1
  br i1 %158, label %159, label %161

159:                                              ; preds = %155
  %160 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %163

161:                                              ; preds = %155
  %162 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %163

163:                                              ; preds = %161, %159
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %3, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %3, align 4, !tbaa !5
  br label %151, !llvm.loop !20

167:                                              ; preds = %151
  %168 = load i32, ptr %2, align 4, !tbaa !5
  %169 = sub nsw i32 %168, 1
  store i32 %169, ptr %5, align 4, !tbaa !5
  br label %170

170:                                              ; preds = %182, %167
  %171 = load i32, ptr %5, align 4, !tbaa !5
  %172 = icmp sge i32 %171, 1
  br i1 %172, label %173, label %185

173:                                              ; preds = %170
  %174 = load i32, ptr %5, align 4, !tbaa !5
  %175 = srem i32 %174, 2
  %176 = icmp eq i32 %175, 1
  br i1 %176, label %177, label %179

177:                                              ; preds = %173
  %178 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %181

179:                                              ; preds = %173
  %180 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  br label %181

181:                                              ; preds = %179, %177
  br label %182

182:                                              ; preds = %181
  %183 = load i32, ptr %5, align 4, !tbaa !5
  %184 = add nsw i32 %183, -1
  store i32 %184, ptr %5, align 4, !tbaa !5
  br label %170, !llvm.loop !21

185:                                              ; preds = %170
  %186 = call i32 (ptr, ...) @printf(ptr noundef @.str.4)
  br label %187

187:                                              ; preds = %185
  %188 = load i32, ptr %2, align 4, !tbaa !5
  %189 = add nsw i32 %188, -1
  store i32 %189, ptr %2, align 4, !tbaa !5
  br label %125, !llvm.loop !22

190:                                              ; preds = %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  ret i32 0
}

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

declare i32 @printf(ptr noundef, ...) #2

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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/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}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !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"

@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nofree nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #3
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1)
  %4 = load i32, ptr %1, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.lr.ph86.preheader, label %._crit_edge105

.lr.ph86.preheader:                               ; preds = %0
  %6 = add nuw i32 %4, 1
  br label %.lr.ph86

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %._crit_edge83
  %indvars.iv = phi i32 [ %6, %.lr.ph86.preheader ], [ %indvars.iv.next, %._crit_edge83 ]
  %.04784 = phi i32 [ %4, %.lr.ph86.preheader ], [ %16, %._crit_edge83 ]
  %7 = load i32, ptr %1, align 4, !tbaa !5
  %8 = sub nsw i32 %7, %.04784
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %.lr.ph65.preheader

.lr.ph:                                           ; preds = %.lr.ph86, %.lr.ph
  %.04262 = phi i32 [ %11, %.lr.ph ], [ %8, %.lr.ph86 ]
  %10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %11 = add nsw i32 %.04262, -1
  %12 = icmp ugt i32 %.04262, 1
  br i1 %12, label %.lr.ph, label %.lr.ph65.preheader, !llvm.loop !9

.lr.ph65.preheader:                               ; preds = %.lr.ph, %.lr.ph86
  br label %.lr.ph65

.lr.ph65:                                         ; preds = %.lr.ph65.preheader, %.lr.ph65
  %.04464 = phi i32 [ %15, %.lr.ph65 ], [ 1, %.lr.ph65.preheader ]
  %13 = and i32 %.04464, 1
  %.not57 = icmp eq i32 %13, 0
  %.str.2..str.3 = select i1 %.not57, ptr @.str.2, ptr @.str.3
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.3)
  %15 = add nuw i32 %.04464, 1
  %exitcond.not = icmp eq i32 %15, %indvars.iv
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph65, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph65
  %16 = add nsw i32 %.04784, -1
  %17 = icmp sgt i32 %.04784, 1
  br i1 %17, label %.lr.ph68, label %._crit_edge69

.lr.ph68:                                         ; preds = %._crit_edge, %.lr.ph68
  %.066 = phi i32 [ %20, %.lr.ph68 ], [ %16, %._crit_edge ]
  %18 = and i32 %.066, 1
  %.not56 = icmp eq i32 %18, 0
  %.str.2..str.3119 = select i1 %.not56, ptr @.str.2, ptr @.str.3
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.3119)
  %20 = add nsw i32 %.066, -1
  %21 = icmp sgt i32 %.066, 1
  br i1 %21, label %.lr.ph68, label %._crit_edge69, !llvm.loop !12

._crit_edge69:                                    ; preds = %.lr.ph68, %._crit_edge
  %22 = load i32, ptr %1, align 4, !tbaa !5
  %.not5270 = icmp slt i32 %22, %.04784
  br i1 %.not5270, label %._crit_edge74, label %.lr.ph73

.lr.ph73:                                         ; preds = %._crit_edge69, %.lr.ph73
  %.14571 = phi i32 [ %24, %.lr.ph73 ], [ %22, %._crit_edge69 ]
  %23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %24 = add nsw i32 %.14571, -1
  %.not52.not = icmp sgt i32 %.14571, %.04784
  br i1 %.not52.not, label %.lr.ph73, label %._crit_edge74.loopexit, !llvm.loop !13

._crit_edge74.loopexit:                           ; preds = %.lr.ph73
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge74

._crit_edge74:                                    ; preds = %._crit_edge74.loopexit, %._crit_edge69
  %25 = phi i32 [ %.pre, %._crit_edge74.loopexit ], [ %22, %._crit_edge69 ]
  %26 = sub nsw i32 %25, %.04784
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph77, label %.lr.ph80.preheader

.lr.ph80.preheader:                               ; preds = %.lr.ph77, %._crit_edge74
  br label %.lr.ph80

.lr.ph77:                                         ; preds = %._crit_edge74, %.lr.ph77
  %.24675 = phi i32 [ %29, %.lr.ph77 ], [ %26, %._crit_edge74 ]
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %29 = add nsw i32 %.24675, -1
  %30 = icmp ugt i32 %.24675, 1
  br i1 %30, label %.lr.ph77, label %.lr.ph80.preheader, !llvm.loop !14

.preheader59:                                     ; preds = %.lr.ph80
  br i1 %17, label %.lr.ph82, label %._crit_edge83.thread

._crit_edge83.thread:                             ; preds = %.preheader59
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %._crit_edge87

.lr.ph80:                                         ; preds = %.lr.ph80.preheader, %.lr.ph80
  %.379 = phi i32 [ %34, %.lr.ph80 ], [ 1, %.lr.ph80.preheader ]
  %32 = and i32 %.379, 1
  %.not55 = icmp eq i32 %32, 0
  %.str.2..str.3120 = select i1 %.not55, ptr @.str.2, ptr @.str.3
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.3120)
  %34 = add nuw i32 %.379, 1
  %exitcond106.not = icmp eq i32 %34, %indvars.iv
  br i1 %exitcond106.not, label %.preheader59, label %.lr.ph80, !llvm.loop !15

.lr.ph82:                                         ; preds = %.preheader59, %.lr.ph82
  %.181 = phi i32 [ %37, %.lr.ph82 ], [ %16, %.preheader59 ]
  %35 = and i32 %.181, 1
  %.not54 = icmp eq i32 %35, 0
  %.str.2..str.3121 = select i1 %.not54, ptr @.str.2, ptr @.str.3
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.3121)
  %37 = add nsw i32 %.181, -1
  %38 = icmp sgt i32 %.181, 1
  br i1 %38, label %.lr.ph82, label %._crit_edge83, !llvm.loop !16

._crit_edge83:                                    ; preds = %.lr.ph82
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  %indvars.iv.next = add i32 %indvars.iv, -1
  br i1 %17, label %.lr.ph86, label %._crit_edge87, !llvm.loop !17

._crit_edge87:                                    ; preds = %._crit_edge83, %._crit_edge83.thread
  %.pre110 = load i32, ptr %1, align 4, !tbaa !5
  %40 = icmp sgt i32 %.pre110, 0
  br i1 %40, label %.lr.ph104.preheader, label %._crit_edge105

.lr.ph104.preheader:                              ; preds = %._crit_edge87
  %41 = add nuw i32 %.pre110, 1
  br label %.lr.ph104

.lr.ph104thread-pre-split:                        ; preds = %._crit_edge101
  %indvars.iv.next108 = add i32 %indvars.iv107, -1
  %42 = add nsw i32 %.148102, -1
  %.pr = load i32, ptr %1, align 4, !tbaa !5
  br label %.lr.ph104

.lr.ph104:                                        ; preds = %.lr.ph104thread-pre-split, %.lr.ph104.preheader
  %43 = phi i32 [ %.pr, %.lr.ph104thread-pre-split ], [ %.pre110, %.lr.ph104.preheader ]
  %indvars.iv107 = phi i32 [ %indvars.iv.next108, %.lr.ph104thread-pre-split ], [ %41, %.lr.ph104.preheader ]
  %.148102 = phi i32 [ %42, %.lr.ph104thread-pre-split ], [ %.pre110, %.lr.ph104.preheader ]
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.lr.ph90, label %._crit_edge91

.lr.ph90:                                         ; preds = %.lr.ph104, %.lr.ph90
  %.488 = phi i32 [ %46, %.lr.ph90 ], [ %43, %.lr.ph104 ]
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %46 = add nsw i32 %.488, -1
  %47 = icmp ugt i32 %.488, 1
  br i1 %47, label %.lr.ph90, label %._crit_edge91.loopexit, !llvm.loop !18

._crit_edge91.loopexit:                           ; preds = %.lr.ph90
  %.pre111 = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge91

._crit_edge91:                                    ; preds = %._crit_edge91.loopexit, %.lr.ph104
  %48 = phi i32 [ %.pre111, %._crit_edge91.loopexit ], [ %43, %.lr.ph104 ]
  %49 = sub nsw i32 %48, %.148102
  %50 = icmp sgt i32 %49, 0
  br i1 %50, label %.lr.ph94, label %.lr.ph97.preheader

.lr.ph97.preheader:                               ; preds = %.lr.ph94, %._crit_edge91
  br label %.lr.ph97

.lr.ph94:                                         ; preds = %._crit_edge91, %.lr.ph94
  %.14392 = phi i32 [ %52, %.lr.ph94 ], [ %49, %._crit_edge91 ]
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %52 = add nsw i32 %.14392, -1
  %53 = icmp ugt i32 %.14392, 1
  br i1 %53, label %.lr.ph94, label %.lr.ph97.preheader, !llvm.loop !19

.preheader:                                       ; preds = %.lr.ph97
  %54 = icmp sgt i32 %.148102, 1
  br i1 %54, label %.lr.ph100, label %._crit_edge101.thread

._crit_edge101.thread:                            ; preds = %.preheader
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %._crit_edge105

.lr.ph97:                                         ; preds = %.lr.ph97.preheader, %.lr.ph97
  %.596 = phi i32 [ %58, %.lr.ph97 ], [ 1, %.lr.ph97.preheader ]
  %56 = and i32 %.596, 1
  %.not50 = icmp eq i32 %56, 0
  %.str.2..str.3122 = select i1 %.not50, ptr @.str.2, ptr @.str.3
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.3122)
  %58 = add nuw i32 %.596, 1
  %exitcond109.not = icmp eq i32 %58, %indvars.iv107
  br i1 %exitcond109.not, label %.preheader, label %.lr.ph97, !llvm.loop !20

.lr.ph100:                                        ; preds = %.preheader, %.lr.ph100
  %.299.in = phi i32 [ %.299, %.lr.ph100 ], [ %.148102, %.preheader ]
  %.299 = add nsw i32 %.299.in, -1
  %59 = and i32 %.299, 1
  %.not49 = icmp eq i32 %59, 0
  %.str.2..str.3123 = select i1 %.not49, ptr @.str.2, ptr @.str.3
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.3123)
  %61 = icmp ugt i32 %.299.in, 2
  br i1 %61, label %.lr.ph100, label %._crit_edge101, !llvm.loop !21

._crit_edge101:                                   ; preds = %.lr.ph100
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4)
  br i1 %54, label %.lr.ph104thread-pre-split, label %._crit_edge105, !llvm.loop !22

._crit_edge105:                                   ; preds = %._crit_edge101, %0, %._crit_edge101.thread, %._crit_edge87
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #3
  ret i32 0
}

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

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

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

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

attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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/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}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass