; LLVM IR from jordan4ibanez/tinyphysicsengine :: old (test)

; 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.TPE_Vec4 = type { i32, i32, i32, i32 }
%struct.TPE_Body = type { i8, [3 x i32], [2 x ptr], i8, i32, %struct.TPE_Vec4, %struct.TPE_Vec4, %struct.TPE_RotationState, i32, i8 }
%struct.TPE_RotationState = type { %struct.TPE_Vec4, %struct.TPE_Vec4, i32 }

@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @TPE_vec4(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_rotationToQuaternion(i64, i64, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_rotatePoint(ptr noundef, i64, i64) #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @TPE_lineSegmentClosestPoint(i64, i64, i64, i64, i64, i64) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @TPE_vec3Dist(i64, i64, i64, i64) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @testRotToQuat(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare i32 @puts(ptr noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @ass(ptr noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %struct.TPE_Vec4, align 4
  %3 = alloca %struct.TPE_Vec4, align 4
  %4 = alloca %struct.TPE_Vec4, align 4
  %5 = alloca %struct.TPE_Vec4, align 4
  %6 = alloca %struct.TPE_Vec4, align 4
  %7 = alloca %struct.TPE_Vec4, align 4
  %8 = alloca %struct.TPE_Vec4, align 4
  %9 = alloca %struct.TPE_Vec4, align 4
  %10 = alloca %struct.TPE_Vec4, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.TPE_Vec4, align 4
  %13 = alloca %struct.TPE_Vec4, align 4
  %14 = alloca %struct.TPE_Vec4, align 4
  %15 = alloca %struct.TPE_Vec4, align 4
  %16 = alloca %struct.TPE_Vec4, align 4
  %17 = alloca %struct.TPE_Body, align 8
  %18 = alloca %struct.TPE_Body, align 8
  %19 = alloca %struct.TPE_Vec4, align 4
  %20 = alloca %struct.TPE_Vec4, align 4
  store i32 0, ptr %1, align 4
  %21 = call i32 @ass(ptr noundef @.str.9, i32 noundef 1)
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %25, label %23

23:                                               ; preds = %0
  %24 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  br label %176

25:                                               ; preds = %0
  %26 = call i32 @testRotToQuat(i32 noundef 512, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 512)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %30, label %28

28:                                               ; preds = %25
  %29 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  br label %176

30:                                               ; preds = %25
  %31 = call i32 @testRotToQuat(i32 noundef 512, i32 noundef 0, i32 noundef 0, i32 noundef 128, i32 noundef 361, i32 noundef 0, i32 noundef 0, i32 noundef 361)
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %35, label %33

33:                                               ; preds = %30
  %34 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  br label %176

35:                                               ; preds = %30
  %36 = call i32 @testRotToQuat(i32 noundef 0, i32 noundef 512, i32 noundef 0, i32 noundef 128, i32 noundef 0, i32 noundef 361, i32 noundef 0, i32 noundef 361)
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %40, label %38

38:                                               ; preds = %35
  %39 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  br label %176

40:                                               ; preds = %35
  %41 = call i32 @testRotToQuat(i32 noundef 0, i32 noundef 0, i32 noundef 512, i32 noundef 256, i32 noundef 0, i32 noundef 0, i32 noundef 512, i32 noundef 0)
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %45, label %43

43:                                               ; preds = %40
  %44 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  br label %176

45:                                               ; preds = %40
  %46 = call i32 @testRotToQuat(i32 noundef -512, i32 noundef 512, i32 noundef 512, i32 noundef -64, i32 noundef 112, i32 noundef -112, i32 noundef -112, i32 noundef 472)
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %50, label %48

48:                                               ; preds = %45
  %49 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  br label %176

50:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 16, ptr %2) #4
  %51 = call { i64, i64 } @TPE_vec4(i32 noundef 10, i32 noundef 200, i32 noundef 100, i32 noundef 0)
  %52 = getelementptr inbounds { i64, i64 }, ptr %2, i32 0, i32 0
  %53 = extractvalue { i64, i64 } %51, 0
  store i64 %53, ptr %52, align 4
  %54 = getelementptr inbounds { i64, i64 }, ptr %2, i32 0, i32 1
  %55 = extractvalue { i64, i64 } %51, 1
  store i64 %55, ptr %54, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 4 %2, i64 16, i1 false), !tbaa.struct !5
  %56 = call { i64, i64 } @TPE_vec4(i32 noundef 512, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %57 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  %58 = extractvalue { i64, i64 } %56, 0
  store i64 %58, ptr %57, align 4
  %59 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  %60 = extractvalue { i64, i64 } %56, 1
  store i64 %60, ptr %59, align 4
  %61 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 0
  %62 = load i64, ptr %61, align 4
  %63 = getelementptr inbounds { i64, i64 }, ptr %5, i32 0, i32 1
  %64 = load i64, ptr %63, align 4
  call void @TPE_rotationToQuaternion(i64 %62, i64 %64, i32 noundef 128, ptr noundef %4)
  %65 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 0
  %66 = load i64, ptr %65, align 4
  %67 = getelementptr inbounds { i64, i64 }, ptr %4, i32 0, i32 1
  %68 = load i64, ptr %67, align 4
  call void @TPE_rotatePoint(ptr noundef %3, i64 %66, i64 %68)
  %69 = call { i64, i64 } @TPE_vec4(i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %70 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %71 = extractvalue { i64, i64 } %69, 0
  store i64 %71, ptr %70, align 4
  %72 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %73 = extractvalue { i64, i64 } %69, 1
  store i64 %73, ptr %72, align 4
  %74 = call { i64, i64 } @TPE_vec4(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %75 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %76 = extractvalue { i64, i64 } %74, 0
  store i64 %76, ptr %75, align 4
  %77 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %78 = extractvalue { i64, i64 } %74, 1
  store i64 %78, ptr %77, align 4
  %79 = call { i64, i64 } @TPE_vec4(i32 noundef 50, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %80 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %81 = extractvalue { i64, i64 } %79, 0
  store i64 %81, ptr %80, align 4
  %82 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %83 = extractvalue { i64, i64 } %79, 1
  store i64 %83, ptr %82, align 4
  %84 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 0
  %85 = load i64, ptr %84, align 4
  %86 = getelementptr inbounds { i64, i64 }, ptr %7, i32 0, i32 1
  %87 = load i64, ptr %86, align 4
  %88 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 0
  %89 = load i64, ptr %88, align 4
  %90 = getelementptr inbounds { i64, i64 }, ptr %8, i32 0, i32 1
  %91 = load i64, ptr %90, align 4
  %92 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %93 = load i64, ptr %92, align 4
  %94 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %95 = load i64, ptr %94, align 4
  %96 = call { i64, i64 } @TPE_lineSegmentClosestPoint(i64 %85, i64 %87, i64 %89, i64 %91, i64 %93, i64 %95)
  %97 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  %98 = extractvalue { i64, i64 } %96, 0
  store i64 %98, ptr %97, align 4
  %99 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  %100 = extractvalue { i64, i64 } %96, 1
  store i64 %100, ptr %99, align 4
  %101 = call { i64, i64 } @TPE_vec4(i32 noundef 50, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %102 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %103 = extractvalue { i64, i64 } %101, 0
  store i64 %103, ptr %102, align 4
  %104 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %105 = extractvalue { i64, i64 } %101, 1
  store i64 %105, ptr %104, align 4
  %106 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 0
  %107 = load i64, ptr %106, align 4
  %108 = getelementptr inbounds { i64, i64 }, ptr %6, i32 0, i32 1
  %109 = load i64, ptr %108, align 4
  %110 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 0
  %111 = load i64, ptr %110, align 4
  %112 = getelementptr inbounds { i64, i64 }, ptr %10, i32 0, i32 1
  %113 = load i64, ptr %112, align 4
  %114 = call i32 @TPE_vec3Dist(i64 %107, i64 %109, i64 %111, i64 %113)
  %115 = icmp slt i32 %114, 10
  %116 = zext i1 %115 to i32
  %117 = call i32 @ass(ptr noundef @.str.10, i32 noundef %116)
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %121, label %119

119:                                              ; preds = %50
  %120 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  br label %175

121:                                              ; preds = %50
  %122 = call { i64, i64 } @TPE_vec4(i32 noundef -100, i32 noundef -100, i32 noundef 20, i32 noundef 0)
  %123 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %124 = extractvalue { i64, i64 } %122, 0
  store i64 %124, ptr %123, align 4
  %125 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %126 = extractvalue { i64, i64 } %122, 1
  store i64 %126, ptr %125, align 4
  %127 = call { i64, i64 } @TPE_vec4(i32 noundef 1000, i32 noundef 10000, i32 noundef 20000, i32 noundef 0)
  %128 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %129 = extractvalue { i64, i64 } %127, 0
  store i64 %129, ptr %128, align 4
  %130 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %131 = extractvalue { i64, i64 } %127, 1
  store i64 %131, ptr %130, align 4
  %132 = call { i64, i64 } @TPE_vec4(i32 noundef -3000, i32 noundef -5000, i32 noundef -1000, i32 noundef 0)
  %133 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 0
  %134 = extractvalue { i64, i64 } %132, 0
  store i64 %134, ptr %133, align 4
  %135 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 1
  %136 = extractvalue { i64, i64 } %132, 1
  store i64 %136, ptr %135, align 4
  %137 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 0
  %138 = load i64, ptr %137, align 4
  %139 = getelementptr inbounds { i64, i64 }, ptr %13, i32 0, i32 1
  %140 = load i64, ptr %139, align 4
  %141 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 0
  %142 = load i64, ptr %141, align 4
  %143 = getelementptr inbounds { i64, i64 }, ptr %14, i32 0, i32 1
  %144 = load i64, ptr %143, align 4
  %145 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 0
  %146 = load i64, ptr %145, align 4
  %147 = getelementptr inbounds { i64, i64 }, ptr %15, i32 0, i32 1
  %148 = load i64, ptr %147, align 4
  %149 = call { i64, i64 } @TPE_lineSegmentClosestPoint(i64 %138, i64 %140, i64 %142, i64 %144, i64 %146, i64 %148)
  %150 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %151 = extractvalue { i64, i64 } %149, 0
  store i64 %151, ptr %150, align 4
  %152 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %153 = extractvalue { i64, i64 } %149, 1
  store i64 %153, ptr %152, align 4
  %154 = call { i64, i64 } @TPE_vec4(i32 noundef -100, i32 noundef -100, i32 noundef 20, i32 noundef 0)
  %155 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %156 = extractvalue { i64, i64 } %154, 0
  store i64 %156, ptr %155, align 4
  %157 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %158 = extractvalue { i64, i64 } %154, 1
  store i64 %158, ptr %157, align 4
  %159 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 0
  %160 = load i64, ptr %159, align 4
  %161 = getelementptr inbounds { i64, i64 }, ptr %12, i32 0, i32 1
  %162 = load i64, ptr %161, align 4
  %163 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %164 = load i64, ptr %163, align 4
  %165 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %166 = load i64, ptr %165, align 4
  %167 = call i32 @TPE_vec3Dist(i64 %160, i64 %162, i64 %164, i64 %166)
  %168 = icmp slt i32 %167, 10
  %169 = zext i1 %168 to i32
  %170 = call i32 @ass(ptr noundef @.str.10, i32 noundef %169)
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %174, label %172

172:                                              ; preds = %121
  %173 = call i32 @puts(ptr noundef @.str.4)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  br label %175

174:                                              ; preds = %121
  store i32 0, ptr %1, align 4
  store i32 1, ptr %11, align 4
  br label %175

175:                                              ; preds = %174, %172, %119
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #4
  br label %176

176:                                              ; preds = %175, %48, %43, %38, %33, %28, %23
  %177 = load i32, ptr %1, align 4
  ret i32 %177
}

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

!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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !6, i64 12, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/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"

%struct.TPE_Vec4 = type { i32, i32, i32, i32 }

@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @TPE_vec4(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_rotationToQuaternion(i64, i64, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @TPE_rotatePoint(ptr noundef, i64, i64) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @TPE_lineSegmentClosestPoint(i64, i64, i64, i64, i64, i64) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @TPE_vec3Dist(i64, i64, i64, i64) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @testRotToQuat(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @ass(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %struct.TPE_Vec4, align 8
  %2 = alloca %struct.TPE_Vec4, align 8
  %3 = tail call i32 @ass(ptr noundef nonnull @.str.9, i32 noundef 1)
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %4, label %6

4:                                                ; preds = %0
  %5 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %77

6:                                                ; preds = %0
  %7 = tail call i32 @testRotToQuat(i32 noundef 512, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 512)
  %.not22 = icmp eq i32 %7, 0
  br i1 %.not22, label %8, label %10

8:                                                ; preds = %6
  %9 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %77

10:                                               ; preds = %6
  %11 = tail call i32 @testRotToQuat(i32 noundef 512, i32 noundef 0, i32 noundef 0, i32 noundef 128, i32 noundef 361, i32 noundef 0, i32 noundef 0, i32 noundef 361)
  %.not23 = icmp eq i32 %11, 0
  br i1 %.not23, label %12, label %14

12:                                               ; preds = %10
  %13 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %77

14:                                               ; preds = %10
  %15 = tail call i32 @testRotToQuat(i32 noundef 0, i32 noundef 512, i32 noundef 0, i32 noundef 128, i32 noundef 0, i32 noundef 361, i32 noundef 0, i32 noundef 361)
  %.not24 = icmp eq i32 %15, 0
  br i1 %.not24, label %16, label %18

16:                                               ; preds = %14
  %17 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %77

18:                                               ; preds = %14
  %19 = tail call i32 @testRotToQuat(i32 noundef 0, i32 noundef 0, i32 noundef 512, i32 noundef 256, i32 noundef 0, i32 noundef 0, i32 noundef 512, i32 noundef 0)
  %.not25 = icmp eq i32 %19, 0
  br i1 %.not25, label %20, label %22

20:                                               ; preds = %18
  %21 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %77

22:                                               ; preds = %18
  %23 = tail call i32 @testRotToQuat(i32 noundef -512, i32 noundef 512, i32 noundef 512, i32 noundef -64, i32 noundef 112, i32 noundef -112, i32 noundef -112, i32 noundef 472)
  %.not26 = icmp eq i32 %23, 0
  br i1 %.not26, label %24, label %26

24:                                               ; preds = %22
  %25 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %77

26:                                               ; preds = %22
  %27 = tail call { i64, i64 } @TPE_vec4(i32 noundef 10, i32 noundef 200, i32 noundef 100, i32 noundef 0)
  %28 = extractvalue { i64, i64 } %27, 0
  %29 = extractvalue { i64, i64 } %27, 1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #3
  store i64 %28, ptr %1, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %29, ptr %.sroa.4.0..sroa_idx, align 8
  %30 = tail call { i64, i64 } @TPE_vec4(i32 noundef 512, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %31 = extractvalue { i64, i64 } %30, 0
  %32 = extractvalue { i64, i64 } %30, 1
  call void @TPE_rotationToQuaternion(i64 %31, i64 %32, i32 noundef 128, ptr noundef nonnull %2)
  %33 = load i64, ptr %2, align 8
  %34 = getelementptr inbounds i8, ptr %2, i64 8
  %35 = load i64, ptr %34, align 8
  call void @TPE_rotatePoint(ptr noundef nonnull %1, i64 %33, i64 %35)
  %36 = call { i64, i64 } @TPE_vec4(i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %37 = extractvalue { i64, i64 } %36, 0
  %38 = extractvalue { i64, i64 } %36, 1
  %39 = call { i64, i64 } @TPE_vec4(i32 noundef 100, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %40 = extractvalue { i64, i64 } %39, 0
  %41 = extractvalue { i64, i64 } %39, 1
  %42 = call { i64, i64 } @TPE_vec4(i32 noundef 50, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %43 = extractvalue { i64, i64 } %42, 0
  %44 = extractvalue { i64, i64 } %42, 1
  %45 = call { i64, i64 } @TPE_lineSegmentClosestPoint(i64 %37, i64 %38, i64 %40, i64 %41, i64 %43, i64 %44)
  %46 = extractvalue { i64, i64 } %45, 0
  %47 = extractvalue { i64, i64 } %45, 1
  %48 = call { i64, i64 } @TPE_vec4(i32 noundef 50, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %49 = extractvalue { i64, i64 } %48, 0
  %50 = extractvalue { i64, i64 } %48, 1
  %51 = call i32 @TPE_vec3Dist(i64 %46, i64 %47, i64 %49, i64 %50)
  %52 = icmp slt i32 %51, 10
  %53 = zext i1 %52 to i32
  %54 = call i32 @ass(ptr noundef nonnull @.str.10, i32 noundef %53)
  %.not27 = icmp eq i32 %54, 0
  br i1 %.not27, label %.sink.split, label %55

55:                                               ; preds = %26
  %56 = call { i64, i64 } @TPE_vec4(i32 noundef -100, i32 noundef -100, i32 noundef 20, i32 noundef 0)
  %57 = extractvalue { i64, i64 } %56, 0
  %58 = extractvalue { i64, i64 } %56, 1
  %59 = call { i64, i64 } @TPE_vec4(i32 noundef 1000, i32 noundef 10000, i32 noundef 20000, i32 noundef 0)
  %60 = extractvalue { i64, i64 } %59, 0
  %61 = extractvalue { i64, i64 } %59, 1
  %62 = call { i64, i64 } @TPE_vec4(i32 noundef -3000, i32 noundef -5000, i32 noundef -1000, i32 noundef 0)
  %63 = extractvalue { i64, i64 } %62, 0
  %64 = extractvalue { i64, i64 } %62, 1
  %65 = call { i64, i64 } @TPE_lineSegmentClosestPoint(i64 %57, i64 %58, i64 %60, i64 %61, i64 %63, i64 %64)
  %66 = extractvalue { i64, i64 } %65, 0
  %67 = extractvalue { i64, i64 } %65, 1
  %68 = call { i64, i64 } @TPE_vec4(i32 noundef -100, i32 noundef -100, i32 noundef 20, i32 noundef 0)
  %69 = extractvalue { i64, i64 } %68, 0
  %70 = extractvalue { i64, i64 } %68, 1
  %71 = call i32 @TPE_vec3Dist(i64 %66, i64 %67, i64 %69, i64 %70)
  %72 = icmp slt i32 %71, 10
  %73 = zext i1 %72 to i32
  %74 = call i32 @ass(ptr noundef nonnull @.str.10, i32 noundef %73)
  %.not28 = icmp eq i32 %74, 0
  br i1 %.not28, label %.sink.split, label %76

.sink.split:                                      ; preds = %55, %26
  %75 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.4)
  br label %76

76:                                               ; preds = %.sink.split, %55
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #3
  br label %77

77:                                               ; preds = %76, %24, %20, %16, %12, %8, %4
  ret i32 0
}

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass