; LLVM IR from jim-b/ECCSI-SAKKE :: src/data (communityParameters)

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

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@stdout = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@NIST_P256_Curve = external hidden global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [66 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

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #2

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

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

declare ptr @EC_POINT_new(ptr noundef) #1

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

declare void @BN_clear_free(ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare signext i16 @msdb_communityGetPubAuthKey(ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @community_getKPAK_point(ptr noundef %0) #5 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca [131 x i8], align 16
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca [1200 x i8], align 16
  %13 = alloca [1200 x i8], align 16
  %14 = alloca [1200 x i8], align 16
  %15 = alloca [1200 x i8], align 16
  %16 = alloca [1200 x i8], align 16
  %17 = alloca [1200 x i8], align 16
  %18 = alloca [1200 x i8], align 16
  %19 = alloca [1200 x i8], align 16
  %20 = alloca [1200 x i8], align 16
  %21 = alloca [1200 x i8], align 16
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #7
  store i8 0, ptr %3, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 131, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  store i64 0, ptr %5, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store ptr null, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = icmp eq ptr null, %22
  br i1 %23, label %24, label %30

24:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1200, ptr %12) #7
  %25 = getelementptr inbounds [1200 x i8], ptr %12, i64 0, i64 0
  %26 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %25, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.19) #7
  %27 = load ptr, ptr @stdout, align 8, !tbaa !5
  %28 = getelementptr inbounds [1200 x i8], ptr %12, i64 0, i64 0
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef @.str.3, ptr noundef %28) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %12) #7
  store i8 1, ptr %3, align 1, !tbaa !9
  br label %30

30:                                               ; preds = %24, %1
  %31 = load i8, ptr %3, align 1, !tbaa !9
  %32 = icmp ne i8 %31, 0
  br i1 %32, label %158, label %33

33:                                               ; preds = %30
  %34 = getelementptr inbounds [131 x i8], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %34, i8 0, i64 131, i1 false)
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = call signext i16 @msdb_communityGetPubAuthKey(ptr noundef %35, ptr noundef %4)
  %37 = icmp ne i16 %36, 0
  br i1 %37, label %38, label %45

38:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 1200, ptr %13) #7
  %39 = getelementptr inbounds [1200 x i8], ptr %13, i64 0, i64 0
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %39, i64 noundef 1200, ptr noundef @.str.20, ptr noundef %40) #7
  %42 = load ptr, ptr @stdout, align 8, !tbaa !5
  %43 = getelementptr inbounds [1200 x i8], ptr %13, i64 0, i64 0
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str.3, ptr noundef %43) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %13) #7
  br label %157

45:                                               ; preds = %33
  %46 = getelementptr inbounds [131 x i8], ptr %4, i64 0, i64 0
  %47 = call i64 @strlen(ptr noundef %46) #8
  store i64 %47, ptr %5, align 8, !tbaa !10
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %55, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 1200, ptr %14) #7
  %50 = getelementptr inbounds [1200 x i8], ptr %14, i64 0, i64 0
  %51 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %50, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.21) #7
  %52 = load ptr, ptr @stdout, align 8, !tbaa !5
  %53 = getelementptr inbounds [1200 x i8], ptr %14, i64 0, i64 0
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef @.str.3, ptr noundef %53) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %14) #7
  br label %156

55:                                               ; preds = %45
  %56 = load i64, ptr %5, align 8, !tbaa !10
  %57 = udiv i64 %56, 2
  %58 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %57) #9
  store ptr %58, ptr %8, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %66, label %60

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 1200, ptr %15) #7
  %61 = getelementptr inbounds [1200 x i8], ptr %15, i64 0, i64 0
  %62 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %61, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.22) #7
  %63 = load ptr, ptr @stdout, align 8, !tbaa !5
  %64 = getelementptr inbounds [1200 x i8], ptr %15, i64 0, i64 0
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.3, ptr noundef %64) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %15) #7
  br label %155

66:                                               ; preds = %55
  %67 = load i64, ptr %5, align 8, !tbaa !10
  %68 = udiv i64 %67, 2
  %69 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %68) #9
  store ptr %69, ptr %9, align 8, !tbaa !5
  %70 = icmp ne ptr %69, null
  br i1 %70, label %77, label %71

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 1200, ptr %16) #7
  %72 = getelementptr inbounds [1200 x i8], ptr %16, i64 0, i64 0
  %73 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %72, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.23) #7
  %74 = load ptr, ptr @stdout, align 8, !tbaa !5
  %75 = getelementptr inbounds [1200 x i8], ptr %16, i64 0, i64 0
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str.3, ptr noundef %75) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %16) #7
  br label %154

77:                                               ; preds = %66
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = load i64, ptr %5, align 8, !tbaa !10
  %80 = sub i64 %79, 2
  %81 = udiv i64 %80, 2
  %82 = add i64 %81, 1
  %83 = getelementptr inbounds [131 x i8], ptr %4, i64 0, i64 0
  %84 = getelementptr inbounds i8, ptr %83, i64 2
  %85 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %78, i64 noundef %82, ptr noundef @.str.1, ptr noundef %84) #7
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = load i64, ptr %5, align 8, !tbaa !10
  %88 = sub i64 %87, 2
  %89 = udiv i64 %88, 2
  %90 = add i64 %89, 1
  %91 = getelementptr inbounds [131 x i8], ptr %4, i64 0, i64 0
  %92 = getelementptr inbounds i8, ptr %91, i64 2
  %93 = load i64, ptr %5, align 8, !tbaa !10
  %94 = sub i64 %93, 2
  %95 = udiv i64 %94, 2
  %96 = getelementptr inbounds i8, ptr %92, i64 %95
  %97 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %86, i64 noundef %90, ptr noundef @.str.1, ptr noundef %96) #7
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = call i32 @BN_hex2bn(ptr noundef %6, ptr noundef %98)
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %107, label %101

101:                                              ; preds = %77
  call void @llvm.lifetime.start.p0(i64 1200, ptr %17) #7
  %102 = getelementptr inbounds [1200 x i8], ptr %17, i64 0, i64 0
  %103 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %102, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.24) #7
  %104 = load ptr, ptr @stdout, align 8, !tbaa !5
  %105 = getelementptr inbounds [1200 x i8], ptr %17, i64 0, i64 0
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef @.str.3, ptr noundef %105) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %17) #7
  br label %153

107:                                              ; preds = %77
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = call i32 @BN_hex2bn(ptr noundef %7, ptr noundef %108)
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %117, label %111

111:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 1200, ptr %18) #7
  %112 = getelementptr inbounds [1200 x i8], ptr %18, i64 0, i64 0
  %113 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %112, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.25) #7
  %114 = load ptr, ptr @stdout, align 8, !tbaa !5
  %115 = getelementptr inbounds [1200 x i8], ptr %18, i64 0, i64 0
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %114, ptr noundef @.str.3, ptr noundef %115) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %18) #7
  br label %152

117:                                              ; preds = %107
  %118 = load ptr, ptr @NIST_P256_Curve, align 8, !tbaa !5
  store ptr %118, ptr %10, align 8, !tbaa !5
  %119 = icmp ne ptr %118, null
  br i1 %119, label %126, label %120

120:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 1200, ptr %19) #7
  %121 = getelementptr inbounds [1200 x i8], ptr %19, i64 0, i64 0
  %122 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %121, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.26) #7
  %123 = load ptr, ptr @stdout, align 8, !tbaa !5
  %124 = getelementptr inbounds [1200 x i8], ptr %19, i64 0, i64 0
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef @.str.3, ptr noundef %124) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %19) #7
  br label %151

126:                                              ; preds = %117
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = call ptr @EC_POINT_new(ptr noundef %127)
  store ptr %128, ptr %11, align 8, !tbaa !5
  %129 = icmp ne ptr %128, null
  br i1 %129, label %136, label %130

130:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 1200, ptr %20) #7
  %131 = getelementptr inbounds [1200 x i8], ptr %20, i64 0, i64 0
  %132 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %131, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.27) #7
  %133 = load ptr, ptr @stdout, align 8, !tbaa !5
  %134 = getelementptr inbounds [1200 x i8], ptr %20, i64 0, i64 0
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %133, ptr noundef @.str.3, ptr noundef %134) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %20) #7
  br label %150

136:                                              ; preds = %126
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = load ptr, ptr %11, align 8, !tbaa !5
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef %137, ptr noundef %138, ptr noundef %139, ptr noundef %140, ptr noundef null)
  %142 = icmp ne i32 %141, 0
  br i1 %142, label %149, label %143

143:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 1200, ptr %21) #7
  %144 = getelementptr inbounds [1200 x i8], ptr %21, i64 0, i64 0
  %145 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %144, i64 noundef 1200, ptr noundef @.str.1, ptr noundef @.str.28) #7
  %146 = load ptr, ptr @stdout, align 8, !tbaa !5
  %147 = getelementptr inbounds [1200 x i8], ptr %21, i64 0, i64 0
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %146, ptr noundef @.str.3, ptr noundef %147) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %21) #7
  br label %149

149:                                              ; preds = %143, %136
  br label %150

150:                                              ; preds = %149, %130
  br label %151

151:                                              ; preds = %150, %120
  br label %152

152:                                              ; preds = %151, %111
  br label %153

153:                                              ; preds = %152, %101
  br label %154

154:                                              ; preds = %153, %71
  br label %155

155:                                              ; preds = %154, %60
  br label %156

156:                                              ; preds = %155, %49
  br label %157

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

158:                                              ; preds = %157, %30
  %159 = getelementptr inbounds [131 x i8], ptr %4, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %159, i8 0, i64 131, i1 false)
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %160)
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %161)
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = icmp ne ptr null, %162
  br i1 %163, label %164, label %169

164:                                              ; preds = %158
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = call i64 @strlen(ptr noundef %166) #8
  call void @llvm.memset.p0.i64(ptr align 1 %165, i8 0, i64 %167, i1 false)
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %168) #7
  br label %169

169:                                              ; preds = %164, %158
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = icmp ne ptr null, %170
  br i1 %171, label %172, label %177

172:                                              ; preds = %169
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = call i64 @strlen(ptr noundef %174) #8
  call void @llvm.memset.p0.i64(ptr align 1 %173, i8 0, i64 %175, i1 false)
  %176 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %176) #7
  br label %177

177:                                              ; preds = %172, %169
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 131, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #7
  ret ptr %178
}

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind 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 allocsize(0,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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0,1) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}


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

@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@NIST_P256_Curve = external hidden local_unnamed_addr global ptr, align 8
@.str.19 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [70 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [66 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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) 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

declare ptr @EC_POINT_new(ptr noundef) local_unnamed_addr #1

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

declare void @BN_clear_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

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

declare signext i16 @msdb_communityGetPubAuthKey(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @community_getKPAK_point(ptr noundef %0) local_unnamed_addr #6 {
  %2 = alloca [131 x i8], align 16
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [1200 x i8], align 16
  %6 = alloca [1200 x i8], align 16
  %7 = alloca [1200 x i8], align 16
  %8 = alloca [1200 x i8], align 16
  %9 = alloca [1200 x i8], align 16
  %10 = alloca [1200 x i8], align 16
  %11 = alloca [1200 x i8], align 16
  %12 = alloca [1200 x i8], align 16
  %13 = alloca [1200 x i8], align 16
  %14 = alloca [1200 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 131, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store ptr null, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %15, label %.critedge

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %5) #8
  %16 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.19) #8
  %17 = load ptr, ptr @stdout, align 8, !tbaa !5
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.3, ptr noundef nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %5) #8
  br label %82

.critedge:                                        ; preds = %1
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(131) %2, i8 0, i64 131, i1 false)
  %19 = call signext i16 @msdb_communityGetPubAuthKey(ptr noundef nonnull %0, ptr noundef nonnull %2) #8
  %.not34 = icmp eq i16 %19, 0
  br i1 %.not34, label %24, label %20

20:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %6) #8
  %21 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %6, i64 noundef 1200, ptr noundef nonnull @.str.20, ptr noundef nonnull %0) #8
  %22 = load ptr, ptr @stdout, align 8, !tbaa !5
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %22, ptr noundef nonnull @.str.3, ptr noundef nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %6) #8
  br label %82

24:                                               ; preds = %.critedge
  %25 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #9
  %.not35 = icmp eq i64 %25, 0
  br i1 %.not35, label %26, label %30

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %7) #8
  %27 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %7, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.21) #8
  %28 = load ptr, ptr @stdout, align 8, !tbaa !5
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.3, ptr noundef nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %7) #8
  br label %82

30:                                               ; preds = %24
  %31 = lshr i64 %25, 1
  %32 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %31) #10
  %.not36 = icmp eq ptr %32, null
  br i1 %.not36, label %33, label %37

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %8) #8
  %34 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.22) #8
  %35 = load ptr, ptr @stdout, align 8, !tbaa !5
  %36 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %35, ptr noundef nonnull @.str.3, ptr noundef nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %8) #8
  br label %82

37:                                               ; preds = %30
  %38 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %31) #10
  %.not37 = icmp eq ptr %38, null
  br i1 %.not37, label %39, label %43

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %9) #8
  %40 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.23) #8
  %41 = load ptr, ptr @stdout, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.3, ptr noundef nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %9) #8
  br label %82

43:                                               ; preds = %37
  %44 = add i64 %25, -2
  %45 = lshr i64 %44, 1
  %46 = add nuw i64 %45, 1
  %47 = getelementptr inbounds i8, ptr %2, i64 2
  %48 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %32, i64 noundef %46, ptr noundef nonnull @.str.1, ptr noundef nonnull %47) #8
  %49 = getelementptr inbounds i8, ptr %47, i64 %45
  %50 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %38, i64 noundef %46, ptr noundef nonnull @.str.1, ptr noundef nonnull %49) #8
  %51 = call i32 @BN_hex2bn(ptr noundef nonnull %3, ptr noundef nonnull %32) #8
  %.not38 = icmp eq i32 %51, 0
  br i1 %.not38, label %52, label %56

52:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %10) #8
  %53 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %10, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.24) #8
  %54 = load ptr, ptr @stdout, align 8, !tbaa !5
  %55 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %54, ptr noundef nonnull @.str.3, ptr noundef nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %10) #8
  br label %82

56:                                               ; preds = %43
  %57 = call i32 @BN_hex2bn(ptr noundef nonnull %4, ptr noundef nonnull %38) #8
  %.not39 = icmp eq i32 %57, 0
  br i1 %.not39, label %58, label %62

58:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %11) #8
  %59 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %11, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.25) #8
  %60 = load ptr, ptr @stdout, align 8, !tbaa !5
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.3, ptr noundef nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %11) #8
  br label %82

62:                                               ; preds = %56
  %63 = load ptr, ptr @NIST_P256_Curve, align 8, !tbaa !5
  %.not40 = icmp eq ptr %63, null
  br i1 %.not40, label %64, label %68

64:                                               ; preds = %62
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %12) #8
  %65 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %12, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.26) #8
  %66 = load ptr, ptr @stdout, align 8, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str.3, ptr noundef nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %12) #8
  br label %82

68:                                               ; preds = %62
  %69 = call ptr @EC_POINT_new(ptr noundef nonnull %63) #8
  %.not41 = icmp eq ptr %69, null
  br i1 %.not41, label %70, label %74

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %13) #8
  %71 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %13, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.27) #8
  %72 = load ptr, ptr @stdout, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef nonnull @.str.3, ptr noundef nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %13) #8
  br label %82

74:                                               ; preds = %68
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef nonnull %63, ptr noundef nonnull %69, ptr noundef %75, ptr noundef %76, ptr noundef null) #8
  %.not42 = icmp eq i32 %77, 0
  br i1 %.not42, label %78, label %82

78:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %14) #8
  %79 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %14, i64 noundef 1200, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.28) #8
  %80 = load ptr, ptr @stdout, align 8, !tbaa !5
  %81 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %80, ptr noundef nonnull @.str.3, ptr noundef nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %14) #8
  br label %82

82:                                               ; preds = %15, %20, %33, %52, %64, %74, %78, %70, %58, %39, %26
  %.025 = phi ptr [ null, %15 ], [ null, %20 ], [ %32, %74 ], [ %32, %78 ], [ %32, %70 ], [ %32, %64 ], [ %32, %58 ], [ %32, %52 ], [ %32, %39 ], [ null, %33 ], [ null, %26 ]
  %.024 = phi ptr [ null, %15 ], [ null, %20 ], [ %38, %74 ], [ %38, %78 ], [ %38, %70 ], [ %38, %64 ], [ %38, %58 ], [ %38, %52 ], [ null, %39 ], [ null, %33 ], [ null, %26 ]
  %.0 = phi ptr [ null, %15 ], [ null, %20 ], [ %69, %74 ], [ %69, %78 ], [ null, %70 ], [ null, %64 ], [ null, %58 ], [ null, %52 ], [ null, %39 ], [ null, %33 ], [ null, %26 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(131) %2, i8 0, i64 131, i1 false)
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %83) #8
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %84) #8
  %.not43 = icmp eq ptr %.025, null
  br i1 %.not43, label %86, label %85

85:                                               ; preds = %82
  call void @free(ptr noundef nonnull %.025) #8
  br label %86

86:                                               ; preds = %85, %82
  %.not44 = icmp eq ptr %.024, null
  br i1 %.not44, label %88, label %87

87:                                               ; preds = %86
  call void @free(ptr noundef nonnull %.024) #8
  br label %88

88:                                               ; preds = %87, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 131, ptr nonnull %2) #8
  ret ptr %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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: write) }
attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind 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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }
attributes #10 = { nounwind allocsize(0,1) }

!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"}


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