; LLVM IR from digital-salon/Digital-Salon :: extern/include/contrib/Open3DGC (o3dgcArithmeticCodec)

; 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.o3dgc::Static_Data_Model" = type { ptr, ptr, i32, i32, i32, i32 }

@.str.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #1

; Function Attrs: mustprogress noreturn uwtable
declare hidden void @_ZN5o3dgcL8AC_ErrorEPKc(ptr noundef) #2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5o3dgc17Static_Data_Model16set_distributionEjPKd(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, ptr noundef %2) #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  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
  %13 = load ptr, ptr %4, align 8
  %14 = load i32, ptr %5, align 4, !tbaa !9
  %15 = icmp ult i32 %14, 2
  br i1 %15, label %19, label %16

16:                                               ; preds = %3
  %17 = load i32, ptr %5, align 4, !tbaa !9
  %18 = icmp ugt i32 %17, 2048
  br i1 %18, label %19, label %20

19:                                               ; preds = %16, %3
  call void @_ZN5o3dgcL8AC_ErrorEPKc(ptr noundef @.str.11) #6
  unreachable

20:                                               ; preds = %16
  %21 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %22 = load i32, ptr %21, align 8, !tbaa !11
  %23 = load i32, ptr %5, align 4, !tbaa !9
  %24 = icmp ne i32 %22, %23
  br i1 %24, label %25, label %92

25:                                               ; preds = %20
  %26 = load i32, ptr %5, align 4, !tbaa !9
  %27 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  store i32 %26, ptr %27, align 8, !tbaa !11
  %28 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %29 = load i32, ptr %28, align 8, !tbaa !11
  %30 = sub i32 %29, 1
  %31 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 3
  store i32 %30, ptr %31, align 4, !tbaa !13
  %32 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !14
  %34 = icmp eq ptr %33, null
  br i1 %34, label %36, label %35

35:                                               ; preds = %25
  call void @_ZdaPv(ptr noundef %33) #7
  br label %36

36:                                               ; preds = %35, %25
  %37 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %38 = load i32, ptr %37, align 8, !tbaa !11
  %39 = icmp ugt i32 %38, 16
  br i1 %39, label %40, label %78

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 3, ptr %7, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %48, %40
  %42 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %43 = load i32, ptr %42, align 8, !tbaa !11
  %44 = load i32, ptr %7, align 4, !tbaa !9
  %45 = add i32 %44, 2
  %46 = shl i32 1, %45
  %47 = icmp ugt i32 %43, %46
  br i1 %47, label %48, label %51

48:                                               ; preds = %41
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = add i32 %49, 1
  store i32 %50, ptr %7, align 4, !tbaa !9
  br label %41, !llvm.loop !15

51:                                               ; preds = %41
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = shl i32 1, %52
  %54 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 4
  store i32 %53, ptr %54, align 8, !tbaa !17
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = sub i32 15, %55
  %57 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 5
  store i32 %56, ptr %57, align 4, !tbaa !18
  %58 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %59 = load i32, ptr %58, align 8, !tbaa !11
  %60 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 4
  %61 = load i32, ptr %60, align 8, !tbaa !17
  %62 = add i32 %59, %61
  %63 = add i32 %62, 2
  %64 = zext i32 %63 to i64
  %65 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %64, i64 4)
  %66 = extractvalue { i64, i1 } %65, 1
  %67 = extractvalue { i64, i1 } %65, 0
  %68 = select i1 %66, i64 -1, i64 %67
  %69 = call noalias noundef nonnull ptr @_Znam(i64 noundef %68) #9
  %70 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 0
  store ptr %69, ptr %70, align 8, !tbaa !14
  %71 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !14
  %73 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %74 = load i32, ptr %73, align 8, !tbaa !11
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i32, ptr %72, i64 %75
  %77 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 1
  store ptr %76, ptr %77, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %91

78:                                               ; preds = %36
  %79 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 1
  store ptr null, ptr %79, align 8, !tbaa !19
  %80 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 5
  store i32 0, ptr %80, align 4, !tbaa !18
  %81 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 4
  store i32 0, ptr %81, align 8, !tbaa !17
  %82 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %83 = load i32, ptr %82, align 8, !tbaa !11
  %84 = zext i32 %83 to i64
  %85 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %84, i64 4)
  %86 = extractvalue { i64, i1 } %85, 1
  %87 = extractvalue { i64, i1 } %85, 0
  %88 = select i1 %86, i64 -1, i64 %87
  %89 = call noalias noundef nonnull ptr @_Znam(i64 noundef %88) #9
  %90 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 0
  store ptr %89, ptr %90, align 8, !tbaa !14
  br label %91

91:                                               ; preds = %78, %51
  br label %92

92:                                               ; preds = %91, %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  store double 0.000000e+00, ptr %9, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %93 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %94 = load i32, ptr %93, align 8, !tbaa !11
  %95 = uitofp i32 %94 to double
  %96 = fdiv double 1.000000e+00, %95
  store double %96, ptr %10, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %159, %92
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %100 = load i32, ptr %99, align 8, !tbaa !11
  %101 = icmp ult i32 %98, %100
  br i1 %101, label %103, label %102

102:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %162

103:                                              ; preds = %97
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = icmp ne ptr %104, null
  br i1 %105, label %106, label %112

106:                                              ; preds = %103
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load i32, ptr %11, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %107, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !20
  store double %111, ptr %10, align 8, !tbaa !20
  br label %112

112:                                              ; preds = %106, %103
  %113 = load double, ptr %10, align 8, !tbaa !20
  %114 = fcmp olt double %113, 1.000000e-04
  br i1 %114, label %118, label %115

115:                                              ; preds = %112
  %116 = load double, ptr %10, align 8, !tbaa !20
  %117 = fcmp ogt double %116, 9.999000e-01
  br i1 %117, label %118, label %119

118:                                              ; preds = %115, %112
  call void @_ZN5o3dgcL8AC_ErrorEPKc(ptr noundef @.str.12) #6
  unreachable

119:                                              ; preds = %115
  %120 = load double, ptr %9, align 8, !tbaa !20
  %121 = fmul double %120, 3.276800e+04
  %122 = fptoui double %121 to i32
  %123 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !14
  %125 = load i32, ptr %11, align 4, !tbaa !9
  %126 = zext i32 %125 to i64
  %127 = getelementptr inbounds i32, ptr %124, i64 %126
  store i32 %122, ptr %127, align 4, !tbaa !9
  %128 = load double, ptr %10, align 8, !tbaa !20
  %129 = load double, ptr %9, align 8, !tbaa !20
  %130 = fadd double %129, %128
  store double %130, ptr %9, align 8, !tbaa !20
  %131 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 4
  %132 = load i32, ptr %131, align 8, !tbaa !17
  %133 = icmp eq i32 %132, 0
  br i1 %133, label %134, label %135

134:                                              ; preds = %119
  br label %159

135:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %136 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !14
  %138 = load i32, ptr %11, align 4, !tbaa !9
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds i32, ptr %137, i64 %139
  %141 = load i32, ptr %140, align 4, !tbaa !9
  %142 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 5
  %143 = load i32, ptr %142, align 4, !tbaa !18
  %144 = lshr i32 %141, %143
  store i32 %144, ptr %12, align 4, !tbaa !9
  br label %145

145:                                              ; preds = %149, %135
  %146 = load i32, ptr %8, align 4, !tbaa !9
  %147 = load i32, ptr %12, align 4, !tbaa !9
  %148 = icmp ult i32 %146, %147
  br i1 %148, label %149, label %158

149:                                              ; preds = %145
  %150 = load i32, ptr %11, align 4, !tbaa !9
  %151 = sub i32 %150, 1
  %152 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 1
  %153 = load ptr, ptr %152, align 8, !tbaa !19
  %154 = load i32, ptr %8, align 4, !tbaa !9
  %155 = add i32 %154, 1
  store i32 %155, ptr %8, align 4, !tbaa !9
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds i32, ptr %153, i64 %156
  store i32 %151, ptr %157, align 4, !tbaa !9
  br label %145, !llvm.loop !22

158:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %159

159:                                              ; preds = %158, %134
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = add i32 %160, 1
  store i32 %161, ptr %11, align 4, !tbaa !9
  br label %97, !llvm.loop !23

162:                                              ; preds = %102
  %163 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 4
  %164 = load i32, ptr %163, align 8, !tbaa !17
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %186

166:                                              ; preds = %162
  %167 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8, !tbaa !19
  %169 = getelementptr inbounds i32, ptr %168, i64 0
  store i32 0, ptr %169, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %175, %166
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 4
  %173 = load i32, ptr %172, align 8, !tbaa !17
  %174 = icmp ule i32 %171, %173
  br i1 %174, label %175, label %185

175:                                              ; preds = %170
  %176 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 2
  %177 = load i32, ptr %176, align 8, !tbaa !11
  %178 = sub i32 %177, 1
  %179 = getelementptr inbounds %"class.o3dgc::Static_Data_Model", ptr %13, i32 0, i32 1
  %180 = load ptr, ptr %179, align 8, !tbaa !19
  %181 = load i32, ptr %8, align 4, !tbaa !9
  %182 = add i32 %181, 1
  store i32 %182, ptr %8, align 4, !tbaa !9
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds i32, ptr %180, i64 %183
  store i32 %178, ptr %184, align 4, !tbaa !9
  br label %170, !llvm.loop !24

185:                                              ; preds = %170
  br label %186

186:                                              ; preds = %185, %162
  %187 = load double, ptr %9, align 8, !tbaa !20
  %188 = fcmp olt double %187, 9.999000e-01
  br i1 %188, label %192, label %189

189:                                              ; preds = %186
  %190 = load double, ptr %9, align 8, !tbaa !20
  %191 = fcmp ogt double %190, 1.000100e+00
  br i1 %191, label %192, label %193

192:                                              ; preds = %189, %186
  call void @_ZN5o3dgcL8AC_ErrorEPKc(ptr noundef @.str.13) #6
  unreachable

193:                                              ; preds = %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin 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 #2 = { mustprogress noreturn 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 = { nobuiltin 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 #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { noreturn }
attributes #7 = { builtin nounwind }
attributes #8 = { nounwind }
attributes #9 = { builtin 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"_ZTSN5o3dgc17Static_Data_ModelE", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!13 = !{!12, !10, i64 20}
!14 = !{!12, !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!12, !10, i64 24}
!18 = !{!12, !10, i64 28}
!19 = !{!12, !6, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}


; 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.11 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress noreturn uwtable
declare hidden void @_ZN5o3dgcL8AC_ErrorEPKc(ptr noundef) local_unnamed_addr #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5o3dgc17Static_Data_Model16set_distributionEjPKd(ptr nocapture noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, ptr noundef readonly %2) local_unnamed_addr #3 align 2 {
  %4 = add i32 %1, -2049
  %or.cond = icmp ult i32 %4, -2047
  br i1 %or.cond, label %5, label %6

5:                                                ; preds = %3
  tail call void @_ZN5o3dgcL8AC_ErrorEPKc(ptr noundef nonnull @.str.11) #4
  unreachable

6:                                                ; preds = %3
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i32, ptr %7, align 8, !tbaa !5
  %.not = icmp eq i32 %8, %1
  br i1 %.not, label %.lr.ph53, label %9

9:                                                ; preds = %6
  store i32 %1, ptr %7, align 8, !tbaa !5
  %10 = add nsw i32 %1, -1
  %11 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %10, ptr %11, align 4, !tbaa !11
  %12 = load ptr, ptr %0, align 8, !tbaa !12
  %13 = icmp eq ptr %12, null
  br i1 %13, label %15, label %14

14:                                               ; preds = %9
  tail call void @_ZdaPv(ptr noundef nonnull %12) #5
  %.pre = load i32, ptr %7, align 8, !tbaa !5
  br label %15

15:                                               ; preds = %14, %9
  %16 = phi i32 [ %.pre, %14 ], [ %1, %9 ]
  %17 = icmp ugt i32 %16, 16
  br i1 %17, label %.preheader, label %35

.preheader:                                       ; preds = %15, %.preheader
  %.0 = phi i32 [ %21, %.preheader ], [ 3, %15 ]
  %18 = add i32 %.0, 2
  %19 = shl nuw i32 1, %18
  %20 = icmp ugt i32 %16, %19
  %21 = add i32 %.0, 1
  br i1 %20, label %.preheader, label %22, !llvm.loop !13

22:                                               ; preds = %.preheader
  %23 = shl nuw i32 1, %.0
  %24 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 %23, ptr %24, align 8, !tbaa !15
  %25 = sub i32 15, %.0
  %26 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 %25, ptr %26, align 4, !tbaa !16
  %27 = add i32 %16, 2
  %28 = add i32 %27, %23
  %29 = zext i32 %28 to i64
  %30 = shl nuw nsw i64 %29, 2
  %31 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %30) #6
  store ptr %31, ptr %0, align 8, !tbaa !12
  %32 = zext i32 %16 to i64
  %33 = getelementptr inbounds i32, ptr %31, i64 %32
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %33, ptr %34, align 8, !tbaa !17
  br label %.lr.ph53

35:                                               ; preds = %15
  %36 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr null, ptr %36, align 8, !tbaa !17
  %37 = getelementptr inbounds i8, ptr %0, i64 28
  store i32 0, ptr %37, align 4, !tbaa !16
  %38 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %38, align 8, !tbaa !15
  %39 = shl nuw nsw i32 %16, 2
  %40 = zext nneg i32 %39 to i64
  %41 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %40) #6
  store ptr %41, ptr %0, align 8, !tbaa !12
  %.not61 = icmp eq i32 %16, 0
  br i1 %.not61, label %._crit_edge, label %.lr.ph53

.lr.ph53:                                         ; preds = %6, %22, %35
  %.pn.in = phi i32 [ %16, %35 ], [ %1, %6 ], [ %16, %22 ]
  %.pn = uitofp i32 %.pn.in to double
  %42 = fdiv double 1.000000e+00, %.pn
  %.not43 = icmp eq ptr %2, null
  %43 = load ptr, ptr %0, align 8
  %44 = getelementptr inbounds i8, ptr %0, i64 24
  %45 = getelementptr inbounds i8, ptr %0, i64 28
  %46 = getelementptr inbounds i8, ptr %0, i64 8
  %47 = load ptr, ptr %46, align 8
  br i1 %.not43, label %.lr.ph53.split.us, label %.lr.ph53.split

.lr.ph53.split.us:                                ; preds = %.lr.ph53
  %48 = fcmp olt double %42, 1.000000e-04
  %49 = fcmp ogt double %42, 9.999000e-01
  %or.cond3.us = or i1 %48, %49
  br i1 %or.cond3.us, label %.split.us, label %.lr.ph53.split.us.split

.lr.ph53.split.us.split:                          ; preds = %.lr.ph53.split.us, %.loopexit44.us
  %indvars.iv75 = phi i64 [ %indvars.iv.next76, %.loopexit44.us ], [ 0, %.lr.ph53.split.us ]
  %.03549.us = phi double [ %53, %.loopexit44.us ], [ 0.000000e+00, %.lr.ph53.split.us ]
  %.03648.us = phi i32 [ %.2.us, %.loopexit44.us ], [ 0, %.lr.ph53.split.us ]
  %50 = fmul double %.03549.us, 3.276800e+04
  %51 = fptoui double %50 to i32
  %52 = getelementptr inbounds i32, ptr %43, i64 %indvars.iv75
  store i32 %51, ptr %52, align 4, !tbaa !18
  %53 = fadd double %.03549.us, %42
  %54 = load i32, ptr %44, align 8, !tbaa !15
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %.loopexit44.us, label %56

56:                                               ; preds = %.lr.ph53.split.us.split
  %57 = load i32, ptr %45, align 4, !tbaa !16
  %58 = lshr i32 %51, %57
  %59 = icmp ult i32 %.03648.us, %58
  br i1 %59, label %.lr.ph.us, label %.loopexit44.us

scalar.ph84:                                      ; preds = %scalar.ph84.preheader, %scalar.ph84
  %indvars.iv70 = phi i64 [ %indvars.iv.next71, %scalar.ph84 ], [ %indvars.iv70.ph, %scalar.ph84.preheader ]
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %60 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv.next71
  store i32 %65, ptr %60, align 4, !tbaa !18
  %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73
  br i1 %exitcond74.not, label %.loopexit44.us, label %scalar.ph84, !llvm.loop !19

.loopexit44.us:                                   ; preds = %scalar.ph84, %middle.block83, %56, %.lr.ph53.split.us.split
  %.2.us = phi i32 [ %.03648.us, %.lr.ph53.split.us.split ], [ %.03648.us, %56 ], [ %58, %middle.block83 ], [ %58, %scalar.ph84 ]
  %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1
  %61 = load i32, ptr %7, align 8, !tbaa !5
  %62 = zext i32 %61 to i64
  %63 = icmp ult i64 %indvars.iv.next76, %62
  br i1 %63, label %.lr.ph53.split.us.split, label %._crit_edge, !llvm.loop !22

.lr.ph.us:                                        ; preds = %56
  %64 = trunc nuw i64 %indvars.iv75 to i32
  %65 = add i32 %64, -1
  %66 = zext i32 %.03648.us to i64
  %wide.trip.count73 = zext i32 %58 to i64
  %67 = sub nsw i64 %wide.trip.count73, %66
  %min.iters.check85 = icmp ult i64 %67, 8
  br i1 %min.iters.check85, label %scalar.ph84.preheader, label %vector.ph86

scalar.ph84.preheader:                            ; preds = %middle.block83, %.lr.ph.us
  %indvars.iv70.ph = phi i64 [ %66, %.lr.ph.us ], [ %ind.end89, %middle.block83 ]
  br label %scalar.ph84

vector.ph86:                                      ; preds = %.lr.ph.us
  %n.vec88 = and i64 %67, -8
  %ind.end89 = add nsw i64 %n.vec88, %66
  %broadcast.splatinsert94 = insertelement <4 x i32> poison, i32 %65, i64 0
  %broadcast.splat95 = shufflevector <4 x i32> %broadcast.splatinsert94, <4 x i32> poison, <4 x i32> zeroinitializer
  %invariant.gep101 = getelementptr i32, ptr %47, i64 %66
  br label %vector.body91

vector.body91:                                    ; preds = %vector.body91, %vector.ph86
  %index92 = phi i64 [ 0, %vector.ph86 ], [ %index.next96, %vector.body91 ]
  %gep102 = getelementptr i32, ptr %invariant.gep101, i64 %index92
  %68 = getelementptr i8, ptr %gep102, i64 4
  %69 = getelementptr i8, ptr %gep102, i64 20
  store <4 x i32> %broadcast.splat95, ptr %68, align 4, !tbaa !18
  store <4 x i32> %broadcast.splat95, ptr %69, align 4, !tbaa !18
  %index.next96 = add nuw i64 %index92, 8
  %70 = icmp eq i64 %index.next96, %n.vec88
  br i1 %70, label %middle.block83, label %vector.body91, !llvm.loop !23

middle.block83:                                   ; preds = %vector.body91
  %cmp.n97 = icmp eq i64 %67, %n.vec88
  br i1 %cmp.n97, label %.loopexit44.us, label %scalar.ph84.preheader

._crit_edge:                                      ; preds = %.loopexit44, %.loopexit44.us, %35
  %.036.lcssa = phi i32 [ 0, %35 ], [ %.2.us, %.loopexit44.us ], [ %.2, %.loopexit44 ]
  %.035.lcssa = phi double [ 0.000000e+00, %35 ], [ %53, %.loopexit44.us ], [ %81, %.loopexit44 ]
  %71 = getelementptr inbounds i8, ptr %0, i64 24
  %72 = load i32, ptr %71, align 8, !tbaa !15
  %.not41 = icmp eq i32 %72, 0
  br i1 %.not41, label %.loopexit, label %99

.lr.ph53.split:                                   ; preds = %.lr.ph53, %.loopexit44
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.loopexit44 ], [ 0, %.lr.ph53 ]
  %.03549 = phi double [ %81, %.loopexit44 ], [ 0.000000e+00, %.lr.ph53 ]
  %.03648 = phi i32 [ %.2, %.loopexit44 ], [ 0, %.lr.ph53 ]
  %73 = getelementptr inbounds double, ptr %2, i64 %indvars.iv67
  %74 = load double, ptr %73, align 8, !tbaa !24
  %75 = fcmp olt double %74, 1.000000e-04
  %76 = fcmp ogt double %74, 9.999000e-01
  %or.cond3 = or i1 %75, %76
  br i1 %or.cond3, label %.split.us, label %77

.split.us:                                        ; preds = %.lr.ph53.split, %.lr.ph53.split.us
  tail call void @_ZN5o3dgcL8AC_ErrorEPKc(ptr noundef nonnull @.str.12) #4
  unreachable

77:                                               ; preds = %.lr.ph53.split
  %78 = fmul double %.03549, 3.276800e+04
  %79 = fptoui double %78 to i32
  %80 = getelementptr inbounds i32, ptr %43, i64 %indvars.iv67
  store i32 %79, ptr %80, align 4, !tbaa !18
  %81 = fadd double %.03549, %74
  %82 = load i32, ptr %44, align 8, !tbaa !15
  %83 = icmp eq i32 %82, 0
  br i1 %83, label %.loopexit44, label %84

84:                                               ; preds = %77
  %85 = load i32, ptr %45, align 4, !tbaa !16
  %86 = lshr i32 %79, %85
  %87 = icmp ult i32 %.03648, %86
  br i1 %87, label %.lr.ph, label %.loopexit44

.lr.ph:                                           ; preds = %84
  %88 = trunc nuw i64 %indvars.iv67 to i32
  %89 = add i32 %88, -1
  %90 = zext i32 %.03648 to i64
  %wide.trip.count = zext i32 %86 to i64
  %91 = sub nsw i64 %wide.trip.count, %90
  %min.iters.check = icmp ult i64 %91, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %91, -8
  %ind.end = add nsw i64 %n.vec, %90
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %89, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %invariant.gep = getelementptr i32, ptr %47, i64 %90
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %gep = getelementptr i32, ptr %invariant.gep, i64 %index
  %92 = getelementptr i8, ptr %gep, i64 4
  %93 = getelementptr i8, ptr %gep, i64 20
  store <4 x i32> %broadcast.splat, ptr %92, align 4, !tbaa !18
  store <4 x i32> %broadcast.splat, ptr %93, align 4, !tbaa !18
  %index.next = add nuw i64 %index, 8
  %94 = icmp eq i64 %index.next, %n.vec
  br i1 %94, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %91, %n.vec
  br i1 %cmp.n, label %.loopexit44, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ %90, %.lr.ph ], [ %ind.end, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %95 = getelementptr inbounds i32, ptr %47, i64 %indvars.iv.next
  store i32 %89, ptr %95, align 4, !tbaa !18
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit44, label %scalar.ph, !llvm.loop !27

.loopexit44:                                      ; preds = %scalar.ph, %middle.block, %84, %77
  %.2 = phi i32 [ %.03648, %77 ], [ %.03648, %84 ], [ %86, %middle.block ], [ %86, %scalar.ph ]
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %96 = load i32, ptr %7, align 8, !tbaa !5
  %97 = zext i32 %96 to i64
  %98 = icmp ult i64 %indvars.iv.next68, %97
  br i1 %98, label %.lr.ph53.split, label %._crit_edge, !llvm.loop !22

99:                                               ; preds = %._crit_edge
  %100 = getelementptr inbounds i8, ptr %0, i64 8
  %101 = load ptr, ptr %100, align 8, !tbaa !17
  store i32 0, ptr %101, align 4, !tbaa !18
  %102 = load i32, ptr %71, align 8, !tbaa !15
  %.not4257 = icmp ugt i32 %.036.lcssa, %102
  br i1 %.not4257, label %.loopexit, label %.lr.ph60

.lr.ph60:                                         ; preds = %99, %.lr.ph60
  %.358 = phi i32 [ %105, %.lr.ph60 ], [ %.036.lcssa, %99 ]
  %103 = load i32, ptr %7, align 8, !tbaa !5
  %104 = add i32 %103, -1
  %105 = add i32 %.358, 1
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds i32, ptr %101, i64 %106
  store i32 %104, ptr %107, align 4, !tbaa !18
  %108 = load i32, ptr %71, align 8, !tbaa !15
  %.not42 = icmp ugt i32 %105, %108
  br i1 %.not42, label %.loopexit, label %.lr.ph60, !llvm.loop !28

.loopexit:                                        ; preds = %.lr.ph60, %99, %._crit_edge
  %109 = fcmp olt double %.035.lcssa, 9.999000e-01
  %110 = fcmp ogt double %.035.lcssa, 1.000100e+00
  %or.cond5 = or i1 %109, %110
  br i1 %or.cond5, label %111, label %112

111:                                              ; preds = %.loopexit
  tail call void @_ZN5o3dgcL8AC_ErrorEPKc(ptr noundef nonnull @.str.13) #4
  unreachable

112:                                              ; preds = %.loopexit
  ret void
}

attributes #0 = { nobuiltin 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 #1 = { mustprogress noreturn 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 = { nobuiltin 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 #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 }
attributes #5 = { builtin nounwind }
attributes #6 = { builtin 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 16}
!6 = !{!"_ZTSN5o3dgc17Static_Data_ModelE", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 20}
!12 = !{!6, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!6, !10, i64 24}
!16 = !{!6, !10, i64 28}
!17 = !{!6, !7, i64 8}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !14, !20, !21}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = !{!"llvm.loop.isvectorized", i32 1}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14, !21, !20}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !8, i64 0}
!26 = distinct !{!26, !14, !21, !20}
!27 = distinct !{!27, !14, !20, !21}
!28 = distinct !{!28, !14}


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