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

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

23:                                               ; preds = %5
  %24 = call ptr @BN_CTX_new()
  store ptr %24, ptr %18, align 8, !tbaa !5
  store ptr %24, ptr %11, align 8, !tbaa !5
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %23
  store i32 0, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %189

28:                                               ; preds = %23
  br label %29

29:                                               ; preds = %28, %5
  %30 = load i32, ptr %10, align 4, !tbaa !9
  %31 = icmp ne i32 %30, 0
  %32 = zext i1 %31 to i64
  %33 = select i1 %31, i32 1, i32 0
  store i32 %33, ptr %10, align 4, !tbaa !9
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  call void @BN_CTX_start(ptr noundef %34)
  %35 = load ptr, ptr %11, align 8, !tbaa !5
  %36 = call ptr @BN_CTX_get(ptr noundef %35)
  store ptr %36, ptr %12, align 8, !tbaa !5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = call ptr @BN_CTX_get(ptr noundef %37)
  store ptr %38, ptr %13, align 8, !tbaa !5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = call ptr @BN_CTX_get(ptr noundef %39)
  store ptr %40, ptr %14, align 8, !tbaa !5
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = call ptr @BN_CTX_get(ptr noundef %41)
  store ptr %42, ptr %15, align 8, !tbaa !5
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %29
  br label %185

46:                                               ; preds = %29
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ec_group_st, ptr %49, i32 0, i32 11
  %51 = getelementptr inbounds [6 x i32], ptr %50, i64 0, i64 0
  %52 = call i32 @BN_GF2m_mod_arr(ptr noundef %47, ptr noundef %48, ptr noundef %51)
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %55, label %54

54:                                               ; preds = %46
  br label %185

55:                                               ; preds = %46
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = call i32 @BN_is_zero(ptr noundef %56)
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %72

59:                                               ; preds = %55
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ec_group_st, ptr %61, i32 0, i32 13
  %63 = load ptr, ptr %62, align 8, !tbaa !11
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.ec_group_st, ptr %64, i32 0, i32 11
  %66 = getelementptr inbounds [6 x i32], ptr %65, i64 0, i64 0
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = call i32 @BN_GF2m_mod_sqrt_arr(ptr noundef %60, ptr noundef %63, ptr noundef %66, ptr noundef %67)
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %71, label %70

70:                                               ; preds = %59
  br label %185

71:                                               ; preds = %59
  br label %175

72:                                               ; preds = %55
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ec_group_st, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !14
  %76 = getelementptr inbounds %struct.ec_method_st, ptr %75, i32 0, i32 33
  %77 = load ptr, ptr %76, align 8, !tbaa !15
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = call i32 %77(ptr noundef %78, ptr noundef %79, ptr noundef %80, ptr noundef %81)
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %85, label %84

84:                                               ; preds = %72
  br label %185

85:                                               ; preds = %72
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ec_group_st, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !14
  %89 = getelementptr inbounds %struct.ec_method_st, ptr %88, i32 0, i32 34
  %90 = load ptr, ptr %89, align 8, !tbaa !17
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ec_group_st, ptr %93, i32 0, i32 13
  %95 = load ptr, ptr %94, align 8, !tbaa !11
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = call i32 %90(ptr noundef %91, ptr noundef %92, ptr noundef %95, ptr noundef %96, ptr noundef %97)
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %101, label %100

100:                                              ; preds = %85
  br label %185

101:                                              ; preds = %85
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ec_group_st, ptr %103, i32 0, i32 12
  %105 = load ptr, ptr %104, align 8, !tbaa !18
  %106 = load ptr, ptr %12, align 8, !tbaa !5
  %107 = call i32 @BN_GF2m_add(ptr noundef %102, ptr noundef %105, ptr noundef %106)
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %110, label %109

109:                                              ; preds = %101
  br label %185

110:                                              ; preds = %101
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = load ptr, ptr %12, align 8, !tbaa !5
  %114 = call i32 @BN_GF2m_add(ptr noundef %111, ptr noundef %112, ptr noundef %113)
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %117, label %116

116:                                              ; preds = %110
  br label %185

117:                                              ; preds = %110
  %118 = call i32 @ERR_set_mark()
  %119 = load ptr, ptr %15, align 8, !tbaa !5
  %120 = load ptr, ptr %12, 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 11
  %123 = getelementptr inbounds [6 x i32], ptr %122, i64 0, i64 0
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = call i32 @BN_GF2m_mod_solve_quad_arr(ptr noundef %119, ptr noundef %120, ptr noundef %123, ptr noundef %124)
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %142, label %127

127:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %128 = call i64 @ERR_peek_last_error()
  store i64 %128, ptr %20, align 8, !tbaa !19
  %129 = load i64, ptr %20, align 8, !tbaa !19
  %130 = call i32 @ERR_GET_LIB(i64 noundef %129)
  %131 = icmp eq i32 %130, 3
  br i1 %131, label %132, label %138

132:                                              ; preds = %127
  %133 = load i64, ptr %20, align 8, !tbaa !19
  %134 = call i32 @ERR_GET_REASON(i64 noundef %133)
  %135 = icmp eq i32 %134, 116
  br i1 %135, label %136, label %138

136:                                              ; preds = %132
  %137 = call i32 @ERR_pop_to_mark()
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 88, ptr noundef @__func__.ossl_ec_GF2m_simple_set_compressed_coordinates)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 110, ptr noundef null)
  br label %140

138:                                              ; preds = %132, %127
  %139 = call i32 @ERR_clear_last_mark()
  call void @ERR_new()
  call void @ERR_set_debug(ptr noundef @.str, i32 noundef 93, ptr noundef @__func__.ossl_ec_GF2m_simple_set_compressed_coordinates)
  call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 524291, ptr noundef null)
  br label %140

140:                                              ; preds = %138, %136
  store i32 2, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  %141 = load i32, ptr %19, align 4
  switch i32 %141, label %189 [
    i32 2, label %185
  ]

142:                                              ; preds = %117
  %143 = call i32 @ERR_clear_last_mark()
  %144 = load ptr, ptr %15, align 8, !tbaa !5
  %145 = call i32 @BN_is_odd(ptr noundef %144)
  %146 = icmp ne i32 %145, 0
  %147 = zext i1 %146 to i64
  %148 = select i1 %146, i32 1, i32 0
  store i32 %148, ptr %17, align 4, !tbaa !9
  %149 = load ptr, ptr %7, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.ec_group_st, ptr %149, i32 0, i32 0
  %151 = load ptr, ptr %150, align 8, !tbaa !14
  %152 = getelementptr inbounds %struct.ec_method_st, ptr %151, i32 0, i32 32
  %153 = load ptr, ptr %152, align 8, !tbaa !20
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = load ptr, ptr %14, align 8, !tbaa !5
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  %159 = call i32 %153(ptr noundef %154, ptr noundef %155, ptr noundef %156, ptr noundef %157, ptr noundef %158)
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %162, label %161

161:                                              ; preds = %142
  br label %185

162:                                              ; preds = %142
  %163 = load i32, ptr %17, align 4, !tbaa !9
  %164 = load i32, ptr %10, align 4, !tbaa !9
  %165 = icmp ne i32 %163, %164
  br i1 %165, label %166, label %174

166:                                              ; preds = %162
  %167 = load ptr, ptr %14, align 8, !tbaa !5
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = call i32 @BN_GF2m_add(ptr noundef %167, ptr noundef %168, ptr noundef %169)
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %173, label %172

172:                                              ; preds = %166
  br label %185

173:                                              ; preds = %166
  br label %174

174:                                              ; preds = %173, %162
  br label %175

175:                                              ; preds = %174, %71
  %176 = load ptr, ptr %7, align 8, !tbaa !5
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = load ptr, ptr %13, align 8, !tbaa !5
  %179 = load ptr, ptr %14, align 8, !tbaa !5
  %180 = load ptr, ptr %11, align 8, !tbaa !5
  %181 = call i32 @EC_POINT_set_affine_coordinates(ptr noundef %176, ptr noundef %177, ptr noundef %178, ptr noundef %179, ptr noundef %180)
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %184, label %183

183:                                              ; preds = %175
  br label %185

184:                                              ; preds = %175
  store i32 1, ptr %16, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %184, %183, %172, %161, %140, %116, %109, %100, %84, %70, %54, %45
  %186 = load ptr, ptr %11, align 8, !tbaa !5
  call void @BN_CTX_end(ptr noundef %186)
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  call void @BN_CTX_free(ptr noundef %187)
  %188 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %188, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %189

189:                                              ; preds = %185, %140, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %190 = load i32, ptr %6, align 4
  ret i32 %190
}

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

declare ptr @BN_CTX_new() #2

declare void @BN_CTX_start(ptr noundef) #2

declare ptr @BN_CTX_get(ptr noundef) #2

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

declare i32 @BN_is_zero(ptr noundef) #2

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

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

declare i32 @ERR_set_mark() #2

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

declare i64 @ERR_peek_last_error() #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @ERR_GET_LIB(i64 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @ERR_GET_REASON(i64 noundef) #3

declare i32 @ERR_pop_to_mark() #2

declare void @ERR_new() #2

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

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

declare i32 @ERR_clear_last_mark() #2

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

declare i32 @BN_is_odd(ptr noundef) #2

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

declare void @BN_CTX_end(ptr noundef) #2

declare void @BN_CTX_free(ptr noundef) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { inlinehint 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 104}
!12 = !{!"ec_group_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !6, i64 48, !13, i64 56, !6, i64 64, !7, i64 72, !6, i64 96, !6, i64 104, !10, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !10, i64 152, !7, i64 160, !6, i64 168, !6, i64 176}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 0}
!15 = !{!16, !6, i64 256}
!16 = !{!"ec_method_st", !10, i64 0, !10, 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}
!17 = !{!16, !6, i64 264}
!18 = !{!12, !6, i64 96}
!19 = !{!13, !13, i64 0}
!20 = !{!16, !6, i64 248}


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

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

7:                                                ; preds = %5
  %8 = tail call ptr @BN_CTX_new() #3
  %9 = icmp eq ptr %8, null
  br i1 %9, label %71, label %10

10:                                               ; preds = %7, %5
  %.063 = phi ptr [ %8, %7 ], [ %4, %5 ]
  %.061 = phi ptr [ %8, %7 ], [ null, %5 ]
  tail call void @BN_CTX_start(ptr noundef nonnull %.063) #3
  %11 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.063) #3
  %12 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.063) #3
  %13 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.063) #3
  %14 = tail call ptr @BN_CTX_get(ptr noundef nonnull %.063) #3
  %15 = icmp eq ptr %14, null
  br i1 %15, label %70, label %16

16:                                               ; preds = %10
  %17 = getelementptr inbounds i8, ptr %0, i64 72
  %18 = tail call i32 @BN_GF2m_mod_arr(ptr noundef %12, ptr noundef %2, ptr noundef nonnull %17) #3
  %.not67 = icmp eq i32 %18, 0
  br i1 %.not67, label %70, label %19

19:                                               ; preds = %16
  %20 = tail call i32 @BN_is_zero(ptr noundef %12) #3
  %.not68 = icmp eq i32 %20, 0
  br i1 %.not68, label %25, label %21

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %0, i64 104
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = tail call i32 @BN_GF2m_mod_sqrt_arr(ptr noundef %13, ptr noundef %23, ptr noundef nonnull %17, ptr noundef nonnull %.063) #3
  %.not77 = icmp eq i32 %24, 0
  br i1 %.not77, label %70, label %68

25:                                               ; preds = %19
  %26 = load ptr, ptr %0, align 8, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %26, i64 256
  %28 = load ptr, ptr %27, align 8, !tbaa !13
  %29 = tail call i32 %28(ptr noundef nonnull %0, ptr noundef %11, ptr noundef %12, ptr noundef nonnull %.063) #3
  %.not69 = icmp eq i32 %29, 0
  br i1 %.not69, label %70, label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr %0, align 8, !tbaa !12
  %32 = getelementptr inbounds i8, ptr %31, i64 264
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %0, i64 104
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = tail call i32 %33(ptr noundef nonnull %0, ptr noundef %11, ptr noundef %35, ptr noundef %11, ptr noundef nonnull %.063) #3
  %.not70 = icmp eq i32 %36, 0
  br i1 %.not70, label %70, label %37

37:                                               ; preds = %30
  %38 = getelementptr inbounds i8, ptr %0, i64 96
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %40 = tail call i32 @BN_GF2m_add(ptr noundef %11, ptr noundef %39, ptr noundef %11) #3
  %.not71 = icmp eq i32 %40, 0
  br i1 %.not71, label %70, label %41

41:                                               ; preds = %37
  %42 = tail call i32 @BN_GF2m_add(ptr noundef %11, ptr noundef %12, ptr noundef %11) #3
  %.not72 = icmp eq i32 %42, 0
  br i1 %.not72, label %70, label %43

43:                                               ; preds = %41
  %44 = tail call i32 @ERR_set_mark() #3
  %45 = tail call i32 @BN_GF2m_mod_solve_quad_arr(ptr noundef nonnull %14, ptr noundef %11, ptr noundef nonnull %17, ptr noundef nonnull %.063) #3
  %.not73 = icmp eq i32 %45, 0
  br i1 %.not73, label %46, label %57

46:                                               ; preds = %43
  %47 = tail call i64 @ERR_peek_last_error() #3
  %48 = tail call i32 @ERR_GET_LIB(i64 noundef %47)
  %49 = icmp eq i32 %48, 3
  br i1 %49, label %50, label %55

50:                                               ; preds = %46
  %51 = tail call i32 @ERR_GET_REASON(i64 noundef %47)
  %52 = icmp eq i32 %51, 116
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = tail call i32 @ERR_pop_to_mark() #3
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 88, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_set_compressed_coordinates) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 110, ptr noundef null) #3
  br label %70

55:                                               ; preds = %50, %46
  %56 = tail call i32 @ERR_clear_last_mark() #3
  tail call void @ERR_new() #3
  tail call void @ERR_set_debug(ptr noundef nonnull @.str, i32 noundef 93, ptr noundef nonnull @__func__.ossl_ec_GF2m_simple_set_compressed_coordinates) #3
  tail call void (i32, i32, ptr, ...) @ERR_set_error(i32 noundef 16, i32 noundef 524291, ptr noundef null) #3
  br label %70

57:                                               ; preds = %43
  %58 = tail call i32 @ERR_clear_last_mark() #3
  %59 = tail call i32 @BN_is_odd(ptr noundef nonnull %14) #3
  %60 = load ptr, ptr %0, align 8, !tbaa !12
  %61 = getelementptr inbounds i8, ptr %60, i64 248
  %62 = load ptr, ptr %61, align 8, !tbaa !17
  %63 = tail call i32 %62(ptr noundef nonnull %0, ptr noundef %13, ptr noundef %12, ptr noundef nonnull %14, ptr noundef nonnull %.063) #3
  %.not75 = icmp eq i32 %63, 0
  br i1 %.not75, label %70, label %64

64:                                               ; preds = %57
  %.not74 = icmp ne i32 %59, 0
  %65 = icmp eq i32 %3, 0
  %.not76 = xor i1 %65, %.not74
  br i1 %.not76, label %68, label %66

66:                                               ; preds = %64
  %67 = tail call i32 @BN_GF2m_add(ptr noundef %13, ptr noundef %13, ptr noundef %12) #3
  %.not = icmp eq i32 %67, 0
  br i1 %.not, label %70, label %68

68:                                               ; preds = %64, %66, %21
  %69 = tail call i32 @EC_POINT_set_affine_coordinates(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %12, ptr noundef %13, ptr noundef nonnull %.063) #3
  %.not78 = icmp ne i32 %69, 0
  %spec.select = zext i1 %.not78 to i32
  br label %70

70:                                               ; preds = %68, %53, %55, %66, %57, %41, %37, %30, %25, %21, %16, %10
  %.062 = phi i32 [ 0, %10 ], [ 0, %21 ], [ 0, %66 ], [ 0, %57 ], [ 0, %41 ], [ 0, %37 ], [ 0, %30 ], [ 0, %25 ], [ 0, %16 ], [ 0, %55 ], [ 0, %53 ], [ %spec.select, %68 ]
  tail call void @BN_CTX_end(ptr noundef nonnull %.063) #3
  tail call void @BN_CTX_free(ptr noundef %.061) #3
  br label %71

71:                                               ; preds = %7, %70
  %.0 = phi i32 [ %.062, %70 ], [ 0, %7 ]
  ret i32 %.0
}

declare ptr @BN_CTX_new() local_unnamed_addr #1

declare void @BN_CTX_start(ptr noundef) local_unnamed_addr #1

declare ptr @BN_CTX_get(ptr noundef) local_unnamed_addr #1

declare i32 @BN_GF2m_mod_arr(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @BN_is_zero(ptr noundef) local_unnamed_addr #1

declare i32 @BN_GF2m_mod_sqrt_arr(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @BN_GF2m_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @ERR_set_mark() local_unnamed_addr #1

declare i32 @BN_GF2m_mod_solve_quad_arr(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i64 @ERR_peek_last_error() local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @ERR_GET_LIB(i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @ERR_GET_REASON(i64 noundef) local_unnamed_addr #2

declare i32 @ERR_pop_to_mark() local_unnamed_addr #1

declare void @ERR_new() local_unnamed_addr #1

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

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

declare i32 @ERR_clear_last_mark() local_unnamed_addr #1

declare i32 @BN_is_odd(ptr noundef) local_unnamed_addr #1

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

declare void @BN_CTX_end(ptr noundef) local_unnamed_addr #1

declare void @BN_CTX_free(ptr noundef) local_unnamed_addr #1

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


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