; LLVM IR from jpvt/Computer_Graphics :: Assignment #3/third_party/glm/test/gtc/gtc_matrix_inverse.ll (Z11test_affinev)

; 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::mat" = type { [3 x %"struct.glm::vec"] }
%"struct.glm::vec" = type { %union.anon, %union.anon.0, %union.anon.1 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%"struct.glm::vec.2" = type { %union.anon.3, %union.anon.4, %union.anon.5 }
%union.anon.3 = type { i8 }
%union.anon.4 = type { i8 }
%union.anon.5 = type { i8 }
%"struct.glm::mat.6" = type { [4 x %"struct.glm::vec.7"] }
%"struct.glm::vec.7" = type { %union.anon.8, %union.anon.9, %union.anon.10, %union.anon.11 }
%union.anon.8 = type { float }
%union.anon.9 = type { float }
%union.anon.10 = type { float }
%union.anon.11 = type { float }
%"struct.glm::vec.12" = type { %union.anon.13, %union.anon.14, %union.anon.15, %union.anon.16 }
%union.anon.13 = type { i8 }
%union.anon.14 = type { i8 }
%union.anon.15 = type { i8 }
%union.anon.16 = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11test_affinev() #0 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.glm::mat", align 4
  %3 = alloca %"struct.glm::mat", align 4
  %4 = alloca %"struct.glm::mat", align 4
  %5 = alloca %"struct.glm::mat", align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.glm::vec.2", align 1
  %8 = alloca float, align 4
  %9 = alloca %"struct.glm::vec.2", align 1
  %10 = alloca float, align 4
  %11 = alloca %"struct.glm::mat.6", align 4
  %12 = alloca %"struct.glm::mat.6", align 4
  %13 = alloca %"struct.glm::mat.6", align 4
  %14 = alloca %"struct.glm::mat.6", align 4
  %15 = alloca i32, align 4
  %16 = alloca %"struct.glm::vec.12", align 1
  %17 = alloca float, align 4
  %18 = alloca %"struct.glm::vec.12", align 1
  %19 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr %2) #7
  call void @llvm.memset.p0.i64(ptr align 4 %2, i8 0, i64 36, i1 false)
  %20 = getelementptr inbounds %"struct.glm::mat", ptr %2, i32 0, i32 0
  %21 = getelementptr inbounds [3 x %"struct.glm::vec"], ptr %20, i32 0, i32 0
  %22 = getelementptr inbounds %"struct.glm::vec", ptr %21, i32 0, i32 0
  %23 = getelementptr inbounds %union.anon, ptr %22, i32 0, i32 0
  store float 2.000000e+00, ptr %23, align 4
  %24 = getelementptr inbounds [3 x %"struct.glm::vec"], ptr %20, i32 0, i32 1
  %25 = getelementptr inbounds %"struct.glm::vec", ptr %24, i32 0, i32 1
  %26 = getelementptr inbounds %union.anon.0, ptr %25, i32 0, i32 0
  store float 2.000000e+00, ptr %26, align 4
  %27 = getelementptr inbounds [3 x %"struct.glm::vec"], ptr %20, i32 0, i32 2
  %28 = getelementptr inbounds %"struct.glm::vec", ptr %27, i32 0, i32 2
  %29 = getelementptr inbounds %union.anon.1, ptr %28, i32 0, i32 0
  store float 1.000000e+00, ptr %29, align 4
  call void @llvm.lifetime.start.p0(i64 36, ptr %3) #7
  call void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi3ELi3ET_XT0_EEERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::mat") align 4 %3, ptr noundef nonnull align 4 dereferenceable(36) %2)
  call void @llvm.lifetime.start.p0(i64 36, ptr %4) #7
  call void @_ZN3glm7inverseILi3ELi3EfLNS_9qualifierE0EEENS_3matIXT_EXT0_ET1_XT2_EEERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::mat") align 4 %4, ptr noundef nonnull align 4 dereferenceable(36) %2)
  call void @llvm.lifetime.start.p0(i64 36, ptr %5) #7
  call void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi3ELi3ET_XT0_EEERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::mat") align 4 %5, ptr noundef nonnull align 4 dereferenceable(36) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %56, %0
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = call noundef i32 @_ZN3glm3matILi3ELi3EfLNS_9qualifierE0EE6lengthEv()
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %59

35:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 3, ptr %7) #7
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36) %2, i32 noundef %36)
  %38 = load i32, ptr %6, align 4, !tbaa !5
  %39 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36) %5, i32 noundef %38)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store float 0x3F847AE140000000, ptr %8, align 4, !tbaa !9
  %40 = call i24 @_ZN3glm12epsilonEqualILi3EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i24 %40, ptr %7, align 1
  %41 = call noundef zeroext i1 @_ZN3glm3allILi3ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(3) %7)
  %42 = zext i1 %41 to i64
  %43 = select i1 %41, i32 0, i32 1
  %44 = load i32, ptr %1, align 4, !tbaa !5
  %45 = add nsw i32 %44, %43
  store i32 %45, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 3, ptr %9) #7
  %46 = load i32, ptr %6, align 4, !tbaa !5
  %47 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36) %3, i32 noundef %46)
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36) %4, i32 noundef %48)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store float 0x3F847AE140000000, ptr %10, align 4, !tbaa !9
  %50 = call i24 @_ZN3glm12epsilonEqualILi3EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(12) %47, ptr noundef nonnull align 4 dereferenceable(12) %49, ptr noundef nonnull align 4 dereferenceable(4) %10)
  store i24 %50, ptr %9, align 1
  %51 = call noundef zeroext i1 @_ZN3glm3allILi3ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(3) %9)
  %52 = zext i1 %51 to i64
  %53 = select i1 %51, i32 0, i32 1
  %54 = load i32, ptr %1, align 4, !tbaa !5
  %55 = add nsw i32 %54, %53
  store i32 %55, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr %9) #7
  br label %56

56:                                               ; preds = %35
  %57 = load i32, ptr %6, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %6, align 4, !tbaa !5
  br label %30, !llvm.loop !11

59:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 36, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #7
  call void @llvm.memset.p0.i64(ptr align 4 %11, i8 0, i64 64, i1 false)
  %60 = getelementptr inbounds %"struct.glm::mat.6", ptr %11, i32 0, i32 0
  %61 = getelementptr inbounds [4 x %"struct.glm::vec.7"], ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds %"struct.glm::vec.7", ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds %union.anon.8, ptr %62, i32 0, i32 0
  store float 2.000000e+00, ptr %63, align 4
  %64 = getelementptr inbounds [4 x %"struct.glm::vec.7"], ptr %60, i32 0, i32 1
  %65 = getelementptr inbounds %"struct.glm::vec.7", ptr %64, i32 0, i32 1
  %66 = getelementptr inbounds %union.anon.9, ptr %65, i32 0, i32 0
  store float 2.000000e+00, ptr %66, align 4
  %67 = getelementptr inbounds [4 x %"struct.glm::vec.7"], ptr %60, i32 0, i32 2
  %68 = getelementptr inbounds %"struct.glm::vec.7", ptr %67, i32 0, i32 2
  %69 = getelementptr inbounds %union.anon.10, ptr %68, i32 0, i32 0
  store float 2.000000e+00, ptr %69, align 4
  %70 = getelementptr inbounds [4 x %"struct.glm::vec.7"], ptr %60, i32 0, i32 3
  %71 = getelementptr inbounds %"struct.glm::vec.7", ptr %70, i32 0, i32 3
  %72 = getelementptr inbounds %union.anon.11, ptr %71, i32 0, i32 0
  store float 1.000000e+00, ptr %72, align 4
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #7
  call void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::mat.6") align 4 %12, ptr noundef nonnull align 4 dereferenceable(64) %11)
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #7
  call void @_ZN3glm7inverseILi4ELi4EfLNS_9qualifierE0EEENS_3matIXT_EXT0_ET1_XT2_EEERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::mat.6") align 4 %13, ptr noundef nonnull align 4 dereferenceable(64) %11)
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #7
  call void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::mat.6") align 4 %14, ptr noundef nonnull align 4 dereferenceable(64) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %99, %59
  %74 = load i32, ptr %15, align 4, !tbaa !5
  %75 = call noundef i32 @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EE6lengthEv()
  %76 = icmp slt i32 %74, %75
  br i1 %76, label %78, label %77

77:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %102

78:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  %79 = load i32, ptr %15, align 4, !tbaa !5
  %80 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %11, i32 noundef %79)
  %81 = load i32, ptr %15, align 4, !tbaa !5
  %82 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %14, i32 noundef %81)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store float 0x3F847AE140000000, ptr %17, align 4, !tbaa !9
  %83 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %80, ptr noundef nonnull align 4 dereferenceable(16) %82, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i32 %83, ptr %16, align 1
  %84 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %16)
  %85 = zext i1 %84 to i64
  %86 = select i1 %84, i32 0, i32 1
  %87 = load i32, ptr %1, align 4, !tbaa !5
  %88 = add nsw i32 %87, %86
  store i32 %88, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %89 = load i32, ptr %15, align 4, !tbaa !5
  %90 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %12, i32 noundef %89)
  %91 = load i32, ptr %15, align 4, !tbaa !5
  %92 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %13, i32 noundef %91)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store float 0x3F847AE140000000, ptr %19, align 4, !tbaa !9
  %93 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %90, ptr noundef nonnull align 4 dereferenceable(16) %92, ptr noundef nonnull align 4 dereferenceable(4) %19)
  store i32 %93, ptr %18, align 1
  %94 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %18)
  %95 = zext i1 %94 to i64
  %96 = select i1 %94, i32 0, i32 1
  %97 = load i32, ptr %1, align 4, !tbaa !5
  %98 = add nsw i32 %97, %96
  store i32 %98, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %99

99:                                               ; preds = %78
  %100 = load i32, ptr %15, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %15, align 4, !tbaa !5
  br label %73, !llvm.loop !13

102:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #7
  %103 = load i32, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #7
  ret i32 %103
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi3ELi3ET_XT0_EEERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat") align 4, ptr noundef nonnull align 4 dereferenceable(36)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm7inverseILi3ELi3EfLNS_9qualifierE0EEENS_3matIXT_EXT0_ET1_XT2_EEERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat") align 4, ptr noundef nonnull align 4 dereferenceable(36)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3glm3matILi3ELi3EfLNS_9qualifierE0EE6lengthEv() #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i24 @_ZN3glm12epsilonEqualILi3EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36), i32 noundef) #6 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat.6") align 4, ptr noundef nonnull align 4 dereferenceable(64)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm7inverseILi4ELi4EfLNS_9qualifierE0EEENS_3matIXT_EXT0_ET1_XT2_EEERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat.6") align 4, ptr noundef nonnull align 4 dereferenceable(64)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EE6lengthEv() #5 align 2

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

; 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)) #3

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #5 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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::mat" = type { [3 x %"struct.glm::vec"] }
%"struct.glm::vec" = type { %union.anon, %union.anon.0, %union.anon.1 }
%union.anon = type { float }
%union.anon.0 = type { float }
%union.anon.1 = type { float }
%"struct.glm::vec.2" = type { %union.anon.3, %union.anon.4, %union.anon.5 }
%union.anon.3 = type { i8 }
%union.anon.4 = type { i8 }
%union.anon.5 = type { i8 }
%"struct.glm::mat.6" = type { [4 x %"struct.glm::vec.7"] }
%"struct.glm::vec.7" = type { %union.anon.8, %union.anon.9, %union.anon.10, %union.anon.11 }
%union.anon.8 = type { float }
%union.anon.9 = type { float }
%union.anon.10 = type { float }
%union.anon.11 = type { float }
%"struct.glm::vec.12" = type { %union.anon.13, %union.anon.14, %union.anon.15, %union.anon.16 }
%union.anon.13 = type { i8 }
%union.anon.14 = type { i8 }
%union.anon.15 = type { i8 }
%union.anon.16 = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z11test_affinev() local_unnamed_addr #0 {
  %1 = alloca %"struct.glm::mat", align 4
  %2 = alloca %"struct.glm::mat", align 4
  %3 = alloca %"struct.glm::mat", align 4
  %4 = alloca %"struct.glm::mat", align 4
  %5 = alloca %"struct.glm::vec.2", align 4
  %6 = alloca float, align 4
  %7 = alloca %"struct.glm::vec.2", align 4
  %8 = alloca float, align 4
  %9 = alloca %"struct.glm::mat.6", align 4
  %10 = alloca %"struct.glm::mat.6", align 4
  %11 = alloca %"struct.glm::mat.6", align 4
  %12 = alloca %"struct.glm::mat.6", align 4
  %13 = alloca %"struct.glm::vec.12", align 4
  %14 = alloca float, align 4
  %15 = alloca %"struct.glm::vec.12", align 4
  %16 = alloca float, align 4
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %1) #7
  %17 = getelementptr inbounds i8, ptr %1, i64 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %17, i8 0, i64 28, i1 false)
  store float 2.000000e+00, ptr %1, align 4
  %18 = getelementptr inbounds i8, ptr %1, i64 16
  store float 2.000000e+00, ptr %18, align 4
  %19 = getelementptr inbounds i8, ptr %1, i64 32
  store float 1.000000e+00, ptr %19, align 4
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %2) #7
  call void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi3ELi3ET_XT0_EEERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat") align 4 %2, ptr noundef nonnull align 4 dereferenceable(36) %1)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %3) #7
  call void @_ZN3glm7inverseILi3ELi3EfLNS_9qualifierE0EEENS_3matIXT_EXT0_ET1_XT2_EEERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat") align 4 %3, ptr noundef nonnull align 4 dereferenceable(36) %1)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %4) #7
  call void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi3ELi3ET_XT0_EEERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat") align 4 %4, ptr noundef nonnull align 4 dereferenceable(36) %2)
  %20 = call noundef i32 @_ZN3glm3matILi3ELi3EfLNS_9qualifierE0EE6lengthEv()
  %21 = icmp sgt i32 %20, 0
  br i1 %21, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %.018.lcssa = phi i32 [ 0, %0 ], [ %39, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #7
  %22 = getelementptr inbounds i8, ptr %9, i64 4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(64) %22, i8 0, i64 56, i1 false)
  store float 2.000000e+00, ptr %9, align 4
  %23 = getelementptr inbounds i8, ptr %9, i64 20
  store float 2.000000e+00, ptr %23, align 4
  %24 = getelementptr inbounds i8, ptr %9, i64 40
  store float 2.000000e+00, ptr %24, align 4
  %25 = getelementptr inbounds i8, ptr %9, i64 60
  store float 1.000000e+00, ptr %25, align 4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %10) #7
  call void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat.6") align 4 %10, ptr noundef nonnull align 4 dereferenceable(64) %9)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %11) #7
  call void @_ZN3glm7inverseILi4ELi4EfLNS_9qualifierE0EEENS_3matIXT_EXT0_ET1_XT2_EEERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat.6") align 4 %11, ptr noundef nonnull align 4 dereferenceable(64) %9)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #7
  call void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::mat.6") align 4 %12, ptr noundef nonnull align 4 dereferenceable(64) %10)
  %26 = call noundef i32 @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EE6lengthEv()
  %27 = icmp sgt i32 %26, 0
  br i1 %27, label %.lr.ph27, label %._crit_edge28

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.01723 = phi i32 [ %40, %.lr.ph ], [ 0, %0 ]
  %.01822 = phi i32 [ %39, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %5) #7
  %28 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36) %1, i32 noundef %.01723)
  %29 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36) %4, i32 noundef %.01723)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store float 0x3F847AE140000000, ptr %6, align 4, !tbaa !5
  %30 = call i24 @_ZN3glm12epsilonEqualILi3EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %29, ptr noundef nonnull align 4 dereferenceable(4) %6)
  store i24 %30, ptr %5, align 4
  %31 = call noundef zeroext i1 @_ZN3glm3allILi3ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(3) %5)
  %not.20 = xor i1 %31, true
  %32 = zext i1 %not.20 to i32
  %33 = add nsw i32 %.01822, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %7) #7
  %34 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36) %2, i32 noundef %.01723)
  %35 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36) %3, i32 noundef %.01723)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #7
  store float 0x3F847AE140000000, ptr %8, align 4, !tbaa !5
  %36 = call i24 @_ZN3glm12epsilonEqualILi3EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i24 %36, ptr %7, align 4
  %37 = call noundef zeroext i1 @_ZN3glm3allILi3ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(3) %7)
  %not.21 = xor i1 %37, true
  %38 = zext i1 %not.21 to i32
  %39 = add nsw i32 %33, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %7) #7
  %40 = add nuw nsw i32 %.01723, 1
  %41 = call noundef i32 @_ZN3glm3matILi3ELi3EfLNS_9qualifierE0EE6lengthEv()
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge28:                                    ; preds = %.lr.ph27, %._crit_edge
  %.1.lcssa = phi i32 [ %.018.lcssa, %._crit_edge ], [ %54, %.lr.ph27 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #7
  ret i32 %.1.lcssa

.lr.ph27:                                         ; preds = %._crit_edge, %.lr.ph27
  %.025 = phi i32 [ %55, %.lr.ph27 ], [ 0, %._crit_edge ]
  %.124 = phi i32 [ %54, %.lr.ph27 ], [ %.018.lcssa, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  %43 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %9, i32 noundef %.025)
  %44 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %12, i32 noundef %.025)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store float 0x3F847AE140000000, ptr %14, align 4, !tbaa !5
  %45 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %43, ptr noundef nonnull align 4 dereferenceable(16) %44, ptr noundef nonnull align 4 dereferenceable(4) %14)
  store i32 %45, ptr %13, align 4
  %46 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %13)
  %not. = xor i1 %46, true
  %47 = zext i1 %not. to i32
  %48 = add nsw i32 %.124, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #7
  %49 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %10, i32 noundef %.025)
  %50 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNK3glm3matILi4ELi4EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(64) %11, i32 noundef %.025)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #7
  store float 0x3F847AE140000000, ptr %16, align 4, !tbaa !5
  %51 = call i32 @_ZN3glm12epsilonEqualILi4EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(16) %49, ptr noundef nonnull align 4 dereferenceable(16) %50, ptr noundef nonnull align 4 dereferenceable(4) %16)
  store i32 %51, ptr %15, align 4
  %52 = call noundef zeroext i1 @_ZN3glm3allILi4ELNS_9qualifierE0EEEbRKNS_3vecIXT_EbXT0_EEE(ptr noundef nonnull align 1 dereferenceable(4) %15)
  %not.19 = xor i1 %52, true
  %53 = zext i1 %not.19 to i32
  %54 = add nsw i32 %48, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #7
  %55 = add nuw nsw i32 %.025, 1
  %56 = call noundef i32 @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EE6lengthEv()
  %57 = icmp slt i32 %55, %56
  br i1 %57, label %.lr.ph27, label %._crit_edge28, !llvm.loop !11
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi3ELi3ET_XT0_EEERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat") align 4, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm7inverseILi3ELi3EfLNS_9qualifierE0EEENS_3matIXT_EXT0_ET1_XT2_EEERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat") align 4, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3glm3matILi3ELi3EfLNS_9qualifierE0EE6lengthEv() local_unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i24 @_ZN3glm12epsilonEqualILi3EfLNS_9qualifierE0EEENS_3vecIXT_EbXT1_EEERKNS2_IXT_ET0_XT1_EEES7_RKS4_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNK3glm3matILi3ELi3EfLNS_9qualifierE0EEixEi(ptr noundef nonnull align 4 dereferenceable(36), i32 noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm13affineInverseIfLNS_9qualifierE0EEENS_3matILi4ELi4ET_XT0_EEERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat.6") align 4, ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm7inverseILi4ELi4EfLNS_9qualifierE0EEENS_3matIXT_EXT0_ET1_XT2_EEERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::mat.6") align 4, ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN3glm3matILi4ELi4EfLNS_9qualifierE0EE6lengthEv() local_unnamed_addr #5 align 2

; 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 #4

; 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 #3

; Function Attrs: inlinehint mustprogress nounwind 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 #6 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #5 = { mustprogress 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass