; LLVM IR from ARMmbed/mbed-crypto :: library (ecp)

; 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.mbedtls_ecp_group = type { i32, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_ecp_point, %struct.mbedtls_mpi, i64, i64, i32, ptr, ptr, ptr, ptr, ptr, i64 }
%struct.mbedtls_ecp_point = type { %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi }
%struct.mbedtls_mpi = type { i32, i64, ptr }

@__const.mbedtls_ecp_self_test.exponents = external hidden unnamed_addr constant [6 x ptr], align 16
@.str.6 = external hidden unnamed_addr constant [50 x i8], align 1
@add_count = external hidden global i64, align 8
@dbl_count = external hidden global i64, align 8
@mul_count = external hidden global i64, align 8
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ecp_point_init(ptr noundef) #1

declare void @mbedtls_mpi_init(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ecp_group_init(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ecp_point_free(ptr noundef) #1

declare void @mbedtls_mpi_free(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ecp_group_free(ptr noundef) #1

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

declare i32 @mbedtls_mpi_lset(ptr noundef, i64 noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_ecp_mul(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_ecp_self_test(i32 noundef %0) #1 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca %struct.mbedtls_ecp_group, align 8
  %6 = alloca %struct.mbedtls_ecp_point, align 8
  %7 = alloca %struct.mbedtls_ecp_point, align 8
  %8 = alloca %struct.mbedtls_mpi, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca [6 x ptr], align 16
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 -110, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 248, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 @__const.mbedtls_ecp_self_test.exponents, i64 48, i1 false)
  call void @mbedtls_ecp_group_init(ptr noundef %5)
  call void @mbedtls_ecp_point_init(ptr noundef %6)
  call void @mbedtls_ecp_point_init(ptr noundef %7)
  call void @mbedtls_mpi_init(ptr noundef %8)
  br label %13

13:                                               ; preds = %1
  %14 = call i32 @mbedtls_ecp_group_load(ptr noundef %5, i32 noundef 1)
  store i32 %14, ptr %3, align 4, !tbaa !5
  %15 = icmp ne i32 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %13
  br label %185

17:                                               ; preds = %13
  br label %18

18:                                               ; preds = %17
  br label %19

19:                                               ; preds = %18
  %20 = load i32, ptr %2, align 4, !tbaa !5
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %24

22:                                               ; preds = %19
  %23 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %24

24:                                               ; preds = %22, %19
  br label %25

25:                                               ; preds = %24
  %26 = call i32 @mbedtls_mpi_lset(ptr noundef %8, i64 noundef 2)
  store i32 %26, ptr %3, align 4, !tbaa !5
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  br label %185

29:                                               ; preds = %25
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %31
  %33 = getelementptr inbounds %struct.mbedtls_ecp_group, ptr %5, i32 0, i32 4
  %34 = call i32 @mbedtls_ecp_mul(ptr noundef %5, ptr noundef %7, ptr noundef %8, ptr noundef %33, ptr noundef null, ptr noundef null)
  store i32 %34, ptr %3, align 4, !tbaa !5
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %32
  br label %185

37:                                               ; preds = %32
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  store i64 0, ptr @add_count, align 8, !tbaa !9
  store i64 0, ptr @dbl_count, align 8, !tbaa !9
  store i64 0, ptr @mul_count, align 8, !tbaa !9
  br label %40

40:                                               ; preds = %39
  %41 = getelementptr inbounds [6 x ptr], ptr %12, i64 0, i64 0
  %42 = load ptr, ptr %41, align 16, !tbaa !11
  %43 = call i32 @mbedtls_mpi_read_string(ptr noundef %8, i32 noundef 16, ptr noundef %42)
  store i32 %43, ptr %3, align 4, !tbaa !5
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %46

45:                                               ; preds = %40
  br label %185

46:                                               ; preds = %40
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  %50 = getelementptr inbounds %struct.mbedtls_ecp_group, ptr %5, i32 0, i32 4
  %51 = call i32 @mbedtls_ecp_mul(ptr noundef %5, ptr noundef %6, ptr noundef %8, ptr noundef %50, ptr noundef null, ptr noundef null)
  store i32 %51, ptr %3, align 4, !tbaa !5
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %49
  br label %185

54:                                               ; preds = %49
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  store i64 1, ptr %4, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %102, %56
  %58 = load i64, ptr %4, align 8, !tbaa !9
  %59 = icmp ult i64 %58, 6
  br i1 %59, label %60, label %105

60:                                               ; preds = %57
  %61 = load i64, ptr @add_count, align 8, !tbaa !9
  store i64 %61, ptr %9, align 8, !tbaa !9
  %62 = load i64, ptr @dbl_count, align 8, !tbaa !9
  store i64 %62, ptr %10, align 8, !tbaa !9
  %63 = load i64, ptr @mul_count, align 8, !tbaa !9
  store i64 %63, ptr %11, align 8, !tbaa !9
  store i64 0, ptr @add_count, align 8, !tbaa !9
  store i64 0, ptr @dbl_count, align 8, !tbaa !9
  store i64 0, ptr @mul_count, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %60
  %65 = load i64, ptr %4, align 8, !tbaa !9
  %66 = getelementptr inbounds [6 x ptr], ptr %12, i64 0, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = call i32 @mbedtls_mpi_read_string(ptr noundef %8, i32 noundef 16, ptr noundef %67)
  store i32 %68, ptr %3, align 4, !tbaa !5
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %64
  br label %185

71:                                               ; preds = %64
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  %75 = getelementptr inbounds %struct.mbedtls_ecp_group, ptr %5, i32 0, i32 4
  %76 = call i32 @mbedtls_ecp_mul(ptr noundef %5, ptr noundef %6, ptr noundef %8, ptr noundef %75, ptr noundef null, ptr noundef null)
  store i32 %76, ptr %3, align 4, !tbaa !5
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %74
  br label %185

79:                                               ; preds = %74
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  %82 = load i64, ptr @add_count, align 8, !tbaa !9
  %83 = load i64, ptr %9, align 8, !tbaa !9
  %84 = icmp ne i64 %82, %83
  br i1 %84, label %93, label %85

85:                                               ; preds = %81
  %86 = load i64, ptr @dbl_count, align 8, !tbaa !9
  %87 = load i64, ptr %10, align 8, !tbaa !9
  %88 = icmp ne i64 %86, %87
  br i1 %88, label %93, label %89

89:                                               ; preds = %85
  %90 = load i64, ptr @mul_count, align 8, !tbaa !9
  %91 = load i64, ptr %11, align 8, !tbaa !9
  %92 = icmp ne i64 %90, %91
  br i1 %92, label %93, label %101

93:                                               ; preds = %89, %85, %81
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %96, label %100

96:                                               ; preds = %93
  %97 = load i64, ptr %4, align 8, !tbaa !9
  %98 = trunc i64 %97 to i32
  %99 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %98)
  br label %100

100:                                              ; preds = %96, %93
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %185

101:                                              ; preds = %89
  br label %102

102:                                              ; preds = %101
  %103 = load i64, ptr %4, align 8, !tbaa !9
  %104 = add i64 %103, 1
  store i64 %104, ptr %4, align 8, !tbaa !9
  br label %57, !llvm.loop !13

105:                                              ; preds = %57
  %106 = load i32, ptr %2, align 4, !tbaa !5
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %110

108:                                              ; preds = %105
  %109 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %110

110:                                              ; preds = %108, %105
  %111 = load i32, ptr %2, align 4, !tbaa !5
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %115

113:                                              ; preds = %110
  %114 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  br label %115

115:                                              ; preds = %113, %110
  store i64 0, ptr @add_count, align 8, !tbaa !9
  store i64 0, ptr @dbl_count, align 8, !tbaa !9
  store i64 0, ptr @mul_count, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %115
  %117 = getelementptr inbounds [6 x ptr], ptr %12, i64 0, i64 0
  %118 = load ptr, ptr %117, align 16, !tbaa !11
  %119 = call i32 @mbedtls_mpi_read_string(ptr noundef %8, i32 noundef 16, ptr noundef %118)
  store i32 %119, ptr %3, align 4, !tbaa !5
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %116
  br label %185

122:                                              ; preds = %116
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  %126 = call i32 @mbedtls_ecp_mul(ptr noundef %5, ptr noundef %6, ptr noundef %8, ptr noundef %7, ptr noundef null, ptr noundef null)
  store i32 %126, ptr %3, align 4, !tbaa !5
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %129

128:                                              ; preds = %125
  br label %185

129:                                              ; preds = %125
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  store i64 1, ptr %4, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %176, %131
  %133 = load i64, ptr %4, align 8, !tbaa !9
  %134 = icmp ult i64 %133, 6
  br i1 %134, label %135, label %179

135:                                              ; preds = %132
  %136 = load i64, ptr @add_count, align 8, !tbaa !9
  store i64 %136, ptr %9, align 8, !tbaa !9
  %137 = load i64, ptr @dbl_count, align 8, !tbaa !9
  store i64 %137, ptr %10, align 8, !tbaa !9
  %138 = load i64, ptr @mul_count, align 8, !tbaa !9
  store i64 %138, ptr %11, align 8, !tbaa !9
  store i64 0, ptr @add_count, align 8, !tbaa !9
  store i64 0, ptr @dbl_count, align 8, !tbaa !9
  store i64 0, ptr @mul_count, align 8, !tbaa !9
  br label %139

139:                                              ; preds = %135
  %140 = load i64, ptr %4, align 8, !tbaa !9
  %141 = getelementptr inbounds [6 x ptr], ptr %12, i64 0, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !11
  %143 = call i32 @mbedtls_mpi_read_string(ptr noundef %8, i32 noundef 16, ptr noundef %142)
  store i32 %143, ptr %3, align 4, !tbaa !5
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %146

145:                                              ; preds = %139
  br label %185

146:                                              ; preds = %139
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147
  br label %149

149:                                              ; preds = %148
  %150 = call i32 @mbedtls_ecp_mul(ptr noundef %5, ptr noundef %6, ptr noundef %8, ptr noundef %7, ptr noundef null, ptr noundef null)
  store i32 %150, ptr %3, align 4, !tbaa !5
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %153

152:                                              ; preds = %149
  br label %185

153:                                              ; preds = %149
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  %156 = load i64, ptr @add_count, align 8, !tbaa !9
  %157 = load i64, ptr %9, align 8, !tbaa !9
  %158 = icmp ne i64 %156, %157
  br i1 %158, label %167, label %159

159:                                              ; preds = %155
  %160 = load i64, ptr @dbl_count, align 8, !tbaa !9
  %161 = load i64, ptr %10, align 8, !tbaa !9
  %162 = icmp ne i64 %160, %161
  br i1 %162, label %167, label %163

163:                                              ; preds = %159
  %164 = load i64, ptr @mul_count, align 8, !tbaa !9
  %165 = load i64, ptr %11, align 8, !tbaa !9
  %166 = icmp ne i64 %164, %165
  br i1 %166, label %167, label %175

167:                                              ; preds = %163, %159, %155
  %168 = load i32, ptr %2, align 4, !tbaa !5
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %174

170:                                              ; preds = %167
  %171 = load i64, ptr %4, align 8, !tbaa !9
  %172 = trunc i64 %171 to i32
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %172)
  br label %174

174:                                              ; preds = %170, %167
  store i32 1, ptr %3, align 4, !tbaa !5
  br label %185

175:                                              ; preds = %163
  br label %176

176:                                              ; preds = %175
  %177 = load i64, ptr %4, align 8, !tbaa !9
  %178 = add i64 %177, 1
  store i64 %178, ptr %4, align 8, !tbaa !9
  br label %132, !llvm.loop !15

179:                                              ; preds = %132
  %180 = load i32, ptr %2, align 4, !tbaa !5
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %182, label %184

182:                                              ; preds = %179
  %183 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  br label %184

184:                                              ; preds = %182, %179
  br label %185

185:                                              ; preds = %184, %174, %152, %145, %128, %121, %100, %78, %70, %53, %45, %36, %28, %16
  %186 = load i32, ptr %3, align 4, !tbaa !5
  %187 = icmp slt i32 %186, 0
  br i1 %187, label %188, label %194

188:                                              ; preds = %185
  %189 = load i32, ptr %2, align 4, !tbaa !5
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %194

191:                                              ; preds = %188
  %192 = load i32, ptr %3, align 4, !tbaa !5
  %193 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %192)
  br label %194

194:                                              ; preds = %191, %188, %185
  call void @mbedtls_ecp_group_free(ptr noundef %5)
  call void @mbedtls_ecp_point_free(ptr noundef %6)
  call void @mbedtls_ecp_point_free(ptr noundef %7)
  call void @mbedtls_mpi_free(ptr noundef %8)
  %195 = load i32, ptr %2, align 4, !tbaa !5
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %199

197:                                              ; preds = %194
  %198 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  br label %199

199:                                              ; preds = %197, %194
  %200 = load i32, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 248, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  ret i32 %200
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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: readwrite) }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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.mbedtls_ecp_group = type { i32, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_ecp_point, %struct.mbedtls_mpi, i64, i64, i32, ptr, ptr, ptr, ptr, ptr, i64 }
%struct.mbedtls_ecp_point = type { %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi }
%struct.mbedtls_mpi = type { i32, i64, ptr }

@__const.mbedtls_ecp_self_test.exponents = external hidden unnamed_addr constant [6 x ptr], align 16
@.str.6 = external hidden unnamed_addr constant [50 x i8], align 1
@add_count = external hidden local_unnamed_addr global i64, align 8
@dbl_count = external hidden local_unnamed_addr global i64, align 8
@mul_count = external hidden local_unnamed_addr global i64, align 8
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ecp_point_init(ptr noundef) local_unnamed_addr #1

declare void @mbedtls_mpi_init(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ecp_group_init(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ecp_point_free(ptr noundef) local_unnamed_addr #1

declare void @mbedtls_mpi_free(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @mbedtls_ecp_group_free(ptr noundef) local_unnamed_addr #1

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

declare i32 @mbedtls_mpi_lset(ptr noundef, i64 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_ecp_mul(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_ecp_self_test(i32 noundef %0) local_unnamed_addr #1 {
  %2 = alloca %struct.mbedtls_ecp_group, align 8
  %3 = alloca %struct.mbedtls_ecp_point, align 8
  %4 = alloca %struct.mbedtls_ecp_point, align 8
  %5 = alloca %struct.mbedtls_mpi, align 8
  call void @llvm.lifetime.start.p0(i64 248, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @mbedtls_ecp_group_init(ptr noundef nonnull %2)
  call void @mbedtls_ecp_point_init(ptr noundef nonnull %3)
  call void @mbedtls_ecp_point_init(ptr noundef nonnull %4)
  call void @mbedtls_mpi_init(ptr noundef nonnull %5) #4
  %6 = call i32 @mbedtls_ecp_group_load(ptr noundef nonnull %2, i32 noundef 1) #4
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %7, label %.loopexit

7:                                                ; preds = %1
  %.not41 = icmp eq i32 %0, 0
  br i1 %.not41, label %10, label %8

8:                                                ; preds = %7
  %9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %10

10:                                               ; preds = %7, %8
  %11 = call i32 @mbedtls_mpi_lset(ptr noundef nonnull %5, i64 noundef 2) #4
  %.not42 = icmp eq i32 %11, 0
  br i1 %.not42, label %12, label %.loopexit

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %2, i64 80
  %14 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %13, ptr noundef null, ptr noundef null)
  %.not43 = icmp eq i32 %14, 0
  br i1 %.not43, label %15, label %.loopexit

15:                                               ; preds = %12
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %16 = load ptr, ptr @__const.mbedtls_ecp_self_test.exponents, align 16, !tbaa !9
  %17 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %16) #4
  %.not44 = icmp eq i32 %17, 0
  br i1 %.not44, label %18, label %.loopexit

18:                                               ; preds = %15
  %19 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %13, ptr noundef null, ptr noundef null)
  %.not45 = icmp eq i32 %19, 0
  br i1 %.not45, label %.preheader66.preheader, label %.loopexit

.preheader66.preheader:                           ; preds = %18
  %20 = load i64, ptr @add_count, align 8, !tbaa !5
  %21 = load i64, ptr @dbl_count, align 8, !tbaa !5
  %22 = load i64, ptr @mul_count, align 8, !tbaa !5
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %23 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.mbedtls_ecp_self_test.exponents, i64 8), align 8, !tbaa !9
  %24 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %23) #4
  %.not53 = icmp eq i32 %24, 0
  br i1 %.not53, label %25, label %.loopexit

25:                                               ; preds = %.preheader66.preheader
  %26 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %13, ptr noundef null, ptr noundef null)
  %.not54 = icmp eq i32 %26, 0
  br i1 %.not54, label %27, label %.loopexit

27:                                               ; preds = %25
  %28 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not55 = icmp eq i64 %28, %20
  %29 = load i64, ptr @dbl_count, align 8
  %.not56 = icmp eq i64 %29, %21
  %or.cond58 = select i1 %.not55, i1 %.not56, i1 false
  %30 = load i64, ptr @mul_count, align 8
  %.not57 = icmp eq i64 %30, %22
  %or.cond59 = select i1 %or.cond58, i1 %.not57, i1 false
  br i1 %or.cond59, label %.preheader66.1, label %31

31:                                               ; preds = %62, %54, %46, %38, %27
  %.073.lcssa80 = phi i32 [ 1, %27 ], [ 2, %38 ], [ 3, %46 ], [ 4, %54 ], [ 5, %62 ]
  br i1 %.not41, label %.thread, label %32

32:                                               ; preds = %31
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %.073.lcssa80)
  br label %.thread

.preheader66.1:                                   ; preds = %27
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %34 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.mbedtls_ecp_self_test.exponents, i64 16), align 16, !tbaa !9
  %35 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %34) #4
  %.not53.1 = icmp eq i32 %35, 0
  br i1 %.not53.1, label %36, label %.loopexit

36:                                               ; preds = %.preheader66.1
  %37 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %13, ptr noundef null, ptr noundef null)
  %.not54.1 = icmp eq i32 %37, 0
  br i1 %.not54.1, label %38, label %.loopexit

38:                                               ; preds = %36
  %39 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not55.1 = icmp eq i64 %39, %20
  %40 = load i64, ptr @dbl_count, align 8
  %.not56.1 = icmp eq i64 %40, %21
  %or.cond58.1 = select i1 %.not55.1, i1 %.not56.1, i1 false
  %41 = load i64, ptr @mul_count, align 8
  %.not57.1 = icmp eq i64 %41, %22
  %or.cond59.1 = select i1 %or.cond58.1, i1 %.not57.1, i1 false
  br i1 %or.cond59.1, label %.preheader66.2, label %31

.preheader66.2:                                   ; preds = %38
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %42 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.mbedtls_ecp_self_test.exponents, i64 24), align 8, !tbaa !9
  %43 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %42) #4
  %.not53.2 = icmp eq i32 %43, 0
  br i1 %.not53.2, label %44, label %.loopexit

44:                                               ; preds = %.preheader66.2
  %45 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %13, ptr noundef null, ptr noundef null)
  %.not54.2 = icmp eq i32 %45, 0
  br i1 %.not54.2, label %46, label %.loopexit

46:                                               ; preds = %44
  %47 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not55.2 = icmp eq i64 %47, %20
  %48 = load i64, ptr @dbl_count, align 8
  %.not56.2 = icmp eq i64 %48, %21
  %or.cond58.2 = select i1 %.not55.2, i1 %.not56.2, i1 false
  %49 = load i64, ptr @mul_count, align 8
  %.not57.2 = icmp eq i64 %49, %22
  %or.cond59.2 = select i1 %or.cond58.2, i1 %.not57.2, i1 false
  br i1 %or.cond59.2, label %.preheader66.3, label %31

.preheader66.3:                                   ; preds = %46
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %50 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.mbedtls_ecp_self_test.exponents, i64 32), align 16, !tbaa !9
  %51 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %50) #4
  %.not53.3 = icmp eq i32 %51, 0
  br i1 %.not53.3, label %52, label %.loopexit

52:                                               ; preds = %.preheader66.3
  %53 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %13, ptr noundef null, ptr noundef null)
  %.not54.3 = icmp eq i32 %53, 0
  br i1 %.not54.3, label %54, label %.loopexit

54:                                               ; preds = %52
  %55 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not55.3 = icmp eq i64 %55, %20
  %56 = load i64, ptr @dbl_count, align 8
  %.not56.3 = icmp eq i64 %56, %21
  %or.cond58.3 = select i1 %.not55.3, i1 %.not56.3, i1 false
  %57 = load i64, ptr @mul_count, align 8
  %.not57.3 = icmp eq i64 %57, %22
  %or.cond59.3 = select i1 %or.cond58.3, i1 %.not57.3, i1 false
  br i1 %or.cond59.3, label %.preheader66.4, label %31

.preheader66.4:                                   ; preds = %54
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %58 = load ptr, ptr getelementptr inbounds (i8, ptr @__const.mbedtls_ecp_self_test.exponents, i64 40), align 8, !tbaa !9
  %59 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %58) #4
  %.not53.4 = icmp eq i32 %59, 0
  br i1 %.not53.4, label %60, label %.loopexit

60:                                               ; preds = %.preheader66.4
  %61 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %13, ptr noundef null, ptr noundef null)
  %.not54.4 = icmp eq i32 %61, 0
  br i1 %.not54.4, label %62, label %.loopexit

62:                                               ; preds = %60
  %63 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not55.4 = icmp eq i64 %63, %20
  %64 = load i64, ptr @dbl_count, align 8
  %.not56.4 = icmp eq i64 %64, %21
  %or.cond58.4 = select i1 %.not55.4, i1 %.not56.4, i1 false
  %65 = load i64, ptr @mul_count, align 8
  %.not57.4 = icmp eq i64 %65, %22
  %or.cond59.4 = select i1 %or.cond58.4, i1 %.not57.4, i1 false
  br i1 %or.cond59.4, label %66, label %31

66:                                               ; preds = %62
  br i1 %.not41, label %.critedge, label %67

67:                                               ; preds = %66
  %68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %.critedge

.critedge:                                        ; preds = %66, %67
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %70 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %16) #4
  %.not46 = icmp eq i32 %70, 0
  br i1 %.not46, label %71, label %.loopexit

71:                                               ; preds = %.critedge
  %72 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef null, ptr noundef null)
  %.not47 = icmp eq i32 %72, 0
  br i1 %.not47, label %.preheader.preheader, label %.loopexit

.preheader.preheader:                             ; preds = %71
  %73 = load i64, ptr @add_count, align 8, !tbaa !5
  %74 = load i64, ptr @dbl_count, align 8, !tbaa !5
  %75 = load i64, ptr @mul_count, align 8, !tbaa !5
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %76 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %23) #4
  %.not48 = icmp eq i32 %76, 0
  br i1 %.not48, label %77, label %.loopexit

77:                                               ; preds = %.preheader.preheader
  %78 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef null, ptr noundef null)
  %.not49 = icmp eq i32 %78, 0
  br i1 %.not49, label %79, label %.loopexit

79:                                               ; preds = %77
  %80 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not50 = icmp eq i64 %80, %73
  %81 = load i64, ptr @dbl_count, align 8
  %.not51 = icmp eq i64 %81, %74
  %or.cond60 = select i1 %.not50, i1 %.not51, i1 false
  %82 = load i64, ptr @mul_count, align 8
  %.not52 = icmp eq i64 %82, %75
  %or.cond61 = select i1 %or.cond60, i1 %.not52, i1 false
  br i1 %or.cond61, label %.preheader.1, label %83

83:                                               ; preds = %110, %103, %96, %89, %79
  %.174.lcssa78 = phi i32 [ 1, %79 ], [ 2, %89 ], [ 3, %96 ], [ 4, %103 ], [ 5, %110 ]
  br i1 %.not41, label %.thread, label %84

84:                                               ; preds = %83
  %85 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %.174.lcssa78)
  br label %.thread

.preheader.1:                                     ; preds = %79
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %86 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %34) #4
  %.not48.1 = icmp eq i32 %86, 0
  br i1 %.not48.1, label %87, label %.loopexit

87:                                               ; preds = %.preheader.1
  %88 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef null, ptr noundef null)
  %.not49.1 = icmp eq i32 %88, 0
  br i1 %.not49.1, label %89, label %.loopexit

89:                                               ; preds = %87
  %90 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not50.1 = icmp eq i64 %90, %73
  %91 = load i64, ptr @dbl_count, align 8
  %.not51.1 = icmp eq i64 %91, %74
  %or.cond60.1 = select i1 %.not50.1, i1 %.not51.1, i1 false
  %92 = load i64, ptr @mul_count, align 8
  %.not52.1 = icmp eq i64 %92, %75
  %or.cond61.1 = select i1 %or.cond60.1, i1 %.not52.1, i1 false
  br i1 %or.cond61.1, label %.preheader.2, label %83

.preheader.2:                                     ; preds = %89
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %93 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %42) #4
  %.not48.2 = icmp eq i32 %93, 0
  br i1 %.not48.2, label %94, label %.loopexit

94:                                               ; preds = %.preheader.2
  %95 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef null, ptr noundef null)
  %.not49.2 = icmp eq i32 %95, 0
  br i1 %.not49.2, label %96, label %.loopexit

96:                                               ; preds = %94
  %97 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not50.2 = icmp eq i64 %97, %73
  %98 = load i64, ptr @dbl_count, align 8
  %.not51.2 = icmp eq i64 %98, %74
  %or.cond60.2 = select i1 %.not50.2, i1 %.not51.2, i1 false
  %99 = load i64, ptr @mul_count, align 8
  %.not52.2 = icmp eq i64 %99, %75
  %or.cond61.2 = select i1 %or.cond60.2, i1 %.not52.2, i1 false
  br i1 %or.cond61.2, label %.preheader.3, label %83

.preheader.3:                                     ; preds = %96
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %100 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %50) #4
  %.not48.3 = icmp eq i32 %100, 0
  br i1 %.not48.3, label %101, label %.loopexit

101:                                              ; preds = %.preheader.3
  %102 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef null, ptr noundef null)
  %.not49.3 = icmp eq i32 %102, 0
  br i1 %.not49.3, label %103, label %.loopexit

103:                                              ; preds = %101
  %104 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not50.3 = icmp eq i64 %104, %73
  %105 = load i64, ptr @dbl_count, align 8
  %.not51.3 = icmp eq i64 %105, %74
  %or.cond60.3 = select i1 %.not50.3, i1 %.not51.3, i1 false
  %106 = load i64, ptr @mul_count, align 8
  %.not52.3 = icmp eq i64 %106, %75
  %or.cond61.3 = select i1 %or.cond60.3, i1 %.not52.3, i1 false
  br i1 %or.cond61.3, label %.preheader.4, label %83

.preheader.4:                                     ; preds = %103
  store i64 0, ptr @add_count, align 8, !tbaa !5
  store i64 0, ptr @dbl_count, align 8, !tbaa !5
  store i64 0, ptr @mul_count, align 8, !tbaa !5
  %107 = call i32 @mbedtls_mpi_read_string(ptr noundef nonnull %5, i32 noundef 16, ptr noundef %58) #4
  %.not48.4 = icmp eq i32 %107, 0
  br i1 %.not48.4, label %108, label %.loopexit

108:                                              ; preds = %.preheader.4
  %109 = call i32 @mbedtls_ecp_mul(ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %5, ptr noundef nonnull %4, ptr noundef null, ptr noundef null)
  %.not49.4 = icmp eq i32 %109, 0
  br i1 %.not49.4, label %110, label %.loopexit

110:                                              ; preds = %108
  %111 = load i64, ptr @add_count, align 8, !tbaa !5
  %.not50.4 = icmp eq i64 %111, %73
  %112 = load i64, ptr @dbl_count, align 8
  %.not51.4 = icmp eq i64 %112, %74
  %or.cond60.4 = select i1 %.not50.4, i1 %.not51.4, i1 false
  %113 = load i64, ptr @mul_count, align 8
  %.not52.4 = icmp eq i64 %113, %75
  %or.cond61.4 = select i1 %or.cond60.4, i1 %.not52.4, i1 false
  br i1 %or.cond61.4, label %114, label %83

114:                                              ; preds = %110
  br i1 %.not41, label %.thread, label %115

115:                                              ; preds = %114
  %116 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  br label %.thread

.thread:                                          ; preds = %115, %114, %32, %31, %84, %83
  %.127.ph = phi i32 [ 1, %83 ], [ 1, %84 ], [ 1, %31 ], [ 1, %32 ], [ 0, %114 ], [ 0, %115 ]
  %117 = icmp ne i32 %0, 0
  br label %122

.loopexit:                                        ; preds = %25, %.preheader66.preheader, %.preheader66.1, %36, %.preheader66.2, %44, %.preheader66.3, %52, %.preheader66.4, %60, %77, %.preheader.preheader, %.preheader.1, %87, %.preheader.2, %94, %.preheader.3, %101, %.preheader.4, %108, %71, %.critedge, %18, %15, %12, %10, %1
  %.127 = phi i32 [ %6, %1 ], [ %11, %10 ], [ %14, %12 ], [ %17, %15 ], [ %19, %18 ], [ %70, %.critedge ], [ %72, %71 ], [ %76, %.preheader.preheader ], [ %78, %77 ], [ %86, %.preheader.1 ], [ %88, %87 ], [ %93, %.preheader.2 ], [ %95, %94 ], [ %100, %.preheader.3 ], [ %102, %101 ], [ %107, %.preheader.4 ], [ %109, %108 ], [ %24, %.preheader66.preheader ], [ %26, %25 ], [ %35, %.preheader66.1 ], [ %37, %36 ], [ %43, %.preheader66.2 ], [ %45, %44 ], [ %51, %.preheader66.3 ], [ %53, %52 ], [ %59, %.preheader66.4 ], [ %61, %60 ]
  %118 = icmp slt i32 %.127, 0
  %119 = icmp ne i32 %0, 0
  %or.cond = and i1 %119, %118
  br i1 %or.cond, label %120, label %122

120:                                              ; preds = %.loopexit
  %121 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %.127)
  br label %122

122:                                              ; preds = %.thread, %120, %.loopexit
  %123 = phi i1 [ %117, %.thread ], [ true, %120 ], [ %119, %.loopexit ]
  %.12764 = phi i32 [ %.127.ph, %.thread ], [ %.127, %120 ], [ %.127, %.loopexit ]
  call void @mbedtls_ecp_group_free(ptr noundef nonnull %2)
  call void @mbedtls_ecp_point_free(ptr noundef nonnull %3)
  call void @mbedtls_ecp_point_free(ptr noundef nonnull %4)
  call void @mbedtls_mpi_free(ptr noundef nonnull %5) #4
  br i1 %123, label %124, label %126

124:                                              ; preds = %122
  %125 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  br label %126

126:                                              ; preds = %124, %122
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 248, ptr nonnull %2) #4
  ret i32 %.12764
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: ConstraintEliminationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass