; LLVM IR from DimitrisJim/leetcode_solutions :: C/Algorithms (1560)

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mostVisited(i32 noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca [2 x i32], align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca [2 x i32], align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.memset.p0.i64(ptr align 4 %11, i8 0, i64 8, i1 false)
  %32 = load ptr, ptr %7, align 8, !tbaa !9
  %33 = load i32, ptr %10, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds i32, ptr %32, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = icmp ne i32 %36, 1
  br i1 %37, label %38, label %118

38:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %39 = load ptr, ptr %7, align 8, !tbaa !9
  %40 = load i32, ptr %10, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds i32, ptr %39, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  store i32 %43, ptr %12, align 4, !tbaa !5
  br label %44

44:                                               ; preds = %64, %38
  %45 = load i32, ptr %10, align 4, !tbaa !5
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = sub nsw i32 %46, 1
  %48 = icmp slt i32 %45, %47
  br i1 %48, label %49, label %62

49:                                               ; preds = %44
  %50 = load ptr, ptr %7, align 8, !tbaa !9
  %51 = load i32, ptr %10, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i32, ptr %50, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = load ptr, ptr %7, align 8, !tbaa !9
  %56 = load i32, ptr %10, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i32, ptr %55, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = icmp slt i32 %54, %60
  br label %62

62:                                               ; preds = %49, %44
  %63 = phi i1 [ false, %44 ], [ %61, %49 ]
  br i1 %63, label %64, label %67

64:                                               ; preds = %62
  %65 = load i32, ptr %10, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %10, align 4, !tbaa !5
  br label %44, !llvm.loop !11

67:                                               ; preds = %62
  %68 = load i32, ptr %10, align 4, !tbaa !5
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = sub nsw i32 %69, 1
  %71 = icmp eq i32 %68, %70
  br i1 %71, label %72, label %110

72:                                               ; preds = %67
  %73 = load ptr, ptr %7, align 8, !tbaa !9
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %73, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = load i32, ptr %12, align 4, !tbaa !5
  %79 = sub nsw i32 %77, %78
  %80 = add nsw i32 %79, 1
  %81 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %80, ptr %81, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %82 = load ptr, ptr %9, align 8, !tbaa !9
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = mul i64 %84, 4
  %86 = call noalias ptr @malloc(i64 noundef %85) #7
  store ptr %86, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %87 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %87, ptr %14, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %105, %72
  %89 = load i32, ptr %14, align 4, !tbaa !5
  %90 = load ptr, ptr %7, align 8, !tbaa !9
  %91 = load i32, ptr %10, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds i32, ptr %90, i64 %92
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = icmp sle i32 %89, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %108

97:                                               ; preds = %88
  %98 = load i32, ptr %14, align 4, !tbaa !5
  %99 = load ptr, ptr %13, align 8, !tbaa !9
  %100 = load i32, ptr %14, align 4, !tbaa !5
  %101 = load i32, ptr %12, align 4, !tbaa !5
  %102 = sub nsw i32 %100, %101
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds i32, ptr %99, i64 %103
  store i32 %98, ptr %104, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %97
  %106 = load i32, ptr %14, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %14, align 4, !tbaa !5
  br label %88, !llvm.loop !13

108:                                              ; preds = %96
  %109 = load ptr, ptr %13, align 8, !tbaa !9
  store ptr %109, ptr %5, align 8
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %115

110:                                              ; preds = %67
  %111 = load i32, ptr %12, align 4, !tbaa !5
  %112 = getelementptr inbounds [2 x i32], ptr %11, i64 0, i64 0
  store i32 %111, ptr %112, align 4, !tbaa !5
  %113 = load i32, ptr %6, align 4, !tbaa !5
  %114 = getelementptr inbounds [2 x i32], ptr %11, i64 0, i64 1
  store i32 %113, ptr %114, align 4, !tbaa !5
  store i32 0, ptr %15, align 4
  br label %115

115:                                              ; preds = %110, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %116 = load i32, ptr %15, align 4
  switch i32 %116, label %254 [
    i32 0, label %117
  ]

117:                                              ; preds = %115
  br label %118

118:                                              ; preds = %117, %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  store i32 1, ptr %16, align 4, !tbaa !5
  %119 = getelementptr inbounds i32, ptr %16, i64 1
  %120 = load ptr, ptr %7, align 8, !tbaa !9
  %121 = load i32, ptr %8, align 4, !tbaa !5
  %122 = sub nsw i32 %121, 1
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds i32, ptr %120, i64 %123
  %125 = load i32, ptr %124, align 4, !tbaa !5
  store i32 %125, ptr %119, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = call noalias ptr @calloc(i64 noundef %127, i64 noundef 4) #8
  store ptr %128, ptr %17, align 8, !tbaa !9
  %129 = getelementptr inbounds [2 x i32], ptr %11, i64 0, i64 0
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %155

132:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %133 = getelementptr inbounds [2 x i32], ptr %11, i64 0, i64 0
  %134 = load i32, ptr %133, align 4, !tbaa !5
  store i32 %134, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %135 = getelementptr inbounds [2 x i32], ptr %11, i64 0, i64 1
  %136 = load i32, ptr %135, align 4, !tbaa !5
  store i32 %136, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %137 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %137, ptr %20, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %151, %132
  %139 = load i32, ptr %20, align 4, !tbaa !5
  %140 = load i32, ptr %19, align 4, !tbaa !5
  %141 = icmp sle i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 7, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %154

143:                                              ; preds = %138
  %144 = load ptr, ptr %17, align 8, !tbaa !9
  %145 = load i32, ptr %20, align 4, !tbaa !5
  %146 = sub nsw i32 %145, 1
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds i32, ptr %144, i64 %147
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = add nsw i32 %149, 1
  store i32 %150, ptr %148, align 4, !tbaa !5
  br label %151

151:                                              ; preds = %143
  %152 = load i32, ptr %20, align 4, !tbaa !5
  %153 = add nsw i32 %152, 1
  store i32 %153, ptr %20, align 4, !tbaa !5
  br label %138, !llvm.loop !14

154:                                              ; preds = %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %155

155:                                              ; preds = %154, %118
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %156 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 0
  %157 = load i32, ptr %156, align 4, !tbaa !5
  store i32 %157, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %158 = getelementptr inbounds [2 x i32], ptr %16, i64 0, i64 1
  %159 = load i32, ptr %158, align 4, !tbaa !5
  store i32 %159, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %160 = load i32, ptr %21, align 4, !tbaa !5
  store i32 %160, ptr %23, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %174, %155
  %162 = load i32, ptr %23, align 4, !tbaa !5
  %163 = load i32, ptr %22, align 4, !tbaa !5
  %164 = icmp sle i32 %162, %163
  br i1 %164, label %166, label %165

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

166:                                              ; preds = %161
  %167 = load ptr, ptr %17, align 8, !tbaa !9
  %168 = load i32, ptr %23, align 4, !tbaa !5
  %169 = sub nsw i32 %168, 1
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds i32, ptr %167, i64 %170
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %171, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %166
  %175 = load i32, ptr %23, align 4, !tbaa !5
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %23, align 4, !tbaa !5
  br label %161, !llvm.loop !15

177:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  store i32 0, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  store i32 0, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 0, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %195, %177
  %179 = load i32, ptr %27, align 4, !tbaa !5
  %180 = load i32, ptr %6, align 4, !tbaa !5
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %178
  store i32 13, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %198

183:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %184 = load ptr, ptr %17, align 8, !tbaa !9
  %185 = load i32, ptr %27, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds i32, ptr %184, i64 %186
  %188 = load i32, ptr %187, align 4, !tbaa !5
  store i32 %188, ptr %28, align 4, !tbaa !5
  %189 = load i32, ptr %28, align 4, !tbaa !5
  %190 = load i32, ptr %24, align 4, !tbaa !5
  %191 = icmp sge i32 %189, %190
  br i1 %191, label %192, label %194

192:                                              ; preds = %183
  %193 = load i32, ptr %28, align 4, !tbaa !5
  store i32 %193, ptr %24, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %192, %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %27, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %27, align 4, !tbaa !5
  br label %178, !llvm.loop !16

198:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %216, %198
  %200 = load i32, ptr %29, align 4, !tbaa !5
  %201 = load i32, ptr %6, align 4, !tbaa !5
  %202 = icmp slt i32 %200, %201
  br i1 %202, label %204, label %203

203:                                              ; preds = %199
  store i32 16, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %219

204:                                              ; preds = %199
  %205 = load ptr, ptr %17, align 8, !tbaa !9
  %206 = load i32, ptr %29, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds i32, ptr %205, i64 %207
  %209 = load i32, ptr %208, align 4, !tbaa !5
  %210 = load i32, ptr %24, align 4, !tbaa !5
  %211 = icmp eq i32 %209, %210
  br i1 %211, label %212, label %215

212:                                              ; preds = %204
  %213 = load i32, ptr %25, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %25, align 4, !tbaa !5
  br label %215

215:                                              ; preds = %212, %204
  br label %216

216:                                              ; preds = %215
  %217 = load i32, ptr %29, align 4, !tbaa !5
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %29, align 4, !tbaa !5
  br label %199, !llvm.loop !17

219:                                              ; preds = %203
  %220 = load i32, ptr %25, align 4, !tbaa !5
  %221 = load ptr, ptr %9, align 8, !tbaa !9
  store i32 %220, ptr %221, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %222 = load i32, ptr %25, align 4, !tbaa !5
  %223 = sext i32 %222 to i64
  %224 = mul i64 %223, 4
  %225 = call noalias ptr @malloc(i64 noundef %224) #7
  store ptr %225, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %226

226:                                              ; preds = %248, %219
  %227 = load i32, ptr %31, align 4, !tbaa !5
  %228 = load i32, ptr %6, align 4, !tbaa !5
  %229 = icmp slt i32 %227, %228
  br i1 %229, label %231, label %230

230:                                              ; preds = %226
  store i32 19, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %251

231:                                              ; preds = %226
  %232 = load ptr, ptr %17, align 8, !tbaa !9
  %233 = load i32, ptr %31, align 4, !tbaa !5
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds i32, ptr %232, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = load i32, ptr %24, align 4, !tbaa !5
  %238 = icmp eq i32 %236, %237
  br i1 %238, label %239, label %247

239:                                              ; preds = %231
  %240 = load i32, ptr %31, align 4, !tbaa !5
  %241 = add nsw i32 %240, 1
  %242 = load ptr, ptr %30, align 8, !tbaa !9
  %243 = load i32, ptr %26, align 4, !tbaa !5
  %244 = add nsw i32 %243, 1
  store i32 %244, ptr %26, align 4, !tbaa !5
  %245 = sext i32 %243 to i64
  %246 = getelementptr inbounds i32, ptr %242, i64 %245
  store i32 %241, ptr %246, align 4, !tbaa !5
  br label %247

247:                                              ; preds = %239, %231
  br label %248

248:                                              ; preds = %247
  %249 = load i32, ptr %31, align 4, !tbaa !5
  %250 = add nsw i32 %249, 1
  store i32 %250, ptr %31, align 4, !tbaa !5
  br label %226, !llvm.loop !18

251:                                              ; preds = %230
  %252 = load ptr, ptr %17, align 8, !tbaa !9
  call void @free(ptr noundef %252) #6
  %253 = load ptr, ptr %30, align 8, !tbaa !9
  store ptr %253, ptr %5, align 8
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %254

254:                                              ; preds = %251, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %255 = load ptr, ptr %5, align 8
  ret ptr %255
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 allocsize(0,1) "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 "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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { nounwind allocsize(0,1) }

!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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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}


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

; Function Attrs: nounwind uwtable
define dso_local noalias noundef ptr @mostVisited(i32 noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 {
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %.not = icmp eq i32 %5, 1
  br i1 %.not, label %.thread, label %.preheader107

.preheader107:                                    ; preds = %4
  %6 = add nsw i32 %2, -1
  %smax = tail call i32 @llvm.smax.i32(i32 %6, i32 0)
  %wide.trip.count = zext nneg i32 %smax to i64
  br label %7

7:                                                ; preds = %.preheader107, %9
  %8 = phi i32 [ %5, %.preheader107 ], [ %11, %9 ]
  %indvars.iv = phi i64 [ 0, %.preheader107 ], [ %indvars.iv.next, %9 ]
  %exitcond.not = icmp eq i64 %indvars.iv, %wide.trip.count
  br i1 %exitcond.not, label %.critedge, label %9

9:                                                ; preds = %7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %10 = getelementptr inbounds i32, ptr %1, i64 %indvars.iv.next
  %11 = load i32, ptr %10, align 4, !tbaa !5
  %12 = icmp slt i32 %8, %11
  br i1 %12, label %7, label %.critedge.split.loop.exit164, !llvm.loop !9

.critedge.split.loop.exit164:                     ; preds = %9
  %13 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge:                                        ; preds = %7, %.critedge.split.loop.exit164
  %.080.lcssa = phi i32 [ %13, %.critedge.split.loop.exit164 ], [ %smax, %7 ]
  %.not96 = icmp eq i32 %.080.lcssa, %6
  br i1 %.not96, label %14, label %.thread

14:                                               ; preds = %.critedge
  %15 = zext nneg i32 %6 to i64
  %16 = getelementptr inbounds i32, ptr %1, i64 %15
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = sub nsw i32 %17, %5
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %3, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = shl nsw i64 %20, 2
  %22 = tail call noalias ptr @malloc(i64 noundef %21) #5
  %23 = load i32, ptr %16, align 4, !tbaa !5
  %.not95108 = icmp sgt i32 %5, %23
  br i1 %.not95108, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %14
  %24 = sext i32 %5 to i64
  %25 = add i32 %23, 1
  %26 = sub i32 %23, %5
  %27 = zext i32 %26 to i64
  %28 = add nuw nsw i64 %27, 1
  %min.iters.check = icmp ult i32 %26, 7
  br i1 %min.iters.check, label %.lr.ph.preheader235, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %28, 8589934584
  %ind.end = add nsw i64 %n.vec, %24
  %.splatinsert = insertelement <4 x i32> poison, i32 %5, i64 0
  %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %induction = add <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %29 = getelementptr inbounds i32, ptr %22, i64 %index
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  store <4 x i32> %vec.ind, ptr %29, align 4, !tbaa !5
  store <4 x i32> %step.add, ptr %30, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %31 = icmp eq i64 %index.next, %n.vec
  br i1 %31, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %28, %n.vec
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader235

.lr.ph.preheader235:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv133.ph = phi i64 [ %24, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader235, %.lr.ph
  %indvars.iv133 = phi i64 [ %indvars.iv.next134, %.lr.ph ], [ %indvars.iv133.ph, %.lr.ph.preheader235 ]
  %32 = sub nsw i64 %indvars.iv133, %24
  %33 = getelementptr inbounds i32, ptr %22, i64 %32
  %34 = trunc nsw i64 %indvars.iv133 to i32
  store i32 %34, ptr %33, align 4, !tbaa !5
  %indvars.iv.next134 = add nsw i64 %indvars.iv133, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next134 to i32
  %exitcond136.not = icmp eq i32 %25, %lftr.wideiv
  br i1 %exitcond136.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

.thread:                                          ; preds = %.critedge, %4
  %.sroa.6.1 = phi i32 [ 0, %4 ], [ %0, %.critedge ]
  %.sroa.047.1 = phi i32 [ 0, %4 ], [ %5, %.critedge ]
  %35 = sext i32 %2 to i64
  %36 = getelementptr i32, ptr %1, i64 %35
  %37 = getelementptr i8, ptr %36, i64 -4
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = sext i32 %0 to i64
  %40 = tail call noalias ptr @calloc(i64 noundef %39, i64 noundef 4) #6
  %.not97 = icmp eq i32 %.sroa.047.1, 0
  br i1 %.not97, label %.loopexit, label %.preheader106

.preheader106:                                    ; preds = %.thread
  %invariant.gep = getelementptr i8, ptr %40, i64 -4
  %.not98110 = icmp sgt i32 %.sroa.047.1, %.sroa.6.1
  br i1 %.not98110, label %.loopexit, label %.lr.ph112.preheader

.lr.ph112.preheader:                              ; preds = %.preheader106
  %41 = sext i32 %.sroa.047.1 to i64
  %42 = add i32 %.sroa.6.1, 1
  %43 = sub i32 %.sroa.6.1, %.sroa.047.1
  %44 = zext i32 %43 to i64
  %45 = add nuw nsw i64 %44, 1
  %min.iters.check170 = icmp ult i32 %43, 7
  br i1 %min.iters.check170, label %.lr.ph112.preheader234, label %vector.ph171

vector.ph171:                                     ; preds = %.lr.ph112.preheader
  %n.vec173 = and i64 %45, 8589934584
  %ind.end174 = add nsw i64 %n.vec173, %41
  %invariant.gep243 = getelementptr i32, ptr %invariant.gep, i64 %41
  br label %vector.body176

vector.body176:                                   ; preds = %vector.body176, %vector.ph171
  %index177 = phi i64 [ 0, %vector.ph171 ], [ %index.next180, %vector.body176 ]
  %gep244 = getelementptr i32, ptr %invariant.gep243, i64 %index177
  %46 = getelementptr i8, ptr %gep244, i64 16
  %wide.load = load <4 x i32>, ptr %gep244, align 4, !tbaa !5
  %wide.load179 = load <4 x i32>, ptr %46, align 4, !tbaa !5
  %47 = add nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1>
  %48 = add nsw <4 x i32> %wide.load179, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %47, ptr %gep244, align 4, !tbaa !5
  store <4 x i32> %48, ptr %46, align 4, !tbaa !5
  %index.next180 = add nuw i64 %index177, 8
  %49 = icmp eq i64 %index.next180, %n.vec173
  br i1 %49, label %middle.block168, label %vector.body176, !llvm.loop !15

middle.block168:                                  ; preds = %vector.body176
  %cmp.n181 = icmp eq i64 %45, %n.vec173
  br i1 %cmp.n181, label %.loopexit, label %.lr.ph112.preheader234

.lr.ph112.preheader234:                           ; preds = %middle.block168, %.lr.ph112.preheader
  %indvars.iv137.ph = phi i64 [ %41, %.lr.ph112.preheader ], [ %ind.end174, %middle.block168 ]
  br label %.lr.ph112

.lr.ph112:                                        ; preds = %.lr.ph112.preheader234, %.lr.ph112
  %indvars.iv137 = phi i64 [ %indvars.iv.next138, %.lr.ph112 ], [ %indvars.iv137.ph, %.lr.ph112.preheader234 ]
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv137
  %50 = load i32, ptr %gep, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %gep, align 4, !tbaa !5
  %indvars.iv.next138 = add nsw i64 %indvars.iv137, 1
  %lftr.wideiv140 = trunc i64 %indvars.iv.next138 to i32
  %exitcond141.not = icmp eq i32 %42, %lftr.wideiv140
  br i1 %exitcond141.not, label %.loopexit, label %.lr.ph112, !llvm.loop !16

.loopexit:                                        ; preds = %.lr.ph112, %middle.block168, %.preheader106, %.thread
  %invariant.gep113 = getelementptr i8, ptr %40, i64 -4
  %.not99115 = icmp slt i32 %38, 1
  br i1 %.not99115, label %.preheader105, label %.lr.ph118.preheader

.lr.ph118.preheader:                              ; preds = %.loopexit
  %52 = add nuw i32 %38, 1
  %wide.trip.count145 = zext i32 %52 to i64
  %53 = zext nneg i32 %38 to i64
  %min.iters.check184 = icmp ult i32 %38, 8
  br i1 %min.iters.check184, label %.lr.ph118.preheader233, label %vector.ph185

.lr.ph118.preheader233:                           ; preds = %middle.block182, %.lr.ph118.preheader
  %indvars.iv142.ph = phi i64 [ 1, %.lr.ph118.preheader ], [ %ind.end188, %middle.block182 ]
  br label %.lr.ph118

vector.ph185:                                     ; preds = %.lr.ph118.preheader
  %n.vec187 = and i64 %53, 2147483640
  %ind.end188 = or disjoint i64 %n.vec187, 1
  br label %vector.body190

vector.body190:                                   ; preds = %vector.body190, %vector.ph185
  %index191 = phi i64 [ 0, %vector.ph185 ], [ %index.next195, %vector.body190 ]
  %54 = getelementptr i32, ptr %40, i64 %index191
  %55 = getelementptr i8, ptr %54, i64 16
  %wide.load193 = load <4 x i32>, ptr %54, align 4, !tbaa !5
  %wide.load194 = load <4 x i32>, ptr %55, align 4, !tbaa !5
  %56 = add nsw <4 x i32> %wide.load193, <i32 1, i32 1, i32 1, i32 1>
  %57 = add nsw <4 x i32> %wide.load194, <i32 1, i32 1, i32 1, i32 1>
  store <4 x i32> %56, ptr %54, align 4, !tbaa !5
  store <4 x i32> %57, ptr %55, align 4, !tbaa !5
  %index.next195 = add nuw i64 %index191, 8
  %58 = icmp eq i64 %index.next195, %n.vec187
  br i1 %58, label %middle.block182, label %vector.body190, !llvm.loop !17

middle.block182:                                  ; preds = %vector.body190
  %cmp.n196 = icmp eq i64 %n.vec187, %53
  br i1 %cmp.n196, label %.preheader105, label %.lr.ph118.preheader233

.preheader105:                                    ; preds = %.lr.ph118, %middle.block182, %.loopexit
  %59 = icmp sgt i32 %0, 0
  br i1 %59, label %.lr.ph121.preheader, label %._crit_edge125

.lr.ph121.preheader:                              ; preds = %.preheader105
  %wide.trip.count150 = zext nneg i32 %0 to i64
  %min.iters.check199 = icmp ult i32 %0, 8
  br i1 %min.iters.check199, label %.lr.ph121.preheader229, label %vector.ph200

.lr.ph121.preheader229:                           ; preds = %middle.block197, %.lr.ph121.preheader
  %indvars.iv147.ph = phi i64 [ 0, %.lr.ph121.preheader ], [ %n.vec202, %middle.block197 ]
  %.086119.ph = phi i32 [ 0, %.lr.ph121.preheader ], [ %65, %middle.block197 ]
  br label %.lr.ph121

vector.ph200:                                     ; preds = %.lr.ph121.preheader
  %n.vec202 = and i64 %wide.trip.count150, 2147483640
  br label %vector.body204

vector.body204:                                   ; preds = %vector.body204, %vector.ph200
  %index205 = phi i64 [ 0, %vector.ph200 ], [ %index.next209, %vector.body204 ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph200 ], [ %62, %vector.body204 ]
  %vec.phi206 = phi <4 x i32> [ zeroinitializer, %vector.ph200 ], [ %63, %vector.body204 ]
  %60 = getelementptr inbounds i32, ptr %40, i64 %index205
  %61 = getelementptr inbounds i8, ptr %60, i64 16
  %wide.load207 = load <4 x i32>, ptr %60, align 4, !tbaa !5
  %wide.load208 = load <4 x i32>, ptr %61, align 4, !tbaa !5
  %62 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load207, <4 x i32> %vec.phi)
  %63 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load208, <4 x i32> %vec.phi206)
  %index.next209 = add nuw i64 %index205, 8
  %64 = icmp eq i64 %index.next209, %n.vec202
  br i1 %64, label %middle.block197, label %vector.body204, !llvm.loop !18

middle.block197:                                  ; preds = %vector.body204
  %rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %62, <4 x i32> %63)
  %65 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax)
  %cmp.n210 = icmp eq i64 %n.vec202, %wide.trip.count150
  br i1 %cmp.n210, label %.preheader, label %.lr.ph121.preheader229

.lr.ph118:                                        ; preds = %.lr.ph118.preheader233, %.lr.ph118
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %.lr.ph118 ], [ %indvars.iv142.ph, %.lr.ph118.preheader233 ]
  %gep114 = getelementptr i32, ptr %invariant.gep113, i64 %indvars.iv142
  %66 = load i32, ptr %gep114, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %gep114, align 4, !tbaa !5
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %exitcond146.not = icmp eq i64 %indvars.iv.next143, %wide.trip.count145
  br i1 %exitcond146.not, label %.preheader105, label %.lr.ph118, !llvm.loop !19

.preheader:                                       ; preds = %.lr.ph121, %middle.block197
  %spec.select.lcssa = phi i32 [ %65, %middle.block197 ], [ %spec.select, %.lr.ph121 ]
  br i1 %59, label %.lr.ph124.preheader, label %._crit_edge125

.lr.ph124.preheader:                              ; preds = %.preheader
  %wide.trip.count155 = zext nneg i32 %0 to i64
  %min.iters.check213 = icmp ult i32 %0, 8
  br i1 %min.iters.check213, label %.lr.ph124.preheader227, label %vector.ph214

.lr.ph124.preheader227:                           ; preds = %middle.block211, %.lr.ph124.preheader
  %indvars.iv152.ph = phi i64 [ 0, %.lr.ph124.preheader ], [ %n.vec216, %middle.block211 ]
  %.084122.ph = phi i32 [ 0, %.lr.ph124.preheader ], [ %77, %middle.block211 ]
  br label %.lr.ph124

vector.ph214:                                     ; preds = %.lr.ph124.preheader
  %n.vec216 = and i64 %wide.trip.count150, 2147483640
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %spec.select.lcssa, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body218

vector.body218:                                   ; preds = %vector.body218, %vector.ph214
  %index219 = phi i64 [ 0, %vector.ph214 ], [ %index.next224, %vector.body218 ]
  %vec.phi220 = phi <4 x i32> [ zeroinitializer, %vector.ph214 ], [ %74, %vector.body218 ]
  %vec.phi221 = phi <4 x i32> [ zeroinitializer, %vector.ph214 ], [ %75, %vector.body218 ]
  %68 = getelementptr inbounds i32, ptr %40, i64 %index219
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  %wide.load222 = load <4 x i32>, ptr %68, align 4, !tbaa !5
  %wide.load223 = load <4 x i32>, ptr %69, align 4, !tbaa !5
  %70 = icmp eq <4 x i32> %wide.load222, %broadcast.splat
  %71 = icmp eq <4 x i32> %wide.load223, %broadcast.splat
  %72 = zext <4 x i1> %70 to <4 x i32>
  %73 = zext <4 x i1> %71 to <4 x i32>
  %74 = add <4 x i32> %vec.phi220, %72
  %75 = add <4 x i32> %vec.phi221, %73
  %index.next224 = add nuw i64 %index219, 8
  %76 = icmp eq i64 %index.next224, %n.vec216
  br i1 %76, label %middle.block211, label %vector.body218, !llvm.loop !20

middle.block211:                                  ; preds = %vector.body218
  %bin.rdx = add <4 x i32> %75, %74
  %77 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n225 = icmp eq i64 %n.vec216, %wide.trip.count150
  br i1 %cmp.n225, label %._crit_edge125, label %.lr.ph124.preheader227

.lr.ph121:                                        ; preds = %.lr.ph121.preheader229, %.lr.ph121
  %indvars.iv147 = phi i64 [ %indvars.iv.next148, %.lr.ph121 ], [ %indvars.iv147.ph, %.lr.ph121.preheader229 ]
  %.086119 = phi i32 [ %spec.select, %.lr.ph121 ], [ %.086119.ph, %.lr.ph121.preheader229 ]
  %78 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv147
  %79 = load i32, ptr %78, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.smax.i32(i32 %79, i32 %.086119)
  %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1
  %exitcond151.not = icmp eq i64 %indvars.iv.next148, %wide.trip.count150
  br i1 %exitcond151.not, label %.preheader, label %.lr.ph121, !llvm.loop !21

._crit_edge125:                                   ; preds = %.lr.ph124, %middle.block211, %.preheader105, %.preheader
  %.086.lcssa163 = phi i32 [ %spec.select.lcssa, %.preheader ], [ 0, %.preheader105 ], [ %spec.select.lcssa, %middle.block211 ], [ %spec.select.lcssa, %.lr.ph124 ]
  %.084.lcssa = phi i32 [ 0, %.preheader ], [ 0, %.preheader105 ], [ %77, %middle.block211 ], [ %spec.select101, %.lr.ph124 ]
  store i32 %.084.lcssa, ptr %3, align 4, !tbaa !5
  %80 = sext i32 %.084.lcssa to i64
  %81 = shl nsw i64 %80, 2
  %82 = tail call noalias ptr @malloc(i64 noundef %81) #5
  br i1 %59, label %.lr.ph130.preheader, label %._crit_edge131

.lr.ph130.preheader:                              ; preds = %._crit_edge125
  %wide.trip.count160 = zext nneg i32 %0 to i64
  %xtraiter = and i64 %wide.trip.count160, 1
  %83 = icmp eq i32 %0, 1
  br i1 %83, label %._crit_edge131.loopexit.unr-lcssa, label %.lr.ph130.preheader.new

.lr.ph130.preheader.new:                          ; preds = %.lr.ph130.preheader
  %unroll_iter = and i64 %wide.trip.count160, 2147483646
  br label %.lr.ph130

.lr.ph124:                                        ; preds = %.lr.ph124.preheader227, %.lr.ph124
  %indvars.iv152 = phi i64 [ %indvars.iv.next153, %.lr.ph124 ], [ %indvars.iv152.ph, %.lr.ph124.preheader227 ]
  %.084122 = phi i32 [ %spec.select101, %.lr.ph124 ], [ %.084122.ph, %.lr.ph124.preheader227 ]
  %84 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv152
  %85 = load i32, ptr %84, align 4, !tbaa !5
  %86 = icmp eq i32 %85, %spec.select.lcssa
  %87 = zext i1 %86 to i32
  %spec.select101 = add nuw nsw i32 %.084122, %87
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %exitcond156.not = icmp eq i64 %indvars.iv.next153, %wide.trip.count155
  br i1 %exitcond156.not, label %._crit_edge125, label %.lr.ph124, !llvm.loop !22

._crit_edge131.loopexit.unr-lcssa.loopexit:       ; preds = %.lr.ph130._crit_edge.1
  %88 = sext i32 %.183.1 to i64
  br label %._crit_edge131.loopexit.unr-lcssa

._crit_edge131.loopexit.unr-lcssa:                ; preds = %._crit_edge131.loopexit.unr-lcssa.loopexit, %.lr.ph130.preheader
  %indvars.iv157.unr = phi i64 [ 0, %.lr.ph130.preheader ], [ %108, %._crit_edge131.loopexit.unr-lcssa.loopexit ]
  %.082127.unr = phi i64 [ 0, %.lr.ph130.preheader ], [ %88, %._crit_edge131.loopexit.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge131, label %.lr.ph130.epil

.lr.ph130.epil:                                   ; preds = %._crit_edge131.loopexit.unr-lcssa
  %89 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv157.unr
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = icmp eq i32 %90, %.086.lcssa163
  br i1 %91, label %92, label %._crit_edge131

92:                                               ; preds = %.lr.ph130.epil
  %93 = getelementptr inbounds i32, ptr %82, i64 %.082127.unr
  %94 = trunc i64 %indvars.iv157.unr to i32
  %95 = add i32 %94, 1
  store i32 %95, ptr %93, align 4, !tbaa !5
  br label %._crit_edge131

._crit_edge131:                                   ; preds = %._crit_edge131.loopexit.unr-lcssa, %92, %.lr.ph130.epil, %._crit_edge125
  tail call void @free(ptr noundef %40) #7
  br label %._crit_edge

.lr.ph130:                                        ; preds = %.lr.ph130._crit_edge.1, %.lr.ph130.preheader.new
  %indvars.iv157 = phi i64 [ 0, %.lr.ph130.preheader.new ], [ %108, %.lr.ph130._crit_edge.1 ]
  %.082127 = phi i32 [ 0, %.lr.ph130.preheader.new ], [ %.183.1, %.lr.ph130._crit_edge.1 ]
  %niter = phi i64 [ 0, %.lr.ph130.preheader.new ], [ %niter.next.1, %.lr.ph130._crit_edge.1 ]
  %96 = getelementptr inbounds i32, ptr %40, i64 %indvars.iv157
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = icmp eq i32 %97, %.086.lcssa163
  %99 = or disjoint i64 %indvars.iv157, 1
  br i1 %98, label %100, label %.lr.ph130._crit_edge

100:                                              ; preds = %.lr.ph130
  %101 = add nsw i32 %.082127, 1
  %102 = sext i32 %.082127 to i64
  %103 = getelementptr inbounds i32, ptr %82, i64 %102
  %104 = trunc nuw nsw i64 %99 to i32
  store i32 %104, ptr %103, align 4, !tbaa !5
  br label %.lr.ph130._crit_edge

.lr.ph130._crit_edge:                             ; preds = %.lr.ph130, %100
  %.183 = phi i32 [ %101, %100 ], [ %.082127, %.lr.ph130 ]
  %105 = getelementptr inbounds i32, ptr %40, i64 %99
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = icmp eq i32 %106, %.086.lcssa163
  %108 = add nuw nsw i64 %indvars.iv157, 2
  br i1 %107, label %109, label %.lr.ph130._crit_edge.1

109:                                              ; preds = %.lr.ph130._crit_edge
  %110 = add nsw i32 %.183, 1
  %111 = sext i32 %.183 to i64
  %112 = getelementptr inbounds i32, ptr %82, i64 %111
  %113 = trunc nuw nsw i64 %108 to i32
  store i32 %113, ptr %112, align 4, !tbaa !5
  br label %.lr.ph130._crit_edge.1

.lr.ph130._crit_edge.1:                           ; preds = %109, %.lr.ph130._crit_edge
  %.183.1 = phi i32 [ %110, %109 ], [ %.183, %.lr.ph130._crit_edge ]
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge131.loopexit.unr-lcssa.loopexit, label %.lr.ph130, !llvm.loop !23

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %14, %._crit_edge131
  %.1 = phi ptr [ %82, %._crit_edge131 ], [ %22, %14 ], [ %22, %middle.block ], [ %22, %.lr.ph ]
  ret ptr %.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 #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4

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 = { 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 #2 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) 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 #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind allocsize(0) }
attributes #6 = { nounwind allocsize(0,1) }
attributes #7 = { 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, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10, !13, !12}
!15 = distinct !{!15, !10, !12, !13}
!16 = distinct !{!16, !10, !13, !12}
!17 = distinct !{!17, !10, !12, !13}
!18 = distinct !{!18, !10, !12, !13}
!19 = distinct !{!19, !10, !13, !12}
!20 = distinct !{!20, !10, !12, !13}
!21 = distinct !{!21, !10, !13, !12}
!22 = distinct !{!22, !10, !13, !12}
!23 = distinct !{!23, !10}


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