; LLVM IR from MikeMirzayanov/testlib :: checkers/acmp.ll/Z23 (testlib_preparePointsd)

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

@.str.250 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.253 = external hidden unnamed_addr constant [45 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress noreturn uwtable
declare dso_local void @_Z4quit7TResultPKc(i32 noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z23__testlib_preparePointsd(double noundef %0) #2 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  store double %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %4 = load double, ptr %2, align 8, !tbaa !5
  store volatile double %4, ptr %3, align 8, !tbaa !5
  %5 = load volatile double, ptr %3, align 8, !tbaa !5
  %6 = call noundef zeroext i1 @_ZL15__testlib_isNaNd(double noundef %5)
  br i1 %6, label %7, label %8

7:                                                ; preds = %1
  call void @_Z4quit7TResultPKc(i32 noundef 3, ptr noundef @.str.250) #5
  unreachable

8:                                                ; preds = %1
  %9 = load volatile double, ptr %3, align 8, !tbaa !5
  %10 = call noundef zeroext i1 @_ZL20__testlib_isInfinited(double noundef %9)
  br i1 %10, label %11, label %12

11:                                               ; preds = %8
  call void @_Z4quit7TResultPKc(i32 noundef 3, ptr noundef @.str.251) #5
  unreachable

12:                                               ; preds = %8
  %13 = load volatile double, ptr %3, align 8, !tbaa !5
  %14 = fcmp olt double %13, -1.000000e-08
  br i1 %14, label %15, label %16

15:                                               ; preds = %12
  call void @_Z4quit7TResultPKc(i32 noundef 3, ptr noundef @.str.252) #5
  unreachable

16:                                               ; preds = %12
  %17 = load volatile double, ptr %3, align 8, !tbaa !5
  %18 = fcmp ole double %17, 0.000000e+00
  br i1 %18, label %19, label %20

19:                                               ; preds = %16
  store volatile double 0.000000e+00, ptr %3, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %19, %16
  %21 = load volatile double, ptr %3, align 8, !tbaa !5
  %22 = fcmp ogt double %21, 0x412E848000000056
  br i1 %22, label %23, label %24

23:                                               ; preds = %20
  call void @_Z4quit7TResultPKc(i32 noundef 3, ptr noundef @.str.253) #5
  unreachable

24:                                               ; preds = %20
  %25 = load volatile double, ptr %3, align 8, !tbaa !5
  %26 = fcmp oge double %25, 1.000000e+06
  br i1 %26, label %27, label %28

27:                                               ; preds = %24
  store volatile double 1.000000e+06, ptr %3, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %27, %24
  %29 = load volatile double, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret double %29
}

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL15__testlib_isNaNd(double noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL20__testlib_isInfinited(double noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress noreturn 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 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 #4 = { nounwind }
attributes #5 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; 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.250 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.253 = external hidden unnamed_addr constant [45 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress noreturn uwtable
declare dso_local void @_Z4quit7TResultPKc(i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_Z23__testlib_preparePointsd(double noundef %0) local_unnamed_addr #2 {
  %2 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2)
  store volatile double %0, ptr %2, align 8, !tbaa !5
  %.0..0..0..0. = load volatile double, ptr %2, align 8, !tbaa !5
  %3 = tail call noundef zeroext i1 @_ZL15__testlib_isNaNd(double noundef %.0..0..0..0.)
  br i1 %3, label %4, label %5

4:                                                ; preds = %1
  tail call void @_Z4quit7TResultPKc(i32 noundef 3, ptr noundef nonnull @.str.250) #4
  unreachable

5:                                                ; preds = %1
  %.0..0..0..0.1 = load volatile double, ptr %2, align 8, !tbaa !5
  %6 = tail call noundef zeroext i1 @_ZL20__testlib_isInfinited(double noundef %.0..0..0..0.1)
  br i1 %6, label %7, label %8

7:                                                ; preds = %5
  tail call void @_Z4quit7TResultPKc(i32 noundef 3, ptr noundef nonnull @.str.251) #4
  unreachable

8:                                                ; preds = %5
  %.0..0..0..0.2 = load volatile double, ptr %2, align 8, !tbaa !5
  %9 = fcmp olt double %.0..0..0..0.2, -1.000000e-08
  br i1 %9, label %10, label %11

10:                                               ; preds = %8
  tail call void @_Z4quit7TResultPKc(i32 noundef 3, ptr noundef nonnull @.str.252) #4
  unreachable

11:                                               ; preds = %8
  %.0..0..0..0.3 = load volatile double, ptr %2, align 8, !tbaa !5
  %12 = fcmp ugt double %.0..0..0..0.3, 0.000000e+00
  br i1 %12, label %14, label %13

13:                                               ; preds = %11
  store volatile double 0.000000e+00, ptr %2, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %13, %11
  %.0..0..0..0.4 = load volatile double, ptr %2, align 8, !tbaa !5
  %15 = fcmp ogt double %.0..0..0..0.4, 0x412E848000000056
  br i1 %15, label %16, label %17

16:                                               ; preds = %14
  tail call void @_Z4quit7TResultPKc(i32 noundef 3, ptr noundef nonnull @.str.253) #4
  unreachable

17:                                               ; preds = %14
  %.0..0..0..0.5 = load volatile double, ptr %2, align 8, !tbaa !5
  %18 = fcmp ult double %.0..0..0..0.5, 1.000000e+06
  br i1 %18, label %20, label %19

19:                                               ; preds = %17
  store volatile double 1.000000e+06, ptr %2, align 8, !tbaa !5
  br label %20

20:                                               ; preds = %19, %17
  %.0..0..0..0.6 = load volatile double, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2)
  ret double %.0..0..0..0.6
}

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL15__testlib_isNaNd(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZL20__testlib_isInfinited(double noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress noreturn 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 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 #4 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass