; LLVM IR from billziss-gh/imap :: fuzz (fuzz)

; 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.imap_iter = type { [16 x i32], i32 }
%struct.imap_pair = type { i64, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, unsigned long>, std::_Select1st<std::pair<const unsigned long, unsigned long>>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, unsigned long>, std::_Select1st<std::pair<const unsigned long, unsigned long>>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"struct.std::pair" = type { i64, i64 }

@stdin = external global ptr, align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [64 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.imap_iter, align 4
  %10 = alloca %struct.imap_pair, align 8
  %11 = alloca %"class.std::map", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca [80 x i8], align 16
  %15 = alloca i8, align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %struct.imap_pair, align 8
  %21 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %22 = alloca i64, align 8
  %23 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %24 = alloca %struct.imap_pair, align 8
  %25 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %27 = alloca %struct.imap_pair, align 8
  %28 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %29 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %30 = alloca i64, align 8
  %31 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #10
  store i8 0, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.start.p0(i64 68, ptr %9) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #10
  call void @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #10
  %34 = invoke noundef ptr @_ZL11imap_ensureP9imap_nodej(ptr noundef null, i32 noundef 1)
          to label %35 unwind label %62

35:                                               ; preds = %2
  store ptr %34, ptr %7, align 8, !tbaa !9
  br label %36

36:                                               ; preds = %289, %35
  %37 = getelementptr inbounds [80 x i8], ptr %14, i64 0, i64 0
  %38 = load ptr, ptr @stdin, align 8, !tbaa !9
  %39 = invoke ptr @fgets(ptr noundef %37, i32 noundef 80, ptr noundef %38)
          to label %40 unwind label %62

40:                                               ; preds = %36
  %41 = icmp ne ptr %39, null
  br i1 %41, label %42, label %290

42:                                               ; preds = %40
  %43 = getelementptr inbounds [80 x i8], ptr %14, i64 0, i64 0
  %44 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %43, ptr noundef @.str, ptr noundef %12, ptr noundef %13) #10
  %45 = icmp eq i32 2, %44
  br i1 %45, label %46, label %70

46:                                               ; preds = %42
  %47 = load ptr, ptr %7, align 8, !tbaa !9
  %48 = invoke noundef ptr @_ZL11imap_ensureP9imap_nodej(ptr noundef %47, i32 noundef 1)
          to label %49 unwind label %62

49:                                               ; preds = %46
  store ptr %48, ptr %7, align 8, !tbaa !9
  %50 = load ptr, ptr %7, align 8, !tbaa !9
  %51 = load i64, ptr %12, align 8, !tbaa !13
  %52 = invoke noundef ptr @_ZL11imap_assignP9imap_nodem(ptr noundef %50, i64 noundef %51)
          to label %53 unwind label %62

53:                                               ; preds = %49
  store ptr %52, ptr %8, align 8, !tbaa !9
  %54 = load ptr, ptr %7, align 8, !tbaa !9
  %55 = load ptr, ptr %8, align 8, !tbaa !9
  %56 = load i64, ptr %13, align 8, !tbaa !13
  invoke void @_ZL11imap_setvalP9imap_nodePjm(ptr noundef %54, ptr noundef %55, i64 noundef %56)
          to label %57 unwind label %62

57:                                               ; preds = %53
  %58 = load i64, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %59 = load i64, ptr %12, align 8, !tbaa !13
  store i64 %59, ptr %18, align 8, !tbaa !15
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEEixEOm(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %61 unwind label %66

61:                                               ; preds = %57
  store i64 %58, ptr %60, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  br label %289

62:                                               ; preds = %290, %254, %247, %78, %53, %49, %46, %36, %2
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %16, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %17, align 4
  br label %294

66:                                               ; preds = %57
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %16, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  br label %294

70:                                               ; preds = %42
  %71 = getelementptr inbounds [80 x i8], ptr %14, i64 0, i64 0
  %72 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %71, ptr noundef @.str.1, ptr noundef %12, ptr noundef %15) #10
  %73 = icmp eq i32 2, %72
  br i1 %73, label %74, label %89

74:                                               ; preds = %70
  %75 = load i8, ptr %15, align 1, !tbaa !17
  %76 = sext i8 %75 to i32
  %77 = icmp eq i32 114, %76
  br i1 %77, label %78, label %89

78:                                               ; preds = %74
  %79 = load ptr, ptr %7, align 8, !tbaa !9
  %80 = load i64, ptr %12, align 8, !tbaa !13
  invoke void @_ZL11imap_removeP9imap_nodem(ptr noundef %79, i64 noundef %80)
          to label %81 unwind label %62

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %82 = load i64, ptr %12, align 8, !tbaa !13
  store i64 %82, ptr %19, align 8, !tbaa !15
  %83 = invoke noundef i64 @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %84 unwind label %85

84:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  br label %288

85:                                               ; preds = %81
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %16, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  br label %294

89:                                               ; preds = %74, %70
  %90 = getelementptr inbounds [80 x i8], ptr %14, i64 0, i64 0
  %91 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %90, ptr noundef @.str.1, ptr noundef %12, ptr noundef %15) #10
  %92 = icmp eq i32 2, %91
  br i1 %92, label %93, label %243

93:                                               ; preds = %89
  %94 = load i8, ptr %15, align 1, !tbaa !17
  %95 = sext i8 %94 to i32
  %96 = icmp eq i32 108, %95
  br i1 %96, label %97, label %243

97:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #10
  %98 = load ptr, ptr %7, align 8, !tbaa !9
  %99 = load i64, ptr %12, align 8, !tbaa !13
  %100 = invoke { i64, ptr } @_ZL11imap_locateP9imap_nodeP9imap_iterm(ptr noundef %98, ptr noundef %9, i64 noundef %99)
          to label %101 unwind label %119

101:                                              ; preds = %97
  %102 = getelementptr inbounds { i64, ptr }, ptr %20, i32 0, i32 0
  %103 = extractvalue { i64, ptr } %100, 0
  store i64 %103, ptr %102, align 8
  %104 = getelementptr inbounds { i64, ptr }, ptr %20, i32 0, i32 1
  %105 = extractvalue { i64, ptr } %100, 1
  store ptr %105, ptr %104, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %20, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #10
  %106 = getelementptr inbounds %struct.imap_pair, ptr %10, i32 0, i32 1
  %107 = load ptr, ptr %106, align 8, !tbaa !19
  %108 = icmp ne ptr %107, null
  br i1 %108, label %109, label %226

109:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %110 = load i64, ptr %12, align 8, !tbaa !13
  store i64 %110, ptr %22, align 8, !tbaa !15
  %111 = invoke ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %22)
          to label %112 unwind label %123

112:                                              ; preds = %109
  %113 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %21, i32 0, i32 0
  store ptr %111, ptr %113, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %114 = call ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #10
  %115 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %23, i32 0, i32 0
  store ptr %114, ptr %115, align 8
  %116 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmmEES5_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %23) #10
  br i1 %116, label %117, label %118

117:                                              ; preds = %112
  br label %128

118:                                              ; preds = %112
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 59, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

119:                                              ; preds = %97
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %16, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #10
  br label %294

123:                                              ; preds = %109
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %16, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %225

127:                                              ; No predecessors!
  br label %128

128:                                              ; preds = %127, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  %129 = getelementptr inbounds %struct.imap_pair, ptr %10, i32 0, i32 0
  %130 = load i64, ptr %129, align 8, !tbaa !21
  %131 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmmEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  %132 = getelementptr inbounds %"struct.std::pair", ptr %131, i32 0, i32 0
  %133 = load i64, ptr %132, align 8, !tbaa !22
  %134 = icmp eq i64 %130, %133
  br i1 %134, label %135, label %136

135:                                              ; preds = %128
  br label %138

136:                                              ; preds = %128
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 60, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

137:                                              ; No predecessors!
  br label %138

138:                                              ; preds = %137, %135
  %139 = load ptr, ptr %7, align 8, !tbaa !9
  %140 = getelementptr inbounds %struct.imap_pair, ptr %10, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !19
  %142 = invoke noundef i64 @_ZL11imap_getvalP9imap_nodePj(ptr noundef %139, ptr noundef %141)
          to label %143 unwind label %150

143:                                              ; preds = %138
  %144 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmmEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  %145 = getelementptr inbounds %"struct.std::pair", ptr %144, i32 0, i32 1
  %146 = load i64, ptr %145, align 8, !tbaa !24
  %147 = icmp eq i64 %142, %146
  br i1 %147, label %148, label %149

148:                                              ; preds = %143
  br label %155

149:                                              ; preds = %143
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.3, i32 noundef 61, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

150:                                              ; preds = %189, %138
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %16, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %17, align 4
  br label %225

154:                                              ; No predecessors!
  br label %155

155:                                              ; preds = %154, %148
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #10
  %156 = load ptr, ptr %7, align 8, !tbaa !9
  %157 = invoke { i64, ptr } @_ZL12imap_iterateP9imap_nodeP9imap_iteri(ptr noundef %156, ptr noundef %9, i32 noundef 0)
          to label %158 unwind label %174

158:                                              ; preds = %155
  %159 = getelementptr inbounds { i64, ptr }, ptr %24, i32 0, i32 0
  %160 = extractvalue { i64, ptr } %157, 0
  store i64 %160, ptr %159, align 8
  %161 = getelementptr inbounds { i64, ptr }, ptr %24, i32 0, i32 1
  %162 = extractvalue { i64, ptr } %157, 1
  store ptr %162, ptr %161, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %24, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #10
  %163 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKmmEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %21, i32 noundef 0) #10
  %164 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %25, i32 0, i32 0
  store ptr %163, ptr %164, align 8
  %165 = getelementptr inbounds %struct.imap_pair, ptr %10, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8, !tbaa !19
  %167 = icmp ne ptr %166, null
  br i1 %167, label %168, label %216

168:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %169 = call ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #10
  %170 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %26, i32 0, i32 0
  store ptr %169, ptr %170, align 8
  %171 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmmEES5_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %26) #10
  br i1 %171, label %172, label %173

172:                                              ; preds = %168
  br label %179

173:                                              ; preds = %168
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 66, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

174:                                              ; preds = %155
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %16, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #10
  br label %225

178:                                              ; No predecessors!
  br label %179

179:                                              ; preds = %178, %172
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  %180 = getelementptr inbounds %struct.imap_pair, ptr %10, i32 0, i32 0
  %181 = load i64, ptr %180, align 8, !tbaa !21
  %182 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmmEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  %183 = getelementptr inbounds %"struct.std::pair", ptr %182, i32 0, i32 0
  %184 = load i64, ptr %183, align 8, !tbaa !22
  %185 = icmp eq i64 %181, %184
  br i1 %185, label %186, label %187

186:                                              ; preds = %179
  br label %189

187:                                              ; preds = %179
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 67, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

188:                                              ; No predecessors!
  br label %189

189:                                              ; preds = %188, %186
  %190 = load ptr, ptr %7, align 8, !tbaa !9
  %191 = getelementptr inbounds %struct.imap_pair, ptr %10, i32 0, i32 1
  %192 = load ptr, ptr %191, align 8, !tbaa !19
  %193 = invoke noundef i64 @_ZL11imap_getvalP9imap_nodePj(ptr noundef %190, ptr noundef %192)
          to label %194 unwind label %150

194:                                              ; preds = %189
  %195 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmmEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  %196 = getelementptr inbounds %"struct.std::pair", ptr %195, i32 0, i32 1
  %197 = load i64, ptr %196, align 8, !tbaa !24
  %198 = icmp eq i64 %193, %197
  br i1 %198, label %199, label %200

199:                                              ; preds = %194
  br label %202

200:                                              ; preds = %194
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.3, i32 noundef 68, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

201:                                              ; No predecessors!
  br label %202

202:                                              ; preds = %201, %199
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #10
  %203 = load ptr, ptr %7, align 8, !tbaa !9
  %204 = load i64, ptr %12, align 8, !tbaa !13
  %205 = trunc i64 %204 to i32
  %206 = invoke { i64, ptr } @_ZL12imap_iterateP9imap_nodeP9imap_iteri(ptr noundef %203, ptr noundef %9, i32 noundef %205)
          to label %207 unwind label %212

207:                                              ; preds = %202
  %208 = getelementptr inbounds { i64, ptr }, ptr %27, i32 0, i32 0
  %209 = extractvalue { i64, ptr } %206, 0
  store i64 %209, ptr %208, align 8
  %210 = getelementptr inbounds { i64, ptr }, ptr %27, i32 0, i32 1
  %211 = extractvalue { i64, ptr } %206, 1
  store ptr %211, ptr %210, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %27, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #10
  br label %224

212:                                              ; preds = %202
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %16, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #10
  br label %225

216:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  %217 = call ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #10
  %218 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %28, i32 0, i32 0
  store ptr %217, ptr %218, align 8
  %219 = call noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKmmEES5_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %28) #10
  br i1 %219, label %220, label %221

220:                                              ; preds = %216
  br label %223

221:                                              ; preds = %216
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 72, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

222:                                              ; No predecessors!
  br label %223

223:                                              ; preds = %222, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  br label %224

224:                                              ; preds = %223, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  br label %242

225:                                              ; preds = %212, %174, %150, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  br label %294

226:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %227 = load i64, ptr %12, align 8, !tbaa !13
  store i64 %227, ptr %30, align 8, !tbaa !15
  %228 = invoke ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %30)
          to label %229 unwind label %236

229:                                              ; preds = %226
  %230 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %29, i32 0, i32 0
  store ptr %228, ptr %230, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %231 = call ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #10
  %232 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %31, i32 0, i32 0
  store ptr %231, ptr %232, align 8
  %233 = call noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKmmEES5_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %31) #10
  br i1 %233, label %234, label %235

234:                                              ; preds = %229
  br label %241

235:                                              ; preds = %229
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 77, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

236:                                              ; preds = %226
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %16, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  br label %294

240:                                              ; No predecessors!
  br label %241

241:                                              ; preds = %240, %234
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  br label %242

242:                                              ; preds = %241, %224
  br label %287

243:                                              ; preds = %93, %89
  %244 = getelementptr inbounds [80 x i8], ptr %14, i64 0, i64 0
  %245 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef %244, ptr noundef @.str.7, ptr noundef %12) #10
  %246 = icmp eq i32 1, %245
  br i1 %246, label %247, label %286

247:                                              ; preds = %243
  %248 = load ptr, ptr %7, align 8, !tbaa !9
  %249 = load i64, ptr %12, align 8, !tbaa !13
  %250 = invoke noundef ptr @_ZL11imap_lookupP9imap_nodem(ptr noundef %248, i64 noundef %249)
          to label %251 unwind label %62

251:                                              ; preds = %247
  store ptr %250, ptr %8, align 8, !tbaa !9
  %252 = load ptr, ptr %8, align 8, !tbaa !9
  %253 = icmp ne ptr %252, null
  br i1 %253, label %254, label %272

254:                                              ; preds = %251
  %255 = load ptr, ptr %7, align 8, !tbaa !9
  %256 = load ptr, ptr %8, align 8, !tbaa !9
  %257 = invoke noundef i64 @_ZL11imap_getvalP9imap_nodePj(ptr noundef %255, ptr noundef %256)
          to label %258 unwind label %62

258:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %259 = load i64, ptr %12, align 8, !tbaa !13
  store i64 %259, ptr %32, align 8, !tbaa !15
  %260 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEEixEOm(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %32)
          to label %261 unwind label %266

261:                                              ; preds = %258
  %262 = load i64, ptr %260, align 8, !tbaa !15
  %263 = icmp eq i64 %257, %262
  br i1 %263, label %264, label %265

264:                                              ; preds = %261
  br label %271

265:                                              ; preds = %261
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.3, i32 noundef 87, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

266:                                              ; preds = %258
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %16, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %294

270:                                              ; No predecessors!
  br label %271

271:                                              ; preds = %270, %264
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %285

272:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %273 = load i64, ptr %12, align 8, !tbaa !13
  store i64 %273, ptr %33, align 8, !tbaa !15
  %274 = invoke noundef i64 @_ZNKSt3mapImmSt4lessImESaISt4pairIKmmEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %275 unwind label %279

275:                                              ; preds = %272
  %276 = icmp eq i64 0, %274
  br i1 %276, label %277, label %278

277:                                              ; preds = %275
  br label %284

278:                                              ; preds = %275
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.3, i32 noundef 91, ptr noundef @__PRETTY_FUNCTION__.main) #11
  unreachable

279:                                              ; preds = %272
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %16, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  br label %294

283:                                              ; No predecessors!
  br label %284

284:                                              ; preds = %283, %277
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  br label %285

285:                                              ; preds = %284, %271
  br label %286

286:                                              ; preds = %285, %243
  br label %287

287:                                              ; preds = %286, %242
  br label %288

288:                                              ; preds = %287, %84
  br label %289

289:                                              ; preds = %288, %61
  br label %36, !llvm.loop !25

290:                                              ; preds = %40
  %291 = load ptr, ptr %7, align 8, !tbaa !9
  invoke void @_ZL9imap_freeP9imap_node(ptr noundef %291)
          to label %292 unwind label %62

292:                                              ; preds = %290
  store i32 0, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 68, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #10
  %293 = load i32, ptr %3, align 4
  ret i32 %293

294:                                              ; preds = %279, %266, %236, %225, %119, %85, %66, %62
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 68, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #10
  br label %295

295:                                              ; preds = %294
  %296 = load ptr, ptr %16, align 8
  %297 = load i32, ptr %17, align 4
  %298 = insertvalue { ptr, i32 } poison, ptr %296, 0
  %299 = insertvalue { ptr, i32 } %298, i32 %297, 1
  resume { ptr, i32 } %299
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL11imap_ensureP9imap_nodej(ptr noundef, i32 noundef) #3

declare i32 @__gxx_personality_v0(...)

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i32 @__isoc99_sscanf(ptr noundef, ptr noundef, ...) #5

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL11imap_assignP9imap_nodem(ptr noundef, i64 noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL11imap_setvalP9imap_nodePjm(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEEixEOm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

; 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 hidden void @_ZL11imap_removeP9imap_nodem(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { i64, ptr } @_ZL11imap_locateP9imap_nodeP9imap_iterm(ptr noundef, ptr noundef, i64 noundef) #3

; 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) #7

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #8

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZL11imap_getvalP9imap_nodePj(ptr noundef, ptr noundef) #9

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { i64, ptr } @_ZL12imap_iterateP9imap_nodeP9imap_iteri(ptr noundef, ptr noundef, i32 noundef) #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL11imap_lookupP9imap_nodem(ptr noundef, i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapImmSt4lessImESaISt4pairIKmmEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL9imap_freeP9imap_node(ptr noundef) #9

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { noreturn 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { noreturn 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 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{i64 0, i64 8, !15, i64 8, i64 8, !9}
!19 = !{!20, !10, i64 8}
!20 = !{!"_ZTS9imap_pair", !16, i64 0, !10, i64 8}
!21 = !{!20, !16, i64 0}
!22 = !{!23, !16, i64 0}
!23 = !{!"_ZTSSt4pairIKmmE", !16, i64 0, !16, i64 8}
!24 = !{!23, !16, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"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"

%struct.imap_iter = type { [16 x i32], i32 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, unsigned long>, std::_Select1st<std::pair<const unsigned long, unsigned long>>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, unsigned long>, std::_Select1st<std::pair<const unsigned long, unsigned long>>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }

@stdin = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [12 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [64 x i8], align 1
@__PRETTY_FUNCTION__.main = external hidden unnamed_addr constant [23 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.imap_iter, align 4
  %4 = alloca %"class.std::map", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca [80 x i8], align 16
  %8 = alloca i8, align 1
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %12 = alloca i64, align 8
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca i64, align 8
  %18 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 68, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #8
  call void @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  %21 = invoke noundef ptr @_ZL11imap_ensureP9imap_nodej(ptr noundef null, i32 noundef 1)
          to label %.preheader unwind label %.loopexit.split-lp

.preheader:                                       ; preds = %2
  %22 = load ptr, ptr @stdin, align 8, !tbaa !5
  %23 = call ptr @fgets(ptr noundef nonnull %7, i32 noundef 80, ptr noundef %22)
  %.not65 = icmp eq ptr %23, null
  br i1 %.not65, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %161
  %.066 = phi ptr [ %.1, %161 ], [ %21, %.preheader ]
  %24 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %7, ptr noundef nonnull @.str, ptr noundef nonnull %5, ptr noundef nonnull %6) #8
  %25 = icmp eq i32 %24, 2
  br i1 %25, label %26, label %40

26:                                               ; preds = %.lr.ph
  %27 = invoke noundef ptr @_ZL11imap_ensureP9imap_nodej(ptr noundef %.066, i32 noundef 1)
          to label %28 unwind label %.loopexit

28:                                               ; preds = %26
  %29 = load i64, ptr %5, align 8, !tbaa !9
  %30 = invoke noundef ptr @_ZL11imap_assignP9imap_nodem(ptr noundef %27, i64 noundef %29)
          to label %31 unwind label %.loopexit

31:                                               ; preds = %28
  %32 = load i64, ptr %6, align 8, !tbaa !9
  invoke void @_ZL11imap_setvalP9imap_nodePjm(ptr noundef %27, ptr noundef %30, i64 noundef %32)
          to label %33 unwind label %.loopexit

33:                                               ; preds = %31
  %34 = load i64, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %35 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %35, ptr %9, align 8, !tbaa !11
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEEixEOm(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %37 unwind label %38

37:                                               ; preds = %33
  store i64 %34, ptr %36, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %161

.loopexit:                                        ; preds = %26, %28, %31, %45, %137
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %164

.loopexit.split-lp:                               ; preds = %2
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %164

38:                                               ; preds = %33
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %164

40:                                               ; preds = %.lr.ph
  %41 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %7, ptr noundef nonnull @.str.1, ptr noundef nonnull %5, ptr noundef nonnull %8) #8
  %42 = icmp eq i32 %41, 2
  %43 = load i8, ptr %8, align 1
  %44 = icmp eq i8 %43, 114
  %or.cond = select i1 %42, i1 %44, i1 false
  br i1 %or.cond, label %45, label %53

45:                                               ; preds = %40
  %46 = load i64, ptr %5, align 8, !tbaa !9
  invoke void @_ZL11imap_removeP9imap_nodem(ptr noundef %.066, i64 noundef %46)
          to label %47 unwind label %.loopexit

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %48 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %48, ptr %10, align 8, !tbaa !11
  %49 = invoke noundef i64 @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %50 unwind label %51

50:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %161

51:                                               ; preds = %47
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %164

53:                                               ; preds = %40
  %54 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %7, ptr noundef nonnull @.str.1, ptr noundef nonnull %5, ptr noundef nonnull %8) #8
  %55 = icmp eq i32 %54, 2
  %56 = load i8, ptr %8, align 1
  %57 = icmp eq i8 %56, 108
  %or.cond5 = select i1 %55, i1 %57, i1 false
  br i1 %or.cond5, label %58, label %134

58:                                               ; preds = %53
  %59 = load i64, ptr %5, align 8, !tbaa !9
  %60 = invoke { i64, ptr } @_ZL11imap_locateP9imap_nodeP9imap_iterm(ptr noundef %.066, ptr noundef nonnull %3, i64 noundef %59)
          to label %61 unwind label %71

61:                                               ; preds = %58
  %62 = extractvalue { i64, ptr } %60, 0
  %63 = extractvalue { i64, ptr } %60, 1
  %.not40 = icmp eq ptr %63, null
  br i1 %.not40, label %124, label %64

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  %65 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %65, ptr %12, align 8, !tbaa !11
  %66 = invoke ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %67 unwind label %73

67:                                               ; preds = %64
  store ptr %66, ptr %11, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %68 = call ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  store ptr %68, ptr %13, align 8
  %69 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmmEES5_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  br i1 %69, label %75, label %70

70:                                               ; preds = %67
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 59, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

71:                                               ; preds = %58
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %164

73:                                               ; preds = %64
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %123

75:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  %76 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmmEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %77 = load i64, ptr %76, align 8, !tbaa !13
  %78 = icmp eq i64 %62, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %75
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 60, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

80:                                               ; preds = %75
  %81 = call noundef i64 @_ZL11imap_getvalP9imap_nodePj(ptr noundef %.066, ptr noundef nonnull %63)
  %82 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmmEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  %84 = load i64, ptr %83, align 8, !tbaa !15
  %85 = icmp eq i64 %81, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %80
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, i32 noundef 61, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

87:                                               ; preds = %80
  %88 = invoke { i64, ptr } @_ZL12imap_iterateP9imap_nodeP9imap_iteri(ptr noundef %.066, ptr noundef nonnull %3, i32 noundef 0)
          to label %89 unwind label %97

89:                                               ; preds = %87
  %90 = extractvalue { i64, ptr } %88, 0
  %91 = extractvalue { i64, ptr } %88, 1
  %92 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKmmEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #8
  %.not41 = icmp eq ptr %91, null
  br i1 %.not41, label %117, label %93

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %94 = call ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  store ptr %94, ptr %14, align 8
  %95 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmmEES5_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br i1 %95, label %99, label %96

96:                                               ; preds = %93
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 66, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

97:                                               ; preds = %87
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %123

99:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  %100 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmmEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %101 = load i64, ptr %100, align 8, !tbaa !13
  %102 = icmp eq i64 %90, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %99
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 67, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

104:                                              ; preds = %99
  %105 = call noundef i64 @_ZL11imap_getvalP9imap_nodePj(ptr noundef %.066, ptr noundef nonnull %91)
  %106 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmmEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %107 = getelementptr inbounds i8, ptr %106, i64 8
  %108 = load i64, ptr %107, align 8, !tbaa !15
  %109 = icmp eq i64 %105, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %104
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, i32 noundef 68, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

111:                                              ; preds = %104
  %112 = load i64, ptr %5, align 8, !tbaa !9
  %113 = trunc i64 %112 to i32
  %114 = invoke { i64, ptr } @_ZL12imap_iterateP9imap_nodeP9imap_iteri(ptr noundef %.066, ptr noundef nonnull %3, i32 noundef %113)
          to label %122 unwind label %115

115:                                              ; preds = %111
  %116 = landingpad { ptr, i32 }
          cleanup
  br label %123

117:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #8
  %118 = call ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  store ptr %118, ptr %15, align 8
  %119 = call noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKmmEES5_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  br i1 %119, label %121, label %120

120:                                              ; preds = %117
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 72, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

121:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #8
  br label %122

122:                                              ; preds = %111, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %161

123:                                              ; preds = %115, %97, %73
  %.pn = phi { ptr, i32 } [ %116, %115 ], [ %98, %97 ], [ %74, %73 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %164

124:                                              ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #8
  %125 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %125, ptr %17, align 8, !tbaa !11
  %126 = invoke ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE11lower_boundERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %127 unwind label %131

127:                                              ; preds = %124
  store ptr %126, ptr %16, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %128 = call ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  store ptr %128, ptr %18, align 8
  %129 = call noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKmmEES5_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br i1 %129, label %133, label %130

130:                                              ; preds = %127
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 77, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

131:                                              ; preds = %124
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %164

133:                                              ; preds = %127
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br label %161

134:                                              ; preds = %53
  %135 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %7, ptr noundef nonnull @.str.7, ptr noundef nonnull %5) #8
  %136 = icmp eq i32 %135, 1
  br i1 %136, label %137, label %161

137:                                              ; preds = %134
  %138 = load i64, ptr %5, align 8, !tbaa !9
  %139 = invoke noundef ptr @_ZL11imap_lookupP9imap_nodem(ptr noundef %.066, i64 noundef %138)
          to label %140 unwind label %.loopexit

140:                                              ; preds = %137
  %.not39 = icmp eq ptr %139, null
  br i1 %.not39, label %152, label %141

141:                                              ; preds = %140
  %142 = call noundef i64 @_ZL11imap_getvalP9imap_nodePj(ptr noundef %.066, ptr noundef nonnull %139)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #8
  %143 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %143, ptr %19, align 8, !tbaa !11
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEEixEOm(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %145 unwind label %149

145:                                              ; preds = %141
  %146 = load i64, ptr %144, align 8, !tbaa !11
  %147 = icmp eq i64 %142, %146
  br i1 %147, label %151, label %148

148:                                              ; preds = %145
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.3, i32 noundef 87, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

149:                                              ; preds = %141
  %150 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  br label %164

151:                                              ; preds = %145
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #8
  br label %161

152:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  %153 = load i64, ptr %5, align 8, !tbaa !9
  store i64 %153, ptr %20, align 8, !tbaa !11
  %154 = invoke noundef i64 @_ZNKSt3mapImmSt4lessImESaISt4pairIKmmEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %155 unwind label %158

155:                                              ; preds = %152
  %156 = icmp eq i64 %154, 0
  br i1 %156, label %160, label %157

157:                                              ; preds = %155
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.3, i32 noundef 91, ptr noundef nonnull @__PRETTY_FUNCTION__.main) #9
  unreachable

158:                                              ; preds = %152
  %159 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  br label %164

160:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  br label %161

161:                                              ; preds = %50, %134, %160, %151, %122, %133, %37
  %.1 = phi ptr [ %27, %37 ], [ %.066, %50 ], [ %.066, %122 ], [ %.066, %133 ], [ %.066, %151 ], [ %.066, %160 ], [ %.066, %134 ]
  %162 = load ptr, ptr @stdin, align 8, !tbaa !5
  %163 = call ptr @fgets(ptr noundef nonnull %7, i32 noundef 80, ptr noundef %162)
  %.not = icmp eq ptr %163, null
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !16

._crit_edge:                                      ; preds = %161, %.preheader
  %.0.lcssa = phi ptr [ %21, %.preheader ], [ %.1, %161 ]
  call void @_ZL9imap_freeP9imap_node(ptr noundef %.0.lcssa)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 68, ptr nonnull %3) #8
  ret i32 0

164:                                              ; preds = %.loopexit, %.loopexit.split-lp, %158, %149, %131, %123, %71, %51, %38
  %.pn43 = phi { ptr, i32 } [ %39, %38 ], [ %52, %51 ], [ %.pn, %123 ], [ %132, %131 ], [ %72, %71 ], [ %150, %149 ], [ %159, %158 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 68, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn43
}

; 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 nounwind uwtable
declare dso_local void @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL11imap_ensureP9imap_nodej(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL11imap_assignP9imap_nodem(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZL11imap_setvalP9imap_nodePjm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

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

; 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 hidden void @_ZL11imap_removeP9imap_nodem(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt3mapImmSt4lessImESaISt4pairIKmmEEE5eraseERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { i64, ptr } @_ZL11imap_locateP9imap_nodeP9imap_iterm(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZL11imap_getvalP9imap_nodePj(ptr noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden { i64, ptr } @_ZL12imap_iterateP9imap_nodeP9imap_iteri(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @_ZL11imap_lookupP9imap_nodem(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt3mapImmSt4lessImESaISt4pairIKmmEEE5countERS3_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZL9imap_freeP9imap_node(ptr noundef) local_unnamed_addr #7

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 #4 = { 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 #5 = { 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 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSSt4pairIKmmE", !12, i64 0, !12, i64 8}
!15 = !{!14, !12, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


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