; LLVM IR from microsoft/LightAIMD :: src (scf)

; 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.vec3d = type { double, double, double }
%struct.scf_context = type { ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, i64, double, double, double, i64, double, double, i64, double, i64, i64, ptr, ptr, ptr, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double, ptr, ptr, ptr, ptr, i64 }
%struct.basis_func = type { i64, i64, i64, i64, ptr, ptr, ptr, double, double, double, double }

@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @print_basis_func_struct(ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @print_scf_context(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.vec3d, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca ptr, align 8
  %14 = alloca double, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #3
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.scf_context, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  call void @center_of_charge(ptr noundef %19, ptr noundef %3)
  %20 = getelementptr inbounds %struct.vec3d, ptr %3, i32 0, i32 0
  %21 = load double, ptr %20, align 8, !tbaa !13
  %22 = getelementptr inbounds %struct.vec3d, ptr %3, i32 0, i32 1
  %23 = load double, ptr %22, align 8, !tbaa !15
  %24 = getelementptr inbounds %struct.vec3d, ptr %3, i32 0, i32 2
  %25 = load double, ptr %24, align 8, !tbaa !16
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, double noundef %21, double noundef %23, double noundef %25)
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.scf_context, ptr %27, i32 0, i32 33
  %29 = load double, ptr %28, align 8, !tbaa !17
  %30 = call i32 (ptr, ...) @printf(ptr noundef @.str.8, double noundef %29)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.scf_context, ptr %31, i32 0, i32 1
  %33 = load i64, ptr %32, align 8, !tbaa !18
  store i64 %33, ptr %4, align 8, !tbaa !19
  %34 = load i64, ptr %4, align 8, !tbaa !19
  %35 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i64 noundef %34)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store i64 0, ptr %5, align 8, !tbaa !19
  br label %36

36:                                               ; preds = %49, %1
  %37 = load i64, ptr %5, align 8, !tbaa !19
  %38 = load i64, ptr %4, align 8, !tbaa !19
  %39 = icmp ult i64 %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %52

41:                                               ; preds = %36
  %42 = load i64, ptr %5, align 8, !tbaa !19
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i64 noundef %42)
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.scf_context, ptr %44, i32 0, i32 4
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = load i64, ptr %5, align 8, !tbaa !19
  %48 = getelementptr inbounds %struct.basis_func, ptr %46, i64 %47
  call void @print_basis_func_struct(ptr noundef %48)
  br label %49

49:                                               ; preds = %41
  %50 = load i64, ptr %5, align 8, !tbaa !19
  %51 = add i64 %50, 1
  store i64 %51, ptr %5, align 8, !tbaa !19
  br label %36, !llvm.loop !21

52:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store i64 0, ptr %6, align 8, !tbaa !19
  br label %53

53:                                               ; preds = %67, %52
  %54 = load i64, ptr %6, align 8, !tbaa !19
  %55 = load i64, ptr %4, align 8, !tbaa !19
  %56 = icmp ult i64 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %70

58:                                               ; preds = %53
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.scf_context, ptr %59, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !20
  %62 = load i64, ptr %6, align 8, !tbaa !19
  %63 = getelementptr inbounds %struct.basis_func, ptr %61, i64 %62
  %64 = getelementptr inbounds %struct.basis_func, ptr %63, i32 0, i32 7
  %65 = load double, ptr %64, align 8, !tbaa !23
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %65)
  br label %67

67:                                               ; preds = %58
  %68 = load i64, ptr %6, align 8, !tbaa !19
  %69 = add i64 %68, 1
  store i64 %69, ptr %6, align 8, !tbaa !19
  br label %53, !llvm.loop !25

70:                                               ; preds = %57
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.scf_context, ptr %71, i32 0, i32 34
  %73 = load i64, ptr %72, align 8, !tbaa !26
  %74 = icmp ne i64 %73, 0
  br i1 %74, label %150, label %75

75:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 0, ptr %7, align 8, !tbaa !19
  br label %76

76:                                               ; preds = %146, %75
  %77 = load i64, ptr %7, align 8, !tbaa !19
  %78 = load i64, ptr %4, align 8, !tbaa !19
  %79 = icmp ult i64 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  br label %149

81:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !19
  br label %82

82:                                               ; preds = %142, %81
  %83 = load i64, ptr %9, align 8, !tbaa !19
  %84 = load i64, ptr %4, align 8, !tbaa !19
  %85 = icmp ult i64 %83, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %82
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %145

87:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !19
  br label %88

88:                                               ; preds = %138, %87
  %89 = load i64, ptr %10, align 8, !tbaa !19
  %90 = load i64, ptr %4, align 8, !tbaa !19
  %91 = icmp ult i64 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %141

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !19
  br label %94

94:                                               ; preds = %134, %93
  %95 = load i64, ptr %11, align 8, !tbaa !19
  %96 = load i64, ptr %4, align 8, !tbaa !19
  %97 = icmp ult i64 %95, %96
  br i1 %97, label %99, label %98

98:                                               ; preds = %94
  store i32 17, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %137

99:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.scf_context, ptr %100, i32 0, i32 9
  %102 = load ptr, ptr %101, align 8, !tbaa !27
  %103 = load i64, ptr %7, align 8, !tbaa !19
  %104 = load i64, ptr %4, align 8, !tbaa !19
  %105 = mul i64 %103, %104
  %106 = load i64, ptr %4, align 8, !tbaa !19
  %107 = mul i64 %105, %106
  %108 = load i64, ptr %4, align 8, !tbaa !19
  %109 = mul i64 %107, %108
  %110 = load i64, ptr %9, align 8, !tbaa !19
  %111 = load i64, ptr %4, align 8, !tbaa !19
  %112 = mul i64 %110, %111
  %113 = load i64, ptr %4, align 8, !tbaa !19
  %114 = mul i64 %112, %113
  %115 = add i64 %109, %114
  %116 = load i64, ptr %10, align 8, !tbaa !19
  %117 = load i64, ptr %4, align 8, !tbaa !19
  %118 = mul i64 %116, %117
  %119 = add i64 %115, %118
  %120 = load i64, ptr %11, align 8, !tbaa !19
  %121 = add i64 %119, %120
  %122 = getelementptr inbounds double, ptr %102, i64 %121
  %123 = load double, ptr %122, align 8, !tbaa !28
  store double %123, ptr %12, align 8, !tbaa !28
  %124 = load double, ptr %12, align 8, !tbaa !28
  %125 = fcmp ogt double %124, 1.000000e+00
  br i1 %125, label %126, label %133

126:                                              ; preds = %99
  %127 = load i64, ptr %7, align 8, !tbaa !19
  %128 = load i64, ptr %9, align 8, !tbaa !19
  %129 = load i64, ptr %10, align 8, !tbaa !19
  %130 = load i64, ptr %11, align 8, !tbaa !19
  %131 = load double, ptr %12, align 8, !tbaa !28
  %132 = call i32 (ptr, ...) @printf(ptr noundef @.str.12, i64 noundef %127, i64 noundef %128, i64 noundef %129, i64 noundef %130, double noundef %131)
  br label %133

133:                                              ; preds = %126, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %134

134:                                              ; preds = %133
  %135 = load i64, ptr %11, align 8, !tbaa !19
  %136 = add i64 %135, 1
  store i64 %136, ptr %11, align 8, !tbaa !19
  br label %94, !llvm.loop !29

137:                                              ; preds = %98
  br label %138

138:                                              ; preds = %137
  %139 = load i64, ptr %10, align 8, !tbaa !19
  %140 = add i64 %139, 1
  store i64 %140, ptr %10, align 8, !tbaa !19
  br label %88, !llvm.loop !30

141:                                              ; preds = %92
  br label %142

142:                                              ; preds = %141
  %143 = load i64, ptr %9, align 8, !tbaa !19
  %144 = add i64 %143, 1
  store i64 %144, ptr %9, align 8, !tbaa !19
  br label %82, !llvm.loop !31

145:                                              ; preds = %86
  br label %146

146:                                              ; preds = %145
  %147 = load i64, ptr %7, align 8, !tbaa !19
  %148 = add i64 %147, 1
  store i64 %148, ptr %7, align 8, !tbaa !19
  br label %76, !llvm.loop !32

149:                                              ; preds = %80
  br label %150

150:                                              ; preds = %149, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %151 = load ptr, ptr %2, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.scf_context, ptr %151, i32 0, i32 22
  %153 = load ptr, ptr %152, align 8, !tbaa !33
  store ptr %153, ptr %13, align 8, !tbaa !5
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  store double 0.000000e+00, ptr %14, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  store i64 0, ptr %15, align 8, !tbaa !19
  br label %155

155:                                              ; preds = %193, %150
  %156 = load i64, ptr %15, align 8, !tbaa !19
  %157 = load i64, ptr %4, align 8, !tbaa !19
  %158 = icmp ult i64 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %196

160:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  store i64 0, ptr %16, align 8, !tbaa !19
  br label %161

161:                                              ; preds = %188, %160
  %162 = load i64, ptr %16, align 8, !tbaa !19
  %163 = load i64, ptr %4, align 8, !tbaa !19
  %164 = icmp ult i64 %162, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %191

166:                                              ; preds = %161
  %167 = load i64, ptr %15, align 8, !tbaa !19
  %168 = load i64, ptr %16, align 8, !tbaa !19
  %169 = load ptr, ptr %13, align 8, !tbaa !5
  %170 = load i64, ptr %15, align 8, !tbaa !19
  %171 = load i64, ptr %4, align 8, !tbaa !19
  %172 = mul i64 %170, %171
  %173 = load i64, ptr %16, align 8, !tbaa !19
  %174 = add i64 %172, %173
  %175 = getelementptr inbounds double, ptr %169, i64 %174
  %176 = load double, ptr %175, align 8, !tbaa !28
  %177 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i64 noundef %167, i64 noundef %168, double noundef %176)
  %178 = load ptr, ptr %13, align 8, !tbaa !5
  %179 = load i64, ptr %15, align 8, !tbaa !19
  %180 = load i64, ptr %4, align 8, !tbaa !19
  %181 = mul i64 %179, %180
  %182 = load i64, ptr %16, align 8, !tbaa !19
  %183 = add i64 %181, %182
  %184 = getelementptr inbounds double, ptr %178, i64 %183
  %185 = load double, ptr %184, align 8, !tbaa !28
  %186 = load double, ptr %14, align 8, !tbaa !28
  %187 = fadd double %186, %185
  store double %187, ptr %14, align 8, !tbaa !28
  br label %188

188:                                              ; preds = %166
  %189 = load i64, ptr %16, align 8, !tbaa !19
  %190 = add i64 %189, 1
  store i64 %190, ptr %16, align 8, !tbaa !19
  br label %161, !llvm.loop !34

191:                                              ; preds = %165
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %193

193:                                              ; preds = %191
  %194 = load i64, ptr %15, align 8, !tbaa !19
  %195 = add i64 %194, 1
  store i64 %195, ptr %15, align 8, !tbaa !19
  br label %155, !llvm.loop !35

196:                                              ; preds = %159
  %197 = load double, ptr %14, align 8, !tbaa !28
  %198 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, double noundef %197)
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.scf_context, ptr %199, i32 0, i32 26
  %201 = load double, ptr %200, align 8, !tbaa !36
  %202 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, double noundef %201)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #3
  ret void
}

declare void @center_of_charge(ptr noundef, ptr noundef) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"scf_context", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !12, i64 192, !11, i64 200, !12, i64 208, !12, i64 216, !12, i64 224, !11, i64 232, !12, i64 240, !12, i64 248, !11, i64 256, !12, i64 264, !11, i64 272, !11, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !12, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !11, i64 440}
!11 = !{!"long", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"vec3d", !12, i64 0, !12, i64 8, !12, i64 16}
!15 = !{!14, !12, i64 8}
!16 = !{!14, !12, i64 16}
!17 = !{!10, !12, i64 264}
!18 = !{!10, !11, i64 8}
!19 = !{!11, !11, i64 0}
!20 = !{!10, !6, i64 32}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !12, i64 56}
!24 = !{!"basis_func", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 64, !12, i64 72, !12, i64 80}
!25 = distinct !{!25, !22}
!26 = !{!10, !11, i64 272}
!27 = !{!10, !6, i64 72}
!28 = !{!12, !12, i64 0}
!29 = distinct !{!29, !22}
!30 = distinct !{!30, !22}
!31 = distinct !{!31, !22}
!32 = distinct !{!32, !22}
!33 = !{!10, !6, i64 176}
!34 = distinct !{!34, !22}
!35 = distinct !{!35, !22}
!36 = !{!10, !12, i64 208}


; 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.vec3d = type { double, double, double }
%struct.basis_func = type { i64, i64, i64, i64, ptr, ptr, ptr, double, double, double, double }

@.str.6 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @print_basis_func_struct(ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @print_scf_context(ptr nocapture noundef readonly %0) local_unnamed_addr #0 {
  %2 = alloca %struct.vec3d, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  call void @center_of_charge(ptr noundef %3, ptr noundef nonnull %2) #4
  %4 = load double, ptr %2, align 8, !tbaa !12
  %5 = getelementptr inbounds i8, ptr %2, i64 8
  %6 = load double, ptr %5, align 8, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %2, i64 16
  %8 = load double, ptr %7, align 8, !tbaa !15
  %9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, double noundef %4, double noundef %6, double noundef %8)
  %10 = getelementptr inbounds i8, ptr %0, i64 264
  %11 = load double, ptr %10, align 8, !tbaa !16
  %12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8, double noundef %11)
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i64, ptr %13, align 8, !tbaa !17
  %15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i64 noundef %14)
  %.not91 = icmp eq i64 %14, 0
  br i1 %.not91, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %1
  %16 = getelementptr inbounds i8, ptr %0, i64 32
  br label %18

.lr.ph81:                                         ; preds = %18
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  br label %26

18:                                               ; preds = %.lr.ph, %18
  %.06679 = phi i64 [ 0, %.lr.ph ], [ %22, %18 ]
  %19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i64 noundef %.06679)
  %20 = load ptr, ptr %16, align 8, !tbaa !18
  %21 = getelementptr inbounds %struct.basis_func, ptr %20, i64 %.06679
  call void @print_basis_func_struct(ptr noundef %21)
  %22 = add nuw i64 %.06679, 1
  %exitcond.not = icmp eq i64 %22, %14
  br i1 %exitcond.not, label %.lr.ph81, label %18, !llvm.loop !19

._crit_edge:                                      ; preds = %26
  %23 = getelementptr inbounds i8, ptr %0, i64 272
  %24 = load i64, ptr %23, align 8, !tbaa !21
  %.not = icmp eq i64 %24, 0
  br i1 %.not, label %.preheader76.lr.ph, label %.preheader.preheader

.preheader76.lr.ph:                               ; preds = %._crit_edge
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  br label %.preheader76

26:                                               ; preds = %.lr.ph81, %26
  %.06780 = phi i64 [ 0, %.lr.ph81 ], [ %31, %26 ]
  %27 = load ptr, ptr %17, align 8, !tbaa !18
  %28 = getelementptr inbounds %struct.basis_func, ptr %27, i64 %.06780, i32 7
  %29 = load double, ptr %28, align 8, !tbaa !22
  %30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %29)
  %31 = add nuw i64 %.06780, 1
  %exitcond94.not = icmp eq i64 %31, %14
  br i1 %exitcond94.not, label %._crit_edge, label %26, !llvm.loop !24

.preheader76:                                     ; preds = %.preheader76.lr.ph, %35
  %.07185 = phi i64 [ 0, %.preheader76.lr.ph ], [ %36, %35 ]
  %32 = mul i64 %.07185, %14
  br label %.preheader75

.preheader75:                                     ; preds = %.preheader76, %39
  %.07084 = phi i64 [ 0, %.preheader76 ], [ %40, %39 ]
  %33 = add i64 %.07084, %32
  %34 = mul i64 %33, %14
  br label %.preheader74

35:                                               ; preds = %39
  %36 = add nuw i64 %.07185, 1
  %exitcond98.not = icmp eq i64 %36, %14
  br i1 %exitcond98.not, label %.preheader.preheader, label %.preheader76, !llvm.loop !25

.preheader74:                                     ; preds = %.preheader75, %41
  %.06983 = phi i64 [ 0, %.preheader75 ], [ %42, %41 ]
  %37 = add i64 %.06983, %34
  %38 = mul i64 %37, %14
  br label %43

39:                                               ; preds = %41
  %40 = add nuw i64 %.07084, 1
  %exitcond97.not = icmp eq i64 %40, %14
  br i1 %exitcond97.not, label %35, label %.preheader75, !llvm.loop !26

41:                                               ; preds = %51
  %42 = add nuw i64 %.06983, 1
  %exitcond96.not = icmp eq i64 %42, %14
  br i1 %exitcond96.not, label %39, label %.preheader74, !llvm.loop !27

43:                                               ; preds = %.preheader74, %51
  %.06882 = phi i64 [ 0, %.preheader74 ], [ %52, %51 ]
  %44 = load ptr, ptr %25, align 8, !tbaa !28
  %45 = getelementptr double, ptr %44, i64 %38
  %46 = getelementptr double, ptr %45, i64 %.06882
  %47 = load double, ptr %46, align 8, !tbaa !29
  %48 = fcmp ogt double %47, 1.000000e+00
  br i1 %48, label %49, label %51

49:                                               ; preds = %43
  %50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12, i64 noundef %.07185, i64 noundef %.07084, i64 noundef %.06983, i64 noundef %.06882, double noundef %47)
  br label %51

51:                                               ; preds = %49, %43
  %52 = add nuw i64 %.06882, 1
  %exitcond95.not = icmp eq i64 %52, %14
  br i1 %exitcond95.not, label %41, label %43, !llvm.loop !30

.loopexit:                                        ; preds = %1
  %53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  br label %._crit_edge90

.preheader.preheader:                             ; preds = %35, %._crit_edge
  %54 = getelementptr inbounds i8, ptr %0, i64 176
  %55 = load ptr, ptr %54, align 8, !tbaa !31
  %56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %63
  %.06489 = phi i64 [ %65, %63 ], [ 0, %.preheader.preheader ]
  %.06588 = phi double [ %71, %63 ], [ 0.000000e+00, %.preheader.preheader ]
  %57 = mul i64 %.06489, %14
  %58 = getelementptr double, ptr %55, i64 %57
  br label %66

._crit_edge90:                                    ; preds = %63, %.loopexit
  %.065.lcssa = phi double [ 0.000000e+00, %.loopexit ], [ %71, %63 ]
  %59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, double noundef %.065.lcssa)
  %60 = getelementptr inbounds i8, ptr %0, i64 208
  %61 = load double, ptr %60, align 8, !tbaa !32
  %62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, double noundef %61)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret void

63:                                               ; preds = %66
  %64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  %65 = add nuw i64 %.06489, 1
  %exitcond100.not = icmp eq i64 %65, %14
  br i1 %exitcond100.not, label %._crit_edge90, label %.preheader, !llvm.loop !33

66:                                               ; preds = %.preheader, %66
  %.087 = phi i64 [ 0, %.preheader ], [ %72, %66 ]
  %.186 = phi double [ %.06588, %.preheader ], [ %71, %66 ]
  %67 = getelementptr double, ptr %58, i64 %.087
  %68 = load double, ptr %67, align 8, !tbaa !29
  %69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i64 noundef %.06489, i64 noundef %.087, double noundef %68)
  %70 = load double, ptr %67, align 8, !tbaa !29
  %71 = fadd double %.186, %70
  %72 = add nuw i64 %.087, 1
  %exitcond99.not = icmp eq i64 %72, %14
  br i1 %exitcond99.not, label %63, label %66, !llvm.loop !34
}

declare void @center_of_charge(ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"scf_context", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !11, i64 192, !10, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !10, i64 232, !11, i64 240, !11, i64 248, !10, i64 256, !11, i64 264, !10, i64 272, !10, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !11, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !10, i64 440}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"vec3d", !11, i64 0, !11, i64 8, !11, i64 16}
!14 = !{!13, !11, i64 8}
!15 = !{!13, !11, i64 16}
!16 = !{!6, !11, i64 264}
!17 = !{!6, !10, i64 8}
!18 = !{!6, !7, i64 32}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !10, i64 272}
!22 = !{!23, !11, i64 56}
!23 = !{!"basis_func", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80}
!24 = distinct !{!24, !20}
!25 = distinct !{!25, !20}
!26 = distinct !{!26, !20}
!27 = distinct !{!27, !20}
!28 = !{!6, !7, i64 72}
!29 = !{!11, !11, i64 0}
!30 = distinct !{!30, !20}
!31 = !{!6, !7, i64 176}
!32 = !{!6, !11, i64 208}
!33 = distinct !{!33, !20}
!34 = distinct !{!34, !20}


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