; 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.681 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.682 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.683 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.685 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.727 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.728 = external hidden unnamed_addr constant [28 x i8], align 1
@__const.test_glm_mat4_quat.axis2 = external hidden unnamed_addr constant [3 x float], align 4

; 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

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

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

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

declare { ptr, i32 } @test_assert_vec4_eq(ptr noundef, ptr noundef) #4

declare { ptr, i32 } @test_assert_mat4_eq(ptr noundef, ptr noundef) #4

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

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

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

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @test_glm_mat4_quat() #5 {
  %1 = alloca %struct.test_status_t, align 8
  %2 = alloca [4 x [4 x float]], align 16
  %3 = alloca [4 x [4 x float]], align 16
  %4 = alloca [4 x float], align 16
  %5 = alloca [4 x float], align 16
  %6 = alloca [4 x float], align 16
  %7 = alloca [3 x float], align 4
  %8 = alloca [3 x float], align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.test_status_t, align 8
  %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
  %15 = alloca %struct.test_status_t, align 8
  %16 = alloca %struct.test_status_t, align 8
  %17 = alloca %struct.test_status_t, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 64, 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 16, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 @__const.test_glm_mat4_quat.axis2, i64 12, i1 false)
  %18 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  call void @glm_quat(ptr noundef %18, float noundef 0x3FE921FB60000000, float noundef 0x3FFE666660000000, float noundef 0x4002666660000000, float noundef 4.500000e+00)
  %19 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %20 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  call void @glm_quat_mat4(ptr noundef %19, ptr noundef %20)
  %21 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  %22 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  call void @glm_mat4_quat(ptr noundef %21, ptr noundef %22)
  %23 = getelementptr inbounds [4 x [4 x float]], ptr %3, i64 0, i64 0
  %24 = getelementptr inbounds [3 x float], ptr %8, i64 0, i64 0
  call void @glm_rotate_make(ptr noundef %23, float noundef 0x3FE921FB60000000, ptr noundef %24)
  %25 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  %26 = getelementptr inbounds [4 x float], ptr %6, i64 0, i64 0
  call void @glm_mat4_quat(ptr noundef %25, ptr noundef %26)
  %27 = getelementptr inbounds [4 x float], ptr %6, i64 0, i64 0
  %28 = getelementptr inbounds [3 x float], ptr %7, i64 0, i64 0
  call void @glm_quat_axis(ptr noundef %27, ptr noundef %28)
  %29 = getelementptr inbounds [3 x float], ptr %7, i64 0, i64 0
  call void @glm_vec3_normalize(ptr noundef %29)
  %30 = getelementptr inbounds [3 x float], ptr %8, i64 0, i64 0
  call void @glm_vec3_normalize(ptr noundef %30)
  br label %31

31:                                               ; preds = %0
  %32 = getelementptr inbounds [4 x float], ptr %6, i64 0, i64 0
  %33 = call float @glm_quat_angle(ptr noundef %32)
  %34 = call zeroext i1 @test_eq(float noundef %33, float noundef 0x3FE921FB60000000)
  br i1 %34, label %40, label %35

35:                                               ; preds = %31
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef @.str, ptr noundef @.str.727, i32 noundef 260, ptr noundef @.str.681) #6
  %38 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %38, align 8, !tbaa !9
  %39 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %39, align 8, !tbaa !12
  store i32 1, ptr %9, align 4
  br label %141

40:                                               ; preds = %31
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %44 = getelementptr inbounds [3 x float], ptr %7, i64 0, i64 0
  %45 = getelementptr inbounds [3 x float], ptr %8, i64 0, i64 0
  %46 = call { ptr, i32 } @test_assert_vec3_eq(ptr noundef %44, ptr noundef %45)
  %47 = getelementptr inbounds { ptr, i32 }, ptr %11, i32 0, i32 0
  %48 = extractvalue { ptr, i32 } %46, 0
  store ptr %48, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i32 }, ptr %11, i32 0, i32 1
  %50 = extractvalue { ptr, i32 } %46, 1
  store i32 %50, ptr %49, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  %51 = getelementptr inbounds %struct.test_status_t, ptr %10, i32 0, i32 1
  %52 = load i32, ptr %51, align 8, !tbaa !12
  %53 = icmp ne i32 %52, 1
  br i1 %53, label %54, label %61

54:                                               ; preds = %43
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str.13, ptr noundef @.str.727, i32 noundef 261, ptr noundef @.str.682) #6
  %57 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %58 = getelementptr inbounds %struct.test_status_t, ptr %10, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !9
  store ptr %59, ptr %57, align 8, !tbaa !9
  %60 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %60, align 8, !tbaa !12
  store i32 1, ptr %9, align 4
  br label %62

61:                                               ; preds = %43
  store i32 0, ptr %9, align 4
  br label %62

62:                                               ; preds = %61, %54
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  %63 = load i32, ptr %9, align 4
  switch i32 %63, label %141 [
    i32 0, label %64
  ]

64:                                               ; preds = %62
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %68 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %69 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  %70 = call { ptr, i32 } @test_assert_vec4_eq(ptr noundef %68, ptr noundef %69)
  %71 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %72 = extractvalue { ptr, i32 } %70, 0
  store ptr %72, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %74 = extractvalue { ptr, i32 } %70, 1
  store i32 %74, ptr %73, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %13, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  %75 = getelementptr inbounds %struct.test_status_t, ptr %12, i32 0, i32 1
  %76 = load i32, ptr %75, align 8, !tbaa !12
  %77 = icmp ne i32 %76, 1
  br i1 %77, label %78, label %85

78:                                               ; preds = %67
  %79 = load ptr, ptr @stderr, align 8, !tbaa !5
  %80 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef @.str.13, ptr noundef @.str.727, i32 noundef 262, ptr noundef @.str.683) #6
  %81 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %82 = getelementptr inbounds %struct.test_status_t, ptr %12, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  store ptr %83, ptr %81, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %84, align 8, !tbaa !12
  store i32 1, ptr %9, align 4
  br label %86

85:                                               ; preds = %67
  store i32 0, ptr %9, align 4
  br label %86

86:                                               ; preds = %85, %78
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  %87 = load i32, ptr %9, align 4
  switch i32 %87, label %141 [
    i32 0, label %88
  ]

88:                                               ; preds = %86
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %92 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  %93 = getelementptr inbounds [4 x [4 x float]], ptr %3, i64 0, i64 0
  %94 = call { ptr, i32 } @test_assert_mat4_eq(ptr noundef %92, ptr noundef %93)
  %95 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %96 = extractvalue { ptr, i32 } %94, 0
  store ptr %96, ptr %95, align 8
  %97 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %98 = extractvalue { ptr, i32 } %94, 1
  store i32 %98, ptr %97, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %15, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  %99 = getelementptr inbounds %struct.test_status_t, ptr %14, i32 0, i32 1
  %100 = load i32, ptr %99, align 8, !tbaa !12
  %101 = icmp ne i32 %100, 1
  br i1 %101, label %102, label %109

102:                                              ; preds = %91
  %103 = load ptr, ptr @stderr, align 8, !tbaa !5
  %104 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.13, ptr noundef @.str.727, i32 noundef 263, ptr noundef @.str.728) #6
  %105 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %106 = getelementptr inbounds %struct.test_status_t, ptr %14, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !9
  store ptr %107, ptr %105, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %108, align 8, !tbaa !12
  store i32 1, ptr %9, align 4
  br label %110

109:                                              ; preds = %91
  store i32 0, ptr %9, align 4
  br label %110

110:                                              ; preds = %109, %102
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  %111 = load i32, ptr %9, align 4
  switch i32 %111, label %141 [
    i32 0, label %112
  ]

112:                                              ; preds = %110
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  br label %115

115:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %116 = getelementptr inbounds [4 x float], ptr %4, i64 0, i64 0
  %117 = getelementptr inbounds [4 x float], ptr %6, i64 0, i64 0
  %118 = call { ptr, i32 } @test_assert_vec4_eq(ptr noundef %116, ptr noundef %117)
  %119 = getelementptr inbounds { ptr, i32 }, ptr %17, i32 0, i32 0
  %120 = extractvalue { ptr, i32 } %118, 0
  store ptr %120, ptr %119, align 8
  %121 = getelementptr inbounds { ptr, i32 }, ptr %17, i32 0, i32 1
  %122 = extractvalue { ptr, i32 } %118, 1
  store i32 %122, ptr %121, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %17, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #6
  %123 = getelementptr inbounds %struct.test_status_t, ptr %16, i32 0, i32 1
  %124 = load i32, ptr %123, align 8, !tbaa !12
  %125 = icmp ne i32 %124, 1
  br i1 %125, label %126, label %133

126:                                              ; preds = %115
  %127 = load ptr, ptr @stderr, align 8, !tbaa !5
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.13, ptr noundef @.str.727, i32 noundef 264, ptr noundef @.str.685) #6
  %129 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %130 = getelementptr inbounds %struct.test_status_t, ptr %16, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !9
  store ptr %131, ptr %129, align 8, !tbaa !9
  %132 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %132, align 8, !tbaa !12
  store i32 1, ptr %9, align 4
  br label %134

133:                                              ; preds = %115
  store i32 0, ptr %9, align 4
  br label %134

134:                                              ; preds = %133, %126
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  %135 = load i32, ptr %9, align 4
  switch i32 %135, label %141 [
    i32 0, label %136
  ]

136:                                              ; preds = %134
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137
  %139 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %139, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 1, ptr %140, align 8, !tbaa !12
  store i32 1, ptr %9, align 4
  br label %141

141:                                              ; preds = %138, %134, %110, %86, %62, %35
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 16, 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 64, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %2) #6
  %142 = load { ptr, i32 }, ptr %1, align 8
  ret { ptr, i32 } %142
}

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_mat4_quat(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 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"test_status_t", !6, i64 0, !11, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{i64 0, i64 8, !5, i64 8, i64 4, !14}
!14 = !{!11, !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.681 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.682 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.683 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.685 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.727 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.728 = external hidden unnamed_addr constant [28 x i8], align 1
@__const.test_glm_mat4_quat.axis2 = external hidden unnamed_addr constant [3 x float], align 4

; 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

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

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

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

declare { ptr, i32 } @test_assert_vec4_eq(ptr noundef, ptr noundef) local_unnamed_addr #4

declare { ptr, i32 } @test_assert_mat4_eq(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

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

; Function Attrs: nounwind uwtable
define dso_local { ptr, i32 } @test_glm_mat4_quat() local_unnamed_addr #5 {
  %1 = alloca [4 x [4 x float]], align 16
  %2 = alloca [4 x [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
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 64, 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 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) @__const.test_glm_mat4_quat.axis2, i64 12, i1 false)
  call void @glm_quat(ptr noundef nonnull %3, float noundef 0x3FE921FB60000000, float noundef 0x3FFE666660000000, float noundef 0x4002666660000000, float noundef 4.500000e+00)
  call void @glm_quat_mat4(ptr noundef nonnull %3, ptr noundef nonnull %1)
  call void @glm_mat4_quat(ptr noundef nonnull %1, ptr noundef nonnull %4)
  call void @glm_rotate_make(ptr noundef nonnull %2, float noundef 0x3FE921FB60000000, ptr noundef nonnull %7)
  call void @glm_mat4_quat(ptr noundef nonnull %1, ptr noundef nonnull %5)
  call void @glm_quat_axis(ptr noundef nonnull %5, ptr noundef nonnull %6)
  call void @glm_vec3_normalize(ptr noundef nonnull %6)
  call void @glm_vec3_normalize(ptr noundef nonnull %7)
  %8 = call float @glm_quat_angle(ptr noundef nonnull %5)
  %9 = call zeroext i1 @test_eq(float noundef %8, float noundef 0x3FE921FB60000000)
  br i1 %9, label %13, label %10

10:                                               ; preds = %0
  %11 = load ptr, ptr @stderr, align 8, !tbaa !5
  %12 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %11, ptr noundef nonnull @.str, ptr noundef nonnull @.str.727, i32 noundef 260, ptr noundef nonnull @.str.681) #7
  br label %41

13:                                               ; preds = %0
  %14 = call { ptr, i32 } @test_assert_vec3_eq(ptr noundef nonnull %6, ptr noundef nonnull %7) #6
  %15 = extractvalue { ptr, i32 } %14, 1
  %.not = icmp eq i32 %15, 1
  br i1 %.not, label %.critedge, label %16

16:                                               ; preds = %13
  %17 = extractvalue { ptr, i32 } %14, 0
  %18 = load ptr, ptr @stderr, align 8, !tbaa !5
  %19 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.727, i32 noundef 261, ptr noundef nonnull @.str.682) #7
  br label %41

.critedge:                                        ; preds = %13
  %20 = call { ptr, i32 } @test_assert_vec4_eq(ptr noundef nonnull %3, ptr noundef nonnull %4) #6
  %21 = extractvalue { ptr, i32 } %20, 1
  %.not28 = icmp eq i32 %21, 1
  br i1 %.not28, label %26, label %22

22:                                               ; preds = %.critedge
  %23 = extractvalue { ptr, i32 } %20, 0
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.727, i32 noundef 262, ptr noundef nonnull @.str.683) #7
  br label %41

26:                                               ; preds = %.critedge
  %27 = call { ptr, i32 } @test_assert_mat4_eq(ptr noundef nonnull %1, ptr noundef nonnull %2) #6
  %28 = extractvalue { ptr, i32 } %27, 1
  %.not29 = icmp eq i32 %28, 1
  br i1 %.not29, label %33, label %29

29:                                               ; preds = %26
  %30 = extractvalue { ptr, i32 } %27, 0
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.727, i32 noundef 263, ptr noundef nonnull @.str.728) #7
  br label %41

33:                                               ; preds = %26
  %34 = call { ptr, i32 } @test_assert_vec4_eq(ptr noundef nonnull %3, ptr noundef nonnull %5) #6
  %35 = extractvalue { ptr, i32 } %34, 1
  %.not30 = icmp eq i32 %35, 1
  br i1 %.not30, label %40, label %36

36:                                               ; preds = %33
  %37 = extractvalue { ptr, i32 } %34, 0
  %38 = load ptr, ptr @stderr, align 8, !tbaa !5
  %39 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %38, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.727, i32 noundef 264, ptr noundef nonnull @.str.685) #7
  br label %40

40:                                               ; preds = %33, %36
  %spec.select = phi ptr [ %37, %36 ], [ null, %33 ]
  %spec.select31 = zext i1 %.not30 to i32
  br label %41

41:                                               ; preds = %29, %22, %40, %16, %10
  %.sroa.027.4 = phi ptr [ %30, %29 ], [ %23, %22 ], [ %17, %16 ], [ null, %10 ], [ %spec.select, %40 ]
  %.sroa.7.4 = phi i32 [ 0, %29 ], [ 0, %22 ], [ 0, %16 ], [ 0, %10 ], [ %spec.select31, %40 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, 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 64, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %1) #6
  %.fca.0.insert = insertvalue { ptr, i32 } poison, ptr %.sroa.027.4, 0
  %.fca.1.insert = insertvalue { ptr, i32 } %.fca.0.insert, i32 %.sroa.7.4, 1
  ret { ptr, i32 } %.fca.1.insert
}

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_mat4_quat(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 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


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