; LLVM IR from specinfo-ua/UAPKI :: library/uapkic/src (dstu4145)

; 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.ByteArray_st = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@dstu4145_self_test.test_Qx = external hidden constant [21 x i8], align 16
@dstu4145_self_test.test_Qy = external hidden constant [21 x i8], align 16
@dstu4145_self_test.test_k = external hidden constant [21 x i8], align 16
@dstu4145_self_test.test_R = external hidden constant [21 x i8], align 16
@dstu4145_self_test.test_S = external hidden constant [21 x i8], align 16
@dstu4145_self_test.ba_d = external hidden constant %struct.ByteArray_st, align 8
@dstu4145_self_test.ba_H = external hidden constant %struct.ByteArray_st, align 8

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

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #1

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #1

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

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

declare void @ba_free(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @dstu4145_sign_internal(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare void @wa_free(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @dstu4145_self_test() #2 {
  %1 = alloca i32, align 4
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #4
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #4
  store ptr null, ptr %2, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store ptr null, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  store ptr null, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr null, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store ptr null, ptr %7, align 8, !tbaa !9
  br label %8

8:                                                ; preds = %0
  %9 = call ptr @ec_alloc_default(i32 noundef 44)
  store ptr %9, ptr %2, align 8, !tbaa !9
  %10 = icmp eq ptr null, %9
  br i1 %10, label %11, label %13

11:                                               ; preds = %8
  store i32 2, ptr %1, align 4, !tbaa !5
  %12 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 452, i32 noundef %12)
  br label %133

13:                                               ; preds = %8
  br label %14

14:                                               ; preds = %13
  br label %15

15:                                               ; preds = %14
  br label %16

16:                                               ; preds = %15
  %17 = load ptr, ptr %2, align 8, !tbaa !9
  %18 = call i32 @dstu4145_get_pubkey(ptr noundef %17, ptr noundef @dstu4145_self_test.ba_d, ptr noundef %4, ptr noundef %5)
  store i32 %18, ptr %1, align 4, !tbaa !5
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %23

21:                                               ; preds = %16
  %22 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 453, i32 noundef %22)
  br label %133

23:                                               ; preds = %16
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %4, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct.ByteArray_st, ptr %26, i32 0, i32 1
  %28 = load i64, ptr %27, align 8, !tbaa !11
  %29 = icmp ne i64 %28, 21
  br i1 %29, label %47, label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr %5, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct.ByteArray_st, ptr %31, i32 0, i32 1
  %33 = load i64, ptr %32, align 8, !tbaa !11
  %34 = icmp ne i64 %33, 21
  br i1 %34, label %47, label %35

35:                                               ; preds = %30
  %36 = load ptr, ptr %4, align 8, !tbaa !9
  %37 = getelementptr inbounds %struct.ByteArray_st, ptr %36, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  %39 = call i32 @memcmp(ptr noundef %38, ptr noundef @dstu4145_self_test.test_Qx, i64 noundef 21) #5
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %47, label %41

41:                                               ; preds = %35
  %42 = load ptr, ptr %5, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct.ByteArray_st, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  %45 = call i32 @memcmp(ptr noundef %44, ptr noundef @dstu4145_self_test.test_Qy, i64 noundef 21) #5
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %52

47:                                               ; preds = %41, %35, %30, %25
  br label %48

48:                                               ; preds = %47
  store i32 33, ptr %1, align 4, !tbaa !5
  %49 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 458, i32 noundef %49, ptr noundef null)
  br label %133

50:                                               ; No predecessors!
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51, %41
  br label %53

53:                                               ; preds = %52
  %54 = call ptr @wa_alloc_from_le(ptr noundef @dstu4145_self_test.test_k, i64 noundef 21)
  store ptr %54, ptr %3, align 8, !tbaa !9
  %55 = icmp eq ptr null, %54
  br i1 %55, label %56, label %58

56:                                               ; preds = %53
  store i32 2, ptr %1, align 4, !tbaa !5
  %57 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 461, i32 noundef %57)
  br label %133

58:                                               ; preds = %53
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  br label %61

61:                                               ; preds = %60
  %62 = load ptr, ptr %2, align 8, !tbaa !9
  %63 = call i32 @dstu4145_init_sign(ptr noundef %62, ptr noundef @dstu4145_self_test.ba_d)
  store i32 %63, ptr %1, align 4, !tbaa !5
  %64 = load i32, ptr %1, align 4, !tbaa !5
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %68

66:                                               ; preds = %61
  %67 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 463, i32 noundef %67)
  br label %133

68:                                               ; preds = %61
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %2, align 8, !tbaa !9
  %73 = load ptr, ptr %3, align 8, !tbaa !9
  %74 = call i32 @dstu4145_sign_internal(ptr noundef %72, ptr noundef @dstu4145_self_test.ba_H, ptr noundef %73, ptr noundef %6, ptr noundef %7)
  store i32 %74, ptr %1, align 4, !tbaa !5
  %75 = load i32, ptr %1, align 4, !tbaa !5
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %79

77:                                               ; preds = %71
  %78 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 464, i32 noundef %78)
  br label %133

79:                                               ; preds = %71
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %6, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.ByteArray_st, ptr %82, i32 0, i32 1
  %84 = load i64, ptr %83, align 8, !tbaa !11
  %85 = icmp ne i64 %84, 21
  br i1 %85, label %103, label %86

86:                                               ; preds = %81
  %87 = load ptr, ptr %7, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct.ByteArray_st, ptr %87, i32 0, i32 1
  %89 = load i64, ptr %88, align 8, !tbaa !11
  %90 = icmp ne i64 %89, 21
  br i1 %90, label %103, label %91

91:                                               ; preds = %86
  %92 = load ptr, ptr %6, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.ByteArray_st, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !14
  %95 = call i32 @memcmp(ptr noundef %94, ptr noundef @dstu4145_self_test.test_R, i64 noundef 21) #5
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %103, label %97

97:                                               ; preds = %91
  %98 = load ptr, ptr %7, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.ByteArray_st, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !14
  %101 = call i32 @memcmp(ptr noundef %100, ptr noundef @dstu4145_self_test.test_S, i64 noundef 21) #5
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %108

103:                                              ; preds = %97, %91, %86, %81
  br label %104

104:                                              ; preds = %103
  store i32 33, ptr %1, align 4, !tbaa !5
  %105 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 470, i32 noundef %105, ptr noundef null)
  br label %133

106:                                              ; No predecessors!
  br label %107

107:                                              ; preds = %106
  br label %108

108:                                              ; preds = %107, %97
  br label %109

109:                                              ; preds = %108
  %110 = load ptr, ptr %2, align 8, !tbaa !9
  %111 = load ptr, ptr %4, align 8, !tbaa !9
  %112 = load ptr, ptr %5, align 8, !tbaa !9
  %113 = call i32 @dstu4145_init_verify(ptr noundef %110, ptr noundef %111, ptr noundef %112)
  store i32 %113, ptr %1, align 4, !tbaa !5
  %114 = load i32, ptr %1, align 4, !tbaa !5
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %118

116:                                              ; preds = %109
  %117 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 473, i32 noundef %117)
  br label %133

118:                                              ; preds = %109
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %2, align 8, !tbaa !9
  %123 = load ptr, ptr %6, align 8, !tbaa !9
  %124 = load ptr, ptr %7, align 8, !tbaa !9
  %125 = call i32 @dstu4145_verify(ptr noundef %122, ptr noundef @dstu4145_self_test.ba_H, ptr noundef %123, ptr noundef %124)
  store i32 %125, ptr %1, align 4, !tbaa !5
  %126 = load i32, ptr %1, align 4, !tbaa !5
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %128, label %130

128:                                              ; preds = %121
  %129 = load i32, ptr %1, align 4, !tbaa !5
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 474, i32 noundef %129)
  br label %133

130:                                              ; preds = %121
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  br label %133

133:                                              ; preds = %132, %128, %116, %104, %77, %66, %56, %48, %21, %11
  %134 = load ptr, ptr %3, align 8, !tbaa !9
  call void @wa_free(ptr noundef %134)
  %135 = load ptr, ptr %4, align 8, !tbaa !9
  call void @ba_free(ptr noundef %135)
  %136 = load ptr, ptr %5, align 8, !tbaa !9
  call void @ba_free(ptr noundef %136)
  %137 = load ptr, ptr %6, align 8, !tbaa !9
  call void @ba_free(ptr noundef %137)
  %138 = load ptr, ptr %7, align 8, !tbaa !9
  call void @ba_free(ptr noundef %138)
  %139 = load ptr, ptr %2, align 8, !tbaa !9
  call void @ec_free(ptr noundef %139)
  %140 = load i32, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #4
  ret i32 %140
}

declare ptr @ec_alloc_default(i32 noundef) #1

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #3

declare ptr @wa_alloc_from_le(ptr noundef, i64 noundef) #1

declare void @ec_free(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 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 #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"ByteArray_st", !10, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !10, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ByteArray_st = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@dstu4145_self_test.test_Qx = external hidden constant [21 x i8], align 16
@dstu4145_self_test.test_Qy = external hidden constant [21 x i8], align 16
@dstu4145_self_test.test_k = external hidden constant [21 x i8], align 16
@dstu4145_self_test.test_R = external hidden constant [21 x i8], align 16
@dstu4145_self_test.test_S = external hidden constant [21 x i8], align 16
@dstu4145_self_test.ba_d = external hidden constant %struct.ByteArray_st, align 8
@dstu4145_self_test.ba_H = external hidden constant %struct.ByteArray_st, align 8

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

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

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

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

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

declare void @ba_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @dstu4145_sign_internal(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @wa_free(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @dstu4145_self_test() local_unnamed_addr #2 {
  %1 = alloca ptr, align 8
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  store ptr null, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  store ptr null, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store ptr null, ptr %4, align 8, !tbaa !5
  %5 = tail call ptr @ec_alloc_default(i32 noundef 44) #4
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %8

7:                                                ; preds = %0
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 452, i32 noundef 2) #4
  br label %57

8:                                                ; preds = %0
  %9 = call i32 @dstu4145_get_pubkey(ptr noundef nonnull %5, ptr noundef nonnull @dstu4145_self_test.ba_d, ptr noundef nonnull %1, ptr noundef nonnull %2)
  %.not = icmp eq i32 %9, 0
  br i1 %.not, label %11, label %10

10:                                               ; preds = %8
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 453, i32 noundef %9) #4
  br label %57

11:                                               ; preds = %8
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 8
  %14 = load i64, ptr %13, align 8, !tbaa !9
  %.not31 = icmp eq i64 %14, 21
  br i1 %.not31, label %15, label %23

15:                                               ; preds = %11
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !9
  %.not32 = icmp eq i64 %18, 21
  br i1 %.not32, label %19, label %23

19:                                               ; preds = %15
  %20 = load ptr, ptr %12, align 8, !tbaa !12
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(21) %20, ptr noundef nonnull dereferenceable(21) @dstu4145_self_test.test_Qx, i64 21)
  %.not33 = icmp eq i32 %bcmp, 0
  br i1 %.not33, label %21, label %23

21:                                               ; preds = %19
  %22 = load ptr, ptr %16, align 8, !tbaa !12
  %bcmp34 = call i32 @bcmp(ptr noundef nonnull dereferenceable(21) %22, ptr noundef nonnull dereferenceable(21) @dstu4145_self_test.test_Qy, i64 21)
  %.not35 = icmp eq i32 %bcmp34, 0
  br i1 %.not35, label %24, label %23

23:                                               ; preds = %11, %15, %19, %21
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 458, i32 noundef 33, ptr noundef null) #4
  br label %57

24:                                               ; preds = %21
  %25 = call ptr @wa_alloc_from_le(ptr noundef nonnull @dstu4145_self_test.test_k, i64 noundef 21) #4
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 461, i32 noundef 2) #4
  br label %57

28:                                               ; preds = %24
  %29 = call i32 @dstu4145_init_sign(ptr noundef nonnull %5, ptr noundef nonnull @dstu4145_self_test.ba_d)
  %.not36 = icmp eq i32 %29, 0
  br i1 %.not36, label %31, label %30

30:                                               ; preds = %28
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 463, i32 noundef %29) #4
  br label %57

31:                                               ; preds = %28
  %32 = call i32 @dstu4145_sign_internal(ptr noundef nonnull %5, ptr noundef nonnull @dstu4145_self_test.ba_H, ptr noundef nonnull %25, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %.not37 = icmp eq i32 %32, 0
  br i1 %.not37, label %34, label %33

33:                                               ; preds = %31
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 464, i32 noundef %32) #4
  br label %57

34:                                               ; preds = %31
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = load i64, ptr %36, align 8, !tbaa !9
  %.not38 = icmp eq i64 %37, 21
  br i1 %.not38, label %38, label %46

38:                                               ; preds = %34
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %.not39 = icmp eq i64 %41, 21
  br i1 %.not39, label %42, label %46

42:                                               ; preds = %38
  %43 = load ptr, ptr %35, align 8, !tbaa !12
  %bcmp40 = call i32 @bcmp(ptr noundef nonnull dereferenceable(21) %43, ptr noundef nonnull dereferenceable(21) @dstu4145_self_test.test_R, i64 21)
  %.not41 = icmp eq i32 %bcmp40, 0
  br i1 %.not41, label %44, label %46

44:                                               ; preds = %42
  %45 = load ptr, ptr %39, align 8, !tbaa !12
  %bcmp42 = call i32 @bcmp(ptr noundef nonnull dereferenceable(21) %45, ptr noundef nonnull dereferenceable(21) @dstu4145_self_test.test_S, i64 21)
  %.not43 = icmp eq i32 %bcmp42, 0
  br i1 %.not43, label %47, label %46

46:                                               ; preds = %34, %38, %42, %44
  call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 470, i32 noundef 33, ptr noundef null) #4
  br label %57

47:                                               ; preds = %44
  %48 = load ptr, ptr %1, align 8, !tbaa !5
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = call i32 @dstu4145_init_verify(ptr noundef nonnull %5, ptr noundef %48, ptr noundef %49)
  %.not44 = icmp eq i32 %50, 0
  br i1 %.not44, label %52, label %51

51:                                               ; preds = %47
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 473, i32 noundef %50) #4
  br label %57

52:                                               ; preds = %47
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = call i32 @dstu4145_verify(ptr noundef nonnull %5, ptr noundef nonnull @dstu4145_self_test.ba_H, ptr noundef %53, ptr noundef %54)
  %.not45 = icmp eq i32 %55, 0
  br i1 %.not45, label %57, label %56

56:                                               ; preds = %52
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 474, i32 noundef %55) #4
  br label %57

57:                                               ; preds = %52, %56, %51, %46, %33, %30, %27, %23, %10, %7
  %.022 = phi i32 [ 2, %7 ], [ %9, %10 ], [ 33, %23 ], [ 2, %27 ], [ %29, %30 ], [ %32, %33 ], [ 33, %46 ], [ %50, %51 ], [ %55, %56 ], [ 0, %52 ]
  %.0 = phi ptr [ null, %7 ], [ null, %10 ], [ null, %23 ], [ null, %27 ], [ %25, %30 ], [ %25, %33 ], [ %25, %46 ], [ %25, %51 ], [ %25, %56 ], [ %25, %52 ]
  call void @wa_free(ptr noundef %.0) #4
  %58 = load ptr, ptr %1, align 8, !tbaa !5
  call void @ba_free(ptr noundef %58) #4
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  call void @ba_free(ptr noundef %59) #4
  %60 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ba_free(ptr noundef %60) #4
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  call void @ba_free(ptr noundef %61) #4
  call void @ec_free(ptr noundef %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  ret i32 %.022
}

declare ptr @ec_alloc_default(i32 noundef) local_unnamed_addr #1

declare ptr @wa_alloc_from_le(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @ec_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #3

attributes #0 = { mustprogress 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 = { nofree nounwind willreturn memory(argmem: read) }
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, !11, i64 8}
!10 = !{!"ByteArray_st", !6, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !6, i64 0}


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