; 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] }

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @primordial_inflation_indices(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  store i32 0, ptr %3, align 4, !tbaa !9
  %4 = load i32, ptr %3, align 4, !tbaa !9
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.primordial, ptr %5, i32 0, i32 88
  store i32 %4, ptr %6, align 8, !tbaa !11
  %7 = load i32, ptr %3, align 4, !tbaa !9
  %8 = add nsw i32 %7, 1
  store i32 %8, ptr %3, align 4, !tbaa !9
  %9 = load i32, ptr %3, align 4, !tbaa !9
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.primordial, ptr %10, i32 0, i32 89
  store i32 %9, ptr %11, align 4, !tbaa !15
  %12 = load i32, ptr %3, align 4, !tbaa !9
  %13 = add nsw i32 %12, 1
  store i32 %13, ptr %3, align 4, !tbaa !9
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.primordial, ptr %14, i32 0, i32 1
  %16 = load i32, ptr %15, align 8, !tbaa !16
  %17 = icmp eq i32 %16, 2
  br i1 %17, label %23, label %18

18:                                               ; preds = %1
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.primordial, ptr %19, i32 0, i32 1
  %21 = load i32, ptr %20, align 8, !tbaa !16
  %22 = icmp eq i32 %21, 4
  br i1 %22, label %23, label %29

23:                                               ; preds = %18, %1
  %24 = load i32, ptr %3, align 4, !tbaa !9
  %25 = load ptr, ptr %2, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.primordial, ptr %25, i32 0, i32 90
  store i32 %24, ptr %26, align 8, !tbaa !17
  %27 = load i32, ptr %3, align 4, !tbaa !9
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %3, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %23, %18
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.primordial, ptr %31, i32 0, i32 99
  store i32 %30, ptr %32, align 4, !tbaa !18
  %33 = load i32, ptr %3, align 4, !tbaa !9
  %34 = load ptr, ptr %2, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.primordial, ptr %34, i32 0, i32 91
  store i32 %33, ptr %35, align 4, !tbaa !19
  %36 = load i32, ptr %3, align 4, !tbaa !9
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %3, align 4, !tbaa !9
  %38 = load i32, ptr %3, align 4, !tbaa !9
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.primordial, ptr %39, i32 0, i32 92
  store i32 %38, ptr %40, align 8, !tbaa !20
  %41 = load i32, ptr %3, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %3, align 4, !tbaa !9
  %43 = load i32, ptr %3, align 4, !tbaa !9
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.primordial, ptr %44, i32 0, i32 93
  store i32 %43, ptr %45, align 4, !tbaa !21
  %46 = load i32, ptr %3, align 4, !tbaa !9
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %3, align 4, !tbaa !9
  %48 = load i32, ptr %3, align 4, !tbaa !9
  %49 = load ptr, ptr %2, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.primordial, ptr %49, i32 0, i32 94
  store i32 %48, ptr %50, align 8, !tbaa !22
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %3, align 4, !tbaa !9
  %53 = load i32, ptr %3, align 4, !tbaa !9
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.primordial, ptr %54, i32 0, i32 95
  store i32 %53, ptr %55, align 4, !tbaa !23
  %56 = load i32, ptr %3, align 4, !tbaa !9
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %3, align 4, !tbaa !9
  %58 = load i32, ptr %3, align 4, !tbaa !9
  %59 = load ptr, ptr %2, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.primordial, ptr %59, i32 0, i32 96
  store i32 %58, ptr %60, align 8, !tbaa !24
  %61 = load i32, ptr %3, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %3, align 4, !tbaa !9
  %63 = load i32, ptr %3, align 4, !tbaa !9
  %64 = load ptr, ptr %2, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.primordial, ptr %64, i32 0, i32 97
  store i32 %63, ptr %65, align 4, !tbaa !25
  %66 = load i32, ptr %3, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %3, align 4, !tbaa !9
  %68 = load i32, ptr %3, align 4, !tbaa !9
  %69 = load ptr, ptr %2, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.primordial, ptr %69, i32 0, i32 98
  store i32 %68, ptr %70, align 8, !tbaa !26
  %71 = load i32, ptr %3, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %3, align 4, !tbaa !9
  %73 = load i32, ptr %3, align 4, !tbaa !9
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.primordial, ptr %74, i32 0, i32 100
  store i32 %73, ptr %75, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  ret i32 0
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 704}
!12 = !{!"primordial", !13, i64 0, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !13, i64 128, !13, i64 136, !13, i64 144, !13, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !13, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !13, i64 224, !13, i64 232, !13, i64 240, !13, i64 248, !13, i64 256, !13, i64 264, !13, i64 272, !13, i64 280, !13, i64 288, !13, i64 296, !13, i64 304, !13, i64 312, !13, i64 320, !13, i64 328, !13, i64 336, !13, i64 344, !13, i64 352, !13, i64 360, !13, i64 368, !13, i64 376, !13, i64 384, !13, i64 392, !13, i64 400, !10, i64 408, !13, i64 416, !13, i64 424, !13, i64 432, !13, i64 440, !13, i64 448, !13, i64 456, !13, i64 464, !13, i64 472, !13, i64 480, !13, i64 488, !13, i64 496, !10, i64 504, !13, i64 512, !10, i64 520, !6, i64 528, !13, i64 536, !13, i64 544, !13, i64 552, !13, i64 560, !13, i64 568, !13, i64 576, !13, i64 584, !13, i64 592, !13, i64 600, !13, i64 608, !10, i64 616, !6, i64 624, !6, i64 632, !10, i64 640, !6, i64 648, !6, i64 656, !6, i64 664, !6, i64 672, !6, i64 680, !6, i64 688, !6, i64 696, !10, i64 704, !10, i64 708, !10, i64 712, !10, i64 716, !10, i64 720, !10, i64 724, !10, i64 728, !10, i64 732, !10, i64 736, !10, i64 740, !10, i64 744, !10, i64 748, !10, i64 752, !13, i64 760, !13, i64 768, !13, i64 776, !13, i64 784, !14, i64 792, !7, i64 794}
!13 = !{!"double", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!12, !10, i64 708}
!16 = !{!12, !10, i64 8}
!17 = !{!12, !10, i64 712}
!18 = !{!12, !10, i64 748}
!19 = !{!12, !10, i64 716}
!20 = !{!12, !10, i64 720}
!21 = !{!12, !10, i64 724}
!22 = !{!12, !10, i64 728}
!23 = !{!12, !10, i64 732}
!24 = !{!12, !10, i64 736}
!25 = !{!12, !10, i64 740}
!26 = !{!12, !10, i64 744}
!27 = !{!12, !10, i64 752}


; 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"

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable
define dso_local noundef i32 @primordial_inflation_indices(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 704
  store i32 0, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 708
  store i32 1, ptr %3, align 4, !tbaa !13
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i32, ptr %4, align 8, !tbaa !14
  switch i32 %5, label %8 [
    i32 2, label %6
    i32 4, label %6
  ]

6:                                                ; preds = %1, %1
  %7 = getelementptr inbounds i8, ptr %0, i64 712
  store i32 2, ptr %7, align 8, !tbaa !15
  br label %8

8:                                                ; preds = %1, %6
  %.0 = phi i32 [ 3, %6 ], [ 2, %1 ]
  %9 = getelementptr inbounds i8, ptr %0, i64 748
  store i32 %.0, ptr %9, align 4, !tbaa !16
  %10 = getelementptr inbounds i8, ptr %0, i64 716
  store i32 %.0, ptr %10, align 4, !tbaa !17
  %11 = insertelement <4 x i32> poison, i32 %.0, i64 0
  %12 = shufflevector <4 x i32> %11, <4 x i32> poison, <4 x i32> zeroinitializer
  %13 = add nuw nsw <4 x i32> %12, <i32 1, i32 2, i32 3, i32 4>
  %14 = getelementptr inbounds i8, ptr %0, i64 720
  store <4 x i32> %13, ptr %14, align 8, !tbaa !18
  %15 = add nuw nsw i32 %.0, 5
  %16 = getelementptr inbounds i8, ptr %0, i64 736
  store i32 %15, ptr %16, align 8, !tbaa !19
  %17 = add nuw nsw i32 %.0, 6
  %18 = getelementptr inbounds i8, ptr %0, i64 740
  store i32 %17, ptr %18, align 4, !tbaa !20
  %19 = add nuw nsw i32 %.0, 7
  %20 = getelementptr inbounds i8, ptr %0, i64 744
  store i32 %19, ptr %20, align 8, !tbaa !21
  %21 = or disjoint i32 %.0, 8
  %22 = getelementptr inbounds i8, ptr %0, i64 752
  store i32 %21, ptr %22, align 8, !tbaa !22
  ret i32 0
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) 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" }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 704}
!6 = !{!"primordial", !7, i64 0, !10, i64 8, !7, i64 16, !7, 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, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, 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, !7, i64 400, !10, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !10, i64 504, !7, i64 512, !10, i64 520, !11, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !7, i64 560, !7, i64 568, !7, i64 576, !7, i64 584, !7, i64 592, !7, i64 600, !7, i64 608, !10, i64 616, !11, i64 624, !11, i64 632, !10, i64 640, !11, i64 648, !11, i64 656, !11, i64 664, !11, i64 672, !11, i64 680, !11, i64 688, !11, i64 696, !10, i64 704, !10, i64 708, !10, i64 712, !10, i64 716, !10, i64 720, !10, i64 724, !10, i64 728, !10, i64 732, !10, i64 736, !10, i64 740, !10, i64 744, !10, i64 748, !10, i64 752, !7, i64 760, !7, i64 768, !7, i64 776, !7, i64 784, !12, i64 792, !8, i64 794}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!6, !10, i64 708}
!14 = !{!6, !10, i64 8}
!15 = !{!6, !10, i64 712}
!16 = !{!6, !10, i64 748}
!17 = !{!6, !10, i64 716}
!18 = !{!10, !10, i64 0}
!19 = !{!6, !10, i64 736}
!20 = !{!6, !10, i64 740}
!21 = !{!6, !10, i64 744}
!22 = !{!6, !10, i64 752}


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