; LLVM IR from facebook/redex :: checkers (MethodRegisterChecker)

; 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.boost::sub_range" = type { %"class.boost::range_detail::sub_range_base" }
%"class.boost::range_detail::sub_range_base" = type { %"class.boost::range_detail::sub_range_base.1" }
%"class.boost::range_detail::sub_range_base.1" = type { %"class.boost::iterator_range" }
%"class.boost::iterator_range" = type { %"class.boost::iterator_range_detail::iterator_range_base" }
%"class.boost::iterator_range_detail::iterator_range_base" = type { %"class.boost::iterator_range_detail::iterator_range_base.2" }
%"class.boost::iterator_range_detail::iterator_range_base.2" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%"class.ir_list::InstructionIterableImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.ir_list::InstructionIteratorImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"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] }
%struct.MethodItemEntry = type { %"class.boost::intrusive::list_member_hook", i32, %union.anon.14 }
%"class.boost::intrusive::list_member_hook" = type { %"class.boost::intrusive::generic_hook" }
%"class.boost::intrusive::generic_hook" = type { %"struct.boost::intrusive::list_node" }
%"struct.boost::intrusive::list_node" = type { ptr, ptr }
%union.anon.14 = type { ptr }

@.str.16 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [83 x i8], align 1
@__PRETTY_FUNCTION__._ZN16redex_properties13get_param_endEPKcRKN3cfg16ControlFlowGraphEP9DexMethod = external hidden unnamed_addr constant [96 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [58 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN16redex_properties13get_param_endEPKcRKN3cfg16ControlFlowGraphEP9DexMethod(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(160) %1, ptr noundef %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.boost::sub_range", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.ir_list::InstructionIterableImpl", align 8
  %11 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca i1, align 1
  %17 = alloca i1, align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca i1, align 1
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i1, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK3cfg16ControlFlowGraph22get_param_instructionsEv(ptr dead_on_unwind writable sret(%"class.boost::sub_range") align 8 %8, ptr noundef nonnull align 8 dereferenceable(160) %23)
  %24 = call noundef zeroext i1 @_ZNK5boost21iterator_range_detail19iterator_range_baseINS_9intrusive13list_iteratorINS2_8mhtraitsI15MethodItemEntryNS2_16list_member_hookIJEEEXadL_ZNS5_10list_hook_EEEEELb0EEENS_9iterators27incrementable_traversal_tagEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  br i1 %24, label %25, label %28

25:                                               ; preds = %3
  %26 = call noundef zeroext i16 @_ZN8regalloc18max_unsigned_valueEh(i8 noundef zeroext 16)
  %27 = zext i16 %26 to i32
  store i32 %27, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %111

28:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  call void @_Z19InstructionIterableIN5boost9sub_rangeI6IRListEEEN7ir_list23InstructionIterableImplILb0EEERT_(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIterableImpl") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %8)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %29 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %30 = getelementptr inbounds %struct.MethodItemEntry, ptr %29, i32 0, i32 2
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = call noundef i32 @_ZNK13IRInstruction4destEv(ptr noundef nonnull align 8 dereferenceable(32) %31)
  store i32 %32, ptr %12, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %33 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %34 = getelementptr inbounds %struct.MethodItemEntry, ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = call noundef zeroext i1 @_ZNK13IRInstruction12dest_is_wideEv(ptr noundef nonnull align 8 dereferenceable(32) %35)
  %37 = zext i1 %36 to i64
  %38 = select i1 %36, i32 2, i32 1
  store i32 %38, ptr %13, align 4, !tbaa !10
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  br label %40

40:                                               ; preds = %92, %28
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %14, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %41 = call noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  br i1 %41, label %42, label %106

42:                                               ; preds = %40
  %43 = load i32, ptr %12, align 4, !tbaa !10
  %44 = load i32, ptr %13, align 4, !tbaa !10
  %45 = add i32 %43, %44
  %46 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %47 = getelementptr inbounds %struct.MethodItemEntry, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !9
  %49 = call noundef i32 @_ZNK13IRInstruction4destEv(ptr noundef nonnull align 8 dereferenceable(32) %48)
  %50 = icmp eq i32 %45, %49
  store i1 false, ptr %16, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %19, align 1
  store i1 false, ptr %22, align 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %42
  br label %69

52:                                               ; preds = %42
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  store i1 true, ptr %16, align 1
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef %54)
  store i1 true, ptr %17, align 1
  %55 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #7
  store i1 true, ptr %19, align 1
  invoke void @_Z4showIRN5boost9sub_rangeI6IRListEERSovENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %56 unwind label %59

56:                                               ; preds = %52
  store i1 true, ptr %22, align 1
  %57 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  invoke void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef @.str.16, ptr noundef @.str.17, i32 noundef 47, ptr noundef @__PRETTY_FUNCTION__._ZN16redex_properties13get_param_endEPKcRKN3cfg16ControlFlowGraphEP9DexMethod, i32 noundef 2, ptr noundef @.str.18, ptr noundef %53, ptr noundef %55, ptr noundef %57) #8
          to label %58 unwind label %63

58:                                               ; preds = %56
  unreachable

59:                                               ; preds = %52
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %20, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %21, align 4
  br label %96

63:                                               ; preds = %56
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %20, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %21, align 4
  %67 = load i1, ptr %22, align 1
  br i1 %67, label %94, label %95

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68, %51
  %70 = load i1, ptr %22, align 1
  br i1 %70, label %71, label %72

71:                                               ; preds = %69
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %72

72:                                               ; preds = %71, %69
  %73 = load i1, ptr %19, align 1
  br i1 %73, label %74, label %75

74:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %75

75:                                               ; preds = %74, %72
  %76 = load i1, ptr %17, align 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %75
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %78

78:                                               ; preds = %77, %75
  %79 = load i1, ptr %16, align 1
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %81

81:                                               ; preds = %80, %78
  %82 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %83 = getelementptr inbounds %struct.MethodItemEntry, ptr %82, i32 0, i32 2
  %84 = load ptr, ptr %83, align 8, !tbaa !9
  %85 = call noundef zeroext i1 @_ZNK13IRInstruction12dest_is_wideEv(ptr noundef nonnull align 8 dereferenceable(32) %84)
  %86 = zext i1 %85 to i64
  %87 = select i1 %85, i32 2, i32 1
  store i32 %87, ptr %13, align 4, !tbaa !10
  %88 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %89 = getelementptr inbounds %struct.MethodItemEntry, ptr %88, i32 0, i32 2
  %90 = load ptr, ptr %89, align 8, !tbaa !9
  %91 = call noundef i32 @_ZNK13IRInstruction4destEv(ptr noundef nonnull align 8 dereferenceable(32) %90)
  store i32 %91, ptr %12, align 4, !tbaa !10
  br label %92

92:                                               ; preds = %81
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  br label %40, !llvm.loop !12

94:                                               ; preds = %63
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #7
  br label %95

95:                                               ; preds = %94, %63
  br label %96

96:                                               ; preds = %95, %59
  %97 = load i1, ptr %19, align 1
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #7
  br label %99

99:                                               ; preds = %98, %96
  %100 = load i1, ptr %17, align 1
  br i1 %100, label %101, label %102

101:                                              ; preds = %99
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %102

102:                                              ; preds = %101, %99
  %103 = load i1, ptr %16, align 1
  br i1 %103, label %104, label %105

104:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  br label %105

105:                                              ; preds = %104, %102
  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 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  br label %113

106:                                              ; preds = %40
  %107 = load i32, ptr %12, align 4, !tbaa !10
  %108 = load i32, ptr %13, align 4, !tbaa !10
  %109 = add i32 %107, %108
  %110 = sub i32 %109, 1
  store i32 %110, ptr %4, align 4
  store i32 1, ptr %9, align 4
  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 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  br label %111

111:                                              ; preds = %106, %25
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  %112 = load i32, ptr %4, align 4
  ret i32 %112

113:                                              ; preds = %105
  %114 = load ptr, ptr %20, align 8
  %115 = load i32, ptr %21, align 4
  %116 = insertvalue { ptr, i32 } poison, ptr %114, 0
  %117 = insertvalue { ptr, i32 } %116, i32 %115, 1
  resume { ptr, i32 } %117
}

declare void @_ZNK3cfg16ControlFlowGraph22get_param_instructionsEv(ptr dead_on_unwind writable sret(%"class.boost::sub_range") align 8, ptr noundef nonnull align 8 dereferenceable(160)) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5boost21iterator_range_detail19iterator_range_baseINS_9intrusive13list_iteratorINS2_8mhtraitsI15MethodItemEntryNS2_16list_member_hookIJEEEXadL_ZNS5_10list_hook_EEEEELb0EEENS_9iterators27incrementable_traversal_tagEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZN8regalloc18max_unsigned_valueEh(i8 noundef zeroext) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z19InstructionIterableIN5boost9sub_rangeI6IRListEEEN7ir_list23InstructionIterableImplILb0EEERT_(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIterableImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK13IRInstruction4destEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK13IRInstruction12dest_is_wideEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

; Function Attrs: noreturn
declare void @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #6

declare void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4showIRN5boost9sub_rangeI6IRListEERSovENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = { 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 #6 = { noreturn "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 }
attributes #8 = { noreturn }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.boost::sub_range" = type { %"class.boost::range_detail::sub_range_base" }
%"class.boost::range_detail::sub_range_base" = type { %"class.boost::range_detail::sub_range_base.1" }
%"class.boost::range_detail::sub_range_base.1" = type { %"class.boost::iterator_range" }
%"class.boost::iterator_range" = type { %"class.boost::iterator_range_detail::iterator_range_base" }
%"class.boost::iterator_range_detail::iterator_range_base" = type { %"class.boost::iterator_range_detail::iterator_range_base.2" }
%"class.boost::iterator_range_detail::iterator_range_base.2" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.boost::intrusive::list_iterator" = type { %"struct.boost::intrusive::iiterator_members" }
%"struct.boost::intrusive::iiterator_members" = type { ptr }
%"class.ir_list::InstructionIterableImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.ir_list::InstructionIteratorImpl" = type { %"class.boost::intrusive::list_iterator", %"class.boost::intrusive::list_iterator" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.16 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [83 x i8], align 1
@__PRETTY_FUNCTION__._ZN16redex_properties13get_param_endEPKcRKN3cfg16ControlFlowGraphEP9DexMethod = external hidden unnamed_addr constant [96 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [58 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN16redex_properties13get_param_endEPKcRKN3cfg16ControlFlowGraphEP9DexMethod(ptr noundef %0, ptr noundef nonnull align 8 dereferenceable(160) %1, ptr noundef %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.boost::sub_range", align 8
  %5 = alloca %"class.ir_list::InstructionIterableImpl", align 8
  %6 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %7 = alloca %"class.ir_list::InstructionIteratorImpl", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @_ZNK3cfg16ControlFlowGraph22get_param_instructionsEv(ptr dead_on_unwind nonnull writable sret(%"class.boost::sub_range") align 8 %4, ptr noundef nonnull align 8 dereferenceable(160) %1)
  %10 = call noundef zeroext i1 @_ZNK5boost21iterator_range_detail19iterator_range_baseINS_9intrusive13list_iteratorINS2_8mhtraitsI15MethodItemEntryNS2_16list_member_hookIJEEEXadL_ZNS5_10list_hook_EEEEELb0EEENS_9iterators27incrementable_traversal_tagEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  br i1 %10, label %11, label %14

11:                                               ; preds = %3
  %12 = call noundef zeroext i16 @_ZN8regalloc18max_unsigned_valueEh(i8 noundef zeroext 16)
  %13 = zext i16 %12 to i32
  br label %56

14:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @_Z19InstructionIterableIN5boost9sub_rangeI6IRListEEEN7ir_list23InstructionIterableImplILb0EEERT_(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIterableImpl") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %15 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %16 = getelementptr inbounds i8, ptr %15, i64 24
  %17 = load ptr, ptr %16, align 8, !tbaa !5
  %18 = call noundef i32 @_ZNK13IRInstruction4destEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  %19 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %20 = getelementptr inbounds i8, ptr %19, i64 24
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = call noundef zeroext i1 @_ZNK13IRInstruction12dest_is_wideEv(ptr noundef nonnull align 8 dereferenceable(32) %21)
  %23 = select i1 %22, i32 2, i32 1
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %25 = call noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %14, %41
  %.01825 = phi i32 [ %46, %41 ], [ %23, %14 ]
  %.01924 = phi i32 [ %50, %41 ], [ %18, %14 ]
  %26 = add i32 %.01825, %.01924
  %27 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %28 = getelementptr inbounds i8, ptr %27, i64 24
  %29 = load ptr, ptr %28, align 8, !tbaa !5
  %30 = call noundef i32 @_ZNK13IRInstruction4destEv(ptr noundef nonnull align 8 dereferenceable(32) %29)
  %31 = icmp eq i32 %26, %30
  br i1 %31, label %41, label %32

32:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef %2)
  %33 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #7
  invoke void @_Z4showIRN5boost9sub_rangeI6IRListEERSovENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %34 unwind label %37

34:                                               ; preds = %32
  %35 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  invoke void (ptr, ptr, i32, ptr, i32, ptr, ...) @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.17, i32 noundef 47, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16redex_properties13get_param_endEPKcRKN3cfg16ControlFlowGraphEP9DexMethod, i32 noundef 2, ptr noundef nonnull @.str.18, ptr noundef %0, ptr noundef %33, ptr noundef %35) #8
          to label %36 unwind label %39

36:                                               ; preds = %34
  unreachable

37:                                               ; preds = %32
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %53

39:                                               ; preds = %34
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %53

41:                                               ; preds = %.lr.ph
  %42 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %43 = getelementptr inbounds i8, ptr %42, i64 24
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = call noundef zeroext i1 @_ZNK13IRInstruction12dest_is_wideEv(ptr noundef nonnull align 8 dereferenceable(32) %44)
  %46 = select i1 %45, i32 2, i32 1
  %47 = call noundef ptr @_ZNK7ir_list23InstructionIteratorImplILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %48 = getelementptr inbounds i8, ptr %47, i64 24
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = call noundef i32 @_ZNK13IRInstruction4destEv(ptr noundef nonnull align 8 dereferenceable(32) %49)
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7ir_list23InstructionIteratorImplILb0EEppEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.ir_list::InstructionIteratorImpl") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %5)
  %52 = call noundef zeroext i1 @_ZNK7ir_list23InstructionIteratorImplILb0EEneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br i1 %52, label %.lr.ph, label %._crit_edge, !llvm.loop !8

53:                                               ; preds = %37, %39
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn

._crit_edge:                                      ; preds = %41, %14
  %.019.lcssa = phi i32 [ %18, %14 ], [ %50, %41 ]
  %.018.lcssa = phi i32 [ %23, %14 ], [ %46, %41 ]
  %54 = add i32 %.018.lcssa, %.019.lcssa
  %55 = add i32 %54, -1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %56

56:                                               ; preds = %._crit_edge, %11
  %.020 = phi i32 [ %13, %11 ], [ %55, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  ret i32 %.020
}

declare void @_ZNK3cfg16ControlFlowGraph22get_param_instructionsEv(ptr dead_on_unwind writable sret(%"class.boost::sub_range") align 8, ptr noundef nonnull align 8 dereferenceable(160)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK5boost21iterator_range_detail19iterator_range_baseINS_9intrusive13list_iteratorINS2_8mhtraitsI15MethodItemEntryNS2_16list_member_hookIJEEEXadL_ZNS5_10list_hook_EEEEELb0EEENS_9iterators27incrementable_traversal_tagEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i16 @_ZN8regalloc18max_unsigned_valueEh(i8 noundef zeroext) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z19InstructionIterableIN5boost9sub_rangeI6IRListEEEN7ir_list23InstructionIterableImplILb0EEERT_(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIterableImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE5beginEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK13IRInstruction4destEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK13IRInstruction12dest_is_wideEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ir_list23InstructionIterableImplILb0EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.ir_list::InstructionIteratorImpl") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: noreturn
declare void @_Z11assert_failPKcS0_jS0_10RedexErrorS0_z(ptr noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #6

declare void @_Z4showB5cxx11PK12DexMethodRef(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z4showIRN5boost9sub_rangeI6IRListEERSovENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { 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 = { 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 #6 = { noreturn "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 }
attributes #8 = { noreturn }

!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"}


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