; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/基础算法 (动态维护连续相同数字区间)

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

@A = external dso_local global [210000 x i32], align 16
@val = external dso_local global [210000 x i32], align 16
@n = external dso_local global i32, align 4
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6changeii(i32 noundef, i32 noundef) #2

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

14:                                               ; preds = %23, %0
  %15 = load i32, ptr %2, align 4, !tbaa !9
  %16 = load i32, ptr @n, align 4, !tbaa !9
  %17 = icmp sle i32 %15, %16
  br i1 %17, label %19, label %18

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

19:                                               ; preds = %14
  %20 = load i32, ptr %2, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [210000 x i32], ptr @A, i64 0, i64 %21
  store i32 1, ptr %22, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %19
  %24 = load i32, ptr %2, align 4, !tbaa !9
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %2, align 4, !tbaa !9
  br label %14, !llvm.loop !11

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

27:                                               ; preds = %38, %26
  %28 = load i32, ptr %3, align 4, !tbaa !9
  %29 = load i32, ptr @n, align 4, !tbaa !9
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %41

32:                                               ; preds = %27
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !9
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %36)
  br label %38

38:                                               ; preds = %32
  %39 = load i32, ptr %3, align 4, !tbaa !9
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %3, align 4, !tbaa !9
  br label %27, !llvm.loop !13

41:                                               ; preds = %31
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @_Z6changeii(i32 noundef 3, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 1, ptr %4, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %54, %41
  %44 = load i32, ptr %4, align 4, !tbaa !9
  %45 = load i32, ptr @n, align 4, !tbaa !9
  %46 = icmp sle i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  br label %57

48:                                               ; preds = %43
  %49 = load i32, ptr %4, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %52)
  br label %54

54:                                               ; preds = %48
  %55 = load i32, ptr %4, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %4, align 4, !tbaa !9
  br label %43, !llvm.loop !14

57:                                               ; preds = %47
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @_Z6changeii(i32 noundef 4, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 1, ptr %5, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %70, %57
  %60 = load i32, ptr %5, align 4, !tbaa !9
  %61 = load i32, ptr @n, align 4, !tbaa !9
  %62 = icmp sle i32 %60, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %73

64:                                               ; preds = %59
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !9
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %68)
  br label %70

70:                                               ; preds = %64
  %71 = load i32, ptr %5, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %5, align 4, !tbaa !9
  br label %59, !llvm.loop !15

73:                                               ; preds = %63
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @_Z6changeii(i32 noundef 2, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %86, %73
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = load i32, ptr @n, align 4, !tbaa !9
  %78 = icmp sle i32 %76, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %89

80:                                               ; preds = %75
  %81 = load i32, ptr %6, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %84)
  br label %86

86:                                               ; preds = %80
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %6, align 4, !tbaa !9
  br label %75, !llvm.loop !16

89:                                               ; preds = %79
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @_Z6changeii(i32 noundef 2, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %91

91:                                               ; preds = %102, %89
  %92 = load i32, ptr %7, align 4, !tbaa !9
  %93 = load i32, ptr @n, align 4, !tbaa !9
  %94 = icmp sle i32 %92, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %105

96:                                               ; preds = %91
  %97 = load i32, ptr %7, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %100)
  br label %102

102:                                              ; preds = %96
  %103 = load i32, ptr %7, align 4, !tbaa !9
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %7, align 4, !tbaa !9
  br label %91, !llvm.loop !17

105:                                              ; preds = %95
  %106 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @_Z6changeii(i32 noundef 1, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %118, %105
  %108 = load i32, ptr %8, align 4, !tbaa !9
  %109 = load i32, ptr @n, align 4, !tbaa !9
  %110 = icmp sle i32 %108, %109
  br i1 %110, label %112, label %111

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

112:                                              ; preds = %107
  %113 = load i32, ptr %8, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %116)
  br label %118

118:                                              ; preds = %112
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %8, align 4, !tbaa !9
  br label %107, !llvm.loop !18

121:                                              ; preds = %111
  %122 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @_Z6changeii(i32 noundef 2, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 1, ptr %9, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %134, %121
  %124 = load i32, ptr %9, align 4, !tbaa !9
  %125 = load i32, ptr @n, align 4, !tbaa !9
  %126 = icmp sle i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %137

128:                                              ; preds = %123
  %129 = load i32, ptr %9, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !9
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %132)
  br label %134

134:                                              ; preds = %128
  %135 = load i32, ptr %9, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %9, align 4, !tbaa !9
  br label %123, !llvm.loop !19

137:                                              ; preds = %127
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @_Z6changeii(i32 noundef 3, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %139

139:                                              ; preds = %150, %137
  %140 = load i32, ptr %10, align 4, !tbaa !9
  %141 = load i32, ptr @n, align 4, !tbaa !9
  %142 = icmp sle i32 %140, %141
  br i1 %142, label %144, label %143

143:                                              ; preds = %139
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %153

144:                                              ; preds = %139
  %145 = load i32, ptr %10, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %146
  %148 = load i32, ptr %147, align 4, !tbaa !9
  %149 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %148)
  br label %150

150:                                              ; preds = %144
  %151 = load i32, ptr %10, align 4, !tbaa !9
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %10, align 4, !tbaa !9
  br label %139, !llvm.loop !20

153:                                              ; preds = %143
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @_Z6changeii(i32 noundef 3, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %166, %153
  %156 = load i32, ptr %11, align 4, !tbaa !9
  %157 = load i32, ptr @n, align 4, !tbaa !9
  %158 = icmp sle i32 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %169

160:                                              ; preds = %155
  %161 = load i32, ptr %11, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !9
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %164)
  br label %166

166:                                              ; preds = %160
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %11, align 4, !tbaa !9
  br label %155, !llvm.loop !21

169:                                              ; preds = %159
  %170 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  ret i32 0
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !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"

@A = external dso_local local_unnamed_addr global [210000 x i32], align 16
@val = external dso_local local_unnamed_addr global [210000 x i32], align 16
@n = external dso_local local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z4initv() local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6changeii(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = load ptr, ptr @stdin, align 8, !tbaa !5
  %2 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %1)
  store i32 5, ptr @n, align 4, !tbaa !9
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr getelementptr inbounds (i8, ptr @A, i64 4), align 4, !tbaa !9
  store i32 1, ptr getelementptr inbounds (i8, ptr @A, i64 20), align 4, !tbaa !9
  tail call void @_Z4initv()
  %3 = load i32, ptr @n, align 4, !tbaa !9
  %.not3949 = icmp slt i32 %3, 1
  br i1 %.not3949, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @_Z6changeii(i32 noundef 3, i32 noundef 2)
  %5 = load i32, ptr @n, align 4, !tbaa !9
  %.not4051 = icmp slt i32 %5, 1
  br i1 %.not4051, label %._crit_edge55, label %.lr.ph54

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

._crit_edge55:                                    ; preds = %.lr.ph54, %._crit_edge
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @_Z6changeii(i32 noundef 4, i32 noundef 2)
  %12 = load i32, ptr @n, align 4, !tbaa !9
  %.not4156 = icmp slt i32 %12, 1
  br i1 %.not4156, label %._crit_edge60, label %.lr.ph59

.lr.ph54:                                         ; preds = %._crit_edge, %.lr.ph54
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %.lr.ph54 ], [ 1, %._crit_edge ]
  %13 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %indvars.iv93
  %14 = load i32, ptr %13, align 4, !tbaa !9
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %14)
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %16 = load i32, ptr @n, align 4, !tbaa !9
  %17 = sext i32 %16 to i64
  %.not40.not = icmp slt i64 %indvars.iv93, %17
  br i1 %.not40.not, label %.lr.ph54, label %._crit_edge55, !llvm.loop !13

._crit_edge60:                                    ; preds = %.lr.ph59, %._crit_edge55
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @_Z6changeii(i32 noundef 2, i32 noundef 2)
  %19 = load i32, ptr @n, align 4, !tbaa !9
  %.not4261 = icmp slt i32 %19, 1
  br i1 %.not4261, label %._crit_edge65, label %.lr.ph64

.lr.ph59:                                         ; preds = %._crit_edge55, %.lr.ph59
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.lr.ph59 ], [ 1, %._crit_edge55 ]
  %20 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %indvars.iv96
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %21)
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %23 = load i32, ptr @n, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %.not41.not = icmp slt i64 %indvars.iv96, %24
  br i1 %.not41.not, label %.lr.ph59, label %._crit_edge60, !llvm.loop !14

._crit_edge65:                                    ; preds = %.lr.ph64, %._crit_edge60
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @_Z6changeii(i32 noundef 2, i32 noundef 1)
  %26 = load i32, ptr @n, align 4, !tbaa !9
  %.not4366 = icmp slt i32 %26, 1
  br i1 %.not4366, label %._crit_edge70, label %.lr.ph69

.lr.ph64:                                         ; preds = %._crit_edge60, %.lr.ph64
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %.lr.ph64 ], [ 1, %._crit_edge60 ]
  %27 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %indvars.iv99
  %28 = load i32, ptr %27, align 4, !tbaa !9
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %28)
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %30 = load i32, ptr @n, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %.not42.not = icmp slt i64 %indvars.iv99, %31
  br i1 %.not42.not, label %.lr.ph64, label %._crit_edge65, !llvm.loop !15

._crit_edge70:                                    ; preds = %.lr.ph69, %._crit_edge65
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @_Z6changeii(i32 noundef 1, i32 noundef 2)
  %33 = load i32, ptr @n, align 4, !tbaa !9
  %.not4471 = icmp slt i32 %33, 1
  br i1 %.not4471, label %._crit_edge75, label %.lr.ph74

.lr.ph69:                                         ; preds = %._crit_edge65, %.lr.ph69
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %.lr.ph69 ], [ 1, %._crit_edge65 ]
  %34 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %indvars.iv102
  %35 = load i32, ptr %34, align 4, !tbaa !9
  %36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %35)
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %37 = load i32, ptr @n, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %.not43.not = icmp slt i64 %indvars.iv102, %38
  br i1 %.not43.not, label %.lr.ph69, label %._crit_edge70, !llvm.loop !16

._crit_edge75:                                    ; preds = %.lr.ph74, %._crit_edge70
  %39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @_Z6changeii(i32 noundef 2, i32 noundef 2)
  %40 = load i32, ptr @n, align 4, !tbaa !9
  %.not4576 = icmp slt i32 %40, 1
  br i1 %.not4576, label %._crit_edge80, label %.lr.ph79

.lr.ph74:                                         ; preds = %._crit_edge70, %.lr.ph74
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %.lr.ph74 ], [ 1, %._crit_edge70 ]
  %41 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %indvars.iv105
  %42 = load i32, ptr %41, align 4, !tbaa !9
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %42)
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %44 = load i32, ptr @n, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %.not44.not = icmp slt i64 %indvars.iv105, %45
  br i1 %.not44.not, label %.lr.ph74, label %._crit_edge75, !llvm.loop !17

._crit_edge80:                                    ; preds = %.lr.ph79, %._crit_edge75
  %46 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @_Z6changeii(i32 noundef 3, i32 noundef 1)
  %47 = load i32, ptr @n, align 4, !tbaa !9
  %.not4681 = icmp slt i32 %47, 1
  br i1 %.not4681, label %._crit_edge85, label %.lr.ph84

.lr.ph79:                                         ; preds = %._crit_edge75, %.lr.ph79
  %indvars.iv108 = phi i64 [ %indvars.iv.next109, %.lr.ph79 ], [ 1, %._crit_edge75 ]
  %48 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %indvars.iv108
  %49 = load i32, ptr %48, align 4, !tbaa !9
  %50 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %49)
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %51 = load i32, ptr @n, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %.not45.not = icmp slt i64 %indvars.iv108, %52
  br i1 %.not45.not, label %.lr.ph79, label %._crit_edge80, !llvm.loop !18

._crit_edge85:                                    ; preds = %.lr.ph84, %._crit_edge80
  %53 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  tail call void @_Z6changeii(i32 noundef 3, i32 noundef 2)
  %54 = load i32, ptr @n, align 4, !tbaa !9
  %.not4786 = icmp slt i32 %54, 1
  br i1 %.not4786, label %._crit_edge90, label %.lr.ph89

.lr.ph84:                                         ; preds = %._crit_edge80, %.lr.ph84
  %indvars.iv111 = phi i64 [ %indvars.iv.next112, %.lr.ph84 ], [ 1, %._crit_edge80 ]
  %55 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %indvars.iv111
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %56)
  %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1
  %58 = load i32, ptr @n, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %.not46.not = icmp slt i64 %indvars.iv111, %59
  br i1 %.not46.not, label %.lr.ph84, label %._crit_edge85, !llvm.loop !19

._crit_edge90:                                    ; preds = %.lr.ph89, %._crit_edge85
  %60 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  ret i32 0

.lr.ph89:                                         ; preds = %._crit_edge85, %.lr.ph89
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %.lr.ph89 ], [ 1, %._crit_edge85 ]
  %61 = getelementptr inbounds [210000 x i32], ptr @val, i64 0, i64 %indvars.iv114
  %62 = load i32, ptr %61, align 4, !tbaa !9
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %62)
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %64 = load i32, ptr @n, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %.not47.not = icmp slt i64 %indvars.iv114, %65
  br i1 %.not47.not, label %.lr.ph89, label %._crit_edge90, !llvm.loop !20
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { 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 = { 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 #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 = { 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" }

!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 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass