; LLVM IR from intel/intel-ipsec-mb :: test/kat-app (main)

; 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.imb_test = type { ptr, ptr, i32 }
%struct.IMB_MGR = type { i64, i64, [4 x i64], [7 x i8], i8, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, [256 x %struct.IMB_JOB], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.IMB_JOB = type { ptr, ptr, i64, %union.anon, %union.anon.0, %union.anon.1, %union.anon.2, i64, %union.anon.3, ptr, i64, ptr, i64, %union.anon.4, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, %union.anon.5, [2 x i32], i32 }
%union.anon = type { ptr }
%union.anon.0 = type { ptr }
%union.anon.1 = type { i64 }
%union.anon.2 = type { i64 }
%union.anon.3 = type { i64 }
%union.anon.4 = type { %struct._AES_XCBC_specific_fields }
%struct._AES_XCBC_specific_fields = type { ptr, ptr, ptr }
%union.anon.5 = type { %struct._CBCS_specific_fields }
%struct._CBCS_specific_fields = type { ptr }

@tests = external dso_local global [46 x %struct.imb_test], align 16
@.str.46 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [8 x i8], align 1
@quiet_mode = external global i32, align 4
@.str.51 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [20 x i8], align 1
@self_test_corrupt = external hidden global i32, align 4
@.str.53 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca [5 x i8], align 1
  %7 = alloca [5 x i8], align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 5, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 5, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !5
  %22 = getelementptr inbounds [5 x i8], ptr %7, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 1 %22, i8 -1, i64 5, i1 false)
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %161, %2
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = load i32, ptr %4, align 4, !tbaa !5
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %27, label %164

27:                                               ; preds = %23
  %28 = load ptr, ptr %5, align 8, !tbaa !9
  %29 = load i32, ptr %8, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds ptr, ptr %28, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !9
  %33 = call i32 @strcmp(ptr noundef %32, ptr noundef @.str.46) #6
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %43, label %35

35:                                               ; preds = %27
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = load i32, ptr %8, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds ptr, ptr %36, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = call i32 @strcmp(ptr noundef %40, ptr noundef @.str.47) #6
  %42 = icmp eq i32 %41, 0
  br i1 %42, label %43, label %47

43:                                               ; preds = %35, %27
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 0
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  call void @usage(ptr noundef %46)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %354

47:                                               ; preds = %35
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds ptr, ptr %48, i64 %50
  %52 = load ptr, ptr %51, align 8, !tbaa !9
  %53 = getelementptr inbounds [5 x i8], ptr %7, i64 0, i64 0
  %54 = call i32 @update_flags_and_archs(ptr noundef %52, ptr noundef %53, ptr noundef %12)
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %47
  br label %161

57:                                               ; preds = %47
  %58 = load ptr, ptr %5, align 8, !tbaa !9
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = call i32 @strcmp(ptr noundef %62, ptr noundef @.str.48) #6
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %67

65:                                               ; preds = %57
  %66 = load i32, ptr %10, align 4, !tbaa !5
  br label %158

67:                                               ; preds = %57
  %68 = load ptr, ptr %5, align 8, !tbaa !9
  %69 = load i32, ptr %8, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds ptr, ptr %68, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = call i32 @strcmp(ptr noundef %72, ptr noundef @.str.49) #6
  %74 = icmp eq i32 %73, 0
  br i1 %74, label %75, label %76

75:                                               ; preds = %67
  store i32 1, ptr %14, align 4, !tbaa !5
  br label %157

76:                                               ; preds = %67
  %77 = load ptr, ptr %5, align 8, !tbaa !9
  %78 = load i32, ptr %8, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  %82 = call i32 @strcmp(ptr noundef %81, ptr noundef @.str.50) #6
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %84, label %85

84:                                               ; preds = %76
  store i32 1, ptr @quiet_mode, align 4, !tbaa !5
  br label %156

85:                                               ; preds = %76
  %86 = load ptr, ptr %5, align 8, !tbaa !9
  %87 = load i32, ptr %8, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds ptr, ptr %86, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = call i32 @strcmp(ptr noundef %90, ptr noundef @.str.51) #6
  %92 = icmp eq i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %85
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %155

94:                                               ; preds = %85
  %95 = load ptr, ptr %5, align 8, !tbaa !9
  %96 = load i32, ptr %8, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds ptr, ptr %95, i64 %97
  %99 = load ptr, ptr %98, align 8, !tbaa !9
  %100 = call i32 @strcmp(ptr noundef %99, ptr noundef @.str.52) #6
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %102, label %103

102:                                              ; preds = %94
  store i32 1, ptr @self_test_corrupt, align 4, !tbaa !5
  br label %154

103:                                              ; preds = %94
  %104 = load ptr, ptr %5, align 8, !tbaa !9
  %105 = load i32, ptr %8, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds ptr, ptr %104, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = call i32 @strcmp(ptr noundef %108, ptr noundef @.str.53) #6
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %153

111:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %112 = load ptr, ptr %5, align 8, !tbaa !9
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds ptr, ptr %112, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  %117 = load ptr, ptr %5, align 8, !tbaa !9
  %118 = load i32, ptr %8, align 4, !tbaa !5
  %119 = add nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %117, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !9
  %123 = call i32 @check_test_string_arg(ptr noundef %116, ptr noundef %122)
  store i32 %123, ptr %16, align 4, !tbaa !5
  %124 = load i32, ptr %16, align 4, !tbaa !5
  %125 = zext i32 %124 to i64
  %126 = icmp eq i64 %125, 46
  br i1 %126, label %127, label %128

127:                                              ; preds = %111
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %150

128:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %143, %128
  %130 = load i32, ptr %17, align 4, !tbaa !5
  %131 = zext i32 %130 to i64
  %132 = icmp ult i64 %131, 46
  br i1 %132, label %133, label %146

133:                                              ; preds = %129
  %134 = load i32, ptr %17, align 4, !tbaa !5
  %135 = load i32, ptr %16, align 4, !tbaa !5
  %136 = icmp ne i32 %134, %135
  br i1 %136, label %137, label %142

137:                                              ; preds = %133
  %138 = load i32, ptr %17, align 4, !tbaa !5
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds [46 x %struct.imb_test], ptr @tests, i64 0, i64 %139
  %141 = getelementptr inbounds %struct.imb_test, ptr %140, i32 0, i32 2
  store i32 0, ptr %141, align 8, !tbaa !13
  br label %142

142:                                              ; preds = %137, %133
  br label %143

143:                                              ; preds = %142
  %144 = load i32, ptr %17, align 4, !tbaa !5
  %145 = add i32 %144, 1
  store i32 %145, ptr %17, align 4, !tbaa !5
  br label %129, !llvm.loop !15

146:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %147

147:                                              ; preds = %146
  %148 = load i32, ptr %8, align 4, !tbaa !5
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %8, align 4, !tbaa !5
  store i32 0, ptr %15, align 4
  br label %150

150:                                              ; preds = %147, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %151 = load i32, ptr %15, align 4
  switch i32 %151, label %354 [
    i32 0, label %152
  ]

152:                                              ; preds = %150
  br label %153

153:                                              ; preds = %152, %103
  br label %154

154:                                              ; preds = %153, %102
  br label %155

155:                                              ; preds = %154, %93
  br label %156

156:                                              ; preds = %155, %84
  br label %157

157:                                              ; preds = %156, %75
  br label %158

158:                                              ; preds = %157, %65
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  br label %161

161:                                              ; preds = %160, %56
  %162 = load i32, ptr %8, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %8, align 4, !tbaa !5
  br label %23, !llvm.loop !17

164:                                              ; preds = %23
  %165 = call i32 @imb_get_version()
  %166 = icmp ult i32 %165, 12800
  br i1 %166, label %167, label %169

167:                                              ; preds = %164
  %168 = call i32 (ptr, ...) @printf(ptr noundef @.str.54)
  br label %173

169:                                              ; preds = %164
  %170 = call ptr @imb_get_version_str()
  %171 = call i32 (ptr, ...) @printf(ptr noundef @.str.55, ptr noundef %170)
  %172 = call i32 (ptr, ...) @printf(ptr noundef @.str.56, ptr noundef @.str.57)
  br label %173

173:                                              ; preds = %169, %167
  %174 = call i32 @imb_get_version()
  %175 = icmp ule i32 %174, 66560
  br i1 %175, label %176, label %181

176:                                              ; preds = %173
  %177 = load i32, ptr %11, align 4, !tbaa !5
  %178 = icmp ne i32 %177, 0
  br i1 %178, label %179, label %181

179:                                              ; preds = %176
  %180 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %354

181:                                              ; preds = %176, %173
  %182 = call i32 @imb_get_version()
  %183 = icmp ule i32 %182, 66560
  br i1 %183, label %184, label %189

184:                                              ; preds = %181
  %185 = load i32, ptr @self_test_corrupt, align 4, !tbaa !5
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %189

187:                                              ; preds = %184
  %188 = call i32 (ptr, ...) @printf(ptr noundef @.str.59)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %354

189:                                              ; preds = %184, %181
  call void @print_hw_features()
  %190 = getelementptr inbounds [5 x i8], ptr %6, i64 0, i64 0
  %191 = call i32 @detect_arch(ptr noundef %190)
  %192 = icmp slt i32 %191, 0
  br i1 %192, label %193, label %194

193:                                              ; preds = %189
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %354

194:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %195

195:                                              ; preds = %216, %194
  %196 = load i32, ptr %18, align 4, !tbaa !5
  %197 = zext i32 %196 to i64
  %198 = icmp ult i64 %197, 5
  br i1 %198, label %200, label %199

199:                                              ; preds = %195
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %219

200:                                              ; preds = %195
  %201 = load i32, ptr %18, align 4, !tbaa !5
  %202 = zext i32 %201 to i64
  %203 = getelementptr inbounds [5 x i8], ptr %6, i64 0, i64 %202
  %204 = load i8, ptr %203, align 1, !tbaa !18
  %205 = zext i8 %204 to i32
  %206 = load i32, ptr %18, align 4, !tbaa !5
  %207 = zext i32 %206 to i64
  %208 = getelementptr inbounds [5 x i8], ptr %7, i64 0, i64 %207
  %209 = load i8, ptr %208, align 1, !tbaa !18
  %210 = zext i8 %209 to i32
  %211 = and i32 %205, %210
  %212 = trunc i32 %211 to i8
  %213 = load i32, ptr %18, align 4, !tbaa !5
  %214 = zext i32 %213 to i64
  %215 = getelementptr inbounds [5 x i8], ptr %6, i64 0, i64 %214
  store i8 %212, ptr %215, align 1, !tbaa !18
  br label %216

216:                                              ; preds = %200
  %217 = load i32, ptr %18, align 4, !tbaa !5
  %218 = add i32 %217, 1
  store i32 %218, ptr %18, align 4, !tbaa !5
  br label %195, !llvm.loop !19

219:                                              ; preds = %199
  store i32 1, ptr %9, align 4, !tbaa !5
  br label %220

220:                                              ; preds = %344, %219
  %221 = load i32, ptr %9, align 4, !tbaa !5
  %222 = icmp slt i32 %221, 5
  br i1 %222, label %223, label %347

223:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store ptr null, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %224 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %224, ptr %21, align 8, !tbaa !11
  %225 = load i32, ptr %9, align 4, !tbaa !5
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [5 x i8], ptr %6, i64 0, i64 %226
  %228 = load i8, ptr %227, align 1, !tbaa !18
  %229 = icmp ne i8 %228, 0
  br i1 %229, label %231, label %230

230:                                              ; preds = %223
  store i32 13, ptr %15, align 4
  br label %341

231:                                              ; preds = %223
  %232 = load i64, ptr %21, align 8, !tbaa !11
  %233 = call ptr @alloc_mb_mgr(i64 noundef %232)
  store ptr %233, ptr %19, align 8, !tbaa !9
  %234 = load ptr, ptr %19, align 8, !tbaa !9
  %235 = icmp eq ptr %234, null
  br i1 %235, label %236, label %238

236:                                              ; preds = %231
  %237 = call i32 (ptr, ...) @printf(ptr noundef @.str.60)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %341

238:                                              ; preds = %231
  %239 = load i32, ptr %11, align 4, !tbaa !5
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %241, label %244

241:                                              ; preds = %238
  %242 = load ptr, ptr %19, align 8, !tbaa !9
  %243 = call i32 @imb_self_test_set_cb(ptr noundef %242, ptr noundef @self_test_cb, ptr noundef null)
  br label %244

244:                                              ; preds = %241, %238
  %245 = load i32, ptr %9, align 4, !tbaa !5
  switch i32 %245, label %254 [
    i32 1, label %246
    i32 2, label %248
    i32 3, label %250
    i32 4, label %252
  ]

246:                                              ; preds = %244
  %247 = load ptr, ptr %19, align 8, !tbaa !9
  call void @init_mb_mgr_sse(ptr noundef %247)
  br label %254

248:                                              ; preds = %244
  %249 = load ptr, ptr %19, align 8, !tbaa !9
  call void @init_mb_mgr_avx2(ptr noundef %249)
  br label %254

250:                                              ; preds = %244
  %251 = load ptr, ptr %19, align 8, !tbaa !9
  call void @init_mb_mgr_avx512(ptr noundef %251)
  br label %254

252:                                              ; preds = %244
  %253 = load ptr, ptr %19, align 8, !tbaa !9
  call void @init_mb_mgr_avx10(ptr noundef %253)
  br label %254

254:                                              ; preds = %252, %250, %248, %246, %244
  %255 = load ptr, ptr %19, align 8, !tbaa !9
  %256 = getelementptr inbounds %struct.IMB_MGR, ptr %255, i32 0, i32 1
  %257 = load i64, ptr %256, align 8, !tbaa !20
  %258 = and i64 %257, 524288
  %259 = icmp ne i64 %258, 0
  br i1 %259, label %260, label %289

260:                                              ; preds = %254
  %261 = load ptr, ptr %19, align 8, !tbaa !9
  %262 = getelementptr inbounds %struct.IMB_MGR, ptr %261, i32 0, i32 1
  %263 = load i64, ptr %262, align 8, !tbaa !20
  %264 = and i64 %263, 1048576
  %265 = icmp ne i64 %264, 0
  %266 = zext i1 %265 to i64
  %267 = select i1 %265, ptr @.str.62, ptr @.str.63
  %268 = call i32 (ptr, ...) @printf(ptr noundef @.str.61, ptr noundef %267)
  %269 = load i32, ptr @self_test_corrupt, align 4, !tbaa !5
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %271, label %288

271:                                              ; preds = %260
  %272 = load ptr, ptr %19, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.IMB_MGR, ptr %272, i32 0, i32 1
  %274 = load i64, ptr %273, align 8, !tbaa !20
  %275 = and i64 %274, 1048576
  %276 = icmp eq i64 %275, 0
  %277 = zext i1 %276 to i64
  %278 = select i1 %276, ptr @.str.65, ptr @.str.66
  %279 = call i32 (ptr, ...) @printf(ptr noundef @.str.64, ptr noundef %278)
  %280 = load ptr, ptr %19, align 8, !tbaa !9
  %281 = getelementptr inbounds %struct.IMB_MGR, ptr %280, i32 0, i32 1
  %282 = load i64, ptr %281, align 8, !tbaa !20
  %283 = and i64 %282, 1048576
  %284 = icmp ne i64 %283, 0
  br i1 %284, label %285, label %287

285:                                              ; preds = %271
  %286 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free_mb_mgr(ptr noundef %286)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %341

287:                                              ; preds = %271
  br label %288

288:                                              ; preds = %287, %260
  br label %291

289:                                              ; preds = %254
  %290 = call i32 (ptr, ...) @printf(ptr noundef @.str.67)
  br label %291

291:                                              ; preds = %289, %288
  %292 = load ptr, ptr %19, align 8, !tbaa !9
  %293 = call i32 @imb_get_errno(ptr noundef %292)
  %294 = icmp ne i32 %293, 0
  br i1 %294, label %295, label %301

295:                                              ; preds = %291
  %296 = load ptr, ptr %19, align 8, !tbaa !9
  %297 = call i32 @imb_get_errno(ptr noundef %296)
  %298 = call ptr @imb_get_strerror(i32 noundef %297)
  %299 = call i32 (ptr, ...) @printf(ptr noundef @.str.68, ptr noundef %298)
  %300 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free_mb_mgr(ptr noundef %300)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %341

301:                                              ; preds = %291
  %302 = load ptr, ptr %19, align 8, !tbaa !9
  %303 = getelementptr inbounds %struct.IMB_MGR, ptr %302, i32 0, i32 1
  %304 = load i64, ptr %303, align 8, !tbaa !20
  %305 = load i32, ptr %9, align 4, !tbaa !5
  call void @print_tested_arch(i64 noundef %304, i32 noundef %305)
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %306

306:                                              ; preds = %336, %301
  %307 = load i32, ptr %20, align 4, !tbaa !5
  %308 = zext i32 %307 to i64
  %309 = icmp ult i64 %308, 46
  br i1 %309, label %310, label %339

310:                                              ; preds = %306
  %311 = load i32, ptr %20, align 4, !tbaa !5
  %312 = zext i32 %311 to i64
  %313 = getelementptr inbounds [46 x %struct.imb_test], ptr @tests, i64 0, i64 %312
  %314 = getelementptr inbounds %struct.imb_test, ptr %313, i32 0, i32 2
  %315 = load i32, ptr %314, align 8, !tbaa !13
  %316 = icmp ne i32 %315, 0
  br i1 %316, label %317, label %335

317:                                              ; preds = %310
  %318 = load i32, ptr %20, align 4, !tbaa !5
  %319 = zext i32 %318 to i64
  %320 = getelementptr inbounds [46 x %struct.imb_test], ptr @tests, i64 0, i64 %319
  %321 = getelementptr inbounds %struct.imb_test, ptr %320, i32 0, i32 1
  %322 = load ptr, ptr %321, align 8, !tbaa !22
  %323 = load ptr, ptr %19, align 8, !tbaa !9
  %324 = call i32 %322(ptr noundef %323)
  %325 = load i32, ptr %13, align 4, !tbaa !5
  %326 = add nsw i32 %325, %324
  store i32 %326, ptr %13, align 4, !tbaa !5
  %327 = load i32, ptr %13, align 4, !tbaa !5
  %328 = icmp ne i32 %327, 0
  br i1 %328, label %329, label %334

329:                                              ; preds = %317
  %330 = load i32, ptr %14, align 4, !tbaa !5
  %331 = icmp ne i32 %330, 0
  br i1 %331, label %332, label %334

332:                                              ; preds = %329
  %333 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free_mb_mgr(ptr noundef %333)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %341

334:                                              ; preds = %329, %317
  br label %335

335:                                              ; preds = %334, %310
  br label %336

336:                                              ; preds = %335
  %337 = load i32, ptr %20, align 4, !tbaa !5
  %338 = add i32 %337, 1
  store i32 %338, ptr %20, align 4, !tbaa !5
  br label %306, !llvm.loop !23

339:                                              ; preds = %306
  %340 = load ptr, ptr %19, align 8, !tbaa !9
  call void @free_mb_mgr(ptr noundef %340)
  store i32 0, ptr %15, align 4
  br label %341

341:                                              ; preds = %339, %332, %295, %285, %236, %230
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %342 = load i32, ptr %15, align 4
  switch i32 %342, label %354 [
    i32 0, label %343
    i32 13, label %344
  ]

343:                                              ; preds = %341
  br label %344

344:                                              ; preds = %343, %341
  %345 = load i32, ptr %9, align 4, !tbaa !5
  %346 = add nsw i32 %345, 1
  store i32 %346, ptr %9, align 4, !tbaa !5
  br label %220, !llvm.loop !24

347:                                              ; preds = %220
  %348 = load i32, ptr %13, align 4, !tbaa !5
  %349 = icmp ne i32 %348, 0
  br i1 %349, label %350, label %352

350:                                              ; preds = %347
  %351 = call i32 (ptr, ...) @printf(ptr noundef @.str.69)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %354

352:                                              ; preds = %347
  %353 = call i32 (ptr, ...) @printf(ptr noundef @.str.70)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %354

354:                                              ; preds = %352, %350, %341, %193, %187, %179, %150, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 5, ptr %6) #5
  %355 = load i32, ptr %3, align 4
  ret i32 %355
}

; 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 willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) #0

declare i32 @update_flags_and_archs(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @check_test_string_arg(ptr noundef, ptr noundef) #0

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

declare i32 @imb_get_version() #4

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

declare ptr @imb_get_version_str() #4

; Function Attrs: nounwind uwtable
declare hidden void @print_hw_features() #0

declare i32 @detect_arch(ptr noundef) #4

declare ptr @alloc_mb_mgr(i64 noundef) #4

declare i32 @imb_self_test_set_cb(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @self_test_cb(ptr noundef, ptr noundef) #0

declare void @init_mb_mgr_sse(ptr noundef) #4

declare void @init_mb_mgr_avx2(ptr noundef) #4

declare void @init_mb_mgr_avx512(ptr noundef) #4

declare void @init_mb_mgr_avx10(ptr noundef) #4

declare void @free_mb_mgr(ptr noundef) #4

declare i32 @imb_get_errno(ptr noundef) #4

declare ptr @imb_get_strerror(i32 noundef) #4

declare void @print_tested_arch(i64 noundef, i32 noundef) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"imb_test", !10, i64 0, !10, i64 8, !6, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !16}
!20 = !{!21, !12, i64 8}
!21 = !{!"IMB_MGR", !12, i64 0, !12, i64 8, !7, i64 16, !7, i64 48, !7, i64 55, !6, i64 56, !6, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !10, i64 520, !10, i64 528, !10, i64 536, !10, i64 544, !10, i64 552, !10, i64 560, !10, i64 568, !10, i64 576, !10, i64 584, !10, i64 592, !10, i64 600, !10, i64 608, !10, i64 616, !10, i64 624, !10, i64 632, !10, i64 640, !10, i64 648, !10, i64 656, !10, i64 664, !10, i64 672, !10, i64 680, !10, i64 688, !10, i64 696, !10, i64 704, !10, i64 712, !10, i64 720, !10, i64 728, !10, i64 736, !10, i64 744, !10, i64 752, !10, i64 760, !10, i64 768, !10, i64 776, !10, i64 784, !10, i64 792, !10, i64 800, !10, i64 808, !10, i64 816, !10, i64 824, !10, i64 832, !10, i64 840, !10, i64 848, !10, i64 856, !10, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !10, i64 920, !10, i64 928, !10, i64 936, !10, i64 944, !10, i64 952, !10, i64 960, !10, i64 968, !10, i64 976, !10, i64 984, !10, i64 992, !10, i64 1000, !10, i64 1008, !10, i64 1016, !10, i64 1024, !10, i64 1032, !10, i64 1040, !10, i64 1048, !10, i64 1056, !10, i64 1064, !10, i64 1072, !10, i64 1080, !10, i64 1088, !10, i64 1096, !6, i64 1104, !6, i64 1108, !7, i64 1112, !10, i64 56408, !10, i64 56416, !10, i64 56424, !10, i64 56432, !10, i64 56440, !10, i64 56448, !10, i64 56456, !10, i64 56464, !10, i64 56472, !10, i64 56480, !10, i64 56488, !10, i64 56496, !10, i64 56504, !10, i64 56512, !10, i64 56520, !10, i64 56528, !10, i64 56536, !10, i64 56544, !10, i64 56552, !10, i64 56560, !10, i64 56568, !10, i64 56576, !10, i64 56584, !10, i64 56592, !10, i64 56600, !10, i64 56608, !10, i64 56616, !10, i64 56624, !10, i64 56632, !10, i64 56640, !10, i64 56648, !10, i64 56656, !10, i64 56664, !10, i64 56672, !10, i64 56680, !10, i64 56688, !10, i64 56696, !10, i64 56704, !10, i64 56712, !10, i64 56720, !10, i64 56728, !10, i64 56736}
!22 = !{!14, !10, i64 8}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}


; 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.imb_test = type { ptr, ptr, i32 }

@tests = external dso_local local_unnamed_addr global [46 x %struct.imb_test], align 16
@.str.46 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.50 = external hidden unnamed_addr constant [8 x i8], align 1
@quiet_mode = external local_unnamed_addr global i32, align 4
@.str.51 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.52 = external hidden unnamed_addr constant [20 x i8], align 1
@self_test_corrupt = external hidden local_unnamed_addr global i32, align 4
@.str.53 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca [5 x i8], align 4
  %4 = alloca [5 x i8], align 4
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(5) %4, i8 -1, i64 5, i1 false)
  %6 = icmp sgt i32 %0, 1
  br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %2, %.loopexit
  %.083135 = phi i32 [ %50, %.loopexit ], [ 1, %2 ]
  %.088134 = phi i32 [ %.189, %.loopexit ], [ 0, %2 ]
  %.094133 = phi i32 [ %.195, %.loopexit ], [ 0, %2 ]
  %7 = sext i32 %.083135 to i64
  %8 = getelementptr inbounds ptr, ptr %1, i64 %7
  %9 = load ptr, ptr %8, align 8, !tbaa !9
  %10 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.46) #7
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %15, label %12

12:                                               ; preds = %.lr.ph
  %13 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) @.str.47) #7
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %12, %.lr.ph
  %16 = load ptr, ptr %1, align 8, !tbaa !9
  call void @usage(ptr noundef %16)
  br label %.thread

17:                                               ; preds = %12
  %18 = call i32 @update_flags_and_archs(ptr noundef %9, ptr noundef nonnull %4, ptr noundef nonnull %5) #6
  %.not109 = icmp eq i32 %18, 0
  br i1 %.not109, label %19, label %.loopexit

19:                                               ; preds = %17
  %20 = load ptr, ptr %8, align 8, !tbaa !9
  %21 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.48) #7
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %.loopexit, label %23

23:                                               ; preds = %19
  %24 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.49) #7
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %.loopexit, label %26

26:                                               ; preds = %23
  %27 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.50) #7
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %.loopexit.sink.split, label %29

29:                                               ; preds = %26
  %30 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.51) #7
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %.loopexit, label %32

32:                                               ; preds = %29
  %33 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.52) #7
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %.loopexit.sink.split, label %35

35:                                               ; preds = %32
  %36 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.53) #7
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %38, label %.loopexit

38:                                               ; preds = %35
  %39 = add nsw i32 %.083135, 1
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds ptr, ptr %1, i64 %40
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  %43 = call i32 @check_test_string_arg(ptr noundef %20, ptr noundef %42)
  %.not111 = icmp eq i32 %43, 46
  br i1 %.not111, label %.thread, label %.preheader119.preheader

.preheader119.preheader:                          ; preds = %38
  %44 = zext i32 %43 to i64
  br label %.preheader119

.preheader119:                                    ; preds = %49, %.preheader119.preheader
  %indvars.iv = phi i64 [ 0, %.preheader119.preheader ], [ %indvars.iv.next.1, %49 ]
  %.not110 = icmp eq i64 %indvars.iv, %44
  br i1 %.not110, label %.preheader119.1, label %45

45:                                               ; preds = %.preheader119
  %46 = getelementptr inbounds [46 x %struct.imb_test], ptr @tests, i64 0, i64 %indvars.iv, i32 2
  store i32 0, ptr %46, align 16, !tbaa !11
  br label %.preheader119.1

.preheader119.1:                                  ; preds = %.preheader119, %45
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %.not110.1 = icmp eq i64 %indvars.iv.next, %44
  br i1 %.not110.1, label %49, label %47

47:                                               ; preds = %.preheader119.1
  %48 = getelementptr inbounds [46 x %struct.imb_test], ptr @tests, i64 0, i64 %indvars.iv.next, i32 2
  store i32 0, ptr %48, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %47, %.preheader119.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 46
  br i1 %exitcond.not.1, label %.loopexit, label %.preheader119, !llvm.loop !14

.loopexit.sink.split:                             ; preds = %32, %26
  %quiet_mode.sink = phi ptr [ @quiet_mode, %26 ], [ @self_test_corrupt, %32 ]
  store i32 1, ptr %quiet_mode.sink, align 4, !tbaa !16
  br label %.loopexit

.loopexit:                                        ; preds = %49, %.loopexit.sink.split, %29, %23, %19, %35, %17
  %.195 = phi i32 [ %.094133, %17 ], [ %.094133, %35 ], [ %.094133, %19 ], [ %.094133, %23 ], [ 1, %29 ], [ %.094133, %.loopexit.sink.split ], [ %.094133, %49 ]
  %.189 = phi i32 [ %.088134, %17 ], [ %.088134, %35 ], [ %.088134, %19 ], [ 1, %23 ], [ %.088134, %29 ], [ %.088134, %.loopexit.sink.split ], [ %.088134, %49 ]
  %.285 = phi i32 [ %.083135, %17 ], [ %.083135, %35 ], [ %.083135, %19 ], [ %.083135, %23 ], [ %.083135, %29 ], [ %.083135, %.loopexit.sink.split ], [ %39, %49 ]
  %50 = add nsw i32 %.285, 1
  %51 = icmp slt i32 %50, %0
  br i1 %51, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !17

._crit_edge.loopexit:                             ; preds = %.loopexit
  %52 = icmp ne i32 %.195, 0
  %53 = icmp eq i32 %.189, 0
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %2
  %.094.lcssa = phi i1 [ false, %2 ], [ %52, %._crit_edge.loopexit ]
  %.088.lcssa = phi i1 [ true, %2 ], [ %53, %._crit_edge.loopexit ]
  %54 = call i32 @imb_get_version() #6
  %55 = icmp ult i32 %54, 12800
  br i1 %55, label %56, label %58

56:                                               ; preds = %._crit_edge
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54)
  br label %62

58:                                               ; preds = %._crit_edge
  %59 = call ptr @imb_get_version_str() #6
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.55, ptr noundef %59)
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56, ptr noundef nonnull @.str.57)
  br label %62

62:                                               ; preds = %58, %56
  %63 = call i32 @imb_get_version() #6
  %64 = icmp ult i32 %63, 66561
  %or.cond = select i1 %64, i1 %.094.lcssa, i1 false
  br i1 %or.cond, label %65, label %67

65:                                               ; preds = %62
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  br label %.thread

67:                                               ; preds = %62
  %68 = call i32 @imb_get_version() #6
  %69 = icmp ult i32 %68, 66561
  %70 = load i32, ptr @self_test_corrupt, align 4
  %71 = icmp ne i32 %70, 0
  %or.cond3 = select i1 %69, i1 %71, i1 false
  br i1 %or.cond3, label %72, label %74

72:                                               ; preds = %67
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.59)
  br label %.thread

74:                                               ; preds = %67
  call void @print_hw_features()
  %75 = call i32 @detect_arch(ptr noundef nonnull %3) #6
  %76 = icmp slt i32 %75, 0
  br i1 %76, label %.thread, label %.preheader118.preheader

.preheader118.preheader:                          ; preds = %74
  %77 = load <4 x i8>, ptr %3, align 4, !tbaa !18
  %78 = load <4 x i8>, ptr %4, align 4, !tbaa !18
  %79 = and <4 x i8> %78, %77
  store <4 x i8> %79, ptr %3, align 4, !tbaa !18
  %80 = getelementptr inbounds i8, ptr %3, i64 4
  %81 = load i8, ptr %80, align 4, !tbaa !18
  %82 = getelementptr inbounds i8, ptr %4, i64 4
  %83 = load i8, ptr %82, align 4, !tbaa !18
  %84 = and i8 %83, %81
  store i8 %84, ptr %80, align 4, !tbaa !18
  br label %85

85:                                               ; preds = %.preheader118.preheader, %150
  %indvars.iv163 = phi i64 [ 1, %.preheader118.preheader ], [ %indvars.iv.next164, %150 ]
  %.090143 = phi i32 [ 0, %.preheader118.preheader ], [ %.393, %150 ]
  %86 = getelementptr inbounds [5 x i8], ptr %3, i64 0, i64 %indvars.iv163
  %87 = load i8, ptr %86, align 1, !tbaa !18
  %.not102 = icmp eq i8 %87, 0
  br i1 %.not102, label %150, label %88

88:                                               ; preds = %85
  %89 = load i64, ptr %5, align 8, !tbaa !5
  %90 = call ptr @alloc_mb_mgr(i64 noundef %89) #6
  %91 = icmp eq ptr %90, null
  br i1 %91, label %92, label %94

92:                                               ; preds = %88
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60)
  br label %.thread

94:                                               ; preds = %88
  br i1 %.094.lcssa, label %95, label %97

95:                                               ; preds = %94
  %96 = call i32 @imb_self_test_set_cb(ptr noundef nonnull %90, ptr noundef nonnull @self_test_cb, ptr noundef null) #6
  br label %97

97:                                               ; preds = %95, %94
  %98 = trunc nuw nsw i64 %indvars.iv163 to i32
  switch i32 %98, label %103 [
    i32 1, label %99
    i32 2, label %100
    i32 3, label %101
    i32 4, label %102
  ]

99:                                               ; preds = %97
  call void @init_mb_mgr_sse(ptr noundef nonnull %90) #6
  br label %103

100:                                              ; preds = %97
  call void @init_mb_mgr_avx2(ptr noundef nonnull %90) #6
  br label %103

101:                                              ; preds = %97
  call void @init_mb_mgr_avx512(ptr noundef nonnull %90) #6
  br label %103

102:                                              ; preds = %97
  call void @init_mb_mgr_avx10(ptr noundef nonnull %90) #6
  br label %103

103:                                              ; preds = %102, %101, %100, %99, %97
  %104 = getelementptr inbounds i8, ptr %90, i64 8
  %105 = load i64, ptr %104, align 8, !tbaa !19
  %106 = and i64 %105, 524288
  %.not103 = icmp eq i64 %106, 0
  br i1 %.not103, label %121, label %107

107:                                              ; preds = %103
  %108 = and i64 %105, 1048576
  %.not104 = icmp eq i64 %108, 0
  %109 = select i1 %.not104, ptr @.str.63, ptr @.str.62
  %110 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.61, ptr noundef nonnull %109)
  %111 = load i32, ptr @self_test_corrupt, align 4, !tbaa !16
  %.not105 = icmp eq i32 %111, 0
  br i1 %.not105, label %123, label %112

112:                                              ; preds = %107
  %113 = load i64, ptr %104, align 8, !tbaa !19
  %114 = and i64 %113, 1048576
  %115 = icmp eq i64 %114, 0
  %116 = select i1 %115, ptr @.str.65, ptr @.str.66
  %117 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.64, ptr noundef nonnull %116)
  %118 = load i64, ptr %104, align 8, !tbaa !19
  %119 = and i64 %118, 1048576
  %.not106 = icmp eq i64 %119, 0
  br i1 %.not106, label %123, label %120

120:                                              ; preds = %112
  call void @free_mb_mgr(ptr noundef nonnull %90) #6
  br label %.thread

121:                                              ; preds = %103
  %122 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.67)
  br label %123

123:                                              ; preds = %107, %112, %121
  %124 = call i32 @imb_get_errno(ptr noundef nonnull %90) #6
  %.not107 = icmp eq i32 %124, 0
  br i1 %.not107, label %129, label %125

125:                                              ; preds = %123
  %126 = call i32 @imb_get_errno(ptr noundef nonnull %90) #6
  %127 = call ptr @imb_get_strerror(i32 noundef %126) #6
  %128 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.68, ptr noundef %127)
  call void @free_mb_mgr(ptr noundef nonnull %90) #6
  br label %.thread

129:                                              ; preds = %123
  %130 = load i64, ptr %104, align 8, !tbaa !19
  call void @print_tested_arch(i64 noundef %130, i32 noundef %98) #6
  br i1 %.088.lcssa, label %.split.us, label %.split

.split.us:                                        ; preds = %129, %139
  %indvars.iv159 = phi i64 [ %indvars.iv.next160, %139 ], [ 0, %129 ]
  %.191138.us = phi i32 [ %.292.us, %139 ], [ %.090143, %129 ]
  %131 = getelementptr inbounds [46 x %struct.imb_test], ptr @tests, i64 0, i64 %indvars.iv159
  %132 = getelementptr inbounds i8, ptr %131, i64 16
  %133 = load i32, ptr %132, align 8, !tbaa !11
  %.not108.us = icmp eq i32 %133, 0
  br i1 %.not108.us, label %139, label %134

134:                                              ; preds = %.split.us
  %135 = getelementptr inbounds i8, ptr %131, i64 8
  %136 = load ptr, ptr %135, align 8, !tbaa !21
  %137 = call i32 %136(ptr noundef nonnull %90) #6
  %138 = add nsw i32 %137, %.191138.us
  br label %139

139:                                              ; preds = %134, %.split.us
  %.292.us = phi i32 [ %138, %134 ], [ %.191138.us, %.split.us ]
  %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1
  %exitcond162.not = icmp eq i64 %indvars.iv.next160, 46
  br i1 %exitcond162.not, label %.split141.us, label %.split.us, !llvm.loop !22

.split:                                           ; preds = %129, %149
  %indvars.iv155 = phi i64 [ %indvars.iv.next156, %149 ], [ 0, %129 ]
  %.191138 = phi i32 [ %.292, %149 ], [ %.090143, %129 ]
  %140 = getelementptr inbounds [46 x %struct.imb_test], ptr @tests, i64 0, i64 %indvars.iv155
  %141 = getelementptr inbounds i8, ptr %140, i64 16
  %142 = load i32, ptr %141, align 8, !tbaa !11
  %.not108 = icmp eq i32 %142, 0
  br i1 %.not108, label %149, label %143

143:                                              ; preds = %.split
  %144 = getelementptr inbounds i8, ptr %140, i64 8
  %145 = load ptr, ptr %144, align 8, !tbaa !21
  %146 = call i32 %145(ptr noundef nonnull %90) #6
  %147 = sub i32 0, %.191138
  %.not145 = icmp eq i32 %146, %147
  br i1 %.not145, label %149, label %148

148:                                              ; preds = %143
  call void @free_mb_mgr(ptr noundef nonnull %90) #6
  br label %.thread

149:                                              ; preds = %.split, %143
  %.292 = phi i32 [ 0, %143 ], [ %.191138, %.split ]
  %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1
  %exitcond158.not = icmp eq i64 %indvars.iv.next156, 46
  br i1 %exitcond158.not, label %.split141.us, label %.split, !llvm.loop !22

.split141.us:                                     ; preds = %149, %139
  %.us-phi = phi i32 [ %.292.us, %139 ], [ %.292, %149 ]
  call void @free_mb_mgr(ptr noundef nonnull %90) #6
  br label %150

150:                                              ; preds = %.split141.us, %85
  %.393 = phi i32 [ %.us-phi, %.split141.us ], [ %.090143, %85 ]
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next164, 5
  br i1 %exitcond166.not, label %151, label %85, !llvm.loop !23

151:                                              ; preds = %150
  %.not = icmp eq i32 %.393, 0
  br i1 %.not, label %154, label %152

152:                                              ; preds = %151
  %153 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.69)
  br label %.thread

154:                                              ; preds = %151
  %155 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.70)
  br label %.thread

.thread:                                          ; preds = %38, %148, %125, %120, %92, %74, %154, %152, %72, %65, %15
  %.5 = phi i32 [ 0, %15 ], [ 1, %65 ], [ 1, %72 ], [ 1, %152 ], [ 0, %154 ], [ 1, %74 ], [ 1, %92 ], [ 1, %120 ], [ 1, %125 ], [ 1, %148 ], [ 1, %38 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %3) #6
  ret i32 %.5
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden void @usage(ptr noundef) local_unnamed_addr #0

declare i32 @update_flags_and_archs(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden i32 @check_test_string_arg(ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare i32 @imb_get_version() local_unnamed_addr #4

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

declare ptr @imb_get_version_str() local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @print_hw_features() local_unnamed_addr #0

declare i32 @detect_arch(ptr noundef) local_unnamed_addr #4

declare ptr @alloc_mb_mgr(i64 noundef) local_unnamed_addr #4

declare i32 @imb_self_test_set_cb(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden i32 @self_test_cb(ptr noundef, ptr noundef) #0

declare void @init_mb_mgr_sse(ptr noundef) local_unnamed_addr #4

declare void @init_mb_mgr_avx2(ptr noundef) local_unnamed_addr #4

declare void @init_mb_mgr_avx512(ptr noundef) local_unnamed_addr #4

declare void @init_mb_mgr_avx10(ptr noundef) local_unnamed_addr #4

declare void @free_mb_mgr(ptr noundef) local_unnamed_addr #4

declare i32 @imb_get_errno(ptr noundef) local_unnamed_addr #4

declare ptr @imb_get_strerror(i32 noundef) local_unnamed_addr #4

declare void @print_tested_arch(i64 noundef, i32 noundef) local_unnamed_addr #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"long", !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 = !{!12, !13, i64 16}
!12 = !{!"imb_test", !10, i64 0, !10, i64 8, !13, i64 16}
!13 = !{!"int", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!13, !13, i64 0}
!17 = distinct !{!17, !15}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !6, i64 8}
!20 = !{!"IMB_MGR", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 48, !7, i64 55, !13, i64 56, !13, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !10, i64 520, !10, i64 528, !10, i64 536, !10, i64 544, !10, i64 552, !10, i64 560, !10, i64 568, !10, i64 576, !10, i64 584, !10, i64 592, !10, i64 600, !10, i64 608, !10, i64 616, !10, i64 624, !10, i64 632, !10, i64 640, !10, i64 648, !10, i64 656, !10, i64 664, !10, i64 672, !10, i64 680, !10, i64 688, !10, i64 696, !10, i64 704, !10, i64 712, !10, i64 720, !10, i64 728, !10, i64 736, !10, i64 744, !10, i64 752, !10, i64 760, !10, i64 768, !10, i64 776, !10, i64 784, !10, i64 792, !10, i64 800, !10, i64 808, !10, i64 816, !10, i64 824, !10, i64 832, !10, i64 840, !10, i64 848, !10, i64 856, !10, i64 864, !10, i64 872, !10, i64 880, !10, i64 888, !10, i64 896, !10, i64 904, !10, i64 912, !10, i64 920, !10, i64 928, !10, i64 936, !10, i64 944, !10, i64 952, !10, i64 960, !10, i64 968, !10, i64 976, !10, i64 984, !10, i64 992, !10, i64 1000, !10, i64 1008, !10, i64 1016, !10, i64 1024, !10, i64 1032, !10, i64 1040, !10, i64 1048, !10, i64 1056, !10, i64 1064, !10, i64 1072, !10, i64 1080, !10, i64 1088, !10, i64 1096, !13, i64 1104, !13, i64 1108, !7, i64 1112, !10, i64 56408, !10, i64 56416, !10, i64 56424, !10, i64 56432, !10, i64 56440, !10, i64 56448, !10, i64 56456, !10, i64 56464, !10, i64 56472, !10, i64 56480, !10, i64 56488, !10, i64 56496, !10, i64 56504, !10, i64 56512, !10, i64 56520, !10, i64 56528, !10, i64 56536, !10, i64 56544, !10, i64 56552, !10, i64 56560, !10, i64 56568, !10, i64 56576, !10, i64 56584, !10, i64 56592, !10, i64 56600, !10, i64 56608, !10, i64 56616, !10, i64 56624, !10, i64 56632, !10, i64 56640, !10, i64 56648, !10, i64 56656, !10, i64 56664, !10, i64 56672, !10, i64 56680, !10, i64 56688, !10, i64 56696, !10, i64 56704, !10, i64 56712, !10, i64 56720, !10, i64 56728, !10, i64 56736}
!21 = !{!12, !10, i64 8}
!22 = distinct !{!22, !15}
!23 = distinct !{!23, !15}


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