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

; 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 = external hidden unnamed_addr constant [3 x i8], align 1
@stdout = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [64 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: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #1

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @user_getRSKpoint(ptr noundef %0, i64 noundef %1, ptr noundef %2) #6 {
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [515 x i8], align 16
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %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
  %22 = alloca [1200 x i8], align 16
  %23 = alloca [1200 x i8], align 16
  %24 = alloca [1200 x i8], align 16
  %25 = alloca [1200 x i8], align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  store ptr %2, 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 515, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store i64 0, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr null, ptr %14, align 8, !tbaa !5
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = icmp eq ptr null, %26
  br i1 %27, label %28, label %34

28:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 1200, ptr %15) #7
  %29 = getelementptr inbounds [1200 x i8], ptr %15, i64 0, i64 0
  %30 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %29, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.32) #7
  %31 = load ptr, ptr @stdout, align 8, !tbaa !5
  %32 = getelementptr inbounds [1200 x i8], ptr %15, i64 0, i64 0
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str.2, ptr noundef %32) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %15) #7
  br label %174

34:                                               ; preds = %3
  %35 = load i64, ptr %5, align 8, !tbaa !9
  %36 = icmp eq i64 %35, 0
  br i1 %36, label %37, label %43

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

43:                                               ; preds = %34
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = icmp eq ptr null, %44
  br i1 %45, label %46, label %52

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1200, ptr %17) #7
  %47 = getelementptr inbounds [1200 x i8], ptr %17, i64 0, i64 0
  %48 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %47, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.34) #7
  %49 = load ptr, ptr @stdout, align 8, !tbaa !5
  %50 = getelementptr inbounds [1200 x i8], ptr %17, i64 0, i64 0
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %49, ptr noundef @.str.2, ptr noundef %50) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %17) #7
  br label %172

52:                                               ; preds = %43
  %53 = getelementptr inbounds [515 x i8], ptr %9, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %53, i8 0, i64 515, i1 false)
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = load i64, ptr %5, align 8, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = call signext i16 @msdb_userGetRSK(ptr noundef %54, i64 noundef %55, ptr noundef %56, ptr noundef %9)
  %58 = icmp ne i16 %57, 0
  br i1 %58, label %171, label %59

59:                                               ; preds = %52
  %60 = getelementptr inbounds [515 x i8], ptr %9, i64 0, i64 0
  %61 = call i64 @strlen(ptr noundef %60) #8
  store i64 %61, ptr %10, align 8, !tbaa !9
  %62 = icmp ne i64 %61, 0
  br i1 %62, label %69, label %63

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 1200, ptr %18) #7
  %64 = getelementptr inbounds [1200 x i8], ptr %18, i64 0, i64 0
  %65 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %64, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.35) #7
  %66 = load ptr, ptr @stdout, align 8, !tbaa !5
  %67 = getelementptr inbounds [1200 x i8], ptr %18, i64 0, i64 0
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef @.str.2, ptr noundef %67) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %18) #7
  br label %170

69:                                               ; preds = %59
  %70 = load i64, ptr %10, align 8, !tbaa !9
  %71 = udiv i64 %70, 2
  %72 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %71) #9
  store ptr %72, ptr %11, align 8, !tbaa !5
  %73 = icmp ne ptr %72, null
  br i1 %73, label %80, label %74

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1200, ptr %19) #7
  %75 = getelementptr inbounds [1200 x i8], ptr %19, i64 0, i64 0
  %76 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %75, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.36) #7
  %77 = load ptr, ptr @stdout, align 8, !tbaa !5
  %78 = getelementptr inbounds [1200 x i8], ptr %19, i64 0, i64 0
  %79 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str.2, ptr noundef %78) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %19) #7
  br label %169

80:                                               ; preds = %69
  %81 = load i64, ptr %10, align 8, !tbaa !9
  %82 = udiv i64 %81, 2
  %83 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %82) #9
  store ptr %83, ptr %12, align 8, !tbaa !5
  %84 = icmp ne ptr %83, null
  br i1 %84, label %91, label %85

85:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 1200, ptr %20) #7
  %86 = getelementptr inbounds [1200 x i8], ptr %20, i64 0, i64 0
  %87 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %86, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.37) #7
  %88 = load ptr, ptr @stdout, align 8, !tbaa !5
  %89 = getelementptr inbounds [1200 x i8], ptr %20, i64 0, i64 0
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.2, ptr noundef %89) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %20) #7
  br label %168

91:                                               ; preds = %80
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load i64, ptr %10, align 8, !tbaa !9
  %94 = sub i64 %93, 2
  %95 = udiv i64 %94, 2
  %96 = add i64 %95, 1
  %97 = getelementptr inbounds [515 x i8], ptr %9, i64 0, i64 0
  %98 = getelementptr inbounds i8, ptr %97, i64 2
  %99 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %92, i64 noundef %96, ptr noundef @.str, ptr noundef %98) #7
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = load i64, ptr %10, align 8, !tbaa !9
  %102 = sub i64 %101, 2
  %103 = udiv i64 %102, 2
  %104 = add i64 %103, 1
  %105 = getelementptr inbounds [515 x i8], ptr %9, i64 0, i64 0
  %106 = getelementptr inbounds i8, ptr %105, i64 2
  %107 = load i64, ptr %10, align 8, !tbaa !9
  %108 = sub i64 %107, 2
  %109 = udiv i64 %108, 2
  %110 = getelementptr inbounds i8, ptr %106, i64 %109
  %111 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %100, i64 noundef %104, ptr noundef @.str, ptr noundef %110) #7
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = call i32 @BN_hex2bn(ptr noundef %13, ptr noundef %112)
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %121, label %115

115:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 1200, ptr %21) #7
  %116 = getelementptr inbounds [1200 x i8], ptr %21, i64 0, i64 0
  %117 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %116, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.38) #7
  %118 = load ptr, ptr @stdout, align 8, !tbaa !5
  %119 = getelementptr inbounds [1200 x i8], ptr %21, i64 0, i64 0
  %120 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef @.str.2, ptr noundef %119) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %21) #7
  br label %167

121:                                              ; preds = %91
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = call i32 @BN_hex2bn(ptr noundef %14, ptr noundef %122)
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %131, label %125

125:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 1200, ptr %22) #7
  %126 = getelementptr inbounds [1200 x i8], ptr %22, i64 0, i64 0
  %127 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %126, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.39) #7
  %128 = load ptr, ptr @stdout, align 8, !tbaa !5
  %129 = getelementptr inbounds [1200 x i8], ptr %22, i64 0, i64 0
  %130 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %128, ptr noundef @.str.2, ptr noundef %129) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %22) #7
  br label %166

131:                                              ; preds = %121
  %132 = call ptr @ms_getParameter_E(i8 noundef zeroext 1)
  store ptr %132, ptr %7, align 8, !tbaa !5
  %133 = icmp ne ptr %132, null
  br i1 %133, label %140, label %134

134:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 1200, ptr %23) #7
  %135 = getelementptr inbounds [1200 x i8], ptr %23, i64 0, i64 0
  %136 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %135, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.40) #7
  %137 = load ptr, ptr @stdout, align 8, !tbaa !5
  %138 = getelementptr inbounds [1200 x i8], ptr %23, i64 0, i64 0
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %137, ptr noundef @.str.2, ptr noundef %138) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %23) #7
  br label %165

140:                                              ; preds = %131
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = call ptr @EC_POINT_new(ptr noundef %141)
  store ptr %142, ptr %8, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %150, label %144

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

150:                                              ; preds = %140
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  %153 = load ptr, ptr %13, align 8, !tbaa !5
  %154 = load ptr, ptr %14, align 8, !tbaa !5
  %155 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef %151, ptr noundef %152, ptr noundef %153, ptr noundef %154, ptr noundef null)
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %163, label %157

157:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 1200, ptr %25) #7
  %158 = getelementptr inbounds [1200 x i8], ptr %25, i64 0, i64 0
  %159 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %158, i64 noundef 1200, ptr noundef @.str, ptr noundef @.str.42) #7
  %160 = load ptr, ptr @stdout, align 8, !tbaa !5
  %161 = getelementptr inbounds [1200 x i8], ptr %25, i64 0, i64 0
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %160, ptr noundef @.str.2, ptr noundef %161) #7
  call void @llvm.lifetime.end.p0(i64 1200, ptr %25) #7
  br label %163

163:                                              ; preds = %157, %150
  br label %164

164:                                              ; preds = %163, %144
  br label %165

165:                                              ; preds = %164, %134
  br label %166

166:                                              ; preds = %165, %125
  br label %167

167:                                              ; preds = %166, %115
  br label %168

168:                                              ; preds = %167, %85
  br label %169

169:                                              ; preds = %168, %74
  br label %170

170:                                              ; preds = %169, %63
  br label %171

171:                                              ; preds = %170, %52
  br label %172

172:                                              ; preds = %171, %46
  br label %173

173:                                              ; preds = %172, %37
  br label %174

174:                                              ; preds = %173, %28
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = icmp ne ptr null, %175
  br i1 %176, label %177, label %182

177:                                              ; preds = %174
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = call i64 @strlen(ptr noundef %179) #8
  call void @llvm.memset.p0.i64(ptr align 1 %178, i8 0, i64 %180, i1 false)
  %181 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %181) #7
  br label %182

182:                                              ; preds = %177, %174
  %183 = load ptr, ptr %12, align 8, !tbaa !5
  %184 = icmp ne ptr null, %183
  br i1 %184, label %185, label %190

185:                                              ; preds = %182
  %186 = load ptr, ptr %12, align 8, !tbaa !5
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = call i64 @strlen(ptr noundef %187) #8
  call void @llvm.memset.p0.i64(ptr align 1 %186, i8 0, i64 %188, i1 false)
  %189 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %189) #7
  br label %190

190:                                              ; preds = %185, %182
  %191 = getelementptr inbounds [515 x i8], ptr %9, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %191, i8 0, i64 515, i1 false)
  %192 = load ptr, ptr %13, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %192)
  %193 = load ptr, ptr %14, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %193)
  %194 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  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 515, 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
  ret ptr %194
}

declare signext i16 @msdb_userGetRSK(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #5

declare ptr @ms_getParameter_E(i8 noundef zeroext) #5

declare ptr @EC_POINT_new(ptr noundef) #5

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

declare void @BN_clear_free(ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { "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 = { 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 = !{!10, !10, i64 0}
!10 = !{!"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 = external hidden unnamed_addr constant [3 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.35 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.39 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.40 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [64 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: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @user_getRSKpoint(ptr noundef %0, i64 noundef %1, ptr noundef %2) local_unnamed_addr #7 {
  %4 = alloca [515 x i8], align 16
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %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
  %15 = alloca [1200 x i8], align 16
  %16 = alloca [1200 x i8], align 16
  %17 = alloca [1200 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 515, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  store ptr null, ptr %6, align 8, !tbaa !5
  %18 = icmp eq ptr %0, null
  br i1 %18, label %19, label %23

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

23:                                               ; preds = %3
  %24 = icmp eq i64 %1, 0
  br i1 %24, label %25, label %29

25:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %8) #8
  %26 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 1200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.33) #8
  %27 = load ptr, ptr @stdout, align 8, !tbaa !5
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %27, ptr noundef nonnull @.str.2, ptr noundef nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %8) #8
  br label %.thread58

29:                                               ; preds = %23
  %30 = icmp eq ptr %2, null
  br i1 %30, label %31, label %35

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %9) #8
  %32 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %9, i64 noundef 1200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.34) #8
  %33 = load ptr, ptr @stdout, align 8, !tbaa !5
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.2, ptr noundef nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %9) #8
  br label %.thread58

35:                                               ; preds = %29
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(515) %4, i8 0, i64 515, i1 false)
  %36 = call signext i16 @msdb_userGetRSK(ptr noundef nonnull %0, i64 noundef %1, ptr noundef nonnull %2, ptr noundef nonnull %4) #8
  %.not = icmp eq i16 %36, 0
  br i1 %.not, label %37, label %.thread58

37:                                               ; preds = %35
  %38 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %4) #9
  %.not38 = icmp eq i64 %38, 0
  br i1 %.not38, label %39, label %43

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

43:                                               ; preds = %37
  %44 = lshr i64 %38, 1
  %45 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %44) #10
  %.not39 = icmp eq ptr %45, null
  br i1 %.not39, label %46, label %50

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %11) #8
  %47 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %11, i64 noundef 1200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.36) #8
  %48 = load ptr, ptr @stdout, align 8, !tbaa !5
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.2, ptr noundef nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %11) #8
  br label %.thread58

50:                                               ; preds = %43
  %51 = call noalias ptr @calloc(i64 noundef 1, i64 noundef %44) #10
  %.not40 = icmp eq ptr %51, null
  br i1 %.not40, label %52, label %56

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

56:                                               ; preds = %50
  %57 = add i64 %38, -2
  %58 = lshr i64 %57, 1
  %59 = add nuw i64 %58, 1
  %60 = getelementptr inbounds i8, ptr %4, i64 2
  %61 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %45, i64 noundef %59, ptr noundef nonnull @.str, ptr noundef nonnull %60) #8
  %62 = getelementptr inbounds i8, ptr %60, i64 %58
  %63 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %51, i64 noundef %59, ptr noundef nonnull @.str, ptr noundef nonnull %62) #8
  %64 = call i32 @BN_hex2bn(ptr noundef nonnull %5, ptr noundef nonnull %45) #8
  %.not41 = icmp eq i32 %64, 0
  br i1 %.not41, label %65, label %69

65:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %13) #8
  %66 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %13, i64 noundef 1200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.38) #8
  %67 = load ptr, ptr @stdout, align 8, !tbaa !5
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.2, ptr noundef nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %13) #8
  br label %95

69:                                               ; preds = %56
  %70 = call i32 @BN_hex2bn(ptr noundef nonnull %6, ptr noundef nonnull %51) #8
  %.not42 = icmp eq i32 %70, 0
  br i1 %.not42, label %71, label %75

71:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %14) #8
  %72 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %14, i64 noundef 1200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.39) #8
  %73 = load ptr, ptr @stdout, align 8, !tbaa !5
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef nonnull @.str.2, ptr noundef nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %14) #8
  br label %95

75:                                               ; preds = %69
  %76 = call ptr @ms_getParameter_E(i8 noundef zeroext 1) #8
  %.not43 = icmp eq ptr %76, null
  br i1 %.not43, label %77, label %81

77:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %15) #8
  %78 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %15, i64 noundef 1200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.40) #8
  %79 = load ptr, ptr @stdout, align 8, !tbaa !5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull @.str.2, ptr noundef nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %15) #8
  br label %95

81:                                               ; preds = %75
  %82 = call ptr @EC_POINT_new(ptr noundef nonnull %76) #8
  %.not44 = icmp eq ptr %82, null
  br i1 %.not44, label %83, label %87

83:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %16) #8
  %84 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %16, i64 noundef 1200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.41) #8
  %85 = load ptr, ptr @stdout, align 8, !tbaa !5
  %86 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef nonnull @.str.2, ptr noundef nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %16) #8
  br label %95

87:                                               ; preds = %81
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef nonnull %76, ptr noundef nonnull %82, ptr noundef %88, ptr noundef %89, ptr noundef null) #8
  %.not45 = icmp eq i32 %90, 0
  br i1 %.not45, label %91, label %95

91:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %17) #8
  %92 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %17, i64 noundef 1200, ptr noundef nonnull @.str, ptr noundef nonnull @.str.42) #8
  %93 = load ptr, ptr @stdout, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.2, ptr noundef nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %17) #8
  br label %95

95:                                               ; preds = %52, %65, %71, %77, %83, %91, %87
  %.027.ph = phi ptr [ null, %52 ], [ null, %65 ], [ null, %71 ], [ null, %77 ], [ null, %83 ], [ %82, %91 ], [ %82, %87 ]
  call void @free(ptr noundef nonnull %45) #8
  br i1 %.not40, label %.thread58, label %96

96:                                               ; preds = %95
  call void @free(ptr noundef nonnull %51) #8
  br label %.thread58

.thread58:                                        ; preds = %39, %46, %35, %31, %25, %19, %96, %95
  %.0275362 = phi ptr [ %.027.ph, %96 ], [ %.027.ph, %95 ], [ null, %19 ], [ null, %25 ], [ null, %31 ], [ null, %35 ], [ null, %46 ], [ null, %39 ]
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(515) %4, i8 0, i64 515, i1 false)
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %97) #8
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  call void @BN_clear_free(ptr noundef %98) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 515, ptr nonnull %4) #8
  ret ptr %.0275362
}

declare signext i16 @msdb_userGetRSK(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #6

declare ptr @ms_getParameter_E(i8 noundef zeroext) local_unnamed_addr #6

declare ptr @EC_POINT_new(ptr noundef) local_unnamed_addr #6

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

declare void @BN_clear_free(ptr noundef) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { "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 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 #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,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass