; LLVM IR from HandmadeMath/HandmadeMath :: test/hmm_test.ll (Z37_hmt_test_QuaternionOps_QuatFromPairsP21hmt_testresult_struct)

; 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"

%union.HMM_Vec3 = type { %struct.anon.3 }
%struct.anon.3 = type { float, float, float }
%union.HMM_Quat = type { <4 x float> }
%struct.hmt_testresult_struct = type { i32, i32 }

@.str.15 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [20 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, float } @_ZL6HMM_V3fff(float noundef, float noundef, float noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z37_hmt_test_QuaternionOps_QuatFromPairsP21hmt_testresult_struct(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca %union.HMM_Vec3, align 4
  %4 = alloca { <2 x float>, float }, align 8
  %5 = alloca %union.HMM_Vec3, align 4
  %6 = alloca { <2 x float>, float }, align 8
  %7 = alloca %union.HMM_Quat, align 16
  %8 = alloca %union.HMM_Vec3, align 4
  %9 = alloca %union.HMM_Vec3, align 4
  %10 = alloca { <2 x float>, float }, align 4
  %11 = alloca { <2 x float>, float }, align 4
  %12 = alloca %union.HMM_Vec3, align 4
  %13 = alloca %union.HMM_Vec3, align 4
  %14 = alloca %union.HMM_Quat, align 16
  %15 = alloca { <2 x float>, float }, align 4
  %16 = alloca { <2 x float>, float }, align 8
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca %union.HMM_Vec3, align 4
  %24 = alloca { <2 x float>, float }, align 8
  %25 = alloca %union.HMM_Vec3, align 4
  %26 = alloca { <2 x float>, float }, align 8
  %27 = alloca %union.HMM_Quat, align 16
  %28 = alloca %union.HMM_Vec3, align 4
  %29 = alloca %union.HMM_Vec3, align 4
  %30 = alloca { <2 x float>, float }, align 4
  %31 = alloca { <2 x float>, float }, align 4
  %32 = alloca %union.HMM_Vec3, align 4
  %33 = alloca %union.HMM_Vec3, align 4
  %34 = alloca { <2 x float>, float }, align 8
  %35 = alloca %union.HMM_Quat, align 16
  %36 = alloca { <2 x float>, float }, align 4
  %37 = alloca { <2 x float>, float }, align 8
  %38 = alloca float, align 4
  %39 = alloca float, align 4
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca float, align 4
  %43 = alloca float, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #6
  %44 = call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %45 = getelementptr inbounds %union.HMM_Vec3, ptr %3, i32 0, i32 0
  store { <2 x float>, float } %44, ptr %4, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 8 %4, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #6
  %46 = call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %47 = getelementptr inbounds %union.HMM_Vec3, ptr %5, i32 0, i32 0
  store { <2 x float>, float } %46, ptr %6, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %47, ptr align 8 %6, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %3, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %9, ptr align 4 %5, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %10, ptr align 4 %8, i64 12, i1 false)
  %48 = getelementptr inbounds { <2 x float>, float }, ptr %10, i32 0, i32 0
  %49 = load <2 x float>, ptr %48, align 4
  %50 = getelementptr inbounds { <2 x float>, float }, ptr %10, i32 0, i32 1
  %51 = load float, ptr %50, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %11, ptr align 4 %9, i64 12, i1 false)
  %52 = getelementptr inbounds { <2 x float>, float }, ptr %11, i32 0, i32 0
  %53 = load <2 x float>, ptr %52, align 4
  %54 = getelementptr inbounds { <2 x float>, float }, ptr %11, i32 0, i32 1
  %55 = load float, ptr %54, align 4
  %56 = call { double, double } @_ZL17HMM_QFromNormPair8HMM_Vec3S_(<2 x float> %49, float %51, <2 x float> %53, float %55)
  %57 = getelementptr inbounds %union.HMM_Quat, ptr %7, i32 0, i32 0
  %58 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 0
  %59 = extractvalue { double, double } %56, 0
  store double %59, ptr %58, align 16
  %60 = getelementptr inbounds { double, double }, ptr %57, i32 0, i32 1
  %61 = extractvalue { double, double } %56, 1
  store double %61, ptr %60, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %3, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 %7, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %13, i64 12, i1 false)
  %62 = getelementptr inbounds { <2 x float>, float }, ptr %15, i32 0, i32 0
  %63 = load <2 x float>, ptr %62, align 4
  %64 = getelementptr inbounds { <2 x float>, float }, ptr %15, i32 0, i32 1
  %65 = load float, ptr %64, align 4
  %66 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %67 = load double, ptr %66, align 16
  %68 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %69 = load double, ptr %68, align 8
  %70 = call { <2 x float>, float } @_ZL13HMM_RotateV3Q8HMM_Vec38HMM_Quat(<2 x float> %63, float %65, double %67, double %69)
  %71 = getelementptr inbounds %union.HMM_Vec3, ptr %12, i32 0, i32 0
  store { <2 x float>, float } %70, ptr %16, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %71, ptr align 8 %16, i64 12, i1 false)
  %72 = load ptr, ptr %2, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !12
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %73, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %76 = getelementptr inbounds %struct.anon.3, ptr %12, i32 0, i32 0
  %77 = load float, ptr %76, align 4, !tbaa !10
  store float %77, ptr %17, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %78 = load float, ptr %17, align 4, !tbaa !15
  %79 = getelementptr inbounds %struct.anon.3, ptr %5, i32 0, i32 0
  %80 = load float, ptr %79, align 4, !tbaa !10
  %81 = fsub float %78, %80
  store float %81, ptr %18, align 4, !tbaa !15
  %82 = load float, ptr %18, align 4, !tbaa !15
  %83 = fcmp olt float %82, 0xBF50624DE0000000
  br i1 %83, label %87, label %84

84:                                               ; preds = %1
  %85 = load float, ptr %18, align 4, !tbaa !15
  %86 = fcmp olt float 0x3F50624DE0000000, %85
  br i1 %86, label %87, label %99

87:                                               ; preds = %84, %1
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %88, i32 0, i32 1
  %90 = load i32, ptr %89, align 4, !tbaa !17
  %91 = add nsw i32 %90, 1
  store i32 %91, ptr %89, align 4, !tbaa !17
  %92 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef 284)
  %93 = getelementptr inbounds %struct.anon.3, ptr %5, i32 0, i32 0
  %94 = load float, ptr %93, align 4, !tbaa !10
  %95 = fpext float %94 to double
  %96 = load float, ptr %17, align 4, !tbaa !15
  %97 = fpext float %96 to double
  %98 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, double noundef %95, double noundef %97)
  br label %99

99:                                               ; preds = %87, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 4, !tbaa !12
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %101, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %104 = getelementptr inbounds %struct.anon.3, ptr %12, i32 0, i32 1
  %105 = load float, ptr %104, align 4, !tbaa !10
  store float %105, ptr %19, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %106 = load float, ptr %19, align 4, !tbaa !15
  %107 = getelementptr inbounds %struct.anon.3, ptr %5, i32 0, i32 1
  %108 = load float, ptr %107, align 4, !tbaa !10
  %109 = fsub float %106, %108
  store float %109, ptr %20, align 4, !tbaa !15
  %110 = load float, ptr %20, align 4, !tbaa !15
  %111 = fcmp olt float %110, 0xBF50624DE0000000
  br i1 %111, label %115, label %112

112:                                              ; preds = %99
  %113 = load float, ptr %20, align 4, !tbaa !15
  %114 = fcmp olt float 0x3F50624DE0000000, %113
  br i1 %114, label %115, label %127

115:                                              ; preds = %112, %99
  %116 = load ptr, ptr %2, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 4, !tbaa !17
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %117, align 4, !tbaa !17
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef 285)
  %121 = getelementptr inbounds %struct.anon.3, ptr %5, i32 0, i32 1
  %122 = load float, ptr %121, align 4, !tbaa !10
  %123 = fpext float %122 to double
  %124 = load float, ptr %19, align 4, !tbaa !15
  %125 = fpext float %124 to double
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, double noundef %123, double noundef %125)
  br label %127

127:                                              ; preds = %115, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %128, i32 0, i32 0
  %130 = load i32, ptr %129, align 4, !tbaa !12
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %129, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %132 = getelementptr inbounds %struct.anon.3, ptr %12, i32 0, i32 2
  %133 = load float, ptr %132, align 4, !tbaa !10
  store float %133, ptr %21, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %134 = load float, ptr %21, align 4, !tbaa !15
  %135 = getelementptr inbounds %struct.anon.3, ptr %5, i32 0, i32 2
  %136 = load float, ptr %135, align 4, !tbaa !10
  %137 = fsub float %134, %136
  store float %137, ptr %22, align 4, !tbaa !15
  %138 = load float, ptr %22, align 4, !tbaa !15
  %139 = fcmp olt float %138, 0xBF50624DE0000000
  br i1 %139, label %143, label %140

140:                                              ; preds = %127
  %141 = load float, ptr %22, align 4, !tbaa !15
  %142 = fcmp olt float 0x3F50624DE0000000, %141
  br i1 %142, label %143, label %155

143:                                              ; preds = %140, %127
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !17
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %145, align 4, !tbaa !17
  %148 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef 286)
  %149 = getelementptr inbounds %struct.anon.3, ptr %5, i32 0, i32 2
  %150 = load float, ptr %149, align 4, !tbaa !10
  %151 = fpext float %150 to double
  %152 = load float, ptr %21, align 4, !tbaa !15
  %153 = fpext float %152 to double
  %154 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, double noundef %151, double noundef %153)
  br label %155

155:                                              ; preds = %143, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %23) #6
  %156 = call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 2.000000e+00, float noundef 2.000000e+00, float noundef 2.000000e+00)
  %157 = getelementptr inbounds %union.HMM_Vec3, ptr %23, i32 0, i32 0
  store { <2 x float>, float } %156, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %157, ptr align 8 %24, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #6
  %158 = call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 3.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %159 = getelementptr inbounds %union.HMM_Vec3, ptr %25, i32 0, i32 0
  store { <2 x float>, float } %158, ptr %26, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %159, ptr align 8 %26, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %23, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %25, i64 12, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %28, i64 12, i1 false)
  %160 = getelementptr inbounds { <2 x float>, float }, ptr %30, i32 0, i32 0
  %161 = load <2 x float>, ptr %160, align 4
  %162 = getelementptr inbounds { <2 x float>, float }, ptr %30, i32 0, i32 1
  %163 = load float, ptr %162, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %31, ptr align 4 %29, i64 12, i1 false)
  %164 = getelementptr inbounds { <2 x float>, float }, ptr %31, i32 0, i32 0
  %165 = load <2 x float>, ptr %164, align 4
  %166 = getelementptr inbounds { <2 x float>, float }, ptr %31, i32 0, i32 1
  %167 = load float, ptr %166, align 4
  %168 = call { double, double } @_ZL16HMM_QFromVecPair8HMM_Vec3S_(<2 x float> %161, float %163, <2 x float> %165, float %167)
  %169 = getelementptr inbounds %union.HMM_Quat, ptr %27, i32 0, i32 0
  %170 = getelementptr inbounds { double, double }, ptr %169, i32 0, i32 0
  %171 = extractvalue { double, double } %168, 0
  store double %171, ptr %170, align 16
  %172 = getelementptr inbounds { double, double }, ptr %169, i32 0, i32 1
  %173 = extractvalue { double, double } %168, 1
  store double %173, ptr %172, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #6
  %174 = call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %175 = getelementptr inbounds %union.HMM_Vec3, ptr %33, i32 0, i32 0
  store { <2 x float>, float } %174, ptr %34, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %175, ptr align 8 %34, i64 12, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %35, ptr align 16 %27, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %33, i64 12, i1 false)
  %176 = getelementptr inbounds { <2 x float>, float }, ptr %36, i32 0, i32 0
  %177 = load <2 x float>, ptr %176, align 4
  %178 = getelementptr inbounds { <2 x float>, float }, ptr %36, i32 0, i32 1
  %179 = load float, ptr %178, align 4
  %180 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %181 = load double, ptr %180, align 16
  %182 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %183 = load double, ptr %182, align 8
  %184 = call { <2 x float>, float } @_ZL13HMM_RotateV3Q8HMM_Vec38HMM_Quat(<2 x float> %177, float %179, double %181, double %183)
  %185 = getelementptr inbounds %union.HMM_Vec3, ptr %32, i32 0, i32 0
  store { <2 x float>, float } %184, ptr %37, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %185, ptr align 8 %37, i64 12, i1 false)
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %186, i32 0, i32 0
  %188 = load i32, ptr %187, align 4, !tbaa !12
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %187, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #6
  %190 = getelementptr inbounds %struct.anon.3, ptr %32, i32 0, i32 0
  %191 = load float, ptr %190, align 4, !tbaa !10
  store float %191, ptr %38, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  %192 = load float, ptr %38, align 4, !tbaa !15
  %193 = fpext float %192 to double
  %194 = fsub double %193, 5.773500e-01
  %195 = fptrunc double %194 to float
  store float %195, ptr %39, align 4, !tbaa !15
  %196 = load float, ptr %39, align 4, !tbaa !15
  %197 = fcmp olt float %196, 0xBF50624DE0000000
  br i1 %197, label %201, label %198

198:                                              ; preds = %155
  %199 = load float, ptr %39, align 4, !tbaa !15
  %200 = fcmp olt float 0x3F50624DE0000000, %199
  br i1 %200, label %201, label %210

201:                                              ; preds = %198, %155
  %202 = load ptr, ptr %2, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %202, i32 0, i32 1
  %204 = load i32, ptr %203, align 4, !tbaa !17
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %203, align 4, !tbaa !17
  %206 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef 293)
  %207 = load float, ptr %38, align 4, !tbaa !15
  %208 = fpext float %207 to double
  %209 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, double noundef 5.773500e-01, double noundef %208)
  br label %210

210:                                              ; preds = %201, %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #6
  %211 = load ptr, ptr %2, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %211, i32 0, i32 0
  %213 = load i32, ptr %212, align 4, !tbaa !12
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %212, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #6
  %215 = getelementptr inbounds %struct.anon.3, ptr %32, i32 0, i32 1
  %216 = load float, ptr %215, align 4, !tbaa !10
  store float %216, ptr %40, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #6
  %217 = load float, ptr %40, align 4, !tbaa !15
  %218 = fpext float %217 to double
  %219 = fsub double %218, 7.886750e-01
  %220 = fptrunc double %219 to float
  store float %220, ptr %41, align 4, !tbaa !15
  %221 = load float, ptr %41, align 4, !tbaa !15
  %222 = fcmp olt float %221, 0xBF50624DE0000000
  br i1 %222, label %226, label %223

223:                                              ; preds = %210
  %224 = load float, ptr %41, align 4, !tbaa !15
  %225 = fcmp olt float 0x3F50624DE0000000, %224
  br i1 %225, label %226, label %235

226:                                              ; preds = %223, %210
  %227 = load ptr, ptr %2, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %227, i32 0, i32 1
  %229 = load i32, ptr %228, align 4, !tbaa !17
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %228, align 4, !tbaa !17
  %231 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef 294)
  %232 = load float, ptr %40, align 4, !tbaa !15
  %233 = fpext float %232 to double
  %234 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, double noundef 7.886750e-01, double noundef %233)
  br label %235

235:                                              ; preds = %226, %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #6
  %236 = load ptr, ptr %2, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %236, i32 0, i32 0
  %238 = load i32, ptr %237, align 4, !tbaa !12
  %239 = add nsw i32 %238, 1
  store i32 %239, ptr %237, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #6
  %240 = getelementptr inbounds %struct.anon.3, ptr %32, i32 0, i32 2
  %241 = load float, ptr %240, align 4, !tbaa !10
  store float %241, ptr %42, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #6
  %242 = load float, ptr %42, align 4, !tbaa !15
  %243 = fpext float %242 to double
  %244 = fsub double %243, -2.113250e-01
  %245 = fptrunc double %244 to float
  store float %245, ptr %43, align 4, !tbaa !15
  %246 = load float, ptr %43, align 4, !tbaa !15
  %247 = fcmp olt float %246, 0xBF50624DE0000000
  br i1 %247, label %251, label %248

248:                                              ; preds = %235
  %249 = load float, ptr %43, align 4, !tbaa !15
  %250 = fcmp olt float 0x3F50624DE0000000, %249
  br i1 %250, label %251, label %260

251:                                              ; preds = %248, %235
  %252 = load ptr, ptr %2, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.hmt_testresult_struct, ptr %252, i32 0, i32 1
  %254 = load i32, ptr %253, align 4, !tbaa !17
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %253, align 4, !tbaa !17
  %256 = call i32 (ptr, ...) @printf(ptr noundef @.str.15, i32 noundef 295)
  %257 = load float, ptr %42, align 4, !tbaa !15
  %258 = fpext float %257 to double
  %259 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, double noundef -2.113250e-01, double noundef %258)
  br label %260

260:                                              ; preds = %251, %248
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %23) #6
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { double, double } @_ZL17HMM_QFromNormPair8HMM_Vec3S_(<2 x float>, float, <2 x float>, float) #5

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, float } @_ZL13HMM_RotateV3Q8HMM_Vec38HMM_Quat(<2 x float>, float, double, double) #5

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { double, double } @_ZL16HMM_QFromVecPair8HMM_Vec3S_(<2 x float>, float, <2 x float>, float) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { inlinehint mustprogress 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 #4 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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++ TBAA"}
!9 = !{i64 0, i64 12, !10}
!10 = !{!7, !7, i64 0}
!11 = !{i64 0, i64 16, !10}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ZTS21hmt_testresult_struct", !14, i64 0, !14, i64 4}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!13, !14, i64 4}


; 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"

@.str.15 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [20 x i8], align 1

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, float } @_ZL6HMM_V3fff(float noundef, float noundef, float noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z37_hmt_test_QuaternionOps_QuatFromPairsP21hmt_testresult_struct(ptr nocapture noundef %0) local_unnamed_addr #2 {
  %2 = tail call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %.fca.0.extract100 = extractvalue { <2 x float>, float } %2, 0
  %.fca.1.extract101 = extractvalue { <2 x float>, float } %2, 1
  %3 = tail call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  %.fca.0.extract89 = extractvalue { <2 x float>, float } %3, 0
  %.fca.1.extract90 = extractvalue { <2 x float>, float } %3, 1
  %4 = tail call { double, double } @_ZL17HMM_QFromNormPair8HMM_Vec3S_(<2 x float> %.fca.0.extract100, float %.fca.1.extract101, <2 x float> %.fca.0.extract89, float %.fca.1.extract90)
  %5 = extractvalue { double, double } %4, 0
  %6 = extractvalue { double, double } %4, 1
  %7 = tail call { <2 x float>, float } @_ZL13HMM_RotateV3Q8HMM_Vec38HMM_Quat(<2 x float> %.fca.0.extract100, float %.fca.1.extract101, double %5, double %6)
  %.fca.0.extract67 = extractvalue { <2 x float>, float } %7, 0
  %.fca.1.extract68 = extractvalue { <2 x float>, float } %7, 1
  %8 = load i32, ptr %0, align 4, !tbaa !5
  %9 = add nsw i32 %8, 1
  store i32 %9, ptr %0, align 4, !tbaa !5
  %10 = fsub <2 x float> %.fca.0.extract67, %.fca.0.extract89
  %11 = extractelement <2 x float> %10, i64 0
  %12 = tail call float @llvm.fabs.f32(float %11)
  %or.cond = fcmp ogt float %12, 0x3F50624DE0000000
  br i1 %or.cond, label %13, label %21

13:                                               ; preds = %1
  %.sroa.093.0.vec.extract = extractelement <2 x float> %.fca.0.extract89, i64 0
  %.sroa.077.0.vec.extract = extractelement <2 x float> %.fca.0.extract67, i64 0
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !10
  %16 = add nsw i32 %15, 1
  store i32 %16, ptr %14, align 4, !tbaa !10
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef 284)
  %18 = fpext float %.sroa.093.0.vec.extract to double
  %19 = fpext float %.sroa.077.0.vec.extract to double
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, double noundef %18, double noundef %19)
  %.pre = load i32, ptr %0, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %1, %13
  %22 = phi i32 [ %9, %1 ], [ %.pre, %13 ]
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr %0, align 4, !tbaa !5
  %.sroa.077.4.vec.extract = extractelement <2 x float> %.fca.0.extract67, i64 1
  %.sroa.093.4.vec.extract = extractelement <2 x float> %.fca.0.extract89, i64 1
  %24 = fsub float %.sroa.077.4.vec.extract, %.sroa.093.4.vec.extract
  %25 = tail call float @llvm.fabs.f32(float %24)
  %or.cond3 = fcmp ogt float %25, 0x3F50624DE0000000
  br i1 %or.cond3, label %26, label %34

26:                                               ; preds = %21
  %27 = getelementptr inbounds i8, ptr %0, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !10
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %27, align 4, !tbaa !10
  %30 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef 285)
  %31 = fpext float %.sroa.093.4.vec.extract to double
  %32 = fpext float %.sroa.077.4.vec.extract to double
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, double noundef %31, double noundef %32)
  %.pre119 = load i32, ptr %0, align 4, !tbaa !5
  br label %34

34:                                               ; preds = %21, %26
  %35 = phi i32 [ %23, %21 ], [ %.pre119, %26 ]
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %0, align 4, !tbaa !5
  %37 = fsub float %.fca.1.extract68, %.fca.1.extract90
  %38 = tail call float @llvm.fabs.f32(float %37)
  %or.cond5 = fcmp ogt float %38, 0x3F50624DE0000000
  br i1 %or.cond5, label %39, label %47

39:                                               ; preds = %34
  %40 = getelementptr inbounds i8, ptr %0, i64 4
  %41 = load i32, ptr %40, align 4, !tbaa !10
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %40, align 4, !tbaa !10
  %43 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef 286)
  %44 = fpext float %.fca.1.extract90 to double
  %45 = fpext float %.fca.1.extract68 to double
  %46 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, double noundef %44, double noundef %45)
  br label %47

47:                                               ; preds = %34, %39
  %48 = tail call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 2.000000e+00, float noundef 2.000000e+00, float noundef 2.000000e+00)
  %.fca.0.extract49 = extractvalue { <2 x float>, float } %48, 0
  %.fca.1.extract50 = extractvalue { <2 x float>, float } %48, 1
  %49 = tail call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 3.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %.fca.0.extract43 = extractvalue { <2 x float>, float } %49, 0
  %.fca.1.extract44 = extractvalue { <2 x float>, float } %49, 1
  %50 = tail call { double, double } @_ZL16HMM_QFromVecPair8HMM_Vec3S_(<2 x float> %.fca.0.extract49, float %.fca.1.extract50, <2 x float> %.fca.0.extract43, float %.fca.1.extract44)
  %51 = extractvalue { double, double } %50, 0
  %52 = extractvalue { double, double } %50, 1
  %53 = tail call { <2 x float>, float } @_ZL6HMM_V3fff(float noundef 0.000000e+00, float noundef 1.000000e+00, float noundef 0.000000e+00)
  %.fca.0.extract27 = extractvalue { <2 x float>, float } %53, 0
  %.fca.1.extract28 = extractvalue { <2 x float>, float } %53, 1
  %54 = tail call { <2 x float>, float } @_ZL13HMM_RotateV3Q8HMM_Vec38HMM_Quat(<2 x float> %.fca.0.extract27, float %.fca.1.extract28, double %51, double %52)
  %.fca.0.extract = extractvalue { <2 x float>, float } %54, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %54, 1
  %55 = load i32, ptr %0, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %0, align 4, !tbaa !5
  %.sroa.033.0.vec.extract = extractelement <2 x float> %.fca.0.extract, i64 0
  %57 = fpext float %.sroa.033.0.vec.extract to double
  %58 = fadd double %57, -5.773500e-01
  %59 = fptrunc double %58 to float
  %60 = tail call float @llvm.fabs.f32(float %59)
  %or.cond7 = fcmp ogt float %60, 0x3F50624DE0000000
  br i1 %or.cond7, label %61, label %67

61:                                               ; preds = %47
  %62 = getelementptr inbounds i8, ptr %0, i64 4
  %63 = load i32, ptr %62, align 4, !tbaa !10
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %62, align 4, !tbaa !10
  %65 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef 293)
  %66 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, double noundef 5.773500e-01, double noundef %57)
  %.pre120 = load i32, ptr %0, align 4, !tbaa !5
  br label %67

67:                                               ; preds = %47, %61
  %68 = phi i32 [ %56, %47 ], [ %.pre120, %61 ]
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr %0, align 4, !tbaa !5
  %.sroa.033.4.vec.extract = extractelement <2 x float> %.fca.0.extract, i64 1
  %70 = fpext float %.sroa.033.4.vec.extract to double
  %71 = fadd double %70, -7.886750e-01
  %72 = fptrunc double %71 to float
  %73 = tail call float @llvm.fabs.f32(float %72)
  %or.cond9 = fcmp ogt float %73, 0x3F50624DE0000000
  br i1 %or.cond9, label %74, label %80

74:                                               ; preds = %67
  %75 = getelementptr inbounds i8, ptr %0, i64 4
  %76 = load i32, ptr %75, align 4, !tbaa !10
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !10
  %78 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef 294)
  %79 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, double noundef 7.886750e-01, double noundef %70)
  %.pre121 = load i32, ptr %0, align 4, !tbaa !5
  br label %80

80:                                               ; preds = %67, %74
  %81 = phi i32 [ %69, %67 ], [ %.pre121, %74 ]
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %0, align 4, !tbaa !5
  %83 = fpext float %.fca.1.extract to double
  %84 = fadd double %83, 2.113250e-01
  %85 = fptrunc double %84 to float
  %86 = tail call float @llvm.fabs.f32(float %85)
  %or.cond11 = fcmp ogt float %86, 0x3F50624DE0000000
  br i1 %or.cond11, label %87, label %93

87:                                               ; preds = %80
  %88 = getelementptr inbounds i8, ptr %0, i64 4
  %89 = load i32, ptr %88, align 4, !tbaa !10
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %88, align 4, !tbaa !10
  %91 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15, i32 noundef 295)
  %92 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, double noundef -2.113250e-01, double noundef %83)
  br label %93

93:                                               ; preds = %80, %87
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { double, double } @_ZL17HMM_QFromNormPair8HMM_Vec3S_(<2 x float>, float, <2 x float>, float) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { <2 x float>, float } @_ZL13HMM_RotateV3Q8HMM_Vec38HMM_Quat(<2 x float>, float, double, double) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { double, double } @_ZL16HMM_QFromVecPair8HMM_Vec3S_(<2 x float>, float, <2 x float>, float) local_unnamed_addr #3

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

attributes #0 = { 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 #1 = { inlinehint mustprogress 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 #2 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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) }

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


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