; LLVM IR from specinfo-ua/UAPKI :: library/uapkic/src (math-int-internal)

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

@.str = external hidden unnamed_addr constant [27 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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 zeroext i1 @int_is_zero(ptr noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @int_rshift(i64 noundef, ptr noundef, i64 noundef, ptr noundef) #2

declare ptr @wa_alloc_with_zero(i64 noundef) #3

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

declare ptr @wa_copy_with_alloc(ptr noundef) #3

declare void @wa_free(ptr noundef) #3

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

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

20:                                               ; preds = %3
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %25, label %23

23:                                               ; preds = %20
  store i32 2, ptr %10, align 4, !tbaa !9
  %24 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 1136, i32 noundef %24, ptr noundef null)
  br label %181

25:                                               ; preds = %20
  br label %26

26:                                               ; preds = %25
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %33, label %31

31:                                               ; preds = %28
  store i32 2, ptr %10, align 4, !tbaa !9
  %32 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 1137, i32 noundef %32, ptr noundef null)
  br label %181

33:                                               ; preds = %28
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = icmp sge i32 %37, 0
  br i1 %38, label %41, label %39

39:                                               ; preds = %36
  store i32 2, ptr %10, align 4, !tbaa !9
  %40 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 1138, i32 noundef %40, ptr noundef null)
  br label %181

41:                                               ; preds = %36
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.WordArray_st, ptr %44, i32 0, i32 1
  %46 = load i64, ptr %45, align 8, !tbaa !13
  %47 = shl i64 %46, 6
  store i64 %47, ptr %11, align 8, !tbaa !11
  store i64 0, ptr %12, align 8, !tbaa !11
  %48 = load i32, ptr %5, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = shl i64 1, %49
  store i64 %50, ptr %13, align 8, !tbaa !11
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = sub nsw i32 64, %51
  %53 = zext i32 %52 to i64
  %54 = lshr i64 -1, %53
  store i64 %54, ptr %14, align 8, !tbaa !11
  %55 = load i64, ptr %14, align 8, !tbaa !11
  %56 = lshr i64 %55, 1
  store i64 %56, ptr %15, align 8, !tbaa !11
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %57

57:                                               ; preds = %43
  %58 = load i64, ptr %11, align 8, !tbaa !11
  %59 = add i64 %58, 1
  %60 = mul i64 %59, 4
  %61 = call noalias ptr @malloc(i64 noundef %60) #7
  store ptr %61, ptr %9, align 8, !tbaa !5
  %62 = icmp eq ptr null, %61
  br i1 %62, label %63, label %65

63:                                               ; preds = %57
  store i32 1, ptr %10, align 4, !tbaa !9
  %64 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 1147, i32 noundef %64, ptr noundef null)
  br label %181

65:                                               ; preds = %57
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call ptr @wa_copy_with_alloc(ptr noundef %69)
  store ptr %70, ptr %7, align 8, !tbaa !5
  %71 = icmp eq ptr null, %70
  br i1 %71, label %72, label %74

72:                                               ; preds = %68
  store i32 2, ptr %10, align 4, !tbaa !9
  %73 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 1148, i32 noundef %73)
  br label %181

74:                                               ; preds = %68
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.WordArray_st, ptr %78, i32 0, i32 1
  %80 = load i64, ptr %79, align 8, !tbaa !13
  %81 = call ptr @wa_alloc_with_zero(i64 noundef %80)
  store ptr %81, ptr %8, align 8, !tbaa !5
  %82 = icmp eq ptr null, %81
  br i1 %82, label %83, label %85

83:                                               ; preds = %77
  store i32 2, ptr %10, align 4, !tbaa !9
  %84 = load i32, ptr %10, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 1149, i32 noundef %84)
  br label %181

85:                                               ; preds = %77
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %153, %87
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = call zeroext i1 @int_is_zero(ptr noundef %89)
  %91 = xor i1 %90, true
  br i1 %91, label %92, label %159

92:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.WordArray_st, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !15
  %96 = getelementptr inbounds i64, ptr %95, i64 0
  %97 = load i64, ptr %96, align 8, !tbaa !11
  store i64 %97, ptr %18, align 8, !tbaa !11
  %98 = load i64, ptr %18, align 8, !tbaa !11
  %99 = and i64 %98, 1
  %100 = icmp eq i64 %99, 1
  br i1 %100, label %101, label %148

101:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %102 = load i64, ptr %18, align 8, !tbaa !11
  %103 = load i64, ptr %14, align 8, !tbaa !11
  %104 = and i64 %102, %103
  store i64 %104, ptr %19, align 8, !tbaa !11
  %105 = load i64, ptr %19, align 8, !tbaa !11
  %106 = load i64, ptr %15, align 8, !tbaa !11
  %107 = icmp ugt i64 %105, %106
  br i1 %107, label %108, label %132

108:                                              ; preds = %101
  %109 = load i64, ptr %19, align 8, !tbaa !11
  %110 = load i64, ptr %13, align 8, !tbaa !11
  %111 = sub i64 %109, %110
  %112 = trunc i64 %111 to i32
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds i32, ptr %113, i64 %115
  store i32 %112, ptr %116, align 4, !tbaa !9
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = load i32, ptr %16, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = sub nsw i32 0, %121
  %123 = sext i32 %122 to i64
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.WordArray_st, ptr %124, i32 0, i32 0
  %126 = load ptr, ptr %125, align 8, !tbaa !15
  %127 = getelementptr inbounds i64, ptr %126, i64 0
  store i64 %123, ptr %127, align 8, !tbaa !11
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = call i64 @int_add(ptr noundef %128, ptr noundef %129, ptr noundef %130)
  store i64 %131, ptr %12, align 8, !tbaa !11
  br label %147

132:                                              ; preds = %101
  %133 = load i64, ptr %19, align 8, !tbaa !11
  %134 = trunc i64 %133 to i32
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = load i32, ptr %16, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds i32, ptr %135, i64 %137
  store i32 %134, ptr %138, align 4, !tbaa !9
  %139 = load i64, ptr %14, align 8, !tbaa !11
  %140 = xor i64 %139, -1
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.WordArray_st, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %142, align 8, !tbaa !15
  %144 = getelementptr inbounds i64, ptr %143, i64 0
  %145 = load i64, ptr %144, align 8, !tbaa !11
  %146 = and i64 %145, %140
  store i64 %146, ptr %144, align 8, !tbaa !11
  br label %147

147:                                              ; preds = %132, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %153

148:                                              ; preds = %92
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = load i32, ptr %16, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds i32, ptr %149, i64 %151
  store i32 0, ptr %152, align 4, !tbaa !9
  br label %153

153:                                              ; preds = %148, %147
  %154 = load i64, ptr %12, align 8, !tbaa !11
  %155 = load ptr, ptr %7, align 8, !tbaa !5
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  call void @int_rshift(i64 noundef %154, ptr noundef %155, i64 noundef 1, ptr noundef %156)
  %157 = load i32, ptr %16, align 4, !tbaa !9
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %88, !llvm.loop !16

159:                                              ; preds = %88
  %160 = load ptr, ptr %4, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.WordArray_st, ptr %160, i32 0, i32 1
  %162 = load i64, ptr %161, align 8, !tbaa !13
  %163 = shl i64 %162, 6
  %164 = trunc i64 %163 to i32
  %165 = load i32, ptr %16, align 4, !tbaa !9
  %166 = sub nsw i32 %164, %165
  %167 = add nsw i32 %166, 1
  store i32 %167, ptr %17, align 4, !tbaa !9
  %168 = load i32, ptr %17, align 4, !tbaa !9
  %169 = icmp sgt i32 %168, 0
  br i1 %169, label %170, label %178

170:                                              ; preds = %159
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  %172 = load i32, ptr %16, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds i32, ptr %171, i64 %173
  %175 = load i32, ptr %17, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = mul i64 %176, 4
  call void @llvm.memset.p0.i64(ptr align 4 %174, i8 0, i64 %177, i1 false)
  br label %178

178:                                              ; preds = %170, %159
  %179 = load ptr, ptr %9, align 8, !tbaa !5
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %179, ptr %180, align 8, !tbaa !5
  store ptr null, ptr %9, align 8, !tbaa !5
  br label %181

181:                                              ; preds = %178, %83, %72, %63, %39, %31, %23
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  call void @wa_free(ptr noundef %182)
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  call void @wa_free(ptr noundef %183)
  %184 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %184) #6
  %185 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret i32 %185
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 allocsize(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 #5 = { 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 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 8}
!14 = !{!"WordArray_st", !6, i64 0, !12, i64 8}
!15 = !{!14, !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; 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 [27 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @int_is_zero(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @int_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @int_rshift(i64 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @wa_alloc_with_zero(i64 noundef) local_unnamed_addr #2

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

declare ptr @wa_copy_with_alloc(ptr noundef) local_unnamed_addr #2

declare void @wa_free(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 3) i32 @int_get_naf(ptr noundef %0, i32 noundef %1, ptr noundef writeonly %2) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %5

4:                                                ; preds = %3
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 1136, i32 noundef 2, ptr noundef null) #5
  br label %68

5:                                                ; preds = %3
  %.not71 = icmp eq ptr %2, null
  br i1 %.not71, label %6, label %7

6:                                                ; preds = %5
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 1137, i32 noundef 2, ptr noundef null) #5
  br label %68

7:                                                ; preds = %5
  %8 = icmp sgt i32 %1, -1
  br i1 %8, label %10, label %9

9:                                                ; preds = %7
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 1138, i32 noundef 2, ptr noundef null) #5
  br label %68

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = load i64, ptr %11, align 8, !tbaa !5
  %13 = shl i64 %12, 8
  %14 = zext nneg i32 %1 to i64
  %.neg = shl nsw i64 -1, %14
  %15 = sub nsw i32 64, %1
  %16 = zext nneg i32 %15 to i64
  %17 = lshr i64 -1, %16
  %18 = lshr i64 9223372036854775807, %16
  %19 = or disjoint i64 %13, 4
  %20 = tail call noalias ptr @malloc(i64 noundef %19) #6
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %10
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 1147, i32 noundef 1, ptr noundef null) #5
  br label %68

23:                                               ; preds = %10
  %24 = tail call ptr @wa_copy_with_alloc(ptr noundef nonnull %0) #5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 1148, i32 noundef 2) #5
  br label %68

27:                                               ; preds = %23
  %28 = load i64, ptr %11, align 8, !tbaa !5
  %29 = tail call ptr @wa_alloc_with_zero(i64 noundef %28) #5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %33, label %.preheader

.preheader:                                       ; preds = %27
  %31 = tail call zeroext i1 @int_is_zero(ptr noundef nonnull %24)
  br i1 %31, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %32 = xor i64 %17, -1
  br label %34

33:                                               ; preds = %27
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 1149, i32 noundef 2) #5
  br label %68

34:                                               ; preds = %.lr.ph, %54
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %54 ]
  %.05974 = phi i64 [ 0, %.lr.ph ], [ %.2, %54 ]
  %35 = load ptr, ptr %24, align 8, !tbaa !11
  %36 = load i64, ptr %35, align 8, !tbaa !12
  %37 = and i64 %36, 1
  %.not72 = icmp eq i64 %37, 0
  br i1 %.not72, label %52, label %38

38:                                               ; preds = %34
  %39 = and i64 %36, %17
  %40 = icmp ugt i64 %39, %18
  br i1 %40, label %41, label %48

41:                                               ; preds = %38
  %42 = add i64 %39, %.neg
  %43 = trunc i64 %42 to i32
  %44 = getelementptr inbounds i32, ptr %20, i64 %indvars.iv
  store i32 %43, ptr %44, align 4, !tbaa !13
  %.neg73 = mul i64 %42, -4294967296
  %45 = ashr exact i64 %.neg73, 32
  %46 = load ptr, ptr %29, align 8, !tbaa !11
  store i64 %45, ptr %46, align 8, !tbaa !12
  %47 = tail call i64 @int_add(ptr noundef nonnull %24, ptr noundef nonnull %29, ptr noundef nonnull %24)
  br label %54

48:                                               ; preds = %38
  %49 = trunc i64 %39 to i32
  %50 = getelementptr inbounds i32, ptr %20, i64 %indvars.iv
  store i32 %49, ptr %50, align 4, !tbaa !13
  %51 = and i64 %36, %32
  store i64 %51, ptr %35, align 8, !tbaa !12
  br label %54

52:                                               ; preds = %34
  %53 = getelementptr inbounds i32, ptr %20, i64 %indvars.iv
  store i32 0, ptr %53, align 4, !tbaa !13
  br label %54

54:                                               ; preds = %41, %48, %52
  %.2 = phi i64 [ %.05974, %52 ], [ %47, %41 ], [ %.05974, %48 ]
  tail call void @int_rshift(i64 noundef %.2, ptr noundef nonnull %24, i64 noundef 1, ptr noundef nonnull %24)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %55 = tail call zeroext i1 @int_is_zero(ptr noundef nonnull %24)
  br i1 %55, label %._crit_edge.loopexit, label %34, !llvm.loop !15

._crit_edge.loopexit:                             ; preds = %54
  %56 = trunc nuw i64 %indvars.iv.next to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader
  %.057.lcssa = phi i32 [ 0, %.preheader ], [ %56, %._crit_edge.loopexit ]
  %57 = load i64, ptr %11, align 8, !tbaa !5
  %.tr = trunc i64 %57 to i32
  %58 = shl i32 %.tr, 6
  %59 = sub nsw i32 %58, %.057.lcssa
  %60 = icmp sgt i32 %59, -1
  br i1 %60, label %61, label %67

61:                                               ; preds = %._crit_edge
  %62 = add nuw nsw i32 %59, 1
  %63 = zext nneg i32 %.057.lcssa to i64
  %64 = getelementptr inbounds i32, ptr %20, i64 %63
  %65 = zext nneg i32 %62 to i64
  %66 = shl nuw nsw i64 %65, 2
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %64, i8 0, i64 %66, i1 false)
  br label %67

67:                                               ; preds = %61, %._crit_edge
  store ptr %20, ptr %2, align 8, !tbaa !17
  br label %68

68:                                               ; preds = %67, %33, %26, %22, %9, %6, %4
  %.058 = phi i32 [ 1, %22 ], [ 2, %26 ], [ 2, %33 ], [ 0, %67 ], [ 2, %9 ], [ 2, %6 ], [ 2, %4 ]
  %.056 = phi ptr [ null, %22 ], [ %20, %26 ], [ %20, %33 ], [ null, %67 ], [ null, %9 ], [ null, %6 ], [ null, %4 ]
  %.055 = phi ptr [ null, %22 ], [ null, %26 ], [ null, %33 ], [ %29, %67 ], [ null, %9 ], [ null, %6 ], [ null, %4 ]
  %.0 = phi ptr [ null, %22 ], [ null, %26 ], [ %24, %33 ], [ %24, %67 ], [ null, %9 ], [ null, %6 ], [ null, %4 ]
  tail call void @wa_free(ptr noundef %.0) #5
  tail call void @wa_free(ptr noundef %.055) #5
  tail call void @free(ptr noundef %.056) #5
  ret i32 %.058
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 }
attributes #6 = { nounwind allocsize(0) }

!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, !10, i64 8}
!6 = !{!"WordArray_st", !7, i64 0, !10, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass