; LLVM IR from PaddlePaddle/Serving :: core/preprocess/hwvideoframe/src/resize.ll (ZN6ResizeclESt10shared_ptrI9OpContextE)

; 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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = 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] }
%"class.std::allocator" = type { i8 }
%class.Resize = type { i32, [2 x i32], i32, i8, i32 }
%struct.NppiSize = type { i32, i32 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ResizeclESt10shared_ptrI9OpContextE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 4 dereferenceable(24) %1, ptr noundef %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca i1, align 1
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !9
  %18 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = icmp eq i32 %19, -1
  br i1 %20, label %21, label %32

21:                                               ; preds = %3
  %22 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 1
  %23 = getelementptr inbounds [2 x i32], ptr %22, i64 0, i64 0
  %24 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 2
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %26 = load i32, ptr %25, align 4, !tbaa !9
  store i32 %26, ptr %7, align 4, !tbaa !9
  %27 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 1
  %28 = getelementptr inbounds [2 x i32], ptr %27, i64 0, i64 1
  %29 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 2
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %28, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = load i32, ptr %30, align 4, !tbaa !9
  store i32 %31, ptr %8, align 4, !tbaa !9
  br label %89

32:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %33 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %34 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %33)
  %35 = getelementptr inbounds %struct.NppiSize, ptr %34, i32 0, i32 1
  %36 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %37 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %36)
  %38 = getelementptr inbounds %struct.NppiSize, ptr %37, i32 0, i32 0
  %39 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(4) %38)
  %40 = load i32, ptr %39, align 4, !tbaa !9
  store i32 %40, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %41 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %43 = sitofp i32 %42 to float
  %44 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %45 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %44)
  %46 = getelementptr inbounds %struct.NppiSize, ptr %45, i32 0, i32 1
  %47 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %48 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %47)
  %49 = getelementptr inbounds %struct.NppiSize, ptr %48, i32 0, i32 0
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(4) %49)
  %51 = load i32, ptr %50, align 4, !tbaa !9
  %52 = sitofp i32 %51 to float
  %53 = fdiv float %43, %52
  store float %53, ptr %10, align 4, !tbaa !14
  %54 = load float, ptr %10, align 4, !tbaa !14
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = sitofp i32 %55 to float
  %57 = fmul float %54, %56
  %58 = call noundef float @_ZSt5roundf(float noundef %57)
  %59 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 2
  %60 = load i32, ptr %59, align 4, !tbaa !16
  %61 = sitofp i32 %60 to float
  %62 = fcmp ogt float %58, %61
  br i1 %62, label %63, label %70

63:                                               ; preds = %32
  %64 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 2
  %65 = load i32, ptr %64, align 4, !tbaa !16
  %66 = sitofp i32 %65 to float
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = sitofp i32 %67 to float
  %69 = fdiv float %66, %68
  store float %69, ptr %10, align 4, !tbaa !14
  br label %70

70:                                               ; preds = %63, %32
  %71 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %72 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %71)
  %73 = getelementptr inbounds %struct.NppiSize, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !17
  %75 = sitofp i32 %74 to float
  %76 = load float, ptr %10, align 4, !tbaa !14
  %77 = fmul float %75, %76
  %78 = call noundef float @_ZSt5roundf(float noundef %77)
  %79 = fptosi float %78 to i32
  store i32 %79, ptr %7, align 4, !tbaa !9
  %80 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %81 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %80)
  %82 = getelementptr inbounds %struct.NppiSize, ptr %81, i32 0, i32 1
  %83 = load i32, ptr %82, align 4, !tbaa !19
  %84 = sitofp i32 %83 to float
  %85 = load float, ptr %10, align 4, !tbaa !14
  %86 = fmul float %84, %85
  %87 = call noundef float @_ZSt5roundf(float noundef %86)
  %88 = fptosi float %87 to i32
  store i32 %88, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %89

89:                                               ; preds = %70, %21
  store i1 false, ptr %11, align 1
  call void @_ZSt11make_sharedI9OpContextJRiS1_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES4_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %90 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %91 = invoke noundef ptr @_ZNK9OpContext7p_frameEv(ptr noundef nonnull align 8 dereferenceable(36) %90)
          to label %92 unwind label %125

92:                                               ; preds = %89
  %93 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #6
  %94 = invoke noundef ptr @_ZNK9OpContext7p_frameEv(ptr noundef nonnull align 8 dereferenceable(36) %93)
          to label %95 unwind label %125

95:                                               ; preds = %92
  %96 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %97 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %96)
          to label %98 unwind label %125

98:                                               ; preds = %95
  %99 = getelementptr inbounds %struct.NppiSize, ptr %97, i32 0, i32 0
  %100 = load i32, ptr %99, align 4, !tbaa !17
  %101 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %102 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %101)
          to label %103 unwind label %125

103:                                              ; preds = %98
  %104 = getelementptr inbounds %struct.NppiSize, ptr %102, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !19
  %106 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #6
  %107 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %106)
          to label %108 unwind label %125

108:                                              ; preds = %103
  %109 = getelementptr inbounds %struct.NppiSize, ptr %107, i32 0, i32 0
  %110 = load i32, ptr %109, align 4, !tbaa !17
  %111 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #6
  %112 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %111)
          to label %113 unwind label %125

113:                                              ; preds = %108
  %114 = getelementptr inbounds %struct.NppiSize, ptr %112, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !19
  %116 = getelementptr inbounds %class.Resize, ptr %17, i32 0, i32 3
  %117 = load i8, ptr %116, align 4, !tbaa !20, !range !21, !noundef !22
  %118 = trunc i8 %117 to i1
  %119 = invoke i32 @resize_linear(ptr noundef %91, ptr noundef %94, i32 noundef %100, i32 noundef %105, i32 noundef %110, i32 noundef %115, i32 noundef 3, i1 noundef zeroext %118)
          to label %120 unwind label %125

120:                                              ; preds = %113
  store i32 %119, ptr %12, align 4, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %121 unwind label %129

121:                                              ; preds = %120
  %122 = load i32, ptr %12, align 4, !tbaa !23
  invoke void @_Z15verify_cuda_retRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE9cudaError(ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef %122)
          to label %123 unwind label %133

123:                                              ; preds = %121
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  store i1 true, ptr %11, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %124 = load i1, ptr %11, align 1
  br i1 %124, label %140, label %139

125:                                              ; preds = %113, %108, %103, %98, %95, %92, %89
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %13, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %14, align 4
  br label %138

129:                                              ; preds = %120
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %13, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %14, align 4
  br label %137

133:                                              ; preds = %121
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %13, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %137

137:                                              ; preds = %133, %129
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  br label %138

138:                                              ; preds = %137, %125
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @_ZNSt12__shared_ptrI9OpContextLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %141

139:                                              ; preds = %123
  call void @_ZNSt12__shared_ptrI9OpContextLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #6
  br label %140

140:                                              ; preds = %139, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

141:                                              ; preds = %138
  %142 = load ptr, ptr %13, align 8
  %143 = load i32, ptr %14, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedI9OpContextJRiS1_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES4_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

declare i32 @resize_linear(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #5

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

declare i32 @__gxx_personality_v0(...)

declare void @_Z15verify_cuda_retRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE9cudaError(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 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 = { "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTS6Resize", !10, i64 0, !7, i64 4, !10, i64 12, !13, i64 16, !10, i64 20}
!13 = !{!"bool", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!12, !10, i64 12}
!17 = !{!18, !10, i64 0}
!18 = !{!"_ZTS8NppiSize", !10, i64 0, !10, i64 4}
!19 = !{!18, !10, i64 4}
!20 = !{!12, !13, i64 16}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!24, !24, i64 0}
!24 = !{!"_ZTS9cudaError", !7, 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"

%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = 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] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ResizeclESt10shared_ptrI9OpContextE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 4 dereferenceable(24) %1, ptr noundef %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %8 = load i32, ptr %1, align 4, !tbaa !5
  %9 = icmp eq i32 %8, -1
  br i1 %9, label %10, label %18

10:                                               ; preds = %3
  %11 = getelementptr inbounds i8, ptr %1, i64 4
  %12 = getelementptr inbounds i8, ptr %1, i64 12
  %13 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %14 = load i32, ptr %13, align 4, !tbaa !11
  store i32 %14, ptr %4, align 4, !tbaa !11
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %17 = load i32, ptr %16, align 4, !tbaa !11
  br label %60

18:                                               ; preds = %3
  %19 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %20 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %19)
  %21 = getelementptr inbounds i8, ptr %20, i64 4
  %22 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %23 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %22)
  %24 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %25 = load i32, ptr %24, align 4, !tbaa !11
  %26 = load i32, ptr %1, align 4, !tbaa !5
  %27 = sitofp i32 %26 to float
  %28 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %29 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %28)
  %30 = getelementptr inbounds i8, ptr %29, i64 4
  %31 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %32 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %31)
  %33 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %32)
  %34 = load i32, ptr %33, align 4, !tbaa !11
  %35 = sitofp i32 %34 to float
  %36 = fdiv float %27, %35
  %37 = sitofp i32 %25 to float
  %38 = fmul float %36, %37
  %39 = tail call noundef float @_ZSt5roundf(float noundef %38)
  %40 = getelementptr inbounds i8, ptr %1, i64 12
  %41 = load i32, ptr %40, align 4, !tbaa !12
  %42 = sitofp i32 %41 to float
  %43 = fcmp ogt float %39, %42
  %44 = fdiv float %42, %37
  %.011 = select i1 %43, float %44, float %36
  %45 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %46 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %45)
  %47 = load i32, ptr %46, align 4, !tbaa !13
  %48 = sitofp i32 %47 to float
  %49 = fmul float %.011, %48
  %50 = tail call noundef float @_ZSt5roundf(float noundef %49)
  %51 = fptosi float %50 to i32
  store i32 %51, ptr %4, align 4, !tbaa !11
  %52 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %53 = tail call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %52)
  %54 = getelementptr inbounds i8, ptr %53, i64 4
  %55 = load i32, ptr %54, align 4, !tbaa !15
  %56 = sitofp i32 %55 to float
  %57 = fmul float %.011, %56
  %58 = tail call noundef float @_ZSt5roundf(float noundef %57)
  %59 = fptosi float %58 to i32
  br label %60

60:                                               ; preds = %18, %10
  %storemerge = phi i32 [ %59, %18 ], [ %17, %10 ]
  store i32 %storemerge, ptr %5, align 4, !tbaa !11
  call void @_ZSt11make_sharedI9OpContextJRiS1_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES4_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %61 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %62 = call noundef ptr @_ZNK9OpContext7p_frameEv(ptr noundef nonnull align 8 dereferenceable(36) %61)
  %63 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #6
  %64 = call noundef ptr @_ZNK9OpContext7p_frameEv(ptr noundef nonnull align 8 dereferenceable(36) %63)
  %65 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %66 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %65)
  %67 = load i32, ptr %66, align 4, !tbaa !13
  %68 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #6
  %69 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %68)
  %70 = getelementptr inbounds i8, ptr %69, i64 4
  %71 = load i32, ptr %70, align 4, !tbaa !15
  %72 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #6
  %73 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %72)
  %74 = load i32, ptr %73, align 4, !tbaa !13
  %75 = call noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #6
  %76 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36) %75)
  %77 = getelementptr inbounds i8, ptr %76, i64 4
  %78 = load i32, ptr %77, align 4, !tbaa !15
  %79 = getelementptr inbounds i8, ptr %1, i64 16
  %80 = load i8, ptr %79, align 4, !tbaa !16, !range !17, !noundef !18
  %81 = trunc nuw i8 %80 to i1
  %82 = invoke i32 @resize_linear(ptr noundef %62, ptr noundef %64, i32 noundef %67, i32 noundef %71, i32 noundef %74, i32 noundef %78, i32 noundef 3, i1 noundef zeroext %81)
          to label %83 unwind label %86

83:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %84 unwind label %88

84:                                               ; preds = %83
  invoke void @_Z15verify_cuda_retRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE9cudaError(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef %82)
          to label %85 unwind label %90

85:                                               ; preds = %84
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  ret void

86:                                               ; preds = %60
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %93

88:                                               ; preds = %83
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %84
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #6
  br label %92

92:                                               ; preds = %90, %88
  %.pn = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #6
  br label %93

93:                                               ; preds = %92, %86
  %.pn.pn = phi { ptr, i32 } [ %.pn, %92 ], [ %87, %86 ]
  call void @_ZNSt12__shared_ptrI9OpContextLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessI9OpContextLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN9OpContext9nppi_sizeEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5roundf(float noundef) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedI9OpContextJRiS1_EESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueES4_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

declare i32 @resize_linear(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #5

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

declare i32 @__gxx_personality_v0(...)

declare void @_Z15verify_cuda_retRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE9cudaError(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 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 = { "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, !7, i64 0}
!6 = !{!"_ZTS6Resize", !7, i64 0, !8, i64 4, !7, i64 12, !10, i64 16, !7, i64 20}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!6, !7, i64 12}
!13 = !{!14, !7, i64 0}
!14 = !{!"_ZTS8NppiSize", !7, i64 0, !7, i64 4}
!15 = !{!14, !7, i64 4}
!16 = !{!6, !10, i64 16}
!17 = !{i8 0, i8 2}
!18 = !{}


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