; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/tests/test_c.ll (Z12testspline3dbPN11alglib_impl8ae_stateE)

; 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.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.628 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.636 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.637 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.638 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.639 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.640 = external hidden unnamed_addr constant [12 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 i32 @printf(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: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z12testspline3dbPN11alglib_impl8ae_stateE(i1 noundef zeroext %0, ptr noundef %1) #2 {
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = zext i1 %0 to i8
  store i8 %11, ptr %3, align 1, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  %12 = load ptr, ptr %4, align 8, !tbaa !9
  %13 = call noundef zeroext i1 @_ZL26testspline3dunit_basictestPN11alglib_impl8ae_stateE(ptr noundef %12)
  %14 = zext i1 %13 to i8
  store i8 %14, ptr %6, align 1, !tbaa !5
  %15 = load ptr, ptr %4, align 8, !tbaa !9
  %16 = call noundef zeroext i1 @_ZL27testspline3dunit_testunpackPN11alglib_impl8ae_stateE(ptr noundef %15)
  %17 = zext i1 %16 to i8
  store i8 %17, ptr %7, align 1, !tbaa !5
  %18 = load ptr, ptr %4, align 8, !tbaa !9
  %19 = call noundef zeroext i1 @_ZL29testspline3dunit_testlintransPN11alglib_impl8ae_stateE(ptr noundef %18)
  %20 = zext i1 %19 to i8
  store i8 %20, ptr %8, align 1, !tbaa !5
  %21 = load ptr, ptr %4, align 8, !tbaa !9
  %22 = call noundef zeroext i1 @_ZL38testspline3dunit_testtrilinearresamplePN11alglib_impl8ae_stateE(ptr noundef %21)
  %23 = zext i1 %22 to i8
  store i8 %23, ptr %9, align 1, !tbaa !5
  %24 = load i8, ptr %6, align 1, !tbaa !5, !range !11, !noundef !12
  %25 = trunc i8 %24 to i1
  br i1 %25, label %35, label %26

26:                                               ; preds = %2
  %27 = load i8, ptr %7, align 1, !tbaa !5, !range !11, !noundef !12
  %28 = trunc i8 %27 to i1
  br i1 %28, label %35, label %29

29:                                               ; preds = %26
  %30 = load i8, ptr %8, align 1, !tbaa !5, !range !11, !noundef !12
  %31 = trunc i8 %30 to i1
  br i1 %31, label %35, label %32

32:                                               ; preds = %29
  %33 = load i8, ptr %9, align 1, !tbaa !5, !range !11, !noundef !12
  %34 = trunc i8 %33 to i1
  br label %35

35:                                               ; preds = %32, %29, %26, %2
  %36 = phi i1 [ true, %29 ], [ true, %26 ], [ true, %2 ], [ %34, %32 ]
  %37 = zext i1 %36 to i8
  store i8 %37, ptr %5, align 1, !tbaa !5
  %38 = load i8, ptr %3, align 1, !tbaa !5, !range !11, !noundef !12
  %39 = trunc i8 %38 to i1
  br i1 %39, label %82, label %40

40:                                               ; preds = %35
  %41 = call i32 (ptr, ...) @printf(ptr noundef @.str.636)
  %42 = call i32 (ptr, ...) @printf(ptr noundef @.str.41)
  %43 = load i8, ptr %6, align 1, !tbaa !5, !range !11, !noundef !12
  %44 = trunc i8 %43 to i1
  br i1 %44, label %45, label %47

45:                                               ; preds = %40
  %46 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %49

47:                                               ; preds = %40
  %48 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %49

49:                                               ; preds = %47, %45
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.628)
  %51 = load i8, ptr %7, align 1, !tbaa !5, !range !11, !noundef !12
  %52 = trunc i8 %51 to i1
  br i1 %52, label %53, label %55

53:                                               ; preds = %49
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %57

55:                                               ; preds = %49
  %56 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %57

57:                                               ; preds = %55, %53
  %58 = call i32 (ptr, ...) @printf(ptr noundef @.str.637)
  %59 = load i8, ptr %8, align 1, !tbaa !5, !range !11, !noundef !12
  %60 = trunc i8 %59 to i1
  br i1 %60, label %61, label %63

61:                                               ; preds = %57
  %62 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %65

63:                                               ; preds = %57
  %64 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %65

65:                                               ; preds = %63, %61
  %66 = call i32 (ptr, ...) @printf(ptr noundef @.str.638)
  %67 = load i8, ptr %9, align 1, !tbaa !5, !range !11, !noundef !12
  %68 = trunc i8 %67 to i1
  br i1 %68, label %69, label %71

69:                                               ; preds = %65
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str.7)
  br label %73

71:                                               ; preds = %65
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  br label %73

73:                                               ; preds = %71, %69
  %74 = load i8, ptr %5, align 1, !tbaa !5, !range !11, !noundef !12
  %75 = trunc i8 %74 to i1
  br i1 %75, label %76, label %78

76:                                               ; preds = %73
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.639)
  br label %80

78:                                               ; preds = %73
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.640)
  br label %80

80:                                               ; preds = %78, %76
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  br label %82

82:                                               ; preds = %80, %35
  %83 = load i8, ptr %5, align 1, !tbaa !5, !range !11, !noundef !12
  %84 = trunc i8 %83 to i1
  %85 = xor i1 %84, true
  %86 = zext i1 %85 to i8
  store i8 %86, ptr %10, align 1, !tbaa !5
  %87 = load i8, ptr %10, align 1, !tbaa !5, !range !11, !noundef !12
  %88 = trunc i8 %87 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  ret i1 %88
}

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

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

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

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

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 = { 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 }

!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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}


; 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.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.41 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.628 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.636 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.637 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.638 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.639 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.640 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z12testspline3dbPN11alglib_impl8ae_stateE(i1 noundef zeroext %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = tail call noundef zeroext i1 @_ZL26testspline3dunit_basictestPN11alglib_impl8ae_stateE(ptr noundef %1)
  %4 = tail call noundef zeroext i1 @_ZL27testspline3dunit_testunpackPN11alglib_impl8ae_stateE(ptr noundef %1)
  %5 = tail call noundef zeroext i1 @_ZL29testspline3dunit_testlintransPN11alglib_impl8ae_stateE(ptr noundef %1)
  %6 = tail call noundef zeroext i1 @_ZL38testspline3dunit_testtrilinearresamplePN11alglib_impl8ae_stateE(ptr noundef %1)
  %spec.select = or i1 %5, %6
  %7 = or i1 %4, %spec.select
  %spec.select15 = or i1 %3, %7
  br i1 %0, label %20, label %8

8:                                                ; preds = %2
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.636)
  %10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.41)
  %.str.7..str.6 = select i1 %3, ptr @.str.7, ptr @.str.6
  %11 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.7..str.6)
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.628)
  %.str.6.sink16 = select i1 %4, ptr @.str.7, ptr @.str.6
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.6.sink16)
  %14 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.637)
  %.str.6.sink17 = select i1 %5, ptr @.str.7, ptr @.str.6
  %15 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.6.sink17)
  %16 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.638)
  %.str.6.sink18 = select i1 %6, ptr @.str.7, ptr @.str.6
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.6.sink18)
  %.str.640.sink = select i1 %spec.select15, ptr @.str.639, ptr @.str.640
  %18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.640.sink)
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %20

20:                                               ; preds = %8, %2
  %21 = xor i1 %spec.select15, true
  ret i1 %21
}

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL26testspline3dunit_basictestPN11alglib_impl8ae_stateE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL27testspline3dunit_testunpackPN11alglib_impl8ae_stateE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL29testspline3dunit_testlintransPN11alglib_impl8ae_stateE(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL38testspline3dunit_testtrilinearresamplePN11alglib_impl8ae_stateE(ptr noundef) local_unnamed_addr #1

attributes #0 = { nofree 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 #1 = { 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" }

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