; 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.787 = external hidden unnamed_addr constant [64 x i8], align 1
@__const.test_glm_quat_mul.q1 = external hidden unnamed_addr constant [4 x float], align 16
@__const.test_glm_quat_mul.q2 = external hidden unnamed_addr constant [4 x float], align 16
@__const.test_glm_quat_mul.v1 = external hidden unnamed_addr constant [3 x float], align 4
@.str.858 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.859 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.860 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.861 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.862 = 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: alwaysinline nounwind uwtable
declare hidden zeroext i1 @test_eq(float noundef, float noundef) #2

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @test_glm_quat_mul() #6 {
  %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 i32, align 4
  %8 = alloca %struct.test_status_t, align 8
  %9 = alloca %struct.test_status_t, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %2) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %2, ptr align 16 @__const.test_glm_quat_mul.q1, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %3, ptr align 16 @__const.test_glm_quat_mul.q2, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 @__const.test_glm_quat_mul.v1, i64 12, i1 false)
  %10 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %11 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %12 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  call void @glm_quat_mul(ptr noundef %10, ptr noundef %11, ptr noundef %12)
  br label %13

13:                                               ; preds = %0
  %14 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %15 = load float, ptr %14, align 16, !tbaa !5
  %16 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 3
  %17 = load float, ptr %16, align 4, !tbaa !5
  %18 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %19 = load float, ptr %18, align 16, !tbaa !5
  %20 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %21 = load float, ptr %20, align 16, !tbaa !5
  %22 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 3
  %23 = load float, ptr %22, align 4, !tbaa !5
  %24 = fmul float %21, %23
  %25 = call float @llvm.fmuladd.f32(float %17, float %19, float %24)
  %26 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 1
  %27 = load float, ptr %26, align 4, !tbaa !5
  %28 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 2
  %29 = load float, ptr %28, align 8, !tbaa !5
  %30 = call float @llvm.fmuladd.f32(float %27, float %29, float %25)
  %31 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 2
  %32 = load float, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 1
  %34 = load float, ptr %33, align 4, !tbaa !5
  %35 = fneg float %32
  %36 = call float @llvm.fmuladd.f32(float %35, float %34, float %30)
  %37 = call zeroext i1 @test_eq(float noundef %15, float noundef %36)
  br i1 %37, label %43, label %38

38:                                               ; preds = %13
  %39 = load ptr, ptr @stderr, align 8, !tbaa !9
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef @.str, ptr noundef @.str.787, i32 noundef 489, ptr noundef @.str.858) #7
  %41 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %41, align 8, !tbaa !11
  %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 %7, align 4
  br label %185

43:                                               ; preds = %13
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 1
  %48 = load float, ptr %47, align 4, !tbaa !5
  %49 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 3
  %50 = load float, ptr %49, align 4, !tbaa !5
  %51 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 1
  %52 = load float, ptr %51, align 4, !tbaa !5
  %53 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %54 = load float, ptr %53, align 16, !tbaa !5
  %55 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 2
  %56 = load float, ptr %55, align 8, !tbaa !5
  %57 = fmul float %54, %56
  %58 = fneg float %57
  %59 = call float @llvm.fmuladd.f32(float %50, float %52, float %58)
  %60 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 1
  %61 = load float, ptr %60, align 4, !tbaa !5
  %62 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 3
  %63 = load float, ptr %62, align 4, !tbaa !5
  %64 = call float @llvm.fmuladd.f32(float %61, float %63, float %59)
  %65 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 2
  %66 = load float, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %68 = load float, ptr %67, align 16, !tbaa !5
  %69 = call float @llvm.fmuladd.f32(float %66, float %68, float %64)
  %70 = call zeroext i1 @test_eq(float noundef %48, float noundef %69)
  br i1 %70, label %76, label %71

71:                                               ; preds = %46
  %72 = load ptr, ptr @stderr, align 8, !tbaa !9
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str, ptr noundef @.str.787, i32 noundef 490, ptr noundef @.str.859) #7
  %74 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %74, align 8, !tbaa !11
  %75 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %75, align 8, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %185

76:                                               ; preds = %46
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  %80 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 2
  %81 = load float, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 3
  %83 = load float, ptr %82, align 4, !tbaa !5
  %84 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 2
  %85 = load float, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %87 = load float, ptr %86, align 16, !tbaa !5
  %88 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 1
  %89 = load float, ptr %88, align 4, !tbaa !5
  %90 = fmul float %87, %89
  %91 = call float @llvm.fmuladd.f32(float %83, float %85, float %90)
  %92 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 1
  %93 = load float, ptr %92, align 4, !tbaa !5
  %94 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %95 = load float, ptr %94, align 16, !tbaa !5
  %96 = fneg float %93
  %97 = call float @llvm.fmuladd.f32(float %96, float %95, float %91)
  %98 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 2
  %99 = load float, ptr %98, align 8, !tbaa !5
  %100 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 3
  %101 = load float, ptr %100, align 4, !tbaa !5
  %102 = call float @llvm.fmuladd.f32(float %99, float %101, float %97)
  %103 = call zeroext i1 @test_eq(float noundef %81, float noundef %102)
  br i1 %103, label %109, label %104

104:                                              ; preds = %79
  %105 = load ptr, ptr @stderr, align 8, !tbaa !9
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str, ptr noundef @.str.787, i32 noundef 491, ptr noundef @.str.860) #7
  %107 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %107, align 8, !tbaa !11
  %108 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %108, align 8, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %185

109:                                              ; preds = %79
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  %113 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 3
  %114 = load float, ptr %113, align 4, !tbaa !5
  %115 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 3
  %116 = load float, ptr %115, align 4, !tbaa !5
  %117 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 3
  %118 = load float, ptr %117, align 4, !tbaa !5
  %119 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %120 = load float, ptr %119, align 16, !tbaa !5
  %121 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %122 = load float, ptr %121, align 16, !tbaa !5
  %123 = fmul float %120, %122
  %124 = fneg float %123
  %125 = call float @llvm.fmuladd.f32(float %116, float %118, float %124)
  %126 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 1
  %127 = load float, ptr %126, align 4, !tbaa !5
  %128 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 1
  %129 = load float, ptr %128, align 4, !tbaa !5
  %130 = fneg float %127
  %131 = call float @llvm.fmuladd.f32(float %130, float %129, float %125)
  %132 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 2
  %133 = load float, ptr %132, align 8, !tbaa !5
  %134 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 2
  %135 = load float, ptr %134, align 8, !tbaa !5
  %136 = fneg float %133
  %137 = call float @llvm.fmuladd.f32(float %136, float %135, float %131)
  %138 = call zeroext i1 @test_eq(float noundef %114, float noundef %137)
  br i1 %138, label %144, label %139

139:                                              ; preds = %112
  %140 = load ptr, ptr @stderr, align 8, !tbaa !9
  %141 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef @.str, ptr noundef @.str.787, i32 noundef 492, ptr noundef @.str.861) #7
  %142 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %142, align 8, !tbaa !11
  %143 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %143, align 8, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %185

144:                                              ; preds = %112
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  %147 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %148 = call float @glm_rad(float noundef 3.000000e+01)
  %149 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %147, float noundef %148, ptr noundef %149)
  %150 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %151 = call float @glm_rad(float noundef 2.000000e+01)
  %152 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %150, float noundef %151, ptr noundef %152)
  %153 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %154 = call float @glm_rad(float noundef 5.000000e+01)
  %155 = getelementptr inbounds [3 x float], ptr %6, i64 0, i64 0
  call void @glm_quatv(ptr noundef %153, float noundef %154, ptr noundef %155)
  %156 = getelementptr inbounds [4 x float], ptr %2, i64 0, i64 0
  %157 = getelementptr inbounds [4 x float], ptr %3, i64 0, i64 0
  %158 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  call void @glm_quat_mul(ptr noundef %156, ptr noundef %157, ptr noundef %158)
  br label %159

159:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %160 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %161 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  %162 = call { ptr, i32 } @test_assert_quat_eq(ptr noundef %160, ptr noundef %161)
  %163 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %164 = extractvalue { ptr, i32 } %162, 0
  store ptr %164, ptr %163, align 8
  %165 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %166 = extractvalue { ptr, i32 } %162, 1
  store i32 %166, ptr %165, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %9, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  %167 = getelementptr inbounds %struct.test_status_t, ptr %8, i32 0, i32 1
  %168 = load i32, ptr %167, align 8, !tbaa !14
  %169 = icmp ne i32 %168, 1
  br i1 %169, label %170, label %177

170:                                              ; preds = %159
  %171 = load ptr, ptr @stderr, align 8, !tbaa !9
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 500, ptr noundef @.str.862) #7
  %173 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %174 = getelementptr inbounds %struct.test_status_t, ptr %8, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !11
  store ptr %175, ptr %173, align 8, !tbaa !11
  %176 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %176, align 8, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %178

177:                                              ; preds = %159
  store i32 0, ptr %7, align 4
  br label %178

178:                                              ; preds = %177, %170
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  %179 = load i32, ptr %7, align 4
  switch i32 %179, label %185 [
    i32 0, label %180
  ]

180:                                              ; preds = %178
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  %183 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %183, align 8, !tbaa !11
  %184 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 1, ptr %184, align 8, !tbaa !14
  store i32 1, ptr %7, align 4
  br label %185

185:                                              ; preds = %182, %178, %139, %104, %71, %38
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %2) #7
  %186 = load { ptr, i32 }, ptr %1, align 8
  ret { ptr, i32 } %186
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { "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 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 #7 = { 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}
!11 = !{!12, !10, i64 0}
!12 = !{!"test_status_t", !10, i64 0, !13, i64 8}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{i64 0, i64 8, !9, i64 8, i64 4, !16}
!16 = !{!13, !13, 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.787 = external hidden unnamed_addr constant [64 x i8], align 1
@__const.test_glm_quat_mul.q1 = external hidden unnamed_addr constant [4 x float], align 16
@__const.test_glm_quat_mul.q2 = external hidden unnamed_addr constant [4 x float], align 16
@__const.test_glm_quat_mul.v1 = external hidden unnamed_addr constant [3 x float], align 4
@.str.858 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.859 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.860 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.861 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.862 = 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: alwaysinline nounwind uwtable
declare hidden zeroext i1 @test_eq(float noundef, float noundef) local_unnamed_addr #2

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

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

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

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

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

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @test_glm_quat_mul() local_unnamed_addr #6 {
  %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
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %1, ptr noundef nonnull align 16 dereferenceable(16) @__const.test_glm_quat_mul.q1, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %2, ptr noundef nonnull align 16 dereferenceable(16) @__const.test_glm_quat_mul.q2, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #7
  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_mul.v1, i64 12, i1 false)
  call void @glm_quat_mul(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %6 = load float, ptr %3, align 16, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 12
  %8 = load float, ptr %7, align 4, !tbaa !5
  %9 = load float, ptr %2, align 16, !tbaa !5
  %10 = load float, ptr %1, align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %2, i64 12
  %12 = load float, ptr %11, align 4, !tbaa !5
  %13 = fmul float %10, %12
  %14 = call float @llvm.fmuladd.f32(float %8, float %9, float %13)
  %15 = getelementptr inbounds i8, ptr %1, i64 4
  %16 = load float, ptr %15, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %2, i64 8
  %18 = load float, ptr %17, align 8, !tbaa !5
  %19 = call float @llvm.fmuladd.f32(float %16, float %18, float %14)
  %20 = getelementptr inbounds i8, ptr %1, i64 8
  %21 = load float, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %2, i64 4
  %23 = load float, ptr %22, align 4, !tbaa !5
  %24 = fneg float %21
  %25 = call float @llvm.fmuladd.f32(float %24, float %23, float %19)
  %26 = call zeroext i1 @test_eq(float noundef %6, float noundef %25)
  br i1 %26, label %30, label %27

27:                                               ; preds = %0
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str, ptr noundef nonnull @.str.787, i32 noundef 489, ptr noundef nonnull @.str.858) #8
  br label %103

30:                                               ; preds = %0
  %31 = getelementptr inbounds i8, ptr %3, i64 4
  %32 = load float, ptr %31, align 4, !tbaa !5
  %33 = load float, ptr %7, align 4, !tbaa !5
  %34 = load float, ptr %22, align 4, !tbaa !5
  %35 = load float, ptr %1, align 16, !tbaa !5
  %36 = load float, ptr %17, align 8, !tbaa !5
  %37 = fneg float %35
  %38 = fmul float %36, %37
  %39 = call float @llvm.fmuladd.f32(float %33, float %34, float %38)
  %40 = load float, ptr %15, align 4, !tbaa !5
  %41 = load float, ptr %11, align 4, !tbaa !5
  %42 = call float @llvm.fmuladd.f32(float %40, float %41, float %39)
  %43 = load float, ptr %20, align 8, !tbaa !5
  %44 = load float, ptr %2, align 16, !tbaa !5
  %45 = call float @llvm.fmuladd.f32(float %43, float %44, float %42)
  %46 = call zeroext i1 @test_eq(float noundef %32, float noundef %45)
  br i1 %46, label %50, label %47

47:                                               ; preds = %30
  %48 = load ptr, ptr @stderr, align 8, !tbaa !9
  %49 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str, ptr noundef nonnull @.str.787, i32 noundef 490, ptr noundef nonnull @.str.859) #8
  br label %103

50:                                               ; preds = %30
  %51 = getelementptr inbounds i8, ptr %3, i64 8
  %52 = load float, ptr %51, align 8, !tbaa !5
  %53 = load float, ptr %7, align 4, !tbaa !5
  %54 = load float, ptr %17, align 8, !tbaa !5
  %55 = load float, ptr %1, align 16, !tbaa !5
  %56 = load float, ptr %22, align 4, !tbaa !5
  %57 = fmul float %55, %56
  %58 = call float @llvm.fmuladd.f32(float %53, float %54, float %57)
  %59 = load float, ptr %15, align 4, !tbaa !5
  %60 = load float, ptr %2, align 16, !tbaa !5
  %61 = fneg float %59
  %62 = call float @llvm.fmuladd.f32(float %61, float %60, float %58)
  %63 = load float, ptr %20, align 8, !tbaa !5
  %64 = load float, ptr %11, align 4, !tbaa !5
  %65 = call float @llvm.fmuladd.f32(float %63, float %64, float %62)
  %66 = call zeroext i1 @test_eq(float noundef %52, float noundef %65)
  br i1 %66, label %70, label %67

67:                                               ; preds = %50
  %68 = load ptr, ptr @stderr, align 8, !tbaa !9
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef nonnull @.str, ptr noundef nonnull @.str.787, i32 noundef 491, ptr noundef nonnull @.str.860) #8
  br label %103

70:                                               ; preds = %50
  %71 = getelementptr inbounds i8, ptr %3, i64 12
  %72 = load float, ptr %71, align 4, !tbaa !5
  %73 = load float, ptr %7, align 4, !tbaa !5
  %74 = load float, ptr %11, align 4, !tbaa !5
  %75 = load float, ptr %1, align 16, !tbaa !5
  %76 = load float, ptr %2, align 16, !tbaa !5
  %77 = fneg float %75
  %78 = fmul float %76, %77
  %79 = call float @llvm.fmuladd.f32(float %73, float %74, float %78)
  %80 = load float, ptr %15, align 4, !tbaa !5
  %81 = load float, ptr %22, align 4, !tbaa !5
  %82 = fneg float %80
  %83 = call float @llvm.fmuladd.f32(float %82, float %81, float %79)
  %84 = load float, ptr %20, align 8, !tbaa !5
  %85 = load float, ptr %17, align 8, !tbaa !5
  %86 = fneg float %84
  %87 = call float @llvm.fmuladd.f32(float %86, float %85, float %83)
  %88 = call zeroext i1 @test_eq(float noundef %72, float noundef %87)
  br i1 %88, label %92, label %89

89:                                               ; preds = %70
  %90 = load ptr, ptr @stderr, align 8, !tbaa !9
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %90, ptr noundef nonnull @.str, ptr noundef nonnull @.str.787, i32 noundef 492, ptr noundef nonnull @.str.861) #8
  br label %103

92:                                               ; preds = %70
  %93 = call float @glm_rad(float noundef 3.000000e+01)
  call void @glm_quatv(ptr noundef nonnull %1, float noundef %93, ptr noundef nonnull %5)
  %94 = call float @glm_rad(float noundef 2.000000e+01)
  call void @glm_quatv(ptr noundef nonnull %2, float noundef %94, ptr noundef nonnull %5)
  %95 = call float @glm_rad(float noundef 5.000000e+01)
  call void @glm_quatv(ptr noundef nonnull %3, float noundef %95, ptr noundef nonnull %5)
  call void @glm_quat_mul(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %4)
  %96 = call { ptr, i32 } @test_assert_quat_eq(ptr noundef nonnull %3, ptr noundef nonnull %4) #7
  %97 = extractvalue { ptr, i32 } %96, 1
  %.not = icmp eq i32 %97, 1
  br i1 %.not, label %102, label %98

98:                                               ; preds = %92
  %99 = extractvalue { ptr, i32 } %96, 0
  %100 = load ptr, ptr @stderr, align 8, !tbaa !9
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.787, i32 noundef 500, ptr noundef nonnull @.str.862) #8
  br label %102

102:                                              ; preds = %92, %98
  %spec.select = phi ptr [ null, %92 ], [ %99, %98 ]
  %spec.select4 = zext i1 %.not to i32
  br label %103

103:                                              ; preds = %102, %89, %67, %47, %27
  %.sroa.03.1 = phi ptr [ null, %89 ], [ null, %67 ], [ null, %47 ], [ null, %27 ], [ %spec.select, %102 ]
  %.sroa.7.1 = phi i32 [ 0, %89 ], [ 0, %67 ], [ 0, %47 ], [ 0, %27 ], [ %spec.select4, %102 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %1) #7
  %.fca.0.insert = insertvalue { ptr, i32 } poison, ptr %.sroa.03.1, 0
  %.fca.1.insert = insertvalue { ptr, i32 } %.fca.0.insert, i32 %.sroa.7.1, 1
  ret { ptr, i32 } %.fca.1.insert
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { "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 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 #7 = { nounwind }
attributes #8 = { 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,ReassociatePass,SROAPass,SimplifyCFGPass