; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Week of Code/Week 20/Problem F (F)

; 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"

%struct.FenwickRMQ = type <{ %"class.std::vector", %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { %"struct.std::pair.5", i32 }
%"struct.std::pair.5" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@segmentTree = external dso_local global [200200 x %struct.FenwickRMQ], align 16
@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@segments = external dso_local global [100100 x %"class.std::vector.0"], align 16
@l = external dso_local global [100100 x i32], align 16
@r = external dso_local global [100100 x i32], align 16
@ans = external dso_local global [100100 x i32], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5buildii(i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6updateiii(i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5queryiii(i32 noundef, i32 noundef, i32 noundef) #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::pair", align 4
  %4 = alloca %"struct.std::pair.5", align 4
  %5 = alloca { i64, i32 }, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @d, ptr noundef @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %57, %0
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = load i32, ptr @n, align 4, !tbaa !5
  %19 = icmp sle i32 %17, %18
  br i1 %19, label %21, label %20

20:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %60

21:                                               ; preds = %16
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100100 x i32], ptr @l, i64 0, i64 %23
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [100100 x i32], ptr @r, i64 0, i64 %26
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %24, ptr noundef %27)
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [100100 x i32], ptr @r, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [100100 x i32], ptr @l, i64 0, i64 %34
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = sub nsw i32 %32, %36
  %38 = add nsw i32 %37, 1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @segments, i64 0, i64 %39
  call void @llvm.lifetime.start.p0(i64 12, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %41 = load i32, ptr %2, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [100100 x i32], ptr @l, i64 0, i64 %42
  %44 = load i32, ptr %2, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [100100 x i32], ptr @r, i64 0, i64 %45
  %47 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %43, ptr noundef nonnull align 4 dereferenceable(4) %46)
  store i64 %47, ptr %4, align 4
  %48 = call { i64, i32 } @_ZSt9make_pairISt4pairIiiERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store { i64, i32 } %48, ptr %5, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %3, ptr align 8 %5, i64 12, i1 false)
  call void @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %3) #7
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [100100 x i32], ptr @l, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [100100 x i32], ptr @r, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  call void @_Z5buildii(i32 noundef %52, i32 noundef %56)
  br label %57

57:                                               ; preds = %21
  %58 = load i32, ptr %2, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %2, align 4, !tbaa !5
  br label %16, !llvm.loop !9

60:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %61

61:                                               ; preds = %72, %60
  %62 = load i32, ptr %6, align 4, !tbaa !5
  %63 = load i32, ptr @d, align 4, !tbaa !5
  %64 = load i32, ptr @d, align 4, !tbaa !5
  %65 = add nsw i32 %63, %64
  %66 = icmp sle i32 %62, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %75

68:                                               ; preds = %61
  %69 = load i32, ptr %6, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [200200 x %struct.FenwickRMQ], ptr @segmentTree, i64 0, i64 %70
  call void @_ZN10FenwickRMQ4initEv(ptr noundef nonnull align 8 dereferenceable(52) %71)
  br label %72

72:                                               ; preds = %68
  %73 = load i32, ptr %6, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %6, align 4, !tbaa !5
  br label %61, !llvm.loop !11

75:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %76 = load i32, ptr @d, align 4, !tbaa !5
  store i32 %76, ptr %7, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %133, %75
  %78 = load i32, ptr %7, align 4, !tbaa !5
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %81, label %80

80:                                               ; preds = %77
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %136

81:                                               ; preds = %77
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @segments, i64 0, i64 %83
  %85 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIS0_IiiEiESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %84) #7
  br i1 %85, label %86, label %95

86:                                               ; preds = %81
  %87 = load i32, ptr %7, align 4, !tbaa !5
  %88 = add nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = load i32, ptr %7, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %93
  store i32 %91, ptr %94, align 4, !tbaa !5
  br label %133

95:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %96 = load i32, ptr %7, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @segments, i64 0, i64 %97
  %99 = call ptr @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %98) #7
  %100 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %9, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  br label %101

101:                                              ; preds = %124, %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %102 = load i32, ptr %7, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @segments, i64 0, i64 %103
  %105 = call ptr @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %104) #7
  %106 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %105, ptr %106, align 8
  %107 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br i1 %107, label %109, label %108

108:                                              ; preds = %101
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %126

109:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %110 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %111 = getelementptr inbounds %"struct.std::pair", ptr %110, i32 0, i32 0
  %112 = getelementptr inbounds %"struct.std::pair.5", ptr %111, i32 0, i32 0
  %113 = load i32, ptr %112, align 4, !tbaa !12
  store i32 %113, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %114 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %115 = getelementptr inbounds %"struct.std::pair", ptr %114, i32 0, i32 0
  %116 = getelementptr inbounds %"struct.std::pair.5", ptr %115, i32 0, i32 1
  %117 = load i32, ptr %116, align 4, !tbaa !15
  store i32 %117, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %118 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  %119 = getelementptr inbounds %"struct.std::pair", ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 4, !tbaa !16
  store i32 %120, ptr %13, align 4, !tbaa !5
  %121 = load i32, ptr %11, align 4, !tbaa !5
  %122 = load i32, ptr %12, align 4, !tbaa !5
  %123 = load i32, ptr %13, align 4, !tbaa !5
  call void @_Z6updateiii(i32 noundef %121, i32 noundef %122, i32 noundef %123)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %124

124:                                              ; preds = %109
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br label %101, !llvm.loop !17

126:                                              ; preds = %108
  %127 = load i32, ptr @d, align 4, !tbaa !5
  %128 = load i32, ptr %7, align 4, !tbaa !5
  %129 = call noundef i32 @_Z5queryiii(i32 noundef 1, i32 noundef %127, i32 noundef %128)
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %131
  store i32 %129, ptr %132, align 4, !tbaa !5
  br label %133

133:                                              ; preds = %126, %86
  %134 = load i32, ptr %7, align 4, !tbaa !5
  %135 = add nsw i32 %134, -1
  store i32 %135, ptr %7, align 4, !tbaa !5
  br label %77, !llvm.loop !18

136:                                              ; preds = %80
  br label %137

137:                                              ; preds = %141, %136
  %138 = load i32, ptr @k, align 4, !tbaa !5
  %139 = add nsw i32 %138, -1
  store i32 %139, ptr @k, align 4, !tbaa !5
  %140 = icmp ne i32 %138, 0
  br i1 %140, label %141, label %148

141:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %142 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.5, ptr noundef %14)
  %143 = load i32, ptr %14, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.6, i32 noundef %146)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %137, !llvm.loop !19

148:                                              ; preds = %137
  ret i32 0
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairISt4pairIiiERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) #0

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

declare i32 @printf(ptr noundef, ...) #3

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 = { mustprogress norecurse 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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIS_IiiEiE", !14, i64 0, !6, i64 8}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!13, !6, i64 4}
!16 = !{!13, !6, i64 8}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; 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"

%struct.FenwickRMQ = type <{ %"class.std::vector", %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::pair<int, int>, int>, std::allocator<std::pair<std::pair<int, int>, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { %"struct.std::pair.5", i32 }
%"struct.std::pair.5" = type { i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@segmentTree = external dso_local global [200200 x %struct.FenwickRMQ], align 16
@n = external dso_local global i32, align 4
@d = external dso_local global i32, align 4
@k = external dso_local global i32, align 4
@segments = external dso_local global [100100 x %"class.std::vector.0"], align 16
@l = external dso_local global [100100 x i32], align 16
@r = external dso_local global [100100 x i32], align 16
@ans = external dso_local local_unnamed_addr global [100100 x i32], align 16
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5buildii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z6updateiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z5queryiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca %"struct.std::pair.5", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca i32, align 4
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @d, ptr noundef nonnull @k)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 1, ptr %1, align 4, !tbaa !5
  %8 = load i32, ptr @n, align 4, !tbaa !5
  %.not21 = icmp slt i32 %8, 1
  br i1 %.not21, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  br label %10

._crit_edge:                                      ; preds = %10, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  %9 = load i32, ptr @d, align 4, !tbaa !5
  %.not1723 = icmp slt i32 %9, 1
  br i1 %.not1723, label %.preheader20, label %.lr.ph26

10:                                               ; preds = %.lr.ph, %10
  %storemerge22 = phi i32 [ 1, %.lr.ph ], [ %34, %10 ]
  %11 = sext i32 %storemerge22 to i64
  %12 = getelementptr inbounds [100100 x i32], ptr @l, i64 0, i64 %11
  %13 = getelementptr inbounds [100100 x i32], ptr @r, i64 0, i64 %11
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %12, ptr noundef nonnull %13)
  %15 = load i32, ptr %1, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [100100 x i32], ptr @r, i64 0, i64 %16
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = getelementptr inbounds [100100 x i32], ptr @l, i64 0, i64 %16
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = add i32 %18, 1
  %22 = sub i32 %21, %20
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @segments, i64 0, i64 %23
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %25 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %17)
  store i64 %25, ptr %3, align 8
  %26 = call { i64, i32 } @_ZSt9make_pairISt4pairIiiERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %.fca.0.extract = extractvalue { i64, i32 } %26, 0
  %.fca.1.extract = extractvalue { i64, i32 } %26, 1
  store i64 %.fca.0.extract, ptr %2, align 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #6
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100100 x i32], ptr @l, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = getelementptr inbounds [100100 x i32], ptr @r, i64 0, i64 %28
  %32 = load i32, ptr %31, align 4, !tbaa !5
  call void @_Z5buildii(i32 noundef %30, i32 noundef %32)
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %1, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %.not.not = icmp slt i32 %33, %35
  br i1 %.not.not, label %10, label %._crit_edge, !llvm.loop !9

.preheader20:                                     ; preds = %.lr.ph26, %._crit_edge
  %.lcssa = phi i32 [ %9, %._crit_edge ], [ %38, %.lr.ph26 ]
  %.not1830 = icmp eq i32 %.lcssa, 0
  br i1 %.not1830, label %.preheader, label %.lr.ph32.preheader

.lr.ph32.preheader:                               ; preds = %.preheader20
  %36 = sext i32 %.lcssa to i64
  br label %.lr.ph32

.lr.ph26:                                         ; preds = %._crit_edge, %.lr.ph26
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph26 ], [ 1, %._crit_edge ]
  %37 = getelementptr inbounds [200200 x %struct.FenwickRMQ], ptr @segmentTree, i64 0, i64 %indvars.iv
  call void @_ZN10FenwickRMQ4initEv(ptr noundef nonnull align 8 dereferenceable(52) %37)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %38 = load i32, ptr @d, align 4, !tbaa !5
  %39 = shl nsw i32 %38, 1
  %40 = sext i32 %39 to i64
  %.not17.not = icmp slt i64 %indvars.iv, %40
  br i1 %.not17.not, label %.lr.ph26, label %.preheader20, !llvm.loop !11

.preheader:                                       ; preds = %67, %.preheader20
  %41 = load i32, ptr @k, align 4, !tbaa !5
  %42 = add nsw i32 %41, -1
  store i32 %42, ptr @k, align 4, !tbaa !5
  %.not1933 = icmp eq i32 %41, 0
  br i1 %.not1933, label %._crit_edge35, label %.lr.ph34

.lr.ph32:                                         ; preds = %.lr.ph32.preheader, %67
  %indvars.iv38 = phi i64 [ %36, %.lr.ph32.preheader ], [ %indvars.iv.next39, %67 ]
  %43 = getelementptr inbounds [100100 x %"class.std::vector.0"], ptr @segments, i64 0, i64 %indvars.iv38
  %44 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairIS0_IiiEiESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #6
  br i1 %44, label %45, label %49

45:                                               ; preds = %.lr.ph32
  %46 = add nsw i64 %indvars.iv38, 1
  %47 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  br label %67

49:                                               ; preds = %.lr.ph32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %50 = call ptr @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #6
  store ptr %50, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %51 = call ptr @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #6
  store ptr %51, ptr %5, align 8
  %52 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br i1 %52, label %.lr.ph28, label %._crit_edge29

._crit_edge29:                                    ; preds = %.lr.ph28, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  %53 = load i32, ptr @d, align 4, !tbaa !5
  %54 = trunc nsw i64 %indvars.iv38 to i32
  %55 = call noundef i32 @_Z5queryiii(i32 noundef 1, i32 noundef %53, i32 noundef %54)
  br label %67

.lr.ph28:                                         ; preds = %49, %.lr.ph28
  %56 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %57 = load i32, ptr %56, align 4, !tbaa !12
  %58 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %59 = getelementptr inbounds i8, ptr %58, i64 4
  %60 = load i32, ptr %59, align 4, !tbaa !15
  %61 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  %62 = getelementptr inbounds i8, ptr %61, i64 8
  %63 = load i32, ptr %62, align 4, !tbaa !16
  call void @_Z6updateiii(i32 noundef %57, i32 noundef %60, i32 noundef %63)
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %65 = call ptr @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #6
  store ptr %65, ptr %5, align 8
  %66 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br i1 %66, label %.lr.ph28, label %._crit_edge29, !llvm.loop !17

67:                                               ; preds = %._crit_edge29, %45
  %.sink = phi i32 [ %55, %._crit_edge29 ], [ %48, %45 ]
  %68 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %indvars.iv38
  store i32 %.sink, ptr %68, align 4, !tbaa !5
  %indvars.iv.next39 = add nsw i64 %indvars.iv38, -1
  %.not18 = icmp eq i64 %indvars.iv.next39, 0
  br i1 %.not18, label %.preheader, label %.lr.ph32, !llvm.loop !18

.lr.ph34:                                         ; preds = %.preheader, %.lr.ph34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %69 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %6)
  %70 = load i32, ptr %6, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100100 x i32], ptr @ans, i64 0, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %73)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  %75 = load i32, ptr @k, align 4, !tbaa !5
  %76 = add nsw i32 %75, -1
  store i32 %76, ptr @k, align 4, !tbaa !5
  %.not19 = icmp eq i32 %75, 0
  br i1 %.not19, label %._crit_edge35, label %.lr.ph34, !llvm.loop !19

._crit_edge35:                                    ; preds = %.lr.ph34, %.preheader
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIS0_IiiEiESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_ZSt9make_pairISt4pairIiiERiES0_INSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt4pairIS0_IiiEiESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairIS1_IiiEiESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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 = { mustprogress norecurse 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt4pairIS_IiiEiE", !14, i64 0, !6, i64 8}
!14 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!15 = !{!13, !6, i64 4}
!16 = !{!13, !6, i64 8}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass