; LLVM IR from openssl/openssl :: crypto/ec (ec2_oct)

; 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.ec_group_st = type { ptr, ptr, ptr, ptr, i32, i32, i32, i32, ptr, i64, ptr, [6 x i32], ptr, ptr, i32, ptr, ptr, ptr, ptr, i32, %union.anon, ptr, ptr }
%union.anon = type { ptr }
%struct.ec_method_st = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [69 x i8], align 1
@__func__.ossl_ec_GF2m_simple_oct2point = external hidden unnamed_addr constant [30 x i8], align 1

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

declare ptr @BN_CTX_new() #1

declare void @BN_CTX_start(ptr noundef) #1

declare ptr @BN_CTX_get(ptr noundef) #1

declare i32 @BN_is_zero(ptr noundef) #1

declare void @ERR_new() #1

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) #1

declare void @ERR_set_error(i32 noundef, i32 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

declare i32 @BN_is_odd(ptr noundef) #1

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

declare void @BN_CTX_end(ptr noundef) #1

declare void @BN_CTX_free(ptr noundef) #1

declare i32 @EC_GROUP_get_degree(ptr noundef) #1

declare i32 @BN_num_bits(ptr noundef) #1

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

25:                                               ; preds = %5
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 270, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 100, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %206

26:                                               ; preds = %5
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 0
  %29 = load i8, ptr %28, align 1, !tbaa !13
  %30 = zext i8 %29 to i32
  %31 = and i32 %30, 1
  store i32 %31, ptr %13, align 4, !tbaa !11
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 0
  %34 = load i8, ptr %33, align 1, !tbaa !13
  %35 = zext i8 %34 to i32
  %36 = and i32 %35, -2
  store i32 %36, ptr %12, align 4, !tbaa !11
  %37 = load i32, ptr %12, align 4, !tbaa !11
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %49

39:                                               ; preds = %26
  %40 = load i32, ptr %12, align 4, !tbaa !11
  %41 = icmp ne i32 %40, 2
  br i1 %41, label %42, label %49

42:                                               ; preds = %39
  %43 = load i32, ptr %12, align 4, !tbaa !11
  %44 = icmp ne i32 %43, 4
  br i1 %44, label %45, label %49

45:                                               ; preds = %42
  %46 = load i32, ptr %12, align 4, !tbaa !11
  %47 = icmp ne i32 %46, 6
  br i1 %47, label %48, label %49

48:                                               ; preds = %45
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 291, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %206

49:                                               ; preds = %45, %42, %39, %26
  %50 = load i32, ptr %12, align 4, !tbaa !11
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %55, label %52

52:                                               ; preds = %49
  %53 = load i32, ptr %12, align 4, !tbaa !11
  %54 = icmp eq i32 %53, 4
  br i1 %54, label %55, label %59

55:                                               ; preds = %52, %49
  %56 = load i32, ptr %13, align 4, !tbaa !11
  %57 = icmp ne i32 %56, 0
  br i1 %57, label %58, label %59

58:                                               ; preds = %55
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 295, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %206

59:                                               ; preds = %55, %52
  %60 = load i32, ptr %12, align 4, !tbaa !11
  %61 = icmp eq i32 %60, 0
  br i1 %61, label %62, label %70

62:                                               ; preds = %59
  %63 = load i64, ptr %10, align 8, !tbaa !9
  %64 = icmp ne i64 %63, 1
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 302, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %206

66:                                               ; preds = %62
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = call i32 @EC_POINT_set_to_infinity(ptr noundef %67, ptr noundef %68)
  store i32 %69, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %206

70:                                               ; preds = %59
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = call i32 @EC_GROUP_get_degree(ptr noundef %71)
  store i32 %72, ptr %14, align 4, !tbaa !11
  %73 = load i32, ptr %14, align 4, !tbaa !11
  %74 = add nsw i32 %73, 7
  %75 = sdiv i32 %74, 8
  %76 = sext i32 %75 to i64
  store i64 %76, ptr %18, align 8, !tbaa !9
  %77 = load i32, ptr %12, align 4, !tbaa !11
  %78 = icmp eq i32 %77, 2
  br i1 %78, label %79, label %82

79:                                               ; preds = %70
  %80 = load i64, ptr %18, align 8, !tbaa !9
  %81 = add i64 1, %80
  br label %86

82:                                               ; preds = %70
  %83 = load i64, ptr %18, align 8, !tbaa !9
  %84 = mul i64 2, %83
  %85 = add i64 1, %84
  br label %86

86:                                               ; preds = %82, %79
  %87 = phi i64 [ %81, %79 ], [ %85, %82 ]
  store i64 %87, ptr %19, align 8, !tbaa !9
  %88 = load i64, ptr %10, align 8, !tbaa !9
  %89 = load i64, ptr %19, align 8, !tbaa !9
  %90 = icmp ne i64 %88, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %86
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 316, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %206

92:                                               ; preds = %86
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = icmp eq ptr %93, null
  br i1 %94, label %95, label %101

95:                                               ; preds = %92
  %96 = call ptr @BN_CTX_new()
  store ptr %96, ptr %21, align 8, !tbaa !5
  store ptr %96, ptr %11, align 8, !tbaa !5
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = icmp eq ptr %97, null
  br i1 %98, label %99, label %100

99:                                               ; preds = %95
  store i32 0, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %206

100:                                              ; preds = %95
  br label %101

101:                                              ; preds = %100, %92
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  call void @BN_CTX_start(ptr noundef %102)
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = call ptr @BN_CTX_get(ptr noundef %103)
  store ptr %104, ptr %15, align 8, !tbaa !5
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = call ptr @BN_CTX_get(ptr noundef %105)
  store ptr %106, ptr %16, align 8, !tbaa !5
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = call ptr @BN_CTX_get(ptr noundef %107)
  store ptr %108, ptr %17, align 8, !tbaa !5
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = icmp eq ptr %109, null
  br i1 %110, label %111, label %112

111:                                              ; preds = %101
  br label %202

112:                                              ; preds = %101
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = getelementptr inbounds i8, ptr %113, i64 1
  %115 = load i64, ptr %18, align 8, !tbaa !9
  %116 = trunc i64 %115 to i32
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  %118 = call ptr @BN_bin2bn(ptr noundef %114, i32 noundef %116, ptr noundef %117)
  %119 = icmp ne ptr %118, null
  br i1 %119, label %121, label %120

120:                                              ; preds = %112
  br label %202

121:                                              ; preds = %112
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  %123 = call i32 @BN_num_bits(ptr noundef %122)
  %124 = load i32, ptr %14, align 4, !tbaa !11
  %125 = icmp sgt i32 %123, %124
  br i1 %125, label %126, label %127

126:                                              ; preds = %121
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 338, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  br label %202

127:                                              ; preds = %121
  %128 = load i32, ptr %12, align 4, !tbaa !11
  %129 = icmp eq i32 %128, 2
  br i1 %129, label %130, label %140

130:                                              ; preds = %127
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = load i32, ptr %13, align 4, !tbaa !11
  %135 = load ptr, ptr %11, align 8, !tbaa !5
  %136 = call i32 @EC_POINT_set_compressed_coordinates(ptr noundef %131, ptr noundef %132, ptr noundef %133, i32 noundef %134, ptr noundef %135)
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %139, label %138

138:                                              ; preds = %130
  br label %202

139:                                              ; preds = %130
  br label %201

140:                                              ; preds = %127
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds i8, ptr %141, i64 1
  %143 = load i64, ptr %18, align 8, !tbaa !9
  %144 = getelementptr inbounds i8, ptr %142, i64 %143
  %145 = load i64, ptr %18, align 8, !tbaa !9
  %146 = trunc i64 %145 to i32
  %147 = load ptr, ptr %16, align 8, !tbaa !5
  %148 = call ptr @BN_bin2bn(ptr noundef %144, i32 noundef %146, ptr noundef %147)
  %149 = icmp ne ptr %148, null
  br i1 %149, label %151, label %150

150:                                              ; preds = %140
  br label %202

151:                                              ; preds = %140
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = call i32 @BN_num_bits(ptr noundef %152)
  %154 = load i32, ptr %14, align 4, !tbaa !11
  %155 = icmp sgt i32 %153, %154
  br i1 %155, label %156, label %157

156:                                              ; preds = %151
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 349, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  br label %202

157:                                              ; preds = %151
  %158 = load i32, ptr %12, align 4, !tbaa !11
  %159 = icmp eq i32 %158, 6
  br i1 %159, label %160, label %191

160:                                              ; preds = %157
  %161 = load ptr, ptr %15, align 8, !tbaa !5
  %162 = call i32 @BN_is_zero(ptr noundef %161)
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %164, label %169

164:                                              ; preds = %160
  %165 = load i32, ptr %13, align 4, !tbaa !11
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %168

167:                                              ; preds = %164
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 360, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  br label %202

168:                                              ; preds = %164
  br label %190

169:                                              ; preds = %160
  %170 = load ptr, ptr %7, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.ec_group_st, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !14
  %173 = getelementptr inbounds %struct.ec_method_st, ptr %172, i32 0, i32 34
  %174 = load ptr, ptr %173, align 8, !tbaa !16
  %175 = load ptr, ptr %7, align 8, !tbaa !5
  %176 = load ptr, ptr %17, align 8, !tbaa !5
  %177 = load ptr, ptr %16, align 8, !tbaa !5
  %178 = load ptr, ptr %15, align 8, !tbaa !5
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = call i32 %174(ptr noundef %175, ptr noundef %176, ptr noundef %177, ptr noundef %178, ptr noundef %179)
  %181 = icmp ne i32 %180, 0
  br i1 %181, label %183, label %182

182:                                              ; preds = %169
  br label %202

183:                                              ; preds = %169
  %184 = load i32, ptr %13, align 4, !tbaa !11
  %185 = load ptr, ptr %17, align 8, !tbaa !5
  %186 = call i32 @BN_is_odd(ptr noundef %185)
  %187 = icmp ne i32 %184, %186
  br i1 %187, label %188, label %189

188:                                              ; preds = %183
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 367, ptr noundef @__func__.ossl_ec_GF2m_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  br label %202

189:                                              ; preds = %183
  br label %190

190:                                              ; preds = %189, %168
  br label %191

191:                                              ; preds = %190, %157
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = load ptr, ptr %8, align 8, !tbaa !5
  %194 = load ptr, ptr %15, align 8, !tbaa !5
  %195 = load ptr, ptr %16, align 8, !tbaa !5
  %196 = load ptr, ptr %11, align 8, !tbaa !5
  %197 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef %192, ptr noundef %193, ptr noundef %194, ptr noundef %195, ptr noundef %196)
  %198 = icmp ne i32 %197, 0
  br i1 %198, label %200, label %199

199:                                              ; preds = %191
  br label %202

200:                                              ; preds = %191
  br label %201

201:                                              ; preds = %200, %139
  store i32 1, ptr %20, align 4, !tbaa !11
  br label %202

202:                                              ; preds = %201, %199, %188, %182, %167, %156, %150, %138, %126, %120, %111
  %203 = load ptr, ptr %11, align 8, !tbaa !5
  call void @BN_CTX_end(ptr noundef %203)
  %204 = load ptr, ptr %21, align 8, !tbaa !5
  call void @BN_CTX_free(ptr noundef %204)
  %205 = load i32, ptr %20, align 4, !tbaa !11
  store i32 %205, ptr %6, align 4
  store i32 1, ptr %22, align 4
  br label %206

206:                                              ; preds = %202, %99, %91, %66, %65, %58, %48, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  %207 = load i32, ptr %6, align 4
  ret i32 %207
}

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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 #3 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"ec_group_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !6, i64 48, !10, i64 56, !6, i64 64, !7, i64 72, !6, i64 96, !6, i64 104, !12, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !12, i64 152, !7, i64 160, !6, i64 168, !6, i64 176}
!16 = !{!17, !6, i64 264}
!17 = !{!"ec_method_st", !12, i64 0, !12, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440}


; 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 [69 x i8], align 1
@__func__.ossl_ec_GF2m_simple_oct2point = external hidden unnamed_addr constant [30 x i8], align 1

declare ptr @BN_CTX_new() local_unnamed_addr #0

declare void @BN_CTX_start(ptr noundef) local_unnamed_addr #0

declare ptr @BN_CTX_get(ptr noundef) local_unnamed_addr #0

declare i32 @BN_is_zero(ptr noundef) local_unnamed_addr #0

declare void @ERR_new() local_unnamed_addr #0

declare void @ERR_set_debug(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @ERR_set_error(i32 noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

declare i32 @BN_is_odd(ptr noundef) local_unnamed_addr #0

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

declare void @BN_CTX_end(ptr noundef) local_unnamed_addr #0

declare void @BN_CTX_free(ptr noundef) local_unnamed_addr #0

declare i32 @EC_GROUP_get_degree(ptr noundef) local_unnamed_addr #0

declare i32 @BN_num_bits(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_ec_GF2m_simple_oct2point(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = icmp eq i64 %3, 0
  br i1 %6, label %7, label %8

7:                                                ; preds = %5
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 270, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 100, ptr noundef null) #2
  br label %82

8:                                                ; preds = %5
  %9 = load i8, ptr %2, align 1, !tbaa !5
  %10 = zext i8 %9 to i32
  %11 = and i32 %10, 1
  %12 = and i32 %10, 254
  %or.cond = icmp ugt i8 %9, 3
  %13 = and i32 %10, 252
  %14 = icmp ne i32 %13, 4
  %or.cond5 = and i1 %or.cond, %14
  br i1 %or.cond5, label %15, label %16

15:                                               ; preds = %8
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 291, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %82

16:                                               ; preds = %8
  %17 = icmp eq i32 %12, 0
  %18 = icmp eq i32 %12, 4
  %or.cond7 = or i1 %17, %18
  %19 = icmp ne i32 %11, 0
  %or.cond9 = and i1 %19, %or.cond7
  br i1 %or.cond9, label %20, label %21

20:                                               ; preds = %16
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 295, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %82

21:                                               ; preds = %16
  br i1 %17, label %22, label %26

22:                                               ; preds = %21
  %.not89 = icmp eq i64 %3, 1
  br i1 %.not89, label %24, label %23

23:                                               ; preds = %22
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 302, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %82

24:                                               ; preds = %22
  %25 = tail call i32 @EC_POINT_set_to_infinity(ptr noundef %0, ptr noundef %1) #2
  br label %82

26:                                               ; preds = %21
  %27 = tail call i32 @EC_GROUP_get_degree(ptr noundef %0) #2
  %28 = add nsw i32 %27, 7
  %29 = sdiv i32 %28, 8
  %30 = sext i32 %29 to i64
  %31 = icmp eq i32 %12, 2
  %32 = add nsw i64 %30, 1
  %33 = shl nsw i64 %30, 1
  %34 = or disjoint i64 %33, 1
  %35 = select i1 %31, i64 %32, i64 %34
  %.not = icmp eq i64 %35, %3
  br i1 %.not, label %37, label %36

36:                                               ; preds = %26
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 316, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %82

37:                                               ; preds = %26
  %38 = icmp eq ptr %4, null
  br i1 %38, label %39, label %42

39:                                               ; preds = %37
  %40 = tail call ptr @BN_CTX_new() #2
  %41 = icmp eq ptr %40, null
  br i1 %41, label %82, label %42

42:                                               ; preds = %39, %37
  %.075 = phi ptr [ %40, %39 ], [ %4, %37 ]
  %.0 = phi ptr [ %40, %39 ], [ null, %37 ]
  tail call void @BN_CTX_start(ptr noundef nonnull %.075) #2
  %43 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.075) #2
  %44 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.075) #2
  %45 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.075) #2
  %46 = icmp eq ptr %45, null
  br i1 %46, label %81, label %47

47:                                               ; preds = %42
  %48 = getelementptr inbounds i8, ptr %2, i64 1
  %49 = tail call ptr @BN_bin2bn(ptr noundef nonnull %48, i32 noundef %29, ptr noundef %43) #2
  %.not82 = icmp eq ptr %49, null
  br i1 %.not82, label %81, label %50

50:                                               ; preds = %47
  %51 = tail call i32 @BN_num_bits(ptr noundef %43) #2
  %52 = icmp sgt i32 %51, %27
  br i1 %52, label %53, label %54

53:                                               ; preds = %50
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 338, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %81

54:                                               ; preds = %50
  br i1 %31, label %55, label %57

55:                                               ; preds = %54
  %56 = tail call i32 @EC_POINT_set_compressed_coordinates(ptr noundef %0, ptr noundef %1, ptr noundef %43, i32 noundef %11, ptr noundef nonnull %.075) #2
  %.not88 = icmp eq i32 %56, 0
  br i1 %.not88, label %81, label %80

57:                                               ; preds = %54
  %58 = getelementptr inbounds i8, ptr %48, i64 %30
  %59 = tail call ptr @BN_bin2bn(ptr noundef nonnull %58, i32 noundef %29, ptr noundef %44) #2
  %.not83 = icmp eq ptr %59, null
  br i1 %.not83, label %81, label %60

60:                                               ; preds = %57
  %61 = tail call i32 @BN_num_bits(ptr noundef %44) #2
  %62 = icmp sgt i32 %61, %27
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 349, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %81

64:                                               ; preds = %60
  %65 = icmp eq i32 %12, 6
  br i1 %65, label %66, label %78

66:                                               ; preds = %64
  %67 = tail call i32 @BN_is_zero(ptr noundef %43) #2
  %.not84 = icmp eq i32 %67, 0
  br i1 %.not84, label %70, label %68

68:                                               ; preds = %66
  br i1 %19, label %69, label %78

69:                                               ; preds = %68
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 360, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %81

70:                                               ; preds = %66
  %71 = load ptr, ptr %0, align 8, !tbaa !8
  %72 = getelementptr inbounds i8, ptr %71, i64 264
  %73 = load ptr, ptr %72, align 8, !tbaa !13
  %74 = tail call i32 %73(ptr noundef nonnull %0, ptr noundef nonnull %45, ptr noundef %44, ptr noundef %43, ptr noundef nonnull %.075) #2
  %.not85 = icmp eq i32 %74, 0
  br i1 %.not85, label %81, label %75

75:                                               ; preds = %70
  %76 = tail call i32 @BN_is_odd(ptr noundef nonnull %45) #2
  %.not86 = icmp eq i32 %11, %76
  br i1 %.not86, label %78, label %77

77:                                               ; preds = %75
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 367, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %81

78:                                               ; preds = %68, %75, %64
  %79 = tail call i32 @EC_POINT_set_affine_coordinates(ptr noundef %0, ptr noundef %1, ptr noundef %43, ptr noundef %44, ptr noundef nonnull %.075) #2
  %.not87 = icmp eq i32 %79, 0
  br i1 %.not87, label %81, label %80

80:                                               ; preds = %78, %55
  br label %81

81:                                               ; preds = %78, %70, %57, %55, %47, %42, %80, %77, %69, %63, %53
  %.073 = phi i32 [ 0, %42 ], [ 0, %53 ], [ 1, %80 ], [ 0, %55 ], [ 0, %63 ], [ 0, %69 ], [ 0, %78 ], [ 0, %77 ], [ 0, %70 ], [ 0, %57 ], [ 0, %47 ]
  tail call void @BN_CTX_end(ptr noundef nonnull %.075) #2
  tail call void @BN_CTX_free(ptr noundef %.0) #2
  br label %82

82:                                               ; preds = %39, %81, %36, %24, %23, %20, %15, %7
  %.074 = phi i32 [ 0, %7 ], [ 0, %15 ], [ 0, %20 ], [ 0, %23 ], [ %25, %24 ], [ 0, %36 ], [ %.073, %81 ], [ 0, %39 ]
  ret i32 %.074
}

declare i32 @EC_POINT_set_to_infinity(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @BN_bin2bn(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare i32 @EC_POINT_set_compressed_coordinates(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

attributes #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 = { 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"ec_group_st", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !10, i64 48, !12, i64 56, !10, i64 64, !6, i64 72, !10, i64 96, !10, i64 104, !11, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !11, i64 152, !6, i64 160, !10, i64 168, !10, i64 176}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!"long", !6, i64 0}
!13 = !{!14, !10, i64 264}
!14 = !{!"ec_method_st", !11, i64 0, !11, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !10, i64 432, !10, i64 440}


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