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

; 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.primordial = type { double, i32, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, i32, double, double, double, double, double, double, double, double, double, double, double, i32, double, i32, ptr, double, double, double, double, double, double, double, double, double, double, i32, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, double, double, double, double, i16, [2048 x i8] }

@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.135 = external hidden unnamed_addr constant [53 x i8], align 1
@__func__.primordial_inflation_check_hubble = external hidden unnamed_addr constant [34 x i8], align 1
@.str.136 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [9 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

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @primordial_inflation_hubble(ptr noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @primordial_inflation_check_hubble(ptr noundef %0, double noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca [2048 x i8], align 16
  %15 = alloca [2048 x i8], align 16
  %16 = alloca [2048 x i8], align 16
  %17 = alloca [2048 x i8], align 16
  %18 = alloca [2048 x i8], align 16
  store ptr %0, ptr %8, align 8, !tbaa !5
  store double %1, ptr %9, align 8, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  %19 = load ptr, ptr %8, align 8, !tbaa !5
  %20 = load double, ptr %9, align 8, !tbaa !9
  %21 = load ptr, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %11, align 8, !tbaa !5
  %23 = load ptr, ptr %12, align 8, !tbaa !5
  %24 = load ptr, ptr %13, align 8, !tbaa !5
  %25 = call i32 @primordial_inflation_hubble(ptr noundef %19, double noundef %20, ptr noundef %21, ptr noundef %22, ptr noundef %23, ptr noundef %24)
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %27, label %36

27:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 2048, ptr %14) #3
  %28 = getelementptr inbounds [2048 x i8], ptr %14, i64 0, i64 0
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.primordial, ptr %29, i32 0, i32 106
  %31 = getelementptr inbounds [2048 x i8], ptr %30, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %28, ptr noundef @.str.6, ptr noundef @.str.135, ptr noundef %31)
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.primordial, ptr %32, i32 0, i32 106
  %34 = getelementptr inbounds [2048 x i8], ptr %33, i64 0, i64 0
  %35 = getelementptr inbounds [2048 x i8], ptr %14, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %34, ptr noundef @.str.3, ptr noundef @__func__.primordial_inflation_check_hubble, i32 noundef 2456, ptr noundef %35)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %14) #3
  store i32 1, ptr %7, align 4
  br label %65

36:                                               ; preds = %6
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = load double, ptr %37, align 8, !tbaa !9
  %39 = fcmp olt double %38, 0.000000e+00
  br i1 %39, label %40, label %50

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 2048, ptr %15) #3
  %41 = getelementptr inbounds [2048 x i8], ptr %15, i64 0, i64 0
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = load double, ptr %42, align 8, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %41, ptr noundef @.str.136, double noundef %43)
  call void @llvm.lifetime.start.p0(i64 2048, ptr %16) #3
  %44 = getelementptr inbounds [2048 x i8], ptr %16, i64 0, i64 0
  %45 = getelementptr inbounds [2048 x i8], ptr %15, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %44, ptr noundef @.str.1, ptr noundef @.str.137, ptr noundef %45)
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.primordial, ptr %46, i32 0, i32 106
  %48 = getelementptr inbounds [2048 x i8], ptr %47, i64 0, i64 0
  %49 = getelementptr inbounds [2048 x i8], ptr %16, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %48, ptr noundef @.str.3, ptr noundef @__func__.primordial_inflation_check_hubble, i32 noundef 2461, ptr noundef %49)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 2048, ptr %15) #3
  store i32 1, ptr %7, align 4
  br label %65

50:                                               ; preds = %36
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = load double, ptr %51, align 8, !tbaa !9
  %53 = fcmp ogt double %52, 0.000000e+00
  br i1 %53, label %54, label %64

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 2048, ptr %17) #3
  %55 = getelementptr inbounds [2048 x i8], ptr %17, i64 0, i64 0
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = load double, ptr %56, align 8, !tbaa !9
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %55, ptr noundef @.str.138, double noundef %57)
  call void @llvm.lifetime.start.p0(i64 2048, ptr %18) #3
  %58 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %59 = getelementptr inbounds [2048 x i8], ptr %17, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %58, ptr noundef @.str.1, ptr noundef @.str.139, ptr noundef %59)
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.primordial, ptr %60, i32 0, i32 106
  %62 = getelementptr inbounds [2048 x i8], ptr %61, i64 0, i64 0
  %63 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef %62, ptr noundef @.str.3, ptr noundef @__func__.primordial_inflation_check_hubble, i32 noundef 2466, ptr noundef %63)
  call void @llvm.lifetime.end.p0(i64 2048, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 2048, ptr %17) #3
  store i32 1, ptr %7, align 4
  br label %65

64:                                               ; preds = %50
  store i32 0, ptr %7, align 4
  br label %65

65:                                               ; preds = %64, %54, %40, %27
  %66 = load i32, ptr %7, align 4
  ret i32 %66
}

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


; 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.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.135 = external hidden unnamed_addr constant [53 x i8], align 1
@__func__.primordial_inflation_check_hubble = external hidden unnamed_addr constant [34 x i8], align 1
@.str.136 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.137 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.138 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.139 = external hidden unnamed_addr constant [9 x i8], align 1

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

declare void @class_protect_sprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @primordial_inflation_hubble(ptr noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @primordial_inflation_check_hubble(ptr noundef %0, double noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = alloca [2048 x i8], align 16
  %8 = alloca [2048 x i8], align 16
  %9 = alloca [2048 x i8], align 16
  %10 = alloca [2048 x i8], align 16
  %11 = alloca [2048 x i8], align 16
  %12 = tail call i32 @primordial_inflation_hubble(ptr noundef %0, double noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  %13 = icmp eq i32 %12, 1
  br i1 %13, label %14, label %16

14:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %7) #3
  %15 = getelementptr inbounds i8, ptr %0, i64 794
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %7, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.135, ptr noundef nonnull %15) #3
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %15, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.primordial_inflation_check_hubble, i32 noundef 2456, ptr noundef nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %7) #3
  br label %26

16:                                               ; preds = %6
  %17 = load double, ptr %2, align 8, !tbaa !5
  %18 = fcmp olt double %17, 0.000000e+00
  br i1 %18, label %19, label %21

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %8) #3
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %8, ptr noundef nonnull @.str.136, double noundef %17) #3
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %9) #3
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %9, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.137, ptr noundef nonnull %8) #3
  %20 = getelementptr inbounds i8, ptr %0, i64 794
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %20, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.primordial_inflation_check_hubble, i32 noundef 2461, ptr noundef nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %8) #3
  br label %26

21:                                               ; preds = %16
  %22 = load double, ptr %3, align 8, !tbaa !5
  %23 = fcmp ogt double %22, 0.000000e+00
  br i1 %23, label %24, label %26

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %10) #3
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %10, ptr noundef nonnull @.str.138, double noundef %22) #3
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %11) #3
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %11, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.139, ptr noundef nonnull %10) #3
  %25 = getelementptr inbounds i8, ptr %0, i64 794
  call void (ptr, ptr, ...) @class_protect_sprintf(ptr noundef nonnull %25, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.primordial_inflation_check_hubble, i32 noundef 2466, ptr noundef nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %10) #3
  br label %26

26:                                               ; preds = %21, %24, %19, %14
  %.0 = phi i32 [ 1, %14 ], [ 1, %19 ], [ 1, %24 ], [ 0, %21 ]
  ret i32 %.0
}

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass