; LLVM IR from codemistic/Data-Structures-and-Algorithms :: Arrays (31_Menu_for_Array)

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

%struct.array = type { ptr, i32, i32 }

@.str.23 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [50 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: nounwind uwtable
declare dso_local void @Display(ptr, i64) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @Append(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Insert(ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Delete(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @LinearSearch(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @LinearSearchSwapToPrev(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @LinearSearchSwapToHead(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @BinSearch(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @RevBinSearch(ptr, i64, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Get(ptr, i64, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Set(ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Max(ptr, i64) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Min(ptr, i64) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @Sum(ptr, i64) #1

; Function Attrs: nounwind uwtable
declare dso_local float @Avg(ptr, i64) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Rev1(ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @Rev2(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @lShift(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @rShift(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @lRot(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @rRot(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @InsertSort(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @IsSort(ptr, i64) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Arrange(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Merge(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #1 {
  %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 %struct.array, align 8
  %9 = alloca %struct.array, align 8
  %10 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %11 = call i32 (ptr, ...) @printf(ptr noundef @.str.23)
  %12 = getelementptr inbounds %struct.array, ptr %8, i32 0, i32 1
  %13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %12)
  %14 = getelementptr inbounds %struct.array, ptr %8, i32 0, i32 1
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = mul i64 %16, 4
  %18 = call noalias ptr @malloc(i64 noundef %17) #5
  %19 = getelementptr inbounds %struct.array, ptr %8, i32 0, i32 0
  store ptr %18, ptr %19, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.array, ptr %8, i32 0, i32 2
  store i32 0, ptr %20, align 4, !tbaa !12
  %21 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %4)
  %23 = load i32, ptr %4, align 4, !tbaa !13
  %24 = getelementptr inbounds %struct.array, ptr %8, i32 0, i32 2
  store i32 %23, ptr %24, align 4, !tbaa !12
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.26)
  store i32 0, ptr %2, align 4, !tbaa !13
  br label %26

26:                                               ; preds = %38, %0
  %27 = load i32, ptr %2, align 4, !tbaa !13
  %28 = getelementptr inbounds %struct.array, ptr %8, i32 0, i32 2
  %29 = load i32, ptr %28, align 4, !tbaa !12
  %30 = icmp slt i32 %27, %29
  br i1 %30, label %31, label %41

31:                                               ; preds = %26
  %32 = getelementptr inbounds %struct.array, ptr %8, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = load i32, ptr %2, align 4, !tbaa !13
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i32, ptr %33, i64 %35
  %37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %36)
  br label %38

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

41:                                               ; preds = %26
  %42 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8
  %44 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %45 = load i64, ptr %44, align 8
  call void @Display(ptr %43, i64 %45)
  br label %46

46:                                               ; preds = %226, %41
  %47 = call i32 (ptr, ...) @printf(ptr noundef @.str.27)
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str.28)
  %49 = call i32 (ptr, ...) @printf(ptr noundef @.str.29)
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.30)
  %51 = call i32 (ptr, ...) @printf(ptr noundef @.str.31)
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str.32)
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.33)
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.34)
  %55 = call i32 (ptr, ...) @printf(ptr noundef @.str.35)
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.36)
  %57 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.38)
  %59 = call i32 (ptr, ...) @printf(ptr noundef @.str.39)
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.40)
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.41)
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.42)
  %63 = call i32 (ptr, ...) @printf(ptr noundef @.str.43)
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str.44)
  %65 = call i32 (ptr, ...) @printf(ptr noundef @.str.45)
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.46)
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.47)
  %68 = call i32 (ptr, ...) @printf(ptr noundef @.str.48)
  %69 = call i32 (ptr, ...) @printf(ptr noundef @.str.49)
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.50)
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.51)
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.52)
  %73 = call i32 (ptr, ...) @printf(ptr noundef @.str.53)
  %74 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %3)
  %75 = load i32, ptr %3, align 4, !tbaa !13
  switch i32 %75, label %225 [
    i32 1, label %76
    i32 2, label %81
    i32 3, label %85
    i32 4, label %92
    i32 5, label %96
    i32 6, label %100
    i32 7, label %104
    i32 8, label %108
    i32 9, label %112
    i32 10, label %123
    i32 11, label %131
    i32 12, label %138
    i32 13, label %143
    i32 14, label %148
    i32 15, label %155
    i32 16, label %163
    i32 17, label %168
    i32 18, label %173
    i32 19, label %174
    i32 20, label %175
    i32 21, label %176
    i32 22, label %177
    i32 23, label %181
    i32 24, label %186
    i32 25, label %187
  ]

76:                                               ; preds = %46
  %77 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8
  %79 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %80 = load i64, ptr %79, align 8
  call void @Display(ptr %78, i64 %80)
  br label %225

81:                                               ; preds = %46
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.54)
  %83 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %84 = load i32, ptr %6, align 4, !tbaa !13
  call void @Append(ptr noundef %8, i32 noundef %84)
  br label %225

85:                                               ; preds = %46
  %86 = call i32 (ptr, ...) @printf(ptr noundef @.str.55)
  %87 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %7)
  %88 = call i32 (ptr, ...) @printf(ptr noundef @.str.56)
  %89 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %90 = load i32, ptr %7, align 4, !tbaa !13
  %91 = load i32, ptr %6, align 4, !tbaa !13
  call void @Insert(ptr noundef %8, i32 noundef %90, i32 noundef %91)
  br label %225

92:                                               ; preds = %46
  %93 = call i32 (ptr, ...) @printf(ptr noundef @.str.57)
  %94 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %7)
  %95 = load i32, ptr %7, align 4, !tbaa !13
  call void @Delete(ptr noundef %8, i32 noundef %95)
  br label %225

96:                                               ; preds = %46
  %97 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  %98 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %99 = load i32, ptr %6, align 4, !tbaa !13
  call void @LinearSearch(ptr noundef %8, i32 noundef %99)
  br label %225

100:                                              ; preds = %46
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  %102 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %103 = load i32, ptr %6, align 4, !tbaa !13
  call void @LinearSearchSwapToPrev(ptr noundef %8, i32 noundef %103)
  br label %225

104:                                              ; preds = %46
  %105 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  %106 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %107 = load i32, ptr %6, align 4, !tbaa !13
  call void @LinearSearchSwapToHead(ptr noundef %8, i32 noundef %107)
  br label %225

108:                                              ; preds = %46
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  %110 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %111 = load i32, ptr %6, align 4, !tbaa !13
  call void @BinSearch(ptr noundef %8, i32 noundef %111)
  br label %225

112:                                              ; preds = %46
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  %114 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %115 = getelementptr inbounds %struct.array, ptr %8, i32 0, i32 2
  %116 = load i32, ptr %115, align 4, !tbaa !12
  %117 = sub nsw i32 %116, 1
  %118 = load i32, ptr %6, align 4, !tbaa !13
  %119 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8
  %121 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %122 = load i64, ptr %121, align 8
  call void @RevBinSearch(ptr %120, i64 %122, i32 noundef 0, i32 noundef %117, i32 noundef %118)
  br label %225

123:                                              ; preds = %46
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.59)
  %125 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %7)
  %126 = load i32, ptr %7, align 4, !tbaa !13
  %127 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8
  %129 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %130 = load i64, ptr %129, align 8
  call void @Get(ptr %128, i64 %130, i32 noundef %126)
  br label %225

131:                                              ; preds = %46
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.60)
  %133 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %7)
  %134 = call i32 (ptr, ...) @printf(ptr noundef @.str.61)
  %135 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %136 = load i32, ptr %7, align 4, !tbaa !13
  %137 = load i32, ptr %6, align 4, !tbaa !13
  call void @Set(ptr noundef %8, i32 noundef %136, i32 noundef %137)
  br label %225

138:                                              ; preds = %46
  %139 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8
  %141 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %142 = load i64, ptr %141, align 8
  call void @Max(ptr %140, i64 %142)
  br label %225

143:                                              ; preds = %46
  %144 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8
  %146 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %147 = load i64, ptr %146, align 8
  call void @Min(ptr %145, i64 %147)
  br label %225

148:                                              ; preds = %46
  %149 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8
  %151 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %152 = load i64, ptr %151, align 8
  %153 = call i32 @Sum(ptr %150, i64 %152)
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.62, i32 noundef %153)
  br label %225

155:                                              ; preds = %46
  %156 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8
  %158 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %159 = load i64, ptr %158, align 8
  %160 = call float @Avg(ptr %157, i64 %159)
  %161 = fpext float %160 to double
  %162 = call i32 (ptr, ...) @printf(ptr noundef @.str.63, double noundef %161)
  br label %225

163:                                              ; preds = %46
  call void @Rev1(ptr noundef %8)
  %164 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8
  %166 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %167 = load i64, ptr %166, align 8
  call void @Display(ptr %165, i64 %167)
  br label %225

168:                                              ; preds = %46
  call void @Rev2(ptr noundef %8)
  %169 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8
  %171 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %172 = load i64, ptr %171, align 8
  call void @Display(ptr %170, i64 %172)
  br label %225

173:                                              ; preds = %46
  call void @lShift(ptr noundef %8)
  br label %225

174:                                              ; preds = %46
  call void @rShift(ptr noundef %8)
  br label %225

175:                                              ; preds = %46
  call void @lRot(ptr noundef %8)
  br label %225

176:                                              ; preds = %46
  call void @rRot(ptr noundef %8)
  br label %225

177:                                              ; preds = %46
  %178 = call i32 (ptr, ...) @printf(ptr noundef @.str.56)
  %179 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %6)
  %180 = load i32, ptr %6, align 4, !tbaa !13
  call void @InsertSort(ptr noundef %8, i32 noundef %180)
  br label %225

181:                                              ; preds = %46
  %182 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8
  %184 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %185 = load i64, ptr %184, align 8
  call void @IsSort(ptr %183, i64 %185)
  br label %225

186:                                              ; preds = %46
  call void @Arrange(ptr noundef %8)
  br label %225

187:                                              ; preds = %46
  %188 = call i32 (ptr, ...) @printf(ptr noundef @.str.64)
  %189 = getelementptr inbounds %struct.array, ptr %9, i32 0, i32 1
  %190 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %189)
  %191 = getelementptr inbounds %struct.array, ptr %9, i32 0, i32 1
  %192 = load i32, ptr %191, align 8, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = mul i64 %193, 4
  %195 = call noalias ptr @malloc(i64 noundef %194) #5
  %196 = getelementptr inbounds %struct.array, ptr %9, i32 0, i32 0
  store ptr %195, ptr %196, align 8, !tbaa !11
  %197 = getelementptr inbounds %struct.array, ptr %9, i32 0, i32 2
  store i32 0, ptr %197, align 4, !tbaa !12
  %198 = call i32 (ptr, ...) @printf(ptr noundef @.str.65)
  %199 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %5)
  %200 = load i32, ptr %5, align 4, !tbaa !13
  %201 = getelementptr inbounds %struct.array, ptr %9, i32 0, i32 2
  store i32 %200, ptr %201, align 4, !tbaa !12
  %202 = call i32 (ptr, ...) @printf(ptr noundef @.str.26)
  store i32 0, ptr %2, align 4, !tbaa !13
  br label %203

203:                                              ; preds = %215, %187
  %204 = load i32, ptr %2, align 4, !tbaa !13
  %205 = getelementptr inbounds %struct.array, ptr %9, i32 0, i32 2
  %206 = load i32, ptr %205, align 4, !tbaa !12
  %207 = icmp slt i32 %204, %206
  br i1 %207, label %208, label %218

208:                                              ; preds = %203
  %209 = getelementptr inbounds %struct.array, ptr %9, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !11
  %211 = load i32, ptr %2, align 4, !tbaa !13
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds i32, ptr %210, i64 %212
  %214 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.24, ptr noundef %213)
  br label %215

215:                                              ; preds = %208
  %216 = load i32, ptr %2, align 4, !tbaa !13
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %2, align 4, !tbaa !13
  br label %203, !llvm.loop !16

218:                                              ; preds = %203
  %219 = call ptr @Merge(ptr noundef %8, ptr noundef %9)
  store ptr %219, ptr %10, align 8, !tbaa !17
  %220 = load ptr, ptr %10, align 8, !tbaa !17
  %221 = getelementptr inbounds { ptr, i64 }, ptr %220, i32 0, i32 0
  %222 = load ptr, ptr %221, align 8
  %223 = getelementptr inbounds { ptr, i64 }, ptr %220, i32 0, i32 1
  %224 = load i64, ptr %223, align 8
  call void @Display(ptr %222, i64 %224)
  br label %225

225:                                              ; preds = %218, %186, %181, %177, %176, %175, %174, %173, %168, %163, %155, %148, %143, %138, %131, %123, %112, %108, %104, %100, %96, %92, %85, %81, %76, %46
  br label %226

226:                                              ; preds = %225
  %227 = load i32, ptr %3, align 4, !tbaa !13
  %228 = icmp slt i32 %227, 26
  br i1 %228, label %46, label %229, !llvm.loop !18

229:                                              ; preds = %226
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %230 = load i32, ptr %1, align 4
  ret i32 %230
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 allocsize(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 }
attributes #5 = { nounwind allocsize(0) }

!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, !10, i64 8}
!6 = !{!"array", !7, i64 0, !10, i64 8, !10, i64 12}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !10, i64 12}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !15}


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

%struct.array = type { ptr, i32, i32 }

@.str.23 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.45 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.46 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.51 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [85 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [50 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: nounwind uwtable
declare dso_local void @Display(ptr, i64) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @Append(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Insert(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Delete(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @LinearSearch(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @LinearSearchSwapToPrev(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @LinearSearchSwapToHead(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @BinSearch(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @RevBinSearch(ptr, i64, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Get(ptr, i64, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Set(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Max(ptr, i64) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Min(ptr, i64) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @Sum(ptr, i64) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local float @Avg(ptr, i64) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Rev1(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @Rev2(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @lShift(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @rShift(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @lRot(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @rRot(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @InsertSort(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @IsSort(ptr, i64) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @Arrange(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @Merge(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 {
  %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 %struct.array, align 8
  %7 = alloca %struct.array, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23)
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %9)
  %11 = load i32, ptr %9, align 8, !tbaa !5
  %12 = sext i32 %11 to i64
  %13 = shl nsw i64 %12, 2
  %14 = call noalias ptr @malloc(i64 noundef %13) #5
  store ptr %14, ptr %6, align 8, !tbaa !11
  %15 = getelementptr inbounds i8, ptr %6, i64 12
  store i32 0, ptr %15, align 4, !tbaa !12
  %16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  %17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %2)
  %18 = load i32, ptr %2, align 4, !tbaa !13
  store i32 %18, ptr %15, align 4, !tbaa !12
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26)
  %20 = load i32, ptr %15, align 4, !tbaa !12
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %22 = load ptr, ptr %6, align 8, !tbaa !11
  %23 = getelementptr inbounds i32, ptr %22, i64 %indvars.iv
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef %23)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %25 = load i32, ptr %15, align 4, !tbaa !12
  %26 = sext i32 %25 to i64
  %27 = icmp slt i64 %indvars.iv.next, %26
  br i1 %27, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %0
  %28 = load ptr, ptr %6, align 8
  %29 = load i64, ptr %9, align 8
  call void @Display(ptr %28, i64 %29)
  %30 = getelementptr inbounds i8, ptr %7, i64 8
  %31 = getelementptr inbounds i8, ptr %7, i64 12
  br label %32

32:                                               ; preds = %175, %._crit_edge
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.27)
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.28)
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29)
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.30)
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.31)
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32)
  %39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33)
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.34)
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.35)
  %42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.36)
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.38)
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.39)
  %46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.40)
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.41)
  %48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.42)
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.43)
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.44)
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.45)
  %52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.46)
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.47)
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.48)
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.49)
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.50)
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.51)
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.52)
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.53)
  %60 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %1)
  %61 = load i32, ptr %1, align 4, !tbaa !13
  switch i32 %61, label %175 [
    i32 1, label %62
    i32 2, label %65
    i32 3, label %69
    i32 4, label %76
    i32 5, label %80
    i32 6, label %84
    i32 7, label %88
    i32 8, label %92
    i32 9, label %96
    i32 10, label %104
    i32 11, label %110
    i32 12, label %117
    i32 13, label %120
    i32 14, label %123
    i32 15, label %128
    i32 16, label %134
    i32 17, label %137
    i32 18, label %140
    i32 19, label %141
    i32 20, label %142
    i32 21, label %143
    i32 22, label %144
    i32 23, label %148
    i32 24, label %151
    i32 25, label %152
  ]

62:                                               ; preds = %32
  %63 = load ptr, ptr %6, align 8
  %64 = load i64, ptr %9, align 8
  call void @Display(ptr %63, i64 %64)
  br label %thread-pre-split

65:                                               ; preds = %32
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54)
  %67 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %68 = load i32, ptr %4, align 4, !tbaa !13
  call void @Append(ptr noundef nonnull %6, i32 noundef %68)
  br label %thread-pre-split

69:                                               ; preds = %32
  %70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.55)
  %71 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %5)
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56)
  %73 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %74 = load i32, ptr %5, align 4, !tbaa !13
  %75 = load i32, ptr %4, align 4, !tbaa !13
  call void @Insert(ptr noundef nonnull %6, i32 noundef %74, i32 noundef %75)
  br label %thread-pre-split

76:                                               ; preds = %32
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.57)
  %78 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %5)
  %79 = load i32, ptr %5, align 4, !tbaa !13
  call void @Delete(ptr noundef nonnull %6, i32 noundef %79)
  br label %thread-pre-split

80:                                               ; preds = %32
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  %82 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %83 = load i32, ptr %4, align 4, !tbaa !13
  call void @LinearSearch(ptr noundef nonnull %6, i32 noundef %83)
  br label %thread-pre-split

84:                                               ; preds = %32
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  %86 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %87 = load i32, ptr %4, align 4, !tbaa !13
  call void @LinearSearchSwapToPrev(ptr noundef nonnull %6, i32 noundef %87)
  br label %thread-pre-split

88:                                               ; preds = %32
  %89 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  %90 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %91 = load i32, ptr %4, align 4, !tbaa !13
  call void @LinearSearchSwapToHead(ptr noundef nonnull %6, i32 noundef %91)
  br label %thread-pre-split

92:                                               ; preds = %32
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  %94 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %95 = load i32, ptr %4, align 4, !tbaa !13
  call void @BinSearch(ptr noundef nonnull %6, i32 noundef %95)
  br label %thread-pre-split

96:                                               ; preds = %32
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  %98 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %99 = load i32, ptr %15, align 4, !tbaa !12
  %100 = add nsw i32 %99, -1
  %101 = load i32, ptr %4, align 4, !tbaa !13
  %102 = load ptr, ptr %6, align 8
  %103 = load i64, ptr %9, align 8
  call void @RevBinSearch(ptr %102, i64 %103, i32 noundef 0, i32 noundef %100, i32 noundef %101)
  br label %thread-pre-split

104:                                              ; preds = %32
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.59)
  %106 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %5)
  %107 = load i32, ptr %5, align 4, !tbaa !13
  %108 = load ptr, ptr %6, align 8
  %109 = load i64, ptr %9, align 8
  call void @Get(ptr %108, i64 %109, i32 noundef %107)
  br label %thread-pre-split

110:                                              ; preds = %32
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60)
  %112 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %5)
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.61)
  %114 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %115 = load i32, ptr %5, align 4, !tbaa !13
  %116 = load i32, ptr %4, align 4, !tbaa !13
  call void @Set(ptr noundef nonnull %6, i32 noundef %115, i32 noundef %116)
  br label %thread-pre-split

117:                                              ; preds = %32
  %118 = load ptr, ptr %6, align 8
  %119 = load i64, ptr %9, align 8
  call void @Max(ptr %118, i64 %119)
  br label %thread-pre-split

120:                                              ; preds = %32
  %121 = load ptr, ptr %6, align 8
  %122 = load i64, ptr %9, align 8
  call void @Min(ptr %121, i64 %122)
  br label %thread-pre-split

123:                                              ; preds = %32
  %124 = load ptr, ptr %6, align 8
  %125 = load i64, ptr %9, align 8
  %126 = call i32 @Sum(ptr %124, i64 %125)
  %127 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.62, i32 noundef %126)
  br label %thread-pre-split

128:                                              ; preds = %32
  %129 = load ptr, ptr %6, align 8
  %130 = load i64, ptr %9, align 8
  %131 = call float @Avg(ptr %129, i64 %130)
  %132 = fpext float %131 to double
  %133 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.63, double noundef %132)
  br label %thread-pre-split

134:                                              ; preds = %32
  call void @Rev1(ptr noundef nonnull %6)
  %135 = load ptr, ptr %6, align 8
  %136 = load i64, ptr %9, align 8
  call void @Display(ptr %135, i64 %136)
  br label %thread-pre-split

137:                                              ; preds = %32
  call void @Rev2(ptr noundef nonnull %6)
  %138 = load ptr, ptr %6, align 8
  %139 = load i64, ptr %9, align 8
  call void @Display(ptr %138, i64 %139)
  br label %thread-pre-split

140:                                              ; preds = %32
  call void @lShift(ptr noundef nonnull %6)
  br label %thread-pre-split

141:                                              ; preds = %32
  call void @rShift(ptr noundef nonnull %6)
  br label %thread-pre-split

142:                                              ; preds = %32
  call void @lRot(ptr noundef nonnull %6)
  br label %thread-pre-split

143:                                              ; preds = %32
  call void @rRot(ptr noundef nonnull %6)
  br label %thread-pre-split

144:                                              ; preds = %32
  %145 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56)
  %146 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %4)
  %147 = load i32, ptr %4, align 4, !tbaa !13
  call void @InsertSort(ptr noundef nonnull %6, i32 noundef %147)
  br label %thread-pre-split

148:                                              ; preds = %32
  %149 = load ptr, ptr %6, align 8
  %150 = load i64, ptr %9, align 8
  call void @IsSort(ptr %149, i64 %150)
  br label %thread-pre-split

151:                                              ; preds = %32
  call void @Arrange(ptr noundef nonnull %6)
  br label %thread-pre-split

152:                                              ; preds = %32
  %153 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.64)
  %154 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %30)
  %155 = load i32, ptr %30, align 8, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = shl nsw i64 %156, 2
  %158 = call noalias ptr @malloc(i64 noundef %157) #5
  store ptr %158, ptr %7, align 8, !tbaa !11
  store i32 0, ptr %31, align 4, !tbaa !12
  %159 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.65)
  %160 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef nonnull %3)
  %161 = load i32, ptr %3, align 4, !tbaa !13
  store i32 %161, ptr %31, align 4, !tbaa !12
  %162 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26)
  %163 = load i32, ptr %31, align 4, !tbaa !12
  %164 = icmp sgt i32 %163, 0
  br i1 %164, label %.lr.ph10, label %._crit_edge11

.lr.ph10:                                         ; preds = %152, %.lr.ph10
  %indvars.iv13 = phi i64 [ %indvars.iv.next14, %.lr.ph10 ], [ 0, %152 ]
  %165 = load ptr, ptr %7, align 8, !tbaa !11
  %166 = getelementptr inbounds i32, ptr %165, i64 %indvars.iv13
  %167 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.24, ptr noundef %166)
  %indvars.iv.next14 = add nuw nsw i64 %indvars.iv13, 1
  %168 = load i32, ptr %31, align 4, !tbaa !12
  %169 = sext i32 %168 to i64
  %170 = icmp slt i64 %indvars.iv.next14, %169
  br i1 %170, label %.lr.ph10, label %._crit_edge11, !llvm.loop !16

._crit_edge11:                                    ; preds = %.lr.ph10, %152
  %171 = call ptr @Merge(ptr noundef nonnull %6, ptr noundef nonnull %7)
  %172 = load ptr, ptr %171, align 8
  %173 = getelementptr inbounds i8, ptr %171, i64 8
  %174 = load i64, ptr %173, align 8
  call void @Display(ptr %172, i64 %174)
  br label %thread-pre-split

thread-pre-split:                                 ; preds = %._crit_edge11, %151, %148, %144, %143, %142, %141, %140, %137, %134, %128, %123, %120, %117, %110, %104, %96, %92, %88, %84, %80, %76, %69, %65, %62
  %.pr = load i32, ptr %1, align 4, !tbaa !13
  br label %175

175:                                              ; preds = %thread-pre-split, %32
  %176 = phi i32 [ %.pr, %thread-pre-split ], [ %61, %32 ]
  %177 = icmp slt i32 %176, 26
  br i1 %177, label %32, label %178, !llvm.loop !17

178:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 }
attributes #5 = { nounwind allocsize(0) }

!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, !10, i64 8}
!6 = !{!"array", !7, i64 0, !10, i64 8, !10, i64 12}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !10, i64 12}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


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