; LLVM IR from CLASS-SZ/class_sz :: class-sz/hyrec (hyrec)

; 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.REC_COSMOPARAMS = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, i64, double, i16, double, double, double, double, double, double, double }
%struct.HRATEEFF = type { ptr, ptr, [2 x ptr], ptr, double, double }
%struct.TWO_PHOTON_PARAMS = type { [311 x double], [311 x double], [311 x double], [311 x double], [311 x double] }

@stdin = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.REC_COSMOPARAMS, align 8
  %3 = alloca %struct.HRATEEFF, align 8
  %4 = alloca %struct.TWO_PHOTON_PARAMS, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 192, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 12440, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store double -1.000000e+00, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 8001, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %13 = call ptr @create_1D_array(i32 noundef 100)
  %14 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 0
  store ptr %13, ptr %14, align 8, !tbaa !11
  %15 = call ptr @create_1D_array(i32 noundef 40)
  %16 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 1
  store ptr %15, ptr %16, align 8, !tbaa !14
  %17 = call ptr @create_2D_array(i32 noundef 40, i32 noundef 100)
  %18 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 2
  %19 = getelementptr inbounds [2 x ptr], ptr %18, i64 0, i64 0
  store ptr %17, ptr %19, align 8, !tbaa !15
  %20 = call ptr @create_2D_array(i32 noundef 40, i32 noundef 100)
  %21 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 2
  %22 = getelementptr inbounds [2 x ptr], ptr %21, i64 0, i64 1
  store ptr %20, ptr %22, align 8, !tbaa !15
  %23 = call ptr @create_1D_array(i32 noundef 100)
  %24 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 3
  store ptr %23, ptr %24, align 8, !tbaa !16
  call void @read_rates(ptr noundef %3)
  call void @read_twog_params(ptr noundef %4)
  %25 = load ptr, ptr @stdin, align 8, !tbaa !15
  %26 = load ptr, ptr @stderr, align 8, !tbaa !15
  call void @rec_get_cosmoparam(ptr noundef %25, ptr noundef %26, ptr noundef %2)
  %27 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 14
  %28 = load i64, ptr %27, align 8, !tbaa !17
  %29 = mul i64 %28, 8
  %30 = call noalias ptr @malloc(i64 noundef %29) #7
  store ptr %30, ptr %5, align 8, !tbaa !15
  %31 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 14
  %32 = load i64, ptr %31, align 8, !tbaa !17
  %33 = mul i64 %32, 8
  %34 = call noalias ptr @malloc(i64 noundef %33) #7
  store ptr %34, ptr %6, align 8, !tbaa !15
  %35 = load ptr, ptr %5, align 8, !tbaa !15
  %36 = load ptr, ptr %6, align 8, !tbaa !15
  call void @rec_build_history(ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %35, ptr noundef %36)
  store i64 0, ptr %7, align 8, !tbaa !21
  br label %37

37:                                               ; preds = %91, %0
  %38 = load i64, ptr %7, align 8, !tbaa !21
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  %41 = icmp slt i64 %38, %40
  br i1 %41, label %42, label %94

42:                                               ; preds = %37
  %43 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 11
  %44 = load double, ptr %43, align 8, !tbaa !22
  %45 = load double, ptr %8, align 8, !tbaa !5
  %46 = load i64, ptr %7, align 8, !tbaa !21
  %47 = sitofp i64 %46 to double
  %48 = call double @llvm.fmuladd.f64(double %45, double %47, double %44)
  store double %48, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 11
  %50 = load double, ptr %49, align 8, !tbaa !22
  %51 = fadd double 1.000000e+00, %50
  %52 = call double @log(double noundef %51) #6
  %53 = fneg double %52
  %54 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 13
  %55 = load double, ptr %54, align 8, !tbaa !23
  %56 = load ptr, ptr %5, align 8, !tbaa !15
  %57 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 14
  %58 = load i64, ptr %57, align 8, !tbaa !17
  %59 = trunc i64 %58 to i32
  %60 = load double, ptr %10, align 8, !tbaa !5
  %61 = fadd double 1.000000e+00, %60
  %62 = call double @log(double noundef %61) #6
  %63 = fneg double %62
  %64 = call double @rec_interp1d(double noundef %53, double noundef %55, ptr noundef %56, i32 noundef %59, double noundef %63)
  store double %64, ptr %11, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 11
  %66 = load double, ptr %65, align 8, !tbaa !22
  %67 = fadd double 1.000000e+00, %66
  %68 = call double @log(double noundef %67) #6
  %69 = fneg double %68
  %70 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 13
  %71 = load double, ptr %70, align 8, !tbaa !23
  %72 = load ptr, ptr %6, align 8, !tbaa !15
  %73 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 14
  %74 = load i64, ptr %73, align 8, !tbaa !17
  %75 = trunc i64 %74 to i32
  %76 = load double, ptr %10, align 8, !tbaa !5
  %77 = fadd double 1.000000e+00, %76
  %78 = call double @log(double noundef %77) #6
  %79 = fneg double %78
  %80 = call double @rec_interp1d(double noundef %69, double noundef %71, ptr noundef %72, i32 noundef %75, double noundef %79)
  store double %80, ptr %12, align 8, !tbaa !5
  %81 = load double, ptr %10, align 8, !tbaa !5
  %82 = load double, ptr %11, align 8, !tbaa !5
  %83 = load double, ptr %12, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.REC_COSMOPARAMS, ptr %2, i32 0, i32 0
  %85 = load double, ptr %84, align 8, !tbaa !24
  %86 = fdiv double %83, %85
  %87 = load double, ptr %10, align 8, !tbaa !5
  %88 = fadd double 1.000000e+00, %87
  %89 = fdiv double %86, %88
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str, double noundef %81, double noundef %82, double noundef %89)
  br label %91

91:                                               ; preds = %42
  %92 = load i64, ptr %7, align 8, !tbaa !21
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %7, align 8, !tbaa !21
  br label %37, !llvm.loop !25

94:                                               ; preds = %37
  %95 = load ptr, ptr %5, align 8, !tbaa !15
  call void @free(ptr noundef %95) #6
  %96 = load ptr, ptr %6, align 8, !tbaa !15
  call void @free(ptr noundef %96) #6
  %97 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  call void @free(ptr noundef %98) #6
  %99 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !14
  call void @free(ptr noundef %100) #6
  %101 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 2
  %102 = getelementptr inbounds [2 x ptr], ptr %101, i64 0, i64 0
  %103 = load ptr, ptr %102, align 8, !tbaa !15
  call void @free_2D_array(ptr noundef %103, i32 noundef 40)
  %104 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 2
  %105 = getelementptr inbounds [2 x ptr], ptr %104, i64 0, i64 1
  %106 = load ptr, ptr %105, align 8, !tbaa !15
  call void @free_2D_array(ptr noundef %106, i32 noundef 40)
  %107 = getelementptr inbounds %struct.HRATEEFF, ptr %3, i32 0, i32 3
  %108 = load ptr, ptr %107, align 8, !tbaa !16
  call void @free(ptr noundef %108) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 12440, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 192, ptr %2) #6
  ret i32 0
}

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

declare ptr @create_1D_array(i32 noundef) #2

declare ptr @create_2D_array(i32 noundef, i32 noundef) #2

declare void @read_rates(ptr noundef) #2

declare void @read_twog_params(ptr noundef) #2

declare void @rec_get_cosmoparam(ptr noundef, ptr noundef, ptr noundef) #2

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

declare void @rec_build_history(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare double @rec_interp1d(double noundef, double noundef, ptr noundef, i32 noundef, double noundef) #2

; Function Attrs: nounwind
declare double @log(double noundef) #5

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

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

declare void @free_2D_array(ptr noundef, i32 noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"double", !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, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 8, !7, i64 16, !13, i64 32, !6, i64 40, !6, i64 48}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!13, !13, i64 0}
!16 = !{!12, !13, i64 32}
!17 = !{!18, !19, i64 112}
!18 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, 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, !19, i64 112, !6, i64 120, !20, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184}
!19 = !{!"long", !7, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = !{!19, !19, i64 0}
!22 = !{!18, !6, i64 88}
!23 = !{!18, !6, i64 104}
!24 = !{!18, !6, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"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.REC_COSMOPARAMS = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, i64, double, i16, double, double, double, double, double, double, double }
%struct.HRATEEFF = type { ptr, ptr, [2 x ptr], ptr, double, double }
%struct.TWO_PHOTON_PARAMS = type { [311 x double], [311 x double], [311 x double], [311 x double], [311 x double] }

@stdin = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.REC_COSMOPARAMS, align 8
  %2 = alloca %struct.HRATEEFF, align 8
  %3 = alloca %struct.TWO_PHOTON_PARAMS, align 8
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 12440, ptr nonnull %3) #8
  %4 = tail call ptr @create_1D_array(i32 noundef 100) #8
  store ptr %4, ptr %2, align 8, !tbaa !5
  %5 = tail call ptr @create_1D_array(i32 noundef 40) #8
  %6 = getelementptr inbounds i8, ptr %2, i64 8
  store ptr %5, ptr %6, align 8, !tbaa !11
  %7 = tail call ptr @create_2D_array(i32 noundef 40, i32 noundef 100) #8
  %8 = getelementptr inbounds i8, ptr %2, i64 16
  store ptr %7, ptr %8, align 8, !tbaa !12
  %9 = tail call ptr @create_2D_array(i32 noundef 40, i32 noundef 100) #8
  %10 = getelementptr inbounds i8, ptr %2, i64 24
  store ptr %9, ptr %10, align 8, !tbaa !12
  %11 = tail call ptr @create_1D_array(i32 noundef 100) #8
  %12 = getelementptr inbounds i8, ptr %2, i64 32
  store ptr %11, ptr %12, align 8, !tbaa !13
  call void @read_rates(ptr noundef nonnull %2) #8
  call void @read_twog_params(ptr noundef nonnull %3) #8
  %13 = load ptr, ptr @stdin, align 8, !tbaa !12
  %14 = load ptr, ptr @stderr, align 8, !tbaa !12
  call void @rec_get_cosmoparam(ptr noundef %13, ptr noundef %14, ptr noundef nonnull %1) #8
  %15 = getelementptr inbounds i8, ptr %1, i64 112
  %16 = load i64, ptr %15, align 8, !tbaa !14
  %17 = shl i64 %16, 3
  %18 = call noalias ptr @malloc(i64 noundef %17) #9
  %19 = call noalias ptr @malloc(i64 noundef %17) #9
  call void @rec_build_history(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef %18, ptr noundef %19) #8
  %20 = getelementptr inbounds i8, ptr %1, i64 88
  %21 = getelementptr inbounds i8, ptr %1, i64 104
  br label %22

22:                                               ; preds = %0, %22
  %.016 = phi i64 [ 0, %0 ], [ %50, %22 ]
  %23 = load double, ptr %20, align 8, !tbaa !18
  %24 = uitofp nneg i64 %.016 to double
  %25 = call double @llvm.fmuladd.f64(double %24, double -1.000000e+00, double %23)
  %26 = fadd double %23, 1.000000e+00
  %27 = call double @log(double noundef %26) #8
  %28 = fneg double %27
  %29 = load double, ptr %21, align 8, !tbaa !19
  %30 = load i64, ptr %15, align 8, !tbaa !14
  %31 = trunc i64 %30 to i32
  %32 = fadd double %25, 1.000000e+00
  %33 = call double @log(double noundef %32) #8
  %34 = fneg double %33
  %35 = call double @rec_interp1d(double noundef %28, double noundef %29, ptr noundef %18, i32 noundef %31, double noundef %34) #8
  %36 = load double, ptr %20, align 8, !tbaa !18
  %37 = fadd double %36, 1.000000e+00
  %38 = call double @log(double noundef %37) #8
  %39 = fneg double %38
  %40 = load double, ptr %21, align 8, !tbaa !19
  %41 = load i64, ptr %15, align 8, !tbaa !14
  %42 = trunc i64 %41 to i32
  %43 = call double @log(double noundef %32) #8
  %44 = fneg double %43
  %45 = call double @rec_interp1d(double noundef %39, double noundef %40, ptr noundef %19, i32 noundef %42, double noundef %44) #8
  %46 = load double, ptr %1, align 8, !tbaa !20
  %47 = fdiv double %45, %46
  %48 = fdiv double %47, %32
  %49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, double noundef %25, double noundef %35, double noundef %48)
  %50 = add nuw nsw i64 %.016, 1
  %exitcond.not = icmp eq i64 %50, 8001
  br i1 %exitcond.not, label %51, label %22, !llvm.loop !21

51:                                               ; preds = %22
  call void @free(ptr noundef %18) #8
  call void @free(ptr noundef %19) #8
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %52) #8
  %53 = load ptr, ptr %6, align 8, !tbaa !11
  call void @free(ptr noundef %53) #8
  %54 = load ptr, ptr %8, align 8, !tbaa !12
  call void @free_2D_array(ptr noundef %54, i32 noundef 40) #8
  %55 = load ptr, ptr %10, align 8, !tbaa !12
  call void @free_2D_array(ptr noundef %55, i32 noundef 40) #8
  %56 = load ptr, ptr %12, align 8, !tbaa !13
  call void @free(ptr noundef %56) #8
  call void @llvm.lifetime.end.p0(i64 12440, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %1) #8
  ret i32 0
}

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

declare ptr @create_1D_array(i32 noundef) local_unnamed_addr #2

declare ptr @create_2D_array(i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @read_rates(ptr noundef) local_unnamed_addr #2

declare void @read_twog_params(ptr noundef) local_unnamed_addr #2

declare void @rec_get_cosmoparam(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; 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

declare void @rec_build_history(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

declare double @rec_interp1d(double noundef, double noundef, ptr noundef, i32 noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @log(double noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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 #7 = { 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 #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, !7, i64 8, !8, i64 16, !7, i64 32, !10, i64 40, !10, i64 48}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!6, !7, i64 8}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !7, i64 32}
!14 = !{!15, !16, i64 112}
!15 = !{!"", !10, i64 0, !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, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !16, i64 112, !10, i64 120, !17, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184}
!16 = !{!"long", !8, i64 0}
!17 = !{!"short", !8, i64 0}
!18 = !{!15, !10, i64 88}
!19 = !{!15, !10, i64 104}
!20 = !{!15, !10, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass