; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src/Kernel.ll (ZN7SGTELIB6kernelENS_8kernel_tEdd)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.12 = external hidden unnamed_addr constant [85 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.52 = external hidden unnamed_addr constant [30 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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #1 align 2

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN7SGTELIB6kernelENS_8kernel_tEdd(i32 noundef %0, double noundef %1, double noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca double, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator", align 1
  %21 = alloca i1, align 1
  store i32 %0, ptr %5, align 4, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  %22 = load i32, ptr %5, align 4, !tbaa !5
  switch i32 %22, label %167 [
    i32 0, label %23
    i32 1, label %33
    i32 2, label %43
    i32 3, label %54
    i32 4, label %75
    i32 5, label %100
    i32 6, label %108
    i32 7, label %125
    i32 8, label %134
    i32 9, label %136
    i32 10, label %147
    i32 11, label %153
  ]

23:                                               ; preds = %3
  %24 = load double, ptr %6, align 8, !tbaa !9
  %25 = fmul double 0xC00921FB54524550, %24
  %26 = load double, ptr %6, align 8, !tbaa !9
  %27 = fmul double %25, %26
  %28 = load double, ptr %7, align 8, !tbaa !9
  %29 = fmul double %27, %28
  %30 = load double, ptr %7, align 8, !tbaa !9
  %31 = fmul double %29, %30
  %32 = call double @exp(double noundef %31) #5
  store double %32, ptr %4, align 8
  br label %189

33:                                               ; preds = %3
  %34 = load double, ptr %6, align 8, !tbaa !9
  %35 = fmul double 0x4023BD3CC9D469A5, %34
  %36 = load double, ptr %6, align 8, !tbaa !9
  %37 = fmul double %35, %36
  %38 = load double, ptr %7, align 8, !tbaa !9
  %39 = fmul double %37, %38
  %40 = load double, ptr %7, align 8, !tbaa !9
  %41 = call double @llvm.fmuladd.f64(double %39, double %40, double 1.000000e+00)
  %42 = fdiv double 1.000000e+00, %41
  store double %42, ptr %4, align 8
  br label %189

43:                                               ; preds = %3
  %44 = load double, ptr %6, align 8, !tbaa !9
  %45 = fmul double 5.201500e+01, %44
  %46 = load double, ptr %6, align 8, !tbaa !9
  %47 = fmul double %45, %46
  %48 = load double, ptr %7, align 8, !tbaa !9
  %49 = fmul double %47, %48
  %50 = load double, ptr %7, align 8, !tbaa !9
  %51 = call double @llvm.fmuladd.f64(double %49, double %50, double 1.000000e+00)
  %52 = call double @sqrt(double noundef %51) #5
  %53 = fdiv double 1.000000e+00, %52
  store double %53, ptr %4, align 8
  br label %189

54:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %55 = load double, ptr %6, align 8, !tbaa !9
  %56 = load double, ptr %7, align 8, !tbaa !9
  %57 = fmul double %55, %56
  %58 = call double @llvm.fabs.f64(double %57)
  %59 = fmul double %58, 1.600000e+01
  %60 = fdiv double %59, 1.500000e+01
  store double %60, ptr %8, align 8, !tbaa !9
  %61 = load double, ptr %8, align 8, !tbaa !9
  %62 = fcmp ole double %61, 1.000000e+00
  br i1 %62, label %63, label %71

63:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %64 = load double, ptr %8, align 8, !tbaa !9
  %65 = load double, ptr %8, align 8, !tbaa !9
  %66 = fneg double %64
  %67 = call double @llvm.fmuladd.f64(double %66, double %65, double 1.000000e+00)
  store double %67, ptr %9, align 8, !tbaa !9
  %68 = load double, ptr %9, align 8, !tbaa !9
  %69 = load double, ptr %9, align 8, !tbaa !9
  %70 = fmul double %68, %69
  store double %70, ptr %4, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %72

71:                                               ; preds = %54
  store i32 0, ptr %10, align 4
  br label %72

72:                                               ; preds = %71, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %73 = load i32, ptr %10, align 4
  switch i32 %73, label %196 [
    i32 0, label %74
    i32 1, label %189
  ]

74:                                               ; preds = %72
  store double 0.000000e+00, ptr %4, align 8
  br label %189

75:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %76 = load double, ptr %6, align 8, !tbaa !9
  %77 = load double, ptr %7, align 8, !tbaa !9
  %78 = fmul double %76, %77
  %79 = call double @llvm.fabs.f64(double %78)
  %80 = fmul double %79, 1.620000e+02
  %81 = fdiv double %80, 1.400000e+02
  store double %81, ptr %11, align 8, !tbaa !9
  %82 = load double, ptr %11, align 8, !tbaa !9
  %83 = fcmp ole double %82, 1.000000e+00
  br i1 %83, label %84, label %96

84:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %85 = load double, ptr %11, align 8, !tbaa !9
  %86 = load double, ptr %11, align 8, !tbaa !9
  %87 = fmul double %85, %86
  %88 = load double, ptr %11, align 8, !tbaa !9
  %89 = fneg double %87
  %90 = call double @llvm.fmuladd.f64(double %89, double %88, double 1.000000e+00)
  store double %90, ptr %12, align 8, !tbaa !9
  %91 = load double, ptr %12, align 8, !tbaa !9
  %92 = load double, ptr %12, align 8, !tbaa !9
  %93 = fmul double %91, %92
  %94 = load double, ptr %12, align 8, !tbaa !9
  %95 = fmul double %93, %94
  store double %95, ptr %4, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %97

96:                                               ; preds = %75
  store i32 0, ptr %10, align 4
  br label %97

97:                                               ; preds = %96, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %98 = load i32, ptr %10, align 4
  switch i32 %98, label %196 [
    i32 0, label %99
    i32 1, label %189
  ]

99:                                               ; preds = %97
  store double 0.000000e+00, ptr %4, align 8
  br label %189

100:                                              ; preds = %3
  %101 = load double, ptr %6, align 8, !tbaa !9
  %102 = fmul double 4.000000e+00, %101
  %103 = load double, ptr %7, align 8, !tbaa !9
  %104 = fmul double %102, %103
  %105 = call double @sqrt(double noundef %104) #5
  %106 = fneg double %105
  %107 = call double @exp(double noundef %106) #5
  store double %107, ptr %4, align 8
  br label %189

108:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %109 = load double, ptr %6, align 8, !tbaa !9
  %110 = load double, ptr %7, align 8, !tbaa !9
  %111 = fmul double %109, %110
  %112 = call double @llvm.fabs.f64(double %111)
  store double %112, ptr %13, align 8, !tbaa !9
  %113 = load double, ptr %13, align 8, !tbaa !9
  %114 = fcmp ole double %113, 0.000000e+00
  br i1 %114, label %115, label %121

115:                                              ; preds = %108
  %116 = load double, ptr %13, align 8, !tbaa !9
  %117 = fmul double 1.000000e+00, %116
  %118 = load double, ptr %13, align 8, !tbaa !9
  %119 = fneg double %117
  %120 = call double @llvm.fmuladd.f64(double %119, double %118, double 1.000000e+00)
  store double %120, ptr %4, align 8
  store i32 1, ptr %10, align 4
  br label %122

121:                                              ; preds = %108
  store i32 0, ptr %10, align 4
  br label %122

122:                                              ; preds = %121, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %123 = load i32, ptr %10, align 4
  switch i32 %123, label %196 [
    i32 0, label %124
    i32 1, label %189
  ]

124:                                              ; preds = %122
  store double 0.000000e+00, ptr %4, align 8
  br label %189

125:                                              ; preds = %3
  %126 = load double, ptr %6, align 8, !tbaa !9
  %127 = load double, ptr %6, align 8, !tbaa !9
  %128 = fmul double %126, %127
  %129 = load double, ptr %7, align 8, !tbaa !9
  %130 = fmul double %128, %129
  %131 = load double, ptr %7, align 8, !tbaa !9
  %132 = call double @llvm.fmuladd.f64(double %130, double %131, double 1.000000e+00)
  %133 = call double @sqrt(double noundef %132) #5
  store double %133, ptr %4, align 8
  br label %189

134:                                              ; preds = %3
  %135 = load double, ptr %7, align 8, !tbaa !9
  store double %135, ptr %4, align 8
  br label %189

136:                                              ; preds = %3
  %137 = load double, ptr %7, align 8, !tbaa !9
  %138 = fcmp oeq double %137, 0.000000e+00
  br i1 %138, label %139, label %140

139:                                              ; preds = %136
  store double 0.000000e+00, ptr %4, align 8
  br label %189

140:                                              ; preds = %136
  %141 = load double, ptr %7, align 8, !tbaa !9
  %142 = call double @log(double noundef %141) #5
  %143 = load double, ptr %7, align 8, !tbaa !9
  %144 = fmul double %142, %143
  %145 = load double, ptr %7, align 8, !tbaa !9
  %146 = fmul double %144, %145
  store double %146, ptr %4, align 8
  br label %189

147:                                              ; preds = %3
  %148 = load double, ptr %7, align 8, !tbaa !9
  %149 = load double, ptr %7, align 8, !tbaa !9
  %150 = fmul double %148, %149
  %151 = load double, ptr %7, align 8, !tbaa !9
  %152 = fmul double %150, %151
  store double %152, ptr %4, align 8
  br label %189

153:                                              ; preds = %3
  %154 = load double, ptr %7, align 8, !tbaa !9
  %155 = fcmp oeq double %154, 0.000000e+00
  br i1 %155, label %156, label %157

156:                                              ; preds = %153
  store double 0.000000e+00, ptr %4, align 8
  br label %189

157:                                              ; preds = %153
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %158 = load double, ptr %7, align 8, !tbaa !9
  %159 = load double, ptr %7, align 8, !tbaa !9
  %160 = fmul double %158, %159
  store double %160, ptr %14, align 8, !tbaa !9
  %161 = load double, ptr %14, align 8, !tbaa !9
  %162 = load double, ptr %14, align 8, !tbaa !9
  %163 = fmul double %161, %162
  %164 = load double, ptr %7, align 8, !tbaa !9
  %165 = call double @log(double noundef %164) #5
  %166 = fmul double %163, %165
  store double %166, ptr %4, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %189

167:                                              ; preds = %3
  store i1 true, ptr %21, align 1
  %168 = call ptr @__cxa_allocate_exception(i64 112) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %169 unwind label %172

169:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.52, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %170 unwind label %176

170:                                              ; preds = %169
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %168, ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 296, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %171 unwind label %180

171:                                              ; preds = %170
  store i1 false, ptr %21, align 1
  invoke void @__cxa_throw(ptr %168, ptr @_ZTIN7SGTELIB9ExceptionE, ptr @_ZN7SGTELIB9ExceptionD2Ev) #6
          to label %196 unwind label %180

172:                                              ; preds = %167
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %17, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %18, align 4
  br label %185

176:                                              ; preds = %169
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %17, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %18, align 4
  br label %184

180:                                              ; preds = %171, %170
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %17, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %18, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %184

184:                                              ; preds = %180, %176
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %185

185:                                              ; preds = %184, %172
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  %186 = load i1, ptr %21, align 1
  br i1 %186, label %187, label %188

187:                                              ; preds = %185
  call void @__cxa_free_exception(ptr %168) #5
  br label %188

188:                                              ; preds = %187, %185
  br label %191

189:                                              ; preds = %157, %156, %147, %140, %139, %134, %125, %124, %122, %100, %99, %97, %74, %72, %43, %33, %23
  %190 = load double, ptr %4, align 8
  ret double %190

191:                                              ; preds = %188
  %192 = load ptr, ptr %17, align 8
  %193 = load i32, ptr %18, align 4
  %194 = insertvalue { ptr, i32 } poison, ptr %192, 0
  %195 = insertvalue { ptr, i32 } %194, i32 %193, 1
  resume { ptr, i32 } %195

196:                                              ; preds = %171, %122, %97, %72
  unreachable
}

; Function Attrs: nounwind
declare double @exp(double noundef) #3

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

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

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

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

!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 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple 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"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str.12 = external hidden unnamed_addr constant [85 x i8], align 1
@_ZTIN7SGTELIB9ExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.52 = external hidden unnamed_addr constant [30 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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB9ExceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #1 align 2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN7SGTELIB6kernelENS_8kernel_tEdd(i32 noundef %0, double noundef %1, double noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  switch i32 %0, label %83 [
    i32 0, label %8
    i32 1, label %14
    i32 2, label %20
    i32 3, label %27
    i32 4, label %37
    i32 5, label %49
    i32 6, label %55
    i32 7, label %62
    i32 8, label %95
    i32 9, label %67
    i32 10, label %73
    i32 11, label %76
  ]

8:                                                ; preds = %3
  %9 = fmul double %1, 0xC00921FB54524550
  %10 = fmul double %9, %1
  %11 = fmul double %10, %2
  %12 = fmul double %11, %2
  %13 = tail call double @exp(double noundef %12) #5
  br label %95

14:                                               ; preds = %3
  %15 = fmul double %1, 0x4023BD3CC9D469A5
  %16 = fmul double %15, %1
  %17 = fmul double %16, %2
  %18 = tail call double @llvm.fmuladd.f64(double %17, double %2, double 1.000000e+00)
  %19 = fdiv double 1.000000e+00, %18
  br label %95

20:                                               ; preds = %3
  %21 = fmul double %1, 5.201500e+01
  %22 = fmul double %21, %1
  %23 = fmul double %22, %2
  %24 = tail call double @llvm.fmuladd.f64(double %23, double %2, double 1.000000e+00)
  %25 = tail call double @sqrt(double noundef %24) #5
  %26 = fdiv double 1.000000e+00, %25
  br label %95

27:                                               ; preds = %3
  %28 = fmul double %1, %2
  %29 = tail call double @llvm.fabs.f64(double %28)
  %30 = fmul double %29, 1.600000e+01
  %31 = fdiv double %30, 1.500000e+01
  %32 = fcmp ugt double %31, 1.000000e+00
  %33 = fneg double %31
  %34 = tail call double @llvm.fmuladd.f64(double %33, double %31, double 1.000000e+00)
  %35 = fmul double %34, %34
  br i1 %32, label %36, label %95

36:                                               ; preds = %27
  br label %95

37:                                               ; preds = %3
  %38 = fmul double %1, %2
  %39 = tail call double @llvm.fabs.f64(double %38)
  %40 = fmul double %39, 1.620000e+02
  %41 = fdiv double %40, 1.400000e+02
  %42 = fcmp ugt double %41, 1.000000e+00
  br i1 %42, label %95, label %43

43:                                               ; preds = %37
  %44 = fneg double %41
  %45 = fmul double %41, %44
  %46 = tail call double @llvm.fmuladd.f64(double %45, double %41, double 1.000000e+00)
  %47 = fmul double %46, %46
  %48 = fmul double %46, %47
  br label %95

49:                                               ; preds = %3
  %50 = fmul double %1, 4.000000e+00
  %51 = fmul double %50, %2
  %52 = tail call double @sqrt(double noundef %51) #5
  %53 = fneg double %52
  %54 = tail call double @exp(double noundef %53) #5
  br label %95

55:                                               ; preds = %3
  %56 = fmul double %1, %2
  %57 = fcmp oeq double %56, 0.000000e+00
  br i1 %57, label %58, label %95

58:                                               ; preds = %55
  %59 = tail call double @llvm.fabs.f64(double %56)
  %60 = fneg double %59
  %61 = tail call double @llvm.fmuladd.f64(double %60, double %59, double 1.000000e+00)
  br label %95

62:                                               ; preds = %3
  %63 = fmul double %1, %1
  %64 = fmul double %63, %2
  %65 = tail call double @llvm.fmuladd.f64(double %64, double %2, double 1.000000e+00)
  %66 = tail call double @sqrt(double noundef %65) #5
  br label %95

67:                                               ; preds = %3
  %68 = fcmp oeq double %2, 0.000000e+00
  br i1 %68, label %95, label %69

69:                                               ; preds = %67
  %70 = tail call double @log(double noundef %2) #5
  %71 = fmul double %70, %2
  %72 = fmul double %71, %2
  br label %95

73:                                               ; preds = %3
  %74 = fmul double %2, %2
  %75 = fmul double %74, %2
  br label %95

76:                                               ; preds = %3
  %77 = fcmp oeq double %2, 0.000000e+00
  br i1 %77, label %95, label %78

78:                                               ; preds = %76
  %79 = fmul double %2, %2
  %80 = fmul double %79, %79
  %81 = tail call double @log(double noundef %2) #5
  %82 = fmul double %80, %81
  br label %95

83:                                               ; preds = %3
  %84 = tail call ptr @__cxa_allocate_exception(i64 112) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.12, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %85 unwind label %.thread85

85:                                               ; preds = %83
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.52, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %86 unwind label %89

86:                                               ; preds = %85
  invoke void @_ZN7SGTELIB9ExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_(ptr noundef nonnull align 8 dereferenceable(112) %84, ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 296, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %87 unwind label %91

87:                                               ; preds = %86
  invoke void @__cxa_throw(ptr nonnull %84, ptr nonnull @_ZTIN7SGTELIB9ExceptionE, ptr nonnull @_ZN7SGTELIB9ExceptionD2Ev) #6
          to label %97 unwind label %91

.thread85:                                        ; preds = %83
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %94

89:                                               ; preds = %85
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %93

91:                                               ; preds = %87, %86
  %.0 = phi i1 [ false, %87 ], [ true, %86 ]
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %93

93:                                               ; preds = %89, %91
  %.pn = phi { ptr, i32 } [ %92, %91 ], [ %90, %89 ]
  %.1 = phi i1 [ %.0, %91 ], [ true, %89 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br i1 %.1, label %94, label %96

94:                                               ; preds = %.thread85, %93
  %.pn.pn89 = phi { ptr, i32 } [ %88, %.thread85 ], [ %.pn, %93 ]
  call void @__cxa_free_exception(ptr %84) #5
  br label %96

95:                                               ; preds = %55, %58, %37, %43, %27, %76, %67, %3, %78, %73, %69, %62, %49, %36, %20, %14, %8
  %.3 = phi double [ %82, %78 ], [ %75, %73 ], [ %72, %69 ], [ %66, %62 ], [ %61, %58 ], [ %54, %49 ], [ %48, %43 ], [ %35, %27 ], [ 0.000000e+00, %36 ], [ %26, %20 ], [ %19, %14 ], [ %13, %8 ], [ %2, %3 ], [ 0.000000e+00, %67 ], [ 0.000000e+00, %76 ], [ 0.000000e+00, %37 ], [ 0.000000e+00, %55 ]
  ret double %.3

96:                                               ; preds = %93, %94
  %.pn.pn88 = phi { ptr, i32 } [ %.pn, %93 ], [ %.pn.pn89, %94 ]
  resume { ptr, i32 } %.pn.pn88

97:                                               ; preds = %87
  unreachable
}

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { mustprogress 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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!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,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass