; LLVM IR from tezc/sc :: map (map_test)

; 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.sc_map_32 = type { ptr, i32, i32, i32, i32, i8, i8, i8 }
%struct.sc_map_item_32 = type { i32, i32 }

@.str.14 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.128 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__.test2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.131 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.132 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

; Function Attrs: nounwind
declare i32 @rand() #2

declare zeroext i1 @sc_map_init_32(ptr noundef, i32 noundef, i32 noundef) #3

declare void @sc_map_term_32(ptr noundef) #3

declare i32 @sc_map_del_32(ptr noundef, i32 noundef) #3

declare i32 @sc_map_get_32(ptr noundef, i32 noundef) #3

declare i32 @sc_map_put_32(ptr noundef, i32 noundef, i32 noundef) #3

declare void @sc_map_clear_32(ptr noundef) #3

declare i32 @sc_map_size_32(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @test2() #4 {
  %1 = alloca %struct.sc_map_32, align 8
  %2 = alloca [128 x i32], align 16
  %3 = alloca [128 x i32], align 16
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 32, ptr %1) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %57, %0
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = icmp slt i32 %23, 128
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %60

26:                                               ; preds = %22
  br label %27

27:                                               ; preds = %46, %26
  %28 = call i32 @rand() #5
  store i32 %28, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %43, %27
  %30 = load i32, ptr %9, align 4, !tbaa !5
  %31 = load i32, ptr %7, align 4, !tbaa !5
  %32 = icmp slt i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 6, ptr %8, align 4
  br label %46

34:                                               ; preds = %29
  %35 = load i32, ptr %9, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load i32, ptr %6, align 4, !tbaa !5
  %40 = icmp eq i32 %38, %39
  br i1 %40, label %41, label %42

41:                                               ; preds = %34
  store i32 5, ptr %8, align 4
  br label %46

42:                                               ; preds = %34
  br label %43

43:                                               ; preds = %42
  %44 = load i32, ptr %9, align 4, !tbaa !5
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %9, align 4, !tbaa !5
  br label %29, !llvm.loop !9

46:                                               ; preds = %41, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %47 = load i32, ptr %8, align 4
  switch i32 %47, label %385 [
    i32 6, label %48
    i32 5, label %27
  ]

48:                                               ; preds = %46
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %51
  store i32 %49, ptr %52, align 4, !tbaa !5
  %53 = call i32 @rand() #5
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %55
  store i32 %53, ptr %56, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %48
  %58 = load i32, ptr %7, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %7, align 4, !tbaa !5
  br label %22, !llvm.loop !11

60:                                               ; preds = %25
  %61 = call zeroext i1 @sc_map_init_32(ptr noundef %1, i32 noundef 16, i32 noundef 50)
  br i1 %61, label %62, label %63

62:                                               ; preds = %60
  br label %64

63:                                               ; preds = %60
  call void @__assert_fail(ptr noundef @.str.129, ptr noundef @.str.14, i32 noundef 1836, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

64:                                               ; preds = %62
  %65 = call i32 @sc_map_size_32(ptr noundef %1)
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %64
  br label %69

68:                                               ; preds = %64
  call void @__assert_fail(ptr noundef @.str.130, ptr noundef @.str.14, i32 noundef 1837, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

69:                                               ; preds = %67
  %70 = call i32 @sc_map_put_32(ptr noundef %1, i32 noundef 0, i32 noundef 0)
  call void @sc_map_clear_32(ptr noundef %1)
  %71 = call i32 @sc_map_size_32(ptr noundef %1)
  %72 = icmp eq i32 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  br label %75

74:                                               ; preds = %69
  call void @__assert_fail(ptr noundef @.str.130, ptr noundef @.str.14, i32 noundef 1840, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

75:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %139, %75
  %77 = load i32, ptr %10, align 4, !tbaa !5
  %78 = icmp slt i32 %77, 100
  br i1 %78, label %80, label %79

79:                                               ; preds = %76
  store i32 9, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %142

80:                                               ; preds = %76
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = call i32 @sc_map_put_32(ptr noundef %1, i32 noundef %84, i32 noundef %88)
  %90 = load i32, ptr %10, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = call i32 @sc_map_get_32(ptr noundef %1, i32 noundef %93)
  store i32 %94, ptr %5, align 4, !tbaa !5
  %95 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 7
  %96 = load i8, ptr %95, align 2, !tbaa !12, !range !16, !noundef !17
  %97 = trunc i8 %96 to i1
  br i1 %97, label %98, label %99

98:                                               ; preds = %80
  br label %100

99:                                               ; preds = %80
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 1845, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

100:                                              ; preds = %98
  %101 = load i32, ptr %5, align 4, !tbaa !5
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %103
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = icmp eq i32 %101, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %100
  br label %109

108:                                              ; preds = %100
  call void @__assert_fail(ptr noundef @.str.131, ptr noundef @.str.14, i32 noundef 1846, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

109:                                              ; preds = %107
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = load i32, ptr %10, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = call i32 @sc_map_put_32(ptr noundef %1, i32 noundef %113, i32 noundef %117)
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = call i32 @sc_map_del_32(ptr noundef %1, i32 noundef %122)
  store i32 %123, ptr %5, align 4, !tbaa !5
  %124 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 7
  %125 = load i8, ptr %124, align 2, !tbaa !12, !range !16, !noundef !17
  %126 = trunc i8 %125 to i1
  br i1 %126, label %127, label %128

127:                                              ; preds = %109
  br label %129

128:                                              ; preds = %109
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.14, i32 noundef 1850, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

129:                                              ; preds = %127
  %130 = load i32, ptr %5, align 4, !tbaa !5
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = icmp eq i32 %130, %134
  br i1 %135, label %136, label %137

136:                                              ; preds = %129
  br label %138

137:                                              ; preds = %129
  call void @__assert_fail(ptr noundef @.str.131, ptr noundef @.str.14, i32 noundef 1851, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

138:                                              ; preds = %136
  br label %139

139:                                              ; preds = %138
  %140 = load i32, ptr %10, align 4, !tbaa !5
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %10, align 4, !tbaa !5
  br label %76, !llvm.loop !18

142:                                              ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %157, %142
  %144 = load i32, ptr %11, align 4, !tbaa !5
  %145 = icmp slt i32 %144, 128
  br i1 %145, label %147, label %146

146:                                              ; preds = %143
  store i32 12, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %160

147:                                              ; preds = %143
  %148 = load i32, ptr %11, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %149
  %151 = load i32, ptr %150, align 4, !tbaa !5
  %152 = load i32, ptr %11, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = call i32 @sc_map_put_32(ptr noundef %1, i32 noundef %151, i32 noundef %155)
  br label %157

157:                                              ; preds = %147
  %158 = load i32, ptr %11, align 4, !tbaa !5
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %11, align 4, !tbaa !5
  br label %143, !llvm.loop !19

160:                                              ; preds = %146
  %161 = call i32 @sc_map_size_32(ptr noundef %1)
  %162 = icmp eq i32 %161, 128
  br i1 %162, label %163, label %164

163:                                              ; preds = %160
  br label %165

164:                                              ; preds = %160
  call void @__assert_fail(ptr noundef @.str.132, ptr noundef @.str.14, i32 noundef 1858, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

165:                                              ; preds = %163
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 -1, ptr %13, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %166

166:                                              ; preds = %242, %165
  %167 = load i64, ptr %14, align 8, !tbaa !20
  %168 = icmp ne i64 %167, 0
  br i1 %168, label %175, label %169

169:                                              ; preds = %166
  %170 = load i64, ptr %13, align 8, !tbaa !20
  %171 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 1
  %172 = load i32, ptr %171, align 8, !tbaa !22
  %173 = zext i32 %172 to i64
  %174 = icmp slt i64 %170, %173
  br label %175

175:                                              ; preds = %169, %166
  %176 = phi i1 [ false, %166 ], [ %174, %169 ]
  br i1 %176, label %178, label %177

177:                                              ; preds = %175
  store i32 15, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %245

178:                                              ; preds = %175
  %179 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !23
  %181 = load i64, ptr %13, align 8, !tbaa !20
  %182 = getelementptr inbounds %struct.sc_map_item_32, ptr %180, i64 %181
  %183 = getelementptr inbounds %struct.sc_map_item_32, ptr %182, i32 0, i32 1
  %184 = load i32, ptr %183, align 4, !tbaa !24
  store i32 %184, ptr %5, align 4, !tbaa !5
  %185 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 0
  %186 = load ptr, ptr %185, align 8, !tbaa !23
  %187 = load i64, ptr %13, align 8, !tbaa !20
  %188 = getelementptr inbounds %struct.sc_map_item_32, ptr %186, i64 %187
  %189 = getelementptr inbounds %struct.sc_map_item_32, ptr %188, i32 0, i32 0
  %190 = load i32, ptr %189, align 4, !tbaa !26
  store i32 %190, ptr %4, align 4, !tbaa !5
  store i64 1, ptr %14, align 8, !tbaa !20
  br label %191

191:                                              ; preds = %240, %178
  %192 = load i64, ptr %14, align 8, !tbaa !20
  %193 = icmp ne i64 %192, 0
  br i1 %193, label %194, label %205

194:                                              ; preds = %191
  %195 = load i64, ptr %13, align 8, !tbaa !20
  %196 = icmp eq i64 %195, -1
  br i1 %196, label %197, label %201

197:                                              ; preds = %194
  %198 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 5
  %199 = load i8, ptr %198, align 8, !tbaa !27, !range !16, !noundef !17
  %200 = trunc i8 %199 to i1
  br i1 %200, label %204, label %201

201:                                              ; preds = %197, %194
  %202 = load i32, ptr %4, align 4, !tbaa !5
  %203 = icmp ne i32 %202, 0
  br i1 %203, label %204, label %205

204:                                              ; preds = %201, %197
  br label %206

205:                                              ; preds = %201, %191
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %206

206:                                              ; preds = %205, %204
  %207 = phi i64 [ 1, %204 ], [ 0, %205 ]
  %208 = icmp ne i64 %207, 0
  br i1 %208, label %209, label %241

209:                                              ; preds = %206
  store i8 0, ptr %12, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %210

210:                                              ; preds = %230, %209
  %211 = load i32, ptr %15, align 4, !tbaa !5
  %212 = icmp slt i32 %211, 128
  br i1 %212, label %214, label %213

213:                                              ; preds = %210
  store i32 21, ptr %8, align 4
  br label %233

214:                                              ; preds = %210
  %215 = load i32, ptr %4, align 4, !tbaa !5
  %216 = load i32, ptr %15, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = icmp eq i32 %215, %219
  br i1 %220, label %221, label %229

221:                                              ; preds = %214
  %222 = load i32, ptr %5, align 4, !tbaa !5
  %223 = load i32, ptr %15, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %224
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = icmp eq i32 %222, %226
  br i1 %227, label %228, label %229

228:                                              ; preds = %221
  store i8 1, ptr %12, align 1, !tbaa !28
  store i32 21, ptr %8, align 4
  br label %233

229:                                              ; preds = %221, %214
  br label %230

230:                                              ; preds = %229
  %231 = load i32, ptr %15, align 4, !tbaa !5
  %232 = add nsw i32 %231, 1
  store i32 %232, ptr %15, align 4, !tbaa !5
  br label %210, !llvm.loop !29

233:                                              ; preds = %228, %213
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %234

234:                                              ; preds = %233
  %235 = load i8, ptr %12, align 1, !tbaa !28, !range !16, !noundef !17
  %236 = trunc i8 %235 to i1
  br i1 %236, label %237, label %238

237:                                              ; preds = %234
  br label %239

238:                                              ; preds = %234
  call void @__assert_fail(ptr noundef @.str.128, ptr noundef @.str.14, i32 noundef 1869, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

239:                                              ; preds = %237
  br label %240

240:                                              ; preds = %239
  store i64 0, ptr %14, align 8, !tbaa !20
  br label %191, !llvm.loop !30

241:                                              ; preds = %206
  br label %242

242:                                              ; preds = %241
  %243 = load i64, ptr %13, align 8, !tbaa !20
  %244 = add nsw i64 %243, 1
  store i64 %244, ptr %13, align 8, !tbaa !20
  br label %166, !llvm.loop !31

245:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store i64 -1, ptr %16, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 0, ptr %17, align 8, !tbaa !20
  br label %246

246:                                              ; preds = %309, %245
  %247 = load i64, ptr %17, align 8, !tbaa !20
  %248 = icmp ne i64 %247, 0
  br i1 %248, label %255, label %249

249:                                              ; preds = %246
  %250 = load i64, ptr %16, align 8, !tbaa !20
  %251 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 1
  %252 = load i32, ptr %251, align 8, !tbaa !22
  %253 = zext i32 %252 to i64
  %254 = icmp slt i64 %250, %253
  br label %255

255:                                              ; preds = %249, %246
  %256 = phi i1 [ false, %246 ], [ %254, %249 ]
  br i1 %256, label %258, label %257

257:                                              ; preds = %255
  store i32 24, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %312

258:                                              ; preds = %255
  %259 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 0
  %260 = load ptr, ptr %259, align 8, !tbaa !23
  %261 = load i64, ptr %16, align 8, !tbaa !20
  %262 = getelementptr inbounds %struct.sc_map_item_32, ptr %260, i64 %261
  %263 = getelementptr inbounds %struct.sc_map_item_32, ptr %262, i32 0, i32 0
  %264 = load i32, ptr %263, align 4, !tbaa !26
  store i32 %264, ptr %4, align 4, !tbaa !5
  store i64 1, ptr %17, align 8, !tbaa !20
  br label %265

265:                                              ; preds = %307, %258
  %266 = load i64, ptr %17, align 8, !tbaa !20
  %267 = icmp ne i64 %266, 0
  br i1 %267, label %268, label %279

268:                                              ; preds = %265
  %269 = load i64, ptr %16, align 8, !tbaa !20
  %270 = icmp eq i64 %269, -1
  br i1 %270, label %271, label %275

271:                                              ; preds = %268
  %272 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 5
  %273 = load i8, ptr %272, align 8, !tbaa !27, !range !16, !noundef !17
  %274 = trunc i8 %273 to i1
  br i1 %274, label %278, label %275

275:                                              ; preds = %271, %268
  %276 = load i32, ptr %4, align 4, !tbaa !5
  %277 = icmp ne i32 %276, 0
  br i1 %277, label %278, label %279

278:                                              ; preds = %275, %271
  br label %280

279:                                              ; preds = %275, %265
  store i64 0, ptr %17, align 8, !tbaa !20
  br label %280

280:                                              ; preds = %279, %278
  %281 = phi i64 [ 1, %278 ], [ 0, %279 ]
  %282 = icmp ne i64 %281, 0
  br i1 %282, label %283, label %308

283:                                              ; preds = %280
  store i8 0, ptr %12, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %284

284:                                              ; preds = %297, %283
  %285 = load i32, ptr %18, align 4, !tbaa !5
  %286 = icmp slt i32 %285, 128
  br i1 %286, label %288, label %287

287:                                              ; preds = %284
  store i32 30, ptr %8, align 4
  br label %300

288:                                              ; preds = %284
  %289 = load i32, ptr %4, align 4, !tbaa !5
  %290 = load i32, ptr %18, align 4, !tbaa !5
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %291
  %293 = load i32, ptr %292, align 4, !tbaa !5
  %294 = icmp eq i32 %289, %293
  br i1 %294, label %295, label %296

295:                                              ; preds = %288
  store i8 1, ptr %12, align 1, !tbaa !28
  store i32 30, ptr %8, align 4
  br label %300

296:                                              ; preds = %288
  br label %297

297:                                              ; preds = %296
  %298 = load i32, ptr %18, align 4, !tbaa !5
  %299 = add nsw i32 %298, 1
  store i32 %299, ptr %18, align 4, !tbaa !5
  br label %284, !llvm.loop !32

300:                                              ; preds = %295, %287
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %301

301:                                              ; preds = %300
  %302 = load i8, ptr %12, align 1, !tbaa !28, !range !16, !noundef !17
  %303 = trunc i8 %302 to i1
  br i1 %303, label %304, label %305

304:                                              ; preds = %301
  br label %306

305:                                              ; preds = %301
  call void @__assert_fail(ptr noundef @.str.128, ptr noundef @.str.14, i32 noundef 1880, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

306:                                              ; preds = %304
  br label %307

307:                                              ; preds = %306
  store i64 0, ptr %17, align 8, !tbaa !20
  br label %265, !llvm.loop !33

308:                                              ; preds = %280
  br label %309

309:                                              ; preds = %308
  %310 = load i64, ptr %16, align 8, !tbaa !20
  %311 = add nsw i64 %310, 1
  store i64 %311, ptr %16, align 8, !tbaa !20
  br label %246, !llvm.loop !34

312:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 -1, ptr %19, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 0, ptr %20, align 8, !tbaa !20
  br label %313

313:                                              ; preds = %381, %312
  %314 = load i64, ptr %20, align 8, !tbaa !20
  %315 = icmp ne i64 %314, 0
  br i1 %315, label %322, label %316

316:                                              ; preds = %313
  %317 = load i64, ptr %19, align 8, !tbaa !20
  %318 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 1
  %319 = load i32, ptr %318, align 8, !tbaa !22
  %320 = zext i32 %319 to i64
  %321 = icmp slt i64 %317, %320
  br label %322

322:                                              ; preds = %316, %313
  %323 = phi i1 [ false, %313 ], [ %321, %316 ]
  br i1 %323, label %325, label %324

324:                                              ; preds = %322
  store i32 33, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %384

325:                                              ; preds = %322
  %326 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 0
  %327 = load ptr, ptr %326, align 8, !tbaa !23
  %328 = load i64, ptr %19, align 8, !tbaa !20
  %329 = getelementptr inbounds %struct.sc_map_item_32, ptr %327, i64 %328
  %330 = getelementptr inbounds %struct.sc_map_item_32, ptr %329, i32 0, i32 1
  %331 = load i32, ptr %330, align 4, !tbaa !24
  store i32 %331, ptr %5, align 4, !tbaa !5
  store i64 1, ptr %20, align 8, !tbaa !20
  br label %332

332:                                              ; preds = %379, %325
  %333 = load i64, ptr %20, align 8, !tbaa !20
  %334 = icmp ne i64 %333, 0
  br i1 %334, label %335, label %351

335:                                              ; preds = %332
  %336 = load i64, ptr %19, align 8, !tbaa !20
  %337 = icmp eq i64 %336, -1
  br i1 %337, label %338, label %342

338:                                              ; preds = %335
  %339 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 5
  %340 = load i8, ptr %339, align 8, !tbaa !27, !range !16, !noundef !17
  %341 = trunc i8 %340 to i1
  br i1 %341, label %350, label %342

342:                                              ; preds = %338, %335
  %343 = getelementptr inbounds %struct.sc_map_32, ptr %1, i32 0, i32 0
  %344 = load ptr, ptr %343, align 8, !tbaa !23
  %345 = load i64, ptr %19, align 8, !tbaa !20
  %346 = getelementptr inbounds %struct.sc_map_item_32, ptr %344, i64 %345
  %347 = getelementptr inbounds %struct.sc_map_item_32, ptr %346, i32 0, i32 0
  %348 = load i32, ptr %347, align 4, !tbaa !26
  %349 = icmp ne i32 %348, 0
  br i1 %349, label %350, label %351

350:                                              ; preds = %342, %338
  br label %352

351:                                              ; preds = %342, %332
  store i64 0, ptr %20, align 8, !tbaa !20
  br label %352

352:                                              ; preds = %351, %350
  %353 = phi i64 [ 1, %350 ], [ 0, %351 ]
  %354 = icmp ne i64 %353, 0
  br i1 %354, label %355, label %380

355:                                              ; preds = %352
  store i8 0, ptr %12, align 1, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %356

356:                                              ; preds = %369, %355
  %357 = load i32, ptr %21, align 4, !tbaa !5
  %358 = icmp slt i32 %357, 128
  br i1 %358, label %360, label %359

359:                                              ; preds = %356
  store i32 39, ptr %8, align 4
  br label %372

360:                                              ; preds = %356
  %361 = load i32, ptr %5, align 4, !tbaa !5
  %362 = load i32, ptr %21, align 4, !tbaa !5
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %363
  %365 = load i32, ptr %364, align 4, !tbaa !5
  %366 = icmp eq i32 %361, %365
  br i1 %366, label %367, label %368

367:                                              ; preds = %360
  store i8 1, ptr %12, align 1, !tbaa !28
  store i32 39, ptr %8, align 4
  br label %372

368:                                              ; preds = %360
  br label %369

369:                                              ; preds = %368
  %370 = load i32, ptr %21, align 4, !tbaa !5
  %371 = add nsw i32 %370, 1
  store i32 %371, ptr %21, align 4, !tbaa !5
  br label %356, !llvm.loop !35

372:                                              ; preds = %367, %359
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %373

373:                                              ; preds = %372
  %374 = load i8, ptr %12, align 1, !tbaa !28, !range !16, !noundef !17
  %375 = trunc i8 %374 to i1
  br i1 %375, label %376, label %377

376:                                              ; preds = %373
  br label %378

377:                                              ; preds = %373
  call void @__assert_fail(ptr noundef @.str.128, ptr noundef @.str.14, i32 noundef 1891, ptr noundef @__PRETTY_FUNCTION__.test2) #6
  unreachable

378:                                              ; preds = %376
  br label %379

379:                                              ; preds = %378
  store i64 0, ptr %20, align 8, !tbaa !20
  br label %332, !llvm.loop !36

380:                                              ; preds = %352
  br label %381

381:                                              ; preds = %380
  %382 = load i64, ptr %19, align 8, !tbaa !20
  %383 = add nsw i64 %382, 1
  store i64 %383, ptr %19, align 8, !tbaa !20
  br label %313, !llvm.loop !37

384:                                              ; preds = %324
  call void @sc_map_term_32(ptr noundef %1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %1) #5
  ret void

385:                                              ; preds = %46
  unreachable
}

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


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

%struct.sc_map_32 = type { ptr, i32, i32, i32, i32, i8, i8, i8 }
%struct.sc_map_item_32 = type { i32, i32 }

@.str.14 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.128 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.129 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__.test2 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.130 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.131 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.132 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #2

declare zeroext i1 @sc_map_init_32(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @sc_map_term_32(ptr noundef) local_unnamed_addr #3

declare i32 @sc_map_del_32(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @sc_map_get_32(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @sc_map_put_32(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @sc_map_clear_32(ptr noundef) local_unnamed_addr #3

declare i32 @sc_map_size_32(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @test2() local_unnamed_addr #4 {
  %1 = alloca %struct.sc_map_32, align 8
  %2 = alloca [128 x i32], align 16
  %3 = alloca [128 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #5
  br label %.preheader125

.preheader125:                                    ; preds = %0, %._crit_edge
  %indvars.iv148 = phi i64 [ 0, %0 ], [ %indvars.iv.next149, %._crit_edge ]
  %4 = tail call i32 @rand() #5
  %.not146 = icmp eq i64 %indvars.iv148, 0
  br i1 %.not146, label %._crit_edge, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.preheader125, %.loopexit124.us
  %5 = phi i32 [ %11, %.loopexit124.us ], [ %4, %.preheader125 ]
  br label %7

6:                                                ; preds = %7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv148
  br i1 %exitcond.not, label %._crit_edge, label %7, !llvm.loop !5

7:                                                ; preds = %6, %.lr.ph.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %6 ], [ 0, %.lr.ph.us ]
  %8 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv
  %9 = load i32, ptr %8, align 4, !tbaa !7
  %10 = icmp eq i32 %9, %5
  br i1 %10, label %.loopexit124.us, label %6

.loopexit124.us:                                  ; preds = %7
  %11 = tail call i32 @rand() #5
  br label %.lr.ph.us

12:                                               ; preds = %._crit_edge
  %13 = call zeroext i1 @sc_map_init_32(ptr noundef nonnull %1, i32 noundef 16, i32 noundef 50) #5
  br i1 %13, label %18, label %17

._crit_edge:                                      ; preds = %6, %.preheader125
  %.lcssa127 = phi i32 [ %4, %.preheader125 ], [ %5, %6 ]
  %14 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv148
  store i32 %.lcssa127, ptr %14, align 4, !tbaa !7
  %15 = tail call i32 @rand() #5
  %16 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv148
  store i32 %15, ptr %16, align 4, !tbaa !7
  %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1
  %exitcond151.not = icmp eq i64 %indvars.iv.next149, 128
  br i1 %exitcond151.not, label %12, label %.preheader125, !llvm.loop !11

17:                                               ; preds = %12
  call void @__assert_fail(ptr noundef nonnull @.str.129, ptr noundef nonnull @.str.14, i32 noundef 1836, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

18:                                               ; preds = %12
  %19 = call i32 @sc_map_size_32(ptr noundef nonnull %1) #5
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %22, label %21

21:                                               ; preds = %18
  call void @__assert_fail(ptr noundef nonnull @.str.130, ptr noundef nonnull @.str.14, i32 noundef 1837, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

22:                                               ; preds = %18
  %23 = call i32 @sc_map_put_32(ptr noundef nonnull %1, i32 noundef 0, i32 noundef 0) #5
  call void @sc_map_clear_32(ptr noundef nonnull %1) #5
  %24 = call i32 @sc_map_size_32(ptr noundef nonnull %1) #5
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %.preheader123, label %27

.preheader123:                                    ; preds = %22
  %26 = getelementptr inbounds i8, ptr %1, i64 26
  br label %29

27:                                               ; preds = %22
  call void @__assert_fail(ptr noundef nonnull @.str.130, ptr noundef nonnull @.str.14, i32 noundef 1840, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

28:                                               ; preds = %48
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next153, 100
  br i1 %exitcond155.not, label %.preheader122, label %29, !llvm.loop !12

29:                                               ; preds = %.preheader123, %28
  %indvars.iv152 = phi i64 [ 0, %.preheader123 ], [ %indvars.iv.next153, %28 ]
  %30 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv152
  %31 = load i32, ptr %30, align 4, !tbaa !7
  %32 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv152
  %33 = load i32, ptr %32, align 4, !tbaa !7
  %34 = call i32 @sc_map_put_32(ptr noundef nonnull %1, i32 noundef %31, i32 noundef %33) #5
  %35 = call i32 @sc_map_get_32(ptr noundef nonnull %1, i32 noundef %31) #5
  %36 = load i8, ptr %26, align 2, !tbaa !13, !range !17, !noundef !18
  %37 = trunc nuw i8 %36 to i1
  br i1 %37, label %39, label %38

38:                                               ; preds = %29
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 1845, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

39:                                               ; preds = %29
  %40 = icmp eq i32 %35, %33
  br i1 %40, label %42, label %41

41:                                               ; preds = %39
  call void @__assert_fail(ptr noundef nonnull @.str.131, ptr noundef nonnull @.str.14, i32 noundef 1846, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

42:                                               ; preds = %39
  %43 = call i32 @sc_map_put_32(ptr noundef nonnull %1, i32 noundef %31, i32 noundef %33) #5
  %44 = call i32 @sc_map_del_32(ptr noundef nonnull %1, i32 noundef %31) #5
  %45 = load i8, ptr %26, align 2, !tbaa !13, !range !17, !noundef !18
  %46 = trunc nuw i8 %45 to i1
  br i1 %46, label %48, label %47

47:                                               ; preds = %42
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.14, i32 noundef 1850, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

48:                                               ; preds = %42
  %49 = icmp eq i32 %44, %33
  br i1 %49, label %28, label %50

50:                                               ; preds = %48
  call void @__assert_fail(ptr noundef nonnull @.str.131, ptr noundef nonnull @.str.14, i32 noundef 1851, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

51:                                               ; preds = %.preheader122
  %52 = call i32 @sc_map_size_32(ptr noundef nonnull %1) #5
  %53 = icmp eq i32 %52, 128
  br i1 %53, label %.preheader121, label %66

.preheader121:                                    ; preds = %51
  %54 = getelementptr inbounds i8, ptr %1, i64 8
  %55 = load i32, ptr %54, align 8
  %56 = zext i32 %55 to i64
  %57 = load ptr, ptr %1, align 8, !tbaa !19
  %58 = getelementptr inbounds i8, ptr %1, i64 24
  %59 = load i8, ptr %58, align 8, !range !17
  %60 = trunc nuw i8 %59 to i1
  br label %.critedge

.preheader122:                                    ; preds = %28, %.preheader122
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %.preheader122 ], [ 0, %28 ]
  %61 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv156
  %62 = load i32, ptr %61, align 4, !tbaa !7
  %63 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv156
  %64 = load i32, ptr %63, align 4, !tbaa !7
  %65 = call i32 @sc_map_put_32(ptr noundef nonnull %1, i32 noundef %62, i32 noundef %64) #5
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %exitcond159.not = icmp eq i64 %indvars.iv.next157, 128
  br i1 %exitcond159.not, label %51, label %.preheader122, !llvm.loop !20

66:                                               ; preds = %51
  call void @__assert_fail(ptr noundef nonnull @.str.132, ptr noundef nonnull @.str.14, i32 noundef 1858, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

.critedge:                                        ; preds = %.preheader121, %.loopexit120
  %.083137 = phi i64 [ -1, %.preheader121 ], [ %75, %.loopexit120 ]
  %67 = getelementptr inbounds %struct.sc_map_item_32, ptr %57, i64 %.083137
  %68 = getelementptr inbounds i8, ptr %67, i64 4
  %69 = load i32, ptr %68, align 4, !tbaa !21
  %70 = load i32, ptr %67, align 4, !tbaa !23
  %71 = icmp eq i64 %.083137, -1
  br i1 %71, label %72, label %74

72:                                               ; preds = %.critedge
  %73 = icmp ne i32 %70, 0
  %or.cond = select i1 %60, i1 true, i1 %73
  br i1 %or.cond, label %.preheader119.preheader, label %.loopexit120

.preheader119.preheader:                          ; preds = %74, %72
  br label %.preheader119

74:                                               ; preds = %.critedge
  %.old1.not = icmp eq i32 %70, 0
  br i1 %.old1.not, label %.loopexit120, label %.preheader119.preheader

.loopexit120:                                     ; preds = %79, %86, %72, %74
  %75 = add nsw i64 %.083137, 1
  %exitcond164.not = icmp eq i64 %75, %56
  br i1 %exitcond164.not, label %.critedge105, label %.critedge, !llvm.loop !24

.preheader119:                                    ; preds = %90, %.preheader119.preheader
  %indvars.iv160 = phi i64 [ 0, %.preheader119.preheader ], [ %indvars.iv.next161.1, %90 ]
  %76 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv160
  %77 = load i32, ptr %76, align 8, !tbaa !7
  %78 = icmp eq i32 %70, %77
  br i1 %78, label %79, label %.preheader119.1

79:                                               ; preds = %.preheader119
  %80 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv160
  %81 = load i32, ptr %80, align 8, !tbaa !7
  %82 = icmp eq i32 %69, %81
  br i1 %82, label %.loopexit120, label %.preheader119.1

.preheader119.1:                                  ; preds = %.preheader119, %79
  %indvars.iv.next161 = or disjoint i64 %indvars.iv160, 1
  %83 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv.next161
  %84 = load i32, ptr %83, align 4, !tbaa !7
  %85 = icmp eq i32 %70, %84
  br i1 %85, label %86, label %90

86:                                               ; preds = %.preheader119.1
  %87 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv.next161
  %88 = load i32, ptr %87, align 4, !tbaa !7
  %89 = icmp eq i32 %69, %88
  br i1 %89, label %.loopexit120, label %90

90:                                               ; preds = %86, %.preheader119.1
  %indvars.iv.next161.1 = add nuw nsw i64 %indvars.iv160, 2
  %exitcond163.not.1 = icmp eq i64 %indvars.iv.next161.1, 128
  br i1 %exitcond163.not.1, label %.critedge103, label %.preheader119, !llvm.loop !25

.critedge103:                                     ; preds = %90
  call void @__assert_fail(ptr noundef nonnull @.str.128, ptr noundef nonnull @.str.14, i32 noundef 1869, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

.critedge105:                                     ; preds = %.loopexit120, %.loopexit117
  %.078139 = phi i64 [ %97, %.loopexit117 ], [ -1, %.loopexit120 ]
  %91 = getelementptr inbounds %struct.sc_map_item_32, ptr %57, i64 %.078139
  %92 = load i32, ptr %91, align 4, !tbaa !23
  %93 = icmp eq i64 %.078139, -1
  br i1 %93, label %94, label %96

94:                                               ; preds = %.critedge105
  %95 = icmp ne i32 %92, 0
  %or.cond4 = select i1 %60, i1 true, i1 %95
  br i1 %or.cond4, label %.preheader116.preheader, label %.loopexit117

.preheader116.preheader:                          ; preds = %96, %94
  br label %.preheader116

96:                                               ; preds = %.critedge105
  %.old3.not = icmp eq i32 %92, 0
  br i1 %.old3.not, label %.loopexit117, label %.preheader116.preheader

.loopexit117:                                     ; preds = %.preheader116, %.preheader116.1, %.preheader116.2, %.preheader116.3, %94, %96
  %97 = add nsw i64 %.078139, 1
  %exitcond169.not = icmp eq i64 %97, %56
  br i1 %exitcond169.not, label %.critedge109, label %.critedge105, !llvm.loop !26

.preheader116.1:                                  ; preds = %.preheader116
  %indvars.iv.next166 = or disjoint i64 %indvars.iv165, 1
  %98 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv.next166
  %99 = load i32, ptr %98, align 4, !tbaa !7
  %100 = icmp eq i32 %92, %99
  br i1 %100, label %.loopexit117, label %.preheader116.2

.preheader116.2:                                  ; preds = %.preheader116.1
  %indvars.iv.next166.1 = or disjoint i64 %indvars.iv165, 2
  %101 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv.next166.1
  %102 = load i32, ptr %101, align 8, !tbaa !7
  %103 = icmp eq i32 %92, %102
  br i1 %103, label %.loopexit117, label %.preheader116.3

.preheader116.3:                                  ; preds = %.preheader116.2
  %indvars.iv.next166.2 = or disjoint i64 %indvars.iv165, 3
  %104 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv.next166.2
  %105 = load i32, ptr %104, align 4, !tbaa !7
  %106 = icmp eq i32 %92, %105
  br i1 %106, label %.loopexit117, label %107

107:                                              ; preds = %.preheader116.3
  %indvars.iv.next166.3 = add nuw nsw i64 %indvars.iv165, 4
  %exitcond168.not.3 = icmp eq i64 %indvars.iv.next166.3, 128
  br i1 %exitcond168.not.3, label %.critedge107, label %.preheader116, !llvm.loop !27

.preheader116:                                    ; preds = %107, %.preheader116.preheader
  %indvars.iv165 = phi i64 [ 0, %.preheader116.preheader ], [ %indvars.iv.next166.3, %107 ]
  %108 = getelementptr inbounds [128 x i32], ptr %2, i64 0, i64 %indvars.iv165
  %109 = load i32, ptr %108, align 16, !tbaa !7
  %110 = icmp eq i32 %92, %109
  br i1 %110, label %.loopexit117, label %.preheader116.1

.critedge107:                                     ; preds = %107
  call void @__assert_fail(ptr noundef nonnull @.str.128, ptr noundef nonnull @.str.14, i32 noundef 1880, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable

111:                                              ; preds = %.loopexit
  call void @sc_map_term_32(ptr noundef nonnull %1) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #5
  ret void

.critedge109:                                     ; preds = %.loopexit117, %.loopexit
  %.073141 = phi i64 [ %118, %.loopexit ], [ -1, %.loopexit117 ]
  %112 = getelementptr inbounds %struct.sc_map_item_32, ptr %57, i64 %.073141, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !21
  %114 = icmp eq i64 %.073141, -1
  %brmerge.not = select i1 %114, i1 %60, i1 false
  br i1 %brmerge.not, label %.preheader.preheader, label %115

115:                                              ; preds = %.critedge109
  %116 = getelementptr inbounds %struct.sc_map_item_32, ptr %57, i64 %.073141
  %117 = load i32, ptr %116, align 4, !tbaa !23
  %.not96 = icmp eq i32 %117, 0
  br i1 %.not96, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.critedge109, %115
  br label %.preheader

.loopexit:                                        ; preds = %.preheader, %.preheader.1, %.preheader.2, %.preheader.3, %115
  %118 = add nsw i64 %.073141, 1
  %exitcond174.not = icmp eq i64 %118, %56
  br i1 %exitcond174.not, label %111, label %.critedge109, !llvm.loop !28

.preheader.1:                                     ; preds = %.preheader
  %indvars.iv.next171 = or disjoint i64 %indvars.iv170, 1
  %119 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv.next171
  %120 = load i32, ptr %119, align 4, !tbaa !7
  %121 = icmp eq i32 %113, %120
  br i1 %121, label %.loopexit, label %.preheader.2

.preheader.2:                                     ; preds = %.preheader.1
  %indvars.iv.next171.1 = or disjoint i64 %indvars.iv170, 2
  %122 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv.next171.1
  %123 = load i32, ptr %122, align 8, !tbaa !7
  %124 = icmp eq i32 %113, %123
  br i1 %124, label %.loopexit, label %.preheader.3

.preheader.3:                                     ; preds = %.preheader.2
  %indvars.iv.next171.2 = or disjoint i64 %indvars.iv170, 3
  %125 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv.next171.2
  %126 = load i32, ptr %125, align 4, !tbaa !7
  %127 = icmp eq i32 %113, %126
  br i1 %127, label %.loopexit, label %128

128:                                              ; preds = %.preheader.3
  %indvars.iv.next171.3 = add nuw nsw i64 %indvars.iv170, 4
  %exitcond173.not.3 = icmp eq i64 %indvars.iv.next171.3, 128
  br i1 %exitcond173.not.3, label %.critedge111, label %.preheader, !llvm.loop !29

.preheader:                                       ; preds = %128, %.preheader.preheader
  %indvars.iv170 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next171.3, %128 ]
  %129 = getelementptr inbounds [128 x i32], ptr %3, i64 0, i64 %indvars.iv170
  %130 = load i32, ptr %129, align 16, !tbaa !7
  %131 = icmp eq i32 %113, %130
  br i1 %131, label %.loopexit, label %.preheader.1

.critedge111:                                     ; preds = %128
  call void @__assert_fail(ptr noundef nonnull @.str.128, ptr noundef nonnull @.str.14, i32 noundef 1891, ptr noundef nonnull @__PRETTY_FUNCTION__.test2) #6
  unreachable
}

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


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