; LLVM IR from jpvt/Computer_Graphics :: Assignment #3/third_party/glm/test/gtx (gtx_euler_angle)

; 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.glm::vec.7" = type { %union.anon.8, %union.anon.9, %union.anon.10, %union.anon.11 }
%union.anon.8 = type { i8 }
%union.anon.9 = type { i8 }
%union.anon.10 = type { i8 }
%union.anon.11 = type { i8 }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN23test_derivedEulerAngles12epsilonEqualERKN3glm3matILi4ELi4EfLNS0_9qualifierE0EEES5_RKf(ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(64) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.glm::vec.7", align 1
  %8 = alloca %"struct.glm::vec.7", align 1
  %9 = alloca %"struct.glm::vec.7", align 1
  %10 = alloca %"struct.glm::vec.7", align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %11, i32 noundef 0)
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %13, i32 noundef 0)
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i32 %16, ptr %7, align 1
  %17 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  br i1 %17, label %18, label %50

18:                                               ; preds = %3
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %19, i32 noundef 1)
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %21, i32 noundef 1)
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  store i32 %24, ptr %8, align 1
  %25 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %8)
  br i1 %25, label %26, label %47

26:                                               ; preds = %18
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %27, i32 noundef 2)
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %29, i32 noundef 2)
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %31)
  store i32 %32, ptr %9, align 1
  %33 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %9)
  br i1 %33, label %34, label %44

34:                                               ; preds = %26
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %35, i32 noundef 3)
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %37, i32 noundef 3)
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %36, ptr noundef nonnull align 4 dereferenceable(16) %38, ptr noundef nonnull align 4 dereferenceable(4) %39)
  store i32 %40, ptr %10, align 1
  %41 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %10)
  %42 = zext i1 %41 to i64
  %43 = select i1 %41, i1 true, i1 false
  br label %45

44:                                               ; preds = %26
  br label %45

45:                                               ; preds = %44, %34
  %46 = phi i1 [ %43, %34 ], [ false, %44 ]
  br label %48

47:                                               ; preds = %18
  br label %48

48:                                               ; preds = %47, %45
  %49 = phi i1 [ %46, %45 ], [ false, %47 ]
  br label %51

50:                                               ; preds = %3
  br label %51

51:                                               ; preds = %50, %48
  %52 = phi i1 [ %49, %48 ], [ false, %50 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret i1 %52
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64), i32 noundef) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 = { 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"}


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

%"struct.glm::vec.7" = type { %union.anon.8, %union.anon.9, %union.anon.10, %union.anon.11 }
%union.anon.8 = type { i8 }
%union.anon.9 = type { i8 }
%union.anon.10 = type { i8 }
%union.anon.11 = type { i8 }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN23test_derivedEulerAngles12epsilonEqualERKN3glm3matILi4ELi4EfLNS0_9qualifierE0EEES5_RKf(ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(64) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) local_unnamed_addr #3 {
  %4 = alloca %"struct.glm::vec.7", align 4
  %5 = alloca %"struct.glm::vec.7", align 4
  %6 = alloca %"struct.glm::vec.7", align 4
  %7 = alloca %"struct.glm::vec.7", align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %8 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %0, i32 noundef 0)
  %9 = tail call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %1, i32 noundef 0)
  %10 = tail call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i32 %10, ptr %4, align 4
  %11 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  br i1 %11, label %12, label %27

12:                                               ; preds = %3
  %13 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %0, i32 noundef 1)
  %14 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %1, i32 noundef 1)
  %15 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(16) %14, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i32 %15, ptr %5, align 4
  %16 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %5)
  br i1 %16, label %17, label %27

17:                                               ; preds = %12
  %18 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %0, i32 noundef 2)
  %19 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %1, i32 noundef 2)
  %20 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i32 %20, ptr %6, align 4
  %21 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %6)
  br i1 %21, label %22, label %27

22:                                               ; preds = %17
  %23 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %0, i32 noundef 3)
  %24 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %1, i32 noundef 3)
  %25 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %23, ptr noundef nonnull align 4 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store i32 %25, ptr %7, align 4
  %26 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %7)
  br label %27

27:                                               ; preds = %3, %17, %22, %12
  %28 = phi i1 [ %26, %22 ], [ false, %17 ], [ false, %12 ], [ false, %3 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  ret i1 %28
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64), i32 noundef) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #3 = { 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 = { 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)"}


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