; LLVM IR from ermig1979/Simd :: src/Simd/SimdBaseImageLoadPpm.ll (ZN4Simd4Base14ImagePxmLoader10ReadHeaderEm)

; 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.Simd::ImageLoader" = type { ptr, %"struct.Simd::ImageLoaderParam", %"class.Simd::InputMemoryStream", %"struct.Simd::View" }
%"struct.Simd::ImageLoaderParam" = type { ptr, i64, i32, i32 }
%"class.Simd::InputMemoryStream" = type { ptr, i64, i64, i64, i64 }
%"struct.Simd::View" = type <{ i64, i64, i64, i32, [4 x i8], ptr, i8, [7 x i8] }>
%"class.Simd::Base::ImagePxmLoader" = type { %"class.Simd::ImageLoader", ptr, ptr, %"struct.Simd::Array", i64, i64 }
%"struct.Simd::Array" = type { ptr, i64 }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4Simd4Base14ImagePxmLoader10ReadHeaderEm(ptr noundef nonnull align 8 dereferenceable(168) %0, i64 noundef %1) #0 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %11 = load ptr, ptr %4, align 8
  %12 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %13 = call noundef i64 @_ZNK4Simd17InputMemoryStream4SizeEv(ptr noundef nonnull align 8 dereferenceable(40) %12)
  %14 = icmp ult i64 %13, 3
  br i1 %14, label %38, label %15

15:                                               ; preds = %2
  %16 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %17 = call noundef ptr @_ZNK4Simd17InputMemoryStream4DataEv(ptr noundef nonnull align 8 dereferenceable(40) %16)
  %18 = getelementptr inbounds i8, ptr %17, i64 0
  %19 = load i8, ptr %18, align 1, !tbaa !11
  %20 = zext i8 %19 to i32
  %21 = icmp ne i32 %20, 80
  br i1 %21, label %38, label %22

22:                                               ; preds = %15
  %23 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %24 = call noundef ptr @_ZNK4Simd17InputMemoryStream4DataEv(ptr noundef nonnull align 8 dereferenceable(40) %23)
  %25 = getelementptr inbounds i8, ptr %24, i64 1
  %26 = load i8, ptr %25, align 1, !tbaa !11
  %27 = zext i8 %26 to i64
  %28 = load i64, ptr %5, align 8, !tbaa !9
  %29 = add i64 48, %28
  %30 = icmp ne i64 %27, %29
  br i1 %30, label %38, label %31

31:                                               ; preds = %22
  %32 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %33 = call noundef ptr @_ZNK4Simd17InputMemoryStream4DataEv(ptr noundef nonnull align 8 dereferenceable(40) %32)
  %34 = getelementptr inbounds i8, ptr %33, i64 2
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = zext i8 %35 to i32
  %37 = icmp ne i32 %36, 10
  br i1 %37, label %38, label %39

38:                                               ; preds = %31, %22, %15, %2
  store i1 false, ptr %3, align 1
  br label %159

39:                                               ; preds = %31
  %40 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %41 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream4SeekEm(ptr noundef nonnull align 8 dereferenceable(40) %40, i64 noundef 3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %42 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %43 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream12ReadUnsignedIjEEbRT_(ptr noundef nonnull align 8 dereferenceable(40) %42, ptr noundef nonnull align 4 dereferenceable(4) %6)
  br i1 %43, label %44, label %50

44:                                               ; preds = %39
  %45 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %46 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream12ReadUnsignedIjEEbRT_(ptr noundef nonnull align 8 dereferenceable(40) %45, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br i1 %46, label %47, label %50

47:                                               ; preds = %44
  %48 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %49 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream12ReadUnsignedIjEEbRT_(ptr noundef nonnull align 8 dereferenceable(40) %48, ptr noundef nonnull align 4 dereferenceable(4) %8)
  br i1 %49, label %51, label %50

50:                                               ; preds = %47, %44, %39
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %158

51:                                               ; preds = %47
  %52 = load i32, ptr %6, align 4, !tbaa !12
  %53 = icmp ugt i32 %52, 0
  br i1 %53, label %54, label %60

54:                                               ; preds = %51
  %55 = load i32, ptr %7, align 4, !tbaa !12
  %56 = icmp ugt i32 %55, 0
  br i1 %56, label %57, label %60

57:                                               ; preds = %54
  %58 = load i32, ptr %8, align 4, !tbaa !12
  %59 = icmp eq i32 %58, 255
  br i1 %59, label %61, label %60

60:                                               ; preds = %57, %54, %51
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %158

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  %62 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 2
  %63 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream4ReadIhEEbRT_(ptr noundef nonnull align 8 dereferenceable(40) %62, ptr noundef nonnull align 1 dereferenceable(1) %10)
  br i1 %63, label %64, label %68

64:                                               ; preds = %61
  %65 = load i8, ptr %10, align 1, !tbaa !11
  %66 = zext i8 %65 to i32
  %67 = icmp eq i32 %66, 10
  br i1 %67, label %69, label %68

68:                                               ; preds = %64, %61
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %157

69:                                               ; preds = %64
  %70 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 3
  %71 = load i32, ptr %6, align 4, !tbaa !12
  %72 = zext i32 %71 to i64
  %73 = load i32, ptr %7, align 4, !tbaa !12
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 1
  %76 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %75, i32 0, i32 3
  %77 = load i32, ptr %76, align 4, !tbaa !14
  %78 = call noundef i64 @_ZN4Simd9AllocatorIhE9AlignmentEv()
  call void @_ZN4Simd4ViewINS_9AllocatorEE8RecreateEmmNS2_6FormatEPvm(ptr noundef nonnull align 8 dereferenceable(41) %70, i64 noundef %72, i64 noundef %74, i32 noundef %77, ptr noundef null, i64 noundef %78)
  %79 = load i32, ptr %7, align 4, !tbaa !12
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 4
  store i64 %80, ptr %81, align 8, !tbaa !23
  %82 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 1
  %83 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 8, !tbaa !26
  %85 = icmp eq i32 %84, 1
  br i1 %85, label %91, label %86

86:                                               ; preds = %69
  %87 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 1
  %88 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %87, i32 0, i32 2
  %89 = load i32, ptr %88, align 8, !tbaa !26
  %90 = icmp eq i32 %89, 2
  br i1 %90, label %91, label %116

91:                                               ; preds = %86, %69
  %92 = load i32, ptr %6, align 4, !tbaa !12
  %93 = mul i32 %92, 1
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 5
  store i64 %94, ptr %95, align 8, !tbaa !27
  %96 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 1
  %97 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %96, i32 0, i32 3
  %98 = load i32, ptr %97, align 4, !tbaa !14
  %99 = icmp ne i32 %98, 1
  br i1 %99, label %100, label %115

100:                                              ; preds = %91
  %101 = call noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev()
  %102 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 5
  %103 = load i64, ptr %102, align 8, !tbaa !27
  %104 = udiv i64 %101, %103
  %105 = load i32, ptr %7, align 4, !tbaa !12
  %106 = zext i32 %105 to i64
  %107 = call noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef %104, i64 noundef 1, i64 noundef %106)
  %108 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 4
  store i64 %107, ptr %108, align 8, !tbaa !23
  %109 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 3
  %110 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 4
  %111 = load i64, ptr %110, align 8, !tbaa !23
  %112 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 5
  %113 = load i64, ptr %112, align 8, !tbaa !27
  %114 = mul i64 %111, %113
  call void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16) %109, i64 noundef %114, i1 noundef zeroext false, i64 noundef 8)
  br label %115

115:                                              ; preds = %100, %91
  br label %153

116:                                              ; preds = %86
  %117 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 1
  %118 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 8, !tbaa !26
  %120 = icmp eq i32 %119, 3
  br i1 %120, label %126, label %121

121:                                              ; preds = %116
  %122 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 1
  %123 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %122, i32 0, i32 2
  %124 = load i32, ptr %123, align 8, !tbaa !26
  %125 = icmp eq i32 %124, 4
  br i1 %125, label %126, label %151

126:                                              ; preds = %121, %116
  %127 = load i32, ptr %6, align 4, !tbaa !12
  %128 = mul i32 %127, 3
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 5
  store i64 %129, ptr %130, align 8, !tbaa !27
  %131 = getelementptr inbounds %"class.Simd::ImageLoader", ptr %11, i32 0, i32 1
  %132 = getelementptr inbounds %"struct.Simd::ImageLoaderParam", ptr %131, i32 0, i32 3
  %133 = load i32, ptr %132, align 4, !tbaa !14
  %134 = icmp ne i32 %133, 16
  br i1 %134, label %135, label %150

135:                                              ; preds = %126
  %136 = call noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev()
  %137 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 5
  %138 = load i64, ptr %137, align 8, !tbaa !27
  %139 = udiv i64 %136, %138
  %140 = load i32, ptr %7, align 4, !tbaa !12
  %141 = zext i32 %140 to i64
  %142 = call noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef %139, i64 noundef 1, i64 noundef %141)
  %143 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 4
  store i64 %142, ptr %143, align 8, !tbaa !23
  %144 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 3
  %145 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 4
  %146 = load i64, ptr %145, align 8, !tbaa !23
  %147 = getelementptr inbounds %"class.Simd::Base::ImagePxmLoader", ptr %11, i32 0, i32 5
  %148 = load i64, ptr %147, align 8, !tbaa !27
  %149 = mul i64 %146, %148
  call void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16) %144, i64 noundef %149, i1 noundef zeroext false, i64 noundef 8)
  br label %150

150:                                              ; preds = %135, %126
  br label %152

151:                                              ; preds = %121
  store i1 false, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %157

152:                                              ; preds = %150
  br label %153

153:                                              ; preds = %152, %115
  %154 = load ptr, ptr %11, align 8, !tbaa !28
  %155 = getelementptr inbounds ptr, ptr %154, i64 3
  %156 = load ptr, ptr %155, align 8
  call void %156(ptr noundef nonnull align 8 dereferenceable(168) %11)
  store i1 true, ptr %3, align 1
  store i32 1, ptr %9, align 4
  br label %157

157:                                              ; preds = %153, %151, %68
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  br label %158

158:                                              ; preds = %157, %60, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %159

159:                                              ; preds = %158, %38
  %160 = load i1, ptr %3, align 1
  ret i1 %160
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4Simd17InputMemoryStream4SizeEv(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4Simd17InputMemoryStream4DataEv(ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4Simd17InputMemoryStream4SeekEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #1 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Simd17InputMemoryStream12ReadUnsignedIjEEbRT_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Simd17InputMemoryStream4ReadIhEEbRT_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4ViewINS_9AllocatorEE8RecreateEmmNS2_6FormatEPvm(ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, i32 noundef, ptr noundef, i64 noundef) #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN4Simd9AllocatorIhE9AlignmentEv() #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef, i64 noundef, i64 noundef) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev() #1

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext, i64 noundef) #3 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { alwaysinline 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !18, i64 28}
!15 = !{!"_ZTSN4Simd11ImageLoaderE", !16, i64 8, !19, i64 32, !20, i64 72}
!16 = !{!"_ZTSN4Simd16ImageLoaderParamE", !6, i64 0, !10, i64 8, !17, i64 16, !18, i64 20}
!17 = !{!"_ZTS17SimdImageFileType", !7, i64 0}
!18 = !{!"_ZTS19SimdPixelFormatType", !7, i64 0}
!19 = !{!"_ZTSN4Simd17InputMemoryStreamE", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!20 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEEE", !10, i64 0, !10, i64 8, !10, i64 16, !21, i64 24, !6, i64 32, !22, i64 40}
!21 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEE6FormatE", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!24, !10, i64 152}
!24 = !{!"_ZTSN4Simd4Base14ImagePxmLoaderE", !15, i64 0, !6, i64 120, !6, i64 128, !25, i64 136, !10, i64 152, !10, i64 160}
!25 = !{!"_ZTSN4Simd5ArrayIhEE", !6, i64 0, !10, i64 8}
!26 = !{!15, !17, i64 24}
!27 = !{!24, !10, i64 160}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !8, i64 0}


; 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 uwtable
define dso_local noundef zeroext i1 @_ZN4Simd4Base14ImagePxmLoader10ReadHeaderEm(ptr noundef nonnull align 8 dereferenceable(168) %0, i64 noundef %1) local_unnamed_addr #0 align 2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  %8 = tail call noundef i64 @_ZNK4Simd17InputMemoryStream4SizeEv(ptr noundef nonnull align 8 dereferenceable(40) %7)
  %9 = icmp ult i64 %8, 3
  br i1 %9, label %80, label %10

10:                                               ; preds = %2
  %11 = tail call noundef ptr @_ZNK4Simd17InputMemoryStream4DataEv(ptr noundef nonnull align 8 dereferenceable(40) %7)
  %12 = load i8, ptr %11, align 1, !tbaa !5
  %.not = icmp eq i8 %12, 80
  br i1 %.not, label %13, label %80

13:                                               ; preds = %10
  %14 = tail call noundef ptr @_ZNK4Simd17InputMemoryStream4DataEv(ptr noundef nonnull align 8 dereferenceable(40) %7)
  %15 = getelementptr inbounds i8, ptr %14, i64 1
  %16 = load i8, ptr %15, align 1, !tbaa !5
  %17 = zext i8 %16 to i64
  %18 = add i64 %1, 48
  %.not9 = icmp eq i64 %18, %17
  br i1 %.not9, label %19, label %80

19:                                               ; preds = %13
  %20 = tail call noundef ptr @_ZNK4Simd17InputMemoryStream4DataEv(ptr noundef nonnull align 8 dereferenceable(40) %7)
  %21 = getelementptr inbounds i8, ptr %20, i64 2
  %22 = load i8, ptr %21, align 1, !tbaa !5
  %.not10 = icmp eq i8 %22, 10
  br i1 %.not10, label %23, label %80

23:                                               ; preds = %19
  %24 = tail call noundef zeroext i1 @_ZN4Simd17InputMemoryStream4SeekEm(ptr noundef nonnull align 8 dereferenceable(40) %7, i64 noundef 3)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %25 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream12ReadUnsignedIjEEbRT_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
  br i1 %25, label %26, label %79

26:                                               ; preds = %23
  %27 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream12ReadUnsignedIjEEbRT_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br i1 %27, label %28, label %79

28:                                               ; preds = %26
  %29 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream12ReadUnsignedIjEEbRT_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br i1 %29, label %30, label %79

30:                                               ; preds = %28
  %31 = load i32, ptr %3, align 4, !tbaa !8
  %32 = icmp ne i32 %31, 0
  %33 = load i32, ptr %4, align 4
  %34 = icmp ne i32 %33, 0
  %or.cond = select i1 %32, i1 %34, i1 false
  %35 = load i32, ptr %5, align 4
  %36 = icmp eq i32 %35, 255
  %or.cond3 = select i1 %or.cond, i1 %36, i1 false
  br i1 %or.cond3, label %37, label %79

37:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #4
  %38 = call noundef zeroext i1 @_ZN4Simd17InputMemoryStream4ReadIhEEbRT_(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 1 dereferenceable(1) %6)
  %39 = load i8, ptr %6, align 1
  %40 = icmp eq i8 %39, 10
  %or.cond6 = select i1 %38, i1 %40, i1 false
  br i1 %or.cond6, label %41, label %78

41:                                               ; preds = %37
  %42 = getelementptr inbounds i8, ptr %0, i64 72
  %43 = load i32, ptr %3, align 4, !tbaa !8
  %44 = zext i32 %43 to i64
  %45 = load i32, ptr %4, align 4, !tbaa !8
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds i8, ptr %0, i64 28
  %48 = load i32, ptr %47, align 4, !tbaa !10
  %49 = call noundef i64 @_ZN4Simd9AllocatorIhE9AlignmentEv()
  call void @_ZN4Simd4ViewINS_9AllocatorEE8RecreateEmmNS2_6FormatEPvm(ptr noundef nonnull align 8 dereferenceable(41) %42, i64 noundef %44, i64 noundef %46, i32 noundef %48, ptr noundef null, i64 noundef %49)
  %50 = load i32, ptr %4, align 4, !tbaa !8
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds i8, ptr %0, i64 152
  store i64 %51, ptr %52, align 8, !tbaa !21
  %53 = getelementptr inbounds i8, ptr %0, i64 24
  %54 = load i32, ptr %53, align 8, !tbaa !24
  switch i32 %54, label %78 [
    i32 1, label %55
    i32 2, label %55
    i32 3, label %60
    i32 4, label %60
  ]

55:                                               ; preds = %41, %41
  %56 = load i32, ptr %3, align 4, !tbaa !8
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %0, i64 160
  store i64 %57, ptr %58, align 8, !tbaa !25
  %59 = load i32, ptr %47, align 4, !tbaa !10
  %.not12 = icmp eq i32 %59, 1
  br i1 %.not12, label %74, label %.sink.split

60:                                               ; preds = %41, %41
  %61 = load i32, ptr %3, align 4, !tbaa !8
  %62 = mul i32 %61, 3
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds i8, ptr %0, i64 160
  store i64 %63, ptr %64, align 8, !tbaa !25
  %65 = load i32, ptr %47, align 4, !tbaa !10
  %.not11 = icmp eq i32 %65, 16
  br i1 %.not11, label %74, label %.sink.split

.sink.split:                                      ; preds = %60, %55
  %.sink21 = phi ptr [ %58, %55 ], [ %64, %60 ]
  %66 = call noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev()
  %67 = load i64, ptr %.sink21, align 8, !tbaa !25
  %68 = udiv i64 %66, %67
  %.sink = load i32, ptr %4, align 4, !tbaa !8
  %69 = zext i32 %.sink to i64
  %70 = call noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef %68, i64 noundef 1, i64 noundef %69)
  store i64 %70, ptr %52, align 8, !tbaa !21
  %71 = getelementptr inbounds i8, ptr %0, i64 136
  %72 = load i64, ptr %.sink21, align 8, !tbaa !25
  %73 = mul i64 %72, %70
  call void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16) %71, i64 noundef %73, i1 noundef zeroext false, i64 noundef 8)
  br label %74

74:                                               ; preds = %.sink.split, %60, %55
  %75 = load ptr, ptr %0, align 8, !tbaa !26
  %76 = getelementptr inbounds i8, ptr %75, i64 24
  %77 = load ptr, ptr %76, align 8
  call void %77(ptr noundef nonnull align 8 dereferenceable(168) %0)
  br label %78

78:                                               ; preds = %41, %37, %74
  %.0 = phi i1 [ true, %74 ], [ false, %37 ], [ false, %41 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #4
  br label %79

79:                                               ; preds = %30, %23, %26, %28, %78
  %.1 = phi i1 [ %.0, %78 ], [ false, %28 ], [ false, %26 ], [ false, %23 ], [ false, %30 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  br label %80

80:                                               ; preds = %2, %10, %13, %19, %79
  %.2 = phi i1 [ %.1, %79 ], [ false, %19 ], [ false, %13 ], [ false, %10 ], [ false, %2 ]
  ret i1 %.2
}

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4Simd17InputMemoryStream4SizeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4Simd17InputMemoryStream4DataEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN4Simd17InputMemoryStream4SeekEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Simd17InputMemoryStream12ReadUnsignedIjEEbRT_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4Simd17InputMemoryStream4ReadIhEEbRT_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd4ViewINS_9AllocatorEE8RecreateEmmNS2_6FormatEPvm(ptr noundef nonnull align 8 dereferenceable(41), i64 noundef, i64 noundef, i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN4Simd9AllocatorIhE9AlignmentEv() local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef i64 @_ZN4Simd13RestrictRangeImEET_S1_S1_S1_(i64 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN4Simd4Base10AlgCacheL1Ev() local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN4Simd5ArrayIhE6ResizeEmbm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef, i1 noundef zeroext, i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { alwaysinline 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !16, i64 28}
!11 = !{!"_ZTSN4Simd11ImageLoaderE", !12, i64 8, !17, i64 32, !18, i64 72}
!12 = !{!"_ZTSN4Simd16ImageLoaderParamE", !13, i64 0, !14, i64 8, !15, i64 16, !16, i64 20}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!"long", !6, i64 0}
!15 = !{!"_ZTS17SimdImageFileType", !6, i64 0}
!16 = !{!"_ZTS19SimdPixelFormatType", !6, i64 0}
!17 = !{!"_ZTSN4Simd17InputMemoryStreamE", !13, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32}
!18 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEEE", !14, i64 0, !14, i64 8, !14, i64 16, !19, i64 24, !13, i64 32, !20, i64 40}
!19 = !{!"_ZTSN4Simd4ViewINS_9AllocatorEE6FormatE", !6, i64 0}
!20 = !{!"bool", !6, i64 0}
!21 = !{!22, !14, i64 152}
!22 = !{!"_ZTSN4Simd4Base14ImagePxmLoaderE", !11, i64 0, !13, i64 120, !13, i64 128, !23, i64 136, !14, i64 152, !14, i64 160}
!23 = !{!"_ZTSN4Simd5ArrayIhEE", !13, i64 0, !14, i64 8}
!24 = !{!11, !15, i64 24}
!25 = !{!22, !14, i64 160}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !7, i64 0}


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