; LLVM IR from intel/cryptography-primitives :: sources/ippcp/gfpec/sm2 (sm2_key_exchange_confirmation)

; 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._GFpECKeyExchangeSM2 = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._cpGFpEC = type { i32, i32, ptr, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._cpGFp = type { i32, i32, ptr }
%struct._gsModEngine = type { ptr, i32, i32, i32, i32, i32, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr, i32, i32, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @ippsGFpECKeyExchangeSM2_Confirm(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp eq ptr null, %19
  br i1 %20, label %21, label %22

21:                                               ; preds = %3
  store i32 -8, ptr %4, align 4
  br label %181

22:                                               ; preds = %3
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = call i64 @IPP_UINT_PTR(ptr noundef %26)
  %28 = trunc i64 %27 to i32
  %29 = xor i32 %25, %28
  %30 = icmp eq i32 %29, 1129136469
  br i1 %30, label %32, label %31

31:                                               ; preds = %22
  store i32 -13, ptr %4, align 4
  br label %181

32:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !12
  store i32 %35, ptr %8, align 4, !tbaa !13
  %36 = load i32, ptr %8, align 4, !tbaa !13
  %37 = icmp ne i32 15, %36
  br i1 %37, label %38, label %42

38:                                               ; preds = %32
  %39 = load i32, ptr %8, align 4, !tbaa !13
  %40 = icmp ne i32 16, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  store i32 -5, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %180

42:                                               ; preds = %38, %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !14
  store ptr %45, ptr %10, align 8, !tbaa !5
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = icmp eq ptr null, %46
  br i1 %47, label %48, label %49

48:                                               ; preds = %42
  store i32 -8, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %179

49:                                               ; preds = %42
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._cpGFpEC, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !15
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = call i64 @IPP_UINT_PTR(ptr noundef %53)
  %55 = trunc i64 %54 to i32
  %56 = xor i32 %52, %55
  %57 = icmp eq i32 %56, 1129136461
  br i1 %57, label %59, label %58

58:                                               ; preds = %49
  store i32 -13, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %179

59:                                               ; preds = %49
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._cpGFpEC, ptr %60, i32 0, i32 3
  %62 = load i32, ptr %61, align 8, !tbaa !17
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %65, label %64

64:                                               ; preds = %59
  store i32 -13, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %179

65:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._cpGFpEC, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !18
  %69 = getelementptr inbounds %struct._cpGFp, ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !19
  store ptr %70, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._gsModEngine, ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 8, !tbaa !21
  %74 = icmp slt i32 1, %73
  br i1 %74, label %75, label %76

75:                                               ; preds = %65
  store i32 -14, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %178

76:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._cpGFpEC, ptr %77, i32 0, i32 13
  %79 = load ptr, ptr %78, align 8, !tbaa !24
  store ptr %79, ptr %12, align 8, !tbaa !5
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._gsModEngine, ptr %80, i32 0, i32 1
  %82 = load i32, ptr %81, align 8, !tbaa !21
  %83 = icmp slt i32 1, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %76
  store i32 -14, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %177

85:                                               ; preds = %76
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._cpGFpEC, ptr %86, i32 0, i32 5
  %88 = load i32, ptr %87, align 8, !tbaa !25
  %89 = icmp sge i32 %88, 256
  br i1 %89, label %91, label %90

90:                                               ; preds = %85
  store i32 -7, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %177

91:                                               ; preds = %85
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %92, i32 0, i32 3
  %94 = load ptr, ptr %93, align 8, !tbaa !26
  %95 = icmp eq ptr null, %94
  br i1 %95, label %111, label %96

96:                                               ; preds = %91
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %97, i32 0, i32 4
  %99 = load ptr, ptr %98, align 8, !tbaa !27
  %100 = icmp eq ptr null, %99
  br i1 %100, label %111, label %101

101:                                              ; preds = %96
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %102, i32 0, i32 5
  %104 = load ptr, ptr %103, align 8, !tbaa !28
  %105 = icmp eq ptr null, %104
  br i1 %105, label %111, label %106

106:                                              ; preds = %101
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %107, i32 0, i32 6
  %109 = load ptr, ptr %108, align 8, !tbaa !29
  %110 = icmp eq ptr null, %109
  br i1 %110, label %111, label %112

111:                                              ; preds = %106, %101, %96, %91
  store i32 -13, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %177

112:                                              ; preds = %106
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = icmp eq ptr null, %113
  br i1 %114, label %115, label %116

115:                                              ; preds = %112
  store i32 -8, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %177

116:                                              ; preds = %112
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = icmp eq ptr null, %117
  br i1 %118, label %119, label %120

119:                                              ; preds = %116
  store i32 -8, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %177

120:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #3
  %121 = load i32, ptr %8, align 4, !tbaa !13
  %122 = icmp eq i32 15, %121
  %123 = zext i1 %122 to i64
  %124 = select i1 %122, i32 2, i32 3
  %125 = trunc i32 %124 to i8
  store i8 %125, ptr %13, align 1, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._gsModEngine, ptr %126, i32 0, i32 2
  %128 = load i32, ptr %127, align 4, !tbaa !31
  store i32 %128, ptr %14, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  %129 = load i32, ptr %14, align 4, !tbaa !13
  %130 = add nsw i32 %129, 7
  %131 = sdiv i32 %130, 8
  store i32 %131, ptr %15, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = call ptr @gsModPoolAlloc(ptr noundef %132, i32 noundef 3)
  store ptr %133, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %134 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %134, ptr %17, align 8, !tbaa !5
  %135 = load i8, ptr %13, align 1, !tbaa !30
  %136 = load ptr, ptr %17, align 8, !tbaa !5
  %137 = getelementptr inbounds i8, ptr %136, i64 0
  store i8 %135, ptr %137, align 1, !tbaa !30
  %138 = load ptr, ptr %7, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %138, i32 0, i32 10
  %140 = load ptr, ptr %139, align 8, !tbaa !32
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %141, i32 0, i32 2
  %143 = load ptr, ptr %142, align 8, !tbaa !14
  %144 = getelementptr inbounds %struct._cpGFpEC, ptr %143, i32 0, i32 2
  %145 = load ptr, ptr %144, align 8, !tbaa !18
  %146 = getelementptr inbounds %struct._cpGFp, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !19
  %148 = getelementptr inbounds %struct._gsModEngine, ptr %147, i32 0, i32 3
  %149 = load i32, ptr %148, align 8, !tbaa !33
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds i64, ptr %140, i64 %150
  %152 = load ptr, ptr %17, align 8, !tbaa !5
  %153 = getelementptr inbounds i8, ptr %152, i64 1
  %154 = load i32, ptr %15, align 4, !tbaa !13
  call void @CopyBlock(ptr noundef %151, ptr noundef %153, i32 noundef %154)
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct._GFpECKeyExchangeSM2, ptr %155, i32 0, i32 9
  %157 = load ptr, ptr %156, align 8, !tbaa !34
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = getelementptr inbounds i8, ptr %158, i64 1
  %160 = load i32, ptr %15, align 4, !tbaa !13
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds i8, ptr %159, i64 %161
  call void @CopyBlock(ptr noundef %157, ptr noundef %162, i32 noundef 32)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %163 = load i32, ptr %15, align 4, !tbaa !13
  %164 = add nsw i32 1, %163
  %165 = add nsw i32 %164, 32
  store i32 %165, ptr %18, align 4, !tbaa !13
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = load ptr, ptr %17, align 8, !tbaa !5
  %168 = load i32, ptr %18, align 4, !tbaa !13
  call void @cpSM2KE_compute_hash_SM3(ptr noundef %166, ptr noundef %167, i32 noundef %168)
  %169 = load ptr, ptr %17, align 8, !tbaa !5
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = call i32 @EquBlock(ptr noundef %169, ptr noundef %170, i32 noundef 32)
  %172 = icmp ne i32 %171, 0
  %173 = zext i1 %172 to i64
  %174 = select i1 %172, i32 1, i32 0
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 %174, ptr %175, align 4, !tbaa !13
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  call void @gsModPoolFree(ptr noundef %176, i32 noundef 3)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #3
  br label %177

177:                                              ; preds = %120, %119, %115, %111, %90, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %178

178:                                              ; preds = %177, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %179

179:                                              ; preds = %178, %64, %58, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %180

180:                                              ; preds = %179, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %181

181:                                              ; preds = %180, %31, %21
  %182 = load i32, ptr %4, align 4
  ret i32 %182
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_UINT_PTR(ptr noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @gsModPoolAlloc(ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @CopyBlock(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cpSM2KE_compute_hash_SM3(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @EquBlock(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @gsModPoolFree(ptr noundef, i32 noundef) #1

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

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 = { inlinehint 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(argmem: readwrite) }
attributes #3 = { 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 = !{!10, !11, i64 0}
!10 = !{!"_GFpECKeyExchangeSM2", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!11, !11, i64 0}
!14 = !{!10, !6, i64 8}
!15 = !{!16, !11, i64 0}
!16 = !{!"_cpGFpEC", !11, i64 0, !11, i64 4, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 68, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!17 = !{!16, !11, i64 16}
!18 = !{!16, !6, i64 8}
!19 = !{!20, !6, i64 8}
!20 = !{!"_cpGFp", !11, i64 0, !11, i64 4, !6, i64 8}
!21 = !{!22, !11, i64 8}
!22 = !{!"_gsModEngine", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !23, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !6, i64 104}
!23 = !{!"long long", !7, i64 0}
!24 = !{!16, !6, i64 80}
!25 = !{!16, !11, i64 24}
!26 = !{!10, !6, i64 16}
!27 = !{!10, !6, i64 24}
!28 = !{!10, !6, i64 32}
!29 = !{!10, !6, i64 40}
!30 = !{!7, !7, i64 0}
!31 = !{!22, !11, i64 12}
!32 = !{!10, !6, i64 72}
!33 = !{!22, !11, i64 16}
!34 = !{!10, !6, i64 64}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind uwtable
define dso_local range(i32 -14, 1) i32 @ippsGFpECKeyExchangeSM2_Confirm(ptr noundef %0, ptr noundef writeonly %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = icmp eq ptr %2, null
  br i1 %4, label %92, label %5

5:                                                ; preds = %3
  %6 = load i32, ptr %2, align 8, !tbaa !5
  %7 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %2)
  %8 = trunc i64 %7 to i32
  %9 = xor i32 %6, %8
  %10 = icmp eq i32 %9, 1129136469
  br i1 %10, label %11, label %92

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %2, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !11
  %14 = add i32 %13, -17
  %or.cond = icmp ult i32 %14, -2
  br i1 %or.cond, label %92, label %15

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %2, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !12
  %18 = icmp eq ptr %17, null
  br i1 %18, label %92, label %19

19:                                               ; preds = %15
  %20 = load i32, ptr %17, align 8, !tbaa !13
  %21 = tail call i64 @IPP_UINT_PTR(ptr noundef nonnull %17)
  %22 = trunc i64 %21 to i32
  %23 = xor i32 %20, %22
  %24 = icmp eq i32 %23, 1129136461
  br i1 %24, label %25, label %92

25:                                               ; preds = %19
  %26 = getelementptr inbounds i8, ptr %17, i64 16
  %27 = load i32, ptr %26, align 8, !tbaa !15
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %92, label %28

28:                                               ; preds = %25
  %29 = getelementptr inbounds i8, ptr %17, i64 8
  %30 = load ptr, ptr %29, align 8, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %32, i64 8
  %34 = load i32, ptr %33, align 8, !tbaa !19
  %35 = icmp sgt i32 %34, 1
  br i1 %35, label %92, label %36

36:                                               ; preds = %28
  %37 = getelementptr inbounds i8, ptr %17, i64 80
  %38 = load ptr, ptr %37, align 8, !tbaa !22
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load i32, ptr %39, align 8, !tbaa !19
  %41 = icmp sgt i32 %40, 1
  br i1 %41, label %92, label %42

42:                                               ; preds = %36
  %43 = getelementptr inbounds i8, ptr %17, i64 24
  %44 = load i32, ptr %43, align 8, !tbaa !23
  %45 = icmp sgt i32 %44, 255
  br i1 %45, label %46, label %92

46:                                               ; preds = %42
  %47 = getelementptr inbounds i8, ptr %2, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !24
  %49 = icmp eq ptr %48, null
  br i1 %49, label %92, label %50

50:                                               ; preds = %46
  %51 = getelementptr inbounds i8, ptr %2, i64 24
  %52 = load ptr, ptr %51, align 8, !tbaa !25
  %53 = icmp eq ptr %52, null
  br i1 %53, label %92, label %54

54:                                               ; preds = %50
  %55 = getelementptr inbounds i8, ptr %2, i64 32
  %56 = load ptr, ptr %55, align 8, !tbaa !26
  %57 = icmp eq ptr %56, null
  br i1 %57, label %92, label %58

58:                                               ; preds = %54
  %59 = getelementptr inbounds i8, ptr %2, i64 40
  %60 = load ptr, ptr %59, align 8, !tbaa !27
  %61 = icmp eq ptr %60, null
  br i1 %61, label %92, label %62

62:                                               ; preds = %58
  %63 = icmp eq ptr %0, null
  %64 = icmp eq ptr %1, null
  %or.cond50 = or i1 %63, %64
  br i1 %or.cond50, label %92, label %65

65:                                               ; preds = %62
  %66 = icmp eq i32 %13, 15
  %67 = select i1 %66, i8 2, i8 3
  %68 = getelementptr inbounds i8, ptr %32, i64 12
  %69 = load i32, ptr %68, align 4, !tbaa !28
  %70 = add nsw i32 %69, 7
  %71 = sdiv i32 %70, 8
  %72 = tail call ptr @gsModPoolAlloc(ptr noundef nonnull %32, i32 noundef 3)
  store i8 %67, ptr %72, align 1, !tbaa !29
  %73 = getelementptr inbounds i8, ptr %2, i64 72
  %74 = load ptr, ptr %73, align 8, !tbaa !30
  %75 = load ptr, ptr %16, align 8, !tbaa !12
  %76 = getelementptr inbounds i8, ptr %75, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  %78 = getelementptr inbounds i8, ptr %77, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !17
  %80 = getelementptr inbounds i8, ptr %79, i64 16
  %81 = load i32, ptr %80, align 8, !tbaa !31
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds i64, ptr %74, i64 %82
  %84 = getelementptr inbounds i8, ptr %72, i64 1
  tail call void @CopyBlock(ptr noundef %83, ptr noundef nonnull %84, i32 noundef %71)
  %85 = getelementptr inbounds i8, ptr %2, i64 64
  %86 = load ptr, ptr %85, align 8, !tbaa !32
  %87 = sext i32 %71 to i64
  %88 = getelementptr inbounds i8, ptr %84, i64 %87
  tail call void @CopyBlock(ptr noundef %86, ptr noundef nonnull %88, i32 noundef 32)
  %89 = add nsw i32 %71, 33
  tail call void @cpSM2KE_compute_hash_SM3(ptr noundef nonnull %72, ptr noundef nonnull %72, i32 noundef %89)
  %90 = tail call i32 @EquBlock(ptr noundef nonnull %72, ptr noundef nonnull %0, i32 noundef 32)
  %.not49 = icmp ne i32 %90, 0
  %91 = zext i1 %.not49 to i32
  store i32 %91, ptr %1, align 4, !tbaa !33
  tail call void @gsModPoolFree(ptr noundef nonnull %32, i32 noundef 3)
  br label %92

92:                                               ; preds = %11, %28, %62, %46, %50, %54, %58, %42, %36, %65, %25, %19, %15, %5, %3
  %.4 = phi i32 [ -8, %3 ], [ -13, %5 ], [ -5, %11 ], [ -8, %15 ], [ -13, %19 ], [ -13, %25 ], [ -14, %28 ], [ 0, %65 ], [ -14, %36 ], [ -7, %42 ], [ -13, %58 ], [ -13, %54 ], [ -13, %50 ], [ -13, %46 ], [ -8, %62 ]
  ret i32 %.4
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @IPP_UINT_PTR(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @gsModPoolAlloc(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @CopyBlock(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cpSM2KE_compute_hash_SM3(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @EquBlock(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @gsModPoolFree(ptr noundef, i32 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 = { inlinehint 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" }

!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, !7, i64 0}
!6 = !{!"_GFpECKeyExchangeSM2", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !7, i64 0}
!14 = !{!"_cpGFpEC", !7, i64 0, !7, i64 4, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !7, i64 64, !7, i64 68, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128}
!15 = !{!14, !7, i64 16}
!16 = !{!14, !10, i64 8}
!17 = !{!18, !10, i64 8}
!18 = !{!"_cpGFp", !7, i64 0, !7, i64 4, !10, i64 8}
!19 = !{!20, !7, i64 8}
!20 = !{!"_gsModEngine", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !21, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !10, i64 104}
!21 = !{!"long long", !8, i64 0}
!22 = !{!14, !10, i64 80}
!23 = !{!14, !7, i64 24}
!24 = !{!6, !10, i64 16}
!25 = !{!6, !10, i64 24}
!26 = !{!6, !10, i64 32}
!27 = !{!6, !10, i64 40}
!28 = !{!20, !7, i64 12}
!29 = !{!8, !8, i64 0}
!30 = !{!6, !10, i64 72}
!31 = !{!20, !7, i64 16}
!32 = !{!6, !10, i64 64}
!33 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass