; LLVM IR from albertobsd/keyhunt :: secp256k1/SECP256K1.ll (ZN9Secp256K117ParsePublicKeyHexEPcR5PointRb)

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

%class.Int = type { %union.anon }
%union.anon = type { [5 x i64] }
%class.Point = type { %class.Int, %class.Int, %class.Int }

@.str.6 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [83 x i8], align 1

declare void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) #0

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

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

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

declare void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120)) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef, i32 noundef) #3 align 2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9Secp256K117ParsePublicKeyHexEPcR5PointRb(ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(120) %2, ptr noundef nonnull align 1 dereferenceable(1) %3) #3 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca %class.Int, align 8
  %15 = alloca %class.Int, align 8
  %16 = alloca i32, align 4
  %17 = alloca %class.Int, align 8
  %18 = alloca %class.Int, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call i64 @strlen(ptr noundef %22) #7
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %10, align 4, !tbaa !9
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120) %25)
  %26 = load i32, ptr %10, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 2
  br i1 %27, label %28, label %30

28:                                               ; preds = %4
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %143

30:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %21, ptr noundef %31, i32 noundef 0)
  store i8 %32, ptr %12, align 1, !tbaa !11
  %33 = load i8, ptr %12, align 1, !tbaa !11
  %34 = zext i8 %33 to i32
  switch i32 %34, label %132 [
    i32 2, label %35
    i32 3, label %63
    i32 4, label %91
  ]

35:                                               ; preds = %30
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 66
  br i1 %37, label %38, label %40

38:                                               ; preds = %35
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %142

40:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %54, %40
  %42 = load i32, ptr %13, align 4, !tbaa !9
  %43 = icmp slt i32 %42, 32
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  store i32 3, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %57

45:                                               ; preds = %41
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %class.Point, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %13, align 4, !tbaa !9
  %49 = sub nsw i32 31, %48
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  %53 = call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %21, ptr noundef %50, i32 noundef %52)
  call void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40) %47, i32 noundef %49, i8 noundef zeroext %53)
  br label %54

54:                                               ; preds = %45
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %13, align 4, !tbaa !9
  br label %41, !llvm.loop !12

57:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #6
  %58 = load ptr, ptr %8, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.Point, ptr %58, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %59, i64 40, i1 false), !tbaa.struct !14
  call void @_ZN9Secp256K14GetYE3Intb(ptr dead_on_unwind writable sret(%class.Int) align 8 %14, ptr noundef nonnull align 8 dereferenceable(983240) %21, ptr noundef byval(%class.Int) align 8 %15, i1 noundef zeroext true)
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %class.Point, ptr %60, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %61, ptr align 8 %14, i64 40, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #6
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  store i8 1, ptr %62, align 1, !tbaa !15
  br label %134

63:                                               ; preds = %30
  %64 = load i32, ptr %10, align 4, !tbaa !9
  %65 = icmp ne i32 %64, 66
  br i1 %65, label %66, label %68

66:                                               ; preds = %63
  %67 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %142

68:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %82, %68
  %70 = load i32, ptr %16, align 4, !tbaa !9
  %71 = icmp slt i32 %70, 32
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 6, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %85

73:                                               ; preds = %69
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %class.Point, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %16, align 4, !tbaa !9
  %77 = sub nsw i32 31, %76
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load i32, ptr %16, align 4, !tbaa !9
  %80 = add nsw i32 %79, 1
  %81 = call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %21, ptr noundef %78, i32 noundef %80)
  call void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40) %75, i32 noundef %77, i8 noundef zeroext %81)
  br label %82

82:                                               ; preds = %73
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %16, align 4, !tbaa !9
  br label %69, !llvm.loop !17

85:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #6
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %class.Point, ptr %86, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %87, i64 40, i1 false), !tbaa.struct !14
  call void @_ZN9Secp256K14GetYE3Intb(ptr dead_on_unwind writable sret(%class.Int) align 8 %17, ptr noundef nonnull align 8 dereferenceable(983240) %21, ptr noundef byval(%class.Int) align 8 %18, i1 noundef zeroext false)
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %class.Point, ptr %88, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %89, ptr align 8 %17, i64 40, i1 false), !tbaa.struct !14
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #6
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  store i8 1, ptr %90, align 1, !tbaa !15
  br label %134

91:                                               ; preds = %30
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = icmp ne i32 %92, 130
  br i1 %93, label %94, label %96

94:                                               ; preds = %91
  %95 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  call void @exit(i32 noundef -1) #8
  unreachable

96:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %110, %96
  %98 = load i32, ptr %19, align 4, !tbaa !9
  %99 = icmp slt i32 %98, 32
  br i1 %99, label %101, label %100

100:                                              ; preds = %97
  store i32 9, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %113

101:                                              ; preds = %97
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.Point, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %19, align 4, !tbaa !9
  %105 = sub nsw i32 31, %104
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = load i32, ptr %19, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  %109 = call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %21, ptr noundef %106, i32 noundef %108)
  call void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40) %103, i32 noundef %105, i8 noundef zeroext %109)
  br label %110

110:                                              ; preds = %101
  %111 = load i32, ptr %19, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %19, align 4, !tbaa !9
  br label %97, !llvm.loop !18

113:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %127, %113
  %115 = load i32, ptr %20, align 4, !tbaa !9
  %116 = icmp slt i32 %115, 32
  br i1 %116, label %118, label %117

117:                                              ; preds = %114
  store i32 12, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %130

118:                                              ; preds = %114
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %class.Point, ptr %119, i32 0, i32 1
  %121 = load i32, ptr %20, align 4, !tbaa !9
  %122 = sub nsw i32 31, %121
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = load i32, ptr %20, align 4, !tbaa !9
  %125 = add nsw i32 %124, 33
  %126 = call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %21, ptr noundef %123, i32 noundef %125)
  call void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40) %120, i32 noundef %122, i8 noundef zeroext %126)
  br label %127

127:                                              ; preds = %118
  %128 = load i32, ptr %20, align 4, !tbaa !9
  %129 = add nsw i32 %128, 1
  store i32 %129, ptr %20, align 4, !tbaa !9
  br label %114, !llvm.loop !19

130:                                              ; preds = %117
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  store i8 0, ptr %131, align 1, !tbaa !15
  br label %134

132:                                              ; preds = %30
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %142

134:                                              ; preds = %130, %85, %57
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %class.Point, ptr %135, i32 0, i32 2
  call void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(40) %136, i32 noundef 1)
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = call noundef zeroext i1 @_ZN9Secp256K12ECER5Point(ptr noundef nonnull align 8 dereferenceable(983240) %21, ptr noundef nonnull align 8 dereferenceable(120) %137)
  br i1 %138, label %141, label %139

139:                                              ; preds = %134
  %140 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %142

141:                                              ; preds = %134
  store i1 true, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %142

142:                                              ; preds = %141, %139, %132, %66, %38
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %143

143:                                              ; preds = %142, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %144 = load i1, ptr %5, align 1
  ret i1 %144
}

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

declare void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i8 noundef zeroext) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9Secp256K14GetYE3Intb(ptr dead_on_unwind noalias writable sret(%class.Int) align 8, ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef byval(%class.Int) align 8, i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9Secp256K12ECER5Point(ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef nonnull align 8 dereferenceable(120)) #3 align 2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 = { noreturn 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 #5 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { noreturn 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{i64 0, i64 40, !11}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}
!19 = distinct !{!19, !13}


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

%class.Int = type { %union.anon }
%union.anon = type { [5 x i64] }

@.str.6 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [83 x i8], align 1

declare void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress 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) #2

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

declare void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef, i32 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9Secp256K117ParsePublicKeyHexEPcR5PointRb(ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(120) %2, ptr nocapture noundef nonnull writeonly align 1 dereferenceable(1) %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %class.Int, align 8
  %6 = alloca %class.Int, align 8
  %7 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %8 = trunc i64 %7 to i32
  tail call void @_ZN5Point5ClearEv(ptr noundef nonnull align 8 dereferenceable(120) %2)
  %9 = icmp slt i32 %8, 2
  br i1 %9, label %10, label %12

10:                                               ; preds = %4
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  br label %48

12:                                               ; preds = %4
  %13 = tail call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef %1, i32 noundef 0)
  switch i8 %13, label %42 [
    i8 2, label %14
    i8 3, label %22
    i8 4, label %30
  ]

14:                                               ; preds = %12
  %.not48 = icmp eq i32 %8, 66
  br i1 %.not48, label %.preheader, label %15

15:                                               ; preds = %14
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %48

17:                                               ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #8
  call void @_ZN9Secp256K14GetYE3Intb(ptr dead_on_unwind nonnull writable sret(%class.Int) align 8 %5, ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef nonnull byval(%class.Int) align 8 %2, i1 noundef zeroext true)
  %18 = getelementptr inbounds i8, ptr %2, i64 40
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull align 8 dereferenceable(40) %5, i64 40, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #8
  br label %.loopexit

.preheader:                                       ; preds = %14, %.preheader
  %.04455 = phi i32 [ %20, %.preheader ], [ 0, %14 ]
  %19 = sub nuw nsw i32 31, %.04455
  %20 = add nuw nsw i32 %.04455, 1
  %21 = tail call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef %1, i32 noundef %20)
  tail call void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef %19, i8 noundef zeroext %21)
  %exitcond58.not = icmp eq i32 %20, 32
  br i1 %exitcond58.not, label %17, label %.preheader, !llvm.loop !9

22:                                               ; preds = %12
  %.not47 = icmp eq i32 %8, 66
  br i1 %.not47, label %.preheader49, label %23

23:                                               ; preds = %22
  %24 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7)
  br label %48

25:                                               ; preds = %.preheader49
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #8
  call void @_ZN9Secp256K14GetYE3Intb(ptr dead_on_unwind nonnull writable sret(%class.Int) align 8 %6, ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef nonnull byval(%class.Int) align 8 %2, i1 noundef zeroext false)
  %26 = getelementptr inbounds i8, ptr %2, i64 40
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %26, ptr noundef nonnull align 8 dereferenceable(40) %6, i64 40, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #8
  br label %.loopexit

.preheader49:                                     ; preds = %22, %.preheader49
  %.04354 = phi i32 [ %28, %.preheader49 ], [ 0, %22 ]
  %27 = sub nuw nsw i32 31, %.04354
  %28 = add nuw nsw i32 %.04354, 1
  %29 = tail call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef %1, i32 noundef %28)
  tail call void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef %27, i8 noundef zeroext %29)
  %exitcond57.not = icmp eq i32 %28, 32
  br i1 %exitcond57.not, label %25, label %.preheader49, !llvm.loop !11

30:                                               ; preds = %12
  %.not = icmp eq i32 %8, 130
  br i1 %.not, label %.preheader51, label %31

31:                                               ; preds = %30
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  tail call void @exit(i32 noundef -1) #9
  unreachable

.preheader50:                                     ; preds = %.preheader51
  %33 = getelementptr inbounds i8, ptr %2, i64 40
  br label %37

.preheader51:                                     ; preds = %30, %.preheader51
  %.04252 = phi i32 [ %35, %.preheader51 ], [ 0, %30 ]
  %34 = sub nuw nsw i32 31, %.04252
  %35 = add nuw nsw i32 %.04252, 1
  %36 = tail call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef %1, i32 noundef %35)
  tail call void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef %34, i8 noundef zeroext %36)
  %exitcond.not = icmp eq i32 %35, 32
  br i1 %exitcond.not, label %.preheader50, label %.preheader51, !llvm.loop !12

37:                                               ; preds = %.preheader50, %37
  %.053 = phi i32 [ 0, %.preheader50 ], [ %41, %37 ]
  %38 = sub nuw nsw i32 31, %.053
  %39 = add nuw nsw i32 %.053, 33
  %40 = tail call noundef zeroext i8 @_ZN9Secp256K17GetByteEPci(ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef %1, i32 noundef %39)
  tail call void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40) %33, i32 noundef %38, i8 noundef zeroext %40)
  %41 = add nuw nsw i32 %.053, 1
  %exitcond56.not = icmp eq i32 %41, 32
  br i1 %exitcond56.not, label %.loopexit, label %37, !llvm.loop !13

42:                                               ; preds = %12
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  br label %48

.loopexit:                                        ; preds = %37, %25, %17
  %.sink = phi i8 [ 1, %25 ], [ 1, %17 ], [ 0, %37 ]
  store i8 %.sink, ptr %3, align 1, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %2, i64 80
  call void @_ZN3Int8SetInt32Ej(ptr noundef nonnull align 8 dereferenceable(40) %44, i32 noundef 1)
  %45 = call noundef zeroext i1 @_ZN9Secp256K12ECER5Point(ptr noundef nonnull align 8 dereferenceable(983240) %0, ptr noundef nonnull align 8 dereferenceable(120) %2)
  br i1 %45, label %48, label %46

46:                                               ; preds = %.loopexit
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  br label %48

48:                                               ; preds = %15, %23, %42, %46, %.loopexit, %10
  %.1 = phi i1 [ false, %10 ], [ false, %42 ], [ false, %46 ], [ false, %23 ], [ false, %15 ], [ true, %.loopexit ]
  ret i1 %.1
}

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

declare void @_ZN3Int7SetByteEih(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9Secp256K14GetYE3Intb(ptr dead_on_unwind noalias writable sret(%class.Int) align 8, ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef byval(%class.Int) align 8, i1 noundef zeroext) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN9Secp256K12ECER5Point(ptr noundef nonnull align 8 dereferenceable(983240), ptr noundef nonnull align 8 dereferenceable(120)) local_unnamed_addr #3 align 2

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress 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 = { 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 #5 = { noreturn 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 #6 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{i64 0, i64 40, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass