; LLVM IR from intel/QAT_Engine :: e_qat (qat_engine_ctrl)

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

@engine_inited = external dso_local global i32, align 4
@enable_external_polling = external dso_local global i32, align 4
@enable_heuristic_polling = external dso_local global i32, align 4
@num_asym_requests_in_flight = external dso_local global i32, align 4
@num_kdf_requests_in_flight = external dso_local global i32, align 4
@num_cipher_pipeline_requests_in_flight = external dso_local global i32, align 4
@num_asym_mb_items_in_queue = external dso_local global i32, align 4
@num_kdf_mb_items_in_queue = external dso_local global i32, align 4
@num_cipher_mb_items_in_queue = external dso_local global i32, align 4
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [58 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @qat_engine_ctrl(ptr noundef %0, i32 noundef %1, i64 noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca [1024 x i8], align 16
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i64 %2, ptr %8, align 8, !tbaa !11
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 0, ptr %13, align 8, !tbaa !11
  %19 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %19, label %169 [
    i32 201, label %20
    i32 200, label %53
    i32 211, label %64
    i32 213, label %94
    i32 214, label %116
    i32 215, label %163
  ]

20:                                               ; preds = %5
  %21 = load i32, ptr @engine_inited, align 4, !tbaa !9
  %22 = icmp ne i32 %21, 0
  %23 = xor i1 %22, true
  %24 = xor i1 %23, true
  %25 = xor i1 %24, true
  %26 = zext i1 %25 to i32
  %27 = sext i32 %26 to i64
  %28 = call i64 @llvm.expect.i64(i64 %27, i64 0)
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %20
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %170

31:                                               ; preds = %20
  %32 = load i32, ptr @enable_external_polling, align 4, !tbaa !9
  %33 = icmp ne i32 %32, 0
  %34 = xor i1 %33, true
  %35 = xor i1 %34, true
  %36 = xor i1 %35, true
  %37 = zext i1 %36 to i32
  %38 = sext i32 %37 to i64
  %39 = call i64 @llvm.expect.i64(i64 %38, i64 0)
  %40 = icmp ne i64 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %31
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %170

42:                                               ; preds = %31
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  %45 = xor i1 %44, true
  %46 = xor i1 %45, true
  %47 = zext i1 %46 to i32
  %48 = sext i32 %47 to i64
  %49 = call i64 @llvm.expect.i64(i64 %48, i64 0)
  %50 = icmp ne i64 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %42
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %170

52:                                               ; preds = %42
  br label %170

53:                                               ; preds = %5
  %54 = load i32, ptr @engine_inited, align 4, !tbaa !9
  %55 = icmp ne i32 %54, 0
  %56 = xor i1 %55, true
  %57 = xor i1 %56, true
  %58 = zext i1 %57 to i32
  %59 = sext i32 %58 to i64
  %60 = call i64 @llvm.expect.i64(i64 %59, i64 0)
  %61 = icmp ne i64 %60, 0
  br i1 %61, label %62, label %63

62:                                               ; preds = %53
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %170

63:                                               ; preds = %53
  store i32 1, ptr @enable_external_polling, align 4, !tbaa !9
  br label %170

64:                                               ; preds = %5
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %92

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %68 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  store ptr %68, ptr %16, align 8, !tbaa !5
  %69 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = call ptr @strncpy(ptr noundef %69, ptr noundef %70, i64 noundef 1023) #6
  %72 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 1023
  store i8 0, ptr %72, align 1, !tbaa !13
  br label %73

73:                                               ; preds = %90, %67
  %74 = call ptr @strsep(ptr noundef %16, ptr noundef @.str.12) #6
  store ptr %74, ptr %14, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %91

76:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %77 = call ptr @strsep(ptr noundef %14, ptr noundef @.str.13) #6
  store ptr %77, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %78 = call ptr @strsep(ptr noundef %14, ptr noundef @.str.13) #6
  store ptr %78, ptr %18, align 8, !tbaa !5
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %89

81:                                               ; preds = %76
  %82 = load ptr, ptr %18, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %84, label %89

84:                                               ; preds = %81
  %85 = load ptr, ptr %17, align 8, !tbaa !5
  %86 = load ptr, ptr %18, align 8, !tbaa !5
  %87 = call i32 @atoi(ptr noundef %86) #7
  %88 = call i32 @qat_pkt_threshold_table_set_threshold(ptr noundef %85, i32 noundef %87)
  store i32 %88, ptr %11, align 4, !tbaa !9
  br label %90

89:                                               ; preds = %81, %76
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %89, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %73, !llvm.loop !14

91:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %93

92:                                               ; preds = %64
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %93

93:                                               ; preds = %92, %91
  br label %170

94:                                               ; preds = %5
  %95 = load i32, ptr @engine_inited, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  %97 = xor i1 %96, true
  %98 = xor i1 %97, true
  %99 = zext i1 %98 to i32
  %100 = sext i32 %99 to i64
  %101 = call i64 @llvm.expect.i64(i64 %100, i64 0)
  %102 = icmp ne i64 %101, 0
  br i1 %102, label %103, label %104

103:                                              ; preds = %94
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %170

104:                                              ; preds = %94
  %105 = load i32, ptr @enable_external_polling, align 4, !tbaa !9
  %106 = icmp ne i32 %105, 0
  %107 = xor i1 %106, true
  %108 = xor i1 %107, true
  %109 = xor i1 %108, true
  %110 = zext i1 %109 to i32
  %111 = sext i32 %110 to i64
  %112 = call i64 @llvm.expect.i64(i64 %111, i64 0)
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %104
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %170

115:                                              ; preds = %104
  store i32 1, ptr @enable_heuristic_polling, align 4, !tbaa !9
  br label %170

116:                                              ; preds = %5
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = icmp eq ptr %117, null
  %119 = xor i1 %118, true
  %120 = xor i1 %119, true
  %121 = zext i1 %120 to i32
  %122 = sext i32 %121 to i64
  %123 = call i64 @llvm.expect.i64(i64 %122, i64 0)
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %125, label %126

125:                                              ; preds = %116
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %170

126:                                              ; preds = %116
  %127 = load i64, ptr %8, align 8, !tbaa !11
  %128 = icmp eq i64 %127, 1
  br i1 %128, label %129, label %131

129:                                              ; preds = %126
  %130 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr @num_asym_requests_in_flight, ptr %130, align 8, !tbaa !5
  br label %162

131:                                              ; preds = %126
  %132 = load i64, ptr %8, align 8, !tbaa !11
  %133 = icmp eq i64 %132, 2
  br i1 %133, label %134, label %136

134:                                              ; preds = %131
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr @num_kdf_requests_in_flight, ptr %135, align 8, !tbaa !5
  br label %161

136:                                              ; preds = %131
  %137 = load i64, ptr %8, align 8, !tbaa !11
  %138 = icmp eq i64 %137, 3
  br i1 %138, label %139, label %141

139:                                              ; preds = %136
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr @num_cipher_pipeline_requests_in_flight, ptr %140, align 8, !tbaa !5
  br label %160

141:                                              ; preds = %136
  %142 = load i64, ptr %8, align 8, !tbaa !11
  %143 = icmp eq i64 %142, 4
  br i1 %143, label %144, label %146

144:                                              ; preds = %141
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr @num_asym_mb_items_in_queue, ptr %145, align 8, !tbaa !5
  br label %159

146:                                              ; preds = %141
  %147 = load i64, ptr %8, align 8, !tbaa !11
  %148 = icmp eq i64 %147, 5
  br i1 %148, label %149, label %151

149:                                              ; preds = %146
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr @num_kdf_mb_items_in_queue, ptr %150, align 8, !tbaa !5
  br label %158

151:                                              ; preds = %146
  %152 = load i64, ptr %8, align 8, !tbaa !11
  %153 = icmp eq i64 %152, 6
  br i1 %153, label %154, label %156

154:                                              ; preds = %151
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr @num_cipher_mb_items_in_queue, ptr %155, align 8, !tbaa !5
  br label %157

156:                                              ; preds = %151
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %157

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

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

159:                                              ; preds = %158, %144
  br label %160

160:                                              ; preds = %159, %139
  br label %161

161:                                              ; preds = %160, %134
  br label %162

162:                                              ; preds = %161, %129
  br label %170

163:                                              ; preds = %5
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = call i32 @qat_engine_init(ptr noundef %164)
  store i32 %165, ptr %11, align 4, !tbaa !9
  %166 = icmp eq i32 %165, 0
  br i1 %166, label %167, label %168

167:                                              ; preds = %163
  br label %168

168:                                              ; preds = %167, %163
  br label %170

169:                                              ; preds = %5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %169, %168, %162, %125, %115, %114, %103, %93, %63, %62, %52, %51, %41, %30
  %171 = load i32, ptr %11, align 4, !tbaa !9
  %172 = icmp ne i32 %171, 0
  br i1 %172, label %174, label %173

173:                                              ; preds = %170
  call void @ERR_QAT_error(i32 noundef 0, i32 noundef 168, ptr noundef @.str.14, i32 noundef 1056)
  br label %174

174:                                              ; preds = %173, %170
  %175 = load i32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  ret i32 %175
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #2

; Function Attrs: nounwind
declare ptr @strncpy(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: nounwind
declare ptr @strsep(ptr noundef, ptr noundef) #3

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #5

declare void @ERR_QAT_error(i32 noundef, i32 noundef, ptr noundef, i32 noundef) #4

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

@engine_inited = external dso_local local_unnamed_addr global i32, align 4
@enable_external_polling = external dso_local local_unnamed_addr global i32, align 4
@enable_heuristic_polling = external dso_local local_unnamed_addr global i32, align 4
@num_asym_requests_in_flight = external dso_local global i32, align 4
@num_kdf_requests_in_flight = external dso_local global i32, align 4
@num_cipher_pipeline_requests_in_flight = external dso_local global i32, align 4
@num_asym_mb_items_in_queue = external dso_local global i32, align 4
@num_kdf_mb_items_in_queue = external dso_local global i32, align 4
@num_cipher_mb_items_in_queue = external dso_local global i32, align 4
@.str.12 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [58 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @qat_engine_ctrl(ptr noundef %0, i32 noundef %1, i64 noundef %2, ptr noundef %3, ptr nocapture noundef readnone %4) local_unnamed_addr #1 {
  %6 = alloca ptr, align 8
  %7 = alloca [1024 x i8], align 16
  %8 = alloca ptr, align 8
  switch i32 %1, label %.thread42 [
    i32 201, label %9
    i32 200, label %13
    i32 211, label %16
    i32 213, label %30
    i32 214, label %34
    i32 215, label %43
  ]

9:                                                ; preds = %5
  %10 = load i32, ptr @engine_inited, align 4, !tbaa !5
  %.not33 = icmp eq i32 %10, 0
  %11 = load i32, ptr @enable_external_polling, align 4
  %.not34 = icmp eq i32 %11, 0
  %or.cond36 = select i1 %.not33, i1 true, i1 %.not34
  %12 = icmp eq ptr %3, null
  %or.cond46 = or i1 %12, %or.cond36
  br i1 %or.cond46, label %.thread42, label %.thread, !prof !9

13:                                               ; preds = %5
  %14 = load i32, ptr @engine_inited, align 4, !tbaa !5
  %.not32 = icmp eq i32 %14, 0
  br i1 %.not32, label %15, label %.thread42, !prof !10

15:                                               ; preds = %13
  store i32 1, ptr @enable_external_polling, align 4, !tbaa !5
  br label %.thread

16:                                               ; preds = %5
  %.not30 = icmp eq ptr %3, null
  br i1 %.not30, label %.thread42, label %17

17:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store ptr %7, ptr %8, align 8, !tbaa !11
  %18 = call ptr @strncpy(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) %3, i64 noundef 1023) #6
  %19 = getelementptr inbounds i8, ptr %7, i64 1023
  store i8 0, ptr %19, align 1, !tbaa !13
  %20 = call ptr @strsep(ptr noundef nonnull %8, ptr noundef nonnull @.str.12) #6
  store ptr %20, ptr %6, align 8, !tbaa !11
  %.not3147 = icmp eq ptr %20, null
  br i1 %.not3147, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %17, %28
  %21 = call ptr @strsep(ptr noundef nonnull %6, ptr noundef nonnull @.str.13) #6
  %22 = call ptr @strsep(ptr noundef nonnull %6, ptr noundef nonnull @.str.13) #6
  %23 = icmp ne ptr %21, null
  %24 = icmp ne ptr %22, null
  %or.cond = select i1 %23, i1 %24, i1 false
  br i1 %or.cond, label %25, label %28

25:                                               ; preds = %.lr.ph
  %26 = call i32 @atoi(ptr nocapture noundef %22) #7
  %27 = call i32 @qat_pkt_threshold_table_set_threshold(ptr noundef nonnull %21, i32 noundef %26) #6
  br label %28

28:                                               ; preds = %.lr.ph, %25
  %.1 = phi i32 [ %27, %25 ], [ 0, %.lr.ph ]
  %29 = call ptr @strsep(ptr noundef nonnull %8, ptr noundef nonnull @.str.12) #6
  store ptr %29, ptr %6, align 8, !tbaa !11
  %.not31 = icmp eq ptr %29, null
  br i1 %.not31, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %28, %17
  %.0.lcssa = phi i32 [ 1, %17 ], [ %.1, %28 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %45

30:                                               ; preds = %5
  %31 = load i32, ptr @engine_inited, align 4, !tbaa !5
  %.not = icmp ne i32 %31, 0
  %32 = load i32, ptr @enable_external_polling, align 4
  %.not29 = icmp eq i32 %32, 0
  %or.cond37 = select i1 %.not, i1 true, i1 %.not29
  br i1 %or.cond37, label %.thread42, label %33, !prof !16

33:                                               ; preds = %30
  store i32 1, ptr @enable_heuristic_polling, align 4, !tbaa !5
  br label %.thread

34:                                               ; preds = %5
  %35 = icmp eq ptr %3, null
  br i1 %35, label %.thread42, label %36, !prof !17

36:                                               ; preds = %34
  switch i64 %2, label %.thread42 [
    i64 1, label %37
    i64 2, label %38
    i64 3, label %39
    i64 4, label %40
    i64 5, label %41
    i64 6, label %42
  ]

37:                                               ; preds = %36
  store ptr @num_asym_requests_in_flight, ptr %3, align 8, !tbaa !11
  br label %.thread

38:                                               ; preds = %36
  store ptr @num_kdf_requests_in_flight, ptr %3, align 8, !tbaa !11
  br label %.thread

39:                                               ; preds = %36
  store ptr @num_cipher_pipeline_requests_in_flight, ptr %3, align 8, !tbaa !11
  br label %.thread

40:                                               ; preds = %36
  store ptr @num_asym_mb_items_in_queue, ptr %3, align 8, !tbaa !11
  br label %.thread

41:                                               ; preds = %36
  store ptr @num_kdf_mb_items_in_queue, ptr %3, align 8, !tbaa !11
  br label %.thread

42:                                               ; preds = %36
  store ptr @num_cipher_mb_items_in_queue, ptr %3, align 8, !tbaa !11
  br label %.thread

43:                                               ; preds = %5
  %44 = tail call i32 @qat_engine_init(ptr noundef %0)
  br label %45

45:                                               ; preds = %._crit_edge, %43
  %.2 = phi i32 [ %44, %43 ], [ %.0.lcssa, %._crit_edge ]
  %.not35 = icmp eq i32 %.2, 0
  br i1 %.not35, label %.thread42, label %.thread

.thread42:                                        ; preds = %5, %36, %34, %30, %16, %13, %9, %45
  call void @ERR_QAT_error(i32 noundef 0, i32 noundef 168, ptr noundef nonnull @.str.14, i32 noundef 1056) #6
  br label %.thread

.thread:                                          ; preds = %9, %15, %33, %42, %41, %40, %39, %38, %37, %.thread42, %45
  %.240 = phi i32 [ 0, %.thread42 ], [ %.2, %45 ], [ 1, %37 ], [ 1, %38 ], [ 1, %39 ], [ 1, %40 ], [ 1, %41 ], [ 1, %42 ], [ 1, %33 ], [ 1, %15 ], [ 1, %9 ]
  ret i32 %.240
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare ptr @strsep(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #5

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass