; LLVM IR from ronan-kerviche/glip-lib :: GLIP-Lib/src/Core (Filter)

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

%"class.Glip::CorePipeline::AbstractFilterLayout" = type <{ ptr, [6 x ptr], ptr, i8, i8, i8, i8, i32, i32, i32, i32, [4 x i8], %"class.Glip::CorePipeline::AbstractComponentLayout", %"class.Glip::CoreGL::HdlAbstractTextureFormat.base", [4 x i8] }>
%"class.Glip::CorePipeline::AbstractComponentLayout" = type { ptr, %"class.std::__cxx11::basic_string", %"class.std::vector", %"class.std::vector" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Glip::CoreGL::HdlAbstractTextureFormat.base" = type <{ ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4Glip12CorePipeline20AbstractFilterLayoutC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6CoreGL24HdlAbstractTextureFormatE(ptr noundef nonnull align 8 dereferenceable(84) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(52) %3) unnamed_addr #0 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %10 = load ptr, ptr %5, align 8
  %11 = load ptr, ptr %6, align 8
  %12 = load ptr, ptr %11, align 8
  store ptr %12, ptr %10, align 8, !tbaa !9
  %13 = getelementptr inbounds ptr, ptr %11, i64 1
  %14 = load ptr, ptr %13, align 8
  %15 = load ptr, ptr %10, align 8, !tbaa !9
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr %10, i64 %17
  store ptr %14, ptr %18, align 8, !tbaa !9
  %19 = getelementptr inbounds ptr, ptr %11, i64 2
  %20 = load ptr, ptr %19, align 8
  %21 = load ptr, ptr %10, align 8, !tbaa !9
  %22 = getelementptr i8, ptr %21, i64 -32
  %23 = load i64, ptr %22, align 8
  %24 = getelementptr inbounds i8, ptr %10, i64 %23
  store ptr %20, ptr %24, align 8, !tbaa !9
  %25 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 2
  store ptr null, ptr %25, align 8, !tbaa !11
  %26 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 3
  store i8 1, ptr %26, align 8, !tbaa !15
  %27 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 4
  store i8 0, ptr %27, align 1, !tbaa !16
  %28 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 5
  store i8 0, ptr %28, align 2, !tbaa !17
  %29 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 6
  store i8 1, ptr %29, align 1, !tbaa !18
  %30 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 7
  store i32 1, ptr %30, align 4, !tbaa !19
  %31 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 8
  store i32 1, ptr %31, align 8, !tbaa !20
  %32 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 9
  store i32 32774, ptr %32, align 4, !tbaa !21
  %33 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 10
  store i32 513, ptr %33, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #2
  store i32 0, ptr %9, align 4, !tbaa !23
  br label %34

34:                                               ; preds = %43, %4
  %35 = load i32, ptr %9, align 4, !tbaa !23
  %36 = icmp ult i32 %35, 6
  br i1 %36, label %38, label %37

37:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #2
  br label %46

38:                                               ; preds = %34
  %39 = getelementptr inbounds %"class.Glip::CorePipeline::AbstractFilterLayout", ptr %10, i32 0, i32 1
  %40 = load i32, ptr %9, align 4, !tbaa !23
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds [6 x ptr], ptr %39, i64 0, i64 %41
  store ptr null, ptr %42, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %38
  %44 = load i32, ptr %9, align 4, !tbaa !23
  %45 = add i32 %44, 1
  store i32 %45, ptr %9, align 4, !tbaa !23
  br label %34, !llvm.loop !24

46:                                               ; preds = %37
  ret void
}

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 56}
!12 = !{!"_ZTSN4Glip12CorePipeline20AbstractFilterLayoutE", !7, i64 8, !6, i64 56, !13, i64 64, !13, i64 65, !13, i64 66, !13, i64 67, !14, i64 68, !14, i64 72, !14, i64 76, !14, i64 80}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !13, i64 64}
!16 = !{!12, !13, i64 65}
!17 = !{!12, !13, i64 66}
!18 = !{!12, !13, i64 67}
!19 = !{!12, !14, i64 68}
!20 = !{!12, !14, i64 72}
!21 = !{!12, !14, i64 76}
!22 = !{!12, !14, i64 80}
!23 = !{!14, !14, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"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"

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local void @_ZN4Glip12CorePipeline20AbstractFilterLayoutC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_6CoreGL24HdlAbstractTextureFormatE(ptr nocapture noundef nonnull align 8 dereferenceable(84) %0, ptr nocapture noundef readonly %1, ptr nocapture noundef nonnull readnone align 8 dereferenceable(32) %2, ptr nocapture noundef nonnull readnone align 8 dereferenceable(52) %3) unnamed_addr #0 align 2 {
  %5 = load ptr, ptr %1, align 8
  store ptr %5, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load ptr, ptr %6, align 8
  %8 = getelementptr i8, ptr %5, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 %9
  store ptr %7, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %1, i64 16
  %12 = load ptr, ptr %11, align 8
  %13 = load ptr, ptr %0, align 8, !tbaa !5
  %14 = getelementptr i8, ptr %13, i64 -32
  %15 = load i64, ptr %14, align 8
  %16 = getelementptr inbounds i8, ptr %0, i64 %15
  store ptr %12, ptr %16, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr null, ptr %17, align 8, !tbaa !8
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  store <4 x i8> <i8 1, i8 0, i8 0, i8 1>, ptr %18, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %0, i64 68
  store <4 x i32> <i32 1, i32 1, i32 32774, i32 513>, ptr %19, align 4, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %20, i8 0, i64 48, i1 false), !tbaa !16
  ret void
}

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

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: readwrite, inaccessiblemem: none) 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 nounwind willreturn memory(argmem: write) }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !11, i64 56}
!9 = !{!"_ZTSN4Glip12CorePipeline20AbstractFilterLayoutE", !10, i64 8, !11, i64 56, !12, i64 64, !12, i64 65, !12, i64 66, !12, i64 67, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!"any pointer", !10, i64 0}
!12 = !{!"bool", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!13, !13, i64 0}
!16 = !{!11, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass