; LLVM IR from intel/QAT_Engine :: kpt/apps (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.kpt_ecc_wpk_st = type { i64, [32 x [512 x i8]], [32 x [512 x i8]], [1024 x i8], [1024 x i8], [32 x i32], [32 x i32], i32, i32, i32, i32 }
%struct.kpt_rsa_wpk_st = type { i64, i64, [32 x [512 x i8]], [32 x [512 x i8]], [2064 x i8], [3600 x i8], [1024 x i8], [1024 x i8], [32 x i32], [32 x i32], i32, i32, i32, i32, i32, i32 }

@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @tool_usage() #0

declare i32 @xlog(i32 noundef, ptr noundef, ...) #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 ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.kpt_ecc_wpk_st, align 8
  %13 = alloca %struct.kpt_rsa_wpk_st, 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 8, ptr %6) #5
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr null, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store ptr null, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = add nsw i32 %14, -1
  store i32 %15, ptr %4, align 4, !tbaa !5
  %16 = load ptr, ptr %5, align 8, !tbaa !9
  %17 = getelementptr inbounds ptr, ptr %16, i32 1
  store ptr %17, ptr %5, align 8, !tbaa !9
  br label %18

18:                                               ; preds = %81, %2
  %19 = load i32, ptr %4, align 4, !tbaa !5
  %20 = icmp sge i32 %19, 1
  br i1 %20, label %21, label %86

21:                                               ; preds = %18
  %22 = load ptr, ptr %5, align 8, !tbaa !9
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = call i32 @strcmp(ptr noundef %23, ptr noundef @.str.12) #6
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %35

26:                                               ; preds = %21
  %27 = load i32, ptr %4, align 4, !tbaa !5
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr %4, align 4, !tbaa !5
  %29 = icmp slt i32 %28, 1
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  call void @tool_usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %149

31:                                               ; preds = %26
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = getelementptr inbounds ptr, ptr %32, i32 1
  store ptr %33, ptr %5, align 8, !tbaa !9
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  store ptr %34, ptr %8, align 8, !tbaa !9
  br label %81

35:                                               ; preds = %21
  %36 = load ptr, ptr %5, align 8, !tbaa !9
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = call i32 @strcmp(ptr noundef %37, ptr noundef @.str.13) #6
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %40, label %49

40:                                               ; preds = %35
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr %4, align 4, !tbaa !5
  %43 = icmp slt i32 %42, 1
  br i1 %43, label %44, label %45

44:                                               ; preds = %40
  call void @tool_usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %149

45:                                               ; preds = %40
  %46 = load ptr, ptr %5, align 8, !tbaa !9
  %47 = getelementptr inbounds ptr, ptr %46, i32 1
  store ptr %47, ptr %5, align 8, !tbaa !9
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  store ptr %48, ptr %9, align 8, !tbaa !9
  br label %80

49:                                               ; preds = %35
  %50 = load ptr, ptr %5, align 8, !tbaa !9
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = call i32 @strcmp(ptr noundef %51, ptr noundef @.str.14) #6
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %63

54:                                               ; preds = %49
  %55 = load i32, ptr %4, align 4, !tbaa !5
  %56 = add nsw i32 %55, -1
  store i32 %56, ptr %4, align 4, !tbaa !5
  %57 = icmp slt i32 %56, 1
  br i1 %57, label %58, label %59

58:                                               ; preds = %54
  call void @tool_usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %149

59:                                               ; preds = %54
  %60 = load ptr, ptr %5, align 8, !tbaa !9
  %61 = getelementptr inbounds ptr, ptr %60, i32 1
  store ptr %61, ptr %5, align 8, !tbaa !9
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  store ptr %62, ptr %6, align 8, !tbaa !9
  br label %79

63:                                               ; preds = %49
  %64 = load ptr, ptr %5, align 8, !tbaa !9
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = call i32 @strcmp(ptr noundef %65, ptr noundef @.str.15) #6
  %67 = icmp eq i32 %66, 0
  br i1 %67, label %68, label %77

68:                                               ; preds = %63
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = add nsw i32 %69, -1
  store i32 %70, ptr %4, align 4, !tbaa !5
  %71 = icmp slt i32 %70, 1
  br i1 %71, label %72, label %73

72:                                               ; preds = %68
  call void @tool_usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %149

73:                                               ; preds = %68
  %74 = load ptr, ptr %5, align 8, !tbaa !9
  %75 = getelementptr inbounds ptr, ptr %74, i32 1
  store ptr %75, ptr %5, align 8, !tbaa !9
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  store ptr %76, ptr %7, align 8, !tbaa !9
  br label %78

77:                                               ; preds = %63
  call void @tool_usage()
  store i32 0, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %149

78:                                               ; preds = %73
  br label %79

79:                                               ; preds = %78, %59
  br label %80

80:                                               ; preds = %79, %45
  br label %81

81:                                               ; preds = %80, %31
  %82 = load i32, ptr %4, align 4, !tbaa !5
  %83 = add nsw i32 %82, -1
  store i32 %83, ptr %4, align 4, !tbaa !5
  %84 = load ptr, ptr %5, align 8, !tbaa !9
  %85 = getelementptr inbounds ptr, ptr %84, i32 1
  store ptr %85, ptr %5, align 8, !tbaa !9
  br label %18, !llvm.loop !11

86:                                               ; preds = %18
  %87 = load ptr, ptr %8, align 8, !tbaa !9
  %88 = icmp ne ptr %87, null
  br i1 %88, label %89, label %92

89:                                               ; preds = %86
  %90 = load ptr, ptr %9, align 8, !tbaa !9
  %91 = icmp ne ptr %90, null
  br i1 %91, label %93, label %92

92:                                               ; preds = %89, %86
  call void @tool_usage()
  call void @exit(i32 noundef 1) #7
  unreachable

93:                                               ; preds = %89
  %94 = load ptr, ptr %6, align 8, !tbaa !9
  %95 = call i32 (i32, ptr, ...) @xlog(i32 noundef 2, ptr noundef @.str.16, ptr noundef %94)
  %96 = load ptr, ptr %7, align 8, !tbaa !9
  %97 = call i32 (i32, ptr, ...) @xlog(i32 noundef 2, ptr noundef @.str.17, ptr noundef %96)
  %98 = load ptr, ptr %9, align 8, !tbaa !9
  %99 = call i32 (i32, ptr, ...) @xlog(i32 noundef 2, ptr noundef @.str.18, ptr noundef %98)
  %100 = load ptr, ptr %8, align 8, !tbaa !9
  %101 = call i32 (i32, ptr, ...) @xlog(i32 noundef 2, ptr noundef @.str.19, ptr noundef %100)
  %102 = load ptr, ptr %9, align 8, !tbaa !9
  %103 = call i32 @strcmp(ptr noundef %102, ptr noundef @.str.20) #6
  %104 = icmp eq i32 %103, 0
  br i1 %104, label %105, label %123

105:                                              ; preds = %93
  %106 = load ptr, ptr %8, align 8, !tbaa !9
  %107 = call i32 @strcmp(ptr noundef %106, ptr noundef @.str.21) #6
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %113

109:                                              ; preds = %105
  %110 = load ptr, ptr %6, align 8, !tbaa !9
  %111 = load ptr, ptr %7, align 8, !tbaa !9
  %112 = call i32 @kpt_ecc_wpk_gen(ptr noundef %110, ptr noundef %111)
  store i32 %112, ptr %10, align 4, !tbaa !5
  br label %122

113:                                              ; preds = %105
  %114 = load ptr, ptr %8, align 8, !tbaa !9
  %115 = call i32 @strcmp(ptr noundef %114, ptr noundef @.str.22) #6
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %120

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 35096, ptr %12) #5
  %118 = load ptr, ptr %6, align 8, !tbaa !9
  %119 = call i32 @kpt_ecc_wpk_parse(ptr noundef %12, ptr noundef %118)
  store i32 %119, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 35096, ptr %12) #5
  br label %121

120:                                              ; preds = %113
  call void @tool_usage()
  br label %121

121:                                              ; preds = %120, %117
  br label %122

122:                                              ; preds = %121, %109
  br label %147

123:                                              ; preds = %93
  %124 = load ptr, ptr %9, align 8, !tbaa !9
  %125 = call i32 @strcmp(ptr noundef %124, ptr noundef @.str.23) #6
  %126 = icmp eq i32 %125, 0
  br i1 %126, label %127, label %145

127:                                              ; preds = %123
  %128 = load ptr, ptr %8, align 8, !tbaa !9
  %129 = call i32 @strcmp(ptr noundef %128, ptr noundef @.str.21) #6
  %130 = icmp eq i32 %129, 0
  br i1 %130, label %131, label %135

131:                                              ; preds = %127
  %132 = load ptr, ptr %6, align 8, !tbaa !9
  %133 = load ptr, ptr %7, align 8, !tbaa !9
  %134 = call i32 @kpt_rsa_wpk_gen(ptr noundef %132, ptr noundef %133)
  store i32 %134, ptr %10, align 4, !tbaa !5
  br label %144

135:                                              ; preds = %127
  %136 = load ptr, ptr %8, align 8, !tbaa !9
  %137 = call i32 @strcmp(ptr noundef %136, ptr noundef @.str.22) #6
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %142

139:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 40776, ptr %13) #5
  %140 = load ptr, ptr %6, align 8, !tbaa !9
  %141 = call i32 @kpt_rsa_wpk_parse(ptr noundef %13, ptr noundef %140)
  store i32 %141, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 40776, ptr %13) #5
  br label %143

142:                                              ; preds = %135
  call void @tool_usage()
  br label %143

143:                                              ; preds = %142, %139
  br label %144

144:                                              ; preds = %143, %131
  br label %146

145:                                              ; preds = %123
  call void @tool_usage()
  br label %146

146:                                              ; preds = %145, %144
  br label %147

147:                                              ; preds = %146, %122
  %148 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %148, ptr %3, align 4
  store i32 1, ptr %11, align 4
  br label %149

149:                                              ; preds = %147, %77, %72, %58, %44, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %150 = load i32, ptr %3, align 4
  ret i32 %150
}

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

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

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

declare i32 @kpt_ecc_wpk_gen(ptr noundef, ptr noundef) #1

declare i32 @kpt_ecc_wpk_parse(ptr noundef, ptr noundef) #1

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

declare i32 @kpt_rsa_wpk_gen(ptr noundef, ptr noundef) #1

declare i32 @kpt_rsa_wpk_parse(ptr noundef, ptr noundef) #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 = { "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(argmem: readwrite) }
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 = { 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 #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { noreturn nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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"

%struct.kpt_ecc_wpk_st = type { i64, [32 x [512 x i8]], [32 x [512 x i8]], [1024 x i8], [1024 x i8], [32 x i32], [32 x i32], i32, i32, i32, i32 }
%struct.kpt_rsa_wpk_st = type { i64, i64, [32 x [512 x i8]], [32 x [512 x i8]], [2064 x i8], [3600 x i8], [1024 x i8], [1024 x i8], [32 x i32], [32 x i32], i32, i32, i32, i32, i32, i32 }

@.str.12 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @tool_usage() local_unnamed_addr #0

declare i32 @xlog(i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.kpt_ecc_wpk_st, align 8
  %4 = alloca %struct.kpt_rsa_wpk_st, align 8
  %5 = icmp sgt i32 %0, 1
  br i1 %5, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %2
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %44
  %.03778 = phi ptr [ %.1, %44 ], [ null, %.lr.ph.preheader ]
  %.03877 = phi ptr [ %.139, %44 ], [ null, %.lr.ph.preheader ]
  %.04076 = phi ptr [ %.141, %44 ], [ null, %.lr.ph.preheader ]
  %.04275 = phi ptr [ %.143, %44 ], [ null, %.lr.ph.preheader ]
  %.04474 = phi ptr [ %45, %44 ], [ %6, %.lr.ph.preheader ]
  %.046.in73 = phi i32 [ %.147, %44 ], [ %0, %.lr.ph.preheader ]
  %7 = load ptr, ptr %.04474, align 8, !tbaa !5
  %8 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.12) #5
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %16

10:                                               ; preds = %.lr.ph
  %11 = icmp eq i32 %.046.in73, 2
  br i1 %11, label %12, label %13

12:                                               ; preds = %10
  tail call void @tool_usage()
  br label %82

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %.04474, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  br label %44

16:                                               ; preds = %.lr.ph
  %17 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.13) #5
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %25

19:                                               ; preds = %16
  %20 = icmp eq i32 %.046.in73, 2
  br i1 %20, label %21, label %22

21:                                               ; preds = %19
  tail call void @tool_usage()
  br label %82

22:                                               ; preds = %19
  %23 = getelementptr inbounds i8, ptr %.04474, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  br label %44

25:                                               ; preds = %16
  %26 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.14) #5
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %34

28:                                               ; preds = %25
  %29 = icmp eq i32 %.046.in73, 2
  br i1 %29, label %30, label %31

30:                                               ; preds = %28
  tail call void @tool_usage()
  br label %82

31:                                               ; preds = %28
  %32 = getelementptr inbounds i8, ptr %.04474, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  br label %44

34:                                               ; preds = %25
  %35 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %7, ptr noundef nonnull dereferenceable(1) @.str.15) #5
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %43

37:                                               ; preds = %34
  %38 = icmp eq i32 %.046.in73, 2
  br i1 %38, label %39, label %40

39:                                               ; preds = %37
  tail call void @tool_usage()
  br label %82

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %.04474, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !5
  br label %44

43:                                               ; preds = %34
  tail call void @tool_usage()
  br label %82

44:                                               ; preds = %22, %40, %31, %13
  %.143 = phi ptr [ %.04275, %13 ], [ %.04275, %22 ], [ %33, %31 ], [ %.04275, %40 ]
  %.141 = phi ptr [ %.04076, %13 ], [ %.04076, %22 ], [ %.04076, %31 ], [ %42, %40 ]
  %.139 = phi ptr [ %15, %13 ], [ %.03877, %22 ], [ %.03877, %31 ], [ %.03877, %40 ]
  %.1 = phi ptr [ %.03778, %13 ], [ %24, %22 ], [ %.03778, %31 ], [ %.03778, %40 ]
  %.147 = add nsw i32 %.046.in73, -2
  %45 = getelementptr inbounds i8, ptr %.04474, i64 16
  %46 = icmp sgt i32 %.046.in73, 3
  br i1 %46, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %44
  %47 = icmp ne ptr %.139, null
  %48 = icmp ne ptr %.1, null
  %or.cond = select i1 %47, i1 %48, i1 false
  br i1 %or.cond, label %49, label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %2, %._crit_edge
  tail call void @tool_usage()
  tail call void @exit(i32 noundef 1) #6
  unreachable

49:                                               ; preds = %._crit_edge
  %50 = tail call i32 (i32, ptr, ...) @xlog(i32 noundef 2, ptr noundef nonnull @.str.16, ptr noundef %.143) #7
  %51 = tail call i32 (i32, ptr, ...) @xlog(i32 noundef 2, ptr noundef nonnull @.str.17, ptr noundef %.141) #7
  %52 = tail call i32 (i32, ptr, ...) @xlog(i32 noundef 2, ptr noundef nonnull @.str.18, ptr noundef nonnull %.1) #7
  %53 = tail call i32 (i32, ptr, ...) @xlog(i32 noundef 2, ptr noundef nonnull @.str.19, ptr noundef nonnull %.139) #7
  %54 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str.20) #5
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %67

56:                                               ; preds = %49
  %57 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.139, ptr noundef nonnull dereferenceable(1) @.str.21) #5
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %61

59:                                               ; preds = %56
  %60 = tail call i32 @kpt_ecc_wpk_gen(ptr noundef %.143, ptr noundef %.141) #7
  br label %82

61:                                               ; preds = %56
  %62 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.139, ptr noundef nonnull dereferenceable(1) @.str.22) #5
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %66

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 35096, ptr nonnull %3) #7
  %65 = call i32 @kpt_ecc_wpk_parse(ptr noundef nonnull %3, ptr noundef %.143) #7
  call void @llvm.lifetime.end.p0(i64 35096, ptr nonnull %3) #7
  br label %82

66:                                               ; preds = %61
  tail call void @tool_usage()
  br label %82

67:                                               ; preds = %49
  %68 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.1, ptr noundef nonnull dereferenceable(1) @.str.23) #5
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %81

70:                                               ; preds = %67
  %71 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.139, ptr noundef nonnull dereferenceable(1) @.str.21) #5
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %70
  %74 = tail call i32 @kpt_rsa_wpk_gen(ptr noundef %.143, ptr noundef %.141) #7
  br label %82

75:                                               ; preds = %70
  %76 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %.139, ptr noundef nonnull dereferenceable(1) @.str.22) #5
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %80

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 40776, ptr nonnull %4) #7
  %79 = call i32 @kpt_rsa_wpk_parse(ptr noundef nonnull %4, ptr noundef %.143) #7
  call void @llvm.lifetime.end.p0(i64 40776, ptr nonnull %4) #7
  br label %82

80:                                               ; preds = %75
  tail call void @tool_usage()
  br label %82

81:                                               ; preds = %67
  tail call void @tool_usage()
  br label %82

82:                                               ; preds = %64, %66, %59, %73, %80, %78, %81, %43, %39, %30, %21, %12
  %.048 = phi i32 [ 0, %12 ], [ 0, %21 ], [ 0, %30 ], [ 0, %39 ], [ 0, %43 ], [ %60, %59 ], [ %65, %64 ], [ 0, %66 ], [ %74, %73 ], [ %79, %78 ], [ 0, %80 ], [ 0, %81 ]
  ret i32 %.048
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

declare i32 @kpt_ecc_wpk_gen(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @kpt_ecc_wpk_parse(ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @kpt_rsa_wpk_gen(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @kpt_rsa_wpk_parse(ptr noundef, ptr noundef) local_unnamed_addr #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 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nounwind willreturn memory(read) }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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