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

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

; 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
declare double @pow(double noundef, double noundef) #1

; Function Attrs: nounwind uwtable
define dso_local double @r8_zeta(double noundef %0) #2 {
  %2 = alloca double, align 8
  %3 = alloca i32, align 4
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  store double %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  store double 1.000000e+30, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store double 0x400921FB54442D18, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %9 = load double, ptr %2, align 8, !tbaa !5
  %10 = fcmp ole double %9, 1.000000e+00
  br i1 %10, label %11, label %12

11:                                               ; preds = %1
  store double 1.000000e+30, ptr %6, align 8, !tbaa !5
  br label %136

12:                                               ; preds = %1
  %13 = load double, ptr %2, align 8, !tbaa !5
  %14 = fcmp oeq double %13, 2.000000e+00
  br i1 %14, label %15, label %18

15:                                               ; preds = %12
  %16 = call double @pow(double noundef 0x400921FB54442D18, double noundef 2.000000e+00) #3
  %17 = fdiv double %16, 6.000000e+00
  store double %17, ptr %6, align 8, !tbaa !5
  br label %135

18:                                               ; preds = %12
  %19 = load double, ptr %2, align 8, !tbaa !5
  %20 = fcmp oeq double %19, 3.000000e+00
  br i1 %20, label %21, label %22

21:                                               ; preds = %18
  store double 0x3FF33BA004F2CCF4, ptr %6, align 8, !tbaa !5
  br label %134

22:                                               ; preds = %18
  %23 = load double, ptr %2, align 8, !tbaa !5
  %24 = fcmp oeq double %23, 4.000000e+00
  br i1 %24, label %25, label %28

25:                                               ; preds = %22
  %26 = call double @pow(double noundef 0x400921FB54442D18, double noundef 4.000000e+00) #3
  %27 = fdiv double %26, 9.000000e+01
  store double %27, ptr %6, align 8, !tbaa !5
  br label %133

28:                                               ; preds = %22
  %29 = load double, ptr %2, align 8, !tbaa !5
  %30 = fcmp oeq double %29, 5.000000e+00
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  store double 0x3FF097418EC781D5, ptr %6, align 8, !tbaa !5
  br label %132

32:                                               ; preds = %28
  %33 = load double, ptr %2, align 8, !tbaa !5
  %34 = fcmp oeq double %33, 6.000000e+00
  br i1 %34, label %35, label %38

35:                                               ; preds = %32
  %36 = call double @pow(double noundef 0x400921FB54442D18, double noundef 6.000000e+00) #3
  %37 = fdiv double %36, 9.450000e+02
  store double %37, ptr %6, align 8, !tbaa !5
  br label %131

38:                                               ; preds = %32
  %39 = load double, ptr %2, align 8, !tbaa !5
  %40 = fcmp oeq double %39, 7.000000e+00
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  store double 0x3FF02232DA160D3D, ptr %6, align 8, !tbaa !5
  br label %130

42:                                               ; preds = %38
  %43 = load double, ptr %2, align 8, !tbaa !5
  %44 = fcmp oeq double %43, 8.000000e+00
  br i1 %44, label %45, label %48

45:                                               ; preds = %42
  %46 = call double @pow(double noundef 0x400921FB54442D18, double noundef 8.000000e+00) #3
  %47 = fdiv double %46, 9.450000e+03
  store double %47, ptr %6, align 8, !tbaa !5
  br label %129

48:                                               ; preds = %42
  %49 = load double, ptr %2, align 8, !tbaa !5
  %50 = fcmp oeq double %49, 9.000000e+00
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  store double 0x3FF00839F3D64BDE, ptr %6, align 8, !tbaa !5
  br label %128

52:                                               ; preds = %48
  %53 = load double, ptr %2, align 8, !tbaa !5
  %54 = fcmp oeq double %53, 1.000000e+01
  br i1 %54, label %55, label %58

55:                                               ; preds = %52
  %56 = call double @pow(double noundef 0x400921FB54442D18, double noundef 1.000000e+01) #3
  %57 = fdiv double %56, 9.355500e+04
  store double %57, ptr %6, align 8, !tbaa !5
  br label %127

58:                                               ; preds = %52
  %59 = load double, ptr %2, align 8, !tbaa !5
  %60 = fcmp oeq double %59, 1.100000e+01
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  store double 0x3FF0020631BE003B, ptr %6, align 8, !tbaa !5
  br label %126

62:                                               ; preds = %58
  %63 = load double, ptr %2, align 8, !tbaa !5
  %64 = fcmp oeq double %63, 1.200000e+01
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  store double 0x3FF001020A5E623D, ptr %6, align 8, !tbaa !5
  br label %125

66:                                               ; preds = %62
  %67 = load double, ptr %2, align 8, !tbaa !5
  %68 = fcmp oeq double %67, 1.300000e+01
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  store double 0x3FF00080AC99C3B9, ptr %6, align 8, !tbaa !5
  br label %124

70:                                               ; preds = %66
  %71 = load double, ptr %2, align 8, !tbaa !5
  %72 = fcmp oeq double %71, 1.400000e+01
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store double 0x3FF0004039304149, ptr %6, align 8, !tbaa !5
  br label %123

74:                                               ; preds = %70
  %75 = load double, ptr %2, align 8, !tbaa !5
  %76 = fcmp oeq double %75, 1.500000e+01
  br i1 %76, label %77, label %78

77:                                               ; preds = %74
  store double 0x3FF0002012F5192A, ptr %6, align 8, !tbaa !5
  br label %122

78:                                               ; preds = %74
  %79 = load double, ptr %2, align 8, !tbaa !5
  %80 = fcmp oeq double %79, 1.600000e+01
  br i1 %80, label %81, label %82

81:                                               ; preds = %78
  store double 0x3FF00010064FA8C9, ptr %6, align 8, !tbaa !5
  br label %121

82:                                               ; preds = %78
  %83 = load double, ptr %2, align 8, !tbaa !5
  %84 = fcmp oeq double %83, 1.700000e+01
  br i1 %84, label %85, label %86

85:                                               ; preds = %82
  store double 0x3FF0000802186342, ptr %6, align 8, !tbaa !5
  br label %120

86:                                               ; preds = %82
  %87 = load double, ptr %2, align 8, !tbaa !5
  %88 = fcmp oeq double %87, 1.800000e+01
  br i1 %88, label %89, label %90

89:                                               ; preds = %86
  store double 0x3FF0000400B2DBCA, ptr %6, align 8, !tbaa !5
  br label %119

90:                                               ; preds = %86
  %91 = load double, ptr %2, align 8, !tbaa !5
  %92 = fcmp oeq double %91, 1.900000e+01
  br i1 %92, label %93, label %94

93:                                               ; preds = %90
  store double 0x3FF00002003A8169, ptr %6, align 8, !tbaa !5
  br label %118

94:                                               ; preds = %90
  %95 = load double, ptr %2, align 8, !tbaa !5
  %96 = fcmp oeq double %95, 2.000000e+01
  br i1 %96, label %97, label %98

97:                                               ; preds = %94
  store double 0x3FF000010016617D, ptr %6, align 8, !tbaa !5
  br label %117

98:                                               ; preds = %94
  store double 0.000000e+00, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %3, align 4, !tbaa !9
  br label %99

99:                                               ; preds = %114, %98
  %100 = load i32, ptr %3, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %3, align 4, !tbaa !9
  %102 = load double, ptr %7, align 8, !tbaa !5
  store double %102, ptr %8, align 8, !tbaa !5
  %103 = load double, ptr %7, align 8, !tbaa !5
  %104 = load i32, ptr %3, align 4, !tbaa !9
  %105 = sitofp i32 %104 to double
  %106 = load double, ptr %2, align 8, !tbaa !5
  %107 = call double @pow(double noundef %105, double noundef %106) #3
  %108 = fdiv double 1.000000e+00, %107
  %109 = fadd double %103, %108
  store double %109, ptr %7, align 8, !tbaa !5
  %110 = load double, ptr %7, align 8, !tbaa !5
  %111 = load double, ptr %8, align 8, !tbaa !5
  %112 = fcmp ole double %110, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %99
  br label %115

114:                                              ; preds = %99
  br label %99

115:                                              ; preds = %113
  %116 = load double, ptr %7, align 8, !tbaa !5
  store double %116, ptr %6, align 8, !tbaa !5
  br label %117

117:                                              ; preds = %115, %97
  br label %118

118:                                              ; preds = %117, %93
  br label %119

119:                                              ; preds = %118, %89
  br label %120

120:                                              ; preds = %119, %85
  br label %121

121:                                              ; preds = %120, %81
  br label %122

122:                                              ; preds = %121, %77
  br label %123

123:                                              ; preds = %122, %73
  br label %124

124:                                              ; preds = %123, %69
  br label %125

125:                                              ; preds = %124, %65
  br label %126

126:                                              ; preds = %125, %61
  br label %127

127:                                              ; preds = %126, %55
  br label %128

128:                                              ; preds = %127, %51
  br label %129

129:                                              ; preds = %128, %45
  br label %130

130:                                              ; preds = %129, %41
  br label %131

131:                                              ; preds = %130, %35
  br label %132

132:                                              ; preds = %131, %31
  br label %133

133:                                              ; preds = %132, %25
  br label %134

134:                                              ; preds = %133, %21
  br label %135

135:                                              ; preds = %134, %15
  br label %136

136:                                              ; preds = %135, %11
  %137 = load double, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  ret double %137
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !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"

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind memory(write) uwtable
define dso_local double @r8_zeta(double noundef %0) local_unnamed_addr #1 {
  %2 = fcmp ugt double %0, 1.000000e+00
  br i1 %2, label %3, label %.loopexit

3:                                                ; preds = %1
  %4 = fcmp oeq double %0, 2.000000e+00
  br i1 %4, label %.loopexit, label %5

5:                                                ; preds = %3
  %6 = fcmp oeq double %0, 3.000000e+00
  br i1 %6, label %.loopexit, label %7

7:                                                ; preds = %5
  %8 = fcmp oeq double %0, 4.000000e+00
  br i1 %8, label %.loopexit, label %9

9:                                                ; preds = %7
  %10 = fcmp oeq double %0, 5.000000e+00
  br i1 %10, label %.loopexit, label %11

11:                                               ; preds = %9
  %12 = fcmp oeq double %0, 6.000000e+00
  br i1 %12, label %.loopexit, label %13

13:                                               ; preds = %11
  %14 = fcmp oeq double %0, 7.000000e+00
  br i1 %14, label %.loopexit, label %15

15:                                               ; preds = %13
  %16 = fcmp oeq double %0, 8.000000e+00
  br i1 %16, label %.loopexit, label %17

17:                                               ; preds = %15
  %18 = fcmp oeq double %0, 9.000000e+00
  br i1 %18, label %.loopexit, label %19

19:                                               ; preds = %17
  %20 = fcmp oeq double %0, 1.000000e+01
  br i1 %20, label %.loopexit, label %21

21:                                               ; preds = %19
  %22 = fcmp oeq double %0, 1.100000e+01
  br i1 %22, label %.loopexit, label %23

23:                                               ; preds = %21
  %24 = fcmp oeq double %0, 1.200000e+01
  br i1 %24, label %.loopexit, label %25

25:                                               ; preds = %23
  %26 = fcmp oeq double %0, 1.300000e+01
  br i1 %26, label %.loopexit, label %27

27:                                               ; preds = %25
  %28 = fcmp oeq double %0, 1.400000e+01
  br i1 %28, label %.loopexit, label %29

29:                                               ; preds = %27
  %30 = fcmp oeq double %0, 1.500000e+01
  br i1 %30, label %.loopexit, label %31

31:                                               ; preds = %29
  %32 = fcmp oeq double %0, 1.600000e+01
  br i1 %32, label %.loopexit, label %33

33:                                               ; preds = %31
  %34 = fcmp oeq double %0, 1.700000e+01
  br i1 %34, label %.loopexit, label %35

35:                                               ; preds = %33
  %36 = fcmp oeq double %0, 1.800000e+01
  br i1 %36, label %.loopexit, label %37

37:                                               ; preds = %35
  %38 = fcmp oeq double %0, 1.900000e+01
  br i1 %38, label %.loopexit, label %39

39:                                               ; preds = %37
  %40 = fcmp oeq double %0, 2.000000e+01
  br i1 %40, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %39, %.preheader
  %.028 = phi double [ %45, %.preheader ], [ 0.000000e+00, %39 ]
  %.0 = phi i32 [ %41, %.preheader ], [ 0, %39 ]
  %41 = add nuw nsw i32 %.0, 1
  %42 = uitofp nneg i32 %41 to double
  %43 = tail call double @pow(double noundef %42, double noundef %0) #2
  %44 = fdiv double 1.000000e+00, %43
  %45 = fadd double %.028, %44
  %46 = fcmp ugt double %45, %.028
  br i1 %46, label %.preheader, label %.loopexit

.loopexit:                                        ; preds = %.preheader, %39, %37, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5, %3, %1
  %.029 = phi double [ 1.000000e+30, %1 ], [ 0x3FFA51A6625307D3, %3 ], [ 0x3FF33BA004F2CCF4, %5 ], [ 0x3FF151322AC7D847, %7 ], [ 0x3FF097418EC781D5, %9 ], [ 0x3FF0470984C09244, %11 ], [ 0x3FF02232DA160D3D, %13 ], [ 0x3FF010B36AF86395, %15 ], [ 0x3FF00839F3D64BDE, %17 ], [ 0x3FF00412E33A5BB8, %19 ], [ 0x3FF0020631BE003B, %21 ], [ 0x3FF001020A5E623D, %23 ], [ 0x3FF00080AC99C3B9, %25 ], [ 0x3FF0004039304149, %27 ], [ 0x3FF0002012F5192A, %29 ], [ 0x3FF00010064FA8C9, %31 ], [ 0x3FF0000802186342, %33 ], [ 0x3FF0000400B2DBCA, %35 ], [ 0x3FF00002003A8169, %37 ], [ 0x3FF000010016617D, %39 ], [ %45, %.preheader ]
  ret double %.029
}

attributes #0 = { 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 #1 = { nofree nounwind memory(write) 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)"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass