; LLVM IR from intel/QAT_Engine :: test (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"

@qatDebugLogFile = external dso_local global ptr, align 8
@default_tls_string = external hidden global ptr, align 8
@tls_version = external hidden global ptr, align 8
@default_digest_string = external hidden global ptr, align 8
@digest_kdf = external hidden global ptr, align 8
@stderr = external global ptr, align 8
@thread_count = external hidden global i32, align 4
@test_count = external hidden global i32, align 4
@.str.53 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [72 x i8], align 1
@active_thread_count = external hidden global i32, align 4
@ready_thread_count = external hidden global i32, align 4
@zero_copy = external hidden global i32, align 4
@.str.56 = external hidden unnamed_addr constant [64 x i8], align 1
@enable_engine = external hidden global i32, align 4
@engine_id = external hidden global ptr, align 8
@enable_external_polling = external hidden global i32, align 4
@enable_event_driven_polling = external hidden global i32, align 4
@enable_async = external hidden global i32, align 4
@sw_fallback = external hidden global i32, align 4
@engine = external hidden global ptr, align 8
@.str.57 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [27 x i8], align 1
@enable_perf = external hidden global i32, align 4
@.str.63 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [30 x i8], align 1
@test_alg = external hidden global i32, align 4
@sign_only = external hidden global i32, align 4
@.str.66 = external hidden unnamed_addr constant [6 x i8], align 1
@verify_only = external hidden global i32, align 4
@.str.67 = external hidden unnamed_addr constant [8 x i8], align 1
@encrypt_only = external hidden global i32, align 4
@.str.68 = external hidden unnamed_addr constant [9 x i8], align 1
@decrypt_only = external hidden global i32, align 4
@.str.69 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [27 x i8], align 1
@test_size = external hidden global i32, align 4
@.str.74 = external hidden unnamed_addr constant [27 x i8], align 1
@print_output = external hidden global i32, align 4
@.str.75 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [27 x i8], align 1
@cpu_affinity = external hidden global i32, align 4
@.str.78 = external hidden unnamed_addr constant [27 x i8], align 1
@core_count = external hidden global i32, align 4
@.str.79 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [27 x i8], align 1
@enable_provider = external hidden global i32, align 4
@.str.84 = external hidden unnamed_addr constant [27 x i8], align 1
@explicit_engine = external hidden global i32, align 4
@.str.85 = external hidden unnamed_addr constant [27 x i8], align 1
@enable_negative = external hidden global i32, align 4
@.str.86 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [27 x i8], align 1
@prf_op = external hidden global i32, align 4
@.str.89 = external hidden unnamed_addr constant [27 x i8], align 1
@hkdf_op = external hidden global i32, align 4
@.str.90 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @test_name(i32 noundef) #0

; 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 i32, align 4
  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 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  %7 = load ptr, ptr @default_tls_string, align 8, !tbaa !9
  store ptr %7, ptr @tls_version, align 8, !tbaa !9
  %8 = load ptr, ptr @default_digest_string, align 8, !tbaa !9
  store ptr %8, ptr @digest_kdf, align 8, !tbaa !9
  br label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr @qatDebugLogFile, align 8, !tbaa !9
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %14

12:                                               ; preds = %9
  %13 = load ptr, ptr @stderr, align 8, !tbaa !9
  store ptr %13, ptr @qatDebugLogFile, align 8, !tbaa !9
  br label %14

14:                                               ; preds = %12, %9
  br label %15

15:                                               ; preds = %14
  br label %16

16:                                               ; preds = %15
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %115, %16
  %18 = load i32, ptr %6, align 4, !tbaa !5
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp slt i32 %18, %19
  br i1 %20, label %21, label %118

21:                                               ; preds = %17
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = load i32, ptr %6, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds ptr, ptr %22, i64 %24
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %26, i64 0
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = icmp ne i32 %29, 45
  br i1 %30, label %31, label %112

31:                                               ; preds = %21
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = load i32, ptr %6, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds ptr, ptr %32, i64 %34
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %36, i64 0
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = sext i8 %38 to i32
  %40 = icmp ne i32 %39, 114
  br i1 %40, label %41, label %112

41:                                               ; preds = %31
  %42 = load ptr, ptr %5, align 8, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %46, i64 0
  %48 = load i8, ptr %47, align 1, !tbaa !11
  %49 = sext i8 %48 to i32
  %50 = icmp ne i32 %49, 100
  br i1 %50, label %51, label %112

51:                                               ; preds = %41
  %52 = load ptr, ptr %5, align 8, !tbaa !9
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds ptr, ptr %52, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds i8, ptr %56, i64 0
  %58 = load i8, ptr %57, align 1, !tbaa !11
  %59 = sext i8 %58 to i32
  %60 = icmp ne i32 %59, 97
  br i1 %60, label %61, label %112

61:                                               ; preds = %51
  %62 = load ptr, ptr %5, align 8, !tbaa !9
  %63 = load i32, ptr %6, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds ptr, ptr %62, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !9
  %67 = getelementptr inbounds i8, ptr %66, i64 0
  %68 = load i8, ptr %67, align 1, !tbaa !11
  %69 = sext i8 %68 to i32
  %70 = icmp ne i32 %69, 101
  br i1 %70, label %71, label %112

71:                                               ; preds = %61
  %72 = load ptr, ptr %5, align 8, !tbaa !9
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds ptr, ptr %72, i64 %74
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = getelementptr inbounds i8, ptr %76, i64 0
  %78 = load i8, ptr %77, align 1, !tbaa !11
  %79 = sext i8 %78 to i32
  %80 = icmp ne i32 %79, 112
  br i1 %80, label %81, label %112

81:                                               ; preds = %71
  %82 = load ptr, ptr %5, align 8, !tbaa !9
  %83 = load i32, ptr %6, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds ptr, ptr %82, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = getelementptr inbounds i8, ptr %86, i64 0
  %88 = load i8, ptr %87, align 1, !tbaa !11
  %89 = sext i8 %88 to i32
  %90 = icmp ne i32 %89, 104
  br i1 %90, label %91, label %112

91:                                               ; preds = %81
  %92 = load ptr, ptr %5, align 8, !tbaa !9
  %93 = load i32, ptr %6, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds ptr, ptr %92, i64 %94
  %96 = load ptr, ptr %95, align 8, !tbaa !9
  %97 = getelementptr inbounds i8, ptr %96, i64 0
  %98 = load i8, ptr %97, align 1, !tbaa !11
  %99 = sext i8 %98 to i32
  %100 = icmp ne i32 %99, 115
  br i1 %100, label %101, label %112

101:                                              ; preds = %91
  %102 = load ptr, ptr %5, align 8, !tbaa !9
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds ptr, ptr %102, i64 %104
  %106 = load ptr, ptr %105, align 8, !tbaa !9
  %107 = getelementptr inbounds i8, ptr %106, i64 0
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = sext i8 %108 to i32
  %110 = icmp ne i32 %109, 99
  br i1 %110, label %111, label %112

111:                                              ; preds = %101
  br label %118

112:                                              ; preds = %101, %91, %81, %71, %61, %51, %41, %31, %21
  %113 = load i32, ptr %4, align 4, !tbaa !5
  %114 = load ptr, ptr %5, align 8, !tbaa !9
  call void @handle_option(i32 noundef %113, ptr noundef %114, ptr noundef %6)
  br label %115

115:                                              ; preds = %112
  %116 = load i32, ptr %6, align 4, !tbaa !5
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %6, align 4, !tbaa !5
  br label %17, !llvm.loop !12

118:                                              ; preds = %111, %17
  %119 = load i32, ptr @thread_count, align 4, !tbaa !5
  %120 = load i32, ptr @test_count, align 4, !tbaa !5
  %121 = icmp sgt i32 %119, %120
  br i1 %121, label %122, label %127

122:                                              ; preds = %118
  %123 = load i32, ptr @test_count, align 4, !tbaa !5
  store i32 %123, ptr @thread_count, align 4, !tbaa !5
  %124 = call i32 (ptr, ...) @printf(ptr noundef @.str.53)
  %125 = load i32, ptr @thread_count, align 4, !tbaa !5
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.54, i32 noundef %125)
  br label %127

127:                                              ; preds = %122, %118
  %128 = load i32, ptr %6, align 4, !tbaa !5
  %129 = load i32, ptr %4, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %131, label %133

131:                                              ; preds = %127
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.55)
  call void @exit(i32 noundef 1) #6
  unreachable

133:                                              ; preds = %127
  %134 = load i32, ptr @thread_count, align 4, !tbaa !5
  store i32 %134, ptr @active_thread_count, align 4, !tbaa !5
  store i32 0, ptr @ready_thread_count, align 4, !tbaa !5
  %135 = load i32, ptr @zero_copy, align 4, !tbaa !5
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %139

137:                                              ; preds = %133
  %138 = call i32 (ptr, ...) @printf(ptr noundef @.str.56)
  store i32 0, ptr @zero_copy, align 4, !tbaa !5
  br label %139

139:                                              ; preds = %137, %133
  %140 = load i32, ptr @enable_engine, align 4, !tbaa !5
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %155

142:                                              ; preds = %139
  call void @ENGINE_load_builtin_engines()
  %143 = load ptr, ptr @engine_id, align 8, !tbaa !9
  %144 = load i32, ptr @enable_external_polling, align 4, !tbaa !5
  %145 = load i32, ptr @enable_event_driven_polling, align 4, !tbaa !5
  %146 = load i32, ptr @enable_async, align 4, !tbaa !5
  %147 = load i32, ptr @zero_copy, align 4, !tbaa !5
  %148 = load i32, ptr @sw_fallback, align 4, !tbaa !5
  %149 = call ptr @tests_initialise_engine(ptr noundef %143, i32 noundef %144, i32 noundef %145, i32 noundef %146, i32 noundef %147, i32 noundef %148)
  store ptr %149, ptr @engine, align 8, !tbaa !9
  %150 = load ptr, ptr @engine, align 8, !tbaa !9
  %151 = icmp ne ptr %150, null
  br i1 %151, label %154, label %152

152:                                              ; preds = %142
  %153 = call i32 (ptr, ...) @printf(ptr noundef @.str.57)
  call void @exit(i32 noundef 1) #6
  unreachable

154:                                              ; preds = %142
  br label %157

155:                                              ; preds = %139
  %156 = call i32 (ptr, ...) @printf(ptr noundef @.str.58)
  br label %157

157:                                              ; preds = %155, %154
  %158 = call i32 (ptr, ...) @printf(ptr noundef @.str.59)
  %159 = call i32 (ptr, ...) @printf(ptr noundef @.str.60)
  %160 = call i32 (ptr, ...) @printf(ptr noundef @.str.61)
  %161 = load i32, ptr @enable_perf, align 4, !tbaa !5
  %162 = icmp ne i32 %161, 0
  %163 = zext i1 %162 to i64
  %164 = select i1 %162, ptr @.str.63, ptr @.str.64
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.62, ptr noundef %164)
  %166 = load i32, ptr @test_alg, align 4, !tbaa !5
  %167 = load i32, ptr @test_alg, align 4, !tbaa !5
  %168 = call ptr @test_name(i32 noundef %167)
  %169 = call i32 (ptr, ...) @printf(ptr noundef @.str.65, i32 noundef %166, ptr noundef %168)
  %170 = load i32, ptr @sign_only, align 4, !tbaa !5
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %172, label %174

172:                                              ; preds = %157
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str.66)
  br label %174

174:                                              ; preds = %172, %157
  %175 = load i32, ptr @verify_only, align 4, !tbaa !5
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %177, label %179

177:                                              ; preds = %174
  %178 = call i32 (ptr, ...) @printf(ptr noundef @.str.67)
  br label %179

179:                                              ; preds = %177, %174
  %180 = load i32, ptr @encrypt_only, align 4, !tbaa !5
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %184

182:                                              ; preds = %179
  %183 = call i32 (ptr, ...) @printf(ptr noundef @.str.68)
  br label %184

184:                                              ; preds = %182, %179
  %185 = load i32, ptr @decrypt_only, 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.69)
  br label %189

189:                                              ; preds = %187, %184
  %190 = call i32 (ptr, ...) @printf(ptr noundef @.str.70)
  %191 = load i32, ptr @test_count, align 4, !tbaa !5
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.71, i32 noundef %191)
  %193 = load i32, ptr @thread_count, align 4, !tbaa !5
  %194 = call i32 (ptr, ...) @printf(ptr noundef @.str.72, i32 noundef %193)
  %195 = load i32, ptr @test_size, align 4, !tbaa !5
  %196 = call i32 (ptr, ...) @printf(ptr noundef @.str.73, i32 noundef %195)
  %197 = load i32, ptr @print_output, align 4, !tbaa !5
  %198 = icmp ne i32 %197, 0
  %199 = zext i1 %198 to i64
  %200 = select i1 %198, ptr @.str.75, ptr @.str.76
  %201 = call i32 (ptr, ...) @printf(ptr noundef @.str.74, ptr noundef %200)
  %202 = load i32, ptr @cpu_affinity, align 4, !tbaa !5
  %203 = icmp ne i32 %202, 0
  %204 = zext i1 %203 to i64
  %205 = select i1 %203, ptr @.str.75, ptr @.str.76
  %206 = call i32 (ptr, ...) @printf(ptr noundef @.str.77, ptr noundef %205)
  %207 = load i32, ptr @core_count, align 4, !tbaa !5
  %208 = call i32 (ptr, ...) @printf(ptr noundef @.str.78, i32 noundef %207)
  %209 = load i32, ptr @enable_async, align 4, !tbaa !5
  %210 = icmp ne i32 %209, 0
  %211 = zext i1 %210 to i64
  %212 = select i1 %210, ptr @.str.75, ptr @.str.76
  %213 = call i32 (ptr, ...) @printf(ptr noundef @.str.79, ptr noundef %212)
  %214 = load i32, ptr @enable_external_polling, align 4, !tbaa !5
  %215 = icmp ne i32 %214, 0
  %216 = zext i1 %215 to i64
  %217 = select i1 %215, ptr @.str.75, ptr @.str.76
  %218 = call i32 (ptr, ...) @printf(ptr noundef @.str.80, ptr noundef %217)
  %219 = load i32, ptr @enable_event_driven_polling, align 4, !tbaa !5
  %220 = icmp ne i32 %219, 0
  %221 = zext i1 %220 to i64
  %222 = select i1 %220, ptr @.str.75, ptr @.str.76
  %223 = call i32 (ptr, ...) @printf(ptr noundef @.str.81, ptr noundef %222)
  %224 = load i32, ptr @enable_engine, align 4, !tbaa !5
  %225 = icmp ne i32 %224, 0
  %226 = zext i1 %225 to i64
  %227 = select i1 %225, ptr @.str.75, ptr @.str.76
  %228 = call i32 (ptr, ...) @printf(ptr noundef @.str.82, ptr noundef %227)
  %229 = load i32, ptr @enable_provider, align 4, !tbaa !5
  %230 = icmp ne i32 %229, 0
  %231 = zext i1 %230 to i64
  %232 = select i1 %230, ptr @.str.75, ptr @.str.76
  %233 = call i32 (ptr, ...) @printf(ptr noundef @.str.83, ptr noundef %232)
  %234 = load i32, ptr @explicit_engine, align 4, !tbaa !5
  %235 = icmp ne i32 %234, 0
  %236 = zext i1 %235 to i64
  %237 = select i1 %235, ptr @.str.75, ptr @.str.76
  %238 = call i32 (ptr, ...) @printf(ptr noundef @.str.84, ptr noundef %237)
  %239 = load i32, ptr @enable_negative, align 4, !tbaa !5
  %240 = icmp ne i32 %239, 0
  %241 = zext i1 %240 to i64
  %242 = select i1 %240, ptr @.str.75, ptr @.str.76
  %243 = call i32 (ptr, ...) @printf(ptr noundef @.str.85, ptr noundef %242)
  %244 = load ptr, ptr @tls_version, align 8, !tbaa !9
  %245 = call i32 (ptr, ...) @printf(ptr noundef @.str.86, ptr noundef %244)
  %246 = load ptr, ptr @tls_version, align 8, !tbaa !9
  %247 = call i32 @strcmp(ptr noundef %246, ptr noundef @.str.87) #7
  %248 = icmp eq i32 %247, 0
  br i1 %248, label %249, label %252

249:                                              ; preds = %189
  %250 = load ptr, ptr @digest_kdf, align 8, !tbaa !9
  %251 = call i32 (ptr, ...) @printf(ptr noundef @.str.88, ptr noundef %250)
  br label %252

252:                                              ; preds = %249, %189
  %253 = load i32, ptr @prf_op, align 4, !tbaa !5
  %254 = icmp ne i32 %253, -1
  br i1 %254, label %255, label %258

255:                                              ; preds = %252
  %256 = load i32, ptr @prf_op, align 4, !tbaa !5
  %257 = call i32 (ptr, ...) @printf(ptr noundef @.str.89, i32 noundef %256)
  br label %258

258:                                              ; preds = %255, %252
  %259 = load i32, ptr @hkdf_op, align 4, !tbaa !5
  %260 = icmp ne i32 %259, -1
  br i1 %260, label %261, label %264

261:                                              ; preds = %258
  %262 = load i32, ptr @hkdf_op, align 4, !tbaa !5
  %263 = call i32 (ptr, ...) @printf(ptr noundef @.str.90, i32 noundef %262)
  br label %264

264:                                              ; preds = %261, %258
  %265 = load i32, ptr @sw_fallback, align 4, !tbaa !5
  %266 = icmp ne i32 %265, 0
  %267 = zext i1 %266 to i64
  %268 = select i1 %266, ptr @.str.75, ptr @.str.76
  %269 = call i32 (ptr, ...) @printf(ptr noundef @.str.91, ptr noundef %268)
  %270 = call i32 (ptr, ...) @printf(ptr noundef @.str.92)
  %271 = load i32, ptr @enable_perf, align 4, !tbaa !5
  %272 = icmp ne i32 %271, 0
  br i1 %272, label %274, label %273

273:                                              ; preds = %264
  call void @functional_test()
  br label %275

274:                                              ; preds = %264
  call void @performance_test()
  br label %275

275:                                              ; preds = %274, %273
  %276 = load ptr, ptr @engine, align 8, !tbaa !9
  %277 = icmp ne ptr %276, null
  br i1 %277, label %278, label %285

278:                                              ; preds = %275
  %279 = load ptr, ptr @engine, align 8, !tbaa !9
  %280 = load ptr, ptr @engine_id, align 8, !tbaa !9
  %281 = load i32, ptr @enable_async, align 4, !tbaa !5
  %282 = load i32, ptr @enable_external_polling, align 4, !tbaa !5
  %283 = load i32, ptr @enable_event_driven_polling, align 4, !tbaa !5
  %284 = load i32, ptr @sw_fallback, align 4, !tbaa !5
  call void @tests_cleanup_engine(ptr noundef %279, ptr noundef %280, i32 noundef %281, i32 noundef %282, i32 noundef %283, i32 noundef %284)
  br label %285

285:                                              ; preds = %278, %275
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  ret i32 0
}

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

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #3

declare void @ENGINE_load_builtin_engines() #2

declare ptr @tests_initialise_engine(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #4

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

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

declare void @tests_cleanup_engine(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn 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 #4 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"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 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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

@qatDebugLogFile = external dso_local local_unnamed_addr global ptr, align 8
@default_tls_string = external hidden local_unnamed_addr global ptr, align 8
@tls_version = external hidden local_unnamed_addr global ptr, align 8
@default_digest_string = external hidden local_unnamed_addr global ptr, align 8
@digest_kdf = external hidden local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@thread_count = external hidden local_unnamed_addr global i32, align 4
@test_count = external hidden local_unnamed_addr global i32, align 4
@.str.53 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [72 x i8], align 1
@active_thread_count = external hidden local_unnamed_addr global i32, align 4
@ready_thread_count = external hidden local_unnamed_addr global i32, align 4
@zero_copy = external hidden local_unnamed_addr global i32, align 4
@.str.56 = external hidden unnamed_addr constant [64 x i8], align 1
@enable_engine = external hidden local_unnamed_addr global i32, align 4
@engine_id = external hidden local_unnamed_addr global ptr, align 8
@enable_external_polling = external hidden local_unnamed_addr global i32, align 4
@enable_event_driven_polling = external hidden local_unnamed_addr global i32, align 4
@enable_async = external hidden local_unnamed_addr global i32, align 4
@sw_fallback = external hidden local_unnamed_addr global i32, align 4
@engine = external hidden local_unnamed_addr global ptr, align 8
@.str.57 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [27 x i8], align 1
@enable_perf = external hidden local_unnamed_addr global i32, align 4
@.str.63 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [30 x i8], align 1
@test_alg = external hidden local_unnamed_addr global i32, align 4
@sign_only = external hidden local_unnamed_addr global i32, align 4
@.str.66 = external hidden unnamed_addr constant [6 x i8], align 1
@verify_only = external hidden local_unnamed_addr global i32, align 4
@.str.67 = external hidden unnamed_addr constant [8 x i8], align 1
@encrypt_only = external hidden local_unnamed_addr global i32, align 4
@.str.68 = external hidden unnamed_addr constant [9 x i8], align 1
@decrypt_only = external hidden local_unnamed_addr global i32, align 4
@.str.69 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.70 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [27 x i8], align 1
@test_size = external hidden local_unnamed_addr global i32, align 4
@.str.74 = external hidden unnamed_addr constant [27 x i8], align 1
@print_output = external hidden local_unnamed_addr global i32, align 4
@.str.75 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [27 x i8], align 1
@cpu_affinity = external hidden local_unnamed_addr global i32, align 4
@.str.78 = external hidden unnamed_addr constant [27 x i8], align 1
@core_count = external hidden local_unnamed_addr global i32, align 4
@.str.79 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [27 x i8], align 1
@enable_provider = external hidden local_unnamed_addr global i32, align 4
@.str.84 = external hidden unnamed_addr constant [27 x i8], align 1
@explicit_engine = external hidden local_unnamed_addr global i32, align 4
@.str.85 = external hidden unnamed_addr constant [27 x i8], align 1
@enable_negative = external hidden local_unnamed_addr global i32, align 4
@.str.86 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [27 x i8], align 1
@prf_op = external hidden local_unnamed_addr global i32, align 4
@.str.89 = external hidden unnamed_addr constant [27 x i8], align 1
@hkdf_op = external hidden local_unnamed_addr global i32, align 4
@.str.90 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @test_name(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %4 = load ptr, ptr @default_tls_string, align 8, !tbaa !5
  store ptr %4, ptr @tls_version, align 8, !tbaa !5
  %5 = load ptr, ptr @default_digest_string, align 8, !tbaa !5
  store ptr %5, ptr @digest_kdf, align 8, !tbaa !5
  %6 = load ptr, ptr @qatDebugLogFile, align 8, !tbaa !5
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %10

8:                                                ; preds = %2
  %9 = load ptr, ptr @stderr, align 8, !tbaa !5
  store ptr %9, ptr @qatDebugLogFile, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %8, %2
  store i32 1, ptr %3, align 4, !tbaa !9
  %11 = icmp sgt i32 %0, 1
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10, %16
  %storemerge48 = phi i32 [ %18, %16 ], [ 1, %10 ]
  %12 = sext i32 %storemerge48 to i64
  %13 = getelementptr inbounds ptr, ptr %1, i64 %12
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = load i8, ptr %14, align 1, !tbaa !11
  switch i8 %15, label %._crit_edge [
    i8 45, label %16
    i8 114, label %16
    i8 100, label %16
    i8 97, label %16
    i8 101, label %16
    i8 112, label %16
    i8 104, label %16
    i8 115, label %16
    i8 99, label %16
  ]

16:                                               ; preds = %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph, %.lr.ph
  call void @handle_option(i32 noundef %0, ptr noundef nonnull %1, ptr noundef nonnull %3)
  %17 = load i32, ptr %3, align 4, !tbaa !9
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr %3, align 4, !tbaa !9
  %19 = icmp slt i32 %18, %0
  br i1 %19, label %.lr.ph, label %._crit_edge, !llvm.loop !12

._crit_edge:                                      ; preds = %16, %.lr.ph, %10
  %20 = phi i32 [ 1, %10 ], [ %18, %16 ], [ %storemerge48, %.lr.ph ]
  %21 = load i32, ptr @thread_count, align 4, !tbaa !9
  %22 = load i32, ptr @test_count, align 4, !tbaa !9
  %23 = icmp sgt i32 %21, %22
  br i1 %23, label %24, label %28

24:                                               ; preds = %._crit_edge
  store i32 %22, ptr @thread_count, align 4, !tbaa !9
  %25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.53)
  %26 = load i32, ptr @thread_count, align 4, !tbaa !9
  %27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.54, i32 noundef %26)
  %.pre = load i32, ptr %3, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %24, %._crit_edge
  %29 = phi i32 [ %.pre, %24 ], [ %20, %._crit_edge ]
  %30 = icmp slt i32 %29, %0
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.55)
  call void @exit(i32 noundef 1) #7
  unreachable

33:                                               ; preds = %28
  %34 = load i32, ptr @thread_count, align 4, !tbaa !9
  store i32 %34, ptr @active_thread_count, align 4, !tbaa !9
  store i32 0, ptr @ready_thread_count, align 4, !tbaa !9
  %35 = load i32, ptr @zero_copy, align 4, !tbaa !9
  %.not26 = icmp eq i32 %35, 0
  br i1 %.not26, label %38, label %36

36:                                               ; preds = %33
  %37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.56)
  store i32 0, ptr @zero_copy, align 4, !tbaa !9
  br label %38

38:                                               ; preds = %36, %33
  %39 = load i32, ptr @enable_engine, align 4, !tbaa !9
  %.not27 = icmp eq i32 %39, 0
  br i1 %.not27, label %50, label %40

40:                                               ; preds = %38
  call void @ENGINE_load_builtin_engines() #6
  %41 = load ptr, ptr @engine_id, align 8, !tbaa !5
  %42 = load i32, ptr @enable_external_polling, align 4, !tbaa !9
  %43 = load i32, ptr @enable_event_driven_polling, align 4, !tbaa !9
  %44 = load i32, ptr @enable_async, align 4, !tbaa !9
  %45 = load i32, ptr @zero_copy, align 4, !tbaa !9
  %46 = load i32, ptr @sw_fallback, align 4, !tbaa !9
  %47 = call ptr @tests_initialise_engine(ptr noundef %41, i32 noundef %42, i32 noundef %43, i32 noundef %44, i32 noundef %45, i32 noundef %46) #6
  store ptr %47, ptr @engine, align 8, !tbaa !5
  %.not28 = icmp eq ptr %47, null
  br i1 %.not28, label %48, label %52

48:                                               ; preds = %40
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.57)
  call void @exit(i32 noundef 1) #7
  unreachable

50:                                               ; preds = %38
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.58)
  br label %52

52:                                               ; preds = %40, %50
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.59)
  %54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.60)
  %55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.61)
  %56 = load i32, ptr @enable_perf, align 4, !tbaa !9
  %.not29 = icmp eq i32 %56, 0
  %57 = select i1 %.not29, ptr @.str.64, ptr @.str.63
  %58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.62, ptr noundef nonnull %57)
  %59 = load i32, ptr @test_alg, align 4, !tbaa !9
  %60 = call ptr @test_name(i32 noundef %59)
  %61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.65, i32 noundef %59, ptr noundef %60)
  %62 = load i32, ptr @sign_only, align 4, !tbaa !9
  %.not30 = icmp eq i32 %62, 0
  br i1 %.not30, label %65, label %63

63:                                               ; preds = %52
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.66)
  br label %65

65:                                               ; preds = %63, %52
  %66 = load i32, ptr @verify_only, align 4, !tbaa !9
  %.not31 = icmp eq i32 %66, 0
  br i1 %.not31, label %69, label %67

67:                                               ; preds = %65
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.67)
  br label %69

69:                                               ; preds = %67, %65
  %70 = load i32, ptr @encrypt_only, align 4, !tbaa !9
  %.not32 = icmp eq i32 %70, 0
  br i1 %.not32, label %73, label %71

71:                                               ; preds = %69
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.68)
  br label %73

73:                                               ; preds = %71, %69
  %74 = load i32, ptr @decrypt_only, align 4, !tbaa !9
  %.not33 = icmp eq i32 %74, 0
  br i1 %.not33, label %77, label %75

75:                                               ; preds = %73
  %76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.69)
  br label %77

77:                                               ; preds = %75, %73
  %78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.70)
  %79 = load i32, ptr @test_count, align 4, !tbaa !9
  %80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.71, i32 noundef %79)
  %81 = load i32, ptr @thread_count, align 4, !tbaa !9
  %82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.72, i32 noundef %81)
  %83 = load i32, ptr @test_size, align 4, !tbaa !9
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.73, i32 noundef %83)
  %85 = load i32, ptr @print_output, align 4, !tbaa !9
  %.not34 = icmp eq i32 %85, 0
  %86 = select i1 %.not34, ptr @.str.76, ptr @.str.75
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.74, ptr noundef nonnull %86)
  %88 = load i32, ptr @cpu_affinity, align 4, !tbaa !9
  %.not35 = icmp eq i32 %88, 0
  %89 = select i1 %.not35, ptr @.str.76, ptr @.str.75
  %90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.77, ptr noundef nonnull %89)
  %91 = load i32, ptr @core_count, align 4, !tbaa !9
  %92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.78, i32 noundef %91)
  %93 = load i32, ptr @enable_async, align 4, !tbaa !9
  %.not36 = icmp eq i32 %93, 0
  %94 = select i1 %.not36, ptr @.str.76, ptr @.str.75
  %95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.79, ptr noundef nonnull %94)
  %96 = load i32, ptr @enable_external_polling, align 4, !tbaa !9
  %.not37 = icmp eq i32 %96, 0
  %97 = select i1 %.not37, ptr @.str.76, ptr @.str.75
  %98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.80, ptr noundef nonnull %97)
  %99 = load i32, ptr @enable_event_driven_polling, align 4, !tbaa !9
  %.not38 = icmp eq i32 %99, 0
  %100 = select i1 %.not38, ptr @.str.76, ptr @.str.75
  %101 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.81, ptr noundef nonnull %100)
  %102 = load i32, ptr @enable_engine, align 4, !tbaa !9
  %.not39 = icmp eq i32 %102, 0
  %103 = select i1 %.not39, ptr @.str.76, ptr @.str.75
  %104 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.82, ptr noundef nonnull %103)
  %105 = load i32, ptr @enable_provider, align 4, !tbaa !9
  %.not40 = icmp eq i32 %105, 0
  %106 = select i1 %.not40, ptr @.str.76, ptr @.str.75
  %107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.83, ptr noundef nonnull %106)
  %108 = load i32, ptr @explicit_engine, align 4, !tbaa !9
  %.not41 = icmp eq i32 %108, 0
  %109 = select i1 %.not41, ptr @.str.76, ptr @.str.75
  %110 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.84, ptr noundef nonnull %109)
  %111 = load i32, ptr @enable_negative, align 4, !tbaa !9
  %.not42 = icmp eq i32 %111, 0
  %112 = select i1 %.not42, ptr @.str.76, ptr @.str.75
  %113 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.85, ptr noundef nonnull %112)
  %114 = load ptr, ptr @tls_version, align 8, !tbaa !5
  %115 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.86, ptr noundef %114)
  %116 = load ptr, ptr @tls_version, align 8, !tbaa !5
  %117 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %116, ptr noundef nonnull dereferenceable(1) @.str.87) #8
  %118 = icmp eq i32 %117, 0
  br i1 %118, label %119, label %122

119:                                              ; preds = %77
  %120 = load ptr, ptr @digest_kdf, align 8, !tbaa !5
  %121 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.88, ptr noundef %120)
  br label %122

122:                                              ; preds = %119, %77
  %123 = load i32, ptr @prf_op, align 4, !tbaa !9
  %.not43 = icmp eq i32 %123, -1
  br i1 %.not43, label %126, label %124

124:                                              ; preds = %122
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.89, i32 noundef %123)
  br label %126

126:                                              ; preds = %124, %122
  %127 = load i32, ptr @hkdf_op, align 4, !tbaa !9
  %.not44 = icmp eq i32 %127, -1
  br i1 %.not44, label %130, label %128

128:                                              ; preds = %126
  %129 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.90, i32 noundef %127)
  br label %130

130:                                              ; preds = %128, %126
  %131 = load i32, ptr @sw_fallback, align 4, !tbaa !9
  %.not45 = icmp eq i32 %131, 0
  %132 = select i1 %.not45, ptr @.str.76, ptr @.str.75
  %133 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.91, ptr noundef nonnull %132)
  %134 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.92)
  %135 = load i32, ptr @enable_perf, align 4, !tbaa !9
  %.not46 = icmp eq i32 %135, 0
  br i1 %.not46, label %136, label %137

136:                                              ; preds = %130
  call void @functional_test()
  br label %138

137:                                              ; preds = %130
  call void @performance_test()
  br label %138

138:                                              ; preds = %137, %136
  %139 = load ptr, ptr @engine, align 8, !tbaa !5
  %.not47 = icmp eq ptr %139, null
  br i1 %.not47, label %146, label %140

140:                                              ; preds = %138
  %141 = load ptr, ptr @engine_id, align 8, !tbaa !5
  %142 = load i32, ptr @enable_async, align 4, !tbaa !9
  %143 = load i32, ptr @enable_external_polling, align 4, !tbaa !9
  %144 = load i32, ptr @enable_event_driven_polling, align 4, !tbaa !9
  %145 = load i32, ptr @sw_fallback, align 4, !tbaa !9
  call void @tests_cleanup_engine(ptr noundef nonnull %139, ptr noundef %141, i32 noundef %142, i32 noundef %143, i32 noundef %144, i32 noundef %145) #6
  br label %146

146:                                              ; preds = %140, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  ret i32 0
}

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

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

declare void @ENGINE_load_builtin_engines() local_unnamed_addr #4

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

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

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

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

declare void @tests_cleanup_engine(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { noreturn 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 #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 = { 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 #6 = { nounwind }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass