; LLVM IR from VT-ICAM/cfem :: main (main)

; 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.cf_convection_s = type { [2 x double], [2 x double], [2 x double] }
%struct.cf_mesh_s = type { i32, ptr, i32, i32, ptr }
%struct.cf_ref_arrays_s = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double }
%struct.cf_triplet_matrix_s = type { i32, ptr, ptr, ptr }

@__const.main.nodes = external hidden unnamed_addr constant [12 x double], align 16
@__const.main.elements = external hidden unnamed_addr constant [12 x i32], align 16
@__const.main.weights = external hidden unnamed_addr constant [3 x double], align 16
@__const.main.ref_values = external hidden unnamed_addr constant [3 x double], align 16
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @cf_standard_cosinesine_convection(ptr dead_on_unwind noalias writable sret(%struct.cf_convection_s) align 8, double noundef, double noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @ipow(i32 noundef, i32 noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cf_build_mass(ptr noundef byval(%struct.cf_mesh_s) align 8, ptr noundef byval(%struct.cf_ref_arrays_s) align 8, ptr noundef, ptr noundef byval(%struct.cf_triplet_matrix_s) align 8) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [12 x double], align 16
  %10 = alloca [12 x i32], align 16
  %11 = alloca %struct.cf_mesh_s, align 8
  %12 = alloca [3 x double], align 16
  %13 = alloca [3 x double], align 16
  %14 = alloca %struct.cf_ref_arrays_s, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %struct.cf_triplet_matrix_s, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 3, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 6, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 4, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 3, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = load i32, ptr %7, align 4, !tbaa !5
  %21 = call i32 @ipow(i32 noundef %20, i32 noundef 2)
  %22 = mul nsw i32 %19, %21
  store i32 %22, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 96, ptr %9) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const.main.nodes, i64 96, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 @__const.main.elements, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  %23 = getelementptr inbounds %struct.cf_mesh_s, ptr %11, i32 0, i32 0
  %24 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %24, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %struct.cf_mesh_s, ptr %11, i32 0, i32 1
  %26 = getelementptr inbounds [12 x double], ptr %9, i64 0, i64 0
  store ptr %26, ptr %25, align 8, !tbaa !12
  %27 = getelementptr inbounds %struct.cf_mesh_s, ptr %11, i32 0, i32 2
  %28 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %28, ptr %27, align 8, !tbaa !13
  %29 = getelementptr inbounds %struct.cf_mesh_s, ptr %11, i32 0, i32 3
  %30 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %30, ptr %29, align 4, !tbaa !14
  %31 = getelementptr inbounds %struct.cf_mesh_s, ptr %11, i32 0, i32 4
  %32 = getelementptr inbounds [12 x i32], ptr %10, i64 0, i64 0
  store ptr %32, ptr %31, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 @__const.main.weights, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 @__const.main.ref_values, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 88, ptr %14) #6
  %33 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 0
  %34 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %34, ptr %33, align 8, !tbaa !16
  %35 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 1
  %36 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %36, ptr %35, align 4, !tbaa !19
  %37 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 2
  store ptr null, ptr %37, align 8, !tbaa !20
  %38 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 3
  store ptr null, ptr %38, align 8, !tbaa !21
  %39 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 4
  %40 = getelementptr inbounds [3 x double], ptr %12, i64 0, i64 0
  store ptr %40, ptr %39, align 8, !tbaa !22
  %41 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 5
  %42 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  store ptr %42, ptr %41, align 8, !tbaa !23
  %43 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 6
  %44 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  store ptr %44, ptr %43, align 8, !tbaa !24
  %45 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 7
  %46 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  store ptr %46, ptr %45, align 8, !tbaa !25
  %47 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 8
  %48 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  store ptr %48, ptr %47, align 8, !tbaa !26
  %49 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 9
  %50 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  store ptr %50, ptr %49, align 8, !tbaa !27
  %51 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 10
  %52 = getelementptr inbounds [3 x double], ptr %13, i64 0, i64 0
  store ptr %52, ptr %51, align 8, !tbaa !28
  %53 = getelementptr inbounds %struct.cf_ref_arrays_s, ptr %14, i32 0, i32 11
  store double 0.000000e+00, ptr %53, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %54 = load i32, ptr %8, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = mul i64 %55, 4
  %57 = call noalias ptr @malloc(i64 noundef %56) #7
  store ptr %57, ptr %15, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %58 = load i32, ptr %8, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = mul i64 %59, 4
  %61 = call noalias ptr @malloc(i64 noundef %60) #7
  store ptr %61, ptr %16, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %62 = load i32, ptr %8, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = mul i64 %63, 8
  %65 = call noalias ptr @malloc(i64 noundef %64) #7
  store ptr %65, ptr %17, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #6
  %66 = getelementptr inbounds %struct.cf_triplet_matrix_s, ptr %18, i32 0, i32 0
  %67 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %67, ptr %66, align 8, !tbaa !31
  %68 = getelementptr inbounds %struct.cf_triplet_matrix_s, ptr %18, i32 0, i32 1
  %69 = load ptr, ptr %15, align 8, !tbaa !30
  store ptr %69, ptr %68, align 8, !tbaa !33
  %70 = getelementptr inbounds %struct.cf_triplet_matrix_s, ptr %18, i32 0, i32 2
  %71 = load ptr, ptr %16, align 8, !tbaa !30
  store ptr %71, ptr %70, align 8, !tbaa !34
  %72 = getelementptr inbounds %struct.cf_triplet_matrix_s, ptr %18, i32 0, i32 3
  %73 = load ptr, ptr %17, align 8, !tbaa !30
  store ptr %73, ptr %72, align 8, !tbaa !35
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  %75 = call i32 @cf_build_mass(ptr noundef byval(%struct.cf_mesh_s) align 8 %11, ptr noundef byval(%struct.cf_ref_arrays_s) align 8 %14, ptr noundef @cf_standard_cosinesine_convection, ptr noundef byval(%struct.cf_triplet_matrix_s) align 8 %18)
  store i32 %75, ptr %3, align 4, !tbaa !5
  %76 = load i32, ptr %3, align 4, !tbaa !5
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, i32 noundef %76)
  store i32 0, ptr %2, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %99, %0
  %79 = load i32, ptr %2, align 4, !tbaa !5
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %82, label %102

82:                                               ; preds = %78
  %83 = load ptr, ptr %15, align 8, !tbaa !30
  %84 = load i32, ptr %2, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = load ptr, ptr %16, align 8, !tbaa !30
  %89 = load i32, ptr %2, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i32, ptr %88, i64 %90
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load ptr, ptr %17, align 8, !tbaa !30
  %94 = load i32, ptr %2, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %93, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !36
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %87, i32 noundef %92, double noundef %97)
  br label %99

99:                                               ; preds = %82
  %100 = load i32, ptr %2, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %2, align 4, !tbaa !5
  br label %78, !llvm.loop !37

102:                                              ; preds = %78
  %103 = load ptr, ptr %15, align 8, !tbaa !30
  call void @free(ptr noundef %103) #6
  %104 = load ptr, ptr %16, align 8, !tbaa !30
  call void @free(ptr noundef %104) #6
  %105 = load ptr, ptr %17, align 8, !tbaa !30
  call void @free(ptr noundef %105) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 96, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  ret i32 0
}

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree 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 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"", !6, i64 0, !11, i64 8, !6, i64 16, !6, i64 20, !11, i64 24}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!10, !6, i64 16}
!14 = !{!10, !6, i64 20}
!15 = !{!10, !11, i64 24}
!16 = !{!17, !6, i64 0}
!17 = !{!"", !6, i64 0, !6, i64 4, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !18, i64 80}
!18 = !{!"double", !7, i64 0}
!19 = !{!17, !6, i64 4}
!20 = !{!17, !11, i64 8}
!21 = !{!17, !11, i64 16}
!22 = !{!17, !11, i64 24}
!23 = !{!17, !11, i64 32}
!24 = !{!17, !11, i64 40}
!25 = !{!17, !11, i64 48}
!26 = !{!17, !11, i64 56}
!27 = !{!17, !11, i64 64}
!28 = !{!17, !11, i64 72}
!29 = !{!17, !18, i64 80}
!30 = !{!11, !11, i64 0}
!31 = !{!32, !6, i64 0}
!32 = !{!"", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!33 = !{!32, !11, i64 8}
!34 = !{!32, !11, i64 16}
!35 = !{!32, !11, i64 24}
!36 = !{!18, !18, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"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"

%struct.cf_convection_s = type { [2 x double], [2 x double], [2 x double] }
%struct.cf_mesh_s = type { i32, ptr, i32, i32, ptr }
%struct.cf_ref_arrays_s = type { i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, double }
%struct.cf_triplet_matrix_s = type { i32, ptr, ptr, ptr }

@__const.main.nodes = external hidden unnamed_addr constant [12 x double], align 16
@__const.main.elements = external hidden unnamed_addr constant [12 x i32], align 16
@__const.main.weights = external hidden unnamed_addr constant [3 x double], align 16
@__const.main.ref_values = external hidden unnamed_addr constant [3 x double], align 16
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @cf_standard_cosinesine_convection(ptr dead_on_unwind noalias writable sret(%struct.cf_convection_s) align 8, double noundef, double noundef) #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @ipow(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @cf_build_mass(ptr noundef byval(%struct.cf_mesh_s) align 8, ptr noundef byval(%struct.cf_ref_arrays_s) align 8, ptr noundef, ptr noundef byval(%struct.cf_triplet_matrix_s) align 8) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [12 x double], align 16
  %2 = alloca [12 x i32], align 16
  %3 = alloca %struct.cf_mesh_s, align 8
  %4 = alloca [3 x double], align 16
  %5 = alloca [3 x double], align 16
  %6 = alloca %struct.cf_ref_arrays_s, align 8
  %7 = alloca %struct.cf_triplet_matrix_s, align 8
  %8 = tail call i32 @ipow(i32 noundef 3, i32 noundef 2)
  %9 = shl i32 %8, 2
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %1) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(96) %1, ptr noundef nonnull align 16 dereferenceable(96) @__const.main.nodes, i64 96, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %2, ptr noundef nonnull align 16 dereferenceable(48) @__const.main.elements, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  store i32 6, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr %1, ptr %10, align 8, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %3, i64 16
  store i32 4, ptr %11, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %3, i64 20
  store i32 3, ptr %12, align 4, !tbaa !13
  %13 = getelementptr inbounds i8, ptr %3, i64 24
  store ptr %2, ptr %13, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %4, ptr noundef nonnull align 16 dereferenceable(24) @__const.main.weights, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %5, ptr noundef nonnull align 16 dereferenceable(24) @__const.main.ref_values, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %6) #8
  store i32 3, ptr %6, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %6, i64 4
  store i32 3, ptr %14, align 4, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %6, i64 8
  %16 = getelementptr inbounds i8, ptr %6, i64 24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %15, i8 0, i64 16, i1 false)
  store ptr %4, ptr %16, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %6, i64 32
  store ptr %5, ptr %17, align 8, !tbaa !20
  %18 = getelementptr inbounds i8, ptr %6, i64 40
  store ptr %5, ptr %18, align 8, !tbaa !21
  %19 = getelementptr inbounds i8, ptr %6, i64 48
  store ptr %5, ptr %19, align 8, !tbaa !22
  %20 = getelementptr inbounds i8, ptr %6, i64 56
  store ptr %5, ptr %20, align 8, !tbaa !23
  %21 = getelementptr inbounds i8, ptr %6, i64 64
  store ptr %5, ptr %21, align 8, !tbaa !24
  %22 = getelementptr inbounds i8, ptr %6, i64 72
  store ptr %5, ptr %22, align 8, !tbaa !25
  %23 = getelementptr inbounds i8, ptr %6, i64 80
  store double 0.000000e+00, ptr %23, align 8, !tbaa !26
  %24 = sext i32 %9 to i64
  %25 = shl nsw i64 %24, 2
  %26 = call noalias ptr @malloc(i64 noundef %25) #9
  %27 = call noalias ptr @malloc(i64 noundef %25) #9
  %28 = shl nsw i64 %24, 3
  %29 = call noalias ptr @malloc(i64 noundef %28) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  store i32 %9, ptr %7, align 8, !tbaa !27
  %30 = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %26, ptr %30, align 8, !tbaa !29
  %31 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr %27, ptr %31, align 8, !tbaa !30
  %32 = getelementptr inbounds i8, ptr %7, i64 24
  store ptr %29, ptr %32, align 8, !tbaa !31
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  %34 = call i32 @cf_build_mass(ptr noundef nonnull byval(%struct.cf_mesh_s) align 8 %3, ptr noundef nonnull byval(%struct.cf_ref_arrays_s) align 8 %6, ptr noundef nonnull @cf_standard_cosinesine_convection, ptr noundef nonnull byval(%struct.cf_triplet_matrix_s) align 8 %7)
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %34)
  %36 = icmp sgt i32 %8, 0
  br i1 %36, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %smax = call i32 @llvm.smax.i32(i32 %9, i32 1)
  %wide.trip.count = zext nneg i32 %smax to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %37 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv
  %38 = load i32, ptr %37, align 4, !tbaa !32
  %39 = getelementptr inbounds i32, ptr %27, i64 %indvars.iv
  %40 = load i32, ptr %39, align 4, !tbaa !32
  %41 = getelementptr inbounds double, ptr %29, i64 %indvars.iv
  %42 = load double, ptr %41, align 8, !tbaa !33
  %43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %38, i32 noundef %40, double noundef %42)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !34

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @free(ptr noundef %26) #8
  call void @free(ptr noundef %27) #8
  call void @free(ptr noundef %29) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %1) #8
  ret i32 0
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !7, i64 16}
!13 = !{!6, !7, i64 20}
!14 = !{!6, !10, i64 24}
!15 = !{!16, !7, i64 0}
!16 = !{!"", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !17, i64 80}
!17 = !{!"double", !8, i64 0}
!18 = !{!16, !7, i64 4}
!19 = !{!16, !10, i64 24}
!20 = !{!16, !10, i64 32}
!21 = !{!16, !10, i64 40}
!22 = !{!16, !10, i64 48}
!23 = !{!16, !10, i64 56}
!24 = !{!16, !10, i64 64}
!25 = !{!16, !10, i64 72}
!26 = !{!16, !17, i64 80}
!27 = !{!28, !7, i64 0}
!28 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!29 = !{!28, !10, i64 8}
!30 = !{!28, !10, i64 16}
!31 = !{!28, !10, i64 24}
!32 = !{!7, !7, i64 0}
!33 = !{!17, !17, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass