; LLVM IR from guanzhi/GmSSL :: tools (sdftest)

; 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.ECCrefPublicKey_st = type { i32, [64 x i8], [64 x i8] }
%struct.SM2_POINT = type { [32 x i8], [32 x i8] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [52 x i8], align 1
@__FUNCTION__.test_SDF_ExportEncPublicKey_ECC = external hidden unnamed_addr constant [32 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare i32 @SDF_OpenDevice(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

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

declare i32 @SDF_CloseSession(ptr noundef) #2

declare i32 @SDF_CloseDevice(ptr noundef) #2

; 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
define dso_local i32 @test_SDF_ExportEncPublicKey_ECC(i32 noundef %0) #6 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.ECCrefPublicKey_st, align 1
  %8 = alloca [64 x i8], align 16
  %9 = alloca %struct.SM2_POINT, align 1
  %10 = alloca %struct.SM2_Z256_POINT, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store ptr null, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store ptr null, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  %13 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %13, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 132, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #7
  call void @llvm.memset.p0.i64(ptr align 16 %8, i8 0, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %14 = call i32 @SDF_OpenDevice(ptr noundef %4)
  store i32 %14, ptr %11, align 4, !tbaa !5
  %15 = load i32, ptr %11, align 4, !tbaa !5
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %17, label %21

17:                                               ; preds = %1
  %18 = load ptr, ptr @stderr, align 8, !tbaa !9
  %19 = load i32, ptr %11, align 4, !tbaa !5
  %20 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef @.str, i32 noundef %19) #7
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %100

21:                                               ; preds = %1
  %22 = load ptr, ptr %4, align 8, !tbaa !9
  %23 = call i32 @SDF_OpenSession(ptr noundef %22, ptr noundef %5)
  store i32 %23, ptr %11, align 4, !tbaa !5
  %24 = load i32, ptr %11, align 4, !tbaa !5
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %30

26:                                               ; preds = %21
  %27 = load ptr, ptr @stderr, align 8, !tbaa !9
  %28 = load i32, ptr %11, align 4, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.1, i32 noundef %28) #7
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %100

30:                                               ; preds = %21
  %31 = load ptr, ptr %5, align 8, !tbaa !9
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = call i32 @SDF_ExportEncPublicKey_ECC(ptr noundef %31, i32 noundef %32, ptr noundef %7)
  store i32 %33, ptr %11, align 4, !tbaa !5
  %34 = load i32, ptr %11, align 4, !tbaa !5
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %39

36:                                               ; preds = %30
  %37 = load i32, ptr %11, align 4, !tbaa !5
  %38 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %37)
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %100

39:                                               ; preds = %30
  %40 = getelementptr inbounds %struct.ECCrefPublicKey_st, ptr %7, i32 0, i32 0
  %41 = load i32, ptr %40, align 1, !tbaa !11
  %42 = icmp ne i32 %41, 256
  br i1 %42, label %43, label %49

43:                                               ; preds = %39
  br label %44

44:                                               ; preds = %43
  %45 = load ptr, ptr @stderr, align 8, !tbaa !9
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 243, ptr noundef @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC) #7
  br label %47

47:                                               ; preds = %44
  br label %48

48:                                               ; preds = %47
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %100

49:                                               ; preds = %39
  %50 = getelementptr inbounds %struct.ECCrefPublicKey_st, ptr %7, i32 0, i32 1
  %51 = getelementptr inbounds [64 x i8], ptr %50, i64 0, i64 0
  %52 = getelementptr inbounds [64 x i8], ptr %8, i64 0, i64 0
  %53 = call i32 @memcmp(ptr noundef %51, ptr noundef %52, i64 noundef 32) #8
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %49
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr @stderr, align 8, !tbaa !9
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 247, ptr noundef @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC) #7
  br label %59

59:                                               ; preds = %56
  br label %60

60:                                               ; preds = %59
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %100

61:                                               ; preds = %49
  %62 = getelementptr inbounds %struct.ECCrefPublicKey_st, ptr %7, i32 0, i32 2
  %63 = getelementptr inbounds [64 x i8], ptr %62, i64 0, i64 0
  %64 = getelementptr inbounds [64 x i8], ptr %8, i64 0, i64 0
  %65 = call i32 @memcmp(ptr noundef %63, ptr noundef %64, i64 noundef 32) #8
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %61
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr @stderr, align 8, !tbaa !9
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 251, ptr noundef @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC) #7
  br label %71

71:                                               ; preds = %68
  br label %72

72:                                               ; preds = %71
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %100

73:                                               ; preds = %61
  %74 = getelementptr inbounds %struct.SM2_POINT, ptr %9, i32 0, i32 0
  %75 = getelementptr inbounds [32 x i8], ptr %74, i64 0, i64 0
  %76 = getelementptr inbounds %struct.ECCrefPublicKey_st, ptr %7, i32 0, i32 1
  %77 = getelementptr inbounds [64 x i8], ptr %76, i64 0, i64 0
  %78 = getelementptr inbounds i8, ptr %77, i64 64
  %79 = getelementptr inbounds i8, ptr %78, i64 -32
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %75, ptr align 1 %79, i64 32, i1 false)
  %80 = getelementptr inbounds %struct.SM2_POINT, ptr %9, i32 0, i32 1
  %81 = getelementptr inbounds [32 x i8], ptr %80, i64 0, i64 0
  %82 = getelementptr inbounds %struct.ECCrefPublicKey_st, ptr %7, i32 0, i32 2
  %83 = getelementptr inbounds [64 x i8], ptr %82, i64 0, i64 0
  %84 = getelementptr inbounds i8, ptr %83, i64 64
  %85 = getelementptr inbounds i8, ptr %84, i64 -32
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %81, ptr align 1 %85, i64 32, i1 false)
  %86 = call i32 @sm2_z256_point_from_bytes(ptr noundef %10, ptr noundef %9)
  %87 = icmp ne i32 %86, 1
  br i1 %87, label %88, label %94

88:                                               ; preds = %73
  br label %89

89:                                               ; preds = %88
  %90 = load ptr, ptr @stderr, align 8, !tbaa !9
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 257, ptr noundef @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC) #7
  br label %92

92:                                               ; preds = %89
  br label %93

93:                                               ; preds = %92
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %100

94:                                               ; preds = %73
  %95 = load ptr, ptr %5, align 8, !tbaa !9
  %96 = call i32 @SDF_CloseSession(ptr noundef %95)
  %97 = load ptr, ptr %4, align 8, !tbaa !9
  %98 = call i32 @SDF_CloseDevice(ptr noundef %97)
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, ptr noundef @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC)
  store i32 1, ptr %2, align 4
  store i32 1, ptr %12, align 4
  br label %100

100:                                              ; preds = %94, %93, %72, %60, %48, %36, %26, %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 96, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 132, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %101 = load i32, ptr %2, align 4
  ret i32 %101
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"ECCrefPublicKey_st", !6, i64 0, !7, i64 4, !7, i64 68}


; 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.ECCrefPublicKey_st = type { i32, [64 x i8], [64 x i8] }
%struct.SM2_POINT = type { [32 x i8], [32 x i8] }
%struct.SM2_Z256_POINT = type { [4 x i64], [4 x i64], [4 x i64] }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [52 x i8], align 1
@__FUNCTION__.test_SDF_ExportEncPublicKey_ECC = external hidden unnamed_addr constant [32 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

declare i32 @SDF_OpenDevice(ptr noundef) local_unnamed_addr #2

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

declare i32 @SDF_OpenSession(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @sm2_z256_point_from_bytes(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @SDF_CloseSession(ptr noundef) local_unnamed_addr #2

declare i32 @SDF_CloseDevice(ptr noundef) local_unnamed_addr #2

; 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
define dso_local range(i32 -1, 2) i32 @test_SDF_ExportEncPublicKey_ECC(i32 noundef %0) local_unnamed_addr #5 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %struct.ECCrefPublicKey_st, align 4
  %5 = alloca [64 x i8], align 16
  %6 = alloca %struct.SM2_POINT, align 1
  %7 = alloca %struct.SM2_Z256_POINT, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  store ptr null, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 132, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %5, i8 0, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %7) #7
  %8 = call i32 @SDF_OpenDevice(ptr noundef nonnull %2) #7
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %12, label %9

9:                                                ; preds = %1
  %10 = load ptr, ptr @stderr, align 8, !tbaa !5
  %11 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %10, ptr noundef nonnull @.str, i32 noundef %8) #8
  br label %52

12:                                               ; preds = %1
  %13 = load ptr, ptr %2, align 8, !tbaa !5
  %14 = call i32 @SDF_OpenSession(ptr noundef %13, ptr noundef nonnull %3) #7
  %.not12 = icmp eq i32 %14, 0
  br i1 %.not12, label %18, label %15

15:                                               ; preds = %12
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.1, i32 noundef %14) #8
  br label %52

18:                                               ; preds = %12
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = call i32 @SDF_ExportEncPublicKey_ECC(ptr noundef %19, i32 noundef %0, ptr noundef nonnull %4) #7
  %.not13 = icmp eq i32 %20, 0
  br i1 %.not13, label %23, label %21

21:                                               ; preds = %18
  %22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %20)
  br label %52

23:                                               ; preds = %18
  %24 = load i32, ptr %4, align 4, !tbaa !9
  %.not14 = icmp eq i32 %24, 256
  br i1 %.not14, label %28, label %25

25:                                               ; preds = %23
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 243, ptr noundef nonnull @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC) #8
  br label %52

28:                                               ; preds = %23
  %29 = getelementptr inbounds i8, ptr %4, i64 4
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(32) %29, ptr noundef nonnull dereferenceable(32) %5, i64 32)
  %.not15 = icmp eq i32 %bcmp, 0
  br i1 %.not15, label %33, label %30

30:                                               ; preds = %28
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 247, ptr noundef nonnull @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC) #8
  br label %52

33:                                               ; preds = %28
  %34 = getelementptr inbounds i8, ptr %4, i64 68
  %bcmp16 = call i32 @bcmp(ptr noundef nonnull dereferenceable(32) %34, ptr noundef nonnull dereferenceable(32) %5, i64 32)
  %.not17 = icmp eq i32 %bcmp16, 0
  br i1 %.not17, label %38, label %35

35:                                               ; preds = %33
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 251, ptr noundef nonnull @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC) #8
  br label %52

38:                                               ; preds = %33
  %39 = getelementptr inbounds i8, ptr %4, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %6, ptr noundef nonnull align 4 dereferenceable(32) %39, i64 32, i1 false)
  %40 = getelementptr inbounds i8, ptr %6, i64 32
  %41 = getelementptr inbounds i8, ptr %4, i64 100
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(32) %40, ptr noundef nonnull align 4 dereferenceable(32) %41, i64 32, i1 false)
  %42 = call i32 @sm2_z256_point_from_bytes(ptr noundef nonnull %7, ptr noundef nonnull %6) #7
  %.not18 = icmp eq i32 %42, 1
  br i1 %.not18, label %46, label %43

43:                                               ; preds = %38
  %44 = load ptr, ptr @stderr, align 8, !tbaa !5
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 257, ptr noundef nonnull @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC) #8
  br label %52

46:                                               ; preds = %38
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = call i32 @SDF_CloseSession(ptr noundef %47) #7
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = call i32 @SDF_CloseDevice(ptr noundef %49) #7
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, ptr noundef nonnull @__FUNCTION__.test_SDF_ExportEncPublicKey_ECC)
  br label %52

52:                                               ; preds = %46, %43, %35, %30, %25, %21, %15, %9
  %.0 = phi i32 [ -1, %9 ], [ -1, %15 ], [ -1, %21 ], [ -1, %25 ], [ -1, %30 ], [ -1, %35 ], [ -1, %43 ], [ 1, %46 ]
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 132, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret i32 %.0
}

declare i32 @SDF_ExportEncPublicKey_ECC(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { nofree nounwind willreturn memory(argmem: read) }
attributes #7 = { nounwind }
attributes #8 = { cold 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 = !{!"ECCrefPublicKey_st", !11, i64 0, !7, i64 4, !7, i64 68}
!11 = !{!"int", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass