; 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.728 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.787 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.863 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.864 = external hidden unnamed_addr constant [40 x i8], align 1
@__const.test_glm_quat_mat3.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_mat3(ptr noundef, ptr 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: alwaysinline nounwind uwtable
declare hidden void @glm_mat4_identity(ptr noundef) #2

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

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

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

declare void @test_rand_quat(ptr noundef) #4

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

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

40:                                               ; preds = %0
  %41 = getelementptr inbounds [4 x float], ptr %7, i64 0, i64 0
  %42 = call float @glm_quat_angle(ptr noundef %41)
  %43 = call zeroext i1 @test_eq(float noundef %42, float noundef 0x3FE921FB60000000)
  br i1 %43, label %49, label %44

44:                                               ; preds = %40
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str, ptr noundef @.str.787, i32 noundef 623, ptr noundef @.str.681) #6
  %47 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %47, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %48, align 8, !tbaa !12
  store i32 1, ptr %11, align 4
  br label %219

49:                                               ; preds = %40
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %53 = getelementptr inbounds [3 x float], ptr %8, i64 0, i64 0
  %54 = getelementptr inbounds [3 x float], ptr %9, i64 0, i64 0
  %55 = call { ptr, i32 } @test_assert_vec3_eq(ptr noundef %53, ptr noundef %54)
  %56 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %57 = extractvalue { ptr, i32 } %55, 0
  store ptr %57, ptr %56, align 8
  %58 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %59 = extractvalue { ptr, i32 } %55, 1
  store i32 %59, ptr %58, 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
  %60 = getelementptr inbounds %struct.test_status_t, ptr %12, i32 0, i32 1
  %61 = load i32, ptr %60, align 8, !tbaa !12
  %62 = icmp ne i32 %61, 1
  br i1 %62, label %63, label %70

63:                                               ; preds = %52
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 624, ptr noundef @.str.682) #6
  %66 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %67 = getelementptr inbounds %struct.test_status_t, ptr %12, i32 0, i32 0
  %68 = load ptr, ptr %67, align 8, !tbaa !9
  store ptr %68, ptr %66, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %69, align 8, !tbaa !12
  store i32 1, ptr %11, align 4
  br label %71

70:                                               ; preds = %52
  store i32 0, ptr %11, align 4
  br label %71

71:                                               ; preds = %70, %63
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  %72 = load i32, ptr %11, align 4
  switch i32 %72, label %219 [
    i32 0, label %73
  ]

73:                                               ; preds = %71
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %77 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  %78 = getelementptr inbounds [4 x float], ptr %6, i64 0, i64 0
  %79 = call { ptr, i32 } @test_assert_vec4_eq(ptr noundef %77, ptr noundef %78)
  %80 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %81 = extractvalue { ptr, i32 } %79, 0
  store ptr %81, ptr %80, align 8
  %82 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %83 = extractvalue { ptr, i32 } %79, 1
  store i32 %83, ptr %82, 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
  %84 = getelementptr inbounds %struct.test_status_t, ptr %14, i32 0, i32 1
  %85 = load i32, ptr %84, align 8, !tbaa !12
  %86 = icmp ne i32 %85, 1
  br i1 %86, label %87, label %94

87:                                               ; preds = %76
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 625, ptr noundef @.str.683) #6
  %90 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %91 = getelementptr inbounds %struct.test_status_t, ptr %14, i32 0, i32 0
  %92 = load ptr, ptr %91, align 8, !tbaa !9
  store ptr %92, ptr %90, align 8, !tbaa !9
  %93 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %93, align 8, !tbaa !12
  store i32 1, ptr %11, align 4
  br label %95

94:                                               ; preds = %76
  store i32 0, ptr %11, align 4
  br label %95

95:                                               ; preds = %94, %87
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  %96 = load i32, ptr %11, align 4
  switch i32 %96, label %219 [
    i32 0, label %97
  ]

97:                                               ; preds = %95
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #6
  %101 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  %102 = getelementptr inbounds [4 x [4 x float]], ptr %3, i64 0, i64 0
  %103 = call { ptr, i32 } @test_assert_mat4_eq(ptr noundef %101, ptr noundef %102)
  %104 = getelementptr inbounds { ptr, i32 }, ptr %17, i32 0, i32 0
  %105 = extractvalue { ptr, i32 } %103, 0
  store ptr %105, ptr %104, align 8
  %106 = getelementptr inbounds { ptr, i32 }, ptr %17, i32 0, i32 1
  %107 = extractvalue { ptr, i32 } %103, 1
  store i32 %107, ptr %106, 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
  %108 = getelementptr inbounds %struct.test_status_t, ptr %16, i32 0, i32 1
  %109 = load i32, ptr %108, align 8, !tbaa !12
  %110 = icmp ne i32 %109, 1
  br i1 %110, label %111, label %118

111:                                              ; preds = %100
  %112 = load ptr, ptr @stderr, align 8, !tbaa !5
  %113 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 626, ptr noundef @.str.728) #6
  %114 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %115 = getelementptr inbounds %struct.test_status_t, ptr %16, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !9
  store ptr %116, ptr %114, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %117, align 8, !tbaa !12
  store i32 1, ptr %11, align 4
  br label %119

118:                                              ; preds = %100
  store i32 0, ptr %11, align 4
  br label %119

119:                                              ; preds = %118, %111
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  %120 = load i32, ptr %11, align 4
  switch i32 %120, label %219 [
    i32 0, label %121
  ]

121:                                              ; preds = %119
  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 %18) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %125 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  %126 = getelementptr inbounds [4 x float], ptr %7, i64 0, i64 0
  %127 = call { ptr, i32 } @test_assert_vec4_eq(ptr noundef %125, ptr noundef %126)
  %128 = getelementptr inbounds { ptr, i32 }, ptr %19, i32 0, i32 0
  %129 = extractvalue { ptr, i32 } %127, 0
  store ptr %129, ptr %128, align 8
  %130 = getelementptr inbounds { ptr, i32 }, ptr %19, 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 %18, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  %132 = getelementptr inbounds %struct.test_status_t, ptr %18, i32 0, i32 1
  %133 = load i32, ptr %132, align 8, !tbaa !12
  %134 = icmp ne i32 %133, 1
  br i1 %134, label %135, label %142

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

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

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

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145
  br label %147

147:                                              ; preds = %146
  store i32 0, ptr %10, align 4, !tbaa !14
  br label %148

148:                                              ; preds = %213, %147
  %149 = load i32, ptr %10, align 4, !tbaa !14
  %150 = icmp slt i32 %149, 1000
  br i1 %150, label %151, label %216

151:                                              ; preds = %148
  %152 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  call void @test_rand_quat(ptr noundef %152)
  %153 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  %154 = getelementptr inbounds [3 x [3 x float]], ptr %4, i64 0, i64 0
  call void @glm_quat_mat3(ptr noundef %153, ptr noundef %154)
  %155 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  call void @glm_mat4_identity(ptr noundef %155)
  %156 = getelementptr inbounds [3 x [3 x float]], ptr %4, i64 0, i64 0
  %157 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  call void @glm_mat4_ins3(ptr noundef %156, ptr noundef %157)
  %158 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  %159 = getelementptr inbounds [4 x float], ptr %6, i64 0, i64 0
  call void @glm_mat4_quat(ptr noundef %158, ptr noundef %159)
  %160 = getelementptr inbounds [4 x float], ptr %6, i64 0, i64 0
  %161 = getelementptr inbounds [3 x [3 x float]], ptr %4, i64 0, i64 0
  call void @glm_quat_mat3(ptr noundef %160, ptr noundef %161)
  %162 = getelementptr inbounds [4 x [4 x float]], ptr %3, i64 0, i64 0
  call void @glm_mat4_identity(ptr noundef %162)
  %163 = getelementptr inbounds [3 x [3 x float]], ptr %4, i64 0, i64 0
  %164 = getelementptr inbounds [4 x [4 x float]], ptr %3, i64 0, i64 0
  call void @glm_mat4_ins3(ptr noundef %163, ptr noundef %164)
  br label %165

165:                                              ; preds = %151
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #6
  %166 = getelementptr inbounds [4 x float], ptr %5, i64 0, i64 0
  %167 = getelementptr inbounds [4 x float], ptr %6, i64 0, i64 0
  %168 = call { ptr, i32 } @test_assert_quat_eq_abs(ptr noundef %166, ptr noundef %167)
  %169 = getelementptr inbounds { ptr, i32 }, ptr %21, i32 0, i32 0
  %170 = extractvalue { ptr, i32 } %168, 0
  store ptr %170, ptr %169, align 8
  %171 = getelementptr inbounds { ptr, i32 }, ptr %21, i32 0, i32 1
  %172 = extractvalue { ptr, i32 } %168, 1
  store i32 %172, ptr %171, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %21, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #6
  %173 = getelementptr inbounds %struct.test_status_t, ptr %20, i32 0, i32 1
  %174 = load i32, ptr %173, align 8, !tbaa !12
  %175 = icmp ne i32 %174, 1
  br i1 %175, label %176, label %183

176:                                              ; preds = %165
  %177 = load ptr, ptr @stderr, align 8, !tbaa !5
  %178 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %177, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 644, ptr noundef @.str.863) #6
  %179 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %180 = getelementptr inbounds %struct.test_status_t, ptr %20, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !9
  store ptr %181, ptr %179, align 8, !tbaa !9
  %182 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %182, align 8, !tbaa !12
  store i32 1, ptr %11, align 4
  br label %184

183:                                              ; preds = %165
  store i32 0, ptr %11, align 4
  br label %184

184:                                              ; preds = %183, %176
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #6
  %185 = load i32, ptr %11, align 4
  switch i32 %185, label %219 [
    i32 0, label %186
  ]

186:                                              ; preds = %184
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #6
  %190 = getelementptr inbounds [4 x [4 x float]], ptr %2, i64 0, i64 0
  %191 = getelementptr inbounds [4 x [4 x float]], ptr %3, i64 0, i64 0
  %192 = call { ptr, i32 } @test_assert_mat4_eq2(ptr noundef %190, ptr noundef %191, float noundef 0x3EE2DFD6A0000000)
  %193 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 0
  %194 = extractvalue { ptr, i32 } %192, 0
  store ptr %194, ptr %193, align 8
  %195 = getelementptr inbounds { ptr, i32 }, ptr %23, i32 0, i32 1
  %196 = extractvalue { ptr, i32 } %192, 1
  store i32 %196, ptr %195, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #6
  %197 = getelementptr inbounds %struct.test_status_t, ptr %22, i32 0, i32 1
  %198 = load i32, ptr %197, align 8, !tbaa !12
  %199 = icmp ne i32 %198, 1
  br i1 %199, label %200, label %207

200:                                              ; preds = %189
  %201 = load ptr, ptr @stderr, align 8, !tbaa !5
  %202 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str.13, ptr noundef @.str.787, i32 noundef 648, ptr noundef @.str.864) #6
  %203 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  %204 = getelementptr inbounds %struct.test_status_t, ptr %22, i32 0, i32 0
  %205 = load ptr, ptr %204, align 8, !tbaa !9
  store ptr %205, ptr %203, align 8, !tbaa !9
  %206 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 0, ptr %206, align 8, !tbaa !12
  store i32 1, ptr %11, align 4
  br label %208

207:                                              ; preds = %189
  store i32 0, ptr %11, align 4
  br label %208

208:                                              ; preds = %207, %200
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #6
  %209 = load i32, ptr %11, align 4
  switch i32 %209, label %219 [
    i32 0, label %210
  ]

210:                                              ; preds = %208
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %10, align 4, !tbaa !14
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %10, align 4, !tbaa !14
  br label %148, !llvm.loop !15

216:                                              ; preds = %148
  %217 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 0
  store ptr null, ptr %217, align 8, !tbaa !9
  %218 = getelementptr inbounds %struct.test_status_t, ptr %1, i32 0, i32 1
  store i32 1, ptr %218, align 8, !tbaa !12
  store i32 1, ptr %11, align 4
  br label %219

219:                                              ; preds = %216, %208, %184, %143, %119, %95, %71, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, 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 36, 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
  %220 = load { ptr, i32 }, ptr %1, align 8
  ret { ptr, i32 } %220
}

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}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; 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.728 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.787 = external hidden unnamed_addr constant [64 x i8], align 1
@.str.863 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.864 = external hidden unnamed_addr constant [40 x i8], align 1
@__const.test_glm_quat_mat3.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_mat3(ptr noundef, ptr 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: alwaysinline nounwind uwtable
declare hidden void @glm_mat4_identity(ptr noundef) local_unnamed_addr #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @glm_mat4_ins3(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

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

declare void @test_rand_quat(ptr noundef) local_unnamed_addr #4

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

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

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

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

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

.critedge:                                        ; preds = %14
  %21 = call { ptr, i32 } @test_assert_vec4_eq(ptr noundef nonnull %4, ptr noundef nonnull %5) #6
  %22 = extractvalue { ptr, i32 } %21, 1
  %.not47 = icmp eq i32 %22, 1
  br i1 %.not47, label %27, label %23

23:                                               ; preds = %.critedge
  %24 = extractvalue { ptr, i32 } %21, 0
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.787, i32 noundef 625, ptr noundef nonnull @.str.683) #7
  br label %.loopexit

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

30:                                               ; preds = %27
  %31 = extractvalue { ptr, i32 } %28, 0
  %32 = load ptr, ptr @stderr, align 8, !tbaa !5
  %33 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.787, i32 noundef 626, ptr noundef nonnull @.str.728) #7
  br label %.loopexit

34:                                               ; preds = %27
  %35 = call { ptr, i32 } @test_assert_vec4_eq(ptr noundef nonnull %4, ptr noundef nonnull %6) #6
  %36 = extractvalue { ptr, i32 } %35, 1
  %.not49 = icmp eq i32 %36, 1
  br i1 %.not49, label %.preheader, label %.thread57

.thread57:                                        ; preds = %34
  %37 = extractvalue { ptr, i32 } %35, 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.787, i32 noundef 627, ptr noundef nonnull @.str.685) #7
  br label %.loopexit

40:                                               ; preds = %48
  %41 = add nuw nsw i32 %.067, 1
  %exitcond.not = icmp eq i32 %41, 1000
  br i1 %exitcond.not, label %.loopexit, label %.preheader, !llvm.loop !9

.preheader:                                       ; preds = %34, %40
  %.067 = phi i32 [ %41, %40 ], [ 0, %34 ]
  call void @test_rand_quat(ptr noundef nonnull %4) #6
  call void @glm_quat_mat3(ptr noundef nonnull %4, ptr noundef nonnull %3)
  call void @glm_mat4_identity(ptr noundef nonnull %1)
  call void @glm_mat4_ins3(ptr noundef nonnull %3, ptr noundef nonnull %1)
  call void @glm_mat4_quat(ptr noundef nonnull %1, ptr noundef nonnull %5)
  call void @glm_quat_mat3(ptr noundef nonnull %5, ptr noundef nonnull %3)
  call void @glm_mat4_identity(ptr noundef nonnull %2)
  call void @glm_mat4_ins3(ptr noundef nonnull %3, ptr noundef nonnull %2)
  %42 = call { ptr, i32 } @test_assert_quat_eq_abs(ptr noundef nonnull %4, ptr noundef nonnull %5) #6
  %43 = extractvalue { ptr, i32 } %42, 1
  %.not50 = icmp eq i32 %43, 1
  br i1 %.not50, label %48, label %44

44:                                               ; preds = %.preheader
  %45 = extractvalue { ptr, i32 } %42, 0
  %46 = load ptr, ptr @stderr, align 8, !tbaa !5
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.787, i32 noundef 644, ptr noundef nonnull @.str.863) #7
  br label %.loopexit

48:                                               ; preds = %.preheader
  %49 = call { ptr, i32 } @test_assert_mat4_eq2(ptr noundef nonnull %1, ptr noundef nonnull %2, float noundef 0x3EE2DFD6A0000000) #6
  %50 = extractvalue { ptr, i32 } %49, 1
  %.not51 = icmp eq i32 %50, 1
  br i1 %.not51, label %40, label %51

51:                                               ; preds = %48
  %52 = extractvalue { ptr, i32 } %49, 0
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.787, i32 noundef 648, ptr noundef nonnull @.str.864) #7
  br label %.loopexit

.loopexit:                                        ; preds = %40, %51, %44, %.thread57, %30, %23, %17, %11
  %.sroa.045.7 = phi ptr [ %52, %51 ], [ %45, %44 ], [ %31, %30 ], [ %24, %23 ], [ %18, %17 ], [ null, %11 ], [ %37, %.thread57 ], [ null, %40 ]
  %.sroa.9.7 = phi i32 [ 0, %51 ], [ 0, %44 ], [ 0, %30 ], [ 0, %23 ], [ 0, %17 ], [ 0, %11 ], [ 0, %.thread57 ], [ 1, %40 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, 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 36, 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.045.7, 0
  %.fca.1.insert = insertvalue { ptr, i32 } %.fca.0.insert, i32 %.sroa.9.7, 1
  ret { ptr, i32 } %.fca.1.insert
}

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"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass