; LLVM IR from venumb/ZSPACE :: cpp/depends/lodePNG/lodepng_unittest.ll (Z17testOtherPattern1v)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.Image = type { %"class.std::vector", i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.56 = external hidden unnamed_addr constant [22 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11doCodecTestR5Image(ptr noundef nonnull align 8 dereferenceable(40)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5ImageC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17testOtherPattern1v() #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.Image, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.56)
  %10 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 40, ptr %1) #6
  call void @_ZN5ImageC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 192, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  store i64 192, ptr %3, align 8, !tbaa !5
  %11 = load i64, ptr %2, align 8, !tbaa !5
  %12 = trunc i64 %11 to i32
  %13 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 1
  store i32 %12, ptr %13, align 8, !tbaa !9
  %14 = load i64, ptr %3, align 8, !tbaa !5
  %15 = trunc i64 %14 to i32
  %16 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 2
  store i32 %15, ptr %16, align 4, !tbaa !18
  %17 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 3
  store i32 6, ptr %17, align 8, !tbaa !19
  %18 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 4
  store i32 8, ptr %18, align 4, !tbaa !20
  %19 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 0
  %20 = load i64, ptr %2, align 8, !tbaa !5
  %21 = load i64, ptr %3, align 8, !tbaa !5
  %22 = mul i64 %20, %21
  %23 = mul i64 %22, 4
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %23)
          to label %24 unwind label %30

24:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !5
  br label %25

25:                                               ; preds = %181, %24
  %26 = load i64, ptr %6, align 8, !tbaa !5
  %27 = load i64, ptr %3, align 8, !tbaa !5
  %28 = icmp ult i64 %26, %27
  br i1 %28, label %34, label %29

29:                                               ; preds = %25
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %184

30:                                               ; preds = %184, %0
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %1) #6
  br label %186

34:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %177, %34
  %36 = load i64, ptr %8, align 8, !tbaa !5
  %37 = load i64, ptr %2, align 8, !tbaa !5
  %38 = icmp ult i64 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 5, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %180

40:                                               ; preds = %35
  %41 = load i64, ptr %8, align 8, !tbaa !5
  %42 = load i64, ptr %8, align 8, !tbaa !5
  %43 = mul i64 %41, %42
  %44 = load i64, ptr %6, align 8, !tbaa !5
  %45 = load i64, ptr %6, align 8, !tbaa !5
  %46 = mul i64 %44, %45
  %47 = add i64 %43, %46
  %48 = uitofp i64 %47 to double
  %49 = load i64, ptr %2, align 8, !tbaa !5
  %50 = load i64, ptr %3, align 8, !tbaa !5
  %51 = mul i64 %49, %50
  %52 = uitofp i64 %51 to double
  %53 = fdiv double %52, 8.000000e+00
  %54 = fdiv double %48, %53
  %55 = call double @sin(double noundef %54) #6
  %56 = fadd double 1.000000e+00, %55
  %57 = fmul double 1.270000e+02, %56
  %58 = fptoui double %57 to i8
  %59 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 0
  %60 = load i64, ptr %2, align 8, !tbaa !5
  %61 = mul i64 4, %60
  %62 = load i64, ptr %6, align 8, !tbaa !5
  %63 = mul i64 %61, %62
  %64 = load i64, ptr %8, align 8, !tbaa !5
  %65 = mul i64 4, %64
  %66 = add i64 %63, %65
  %67 = add i64 %66, 0
  %68 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %67) #6
  store i8 %58, ptr %68, align 1, !tbaa !21
  %69 = load i64, ptr %2, align 8, !tbaa !5
  %70 = load i64, ptr %8, align 8, !tbaa !5
  %71 = sub i64 %69, %70
  %72 = sub i64 %71, 1
  %73 = load i64, ptr %2, align 8, !tbaa !5
  %74 = load i64, ptr %8, align 8, !tbaa !5
  %75 = sub i64 %73, %74
  %76 = sub i64 %75, 1
  %77 = mul i64 %72, %76
  %78 = load i64, ptr %6, align 8, !tbaa !5
  %79 = load i64, ptr %6, align 8, !tbaa !5
  %80 = mul i64 %78, %79
  %81 = add i64 %77, %80
  %82 = uitofp i64 %81 to double
  %83 = load i64, ptr %2, align 8, !tbaa !5
  %84 = load i64, ptr %3, align 8, !tbaa !5
  %85 = mul i64 %83, %84
  %86 = uitofp i64 %85 to double
  %87 = fdiv double %86, 8.000000e+00
  %88 = fdiv double %82, %87
  %89 = call double @sin(double noundef %88) #6
  %90 = fadd double 1.000000e+00, %89
  %91 = fmul double 1.270000e+02, %90
  %92 = fptoui double %91 to i8
  %93 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 0
  %94 = load i64, ptr %2, align 8, !tbaa !5
  %95 = mul i64 4, %94
  %96 = load i64, ptr %6, align 8, !tbaa !5
  %97 = mul i64 %95, %96
  %98 = load i64, ptr %8, align 8, !tbaa !5
  %99 = mul i64 4, %98
  %100 = add i64 %97, %99
  %101 = add i64 %100, 1
  %102 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %93, i64 noundef %101) #6
  store i8 %92, ptr %102, align 1, !tbaa !21
  %103 = load i64, ptr %8, align 8, !tbaa !5
  %104 = load i64, ptr %8, align 8, !tbaa !5
  %105 = mul i64 %103, %104
  %106 = load i64, ptr %3, align 8, !tbaa !5
  %107 = load i64, ptr %6, align 8, !tbaa !5
  %108 = sub i64 %106, %107
  %109 = sub i64 %108, 1
  %110 = load i64, ptr %3, align 8, !tbaa !5
  %111 = load i64, ptr %6, align 8, !tbaa !5
  %112 = sub i64 %110, %111
  %113 = sub i64 %112, 1
  %114 = mul i64 %109, %113
  %115 = add i64 %105, %114
  %116 = uitofp i64 %115 to double
  %117 = load i64, ptr %2, align 8, !tbaa !5
  %118 = load i64, ptr %3, align 8, !tbaa !5
  %119 = mul i64 %117, %118
  %120 = uitofp i64 %119 to double
  %121 = fdiv double %120, 8.000000e+00
  %122 = fdiv double %116, %121
  %123 = call double @sin(double noundef %122) #6
  %124 = fadd double 1.000000e+00, %123
  %125 = fmul double 1.270000e+02, %124
  %126 = fptoui double %125 to i8
  %127 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 0
  %128 = load i64, ptr %2, align 8, !tbaa !5
  %129 = mul i64 4, %128
  %130 = load i64, ptr %6, align 8, !tbaa !5
  %131 = mul i64 %129, %130
  %132 = load i64, ptr %8, align 8, !tbaa !5
  %133 = mul i64 4, %132
  %134 = add i64 %131, %133
  %135 = add i64 %134, 2
  %136 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %127, i64 noundef %135) #6
  store i8 %126, ptr %136, align 1, !tbaa !21
  %137 = load i64, ptr %2, align 8, !tbaa !5
  %138 = load i64, ptr %8, align 8, !tbaa !5
  %139 = sub i64 %137, %138
  %140 = sub i64 %139, 1
  %141 = load i64, ptr %2, align 8, !tbaa !5
  %142 = load i64, ptr %8, align 8, !tbaa !5
  %143 = sub i64 %141, %142
  %144 = sub i64 %143, 1
  %145 = mul i64 %140, %144
  %146 = load i64, ptr %3, align 8, !tbaa !5
  %147 = load i64, ptr %6, align 8, !tbaa !5
  %148 = sub i64 %146, %147
  %149 = sub i64 %148, 1
  %150 = load i64, ptr %3, align 8, !tbaa !5
  %151 = load i64, ptr %6, align 8, !tbaa !5
  %152 = sub i64 %150, %151
  %153 = sub i64 %152, 1
  %154 = mul i64 %149, %153
  %155 = add i64 %145, %154
  %156 = uitofp i64 %155 to double
  %157 = load i64, ptr %2, align 8, !tbaa !5
  %158 = load i64, ptr %3, align 8, !tbaa !5
  %159 = mul i64 %157, %158
  %160 = uitofp i64 %159 to double
  %161 = fdiv double %160, 8.000000e+00
  %162 = fdiv double %156, %161
  %163 = call double @sin(double noundef %162) #6
  %164 = fadd double 1.000000e+00, %163
  %165 = fmul double 1.270000e+02, %164
  %166 = fptoui double %165 to i8
  %167 = getelementptr inbounds %struct.Image, ptr %1, i32 0, i32 0
  %168 = load i64, ptr %2, align 8, !tbaa !5
  %169 = mul i64 4, %168
  %170 = load i64, ptr %6, align 8, !tbaa !5
  %171 = mul i64 %169, %170
  %172 = load i64, ptr %8, align 8, !tbaa !5
  %173 = mul i64 4, %172
  %174 = add i64 %171, %173
  %175 = add i64 %174, 3
  %176 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %175) #6
  store i8 %166, ptr %176, align 1, !tbaa !21
  br label %177

177:                                              ; preds = %40
  %178 = load i64, ptr %8, align 8, !tbaa !5
  %179 = add i64 %178, 1
  store i64 %179, ptr %8, align 8, !tbaa !5
  br label %35, !llvm.loop !22

180:                                              ; preds = %39
  br label %181

181:                                              ; preds = %180
  %182 = load i64, ptr %6, align 8, !tbaa !5
  %183 = add i64 %182, 1
  store i64 %183, ptr %6, align 8, !tbaa !5
  br label %25, !llvm.loop !24

184:                                              ; preds = %29
  invoke void @_Z11doCodecTestR5Image(ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %185 unwind label %30

185:                                              ; preds = %184
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %1) #6
  ret void

186:                                              ; preds = %30
  %187 = load ptr, ptr %4, align 8
  %188 = load i32, ptr %5, align 4
  %189 = insertvalue { ptr, i32 } poison, ptr %187, 0
  %190 = insertvalue { ptr, i32 } %189, i32 %188, 1
  resume { ptr, i32 } %190
}

; Function Attrs: nounwind
declare double @sin(double noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { 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 #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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !16, i64 24}
!10 = !{!"_ZTS5Image", !11, i64 0, !16, i64 24, !16, i64 28, !17, i64 32, !16, i64 36}
!11 = !{!"_ZTSSt6vectorIhSaIhEE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTS16LodePNGColorType", !7, i64 0}
!18 = !{!10, !16, i64 28}
!19 = !{!10, !17, i64 32}
!20 = !{!10, !16, i64 36}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%struct.Image = type { %"class.std::vector", i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.56 = external hidden unnamed_addr constant [22 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11doCodecTestR5Image(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5ImageC2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17testOtherPattern1v() local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %1 = alloca %struct.Image, align 8
  %2 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.56)
  %3 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #6
  call void @_ZN5ImageC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #6
  %4 = getelementptr inbounds i8, ptr %1, i64 24
  store <4 x i32> <i32 192, i32 192, i32 6, i32 8>, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 147456)
          to label %.preheader unwind label %10

.preheader:                                       ; preds = %0, %12
  %.05558 = phi i64 [ %13, %12 ], [ 0, %0 ]
  %5 = mul nuw nsw i64 %.05558, %.05558
  %6 = mul nuw nsw i64 %.05558, 768
  %7 = sub nuw nsw i64 191, %.05558
  %8 = mul nuw nsw i64 %7, %7
  br label %14

9:                                                ; preds = %12
  invoke void @_Z11doCodecTestR5Image(ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %56 unwind label %10

10:                                               ; preds = %9, %0
  %11 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #6
  resume { ptr, i32 } %11

12:                                               ; preds = %14
  %13 = add nuw nsw i64 %.05558, 1
  %exitcond59.not = icmp eq i64 %13, 192
  br i1 %exitcond59.not, label %9, label %.preheader, !llvm.loop !8

14:                                               ; preds = %.preheader, %14
  %.057 = phi i64 [ 0, %.preheader ], [ %55, %14 ]
  %15 = mul nuw nsw i64 %.057, %.057
  %16 = add nuw nsw i64 %15, %5
  %17 = uitofp nneg i64 %16 to double
  %18 = fdiv double %17, 4.608000e+03
  %19 = call double @sin(double noundef %18) #6
  %20 = fadd double %19, 1.000000e+00
  %21 = fmul double %20, 1.270000e+02
  %22 = fptoui double %21 to i8
  %23 = shl nuw nsw i64 %.057, 2
  %24 = add nuw nsw i64 %23, %6
  %25 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %24) #6
  store i8 %22, ptr %25, align 1, !tbaa !5
  %26 = sub nuw nsw i64 191, %.057
  %27 = mul nuw nsw i64 %26, %26
  %28 = add nuw nsw i64 %27, %5
  %29 = uitofp nneg i64 %28 to double
  %30 = fdiv double %29, 4.608000e+03
  %31 = call double @sin(double noundef %30) #6
  %32 = fadd double %31, 1.000000e+00
  %33 = fmul double %32, 1.270000e+02
  %34 = fptoui double %33 to i8
  %35 = or disjoint i64 %24, 1
  %36 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %35) #6
  store i8 %34, ptr %36, align 1, !tbaa !5
  %37 = add nuw nsw i64 %15, %8
  %38 = uitofp nneg i64 %37 to double
  %39 = fdiv double %38, 4.608000e+03
  %40 = call double @sin(double noundef %39) #6
  %41 = fadd double %40, 1.000000e+00
  %42 = fmul double %41, 1.270000e+02
  %43 = fptoui double %42 to i8
  %44 = or disjoint i64 %24, 2
  %45 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %44) #6
  store i8 %43, ptr %45, align 1, !tbaa !5
  %46 = add nuw nsw i64 %27, %8
  %47 = uitofp nneg i64 %46 to double
  %48 = fdiv double %47, 4.608000e+03
  %49 = call double @sin(double noundef %48) #6
  %50 = fadd double %49, 1.000000e+00
  %51 = fmul double %50, 1.270000e+02
  %52 = fptoui double %51 to i8
  %53 = or disjoint i64 %24, 3
  %54 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIhSaIhEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %53) #6
  store i8 %52, ptr %54, align 1, !tbaa !5
  %55 = add nuw nsw i64 %.057, 1
  %exitcond.not = icmp eq i64 %55, 192
  br i1 %exitcond.not, label %12, label %14, !llvm.loop !10

56:                                               ; preds = %9
  call void @_ZN5ImageD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #6
  ret void
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


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