; LLVM IR from openssl/openssl :: crypto/ec (ecp_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 }

@.str = external hidden unnamed_addr constant [69 x i8], align 1
@__func__.ossl_ec_GFp_simple_oct2point = external hidden unnamed_addr constant [29 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_ex(ptr noundef) #1

declare void @BN_CTX_start(ptr noundef) #1

declare ptr @BN_CTX_get(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 @BN_num_bits(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_ec_GFp_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 ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = 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 8, ptr %14) #3
  store ptr null, ptr %14, align 8, !tbaa !5
  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 4, ptr %19) #3
  store i32 0, ptr %19, align 4, !tbaa !11
  %21 = load i64, ptr %10, align 8, !tbaa !9
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %5
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 286, ptr noundef @__func__.ossl_ec_GFp_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 %20, align 4
  br label %184

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

35:                                               ; preds = %24
  %36 = load i32, ptr %12, align 4, !tbaa !11
  %37 = icmp ne i32 %36, 2
  br i1 %37, label %38, label %45

38:                                               ; preds = %35
  %39 = load i32, ptr %12, align 4, !tbaa !11
  %40 = icmp ne i32 %39, 4
  br i1 %40, label %41, label %45

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

44:                                               ; preds = %41
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 295, ptr noundef @__func__.ossl_ec_GFp_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 %20, align 4
  br label %184

45:                                               ; preds = %41, %38, %35, %24
  %46 = load i32, ptr %12, align 4, !tbaa !11
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %51, label %48

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

51:                                               ; preds = %48, %45
  %52 = load i32, ptr %13, align 4, !tbaa !11
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 299, ptr noundef @__func__.ossl_ec_GFp_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 %20, align 4
  br label %184

55:                                               ; preds = %51, %48
  %56 = load i32, ptr %12, align 4, !tbaa !11
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %58, label %66

58:                                               ; preds = %55
  %59 = load i64, ptr %10, align 8, !tbaa !9
  %60 = icmp ne i64 %59, 1
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 305, ptr noundef @__func__.ossl_ec_GFp_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 %20, align 4
  br label %184

62:                                               ; preds = %58
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = call i32 @EC_POINT_set_to_infinity(ptr noundef %63, ptr noundef %64)
  store i32 %65, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %184

66:                                               ; preds = %55
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ec_group_st, ptr %67, i32 0, i32 10
  %69 = load ptr, ptr %68, align 8, !tbaa !14
  %70 = call i32 @BN_num_bits(ptr noundef %69)
  %71 = add nsw i32 %70, 7
  %72 = sdiv i32 %71, 8
  %73 = sext i32 %72 to i64
  store i64 %73, ptr %17, align 8, !tbaa !9
  %74 = load i32, ptr %12, align 4, !tbaa !11
  %75 = icmp eq i32 %74, 2
  br i1 %75, label %76, label %79

76:                                               ; preds = %66
  %77 = load i64, ptr %17, align 8, !tbaa !9
  %78 = add i64 1, %77
  br label %83

79:                                               ; preds = %66
  %80 = load i64, ptr %17, align 8, !tbaa !9
  %81 = mul i64 2, %80
  %82 = add i64 1, %81
  br label %83

83:                                               ; preds = %79, %76
  %84 = phi i64 [ %78, %76 ], [ %82, %79 ]
  store i64 %84, ptr %18, align 8, !tbaa !9
  %85 = load i64, ptr %10, align 8, !tbaa !9
  %86 = load i64, ptr %18, align 8, !tbaa !9
  %87 = icmp ne i64 %85, %86
  br i1 %87, label %88, label %89

88:                                               ; preds = %83
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 318, ptr noundef @__func__.ossl_ec_GFp_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 %20, align 4
  br label %184

89:                                               ; preds = %83
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  %91 = icmp eq ptr %90, null
  br i1 %91, label %92, label %101

92:                                               ; preds = %89
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ec_group_st, ptr %93, i32 0, i32 21
  %95 = load ptr, ptr %94, align 8, !tbaa !16
  %96 = call ptr @BN_CTX_new_ex(ptr noundef %95)
  store ptr %96, ptr %14, 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 = %92
  store i32 0, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %184

100:                                              ; preds = %92
  br label %101

101:                                              ; preds = %100, %89
  %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 %16, align 8, !tbaa !5
  %108 = icmp eq ptr %107, null
  br i1 %108, label %109, label %110

109:                                              ; preds = %101
  br label %180

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

118:                                              ; preds = %110
  br label %180

119:                                              ; preds = %110
  %120 = load ptr, ptr %15, align 8, !tbaa !5
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ec_group_st, ptr %121, i32 0, i32 10
  %123 = load ptr, ptr %122, align 8, !tbaa !14
  %124 = call i32 @BN_ucmp(ptr noundef %120, ptr noundef %123)
  %125 = icmp sge i32 %124, 0
  br i1 %125, label %126, label %127

126:                                              ; preds = %119
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 337, ptr noundef @__func__.ossl_ec_GFp_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  br label %180

127:                                              ; preds = %119
  %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 %180

139:                                              ; preds = %130
  br label %179

140:                                              ; preds = %127
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds i8, ptr %141, i64 1
  %143 = load i64, ptr %17, align 8, !tbaa !9
  %144 = getelementptr inbounds i8, ptr %142, i64 %143
  %145 = load i64, ptr %17, 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 %180

151:                                              ; preds = %140
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = load ptr, ptr %7, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.ec_group_st, ptr %153, i32 0, i32 10
  %155 = load ptr, ptr %154, align 8, !tbaa !14
  %156 = call i32 @BN_ucmp(ptr noundef %152, ptr noundef %155)
  %157 = icmp sge i32 %156, 0
  br i1 %157, label %158, label %159

158:                                              ; preds = %151
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 348, ptr noundef @__func__.ossl_ec_GFp_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  br label %180

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

162:                                              ; preds = %159
  %163 = load i32, ptr %13, align 4, !tbaa !11
  %164 = load ptr, ptr %16, align 8, !tbaa !5
  %165 = call i32 @BN_is_odd(ptr noundef %164)
  %166 = icmp ne i32 %163, %165
  br i1 %166, label %167, label %168

167:                                              ; preds = %162
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 353, ptr noundef @__func__.ossl_ec_GFp_simple_oct2point)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null)
  br label %180

168:                                              ; preds = %162
  br label %169

169:                                              ; preds = %168, %159
  %170 = load ptr, ptr %7, align 8, !tbaa !5
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = load ptr, ptr %15, align 8, !tbaa !5
  %173 = load ptr, ptr %16, align 8, !tbaa !5
  %174 = load ptr, ptr %11, align 8, !tbaa !5
  %175 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef %170, ptr noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef %174)
  %176 = icmp ne i32 %175, 0
  br i1 %176, label %178, label %177

177:                                              ; preds = %169
  br label %180

178:                                              ; preds = %169
  br label %179

179:                                              ; preds = %178, %139
  store i32 1, ptr %19, align 4, !tbaa !11
  br label %180

180:                                              ; preds = %179, %177, %167, %158, %150, %138, %126, %118, %109
  %181 = load ptr, ptr %11, align 8, !tbaa !5
  call void @BN_CTX_end(ptr noundef %181)
  %182 = load ptr, ptr %14, align 8, !tbaa !5
  call void @BN_CTX_free(ptr noundef %182)
  %183 = load i32, ptr %19, align 4, !tbaa !11
  store i32 %183, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %184

184:                                              ; preds = %180, %99, %88, %62, %61, %54, %44, %23
  call void @llvm.lifetime.end.p0(i64 4, 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 8, 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
  %185 = load i32, ptr %6, align 4
  ret i32 %185
}

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 @BN_ucmp(ptr 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 64}
!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 = !{!15, !6, i64 168}


; 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_GFp_simple_oct2point = external hidden unnamed_addr constant [29 x i8], align 1

declare ptr @BN_CTX_new_ex(ptr noundef) 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 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 @BN_num_bits(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_ec_GFp_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 286, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 100, ptr noundef null) #2
  br label %78

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 295, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %78

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 299, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %78

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

22:                                               ; preds = %21
  %.not78 = icmp eq i64 %3, 1
  br i1 %.not78, 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 305, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %78

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

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

38:                                               ; preds = %26
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 318, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %78

39:                                               ; preds = %26
  %40 = icmp eq ptr %4, null
  br i1 %40, label %41, label %46

41:                                               ; preds = %39
  %42 = getelementptr inbounds i8, ptr %0, i64 168
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = tail call ptr @BN_CTX_new_ex(ptr noundef %43) #2
  %45 = icmp eq ptr %44, null
  br i1 %45, label %78, label %46

46:                                               ; preds = %41, %39
  %.067 = phi ptr [ %44, %41 ], [ null, %39 ]
  %.066 = phi ptr [ %44, %41 ], [ %4, %39 ]
  tail call void @BN_CTX_start(ptr noundef nonnull %.066) #2
  %47 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.066) #2
  %48 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.066) #2
  %49 = icmp eq ptr %48, null
  br i1 %49, label %77, label %50

50:                                               ; preds = %46
  %51 = getelementptr inbounds i8, ptr %2, i64 1
  %52 = tail call ptr @BN_bin2bn(ptr noundef nonnull %51, i32 noundef %31, ptr noundef %47) #2
  %.not73 = icmp eq ptr %52, null
  br i1 %.not73, label %77, label %53

53:                                               ; preds = %50
  %54 = load ptr, ptr %27, align 8, !tbaa !8
  %55 = tail call i32 @BN_ucmp(ptr noundef %47, ptr noundef %54) #2
  %56 = icmp sgt i32 %55, -1
  br i1 %56, label %57, label %58

57:                                               ; preds = %53
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 337, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %77

58:                                               ; preds = %53
  br i1 %33, label %59, label %61

59:                                               ; preds = %58
  %60 = tail call i32 @EC_POINT_set_compressed_coordinates(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %47, i32 noundef %11, ptr noundef nonnull %.066) #2
  %.not77 = icmp eq i32 %60, 0
  br i1 %.not77, label %77, label %76

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %51, i64 %32
  %63 = tail call ptr @BN_bin2bn(ptr noundef nonnull %62, i32 noundef %31, ptr noundef nonnull %48) #2
  %.not74 = icmp eq ptr %63, null
  br i1 %.not74, label %77, label %64

64:                                               ; preds = %61
  %65 = load ptr, ptr %27, align 8, !tbaa !8
  %66 = tail call i32 @BN_ucmp(ptr noundef nonnull %48, ptr noundef %65) #2
  %67 = icmp sgt i32 %66, -1
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 348, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %77

69:                                               ; preds = %64
  %70 = icmp eq i32 %12, 6
  br i1 %70, label %71, label %74

71:                                               ; preds = %69
  %72 = tail call i32 @BN_is_odd(ptr noundef nonnull %48) #2
  %.not75 = icmp eq i32 %11, %72
  br i1 %.not75, label %74, label %73

73:                                               ; preds = %71
  tail call void @ERR_new() #2
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 353, ptr noundef nonnull @__func__.ossl_ec_GFp_simple_oct2point) #2
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 102, ptr noundef null) #2
  br label %77

74:                                               ; preds = %71, %69
  %75 = tail call i32 @EC_POINT_set_affine_coordinates(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %47, ptr noundef nonnull %48, ptr noundef nonnull %.066) #2
  %.not76 = icmp eq i32 %75, 0
  br i1 %.not76, label %77, label %76

76:                                               ; preds = %74, %59
  br label %77

77:                                               ; preds = %74, %61, %59, %50, %46, %76, %73, %68, %57
  %.0 = phi i32 [ 0, %46 ], [ 0, %57 ], [ 1, %76 ], [ 0, %59 ], [ 0, %68 ], [ 0, %73 ], [ 0, %74 ], [ 0, %61 ], [ 0, %50 ]
  tail call void @BN_CTX_end(ptr noundef nonnull %.066) #2
  tail call void @BN_CTX_free(ptr noundef %.067) #2
  br label %78

78:                                               ; preds = %41, %77, %38, %24, %23, %20, %15, %7
  %.065 = phi i32 [ 0, %7 ], [ 0, %15 ], [ 0, %20 ], [ 0, %23 ], [ %25, %24 ], [ 0, %38 ], [ %.0, %77 ], [ 0, %41 ]
  ret i32 %.065
}

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 @BN_ucmp(ptr 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 64}
!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 = !{!9, !10, i64 168}


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