; LLVM IR from recp/cglm :: test/src (tests)

; 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.test_status_t = type { ptr, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [94 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.787 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.862 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.866 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.867 = external hidden unnamed_addr constant [36 x i8], align 1
@__const.test_glm_quat_slerp.v1 = external hidden unnamed_addr constant [3 x float], align 4
@.str.868 = external hidden unnamed_addr constant [28 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

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

declare { ptr, i32 } @test_assert_vec3_eq(ptr noundef, ptr noundef) #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_vec3_normalize(ptr noundef) #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_quat_axis(ptr noundef, ptr noundef) #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden float @glm_quat_angle(ptr noundef) #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden float @glm_rad(float noundef) #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_quatv(ptr noundef, float noundef, ptr noundef) #4

declare { ptr, i32 } @test_assert_quat_eq(ptr noundef, ptr noundef) #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_quat_lerp(ptr noundef, ptr noundef, float noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @test_glm_quat_slerp() #5 {
  %1 = alloca %struct.test_status_t, align 8
  %2 = alloca [4 x float], align 16
  %3 = alloca [4 x float], align 16
  %4 = alloca [4 x float], align 16
  %5 = alloca [4 x float], align 16
  %6 = alloca [3 x float], align 4
  %7 = alloca [3 x float], align 4
  %8 = alloca %struct.test_status_t, align 8
  %9 = alloca %struct.test_status_t, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.test_status_t, align 8
  %12 = alloca %struct.test_status_t, align 8
  %13 = alloca %struct.test_status_t, align 8
  %14 = alloca %struct.test_status_t, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 @__const.test_glm_quat_slerp.v1, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  %15 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %16 = call float @glm_rad(float noundef 3.000000e+01)
  %17 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %15, float noundef %16, ptr noundef %17)
  %18 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %19 = call float @glm_rad(float noundef 9.000000e+01)
  %20 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %18, float noundef %19, ptr noundef %20)
  %21 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  store float 1.000000e+01, ptr %21, align 16, !tbaa !5
  %22 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %23 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %24 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  call void @glm_quat_slerp(ptr noundef %22, ptr noundef %23, float noundef 1.000000e+00, ptr noundef %24)
  br label %25

25:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %26 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %27 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %28 = call { ptr, i32 } @test_assert_quat_eq(ptr noundef %26, ptr noundef %27)
  %29 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %30 = extractvalue { ptr, i32 } %28, 0
  store ptr %30, ptr %29, align 8
  %31 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %32 = extractvalue { ptr, i32 } %28, 1
  store i32 %32, ptr %31, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  %33 = getelementptr inbounds %struct.test_status_t, ptr %8, i32 0, i32 1
  %34 = load i32, ptr %33, align 8, !tbaa !14
  %35 = icmp ne i32 %34, 1
  br i1 %35, label %36, label %43

36:                                               ; preds = %25
  %37 = load ptr, ptr @stderr, align 8, !tbaa !10
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 805, ptr noundef @.str.868) #6
  %39 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %40 = getelementptr inbounds %struct.test_status_t, ptr %8, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  store ptr %41, ptr %39, align 8, !tbaa !16
  %42 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %42, align 8, !tbaa !14
  store i32 1, ptr %10, align 4
  br label %44

43:                                               ; preds = %25
  store i32 0, ptr %10, align 4
  br label %44

44:                                               ; preds = %43, %36
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  %45 = load i32, ptr %10, align 4
  switch i32 %45, label %150 [
    i32 0, label %46
  ]

46:                                               ; preds = %44
  br label %47

47:                                               ; preds = %46
  br label %48

48:                                               ; preds = %47
  %49 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %50 = call float @glm_rad(float noundef 0x403E004180000000)
  %51 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %49, float noundef %50, ptr noundef %51)
  %52 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %53 = call float @glm_rad(float noundef 0x403E008320000000)
  %54 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %52, float noundef %53, ptr noundef %54)
  %55 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %56 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %57 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  call void @glm_quat_slerp(ptr noundef %55, ptr noundef %56, float noundef 0x3FE6666660000000, ptr noundef %57)
  %58 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %59 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %60 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  call void @glm_quat_lerp(ptr noundef %58, ptr noundef %59, float noundef 0x3FE6666660000000, ptr noundef %60)
  br label %61

61:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  %62 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %63 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  %64 = call { ptr, i32 } @test_assert_quat_eq(ptr noundef %62, ptr noundef %63)
  %65 = getelementptr inbounds { ptr, i32 }, ptr %12, i32 0, i32 0
  %66 = extractvalue { ptr, i32 } %64, 0
  store ptr %66, ptr %65, align 8
  %67 = getelementptr inbounds { ptr, i32 }, ptr %12, i32 0, i32 1
  %68 = extractvalue { ptr, i32 } %64, 1
  store i32 %68, ptr %67, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %11, ptr align 8 %12, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  %69 = getelementptr inbounds %struct.test_status_t, ptr %11, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !14
  %71 = icmp ne i32 %70, 1
  br i1 %71, label %72, label %79

72:                                               ; preds = %61
  %73 = load ptr, ptr @stderr, align 8, !tbaa !10
  %74 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 811, ptr noundef @.str.862) #6
  %75 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %76 = getelementptr inbounds %struct.test_status_t, ptr %11, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !16
  store ptr %77, ptr %75, align 8, !tbaa !16
  %78 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %78, align 8, !tbaa !14
  store i32 1, ptr %10, align 4
  br label %80

79:                                               ; preds = %61
  store i32 0, ptr %10, align 4
  br label %80

80:                                               ; preds = %79, %72
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  %81 = load i32, ptr %10, align 4
  switch i32 %81, label %150 [
    i32 0, label %82
  ]

82:                                               ; preds = %80
  br label %83

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  %85 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %86 = call float @glm_rad(float noundef 3.000000e+01)
  %87 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %85, float noundef %86, ptr noundef %87)
  %88 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %89 = call float @glm_rad(float noundef 9.000000e+01)
  %90 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %88, float noundef %89, ptr noundef %90)
  %91 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %92 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %93 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  call void @glm_quat_slerp(ptr noundef %91, ptr noundef %92, float noundef 5.000000e-01, ptr noundef %93)
  %94 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %95 = getelementptr inbounds [3 x float], ptr %7, i64 0, i64 0
  call void @glm_quat_axis(ptr noundef %94, ptr noundef %95)
  %96 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_vec3_normalize(ptr noundef %96)
  %97 = getelementptr inbounds [3 x float], ptr %7, i64 0, i64 0
  call void @glm_vec3_normalize(ptr noundef %97)
  br label %98

98:                                               ; preds = %84
  %99 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %100 = call float @glm_quat_angle(ptr noundef %99)
  %101 = call float @glm_rad(float noundef 3.000000e+01)
  %102 = fcmp ogt float %100, %101
  br i1 %102, label %108, label %103

103:                                              ; preds = %98
  %104 = load ptr, ptr @stderr, align 8, !tbaa !10
  %105 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %104, ptr noundef @.str, ptr noundef @.str.787, i32 noundef 821, ptr noundef @.str.866) #6
  %106 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %106, align 8, !tbaa !16
  %107 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %107, align 8, !tbaa !14
  store i32 1, ptr %10, align 4
  br label %150

108:                                              ; preds = %98
  br label %109

109:                                              ; preds = %108
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  %112 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %113 = call float @glm_quat_angle(ptr noundef %112)
  %114 = call float @glm_rad(float noundef 9.000000e+01)
  %115 = fcmp olt float %113, %114
  br i1 %115, label %121, label %116

116:                                              ; preds = %111
  %117 = load ptr, ptr @stderr, align 8, !tbaa !10
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %117, ptr noundef @.str, ptr noundef @.str.787, i32 noundef 822, ptr noundef @.str.867) #6
  %119 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %119, align 8, !tbaa !16
  %120 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %120, align 8, !tbaa !14
  store i32 1, ptr %10, align 4
  br label %150

121:                                              ; preds = %111
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %125 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  %126 = getelementptr inbounds [3 x float], ptr %7, i64 0, i64 0
  %127 = call { ptr, i32 } @test_assert_vec3_eq(ptr noundef %125, ptr noundef %126)
  %128 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 0
  %129 = extractvalue { ptr, i32 } %127, 0
  store ptr %129, ptr %128, align 8
  %130 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 1
  %131 = extractvalue { ptr, i32 } %127, 1
  store i32 %131, ptr %130, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  %132 = getelementptr inbounds %struct.test_status_t, ptr %13, i32 0, i32 1
  %133 = load i32, ptr %132, align 8, !tbaa !14
  %134 = icmp ne i32 %133, 1
  br i1 %134, label %135, label %142

135:                                              ; preds = %124
  %136 = load ptr, ptr @stderr, align 8, !tbaa !10
  %137 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %136, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 823, ptr noundef @.str.140) #6
  %138 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %139 = getelementptr inbounds %struct.test_status_t, ptr %13, i32 0, i32 0
  %140 = load ptr, ptr %139, align 8, !tbaa !16
  store ptr %140, ptr %138, align 8, !tbaa !16
  %141 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %141, align 8, !tbaa !14
  store i32 1, ptr %10, align 4
  br label %143

142:                                              ; preds = %124
  store i32 0, ptr %10, align 4
  br label %143

143:                                              ; preds = %142, %135
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  %144 = load i32, ptr %10, align 4
  switch i32 %144, label %150 [
    i32 0, label %145
  ]

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145
  br label %147

147:                                              ; preds = %146
  %148 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %148, align 8, !tbaa !16
  %149 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 1, ptr %149, align 8, !tbaa !14
  store i32 1, ptr %10, align 4
  br label %150

150:                                              ; preds = %147, %143, %116, %103, %80, %44
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #6
  %151 = load { ptr, i32 }, ptr %1, align 8
  ret { ptr, i32 } %151
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_quat_slerp(ptr noundef, ptr noundef, float noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { "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 = { alwaysinline 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 #5 = { 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 #6 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{i64 0, i64 8, !10, i64 8, i64 4, !12}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !13, i64 8}
!15 = !{!"test_status_t", !11, i64 0, !13, i64 8}
!16 = !{!15, !11, 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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [94 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.140 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.787 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.862 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.866 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.867 = external hidden unnamed_addr constant [36 x i8], align 1
@__const.test_glm_quat_slerp.v1 = external hidden unnamed_addr constant [3 x float], align 4
@.str.868 = external hidden unnamed_addr constant [28 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #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, i32 } @test_assert_vec3_eq(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_vec3_normalize(ptr noundef) local_unnamed_addr #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_quat_axis(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden float @glm_quat_angle(ptr noundef) local_unnamed_addr #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden float @glm_rad(float noundef) local_unnamed_addr #4

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_quatv(ptr noundef, float noundef, ptr noundef) local_unnamed_addr #4

declare { ptr, i32 } @test_assert_quat_eq(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_quat_lerp(ptr noundef, ptr noundef, float noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @test_glm_quat_slerp() local_unnamed_addr #5 {
  %1 = alloca [4 x float], align 16
  %2 = alloca [4 x float], align 16
  %3 = alloca [4 x float], align 16
  %4 = alloca [4 x float], align 16
  %5 = alloca [3 x float], align 4
  %6 = alloca [3 x float], align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) @__const.test_glm_quat_slerp.v1, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  %7 = tail call float @glm_rad(float noundef 3.000000e+01)
  call void @glm_quatv(ptr noundef nonnull %1, float noundef %7, ptr noundef nonnull %5)
  %8 = call float @glm_rad(float noundef 9.000000e+01)
  call void @glm_quatv(ptr noundef nonnull %2, float noundef %8, ptr noundef nonnull %5)
  store float 1.000000e+01, ptr %1, align 16, !tbaa !5
  call void @glm_quat_slerp(ptr noundef nonnull %1, ptr noundef nonnull %2, float noundef 1.000000e+00, ptr noundef nonnull %3)
  %9 = call { ptr, i32 } @test_assert_quat_eq(ptr noundef nonnull %1, ptr noundef nonnull %3) #6
  %10 = extractvalue { ptr, i32 } %9, 1
  %.not = icmp eq i32 %10, 1
  br i1 %.not, label %.critedge, label %11

11:                                               ; preds = %0
  %12 = extractvalue { ptr, i32 } %9, 0
  %13 = load ptr, ptr @stderr, align 8, !tbaa !9
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.787, i32 noundef 805, ptr noundef nonnull @.str.868) #7
  br label %47

.critedge:                                        ; preds = %0
  %15 = call float @glm_rad(float noundef 0x403E004180000000)
  call void @glm_quatv(ptr noundef nonnull %1, float noundef %15, ptr noundef nonnull %5)
  %16 = call float @glm_rad(float noundef 0x403E008320000000)
  call void @glm_quatv(ptr noundef nonnull %2, float noundef %16, ptr noundef nonnull %5)
  call void @glm_quat_slerp(ptr noundef nonnull %1, ptr noundef nonnull %2, float noundef 0x3FE6666660000000, ptr noundef nonnull %3)
  call void @glm_quat_lerp(ptr noundef nonnull %1, ptr noundef nonnull %2, float noundef 0x3FE6666660000000, ptr noundef nonnull %4)
  %17 = call { ptr, i32 } @test_assert_quat_eq(ptr noundef nonnull %3, ptr noundef nonnull %4) #6
  %18 = extractvalue { ptr, i32 } %17, 1
  %.not20 = icmp eq i32 %18, 1
  br i1 %.not20, label %23, label %19

19:                                               ; preds = %.critedge
  %20 = extractvalue { ptr, i32 } %17, 0
  %21 = load ptr, ptr @stderr, align 8, !tbaa !9
  %22 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %21, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.787, i32 noundef 811, ptr noundef nonnull @.str.862) #7
  br label %47

23:                                               ; preds = %.critedge
  %24 = call float @glm_rad(float noundef 3.000000e+01)
  call void @glm_quatv(ptr noundef nonnull %1, float noundef %24, ptr noundef nonnull %5)
  %25 = call float @glm_rad(float noundef 9.000000e+01)
  call void @glm_quatv(ptr noundef nonnull %2, float noundef %25, ptr noundef nonnull %5)
  call void @glm_quat_slerp(ptr noundef nonnull %1, ptr noundef nonnull %2, float noundef 5.000000e-01, ptr noundef nonnull %3)
  call void @glm_quat_axis(ptr noundef nonnull %3, ptr noundef nonnull %6)
  call void @glm_vec3_normalize(ptr noundef nonnull %5)
  call void @glm_vec3_normalize(ptr noundef nonnull %6)
  %26 = call float @glm_quat_angle(ptr noundef nonnull %3)
  %27 = call float @glm_rad(float noundef 3.000000e+01)
  %28 = fcmp ogt float %26, %27
  br i1 %28, label %32, label %29

29:                                               ; preds = %23
  %30 = load ptr, ptr @stderr, align 8, !tbaa !9
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str, ptr noundef nonnull @.str.787, i32 noundef 821, ptr noundef nonnull @.str.866) #7
  br label %47

32:                                               ; preds = %23
  %33 = call float @glm_quat_angle(ptr noundef nonnull %3)
  %34 = call float @glm_rad(float noundef 9.000000e+01)
  %35 = fcmp olt float %33, %34
  br i1 %35, label %39, label %36

36:                                               ; preds = %32
  %37 = load ptr, ptr @stderr, align 8, !tbaa !9
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str, ptr noundef nonnull @.str.787, i32 noundef 822, ptr noundef nonnull @.str.867) #7
  br label %47

39:                                               ; preds = %32
  %40 = call { ptr, i32 } @test_assert_vec3_eq(ptr noundef nonnull %5, ptr noundef nonnull %6) #6
  %41 = extractvalue { ptr, i32 } %40, 1
  %.not21 = icmp eq i32 %41, 1
  br i1 %.not21, label %46, label %42

42:                                               ; preds = %39
  %43 = extractvalue { ptr, i32 } %40, 0
  %44 = load ptr, ptr @stderr, align 8, !tbaa !9
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.787, i32 noundef 823, ptr noundef nonnull @.str.140) #7
  br label %46

46:                                               ; preds = %39, %42
  %spec.select = phi ptr [ %43, %42 ], [ null, %39 ]
  %spec.select22 = zext i1 %.not21 to i32
  br label %47

47:                                               ; preds = %19, %46, %11, %36, %29
  %.sroa.019.3 = phi ptr [ null, %36 ], [ null, %29 ], [ %20, %19 ], [ %12, %11 ], [ %spec.select, %46 ]
  %.sroa.7.3 = phi i32 [ 0, %36 ], [ 0, %29 ], [ 0, %19 ], [ 0, %11 ], [ %spec.select22, %46 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #6
  %.fca.0.insert = insertvalue { ptr, i32 } poison, ptr %.sroa.019.3, 0
  %.fca.1.insert = insertvalue { ptr, i32 } %.fca.0.insert, i32 %.sroa.7.3, 1
  ret { ptr, i32 } %.fca.1.insert
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_quat_slerp(ptr noundef, ptr noundef, float noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree 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 = { "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 = { alwaysinline 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { cold 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}


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