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

; 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.msParameterSet_t = type { i16, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@ms_parameter_sets_initialised = external dso_local global i16, align 2
@ms_parameter_sets = external dso_local global [1 x %struct.msParameterSet_t], align 16
@.str = external hidden unnamed_addr constant [257 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [257 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [257 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [257 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [257 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [83 x i8], align 1
@__func__.ms_initParameterSets = external hidden unnamed_addr constant [21 x i8], align 1
@stdout = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [75 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local signext i16 @ms_initParameterSets() #0 {
  %1 = alloca i16, align 2
  %2 = alloca i8, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [1200 x i8], align 16
  %7 = alloca [1200 x i8], align 16
  %8 = alloca [1200 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 2, ptr %1) #5
  store i16 1, ptr %1, align 2, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %2) #5
  store i8 0, ptr %2, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store ptr null, ptr %3, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store ptr null, ptr %4, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store ptr null, ptr %5, align 8, !tbaa !10
  %9 = load i16, ptr @ms_parameter_sets_initialised, align 2, !tbaa !5
  %10 = icmp ne i16 %9, 0
  br i1 %10, label %172, label %11

11:                                               ; preds = %0
  call void @llvm.memset.p0.i64(ptr align 16 @ms_parameter_sets, i8 0, i64 64, i1 false)
  %12 = load i8, ptr %2, align 1, !tbaa !9
  %13 = zext i8 %12 to i64
  %14 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %13
  %15 = getelementptr inbounds %struct.msParameterSet_t, ptr %14, i32 0, i32 1
  store i8 1, ptr %15, align 2, !tbaa !12
  %16 = load i8, ptr %2, align 1, !tbaa !9
  %17 = zext i8 %16 to i64
  %18 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %17
  %19 = getelementptr inbounds %struct.msParameterSet_t, ptr %18, i32 0, i32 2
  store i8 -128, ptr %19, align 1, !tbaa !14
  %20 = call ptr @BN_new()
  %21 = load i8, ptr %2, align 1, !tbaa !9
  %22 = zext i8 %21 to i64
  %23 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %22
  %24 = getelementptr inbounds %struct.msParameterSet_t, ptr %23, i32 0, i32 3
  store ptr %20, ptr %24, align 8, !tbaa !15
  %25 = load i8, ptr %2, align 1, !tbaa !9
  %26 = zext i8 %25 to i64
  %27 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %26
  %28 = getelementptr inbounds %struct.msParameterSet_t, ptr %27, i32 0, i32 3
  %29 = call i32 @BN_hex2bn(ptr noundef %28, ptr noundef @.str)
  %30 = call ptr @BN_new()
  %31 = load i8, ptr %2, align 1, !tbaa !9
  %32 = zext i8 %31 to i64
  %33 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %32
  %34 = getelementptr inbounds %struct.msParameterSet_t, ptr %33, i32 0, i32 4
  store ptr %30, ptr %34, align 16, !tbaa !16
  %35 = load i8, ptr %2, align 1, !tbaa !9
  %36 = zext i8 %35 to i64
  %37 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %36
  %38 = getelementptr inbounds %struct.msParameterSet_t, ptr %37, i32 0, i32 4
  %39 = call i32 @BN_hex2bn(ptr noundef %38, ptr noundef @.str.1)
  %40 = call ptr @BN_new()
  %41 = load i8, ptr %2, align 1, !tbaa !9
  %42 = zext i8 %41 to i64
  %43 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %42
  %44 = getelementptr inbounds %struct.msParameterSet_t, ptr %43, i32 0, i32 6
  store ptr %40, ptr %44, align 16, !tbaa !17
  %45 = load i8, ptr %2, align 1, !tbaa !9
  %46 = zext i8 %45 to i64
  %47 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %46
  %48 = getelementptr inbounds %struct.msParameterSet_t, ptr %47, i32 0, i32 6
  %49 = call i32 @BN_hex2bn(ptr noundef %48, ptr noundef @.str.2)
  %50 = call ptr @BN_new()
  %51 = load i8, ptr %2, align 1, !tbaa !9
  %52 = zext i8 %51 to i64
  %53 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %52
  %54 = getelementptr inbounds %struct.msParameterSet_t, ptr %53, i32 0, i32 7
  store ptr %50, ptr %54, align 8, !tbaa !18
  %55 = load i8, ptr %2, align 1, !tbaa !9
  %56 = zext i8 %55 to i64
  %57 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.msParameterSet_t, ptr %57, i32 0, i32 7
  %59 = call i32 @BN_hex2bn(ptr noundef %58, ptr noundef @.str.3)
  %60 = call ptr @BN_new()
  %61 = load i8, ptr %2, align 1, !tbaa !9
  %62 = zext i8 %61 to i64
  %63 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %62
  %64 = getelementptr inbounds %struct.msParameterSet_t, ptr %63, i32 0, i32 8
  store ptr %60, ptr %64, align 16, !tbaa !19
  %65 = load i8, ptr %2, align 1, !tbaa !9
  %66 = zext i8 %65 to i64
  %67 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %66
  %68 = getelementptr inbounds %struct.msParameterSet_t, ptr %67, i32 0, i32 8
  %69 = call i32 @BN_hex2bn(ptr noundef %68, ptr noundef @.str.4)
  %70 = load i8, ptr %2, align 1, !tbaa !9
  %71 = zext i8 %70 to i64
  %72 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %71
  %73 = getelementptr inbounds %struct.msParameterSet_t, ptr %72, i32 0, i32 0
  store i16 1, ptr %73, align 16, !tbaa !20
  %74 = load i8, ptr %2, align 1, !tbaa !9
  %75 = zext i8 %74 to i64
  %76 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %75
  %77 = getelementptr inbounds %struct.msParameterSet_t, ptr %76, i32 0, i32 6
  %78 = load ptr, ptr %77, align 16, !tbaa !17
  %79 = icmp ne ptr null, %78
  br i1 %79, label %80, label %171

80:                                               ; preds = %11
  %81 = load i8, ptr %2, align 1, !tbaa !9
  %82 = zext i8 %81 to i64
  %83 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %82
  %84 = getelementptr inbounds %struct.msParameterSet_t, ptr %83, i32 0, i32 7
  %85 = load ptr, ptr %84, align 8, !tbaa !18
  %86 = icmp ne ptr null, %85
  br i1 %86, label %87, label %171

87:                                               ; preds = %80
  %88 = load i8, ptr %2, align 1, !tbaa !9
  %89 = zext i8 %88 to i64
  %90 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %89
  %91 = getelementptr inbounds %struct.msParameterSet_t, ptr %90, i32 0, i32 3
  %92 = load ptr, ptr %91, align 8, !tbaa !15
  %93 = icmp ne ptr null, %92
  br i1 %93, label %94, label %171

94:                                               ; preds = %87
  %95 = call ptr @BN_CTX_new()
  store ptr %95, ptr %5, align 8, !tbaa !10
  %96 = call ptr @BN_new()
  store ptr %96, ptr %3, align 8, !tbaa !10
  %97 = call ptr @BN_new()
  store ptr %97, ptr %4, align 8, !tbaa !10
  %98 = call i32 @BN_dec2bn(ptr noundef %3, ptr noundef @.str.5)
  %99 = call i32 @BN_dec2bn(ptr noundef %4, ptr noundef @.str.6)
  %100 = load i8, ptr %2, align 1, !tbaa !9
  %101 = zext i8 %100 to i64
  %102 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %101
  %103 = getelementptr inbounds %struct.msParameterSet_t, ptr %102, i32 0, i32 3
  %104 = load ptr, ptr %103, align 8, !tbaa !15
  %105 = load ptr, ptr %3, align 8, !tbaa !10
  %106 = load ptr, ptr %4, align 8, !tbaa !10
  %107 = load ptr, ptr %5, align 8, !tbaa !10
  %108 = call ptr @EC_GROUP_new_curve_GFp(ptr noundef %104, ptr noundef %105, ptr noundef %106, ptr noundef %107)
  %109 = load i8, ptr %2, align 1, !tbaa !9
  %110 = zext i8 %109 to i64
  %111 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %110
  %112 = getelementptr inbounds %struct.msParameterSet_t, ptr %111, i32 0, i32 9
  store ptr %108, ptr %112, align 8, !tbaa !21
  %113 = load i8, ptr %2, align 1, !tbaa !9
  %114 = zext i8 %113 to i64
  %115 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %114
  %116 = getelementptr inbounds %struct.msParameterSet_t, ptr %115, i32 0, i32 9
  %117 = load ptr, ptr %116, align 8, !tbaa !21
  %118 = icmp ne ptr null, %117
  br i1 %118, label %119, label %161

119:                                              ; preds = %94
  %120 = load i8, ptr %2, align 1, !tbaa !9
  %121 = zext i8 %120 to i64
  %122 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %121
  %123 = getelementptr inbounds %struct.msParameterSet_t, ptr %122, i32 0, i32 9
  %124 = load ptr, ptr %123, align 8, !tbaa !21
  %125 = call ptr @EC_POINT_new(ptr noundef %124)
  %126 = load i8, ptr %2, align 1, !tbaa !9
  %127 = zext i8 %126 to i64
  %128 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %127
  %129 = getelementptr inbounds %struct.msParameterSet_t, ptr %128, i32 0, i32 5
  store ptr %125, ptr %129, align 8, !tbaa !22
  %130 = load i8, ptr %2, align 1, !tbaa !9
  %131 = zext i8 %130 to i64
  %132 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %131
  %133 = getelementptr inbounds %struct.msParameterSet_t, ptr %132, i32 0, i32 9
  %134 = load ptr, ptr %133, align 8, !tbaa !21
  %135 = load i8, ptr %2, align 1, !tbaa !9
  %136 = zext i8 %135 to i64
  %137 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %136
  %138 = getelementptr inbounds %struct.msParameterSet_t, ptr %137, i32 0, i32 5
  %139 = load ptr, ptr %138, align 8, !tbaa !22
  %140 = load i8, ptr %2, align 1, !tbaa !9
  %141 = zext i8 %140 to i64
  %142 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %141
  %143 = getelementptr inbounds %struct.msParameterSet_t, ptr %142, i32 0, i32 6
  %144 = load ptr, ptr %143, align 16, !tbaa !17
  %145 = load i8, ptr %2, align 1, !tbaa !9
  %146 = zext i8 %145 to i64
  %147 = getelementptr inbounds [1 x %struct.msParameterSet_t], ptr @ms_parameter_sets, i64 0, i64 %146
  %148 = getelementptr inbounds %struct.msParameterSet_t, ptr %147, i32 0, i32 7
  %149 = load ptr, ptr %148, align 8, !tbaa !18
  %150 = load ptr, ptr %5, align 8, !tbaa !10
  %151 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef %134, ptr noundef %139, ptr noundef %144, ptr noundef %149, ptr noundef %150)
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %119
  store i16 0, ptr %1, align 2, !tbaa !5
  store i16 1, ptr @ms_parameter_sets_initialised, align 2, !tbaa !5
  store i16 0, ptr %1, align 2, !tbaa !5
  br label %160

154:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 1200, ptr %6) #5
  %155 = getelementptr inbounds [1200 x i8], ptr %6, i64 0, i64 0
  %156 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %155, i64 noundef 1200, ptr noundef @.str.7, ptr noundef @.str.8, ptr noundef @__func__.ms_initParameterSets, i32 noundef 216) #5
  %157 = load ptr, ptr @stdout, align 8, !tbaa !10
  %158 = getelementptr inbounds [1200 x i8], ptr %6, i64 0, i64 0
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str.9, ptr noundef %158) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %6) #5
  br label %160

160:                                              ; preds = %154, %153
  br label %167

161:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 1200, ptr %7) #5
  %162 = getelementptr inbounds [1200 x i8], ptr %7, i64 0, i64 0
  %163 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %162, i64 noundef 1200, ptr noundef @.str.10, ptr noundef @.str.8, ptr noundef @__func__.ms_initParameterSets, i32 noundef 221) #5
  %164 = load ptr, ptr @stdout, align 8, !tbaa !10
  %165 = getelementptr inbounds [1200 x i8], ptr %7, i64 0, i64 0
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %164, ptr noundef @.str.9, ptr noundef %165) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %7) #5
  br label %167

167:                                              ; preds = %161, %160
  %168 = load ptr, ptr %5, align 8, !tbaa !10
  call void @BN_CTX_free(ptr noundef %168)
  %169 = load ptr, ptr %3, align 8, !tbaa !10
  call void @BN_clear_free(ptr noundef %169)
  %170 = load ptr, ptr %4, align 8, !tbaa !10
  call void @BN_clear_free(ptr noundef %170)
  store ptr null, ptr %5, align 8, !tbaa !10
  store ptr null, ptr %3, align 8, !tbaa !10
  store ptr null, ptr %4, align 8, !tbaa !10
  br label %171

171:                                              ; preds = %167, %87, %80, %11
  br label %178

172:                                              ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1200, ptr %8) #5
  %173 = getelementptr inbounds [1200 x i8], ptr %8, i64 0, i64 0
  %174 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %173, i64 noundef 1200, ptr noundef @.str.11, ptr noundef @.str.8, ptr noundef @__func__.ms_initParameterSets, i32 noundef 240) #5
  %175 = load ptr, ptr @stdout, align 8, !tbaa !10
  %176 = getelementptr inbounds [1200 x i8], ptr %8, i64 0, i64 0
  %177 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %175, ptr noundef @.str.9, ptr noundef %176) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr %8) #5
  store i16 0, ptr %1, align 2, !tbaa !5
  br label %178

178:                                              ; preds = %172, %171
  %179 = load i16, ptr %1, align 2, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %1) #5
  ret i16 %179
}

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

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

declare ptr @BN_new() #3

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

declare ptr @BN_CTX_new() #3

declare i32 @BN_dec2bn(ptr noundef, ptr noundef) #3

declare ptr @EC_GROUP_new_curve_GFp(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare ptr @EC_POINT_new(ptr noundef) #3

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

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

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

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

declare void @BN_CTX_free(ptr noundef) #3

declare void @BN_clear_free(ptr noundef) #3

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 "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 }

!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 = !{!"short", !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 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !7, i64 2}
!13 = !{!"msParameterSet_t", !6, i64 0, !7, i64 2, !7, i64 3, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!14 = !{!13, !7, i64 3}
!15 = !{!13, !11, i64 8}
!16 = !{!13, !11, i64 16}
!17 = !{!13, !11, i64 32}
!18 = !{!13, !11, i64 40}
!19 = !{!13, !11, i64 48}
!20 = !{!13, !6, i64 0}
!21 = !{!13, !11, i64 56}
!22 = !{!13, !11, i64 24}


; 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.msParameterSet_t = type { i16, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@ms_parameter_sets_initialised = external dso_local local_unnamed_addr global i16, align 2
@ms_parameter_sets = external dso_local global [1 x %struct.msParameterSet_t], align 16
@.str = external hidden unnamed_addr constant [257 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [257 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [257 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [257 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [257 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [83 x i8], align 1
@__func__.ms_initParameterSets = external hidden unnamed_addr constant [21 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [68 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [75 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local signext range(i16 0, 2) i16 @ms_initParameterSets() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca [1200 x i8], align 16
  %4 = alloca [1200 x i8], align 16
  %5 = alloca [1200 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  store ptr null, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store ptr null, ptr %2, align 8, !tbaa !5
  %6 = load i16, ptr @ms_parameter_sets_initialised, align 2, !tbaa !9
  %.not = icmp eq i16 %6, 0
  br i1 %.not, label %7, label %49

7:                                                ; preds = %0
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) @ms_parameter_sets, i8 0, i64 64, i1 false)
  store i8 1, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 2), align 2, !tbaa !11
  store i8 -128, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 3), align 1, !tbaa !13
  %8 = tail call ptr @BN_new() #5
  store ptr %8, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 8), align 8, !tbaa !14
  %9 = tail call i32 @BN_hex2bn(ptr noundef nonnull getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 8), ptr noundef nonnull @.str) #5
  %10 = tail call ptr @BN_new() #5
  store ptr %10, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 16), align 16, !tbaa !15
  %11 = tail call i32 @BN_hex2bn(ptr noundef nonnull getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 16), ptr noundef nonnull @.str.1) #5
  %12 = tail call ptr @BN_new() #5
  store ptr %12, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 32), align 16, !tbaa !16
  %13 = tail call i32 @BN_hex2bn(ptr noundef nonnull getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 32), ptr noundef nonnull @.str.2) #5
  %14 = tail call ptr @BN_new() #5
  store ptr %14, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 40), align 8, !tbaa !17
  %15 = tail call i32 @BN_hex2bn(ptr noundef nonnull getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 40), ptr noundef nonnull @.str.3) #5
  %16 = tail call ptr @BN_new() #5
  store ptr %16, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 48), align 16, !tbaa !18
  %17 = tail call i32 @BN_hex2bn(ptr noundef nonnull getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 48), ptr noundef nonnull @.str.4) #5
  store i16 1, ptr @ms_parameter_sets, align 16, !tbaa !19
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 32), align 16, !tbaa !16
  %.not29 = icmp eq ptr %18, null
  %19 = load ptr, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 40), align 8
  %.not30 = icmp eq ptr %19, null
  %or.cond = select i1 %.not29, i1 true, i1 %.not30
  %20 = load ptr, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 8), align 8
  %.not31 = icmp eq ptr %20, null
  %or.cond34 = select i1 %or.cond, i1 true, i1 %.not31
  br i1 %or.cond34, label %53, label %21

21:                                               ; preds = %7
  %22 = tail call ptr @BN_CTX_new() #5
  %23 = tail call ptr @BN_new() #5
  store ptr %23, ptr %1, align 8, !tbaa !5
  %24 = tail call ptr @BN_new() #5
  store ptr %24, ptr %2, align 8, !tbaa !5
  %25 = call i32 @BN_dec2bn(ptr noundef nonnull %1, ptr noundef nonnull @.str.5) #5
  %26 = call i32 @BN_dec2bn(ptr noundef nonnull %2, ptr noundef nonnull @.str.6) #5
  %27 = load ptr, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 8), align 8, !tbaa !14
  %28 = load ptr, ptr %1, align 8, !tbaa !5
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = call ptr @EC_GROUP_new_curve_GFp(ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %22) #5
  store ptr %30, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 56), align 8, !tbaa !20
  %.not32 = icmp eq ptr %30, null
  br i1 %.not32, label %42, label %31

31:                                               ; preds = %21
  %32 = call ptr @EC_POINT_new(ptr noundef nonnull %30) #5
  store ptr %32, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 24), align 8, !tbaa !21
  %33 = load ptr, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 56), align 8, !tbaa !20
  %34 = load ptr, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 32), align 16, !tbaa !16
  %35 = load ptr, ptr getelementptr inbounds (i8, ptr @ms_parameter_sets, i64 40), align 8, !tbaa !17
  %36 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef %33, ptr noundef %32, ptr noundef %34, ptr noundef %35, ptr noundef %22) #5
  %.not33 = icmp eq i32 %36, 0
  br i1 %.not33, label %38, label %37

37:                                               ; preds = %31
  store i16 1, ptr @ms_parameter_sets_initialised, align 2, !tbaa !9
  br label %46

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %3) #5
  %39 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %3, i64 noundef 1200, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.ms_initParameterSets, i32 noundef 216) #5
  %40 = load ptr, ptr @stdout, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.9, ptr noundef nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %3) #5
  br label %46

42:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %4) #5
  %43 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %4, i64 noundef 1200, ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.ms_initParameterSets, i32 noundef 221) #5
  %44 = load ptr, ptr @stdout, align 8, !tbaa !5
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.9, ptr noundef nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %4) #5
  br label %46

46:                                               ; preds = %37, %38, %42
  %.0 = phi i16 [ 0, %37 ], [ 1, %38 ], [ 1, %42 ]
  call void @BN_CTX_free(ptr noundef %22) #5
  %47 = load ptr, ptr %1, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %47) #5
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %48) #5
  br label %53

49:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %5) #5
  %50 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %5, i64 noundef 1200, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.ms_initParameterSets, i32 noundef 240) #5
  %51 = load ptr, ptr @stdout, align 8, !tbaa !5
  %52 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.9, ptr noundef nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %5) #5
  br label %53

53:                                               ; preds = %7, %46, %49
  %.1 = phi i16 [ 0, %49 ], [ %.0, %46 ], [ 1, %7 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i16 %.1
}

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

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

declare ptr @BN_new() local_unnamed_addr #3

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

declare ptr @BN_CTX_new() local_unnamed_addr #3

declare i32 @BN_dec2bn(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @EC_GROUP_new_curve_GFp(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @EC_POINT_new(ptr noundef) local_unnamed_addr #3

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

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

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

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

declare void @BN_CTX_free(ptr noundef) local_unnamed_addr #3

declare void @BN_clear_free(ptr noundef) local_unnamed_addr #3

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { 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 #5 = { 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, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = !{!12, !7, i64 2}
!12 = !{!"msParameterSet_t", !10, i64 0, !7, i64 2, !7, i64 3, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!13 = !{!12, !7, i64 3}
!14 = !{!12, !6, i64 8}
!15 = !{!12, !6, i64 16}
!16 = !{!12, !6, i64 32}
!17 = !{!12, !6, i64 40}
!18 = !{!12, !6, i64 48}
!19 = !{!12, !10, i64 0}
!20 = !{!12, !6, i64 56}
!21 = !{!12, !6, i64 24}


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