; LLVM IR from bldeng/AASolver :: AndersonOpt/external/OpenMesh/Core/IO/reader (OMReader)

; 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.OpenMesh::IO::_OMReader_" = type { %"class.OpenMesh::IO::BaseReader", i64, %"class.OpenMesh::IO::Options", %"struct.OpenMesh::IO::OMFormat::Header", %"struct.OpenMesh::IO::OMFormat::Chunk::Header", %"class.OpenMesh::IO::OMFormat::Chunk::PropertyName" }
%"class.OpenMesh::IO::BaseReader" = type { ptr }
%"class.OpenMesh::IO::Options" = type { i32 }
%"struct.OpenMesh::IO::OMFormat::Header" = type { [2 x i8], i8, i8, i32, i32, i32 }
%"struct.OpenMesh::IO::OMFormat::Chunk::Header" = type { i32 }
%"class.OpenMesh::IO::OMFormat::Chunk::PropertyName" = type { %"class.std::__cxx11::basic_string" }
%"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] }

@.str.4 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [44 x i8], align 1
@__PRETTY_FUNCTION__._ZNK8OpenMesh2IO10_OMReader_22read_binary_edge_chunkERSiRNS0_12BaseImporterERNS0_7OptionsEb = external hidden unnamed_addr constant [109 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO10_OMReader_22read_binary_edge_chunkERSiRNS0_12BaseImporterERNS0_7OptionsEb(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, i1 noundef zeroext %4) #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %13 = zext i1 %4 to i8
  store i8 %13, ptr %10, align 1, !tbaa !9
  %14 = load ptr, ptr %6, align 8
  %15 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 4
  %16 = load i32, ptr %15, align 4
  %17 = lshr i32 %16, 2
  %18 = and i32 %17, 7
  %19 = icmp eq i32 %18, 4
  br i1 %19, label %20, label %21

20:                                               ; preds = %5
  br label %23

21:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.4, i32 noundef 458, ptr noundef @__PRETTY_FUNCTION__._ZNK8OpenMesh2IO10_OMReader_22read_binary_edge_chunkERSiRNS0_12BaseImporterERNS0_7OptionsEb) #5
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %24 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 1
  %25 = load i64, ptr %24, align 8, !tbaa !11
  store i64 %25, ptr %11, align 8, !tbaa !22
  %26 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 4
  %27 = load i32, ptr %26, align 4
  %28 = lshr i32 %27, 5
  %29 = and i32 %28, 15
  switch i32 %29, label %49 [
    i32 6, label %30
  ]

30:                                               ; preds = %23
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %32, align 8, !tbaa !23
  %34 = getelementptr inbounds ptr, ptr %33, i64 28
  %35 = load ptr, ptr %34, align 8
  %36 = call noundef ptr %35(ptr noundef nonnull align 8 dereferenceable(8) %32)
  %37 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 5
  %38 = call noundef ptr @_ZN8OpenMesh10BaseKernel10_get_epropERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %36, ptr noundef nonnull align 8 dereferenceable(32) %37)
  %39 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 3
  %40 = getelementptr inbounds %"struct.OpenMesh::IO::OMFormat::Header", ptr %39, i32 0, i32 5
  %41 = load i32, ptr %40, align 4, !tbaa !25
  %42 = zext i32 %41 to i64
  %43 = load i8, ptr %10, align 1, !tbaa !9, !range !26, !noundef !27
  %44 = trunc i8 %43 to i1
  %45 = call noundef i64 @_ZNK8OpenMesh2IO10_OMReader_26restore_binary_custom_dataERSiPNS_12BasePropertyEmb(ptr noundef nonnull align 8 dereferenceable(72) %14, ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef %38, i64 noundef %42, i1 noundef zeroext %44)
  %46 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 1
  %47 = load i64, ptr %46, align 8, !tbaa !11
  %48 = add i64 %47, %45
  store i64 %48, ptr %46, align 8, !tbaa !11
  br label %60

49:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %50 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 3
  %51 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 4
  %52 = call noundef i64 @_ZN8OpenMesh2IO8OMFormat15chunk_data_sizeERNS1_6HeaderERNS1_5Chunk6HeaderE(ptr noundef nonnull align 4 dereferenceable(16) %50, ptr noundef nonnull align 4 dereferenceable(4) %51)
  store i64 %52, ptr %12, align 8, !tbaa !22
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load i64, ptr %12, align 8, !tbaa !22
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi6ignoreEl(ptr noundef nonnull align 8 dereferenceable(16) %53, i64 noundef %54)
  %56 = load i64, ptr %12, align 8, !tbaa !22
  %57 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 1
  %58 = load i64, ptr %57, align 8, !tbaa !11
  %59 = add i64 %58, %56
  store i64 %59, ptr %57, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %60

60:                                               ; preds = %49, %30
  %61 = load i64, ptr %11, align 8, !tbaa !22
  %62 = getelementptr inbounds %"class.OpenMesh::IO::_OMReader_", ptr %14, i32 0, i32 1
  %63 = load i64, ptr %62, align 8, !tbaa !11
  %64 = icmp ult i64 %61, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret i1 %64
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK8OpenMesh2IO10_OMReader_26restore_binary_custom_dataERSiPNS_12BasePropertyEmb(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef, i1 noundef zeroext) #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi6ignoreEl(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8OpenMesh10BaseKernel10_get_epropERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { noreturn 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 #3 = { "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 = { noreturn nounwind }
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 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !14, i64 8}
!12 = !{!"_ZTSN8OpenMesh2IO10_OMReader_E", !13, i64 0, !14, i64 8, !15, i64 16, !17, i64 20, !18, i64 36, !19, i64 40}
!13 = !{!"_ZTSN8OpenMesh2IO10BaseReaderE"}
!14 = !{!"long", !7, i64 0}
!15 = !{!"_ZTSN8OpenMesh2IO7OptionsE", !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN8OpenMesh2IO8OMFormat6HeaderE", !7, i64 0, !7, i64 2, !7, i64 3, !16, i64 4, !16, i64 8, !16, i64 12}
!18 = !{!"_ZTSN8OpenMesh2IO8OMFormat5Chunk6HeaderE", !16, i64 0, !16, i64 0, !16, i64 0, !16, i64 0, !16, i64 1, !16, i64 1, !16, i64 1, !16, i64 1, !16, i64 2}
!19 = !{!"_ZTSN8OpenMesh2IO8OMFormat5Chunk12PropertyNameE", !20, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !14, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!14, !14, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = !{!12, !16, i64 32}
!26 = !{i8 0, i8 2}
!27 = !{}


; 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.4 = external hidden unnamed_addr constant [106 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [44 x i8], align 1
@__PRETTY_FUNCTION__._ZNK8OpenMesh2IO10_OMReader_22read_binary_edge_chunkERSiRNS0_12BaseImporterERNS0_7OptionsEb = external hidden unnamed_addr constant [109 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK8OpenMesh2IO10_OMReader_22read_binary_edge_chunkERSiRNS0_12BaseImporterERNS0_7OptionsEb(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr nocapture noundef nonnull readnone align 4 dereferenceable(4) %3, i1 noundef zeroext %4) local_unnamed_addr #0 align 2 {
  %6 = getelementptr inbounds i8, ptr %0, i64 36
  %7 = load i32, ptr %6, align 4
  %8 = and i32 %7, 28
  %9 = icmp eq i32 %8, 16
  br i1 %9, label %11, label %10

10:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.4, i32 noundef 458, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK8OpenMesh2IO10_OMReader_22read_binary_edge_chunkERSiRNS0_12BaseImporterERNS0_7OptionsEb) #4
  unreachable

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !5
  %14 = and i32 %7, 480
  %cond = icmp eq i32 %14, 192
  br i1 %cond, label %15, label %26

15:                                               ; preds = %11
  %16 = load ptr, ptr %2, align 8, !tbaa !19
  %17 = getelementptr inbounds i8, ptr %16, i64 224
  %18 = load ptr, ptr %17, align 8
  %19 = tail call noundef ptr %18(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  %21 = tail call noundef ptr @_ZN8OpenMesh10BaseKernel10_get_epropERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168) %19, ptr noundef nonnull align 8 dereferenceable(32) %20)
  %22 = getelementptr inbounds i8, ptr %0, i64 32
  %23 = load i32, ptr %22, align 8, !tbaa !21
  %24 = zext i32 %23 to i64
  %25 = tail call noundef i64 @_ZNK8OpenMesh2IO10_OMReader_26restore_binary_custom_dataERSiPNS_12BasePropertyEmb(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef %21, i64 noundef %24, i1 noundef zeroext %4)
  br label %30

26:                                               ; preds = %11
  %27 = getelementptr inbounds i8, ptr %0, i64 20
  %28 = tail call noundef i64 @_ZN8OpenMesh2IO8OMFormat15chunk_data_sizeERNS1_6HeaderERNS1_5Chunk6HeaderE(ptr noundef nonnull align 4 dereferenceable(16) %27, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %29 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi6ignoreEl(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %28)
  br label %30

30:                                               ; preds = %26, %15
  %.sink7 = phi i64 [ %28, %26 ], [ %25, %15 ]
  %31 = load i64, ptr %12, align 8, !tbaa !5
  %32 = add i64 %31, %.sink7
  store i64 %32, ptr %12, align 8, !tbaa !5
  %33 = icmp ult i64 %13, %32
  ret i1 %33
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK8OpenMesh2IO10_OMReader_26restore_binary_custom_dataERSiPNS_12BasePropertyEmb(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef, i1 noundef zeroext) local_unnamed_addr #0 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSi6ignoreEl(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN8OpenMesh2IO8OMFormat15chunk_data_sizeERNS1_6HeaderERNS1_5Chunk6HeaderE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN8OpenMesh10BaseKernel10_get_epropERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(168), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 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 = { noreturn 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 #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 = { noreturn 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, !8, i64 8}
!6 = !{!"_ZTSN8OpenMesh2IO10_OMReader_E", !7, i64 0, !8, i64 8, !11, i64 16, !13, i64 20, !14, i64 36, !15, i64 40}
!7 = !{!"_ZTSN8OpenMesh2IO10BaseReaderE"}
!8 = !{!"long", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN8OpenMesh2IO7OptionsE", !12, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!"_ZTSN8OpenMesh2IO8OMFormat6HeaderE", !9, i64 0, !9, i64 2, !9, i64 3, !12, i64 4, !12, i64 8, !12, i64 12}
!14 = !{!"_ZTSN8OpenMesh2IO8OMFormat5Chunk6HeaderE", !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 2}
!15 = !{!"_ZTSN8OpenMesh2IO8OMFormat5Chunk12PropertyNameE", !16, i64 0}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !8, i64 8, !9, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !18, i64 0}
!18 = !{!"any pointer", !9, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !10, i64 0}
!21 = !{!6, !12, i64 32}


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