; LLVM IR from ros2/rcutils :: src (string_map)

; 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.rcutils_allocator_s = type { ptr, ptr, ptr, ptr, ptr }
%struct.rcutils_string_map_s = type { ptr }
%struct.rcutils_string_map_impl_s = type { ptr, i64, i64, %struct.rcutils_allocator_s }
%struct.key_value_pair = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [53 x i8], align 1
@__PRETTY_FUNCTION__.rcutils_string_map_set_no_resize = external hidden unnamed_addr constant [99 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1

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

declare void @rcutils_set_error_state(ptr noundef, ptr noundef, i64 noundef) #1

declare zeroext i1 @rcutils_allocator_is_valid(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @rcutils_string_map_set_no_resize(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.rcutils_allocator_s, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  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
  br label %15

15:                                               ; preds = %3
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = icmp eq ptr null, %16
  br i1 %17, label %18, label %21

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  call void @rcutils_set_error_state(ptr noundef @.str, ptr noundef @.str.1, i64 noundef 276)
  br label %20

20:                                               ; preds = %19
  store i32 11, ptr %4, align 4
  br label %232

21:                                               ; preds = %15
  br label %22

22:                                               ; preds = %21
  br label %23

23:                                               ; preds = %22
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = icmp eq ptr null, %26
  br i1 %27, label %28, label %31

28:                                               ; preds = %23
  br label %29

29:                                               ; preds = %28
  call void @rcutils_set_error_state(ptr noundef @.str.6, ptr noundef @.str.1, i64 noundef 278)
  br label %30

30:                                               ; preds = %29
  store i32 31, ptr %4, align 4
  br label %232

31:                                               ; preds = %23
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = icmp eq ptr null, %34
  br i1 %35, label %36, label %39

36:                                               ; preds = %33
  br label %37

37:                                               ; preds = %36
  call void @rcutils_set_error_state(ptr noundef @.str.11, ptr noundef @.str.1, i64 noundef 279)
  br label %38

38:                                               ; preds = %37
  store i32 11, ptr %4, align 4
  br label %232

39:                                               ; preds = %33
  br label %40

40:                                               ; preds = %39
  br label %41

41:                                               ; preds = %40
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = icmp eq ptr null, %42
  br i1 %43, label %44, label %47

44:                                               ; preds = %41
  br label %45

45:                                               ; preds = %44
  call void @rcutils_set_error_state(ptr noundef @.str.12, ptr noundef @.str.1, i64 noundef 280)
  br label %46

46:                                               ; preds = %45
  store i32 11, ptr %4, align 4
  br label %232

47:                                               ; preds = %41
  br label %48

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #6
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %51, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %52, i64 40, i1 false), !tbaa.struct !11
  %53 = call zeroext i1 @rcutils_allocator_is_valid(ptr noundef %8)
  br i1 %53, label %58, label %54

54:                                               ; preds = %48
  br label %55

55:                                               ; preds = %54
  call void @rcutils_set_error_state(ptr noundef @.str.5, ptr noundef @.str.1, i64 noundef 283)
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56
  store i32 11, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %231

58:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  store i8 0, ptr %11, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = call i64 @strlen(ptr noundef %63) #7
  %65 = call zeroext i1 @__get_index_of_key_if_exists(ptr noundef %61, ptr noundef %62, i64 noundef %64, ptr noundef %10)
  %66 = zext i1 %65 to i8
  store i8 %66, ptr %12, align 1, !tbaa !12
  %67 = load i8, ptr %12, align 1, !tbaa !12, !range !14, !noundef !15
  %68 = trunc i8 %67 to i1
  br i1 %68, label %157, label %69

69:                                               ; preds = %58
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %72, i32 0, i32 2
  %74 = load i64, ptr %73, align 8, !tbaa !16
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %77, i32 0, i32 1
  %79 = load i64, ptr %78, align 8, !tbaa !20
  %80 = icmp ule i64 %74, %79
  br i1 %80, label %81, label %82

81:                                               ; preds = %69
  br label %83

82:                                               ; preds = %69
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 289, ptr noundef @__PRETTY_FUNCTION__.rcutils_string_map_set_no_resize) #8
  unreachable

83:                                               ; preds = %81
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %86, i32 0, i32 2
  %88 = load i64, ptr %87, align 8, !tbaa !16
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %91, i32 0, i32 1
  %93 = load i64, ptr %92, align 8, !tbaa !20
  %94 = icmp eq i64 %88, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %83
  store i32 12, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %230

96:                                               ; preds = %83
  store i64 0, ptr %10, align 8, !tbaa !21
  br label %97

97:                                               ; preds = %118, %96
  %98 = load i64, ptr %10, align 8, !tbaa !21
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %101, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !20
  %104 = icmp ult i64 %98, %103
  br i1 %104, label %105, label %121

105:                                              ; preds = %97
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !22
  %111 = load i64, ptr %10, align 8, !tbaa !21
  %112 = getelementptr inbounds %struct.key_value_pair, ptr %110, i64 %111
  %113 = getelementptr inbounds %struct.key_value_pair, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !23
  %115 = icmp eq ptr null, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %105
  br label %121

117:                                              ; preds = %105
  br label %118

118:                                              ; preds = %117
  %119 = load i64, ptr %10, align 8, !tbaa !21
  %120 = add i64 %119, 1
  store i64 %120, ptr %10, align 8, !tbaa !21
  br label %97, !llvm.loop !25

121:                                              ; preds = %116, %97
  %122 = load i64, ptr %10, align 8, !tbaa !21
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %125, i32 0, i32 1
  %127 = load i64, ptr %126, align 8, !tbaa !20
  %128 = icmp ult i64 %122, %127
  br i1 %128, label %129, label %130

129:                                              ; preds = %121
  br label %131

130:                                              ; preds = %121
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 298, ptr noundef @__PRETTY_FUNCTION__.rcutils_string_map_set_no_resize) #8
  unreachable

131:                                              ; preds = %129
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = call ptr @rcutils_strdup(ptr noundef %132, ptr noundef byval(%struct.rcutils_allocator_s) align 8 %8)
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !22
  %139 = load i64, ptr %10, align 8, !tbaa !21
  %140 = getelementptr inbounds %struct.key_value_pair, ptr %138, i64 %139
  %141 = getelementptr inbounds %struct.key_value_pair, ptr %140, i32 0, i32 0
  store ptr %133, ptr %141, align 8, !tbaa !23
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %142, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !22
  %147 = load i64, ptr %10, align 8, !tbaa !21
  %148 = getelementptr inbounds %struct.key_value_pair, ptr %146, i64 %147
  %149 = getelementptr inbounds %struct.key_value_pair, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !23
  %151 = icmp eq ptr null, %150
  br i1 %151, label %152, label %156

152:                                              ; preds = %131
  br label %153

153:                                              ; preds = %152
  call void @rcutils_set_error_state(ptr noundef @.str.15, ptr noundef @.str.1, i64 noundef 301)
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  store i32 10, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %230

156:                                              ; preds = %131
  store i8 1, ptr %11, align 1, !tbaa !12
  br label %157

157:                                              ; preds = %156, %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %158, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !9
  %161 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %160, i32 0, i32 0
  %162 = load ptr, ptr %161, align 8, !tbaa !22
  %163 = load i64, ptr %10, align 8, !tbaa !21
  %164 = getelementptr inbounds %struct.key_value_pair, ptr %162, i64 %163
  %165 = getelementptr inbounds %struct.key_value_pair, ptr %164, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8, !tbaa !27
  store ptr %166, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = call ptr @rcutils_strdup(ptr noundef %167, ptr noundef byval(%struct.rcutils_allocator_s) align 8 %8)
  store ptr %168, ptr %14, align 8, !tbaa !5
  %169 = load ptr, ptr %14, align 8, !tbaa !5
  %170 = icmp eq ptr null, %169
  br i1 %170, label %171, label %200

171:                                              ; preds = %157
  br label %172

172:                                              ; preds = %171
  call void @rcutils_set_error_state(ptr noundef @.str.16, ptr noundef @.str.1, i64 noundef 310)
  br label %173

173:                                              ; preds = %172
  br label %174

174:                                              ; preds = %173
  %175 = load i8, ptr %11, align 1, !tbaa !12, !range !14, !noundef !15
  %176 = trunc i8 %175 to i1
  br i1 %176, label %177, label %199

177:                                              ; preds = %174
  %178 = getelementptr inbounds %struct.rcutils_allocator_s, ptr %8, i32 0, i32 1
  %179 = load ptr, ptr %178, align 8, !tbaa !28
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %180, i32 0, i32 0
  %182 = load ptr, ptr %181, align 8, !tbaa !9
  %183 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %182, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !22
  %185 = load i64, ptr %10, align 8, !tbaa !21
  %186 = getelementptr inbounds %struct.key_value_pair, ptr %184, i64 %185
  %187 = getelementptr inbounds %struct.key_value_pair, ptr %186, i32 0, i32 0
  %188 = load ptr, ptr %187, align 8, !tbaa !23
  %189 = getelementptr inbounds %struct.rcutils_allocator_s, ptr %8, i32 0, i32 4
  %190 = load ptr, ptr %189, align 8, !tbaa !29
  call void %179(ptr noundef %188, ptr noundef %190)
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %192, align 8, !tbaa !9
  %194 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !22
  %196 = load i64, ptr %10, align 8, !tbaa !21
  %197 = getelementptr inbounds %struct.key_value_pair, ptr %195, i64 %196
  %198 = getelementptr inbounds %struct.key_value_pair, ptr %197, i32 0, i32 0
  store ptr null, ptr %198, align 8, !tbaa !23
  br label %199

199:                                              ; preds = %177, %174
  store i32 10, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %229

200:                                              ; preds = %157
  %201 = load ptr, ptr %14, align 8, !tbaa !5
  %202 = load ptr, ptr %5, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %202, i32 0, i32 0
  %204 = load ptr, ptr %203, align 8, !tbaa !9
  %205 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %204, i32 0, i32 0
  %206 = load ptr, ptr %205, align 8, !tbaa !22
  %207 = load i64, ptr %10, align 8, !tbaa !21
  %208 = getelementptr inbounds %struct.key_value_pair, ptr %206, i64 %207
  %209 = getelementptr inbounds %struct.key_value_pair, ptr %208, i32 0, i32 1
  store ptr %201, ptr %209, align 8, !tbaa !27
  %210 = load ptr, ptr %13, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %218

212:                                              ; preds = %200
  %213 = getelementptr inbounds %struct.rcutils_allocator_s, ptr %8, i32 0, i32 1
  %214 = load ptr, ptr %213, align 8, !tbaa !28
  %215 = load ptr, ptr %13, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.rcutils_allocator_s, ptr %8, i32 0, i32 4
  %217 = load ptr, ptr %216, align 8, !tbaa !29
  call void %214(ptr noundef %215, ptr noundef %217)
  br label %218

218:                                              ; preds = %212, %200
  %219 = load i8, ptr %12, align 1, !tbaa !12, !range !14, !noundef !15
  %220 = trunc i8 %219 to i1
  br i1 %220, label %228, label %221

221:                                              ; preds = %218
  %222 = load ptr, ptr %5, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.rcutils_string_map_s, ptr %222, i32 0, i32 0
  %224 = load ptr, ptr %223, align 8, !tbaa !9
  %225 = getelementptr inbounds %struct.rcutils_string_map_impl_s, ptr %224, i32 0, i32 2
  %226 = load i64, ptr %225, align 8, !tbaa !16
  %227 = add i64 %226, 1
  store i64 %227, ptr %225, align 8, !tbaa !16
  br label %228

228:                                              ; preds = %221, %218
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %229

229:                                              ; preds = %228, %199
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %230

230:                                              ; preds = %229, %155, %95
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %231

231:                                              ; preds = %230, %57
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #6
  br label %232

232:                                              ; preds = %231, %46, %38, %30, %20
  %233 = load i32, ptr %4, align 4
  ret i32 %233
}

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @__get_index_of_key_if_exists(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

declare ptr @rcutils_strdup(ptr noundef, ptr noundef byval(%struct.rcutils_allocator_s) align 8) #1

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(read) "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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"rcutils_string_map_s", !6, i64 0}
!11 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5, i64 32, i64 8, !5}
!12 = !{!13, !13, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !18, i64 16}
!17 = !{!"rcutils_string_map_impl_s", !6, i64 0, !18, i64 8, !18, i64 16, !19, i64 24}
!18 = !{!"long", !7, i64 0}
!19 = !{!"rcutils_allocator_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!20 = !{!17, !18, i64 8}
!21 = !{!18, !18, i64 0}
!22 = !{!17, !6, i64 0}
!23 = !{!24, !6, i64 0}
!24 = !{!"key_value_pair", !6, i64 0, !6, i64 8}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!24, !6, i64 8}
!28 = !{!19, !6, i64 8}
!29 = !{!19, !6, i64 32}


; 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.rcutils_allocator_s = type { ptr, ptr, ptr, ptr, ptr }
%struct.key_value_pair = type { ptr, ptr }

@.str = external hidden unnamed_addr constant [28 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [53 x i8], align 1
@__PRETTY_FUNCTION__.rcutils_string_map_set_no_resize = external hidden unnamed_addr constant [99 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [36 x i8], align 1

; Function Attrs: mustprogress 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) #0

declare void @rcutils_set_error_state(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare zeroext i1 @rcutils_allocator_is_valid(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 32) i32 @rcutils_string_map_set_no_resize(ptr noundef readonly %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #3 {
  %4 = alloca %struct.rcutils_allocator_s, align 8
  %5 = alloca i64, align 8
  %6 = icmp eq ptr %0, null
  br i1 %6, label %7, label %8

7:                                                ; preds = %3
  tail call void @rcutils_set_error_state(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i64 noundef 276) #6
  br label %90

8:                                                ; preds = %3
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = icmp eq ptr %9, null
  br i1 %10, label %11, label %12

11:                                               ; preds = %8
  tail call void @rcutils_set_error_state(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i64 noundef 278) #6
  br label %90

12:                                               ; preds = %8
  %13 = icmp eq ptr %1, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %12
  tail call void @rcutils_set_error_state(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i64 noundef 279) #6
  br label %90

15:                                               ; preds = %12
  %16 = icmp eq ptr %2, null
  br i1 %16, label %17, label %18

17:                                               ; preds = %15
  tail call void @rcutils_set_error_state(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.1, i64 noundef 280) #6
  br label %90

18:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  %19 = getelementptr inbounds i8, ptr %9, i64 24
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull align 8 dereferenceable(40) %19, i64 40, i1 false), !tbaa.struct !10
  %20 = call zeroext i1 @rcutils_allocator_is_valid(ptr noundef nonnull %4) #6
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  call void @rcutils_set_error_state(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i64 noundef 283) #6
  br label %89

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %23 = load ptr, ptr %0, align 8, !tbaa !5
  %24 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %25 = call zeroext i1 @__get_index_of_key_if_exists(ptr noundef %23, ptr noundef nonnull %1, i64 noundef %24, ptr noundef nonnull %5)
  %.pre = load ptr, ptr %0, align 8, !tbaa !5
  br i1 %25, label %._crit_edge45, label %26

._crit_edge45:                                    ; preds = %22
  %.pre46 = load ptr, ptr %.pre, align 8, !tbaa !12
  %.pre47 = load i64, ptr %5, align 8, !tbaa !16
  br label %50

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %.pre, i64 16
  %28 = load i64, ptr %27, align 8, !tbaa !17
  %29 = getelementptr inbounds i8, ptr %.pre, i64 8
  %30 = load i64, ptr %29, align 8, !tbaa !18
  %.not = icmp ugt i64 %28, %30
  br i1 %.not, label %31, label %32

31:                                               ; preds = %26
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.1, i32 noundef 289, ptr noundef nonnull @__PRETTY_FUNCTION__.rcutils_string_map_set_no_resize) #8
  unreachable

32:                                               ; preds = %26
  %33 = icmp eq i64 %28, %30
  br i1 %33, label %88, label %.preheader

.preheader:                                       ; preds = %32
  %.not43 = icmp eq i64 %30, 0
  br i1 %.not43, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %34 = load ptr, ptr %.pre, align 8, !tbaa !12
  br label %35

35:                                               ; preds = %.lr.ph, %39
  %storemerge42 = phi i64 [ 0, %.lr.ph ], [ %40, %39 ]
  %36 = getelementptr inbounds %struct.key_value_pair, ptr %34, i64 %storemerge42
  %37 = load ptr, ptr %36, align 8, !tbaa !19
  %38 = icmp eq ptr %37, null
  br i1 %38, label %42, label %39

39:                                               ; preds = %35
  %40 = add nuw i64 %storemerge42, 1
  %41 = icmp ult i64 %40, %30
  br i1 %41, label %35, label %._crit_edge, !llvm.loop !21

._crit_edge:                                      ; preds = %39, %.preheader
  %storemerge.lcssa = phi i64 [ 0, %.preheader ], [ %40, %39 ]
  store i64 %storemerge.lcssa, ptr %5, align 8, !tbaa !16
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 298, ptr noundef nonnull @__PRETTY_FUNCTION__.rcutils_string_map_set_no_resize) #8
  unreachable

42:                                               ; preds = %35
  store i64 %storemerge42, ptr %5, align 8, !tbaa !16
  %43 = call ptr @rcutils_strdup(ptr noundef nonnull %1, ptr noundef nonnull byval(%struct.rcutils_allocator_s) align 8 %4) #6
  %44 = load ptr, ptr %0, align 8, !tbaa !5
  %45 = load ptr, ptr %44, align 8, !tbaa !12
  %46 = load i64, ptr %5, align 8, !tbaa !16
  %47 = getelementptr inbounds %struct.key_value_pair, ptr %45, i64 %46
  store ptr %43, ptr %47, align 8, !tbaa !19
  %48 = icmp eq ptr %43, null
  br i1 %48, label %49, label %50

49:                                               ; preds = %42
  call void @rcutils_set_error_state(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i64 noundef 301) #6
  br label %88

50:                                               ; preds = %._crit_edge45, %42
  %51 = phi i64 [ %46, %42 ], [ %.pre47, %._crit_edge45 ]
  %52 = phi ptr [ %45, %42 ], [ %.pre46, %._crit_edge45 ]
  %53 = getelementptr inbounds %struct.key_value_pair, ptr %52, i64 %51, i32 1
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  %55 = call ptr @rcutils_strdup(ptr noundef nonnull %2, ptr noundef nonnull byval(%struct.rcutils_allocator_s) align 8 %4) #6
  %56 = icmp eq ptr %55, null
  br i1 %56, label %57, label %72

57:                                               ; preds = %50
  call void @rcutils_set_error_state(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i64 noundef 310) #6
  br i1 %25, label %88, label %58

58:                                               ; preds = %57
  %59 = getelementptr inbounds i8, ptr %4, i64 8
  %60 = load ptr, ptr %59, align 8, !tbaa !24
  %61 = load ptr, ptr %0, align 8, !tbaa !5
  %62 = load ptr, ptr %61, align 8, !tbaa !12
  %63 = load i64, ptr %5, align 8, !tbaa !16
  %64 = getelementptr inbounds %struct.key_value_pair, ptr %62, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !19
  %66 = getelementptr inbounds i8, ptr %4, i64 32
  %67 = load ptr, ptr %66, align 8, !tbaa !25
  call void %60(ptr noundef %65, ptr noundef %67) #6
  %68 = load ptr, ptr %0, align 8, !tbaa !5
  %69 = load ptr, ptr %68, align 8, !tbaa !12
  %70 = load i64, ptr %5, align 8, !tbaa !16
  %71 = getelementptr inbounds %struct.key_value_pair, ptr %69, i64 %70
  store ptr null, ptr %71, align 8, !tbaa !19
  br label %88

72:                                               ; preds = %50
  %73 = load ptr, ptr %0, align 8, !tbaa !5
  %74 = load ptr, ptr %73, align 8, !tbaa !12
  %75 = load i64, ptr %5, align 8, !tbaa !16
  %76 = getelementptr inbounds %struct.key_value_pair, ptr %74, i64 %75, i32 1
  store ptr %55, ptr %76, align 8, !tbaa !23
  %.not40 = icmp eq ptr %54, null
  br i1 %.not40, label %82, label %77

77:                                               ; preds = %72
  %78 = getelementptr inbounds i8, ptr %4, i64 8
  %79 = load ptr, ptr %78, align 8, !tbaa !24
  %80 = getelementptr inbounds i8, ptr %4, i64 32
  %81 = load ptr, ptr %80, align 8, !tbaa !25
  call void %79(ptr noundef nonnull %54, ptr noundef %81) #6
  br label %82

82:                                               ; preds = %77, %72
  br i1 %25, label %88, label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %0, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i64 16
  %86 = load i64, ptr %85, align 8, !tbaa !17
  %87 = add i64 %86, 1
  store i64 %87, ptr %85, align 8, !tbaa !17
  br label %88

88:                                               ; preds = %58, %57, %83, %82, %32, %49
  %.1 = phi i32 [ 10, %49 ], [ 12, %32 ], [ 10, %58 ], [ 10, %57 ], [ 0, %83 ], [ 0, %82 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %89

89:                                               ; preds = %88, %21
  %.2 = phi i32 [ %.1, %88 ], [ 11, %21 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  br label %90

90:                                               ; preds = %89, %17, %14, %11, %7
  %.3 = phi i32 [ 11, %7 ], [ 31, %11 ], [ 11, %14 ], [ 11, %17 ], [ %.2, %89 ]
  ret i32 %.3
}

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @__get_index_of_key_if_exists(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

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

declare ptr @rcutils_strdup(ptr noundef, ptr noundef byval(%struct.rcutils_allocator_s) align 8) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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, !7, i64 0}
!6 = !{!"rcutils_string_map_s", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{i64 0, i64 8, !11, i64 8, i64 8, !11, i64 16, i64 8, !11, i64 24, i64 8, !11, i64 32, i64 8, !11}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !7, i64 0}
!13 = !{!"rcutils_string_map_impl_s", !7, i64 0, !14, i64 8, !14, i64 16, !15, i64 24}
!14 = !{!"long", !8, i64 0}
!15 = !{!"rcutils_allocator_s", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!16 = !{!14, !14, i64 0}
!17 = !{!13, !14, i64 16}
!18 = !{!13, !14, i64 8}
!19 = !{!20, !7, i64 0}
!20 = !{!"key_value_pair", !7, i64 0, !7, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!20, !7, i64 8}
!24 = !{!15, !7, i64 8}
!25 = !{!15, !7, i64 32}


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