; LLVM IR from Overload-Technologies/Overload :: Dependencies/assimp/code/Common (ZipArchiveIOSystem)

; 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.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.4" }
%"struct.std::_Head_base.4" = type { ptr }
%"class.Assimp::ZipFileInfo" = type { i64, %struct.unz_file_pos_s }
%struct.unz_file_pos_s = type { i64, i64 }
%"class.Assimp::ZipFile" = type { %"class.Assimp::IOStream", %"class.std::__cxx11::basic_string", i64, i64, %"class.std::unique_ptr" }
%"class.Assimp::IOStream" = type { ptr }
%"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.5 = external hidden unnamed_addr constant [119 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [42 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

declare void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK6Assimp11ZipFileInfo7ExtractERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPv(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %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
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i16, align 2
  %14 = alloca %"class.std::unique_ptr", align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = 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
  %18 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %19 = getelementptr inbounds %"class.Assimp::ZipFileInfo", ptr %18, i32 0, i32 1
  store ptr %19, ptr %8, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = call i32 @unzGoToFilePos(ptr noundef %20, ptr noundef %21)
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %25

24:                                               ; preds = %3
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %124

25:                                               ; preds = %3
  %26 = load ptr, ptr %7, align 8, !tbaa !5
  %27 = call i32 @unzOpenCurrentFile(ptr noundef %26)
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %25
  store ptr null, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %124

30:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %31 = call noundef ptr @_ZN6Assimp6Intern22AllocateFromAssimpHeapnwEm(i64 noundef 64)
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.Assimp::ZipFileInfo", ptr %18, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !9
  invoke void @_ZN6Assimp7ZipFileC1ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm(ptr noundef nonnull align 8 dereferenceable(64) %31, ptr noundef nonnull align 8 dereferenceable(32) %32, i64 noundef %34)
          to label %35 unwind label %68

35:                                               ; preds = %30
  store ptr %31, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #7
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.Assimp::ZipFile", ptr %36, i32 0, i32 2
  %38 = load i64, ptr %37, align 8, !tbaa !13
  %39 = icmp ule i64 %38, 65535
  br i1 %39, label %40, label %46

40:                                               ; preds = %35
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.Assimp::ZipFile", ptr %41, i32 0, i32 2
  %43 = load i64, ptr %42, align 8, !tbaa !13
  %44 = trunc i64 %43 to i16
  %45 = zext i16 %44 to i32
  br label %47

46:                                               ; preds = %35
  br label %47

47:                                               ; preds = %46, %40
  %48 = phi i32 [ %45, %40 ], [ 65535, %46 ]
  %49 = trunc i32 %48 to i16
  store i16 %49, ptr %13, align 2, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %50 = load i16, ptr %13, align 2, !tbaa !24
  %51 = zext i16 %50 to i64
  %52 = call noalias noundef nonnull ptr @_Znam(i64 noundef %51) #8
  call void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EEC2IPhS2_vbEET_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %52) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 0, ptr %15, align 8, !tbaa !26
  br label %53

53:                                               ; preds = %107, %47
  %54 = load i64, ptr %15, align 8, !tbaa !26
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.Assimp::ZipFile", ptr %55, i32 0, i32 2
  %57 = load i64, ptr %56, align 8, !tbaa !13
  %58 = icmp ult i64 %54, %57
  br i1 %58, label %59, label %108

59:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.Assimp::ZipFile", ptr %60, i32 0, i32 2
  %62 = load i64, ptr %61, align 8, !tbaa !13
  %63 = load i64, ptr %15, align 8, !tbaa !26
  %64 = sub i64 %62, %63
  store i64 %64, ptr %16, align 8, !tbaa !26
  %65 = load i64, ptr %16, align 8, !tbaa !26
  %66 = icmp ugt i64 %65, 65535
  br i1 %66, label %67, label %72

67:                                               ; preds = %59
  store i64 65535, ptr %16, align 8, !tbaa !26
  br label %72

68:                                               ; preds = %30
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %11, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %12, align 4
  call void @_ZN6Assimp6Intern22AllocateFromAssimpHeapdlEPv(ptr noundef %31) #7
  br label %123

72:                                               ; preds = %67, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  %74 = call noundef ptr @_ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %75 = load i64, ptr %16, align 8, !tbaa !26
  %76 = trunc i64 %75 to i32
  %77 = invoke i32 @unzReadCurrentFile(ptr noundef %73, ptr noundef %74, i32 noundef %76)
          to label %78 unwind label %88

78:                                               ; preds = %72
  store i32 %77, ptr %17, align 4, !tbaa !27
  %79 = load i32, ptr %17, align 4, !tbaa !27
  %80 = load i64, ptr %16, align 8, !tbaa !26
  %81 = trunc i64 %80 to i32
  %82 = icmp ne i32 %79, %81
  br i1 %82, label %83, label %92

83:                                               ; preds = %78
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = icmp eq ptr %84, null
  br i1 %85, label %87, label %86

86:                                               ; preds = %83
  call void @_ZN6Assimp7ZipFileD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %84) #7
  call void @_ZN6Assimp6Intern22AllocateFromAssimpHeapdlEPv(ptr noundef %84) #7
  br label %87

87:                                               ; preds = %86, %83
  store ptr null, ptr %10, align 8, !tbaa !5
  store i32 3, ptr %9, align 4
  br label %105

88:                                               ; preds = %72
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %11, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %122

92:                                               ; preds = %78
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.Assimp::ZipFile", ptr %93, i32 0, i32 4
  %95 = call noundef ptr @_ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %94) #7
  %96 = load i64, ptr %15, align 8, !tbaa !26
  %97 = getelementptr inbounds i8, ptr %95, i64 %96
  %98 = call noundef ptr @_ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %99 = load i32, ptr %17, align 4, !tbaa !27
  %100 = sext i32 %99 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %97, ptr align 1 %98, i64 %100, i1 false)
  %101 = load i32, ptr %17, align 4, !tbaa !27
  %102 = sext i32 %101 to i64
  %103 = load i64, ptr %15, align 8, !tbaa !26
  %104 = add i64 %103, %102
  store i64 %104, ptr %15, align 8, !tbaa !26
  store i32 0, ptr %9, align 4
  br label %105

105:                                              ; preds = %92, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  %106 = load i32, ptr %9, align 4
  switch i32 %106, label %131 [
    i32 0, label %107
    i32 3, label %108
  ]

107:                                              ; preds = %105
  br label %53, !llvm.loop !29

108:                                              ; preds = %105, %53
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = invoke i32 @unzCloseCurrentFile(ptr noundef %109)
          to label %111 unwind label %118

111:                                              ; preds = %108
  %112 = icmp eq i32 %110, 0
  br i1 %112, label %115, label %113

113:                                              ; preds = %111
  invoke void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef @.str.6, ptr noundef @.str.5, i32 noundef 286)
          to label %114 unwind label %118

114:                                              ; preds = %113
  br label %115

115:                                              ; preds = %114, %111
  %116 = phi i1 [ true, %111 ], [ false, %114 ]
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %117, ptr %4, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %124

118:                                              ; preds = %113, %108
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %11, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %12, align 4
  br label %122

122:                                              ; preds = %118, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #7
  br label %123

123:                                              ; preds = %122, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %126

124:                                              ; preds = %115, %29, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %125 = load ptr, ptr %4, align 8
  ret ptr %125

126:                                              ; preds = %123
  %127 = load ptr, ptr %11, align 8
  %128 = load i32, ptr %12, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130

131:                                              ; preds = %105
  unreachable
}

declare i32 @unzGoToFilePos(ptr noundef, ptr noundef) #1

declare i32 @unzOpenCurrentFile(ptr noundef) #1

declare noundef ptr @_ZN6Assimp6Intern22AllocateFromAssimpHeapnwEm(i64 noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN6Assimp6Intern22AllocateFromAssimpHeapdlEPv(ptr noundef) #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EEC2IPhS2_vbEET_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #5 align 2

declare i32 @unzReadCurrentFile(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Assimp7ZipFileD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #5 align 2

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

declare i32 @unzCloseCurrentFile(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

declare void @_ZN6Assimp7ZipFileC1ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm(ptr, ptr, i64)

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

!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, !11, i64 0}
!10 = !{!"_ZTSN6Assimp11ZipFileInfoE", !11, i64 0, !12, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTS14unz_file_pos_s", !11, i64 0, !11, i64 8}
!13 = !{!14, !11, i64 40}
!14 = !{!"_ZTSN6Assimp7ZipFileE", !15, i64 0, !16, i64 8, !11, i64 40, !11, i64 48, !18, i64 56}
!15 = !{!"_ZTSN6Assimp8IOStreamE"}
!16 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !17, i64 0, !11, i64 8, !7, i64 16}
!17 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!18 = !{!"_ZTSSt10unique_ptrIA_hSt14default_deleteIS0_EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_dataIhSt14default_deleteIA_hELb1ELb1EE", !20, i64 0}
!20 = !{!"_ZTSSt15__uniq_ptr_implIhSt14default_deleteIA_hEE", !21, i64 0}
!21 = !{!"_ZTSSt5tupleIJPhSt14default_deleteIA_hEEE", !22, i64 0}
!22 = !{!"_ZTSSt11_Tuple_implILm0EJPhSt14default_deleteIA_hEEE", !23, i64 0}
!23 = !{!"_ZTSSt10_Head_baseILm0EPhLb0EE", !6, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"short", !7, i64 0}
!26 = !{!11, !11, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"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"

%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.4" }
%"struct.std::_Head_base.4" = type { ptr }

@.str.5 = external hidden unnamed_addr constant [119 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [42 x i8], align 1

; 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

declare void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK6Assimp11ZipFileInfo7ExtractERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPv(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::unique_ptr", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = tail call i32 @unzGoToFilePos(ptr noundef %2, ptr noundef nonnull %5)
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %7, label %45

7:                                                ; preds = %3
  %8 = tail call i32 @unzOpenCurrentFile(ptr noundef %2)
  %.not39 = icmp eq i32 %8, 0
  br i1 %.not39, label %9, label %45

9:                                                ; preds = %7
  %10 = tail call noundef ptr @_ZN6Assimp6Intern22AllocateFromAssimpHeapnwEm(i64 noundef 64)
  %11 = load i64, ptr %0, align 8, !tbaa !5
  invoke void @_ZN6Assimp7ZipFileC1ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm(ptr noundef nonnull align 8 dereferenceable(64) %10, ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %11)
          to label %12 unwind label %24

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %10, i64 40
  %14 = load i64, ptr %13, align 8, !tbaa !11
  %spec.select = tail call i64 @llvm.umin.i64(i64 %14, i64 65535)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %15 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %spec.select) #9
  call void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EEC2IPhS2_vbEET_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull %15) #8
  %16 = load i64, ptr %13, align 8, !tbaa !11
  %.not48 = icmp eq i64 %16, 0
  br i1 %.not48, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %12
  %17 = getelementptr inbounds i8, ptr %10, i64 56
  br label %18

18:                                               ; preds = %.lr.ph, %29
  %19 = phi i64 [ %16, %.lr.ph ], [ %34, %29 ]
  %.02847 = phi i64 [ 0, %.lr.ph ], [ %33, %29 ]
  %20 = sub i64 %19, %.02847
  %spec.store.select = call i64 @llvm.umin.i64(i64 %20, i64 65535)
  %21 = call noundef ptr @_ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %22 = trunc nuw nsw i64 %spec.store.select to i32
  %23 = invoke i32 @unzReadCurrentFile(ptr noundef %2, ptr noundef %21, i32 noundef %22)
          to label %26 unwind label %27

24:                                               ; preds = %9
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN6Assimp6Intern22AllocateFromAssimpHeapdlEPv(ptr noundef %10) #8
  br label %44

26:                                               ; preds = %18
  %.not40 = icmp eq i32 %23, %22
  br i1 %.not40, label %29, label %.thread

.thread:                                          ; preds = %26
  call void @_ZN6Assimp7ZipFileD2Ev(ptr noundef nonnull align 8 dereferenceable(64) %10) #8
  call void @_ZN6Assimp6Intern22AllocateFromAssimpHeapdlEPv(ptr noundef nonnull %10) #8
  br label %.loopexit

27:                                               ; preds = %18
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %43

29:                                               ; preds = %26
  %30 = call noundef ptr @_ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  %31 = getelementptr inbounds i8, ptr %30, i64 %.02847
  %32 = call noundef ptr @_ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %31, ptr align 1 %32, i64 %spec.store.select, i1 false)
  %33 = add i64 %.02847, %spec.store.select
  %34 = load i64, ptr %13, align 8, !tbaa !11
  %35 = icmp ult i64 %33, %34
  br i1 %35, label %18, label %.loopexit

.loopexit:                                        ; preds = %29, %12, %.thread
  %.2 = phi ptr [ null, %.thread ], [ %10, %12 ], [ %10, %29 ]
  %36 = invoke i32 @unzCloseCurrentFile(ptr noundef %2)
          to label %37 unwind label %41

37:                                               ; preds = %.loopexit
  %38 = icmp eq i32 %36, 0
  br i1 %38, label %40, label %39

39:                                               ; preds = %37
  invoke void @_ZN6Assimp17aiAssertViolationEPKcS1_i(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.5, i32 noundef 286)
          to label %40 unwind label %41

40:                                               ; preds = %39, %37
  call void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %45

41:                                               ; preds = %39, %.loopexit
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %43

43:                                               ; preds = %41, %27
  %.pn = phi { ptr, i32 } [ %42, %41 ], [ %28, %27 ]
  call void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %44

44:                                               ; preds = %43, %24
  %.pn.pn = phi { ptr, i32 } [ %.pn, %43 ], [ %25, %24 ]
  resume { ptr, i32 } %.pn.pn

45:                                               ; preds = %7, %3, %40
  %.0 = phi ptr [ %.2, %40 ], [ null, %3 ], [ null, %7 ]
  ret ptr %.0
}

declare i32 @unzGoToFilePos(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @unzOpenCurrentFile(ptr noundef) local_unnamed_addr #1

declare noundef ptr @_ZN6Assimp6Intern22AllocateFromAssimpHeapnwEm(i64 noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN6Assimp6Intern22AllocateFromAssimpHeapdlEPv(ptr noundef) local_unnamed_addr #3

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EEC2IPhS2_vbEET_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #5 align 2

declare i32 @unzReadCurrentFile(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Assimp7ZipFileD2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #5 align 2

; Function Attrs: mustprogress 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) #6

declare i32 @unzCloseCurrentFile(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIA_hSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

declare void @_ZN6Assimp7ZipFileC1ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm(ptr, ptr, i64) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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"="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 #3 = { 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 #4 = { nobuiltin allocsize(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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }

!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 = !{!"_ZTSN6Assimp11ZipFileInfoE", !7, i64 0, !10, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS14unz_file_pos_s", !7, i64 0, !7, i64 8}
!11 = !{!12, !7, i64 40}
!12 = !{!"_ZTSN6Assimp7ZipFileE", !13, i64 0, !14, i64 8, !7, i64 40, !7, i64 48, !17, i64 56}
!13 = !{!"_ZTSN6Assimp8IOStreamE"}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !7, i64 8, !8, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !16, i64 0}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"_ZTSSt10unique_ptrIA_hSt14default_deleteIS0_EE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_dataIhSt14default_deleteIA_hELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_implIhSt14default_deleteIA_hEE", !20, i64 0}
!20 = !{!"_ZTSSt5tupleIJPhSt14default_deleteIA_hEEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Tuple_implILm0EJPhSt14default_deleteIA_hEEE", !22, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm0EPhLb0EE", !16, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass